Beispiel #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;
     }
 }
Beispiel #2
0
 internal EflThreadIOCallSyncWrapper(EflThreadIOCallSyncInternal _cb, IntPtr _cb_data, EinaFreeCb _cb_free_cb)
 {
     this._cb         = _cb;
     this._cb_data    = _cb_data;
     this._cb_free_cb = _cb_free_cb;
 }
Beispiel #3
0
            private static System.IntPtr call_sync(System.IntPtr obj, System.IntPtr pd, IntPtr func_data, EflThreadIOCallSyncInternal func, EinaFreeCb func_free_cb)
            {
                Eina.Log.Debug("function efl_threadio_call_sync was called");
                var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);

                if (ws != null)
                {
                    EflThreadIOCallSyncWrapper func_wrapper = new EflThreadIOCallSyncWrapper(func, func_data, func_free_cb);
                    System.IntPtr _ret_var = default(System.IntPtr);
                    try
                    {
                        _ret_var = ((IThreadIO)ws.Target).CallSync(func_wrapper.ManagedCb);
                    }
                    catch (Exception e)
                    {
                        Eina.Log.Warning($"Callback error: {e.ToString()}");
                        Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
                    }

                    return(_ret_var);
                }
                else
                {
                    return(efl_threadio_call_sync_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), func_data, func, func_free_cb));
                }
            }