aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/backend.h27
-rw-r--r--include/wlr/backend/drm.h7
2 files changed, 28 insertions, 6 deletions
diff --git a/include/wlr/backend.h b/include/wlr/backend.h
index 527efa05..88a5c8e9 100644
--- a/include/wlr/backend.h
+++ b/include/wlr/backend.h
@@ -1,7 +1,30 @@
#ifndef _WLR_BACKEND_H
#define _WLR_BACKEND_H
-struct wlr_backend *wlr_backend_init();
-void wlr_backend_free(struct wlr_backend *backend);
+#include <wayland-server.h>
+
+struct wlr_backend_impl;
+struct wlr_backend_state;
+
+struct wlr_backend {
+ const struct wlr_backend_impl *impl;
+ struct wlr_backend_state *state;
+
+ struct {
+ struct wl_signal output_add;
+ struct wl_signal output_remove;
+ struct wl_signal output_frame;
+ struct wl_signal keyboard_add;
+ struct wl_signal keyboard_remove;
+ struct wl_signal pointer_add;
+ struct wl_signal pointer_remove;
+ struct wl_signal touch_add;
+ struct wl_signal touch_remove;
+ } events;
+};
+
+struct wlr_backend *wlr_backend_autocreate();
+bool wlr_backend_init(struct wlr_backend *backend);
+void wlr_backend_destroy(struct wlr_backend *backend);
#endif
diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h
index 4131b4cb..5db9b35c 100644
--- a/include/wlr/backend/drm.h
+++ b/include/wlr/backend/drm.h
@@ -3,6 +3,7 @@
#include <wayland-server.h>
#include <wlr/session.h>
+#include <wlr/backend.h>
#include <xf86drmMode.h> // drmModeModeInfo
struct wlr_drm_backend;
@@ -15,10 +16,8 @@ struct wlr_drm_mode {
drmModeModeInfo mode;
};
-struct wlr_drm_backend *wlr_drm_backend_init(struct wl_display *display,
- struct wlr_session *session, struct wl_listener *add, struct wl_listener *rem,
- struct wl_listener *render);
-void wlr_drm_backend_free(struct wlr_drm_backend *backend);
+struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
+ struct wlr_session *session);
const char *wlr_drm_output_get_name(struct wlr_drm_output *out);