diff options
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/backend/drm.h | 2 | ||||
-rw-r--r-- | include/wlr/backend/headless.h | 3 | ||||
-rw-r--r-- | include/wlr/backend/libinput.h | 1 | ||||
-rw-r--r-- | include/wlr/backend/wayland.h | 14 | ||||
-rw-r--r-- | include/wlr/backend/x11.h | 4 |
5 files changed, 24 insertions, 0 deletions
diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h index b3475703..133e4f69 100644 --- a/include/wlr/backend/drm.h +++ b/include/wlr/backend/drm.h @@ -4,10 +4,12 @@ #include <wayland-server.h> #include <wlr/backend/session.h> #include <wlr/backend.h> +#include <wlr/types/wlr_output.h> struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, struct wlr_session *session, int gpu_fd, struct wlr_backend *parent); bool wlr_backend_is_drm(struct wlr_backend *backend); +bool wlr_output_is_drm(struct wlr_output *output); #endif diff --git a/include/wlr/backend/headless.h b/include/wlr/backend/headless.h index 68ad84da..8995f7cb 100644 --- a/include/wlr/backend/headless.h +++ b/include/wlr/backend/headless.h @@ -3,6 +3,7 @@ #include <wlr/backend.h> #include <wlr/types/wlr_input_device.h> +#include <wlr/types/wlr_output.h> struct wlr_backend *wlr_headless_backend_create(struct wl_display *display); struct wlr_output *wlr_headless_add_output(struct wlr_backend *backend, @@ -10,5 +11,7 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *backend, struct wlr_input_device *wlr_headless_add_input_device( struct wlr_backend *backend, enum wlr_input_device_type type); bool wlr_backend_is_headless(struct wlr_backend *backend); +bool wlr_input_device_is_headless(struct wlr_input_device *device); +bool wlr_output_is_headless(struct wlr_output *output); #endif diff --git a/include/wlr/backend/libinput.h b/include/wlr/backend/libinput.h index 95b8829d..af873628 100644 --- a/include/wlr/backend/libinput.h +++ b/include/wlr/backend/libinput.h @@ -12,5 +12,6 @@ struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display, struct libinput_device *wlr_libinput_get_device_handle(struct wlr_input_device *dev); bool wlr_backend_is_libinput(struct wlr_backend *backend); +bool wlr_input_device_is_libinput(struct wlr_input_device *device); #endif diff --git a/include/wlr/backend/wayland.h b/include/wlr/backend/wayland.h index 43a0b72e..b10ffee3 100644 --- a/include/wlr/backend/wayland.h +++ b/include/wlr/backend/wayland.h @@ -4,6 +4,8 @@ #include <wayland-client.h> #include <wayland-server.h> #include <wlr/backend.h> +#include <wlr/types/wlr_input_device.h> +#include <wlr/types/wlr_output.h> #include <stdbool.h> /** @@ -11,6 +13,7 @@ * you must use wlr_wl_output_create to add them. */ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display); + /** * Adds a new output to this backend. You may remove outputs by destroying them. * Note that if called before initializing the backend, this will return NULL @@ -18,9 +21,20 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display); * the output_add signal). */ struct wlr_output *wlr_wl_output_create(struct wlr_backend *backend); + /** * True if the given backend is a wlr_wl_backend. */ bool wlr_backend_is_wl(struct wlr_backend *backend); +/** + * True if the given input device is a wlr_wl_input_device. + */ +bool wlr_input_device_is_wl(struct wlr_input_device *device); + +/** + * True if the given output is a wlr_wl_backend_output. + */ +bool wlr_output_is_wl(struct wlr_output *output); + #endif diff --git a/include/wlr/backend/x11.h b/include/wlr/backend/x11.h index 3901649b..b22d7f68 100644 --- a/include/wlr/backend/x11.h +++ b/include/wlr/backend/x11.h @@ -4,10 +4,14 @@ #include <stdbool.h> #include <wayland-server.h> #include <wlr/backend.h> +#include <wlr/types/wlr_input_device.h> +#include <wlr/types/wlr_output.h> struct wlr_backend *wlr_x11_backend_create(struct wl_display *display, const char *x11_display); bool wlr_backend_is_x11(struct wlr_backend *backend); +bool wlr_input_device_is_x11(struct wlr_input_device *device); +bool wlr_output_is_x11(struct wlr_output *output); #endif |