};
void litest_set_current_device(struct litest_device *device);
-int litest_scale(const struct litest_device *d, unsigned int axis, int val);
+int litest_scale(const struct litest_device *d, unsigned int axis, double val);
void litest_generic_device_teardown(void);
#endif
static int
auto_assign_value(struct litest_device *d,
const struct input_event *ev,
- int slot, int x, int y)
+ int slot, double x, double y)
{
static int tracking_id;
int value = ev->value;
void
-litest_touch_down(struct litest_device *d, unsigned int slot, int x, int y)
+litest_touch_down(struct litest_device *d, unsigned int slot,
+ double x, double y)
{
struct input_event *ev;
}
void
-litest_touch_move(struct litest_device *d, unsigned int slot, int x, int y)
+litest_touch_move(struct litest_device *d, unsigned int slot,
+ double x, double y)
{
struct input_event *ev;
void
litest_touch_move_to(struct litest_device *d,
unsigned int slot,
- int x_from, int y_from,
- int x_to, int y_to,
+ double x_from, double y_from,
+ double x_to, double y_to,
int steps)
{
for (int i = 0; i < steps - 1; i++)
litest_button_click(d, key, is_press);
}
-int litest_scale(const struct litest_device *d, unsigned int axis, int val)
+int
+litest_scale(const struct litest_device *d, unsigned int axis, double val)
{
int min, max;
ck_assert_int_ge(val, 0);
void litest_touch_up(struct litest_device *d, unsigned int slot);
void litest_touch_move(struct litest_device *d,
unsigned int slot,
- int x,
- int y);
+ double x,
+ double y);
void litest_touch_down(struct litest_device *d,
unsigned int slot,
- int x,
- int y);
+ double x,
+ double y);
void litest_touch_move_to(struct litest_device *d,
unsigned int slot,
- int x_from, int y_from,
- int x_to, int y_to,
+ double x_from, double y_from,
+ double x_to, double y_to,
int steps);
void litest_button_click(struct litest_device *d,
unsigned int button,
END_TEST
static void
-test_2fg_scroll(struct litest_device *dev, int dx, int dy, int sleep)
+test_2fg_scroll(struct litest_device *dev, double dx, double dy, int sleep)
{
struct libinput *li = dev->libinput;
check_2fg_scroll(dev, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -10);
/* 2fg scroll smaller than the threshold should not generate events */
- test_2fg_scroll(dev, 1, 1, 200);
+ test_2fg_scroll(dev, 0.1, 0.1, 200);
litest_assert_empty_queue(li);
}
END_TEST