[PATCH libinput 11/14] tablet: rename LIBINPUT_EVENT_TABLET to LIBINPUT_EVENT_TABLET_TOOL

Peter Hutterer peter.hutterer at who-t.net
Tue Nov 17 20:17:58 PST 2015


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 doc/tablet-support.dox |   2 +-
 src/libinput.c         | 104 +++++++++++++++++-----------------
 src/libinput.h         |  46 +++++++--------
 test/litest.c          |  16 +++---
 test/misc.c            |   4 +-
 test/tablet.c          | 150 ++++++++++++++++++++++++-------------------------
 tools/event-debug.c    |  16 +++---
 tools/event-gui.c      |  16 +++---
 8 files changed, 177 insertions(+), 177 deletions(-)

diff --git a/doc/tablet-support.dox b/doc/tablet-support.dox
index fb8ea32..47ad005 100644
--- a/doc/tablet-support.dox
+++ b/doc/tablet-support.dox
@@ -8,7 +8,7 @@ Apple iPad.
 
 @section fake-proximity Handling of proximity events
 
-libinput's @ref LIBINPUT_EVENT_TABLET_PROXIMITY events represent the
+libinput's @ref LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY events represent the
 physical proximity limits of the device. In some cases the caller should
 emulate proximity based on the distance events. For example, the Wacom mouse
 and lens cursor tools are usually used in relative mode, lying flat on the
diff --git a/src/libinput.c b/src/libinput.c
index 708399f..79e3832 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -312,10 +312,10 @@ libinput_event_get_tablet_event(struct libinput_event *event)
 	require_event_type(libinput_event_get_context(event),
 			   event->type,
 			   NULL,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_BUTTON);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 
 	return (struct libinput_event_tablet *) event;
 }
@@ -919,9 +919,9 @@ libinput_event_tablet_axis_has_changed(struct libinput_event_tablet *event,
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	return (NCHARS(axis) <= sizeof(event->changed_axes)) ?
 		bit_is_set(event->changed_axes, axis) : 0;
@@ -937,9 +937,9 @@ libinput_event_tablet_get_axis_value(struct libinput_event_tablet *event,
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	switch(axis) {
 		case LIBINPUT_TABLET_TOOL_AXIS_X:
@@ -971,9 +971,9 @@ libinput_event_tablet_get_axis_delta(struct libinput_event_tablet *event,
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	switch(axis) {
 		case LIBINPUT_TABLET_TOOL_AXIS_X:
@@ -1003,9 +1003,9 @@ libinput_event_tablet_get_axis_delta_discrete(
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	switch(axis) {
 		case LIBINPUT_TABLET_TOOL_AXIS_X:
@@ -1033,9 +1033,9 @@ libinput_event_tablet_get_x_transformed(struct libinput_event_tablet *event,
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	return evdev_device_transform_x(device,
 					event->axes[LIBINPUT_TABLET_TOOL_AXIS_X],
@@ -1052,9 +1052,9 @@ libinput_event_tablet_get_y_transformed(struct libinput_event_tablet *event,
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	return evdev_device_transform_y(device,
 					event->axes[LIBINPUT_TABLET_TOOL_AXIS_Y],
@@ -1067,10 +1067,10 @@ libinput_event_tablet_get_tool(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_BUTTON,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	return event->tool;
 }
@@ -1081,10 +1081,10 @@ libinput_event_tablet_get_proximity_state(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_BUTTON,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	return event->proximity_state;
 }
@@ -1095,10 +1095,10 @@ libinput_event_tablet_get_tip_state(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_BUTTON,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	return event->tip_state;
 }
@@ -1109,10 +1109,10 @@ libinput_event_tablet_get_time(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_BUTTON,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	return us2ms(event->time);
 }
@@ -1123,10 +1123,10 @@ libinput_event_tablet_get_time_usec(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_TIP,
-			   LIBINPUT_EVENT_TABLET_BUTTON,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_TIP,
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 	return event->time;
 }
@@ -1137,7 +1137,7 @@ libinput_event_tablet_get_button(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_BUTTON);
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 
 	return event->button;
 }
@@ -1148,7 +1148,7 @@ libinput_event_tablet_get_button_state(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_BUTTON);
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 
 	return event->state;
 }
@@ -1159,7 +1159,7 @@ libinput_event_tablet_get_seat_button_count(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   0,
-			   LIBINPUT_EVENT_TABLET_BUTTON);
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 
 	return event->seat_button_count;
 }
@@ -2003,7 +2003,7 @@ tablet_notify_axis(struct libinput_device *device,
 
 	post_device_event(device,
 			  time,
-			  LIBINPUT_EVENT_TABLET_AXIS,
+			  LIBINPUT_EVENT_TABLET_TOOL_AXIS,
 			  &axis_event->base);
 }
 
@@ -2037,7 +2037,7 @@ tablet_notify_proximity(struct libinput_device *device,
 
 	post_device_event(device,
 			  time,
-			  LIBINPUT_EVENT_TABLET_PROXIMITY,
+			  LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 			  &proximity_event->base);
 }
 
@@ -2066,7 +2066,7 @@ tablet_notify_tip(struct libinput_device *device,
 
 	post_device_event(device,
 			  time,
-			  LIBINPUT_EVENT_TABLET_TIP,
+			  LIBINPUT_EVENT_TABLET_TOOL_TIP,
 			  &tip_event->base);
 }
 
@@ -2103,7 +2103,7 @@ tablet_notify_button(struct libinput_device *device,
 
 	post_device_event(device,
 			  time,
-			  LIBINPUT_EVENT_TABLET_BUTTON,
+			  LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
 			  &button_event->base);
 }
 
@@ -2468,9 +2468,9 @@ libinput_event_tablet_get_base_event(struct libinput_event_tablet *event)
 	require_event_type(libinput_event_get_context(&event->base),
 			   event->base.type,
 			   NULL,
-			   LIBINPUT_EVENT_TABLET_AXIS,
-			   LIBINPUT_EVENT_TABLET_PROXIMITY,
-			   LIBINPUT_EVENT_TABLET_BUTTON);
+			   LIBINPUT_EVENT_TABLET_TOOL_AXIS,
+			   LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
+			   LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 
 	return &event->base;
 }
diff --git a/src/libinput.h b/src/libinput.h
index 8604284..77bf260 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -280,23 +280,23 @@ enum libinput_event_type {
 	 * One or more axes have changed state on a device with the @ref
 	 * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability. This event is only sent
 	 * when the tool is in proximity, see @ref
-	 * LIBINPUT_EVENT_TABLET_PROXIMITY for details.
+	 * LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY for details.
 	 *
 	 * The proximity event contains the initial state of the axis as the
 	 * tool comes into proximity. An event of type @ref
-	 * LIBINPUT_EVENT_TABLET_AXIS is only sent when an axis value
+	 * LIBINPUT_EVENT_TABLET_TOOL_AXIS is only sent when an axis value
 	 * changes from this initial state. It is possible for a tool to
 	 * enter and leave proximity without sending an event of type @ref
-	 * LIBINPUT_EVENT_TABLET_AXIS.
+	 * LIBINPUT_EVENT_TABLET_TOOL_AXIS.
 	 */
-	LIBINPUT_EVENT_TABLET_AXIS = 600,
+	LIBINPUT_EVENT_TABLET_TOOL_AXIS = 600,
 	/**
 	 * Signals that a tool has come in or out of proximity of a device with
 	 * the @ref LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
 	 *
 	 * Proximity events contain each of the current values for each axis,
 	 * and these values may be extracted from them in the same way they are
-	 * with @ref LIBINPUT_EVENT_TABLET_AXIS events.
+	 * with @ref LIBINPUT_EVENT_TABLET_TOOL_AXIS events.
 	 *
 	 * Some tools may always be in proximity. For these tools, events of
 	 * type @ref LIBINPUT_TABLET_TOOL_PROXIMITY_IN are sent only once after @ref
@@ -314,21 +314,21 @@ enum libinput_event_type {
 	 * each button that was held down on the stylus are sent before the
 	 * proximity out event.
 	 */
-	LIBINPUT_EVENT_TABLET_PROXIMITY,
+	LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 	/**
 	 * Signals that a tool has come in contact with the surface of a
 	 * device with the @ref LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
 	 *
 	 * On devices without distance proximity detection, the @ref
-	 * LIBINPUT_EVENT_TABLET_TIP is sent immediately after @ref
-	 * LIBINPUT_EVENT_TABLET_PROXIMITY for the tip down event, and
+	 * LIBINPUT_EVENT_TABLET_TOOL_TIP is sent immediately after @ref
+	 * LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY for the tip down event, and
 	 * immediately before for the tip up event.
 	 *
 	 * If a button and/or axis state change occurs at the same time as a
 	 * tip state change, the order of events is device-dependent.
 	 */
-	LIBINPUT_EVENT_TABLET_TIP,
-	LIBINPUT_EVENT_TABLET_BUTTON,
+	LIBINPUT_EVENT_TABLET_TOOL_TIP,
+	LIBINPUT_EVENT_TABLET_TOOL_BUTTON,
 
 	LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN = 800,
 	LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE,
@@ -429,8 +429,8 @@ struct libinput_event_touch;
  * @struct libinput_event_tablet
  *
  * Tablet event representing an axis update, button press, or tool update. Valid
- * event types for this event are @ref LIBINPUT_EVENT_TABLET_AXIS, @ref
- * LIBINPUT_EVENT_TABLET_PROXIMITY and @ref LIBINPUT_EVENT_TABLET_BUTTON.
+ * event types for this event are @ref LIBINPUT_EVENT_TABLET_TOOL_AXIS, @ref
+ * LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY and @ref LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
  */
 struct libinput_event_tablet;
 
@@ -1359,11 +1359,11 @@ libinput_event_tablet_get_base_event(struct libinput_event_tablet *event);
  * @ingroup event_tablet
  *
  * Checks if an axis was updated in this event or return 0 otherwise.
- * For tablet events that are not of type @ref LIBINPUT_EVENT_TABLET_AXIS or
- * type @ref LIBINPUT_EVENT_TABLET_PROXIMITY, this function returns 0.
+ * For tablet events that are not of type @ref LIBINPUT_EVENT_TABLET_TOOL_AXIS or
+ * type @ref LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
  *
  * @note It is an application bug to call this function for events other than
- * @ref LIBINPUT_EVENT_TABLET_AXIS and @ref LIBINPUT_EVENT_TABLET_PROXIMITY.
+ * @ref LIBINPUT_EVENT_TABLET_TOOL_AXIS and @ref LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY.
  *
  * @param event The libinput tablet event
  * @param axis The axis to check for updates
@@ -1406,7 +1406,7 @@ libinput_event_tablet_axis_has_changed(struct libinput_event_tablet *event,
  * libinput_event_tablet_axis_has_changed() returns 0 for that axis.
  * libinput always includes all device axes in the event.
  *
- * If the event is of type @ref LIBINPUT_EVENT_TABLET_PROXIMITY and the
+ * If the event is of type @ref LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY and the
  * event is a proximity out event, the value returned is the last known
  * value of the tool before it left proximity.
  *
@@ -1516,7 +1516,7 @@ libinput_event_tablet_get_tool(struct libinput_event_tablet *event);
  *
  * Returns the new proximity state of a tool from a proximity event.
  * Used to check whether or not a tool came in or out of proximity during an
- * event of type @ref LIBINPUT_EVENT_TABLET_PROXIMITY.
+ * event of type @ref LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY.
  *
  * See @ref fake-proximity for recommendations on proximity handling.
  *
@@ -1532,7 +1532,7 @@ libinput_event_tablet_get_proximity_state(struct libinput_event_tablet *event);
  * Returns the new tip state of a tool from a tip event.
  * Used to check whether or not a tool came in contact with the tablet
  * surface or left contact with the tablet surface during an
- * event of type @ref LIBINPUT_EVENT_TABLET_TIP.
+ * event of type @ref LIBINPUT_EVENT_TABLET_TOOL_TIP.
  *
  * @param event The libinput tablet event
  * @return The new tip state of the tool from the event.
@@ -1544,11 +1544,11 @@ libinput_event_tablet_get_tip_state(struct libinput_event_tablet *event);
  * @ingroup event_tablet
  *
  * Return the button that triggered this event.
- * For tablet events that are not of type @ref LIBINPUT_EVENT_TABLET_BUTTON, this
+ * For tablet events that are not of type @ref LIBINPUT_EVENT_TABLET_TOOL_BUTTON, this
  * function returns 0.
  *
  * @note It is an application bug to call this function for events other than
- * @ref LIBINPUT_EVENT_TABLET_BUTTON.
+ * @ref LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
  *
  * @param event The libinput tablet event
  * @return the button triggering this event
@@ -1562,7 +1562,7 @@ libinput_event_tablet_get_button(struct libinput_event_tablet *event);
  * Return the button state of the event.
  *
  * @note It is an application bug to call this function for events other than
- * @ref LIBINPUT_EVENT_TABLET_BUTTON.
+ * @ref LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
  *
  * @param event The libinput tablet event
  * @return the button state triggering this event
@@ -1573,12 +1573,12 @@ libinput_event_tablet_get_button_state(struct libinput_event_tablet *event);
 /**
  * @ingroup event_tablet
  *
- * For the button of a @ref LIBINPUT_EVENT_TABLET_BUTTON event, return the total
+ * For the button of a @ref LIBINPUT_EVENT_TABLET_TOOL_BUTTON event, return the total
  * number of buttons pressed on all devices on the associated seat after the
  * the event was triggered.
  *
  " @note It is an application bug to call this function for events other than
- * @ref LIBINPUT_EVENT_TABLET_BUTTON. For other events, this function returns 0.
+ * @ref LIBINPUT_EVENT_TABLET_TOOL_BUTTON. For other events, this function returns 0.
  *
  * @return the seat wide pressed button count for the key of this event
  */
diff --git a/test/litest.c b/test/litest.c
index 292cddb..d9fa32b 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -1881,16 +1881,16 @@ litest_event_type_str(struct libinput_event *event)
 	case LIBINPUT_EVENT_GESTURE_PINCH_END:
 		str = "GESTURE PINCH END";
 		break;
-	case LIBINPUT_EVENT_TABLET_AXIS:
+	case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
 		str = "TABLET AXIS";
 		break;
-	case LIBINPUT_EVENT_TABLET_PROXIMITY:
+	case LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY:
 		str = "TABLET PROX";
 		break;
-	case LIBINPUT_EVENT_TABLET_TIP:
+	case LIBINPUT_EVENT_TABLET_TOOL_TIP:
 		str = "TABLET TIP";
 		break;
-	case LIBINPUT_EVENT_TABLET_BUTTON:
+	case LIBINPUT_EVENT_TABLET_TOOL_BUTTON:
 		str = "TABLET BUTTON";
 		break;
 	}
@@ -1947,17 +1947,17 @@ litest_print_event(struct libinput_event *event)
 				LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL);
 		fprintf(stderr, "vert %.f horiz %.2f", y, x);
 		break;
-	case LIBINPUT_EVENT_TABLET_PROXIMITY:
+	case LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY:
 		t = libinput_event_get_tablet_event(event);
 		fprintf(stderr, "proximity %d\n",
 			libinput_event_tablet_get_proximity_state(t));
 		break;
-	case LIBINPUT_EVENT_TABLET_TIP:
+	case LIBINPUT_EVENT_TABLET_TOOL_TIP:
 		t = libinput_event_get_tablet_event(event);
 		fprintf(stderr, "tip %d\n",
 			libinput_event_tablet_get_tip_state(t));
 		break;
-	case LIBINPUT_EVENT_TABLET_BUTTON:
+	case LIBINPUT_EVENT_TABLET_TOOL_BUTTON:
 		t = libinput_event_get_tablet_event(event);
 		fprintf(stderr, "button %d state %d\n",
 			libinput_event_tablet_get_button(t),
@@ -2351,7 +2351,7 @@ litest_assert_tablet_button_event(struct libinput *li, unsigned int button,
 {
 	struct libinput_event *event;
 	struct libinput_event_tablet *tev;
-	enum libinput_event_type type = LIBINPUT_EVENT_TABLET_BUTTON;
+	enum libinput_event_type type = LIBINPUT_EVENT_TABLET_TOOL_BUTTON;
 
 	litest_wait_for_event(li);
 	event = libinput_get_event(li);
diff --git a/test/misc.c b/test/misc.c
index a0c459d..7ba6f9c 100644
--- a/test/misc.c
+++ b/test/misc.c
@@ -412,8 +412,8 @@ START_TEST(event_conversion_tablet)
 		enum libinput_event_type type;
 		type = libinput_event_get_type(event);
 
-		if (type >= LIBINPUT_EVENT_TABLET_AXIS &&
-		    type <= LIBINPUT_EVENT_TABLET_BUTTON) {
+		if (type >= LIBINPUT_EVENT_TABLET_TOOL_AXIS &&
+		    type <= LIBINPUT_EVENT_TABLET_TOOL_BUTTON) {
 			struct libinput_event_tablet *t;
 			struct libinput_event *base;
 			t = libinput_event_get_tablet_event(event);
diff --git a/test/tablet.c b/test/tablet.c
index 7aa76b2..383a7b1 100644
--- a/test/tablet.c
+++ b/test/tablet.c
@@ -54,7 +54,7 @@ START_TEST(tip_down_up)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_DOWN);
 	libinput_event_destroy(event);
@@ -66,7 +66,7 @@ START_TEST(tip_down_up)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -98,7 +98,7 @@ START_TEST(tip_down_prox_in)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_PROXIMITY);
+					      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 	ck_assert_int_eq(libinput_event_tablet_get_proximity_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_PROXIMITY_IN);
 	libinput_event_destroy(event);
@@ -106,7 +106,7 @@ START_TEST(tip_down_prox_in)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_DOWN);
 	libinput_event_destroy(event);
@@ -140,7 +140,7 @@ START_TEST(tip_up_prox_out)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -148,7 +148,7 @@ START_TEST(tip_up_prox_out)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_PROXIMITY);
+					      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 	ck_assert_int_eq(libinput_event_tablet_get_proximity_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_PROXIMITY_OUT);
 	libinput_event_destroy(event);
@@ -181,7 +181,7 @@ START_TEST(tip_up_btn_change)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_BUTTON);
+					      LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	ck_assert_int_eq(libinput_event_tablet_get_button(tablet_event),
 			 BTN_STYLUS);
 	ck_assert_int_eq(libinput_event_tablet_get_button_state(tablet_event),
@@ -191,7 +191,7 @@ START_TEST(tip_up_btn_change)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -210,7 +210,7 @@ START_TEST(tip_up_btn_change)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_BUTTON);
+					      LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	ck_assert_int_eq(libinput_event_tablet_get_button(tablet_event),
 			 BTN_STYLUS);
 	ck_assert_int_eq(libinput_event_tablet_get_button_state(tablet_event),
@@ -220,7 +220,7 @@ START_TEST(tip_up_btn_change)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -250,7 +250,7 @@ START_TEST(tip_down_btn_change)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_DOWN);
 	libinput_event_destroy(event);
@@ -258,7 +258,7 @@ START_TEST(tip_down_btn_change)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_BUTTON);
+					      LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	ck_assert_int_eq(libinput_event_tablet_get_button(tablet_event),
 			 BTN_STYLUS);
 	ck_assert_int_eq(libinput_event_tablet_get_button_state(tablet_event),
@@ -279,7 +279,7 @@ START_TEST(tip_down_btn_change)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_DOWN);
 	libinput_event_destroy(event);
@@ -287,7 +287,7 @@ START_TEST(tip_down_btn_change)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_BUTTON);
+					      LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	ck_assert_int_eq(libinput_event_tablet_get_button(tablet_event),
 			 BTN_STYLUS);
 	ck_assert_int_eq(libinput_event_tablet_get_button_state(tablet_event),
@@ -322,7 +322,7 @@ START_TEST(tip_down_motion)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_AXIS);
+					      LIBINPUT_EVENT_TABLET_TOOL_AXIS);
 	last_x = libinput_event_tablet_get_axis_value(tablet_event,
 						      LIBINPUT_TABLET_TOOL_AXIS_X);
 	last_y = libinput_event_tablet_get_axis_value(tablet_event,
@@ -332,7 +332,7 @@ START_TEST(tip_down_motion)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_DOWN);
 	x = libinput_event_tablet_get_axis_value(tablet_event,
@@ -373,7 +373,7 @@ START_TEST(tip_up_motion)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_AXIS);
+					      LIBINPUT_EVENT_TABLET_TOOL_AXIS);
 	last_x = libinput_event_tablet_get_axis_value(tablet_event,
 						      LIBINPUT_TABLET_TOOL_AXIS_X);
 	last_y = libinput_event_tablet_get_axis_value(tablet_event,
@@ -383,7 +383,7 @@ START_TEST(tip_up_motion)
 	libinput_dispatch(li);
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_TIP);
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	x = libinput_event_tablet_get_axis_value(tablet_event,
@@ -416,7 +416,7 @@ START_TEST(tip_state_proximity)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_PROXIMITY);
+					      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -432,7 +432,7 @@ START_TEST(tip_state_proximity)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_PROXIMITY);
+					      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -458,7 +458,7 @@ START_TEST(tip_state_axis)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_AXIS);
+					      LIBINPUT_EVENT_TABLET_TOOL_AXIS);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -472,7 +472,7 @@ START_TEST(tip_state_axis)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_AXIS);
+					      LIBINPUT_EVENT_TABLET_TOOL_AXIS);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_DOWN);
 	libinput_event_destroy(event);
@@ -486,7 +486,7 @@ START_TEST(tip_state_axis)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_AXIS);
+					      LIBINPUT_EVENT_TABLET_TOOL_AXIS);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -515,7 +515,7 @@ START_TEST(tip_state_button)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_BUTTON);
+					      LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -530,7 +530,7 @@ START_TEST(tip_state_button)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_BUTTON);
+					      LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_DOWN);
 	libinput_event_destroy(event);
@@ -545,7 +545,7 @@ START_TEST(tip_state_button)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_BUTTON);
+					      LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -556,7 +556,7 @@ START_TEST(tip_state_button)
 
 	event = libinput_get_event(li);
 	tablet_event = litest_is_tablet_event(event,
-					      LIBINPUT_EVENT_TABLET_BUTTON);
+					      LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TABLET_TOOL_TIP_UP);
 	libinput_event_destroy(event);
@@ -586,7 +586,7 @@ START_TEST(proximity_in_out)
 
 	while ((event = libinput_get_event(li))) {
 		if (libinput_event_get_type(event) ==
-		    LIBINPUT_EVENT_TABLET_PROXIMITY) {
+		    LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY) {
 			struct libinput_tablet_tool * tool;
 
 			have_tool_update++;
@@ -604,7 +604,7 @@ START_TEST(proximity_in_out)
 
 	while ((event = libinput_get_event(li))) {
 		if (libinput_event_get_type(event) ==
-		    LIBINPUT_EVENT_TABLET_PROXIMITY) {
+		    LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY) {
 			struct libinput_event_tablet *t =
 				libinput_event_get_tablet_event(event);
 
@@ -624,7 +624,7 @@ START_TEST(proximity_in_out)
 	while ((event = libinput_get_event(li))) {
 		enum libinput_event_type type = libinput_event_get_type(event);
 
-		ck_assert(type != LIBINPUT_EVENT_TABLET_AXIS);
+		ck_assert(type != LIBINPUT_EVENT_TABLET_TOOL_AXIS);
 
 		libinput_event_destroy(event);
 	}
@@ -668,7 +668,7 @@ START_TEST(proximity_out_clear_buttons)
 			tablet_event = libinput_event_get_tablet_event(event);
 
 			if (libinput_event_get_type(event) ==
-			    LIBINPUT_EVENT_TABLET_BUTTON) {
+			    LIBINPUT_EVENT_TABLET_TOOL_BUTTON) {
 
 				event_button = libinput_event_tablet_get_button(tablet_event);
 				state = libinput_event_tablet_get_button_state(tablet_event);
@@ -714,7 +714,7 @@ START_TEST(proximity_has_axes)
 
 	litest_tablet_proximity_in(dev, 10, 10, axes);
 
-	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_PROXIMITY, -1);
+	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, -1);
 
 	event = libinput_get_event(li);
 
@@ -773,7 +773,7 @@ START_TEST(proximity_has_axes)
 	axes[2].value = 25;
 	litest_tablet_motion(dev, 20, 30, axes);
 	libinput_dispatch(li);
-	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_AXIS, -1);
+	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_AXIS, -1);
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_event(event);
 
@@ -800,7 +800,7 @@ START_TEST(proximity_has_axes)
 	/* Make sure that the axes are still present on proximity out */
 	litest_tablet_proximity_out(dev);
 
-	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_PROXIMITY, -1);
+	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, -1);
 	event = libinput_get_event(li);
 
 	tablet_event = libinput_event_get_tablet_event(event);
@@ -874,7 +874,7 @@ START_TEST(motion)
 	libinput_dispatch(li);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 
 	while ((event = libinput_get_event(li))) {
@@ -883,7 +883,7 @@ START_TEST(motion)
 
 		tablet_event = libinput_event_get_tablet_event(event);
 		ck_assert_int_eq(libinput_event_get_type(event),
-				 LIBINPUT_EVENT_TABLET_PROXIMITY);
+				 LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY);
 
 		x_changed = libinput_event_tablet_axis_has_changed(
 		    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
@@ -919,7 +919,7 @@ START_TEST(motion)
 			tablet_event = libinput_event_get_tablet_event(event);
 			type = libinput_event_get_type(event);
 
-			if (type == LIBINPUT_EVENT_TABLET_AXIS) {
+			if (type == LIBINPUT_EVENT_TABLET_TOOL_AXIS) {
 				x_changed = libinput_event_tablet_axis_has_changed(
 				    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 				y_changed = libinput_event_tablet_axis_has_changed(
@@ -967,7 +967,7 @@ START_TEST(motion_delta)
 	libinput_dispatch(li);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 
 	event = libinput_get_event(li);
@@ -984,7 +984,7 @@ START_TEST(motion_delta)
 	litest_tablet_motion(dev, 40, 100, axes);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_AXIS,
+				      LIBINPUT_EVENT_TABLET_TOOL_AXIS,
 				      -1);
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_event(event);
@@ -1031,7 +1031,7 @@ START_TEST(motion_delta_partial)
 	axes[0].value = 40;
 	litest_tablet_motion(dev, 40, 100, axes);
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_AXIS,
+				      LIBINPUT_EVENT_TABLET_TOOL_AXIS,
 				      -1);
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_event(event);
@@ -1087,7 +1087,7 @@ START_TEST(left_handed)
 	libinput_dispatch(li);
 	libinput_device_config_left_handed_set(dev->libinput_device, 1);
 
-	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_PROXIMITY, -1);
+	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, -1);
 
 	while ((event = libinput_get_event(li))) {
 		tablet_event = libinput_event_get_tablet_event(event);
@@ -1104,7 +1104,7 @@ START_TEST(left_handed)
 	}
 
 	litest_tablet_motion(dev, 100, 0, axes);
-	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_AXIS, -1);
+	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_AXIS, -1);
 
 	while ((event = libinput_get_event(li))) {
 		double x, y;
@@ -1133,7 +1133,7 @@ START_TEST(left_handed)
 	 * proximity */
 	litest_tablet_proximity_in(dev, 0, 100, axes);
 
-	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_PROXIMITY, -1);
+	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, -1);
 
 	while ((event = libinput_get_event(li))) {
 		tablet_event = libinput_event_get_tablet_event(event);
@@ -1150,7 +1150,7 @@ START_TEST(left_handed)
 	}
 
 	litest_tablet_motion(dev, 100, 0, axes);
-	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_AXIS, -1);
+	litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_AXIS, -1);
 
 	while ((event = libinput_get_event(li))) {
 		double x, y;
@@ -1206,7 +1206,7 @@ START_TEST(motion_event_state)
 	libinput_dispatch(li);
 
 	while ((event = libinput_get_event(li))) {
-		if (libinput_event_get_type(event) == LIBINPUT_EVENT_TABLET_AXIS)
+		if (libinput_event_get_type(event) == LIBINPUT_EVENT_TABLET_TOOL_AXIS)
 			break;
 		libinput_event_destroy(event);
 	}
@@ -1231,14 +1231,14 @@ START_TEST(motion_event_state)
 	libinput_event_destroy(event);
 	libinput_dispatch(li);
 	ck_assert_int_eq(libinput_next_event_type(li),
-			 LIBINPUT_EVENT_TABLET_AXIS);
+			 LIBINPUT_EVENT_TABLET_TOOL_AXIS);
 
 	/* we expect all events up to the button event to go from
 	   bottom/left to top/right */
 	while ((event = libinput_get_event(li))) {
 		double x, y;
 
-		if (libinput_event_get_type(event) != LIBINPUT_EVENT_TABLET_AXIS)
+		if (libinput_event_get_type(event) != LIBINPUT_EVENT_TABLET_TOOL_AXIS)
 			break;
 
 		tablet_event = libinput_event_get_tablet_event(event);
@@ -1258,7 +1258,7 @@ START_TEST(motion_event_state)
 	}
 
 	ck_assert_int_eq(libinput_event_get_type(event),
-			 LIBINPUT_EVENT_TABLET_BUTTON);
+			 LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	libinput_event_destroy(event);
 }
 END_TEST
@@ -1331,7 +1331,7 @@ START_TEST(normalization)
 	libinput_dispatch(li);
 
 	while ((event = libinput_get_event(li))) {
-		if (libinput_event_get_type(event) == LIBINPUT_EVENT_TABLET_AXIS) {
+		if (libinput_event_get_type(event) == LIBINPUT_EVENT_TABLET_TOOL_AXIS) {
 			tablet_event = libinput_event_get_tablet_event(event);
 
 			if (libinput_event_tablet_axis_has_changed(
@@ -1393,7 +1393,7 @@ START_TEST(normalization)
 	libinput_dispatch(li);
 
 	while ((event = libinput_get_event(li))) {
-		if (libinput_event_get_type(event) == LIBINPUT_EVENT_TABLET_AXIS) {
+		if (libinput_event_get_type(event) == LIBINPUT_EVENT_TABLET_TOOL_AXIS) {
 			tablet_event = libinput_event_get_tablet_event(event);
 
 			if (libinput_event_tablet_axis_has_changed(
@@ -1449,7 +1449,7 @@ START_TEST(tool_serial)
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_event(event);
@@ -1481,7 +1481,7 @@ START_TEST(serial_changes_tool)
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_event(event);
@@ -1516,7 +1516,7 @@ START_TEST(invalid_serials)
 	libinput_dispatch(li);
 	while ((event = libinput_get_event(li))) {
 		if (libinput_event_get_type(event) ==
-		    LIBINPUT_EVENT_TABLET_PROXIMITY) {
+		    LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY) {
 			tablet_event = libinput_event_get_tablet_event(event);
 			tool = libinput_event_tablet_get_tool(tablet_event);
 
@@ -1543,7 +1543,7 @@ START_TEST(tool_ref)
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_event(event);
@@ -1581,7 +1581,7 @@ START_TEST(pad_buttons_ignored)
 
 	while ((event = libinput_get_event(li))) {
 		ck_assert_int_ne(libinput_event_get_type(event),
-				 LIBINPUT_EVENT_TABLET_BUTTON);
+				 LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 		libinput_event_destroy(event);
 		libinput_dispatch(li);
 	}
@@ -1600,7 +1600,7 @@ START_TEST(pad_buttons_ignored)
 	libinput_dispatch(li);
 	while ((event = libinput_get_event(li))) {
 		ck_assert_int_ne(libinput_event_get_type(event),
-				 LIBINPUT_EVENT_TABLET_BUTTON);
+				 LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 		libinput_event_destroy(event);
 		libinput_dispatch(li);
 	}
@@ -1634,7 +1634,7 @@ START_TEST(tools_with_serials)
 		libinput_dispatch(li);
 		while ((event = libinput_get_event(li))) {
 			if (libinput_event_get_type(event) ==
-			    LIBINPUT_EVENT_TABLET_PROXIMITY) {
+			    LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY) {
 				struct libinput_event_tablet *t =
 					libinput_event_get_tablet_event(event);
 
@@ -1683,7 +1683,7 @@ START_TEST(tools_without_serials)
 		libinput_dispatch(li);
 		while ((event = libinput_get_event(li))) {
 			if (libinput_event_get_type(event) ==
-			    LIBINPUT_EVENT_TABLET_PROXIMITY) {
+			    LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY) {
 				struct libinput_event_tablet *t =
 					libinput_event_get_tablet_event(event);
 
@@ -1725,7 +1725,7 @@ START_TEST(tool_capabilities)
 	libinput_dispatch(li);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 
 	event = libinput_get_event(li);
@@ -1748,7 +1748,7 @@ START_TEST(tool_capabilities)
 	litest_event(intuos, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 
 	event = libinput_get_event(li);
@@ -1800,7 +1800,7 @@ START_TEST(tool_in_prox_before_start)
 	libinput_event_destroy(event);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	libinput_event_destroy(event);
@@ -1809,17 +1809,17 @@ START_TEST(tool_in_prox_before_start)
 	litest_tablet_motion(dev, 10, 20, axes);
 	litest_tablet_motion(dev, 30, 40, axes);
 
-	litest_assert_only_typed_events(li, LIBINPUT_EVENT_TABLET_AXIS);
+	litest_assert_only_typed_events(li, LIBINPUT_EVENT_TABLET_TOOL_AXIS);
 	litest_assert_empty_queue(li);
 	litest_event(dev, EV_KEY, BTN_STYLUS, 1);
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 	litest_event(dev, EV_KEY, BTN_STYLUS, 1);
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
-	litest_assert_only_typed_events(li, LIBINPUT_EVENT_TABLET_BUTTON);
+	litest_assert_only_typed_events(li, LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
 	litest_tablet_proximity_out(dev);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	libinput_unref(li);
 }
@@ -1845,7 +1845,7 @@ START_TEST(mouse_tool)
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tev = libinput_event_get_tablet_event(event);
@@ -1880,7 +1880,7 @@ START_TEST(mouse_buttons)
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tev = libinput_event_get_tablet_event(event);
@@ -1973,7 +1973,7 @@ START_TEST(mouse_rotation)
 		litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 		litest_wait_for_event_of_type(li,
-					      LIBINPUT_EVENT_TABLET_AXIS,
+					      LIBINPUT_EVENT_TABLET_TOOL_AXIS,
 					      -1);
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
@@ -2019,7 +2019,7 @@ START_TEST(mouse_wheel)
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tev = libinput_event_get_tablet_event(event);
@@ -2036,7 +2036,7 @@ START_TEST(mouse_wheel)
 		litest_event(dev, EV_REL, REL_WHEEL, -1);
 		litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
-		litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_AXIS, -1);
+		litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_AXIS, -1);
 
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
@@ -2067,7 +2067,7 @@ START_TEST(mouse_wheel)
 		litest_event(dev, EV_ABS, ABS_Y, (abs->maximum - abs->minimum)/i);
 		litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
-		litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_AXIS, -1);
+		litest_wait_for_event_of_type(li, LIBINPUT_EVENT_TABLET_TOOL_AXIS, -1);
 
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
@@ -2114,7 +2114,7 @@ START_TEST(airbrush_tool)
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tev = libinput_event_get_tablet_event(event);
@@ -2164,7 +2164,7 @@ START_TEST(airbrush_wheel)
 		litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 		litest_wait_for_event_of_type(li,
-					      LIBINPUT_EVENT_TABLET_AXIS,
+					      LIBINPUT_EVENT_TABLET_TOOL_AXIS,
 					      -1);
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
@@ -2201,7 +2201,7 @@ START_TEST(artpen_tool)
 	litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tev = libinput_event_get_tablet_event(event);
@@ -2255,7 +2255,7 @@ START_TEST(artpen_rotation)
 		litest_event(dev, EV_SYN, SYN_REPORT, 0);
 
 		litest_wait_for_event_of_type(li,
-					      LIBINPUT_EVENT_TABLET_AXIS,
+					      LIBINPUT_EVENT_TABLET_TOOL_AXIS,
 					      -1);
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
@@ -2295,7 +2295,7 @@ START_TEST(tablet_time_usec)
 	libinput_dispatch(li);
 
 	litest_wait_for_event_of_type(li,
-				      LIBINPUT_EVENT_TABLET_PROXIMITY,
+				      LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY,
 				      -1);
 	event = libinput_get_event(li);
 	tev = libinput_event_get_tablet_event(event);
diff --git a/tools/event-debug.c b/tools/event-debug.c
index c35acef..a16bd01 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -109,16 +109,16 @@ print_event_header(struct libinput_event *ev)
 	case LIBINPUT_EVENT_GESTURE_PINCH_END:
 		type = "GESTURE_PINCH_END";
 		break;
-	case LIBINPUT_EVENT_TABLET_AXIS:
+	case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
 		type = "TABLET_AXIS";
 		break;
-	case LIBINPUT_EVENT_TABLET_PROXIMITY:
+	case LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY:
 		type = "TABLET_PROXIMITY";
 		break;
-	case LIBINPUT_EVENT_TABLET_TIP:
+	case LIBINPUT_EVENT_TABLET_TOOL_TIP:
 		type = "TABLET_TIP";
 		break;
-	case LIBINPUT_EVENT_TABLET_BUTTON:
+	case LIBINPUT_EVENT_TABLET_TOOL_BUTTON:
 		type = "TABLET_BUTTON";
 		break;
 	}
@@ -676,16 +676,16 @@ handle_and_print_events(struct libinput *li)
 		case LIBINPUT_EVENT_GESTURE_PINCH_END:
 			print_gesture_event_without_coords(ev);
 			break;
-		case LIBINPUT_EVENT_TABLET_AXIS:
+		case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
 			print_tablet_axis_event(ev);
 			break;
-		case LIBINPUT_EVENT_TABLET_PROXIMITY:
+		case LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY:
 			print_proximity_event(ev);
 			break;
-		case LIBINPUT_EVENT_TABLET_TIP:
+		case LIBINPUT_EVENT_TABLET_TOOL_TIP:
 			print_tablet_tip_event(ev);
 			break;
-		case LIBINPUT_EVENT_TABLET_BUTTON:
+		case LIBINPUT_EVENT_TABLET_TOOL_BUTTON:
 			print_tablet_button_event(ev);
 			break;
 		}
diff --git a/tools/event-gui.c b/tools/event-gui.c
index 4199373..4818a40 100644
--- a/tools/event-gui.c
+++ b/tools/event-gui.c
@@ -603,7 +603,7 @@ handle_event_tablet(struct libinput_event *ev, struct window *w)
 	double x, y;
 
 	switch (libinput_event_get_type(ev)) {
-	case LIBINPUT_EVENT_TABLET_PROXIMITY:
+	case LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY:
 		if (libinput_event_tablet_get_proximity_state(t) ==
 		    LIBINPUT_TABLET_TOOL_PROXIMITY_OUT) {
 			w->tool.x_in = 0;
@@ -619,7 +619,7 @@ handle_event_tablet(struct libinput_event *ev, struct window *w)
 								       w->height);
 		}
 		break;
-	case LIBINPUT_EVENT_TABLET_AXIS:
+	case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
 		w->tool.x = libinput_event_tablet_get_x_transformed(t,
 								    w->width);
 		w->tool.y = libinput_event_tablet_get_y_transformed(t,
@@ -633,7 +633,7 @@ handle_event_tablet(struct libinput_event *ev, struct window *w)
 		w->tool.tilt_y = libinput_event_tablet_get_axis_value(t,
 							LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 		break;
-	case LIBINPUT_EVENT_TABLET_TIP:
+	case LIBINPUT_EVENT_TABLET_TOOL_TIP:
 		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) ==
@@ -645,7 +645,7 @@ handle_event_tablet(struct libinput_event *ev, struct window *w)
 			w->tool.y_up = y;
 		}
 		break;
-	case LIBINPUT_EVENT_TABLET_BUTTON:
+	case LIBINPUT_EVENT_TABLET_TOOL_BUTTON:
 		break;
 	default:
 		abort();
@@ -707,10 +707,10 @@ handle_event_libinput(GIOChannel *source, GIOCondition condition, gpointer data)
 		case LIBINPUT_EVENT_GESTURE_PINCH_END:
 			handle_event_pinch(ev, w);
 			break;
-		case LIBINPUT_EVENT_TABLET_AXIS:
-		case LIBINPUT_EVENT_TABLET_PROXIMITY:
-		case LIBINPUT_EVENT_TABLET_TIP:
-		case LIBINPUT_EVENT_TABLET_BUTTON:
+		case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
+		case LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY:
+		case LIBINPUT_EVENT_TABLET_TOOL_TIP:
+		case LIBINPUT_EVENT_TABLET_TOOL_BUTTON:
 			handle_event_tablet(ev, w);
 			break;
 		}
-- 
2.5.0



More information about the wayland-devel mailing list