Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 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");
     Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
     if (wrapper != null)
     {
         EFlThreadIOCallSyncWrapper func_wrapper = new EFlThreadIOCallSyncWrapper(func, func_data, func_free_cb);
         System.IntPtr _ret_var = default(System.IntPtr);
         try {
             _ret_var = ((IThreadIOConcrete)wrapper).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));
     }
 }