mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
Add support for discrete axis values
This commit is contained in:
parent
84609d347a
commit
0b58579564
12 changed files with 58 additions and 22 deletions
|
|
@ -72,6 +72,7 @@ struct wlr_wl_pointer {
|
|||
struct wlr_wl_input_device *input_device;
|
||||
struct wl_pointer *wl_pointer;
|
||||
enum wlr_axis_source axis_source;
|
||||
int32_t axis_discrete;
|
||||
struct wlr_wl_output *output;
|
||||
|
||||
struct wl_listener output_destroy;
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ struct wlr_event_pointer_axis {
|
|||
enum wlr_axis_source source;
|
||||
enum wlr_axis_orientation orientation;
|
||||
double delta;
|
||||
int32_t delta_discrete;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ struct wlr_pointer_grab_interface {
|
|||
uint32_t (*button)(struct wlr_seat_pointer_grab *grab, uint32_t time,
|
||||
uint32_t button, uint32_t state);
|
||||
void (*axis)(struct wlr_seat_pointer_grab *grab, uint32_t time,
|
||||
enum wlr_axis_orientation orientation, double value);
|
||||
enum wlr_axis_orientation orientation, double value,
|
||||
int32_t value_discrete);
|
||||
void (*cancel)(struct wlr_seat_pointer_grab *grab);
|
||||
};
|
||||
|
||||
|
|
@ -300,7 +301,8 @@ uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat, uint32_t time,
|
|||
* grabs.
|
||||
**/
|
||||
void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
||||
enum wlr_axis_orientation orientation, double value);
|
||||
enum wlr_axis_orientation orientation, double value,
|
||||
int32_t value_discrete);
|
||||
|
||||
/**
|
||||
* Start a grab of the pointer of this seat. The grabber is responsible for
|
||||
|
|
@ -341,7 +343,8 @@ uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
|
|||
* Notify the seat of an axis event.
|
||||
*/
|
||||
void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
||||
enum wlr_axis_orientation orientation, double value);
|
||||
enum wlr_axis_orientation orientation, double value,
|
||||
int32_t value_discrete);
|
||||
|
||||
/**
|
||||
* Whether or not the pointer has a grab other than the default grab.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue