mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-11 13:29:45 -05:00
rename wlr_tablet_tool to wlr_tablet
The previous naming was based on the input-device capability names from libinput. With code that uses the libinput_tablet_tool and mapping into tablet-v2, this is confusing, so the name is changed to follow the names used in the protocol.
This commit is contained in:
parent
b84288af16
commit
d9e978e1b3
15 changed files with 93 additions and 91 deletions
|
|
@ -65,7 +65,7 @@ void handle_touch_motion(struct libinput_event *event,
|
|||
void handle_touch_cancel(struct libinput_event *event,
|
||||
struct libinput_device *device);
|
||||
|
||||
struct wlr_tablet_tool *create_libinput_tablet_tool(
|
||||
struct wlr_tablet *create_libinput_tablet(
|
||||
struct libinput_device *device);
|
||||
void handle_tablet_tool_axis(struct libinput_event *event,
|
||||
struct libinput_device *device);
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
#include <wlr/types/wlr_tablet_tool.h>
|
||||
|
||||
struct wlr_tablet_tool_impl {
|
||||
void (*destroy)(struct wlr_tablet_tool *tool);
|
||||
struct wlr_tablet_impl {
|
||||
void (*destroy)(struct wlr_tablet *tablet);
|
||||
};
|
||||
|
||||
void wlr_tablet_tool_init(struct wlr_tablet_tool *tool,
|
||||
struct wlr_tablet_tool_impl *impl);
|
||||
void wlr_tablet_tool_destroy(struct wlr_tablet_tool *tool);
|
||||
void wlr_tablet_init(struct wlr_tablet *tablet,
|
||||
struct wlr_tablet_impl *impl);
|
||||
void wlr_tablet_destroy(struct wlr_tablet *tablet);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct wlr_input_device {
|
|||
struct wlr_keyboard *keyboard;
|
||||
struct wlr_pointer *pointer;
|
||||
struct wlr_touch *touch;
|
||||
struct wlr_tablet_tool *tablet_tool;
|
||||
struct wlr_tablet *tablet;
|
||||
struct wlr_tablet_pad *tablet_pad;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@ enum wlr_tablet_tool_type {
|
|||
WLR_TABLET_TOOL_TYPE_ERASER, /**< Eraser */
|
||||
WLR_TABLET_TOOL_TYPE_BRUSH, /**< A paintbrush-like tool */
|
||||
WLR_TABLET_TOOL_TYPE_PENCIL, /**< Physical drawing tool, e.g.
|
||||
Wacom Inking Pen */
|
||||
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 */
|
||||
};
|
||||
|
||||
struct wlr_tablet_tool_tool {
|
||||
struct wlr_tablet_tool {
|
||||
enum wlr_tablet_tool_type type;
|
||||
uint64_t hardware_serial;
|
||||
uint64_t hardware_wacom;
|
||||
|
|
@ -41,10 +41,10 @@ struct wlr_tablet_tool_tool {
|
|||
void *data;
|
||||
};
|
||||
|
||||
struct wlr_tablet_tool_impl;
|
||||
struct wlr_tablet_impl;
|
||||
|
||||
struct wlr_tablet_tool {
|
||||
struct wlr_tablet_tool_impl *impl;
|
||||
struct wlr_tablet {
|
||||
struct wlr_tablet_impl *impl;
|
||||
|
||||
struct {
|
||||
struct wl_signal axis;
|
||||
|
|
@ -73,7 +73,7 @@ enum wlr_tablet_tool_axes {
|
|||
|
||||
struct wlr_event_tablet_tool_axis {
|
||||
struct wlr_input_device *device;
|
||||
struct wlr_tablet_tool_tool *tool;
|
||||
struct wlr_tablet_tool *tool;
|
||||
|
||||
uint32_t time_msec;
|
||||
uint32_t updated_axes;
|
||||
|
|
@ -96,7 +96,7 @@ enum wlr_tablet_tool_proximity_state {
|
|||
|
||||
struct wlr_event_tablet_tool_proximity {
|
||||
struct wlr_input_device *device;
|
||||
struct wlr_tablet_tool_tool *tool;
|
||||
struct wlr_tablet_tool *tool;
|
||||
uint32_t time_msec;
|
||||
// From 0..1
|
||||
double x, y;
|
||||
|
|
@ -110,7 +110,7 @@ enum wlr_tablet_tool_tip_state {
|
|||
|
||||
struct wlr_event_tablet_tool_tip {
|
||||
struct wlr_input_device *device;
|
||||
struct wlr_tablet_tool_tool *tool;
|
||||
struct wlr_tablet_tool *tool;
|
||||
uint32_t time_msec;
|
||||
// From 0..1
|
||||
double x, y;
|
||||
|
|
@ -119,7 +119,7 @@ struct wlr_event_tablet_tool_tip {
|
|||
|
||||
struct wlr_event_tablet_tool_button {
|
||||
struct wlr_input_device *device;
|
||||
struct wlr_tablet_tool_tool *tool;
|
||||
struct wlr_tablet_tool *tool;
|
||||
uint32_t time_msec;
|
||||
uint32_t button;
|
||||
enum wlr_button_state state;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ struct wlr_tablet_manager_v2 {
|
|||
|
||||
struct wlr_tablet_v2_tablet {
|
||||
struct wl_list link; // wlr_tablet_seat_v2::tablets
|
||||
struct wlr_tablet_tool *wlr_tool;
|
||||
struct wlr_tablet *wlr_tablet;
|
||||
struct wlr_input_device *wlr_device;
|
||||
struct wl_list clients; // wlr_tablet_client_v2::tablet_link
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ struct wlr_tablet_v2_tablet {
|
|||
|
||||
struct wlr_tablet_v2_tablet_tool {
|
||||
struct wl_list link; // wlr_tablet_seat_v2::tablets
|
||||
struct wlr_tablet_tool_tool *wlr_tool;
|
||||
struct wlr_tablet_tool *wlr_tool;
|
||||
struct wl_list clients; // wlr_tablet_tool_client_v2::tool_link
|
||||
|
||||
struct wl_listener tool_destroy;
|
||||
|
|
@ -105,7 +105,7 @@ struct wlr_tablet_v2_tablet_pad *wlr_tablet_pad_create(
|
|||
struct wlr_tablet_v2_tablet_tool *wlr_tablet_tool_create(
|
||||
struct wlr_tablet_manager_v2 *manager,
|
||||
struct wlr_seat *wlr_seat,
|
||||
struct wlr_tablet_tool_tool *wlr_tool);
|
||||
struct wlr_tablet_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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue