[PATCH libinput 07/14] tablet: rename TOOL_PROXIMITY_ to TABLET_TOOL_PROXIMITY
Peter Hutterer
peter.hutterer at who-t.net
Tue Nov 17 20:17:54 PST 2015
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/evdev-tablet.c | 4 ++--
src/libinput.c | 6 +++---
src/libinput.h | 8 ++++----
test/tablet.c | 6 +++---
tools/event-debug.c | 4 ++--
tools/event-gui.c | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 3dfc005..040582b 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -403,7 +403,7 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
tablet_notify_proximity(&device->base,
time,
tool,
- LIBINPUT_TOOL_PROXIMITY_IN,
+ LIBINPUT_TABLET_TOOL_PROXIMITY_IN,
tablet->changed_axes,
axes);
else {
@@ -945,7 +945,7 @@ tablet_flush(struct tablet_dispatch *tablet,
tablet_notify_proximity(&device->base,
time,
tool,
- LIBINPUT_TOOL_PROXIMITY_OUT,
+ LIBINPUT_TABLET_TOOL_PROXIMITY_OUT,
tablet->changed_axes,
tablet->axes);
diff --git a/src/libinput.c b/src/libinput.c
index ab98d63..bd33b25 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1988,7 +1988,7 @@ tablet_notify_axis(struct libinput_device *device,
*axis_event = (struct libinput_event_tablet) {
.time = time,
.tool = tool,
- .proximity_state = LIBINPUT_TOOL_PROXIMITY_IN,
+ .proximity_state = LIBINPUT_TABLET_TOOL_PROXIMITY_IN,
.tip_state = tip_state,
};
@@ -2058,7 +2058,7 @@ tablet_notify_tip(struct libinput_device *device,
.time = time,
.tool = tool,
.tip_state = tip_state,
- .proximity_state = LIBINPUT_TOOL_PROXIMITY_IN,
+ .proximity_state = LIBINPUT_TABLET_TOOL_PROXIMITY_IN,
};
memcpy(tip_event->axes,
axes,
@@ -2096,7 +2096,7 @@ tablet_notify_button(struct libinput_device *device,
.button = button,
.state = state,
.seat_button_count = seat_button_count,
- .proximity_state = LIBINPUT_TOOL_PROXIMITY_IN,
+ .proximity_state = LIBINPUT_TABLET_TOOL_PROXIMITY_IN,
.tip_state = tip_state,
};
memcpy(button_event->axes, axes, sizeof(button_event->axes));
diff --git a/src/libinput.h b/src/libinput.h
index ae3006b..2a563f8 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -212,8 +212,8 @@ enum libinput_tablet_tool_type {
* distance (a few cm) off the surface.
*/
enum libinput_tablet_tool_proximity_state {
- LIBINPUT_TOOL_PROXIMITY_OUT = 0,
- LIBINPUT_TOOL_PROXIMITY_IN = 1,
+ LIBINPUT_TABLET_TOOL_PROXIMITY_OUT = 0,
+ LIBINPUT_TABLET_TOOL_PROXIMITY_IN = 1,
};
/**
@@ -299,9 +299,9 @@ enum libinput_event_type {
* with @ref LIBINPUT_EVENT_TABLET_AXIS events.
*
* Some tools may always be in proximity. For these tools, events of
- * type @ref LIBINPUT_TOOL_PROXIMITY_IN are sent only once after @ref
+ * type @ref LIBINPUT_TABLET_TOOL_PROXIMITY_IN are sent only once after @ref
* LIBINPUT_EVENT_DEVICE_ADDED, and events of type @ref
- * LIBINPUT_TOOL_PROXIMITY_OUT are sent only once before @ref
+ * LIBINPUT_TABLET_TOOL_PROXIMITY_OUT are sent only once before @ref
* LIBINPUT_EVENT_DEVICE_REMOVED.
*
* If the tool that comes into proximity supports x/y coordinates,
diff --git a/test/tablet.c b/test/tablet.c
index 0e77a20..50188d5 100644
--- a/test/tablet.c
+++ b/test/tablet.c
@@ -100,7 +100,7 @@ START_TEST(tip_down_prox_in)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_PROXIMITY);
ck_assert_int_eq(libinput_event_tablet_get_proximity_state(tablet_event),
- LIBINPUT_TOOL_PROXIMITY_IN);
+ LIBINPUT_TABLET_TOOL_PROXIMITY_IN);
libinput_event_destroy(event);
libinput_dispatch(li);
@@ -150,7 +150,7 @@ START_TEST(tip_up_prox_out)
tablet_event = litest_is_tablet_event(event,
LIBINPUT_EVENT_TABLET_PROXIMITY);
ck_assert_int_eq(libinput_event_tablet_get_proximity_state(tablet_event),
- LIBINPUT_TOOL_PROXIMITY_OUT);
+ LIBINPUT_TABLET_TOOL_PROXIMITY_OUT);
libinput_event_destroy(event);
litest_assert_empty_queue(li);
@@ -609,7 +609,7 @@ START_TEST(proximity_in_out)
libinput_event_get_tablet_event(event);
if (libinput_event_tablet_get_proximity_state(t) ==
- LIBINPUT_TOOL_PROXIMITY_OUT)
+ LIBINPUT_TABLET_TOOL_PROXIMITY_OUT)
have_proximity_out = true;
}
diff --git a/tools/event-debug.c b/tools/event-debug.c
index af67f61..5dc7505 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -495,10 +495,10 @@ print_proximity_event(struct libinput_event *ev)
print_event_time(libinput_event_tablet_get_time(t));
- if (state == LIBINPUT_TOOL_PROXIMITY_IN) {
+ if (state == LIBINPUT_TABLET_TOOL_PROXIMITY_IN) {
print_tablet_axes(t);
state_str = "proximity-in";
- } else if (state == LIBINPUT_TOOL_PROXIMITY_OUT) {
+ } else if (state == LIBINPUT_TABLET_TOOL_PROXIMITY_OUT) {
state_str = "proximity-out";
printf("\t");
} else {
diff --git a/tools/event-gui.c b/tools/event-gui.c
index 1a4f242..f4f22db 100644
--- a/tools/event-gui.c
+++ b/tools/event-gui.c
@@ -605,7 +605,7 @@ handle_event_tablet(struct libinput_event *ev, struct window *w)
switch (libinput_event_get_type(ev)) {
case LIBINPUT_EVENT_TABLET_PROXIMITY:
if (libinput_event_tablet_get_proximity_state(t) ==
- LIBINPUT_TOOL_PROXIMITY_OUT) {
+ LIBINPUT_TABLET_TOOL_PROXIMITY_OUT) {
w->tool.x_in = 0;
w->tool.y_in = 0;
w->tool.x_down = 0;
--
2.5.0
More information about the wayland-devel
mailing list