コード例 #1
0
        ///<summary>Method to raise event TabChangedEvt.</summary>
        public void On_TabChangedEvt(Efl.Ui.TabPageTabChangedEvt_Args e)
        {
            EventHandler <Efl.Ui.TabPageTabChangedEvt_Args> evt;

            lock (eventLock) {
                evt = (EventHandler <Efl.Ui.TabPageTabChangedEvt_Args>)eventHandlers[TabChangedEvtKey];
            }
            evt?.Invoke(this, e);
        }
コード例 #2
0
 private void on_TabChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)
 {
     Efl.Ui.TabPageTabChangedEvt_Args args = new Efl.Ui.TabPageTabChangedEvt_Args();
     args.arg = evt.Info;;
     try {
         On_TabChangedEvt(args);
     } catch (Exception e) {
         Eina.Log.Error(e.ToString());
         Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
     }
 }
コード例 #3
0
            /// <summary>Method to raise event TabChangedEvt.</summary>
            public void OnTabChangedEvt(Efl.Ui.TabPageTabChangedEvt_Args e)
            {
                var    key  = "_EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED";
                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);
                }
            }