From: SooChan Lim Date: Thu, 19 May 2022 10:34:06 +0000 (+0900) Subject: keyrouter: change the prefix of the internal functions X-Git-Tag: accepted/tizen/unified/20220720.034120~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F278194%2F1;p=platform%2Fcore%2Fuifw%2Flibds-tizen.git keyrouter: change the prefix of the internal functions remove the tizen prefix. Change-Id: I060071ea4593d2dca366965b9ad9e94dc9d0c98f --- diff --git a/src/libds-tizen/keyrouter/keyrouter.c b/src/libds-tizen/keyrouter/keyrouter.c index eaa831a..6b5b220 100644 --- a/src/libds-tizen/keyrouter/keyrouter.c +++ b/src/libds-tizen/keyrouter/keyrouter.c @@ -13,13 +13,13 @@ #include "keyrouter.h" static void -tizen_keyrouter_bind(struct wl_client *client, void *data, uint32_t version, +keyrouter_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id); static bool keyrouter_check_privilege(struct ds_tizen_keyrouter_client *keyrouter_client, struct wl_client *client, uint32_t mode, uint32_t keycode); static void -tizen_keyrouter_options_set(struct ds_tizen_keyrouter *keyrouter); +keyrouter_options_set(struct ds_tizen_keyrouter *keyrouter); static void keyrouter_handle_display_destroy(struct wl_listener *listener, void *data) @@ -40,7 +40,7 @@ keyrouter_handle_display_destroy(struct wl_listener *listener, void *data) wl_global_destroy(keyrouter->global); - tizen_keyrouter_grab_destroy(keyrouter->keyrouter_grab); + keyrouter_grab_destroy(keyrouter->keyrouter_grab); free(keyrouter); } @@ -55,7 +55,7 @@ ds_tizen_keyrouter_create(struct wl_display *display) return NULL; } - keyrouter->keyrouter_grab = tizen_keyrouter_grab_create(); + keyrouter->keyrouter_grab = keyrouter_grab_create(); if (keyrouter->keyrouter_grab == NULL) { ds_err("Failed to create keyrouter."); free(keyrouter); @@ -63,9 +63,9 @@ ds_tizen_keyrouter_create(struct wl_display *display) } keyrouter->global = wl_global_create(display, &tizen_keyrouter_interface, - 2, keyrouter, tizen_keyrouter_bind); + 2, keyrouter, keyrouter_bind); if (!keyrouter->global) { - tizen_keyrouter_grab_destroy(keyrouter->keyrouter_grab); + keyrouter_grab_destroy(keyrouter->keyrouter_grab); free(keyrouter); return NULL; } @@ -77,7 +77,7 @@ ds_tizen_keyrouter_create(struct wl_display *display) keyrouter->display_destroy.notify = keyrouter_handle_display_destroy; wl_display_add_destroy_listener(display, &keyrouter->display_destroy); - tizen_keyrouter_options_set(keyrouter); + keyrouter_options_set(keyrouter); if (!tizen_security_init()) { ds_inf("tizen_security_init() is not sucessful. keyrouter works without security."); @@ -115,7 +115,7 @@ keyrouter_handle_keygrab_set(struct wl_client *client, return; } - res = tizen_keyrouter_grab_grab_key(keyrouter->keyrouter_grab, + res = keyrouter_grab_grab_key(keyrouter->keyrouter_grab, mode, key, (void *)client); if (res == TIZEN_KEYROUTER_ERROR_NONE && keyrouter_client->grabbed != true) keyrouter_client->grabbed = true; @@ -136,7 +136,7 @@ keyrouter_handle_keygrab_unset(struct wl_client *client, keyrouter = keyrouter_client->keyrouter; /* ungrab TOP POSITION grab first, this grab mode is not check privilege */ - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_TOPMOST, key, (void *)client); ret = keyrouter_check_privilege(keyrouter_client, @@ -147,13 +147,13 @@ keyrouter_handle_keygrab_unset(struct wl_client *client, return; } - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_EXCLUSIVE, key, (void *)client); - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_OVERRIDABLE_EXCLUSIVE, key, (void *)client); - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_TOPMOST, key, (void *)client); - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_SHARED, key, (void *)client); tizen_keyrouter_send_keygrab_notify(resource, surface, key, TIZEN_KEYROUTER_MODE_NONE, res); @@ -205,7 +205,7 @@ keyrouter_handle_keygrab_set_list(struct wl_client *client, if (ret == false) { grab_data->err = TIZEN_KEYROUTER_ERROR_NO_PERMISSION; } else { - res = tizen_keyrouter_grab_grab_key(keyrouter->keyrouter_grab, + res = keyrouter_grab_grab_key(keyrouter->keyrouter_grab, grab_data->mode, grab_data->key, (void *)client); if (res == TIZEN_KEYROUTER_ERROR_NONE && keyrouter_client->grabbed != true) keyrouter_client->grabbed = true; @@ -240,7 +240,7 @@ keyrouter_handle_keygrab_unset_list(struct wl_client *client, } wl_array_for_each(ungrab_data, ungrab_list) { - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_TOPMOST, ungrab_data->key, (void *)client); ret = keyrouter_check_privilege(keyrouter_client, client, @@ -248,16 +248,16 @@ keyrouter_handle_keygrab_unset_list(struct wl_client *client, if (!ret) { ungrab_data->err = TIZEN_KEYROUTER_ERROR_NO_PERMISSION; } else { - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_EXCLUSIVE, ungrab_data->key, (void *)client); - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_OVERRIDABLE_EXCLUSIVE, ungrab_data->key, (void *)client); - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_TOPMOST, ungrab_data->key, (void *)client); - tizen_keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, + keyrouter_grab_ungrab_key(keyrouter->keyrouter_grab, TIZEN_KEYROUTER_MODE_SHARED, ungrab_data->key, (void *)client); ungrab_data->err = TIZEN_KEYROUTER_ERROR_NONE; @@ -329,7 +329,7 @@ keyrouter_handle_resource_destory(struct wl_resource *resource) } static void -tizen_keyrouter_bind(struct wl_client *client, void *data, uint32_t version, +keyrouter_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) { struct ds_tizen_keyrouter *keyrouter = data; @@ -386,7 +386,7 @@ keyrouter_check_privilege(struct ds_tizen_keyrouter_client *keyrouter_client, } static void -tizen_keyrouter_options_set(struct ds_tizen_keyrouter *keyrouter) +keyrouter_options_set(struct ds_tizen_keyrouter *keyrouter) { FILE *file; int keycode; diff --git a/src/libds-tizen/keyrouter/keyrouter.h b/src/libds-tizen/keyrouter/keyrouter.h index c8dfa0f..ffbb3cd 100644 --- a/src/libds-tizen/keyrouter/keyrouter.h +++ b/src/libds-tizen/keyrouter/keyrouter.h @@ -83,26 +83,26 @@ struct ds_tizen_ungrab_data }; struct ds_tizen_keyrouter_grab * -tizen_keyrouter_grab_create(void); +keyrouter_grab_create(void); void -tizen_keyrouter_grab_destroy(struct ds_tizen_keyrouter_grab *keyrouter_grab); +keyrouter_grab_destroy(struct ds_tizen_keyrouter_grab *keyrouter_grab); int -tizen_keyrouter_grab_grab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_grab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, int type, int keycode, void *data); void -tizen_keyrouter_grab_ungrab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_ungrab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, int type, int keycode, void *data); int -tizen_keyrouter_grab_key_process(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_key_process(struct ds_tizen_keyrouter_grab *keyrouter_grab, int keycode, int pressed, struct wl_list *delivery_list); void -tizen_keyrouter_grab_set_focus_client(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_set_focus_client(struct ds_tizen_keyrouter_grab *keyrouter_grab, void *focus_client); void -tizen_keyrouter_grab_set_top_client(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_set_top_client(struct ds_tizen_keyrouter_grab *keyrouter_grab, void *top_client); bool -tizen_keyrouter_grab_check_grabbed_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_check_grabbed_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, int keycode); #endif diff --git a/src/libds-tizen/keyrouter/keyrouter_grab.c b/src/libds-tizen/keyrouter/keyrouter_grab.c index 873f4b1..f5467ae 100644 --- a/src/libds-tizen/keyrouter/keyrouter_grab.c +++ b/src/libds-tizen/keyrouter/keyrouter_grab.c @@ -24,7 +24,7 @@ keyrouter_grab_get_grabbed_list(struct ds_tizen_keyrouter_grab *keyrouter_grab, } bool -tizen_keyrouter_grab_check_grabbed_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, int keycode) +keyrouter_grab_check_grabbed_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, int keycode) { struct wl_list *list; @@ -101,7 +101,7 @@ keyrouter_grab_check_grabbed(struct ds_tizen_keyrouter_grab *keyrouter_grab, } void -tizen_keyrouter_grab_set_focus_client(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_set_focus_client(struct ds_tizen_keyrouter_grab *keyrouter_grab, void *focus_client) { keyrouter_grab->focus_client = focus_client; @@ -113,7 +113,7 @@ tizen_keyrouter_grab_set_focus_client(struct ds_tizen_keyrouter_grab *keyrouter_ } void -tizen_keyrouter_grab_set_top_client(struct ds_tizen_keyrouter_grab *keyrouter_grab, void *top_client) +keyrouter_grab_set_top_client(struct ds_tizen_keyrouter_grab *keyrouter_grab, void *top_client) { keyrouter_grab->top_client = top_client; @@ -124,7 +124,7 @@ tizen_keyrouter_grab_set_top_client(struct ds_tizen_keyrouter_grab *keyrouter_gr } int -tizen_keyrouter_grab_key_process(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_key_process(struct ds_tizen_keyrouter_grab *keyrouter_grab, int keycode, int pressed, struct wl_list *delivery_list) { struct ds_tizen_keyrouter_key_info *info, *delivery; @@ -209,7 +209,7 @@ tizen_keyrouter_grab_key_process(struct ds_tizen_keyrouter_grab *keyrouter_grab, } int -tizen_keyrouter_grab_grab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_grab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, int type, int keycode, void *data) { struct ds_tizen_keyrouter_key_info *info = NULL; @@ -264,7 +264,7 @@ keyrouter_list_remove_data(struct wl_list *list, void *data) } void -tizen_keyrouter_grab_ungrab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, +keyrouter_grab_ungrab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, int type, int keycode, void *data) { struct wl_list *list; @@ -287,7 +287,7 @@ tizen_keyrouter_grab_ungrab_key(struct ds_tizen_keyrouter_grab *keyrouter_grab, } struct ds_tizen_keyrouter_grab * -tizen_keyrouter_grab_create(void) +keyrouter_grab_create(void) { struct ds_tizen_keyrouter_grab *keyrouter_grab = NULL; int i; @@ -334,7 +334,7 @@ keyrouter_grab_delete_list(struct wl_list *list) } void -tizen_keyrouter_grab_destroy(struct ds_tizen_keyrouter_grab *keyrouter_grab) +keyrouter_grab_destroy(struct ds_tizen_keyrouter_grab *keyrouter_grab) { int i;