aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr/interfaces')
-rw-r--r--include/wlr/interfaces/wlr_input_device.h16
-rw-r--r--include/wlr/interfaces/wlr_keyboard.h15
-rw-r--r--include/wlr/interfaces/wlr_output.h22
-rw-r--r--include/wlr/interfaces/wlr_pointer.h13
-rw-r--r--include/wlr/interfaces/wlr_tablet_pad.h13
-rw-r--r--include/wlr/interfaces/wlr_tablet_tool.h13
-rw-r--r--include/wlr/interfaces/wlr_touch.h13
7 files changed, 105 insertions, 0 deletions
diff --git a/include/wlr/interfaces/wlr_input_device.h b/include/wlr/interfaces/wlr_input_device.h
new file mode 100644
index 00000000..26729c7c
--- /dev/null
+++ b/include/wlr/interfaces/wlr_input_device.h
@@ -0,0 +1,16 @@
+#ifndef _WLR_INTERFACES_INPUT_DEVICE_H
+#define _WLR_INTERFACES_INPUT_DEVICE_H
+#include <wlr/types/wlr_input_device.h>
+
+struct wlr_input_device_impl {
+ void (*destroy)(struct wlr_input_device_state *state);
+};
+
+struct wlr_input_device *wlr_input_device_create(
+ 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);
+
+#endif
diff --git a/include/wlr/interfaces/wlr_keyboard.h b/include/wlr/interfaces/wlr_keyboard.h
new file mode 100644
index 00000000..1acc6428
--- /dev/null
+++ b/include/wlr/interfaces/wlr_keyboard.h
@@ -0,0 +1,15 @@
+#ifndef _WLR_INTERFACE_KEYBOARD_H
+#define _WLR_INTERFACE_KEYBOARD_H
+#include <wlr/types/wlr_keyboard.h>
+#include <stdint.h>
+
+struct wlr_keyboard_impl {
+ void (*destroy)(struct wlr_keyboard_state *state);
+ void (*led_update)(struct wlr_keyboard_state *state, uint32_t leds);
+};
+
+struct wlr_keyboard *wlr_keyboard_create(struct wlr_keyboard_impl *impl,
+ struct wlr_keyboard_state *state);
+void wlr_keyboard_destroy(struct wlr_keyboard *keyboard);
+
+#endif
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
new file mode 100644
index 00000000..24380be8
--- /dev/null
+++ b/include/wlr/interfaces/wlr_output.h
@@ -0,0 +1,22 @@
+#ifndef _WLR_INTERFACE_OUTPUT_H
+#define _WLR_INTERFACE_OUTPUT_H
+#include <wlr/interfaces/wlr_output.h>
+#include <stdbool.h>
+
+struct wlr_output_impl {
+ void (*enable)(struct wlr_output_state *state, bool enable);
+ bool (*set_mode)(struct wlr_output_state *state,
+ struct wlr_output_mode *mode);
+ void (*transform)(struct wlr_output_state *state,
+ enum wl_output_transform transform);
+ bool (*set_cursor)(struct wlr_output_state *state,
+ const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height);
+ bool (*move_cursor)(struct wlr_output_state *state, int x, int y);
+ void (*destroy)(struct wlr_output_state *state);
+};
+
+struct wlr_output *wlr_output_create(struct wlr_output_impl *impl,
+ struct wlr_output_state *state);
+void wlr_output_free(struct wlr_output *output);
+
+#endif
diff --git a/include/wlr/interfaces/wlr_pointer.h b/include/wlr/interfaces/wlr_pointer.h
new file mode 100644
index 00000000..8c3f7e0d
--- /dev/null
+++ b/include/wlr/interfaces/wlr_pointer.h
@@ -0,0 +1,13 @@
+#ifndef _WLR_INTERFACES_POINTER_H
+#define _WLR_INTERFACES_POINTER_H
+#include <wlr/types/wlr_pointer.h>
+
+struct wlr_pointer_impl {
+ void (*destroy)(struct wlr_pointer_state *state);
+};
+
+struct wlr_pointer *wlr_pointer_create(struct wlr_pointer_impl *impl,
+ struct wlr_pointer_state *state);
+void wlr_pointer_destroy(struct wlr_pointer *pointer);
+
+#endif
diff --git a/include/wlr/interfaces/wlr_tablet_pad.h b/include/wlr/interfaces/wlr_tablet_pad.h
new file mode 100644
index 00000000..09274c6c
--- /dev/null
+++ b/include/wlr/interfaces/wlr_tablet_pad.h
@@ -0,0 +1,13 @@
+#ifndef _WLR_INTERFACES_TABLET_PAD_H
+#define _WLR_INTERFACES_TABLET_PAD_H
+#include <wlr/types/wlr_tablet_pad.h>
+
+struct wlr_tablet_pad_impl {
+ void (*destroy)(struct wlr_tablet_pad_state *pad);
+};
+
+struct wlr_tablet_pad *wlr_tablet_pad_create(struct wlr_tablet_pad_impl *impl,
+ struct wlr_tablet_pad_state *state);
+void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad);
+
+#endif
diff --git a/include/wlr/interfaces/wlr_tablet_tool.h b/include/wlr/interfaces/wlr_tablet_tool.h
new file mode 100644
index 00000000..cd326878
--- /dev/null
+++ b/include/wlr/interfaces/wlr_tablet_tool.h
@@ -0,0 +1,13 @@
+#ifndef _WLR_INTERFACES_TABLET_TOOL_H
+#define _WLR_INTERFACES_TABLET_TOOL_H
+#include <wlr/types/wlr_tablet_tool.h>
+
+struct wlr_tablet_tool_impl {
+ void (*destroy)(struct wlr_tablet_tool_state *tool);
+};
+
+struct wlr_tablet_tool *wlr_tablet_tool_create(struct wlr_tablet_tool_impl *impl,
+ struct wlr_tablet_tool_state *state);
+void wlr_tablet_tool_destroy(struct wlr_tablet_tool *tool);
+
+#endif
diff --git a/include/wlr/interfaces/wlr_touch.h b/include/wlr/interfaces/wlr_touch.h
new file mode 100644
index 00000000..d83ad558
--- /dev/null
+++ b/include/wlr/interfaces/wlr_touch.h
@@ -0,0 +1,13 @@
+#ifndef _WLR_INTERFACES_TOUCH_H
+#define _WLR_INTERFACES_TOUCH_H
+#include <wlr/types/wlr_touch.h>
+
+struct wlr_touch_impl {
+ void (*destroy)(struct wlr_touch_state *state);
+};
+
+struct wlr_touch *wlr_touch_create(struct wlr_touch_impl *impl,
+ struct wlr_touch_state *state);
+void wlr_touch_destroy(struct wlr_touch *touch);
+
+#endif