4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
8 * Jaewon Lim <jaewon81.lim@samsung.com>
9 * Woojin Jung <woojin2.jung@samsung.com>
10 * Juyoung Kim <j0.kim@samsung.com>
11 * Anastasia Lyupa <a.lyupa@samsung.com>
13 * This library is free software; you can redistribute it and/or modify it under
14 * the terms of the GNU Lesser General Public License as published by the
15 * Free Software Foundation; either version 2.1 of the License, or (at your option)
18 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
19 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
21 * License for more details.
23 * You should have received a copy of the GNU Lesser General Public License
24 * along with this library; if not, write to the Free Software Foundation, Inc., 51
25 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 * - Samsung RnD Institute Russia
43 #include <Ecore_Input.h>
45 //#include <linux/input.h>
49 #include "probeinfo.h"
54 #include "real_functions.h"
56 bool touch_pressed = false;
58 #define PACK_HW_EVENT(API_ID, _EVENTTYPE, _DETAILTYPE, _X, _Y, _KEYCODE, _EXTRA, \
59 _ARGDATA, _ARGTYPE, _ARGEVENT) \
61 setProbePoint(&probeInfo); \
62 PREPARE_LOCAL_BUF(); \
63 PACK_COMMON_BEGIN(MSG_PROBE_UIEVENT, API_ID, "pdp", \
64 voidp_to_uint64(_ARGDATA), _ARGTYPE, \
65 voidp_to_uint64(_ARGEVENT)); \
66 PACK_COMMON_END('c', 0, 0, 0); \
67 PACK_UIEVENT(_EVENTTYPE, _DETAILTYPE, _X, _Y, _KEYCODE, _EXTRA); \
71 Eina_Bool ecore_event_evas_key_down(void *data, int type, void *event)
73 static Eina_Bool (*ecore_event_evas_key_downp)(void *data, int type, void *event);
74 probeInfo_t probeInfo;
76 GET_REAL_FUNC(ecore_event_evas_key_down, LIBECORE_INPUT_EVAS);
78 if(isOptionEnabled(OPT_EVENT))
83 Ecore_Event_Key* pEv = (Ecore_Event_Key*)event;
84 if(strcasestr(pEv->keyname, "volume") == NULL)
86 PACK_HW_EVENT(API_ID_ecore_event_evas_key_down,
87 _EVENT_KEY, _KEY_PRESSED, 0, 0, pEv->keyname, 0, \
94 return ecore_event_evas_key_downp(data, type, event);
97 Eina_Bool ecore_event_evas_key_up(void *data, int type, void *event)
99 static Eina_Bool (*ecore_event_evas_key_upp)(void *data, int type, void *event);
100 probeInfo_t probeInfo;
102 GET_REAL_FUNC(ecore_event_evas_key_up, LIBECORE_INPUT_EVAS);
104 if(isOptionEnabled(OPT_EVENT))
109 Ecore_Event_Key* pEv = (Ecore_Event_Key*)event;
110 if(strcasestr(pEv->keyname, "volume") == NULL)
112 PACK_HW_EVENT(API_ID_ecore_event_evas_key_up,
113 _EVENT_KEY, _KEY_RELEASED, 0, 0, pEv->keyname, 0, \
120 return ecore_event_evas_key_upp(data, type, event);
123 Eina_Bool ecore_event_evas_mouse_button_down(void *data, int type, void *event)
125 static Eina_Bool (*ecore_event_evas_mouse_button_downp)(void *data, int type, void *event);
126 probeInfo_t probeInfo;
128 GET_REAL_FUNC(ecore_event_evas_mouse_button_down, LIBECORE_INPUT_EVAS);
130 if(isOptionEnabled(OPT_EVENT))
135 Ecore_Event_Mouse_Button* pEv = (Ecore_Event_Mouse_Button*)event;
136 touch_pressed = true;
137 PACK_HW_EVENT(API_ID_ecore_event_evas_mouse_button_down,
138 _EVENT_TOUCH, _TOUCH_PRESSED, pEv->root.x, pEv->root.y, "", pEv->multi.device, \
144 return ecore_event_evas_mouse_button_downp(data, type, event);
147 Eina_Bool ecore_event_evas_mouse_button_up(void *data, int type, void *event)
149 static Eina_Bool (*ecore_event_evas_mouse_button_upp)(void *data, int type, void *event);
150 probeInfo_t probeInfo;
152 GET_REAL_FUNC(ecore_event_evas_mouse_button_up, LIBECORE_INPUT_EVAS);
154 if(isOptionEnabled(OPT_EVENT))
159 Ecore_Event_Mouse_Button* pEv = (Ecore_Event_Mouse_Button*)event;
160 touch_pressed = false;
161 PACK_HW_EVENT(API_ID_ecore_event_evas_mouse_button_up,
162 _EVENT_TOUCH, _TOUCH_RELEASED, pEv->root.x, pEv->root.y, "", pEv->multi.device, \
168 return ecore_event_evas_mouse_button_upp(data, type, event);
171 Eina_Bool ecore_event_evas_mouse_move(void *data, int type, void *event)
173 static Eina_Bool (*ecore_event_evas_mouse_movep)(void *data, int type, void *event);
174 probeInfo_t probeInfo;
176 GET_REAL_FUNC(ecore_event_evas_mouse_move, LIBECORE_INPUT_EVAS);
178 if(isOptionEnabled(OPT_EVENT))
185 Ecore_Event_Mouse_Move* pEv = (Ecore_Event_Mouse_Move*)event;
186 PACK_HW_EVENT(API_ID_ecore_event_evas_mouse_move,
187 _EVENT_TOUCH, _TOUCH_MOVED, pEv->root.x, pEv->root.y, "", pEv->multi.device, \
194 return ecore_event_evas_mouse_movep(data, type, event);