1 #ifndef DEVICE_GENERAL_H
2 #define DEVICE_GENERAL_H
20 bool click(
const int x,
const int y)
override;
21 bool click(
const int x,
const int y,
const unsigned int intv)
override;
23 bool drag(
const int sx,
const int sy,
const int ex,
const int ey,
24 const int steps,
const int durationMs)
override;
26 int touchDown(
const int x,
const int y)
override;
27 bool touchMove(
const int x,
const int y,
const int seq)
override;
28 bool touchUp(
const int x,
const int y,
const int seq)
override;
30 bool wheelUp(
int amount,
const int durationMs)
override;
31 bool wheelDown(
int amount,
const int durationMs)
override;
33 bool pressBack(KeyRequestType type)
override;
34 bool pressHome(KeyRequestType type)
override;
35 bool pressMenu(KeyRequestType type)
override;
39 bool pressKeyCode(std::string keycode, KeyRequestType type)
override;
40 bool takeScreenshot(std::string path,
float scale,
int quality)
override;
44 bool strokeKeyCode(std::string keycode,
unsigned int intv);
46 bool releaseKeyCode(std::string keycode);
48 int grabTouchSeqNumber();
49 bool releaseTouchSeqNumber(
int seq);
52 void startTimer(
void);
56 efl_util_inputgen_h mFakeTouchHandle;
57 efl_util_inputgen_h mFakeKeyboardHandle;
58 efl_util_inputgen_h mFakeWheelHandle;
59 static const unsigned int INTV_CLICK = 5;
60 static const unsigned int INTV_SHORTSTROKE = 100;
61 static const unsigned int INTV_LONGSTROKE = 2000;
63 static const unsigned int INTV_MINIMUM_DRAG_MS = 25;
64 static const unsigned int INTV_MINIMUM_USLEEP = 1000;
65 static const unsigned int MINIMUM_DURATION_DRAG = 100;
66 static const unsigned int MSEC_PER_SEC = 1000;
67 static const unsigned int MAX_FINGER_NUMBER = 2;
69 struct timespec tStart;
72 std::set<int> mTouchSeq;