log_fl = fopen(log_path, "a");
if (!log_fl)
{
- KLERR("failed: open file(%s)", log_path);
+ ERR("failed: open file(%s)", log_path);
return;
}
log_fl = fopen(log_path, "a");
if (!log_fl)
{
- KLERR("failed: open file(%s)", log_path);
+ ERR("failed: open file(%s)", log_path);
return;
}
if (data->keycode < 0 || data->keycode > krt->max_tizen_hwkeys)
{
- KLWRN("Given keycode(%d) is invalid.", data->keycode);
+ WRN("Given keycode(%d) is invalid.", data->keycode);
continue;
}
- KLINF("(keycode:%d,%s)(no_priv:%d)(repeat:%d)",
+ INF("(keycode:%d,%s)(no_priv:%d)(repeat:%d)",
data->keycode, data->name, data->no_privcheck, data->repeat);
e_keyrouter_hardkeys_keycode_set(krt->HardKeys, data->keycode, eina_stringshare_add(data->name),
if (e_comp_wl_input_keymap_cache_file_use_get() == EINA_FALSE)
{
- KLINF("Server create a new cache file: %s", e_comp_wl_input_keymap_path_get(names));
+ INF("Server create a new cache file: %s", e_comp_wl_input_keymap_path_get(names));
unlink(e_comp_wl_input_keymap_path_get(names));
e_comp_wl_input_keymap_default_set();
}
else
- KLINF("Currently cache file is exist. Do not change it.");
+ INF("Currently cache file is exist. Do not change it.");
return EINA_TRUE;
}
char *pname = e_keyrouter_util_process_name_get_from_cmd(cmd);
char *keyname = e_comp_wl_input_keymap_keycode_to_keyname(keycode);
- KLINF("%s: %s(%s:%d)(F:%d,S:%d) => wl_surface(%p) wl_client(%p) (pid:%d) (pname:%s)",
+ INF("%s: %s(%s:%d)(F:%d,S:%d) => wl_surface(%p) wl_client(%p) (pid:%d) (pname:%s)",
mode_str,
_e_keyrouter_event_type_to_string(type),
keyname ?: "Unknown",
if ((ev->modifiers != 0) && (type == ECORE_EVENT_KEY_DOWN))
{
- KLDBG("Modifier key delivered to Focus window : Key %s(%d)",
+ DBG("Modifier key delivered to Focus window : Key %s(%d)",
((ECORE_EVENT_KEY_DOWN == type) ? "Down" : "Up"), ev->keycode);
keycode_data = E_NEW(int, 1);
{
if (*keycode_data == ev->keycode)
{
- KLDBG("Find ignore key, propagate event (%d)\n", ev->keycode);
+ DBG("Find ignore key, propagate event (%d)\n", ev->keycode);
E_FREE(keycode_data);
krt->ignore_list = eina_list_remove_list(krt->ignore_list, l);
if (krt->max_tizen_hwkeys < ev->keycode)
{
- KLWRN("The key(%d) is too larger to process keyrouting: Invalid keycode",
+ WRN("The key(%d) is too larger to process keyrouting: Invalid keycode",
ev->keycode);
return EINA_FALSE;
Ecore_Event_Key *ev = event;
E_Keyrouter_Event_Data *key_data;
- KLDBG("[%s] keyname: %s, key: %s, keycode: %d",
+ DBG("[%s] keyname: %s, key: %s, keycode: %d",
(type == ECORE_EVENT_KEY_DOWN) ? "KEY_PRESS" : "KEY_RELEASE",
ev->keyname, ev->key, ev->keycode);
key_data = (E_Keyrouter_Event_Data *)ev->data;
if (!key_data)
{
- KLWRN("%s key (%d) %s is not handled by keyrouter\n",
+ WRN("%s key (%d) %s is not handled by keyrouter\n",
ev->keyname, ev->keycode,
(type == ECORE_EVENT_KEY_DOWN) ? "press" : "release");
goto finish;
}
- KLDBG("[%s] keyname: %s, key: %s, keycode: %d",
+ DBG("[%s] keyname: %s, key: %s, keycode: %d",
(type == ECORE_EVENT_KEY_DOWN) ? "KEY_PRESS" : "KEY_RELEASE",
ev->keyname, ev->key, ev->keycode);
ret = e_keyrouter_wl_add_surface_destroy_listener(delivered_surface);
if (ret != TIZEN_KEYROUTER_ERROR_NONE)
{
- KLWRN("Failed to add wl_surface to destroy listener (res: %d)", res);
+ WRN("Failed to add wl_surface to destroy listener (res: %d)", res);
}
}
if (res)
{
if (ec_top == ec_focus)
{
- KLDBG("Top e_client (%p) is invisible(%d) but focus client", ec_top, ec_top->visible);
+ DBG("Top e_client (%p) is invisible(%d) but focus client", ec_top, ec_top->visible);
return EINA_FALSE;
}
ec_top = e_client_below_get(ec_top);
{
top_ptr_list = eina_list_promote_list(top_ptr_list, l);
e_keyrouter_hardkeys_list_set(krt->HardKeys, arr_idx, TIZEN_KEYROUTER_MODE_TOPMOST, top_ptr_list);
- KLDBG("Move a client(e_client: %p, wl_surface: %p) to first index of list(key: %d)",
+ DBG("Move a client(e_client: %p, wl_surface: %p) to first index of list(key: %d)",
ec_top, key_node_data->surface, arr_idx);
g_rec_mutex_unlock(&krt->grab_key_mutex);
return EINA_TRUE;
if (ec_top == ec_focus)
{
- KLDBG("The e_client(%p) is a focus client", ec_top);
+ DBG("The e_client(%p) is a focus client", ec_top);
return EINA_FALSE;
}
if (!wc_send)
{
- KLWRN("wl_surface: %p or wl_client: %p returns null wayland client", surface, wc);
+ WRN("wl_surface: %p or wl_client: %p returns null wayland client", surface, wc);
return;
}
(void) ev;
(void) ec;
- //KLDBG("ec: %p, visible: %d, focused: %d, take_focus: %d, want_focus: %d, bordername: %s, input_only: %d",
+ //DBG("ec: %p, visible: %d, focused: %d, take_focus: %d, want_focus: %d, bordername: %s, input_only: %d",
// ec, ec->visible, ec->focused, ec->take_focus, ec->want_focus, ec->bordername, ec->input_only);
krt->isWindowStackChanged = EINA_TRUE;
E_Input_Event_Source *input_event_source = e_input_event_source_get();
if (!input_event_source)
{
- KLERR("Failed to get input_event_source");
+ ERR("Failed to get input_event_source");
return;
}
E_FREE(keynode);
}
- KLDBG("Remove %s Mode Grabbed key(%d) by surface(%p)",
+ DBG("Remove %s Mode Grabbed key(%d) by surface(%p)",
e_keyrouter_util_mode_to_string(mode), keycode, surface);
}
e_keyrouter_hardkeys_list_set(hardkeys, keycode, mode, hardkey_list);
E_FREE(keynode);
}
- KLDBG("Remove %s Mode Grabbed key(%d) by client(%p)",
+ DBG("Remove %s Mode Grabbed key(%d) by client(%p)",
e_keyrouter_util_mode_to_string(mode), keycode, client);
}
e_keyrouter_hardkeys_list_set(hardkeys, keycode, mode, hardkey_list);
#include "e_input_event_intern.h"
#include "e_keyrouter_conf_intern.h"
-#define KLERR(msg, ARG...) ERR(msg, ##ARG)
-#define KLWRN(msg, ARG...) WRN(msg, ##ARG)
-#define KLINF(msg, ARG...) INF(msg, ##ARG)
-#define KLDBG(msg, ARG...) DBG(msg, ##ARG)
-
#define TIZEN_KEYROUTER_MODE_PRESSED TIZEN_KEYROUTER_MODE_REGISTERED+1
#define TIZEN_KEYROUTER_MODE_PICTURE_OFF TIZEN_KEYROUTER_MODE_REGISTERED+2
}
if (surface)
- KLDBG("The key(%d) is already grabbed same mode(%s) on the same wl_surface %p",
+ DBG("The key(%d) is already grabbed same mode(%s) on the same wl_surface %p",
key, e_keyrouter_util_mode_to_string(mode), surface);
else
- KLDBG("The key(%d) is already grabbed same mode(%s) on the same wl_client %p",
+ DBG("The key(%d) is already grabbed same mode(%s) on the same wl_client %p",
key, e_keyrouter_util_mode_to_string(mode), wc);
g_rec_mutex_unlock(&krt->grab_key_mutex);
if (!new_keyptr)
{
- KLERR("Failled to allocate memory for new_keyptr");
+ ERR("Failled to allocate memory for new_keyptr");
return TIZEN_KEYROUTER_ERROR_NO_SYSTEM_RESOURCES;
}
mode = NONE;
if (mode != NONE)
- KLDBG("Find %d key grabbed by (wl_surface: %p) in %s mode",
+ DBG("Find %d key grabbed by (wl_surface: %p) in %s mode",
key, surface, e_keyrouter_util_mode_to_string(_modes[mode]));
else
- KLDBG("%d key is not grabbed by (wl_surface: %p)", key, surface);
+ DBG("%d key is not grabbed by (wl_surface: %p)", key, surface);
return _modes[mode];
}
mode = NONE;
if (mode != NONE)
- KLDBG("Find %d key grabbed by (wl_client: %p) in %s mode",
+ DBG("Find %d key grabbed by (wl_client: %p) in %s mode",
key, client, e_keyrouter_util_mode_to_string(_modes[mode]));
else
- KLDBG("%d key is not grabbed by (wl_client: %p)", key, client);
+ DBG("%d key is not grabbed by (wl_client: %p)", key, client);
return _modes[mode];
}
#ifdef HAVE_CYNARA
if (EINA_FALSE == e_keyrouter_wl_util_do_privilege_check(client, mode, key))
{
- KLINF("No permission for %d grab mode ! (key=%d)", mode, key);
+ INF("No permission for %d grab mode ! (key=%d)", mode, key);
return TIZEN_KEYROUTER_ERROR_NO_PERMISSION;
}
#endif
/* Regarding topmost mode, a client must request to grab a key with a valid surface. */
if (mode == TIZEN_KEYROUTER_MODE_TOPMOST)
{
- KLWRN("Invalid surface for %d grab mode ! (key=%d)", mode, key);
+ WRN("Invalid surface for %d grab mode ! (key=%d)", mode, key);
return TIZEN_KEYROUTER_ERROR_INVALID_SURFACE;
}
/* Check the given key range */
if (krt->max_tizen_hwkeys < key)
{
- KLWRN("Invalid range of key ! (keycode:%d) maximum value(%d)", key, krt->max_tizen_hwkeys);
+ WRN("Invalid range of key ! (keycode:%d) maximum value(%d)", key, krt->max_tizen_hwkeys);
return TIZEN_KEYROUTER_ERROR_INVALID_KEY;
}
* Only key listed in Tizen key layout file can be grabbed. */
if (!e_keyrouter_hardkeys_keycode_available(krt->HardKeys, key))
{
- KLWRN("Invalid key ! Disabled to set keygrab ! (keycode:%d)", key);
+ WRN("Invalid key ! Disabled to set keygrab ! (keycode:%d)", key);
return TIZEN_KEYROUTER_ERROR_INVALID_KEY;
}
/* Check the given key range */
if (krt->max_tizen_hwkeys < key)
{
- KLWRN("Invalid range of key ! (keycode:%d) maximum value(%d)", key, krt->max_tizen_hwkeys);
+ WRN("Invalid range of key ! (keycode:%d) maximum value(%d)", key, krt->max_tizen_hwkeys);
return TIZEN_KEYROUTER_ERROR_INVALID_KEY;
}
* Only key listed in Tizen key layout file can be unset. */
if (!e_keyrouter_hardkeys_keycode_available(krt->HardKeys, key))
{
- KLWRN("Invalid key ! Disabled to unset keygrab! (keycode:%d)", key);
+ WRN("Invalid key ! Disabled to unset keygrab! (keycode:%d)", key);
g_rec_mutex_unlock(&krt->grab_key_mutex);
return TIZEN_KEYROUTER_ERROR_INVALID_KEY;
if (res == TIZEN_KEYROUTER_ERROR_NONE)
{
- KLDBG("Success to %d key %s grab request (wl_client: %p, wl_surface: %p, pid: %d)", key, e_keyrouter_util_mode_to_string(mode),
+ DBG("Success to %d key %s grab request (wl_client: %p, wl_surface: %p, pid: %d)", key, e_keyrouter_util_mode_to_string(mode),
client, surface, e_keyrouter_util_get_pid(client, surface));
}
else
- KLWRN("Failed to %d key %s grab request (wl_client: %p, wl_surface: %p, pid: %d): res: %d", key, e_keyrouter_util_mode_to_string(mode),
+ WRN("Failed to %d key %s grab request (wl_client: %p, wl_surface: %p, pid: %d): res: %d", key, e_keyrouter_util_mode_to_string(mode),
client, surface, e_keyrouter_util_get_pid(client, surface), res);
tizen_keyrouter_send_keygrab_notify(resource, surface, key, mode, res);
TRACE_INPUT_END();
if (res == TIZEN_KEYROUTER_ERROR_NONE)
- KLDBG("Success to %d key ungrab request (wl_client: %p, wl_surface: %p, pid: %d)", key, client, surface,
+ DBG("Success to %d key ungrab request (wl_client: %p, wl_surface: %p, pid: %d)", key, client, surface,
e_keyrouter_util_get_pid(client, surface));
else
- KLWRN("Failed to %d key ungrab request (wl_client: %p, wl_surface: %p, pid: %d): res: %d", key, client, surface,
+ WRN("Failed to %d key ungrab request (wl_client: %p, wl_surface: %p, pid: %d): res: %d", key, client, surface,
e_keyrouter_util_get_pid(client, surface), res);
tizen_keyrouter_send_keygrab_notify(resource, surface, key, TIZEN_KEYROUTER_MODE_NONE, res);
if (0 != (array_len % 3))
{
/* FIX ME: Which way is effectively to notify invalid pair to client */
- KLWRN("Invalid keycode and grab mode pair. Check arguments in a list");
+ WRN("Invalid keycode and grab mode pair. Check arguments in a list");
TRACE_INPUT_END();
tizen_keyrouter_send_keygrab_notify_list(resource, surface, NULL);
return;
res = e_keyrouter_keygrab_set(client, surface, grab_request->key, grab_request->mode);
grab_request->err = res;
if (res == TIZEN_KEYROUTER_ERROR_NONE)
- KLDBG("Success to %d key %s grab using list(wl_client: %p, wl_surface: %p, pid: %d)",
+ DBG("Success to %d key %s grab using list(wl_client: %p, wl_surface: %p, pid: %d)",
grab_request->key, e_keyrouter_util_mode_to_string(grab_request->mode),
client, surface, e_keyrouter_util_get_pid(client, surface));
else
- KLWRN("Failed to %d key %s grab using list(wl_client: %p, wl_surface: %p, pid: %d): res: %d",
+ WRN("Failed to %d key %s grab using list(wl_client: %p, wl_surface: %p, pid: %d): res: %d",
grab_request->key, e_keyrouter_util_mode_to_string(grab_request->mode),
client, surface, e_keyrouter_util_get_pid(client, surface), grab_request->err);
}
if (0 != (array_len % 2))
{
/* FIX ME: Which way is effectively to notify invalid pair to client */
- KLWRN("Invalid keycode and error pair. Check arguments in a list");
+ WRN("Invalid keycode and error pair. Check arguments in a list");
TRACE_INPUT_END();
tizen_keyrouter_send_keygrab_notify_list(resource, surface, ungrab_list);
return;
res = e_keyrouter_keygrab_unset(client, surface, ungrab_request->key);
ungrab_request->err = res;
if (res == TIZEN_KEYROUTER_ERROR_NONE)
- KLDBG("Success to ungrab using list: %d key (wl_client: %p, wl_surface: %p, pid: %d)",
+ DBG("Success to ungrab using list: %d key (wl_client: %p, wl_surface: %p, pid: %d)",
ungrab_request->key, client, surface, e_keyrouter_util_get_pid(client, surface));
else
- KLWRN("Failed to ungrab using list: %d key (wl_client: %p, wl_surface: %p, pid: %d): res: %d",
+ WRN("Failed to ungrab using list: %d key (wl_client: %p, wl_surface: %p, pid: %d): res: %d",
ungrab_request->key, client, surface, e_keyrouter_util_get_pid(client, surface), ungrab_request->err);
}
resource = wl_resource_create(client, &tizen_keyrouter_interface, version, id);
- KLDBG("wl_resource_create(...,&tizen_keyrouter_interface,...)");
+ DBG("wl_resource_create(...,&tizen_keyrouter_interface,...)");
if (!resource)
{
- KLERR("Failed to create resource ! (version :%d, id:%d)", version, id);
+ ERR("Failed to create resource ! (version :%d, id:%d)", version, id);
wl_client_post_no_memory(client);
return;
}
destroy_listener = E_NEW(struct wl_listener, 1);
if (!destroy_listener)
{
- KLERR("Failed to allocate memory for wl_client destroy listener !");
+ ERR("Failed to allocate memory for wl_client destroy listener !");
wl_resource_destroy(resource);
return;
}
{
struct wl_client *client = data;
- KLDBG("Listener(%p) called: wl_client: %p is died", l, client);
+ DBG("Listener(%p) called: wl_client: %p is died", l, client);
e_keyrouter_keygrab_remove_client_from_list(client);
wl_list_remove(&l->link);
{
struct wl_resource *surface = (struct wl_resource *)data;
- KLDBG("Listener(%p) called: surface: %p is died", l, surface);
+ DBG("Listener(%p) called: surface: %p is died", l, surface);
e_keyrouter_keygrab_remove_surface_from_list(surface);
wl_list_remove(&l->link);
if (!destroy_listener)
{
- KLERR("Failed to allocate memory for wl_client destroy listener !");
+ ERR("Failed to allocate memory for wl_client destroy listener !");
return TIZEN_KEYROUTER_ERROR_NO_SYSTEM_RESOURCES;
}
if (!destroy_listener)
{
- KLERR("Failed to allocate memory for wl_surface destroy listener !");
+ ERR("Failed to allocate memory for wl_surface destroy listener !");
return TIZEN_KEYROUTER_ERROR_NO_SYSTEM_RESOURCES;
}
res = e_security_privilege_check(pid, uid, "http://tizen.org/privilege/keygrab");
if (!res)
{
- KLINF("Fail to check privilege, (pid : %d)", pid);
+ INF("Fail to check privilege, (pid : %d)", pid);
}
finish: