[PATCH libinput 03/14] tablet: rename the tablet axes to "LIBINPUT_TABLET_TOOL_AXIS_..."

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


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-tablet.c     | 126 +++++++++++++--------------
 src/evdev-tablet.h     |  48 +++++------
 src/libinput-private.h |   4 +-
 src/libinput.c         |  66 +++++++-------
 src/libinput.h         |  36 ++++----
 test/tablet.c          | 228 ++++++++++++++++++++++++-------------------------
 tools/event-debug.c    |  82 +++++++++---------
 tools/event-gui.c      |   8 +-
 8 files changed, 299 insertions(+), 299 deletions(-)

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index d1ffe09..4f9465e 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -75,7 +75,7 @@ tablet_device_has_axis(struct tablet_dispatch *tablet,
 	bool has_axis = false;
 	unsigned int code;
 
-	if (axis == LIBINPUT_TABLET_AXIS_ROTATION_Z) {
+	if (axis == LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z) {
 		has_axis = (libevdev_has_event_code(evdev,
 						    EV_KEY,
 						    BTN_TOOL_MOUSE) &&
@@ -89,7 +89,7 @@ tablet_device_has_axis(struct tablet_dispatch *tablet,
 		has_axis |= libevdev_has_event_code(evdev,
 						    EV_ABS,
 						    code);
-	} else if (axis == LIBINPUT_TABLET_AXIS_REL_WHEEL) {
+	} else if (axis == LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL) {
 		has_axis = libevdev_has_event_code(evdev,
 						   EV_REL,
 						   REL_WHEEL);
@@ -121,7 +121,7 @@ tablet_process_absolute(struct tablet_dispatch *tablet,
 	case ABS_DISTANCE:
 	case ABS_WHEEL:
 		axis = evcode_to_axis(e->code);
-		if (axis == LIBINPUT_TABLET_AXIS_NONE) {
+		if (axis == LIBINPUT_TABLET_TOOL_AXIS_NONE) {
 			log_bug_libinput(device->base.seat->libinput,
 					 "Invalid ABS event code %#x\n",
 					 e->code);
@@ -160,7 +160,7 @@ tablet_mark_all_axes_changed(struct tablet_dispatch *tablet,
 {
 	enum libinput_tablet_tool_axis a;
 
-	for (a = LIBINPUT_TABLET_AXIS_X; a <= LIBINPUT_TABLET_AXIS_MAX; a++) {
+	for (a = LIBINPUT_TABLET_TOOL_AXIS_X; a <= LIBINPUT_TABLET_TOOL_AXIS_MAX; a++) {
 		if (tablet_device_has_axis(tablet, a))
 			set_bit(tablet->changed_axes, a);
 	}
@@ -237,10 +237,10 @@ convert_tilt_to_rotation(struct tablet_dispatch *tablet)
 	   values. The device has a 175 degree CCW hardware offset but since we use
 	   atan2 the effective offset is just 5 degrees.
 	   */
-	x = tablet->axes[LIBINPUT_TABLET_AXIS_TILT_X];
-	y = tablet->axes[LIBINPUT_TABLET_AXIS_TILT_Y];
-	clear_bit(tablet->changed_axes, LIBINPUT_TABLET_AXIS_TILT_X);
-	clear_bit(tablet->changed_axes, LIBINPUT_TABLET_AXIS_TILT_Y);
+	x = tablet->axes[LIBINPUT_TABLET_TOOL_AXIS_TILT_X];
+	y = tablet->axes[LIBINPUT_TABLET_TOOL_AXIS_TILT_Y];
+	clear_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
+	clear_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 
 	/* atan2 is CCW, we want CW -> negate x */
 	if (x || y)
@@ -248,8 +248,8 @@ convert_tilt_to_rotation(struct tablet_dispatch *tablet)
 
 	angle = fmod(360 + angle - offset, 360);
 
-	tablet->axes[LIBINPUT_TABLET_AXIS_ROTATION_Z] = angle;
-	set_bit(tablet->changed_axes, LIBINPUT_TABLET_AXIS_ROTATION_Z);
+	tablet->axes[LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z] = angle;
+	set_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 }
 
 static double
@@ -295,16 +295,16 @@ get_delta(enum libinput_tablet_tool_axis axis, double current, double old)
 	double delta = 0;
 
 	switch (axis) {
-	case LIBINPUT_TABLET_AXIS_X:
-	case LIBINPUT_TABLET_AXIS_Y:
-	case LIBINPUT_TABLET_AXIS_DISTANCE:
-	case LIBINPUT_TABLET_AXIS_PRESSURE:
-	case LIBINPUT_TABLET_AXIS_SLIDER:
-	case LIBINPUT_TABLET_AXIS_TILT_X:
-	case LIBINPUT_TABLET_AXIS_TILT_Y:
+	case LIBINPUT_TABLET_TOOL_AXIS_X:
+	case LIBINPUT_TABLET_TOOL_AXIS_Y:
+	case LIBINPUT_TABLET_TOOL_AXIS_DISTANCE:
+	case LIBINPUT_TABLET_TOOL_AXIS_PRESSURE:
+	case LIBINPUT_TABLET_TOOL_AXIS_SLIDER:
+	case LIBINPUT_TABLET_TOOL_AXIS_TILT_X:
+	case LIBINPUT_TABLET_TOOL_AXIS_TILT_Y:
 		delta = current - old;
 		break;
-	case LIBINPUT_TABLET_AXIS_ROTATION_Z:
+	case LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z:
 		delta = guess_wheel_delta(current, old);
 		break;
 	default:
@@ -322,12 +322,12 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
 	struct libinput_device *base = &device->base;
 	bool axis_update_needed = false;
 	int a;
-	double axes[LIBINPUT_TABLET_AXIS_MAX + 1] = {0};
-	double deltas[LIBINPUT_TABLET_AXIS_MAX + 1] = {0};
-	double deltas_discrete[LIBINPUT_TABLET_AXIS_MAX + 1] = {0};
+	double axes[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1] = {0};
+	double deltas[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1] = {0};
+	double deltas_discrete[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1] = {0};
 	double oldval;
 
-	for (a = LIBINPUT_TABLET_AXIS_X; a <= LIBINPUT_TABLET_AXIS_MAX; a++) {
+	for (a = LIBINPUT_TABLET_TOOL_AXIS_X; a <= LIBINPUT_TABLET_TOOL_AXIS_MAX; a++) {
 		const struct input_absinfo *absinfo;
 
 		if (!bit_is_set(tablet->changed_axes, a)) {
@@ -340,16 +340,16 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
 
 		/* ROTATION_Z is higher than TILT_X/Y so we know that the
 		   tilt axes are already normalized and set */
-		if (a == LIBINPUT_TABLET_AXIS_ROTATION_Z &&
+		if (a == LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z &&
 		   (tablet->current_tool_type == LIBINPUT_TOOL_TYPE_MOUSE ||
 		    tablet->current_tool_type == LIBINPUT_TOOL_TYPE_LENS)) {
 			convert_tilt_to_rotation(tablet);
-			axes[LIBINPUT_TABLET_AXIS_TILT_X] = 0;
-			axes[LIBINPUT_TABLET_AXIS_TILT_Y] = 0;
+			axes[LIBINPUT_TABLET_TOOL_AXIS_TILT_X] = 0;
+			axes[LIBINPUT_TABLET_TOOL_AXIS_TILT_Y] = 0;
 			axes[a] = tablet->axes[a];
 			deltas[a] = get_delta(a, tablet->axes[a], oldval);
 			continue;
-		} else if (a == LIBINPUT_TABLET_AXIS_REL_WHEEL) {
+		} else if (a == LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL) {
 			deltas_discrete[a] = tablet->deltas[a];
 			deltas[a] = normalize_wheel(tablet,
 						    tablet->deltas[a]);
@@ -361,23 +361,23 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
 						axis_to_evcode(a));
 
 		switch (a) {
-		case LIBINPUT_TABLET_AXIS_X:
-		case LIBINPUT_TABLET_AXIS_Y:
+		case LIBINPUT_TABLET_TOOL_AXIS_X:
+		case LIBINPUT_TABLET_TOOL_AXIS_Y:
 			if (device->left_handed.enabled)
 				tablet->axes[a] = invert_axis(absinfo);
 			else
 				tablet->axes[a] = absinfo->value;
 			break;
-		case LIBINPUT_TABLET_AXIS_DISTANCE:
-		case LIBINPUT_TABLET_AXIS_PRESSURE:
-		case LIBINPUT_TABLET_AXIS_SLIDER:
+		case LIBINPUT_TABLET_TOOL_AXIS_DISTANCE:
+		case LIBINPUT_TABLET_TOOL_AXIS_PRESSURE:
+		case LIBINPUT_TABLET_TOOL_AXIS_SLIDER:
 			tablet->axes[a] = normalize_pressure_dist_slider(absinfo);
 			break;
-		case LIBINPUT_TABLET_AXIS_TILT_X:
-		case LIBINPUT_TABLET_AXIS_TILT_Y:
+		case LIBINPUT_TABLET_TOOL_AXIS_TILT_X:
+		case LIBINPUT_TABLET_TOOL_AXIS_TILT_Y:
 			tablet->axes[a] = normalize_tilt(absinfo);
 			break;
-		case LIBINPUT_TABLET_AXIS_ROTATION_Z:
+		case LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z:
 			/* artpen has 0 with buttons pointing east */
 			tablet->axes[a] = convert_to_degrees(absinfo, 90);
 			break;
@@ -534,7 +534,7 @@ tablet_process_relative(struct tablet_dispatch *tablet,
 	switch (e->code) {
 	case REL_WHEEL:
 		axis = rel_evcode_to_axis(e->code);
-		if (axis == LIBINPUT_TABLET_AXIS_NONE) {
+		if (axis == LIBINPUT_TABLET_TOOL_AXIS_NONE) {
 			log_bug_libinput(device->base.seat->libinput,
 					 "Invalid ABS event code %#x\n",
 					 e->code);
@@ -631,7 +631,7 @@ tool_set_bits_from_libwacom(const struct tablet_dispatch *tablet,
 	}
 
 	if (libwacom_stylus_has_wheel(s))
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_REL_WHEEL);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 
 	axes = libwacom_stylus_get_axes(s);
 
@@ -639,24 +639,24 @@ tool_set_bits_from_libwacom(const struct tablet_dispatch *tablet,
 		/* tilt on the puck is converted to rotation */
 		if (type == WSTYLUS_PUCK) {
 			set_bit(tool->axis_caps,
-				LIBINPUT_TABLET_AXIS_ROTATION_Z);
+				LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 		} else {
 			copy_axis_cap(tablet,
 				      tool,
-				      LIBINPUT_TABLET_AXIS_TILT_X);
+				      LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 			copy_axis_cap(tablet,
 				      tool,
-				      LIBINPUT_TABLET_AXIS_TILT_Y);
+				      LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 		}
 	}
 	if (axes & WACOM_AXIS_TYPE_ROTATION_Z)
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_ROTATION_Z);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 	if (axes & WACOM_AXIS_TYPE_DISTANCE)
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_DISTANCE);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 	if (axes & WACOM_AXIS_TYPE_SLIDER)
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_SLIDER);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER);
 	if (axes & WACOM_AXIS_TYPE_PRESSURE)
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_PRESSURE);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE);
 
 	rc = 0;
 out:
@@ -686,17 +686,17 @@ tool_set_bits(const struct tablet_dispatch *tablet,
 	case LIBINPUT_TOOL_TYPE_PENCIL:
 	case LIBINPUT_TOOL_TYPE_BRUSH:
 	case LIBINPUT_TOOL_TYPE_AIRBRUSH:
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_PRESSURE);
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_DISTANCE);
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_TILT_X);
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_TILT_Y);
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_SLIDER);
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_ROTATION_Z);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 		break;
 	case LIBINPUT_TOOL_TYPE_MOUSE:
 	case LIBINPUT_TOOL_TYPE_LENS:
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_ROTATION_Z);
-		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_AXIS_REL_WHEEL);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
+		copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		break;
 	default:
 		break;
@@ -846,29 +846,29 @@ sanitize_tablet_axes(struct tablet_dispatch *tablet)
 	pressure = libevdev_get_abs_info(tablet->device->evdev, ABS_PRESSURE);
 
 	/* Keep distance and pressure mutually exclusive */
-	if (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_AXIS_DISTANCE) &&
+	if (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE) &&
 	    distance->value > distance->minimum &&
 	    pressure->value > pressure->minimum) {
-		clear_bit(tablet->changed_axes, LIBINPUT_TABLET_AXIS_DISTANCE);
-		tablet->axes[LIBINPUT_TABLET_AXIS_DISTANCE] = 0;
-	} else if (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_AXIS_PRESSURE) &&
+		clear_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
+		tablet->axes[LIBINPUT_TABLET_TOOL_AXIS_DISTANCE] = 0;
+	} else if (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE) &&
 		   (!tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT) &&
 		    !tablet_has_status(tablet, TABLET_TOOL_ENTERING_CONTACT))) {
 		/* Make sure that the last axis value sent to the caller is a 0 */
-		if (tablet->axes[LIBINPUT_TABLET_AXIS_PRESSURE] == 0)
+		if (tablet->axes[LIBINPUT_TABLET_TOOL_AXIS_PRESSURE] == 0)
 			clear_bit(tablet->changed_axes,
-				  LIBINPUT_TABLET_AXIS_PRESSURE);
+				  LIBINPUT_TABLET_TOOL_AXIS_PRESSURE);
 		else
-			tablet->axes[LIBINPUT_TABLET_AXIS_PRESSURE] = 0;
+			tablet->axes[LIBINPUT_TABLET_TOOL_AXIS_PRESSURE] = 0;
 	}
 
 	/* If we have a mouse/lens cursor and the tilt changed, the rotation
 	   changed. Mark this, calculate the angle later */
 	if ((tablet->current_tool_type == LIBINPUT_TOOL_TYPE_MOUSE ||
 	    tablet->current_tool_type == LIBINPUT_TOOL_TYPE_LENS) &&
-	    (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_AXIS_TILT_X) ||
-	     bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_AXIS_TILT_Y)))
-		set_bit(tablet->changed_axes, LIBINPUT_TABLET_AXIS_ROTATION_Z);
+	    (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) ||
+	     bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)))
+		set_bit(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 }
 
 static void
@@ -1079,8 +1079,8 @@ tablet_init(struct tablet_dispatch *tablet,
 	tablet->current_tool_type = LIBINPUT_TOOL_NONE;
 	list_init(&tablet->tool_list);
 
-	for (axis = LIBINPUT_TABLET_AXIS_X;
-	     axis <= LIBINPUT_TABLET_AXIS_MAX;
+	for (axis = LIBINPUT_TABLET_TOOL_AXIS_X;
+	     axis <= LIBINPUT_TABLET_TOOL_AXIS_MAX;
 	     axis++) {
 		if (tablet_device_has_axis(tablet, axis))
 			set_bit(tablet->axis_caps, axis);
diff --git a/src/evdev-tablet.h b/src/evdev-tablet.h
index 36a3cec..e88d87c 100644
--- a/src/evdev-tablet.h
+++ b/src/evdev-tablet.h
@@ -26,7 +26,7 @@
 
 #include "evdev.h"
 
-#define LIBINPUT_TABLET_AXIS_NONE 0
+#define LIBINPUT_TABLET_TOOL_AXIS_NONE 0
 #define LIBINPUT_TOOL_NONE 0
 #define LIBINPUT_TOOL_TYPE_MAX LIBINPUT_TOOL_TYPE_LENS
 
@@ -51,10 +51,10 @@ struct tablet_dispatch {
 	struct evdev_dispatch base;
 	struct evdev_device *device;
 	unsigned int status;
-	unsigned char changed_axes[NCHARS(LIBINPUT_TABLET_AXIS_MAX + 1)];
-	double axes[LIBINPUT_TABLET_AXIS_MAX + 1];
-	double deltas[LIBINPUT_TABLET_AXIS_MAX + 1];
-	unsigned char axis_caps[NCHARS(LIBINPUT_TABLET_AXIS_MAX + 1)];
+	unsigned char changed_axes[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
+	double axes[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1];
+	double deltas[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1];
+	unsigned char axis_caps[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
 
 	/* Only used for tablets that don't report serial numbers */
 	struct list tool_list;
@@ -74,31 +74,31 @@ evcode_to_axis(const uint32_t evcode)
 
 	switch (evcode) {
 	case ABS_X:
-		axis = LIBINPUT_TABLET_AXIS_X;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_X;
 		break;
 	case ABS_Y:
-		axis = LIBINPUT_TABLET_AXIS_Y;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_Y;
 		break;
 	case ABS_Z:
-		axis = LIBINPUT_TABLET_AXIS_ROTATION_Z;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z;
 		break;
 	case ABS_DISTANCE:
-		axis = LIBINPUT_TABLET_AXIS_DISTANCE;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_DISTANCE;
 		break;
 	case ABS_PRESSURE:
-		axis = LIBINPUT_TABLET_AXIS_PRESSURE;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_PRESSURE;
 		break;
 	case ABS_TILT_X:
-		axis = LIBINPUT_TABLET_AXIS_TILT_X;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_TILT_X;
 		break;
 	case ABS_TILT_Y:
-		axis = LIBINPUT_TABLET_AXIS_TILT_Y;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_TILT_Y;
 		break;
 	case ABS_WHEEL:
-		axis = LIBINPUT_TABLET_AXIS_SLIDER;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_SLIDER;
 		break;
 	default:
-		axis = LIBINPUT_TABLET_AXIS_NONE;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_NONE;
 		break;
 	}
 
@@ -112,10 +112,10 @@ rel_evcode_to_axis(const uint32_t evcode)
 
 	switch (evcode) {
 	case REL_WHEEL:
-		axis = LIBINPUT_TABLET_AXIS_REL_WHEEL;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL;
 		break;
 	default:
-		axis = LIBINPUT_TABLET_AXIS_NONE;
+		axis = LIBINPUT_TABLET_TOOL_AXIS_NONE;
 		break;
 	}
 
@@ -128,28 +128,28 @@ axis_to_evcode(const enum libinput_tablet_tool_axis axis)
 	uint32_t evcode;
 
 	switch (axis) {
-	case LIBINPUT_TABLET_AXIS_X:
+	case LIBINPUT_TABLET_TOOL_AXIS_X:
 		evcode = ABS_X;
 		break;
-	case LIBINPUT_TABLET_AXIS_Y:
+	case LIBINPUT_TABLET_TOOL_AXIS_Y:
 		evcode = ABS_Y;
 		break;
-	case LIBINPUT_TABLET_AXIS_DISTANCE:
+	case LIBINPUT_TABLET_TOOL_AXIS_DISTANCE:
 		evcode = ABS_DISTANCE;
 		break;
-	case LIBINPUT_TABLET_AXIS_PRESSURE:
+	case LIBINPUT_TABLET_TOOL_AXIS_PRESSURE:
 		evcode = ABS_PRESSURE;
 		break;
-	case LIBINPUT_TABLET_AXIS_TILT_X:
+	case LIBINPUT_TABLET_TOOL_AXIS_TILT_X:
 		evcode = ABS_TILT_X;
 		break;
-	case LIBINPUT_TABLET_AXIS_TILT_Y:
+	case LIBINPUT_TABLET_TOOL_AXIS_TILT_Y:
 		evcode = ABS_TILT_Y;
 		break;
-	case LIBINPUT_TABLET_AXIS_ROTATION_Z:
+	case LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z:
 		evcode = ABS_Z;
 		break;
-	case LIBINPUT_TABLET_AXIS_SLIDER:
+	case LIBINPUT_TABLET_TOOL_AXIS_SLIDER:
 		evcode = ABS_WHEEL;
 		break;
 	default:
diff --git a/src/libinput-private.h b/src/libinput-private.h
index b28e0e1..96a38d2 100644
--- a/src/libinput-private.h
+++ b/src/libinput-private.h
@@ -33,7 +33,7 @@
 #include "libinput.h"
 #include "libinput-util.h"
 
-#define LIBINPUT_TABLET_AXIS_MAX LIBINPUT_TABLET_AXIS_REL_WHEEL
+#define LIBINPUT_TABLET_TOOL_AXIS_MAX LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL
 
 struct libinput_source;
 
@@ -255,7 +255,7 @@ struct libinput_tablet_tool {
 	uint32_t serial;
 	uint32_t tool_id;
 	enum libinput_tool_type type;
-	unsigned char axis_caps[NCHARS(LIBINPUT_TABLET_AXIS_MAX + 1)];
+	unsigned char axis_caps[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
 	unsigned char buttons[NCHARS(KEY_MAX) + 1];
 	int refcount;
 	void *user_data;
diff --git a/src/libinput.c b/src/libinput.c
index 4d012d3..9d35927 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -131,10 +131,10 @@ struct libinput_event_tablet {
 	enum libinput_button_state state;
 	uint32_t seat_button_count;
 	uint64_t time;
-	double axes[LIBINPUT_TABLET_AXIS_MAX + 1];
-	double deltas[LIBINPUT_TABLET_AXIS_MAX + 1];
-	double deltas_discrete[LIBINPUT_TABLET_AXIS_MAX + 1];
-	unsigned char changed_axes[NCHARS(LIBINPUT_TABLET_AXIS_MAX + 1)];
+	double axes[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1];
+	double deltas[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1];
+	double deltas_discrete[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1];
+	unsigned char changed_axes[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
 	struct libinput_tablet_tool *tool;
 	enum libinput_tool_proximity_state proximity_state;
 	enum libinput_tool_tip_state tip_state;
@@ -942,19 +942,19 @@ libinput_event_tablet_get_axis_value(struct libinput_event_tablet *event,
 			   LIBINPUT_EVENT_TABLET_PROXIMITY);
 
 	switch(axis) {
-		case LIBINPUT_TABLET_AXIS_X:
+		case LIBINPUT_TABLET_TOOL_AXIS_X:
 			return evdev_convert_to_mm(device->abs.absinfo_x,
 						   event->axes[axis]);
-		case LIBINPUT_TABLET_AXIS_Y:
+		case LIBINPUT_TABLET_TOOL_AXIS_Y:
 			return evdev_convert_to_mm(device->abs.absinfo_y,
 						   event->axes[axis]);
-		case LIBINPUT_TABLET_AXIS_DISTANCE:
-		case LIBINPUT_TABLET_AXIS_PRESSURE:
-		case LIBINPUT_TABLET_AXIS_TILT_X:
-		case LIBINPUT_TABLET_AXIS_TILT_Y:
-		case LIBINPUT_TABLET_AXIS_ROTATION_Z:
-		case LIBINPUT_TABLET_AXIS_SLIDER:
-		case LIBINPUT_TABLET_AXIS_REL_WHEEL:
+		case LIBINPUT_TABLET_TOOL_AXIS_DISTANCE:
+		case LIBINPUT_TABLET_TOOL_AXIS_PRESSURE:
+		case LIBINPUT_TABLET_TOOL_AXIS_TILT_X:
+		case LIBINPUT_TABLET_TOOL_AXIS_TILT_Y:
+		case LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z:
+		case LIBINPUT_TABLET_TOOL_AXIS_SLIDER:
+		case LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL:
 			return event->axes[axis];
 		default:
 			return 0;
@@ -976,19 +976,19 @@ libinput_event_tablet_get_axis_delta(struct libinput_event_tablet *event,
 			   LIBINPUT_EVENT_TABLET_PROXIMITY);
 
 	switch(axis) {
-		case LIBINPUT_TABLET_AXIS_X:
+		case LIBINPUT_TABLET_TOOL_AXIS_X:
 			return evdev_convert_to_mm(device->abs.absinfo_x,
 						   event->deltas[axis]);
-		case LIBINPUT_TABLET_AXIS_Y:
+		case LIBINPUT_TABLET_TOOL_AXIS_Y:
 			return evdev_convert_to_mm(device->abs.absinfo_y,
 						   event->deltas[axis]);
-		case LIBINPUT_TABLET_AXIS_DISTANCE:
-		case LIBINPUT_TABLET_AXIS_PRESSURE:
-		case LIBINPUT_TABLET_AXIS_TILT_X:
-		case LIBINPUT_TABLET_AXIS_TILT_Y:
-		case LIBINPUT_TABLET_AXIS_ROTATION_Z:
-		case LIBINPUT_TABLET_AXIS_SLIDER:
-		case LIBINPUT_TABLET_AXIS_REL_WHEEL:
+		case LIBINPUT_TABLET_TOOL_AXIS_DISTANCE:
+		case LIBINPUT_TABLET_TOOL_AXIS_PRESSURE:
+		case LIBINPUT_TABLET_TOOL_AXIS_TILT_X:
+		case LIBINPUT_TABLET_TOOL_AXIS_TILT_Y:
+		case LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z:
+		case LIBINPUT_TABLET_TOOL_AXIS_SLIDER:
+		case LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL:
 			return event->deltas[axis];
 		default:
 			return 0;
@@ -1008,15 +1008,15 @@ libinput_event_tablet_get_axis_delta_discrete(
 			   LIBINPUT_EVENT_TABLET_PROXIMITY);
 
 	switch(axis) {
-		case LIBINPUT_TABLET_AXIS_X:
-		case LIBINPUT_TABLET_AXIS_Y:
-		case LIBINPUT_TABLET_AXIS_DISTANCE:
-		case LIBINPUT_TABLET_AXIS_PRESSURE:
-		case LIBINPUT_TABLET_AXIS_TILT_X:
-		case LIBINPUT_TABLET_AXIS_TILT_Y:
-		case LIBINPUT_TABLET_AXIS_ROTATION_Z:
-		case LIBINPUT_TABLET_AXIS_SLIDER:
-		case LIBINPUT_TABLET_AXIS_REL_WHEEL:
+		case LIBINPUT_TABLET_TOOL_AXIS_X:
+		case LIBINPUT_TABLET_TOOL_AXIS_Y:
+		case LIBINPUT_TABLET_TOOL_AXIS_DISTANCE:
+		case LIBINPUT_TABLET_TOOL_AXIS_PRESSURE:
+		case LIBINPUT_TABLET_TOOL_AXIS_TILT_X:
+		case LIBINPUT_TABLET_TOOL_AXIS_TILT_Y:
+		case LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z:
+		case LIBINPUT_TABLET_TOOL_AXIS_SLIDER:
+		case LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL:
 			return event->deltas_discrete[axis];
 		default:
 			return 0;
@@ -1038,7 +1038,7 @@ libinput_event_tablet_get_x_transformed(struct libinput_event_tablet *event,
 			   LIBINPUT_EVENT_TABLET_PROXIMITY);
 
 	return evdev_device_transform_x(device,
-					event->axes[LIBINPUT_TABLET_AXIS_X],
+					event->axes[LIBINPUT_TABLET_TOOL_AXIS_X],
 					width);
 }
 
@@ -1057,7 +1057,7 @@ libinput_event_tablet_get_y_transformed(struct libinput_event_tablet *event,
 			   LIBINPUT_EVENT_TABLET_PROXIMITY);
 
 	return evdev_device_transform_y(device,
-					event->axes[LIBINPUT_TABLET_AXIS_Y],
+					event->axes[LIBINPUT_TABLET_TOOL_AXIS_Y],
 					height);
 }
 
diff --git a/src/libinput.h b/src/libinput.h
index 712a0bb..853367c 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -141,15 +141,15 @@ enum libinput_pointer_axis_source {
  * LIBINPUT_DEVICE_CAP_TABLET capability.
  */
 enum libinput_tablet_tool_axis {
-	LIBINPUT_TABLET_AXIS_X = 1,
-	LIBINPUT_TABLET_AXIS_Y = 2,
-	LIBINPUT_TABLET_AXIS_DISTANCE = 3,
-	LIBINPUT_TABLET_AXIS_PRESSURE = 4,
-	LIBINPUT_TABLET_AXIS_TILT_X = 5,
-	LIBINPUT_TABLET_AXIS_TILT_Y = 6,
-	LIBINPUT_TABLET_AXIS_ROTATION_Z = 7,
-	LIBINPUT_TABLET_AXIS_SLIDER = 8,
-	LIBINPUT_TABLET_AXIS_REL_WHEEL = 9,
+	LIBINPUT_TABLET_TOOL_AXIS_X = 1,
+	LIBINPUT_TABLET_TOOL_AXIS_Y = 2,
+	LIBINPUT_TABLET_TOOL_AXIS_DISTANCE = 3,
+	LIBINPUT_TABLET_TOOL_AXIS_PRESSURE = 4,
+	LIBINPUT_TABLET_TOOL_AXIS_TILT_X = 5,
+	LIBINPUT_TABLET_TOOL_AXIS_TILT_Y = 6,
+	LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z = 7,
+	LIBINPUT_TABLET_TOOL_AXIS_SLIDER = 8,
+	LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL = 9,
 };
 
 /**
@@ -1378,27 +1378,27 @@ libinput_event_tablet_axis_has_changed(struct libinput_event_tablet *event,
  *
  * Return the axis value of a given axis for a tablet. The interpretation of the
  * value is dependent on the axis:
- * - @ref LIBINPUT_TABLET_AXIS_X and @ref LIBINPUT_TABLET_AXIS_Y - the X and
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_X and @ref LIBINPUT_TABLET_TOOL_AXIS_Y - the X and
  *   Y coordinates of the tablet tool, in mm from the top left corner of the
  *   tablet. Use libinput_event_tablet_get_x_transformed() and
  *   libinput_event_tablet_get_y_transformed() for transforming each
  *   respective axis value into a different coordinate space.
- * - @ref LIBINPUT_TABLET_AXIS_DISTANCE - The distance from the tablet's
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_DISTANCE - The distance from the tablet's
  *   sensor, normalized from 0 to 1
- * - @ref LIBINPUT_TABLET_AXIS_PRESSURE - The current pressure being applied on
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_PRESSURE - The current pressure being applied on
  *   the tool in use, normalized from 0 to 1
- * - @ref LIBINPUT_TABLET_AXIS_TILT_X and @ref LIBINPUT_TABLET_AXIS_TILT_Y -
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_TILT_X and @ref LIBINPUT_TABLET_TOOL_AXIS_TILT_Y -
  *   normalized value between -1 and 1 that indicates the X or Y tilt of the
  *   tool
- * - @ref LIBINPUT_TABLET_AXIS_ROTATION_Z - The z rotation of the tool in
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z - The z rotation of the tool in
  *   degrees, clockwise from the tool's logical neutral position. For the
  *   @ref LIBINPUT_TOOL_TYPE_MOUSE and @ref LIBINPUT_TOOL_TYPE_LENS tools
  *   the logical neutral position is pointing to the current logical north
  *   of the tablet. For the @ref LIBINPUT_TOOL_TYPE_BRUSH tool, the logical
  *   neutral position is with the buttons pointing up.
- * - @ref LIBINPUT_TABLET_AXIS_SLIDER - A slider on the tool, normalized
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_SLIDER - A slider on the tool, normalized
  *   from 0 to 1. e.g. the wheel-like tool on the Wacom Airbrush.
- * - @ref LIBINPUT_TABLET_AXIS_REL_WHEEL - A relative wheel on the tool,
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL - A relative wheel on the tool,
  *   similar or equivalent to a mouse wheel. The value is always 0, use
  *   libinput_event_tablet_get_axis_delta() instead.
  *
@@ -1423,7 +1423,7 @@ libinput_event_tablet_get_axis_value(struct libinput_event_tablet *event,
  *
  * Return the delta for a given axis for a tablet. The interpretation of the
  * value is axis-dependent:
- * - @ref LIBINPUT_TABLET_AXIS_REL_WHEEL - A relative wheel on the tool,
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL - A relative wheel on the tool,
  *   similar or equivalent to a mouse wheel. The value is a delta from the
  *   device's previous position, in degrees.
  * For all other axes, see libinput_event_tablet_get_axis_value() for
@@ -1442,7 +1442,7 @@ libinput_event_tablet_get_axis_delta(struct libinput_event_tablet *event,
  *
  * Return the delta for a given axis for a tablet in discrete steps.
  * How a value translates into a discrete step depends on the axis:
- * - @ref LIBINPUT_TABLET_AXIS_REL_WHEEL - the returned value is the number
+ * - @ref LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL - the returned value is the number
  * of physical mouse wheel clicks.
  * For all other axes, this function returns 0.
  *
diff --git a/test/tablet.c b/test/tablet.c
index b7ccdab..71fca96 100644
--- a/test/tablet.c
+++ b/test/tablet.c
@@ -324,9 +324,9 @@ START_TEST(tip_down_motion)
 	tablet_event = litest_is_tablet_event(event,
 					      LIBINPUT_EVENT_TABLET_AXIS);
 	last_x = libinput_event_tablet_get_axis_value(tablet_event,
-						      LIBINPUT_TABLET_AXIS_X);
+						      LIBINPUT_TABLET_TOOL_AXIS_X);
 	last_y = libinput_event_tablet_get_axis_value(tablet_event,
-						      LIBINPUT_TABLET_AXIS_Y);
+						      LIBINPUT_TABLET_TOOL_AXIS_Y);
 	libinput_event_destroy(event);
 
 	libinput_dispatch(li);
@@ -336,9 +336,9 @@ START_TEST(tip_down_motion)
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TOOL_TIP_DOWN);
 	x = libinput_event_tablet_get_axis_value(tablet_event,
-						 LIBINPUT_TABLET_AXIS_X);
+						 LIBINPUT_TABLET_TOOL_AXIS_X);
 	y = libinput_event_tablet_get_axis_value(tablet_event,
-						 LIBINPUT_TABLET_AXIS_Y);
+						 LIBINPUT_TABLET_TOOL_AXIS_Y);
 	ck_assert_double_eq(last_x, x);
 	ck_assert_double_eq(last_y, y);
 	libinput_event_destroy(event);
@@ -375,9 +375,9 @@ START_TEST(tip_up_motion)
 	tablet_event = litest_is_tablet_event(event,
 					      LIBINPUT_EVENT_TABLET_AXIS);
 	last_x = libinput_event_tablet_get_axis_value(tablet_event,
-						      LIBINPUT_TABLET_AXIS_X);
+						      LIBINPUT_TABLET_TOOL_AXIS_X);
 	last_y = libinput_event_tablet_get_axis_value(tablet_event,
-						      LIBINPUT_TABLET_AXIS_Y);
+						      LIBINPUT_TABLET_TOOL_AXIS_Y);
 	libinput_event_destroy(event);
 
 	libinput_dispatch(li);
@@ -387,9 +387,9 @@ START_TEST(tip_up_motion)
 	ck_assert_int_eq(libinput_event_tablet_get_tip_state(tablet_event),
 			 LIBINPUT_TOOL_TIP_UP);
 	x = libinput_event_tablet_get_axis_value(tablet_event,
-						 LIBINPUT_TABLET_AXIS_X);
+						 LIBINPUT_TABLET_TOOL_AXIS_X);
 	y = libinput_event_tablet_get_axis_value(tablet_event,
-						 LIBINPUT_TABLET_AXIS_Y);
+						 LIBINPUT_TABLET_TOOL_AXIS_Y);
 	ck_assert_double_eq(last_x, x);
 	ck_assert_double_eq(last_y, y);
 	libinput_event_destroy(event);
@@ -722,44 +722,44 @@ START_TEST(proximity_has_axes)
 	tool = libinput_event_tablet_get_tool(tablet_event);
 
 	ck_assert(libinput_event_tablet_axis_has_changed(
-			tablet_event, LIBINPUT_TABLET_AXIS_X));
+			tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X));
 	ck_assert(libinput_event_tablet_axis_has_changed(
-			tablet_event, LIBINPUT_TABLET_AXIS_Y));
+			tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y));
 
 	x = libinput_event_tablet_get_axis_value(tablet_event,
-						 LIBINPUT_TABLET_AXIS_X);
+						 LIBINPUT_TABLET_TOOL_AXIS_X);
 	y = libinput_event_tablet_get_axis_value(tablet_event,
-						 LIBINPUT_TABLET_AXIS_Y);
+						 LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 	litest_assert_double_ne(x, 0);
 	litest_assert_double_ne(y, 0);
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_DISTANCE)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE)) {
 		ck_assert(libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_DISTANCE));
+				LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
 
 		distance = libinput_event_tablet_get_axis_value(
 			tablet_event,
-			LIBINPUT_TABLET_AXIS_DISTANCE);
+			LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 		litest_assert_double_ne(distance, 0);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_X) &&
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_Y)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) &&
+	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 		ck_assert(libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_TILT_X));
+				LIBINPUT_TABLET_TOOL_AXIS_TILT_X));
 		ck_assert(libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_TILT_Y));
+				LIBINPUT_TABLET_TOOL_AXIS_TILT_Y));
 
 		x = libinput_event_tablet_get_axis_value(
 			tablet_event,
-			LIBINPUT_TABLET_AXIS_TILT_X);
+			LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 		y = libinput_event_tablet_get_axis_value(
 			tablet_event,
-			LIBINPUT_TABLET_AXIS_TILT_Y);
+			LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 
 		litest_assert_double_ne(x, 0);
 		litest_assert_double_ne(y, 0);
@@ -778,21 +778,21 @@ START_TEST(proximity_has_axes)
 	tablet_event = libinput_event_get_tablet_event(event);
 
 	last_x = libinput_event_tablet_get_axis_value(tablet_event,
-						      LIBINPUT_TABLET_AXIS_X);
+						      LIBINPUT_TABLET_TOOL_AXIS_X);
 	last_y = libinput_event_tablet_get_axis_value(tablet_event,
-						      LIBINPUT_TABLET_AXIS_Y);
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_DISTANCE))
+						      LIBINPUT_TABLET_TOOL_AXIS_Y);
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE))
 		last_distance = libinput_event_tablet_get_axis_value(
 					     tablet_event,
-					     LIBINPUT_TABLET_AXIS_DISTANCE);
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_X) &&
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_Y)) {
+					     LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) &&
+	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 		last_tx = libinput_event_tablet_get_axis_value(
 						tablet_event,
-						LIBINPUT_TABLET_AXIS_TILT_X);
+						LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 		last_ty = libinput_event_tablet_get_axis_value(
 						tablet_event,
-						LIBINPUT_TABLET_AXIS_TILT_Y);
+						LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 	}
 
 	libinput_event_destroy(event);
@@ -807,43 +807,43 @@ START_TEST(proximity_has_axes)
 	tool = libinput_event_tablet_get_tool(tablet_event);
 
 	ck_assert(!libinput_event_tablet_axis_has_changed(
-			tablet_event, LIBINPUT_TABLET_AXIS_X));
+			tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X));
 	ck_assert(!libinput_event_tablet_axis_has_changed(
-			tablet_event, LIBINPUT_TABLET_AXIS_Y));
+			tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y));
 
 	x = libinput_event_tablet_get_axis_value(tablet_event,
-						 LIBINPUT_TABLET_AXIS_X);
+						 LIBINPUT_TABLET_TOOL_AXIS_X);
 	y = libinput_event_tablet_get_axis_value(tablet_event,
-						 LIBINPUT_TABLET_AXIS_Y);
+						 LIBINPUT_TABLET_TOOL_AXIS_Y);
 	litest_assert_double_eq(x, last_x);
 	litest_assert_double_eq(y, last_y);
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_DISTANCE)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE)) {
 		ck_assert(!libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_DISTANCE));
+				LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
 
 		distance = libinput_event_tablet_get_axis_value(
 			tablet_event,
-			LIBINPUT_TABLET_AXIS_DISTANCE);
+			LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 		litest_assert_double_eq(distance, last_distance);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_X) &&
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_Y)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) &&
+	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 		ck_assert(!libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_TILT_X));
+				LIBINPUT_TABLET_TOOL_AXIS_TILT_X));
 		ck_assert(!libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_TILT_Y));
+				LIBINPUT_TABLET_TOOL_AXIS_TILT_Y));
 
 		x = libinput_event_tablet_get_axis_value(
 			tablet_event,
-			LIBINPUT_TABLET_AXIS_TILT_X);
+			LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 		y = libinput_event_tablet_get_axis_value(
 			tablet_event,
-			LIBINPUT_TABLET_AXIS_TILT_Y);
+			LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 
 		litest_assert_double_eq(x, last_tx);
 		litest_assert_double_eq(y, last_ty);
@@ -886,17 +886,17 @@ START_TEST(motion)
 				 LIBINPUT_EVENT_TABLET_PROXIMITY);
 
 		x_changed = libinput_event_tablet_axis_has_changed(
-		    tablet_event, LIBINPUT_TABLET_AXIS_X);
+		    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 		y_changed = libinput_event_tablet_axis_has_changed(
-		    tablet_event, LIBINPUT_TABLET_AXIS_Y);
+		    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 		ck_assert(x_changed);
 		ck_assert(y_changed);
 
 		reported_x = libinput_event_tablet_get_axis_value(
-		    tablet_event, LIBINPUT_TABLET_AXIS_X);
+		    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 		reported_y = libinput_event_tablet_get_axis_value(
-		    tablet_event, LIBINPUT_TABLET_AXIS_Y);
+		    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 		litest_assert_double_lt(reported_x, reported_y);
 
@@ -921,17 +921,17 @@ START_TEST(motion)
 
 			if (type == LIBINPUT_EVENT_TABLET_AXIS) {
 				x_changed = libinput_event_tablet_axis_has_changed(
-				    tablet_event, LIBINPUT_TABLET_AXIS_X);
+				    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 				y_changed = libinput_event_tablet_axis_has_changed(
-				    tablet_event, LIBINPUT_TABLET_AXIS_Y);
+				    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 				ck_assert(x_changed);
 				ck_assert(y_changed);
 
 				reported_x = libinput_event_tablet_get_axis_value(
-				    tablet_event, LIBINPUT_TABLET_AXIS_X);
+				    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 				reported_y = libinput_event_tablet_get_axis_value(
-				    tablet_event, LIBINPUT_TABLET_AXIS_Y);
+				    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 				litest_assert_double_gt(reported_x,
 							last_reported_x);
@@ -973,11 +973,11 @@ START_TEST(motion_delta)
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_event(event);
 	x1 = libinput_event_tablet_get_axis_value(tablet_event,
-						  LIBINPUT_TABLET_AXIS_X);
+						  LIBINPUT_TABLET_TOOL_AXIS_X);
 	y1 = libinput_event_tablet_get_axis_value(tablet_event,
-						  LIBINPUT_TABLET_AXIS_Y);
+						  LIBINPUT_TABLET_TOOL_AXIS_Y);
 	dist1 = libinput_event_tablet_get_axis_value(tablet_event,
-					  LIBINPUT_TABLET_AXIS_DISTANCE);
+					  LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 	libinput_event_destroy(event);
 
 	axes[0].value = 40;
@@ -989,20 +989,20 @@ START_TEST(motion_delta)
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_event(event);
 	x2 = libinput_event_tablet_get_axis_value(tablet_event,
-						  LIBINPUT_TABLET_AXIS_X);
+						  LIBINPUT_TABLET_TOOL_AXIS_X);
 	y2 = libinput_event_tablet_get_axis_value(tablet_event,
-						  LIBINPUT_TABLET_AXIS_Y);
+						  LIBINPUT_TABLET_TOOL_AXIS_Y);
 	dist2 = libinput_event_tablet_get_axis_value(tablet_event,
-					  LIBINPUT_TABLET_AXIS_DISTANCE);
+					  LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 
 	delta = libinput_event_tablet_get_axis_delta(tablet_event,
-						  LIBINPUT_TABLET_AXIS_X);
+						  LIBINPUT_TABLET_TOOL_AXIS_X);
 	litest_assert_double_eq(delta, x2 - x1);
 	delta = libinput_event_tablet_get_axis_delta(tablet_event,
-						  LIBINPUT_TABLET_AXIS_Y);
+						  LIBINPUT_TABLET_TOOL_AXIS_Y);
 	litest_assert_double_eq(delta, y2 - y1);
 	delta = libinput_event_tablet_get_axis_delta(tablet_event,
-						  LIBINPUT_TABLET_AXIS_DISTANCE);
+						  LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 	litest_assert_double_eq(delta, dist2 - dist1);
 
 	libinput_event_destroy(event);
@@ -1037,21 +1037,21 @@ START_TEST(motion_delta_partial)
 	tablet_event = libinput_event_get_tablet_event(event);
 
 	ck_assert(!libinput_event_tablet_axis_has_changed(tablet_event,
-						LIBINPUT_TABLET_AXIS_X));
+						LIBINPUT_TABLET_TOOL_AXIS_X));
 	dx = libinput_event_tablet_get_axis_delta(tablet_event,
-						LIBINPUT_TABLET_AXIS_X);
+						LIBINPUT_TABLET_TOOL_AXIS_X);
 	litest_assert_double_eq(dx, 0.0);
 
 	ck_assert(!libinput_event_tablet_axis_has_changed(tablet_event,
-						LIBINPUT_TABLET_AXIS_X));
+						LIBINPUT_TABLET_TOOL_AXIS_X));
 	dy = libinput_event_tablet_get_axis_delta(tablet_event,
-						LIBINPUT_TABLET_AXIS_Y);
+						LIBINPUT_TABLET_TOOL_AXIS_Y);
 	litest_assert_double_eq(dy, 0.0);
 
 	ck_assert(libinput_event_tablet_axis_has_changed(tablet_event,
-						LIBINPUT_TABLET_AXIS_DISTANCE));
+						LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
 	ddist = libinput_event_tablet_get_axis_delta(tablet_event,
-						LIBINPUT_TABLET_AXIS_DISTANCE);
+						LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 	ck_assert_double_gt(ddist, 0);
 
 	libinput_event_destroy(event);
@@ -1093,9 +1093,9 @@ START_TEST(left_handed)
 		tablet_event = libinput_event_get_tablet_event(event);
 
 		last_x = libinput_event_tablet_get_axis_value(
-				tablet_event, LIBINPUT_TABLET_AXIS_X);
+				tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 		last_y = libinput_event_tablet_get_axis_value(
-				tablet_event, LIBINPUT_TABLET_AXIS_Y);
+				tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 		litest_assert_double_eq(last_x, 0);
 		litest_assert_double_eq(last_y, libinput_max_y);
@@ -1111,9 +1111,9 @@ START_TEST(left_handed)
 		tablet_event = libinput_event_get_tablet_event(event);
 
 		x = libinput_event_tablet_get_axis_value(
-			tablet_event, LIBINPUT_TABLET_AXIS_X);
+			tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 		y = libinput_event_tablet_get_axis_value(
-			tablet_event, LIBINPUT_TABLET_AXIS_Y);
+			tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 		litest_assert_double_eq(x, libinput_max_x);
 		litest_assert_double_eq(y, 0);
@@ -1139,9 +1139,9 @@ START_TEST(left_handed)
 		tablet_event = libinput_event_get_tablet_event(event);
 
 		last_x = libinput_event_tablet_get_axis_value(
-				tablet_event, LIBINPUT_TABLET_AXIS_X);
+				tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 		last_y = libinput_event_tablet_get_axis_value(
-				tablet_event, LIBINPUT_TABLET_AXIS_Y);
+				tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 		litest_assert_double_eq(last_x, libinput_max_x);
 		litest_assert_double_eq(last_y, 0);
@@ -1157,9 +1157,9 @@ START_TEST(left_handed)
 		tablet_event = libinput_event_get_tablet_event(event);
 
 		x = libinput_event_tablet_get_axis_value(
-			tablet_event, LIBINPUT_TABLET_AXIS_X);
+			tablet_event, LIBINPUT_TABLET_TOOL_AXIS_X);
 		y = libinput_event_tablet_get_axis_value(
-			tablet_event, LIBINPUT_TABLET_AXIS_Y);
+			tablet_event, LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 		litest_assert_double_eq(x, 0);
 		litest_assert_double_eq(y, libinput_max_y);
@@ -1217,9 +1217,9 @@ START_TEST(motion_event_state)
 	ck_assert_notnull(tablet_event);
 
 	last_x = libinput_event_tablet_get_axis_value(tablet_event,
-						      LIBINPUT_TABLET_AXIS_X);
+						      LIBINPUT_TABLET_TOOL_AXIS_X);
 	last_y = libinput_event_tablet_get_axis_value(tablet_event,
-						      LIBINPUT_TABLET_AXIS_Y);
+						      LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 	/* mark with a button event, then go back to bottom/left */
 	litest_event(dev, EV_KEY, BTN_STYLUS, 1);
@@ -1245,9 +1245,9 @@ START_TEST(motion_event_state)
 		ck_assert_notnull(tablet_event);
 
 		x = libinput_event_tablet_get_axis_value(tablet_event,
-							 LIBINPUT_TABLET_AXIS_X);
+							 LIBINPUT_TABLET_TOOL_AXIS_X);
 		y = libinput_event_tablet_get_axis_value(tablet_event,
-							 LIBINPUT_TABLET_AXIS_Y);
+							 LIBINPUT_TABLET_TOOL_AXIS_Y);
 
 		ck_assert(x > last_x);
 		ck_assert(y < last_y);
@@ -1336,31 +1336,31 @@ START_TEST(normalization)
 
 			if (libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_PRESSURE)) {
+				LIBINPUT_TABLET_TOOL_AXIS_PRESSURE)) {
 				pressure = libinput_event_tablet_get_axis_value(
-				    tablet_event, LIBINPUT_TABLET_AXIS_PRESSURE);
+				    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE);
 
 				litest_assert_double_eq(pressure, 0);
 			}
 
 			if (libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_TILT_X)) {
+				LIBINPUT_TABLET_TOOL_AXIS_TILT_X)) {
 				tilt_vertical =
 					libinput_event_tablet_get_axis_value(
 					    tablet_event,
-					    LIBINPUT_TABLET_AXIS_TILT_X);
+					    LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 
 				litest_assert_double_eq(tilt_vertical, -1);
 			}
 
 			if (libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_TILT_Y)) {
+				LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 				tilt_horizontal =
 					libinput_event_tablet_get_axis_value(
 					    tablet_event,
-					    LIBINPUT_TABLET_AXIS_TILT_Y);
+					    LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 
 				litest_assert_double_eq(tilt_horizontal, -1);
 			}
@@ -1398,31 +1398,31 @@ START_TEST(normalization)
 
 			if (libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_PRESSURE)) {
+				LIBINPUT_TABLET_TOOL_AXIS_PRESSURE)) {
 				pressure = libinput_event_tablet_get_axis_value(
-				    tablet_event, LIBINPUT_TABLET_AXIS_PRESSURE);
+				    tablet_event, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE);
 
 				litest_assert_double_eq(pressure, 1);
 			}
 
 			if (libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_TILT_X)) {
+				LIBINPUT_TABLET_TOOL_AXIS_TILT_X)) {
 				tilt_vertical =
 					libinput_event_tablet_get_axis_value(
 					    tablet_event,
-					    LIBINPUT_TABLET_AXIS_TILT_X);
+					    LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 
 				litest_assert_double_eq(tilt_vertical, 1);
 			}
 
 			if (libinput_event_tablet_axis_has_changed(
 				tablet_event,
-				LIBINPUT_TABLET_AXIS_TILT_Y)) {
+				LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 				tilt_horizontal =
 					libinput_event_tablet_get_axis_value(
 					    tablet_event,
-					    LIBINPUT_TABLET_AXIS_TILT_Y);
+					    LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 
 				litest_assert_double_eq(tilt_horizontal, 1);
 			}
@@ -1733,13 +1733,13 @@ START_TEST(tool_capabilities)
 	tool = libinput_event_tablet_get_tool(t);
 
 	ck_assert(libinput_tool_has_axis(tool,
-					 LIBINPUT_TABLET_AXIS_PRESSURE));
+					 LIBINPUT_TABLET_TOOL_AXIS_PRESSURE));
 	ck_assert(libinput_tool_has_axis(tool,
-					 LIBINPUT_TABLET_AXIS_DISTANCE));
+					 LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
 	ck_assert(!libinput_tool_has_axis(tool,
-					  LIBINPUT_TABLET_AXIS_TILT_X));
+					  LIBINPUT_TABLET_TOOL_AXIS_TILT_X));
 	ck_assert(!libinput_tool_has_axis(tool,
-					  LIBINPUT_TABLET_AXIS_TILT_Y));
+					  LIBINPUT_TABLET_TOOL_AXIS_TILT_Y));
 
 	libinput_event_destroy(event);
 	litest_assert_empty_queue(li);
@@ -1756,13 +1756,13 @@ START_TEST(tool_capabilities)
 	tool = libinput_event_tablet_get_tool(t);
 
 	ck_assert(libinput_tool_has_axis(tool,
-					 LIBINPUT_TABLET_AXIS_PRESSURE));
+					 LIBINPUT_TABLET_TOOL_AXIS_PRESSURE));
 	ck_assert(libinput_tool_has_axis(tool,
-					 LIBINPUT_TABLET_AXIS_DISTANCE));
+					 LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
 	ck_assert(libinput_tool_has_axis(tool,
-					 LIBINPUT_TABLET_AXIS_TILT_X));
+					 LIBINPUT_TABLET_TOOL_AXIS_TILT_X));
 	ck_assert(libinput_tool_has_axis(tool,
-					 LIBINPUT_TABLET_AXIS_TILT_Y));
+					 LIBINPUT_TABLET_TOOL_AXIS_TILT_Y));
 
 	libinput_event_destroy(event);
 	litest_assert_empty_queue(li);
@@ -1978,9 +1978,9 @@ START_TEST(mouse_rotation)
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
 		ck_assert(libinput_event_tablet_axis_has_changed(tev,
-					 LIBINPUT_TABLET_AXIS_ROTATION_Z));
+					 LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z));
 		val = libinput_event_tablet_get_axis_value(tev,
-					 LIBINPUT_TABLET_AXIS_ROTATION_Z);
+					 LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 
 		/* rounding error galore, we can't test for anything more
 		   precise than these */
@@ -2030,7 +2030,7 @@ START_TEST(mouse_wheel)
 	libinput_event_destroy(event);
 
 	ck_assert(libinput_tool_has_axis(tool,
-					 LIBINPUT_TABLET_AXIS_REL_WHEEL));
+					 LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL));
 
 	for (i = 0; i < 3; i++) {
 		litest_event(dev, EV_REL, REL_WHEEL, -1);
@@ -2041,17 +2041,17 @@ START_TEST(mouse_wheel)
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
 		ck_assert(libinput_event_tablet_axis_has_changed(tev,
-						LIBINPUT_TABLET_AXIS_REL_WHEEL));
+						LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL));
 		val = libinput_event_tablet_get_axis_value(tev,
-						LIBINPUT_TABLET_AXIS_REL_WHEEL);
+						LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		ck_assert_int_eq(val, 0);
 
 		val = libinput_event_tablet_get_axis_delta(tev,
-						LIBINPUT_TABLET_AXIS_REL_WHEEL);
+						LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		ck_assert_int_eq(val, 15);
 
 		val = libinput_event_tablet_get_axis_delta_discrete(tev,
-						LIBINPUT_TABLET_AXIS_REL_WHEEL);
+						LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		ck_assert_int_eq(val, 1);
 
 		libinput_event_destroy(event);
@@ -2072,17 +2072,17 @@ START_TEST(mouse_wheel)
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
 		ck_assert(!libinput_event_tablet_axis_has_changed(tev,
-						LIBINPUT_TABLET_AXIS_REL_WHEEL));
+						LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL));
 		val = libinput_event_tablet_get_axis_value(tev,
-						LIBINPUT_TABLET_AXIS_REL_WHEEL);
+						LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		ck_assert_int_eq(val, 0);
 
 		val = libinput_event_tablet_get_axis_delta(tev,
-						LIBINPUT_TABLET_AXIS_REL_WHEEL);
+						LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		ck_assert_int_eq(val, 0);
 
 		val = libinput_event_tablet_get_axis_delta_discrete(tev,
-						LIBINPUT_TABLET_AXIS_ROTATION_Z);
+						LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 		ck_assert_int_eq(val, 0);
 
 		libinput_event_destroy(event);
@@ -2169,9 +2169,9 @@ START_TEST(airbrush_wheel)
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
 		ck_assert(libinput_event_tablet_axis_has_changed(tev,
-					 LIBINPUT_TABLET_AXIS_SLIDER));
+					 LIBINPUT_TABLET_TOOL_AXIS_SLIDER));
 		val = libinput_event_tablet_get_axis_value(tev,
-					 LIBINPUT_TABLET_AXIS_SLIDER);
+					 LIBINPUT_TABLET_TOOL_AXIS_SLIDER);
 
 		ck_assert_int_eq(val, (v - abs->minimum)/scale);
 		libinput_event_destroy(event);
@@ -2210,7 +2210,7 @@ START_TEST(artpen_tool)
 	ck_assert_int_eq(libinput_tool_get_type(tool),
 			 LIBINPUT_TOOL_TYPE_PEN);
 	ck_assert(libinput_tool_has_axis(tool,
-					 LIBINPUT_TABLET_AXIS_ROTATION_Z));
+					 LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z));
 
 	libinput_event_destroy(event);
 }
@@ -2260,15 +2260,15 @@ START_TEST(artpen_rotation)
 		event = libinput_get_event(li);
 		tev = libinput_event_get_tablet_event(event);
 		ck_assert(libinput_event_tablet_axis_has_changed(tev,
-					 LIBINPUT_TABLET_AXIS_ROTATION_Z));
+					 LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z));
 		val = libinput_event_tablet_get_axis_value(tev,
-					 LIBINPUT_TABLET_AXIS_ROTATION_Z);
+					 LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 
 		/* artpen has a 90 deg offset cw */
 		ck_assert_int_eq(round(val), (angle + 90) % 360);
 
 		val = libinput_event_tablet_get_axis_delta(tev,
-					 LIBINPUT_TABLET_AXIS_ROTATION_Z);
+					 LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 		ck_assert_int_eq(val, 8);
 
 		libinput_event_destroy(event);
diff --git a/tools/event-debug.c b/tools/event-debug.c
index b7237ab..6196910 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -345,91 +345,91 @@ print_tablet_axes(struct libinput_event_tablet *t)
 	double rotation, slider, wheel;
 	double delta;
 
-	x = libinput_event_tablet_get_axis_value(t, LIBINPUT_TABLET_AXIS_X);
-	y = libinput_event_tablet_get_axis_value(t, LIBINPUT_TABLET_AXIS_Y);
-	dx = libinput_event_tablet_get_axis_delta(t, LIBINPUT_TABLET_AXIS_X);
-	dy = libinput_event_tablet_get_axis_delta(t, LIBINPUT_TABLET_AXIS_Y);
+	x = libinput_event_tablet_get_axis_value(t, LIBINPUT_TABLET_TOOL_AXIS_X);
+	y = libinput_event_tablet_get_axis_value(t, LIBINPUT_TABLET_TOOL_AXIS_Y);
+	dx = libinput_event_tablet_get_axis_delta(t, LIBINPUT_TABLET_TOOL_AXIS_X);
+	dy = libinput_event_tablet_get_axis_delta(t, LIBINPUT_TABLET_TOOL_AXIS_Y);
 	printf("\t%.2f%s/%.2f%s (%.2f/%.2f)",
-	       x, tablet_axis_changed_sym(t, LIBINPUT_TABLET_AXIS_X),
-	       y, tablet_axis_changed_sym(t, LIBINPUT_TABLET_AXIS_Y),
+	       x, tablet_axis_changed_sym(t, LIBINPUT_TABLET_TOOL_AXIS_X),
+	       y, tablet_axis_changed_sym(t, LIBINPUT_TABLET_TOOL_AXIS_Y),
 	       dx, dy);
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_X) ||
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_Y)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) ||
+	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 		x = libinput_event_tablet_get_axis_value(t,
-					 LIBINPUT_TABLET_AXIS_TILT_X);
+					 LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 		y = libinput_event_tablet_get_axis_value(t,
-					 LIBINPUT_TABLET_AXIS_TILT_Y);
+					 LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 		dx = libinput_event_tablet_get_axis_delta(t,
-					 LIBINPUT_TABLET_AXIS_TILT_X);
+					 LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 		dy = libinput_event_tablet_get_axis_delta(t,
-					 LIBINPUT_TABLET_AXIS_TILT_Y);
+					 LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 		printf("\ttilt: %.2f%s/%.2f%s (%.2f/%.2f)",
 		       x, tablet_axis_changed_sym(t,
-					  LIBINPUT_TABLET_AXIS_TILT_X),
+					  LIBINPUT_TABLET_TOOL_AXIS_TILT_X),
 		       y, tablet_axis_changed_sym(t,
-					  LIBINPUT_TABLET_AXIS_TILT_Y),
+					  LIBINPUT_TABLET_TOOL_AXIS_TILT_Y),
 		       dx, dy);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_DISTANCE) ||
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_PRESSURE)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE) ||
+	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE)) {
 		dist = libinput_event_tablet_get_axis_value(t,
-					LIBINPUT_TABLET_AXIS_DISTANCE);
+					LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 		pressure = libinput_event_tablet_get_axis_value(t,
-					LIBINPUT_TABLET_AXIS_PRESSURE);
+					LIBINPUT_TABLET_TOOL_AXIS_PRESSURE);
 		if (dist) {
 			delta = libinput_event_tablet_get_axis_delta(t,
-					LIBINPUT_TABLET_AXIS_DISTANCE);
+					LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 			printf("\tdistance: %.2f%s (%.2f)",
 			       dist,
 			       tablet_axis_changed_sym(t,
-					       LIBINPUT_TABLET_AXIS_DISTANCE),
+					       LIBINPUT_TABLET_TOOL_AXIS_DISTANCE),
 			       delta);
 		} else {
 			delta = libinput_event_tablet_get_axis_delta(t,
-					LIBINPUT_TABLET_AXIS_PRESSURE);
+					LIBINPUT_TABLET_TOOL_AXIS_PRESSURE);
 			printf("\tpressure: %.2f%s (%.2f)",
 			       pressure,
 			       tablet_axis_changed_sym(t,
-					       LIBINPUT_TABLET_AXIS_PRESSURE),
+					       LIBINPUT_TABLET_TOOL_AXIS_PRESSURE),
 			       delta);
 		}
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_ROTATION_Z)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z)) {
 		rotation = libinput_event_tablet_get_axis_value(t,
-					LIBINPUT_TABLET_AXIS_ROTATION_Z);
+					LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 		delta = libinput_event_tablet_get_axis_delta(t,
-					LIBINPUT_TABLET_AXIS_ROTATION_Z);
+					LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 		printf("\trotation: %.2f%s (%.2f)",
 		       rotation,
 		       tablet_axis_changed_sym(t,
-				       LIBINPUT_TABLET_AXIS_ROTATION_Z),
+				       LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z),
 		       delta);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_SLIDER)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER)) {
 		slider = libinput_event_tablet_get_axis_value(t,
-					LIBINPUT_TABLET_AXIS_SLIDER);
+					LIBINPUT_TABLET_TOOL_AXIS_SLIDER);
 		delta = libinput_event_tablet_get_axis_delta(t,
-					LIBINPUT_TABLET_AXIS_SLIDER);
+					LIBINPUT_TABLET_TOOL_AXIS_SLIDER);
 		printf("\tslider: %.2f%s (%.2f)",
 		       slider,
 		       tablet_axis_changed_sym(t,
-				       LIBINPUT_TABLET_AXIS_SLIDER),
+				       LIBINPUT_TABLET_TOOL_AXIS_SLIDER),
 		       delta);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_REL_WHEEL)) {
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL)) {
 		wheel = libinput_event_tablet_get_axis_value(t,
-					LIBINPUT_TABLET_AXIS_REL_WHEEL);
+					LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		delta = libinput_event_tablet_get_axis_delta_discrete(t,
-					LIBINPUT_TABLET_AXIS_REL_WHEEL);
+					LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		printf("\twheel: %.2f%s (%d)",
 		       wheel,
 		       tablet_axis_changed_sym(t,
-				       LIBINPUT_TABLET_AXIS_REL_WHEEL),
+				       LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL),
 		       (int)delta);
 	}
 }
@@ -512,18 +512,18 @@ print_proximity_event(struct libinput_event *ev)
 	       state_str);
 
 	printf("\taxes:");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_DISTANCE))
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE))
 		printf("d");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_PRESSURE))
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE))
 		printf("p");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_X) ||
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_TILT_Y))
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) ||
+	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y))
 		printf("t");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_ROTATION_Z))
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z))
 		printf("r");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_SLIDER))
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER))
 		printf("s");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_AXIS_REL_WHEEL))
+	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL))
 		printf("w");
 
 	printf("\tbtn:");
diff --git a/tools/event-gui.c b/tools/event-gui.c
index a7d8dd9..1a4f242 100644
--- a/tools/event-gui.c
+++ b/tools/event-gui.c
@@ -625,13 +625,13 @@ handle_event_tablet(struct libinput_event *ev, struct window *w)
 		w->tool.y = libinput_event_tablet_get_y_transformed(t,
 								    w->height);
 		w->tool.pressure = libinput_event_tablet_get_axis_value(t,
-							LIBINPUT_TABLET_AXIS_PRESSURE);
+							LIBINPUT_TABLET_TOOL_AXIS_PRESSURE);
 		w->tool.distance = libinput_event_tablet_get_axis_value(t,
-							LIBINPUT_TABLET_AXIS_DISTANCE);
+							LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 		w->tool.tilt_x = libinput_event_tablet_get_axis_value(t,
-							LIBINPUT_TABLET_AXIS_TILT_X);
+							LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 		w->tool.tilt_y = libinput_event_tablet_get_axis_value(t,
-							LIBINPUT_TABLET_AXIS_TILT_Y);
+							LIBINPUT_TABLET_TOOL_AXIS_TILT_Y);
 		break;
 	case LIBINPUT_EVENT_TABLET_TIP:
 		x = libinput_event_tablet_get_x_transformed(t, w->width);
-- 
2.5.0



More information about the wayland-devel mailing list