forked from enlightenment/efl
suite_helpers: add helper for key down events
usefull for emulating key events.
This commit is contained in:
parent
91b3476d51
commit
43f95ec6b3
|
@ -806,3 +806,18 @@ pinch_object(Eo *obj, int x, int y, int x2, int y2, int dx, int dy, int dx2, int
|
|||
evas_event_feed_multi_up(e, 1, x2 + idx2, y2 + idy2, 1, 1, 1, 1, 0, x2 + idx2, y2 + idy2, 0, ts++, NULL);
|
||||
return i - 2;
|
||||
}
|
||||
|
||||
void
|
||||
write_key_sequence(Eo *obj, const char *seqence)
|
||||
{
|
||||
Evas *e = evas_object_evas_get(obj);
|
||||
for (unsigned int i = 0; i < strlen(seqence); ++i)
|
||||
{
|
||||
const char part_seq[] = {seqence[i], '\0'};
|
||||
|
||||
evas_event_feed_key_down(e, part_seq, part_seq, part_seq, part_seq, 0, NULL);
|
||||
ecore_main_loop_iterate();
|
||||
evas_event_feed_key_up(e, part_seq, part_seq, part_seq, part_seq, 0, NULL);
|
||||
ecore_main_loop_iterate();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ void multi_press_object(Eo *obj, int ids);
|
|||
void multi_click_object_at(Eo *obj, int x, int y, int ids);
|
||||
void multi_press_object_at(Eo *obj, int x, int y, int ids);
|
||||
int multi_drag_object_around(Eo *obj, int touch_point, int cx, int cy, int radius, int degrees);
|
||||
void write_key_sequence(Eo *obj, const char *seqence);
|
||||
void drag_object(Eo *obj, int x, int y, int dx, int dy, Eina_Bool iterate);
|
||||
int drag_object_around(Eo *obj, int cx, int cy, int radius, int degrees);
|
||||
int pinch_object(Eo *obj, int x, int y, int x2, int y2, int dx, int dy, int dx2, int dy2);
|
||||
|
|
Loading…
Reference in New Issue