4 * Copyright (c) 2000 - 2011 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>
12 * This library is free software; you can redistribute it and/or modify it under
13 * the terms of the GNU Lesser General Public License as published by the
14 * Free Software Foundation; either version 2.1 of the License, or (at your option)
17 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
20 * License for more details.
22 * You should have received a copy of the GNU Lesser General Public License
23 * along with this library; if not, write to the Free Software Foundation, Inc., 51
24 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31 #ifndef __DA_EVENT_H__
32 #define __DA_EVENT_H__
36 /*******************************************************************
38 *******************************************************************/
45 _EVENT_ORIENTATION = 4,
58 _TOUCH_LONG_PRESSED = 1,
61 _TOUCH_DOUBLE_PRESSED = 4,
70 _GESTURE_LONGPRESS = 1,
73 _GESTURE_ROTATION = 4,
78 enum _orientation_status
83 _OS_PORTRAIT_REVERSE = 3,
84 _OS_LANDSCAPE_REVERSE = 4
88 /*******************************************************************
89 * macros for event probe
92 * SeqNumber`,ApiName`,Time`,Pid`,Tid`,InputParm`,Return`,PCAddr`,Error`,x`,y`,\n
93 * callstack_start`,callstack`,callstack_end
95 *******************************************************************/
97 #define DECLARE_VARIABLE_EVENT \
98 DECLARE_COMMON_VARIABLE; \
99 static unsigned int oldtime = 0; \
102 #define PRE_PROBEBLOCK_BEGIN_EVENT(FUNCNAME, LIBNAME, EVENTTYPE) \
103 GET_REAL_FUNC(FUNCNAME, LIBNAME); \
105 if(oldtime != timestamp && (EVENTTYPE != EVENT_TYPE_MOVE || \
106 getTouchState() == EVENT_TYPE_DOWN || \
107 getTouchState() == EVENT_TYPE_MOVE)) \
110 detectTouchEvent(EVENTTYPE); \
111 PRE_UNCONDITIONAL_BLOCK_BEGIN()
113 #define PRE_PROBEBLOCK_END_EVENT() \
114 PRE_UNCONDITIONAL_BLOCK_END(); \
118 #define BEFORE_ORIGINAL_EVENT(FUNCNAME, LIBNAME, EVENTTYPE) \
119 DECLARE_VARIABLE_EVENT; \
120 PRE_PROBEBLOCK_BEGIN_EVENT(FUNCNAME, LIBNAME, EVENTTYPE); \
121 PRE_PROBEBLOCK_END_EVENT()
123 #define AFTER_ORIGINAL_EVENT(EVENTTYPE, INPUTFORMAT, ...) \
125 if(blockresult == 1) { \
126 POST_UNCONDITIONAL_BLOCK_BEGIN(LC_UIEVENT); \
127 APPEND_LOG_INPUT(INPUTFORMAT, __VA_ARGS__); \
128 log.length += sprintf(log.data + log.length, \
129 "`,`,`,`,1`,`,%d`,%d`,%d", x, y, EVENTTYPE);\
130 APPEND_LOG_NULL_CALLSTACK(); \
131 POST_UNCONDITIONAL_BLOCK_END(); \
132 oldtime = timestamp; \
137 #endif // __DA_EVENT_H__