mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-21 06:59:44 -05:00
Basic tablet_v2 object lifetime
This commit is contained in:
parent
77bac448cc
commit
e235f7d336
10 changed files with 763 additions and 48 deletions
|
|
@ -40,6 +40,7 @@ struct roots_cursor {
|
|||
|
||||
struct wl_listener tool_axis;
|
||||
struct wl_listener tool_tip;
|
||||
struct wl_listener tool_proximity;
|
||||
|
||||
struct wl_listener request_set_cursor;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ struct roots_desktop {
|
|||
struct wlr_layer_shell *layer_shell;
|
||||
struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard;
|
||||
struct wlr_screencopy_manager_v1 *screencopy;
|
||||
struct wlr_tablet_manager_v2 *tablet_v2;
|
||||
|
||||
struct wl_listener new_output;
|
||||
struct wl_listener layout_change;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct wlr_tablet_pad {
|
|||
void *data;
|
||||
};
|
||||
|
||||
struct wlr_tablet_pad_group_v2 {
|
||||
struct wlr_tablet_pad_group {
|
||||
struct wl_list link;
|
||||
|
||||
size_t button_count;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ enum wlr_tablet_tool_type {
|
|||
Wacom Inking Pen */
|
||||
WLR_TABLET_TOOL_TYPE_AIRBRUSH, /**< An airbrush-like tool */
|
||||
WLR_TABLET_TOOL_TYPE_MOUSE, /**< A mouse bound to the tablet */
|
||||
WLR_TABLET_TOOL_TYPE_LENS, /**< A mouse tool with a lens */
|
||||
WLR_TABLET_TOOL_TYPE_LENS, /**< A mouse tool with a lens */
|
||||
};
|
||||
|
||||
struct wlr_tablet_tool_tool {
|
||||
|
|
|
|||
62
include/wlr/types/wlr_tablet_v2.h
Normal file
62
include/wlr/types/wlr_tablet_v2.h
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#ifndef WLR_TYPES_WLR_TABLET_V2_H
|
||||
#define WLR_TYPES_WLR_TABLET_V2_H
|
||||
|
||||
#include <wayland-server.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
|
||||
struct wlr_tablet_manager_v2 {
|
||||
struct wl_global *wl_global;
|
||||
struct wl_list clients; // wlr_tablet_manager_client_v2::link
|
||||
struct wl_list seats; // wlr_tablet_seat_v2::link
|
||||
|
||||
struct wl_listener display_destroy;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct wlr_tablet_v2_tablet {
|
||||
struct wl_list link; // wlr_tablet_seat_v2::tablets
|
||||
struct wlr_tablet_tool *wlr_tool;
|
||||
struct wlr_input_device *wlr_device;
|
||||
struct wl_list clients; // wlr_tablet_client_v2::tablet_link
|
||||
|
||||
struct wl_listener tool_destroy;
|
||||
};
|
||||
|
||||
struct wlr_tablet_v2_tablet_tool {
|
||||
struct wl_list link; // wlr_tablet_seat_v2::tablets
|
||||
struct wlr_tablet_tool_tool *wlr_tool;
|
||||
struct wl_list clients; // wlr_tablet_tool_client_v2::tablet_link
|
||||
|
||||
struct wl_listener tool_destroy;
|
||||
};
|
||||
|
||||
struct wlr_tablet_v2_tablet_pad {
|
||||
struct wl_list link; // wlr_tablet_seat_v2::pads
|
||||
struct wlr_tablet_pad *wlr_pad;
|
||||
struct wlr_input_device *wlr_device;
|
||||
struct wl_list clients; // wlr_tablet_pad_client_v2::tablet_link
|
||||
|
||||
struct wl_listener pad_destroy;
|
||||
};
|
||||
|
||||
struct wlr_tablet_v2_tablet *wlr_make_tablet(
|
||||
struct wlr_tablet_manager_v2 *manager,
|
||||
struct wlr_seat *wlr_seat,
|
||||
struct wlr_input_device *wlr_device);
|
||||
|
||||
struct wlr_tablet_v2_tablet_pad *wlr_make_tablet_pad(
|
||||
struct wlr_tablet_manager_v2 *manager,
|
||||
struct wlr_seat *wlr_seat,
|
||||
struct wlr_input_device *wlr_device);
|
||||
|
||||
struct wlr_tablet_v2_tablet_tool *wlr_make_tablet_tool(
|
||||
struct wlr_tablet_manager_v2 *manager,
|
||||
struct wlr_seat *wlr_seat,
|
||||
struct wlr_tablet_tool_tool *wlr_tool);
|
||||
|
||||
struct wlr_tablet_manager_v2 *wlr_tablet_v2_create(struct wl_display *display);
|
||||
void wlr_tablet_v2_destroy(struct wlr_tablet_manager_v2 *manager);
|
||||
|
||||
#endif /* WLR_TYPES_WLR_TABLET_V2_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue