mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
tablet: add tablet tool scroll
This commit is contained in:
parent
50eae512d9
commit
5225a4ccce
9 changed files with 133 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ struct wlr_cursor {
|
|||
struct wl_signal tablet_tool_proximity;
|
||||
struct wl_signal tablet_tool_tip;
|
||||
struct wl_signal tablet_tool_button;
|
||||
struct wl_signal tablet_tool_axis_scroll;
|
||||
} events;
|
||||
|
||||
void *data;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include <stdint.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
|
||||
/*
|
||||
* Copy+Paste from libinput, but this should neither use libinput, nor
|
||||
|
|
@ -72,6 +73,7 @@ struct wlr_tablet {
|
|||
struct wl_signal proximity;
|
||||
struct wl_signal tip;
|
||||
struct wl_signal button;
|
||||
struct wl_signal axis_scroll;
|
||||
} events;
|
||||
|
||||
struct wl_array paths; // char *
|
||||
|
|
@ -145,6 +147,16 @@ struct wlr_tablet_tool_button_event {
|
|||
enum wlr_button_state state;
|
||||
};
|
||||
|
||||
struct wlr_tablet_tool_axis_scroll_event {
|
||||
struct wlr_tablet *tablet;
|
||||
struct wlr_tablet_tool *tool;
|
||||
uint32_t time_msec;
|
||||
enum wl_pointer_axis_source source;
|
||||
enum wl_pointer_axis orientation;
|
||||
enum wl_pointer_axis_relative_direction relative_direction;
|
||||
double delta;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a struct wlr_tablet from a struct wlr_input_device.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -179,6 +179,11 @@ void wlr_send_tablet_v2_tablet_tool_button(
|
|||
struct wlr_tablet_v2_tablet_tool *tool, uint32_t button,
|
||||
enum zwp_tablet_pad_v2_button_state state);
|
||||
|
||||
void wlr_send_tablet_v2_tablet_tool_axis_scroll(
|
||||
struct wlr_tablet_v2_tablet_tool *tool, uint32_t time_msec,
|
||||
enum wl_pointer_axis orientation, double value,
|
||||
enum wl_pointer_axis_source source,
|
||||
enum wl_pointer_axis_relative_direction relative_direction);
|
||||
|
||||
|
||||
void wlr_tablet_v2_tablet_tool_notify_proximity_in(
|
||||
|
|
@ -217,6 +222,12 @@ void wlr_tablet_v2_tablet_tool_notify_button(
|
|||
struct wlr_tablet_v2_tablet_tool *tool, uint32_t button,
|
||||
enum zwp_tablet_pad_v2_button_state state);
|
||||
|
||||
void wlr_tablet_v2_tablet_tool_notify_scroll(
|
||||
struct wlr_tablet_v2_tablet_tool *tool, uint32_t time_msec,
|
||||
enum wl_pointer_axis orientation, double value,
|
||||
enum wl_pointer_axis_source source,
|
||||
enum wl_pointer_axis_relative_direction relative_direction);
|
||||
|
||||
|
||||
struct wlr_tablet_tool_v2_grab_interface {
|
||||
void (*proximity_in)(
|
||||
|
|
@ -246,6 +257,13 @@ struct wlr_tablet_tool_v2_grab_interface {
|
|||
void (*button)(
|
||||
struct wlr_tablet_tool_v2_grab *grab, uint32_t button,
|
||||
enum zwp_tablet_pad_v2_button_state state);
|
||||
|
||||
void (*axis_scroll)(
|
||||
struct wlr_tablet_tool_v2_grab *grab, uint32_t time_msec,
|
||||
enum wl_pointer_axis orientation, double value,
|
||||
enum wl_pointer_axis_source source,
|
||||
enum wl_pointer_axis_relative_direction relative_direction);
|
||||
|
||||
void (*cancel)(struct wlr_tablet_tool_v2_grab *grab);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue