[PATCH libinput 10/14] tablet: rename the tablet capability to a tablet_tool capability

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


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev.c                   |  2 +-
 src/libinput.c                |  2 +-
 src/libinput.h                | 18 +++++++++---------
 tools/event-debug.c           |  2 +-
 tools/libinput-list-devices.c |  2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index a3a72ef..e2bbdc3 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2418,7 +2418,7 @@ evdev_device_has_capability(struct evdev_device *device,
 		return !!(device->seat_caps & EVDEV_DEVICE_TOUCH);
 	case LIBINPUT_DEVICE_CAP_GESTURE:
 		return !!(device->seat_caps & EVDEV_DEVICE_GESTURE);
-	case LIBINPUT_DEVICE_CAP_TABLET:
+	case LIBINPUT_DEVICE_CAP_TABLET_TOOL:
 		return !!(device->seat_caps & EVDEV_DEVICE_TABLET);
 	default:
 		return 0;
diff --git a/src/libinput.c b/src/libinput.c
index 5308d8d..708399f 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1710,7 +1710,7 @@ device_has_cap(struct libinput_device *device,
 	case LIBINPUT_DEVICE_CAP_GESTURE:
 		capability = "CAP_GESTURE";
 		break;
-	case LIBINPUT_DEVICE_CAP_TABLET:
+	case LIBINPUT_DEVICE_CAP_TABLET_TOOL:
 		capability = "CAP_TABLET";
 		break;
 	}
diff --git a/src/libinput.h b/src/libinput.h
index ff1eaa6..8604284 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -58,7 +58,7 @@ enum libinput_device_capability {
 	LIBINPUT_DEVICE_CAP_KEYBOARD = 0,
 	LIBINPUT_DEVICE_CAP_POINTER = 1,
 	LIBINPUT_DEVICE_CAP_TOUCH = 2,
-	LIBINPUT_DEVICE_CAP_TABLET = 3,
+	LIBINPUT_DEVICE_CAP_TABLET_TOOL = 3,
 	LIBINPUT_DEVICE_CAP_GESTURE = 5,
 };
 
@@ -138,7 +138,7 @@ enum libinput_pointer_axis_source {
  * @ingroup device
  *
  * Available axis types for a device. It must have the @ref
- * LIBINPUT_DEVICE_CAP_TABLET capability.
+ * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
  */
 enum libinput_tablet_tool_axis {
 	LIBINPUT_TABLET_TOOL_AXIS_X = 1,
@@ -156,7 +156,7 @@ enum libinput_tablet_tool_axis {
  * @ingroup device
  *
  * An object representing a tool being used by a device with the @ref
- * LIBINPUT_DEVICE_CAP_TABLET capability.
+ * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
  *
  * Tablet events generated by such a device are bound to a specific tool
  * rather than coming from the device directly. Depending on the hardware it
@@ -169,7 +169,7 @@ struct libinput_tablet_tool;
  * @ingroup device
  *
  * Available tool types for a device with the @ref
- * LIBINPUT_DEVICE_CAP_TABLET capability. The tool type defines the default
+ * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability. The tool type defines the default
  * usage of the tool as advertised by the manufacturer. Multiple different
  * 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
@@ -201,7 +201,7 @@ enum libinput_tablet_tool_type {
  * @ingroup device
  *
  * The state of proximity for a tool on a device. The device must have the @ref
- * LIBINPUT_DEVICE_CAP_TABLET capability.
+ * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
  *
  * The proximity of a tool is a binary state signalling whether the tool is
  * within detectable distance of the tablet device. A tool that is out of
@@ -220,7 +220,7 @@ enum libinput_tablet_tool_proximity_state {
  * @ingroup device
  *
  * The tip contact state for a tool on a device. The device must have
- * the @ref LIBINPUT_DEVICE_CAP_TABLET capability.
+ * the @ref LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
  *
  * The tip contact state of a tool is a binary state signalling whether the tool is
  * touching the surface of the tablet device.
@@ -278,7 +278,7 @@ enum libinput_event_type {
 
 	/**
 	 * One or more axes have changed state on a device with the @ref
-	 * LIBINPUT_DEVICE_CAP_TABLET capability. This event is only sent
+	 * 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.
 	 *
@@ -292,7 +292,7 @@ enum libinput_event_type {
 	LIBINPUT_EVENT_TABLET_AXIS = 600,
 	/**
 	 * Signals that a tool has come in or out of proximity of a device with
-	 * the @ref LIBINPUT_DEVICE_CAP_TABLET capability.
+	 * 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
@@ -317,7 +317,7 @@ enum libinput_event_type {
 	LIBINPUT_EVENT_TABLET_PROXIMITY,
 	/**
 	 * Signals that a tool has come in contact with the surface of a
-	 * device with the @ref LIBINPUT_DEVICE_CAP_TABLET capability.
+	 * 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
diff --git a/tools/event-debug.c b/tools/event-debug.c
index c123917..c35acef 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -170,7 +170,7 @@ print_device_notify(struct libinput_event *ev)
 					   LIBINPUT_DEVICE_CAP_GESTURE))
 		printf("g");
 	if (libinput_device_has_capability(dev,
-					   LIBINPUT_DEVICE_CAP_TABLET))
+					   LIBINPUT_DEVICE_CAP_TABLET_TOOL))
 		printf("T");
 
 	if (libinput_device_get_size(dev, &w, &h) == 0)
diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c
index d9f71bd..62eb915 100644
--- a/tools/libinput-list-devices.c
+++ b/tools/libinput-list-devices.c
@@ -258,7 +258,7 @@ print_device_notify(struct libinput_event *ev)
 					   LIBINPUT_DEVICE_CAP_TOUCH))
 		printf("touch");
 	if (libinput_device_has_capability(dev,
-					   LIBINPUT_DEVICE_CAP_TABLET))
+					   LIBINPUT_DEVICE_CAP_TABLET_TOOL))
 		printf("tablet");
 	printf("\n");
 
-- 
2.5.0



More information about the wayland-devel mailing list