diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-02-07 22:49:00 +0100 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-02-07 22:49:00 +0100 |
commit | 35a70d71f62e41d78d68247075ce174f2b6d997a (patch) | |
tree | c9af8d8c44256abfc100c396182fd27f1f4c7263 /include/render/window.h |
inital commit -- THE CUBES SPIN
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'include/render/window.h')
-rw-r--r-- | include/render/window.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/render/window.h b/include/render/window.h new file mode 100644 index 0000000..3ec9a12 --- /dev/null +++ b/include/render/window.h @@ -0,0 +1,32 @@ +#ifndef _WINDOW_H_ +#define _WINDOW_H_ + +#include <wayland-client.h> +#include <vulkan/vulkan.h> +#include <vulkan/vulkan_wayland.h> +#include <stdbool.h> +#include "xdg-shell-protocol.h" +#include "xdg-decoration-unstable-v1-protocol.h" + +struct window { + const char *title; + + struct wl_display *dpy; + struct wl_registry *reg; + struct wl_compositor *comp; + struct zxdg_decoration_manager_v1 *deco_manager; + struct zxdg_toplevel_decoration_v1 *deco; + struct wl_surface *surface; + struct xdg_wm_base *xdg_base; + struct xdg_surface *xdg_surface; + struct xdg_toplevel *xdg_toplevel; + + int32_t width, height; + bool resize, should_close; +}; + +struct window *window_init(const char *title); +void window_destroy(struct window *win); +VkSurfaceKHR window_create_vk_surface(VkInstance instance, struct window *win); + +#endif |