From 61fabede14bb3a8fe9ee5a249352cd405fd1b9bf Mon Sep 17 00:00:00 2001 From: emersion Date: Mon, 2 Apr 2018 10:57:45 -0400 Subject: Address review comments --- include/sway/tree/view.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'include') 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 { struct sway_view_impl { const char *(*get_prop)(struct sway_view *view, enum sway_view_prop prop); - void (*set_size)(struct sway_view *view, - int width, int height); - void (*set_position)(struct sway_view *view, - double ox, double oy); + void (*configure)(struct sway_view *view, double ox, double oy, int width, + int height); void (*set_activated)(struct sway_view *view, bool activated); void (*close)(struct sway_view *view); }; @@ -114,14 +112,19 @@ const char *view_get_class(struct sway_view *view); const char *view_get_instance(struct sway_view *view); -void view_set_size(struct sway_view *view, int width, int height); - -void view_set_position(struct sway_view *view, double ox, double oy); +void view_configure(struct sway_view *view, double ox, double oy, int width, + int height); void view_set_activated(struct sway_view *view, bool activated); void view_close(struct sway_view *view); +void view_damage_whole(struct sway_view *view); + +void view_damage_from(struct sway_view *view); + +// view implementation + void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); void view_map_unmanaged(struct sway_view *view, @@ -129,8 +132,8 @@ void view_map_unmanaged(struct sway_view *view, void view_unmap(struct sway_view *view); -void view_damage_whole(struct sway_view *view); +void view_update_position(struct sway_view *view, double ox, double oy); -void view_damage_from(struct sway_view *view); +void view_update_size(struct sway_view *view, int width, int height); #endif -- cgit v1.2.3