e_keyrouter: Impl getter methods for E_Keyrouter_Grabbed_Key encapsulation 52/317552/1
authorTaeHyeon Jeong <thyeon.jeong@samsung.com>
Tue, 24 Dec 2024 07:59:04 +0000 (16:59 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 3 Jan 2025 06:58:20 +0000 (15:58 +0900)
TO-BE
- Implemented getter methods to get values based on HardKeys and keycode.

Change-Id: I4b5473af64ced534cd25b443787a3f693500be8b

src/bin/inputmgr/e_keyrouter_hardkeys.c
src/bin/inputmgr/e_keyrouter_hardkeys_intern.h

index 38163e970ddfbfe9eca6b18b786f7f6f851b3565..3c54d0039e6f9920fdb8669d743cbf36f2325079 100644 (file)
@@ -208,7 +208,7 @@ e_keyrouter_hardkeys_remove_keynode_with_client(E_Keyrouter_Grabbed_Key *hardkey
 }
 
 EINTERN char *
-e_keyrouter_hardkeys_keycode_name_get(E_Keyrouter_Grabbed_Key *hardkeys,
+e_keyrouter_hardkeys_keyname_get(E_Keyrouter_Grabbed_Key *hardkeys,
         uint32_t keycode)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(hardkeys, NULL);
@@ -216,6 +216,24 @@ e_keyrouter_hardkeys_keycode_name_get(E_Keyrouter_Grabbed_Key *hardkeys,
    return hardkeys[keycode].keyname;
 }
 
+EINTERN Eina_Bool
+e_keyrouter_hardkeys_no_privcheck_get(E_Keyrouter_Grabbed_Key *hardkeys,
+        uint32_t keycode)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(hardkeys, EINA_FALSE);
+
+   return hardkeys[keycode].no_privcheck;
+}
+
+EINTERN Eina_Bool
+e_keyrouter_hardkeys_repeat_get(E_Keyrouter_Grabbed_Key *hardkeys,
+        uint32_t keycode)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(hardkeys, EINA_FALSE);
+
+   return hardkeys[keycode].repeat;
+}
+
 EINTERN Eina_Bool
 e_keyrouter_hardkeys_client_available(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode, struct wl_client *client, uint32_t mode)
 {
index ce84b824d3bbd253c29e5b36544b5210af458792..902cbb2a1895000ca42c4af3c7d258cb1931001c 100644 (file)
@@ -8,12 +8,15 @@ EINTERN E_Keyrouter_Grabbed_Key *e_keyrouter_hardkeys_create(int max_keycodes);
 EINTERN void                     e_keyrouter_hardkeys_destroy(E_Keyrouter_Grabbed_Key *hardkeys);
 
 EINTERN Eina_Bool  e_keyrouter_hardkeys_prepend(E_Keyrouter_Grabbed_Key *hardkeys, E_Keyrouter_Key_List_Node *keynode, uint32_t keycode, uint32_t mode);
-EINTERN Eina_List **e_keyrouter_hardkeys_get_list(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode, uint32_t mode);
 EINTERN Eina_Bool  e_keyrouter_hardkeys_grabbed(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode);
 EINTERN Eina_Bool  e_keyrouter_hardkeys_keycode_available(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode);
 EINTERN void       e_keyrouter_hardkeys_remove_keynode_with_surface(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode, uint32_t mode, void *surface);
 EINTERN void       e_keyrouter_hardkeys_remove_keynode_with_client(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode, uint32_t mode, void *client);
-EINTERN char      *e_keyrouter_hardkeys_keycode_name_get(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode);
+
+EINTERN Eina_List **e_keyrouter_hardkeys_get_list(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode, uint32_t mode);
+EINTERN char       *e_keyrouter_hardkeys_keyname_get(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode);
+EINTERN Eina_Bool  e_keyrouter_hardkeys_no_privcheck_get(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode);
+EINTERN Eina_Bool  e_keyrouter_hardkeys_repeat_get(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode);
 
 EINTERN Eina_Bool e_keyrouter_hardkeys_client_available(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode, struct wl_client *client, uint32_t mode);
 EINTERN Eina_Bool e_keyrouter_hardkeys_surface_available(E_Keyrouter_Grabbed_Key *hardkeys, uint32_t keycode, struct wl_resource *surface, uint32_t mode);