/// <param name="func">No description supplied.</param> /// <returns>No description supplied.</returns> public System.IntPtr CallSync(EflThreadIOCallSync func) { GCHandle func_handle = GCHandle.Alloc(func); var _ret_var = Efl.IThreadIOConcrete.NativeMethods.efl_threadio_call_sync_ptr.Value.Delegate(this.NativeHandle, GCHandle.ToIntPtr(func_handle), EflThreadIOCallSyncWrapper.Cb, Efl.Eo.Globals.free_gchandle); Eina.Error.RaiseIfUnhandledException(); return(_ret_var); }
internal static System.IntPtr Cb(IntPtr cb_data, Efl.Event.NativeStruct kw_event) { GCHandle handle = GCHandle.FromIntPtr(cb_data); EflThreadIOCallSync cb = (EflThreadIOCallSync)handle.Target; System.IntPtr _ret_var = default(System.IntPtr); try { _ret_var = cb(kw_event); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return(_ret_var); }