diff options
Diffstat (limited to 'include/wlr/interfaces')
-rw-r--r-- | include/wlr/interfaces/meson.build | 11 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_input_device.h | 25 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_keyboard.h | 29 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_output.h | 52 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_pointer.h | 22 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_switch.h | 22 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_tablet_pad.h | 22 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_tablet_tool.h | 22 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_touch.h | 22 |
9 files changed, 227 insertions, 0 deletions
diff --git a/include/wlr/interfaces/meson.build b/include/wlr/interfaces/meson.build new file mode 100644 index 00000000..7d4d811d --- /dev/null +++ b/include/wlr/interfaces/meson.build @@ -0,0 +1,11 @@ +install_headers( + 'wlr_input_device.h', + 'wlr_keyboard.h', + 'wlr_output.h', + 'wlr_pointer.h', + 'wlr_switch.h', + 'wlr_tablet_pad.h', + 'wlr_tablet_tool.h', + 'wlr_touch.h', + subdir: '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..05248bf6 --- /dev/null +++ b/include/wlr/interfaces/wlr_input_device.h @@ -0,0 +1,25 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_INTERFACES_WLR_INPUT_DEVICE_H +#define WLR_INTERFACES_WLR_INPUT_DEVICE_H + +#include <wlr/types/wlr_input_device.h> + +struct wlr_input_device_impl { + void (*destroy)(struct wlr_input_device *wlr_device); +}; + +void wlr_input_device_init( + struct wlr_input_device *wlr_device, + enum wlr_input_device_type type, + const struct wlr_input_device_impl *impl, + 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..5d537827 --- /dev/null +++ b/include/wlr/interfaces/wlr_keyboard.h @@ -0,0 +1,29 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_INTERFACES_WLR_KEYBOARD_H +#define WLR_INTERFACES_WLR_KEYBOARD_H + +#include <stdint.h> +#include <wlr/types/wlr_keyboard.h> + +struct wlr_keyboard_impl { + void (*destroy)(struct wlr_keyboard *keyboard); + void (*led_update)(struct wlr_keyboard *keyboard, uint32_t leds); +}; + +void wlr_keyboard_init(struct wlr_keyboard *keyboard, + const struct wlr_keyboard_impl *impl); +void wlr_keyboard_destroy(struct wlr_keyboard *keyboard); +void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard, + struct wlr_event_keyboard_key *event); +void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard, + uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, + uint32_t group); + +#endif diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h new file mode 100644 index 00000000..f7ffe3b4 --- /dev/null +++ b/include/wlr/interfaces/wlr_output.h @@ -0,0 +1,52 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_INTERFACES_WLR_OUTPUT_H +#define WLR_INTERFACES_WLR_OUTPUT_H + +#include <stdbool.h> +#include <wlr/backend.h> +#include <wlr/types/wlr_box.h> +#include <wlr/types/wlr_output.h> + +struct wlr_output_impl { + bool (*enable)(struct wlr_output *output, bool enable); + bool (*set_mode)(struct wlr_output *output, struct wlr_output_mode *mode); + bool (*set_custom_mode)(struct wlr_output *output, int32_t width, + int32_t height, int32_t refresh); + void (*transform)(struct wlr_output *output, + enum wl_output_transform transform); + bool (*set_cursor)(struct wlr_output *output, struct wlr_texture *texture, + int32_t scale, enum wl_output_transform transform, + int32_t hotspot_x, int32_t hotspot_y, bool update_texture); + bool (*move_cursor)(struct wlr_output *output, int x, int y); + void (*destroy)(struct wlr_output *output); + bool (*make_current)(struct wlr_output *output, int *buffer_age); + bool (*swap_buffers)(struct wlr_output *output, pixman_region32_t *damage); + bool (*set_gamma)(struct wlr_output *output, size_t size, + const uint16_t *r, const uint16_t *g, const uint16_t *b); + size_t (*get_gamma_size)(struct wlr_output *output); + bool (*export_dmabuf)(struct wlr_output *output, + struct wlr_dmabuf_attributes *attribs); + bool (*schedule_frame)(struct wlr_output *output); +}; + +void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend, + const struct wlr_output_impl *impl, struct wl_display *display); +void wlr_output_update_mode(struct wlr_output *output, + struct wlr_output_mode *mode); +void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width, + int32_t height, int32_t refresh); +void wlr_output_update_enabled(struct wlr_output *output, bool enabled); +void wlr_output_update_needs_swap(struct wlr_output *output); +void wlr_output_damage_whole(struct wlr_output *output); +void wlr_output_send_frame(struct wlr_output *output); +void wlr_output_send_present(struct wlr_output *output, + struct wlr_output_event_present *event); + +#endif diff --git a/include/wlr/interfaces/wlr_pointer.h b/include/wlr/interfaces/wlr_pointer.h new file mode 100644 index 00000000..fd3ab102 --- /dev/null +++ b/include/wlr/interfaces/wlr_pointer.h @@ -0,0 +1,22 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_INTERFACES_WLR_POINTER_H +#define WLR_INTERFACES_WLR_POINTER_H + +#include <wlr/types/wlr_pointer.h> + +struct wlr_pointer_impl { + void (*destroy)(struct wlr_pointer *pointer); +}; + +void wlr_pointer_init(struct wlr_pointer *pointer, + const struct wlr_pointer_impl *impl); +void wlr_pointer_destroy(struct wlr_pointer *pointer); + +#endif diff --git a/include/wlr/interfaces/wlr_switch.h b/include/wlr/interfaces/wlr_switch.h new file mode 100644 index 00000000..0b0454f5 --- /dev/null +++ b/include/wlr/interfaces/wlr_switch.h @@ -0,0 +1,22 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_INTERFACES_WLR_SWITCH_H +#define WLR_INTERFACES_WLR_SWITCH_H + +#include <wlr/types/wlr_switch.h> + +struct wlr_switch_impl { + void (*destroy)(struct wlr_switch *lid_switch); +}; + +void wlr_switch_init(struct wlr_switch *lid_switch, + struct wlr_switch_impl *impl); +void wlr_switch_destroy(struct wlr_switch *lid_switch); + +#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..86bbe9c3 --- /dev/null +++ b/include/wlr/interfaces/wlr_tablet_pad.h @@ -0,0 +1,22 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_INTERFACES_WLR_TABLET_PAD_H +#define WLR_INTERFACES_WLR_TABLET_PAD_H + +#include <wlr/types/wlr_tablet_pad.h> + +struct wlr_tablet_pad_impl { + void (*destroy)(struct wlr_tablet_pad *pad); +}; + +void wlr_tablet_pad_init(struct wlr_tablet_pad *pad, + struct wlr_tablet_pad_impl *impl); +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..9cfc3ca0 --- /dev/null +++ b/include/wlr/interfaces/wlr_tablet_tool.h @@ -0,0 +1,22 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_INTERFACES_WLR_TABLET_TOOL_H +#define WLR_INTERFACES_WLR_TABLET_TOOL_H + +#include <wlr/types/wlr_tablet_tool.h> + +struct wlr_tablet_impl { + void (*destroy)(struct wlr_tablet *tablet); +}; + +void wlr_tablet_init(struct wlr_tablet *tablet, + struct wlr_tablet_impl *impl); +void wlr_tablet_destroy(struct wlr_tablet *tablet); + +#endif diff --git a/include/wlr/interfaces/wlr_touch.h b/include/wlr/interfaces/wlr_touch.h new file mode 100644 index 00000000..cc426332 --- /dev/null +++ b/include/wlr/interfaces/wlr_touch.h @@ -0,0 +1,22 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_INTERFACES_WLR_TOUCH_H +#define WLR_INTERFACES_WLR_TOUCH_H + +#include <wlr/types/wlr_touch.h> + +struct wlr_touch_impl { + void (*destroy)(struct wlr_touch *touch); +}; + +void wlr_touch_init(struct wlr_touch *touch, + struct wlr_touch_impl *impl); +void wlr_touch_destroy(struct wlr_touch *touch); + +#endif |