wayland file

This commit is contained in:
Rakarake 2025-12-18 14:59:57 +01:00
parent 77d6df8970
commit 75f2150d96
4 changed files with 219 additions and 194 deletions

27
wayland.h Normal file
View file

@ -0,0 +1,27 @@
#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);