2018-03-28 21:47:22 +02:00
|
|
|
#ifndef _SWAY_LAYERS_H
|
|
|
|
#define _SWAY_LAYERS_H
|
|
|
|
#include <stdbool.h>
|
2022-01-13 11:15:39 +01:00
|
|
|
#include <wlr/types/wlr_compositor.h>
|
2018-09-14 19:21:44 +02:00
|
|
|
#include <wlr/types/wlr_layer_shell_v1.h>
|
2024-01-23 16:17:37 +01:00
|
|
|
#include "sway/tree/view.h"
|
2018-03-28 21:47:22 +02:00
|
|
|
|
|
|
|
struct sway_layer_surface {
|
|
|
|
struct wl_listener map;
|
|
|
|
struct wl_listener unmap;
|
|
|
|
struct wl_listener surface_commit;
|
|
|
|
struct wl_listener output_destroy;
|
2024-01-18 16:04:51 +01:00
|
|
|
struct wl_listener node_destroy;
|
2019-07-05 20:45:11 +02:00
|
|
|
struct wl_listener new_popup;
|
2018-03-28 21:47:22 +02:00
|
|
|
|
2021-09-24 17:07:37 +02:00
|
|
|
bool mapped;
|
2021-12-23 12:09:14 +01:00
|
|
|
|
2024-01-23 16:17:37 +01:00
|
|
|
struct wlr_scene_tree *popups;
|
|
|
|
struct sway_popup_desc desc;
|
|
|
|
|
2024-01-18 16:04:51 +01:00
|
|
|
struct sway_output *output;
|
|
|
|
struct wlr_scene_layer_surface_v1 *scene;
|
|
|
|
struct wlr_scene_tree *tree;
|
|
|
|
struct wlr_layer_surface_v1 *layer_surface;
|
2018-03-28 21:47:22 +02:00
|
|
|
};
|
|
|
|
|
2019-07-05 20:45:11 +02:00
|
|
|
struct sway_layer_popup {
|
|
|
|
struct wlr_xdg_popup *wlr_popup;
|
2024-01-18 16:04:51 +01:00
|
|
|
struct wlr_scene_tree *scene;
|
|
|
|
struct sway_layer_surface *toplevel;
|
2020-12-05 17:32:44 +01:00
|
|
|
|
|
|
|
struct wl_listener destroy;
|
2024-01-18 16:04:51 +01:00
|
|
|
struct wl_listener new_popup;
|
2020-12-05 17:32:44 +01:00
|
|
|
struct wl_listener commit;
|
|
|
|
};
|
|
|
|
|
2018-03-28 22:38:11 +02:00
|
|
|
struct sway_output;
|
2023-06-05 15:31:16 +02:00
|
|
|
|
|
|
|
struct wlr_layer_surface_v1 *toplevel_layer_surface_from_surface(
|
|
|
|
struct wlr_surface *surface);
|
|
|
|
|
2018-03-28 22:38:11 +02:00
|
|
|
void arrange_layers(struct sway_output *output);
|
|
|
|
|
2018-03-28 21:47:22 +02:00
|
|
|
#endif
|