blob: 3ec9a12e14974214124604a43bc80328e69d0b2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
|