event = (pepper_input_event_t *)info;
- PEPPER_TRACE("[%s] keycode:%d, state=%d\n", __FUNCTION__, event->key, event->state);
+ PEPPER_DEBUG("[%s] keycode:%d, state=%d\n", __FUNCTION__, event->key, event->state);
/* send key event via keyrouter key event handler */
pepper_keyrouter_event_handler(listener, object, id, info, keyrouter);
{
pepper_seat_t *new_seat = (pepper_seat_t *)info;
- PEPPER_TRACE("[%s] seat added. name:%s\n", __FUNCTION__, pepper_seat_get_name(new_seat));
+ PEPPER_DEBUG("[%s] seat added. name:%s\n", __FUNCTION__, pepper_seat_get_name(new_seat));
listener_keyboard_add = pepper_object_add_event_listener((pepper_object_t *)new_seat,
PEPPER_EVENT_SEAT_KEYBOARD_ADD,
{
pepper_seat_t *seat = (pepper_seat_t *)info;
- PEPPER_TRACE("[%s] seat removed (name=%s)\n", __FUNCTION__, pepper_seat_get_name(seat));
+ PEPPER_DEBUG("[%s] seat removed (name=%s)\n", __FUNCTION__, pepper_seat_get_name(seat));
/* remove devices belongs to this seat */
if (input_device)
{
pepper_input_device_t *device = (pepper_input_device_t *)info;
- PEPPER_TRACE("[%s] input device added.\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] input device added.\n", __FUNCTION__);
if (seat)
pepper_seat_add_input_device(seat, device);
{
pepper_input_device_t *device = (pepper_input_device_t *)info;
- PEPPER_TRACE("[%s] input device removed.\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] input device removed.\n", __FUNCTION__);
if (seat)
pepper_seat_remove_input_device(seat, device);
probed = pepper_evdev_device_probe(evdev, caps);
if (!probed)
- PEPPER_TRACE("No evdev devices have been probed.\n");
+ PEPPER_DEBUG("No evdev devices have been probed.\n");
inotify = pepper_inotify_create(compositor, _handle_pepper_inotify_event, evdev);
PEPPER_CHECK(inotify, ;, "Failed to create inotify\n");
{
case PEPPER_EVENT_POINTER_MOTION:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_POINTER_MOTION\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_POINTER_MOTION\n", __FUNCTION__);
break;
case PEPPER_EVENT_POINTER_MOTION_ABSOLUTE:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_POINTER_MOTION_ABSOLUTE\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_POINTER_MOTION_ABSOLUTE\n", __FUNCTION__);
break;
case PEPPER_EVENT_POINTER_BUTTON:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_POINTER_BUTTON\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_POINTER_BUTTON\n", __FUNCTION__);
break;
case PEPPER_EVENT_POINTER_AXIS:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_POINTER_AXIS\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_POINTER_AXIS\n", __FUNCTION__);
break;
}
}
{
case PEPPER_EVENT_TOUCH_DOWN:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_TOUCH_DOWN\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_TOUCH_DOWN\n", __FUNCTION__);
break;
case PEPPER_EVENT_TOUCH_UP:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_TOUCH_UP\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_TOUCH_UP\n", __FUNCTION__);
break;
case PEPPER_EVENT_TOUCH_MOTION:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_TOUCH_MOTION\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_TOUCH_MOTION\n", __FUNCTION__);
break;
case PEPPER_EVENT_TOUCH_FRAME:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_TOUCH_FRAME\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_TOUCH_FRAME\n", __FUNCTION__);
break;
case PEPPER_EVENT_TOUCH_CANCEL:
/* TODO: */
- PEPPER_TRACE("[%s] PEPPER_EVENT_TOUCH_CANCEL\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] PEPPER_EVENT_TOUCH_CANCEL\n", __FUNCTION__);
break;
}
}
PEPPER_CHECK(data, return, "Invalid data.\n");
event = (pepper_input_event_t *)info;
- PEPPER_TRACE("[%s] keycode:%d, state=%d\n", __FUNCTION__, event->key, event->state);
+ PEPPER_DEBUG("[%s] keycode:%d, state=%d\n", __FUNCTION__, event->key, event->state);
pepper_keyrouter_event_handler(listener, object, id, info, keyrouter);
}
{
pepper_keyboard_t *keyboard = (pepper_keyboard_t *)info;
- PEPPER_TRACE("[%s] keyboard added\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] keyboard added\n", __FUNCTION__);
pepper_xkb_keyboard_set_keymap(xkb, keyboard, NULL);
{
pepper_pointer_t *pointer = (pepper_pointer_t *)info;
- PEPPER_TRACE("[%s] pointer added\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] pointer added\n", __FUNCTION__);
listener_pointer_event = pepper_object_add_event_listener((pepper_object_t *)pointer,
PEPPER_EVENT_POINTER_MOTION
{
pepper_touch_t *touch = (pepper_touch_t *)info;
- PEPPER_TRACE("[%s] touch added\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] touch added\n", __FUNCTION__);
listener_touch_event = pepper_object_add_event_listener((pepper_object_t *)touch,
PEPPER_EVENT_TOUCH_DOWN
{
pepper_seat_t *seat = (pepper_seat_t *)info;
- PEPPER_TRACE("[%s] seat added. name:%s\n", __FUNCTION__, pepper_seat_get_name(seat));
+ PEPPER_DEBUG("[%s] seat added. name:%s\n", __FUNCTION__, pepper_seat_get_name(seat));
listener_keyboard_add = pepper_object_add_event_listener((pepper_object_t *)seat,
PEPPER_EVENT_SEAT_KEYBOARD_ADD,
{
pepper_input_device_t *device = (pepper_input_device_t *)info;
- PEPPER_TRACE("[%s] input device added.\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] input device added.\n", __FUNCTION__);
if (seat)
pepper_seat_add_input_device(seat, device);
{
pepper_input_device_t *device = (pepper_input_device_t *)info;
- PEPPER_TRACE("[%s] input device removed.\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] input device removed.\n", __FUNCTION__);
if (seat)
pepper_seat_remove_input_device(seat, device);
probed = pepper_evdev_device_probe(evdev, caps);
if (!probed)
- PEPPER_TRACE("No evdev devices have been probed.\n");
+ PEPPER_DEBUG("No evdev devices have been probed.\n");
else
- PEPPER_TRACE("%d evdev device(s) has been probed.\n", probed);
+ PEPPER_DEBUG("%d evdev device(s) has been probed.\n", probed);
/* create server module(s) loader : TODO */
finish:
if (!ret)
- PEPPER_TRACE("block key event: (%d %s)\n", key, (state ? "press" : "release"));
+ PEPPER_DEBUG("block key event: (%d %s)\n", key, (state ? "press" : "release"));
return ret;
}
PEPPER_CHECK(pepper_devicemgr->devicemgr, goto failed, "Failed to create devicemgr\n");
pepper_devicemgr->pepper_security_init_done = ret = pepper_security_init();
- if (!ret) PEPPER_TRACE("pepper_security_init() is failed. Devicemgr will work without pepper_security.\n");
+ if (!ret) PEPPER_DEBUG("pepper_security_init() is failed. Devicemgr will work without pepper_security.\n");
return pepper_devicemgr;
if (drmModeSetCursor(drm->fd, output->crtc_id, gbm_bo_get_handle(bo).s32,
drm->cursor_width, drm->cursor_height)) {
- PEPPER_TRACE("failed to set cursor\n");
+ PEPPER_DEBUG("failed to set cursor\n");
drm->cursor_broken = PEPPER_TRUE;
}
pepper_view_get_position(output->cursor_view, &x, &y);
if ((output->cursor_x != (int)x) || (output->cursor_y != (int)y)) {
if (drmModeMoveCursor(drm->fd, output->crtc_id, (int)x, (int)y)) {
- PEPPER_TRACE("failed to move cursor\n");
+ PEPPER_DEBUG("failed to move cursor\n");
drm->cursor_broken = PEPPER_TRUE;
}
GBM_FORMAT_ARGB8888,
GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE);
if (!output->cursor_bo[0] || !output->cursor_bo[1]) {
- PEPPER_TRACE("failed to create cursor bo\n");
+ PEPPER_DEBUG("failed to create cursor bo\n");
drm->cursor_broken = PEPPER_TRUE;
}
}
keyrouter->focus_client = focus_client;
if (focus_client)
- PEPPER_TRACE("[%s] focus client has been set. (focus_client=0x%p)\n", __FUNCTION__, focus_client);
+ PEPPER_DEBUG("[%s] focus client has been set. (focus_client=0x%p)\n", __FUNCTION__, focus_client);
else
- PEPPER_TRACE("[%s] focus client has been set to NULL.\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] focus client has been set to NULL.\n", __FUNCTION__);
}
PEPPER_API void
keyrouter->top_client = top_client;
if (top_client)
- PEPPER_TRACE("[%s] top client has been set. (top_client=0x%p)\n", __FUNCTION__, top_client);
+ PEPPER_DEBUG("[%s] top client has been set. (top_client=0x%p)\n", __FUNCTION__, top_client);
else
- PEPPER_TRACE("[%s] top client has been set to NULL.\n", __FUNCTION__);
+ PEPPER_DEBUG("[%s] top client has been set to NULL.\n", __FUNCTION__);
}
PEPPER_API int
PEPPER_CHECK(delivery, return 0, "Failed to allocate memory\n");
delivery->data = info->data;
pepper_list_insert(delivery_list, &delivery->link);
- PEPPER_TRACE("Exclusive Mode: keycode: %d to data: %p\n", keycode, info->data);
+ PEPPER_DEBUG("Exclusive Mode: keycode: %d to data: %p\n", keycode, info->data);
return 1;
}
}
PEPPER_CHECK(delivery, return 0, "Failed to allocate memory\n");
delivery->data = info->data;
pepper_list_insert(delivery_list, &delivery->link);
- PEPPER_TRACE("OR-Excl Mode: keycode: %d to data: %p\n", keycode, info->data);
+ PEPPER_DEBUG("OR-Excl Mode: keycode: %d to data: %p\n", keycode, info->data);
return 1;
}
}
PEPPER_CHECK(delivery, return 0, "Failed to allocate memory\n");
delivery->data = info->data;
pepper_list_insert(delivery_list, &delivery->link);
- PEPPER_TRACE("Topmost Mode: keycode: %d to data: %p\n", keycode, info->data);
+ PEPPER_DEBUG("Topmost Mode: keycode: %d to data: %p\n", keycode, info->data);
return 1;
}
}
delivery->data = keyrouter->focus_client;
pepper_list_insert(delivery_list, &delivery->link);
count++;
- PEPPER_TRACE("Focus: keycode: %d to data: %p, count: %d\n", keycode, delivery->data, count);
+ PEPPER_DEBUG("Focus: keycode: %d to data: %p, count: %d\n", keycode, delivery->data, count);
}
if (!pepper_list_empty(&keyrouter->hard_keys[keycode].grab.shared)) {
delivery->data = info->data;
pepper_list_insert(delivery_list, &delivery->link);
count++;
- PEPPER_TRACE("Shared: keycode: %d to data: %p, count: %d\n", keycode, info->data, count);
+ PEPPER_DEBUG("Shared: keycode: %d to data: %p, count: %d\n", keycode, info->data, count);
}
}
for (i = 0; i < KEYROUTER_MAX_KEYS; i++) {
if (keyrouter_is_grabbed_key(pepper_keyrouter->keyrouter, i)) {
- PEPPER_TRACE("\t[ Keycode: %d ]\n", i);
+ PEPPER_DEBUG("\t[ Keycode: %d ]\n", i);
list = keyrouter_grabbed_list_get(pepper_keyrouter->keyrouter, TIZEN_KEYROUTER_MODE_EXCLUSIVE, i);
if (list && !pepper_list_empty(list)) {
- PEPPER_TRACE("\t == Exclusive Grab ==\n");
+ PEPPER_DEBUG("\t == Exclusive Grab ==\n");
pepper_list_for_each(grab_data, list, link) {
- PEPPER_TRACE("\t client: %p (pid: %d)\n", grab_data->data, _pepper_keyrouter_get_pid(grab_data->data));
+ PEPPER_DEBUG("\t client: %p (pid: %d)\n", grab_data->data, _pepper_keyrouter_get_pid(grab_data->data));
}
}
list = keyrouter_grabbed_list_get(pepper_keyrouter->keyrouter, TIZEN_KEYROUTER_MODE_OVERRIDABLE_EXCLUSIVE, i);
if (list && !pepper_list_empty(list)) {
- PEPPER_TRACE("\t == OR_Exclusive Grab ==\n");
+ PEPPER_DEBUG("\t == OR_Exclusive Grab ==\n");
pepper_list_for_each(grab_data, list, link) {
- PEPPER_TRACE("\t client: %p (pid: %d)\n", grab_data->data, _pepper_keyrouter_get_pid(grab_data->data));
+ PEPPER_DEBUG("\t client: %p (pid: %d)\n", grab_data->data, _pepper_keyrouter_get_pid(grab_data->data));
}
}
list = keyrouter_grabbed_list_get(pepper_keyrouter->keyrouter, TIZEN_KEYROUTER_MODE_TOPMOST, i);
if (list && !pepper_list_empty(list)) {
- PEPPER_TRACE("\t == Top Position Grab ==\n");
+ PEPPER_DEBUG("\t == Top Position Grab ==\n");
pepper_list_for_each(grab_data, list, link) {
- PEPPER_TRACE("\t client: %p (pid: %d)\n", grab_data->data, _pepper_keyrouter_get_pid(grab_data->data));
+ PEPPER_DEBUG("\t client: %p (pid: %d)\n", grab_data->data, _pepper_keyrouter_get_pid(grab_data->data));
}
}
list = keyrouter_grabbed_list_get(pepper_keyrouter->keyrouter, TIZEN_KEYROUTER_MODE_SHARED, i);
if (list && !pepper_list_empty(list)) {
- PEPPER_TRACE("\t == Shared Grab ==\n");
+ PEPPER_DEBUG("\t == Shared Grab ==\n");
pepper_list_for_each(grab_data, list, link) {
- PEPPER_TRACE("\t client: %p (pid: %d)\n", grab_data->data, _pepper_keyrouter_get_pid(grab_data->data));
+ PEPPER_DEBUG("\t client: %p (pid: %d)\n", grab_data->data, _pepper_keyrouter_get_pid(grab_data->data));
}
}
}
if (wl_resource_get_client(resource) == client)
{
wl_keyboard_send_key(resource, wl_display_get_serial(pepper_keyrouter->display), time, key, state);
- PEPPER_TRACE("[%s] key : %d, state : %d, time : %lu\n", __FUNCTION__, key, state, time);
+ PEPPER_DEBUG("[%s] key : %d, state : %d, time : %lu\n", __FUNCTION__, key, state, time);
}
}
}
if (pepper_keyrouter->focus_view)
pepper_keyboard_send_key(pepper_keyrouter->keyboard, pepper_keyrouter->focus_view, time, key, state);
else
- PEPPER_TRACE("No focused view exists.\n", __FUNCTION__);
+ PEPPER_DEBUG("No focused view exists.\n", __FUNCTION__);
}
}
PEPPER_CHECK(pepper_keyrouter->keyrouter, goto failed, "Failed to create keyrouter\n");
pepper_keyrouter->pepper_security_init_done = ret = pepper_security_init();
- if (!ret) PEPPER_TRACE("pepper_security_init() is failed. Keyrouter will work without pepper_security.\n");
+ if (!ret) PEPPER_DEBUG("pepper_security_init() is failed. Keyrouter will work without pepper_security.\n");
return pepper_keyrouter;
else
tick_count = PEPPER_OUTPUT_MAX_TICK_COUNT;
- PEPPER_TRACE("%s FPS : %.2f\n", output->name,
+ PEPPER_DEBUG("%s FPS : %.2f\n", output->name,
(double)(tick_count * 1000) / (double)output->frame.total_time);
}
}
__FILE__, __FUNCTION__, ##__VA_ARGS__); \
} while (0)
-#define PEPPER_TRACE(fmt, ...) \
+#define PEPPER_DEBUG(fmt, ...) \
do { \
pepper_log("DEBUG", PEPPER_LOG_LEVEL_DEBUG, "%s[%s]: " fmt, \
__FILE__, __FUNCTION__, ##__VA_ARGS__); \
_pepper_security_log_print(ret, "privilege: %s, client_smack: %s, pid: %d", privilege, client_smack, pid);
finish:
- PEPPER_TRACE("Privilege Check For '%s' %s pid:%u uid:%u client_smack:%s(len:%d) client_session:%s ret:%d",
+ PEPPER_DEBUG("Privilege Check For '%s' %s pid:%u uid:%u client_smack:%s(len:%d) client_session:%s ret:%d",
privilege, res ? "SUCCESS" : "FAIL", pid, uid,
client_smack ? client_smack : "N/A", len,
client_session ? client_session: "N/A", ret);
for (retry_cnt = 0; retry_cnt < 5; retry_cnt++) {
- PEPPER_TRACE("Retry cynara initialize: %d\n", retry_cnt + 1);
+ PEPPER_DEBUG("Retry cynara initialize: %d\n", retry_cnt + 1);
ret = cynara_initialize(&g_cynara, NULL);
if (CYNARA_API_SUCCESS == ret) {
- PEPPER_TRACE("Succeed to initialize cynara !\n");
+ PEPPER_DEBUG("Succeed to initialize cynara !\n");
return 1;
}
int i;
if (view->dirty & flag) {
- PEPPER_TRACE("view:%p, dirty:%x, flag:%x\n", view, view->dirty, flag);
+ PEPPER_DEBUG("view:%p, dirty:%x, flag:%x\n", view, view->dirty, flag);
return;
}
view->dirty &= ~PEPPER_VIEW_ACTIVE_DIRTY;
if (!view->dirty) {
- PEPPER_TRACE("view:%p not dirty\n", view);
+ PEPPER_DEBUG("view:%p not dirty\n", view);
return;
}
- PEPPER_TRACE("view:%p dirty\n", view);
+ PEPPER_DEBUG("view:%p dirty\n", view);
view->active = active;
/* Damage for the view unmap will be handled by assigning NULL plane. */
if (!view->active) {
- PEPPER_TRACE("view:%p not active\n", view);
+ PEPPER_DEBUG("view:%p not active\n", view);
return;
}
- PEPPER_TRACE("view:%p active\n", view);
+ PEPPER_DEBUG("view:%p active\n", view);
/* We treat the modification as unmapping and remapping the view. So,
* damage for the unmap and damage for the remap.
}
}
- PEPPER_TRACE("view:%p output_overlap:%d\n", view, view->output_overlap);
+ PEPPER_DEBUG("view:%p output_overlap:%d\n", view, view->output_overlap);
/* Mark the plane entries as damaged. */
for (i = 0; i < PEPPER_MAX_OUTPUT_COUNT; i++)
x11_handle_input_event(seat, type, event);
break;
case XCB_EXPOSE:
- PEPPER_TRACE("XCB_EXPOSE\n");
+ PEPPER_DEBUG("XCB_EXPOSE\n");
{
xcb_expose_event_t *expose = (xcb_expose_event_t *)event;
x11_output_t *output = x11_find_output_by_window(connection, expose->window);
break;
case XCB_FOCUS_IN:
/* TODO: Cursor handling */
- PEPPER_TRACE("XCB_FOCUS_IN\n");
+ PEPPER_DEBUG("XCB_FOCUS_IN\n");
break;
case XCB_FOCUS_OUT:
- PEPPER_TRACE("XCB_FOCUS_OUT\n");
+ PEPPER_DEBUG("XCB_FOCUS_OUT\n");
break;
case XCB_KEYMAP_NOTIFY:
- PEPPER_TRACE("XCB_KEYMAP_NOTIFY\n");
+ PEPPER_DEBUG("XCB_KEYMAP_NOTIFY\n");
{
/* TODO: ignore at this time. */
}
break;
case XCB_CONFIGURE_NOTIFY:
/* Window moved */
- PEPPER_TRACE("XCB_CONFIGURE_NOTIFY\n");
+ PEPPER_DEBUG("XCB_CONFIGURE_NOTIFY\n");
break;
case XCB_QUERY_EXTENSION:
- PEPPER_TRACE("XCB_QUERY_EXTENSION\n");
+ PEPPER_DEBUG("XCB_QUERY_EXTENSION\n");
break;
case XCB_DESTROY_NOTIFY:
- PEPPER_TRACE("XCB_DESTROY_NOTIFY\n");
+ PEPPER_DEBUG("XCB_DESTROY_NOTIFY\n");
break;
case XCB_UNMAP_NOTIFY:
- PEPPER_TRACE("XCB_UNMAP_NOTIFY\n");
+ PEPPER_DEBUG("XCB_UNMAP_NOTIFY\n");
break;
case XCB_CLIENT_MESSAGE:
- PEPPER_TRACE("XCB_CLIENT_MESSAGE\n");
+ PEPPER_DEBUG("XCB_CLIENT_MESSAGE\n");
{
xcb_client_message_event_t *msg;
xcb_atom_t atom;
switch (type) {
case XCB_ENTER_NOTIFY: {
- PEPPER_TRACE("enter\n");
+ PEPPER_DEBUG("enter\n");
}
break;
case XCB_LEAVE_NOTIFY: {
- PEPPER_TRACE("leave\n");
+ PEPPER_DEBUG("leave\n");
}
break;
case XCB_KEY_PRESS: {