labwc/include/workspaces.h

49 lines
1.2 KiB
C
Raw Normal View History

2022-06-15 01:07:45 +02:00
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_WORKSPACES_H
#define LABWC_WORKSPACES_H
2022-06-15 01:07:45 +02:00
#include <stdbool.h>
#include <wayland-util.h>
2024-07-24 01:04:44 +02:00
#include <wayland-server-core.h>
2022-06-15 01:07:45 +02:00
struct seat;
struct server;
struct wlr_scene_tree;
2022-06-15 01:07:45 +02:00
/* Double use: as config in config/rcxml.c and as instance in workspaces.c */
struct workspace {
2022-11-03 19:58:21 +00:00
struct wl_list link; /*
* struct server.workspaces
* struct rcxml.workspace_config.workspaces
*/
2022-06-15 01:07:45 +02:00
struct server *server;
char *name;
struct wlr_scene_tree *tree;
2024-07-24 01:04:44 +02:00
struct lab_cosmic_workspace *cosmic_workspace;
struct {
struct wl_listener activate;
struct wl_listener deactivate;
struct wl_listener remove;
} on_cosmic;
2024-12-10 06:26:19 +01:00
struct lab_ext_workspace *ext_workspace;
struct {
struct wl_listener activate;
struct wl_listener deactivate;
struct wl_listener assign;
struct wl_listener remove;
} on_ext;
2022-06-15 01:07:45 +02:00
};
void workspaces_init(struct server *server);
void workspaces_switch_to(struct workspace *target, bool update_focus);
2022-06-15 01:07:45 +02:00
void workspaces_destroy(struct server *server);
void workspaces_osd_hide(struct seat *seat);
struct workspace *workspaces_find(struct workspace *anchor, const char *name,
bool wrap);
void workspaces_reconfigure(struct server *server);
2022-06-15 01:07:45 +02:00
#endif /* LABWC_WORKSPACES_H */