#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)
wl_global_destroy(keyrouter->global);
- tizen_keyrouter_grab_destroy(keyrouter->keyrouter_grab);
+ keyrouter_grab_destroy(keyrouter->keyrouter_grab);
free(keyrouter);
}
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);
}
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;
}
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.");
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;
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,
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);
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;
}
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,
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;
}
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;
}
static void
-tizen_keyrouter_options_set(struct ds_tizen_keyrouter *keyrouter)
+keyrouter_options_set(struct ds_tizen_keyrouter *keyrouter)
{
FILE *file;
int keycode;
};
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
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
struct ds_tizen_keyrouter_grab *
-tizen_keyrouter_grab_create(void)
+keyrouter_grab_create(void)
{
struct ds_tizen_keyrouter_grab *keyrouter_grab = NULL;
int i;
}
void
-tizen_keyrouter_grab_destroy(struct ds_tizen_keyrouter_grab *keyrouter_grab)
+keyrouter_grab_destroy(struct ds_tizen_keyrouter_grab *keyrouter_grab)
{
int i;