i3
workspace.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * workspace.c: Modifying workspaces, accessing them, moving containers to
8  * workspaces.
9  *
10  */
11 #ifndef I3_WORKSPACE_H
12 #define I3_WORKSPACE_H
13 
14 #include "data.h"
15 #include "tree.h"
16 #include "randr.h"
17 
27 Con *workspace_get(const char *num, bool *created);
28 
29 /*
30  * Returns a pointer to a new workspace in the given output. The workspace
31  * is created attached to the tree hierarchy through the given content
32  * container.
33  *
34  */
35 Con *create_workspace_on_output(Output *output, Con *content);
36 
37 #if 0
38 
45 void workspace_set_name(Workspace *ws, const char *name);
46 #endif
47 
54 bool workspace_is_visible(Con *ws);
55 
60 void workspace_show(Con *ws);
61 
66 void workspace_show_by_name(const char *num);
67 
72 Con* workspace_next(void);
73 
78 Con* workspace_prev(void);
79 
85 
91 
96 void workspace_back_and_forth(void);
97 
103 
104 
105 #if 0
106 
115 void workspace_assign_to(Workspace *ws, Output *screen, bool hide_it);
116 
124 void workspace_initialize(Workspace *ws, Output *screen, bool recheck);
125 
131 Workspace *get_first_workspace_for_output(Output *screen);
132 
141 void workspace_unmap_clients(xcb_connection_t *conn, Workspace *u_ws);
142 
147 void workspace_map_clients(xcb_connection_t *conn, Workspace *ws);
148 #endif
149 
156 
163 void ws_force_orientation(Con *ws, orientation_t orientation);
164 
176 
184 #endif
A 'Con' represents everything from the X11 root window down to a single X11 window.
Definition: data.h:457
void workspace_show(Con *workspace)
Switches to the given workspace.
Definition: workspace.c:481
bool workspace_is_visible(Con *ws)
Returns true if the workspace is currently visible.
Definition: workspace.c:233
Con * workspace_next_on_output(void)
Returns the next workspace on the same output.
Definition: workspace.c:641
Con * workspace_encapsulate(Con *ws)
Creates a new container and re-parents all of children from the given workspace into it...
Definition: workspace.c:882
Con * workspace_prev(void)
Returns the previous workspace.
Definition: workspace.c:569
void workspace_back_and_forth(void)
Focuses the previously focused workspace.
Definition: workspace.c:753
xcb_connection_t * conn
Definition: main.c:42
void ws_force_orientation(Con *ws, orientation_t orientation)
'Forces' workspace orientation by moving all cons into a new split-con with the same orientation as t...
Definition: workspace.c:810
void workspace_show_by_name(const char *num)
Looks up the workspace by name and switches to it.
Definition: workspace.c:489
void workspace_update_urgent_flag(Con *ws)
Goes through all clients on the given workspace and updates the workspace’s urgent flag accordingly...
Definition: workspace.c:796
Con * workspace_back_and_forth_get(void)
Returns the previously focused workspace con, or NULL if unavailable.
Definition: workspace.c:766
Con * workspace_next(void)
Returns the next workspace.
Definition: workspace.c:499
Con * workspace_prev_on_output(void)
Returns the previous workspace on the same output.
Definition: workspace.c:696
orientation_t
Definition: data.h:56
An Output is a physical output on your graphics driver.
Definition: data.h:282
Con * workspace_get(const char *num, bool *created)
Returns a pointer to the workspace with the given number (starting at 0), creating the workspace if n...
Definition: workspace.c:47
Con * workspace_attach_to(Con *ws)
Called when a new con (with a window, not an empty or split con) should be attached to the workspace ...
Definition: workspace.c:853
Con * create_workspace_on_output(Output *output, Con *content)
Definition: workspace.c:114