|
|
@ -1,11 +1,15 @@
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <wayland-server-core.h>
|
|
|
|
#include <wayland-server-core.h>
|
|
|
|
|
|
|
|
#include <wlr/interfaces/wlr_input_device.h>
|
|
|
|
#include <wlr/interfaces/wlr_tablet_pad.h>
|
|
|
|
#include <wlr/interfaces/wlr_tablet_pad.h>
|
|
|
|
#include <wlr/types/wlr_tablet_pad.h>
|
|
|
|
#include <wlr/types/wlr_tablet_pad.h>
|
|
|
|
|
|
|
|
|
|
|
|
void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
|
|
|
|
void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
|
|
|
|
struct wlr_tablet_pad_impl *impl) {
|
|
|
|
struct wlr_tablet_pad_impl *impl, const char *name) {
|
|
|
|
|
|
|
|
wlr_input_device_init(&pad->base, WLR_INPUT_DEVICE_TABLET_PAD, NULL, name);
|
|
|
|
|
|
|
|
pad->base.tablet_pad = pad;
|
|
|
|
|
|
|
|
|
|
|
|
pad->impl = impl;
|
|
|
|
pad->impl = impl;
|
|
|
|
wl_signal_init(&pad->events.button);
|
|
|
|
wl_signal_init(&pad->events.button);
|
|
|
|
wl_signal_init(&pad->events.ring);
|
|
|
|
wl_signal_init(&pad->events.ring);
|
|
|
@ -27,6 +31,7 @@ void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wl_array_release(&pad->paths);
|
|
|
|
wl_array_release(&pad->paths);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wlr_input_device_finish(&pad->base);
|
|
|
|
if (pad->impl && pad->impl->destroy) {
|
|
|
|
if (pad->impl && pad->impl->destroy) {
|
|
|
|
pad->impl->destroy(pad);
|
|
|
|
pad->impl->destroy(pad);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|