summaryrefslogtreecommitdiffstats
path: root/include/sway/tree/view.h
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-03-31 17:49:40 -0400
committerLibravatar emersion <contact@emersion.fr>2018-03-31 17:49:40 -0400
commitb2c2ee693b6f1cdaeb204a1469c0fa1b775a498c (patch)
tree1fd4a806d0ab7ba780d5fb93acb741b9b1dc3f85 /include/sway/tree/view.h
parentMerge pull request #1684 from swaywm/follow-warp (diff)
downloadsway-b2c2ee693b6f1cdaeb204a1469c0fa1b775a498c.tar.gz
sway-b2c2ee693b6f1cdaeb204a1469c0fa1b775a498c.tar.zst
sway-b2c2ee693b6f1cdaeb204a1469c0fa1b775a498c.zip
Introduce common functions to create, map, unmap, destroy views
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r--include/sway/tree/view.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 3965d2b7..82a5541b 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -4,6 +4,8 @@
4#include <wlr/types/wlr_surface.h> 4#include <wlr/types/wlr_surface.h>
5#include <wlr/types/wlr_xdg_shell_v6.h> 5#include <wlr/types/wlr_xdg_shell_v6.h>
6#include <wlr/xwayland.h> 6#include <wlr/xwayland.h>
7#include "sway/input/input-manager.h"
8#include "sway/input/seat.h"
7 9
8struct sway_container; 10struct sway_container;
9struct sway_view; 11struct sway_view;
@@ -94,9 +96,13 @@ struct sway_view {
94 } iface; 96 } iface;
95 97
96 // only used for unmanaged views (shell specific) 98 // only used for unmanaged views (shell specific)
97 struct wl_list unmanaged_view_link; // sway_root::unmanaged views 99 struct wl_list unmanaged_view_link; // sway_root::unmanaged_views
98}; 100};
99 101
102struct sway_view *view_create(enum sway_view_type type);
103
104void view_destroy(struct sway_view *view);
105
100const char *view_get_title(struct sway_view *view); 106const char *view_get_title(struct sway_view *view);
101 107
102const char *view_get_app_id(struct sway_view *view); 108const char *view_get_app_id(struct sway_view *view);
@@ -113,7 +119,12 @@ void view_set_activated(struct sway_view *view, bool activated);
113 119
114void view_close(struct sway_view *view); 120void view_close(struct sway_view *view);
115 121
116void view_update_outputs(struct sway_view *view, const struct wlr_box *before); 122void view_map(struct sway_view *view, struct wlr_surface *wlr_surface);
123
124void view_map_unmanaged(struct sway_view *view,
125 struct wlr_surface *wlr_surface);
126
127void view_unmap(struct sway_view *view);
117 128
118void view_damage_whole(struct sway_view *view); 129void view_damage_whole(struct sway_view *view);
119 130