#pragma once #include #include "../../os/WAYLAND/wl_context.h" #include "../../2d_structs.h" #include "../../os/WAYLAND/xdg-shell.h" typedef struct { ui_dimensions *dimensions; struct wl_surface *surface; struct xdg_surface *xdg_surface; struct xdg_toplevel *xdg_toplevel; /**/ struct wl_egl_window *egl_window; EGLSurface *egl_surface; } window; window *window_malloc(); /* the toplevel listener registration callback offers a void* arg for passing data inside the callback (our app state in this case, waiting for narrowing) */ window *window_new( const char *title, ui_dimensions *dim, wl_context *w, void *app );