aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/view.h
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-04-02 10:57:45 -0400
committerLibravatar emersion <contact@emersion.fr>2018-04-02 10:57:45 -0400
commit61fabede14bb3a8fe9ee5a249352cd405fd1b9bf (patch)
treede0cc1378f2edba5cc194c8dcebe4d5fdaeda647 /include/sway/tree/view.h
parentAdd sway_view_impl (diff)
downloadsway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.tar.gz
sway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.tar.zst
sway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.zip
Address review comments
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r--include/sway/tree/view.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index c68739d6..4e753b2a 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -69,10 +69,8 @@ enum sway_view_prop {
69struct sway_view_impl { 69struct sway_view_impl {
70 const char *(*get_prop)(struct sway_view *view, 70 const char *(*get_prop)(struct sway_view *view,
71 enum sway_view_prop prop); 71 enum sway_view_prop prop);
72 void (*set_size)(struct sway_view *view, 72 void (*configure)(struct sway_view *view, double ox, double oy, int width,
73 int width, int height); 73 int height);
74 void (*set_position)(struct sway_view *view,
75 double ox, double oy);
76 void (*set_activated)(struct sway_view *view, bool activated); 74 void (*set_activated)(struct sway_view *view, bool activated);
77 void (*close)(struct sway_view *view); 75 void (*close)(struct sway_view *view);
78}; 76};
@@ -114,14 +112,19 @@ const char *view_get_class(struct sway_view *view);
114 112
115const char *view_get_instance(struct sway_view *view); 113const char *view_get_instance(struct sway_view *view);
116 114
117void view_set_size(struct sway_view *view, int width, int height); 115void view_configure(struct sway_view *view, double ox, double oy, int width,
118 116 int height);
119void view_set_position(struct sway_view *view, double ox, double oy);
120 117
121void view_set_activated(struct sway_view *view, bool activated); 118void view_set_activated(struct sway_view *view, bool activated);
122 119
123void view_close(struct sway_view *view); 120void view_close(struct sway_view *view);
124 121
122void view_damage_whole(struct sway_view *view);
123
124void view_damage_from(struct sway_view *view);
125
126// view implementation
127
125void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); 128void view_map(struct sway_view *view, struct wlr_surface *wlr_surface);
126 129
127void view_map_unmanaged(struct sway_view *view, 130void view_map_unmanaged(struct sway_view *view,
@@ -129,8 +132,8 @@ void view_map_unmanaged(struct sway_view *view,
129 132
130void view_unmap(struct sway_view *view); 133void view_unmap(struct sway_view *view);
131 134
132void view_damage_whole(struct sway_view *view); 135void view_update_position(struct sway_view *view, double ox, double oy);
133 136
134void view_damage_from(struct sway_view *view); 137void view_update_size(struct sway_view *view, int width, int height);
135 138
136#endif 139#endif