Ejemplo n.º 1
0
        ///<summary>Method to raise event LongpressedEvt.</summary>
        public void On_LongpressedEvt(Efl.Ui.IClickableLongpressedEvt_Args e)
        {
            EventHandler <Efl.Ui.IClickableLongpressedEvt_Args> evt;

            lock (eventLock) {
                evt = (EventHandler <Efl.Ui.IClickableLongpressedEvt_Args>)eventHandlers[LongpressedEvtKey];
            }
            evt?.Invoke(this, e);
        }
Ejemplo n.º 2
0
 private void on_LongpressedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
 {
     Efl.Ui.IClickableLongpressedEvt_Args args = new Efl.Ui.IClickableLongpressedEvt_Args();
     args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Object);
     try {
         On_LongpressedEvt(args);
     } catch (Exception e) {
         Eina.Log.Error(e.ToString());
         Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
     }
 }
Ejemplo n.º 3
0
            ///<summary>Method to raise event LongpressedEvt.</summary>
            public void OnLongpressedEvt(Efl.Ui.IClickableLongpressedEvt_Args e)
            {
                var    key  = "_EFL_UI_EVENT_LONGPRESSED";
                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);
            }
Ejemplo n.º 4
0
            ///<summary>Method to raise event LongpressedEvt.</summary>
            public void OnLongpressedEvt(Efl.Ui.IClickableLongpressedEvt_Args e)
            {
                var    key  = "_EFL_UI_EVENT_LONGPRESSED";
                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);
                }
            }