Example #1
0
        ///<summary>Method to raise event ChildAddedEvt.</summary>
        public void On_ChildAddedEvt(Efl.IModelChildAddedEvt_Args e)
        {
            EventHandler <Efl.IModelChildAddedEvt_Args> evt;

            lock (eventLock) {
                evt = (EventHandler <Efl.IModelChildAddedEvt_Args>)eventHandlers[ChildAddedEvtKey];
            }
            evt?.Invoke(this, e);
        }
Example #2
0
 private void on_ChildAddedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
 {
     Efl.IModelChildAddedEvt_Args args = new Efl.IModelChildAddedEvt_Args();
     args.arg = evt.Info;;
     try {
         On_ChildAddedEvt(args);
     } catch (Exception e) {
         Eina.Log.Error(e.ToString());
         Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
     }
 }
Example #3
0
        /// <summary>Method to raise event ChildAddedEvt.</summary>
        public void OnChildAddedEvt(Efl.IModelChildAddedEvt_Args e)
        {
            var    key  = "_EFL_MODEL_EVENT_CHILD_ADDED";
            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);
            }
        }