/// <summary>This will listen to the standard "click" events on a theme and emit the appropriate events through the <see cref="Efl.Ui.IClickable"/> interface. /// Using these methods widgets do not need to listen to the theme signals. This class does it and calls the correct clickable functions. /// /// This handles theme signals "efl,action,press", "efl,action,unpress" and "efl,action,mouse_out", and the <see cref="Efl.Input.IInterface.PointerMoveEvt"/> event.</summary> /// <param name="kw_object">The object to listen on.</param> /// <param name="clickable">The object to call the clickable methods on.</param> public static void BindToTheme(Efl.Canvas.Layout kw_object, Efl.Ui.IClickable clickable) { Efl.Ui.ClickableUtil.NativeMethods.efl_ui_clickable_util_bind_to_theme_ptr.Value.Delegate(kw_object, clickable); Eina.Error.RaiseIfUnhandledException(); }
/// <summary>This will listen to the standard "click" events on an object, and emit the appropriate events through the <see cref="Efl.Ui.IClickable"/> interface. /// Using these methods widgets do not need to listen to the object events. This class does it and calls the correct clickable functions. /// /// The handled events are <see cref="Efl.Input.IInterface.PointerUpEvt"/> and <see cref="Efl.Input.IInterface.PointerDownEvt"/>.</summary> /// <param name="kw_object">The object to listen on.</param> /// <param name="clickable">The object to call the clickable methods on.</param> public static void BindToObject(Efl.Input.IInterface kw_object, Efl.Ui.IClickable clickable) { Efl.Ui.ClickableUtil.NativeMethods.efl_ui_clickable_util_bind_to_object_ptr.Value.Delegate(kw_object, clickable); Eina.Error.RaiseIfUnhandledException(); }
private static void bind_to_object(System.IntPtr obj, System.IntPtr pd, Efl.Input.IInterface kw_object, Efl.Ui.IClickable clickable) { Eina.Log.Debug("function efl_ui_clickable_util_bind_to_object was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ClickableUtil.BindToObject(kw_object, clickable); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_clickable_util_bind_to_object_ptr.Value.Delegate(kw_object, clickable); } }