//
}
-EOLIAN static Eina_Bool
-_efl_ui_win_keygrab_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *key,
- Efl_Input_Modifier modifiers EINA_UNUSED,
- Efl_Input_Modifier not_modifiers EINA_UNUSED,
- int priority EINA_UNUSED, Efl_Ui_Win_Keygrab_Mode grab_mode)
-{
- Eina_Bool ret = EINA_FALSE;
-#ifdef HAVE_ELEMENTARY_X
- _internal_elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- {
- Ecore_X_Win_Keygrab_Mode x_grab_mode;
- switch (grab_mode)
- {
- case ELM_WIN_KEYGRAB_SHARED:
- x_grab_mode = ECORE_X_WIN_KEYGRAB_SHARED;
- break;
- case ELM_WIN_KEYGRAB_TOPMOST:
- x_grab_mode = ECORE_X_WIN_KEYGRAB_TOPMOST;
- break;
- case ELM_WIN_KEYGRAB_EXCLUSIVE:
- x_grab_mode = ECORE_X_WIN_KEYGRAB_EXCLUSIVE;
- break;
- case ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE:
- x_grab_mode = ECORE_X_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE;
- break;
- default:
- return ret;
- }
- ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, x_grab_mode);
- }
-// TIZEN_ONLY(20150722): Add ecore_wl_window_keygrab_* APIs
-#elif defined HAVE_ELEMENTARY_WL2
- _elm_win_wlwindow_get(sd);
- if (sd->wl.win)
- {
- Ecore_Wl2_Window_Keygrab_Mode wl_grab_mode;
- switch (grab_mode)
- {
- case ELM_WIN_KEYGRAB_SHARED:
- wl_grab_mode = ECORE_WL2_WINDOW_KEYGRAB_SHARED;
- break;
- case ELM_WIN_KEYGRAB_TOPMOST:
- wl_grab_mode = ECORE_WL2_WINDOW_KEYGRAB_TOPMOST;
- break;
- case ELM_WIN_KEYGRAB_EXCLUSIVE:
- wl_grab_mode = ECORE_WL2_WINDOW_KEYGRAB_EXCLUSIVE;
- break;
- case ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE:
- wl_grab_mode = ECORE_WL2_WINDOW_KEYGRAB_OVERRIDE_EXCLUSIVE;
- break;
- default:
- return ret;
- }
- ret = ecore_wl2_window_keygrab_set(sd->wl.win, key, 0, 0, 0, wl_grab_mode);
- }
-//
-#else
- (void)sd;
- (void)key;
- (void)grab_mode;
-#endif
- return ret;
-}
-
-EOLIAN static Eina_Bool
-_efl_ui_win_keygrab_unset(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *key,
- Efl_Input_Modifier modifiers EINA_UNUSED,
- Efl_Input_Modifier not_modifiers EINA_UNUSED)
-{
- Eina_Bool ret = EINA_FALSE;
-#ifdef HAVE_ELEMENTARY_X
- _internal_elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0);
-// TIZEN_ONLY(20150722): Add ecore_wl_window_keygrab_* APIs
-#elif defined HAVE_ELEMENTARY_WL2
- _elm_win_wlwindow_get(sd);
- if (sd->wl.win)
- ret = ecore_wl2_window_keygrab_unset(sd->wl.win, key, 0, 0);
-//
-#else
- (void)sd;
- (void)key;
-#endif
- return ret;
-}
-
EOLIAN static void
_efl_ui_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled)
{
elm_win_keygrab_set(Elm_Win *obj, const char *key,
Evas_Modifier_Mask modifiers EINA_UNUSED,
Evas_Modifier_Mask not_modifiers EINA_UNUSED,
- int priority, Elm_Win_Keygrab_Mode grab_mode)
+ int priority EINA_UNUSED, Elm_Win_Keygrab_Mode grab_mode)
{
// Note: Not converting modifiers as they are not used in the implementation
- return efl_ui_win_keygrab_set(obj, key,
- EFL_INPUT_MODIFIER_NONE,
- EFL_INPUT_MODIFIER_NONE,
- priority, grab_mode);
+ Eina_Bool ret = EINA_FALSE;
+#ifdef HAVE_ELEMENTARY_X
+ Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+ _internal_elm_win_xwindow_get(sd);
+ if (sd->x.xwin)
+ {
+ Ecore_X_Win_Keygrab_Mode x_grab_mode;
+ switch (grab_mode)
+ {
+ case ELM_WIN_KEYGRAB_SHARED:
+ x_grab_mode = ECORE_X_WIN_KEYGRAB_SHARED;
+ break;
+ case ELM_WIN_KEYGRAB_TOPMOST:
+ x_grab_mode = ECORE_X_WIN_KEYGRAB_TOPMOST;
+ break;
+ case ELM_WIN_KEYGRAB_EXCLUSIVE:
+ x_grab_mode = ECORE_X_WIN_KEYGRAB_EXCLUSIVE;
+ break;
+ case ELM_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE:
+ x_grab_mode = ECORE_X_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE;
+ break;
+ default:
+ return ret;
+ }
+ ret = ecore_x_window_keygrab_set(sd->x.xwin, key, 0, 0, 0, x_grab_mode);
+ }
+#else
+ (void)key;
+ (void)grab_mode;
+#endif
+ return ret;
}
EAPI Eina_Bool
Evas_Modifier_Mask not_modifiers EINA_UNUSED)
{
// Note: Not converting modifiers as they are not used in the implementation
- return efl_ui_win_keygrab_unset(obj, key,
- EFL_INPUT_MODIFIER_NONE,
- EFL_INPUT_MODIFIER_NONE);
+ Eina_Bool ret = EINA_FALSE;
+#ifdef HAVE_ELEMENTARY_X
+ Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
+ _internal_elm_win_xwindow_get(sd);
+ if (sd->x.xwin)
+ ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0);
+#else
+ (void)sd;
+ (void)key;
+#endif
+ return ret;
}
EAPI Eina_Bool
If user flicks the upper side of window, the indicator is shown temporarily.]]
}
-enum Efl.Ui.Win_Keygrab_Mode
-{
- [[Define the keygrab modes of window. A window may send commands to the
- Keyrouter according this mode, and perform different actions.]]
-
- unknown = 0, [[Unknown keygrab mode]]
- shared = (1 << 8), [[Get the grabbed-key together with the other client
- windows]]
- topmost = (1 << 9), [[Get the grabbed-key only when window is top of the
- stack]]
- exclusive = (1 << 10), [[Get the grabbed-key exclusively regardless of
- window's position]]
- override_exclusive = (1 << 11) [[Get the grabbed-key exclusively
- regardless of window's position. This is
- overrided by grabs from the other client
- window]]
-}
-
enum Efl.Ui.Win_Modal_Mode
{
[[Defines the mode of a modal window]]
@in v: bool; [[If $true, center vertically. If $false, do not change vertical location.]]
}
}
- keygrab_set {
- [[Set keygrab value of the window
-
- This function grabs the $key of window using $grab_mode.
- ]]
-
- return: bool; [[$true on success, $false otherwise]]
- params {
- @in key: string; [[This string is the keyname to grab.]]
- @in modifiers: Efl.Input.Modifier; [[A combination of modifier keys
- that must be present to trigger the event. Not supported yet.]]
- @in not_modifiers: Efl.Input.Modifier; [[A combination of modifier
- keys that must not be present to trigger the event. Not supported yet.]]
- @in priority: int; [[Not supported yet.]]
- @in grab_mode: Efl.Ui.Win_Keygrab_Mode; [[Describes how the key should
- be grabbed, wrt. focus and stacking.]]
- }
- }
- keygrab_unset {
- [[Unset keygrab value of the window
-
- This function unset keygrab value. Ungrab $key of window.
- ]]
- return: bool; [[$true on success, $false otherwise]]
- params {
- @in key: string; [[This string is the keyname to grab.]]
- @in modifiers: Efl.Input.Modifier; [[A combination of modifier keys
- that must be present to trigger the event. Not supported yet.]]
- @in not_modifiers: Efl.Input.Modifier; [[A combination of modifier keys
- that must not be present to trigger the event. Not supported yet.]]
- }
- }
move_resize_start {
[[Start moving or resizing the window.