aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/backend/egl.h1
-rw-r--r--include/backend/wayland.h40
-rw-r--r--include/types.h1
-rw-r--r--include/wlr/backend/wayland.h11
-rw-r--r--include/wlr/types.h2
5 files changed, 42 insertions, 13 deletions
diff --git a/include/backend/egl.h b/include/backend/egl.h
index 8cef36b7..0422a52b 100644
--- a/include/backend/egl.h
+++ b/include/backend/egl.h
@@ -10,6 +10,7 @@ struct wlr_egl {
EGLContext context;
};
+const char *egl_error(void);
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *display);
void wlr_egl_free(struct wlr_egl *egl);
EGLSurface wlr_egl_create_surface(struct wlr_egl *egl, void *window);
diff --git a/include/backend/wayland.h b/include/backend/wayland.h
index 94aa0962..03667c9a 100644
--- a/include/backend/wayland.h
+++ b/include/backend/wayland.h
@@ -3,10 +3,12 @@
#include <wayland-client.h>
#include <wayland-server.h>
+#include <wayland-egl.h>
#include <wlr/common/list.h>
-#include <wlr/wayland.h>
+#include <wlr/backend/wayland.h>
+#include "backend/egl.h"
-struct wlr_wl_backend {
+struct wlr_backend_state {
/* local state */
struct wl_display *local_display;
/* remote state */
@@ -15,13 +17,39 @@ struct wlr_wl_backend {
struct wl_compositor *compositor;
struct wl_shell *shell;
struct wl_shm *shm;
- struct wlr_wl_seat *seat;
- list_t *outputs;
+ struct wl_seat *seat;
+ const char *seatName;
+
+ struct wlr_backend *backend;
+ list_t *devices;
+
+ struct wl_event_source* remote_display_src;
+
+ size_t num_outputs;
+ struct wlr_output **outputs;
+ struct wlr_egl egl;
+};
+
+struct wlr_output_state {
+ size_t id;
+ struct wlr_backend_state *backend;
+ struct wlr_output *output;
+ struct wl_surface *surface;
+ struct wl_shell_surface *shell_surface;
+ struct wl_egl_window* egl_window;
+ struct wl_callback* frame_callback;
+ void* egl_surface;
+};
+
+struct wlr_input_device_state {
+ enum wlr_input_device_type type;
+ void *resource;
};
-void wlr_wlb_registry_poll(struct wlr_wl_backend *backend);
+void wlr_wl_registry_poll(struct wlr_backend_state *backend);
+struct wlr_output *wlr_wl_output_create(struct wlr_backend_state* backend,
+ size_t id);
extern const struct wl_seat_listener seat_listener;
-extern const struct wl_output_listener output_listener;
#endif
diff --git a/include/types.h b/include/types.h
index 54aa5606..f53cac02 100644
--- a/include/types.h
+++ b/include/types.h
@@ -20,6 +20,7 @@ struct wlr_output_impl {
struct wlr_output *wlr_output_create(struct wlr_output_impl *impl,
struct wlr_output_state *state);
void wlr_output_free(struct wlr_output *output);
+void wlr_output_update_matrix(struct wlr_output *output);
struct wlr_keyboard_impl {
void (*destroy)(struct wlr_keyboard_state *state);
diff --git a/include/wlr/backend/wayland.h b/include/wlr/backend/wayland.h
index 4318cc26..83b465c1 100644
--- a/include/wlr/backend/wayland.h
+++ b/include/wlr/backend/wayland.h
@@ -1,14 +1,11 @@
-#ifndef _WLR_BACKEND_WAYLAND_INTERNAL_H
-#define _WLR_BACKEND_WAYLAND_INTERNAL_H
+#ifndef WLR_BACKEND_WAYLAND_H
+#define WLR_BACKEND_WAYLAND_H
#include <wayland-client.h>
#include <wayland-server.h>
-#include <wlr/wayland.h>
+#include <wlr/backend.h>
-struct wlr_wl_backend;
-
-void wlr_wl_backend_free(struct wlr_wl_backend *backend);
-struct wlr_wl_backend *wlr_wl_backend_init(struct wl_display *display,
+struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
size_t outputs);
#endif
diff --git a/include/wlr/types.h b/include/wlr/types.h
index 1d2abab5..6b6a3389 100644
--- a/include/wlr/types.h
+++ b/include/wlr/types.h
@@ -33,11 +33,13 @@ struct wlr_output {
float transform_matrix[16];
+ /* Note: some backends may have zero modes */
list_t *modes;
struct wlr_output_mode *current_mode;
struct {
struct wl_signal frame;
+ struct wl_signal resolution;
} events;
};