summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-03-30 19:04:06 -0400
committerLibravatar emersion <contact@emersion.fr>2018-03-30 19:04:06 -0400
commit96656427656118f2e4d725359cc880270b0e51be (patch)
treee2596e9cfa113efa43f2a411176c31e6208a58b1 /include
parentHandle set_cursor requests from clients (diff)
parentMerge pull request #1665 from emersion/damage-tracking-lite (diff)
downloadsway-96656427656118f2e4d725359cc880270b0e51be.tar.gz
sway-96656427656118f2e4d725359cc880270b0e51be.tar.zst
sway-96656427656118f2e4d725359cc880270b0e51be.zip
Merge branch 'wlroots' into client-cursors
Diffstat (limited to 'include')
-rw-r--r--include/sway/commands.h2
-rw-r--r--include/sway/output.h14
-rw-r--r--include/sway/server.h2
-rw-r--r--include/sway/tree/container.h8
-rw-r--r--include/sway/tree/layout.h5
-rw-r--r--include/sway/tree/view.h10
-rw-r--r--include/sway/tree/workspace.h2
7 files changed, 36 insertions, 7 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 1291d5fb..66f097ea 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -95,6 +95,7 @@ sway_cmd cmd_commands;
95sway_cmd cmd_debuglog; 95sway_cmd cmd_debuglog;
96sway_cmd cmd_default_border; 96sway_cmd cmd_default_border;
97sway_cmd cmd_default_floating_border; 97sway_cmd cmd_default_floating_border;
98sway_cmd cmd_default_orientation;
98sway_cmd cmd_exec; 99sway_cmd cmd_exec;
99sway_cmd cmd_exec_always; 100sway_cmd cmd_exec_always;
100sway_cmd cmd_exit; 101sway_cmd cmd_exit;
@@ -125,7 +126,6 @@ sway_cmd cmd_move;
125sway_cmd cmd_new_float; 126sway_cmd cmd_new_float;
126sway_cmd cmd_new_window; 127sway_cmd cmd_new_window;
127sway_cmd cmd_no_focus; 128sway_cmd cmd_no_focus;
128sway_cmd cmd_orientation;
129sway_cmd cmd_output; 129sway_cmd cmd_output;
130sway_cmd cmd_permit; 130sway_cmd cmd_permit;
131sway_cmd cmd_reject; 131sway_cmd cmd_reject;
diff --git a/include/sway/output.h b/include/sway/output.h
index 6fb79987..b4980cd8 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -5,6 +5,7 @@
5#include <wayland-server.h> 5#include <wayland-server.h>
6#include <wlr/types/wlr_box.h> 6#include <wlr/types/wlr_box.h>
7#include <wlr/types/wlr_output.h> 7#include <wlr/types/wlr_output.h>
8#include "sway/tree/view.h"
8 9
9struct sway_server; 10struct sway_server;
10struct sway_container; 11struct sway_container;
@@ -13,17 +14,26 @@ struct sway_output {
13 struct wlr_output *wlr_output; 14 struct wlr_output *wlr_output;
14 struct sway_container *swayc; 15 struct sway_container *swayc;
15 struct sway_server *server; 16 struct sway_server *server;
16 struct timespec last_frame;
17 17
18 struct wl_list layers[4]; // sway_layer_surface::link 18 struct wl_list layers[4]; // sway_layer_surface::link
19 struct wlr_box usable_area; 19 struct wlr_box usable_area;
20 20
21 struct wl_listener frame; 21 struct timespec last_frame;
22 struct wlr_output_damage *damage;
23
22 struct wl_listener destroy; 24 struct wl_listener destroy;
23 struct wl_listener mode; 25 struct wl_listener mode;
24 struct wl_listener transform; 26 struct wl_listener transform;
25 27
28 struct wl_listener damage_destroy;
29 struct wl_listener damage_frame;
30
26 pid_t bg_pid; 31 pid_t bg_pid;
27}; 32};
28 33
34void output_damage_whole(struct sway_output *output);
35
36void output_damage_whole_view(struct sway_output *output,
37 struct sway_view *view);
38
29#endif 39#endif
diff --git a/include/sway/server.h b/include/sway/server.h
index 25eb64fe..61f21cdb 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -18,7 +18,6 @@ struct sway_server {
18 const char *socket; 18 const char *socket;
19 19
20 struct wlr_backend *backend; 20 struct wlr_backend *backend;
21 struct wlr_renderer *renderer;
22 21
23 struct wlr_compositor *compositor; 22 struct wlr_compositor *compositor;
24 struct wlr_data_device_manager *data_device_manager; 23 struct wlr_data_device_manager *data_device_manager;
@@ -26,7 +25,6 @@ struct sway_server {
26 struct sway_input_manager *input; 25 struct sway_input_manager *input;
27 26
28 struct wl_listener new_output; 27 struct wl_listener new_output;
29 struct wl_listener output_frame;
30 28
31 struct wlr_layer_shell *layer_shell; 29 struct wlr_layer_shell *layer_shell;
32 struct wl_listener layer_shell_surface; 30 struct wl_listener layer_shell_surface;
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 3bb497db..6aa66da0 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -99,8 +99,13 @@ struct sway_container *container_view_create(
99 99
100struct sway_container *container_output_destroy(struct sway_container *output); 100struct sway_container *container_output_destroy(struct sway_container *output);
101 101
102struct sway_container *container_workspace_destroy(
103 struct sway_container *workspace);
104
102struct sway_container *container_view_destroy(struct sway_container *view); 105struct sway_container *container_view_destroy(struct sway_container *view);
103 106
107struct sway_container *container_destroy(struct sway_container *cont);
108
104struct sway_container *container_set_layout(struct sway_container *container, 109struct sway_container *container_set_layout(struct sway_container *container,
105 enum sway_container_layout layout); 110 enum sway_container_layout layout);
106 111
@@ -140,4 +145,7 @@ void container_for_each_descendant_bfs(struct sway_container *container,
140void container_for_each_descendant_dfs(struct sway_container *container, 145void container_for_each_descendant_dfs(struct sway_container *container,
141 void (*f)(struct sway_container *container, void *data), void *data); 146 void (*f)(struct sway_container *container, void *data), void *data);
142 147
148bool container_has_anscestor(struct sway_container *descendant,
149 struct sway_container *anscestor);
150
143#endif 151#endif
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h
index ad52bdb0..0a904c4b 100644
--- a/include/sway/tree/layout.h
+++ b/include/sway/tree/layout.h
@@ -39,6 +39,11 @@ struct sway_container *container_add_sibling(struct sway_container *parent,
39 39
40struct sway_container *container_remove_child(struct sway_container *child); 40struct sway_container *container_remove_child(struct sway_container *child);
41 41
42struct sway_container *container_reap_empty(struct sway_container *container);
43
44void container_move_to(struct sway_container* container,
45 struct sway_container* destination);
46
42enum sway_container_layout container_get_default_layout(struct sway_container *output); 47enum sway_container_layout container_get_default_layout(struct sway_container *output);
43 48
44void container_sort_workspaces(struct sway_container *output); 49void container_sort_workspaces(struct sway_container *output);
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index e5f53f4e..3965d2b7 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -15,6 +15,8 @@ struct sway_xdg_surface_v6 {
15 struct wl_listener request_move; 15 struct wl_listener request_move;
16 struct wl_listener request_resize; 16 struct wl_listener request_resize;
17 struct wl_listener request_maximize; 17 struct wl_listener request_maximize;
18 struct wl_listener map;
19 struct wl_listener unmap;
18 struct wl_listener destroy; 20 struct wl_listener destroy;
19 21
20 int pending_width, pending_height; 22 int pending_width, pending_height;
@@ -28,8 +30,8 @@ struct sway_xwayland_surface {
28 struct wl_listener request_resize; 30 struct wl_listener request_resize;
29 struct wl_listener request_maximize; 31 struct wl_listener request_maximize;
30 struct wl_listener request_configure; 32 struct wl_listener request_configure;
31 struct wl_listener unmap_notify; 33 struct wl_listener map;
32 struct wl_listener map_notify; 34 struct wl_listener unmap;
33 struct wl_listener destroy; 35 struct wl_listener destroy;
34 36
35 int pending_width, pending_height; 37 int pending_width, pending_height;
@@ -113,4 +115,8 @@ void view_close(struct sway_view *view);
113 115
114void view_update_outputs(struct sway_view *view, const struct wlr_box *before); 116void view_update_outputs(struct sway_view *view, const struct wlr_box *before);
115 117
118void view_damage_whole(struct sway_view *view);
119
120void view_damage_from(struct sway_view *view);
121
116#endif 122#endif
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index d73b29c1..4e4c3450 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -23,4 +23,6 @@ struct sway_container *workspace_output_prev(struct sway_container *current);
23 23
24struct sway_container *workspace_prev(struct sway_container *current); 24struct sway_container *workspace_prev(struct sway_container *current);
25 25
26bool workspace_is_visible(struct sway_container *ws);
27
26#endif 28#endif