aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-11-22 21:06:08 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-11-22 21:06:08 -0500
commit4ca1e77fdbbf559a5bb28d4936afa6ade63985cd (patch)
tree935c9a56d20f591688d196a85cecfc6080727d26 /include/sway
parentAdd workspace to outputs (diff)
downloadsway-4ca1e77fdbbf559a5bb28d4936afa6ade63985cd.tar.gz
sway-4ca1e77fdbbf559a5bb28d4936afa6ade63985cd.tar.zst
sway-4ca1e77fdbbf559a5bb28d4936afa6ade63985cd.zip
Add views to tree and render them
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/container.h4
-rw-r--r--include/sway/server.h2
-rw-r--r--include/sway/view.h2
3 files changed, 8 insertions, 0 deletions
diff --git a/include/sway/container.h b/include/sway/container.h
index 2a96165f..96e4db69 100644
--- a/include/sway/container.h
+++ b/include/sway/container.h
@@ -125,7 +125,11 @@ struct sway_container {
125 list_t *marks; 125 list_t *marks;
126}; 126};
127 127
128void swayc_descendants_of_type(swayc_t *root, enum swayc_types type,
129 void (*func)(swayc_t *item, void *data), void *data);
130
128swayc_t *new_output(struct sway_output *sway_output); 131swayc_t *new_output(struct sway_output *sway_output);
129swayc_t *new_workspace(swayc_t *output, const char *name); 132swayc_t *new_workspace(swayc_t *output, const char *name);
133swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
130 134
131#endif 135#endif
diff --git a/include/sway/server.h b/include/sway/server.h
index 60f35190..b0684d15 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -4,6 +4,7 @@
4#include <wayland-server.h> 4#include <wayland-server.h>
5#include <wlr/backend.h> 5#include <wlr/backend.h>
6#include <wlr/backend/session.h> 6#include <wlr/backend/session.h>
7#include <wlr/types/wlr_compositor.h>
7#include <wlr/types/wlr_data_device.h> 8#include <wlr/types/wlr_data_device.h>
8#include <wlr/types/wlr_xdg_shell_v6.h> 9#include <wlr/types/wlr_xdg_shell_v6.h>
9#include <wlr/render.h> 10#include <wlr/render.h>
@@ -18,6 +19,7 @@ struct sway_server {
18 struct wlr_backend *backend; 19 struct wlr_backend *backend;
19 struct wlr_renderer *renderer; 20 struct wlr_renderer *renderer;
20 21
22 struct wlr_compositor *compositor;
21 struct wlr_data_device_manager *data_device_manager; 23 struct wlr_data_device_manager *data_device_manager;
22 24
23 struct sway_input *input; 25 struct sway_input *input;
diff --git a/include/sway/view.h b/include/sway/view.h
index 979b20a8..2675a6f5 100644
--- a/include/sway/view.h
+++ b/include/sway/view.h
@@ -1,6 +1,7 @@
1#ifndef _SWAY_VIEW_H 1#ifndef _SWAY_VIEW_H
2#define _SWAY_VIEW_H 2#define _SWAY_VIEW_H
3#include <wayland-server.h> 3#include <wayland-server.h>
4#include <wlr/types/wlr_surface.h>
4#include <wlr/types/wlr_xdg_shell_v6.h> 5#include <wlr/types/wlr_xdg_shell_v6.h>
5 6
6struct sway_container; 7struct sway_container;
@@ -38,6 +39,7 @@ struct sway_view {
38 struct wl_listener destroy; 39 struct wl_listener destroy;
39 enum sway_view_type type; 40 enum sway_view_type type;
40 struct sway_container *swayc; 41 struct sway_container *swayc;
42 struct wlr_surface *surface;
41 43
42 union { 44 union {
43 struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; 45 struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6;