2024-04-05 11:35:31 +09:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
|
#ifndef LABWC_OVERLAY_H
|
|
|
|
|
#define LABWC_OVERLAY_H
|
|
|
|
|
|
2025-08-31 04:38:36 +09:00
|
|
|
#include "common/edge.h"
|
|
|
|
|
|
|
|
|
|
struct seat;
|
2024-04-05 11:35:31 +09:00
|
|
|
|
2024-04-14 02:24:36 +09:00
|
|
|
struct overlay {
|
2025-08-31 04:41:08 +09:00
|
|
|
struct lab_scene_rect *rect;
|
2024-04-05 11:35:31 +09:00
|
|
|
|
|
|
|
|
/* Represents currently shown or delayed overlay */
|
|
|
|
|
struct {
|
|
|
|
|
/* Region overlay */
|
|
|
|
|
struct region *region;
|
|
|
|
|
|
|
|
|
|
/* Snap-to-edge overlay */
|
2025-08-17 16:01:50 -04:00
|
|
|
enum lab_edge edge;
|
2024-04-05 11:35:31 +09:00
|
|
|
struct output *output;
|
|
|
|
|
} active;
|
|
|
|
|
|
|
|
|
|
/* For delayed snap-to-edge overlay */
|
|
|
|
|
struct wl_event_source *timer;
|
|
|
|
|
};
|
|
|
|
|
|
2025-08-31 04:41:08 +09:00
|
|
|
/*
|
|
|
|
|
* Shows or updates an overlay when the grabbed window can be snapped to
|
|
|
|
|
* a region or an output edge. Calls overlay_finish() otherwise.
|
|
|
|
|
*/
|
2024-04-05 11:35:31 +09:00
|
|
|
void overlay_update(struct seat *seat);
|
2025-02-11 00:39:36 +01:00
|
|
|
|
2025-08-31 04:41:08 +09:00
|
|
|
/* Destroys the overlay if it exists */
|
2025-02-11 00:39:36 +01:00
|
|
|
void overlay_finish(struct seat *seat);
|
|
|
|
|
|
2024-04-05 11:35:31 +09:00
|
|
|
#endif
|