summaryrefslogtreecommitdiffstats
path: root/include/sway/extensions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/extensions.h')
-rw-r--r--include/sway/extensions.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/sway/extensions.h b/include/sway/extensions.h
new file mode 100644
index 00000000..f6b0c00e
--- /dev/null
+++ b/include/sway/extensions.h
@@ -0,0 +1,49 @@
1#ifndef _SWAY_EXTENSIONS_H
2#define _SWAY_EXTENSIONS_H
3
4#include <wayland-server.h>
5#include <wlc/wlc-wayland.h>
6#include "wayland-desktop-shell-server-protocol.h"
7#include "list.h"
8
9struct background_config {
10 wlc_handle output;
11 wlc_resource surface;
12 // we need the wl_resource of the surface in the destructor
13 struct wl_resource *wl_surface_res;
14 struct wl_client *client;
15 wlc_handle handle;
16};
17
18struct panel_config {
19 // wayland resource used in callbacks, is used to track this panel
20 struct wl_resource *wl_resource;
21 wlc_handle output;
22 wlc_resource surface;
23 // we need the wl_resource of the surface in the destructor
24 struct wl_resource *wl_surface_res;
25 enum desktop_shell_panel_position panel_position;
26 // used to determine if client is a panel
27 struct wl_client *client;
28 // wlc handle for this panel's surface, not set until panel is created
29 wlc_handle handle;
30};
31
32struct desktop_shell_state {
33 list_t *backgrounds;
34 list_t *panels;
35 list_t *lock_surfaces;
36 bool is_locked;
37};
38
39struct swaylock_state {
40 bool active;
41 wlc_handle output;
42 wlc_resource surface;
43};
44
45extern struct desktop_shell_state desktop_shell;
46
47void register_extensions(void);
48
49#endif