From 9baa8752a9170e68e9430474f26cc1e672677d8e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 17 Jul 2017 14:24:30 +0900 Subject: [PATCH] win: Fix ABI compatibility for grab modifiers This fixes an ABI change when moving from unsigned long long modifier mask to a simple enum. This is a fix for the release of EFL 1.20. --- src/lib/elementary/efl_ui_win.c | 18 ++++++++++++++++++ src/lib/elementary/efl_ui_win.eo | 2 ++ src/lib/elementary/elm_win_legacy.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index cd54c58..dd23d99 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -8071,6 +8071,24 @@ elm_win_resize_object_del(Eo *obj, Evas_Object *subobj) ERR("could not remove sub object %p from window %p", subobj, obj); } +EAPI Eina_Bool +elm_win_keygrab_set(Elm_Win *obj, const char *key, + Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, + int priority, Elm_Win_Keygrab_Mode grab_mode) +{ + return efl_ui_win_keygrab_set(obj, key, + (Efl_Input_Modifier) modifiers, + (Efl_Input_Modifier) not_modifiers, + priority, grab_mode); +} + +EAPI Eina_Bool +elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) +{ + return efl_ui_win_keygrab_unset(obj, key, + (Efl_Input_Modifier) modifiers, + (Efl_Input_Modifier) not_modifiers); +} // deprecated EAPI void diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 21de1d4..431f73a 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -859,6 +859,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, @in grab_mode: Efl.Ui.Win.Keygrab_Mode; [[Describes how the key should be grabbed, wrt. focus and stacking.]] } + legacy: null; } keygrab_unset { [[Unset keygrab value of the window @@ -873,6 +874,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window, @in not_modifiers: Efl.Input.Modifier; [[A combinaison of modifier keys that must not be present to trigger the event. Not supported yet.]] } + legacy: null; } move_resize_start { [[Start moving or resizing the window. diff --git a/src/lib/elementary/elm_win_legacy.h b/src/lib/elementary/elm_win_legacy.h index ebb4ff5..0c8c290 100644 --- a/src/lib/elementary/elm_win_legacy.h +++ b/src/lib/elementary/elm_win_legacy.h @@ -1090,6 +1090,39 @@ EAPI void elm_win_aspect_set(Elm_Win *obj, double aspect); EAPI double elm_win_aspect_get(const Elm_Win *obj); /** + * @brief Set keygrab value of the window + * + * This function grabs the @c key of window using @c grab_mode. + * + * @param[in] key This string is the keyname to grab. + * @param[in] modifiers A combinaison of modifier keys that must be present to + * trigger the event. Not supported yet. + * @param[in] not_modifiers A combinaison of modifier keys that must not be + * present to trigger the event. Not supported yet. + * @param[in] priority Not supported yet. + * @param[in] grab_mode Describes how the key should be grabbed, wrt. focus and + * stacking. + * + * @return @c true on success, @c false otherwise + */ +EAPI Eina_Bool elm_win_keygrab_set(Elm_Win *obj, const char *key, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, int priority, Elm_Win_Keygrab_Mode grab_mode); + +/** + * @brief Unset keygrab value of the window + * + * This function unset keygrab value. Ungrab @c key of window. + * + * @param[in] key This string is the keyname to grab. + * @param[in] modifiers A combinaison of modifier keys that must be present to + * trigger the event. Not supported yet. + * @param[in] not_modifiers A combinaison of modifier keys that must not be + * present to trigger the event. Not supported yet. + * + * @return @c true on success, @c false otherwise + */ +EAPI Eina_Bool elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers); + +/** * @brief Get the elm_win object from any child object * * @return The elm_win, or @c NULL on failure -- 2.7.4