Rework wayland backend output implementation

This commit is contained in:
nyorain 2017-06-19 22:36:40 +02:00
parent e65ca967f9
commit 792d535225
8 changed files with 156 additions and 154 deletions

View file

@ -3,8 +3,10 @@
#include <wayland-client.h>
#include <wayland-server.h>
#include <wayland-egl.h>
#include <wlr/common/list.h>
#include <wlr/backend/wayland.h>
#include "backend/egl.h"
struct wlr_backend_state {
/* local state */
@ -19,20 +21,31 @@ struct wlr_backend_state {
const char *seatName;
struct wlr_backend *backend;
list_t *outputs;
list_t *devices;
size_t num_outputs;
struct wlr_output **outputs;
struct wlr_egl egl;
};
struct wlr_output_state {
struct wl_output* output;
size_t id;
struct wlr_output *output;
struct wl_surface *surface;
struct wl_shell_surface *shell_surface;
struct wl_egl_window* egl_window;
void* egl_surface;
};
struct wlr_input_device_state {
enum wlr_input_device_type type;
void *resource;
};
void wlr_wlb_registry_poll(struct wlr_backend_state *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