mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-16 22:05:58 -05:00
Output: abstract away a view switch statement
We have our view abstraction, so why not use it?
This commit is contained in:
parent
431320443a
commit
9a99ba604f
5 changed files with 29 additions and 21 deletions
3
view.h
3
view.h
|
|
@ -41,12 +41,15 @@ struct cg_view {
|
|||
void (*activate)(struct cg_view *view, bool activate);
|
||||
void (*maximize)(struct cg_view *view, int output_width, int output_height);
|
||||
void (*get_geometry)(struct cg_view *view, int *width_out, int *height_out);
|
||||
void (*for_each_surface)(struct cg_view *view, wlr_surface_iterator_func_t iterator,
|
||||
void *data);
|
||||
bool (*is_primary)(struct cg_view *view);
|
||||
};
|
||||
|
||||
void view_activate(struct cg_view *view, bool activate);
|
||||
void view_maximize(struct cg_view *view);
|
||||
void view_center(struct cg_view *view);
|
||||
void view_for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data);
|
||||
bool view_is_primary(struct cg_view *view);
|
||||
void view_unmap(struct cg_view *view);
|
||||
void view_map(struct cg_view *view, struct wlr_surface *surface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue