aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-02-28 10:15:13 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2024-02-28 16:39:18 +0000
commit9f4cf242d9f51922c1bb364d9b11a1ed83f518fb (patch)
treebe1a9563ca550f076c24196eb751b27f0436d108 /include
parentc45e97f3a54e9ebef6b90e92d2fda068b3f5e269 (diff)
pointer: drop enum wlr_axis_source
Instead, use enum wl_pointer_axis_source from the Wayland protocol.
Diffstat (limited to 'include')
-rw-r--r--include/backend/libinput.h2
-rw-r--r--include/backend/wayland.h2
-rw-r--r--include/wlr/types/wlr_pointer.h9
-rw-r--r--include/wlr/types/wlr_seat.h8
4 files changed, 7 insertions, 14 deletions
diff --git a/include/backend/libinput.h b/include/backend/libinput.h
index 2b8babb4..910af47f 100644
--- a/include/backend/libinput.h
+++ b/include/backend/libinput.h
@@ -72,7 +72,7 @@ void handle_pointer_axis(struct libinput_event *event,
struct wlr_pointer *pointer);
#if HAVE_LIBINPUT_SCROLL_VALUE120
void handle_pointer_axis_value120(struct libinput_event *event,
- struct wlr_pointer *pointer, enum wlr_axis_source source);
+ struct wlr_pointer *pointer, enum wl_pointer_axis_source source);
#endif
void handle_pointer_swipe_begin(struct libinput_event *event,
struct wlr_pointer *pointer);
diff --git a/include/backend/wayland.h b/include/backend/wayland.h
index f8fb66ba..273aa4f7 100644
--- a/include/backend/wayland.h
+++ b/include/backend/wayland.h
@@ -106,7 +106,7 @@ struct wlr_wl_pointer {
struct wlr_wl_seat *seat;
struct wlr_wl_output *output;
- enum wlr_axis_source axis_source;
+ enum wl_pointer_axis_source axis_source;
int32_t axis_discrete;
uint32_t fingers; // trackpad gesture
enum wlr_axis_relative_direction axis_relative_direction;
diff --git a/include/wlr/types/wlr_pointer.h b/include/wlr/types/wlr_pointer.h
index e4740550..240b69d6 100644
--- a/include/wlr/types/wlr_pointer.h
+++ b/include/wlr/types/wlr_pointer.h
@@ -66,13 +66,6 @@ struct wlr_pointer_button_event {
enum wlr_button_state state;
};
-enum wlr_axis_source {
- WLR_AXIS_SOURCE_WHEEL,
- WLR_AXIS_SOURCE_FINGER,
- WLR_AXIS_SOURCE_CONTINUOUS,
- WLR_AXIS_SOURCE_WHEEL_TILT,
-};
-
enum wlr_axis_orientation {
WLR_AXIS_ORIENTATION_VERTICAL,
WLR_AXIS_ORIENTATION_HORIZONTAL,
@@ -88,7 +81,7 @@ enum wlr_axis_relative_direction {
struct wlr_pointer_axis_event {
struct wlr_pointer *pointer;
uint32_t time_msec;
- enum wlr_axis_source source;
+ enum wl_pointer_axis_source source;
enum wlr_axis_orientation orientation;
enum wlr_axis_relative_direction relative_direction;
double delta;
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index bafd00ad..b6d80f15 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -101,7 +101,7 @@ struct wlr_pointer_grab_interface {
uint32_t button, enum wlr_button_state state);
void (*axis)(struct wlr_seat_pointer_grab *grab, uint32_t time_msec,
enum wlr_axis_orientation orientation, double value,
- int32_t value_discrete, enum wlr_axis_source source,
+ int32_t value_discrete, enum wl_pointer_axis_source source,
enum wlr_axis_relative_direction relative_direction);
void (*frame)(struct wlr_seat_pointer_grab *grab);
void (*cancel)(struct wlr_seat_pointer_grab *grab);
@@ -182,7 +182,7 @@ struct wlr_seat_pointer_state {
struct wlr_seat_pointer_grab *default_grab;
bool sent_axis_source;
- enum wlr_axis_source cached_axis_source;
+ enum wl_pointer_axis_source cached_axis_source;
uint32_t buttons[WLR_POINTER_BUTTONS_CAP];
size_t button_count;
@@ -408,7 +408,7 @@ uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat,
*/
void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time_msec,
enum wlr_axis_orientation orientation, double value,
- int32_t value_discrete, enum wlr_axis_source source,
+ int32_t value_discrete, enum wl_pointer_axis_source source,
enum wlr_axis_relative_direction relative_direction);
/**
@@ -460,7 +460,7 @@ uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
*/
void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time_msec,
enum wlr_axis_orientation orientation, double value,
- int32_t value_discrete, enum wlr_axis_source source,
+ int32_t value_discrete, enum wl_pointer_axis_source source,
enum wlr_axis_relative_direction relative_direction);
/**