예제 #1
0
        ///<summary>Method to raise event MessageEvt.</summary>
        public void On_MessageEvt(Efl.LoopMessageHandlerMessageEvt_Args e)
        {
            EventHandler <Efl.LoopMessageHandlerMessageEvt_Args> evt;

            lock (eventLock) {
                evt = (EventHandler <Efl.LoopMessageHandlerMessageEvt_Args>)eventHandlers[MessageEvtKey];
            }
            evt?.Invoke(this, e);
        }
예제 #2
0
 private void on_MessageEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
 {
     Efl.LoopMessageHandlerMessageEvt_Args args = new Efl.LoopMessageHandlerMessageEvt_Args();
     args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.LoopMessage);
     try {
         On_MessageEvt(args);
     } catch (Exception e) {
         Eina.Log.Error(e.ToString());
         Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
     }
 }
예제 #3
0
 private void on_MessageEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
 {
     Efl.LoopMessageHandlerMessageEvt_Args args = new Efl.LoopMessageHandlerMessageEvt_Args();
     args.arg = new Efl.LoopMessage(evt.Info);
     try {
         On_MessageEvt(args);
     } catch (Exception e) {
         Eina.Log.Error(e.ToString());
         Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
     }
 }
예제 #4
0
        ///<summary>Method to raise event MessageEvt.</summary>
        public void OnMessageEvt(Efl.LoopMessageHandlerMessageEvt_Args e)
        {
            var    key  = "_EFL_LOOP_MESSAGE_HANDLER_EVENT_MESSAGE";
            IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);

            if (desc == IntPtr.Zero)
            {
                Eina.Log.Error($"Failed to get native event {key}");
                return;
            }

            IntPtr info = e.arg.NativeHandle;

            Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
        }