#define MOVE_STEP 10
#define ZOOM_LENGTH 150
-#define DRAG_INITIAL_STEPS 3
-#define DRAG_FINAL_STEPS 1
+#define DRAG_INITIAL_STEPS 4
enum
{
{0.0, _dispatch_mouse_in_event, 0},
{0.0, _dispatch_mouse_move_event, 0},
{0.0, _dispatch_mouse_down_event, 0},
+ {0.0, _dispatch_mouse_move_event, 0},
/* move */
{0.01, _dispatch_mouse_move_event, 0},
/* up */
ecore_timer_add(tc.ts->delay, _touch_sequnece_timer, &tc);
}
-void _e_dispatch_drag_event(int x1, int y1, int x2, int y2, int steps)
+void _e_dispatch_drag_event(int x1, int y1, int x2, int y2, int steps, double hold_time)
{
E_Zone *zone;
if (y1 == 0) y1 += 1;
if (y1 == _zh) y1 -= 1;
+ _ts_drag[3].delay = hold_time;
+
dtc.type = DRAG;
dtc.x1 = x1;
dtc.y1 = y1;
#define E_DISPATCH_GESTURE_EVENT_H_
void _e_dispatch_gesture_event(int type, int x, int y);
-void _e_dispatch_drag_event(int x1, int y1, int x2, int y2, int steps);
+void _e_dispatch_drag_event(int x1, int y1, int x2, int y2, int steps, double hold_time);
#endif /* E_DISPATCH_GESTURE_EVENT_H_ */
{ "DispatchGestureEvent", ELDBUS_ARGS({"i", "int"}, {"i", "int"}, {"i", "int"}), NULL,
_dispatch_gesture_event
},
- { "DispatchDragEvent", ELDBUS_ARGS({"i", "int"}, {"i", "int"}, {"i", "int"}, {"i", "int"}, {"i", "int"}), NULL,
+ { "DispatchDragEvent", ELDBUS_ARGS({"i", "int"}, {"i", "int"}, {"i", "int"}, {"i", "int"}, {"i", "int"}, {"d", "double"}), NULL,
_dispatch_drag_event
},
{ }
_dispatch_drag_event(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
{
int x1, y1, x2, y2, steps;
- if (eldbus_message_arguments_get(msg, "iiiii", &x1, &y1, &x2, &y2, &steps))
+ double hold_time;
+ if (eldbus_message_arguments_get(msg, "iiiiid", &x1, &y1, &x2, &y2, &steps, &hold_time))
{
- _e_dispatch_drag_event(x1, y1, x2, y2, steps);
+ _e_dispatch_drag_event(x1, y1, x2, y2, steps, hold_time);
}
else
ERROR("eldbus_message_arguments_get() error\n");