summaryrefslogtreecommitdiff
path: root/test/litest.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/litest.c')
-rw-r--r--test/litest.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/litest.c b/test/litest.c
index 69d5154b..4f4739d2 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -2542,6 +2542,36 @@ litest_tablet_motion(struct litest_device *d, int x, int y, struct axis_replacem
}
void
+litest_tablet_tip_down(struct litest_device *d,
+ int x, int y,
+ struct axis_replacement *axes)
+{
+ /* If the test device overrides tip_down and says it didn't
+ * handle the event, let's continue normally */
+ if (d->interface->tablet_tip_down &&
+ d->interface->tablet_tip_down(d, x, y, axes))
+ return;
+
+ litest_event(d, EV_KEY, BTN_TOUCH, 1);
+ litest_tablet_motion(d, x, y, axes);
+}
+
+void
+litest_tablet_tip_up(struct litest_device *d,
+ int x, int y,
+ struct axis_replacement *axes)
+{
+ /* If the test device overrides tip_down and says it didn't
+ * handle the event, let's continue normally */
+ if (d->interface->tablet_tip_up &&
+ d->interface->tablet_tip_up(d, x, y, axes))
+ return;
+
+ litest_event(d, EV_KEY, BTN_TOUCH, 0);
+ litest_tablet_motion(d, x, y, axes);
+}
+
+void
litest_touch_move_two_touches(struct litest_device *d,
double x0, double y0,
double x1, double y1,