diff options
author | emersion <contact@emersion.fr> | 2018-04-02 10:57:45 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-04-02 10:57:45 -0400 |
commit | 61fabede14bb3a8fe9ee5a249352cd405fd1b9bf (patch) | |
tree | de0cc1378f2edba5cc194c8dcebe4d5fdaeda647 /include | |
parent | Add sway_view_impl (diff) | |
download | sway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.tar.gz sway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.tar.zst sway-61fabede14bb3a8fe9ee5a249352cd405fd1b9bf.zip |
Address review comments
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/tree/view.h | 21 |
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 { | |||
69 | struct sway_view_impl { | 69 | struct 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 | ||
115 | const char *view_get_instance(struct sway_view *view); | 113 | const char *view_get_instance(struct sway_view *view); |
116 | 114 | ||
117 | void view_set_size(struct sway_view *view, int width, int height); | 115 | void view_configure(struct sway_view *view, double ox, double oy, int width, |
118 | 116 | int height); | |
119 | void view_set_position(struct sway_view *view, double ox, double oy); | ||
120 | 117 | ||
121 | void view_set_activated(struct sway_view *view, bool activated); | 118 | void view_set_activated(struct sway_view *view, bool activated); |
122 | 119 | ||
123 | void view_close(struct sway_view *view); | 120 | void view_close(struct sway_view *view); |
124 | 121 | ||
122 | void view_damage_whole(struct sway_view *view); | ||
123 | |||
124 | void view_damage_from(struct sway_view *view); | ||
125 | |||
126 | // view implementation | ||
127 | |||
125 | void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); | 128 | void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); |
126 | 129 | ||
127 | void view_map_unmanaged(struct sway_view *view, | 130 | void view_map_unmanaged(struct sway_view *view, |
@@ -129,8 +132,8 @@ void view_map_unmanaged(struct sway_view *view, | |||
129 | 132 | ||
130 | void view_unmap(struct sway_view *view); | 133 | void view_unmap(struct sway_view *view); |
131 | 134 | ||
132 | void view_damage_whole(struct sway_view *view); | 135 | void view_update_position(struct sway_view *view, double ox, double oy); |
133 | 136 | ||
134 | void view_damage_from(struct sway_view *view); | 137 | void view_update_size(struct sway_view *view, int width, int height); |
135 | 138 | ||
136 | #endif | 139 | #endif |