///<summary>Method to raise event VisibilityChangedEvt.</summary> public void On_VisibilityChangedEvt(Efl.Gfx.IEntityVisibilityChangedEvt_Args e) { EventHandler <Efl.Gfx.IEntityVisibilityChangedEvt_Args> evt; lock (eventLock) { evt = (EventHandler <Efl.Gfx.IEntityVisibilityChangedEvt_Args>)eventHandlers[VisibilityChangedEvtKey]; } evt?.Invoke(this, e); }
private void on_VisibilityChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt) { Efl.Gfx.IEntityVisibilityChangedEvt_Args args = new Efl.Gfx.IEntityVisibilityChangedEvt_Args(); args.arg = evt.Info != IntPtr.Zero; try { On_VisibilityChangedEvt(args); } catch (Exception e) { Eina.Log.Error(e.ToString()); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } }
///<summary>Method to raise event VisibilityChangedEvt.</summary> public void OnVisibilityChangedEvt(Efl.Gfx.IEntityVisibilityChangedEvt_Args e) { var key = "_EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED"; 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 = Eina.PrimitiveConversion.ManagedToPointerAlloc(e.arg ? (byte)1 : (byte)0); try { Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info); } finally { Marshal.FreeHGlobal(info); } }