Commit 759ef044 authored by Peter Hutterer's avatar Peter Hutterer

tablet: rename TOOL_TIP to TABLET_TOOL_TIP

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 7123c37f
......@@ -410,7 +410,7 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
enum libinput_tablet_tool_tip_state tip_state;
tip_state = tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT) ?
LIBINPUT_TOOL_TIP_DOWN : LIBINPUT_TOOL_TIP_UP;
LIBINPUT_TABLET_TOOL_TIP_DOWN : LIBINPUT_TABLET_TOOL_TIP_UP;
tablet_notify_axis(base,
time,
tool,
......@@ -795,7 +795,7 @@ tablet_notify_button_mask(struct tablet_dispatch *tablet,
enum libinput_tablet_tool_tip_state tip_state;
tip_state = tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT) ?
LIBINPUT_TOOL_TIP_DOWN : LIBINPUT_TOOL_TIP_UP;
LIBINPUT_TABLET_TOOL_TIP_DOWN : LIBINPUT_TABLET_TOOL_TIP_UP;
for (i = 0; i < nbits; i++) {
if (!bit_is_set(buttons, i))
......@@ -906,7 +906,7 @@ tablet_flush(struct tablet_dispatch *tablet,
tablet_notify_tip(&device->base,
time,
tool,
LIBINPUT_TOOL_TIP_DOWN,
LIBINPUT_TABLET_TOOL_TIP_DOWN,
tablet->axes);
tablet_unset_status(tablet, TABLET_TOOL_ENTERING_CONTACT);
tablet_set_status(tablet, TABLET_TOOL_IN_CONTACT);
......@@ -934,7 +934,7 @@ tablet_flush(struct tablet_dispatch *tablet,
tablet_notify_tip(&device->base,
time,
tool,
LIBINPUT_TOOL_TIP_UP,
LIBINPUT_TABLET_TOOL_TIP_UP,
tablet->axes);
tablet_unset_status(tablet, TABLET_TOOL_LEAVING_CONTACT);
tablet_unset_status(tablet, TABLET_TOOL_IN_CONTACT);
......
......@@ -226,8 +226,8 @@ enum libinput_tablet_tool_proximity_state {
* touching the surface of the tablet device.
*/
enum libinput_tablet_tool_tip_state {
LIBINPUT_TOOL_TIP_UP = 0,
LIBINPUT_TOOL_TIP_DOWN = 1,
LIBINPUT_TABLET_TOOL_TIP_UP = 0,
LIBINPUT_TABLET_TOOL_TIP_DOWN = 1,
};
/**
......
......@@ -56,7 +56,7 @@ START_TEST(tip_down_up)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_DOWN);
LIBINPUT_TABLET_TOOL_TIP_DOWN);
libinput_event_destroy(event);
litest_assert_empty_queue(li);
......@@ -68,7 +68,7 @@ START_TEST(tip_down_up)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_assert_empty_queue(li);
......@@ -108,7 +108,7 @@ START_TEST(tip_down_prox_in)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_DOWN);
LIBINPUT_TABLET_TOOL_TIP_DOWN);
libinput_event_destroy(event);
litest_assert_empty_queue(li);
......@@ -142,7 +142,7 @@ START_TEST(tip_up_prox_out)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
libinput_dispatch(li);
......@@ -193,7 +193,7 @@ START_TEST(tip_up_btn_change)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_assert_empty_queue(li);
......@@ -222,7 +222,7 @@ START_TEST(tip_up_btn_change)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_assert_empty_queue(li);
......@@ -252,7 +252,7 @@ START_TEST(tip_down_btn_change)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_DOWN);
LIBINPUT_TABLET_TOOL_TIP_DOWN);
libinput_event_destroy(event);
libinput_dispatch(li);
......@@ -281,7 +281,7 @@ START_TEST(tip_down_btn_change)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_DOWN);
LIBINPUT_TABLET_TOOL_TIP_DOWN);
libinput_event_destroy(event);
libinput_dispatch(li);
......@@ -334,7 +334,7 @@ START_TEST(tip_down_motion)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_DOWN);
LIBINPUT_TABLET_TOOL_TIP_DOWN);
x = libinput_event_tablet_get_axis_value(tablet_event,
LIBINPUT_TABLET_TOOL_AXIS_X);
y = libinput_event_tablet_get_axis_value(tablet_event,
......@@ -385,7 +385,7 @@ START_TEST(tip_up_motion)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_TIP);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
x = libinput_event_tablet_get_axis_value(tablet_event,
LIBINPUT_TABLET_TOOL_AXIS_X);
y = libinput_event_tablet_get_axis_value(tablet_event,
......@@ -418,7 +418,7 @@ START_TEST(tip_state_proximity)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_PROXIMITY);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_event(dev, EV_KEY, BTN_TOUCH, 1);
......@@ -434,7 +434,7 @@ START_TEST(tip_state_proximity)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_PROXIMITY);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
}
END_TEST
......@@ -460,7 +460,7 @@ START_TEST(tip_state_axis)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_AXIS);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_event(dev, EV_KEY, BTN_TOUCH, 1);
......@@ -474,7 +474,7 @@ START_TEST(tip_state_axis)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_AXIS);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_DOWN);
LIBINPUT_TABLET_TOOL_TIP_DOWN);
libinput_event_destroy(event);
litest_event(dev, EV_KEY, BTN_TOUCH, 0);
......@@ -488,7 +488,7 @@ START_TEST(tip_state_axis)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_AXIS);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_assert_empty_queue(li);
......@@ -517,7 +517,7 @@ START_TEST(tip_state_button)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_BUTTON);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_event(dev, EV_KEY, BTN_TOUCH, 1);
......@@ -532,7 +532,7 @@ START_TEST(tip_state_button)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_BUTTON);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_DOWN);
LIBINPUT_TABLET_TOOL_TIP_DOWN);
libinput_event_destroy(event);
litest_event(dev, EV_KEY, BTN_TOUCH, 0);
......@@ -547,7 +547,7 @@ START_TEST(tip_state_button)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_BUTTON);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_event(dev, EV_KEY, BTN_STYLUS, 0);
......@@ -558,7 +558,7 @@ START_TEST(tip_state_button)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_BUTTON);
ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
LIBINPUT_TOOL_TIP_UP);
LIBINPUT_TABLET_TOOL_TIP_UP);
libinput_event_destroy(event);
litest_assert_empty_queue(li);
......
......@@ -290,7 +290,7 @@ print_tablet_tip_event(struct libinput_event *ev)
print_event_time(libinput_event_tablet_get_time(p));
state = libinput_event_tablet_get_tip_state(p);
printf("%s\n", state == LIBINPUT_TOOL_TIP_DOWN ? "down" : "up");
printf("%s\n", state == LIBINPUT_TABLET_TOOL_TIP_DOWN ? "down" : "up");
}
static void
......
......@@ -637,7 +637,7 @@ handle_event_tablet(struct libinput_event *ev, struct window *w)
x = libinput_event_tablet_get_x_transformed(t, w->width);
y = libinput_event_tablet_get_y_transformed(t, w->height);
if (libinput_event_tablet_get_tip_state(t) ==
LIBINPUT_TOOL_TIP_DOWN) {
LIBINPUT_TABLET_TOOL_TIP_DOWN) {
w->tool.x_down = x;
w->tool.y_down = y;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment