win: Fix ABI compatibility for grab modifiers
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 17 Jul 2017 05:24:30 +0000 (14:24 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 17 Jul 2017 05:24:30 +0000 (14:24 +0900)
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
src/lib/elementary/efl_ui_win.eo
src/lib/elementary/elm_win_legacy.h

index cd54c58..dd23d99 100644 (file)
@@ -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
index 21de1d4..431f73a 100644 (file)
@@ -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.
index ebb4ff5..0c8c290 100644 (file)
@@ -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