From 261f9424b68eeecf9b9e436e52512c508bb86a3d Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Tue, 17 Dec 2013 16:18:03 +0900 Subject: [PATCH] ecs: added gesture event handling Emulator must handle the gesture events, according as new feature was added in Emulator Control Panel. Change-Id: Ic8cbc0b34319176ef9b19451aa8d60f66a95a48a Signed-off-by: GiWoong Kim --- tizen/src/ecs/ecs_msg.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/tizen/src/ecs/ecs_msg.c b/tizen/src/ecs/ecs_msg.c index 63e336bf5b..7909abb31e 100644 --- a/tizen/src/ecs/ecs_msg.c +++ b/tizen/src/ecs/ecs_msg.c @@ -363,10 +363,41 @@ bool msgproc_device_req(ECS_Client* ccli, ECS__DeviceReq* msg) do_host_kbd_enable(is_on); notify_host_kbd_state(is_on); } + } else if (!strncmp(cmd, "gesture", strlen("gesture"))) { + // TODO: release multi-touch + + LOG("%s\n", data); + + char token[] = "#"; + + if (group == 1) { /* HW key event */ + char *section = strtok(data, token); + int event_type = atoi(section); + + section = strtok(NULL, token); + int keycode = atoi(section); + + do_hw_key_event(event_type, keycode); + } else { /* touch event */ + char *section = strtok(data, token); + int event_type = atoi(section); + + section = strtok(NULL, token); + int xx = atoi(section); + + section = strtok(NULL, token); + int yy = atoi(section); + + section = strtok(NULL, token); + int zz = atoi(section); + + do_mouse_event(1/* LEFT */, event_type, 0, 0, xx, yy, zz); + } } - if (data) + if (data) { g_free(data); + } return true; } -- 2.34.1