[PATCH libinput 02/14] tablet: rename libinput_tablet_axis to libinput_tablet_tool_axis
Peter Hutterer
peter.hutterer at who-t.net
Tue Nov 17 20:17:49 PST 2015
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev-tablet.c | 14 +++++++-------
src/evdev-tablet.h | 10 +++++-----
src/libinput.c | 10 +++++-----
src/libinput.h | 12 ++++++------
tools/event-debug.c | 2 +-
5 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 7537e21..d1ffe09 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -69,7 +69,7 @@ tablet_get_released_buttons(struct tablet_dispatch *tablet,
static int
tablet_device_has_axis(struct tablet_dispatch *tablet,
- enum libinput_tablet_axis axis)
+ enum libinput_tablet_tool_axis axis)
{
struct libevdev *evdev = tablet->device->evdev;
bool has_axis = false;
@@ -109,7 +109,7 @@ tablet_process_absolute(struct tablet_dispatch *tablet,
struct input_event *e,
uint64_t time)
{
- enum libinput_tablet_axis axis;
+ enum libinput_tablet_tool_axis axis;
switch (e->code) {
case ABS_X:
@@ -158,7 +158,7 @@ static void
tablet_mark_all_axes_changed(struct tablet_dispatch *tablet,
struct evdev_device *device)
{
- enum libinput_tablet_axis a;
+ enum libinput_tablet_tool_axis a;
for (a = LIBINPUT_TABLET_AXIS_X; a <= LIBINPUT_TABLET_AXIS_MAX; a++) {
if (tablet_device_has_axis(tablet, a))
@@ -290,7 +290,7 @@ guess_wheel_delta(double current, double old)
}
static inline double
-get_delta(enum libinput_tablet_axis axis, double current, double old)
+get_delta(enum libinput_tablet_tool_axis axis, double current, double old)
{
double delta = 0;
@@ -529,7 +529,7 @@ tablet_process_relative(struct tablet_dispatch *tablet,
struct input_event *e,
uint64_t time)
{
- enum libinput_tablet_axis axis;
+ enum libinput_tablet_tool_axis axis;
switch (e->code) {
case REL_WHEEL:
@@ -577,7 +577,7 @@ tablet_process_misc(struct tablet_dispatch *tablet,
static inline void
copy_axis_cap(const struct tablet_dispatch *tablet,
struct libinput_tablet_tool *tool,
- enum libinput_tablet_axis axis)
+ enum libinput_tablet_tool_axis axis)
{
if (bit_is_set(tablet->axis_caps, axis))
set_bit(tool->axis_caps, axis);
@@ -1071,7 +1071,7 @@ static int
tablet_init(struct tablet_dispatch *tablet,
struct evdev_device *device)
{
- enum libinput_tablet_axis axis;
+ enum libinput_tablet_tool_axis axis;
tablet->base.interface = &tablet_interface;
tablet->device = device;
diff --git a/src/evdev-tablet.h b/src/evdev-tablet.h
index 9901b2a..36a3cec 100644
--- a/src/evdev-tablet.h
+++ b/src/evdev-tablet.h
@@ -67,10 +67,10 @@ struct tablet_dispatch {
uint32_t current_tool_serial;
};
-static inline enum libinput_tablet_axis
+static inline enum libinput_tablet_tool_axis
evcode_to_axis(const uint32_t evcode)
{
- enum libinput_tablet_axis axis;
+ enum libinput_tablet_tool_axis axis;
switch (evcode) {
case ABS_X:
@@ -105,10 +105,10 @@ evcode_to_axis(const uint32_t evcode)
return axis;
}
-static inline enum libinput_tablet_axis
+static inline enum libinput_tablet_tool_axis
rel_evcode_to_axis(const uint32_t evcode)
{
- enum libinput_tablet_axis axis;
+ enum libinput_tablet_tool_axis axis;
switch (evcode) {
case REL_WHEEL:
@@ -123,7 +123,7 @@ rel_evcode_to_axis(const uint32_t evcode)
}
static inline uint32_t
-axis_to_evcode(const enum libinput_tablet_axis axis)
+axis_to_evcode(const enum libinput_tablet_tool_axis axis)
{
uint32_t evcode;
diff --git a/src/libinput.c b/src/libinput.c
index b50f533..4d012d3 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -914,7 +914,7 @@ libinput_event_gesture_get_angle_delta(struct libinput_event_gesture *event)
LIBINPUT_EXPORT int
libinput_event_tablet_axis_has_changed(struct libinput_event_tablet *event,
- enum libinput_tablet_axis axis)
+ enum libinput_tablet_tool_axis axis)
{
require_event_type(libinput_event_get_context(&event->base),
event->base.type,
@@ -929,7 +929,7 @@ libinput_event_tablet_axis_has_changed(struct libinput_event_tablet *event,
LIBINPUT_EXPORT double
libinput_event_tablet_get_axis_value(struct libinput_event_tablet *event,
- enum libinput_tablet_axis axis)
+ enum libinput_tablet_tool_axis axis)
{
struct evdev_device *device =
(struct evdev_device *) event->base.device;
@@ -963,7 +963,7 @@ libinput_event_tablet_get_axis_value(struct libinput_event_tablet *event,
LIBINPUT_EXPORT double
libinput_event_tablet_get_axis_delta(struct libinput_event_tablet *event,
- enum libinput_tablet_axis axis)
+ enum libinput_tablet_tool_axis axis)
{
struct evdev_device *device =
(struct evdev_device *) event->base.device;
@@ -998,7 +998,7 @@ libinput_event_tablet_get_axis_delta(struct libinput_event_tablet *event,
LIBINPUT_EXPORT double
libinput_event_tablet_get_axis_delta_discrete(
struct libinput_event_tablet *event,
- enum libinput_tablet_axis axis)
+ enum libinput_tablet_tool_axis axis)
{
require_event_type(libinput_event_get_context(&event->base),
event->base.type,
@@ -1184,7 +1184,7 @@ libinput_tool_get_serial(struct libinput_tablet_tool *tool)
LIBINPUT_EXPORT int
libinput_tool_has_axis(struct libinput_tablet_tool *tool,
- enum libinput_tablet_axis axis)
+ enum libinput_tablet_tool_axis axis)
{
return bit_is_set(tool->axis_caps, axis);
}
diff --git a/src/libinput.h b/src/libinput.h
index bda1f9d..712a0bb 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -140,7 +140,7 @@ enum libinput_pointer_axis_source {
* Available axis types for a device. It must have the @ref
* LIBINPUT_DEVICE_CAP_TABLET capability.
*/
-enum libinput_tablet_axis {
+enum libinput_tablet_tool_axis {
LIBINPUT_TABLET_AXIS_X = 1,
LIBINPUT_TABLET_AXIS_Y = 2,
LIBINPUT_TABLET_AXIS_DISTANCE = 3,
@@ -1371,7 +1371,7 @@ libinput_event_tablet_get_base_event(struct libinput_event_tablet *event);
*/
int
libinput_event_tablet_axis_has_changed(struct libinput_event_tablet *event,
- enum libinput_tablet_axis axis);
+ enum libinput_tablet_tool_axis axis);
/**
* @ingroup event_tablet
@@ -1416,7 +1416,7 @@ libinput_event_tablet_axis_has_changed(struct libinput_event_tablet *event,
*/
double
libinput_event_tablet_get_axis_value(struct libinput_event_tablet *event,
- enum libinput_tablet_axis axis);
+ enum libinput_tablet_tool_axis axis);
/**
* @ingroup event_tablet
@@ -1435,7 +1435,7 @@ libinput_event_tablet_get_axis_value(struct libinput_event_tablet *event,
*/
double
libinput_event_tablet_get_axis_delta(struct libinput_event_tablet *event,
- enum libinput_tablet_axis axis);
+ enum libinput_tablet_tool_axis axis);
/**
* @ingroup event_tablet
@@ -1453,7 +1453,7 @@ libinput_event_tablet_get_axis_delta(struct libinput_event_tablet *event,
double
libinput_event_tablet_get_axis_delta_discrete(
struct libinput_event_tablet *event,
- enum libinput_tablet_axis axis);
+ enum libinput_tablet_tool_axis axis);
/**
* @ingroup event_tablet
@@ -1656,7 +1656,7 @@ libinput_tool_ref(struct libinput_tablet_tool *tool);
*/
int
libinput_tool_has_axis(struct libinput_tablet_tool *tool,
- enum libinput_tablet_axis axis);
+ enum libinput_tablet_tool_axis axis);
/**
* @ingroup event_tablet
diff --git a/tools/event-debug.c b/tools/event-debug.c
index bb818bc..b7237ab 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -328,7 +328,7 @@ print_pointer_axis_event(struct libinput_event *ev)
static const char*
tablet_axis_changed_sym(struct libinput_event_tablet *t,
- enum libinput_tablet_axis axis)
+ enum libinput_tablet_tool_axis axis)
{
if (libinput_event_tablet_axis_has_changed(t, axis))
return "*";
--
2.5.0
More information about the wayland-devel
mailing list