Exemple #1
0
        ///<summary>Method to raise event PressedEvt.</summary>
        public void On_PressedEvt(Efl.Ui.IClickablePressedEvt_Args e)
        {
            EventHandler <Efl.Ui.IClickablePressedEvt_Args> evt;

            lock (eventLock) {
                evt = (EventHandler <Efl.Ui.IClickablePressedEvt_Args>)eventHandlers[PressedEvtKey];
            }
            evt?.Invoke(this, e);
        }
Exemple #2
0
 private void on_PressedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
 {
     Efl.Ui.IClickablePressedEvt_Args args = new Efl.Ui.IClickablePressedEvt_Args();
     args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Object);
     try {
         On_PressedEvt(args);
     } catch (Exception e) {
         Eina.Log.Error(e.ToString());
         Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
     }
 }
Exemple #3
0
            ///<summary>Method to raise event PressedEvt.</summary>
            public void OnPressedEvt(Efl.Ui.IClickablePressedEvt_Args e)
            {
                var    key  = "_EFL_UI_EVENT_PRESSED";
                IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, 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);
            }
            ///<summary>Method to raise event PressedEvt.</summary>
            public void OnPressedEvt(Efl.Ui.IClickablePressedEvt_Args e)
            {
                var    key  = "_EFL_UI_EVENT_PRESSED";
                IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key);

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

                IntPtr info = Eina.PrimitiveConversion.ManagedToPointerAlloc(e.arg);

                try
                {
                    Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
                }
                finally
                {
                    Marshal.FreeHGlobal(info);
                }
            }