2022-07-06 17:37:22 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
|
#ifndef __LABWC_REGIONS_H
|
|
|
|
|
#define __LABWC_REGIONS_H
|
|
|
|
|
|
|
|
|
|
//FIXME: ignore that there could be more than a single seat
|
|
|
|
|
|
|
|
|
|
struct seat;
|
|
|
|
|
struct view;
|
|
|
|
|
struct server;
|
|
|
|
|
struct output;
|
|
|
|
|
struct wl_list;
|
|
|
|
|
struct wlr_box;
|
|
|
|
|
|
|
|
|
|
/* Double use: rcxml.c for config and output.c for usage */
|
|
|
|
|
struct region {
|
|
|
|
|
struct wl_list link; /* struct rcxml.regions, struct output.regions */
|
|
|
|
|
char *name;
|
|
|
|
|
struct wlr_box geo;
|
|
|
|
|
struct wlr_box percentage;
|
|
|
|
|
struct {
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
} center;
|
|
|
|
|
};
|
|
|
|
|
|
2022-07-06 17:21:02 +02:00
|
|
|
/* Can be used as a cheap check to detect if there are any regions configured */
|
|
|
|
|
bool regions_available(void);
|
|
|
|
|
|
2022-07-06 17:37:22 +02:00
|
|
|
void regions_init(struct server *server, struct seat *seat);
|
|
|
|
|
void regions_update(struct output *output);
|
|
|
|
|
void regions_destroy(struct wl_list *regions);
|
|
|
|
|
|
2022-07-06 17:26:22 +02:00
|
|
|
struct region *regions_from_cursor(struct server *server);
|
2022-07-06 08:06:48 +02:00
|
|
|
struct region *regions_from_name(const char *region_name, struct output *output);
|
2022-07-06 07:19:28 +02:00
|
|
|
void regions_show_overlay(struct view *view, struct seat *seat, struct region *region);
|
|
|
|
|
void regions_hide_overlay(struct server *server, struct seat *seat);
|
2022-07-06 08:06:48 +02:00
|
|
|
|
2022-07-06 17:37:22 +02:00
|
|
|
#endif /* __LABWC_REGIONS_H */
|