glonkers/wayland.h
2025-12-18 14:59:57 +01:00

27 lines
653 B
C

#include <EGL/egl.h>
#include <wayland-egl.h>
#include "xdg-shell-protocol.h"
struct client_state {
int width, height;
/* Globals */
struct wl_display *wl_display;
struct wl_registry *wl_registry;
struct wl_compositor *wl_compositor;
struct xdg_wm_base *xdg_wm_base;
/* Objects */
struct wl_surface *wl_surface;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct wl_egl_window *egl_window;
EGLDisplay egl_display;
EGLConfig egl_config;
EGLSurface egl_surface;
EGLContext egl_context;
};
struct client_state wayland_init();
void commit(struct client_state *state);