diff options
| author | Drew DeVault <sir@cmpwn.com> | 2017-06-15 16:15:12 -0400 | 
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2017-06-15 16:15:12 -0400 | 
| commit | def3d7c64f68d59c6daec5974afc3ca84fa4bda9 (patch) | |
| tree | 3022c631ba2cecf364f74d97dfb2ca3e0866268b /example/shared.h | |
| parent | 2443a070e75e33285b6d5ed0ce89c989956b9065 (diff) | |
| download | wlroots-def3d7c64f68d59c6daec5974afc3ca84fa4bda9.tar.xz | |
Add tablet example
Diffstat (limited to 'example/shared.h')
| -rw-r--r-- | example/shared.h | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/example/shared.h b/example/shared.h index d09bcd0e..df456c91 100644 --- a/example/shared.h +++ b/example/shared.h @@ -50,6 +50,17 @@ struct touch_state {  	void *data;  }; +struct tablet_tool_state { +	struct compositor_state *compositor; +	struct wlr_input_device *device; +	struct wl_listener axis; +	struct wl_listener proximity; +	struct wl_listener tip; +	struct wl_listener button; +	struct wl_list link; +	void *data; +}; +  struct compositor_state {  	void (*output_add_cb)(struct output_state *s);  	void (*keyboard_add_cb)(struct keyboard_state *s); @@ -72,6 +83,14 @@ struct compositor_state {  		double x, double y, double width, double height);  	void (*touch_up_cb)(struct touch_state *s, int32_t slot);  	void (*touch_cancel_cb)(struct touch_state *s, int32_t slot); +	void (*tool_axis_cb)(struct tablet_tool_state *s, +			struct wlr_tablet_tool_axis *event); +	void (*tool_proximity_cb)(struct tablet_tool_state *s, +			enum wlr_tablet_tool_proximity_state proximity); +	void (*tool_tip_cb)(struct tablet_tool_state *s, +			enum wlr_tablet_tool_tip_state state); +	void (*tool_button_cb)(struct tablet_tool_state *s, +			uint32_t button, enum wlr_button_state state);  	struct wl_display *display;  	struct wl_event_loop *event_loop; @@ -81,6 +100,7 @@ struct compositor_state {  	struct wl_list keyboards;  	struct wl_list pointers;  	struct wl_list touch; +	struct wl_list tablet_tools;  	struct wl_listener input_add;  	struct wl_listener input_remove; | 
