mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
input: add tablet pad setup and button handler
Split pad initialization from tablet initialization to avoid conflicting handler names. Also reuse 'get_mapped_button'.
This commit is contained in:
parent
28e7cd3006
commit
c2687d9281
6 changed files with 90 additions and 29 deletions
|
|
@ -20,6 +20,7 @@ struct drawing_tablet {
|
|||
} handlers;
|
||||
};
|
||||
|
||||
void tablet_setup_handlers(struct seat *seat, struct wlr_input_device *wlr_input_device);
|
||||
uint32_t tablet_get_mapped_button(uint32_t src_button);
|
||||
void tablet_init(struct seat *seat, struct wlr_input_device *wlr_input_device);
|
||||
|
||||
#endif /* LABWC_TABLET_H */
|
||||
|
|
|
|||
21
include/input/tablet_pad.h
Normal file
21
include/input/tablet_pad.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_TABLET_PAD_H
|
||||
#define LABWC_TABLET_PAD_H
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
struct seat;
|
||||
struct wlr_device;
|
||||
struct wlr_input_device;
|
||||
|
||||
struct drawing_tablet_pad {
|
||||
struct seat *seat;
|
||||
struct wlr_tablet_pad *tablet;
|
||||
struct {
|
||||
struct wl_listener button;
|
||||
struct wl_listener destroy;
|
||||
} handlers;
|
||||
};
|
||||
|
||||
void tablet_pad_init(struct seat *seat, struct wlr_input_device *wlr_input_device);
|
||||
|
||||
#endif /* LABWC_TABLET_PAD_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue