Esempio n. 1
0
        ///<summary>Method to raise event PropertiesChangedEvt.</summary>
        public void On_PropertiesChangedEvt(Efl.IModelPropertiesChangedEvt_Args e)
        {
            EventHandler <Efl.IModelPropertiesChangedEvt_Args> evt;

            lock (eventLock) {
                evt = (EventHandler <Efl.IModelPropertiesChangedEvt_Args>)eventHandlers[PropertiesChangedEvtKey];
            }
            evt?.Invoke(this, e);
        }
Esempio n. 2
0
 private void on_PropertiesChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
 {
     Efl.IModelPropertiesChangedEvt_Args args = new Efl.IModelPropertiesChangedEvt_Args();
     args.arg = evt.Info;;
     try {
         On_PropertiesChangedEvt(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 PropertiesChangedEvt.</summary>
        public void OnPropertiesChangedEvt(Efl.IModelPropertiesChangedEvt_Args e)
        {
            var    key  = "_EFL_MODEL_EVENT_PROPERTIES_CHANGED";
            IntPtr desc = Efl.EventDescription.GetNative("eflcustomexportsmono", 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);
            }
        }