mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
Split out types.h and wlr/types.h
TODO: Update the code accordingly and move other types into the same paradigm
This commit is contained in:
parent
fd5ad15894
commit
53a8b4f127
16 changed files with 499 additions and 427 deletions
16
include/wlr/interfaces/wlr_input_device.h
Normal file
16
include/wlr/interfaces/wlr_input_device.h
Normal file
|
|
@ -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
|
||||
15
include/wlr/interfaces/wlr_keyboard.h
Normal file
15
include/wlr/interfaces/wlr_keyboard.h
Normal file
|
|
@ -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
|
||||
22
include/wlr/interfaces/wlr_output.h
Normal file
22
include/wlr/interfaces/wlr_output.h
Normal file
|
|
@ -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
|
||||
13
include/wlr/interfaces/wlr_pointer.h
Normal file
13
include/wlr/interfaces/wlr_pointer.h
Normal file
|
|
@ -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
|
||||
13
include/wlr/interfaces/wlr_tablet_pad.h
Normal file
13
include/wlr/interfaces/wlr_tablet_pad.h
Normal file
|
|
@ -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
|
||||
13
include/wlr/interfaces/wlr_tablet_tool.h
Normal file
13
include/wlr/interfaces/wlr_tablet_tool.h
Normal file
|
|
@ -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
|
||||
13
include/wlr/interfaces/wlr_touch.h
Normal file
13
include/wlr/interfaces/wlr_touch.h
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue