From b02f660475fd6318fc387708c55c73ad4aebf062 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Wed, 15 Apr 2020 12:47:55 +0200 Subject: Rename render.[hc] to bindings.[hc] --- include/bindings.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 include/bindings.h (limited to 'include/bindings.h') diff --git a/include/bindings.h b/include/bindings.h new file mode 100644 index 0000000..d8b9358 --- /dev/null +++ b/include/bindings.h @@ -0,0 +1,35 @@ +#ifndef RIVER_BINDINGS_H +#define RIVER_BINDINGS_H + +#include + +/* + * This header is needed since zig cannot yet translate flexible arrays. + * See https://github.com/ziglang/zig/issues/4775 + */ + +struct wlr_backend_impl; + +struct wlr_backend { + const struct wlr_backend_impl *impl; + + struct { + /** Raised when destroyed, passed the wlr_backend reference */ + struct wl_signal destroy; + /** Raised when new inputs are added, passed the wlr_input_device */ + struct wl_signal new_input; + /** Raised when new outputs are added, passed the wlr_output */ + struct wl_signal new_output; + } events; +}; + +struct wlr_backend *river_wlr_backend_autocreate(struct wl_display *display); +struct wlr_renderer *river_wlr_backend_get_renderer(struct wlr_backend *backend); +bool river_wlr_backend_start(struct wlr_backend *backend); +bool river_wlr_backend_is_multi(struct wlr_backend *backend); +struct wlr_session *river_wlr_backend_get_session(struct wlr_backend *backend); +struct wlr_backend *river_wlr_noop_backend_create(struct wl_display *display); +struct wlr_output *river_wlr_noop_add_output(struct wlr_backend *backend); +bool river_wlr_output_is_noop(struct wlr_output *output); + +#endif // RIVER_BINDINGS_H -- cgit v1.2.3