aboutsummaryrefslogtreecommitdiffstats
path: root/source/platform/platform_include.h
blob: b7489f62ad626eadefb7a3b944b947807fd3420b (plain) (blame)
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
33
34
35
36
#ifndef PLATFORM_INCLUDE_H
#define PLATFORM_INCLUDE_H

// NOTE: window and input. sits on top of base + core, the renderer only sees the raw
// wl_display / wl_surface through PlatformWindow.

#ifndef WAYLAND
#define WAYLAND 0
#endif

#if PLATFORM_LINUX && WAYLAND

#include <linux/input-event-codes.h>
#include <poll.h>
#include <wayland-client.h>
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbcommon-keysyms.h>

// NOTE: generated by wayland-scanner in compile.sh, the glue .c files are linked separately
#include "xdg-shell-client.h"
// NOTE: get_layer_surface has a parameter called `namespace`, a c++ keyword
#define namespace layer_namespace
#include "wlr-layer-shell-unstable-v1-client.h"
#undef namespace
#include "cursor-shape-v1-client.h"
#include "xdg-decoration-unstable-v1-client.h"

#include "platform.h"
#include "platform_linux_wayland.h"
#include "platform_linux_wayland.cpp"

#else
#error only wayland on linux is implemented
#endif

#endif // PLATFORM_INCLUDE_H