[PATCH libinput 13/14] tablet: rename the libinput_tool calls to libinput_tablet_tool

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


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-tablet.c  |  2 +-
 src/libinput.c      | 26 ++++++++++----------
 src/libinput.h      | 34 +++++++++++++--------------
 src/libinput.sym    | 18 +++++++-------
 test/tablet.c       | 68 ++++++++++++++++++++++++++---------------------------
 tools/event-debug.c | 50 +++++++++++++++++++--------------------
 6 files changed, 99 insertions(+), 99 deletions(-)

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index c1d69de..7e1c2d0 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -1008,7 +1008,7 @@ tablet_destroy(struct evdev_dispatch *dispatch)
 	struct libinput_tablet_tool *tool, *tmp;
 
 	list_for_each_safe(tool, tmp, &tablet->tool_list, link) {
-		libinput_tool_unref(tool);
+		libinput_tablet_tool_unref(tool);
 	}
 
 	free(tablet);
diff --git a/src/libinput.c b/src/libinput.c
index 338255d..99c009d 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1165,33 +1165,33 @@ libinput_event_tablet_tool_get_seat_button_count(struct libinput_event_tablet_to
 }
 
 LIBINPUT_EXPORT enum libinput_tablet_tool_type
-libinput_tool_get_type(struct libinput_tablet_tool *tool)
+libinput_tablet_tool_get_type(struct libinput_tablet_tool *tool)
 {
 	return tool->type;
 }
 
 LIBINPUT_EXPORT uint64_t
-libinput_tool_get_tool_id(struct libinput_tablet_tool *tool)
+libinput_tablet_tool_get_tool_id(struct libinput_tablet_tool *tool)
 {
 	return tool->tool_id;
 }
 
 LIBINPUT_EXPORT uint64_t
-libinput_tool_get_serial(struct libinput_tablet_tool *tool)
+libinput_tablet_tool_get_serial(struct libinput_tablet_tool *tool)
 {
 	return tool->serial;
 }
 
 LIBINPUT_EXPORT int
-libinput_tool_has_axis(struct libinput_tablet_tool *tool,
-		       enum libinput_tablet_tool_axis axis)
+libinput_tablet_tool_has_axis(struct libinput_tablet_tool *tool,
+			      enum libinput_tablet_tool_axis axis)
 {
 	return bit_is_set(tool->axis_caps, axis);
 }
 
 LIBINPUT_EXPORT int
-libinput_tool_has_button(struct libinput_tablet_tool *tool,
-			 uint32_t code)
+libinput_tablet_tool_has_button(struct libinput_tablet_tool *tool,
+				uint32_t code)
 {
 	if (NCHARS(code) > sizeof(tool->buttons))
 		return 0;
@@ -1200,27 +1200,27 @@ libinput_tool_has_button(struct libinput_tablet_tool *tool,
 }
 
 LIBINPUT_EXPORT void
-libinput_tool_set_user_data(struct libinput_tablet_tool *tool,
-			    void *user_data)
+libinput_tablet_tool_set_user_data(struct libinput_tablet_tool *tool,
+				   void *user_data)
 {
 	tool->user_data = user_data;
 }
 
 LIBINPUT_EXPORT void *
-libinput_tool_get_user_data(struct libinput_tablet_tool *tool)
+libinput_tablet_tool_get_user_data(struct libinput_tablet_tool *tool)
 {
 	return tool->user_data;
 }
 
 LIBINPUT_EXPORT struct libinput_tablet_tool *
-libinput_tool_ref(struct libinput_tablet_tool *tool)
+libinput_tablet_tool_ref(struct libinput_tablet_tool *tool)
 {
 	tool->refcount++;
 	return tool;
 }
 
 LIBINPUT_EXPORT struct libinput_tablet_tool *
-libinput_tool_unref(struct libinput_tablet_tool *tool)
+libinput_tablet_tool_unref(struct libinput_tablet_tool *tool)
 {
 	assert(tool->refcount > 0);
 
@@ -1374,7 +1374,7 @@ libinput_unref(struct libinput *libinput)
 	}
 
 	list_for_each_safe(tool, next_tool, &libinput->tool_list, link) {
-		libinput_tool_unref(tool);
+		libinput_tablet_tool_unref(tool);
 	}
 
 	libinput_timer_subsys_destroy(libinput);
diff --git a/src/libinput.h b/src/libinput.h
index 9884cdc..be815e7 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -174,7 +174,7 @@ struct libinput_tablet_tool;
  * physical tools may share the same tool type, e.g. a Wacom Classic Pen,
  * Wacom Pro Pen and a Wacom Grip Pen are all of type @ref
  * LIBINPUT_TABLET_TOOL_TYPE_PEN.
- * Use libinput_tool_get_tool_id() to get a specific model where applicable.
+ * Use libinput_tablet_tool_get_tool_id() to get a specific model where applicable.
  *
  * Note that on some device, the eraser tool is on the tail end of a pen
  * device. On other devices, e.g. MS Surface 3, the eraser is the pen tip
@@ -1497,7 +1497,7 @@ libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *
  * Returns the tool that was in use during this event.
  * By default, each tool will stay valid for as long as it is being used, and is
  * destroyed when another tool comes into proximity. However, the lifetime of
- * the tool may be extended by using libinput_tool_ref() to increment the
+ * the tool may be extended by using libinput_tablet_tool_ref() to increment the
  * reference count of the tool. This guarantees that whenever the tool comes
  * back into proximity of the tablet, that the same structure will be used to
  * represent the tool.
@@ -1611,17 +1611,17 @@ libinput_event_tablet_tool_get_time_usec(struct libinput_event_tablet_tool *even
  * @param tool The libinput tool
  * @return The tool type for this tool object
  *
- * @see libinput_tool_get_tool_id
+ * @see libinput_tablet_tool_get_tool_id
  */
 enum libinput_tablet_tool_type
-libinput_tool_get_type(struct libinput_tablet_tool *tool);
+libinput_tablet_tool_get_type(struct libinput_tablet_tool *tool);
 
 /**
  * @ingroup event_tablet
  *
  * Return the tool ID for a tool object. If nonzero, this number identifies
  * the specific type of the tool with more precision than the type returned in
- * libinput_tool_get_type(). Not all tablets support a tool ID.
+ * libinput_tablet_tool_get_type(). Not all tablets support a tool ID.
  *
  * Tablets known to support tool IDs include the Wacom Intuos 3, 4, 5, Wacom
  * Cintiq and Wacom Intuos Pro series.
@@ -1629,10 +1629,10 @@ libinput_tool_get_type(struct libinput_tablet_tool *tool);
  * @param tool The libinput tool
  * @return The tool ID for this tool object or 0 if none is provided
  *
- * @see libinput_tool_get_type
+ * @see libinput_tablet_tool_get_type
  */
 uint64_t
-libinput_tool_get_tool_id(struct libinput_tablet_tool *tool);
+libinput_tablet_tool_get_tool_id(struct libinput_tablet_tool *tool);
 
 /**
  * @ingroup event_tablet
@@ -1643,7 +1643,7 @@ libinput_tool_get_tool_id(struct libinput_tablet_tool *tool);
  * @return The passed tool
  */
 struct libinput_tablet_tool *
-libinput_tool_ref(struct libinput_tablet_tool *tool);
+libinput_tablet_tool_ref(struct libinput_tablet_tool *tool);
 
 /**
  * @ingroup event_tablet
@@ -1655,8 +1655,8 @@ libinput_tool_ref(struct libinput_tablet_tool *tool);
  * @return Whether or not the axis is supported
  */
 int
-libinput_tool_has_axis(struct libinput_tablet_tool *tool,
-		       enum libinput_tablet_tool_axis axis);
+libinput_tablet_tool_has_axis(struct libinput_tablet_tool *tool,
+			      enum libinput_tablet_tool_axis axis);
 
 /**
  * @ingroup event_tablet
@@ -1670,8 +1670,8 @@ libinput_tool_has_axis(struct libinput_tablet_tool *tool,
  * @return 1 if the tool supports this button code, 0 if it does not
  */
 int
-libinput_tool_has_button(struct libinput_tablet_tool *tool,
-		         uint32_t code);
+libinput_tablet_tool_has_button(struct libinput_tablet_tool *tool,
+				uint32_t code);
 
 /**
  * @ingroup event_tablet
@@ -1683,7 +1683,7 @@ libinput_tool_has_button(struct libinput_tablet_tool *tool,
  * @return NULL if the tool was destroyed otherwise the passed tool
  */
 struct libinput_tablet_tool *
-libinput_tool_unref(struct libinput_tablet_tool *tool);
+libinput_tablet_tool_unref(struct libinput_tablet_tool *tool);
 
 /**
  * @ingroup event_tablet
@@ -1698,7 +1698,7 @@ libinput_tool_unref(struct libinput_tablet_tool *tool);
  * @return The new tool serial triggering this event
  */
 uint64_t
-libinput_tool_get_serial(struct libinput_tablet_tool *tool);
+libinput_tablet_tool_get_serial(struct libinput_tablet_tool *tool);
 
 /**
  * @ingroup event_tablet
@@ -1709,7 +1709,7 @@ libinput_tool_get_serial(struct libinput_tablet_tool *tool);
  * @return The user data associated with the tool object
  */
 void *
-libinput_tool_get_user_data(struct libinput_tablet_tool *tool);
+libinput_tablet_tool_get_user_data(struct libinput_tablet_tool *tool);
 
 /**
  * @ingroup event_tablet
@@ -1720,8 +1720,8 @@ libinput_tool_get_user_data(struct libinput_tablet_tool *tool);
  * @param user_data The user data to associate with the tool object
  */
 void
-libinput_tool_set_user_data(struct libinput_tablet_tool *tool,
-			    void *user_data);
+libinput_tablet_tool_set_user_data(struct libinput_tablet_tool *tool,
+				   void *user_data);
 
 /**
  * @defgroup base Initialization and manipulation of libinput contexts
diff --git a/src/libinput.sym b/src/libinput.sym
index 5f9cbef..1704903 100644
--- a/src/libinput.sym
+++ b/src/libinput.sym
@@ -200,13 +200,13 @@ LIBINPUT_TABLET_SUPPORT {
 	libinput_event_tablet_tool_get_x_transformed;
 	libinput_event_tablet_tool_get_y_transformed;
 	libinput_event_tablet_tool_get_time_usec;
-	libinput_tool_get_serial;
-	libinput_tool_get_tool_id;
-	libinput_tool_get_type;
-	libinput_tool_get_user_data;
-	libinput_tool_has_button;
-	libinput_tool_has_axis;
-	libinput_tool_ref;
-	libinput_tool_set_user_data;
-	libinput_tool_unref;
+	libinput_tablet_tool_get_serial;
+	libinput_tablet_tool_get_tool_id;
+	libinput_tablet_tool_get_type;
+	libinput_tablet_tool_get_user_data;
+	libinput_tablet_tool_has_button;
+	libinput_tablet_tool_has_axis;
+	libinput_tablet_tool_ref;
+	libinput_tablet_tool_set_user_data;
+	libinput_tablet_tool_unref;
 } LIBINPUT_1.1;
diff --git a/test/tablet.c b/test/tablet.c
index 8c6a273..c268045 100644
--- a/test/tablet.c
+++ b/test/tablet.c
@@ -592,7 +592,7 @@ START_TEST(proximity_in_out)
 			have_tool_update++;
 			tablet_event = libinput_event_get_tablet_tool_event(event);
 			tool = libinput_event_tablet_tool_get_tool(tablet_event);
-			ck_assert_int_eq(libinput_tool_get_type(tool),
+			ck_assert_int_eq(libinput_tablet_tool_get_type(tool),
 					 LIBINPUT_TABLET_TOOL_TYPE_PEN);
 		}
 		libinput_event_destroy(event);
@@ -734,7 +734,7 @@ START_TEST(proximity_has_axes)
 	litest_assert_double_ne(x, 0);
 	litest_assert_double_ne(y, 0);
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE)) {
 		ck_assert(libinput_event_tablet_tool_axis_has_changed(
 				tablet_event,
 				LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
@@ -745,8 +745,8 @@ START_TEST(proximity_has_axes)
 		litest_assert_double_ne(distance, 0);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) &&
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) &&
+	    libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 		ck_assert(libinput_event_tablet_tool_axis_has_changed(
 				tablet_event,
 				LIBINPUT_TABLET_TOOL_AXIS_TILT_X));
@@ -781,12 +781,12 @@ START_TEST(proximity_has_axes)
 						      LIBINPUT_TABLET_TOOL_AXIS_X);
 	last_y = libinput_event_tablet_tool_get_axis_value(tablet_event,
 						      LIBINPUT_TABLET_TOOL_AXIS_Y);
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE))
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE))
 		last_distance = libinput_event_tablet_tool_get_axis_value(
 					     tablet_event,
 					     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)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) &&
+	    libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 		last_tx = libinput_event_tablet_tool_get_axis_value(
 						tablet_event,
 						LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
@@ -818,7 +818,7 @@ START_TEST(proximity_has_axes)
 	litest_assert_double_eq(x, last_x);
 	litest_assert_double_eq(y, last_y);
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE)) {
 		ck_assert(!libinput_event_tablet_tool_axis_has_changed(
 				tablet_event,
 				LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
@@ -829,8 +829,8 @@ START_TEST(proximity_has_axes)
 		litest_assert_double_eq(distance, last_distance);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) &&
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) &&
+	    libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 		ck_assert(!libinput_event_tablet_tool_axis_has_changed(
 				tablet_event,
 				LIBINPUT_TABLET_TOOL_AXIS_TILT_X));
@@ -1454,7 +1454,7 @@ START_TEST(tool_serial)
 	event = libinput_get_event(li);
 	tablet_event = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(tablet_event);
-	ck_assert_uint_eq(libinput_tool_get_serial(tool), 1000);
+	ck_assert_uint_eq(libinput_tablet_tool_get_serial(tool), 1000);
 	libinput_event_destroy(event);
 }
 END_TEST
@@ -1487,7 +1487,7 @@ START_TEST(serial_changes_tool)
 	tablet_event = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(tablet_event);
 
-	ck_assert_uint_eq(libinput_tool_get_serial(tool), 2000);
+	ck_assert_uint_eq(libinput_tablet_tool_get_serial(tool), 2000);
 	libinput_event_destroy(event);
 }
 END_TEST
@@ -1520,7 +1520,7 @@ START_TEST(invalid_serials)
 			tablet_event = libinput_event_get_tablet_tool_event(event);
 			tool = libinput_event_tablet_tool_get_tool(tablet_event);
 
-			ck_assert_uint_eq(libinput_tool_get_serial(tool), 1000);
+			ck_assert_uint_eq(libinput_tablet_tool_get_serial(tool), 1000);
 		}
 
 		libinput_event_destroy(event);
@@ -1550,9 +1550,9 @@ START_TEST(tool_ref)
 	tool = libinput_event_tablet_tool_get_tool(tablet_event);
 
 	ck_assert_notnull(tool);
-	ck_assert(tool == libinput_tool_ref(tool));
-	ck_assert(tool == libinput_tool_unref(tool));
-	ck_assert(libinput_tool_unref(tool) == NULL);
+	ck_assert(tool == libinput_tablet_tool_ref(tool));
+	ck_assert(tool == libinput_tablet_tool_unref(tool));
+	ck_assert(libinput_tablet_tool_unref(tool) == NULL);
 
 	libinput_event_destroy(event);
 }
@@ -1732,13 +1732,13 @@ START_TEST(tool_capabilities)
 	t = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(t);
 
-	ck_assert(libinput_tool_has_axis(tool,
+	ck_assert(libinput_tablet_tool_has_axis(tool,
 					 LIBINPUT_TABLET_TOOL_AXIS_PRESSURE));
-	ck_assert(libinput_tool_has_axis(tool,
+	ck_assert(libinput_tablet_tool_has_axis(tool,
 					 LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
-	ck_assert(!libinput_tool_has_axis(tool,
+	ck_assert(!libinput_tablet_tool_has_axis(tool,
 					  LIBINPUT_TABLET_TOOL_AXIS_TILT_X));
-	ck_assert(!libinput_tool_has_axis(tool,
+	ck_assert(!libinput_tablet_tool_has_axis(tool,
 					  LIBINPUT_TABLET_TOOL_AXIS_TILT_Y));
 
 	libinput_event_destroy(event);
@@ -1755,13 +1755,13 @@ START_TEST(tool_capabilities)
 	t = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(t);
 
-	ck_assert(libinput_tool_has_axis(tool,
+	ck_assert(libinput_tablet_tool_has_axis(tool,
 					 LIBINPUT_TABLET_TOOL_AXIS_PRESSURE));
-	ck_assert(libinput_tool_has_axis(tool,
+	ck_assert(libinput_tablet_tool_has_axis(tool,
 					 LIBINPUT_TABLET_TOOL_AXIS_DISTANCE));
-	ck_assert(libinput_tool_has_axis(tool,
+	ck_assert(libinput_tablet_tool_has_axis(tool,
 					 LIBINPUT_TABLET_TOOL_AXIS_TILT_X));
-	ck_assert(libinput_tool_has_axis(tool,
+	ck_assert(libinput_tablet_tool_has_axis(tool,
 					 LIBINPUT_TABLET_TOOL_AXIS_TILT_Y));
 
 	libinput_event_destroy(event);
@@ -1851,7 +1851,7 @@ START_TEST(mouse_tool)
 	tev = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(tev);
 	ck_assert_notnull(tool);
-	ck_assert_int_eq(libinput_tool_get_type(tool),
+	ck_assert_int_eq(libinput_tablet_tool_get_type(tool),
 			 LIBINPUT_TABLET_TOOL_TYPE_MOUSE);
 
 	libinput_event_destroy(event);
@@ -1886,7 +1886,7 @@ START_TEST(mouse_buttons)
 	tev = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(tev);
 	ck_assert_notnull(tool);
-	libinput_tool_ref(tool);
+	libinput_tablet_tool_ref(tool);
 
 	libinput_event_destroy(event);
 
@@ -1895,7 +1895,7 @@ START_TEST(mouse_buttons)
 							  EV_KEY,
 							  code);
 		ck_assert_int_eq(!!has_button,
-				 !!libinput_tool_has_button(tool, code));
+				 !!libinput_tablet_tool_has_button(tool, code));
 
 		if (!has_button)
 			continue;
@@ -1915,7 +1915,7 @@ START_TEST(mouse_buttons)
 					  LIBINPUT_BUTTON_STATE_RELEASED);
 	}
 
-	libinput_tool_unref(tool);
+	libinput_tablet_tool_unref(tool);
 }
 END_TEST
 
@@ -2025,11 +2025,11 @@ START_TEST(mouse_wheel)
 	tev = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(tev);
 	ck_assert_notnull(tool);
-	libinput_tool_ref(tool);
+	libinput_tablet_tool_ref(tool);
 
 	libinput_event_destroy(event);
 
-	ck_assert(libinput_tool_has_axis(tool,
+	ck_assert(libinput_tablet_tool_has_axis(tool,
 					 LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL));
 
 	for (i = 0; i < 3; i++) {
@@ -2090,7 +2090,7 @@ START_TEST(mouse_wheel)
 		litest_assert_empty_queue(li);
 	}
 
-	libinput_tool_unref(tool);
+	libinput_tablet_tool_unref(tool);
 }
 END_TEST
 
@@ -2120,7 +2120,7 @@ START_TEST(airbrush_tool)
 	tev = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(tev);
 	ck_assert_notnull(tool);
-	ck_assert_int_eq(libinput_tool_get_type(tool),
+	ck_assert_int_eq(libinput_tablet_tool_get_type(tool),
 			 LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH);
 
 	libinput_event_destroy(event);
@@ -2207,9 +2207,9 @@ START_TEST(artpen_tool)
 	tev = libinput_event_get_tablet_tool_event(event);
 	tool = libinput_event_tablet_tool_get_tool(tev);
 	ck_assert_notnull(tool);
-	ck_assert_int_eq(libinput_tool_get_type(tool),
+	ck_assert_int_eq(libinput_tablet_tool_get_type(tool),
 			 LIBINPUT_TABLET_TOOL_TYPE_PEN);
-	ck_assert(libinput_tool_has_axis(tool,
+	ck_assert(libinput_tablet_tool_has_axis(tool,
 					 LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z));
 
 	libinput_event_destroy(event);
diff --git a/tools/event-debug.c b/tools/event-debug.c
index 3b853c2..ec4c43b 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -354,8 +354,8 @@ print_tablet_axes(struct libinput_event_tablet_tool *t)
 	       y, tablet_axis_changed_sym(t, LIBINPUT_TABLET_TOOL_AXIS_Y),
 	       dx, dy);
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) ||
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) ||
+	    libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y)) {
 		x = libinput_event_tablet_tool_get_axis_value(t,
 					 LIBINPUT_TABLET_TOOL_AXIS_TILT_X);
 		y = libinput_event_tablet_tool_get_axis_value(t,
@@ -372,8 +372,8 @@ print_tablet_axes(struct libinput_event_tablet_tool *t)
 		       dx, dy);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE) ||
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE) ||
+	    libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE)) {
 		dist = libinput_event_tablet_tool_get_axis_value(t,
 					LIBINPUT_TABLET_TOOL_AXIS_DISTANCE);
 		pressure = libinput_event_tablet_tool_get_axis_value(t,
@@ -397,7 +397,7 @@ print_tablet_axes(struct libinput_event_tablet_tool *t)
 		}
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z)) {
 		rotation = libinput_event_tablet_tool_get_axis_value(t,
 					LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z);
 		delta = libinput_event_tablet_tool_get_axis_delta(t,
@@ -409,7 +409,7 @@ print_tablet_axes(struct libinput_event_tablet_tool *t)
 		       delta);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER)) {
 		slider = libinput_event_tablet_tool_get_axis_value(t,
 					LIBINPUT_TABLET_TOOL_AXIS_SLIDER);
 		delta = libinput_event_tablet_tool_get_axis_delta(t,
@@ -421,7 +421,7 @@ print_tablet_axes(struct libinput_event_tablet_tool *t)
 		       delta);
 	}
 
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL)) {
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL)) {
 		wheel = libinput_event_tablet_tool_get_axis_value(t,
 					LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL);
 		delta = libinput_event_tablet_tool_get_axis_delta_discrete(t,
@@ -462,7 +462,7 @@ print_proximity_event(struct libinput_event *ev)
 	const char *tool_str,
 	           *state_str;
 
-	switch (libinput_tool_get_type(tool)) {
+	switch (libinput_tablet_tool_get_type(tool)) {
 	case LIBINPUT_TABLET_TOOL_TYPE_PEN:
 		tool_str = "pen";
 		break;
@@ -507,41 +507,41 @@ print_proximity_event(struct libinput_event *ev)
 
 	printf("\t%s (%#" PRIx64 ", id %#" PRIx64 ") %s",
 	       tool_str,
-	       libinput_tool_get_serial(tool),
-	       libinput_tool_get_tool_id(tool),
+	       libinput_tablet_tool_get_serial(tool),
+	       libinput_tablet_tool_get_tool_id(tool),
 	       state_str);
 
 	printf("\taxes:");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE))
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE))
 		printf("d");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE))
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE))
 		printf("p");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) ||
-	    libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y))
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X) ||
+	    libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y))
 		printf("t");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z))
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z))
 		printf("r");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER))
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER))
 		printf("s");
-	if (libinput_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL))
+	if (libinput_tablet_tool_has_axis(tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL))
 		printf("w");
 
 	printf("\tbtn:");
-	if (libinput_tool_has_button(tool, BTN_TOUCH))
+	if (libinput_tablet_tool_has_button(tool, BTN_TOUCH))
 		printf("T");
-	if (libinput_tool_has_button(tool, BTN_STYLUS))
+	if (libinput_tablet_tool_has_button(tool, BTN_STYLUS))
 		printf("S");
-	if (libinput_tool_has_button(tool, BTN_STYLUS2))
+	if (libinput_tablet_tool_has_button(tool, BTN_STYLUS2))
 		printf("S2");
-	if (libinput_tool_has_button(tool, BTN_LEFT))
+	if (libinput_tablet_tool_has_button(tool, BTN_LEFT))
 		printf("L");
-	if (libinput_tool_has_button(tool, BTN_MIDDLE))
+	if (libinput_tablet_tool_has_button(tool, BTN_MIDDLE))
 		printf("M");
-	if (libinput_tool_has_button(tool, BTN_RIGHT))
+	if (libinput_tablet_tool_has_button(tool, BTN_RIGHT))
 		printf("R");
-	if (libinput_tool_has_button(tool, BTN_SIDE))
+	if (libinput_tablet_tool_has_button(tool, BTN_SIDE))
 		printf("Sd");
-	if (libinput_tool_has_button(tool, BTN_EXTRA))
+	if (libinput_tablet_tool_has_button(tool, BTN_EXTRA))
 		printf("Ex");
 
 	printf("\n");
-- 
2.5.0



More information about the wayland-devel mailing list