From 9713343aa088f7577220ef22444cb1ec96d49726 Mon Sep 17 00:00:00 2001 From: dyamy-lee Date: Thu, 26 Aug 2021 09:00:33 +0900 Subject: [PATCH] mmi-wayland-input : change some confused name, ex) xkb_keycode_from_keysym to _get_keycode_from_keysym, and add underbar(_) in front of created api Change-Id: Ie10686d6d6028c16b38f2158bad3f8ec81834485 --- src/modules/modality_keyboard/mmi-wayland-input.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/modality_keyboard/mmi-wayland-input.c b/src/modules/modality_keyboard/mmi-wayland-input.c index 0b8c348..088a600 100644 --- a/src/modules/modality_keyboard/mmi-wayland-input.c +++ b/src/modules/modality_keyboard/mmi-wayland-input.c @@ -242,7 +242,7 @@ keyboard_leave(void *data, struct wl_keyboard *keyboard, unsigned int serial, st } static int -covert_kernel_keycode_to_user_keycode(int kernel_keycode) +_covert_kernel_keycode_to_user_keycode(int kernel_keycode) { LOGD("kernel keycode : %d, user keycode : %d\n", kernel_keycode, kernel_keycode+8); return (kernel_keycode+8); @@ -251,7 +251,7 @@ covert_kernel_keycode_to_user_keycode(int kernel_keycode) static void keyboard_key(void *data, struct wl_keyboard *keyboard, unsigned int serial, unsigned int timestamp, unsigned int keycode, unsigned int state) { - int user_keycode = covert_kernel_keycode_to_user_keycode(keycode); + int user_keycode = _covert_kernel_keycode_to_user_keycode(keycode); LOGD("... serial=%d, time=%d, key=%d, state=%d\n", serial, timestamp, user_keycode, state); if (!has_keymap) @@ -349,7 +349,7 @@ static void key_cancel(void *data, struct tizen_keyrouter *tizen_keyrouter, uint (void) key; } -int xkb_init(void) +int _xkb_context_init(void) { xkb_context = xkb_context_new(0); if(!xkb_context) @@ -360,7 +360,7 @@ int xkb_init(void) return 1; } -void xkb_shutdown(void) +void _xkb_context_shutdown(void) { if(!xkb_context) return; @@ -369,7 +369,7 @@ void xkb_shutdown(void) } static void -find_keycode(struct xkb_keymap *keymap, xkb_keycode_t key, void *data) +_find_keycode(struct xkb_keymap *keymap, xkb_keycode_t key, void *data) { keycode_map_t *found_keycodes = (keycode_map_t *)data; xkb_keysym_t keysym = found_keycodes->keysym; @@ -404,7 +404,7 @@ find_keycode(struct xkb_keymap *keymap, xkb_keycode_t key, void *data) } } -int xkb_keycode_from_keysym(struct xkb_keymap *keymap, xkb_keysym_t keysym, xkb_keycode_t **keycodes) +int _get_keycode_from_keysym(struct xkb_keymap *keymap, xkb_keysym_t keysym, xkb_keycode_t **keycodes) { keycode_map_t found_keycodes = {0,}; found_keycodes.keysym = keysym; @@ -415,7 +415,7 @@ int xkb_keycode_from_keysym(struct xkb_keymap *keymap, xkb_keysym_t keysym, xkb_ return 0; } - xkb_keymap_key_for_each(keymap, find_keycode, &found_keycodes); + xkb_keymap_key_for_each(keymap, _find_keycode, &found_keycodes); *keycodes = found_keycodes.keycodes; return found_keycodes.nkeycodes; @@ -429,7 +429,7 @@ void _do_keygrab(const char *keyname, uint32_t mode) int i; keysym = xkb_keysym_from_name(keyname, XKB_KEYSYM_NO_FLAGS); - nkeycodes = xkb_keycode_from_keysym(keymap, keysym, &keycodes); + nkeycodes = _get_keycode_from_keysym(keymap, keysym, &keycodes); if(!nkeycodes) { LOGE("Failed do keygrab on %s(%d)\n", keyname, keysym); @@ -489,7 +489,7 @@ void _wl_init(void) return; } - res = xkb_init(); + res = _xkb_context_init(); if(!res) { LOGE("Failed to init xkb\n"); @@ -524,5 +524,5 @@ void wayland_input_init(void) void wayland_input_shutdown(void) { _wl_shutdown(); - xkb_shutdown(); + _xkb_context_shutdown(); } \ No newline at end of file -- 2.7.4