labwc/include/workspaces.h
tokyo4j 53eac76eb2 Avoid double use of struct workspace
`struct workspace` was used both for representing an actual workspace
and for an entry of workspace configuration. Avoid it for clarity.
2026-01-31 01:24:01 +09:00

44 lines
1.1 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_WORKSPACES_H
#define LABWC_WORKSPACES_H
#include <stdbool.h>
#include <wayland-util.h>
#include <wayland-server-core.h>
struct seat;
struct server;
struct wlr_scene_tree;
struct workspace {
struct wl_list link; /* struct server.workspaces */
struct server *server;
char *name;
struct wlr_scene_tree *tree;
struct lab_cosmic_workspace *cosmic_workspace;
struct {
struct wl_listener activate;
struct wl_listener deactivate;
struct wl_listener remove;
} on_cosmic;
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;
};
void workspaces_init(struct server *server);
void workspaces_switch_to(struct workspace *target, bool update_focus);
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);
#endif /* LABWC_WORKSPACES_H */