mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Seat: abstract away a view switch statement
We have our view abstraction, so why not use it?
This commit is contained in:
parent
9a99ba604f
commit
2847e0d54f
5 changed files with 25 additions and 19 deletions
4
view.h
4
view.h
|
|
@ -43,6 +43,8 @@ struct cg_view {
|
|||
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);
|
||||
struct wlr_surface *(*wlr_surface_at)(struct cg_view *view, double sx, double sy,
|
||||
double *sub_x, double *sub_y);
|
||||
bool (*is_primary)(struct cg_view *view);
|
||||
};
|
||||
|
||||
|
|
@ -50,6 +52,8 @@ 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);
|
||||
struct wlr_surface *view_wlr_surface_at(struct cg_view *view, double sx, double sy,
|
||||
double *sub_x, double *sub_y);
|
||||
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