aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2017-08-14 14:54:53 +0200
committerDominique Martinet <asmadeus@codewreck.org>2017-08-14 16:22:31 +0200
commite6ad67911bffcd804549bd1812a77a305cc14eb4 (patch)
tree5d1b75712562400db539ebd5e529d5d7892d62d0 /include
parent1e1e9887fba15291256a806aca6cc6f94a8f671e (diff)
Refactor out wlr_input_device_state
Diffstat (limited to 'include')
-rw-r--r--include/backend/libinput.h5
-rw-r--r--include/backend/wayland.h5
-rw-r--r--include/wlr/interfaces/wlr_input_device.h6
-rw-r--r--include/wlr/types/wlr_input_device.h2
4 files changed, 10 insertions, 8 deletions
diff --git a/include/backend/libinput.h b/include/backend/libinput.h
index 3ff714c2..e0f762a7 100644
--- a/include/backend/libinput.h
+++ b/include/backend/libinput.h
@@ -2,6 +2,7 @@
#define _WLR_BACKEND_LIBINPUT_INTERNAL_H
#include <libinput.h>
#include <wayland-server-core.h>
+#include <wlr/types/wlr_input_device.h>
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/util/list.h>
@@ -22,7 +23,9 @@ struct wlr_libinput_backend {
list_t *wlr_device_lists;
};
-struct wlr_input_device_state {
+struct wlr_libinput_input_device {
+ struct wlr_input_device wlr_input_device;
+
struct libinput_device *handle;
};
diff --git a/include/backend/wayland.h b/include/backend/wayland.h
index da4465fa..6d4b0138 100644
--- a/include/backend/wayland.h
+++ b/include/backend/wayland.h
@@ -41,9 +41,10 @@ struct wlr_wl_backend_output {
void *egl_surface;
};
-struct wlr_input_device_state {
+struct wlr_wl_input_device {
+ struct wlr_input_device wlr_input_device;
+
struct wlr_wl_backend *backend;
- struct wlr_input_device *wlr_device;
void *resource;
};
diff --git a/include/wlr/interfaces/wlr_input_device.h b/include/wlr/interfaces/wlr_input_device.h
index 26729c7c..b236a24a 100644
--- a/include/wlr/interfaces/wlr_input_device.h
+++ b/include/wlr/interfaces/wlr_input_device.h
@@ -3,13 +3,13 @@
#include <wlr/types/wlr_input_device.h>
struct wlr_input_device_impl {
- void (*destroy)(struct wlr_input_device_state *state);
+ void (*destroy)(struct wlr_input_device *wlr_device);
};
-struct wlr_input_device *wlr_input_device_create(
+void wlr_input_device_init(
+ struct wlr_input_device *wlr_device,
enum wlr_input_device_type type,
struct wlr_input_device_impl *impl,
- struct wlr_input_device_state *state,
const char *name, int vendor, int product);
void wlr_input_device_destroy(struct wlr_input_device *dev);
diff --git a/include/wlr/types/wlr_input_device.h b/include/wlr/types/wlr_input_device.h
index 17b26d45..642892ff 100644
--- a/include/wlr/types/wlr_input_device.h
+++ b/include/wlr/types/wlr_input_device.h
@@ -21,11 +21,9 @@ enum wlr_input_device_type {
#include <wlr/types/wlr_tablet_tool.h>
#include <wlr/types/wlr_tablet_pad.h>
-struct wlr_input_device_state;
struct wlr_input_device_impl;
struct wlr_input_device {
- struct wlr_input_device_state *state;
struct wlr_input_device_impl *impl;
enum wlr_input_device_type type;