///<summary>Method to raise event ChildRemovedEvt.</summary> public void On_ChildRemovedEvt(Efl.IModelChildRemovedEvt_Args e) { EventHandler <Efl.IModelChildRemovedEvt_Args> evt; lock (eventLock) { evt = (EventHandler <Efl.IModelChildRemovedEvt_Args>)eventHandlers[ChildRemovedEvtKey]; } evt?.Invoke(this, e); }
private void on_ChildRemovedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt) { Efl.IModelChildRemovedEvt_Args args = new Efl.IModelChildRemovedEvt_Args(); args.arg = evt.Info;; try { On_ChildRemovedEvt(args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } }
/// <summary>Method to raise event ChildRemovedEvt.</summary> public void OnChildRemovedEvt(Efl.IModelChildRemovedEvt_Args e) { var key = "_EFL_MODEL_EVENT_CHILD_REMOVED"; IntPtr desc = Efl.EventDescription.GetNative("eflcustomexportsmono", key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg)); try { Marshal.StructureToPtr(e.arg, info, false); Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info); } finally { Marshal.FreeHGlobal(info); } }