]> git.sur5r.net Git - i3/i3/blob - include/workspace.h
Merge branch 'next' into testcases
[i3/i3] / include / workspace.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * © 2009 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11 #include <xcb/xcb.h>
12
13 #include "data.h"
14 #include "xinerama.h"
15
16 #ifndef _WORKSPACE_H
17 #define _WORKSPACE_H
18
19 /**
20  * Sets the name (or just its number) for the given workspace. This has to
21  * be called for every workspace as the rendering function
22  * (render_internal_bar) relies on workspace->name and workspace->name_len
23  * being ready-to-use.
24  *
25  */
26 void workspace_set_name(Workspace *ws, const char *name);
27
28 /**
29  * Returns true if the workspace is currently visible. Especially important for
30  * multi-monitor environments, as they can have multiple currenlty active
31  * workspaces.
32  *
33  */
34 bool workspace_is_visible(Workspace *ws);
35
36 /** Switches to the given workspace */
37 void workspace_show(xcb_connection_t *conn, int workspace);
38
39 /**
40  * Initializes the given workspace if it is not already initialized. The given
41  * screen is to be understood as a fallback, if the workspace itself either
42  * was not assigned to a particular screen or cannot be placed there because
43  * the screen is not attached at the moment.
44  *
45  */
46 void workspace_initialize(Workspace *ws, i3Screen *screen);
47
48 /**
49  * Gets the first unused workspace for the given screen, taking into account
50  * the preferred_screen setting of every workspace (workspace assignments).
51  *
52  */
53 Workspace *get_first_workspace_for_screen(struct screens_head *slist, i3Screen *screen);
54
55 /**
56  * Unmaps all clients (and stack windows) of the given workspace.
57  *
58  * This needs to be called separately when temporarily rendering a workspace
59  * which is not the active workspace to force reconfiguration of all clients,
60  * like in src/xinerama.c when re-assigning a workspace to another screen.
61  *
62  */
63 void workspace_unmap_clients(xcb_connection_t *conn, Workspace *u_ws);
64
65
66 void workspace_map_clients(xcb_connection_t *conn, Workspace *ws);
67
68 #endif