static bool
proximity_in(struct litest_device *d,
unsigned int tool_type,
- double x, double y,
+ double *x, double *y,
struct axis_replacement *axes)
{
/* nothing special needed for the pen tool, so let litest handle
return false;
/* a non-pen tool requires the pen to be in proximity as well. */
- x = litest_scale(d, ABS_X, x);
- y = litest_scale(d, ABS_Y, y);
- litest_event(d, EV_ABS, ABS_X, x);
- litest_event(d, EV_ABS, ABS_X, y);
+ int sx = litest_scale(d, ABS_X, *x);
+ int sy = litest_scale(d, ABS_Y, *y);
+ litest_event(d, EV_ABS, ABS_X, sx);
+ litest_event(d, EV_ABS, ABS_X, sy);
litest_event(d, EV_KEY, BTN_TOOL_PEN, 1);
litest_event(d, EV_SYN, SYN_REPORT, 0);
static bool prox_in(struct litest_device *d,
unsigned int tool_type,
- double x, double y,
+ double *x, double *y,
struct axis_replacement *axes)
{
struct priv *priv = d->private;
static bool
tip_down(struct litest_device *d,
- int x, int y,
+ double *x, double *y,
struct axis_replacement *axes)
{
litest_event(d, EV_KEY, BTN_TOOL_PEN, 1);
static bool
tip_up(struct litest_device *d,
- int x, int y,
+ double* x, double *y,
struct axis_replacement *axes)
{
struct priv *priv = d->private;
bool (*tablet_proximity_in)(struct litest_device *d,
unsigned int tool_type,
- double x, double y,
+ double *x, double *y,
struct axis_replacement *axes);
bool (*tablet_proximity_out)(struct litest_device *d, unsigned int tool_type);
bool (*tablet_tip_down)(struct litest_device *d,
- int x, int y,
+ double *x, double *y,
struct axis_replacement *axes);
bool (*tablet_tip_up)(struct litest_device *d,
- int x, int y,
+ double *x, double *y,
struct axis_replacement *axes);
/**
}
void
-litest_tablet_proximity_in(struct litest_device *d, int x, int y, struct axis_replacement *axes)
+litest_tablet_proximity_in(struct litest_device *d,
+ double x, double y,
+ struct axis_replacement *axes)
{
struct input_event *ev;
/* If the test device overrides proximity_in and says it didn't
* handle the event, let's continue normally */
if (d->interface->tablet_proximity_in &&
- d->interface->tablet_proximity_in(d, d->interface->tool_type, x, y, axes))
+ d->interface->tablet_proximity_in(d, d->interface->tool_type, &x, &y, axes))
return;
ev = d->interface->tablet_proximity_in_events;
}
void
-litest_tablet_motion(struct litest_device *d, int x, int y, struct axis_replacement *axes)
+litest_tablet_motion(struct litest_device *d,
+ double x, double y,
+ struct axis_replacement *axes)
{
struct input_event *ev;
void
litest_tablet_tip_down(struct litest_device *d,
- int x, int y,
+ double x, double 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))
+ d->interface->tablet_tip_down(d, &x, &y, axes))
return;
litest_event(d, EV_KEY, BTN_TOUCH, 1);
void
litest_tablet_tip_up(struct litest_device *d,
- int x, int y,
+ double x, double 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))
+ d->interface->tablet_tip_up(d, &x, &y, axes))
return;
litest_event(d, EV_KEY, BTN_TOUCH, 0);
void
litest_tablet_proximity_in(struct litest_device *d,
- int x, int y,
+ double x, double y,
struct axis_replacement *axes);
void
void
litest_tablet_tip_down(struct litest_device *d,
- int x, int y,
+ double x, double y,
struct axis_replacement *axes);
void
litest_tablet_tip_up(struct litest_device *d,
- int x, int y,
+ double x, double y,
struct axis_replacement *axes);
void
litest_tablet_motion(struct litest_device *d,
- int x, int y,
+ double x, double y,
struct axis_replacement *axes);
void