aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/backend
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr/backend')
-rw-r--r--include/wlr/backend/meson.build1
-rw-r--r--include/wlr/backend/noop.h31
-rw-r--r--include/wlr/backend/wayland.h10
3 files changed, 39 insertions, 3 deletions
diff --git a/include/wlr/backend/meson.build b/include/wlr/backend/meson.build
index 3d6f0e40..47de62d2 100644
--- a/include/wlr/backend/meson.build
+++ b/include/wlr/backend/meson.build
@@ -4,6 +4,7 @@ install_headers(
'interface.h',
'libinput.h',
'multi.h',
+ 'noop.h',
'session.h',
'wayland.h',
subdir: 'wlr/backend',
diff --git a/include/wlr/backend/noop.h b/include/wlr/backend/noop.h
new file mode 100644
index 00000000..592b8f35
--- /dev/null
+++ b/include/wlr/backend/noop.h
@@ -0,0 +1,31 @@
+/*
+ * 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_BACKEND_NOOP_H
+#define WLR_BACKEND_NOOP_H
+
+#include <wlr/backend.h>
+#include <wlr/types/wlr_output.h>
+
+/**
+ * Creates a noop backend. Noop backends do not have a framebuffer and are not
+ * capable of rendering anything. They are useful for when there's no real
+ * outputs connected; you can stash your views on a noop output until an output
+ * is connected.
+ */
+struct wlr_backend *wlr_noop_backend_create(struct wl_display *display);
+
+/**
+ * Create a new noop output.
+ */
+struct wlr_output *wlr_noop_add_output(struct wlr_backend *backend);
+
+bool wlr_backend_is_noop(struct wlr_backend *backend);
+bool wlr_output_is_noop(struct wlr_output *output);
+
+#endif
diff --git a/include/wlr/backend/wayland.h b/include/wlr/backend/wayland.h
index 119ea247..9a47d1ce 100644
--- a/include/wlr/backend/wayland.h
+++ b/include/wlr/backend/wayland.h
@@ -1,6 +1,5 @@
#ifndef WLR_BACKEND_WAYLAND_H
#define WLR_BACKEND_WAYLAND_H
-
#include <stdbool.h>
#include <wayland-client.h>
#include <wayland-server.h>
@@ -16,8 +15,8 @@
* to NULL for the default behaviour (WAYLAND_DISPLAY env variable or wayland-0
* default)
*/
-struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, const char *remote,
- wlr_renderer_create_func_t create_renderer_func);
+struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
+ const char *remote, wlr_renderer_create_func_t create_renderer_func);
/**
* Adds a new output to this backend. You may remove outputs by destroying them.
@@ -42,4 +41,9 @@ bool wlr_input_device_is_wl(struct wlr_input_device *device);
*/
bool wlr_output_is_wl(struct wlr_output *output);
+/**
+ * Sets the title of a wlr_output which is a Wayland window.
+ */
+void wlr_wl_output_set_title(struct wlr_output *output, const char *title);
+
#endif