Esempio n. 1
0
        ///<summary>Method to raise event ButtonClickedEvt.</summary>
        public void On_ButtonClickedEvt(Efl.Ui.AlertPopupButtonClickedEvt_Args e)
        {
            EventHandler <Efl.Ui.AlertPopupButtonClickedEvt_Args> evt;

            lock (eventLock) {
                evt = (EventHandler <Efl.Ui.AlertPopupButtonClickedEvt_Args>)eventHandlers[ButtonClickedEvtKey];
            }
            evt?.Invoke(this, e);
        }
Esempio n. 2
0
 private void on_ButtonClickedEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
 {
     Efl.Ui.AlertPopupButtonClickedEvt_Args args = new Efl.Ui.AlertPopupButtonClickedEvt_Args();
     args.arg = evt.Info;;
     try {
         On_ButtonClickedEvt(args);
     } catch (Exception e) {
         Eina.Log.Error(e.ToString());
         Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
     }
 }
Esempio n. 3
0
            ///<summary>Method to raise event ButtonClickedEvt.</summary>
            public void OnButtonClickedEvt(Efl.Ui.AlertPopupButtonClickedEvt_Args e)
            {
                var    key  = "_EFL_UI_ALERT_POPUP_EVENT_BUTTON_CLICKED";
                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 = 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);
                }
            }