From 53a8b4f127a370a84c81e0c91b8c6fce8b18842f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 19 Jun 2017 18:41:02 -0400 Subject: Split out types.h and wlr/types.h TODO: Update the code accordingly and move other types into the same paradigm --- include/wlr/interfaces/wlr_input_device.h | 16 ++++++++++++++++ include/wlr/interfaces/wlr_keyboard.h | 15 +++++++++++++++ include/wlr/interfaces/wlr_output.h | 22 ++++++++++++++++++++++ include/wlr/interfaces/wlr_pointer.h | 13 +++++++++++++ include/wlr/interfaces/wlr_tablet_pad.h | 13 +++++++++++++ include/wlr/interfaces/wlr_tablet_tool.h | 13 +++++++++++++ include/wlr/interfaces/wlr_touch.h | 13 +++++++++++++ 7 files changed, 105 insertions(+) create mode 100644 include/wlr/interfaces/wlr_input_device.h create mode 100644 include/wlr/interfaces/wlr_keyboard.h create mode 100644 include/wlr/interfaces/wlr_output.h create mode 100644 include/wlr/interfaces/wlr_pointer.h create mode 100644 include/wlr/interfaces/wlr_tablet_pad.h create mode 100644 include/wlr/interfaces/wlr_tablet_tool.h create mode 100644 include/wlr/interfaces/wlr_touch.h (limited to 'include/wlr/interfaces') 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 + +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 +#include + +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 +#include + +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 + +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 + +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 + +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 + +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 -- cgit v1.2.3