mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-12 04:30:23 +01:00
tablet: rename TOOL_PROXIMITY_ to TABLET_TOOL_PROXIMITY
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
a22b94a22c
commit
cc2b45dd50
6 changed files with 15 additions and 15 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue