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
33 #ifndef __DA_EVENT_H__
34 #define __DA_EVENT_H__
38 /*******************************************************************
40 *******************************************************************/
47 _EVENT_ORIENTATION = 4,
60 _TOUCH_LONG_PRESSED = 1,
63 _TOUCH_DOUBLE_PRESSED = 4,
72 _GESTURE_LONGPRESS = 1,
75 _GESTURE_ROTATION = 4,
80 enum _orientation_status
85 _OS_PORTRAIT_REVERSE = 3,
86 _OS_LANDSCAPE_REVERSE = 4
90 /*******************************************************************
91 * macros for event probe
94 * SeqNumber`,ApiName`,Time`,Pid`,Tid`,InputParm`,Return`,PCAddr`,Error`,x`,y`,\n
95 * callstack_start`,callstack`,callstack_end
97 *******************************************************************/
99 #define DECLARE_VARIABLE_EVENT \
100 probeInfo_t probeInfo; \
101 static unsigned int oldtime = 0; \
104 #define PRE_PROBEBLOCK_BEGIN_EVENT(FUNCNAME, LIBNAME, EVENTTYPE) \
105 GET_REAL_FUNC(FUNCNAME, LIBNAME); \
107 if(oldtime != timestamp && (EVENTTYPE != EVENT_TYPE_MOVE || \
108 getTouchState() == EVENT_TYPE_DOWN || \
109 getTouchState() == EVENT_TYPE_MOVE)) \
112 detectTouchEvent(EVENTTYPE); \
113 PRE_UNCONDITIONAL_BLOCK_BEGIN()
115 #define PRE_PROBEBLOCK_END_EVENT() \
116 PRE_UNCONDITIONAL_BLOCK_END(); \
120 #define BEFORE_ORIGINAL_EVENT(FUNCNAME, LIBNAME, EVENTTYPE) \
121 DECLARE_VARIABLE_EVENT; \
122 PRE_PROBEBLOCK_BEGIN_EVENT(FUNCNAME, LIBNAME, EVENTTYPE); \
123 PRE_PROBEBLOCK_END_EVENT()
125 #define AFTER_ORIGINAL_EVENT(EVENTTYPE, INPUTFORMAT, ...) \
127 if(blockresult == 1) { \
128 POST_UNCONDITIONAL_BLOCK_BEGIN(LC_UIEVENT); \
129 APPEND_LOG_INPUT(INPUTFORMAT, __VA_ARGS__); \
130 log.length += sprintf(log.data + log.length, \
131 "`,`,`,`,1`,`,%d`,%d`,%d", x, y, EVENTTYPE);\
132 APPEND_LOG_NULL_CALLSTACK(); \
133 POST_UNCONDITIONAL_BLOCK_END(); \
134 oldtime = timestamp; \
139 #endif // __DA_EVENT_H__