From: GiWoong Kim Date: Tue, 17 Dec 2013 07:18:03 +0000 (+0900) Subject: ecs: added gesture event handling X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~555 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=261f9424b68eeecf9b9e436e52512c508bb86a3d;p=sdk%2Femulator%2Fqemu.git 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 --- 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; }