Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (this._cb_free_cb != null)
     {
         if (disposing)
         {
             this._cb_free_cb(this._cb_data);
         }
         else
         {
             Efl.Eo.Globals.ThreadSafeFreeCbExec(this._cb_free_cb, this._cb_data);
         }
         this._cb_free_cb = null;
         this._cb_data    = IntPtr.Zero;
         this._cb         = null;
     }
 }
Example #2
0
            private static Eina.Error property_logic_add(System.IntPtr obj, System.IntPtr pd, System.String property, IntPtr get_data, EflViewModelPropertyGetInternal get, EinaFreeCb get_free_cb, IntPtr set_data, EflViewModelPropertySetInternal set, EinaFreeCb set_free_cb, System.IntPtr binded)
            {
                Eina.Log.Debug("function efl_view_model_property_logic_add was called");
                var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);

                if (ws != null)
                {
                    var _in_binded = new Eina.Iterator <System.String>(binded, false, false);
                    EflViewModelPropertyGetWrapper get_wrapper = new EflViewModelPropertyGetWrapper(get, get_data, get_free_cb);
                    EflViewModelPropertySetWrapper set_wrapper = new EflViewModelPropertySetWrapper(set, set_data, set_free_cb);
                    Eina.Error _ret_var = default(Eina.Error);
                    try
                    {
                        _ret_var = ((ViewModel)ws.Target).AddPropertyLogic(property, get_wrapper.ManagedCb, set_wrapper.ManagedCb, _in_binded);
                    }
                    catch (Exception e)
                    {
                        Eina.Log.Warning($"Callback error: {e.ToString()}");
                        Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
                    }

                    return(_ret_var);
                }
                else
                {
                    return(efl_view_model_property_logic_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), property, get_data, get, get_free_cb, set_data, set, set_free_cb, binded));
                }
            }
Example #3
0
 internal EflViewModelPropertyGetWrapper(EflViewModelPropertyGetInternal _cb, IntPtr _cb_data, EinaFreeCb _cb_free_cb)
 {
     this._cb         = _cb;
     this._cb_data    = _cb_data;
     this._cb_free_cb = _cb_free_cb;
 }