#include "dacollection.h"
#include "da_event.h"
#include "gesture.h"
+#include "binproto.h"
#define GESTURE_EVENT_LOG(_FUNCNAME, _GESTURETYPE, _X, _Y, _INFO1, _INFO2) \
setProbePoint(&probeInfo); \
_EVENT_GESTURE, _GESTURETYPE, _X, _Y, _INFO1, _INFO2); \
printLog(&log, MSG_LOG)
+#define PACK_GESTURE_EVENT(_GESTURETYPE, _X, _Y, _INFO1, _INFO2, _ARGDETECTOR) \
+ do { \
+ char info1_str[16]; \
+ PREPARE_LOCAL_BUF(); \
+ PACK_COMMON_BEGIN(MSG_PROBE_UIEVENT, LC_UIEVENT, "p", _ARGDETECTOR); \
+ PACK_COMMON_END(0, 0, 0); \
+ sprintf(info1_str, "%d", _INFO1); \
+ PACK_UIEVENT(_EVENT_GESTURE, _GESTURETYPE, _X, _Y, info1_str, _INFO2); \
+ FLUSH_LOCAL_BUF(); \
+ } while (0)
+
GestureEventListener GestureEventListener::rInstance;
GestureEventListener::GestureEventListener()
{
probeBlockStart();
GESTURE_EVENT_LOG("canceled", _GESTURE_CUSTOM, 0, 0, 0, 0);
+ PACK_GESTURE_EVENT(_GESTURE_CUSTOM, 0, 0, 0, 0, &gestureDetector);
probeBlockEnd();
}
}
{
probeBlockStart();
GESTURE_EVENT_LOG("changed", _GESTURE_CUSTOM, 0, 0, 0, 0);
+ PACK_GESTURE_EVENT(_GESTURE_CUSTOM, 0, 0, 0, 0, &gestureDetector);
probeBlockEnd();
}
}
{
probeBlockStart();
GESTURE_EVENT_LOG("finished", _GESTURE_CUSTOM, 0, 0, 0, 0);
+ PACK_GESTURE_EVENT(_GESTURE_CUSTOM, 0, 0, 0, 0, &gestureDetector);
probeBlockEnd();
}
}
{
probeBlockStart();
GESTURE_EVENT_LOG("started", _GESTURE_CUSTOM, 0, 0, 0, 0);
+ PACK_GESTURE_EVENT(_GESTURE_CUSTOM, 0, 0, 0, 0, &gestureDetector);
probeBlockEnd();
}
}
dur = gestureDetector.GetDuration();
direction = gestureDetector.GetDirection();
GESTURE_EVENT_LOG("canceled", _GESTURE_FLICK, x, y, dur, (int)direction);
+ PACK_GESTURE_EVENT(_GESTURE_FLICK, x, y, dur, (int)direction, &gestureDetector);
}
probeBlockEnd();
}
dur = gestureDetector.GetDuration();
direction = gestureDetector.GetDirection();
GESTURE_EVENT_LOG("detected", _GESTURE_FLICK, x, y, dur, (int)direction);
+ PACK_GESTURE_EVENT(_GESTURE_FLICK, x, y, dur, (int)direction, &gestureDetector);
}
probeBlockEnd();
}
dur = gestureDetector.GetDuration();
tcount = gestureDetector.GetTouchCount();
GESTURE_EVENT_LOG("canceled", _GESTURE_LONGPRESS, moveallow, 0, dur, tcount);
+ PACK_GESTURE_EVENT(_GESTURE_LONGPRESS, moveallow, 0, dur, tcount, &gestureDetector);
}
probeBlockEnd();
}
dur = gestureDetector.GetDuration();
tcount = gestureDetector.GetTouchCount();
GESTURE_EVENT_LOG("detected", _GESTURE_LONGPRESS, moveallow, 0, dur, tcount);
+ PACK_GESTURE_EVENT(_GESTURE_LONGPRESS, moveallow, 0, dur, tcount, &gestureDetector);
}
probeBlockEnd();
}
tcount = gestureDetector.GetTouchCount();
GESTURE_EVENT_LOG("canceled", _GESTURE_PANNING, 0, 0, 0, tcount);
+ PACK_GESTURE_EVENT(_GESTURE_PANNING, 0, 0, 0, tcount, &gestureDetector);
}
probeBlockEnd();
}
tcount = gestureDetector.GetTouchCount();
GESTURE_EVENT_LOG("changed", _GESTURE_PANNING, 0, 0, 0, tcount);
+ PACK_GESTURE_EVENT(_GESTURE_PANNING, 0, 0, 0, tcount, &gestureDetector);
}
probeBlockEnd();
}
tcount = gestureDetector.GetTouchCount();
GESTURE_EVENT_LOG("finished", _GESTURE_PANNING, 0, 0, 0, tcount);
+ PACK_GESTURE_EVENT(_GESTURE_PANNING, 0, 0, 0, tcount, &gestureDetector);
}
probeBlockEnd();
}
tcount = gestureDetector.GetTouchCount();
GESTURE_EVENT_LOG("started", _GESTURE_PANNING, 0, 0, 0, tcount);
+ PACK_GESTURE_EVENT(_GESTURE_PANNING, 0, 0, 0, tcount, &gestureDetector);
}
probeBlockEnd();
}
point = gestureDetector.GetCenterPoint();
scale = gestureDetector.GetScale();
GESTURE_EVENT_LOG("canceled", _GESTURE_PINCH, point.x, point.y, scale, 0);
+ PACK_GESTURE_EVENT(_GESTURE_PINCH, point.x, point.y, scale, 0, &gestureDetector);
}
probeBlockEnd();
}
point = gestureDetector.GetCenterPoint();
scale = gestureDetector.GetScale();
GESTURE_EVENT_LOG("changed", _GESTURE_PINCH, point.x, point.y, scale, 0);
+ PACK_GESTURE_EVENT(_GESTURE_PINCH, point.x, point.y, scale, 0, &gestureDetector);
}
probeBlockEnd();
}
point = gestureDetector.GetCenterPoint();
scale = gestureDetector.GetScale();
GESTURE_EVENT_LOG("finished", _GESTURE_PINCH, point.x, point.y, scale, 0);
+ PACK_GESTURE_EVENT(_GESTURE_PINCH, point.x, point.y, scale, 0, &gestureDetector);
}
probeBlockEnd();
}
point = gestureDetector.GetCenterPoint();
scale = gestureDetector.GetScale();
GESTURE_EVENT_LOG("started", _GESTURE_PINCH, point.x, point.y, scale, 0);
+ PACK_GESTURE_EVENT(_GESTURE_PINCH, point.x, point.y, scale, 0, &gestureDetector);
}
probeBlockEnd();
}
distance = gestureDetector.GetDistance();
angle = gestureDetector.GetAngle();
GESTURE_EVENT_LOG("canceled", _GESTURE_ROTATION, 0, 0, distance, static_cast<int>(angle));
+ PACK_GESTURE_EVENT(_GESTURE_ROTATION, 0, 0, distance, static_cast<int>(angle), &gestureDetector);
}
probeBlockEnd();
}
distance = gestureDetector.GetDistance();
angle = gestureDetector.GetAngle();
GESTURE_EVENT_LOG("changed", _GESTURE_ROTATION, 0, 0, distance, static_cast<int>(angle));
+ PACK_GESTURE_EVENT(_GESTURE_ROTATION, 0, 0, distance, static_cast<int>(angle), &gestureDetector);
}
probeBlockEnd();
}
distance = gestureDetector.GetDistance();
angle = gestureDetector.GetAngle();
GESTURE_EVENT_LOG("finished", _GESTURE_ROTATION, 0, 0, distance, static_cast<int>(angle));
+ PACK_GESTURE_EVENT(_GESTURE_ROTATION, 0, 0, distance, static_cast<int>(angle), &gestureDetector);
}
probeBlockEnd();
}
distance = gestureDetector.GetDistance();
angle = gestureDetector.GetAngle();
GESTURE_EVENT_LOG("started", _GESTURE_ROTATION, 0, 0, distance, static_cast<int>(angle));
+ PACK_GESTURE_EVENT(_GESTURE_ROTATION, 0, 0, distance, static_cast<int>(angle), &gestureDetector);
}
probeBlockEnd();
}
interval = gestureDetector.GetTapInterval();
touchcount = gestureDetector.GetTouchCount();
GESTURE_EVENT_LOG("canceled", _GESTURE_TAP, move, tapcount, interval, touchcount);
+ PACK_GESTURE_EVENT(_GESTURE_TAP, move, tapcount, interval, touchcount, &gestureDetector);
}
probeBlockEnd();
}
interval = gestureDetector.GetTapInterval();
touchcount = gestureDetector.GetTouchCount();
GESTURE_EVENT_LOG("detected", _GESTURE_TAP, move, tapcount, interval, touchcount);
+ PACK_GESTURE_EVENT(_GESTURE_TAP, move, tapcount, interval, touchcount, &gestureDetector);
}
probeBlockEnd();
}