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 #pragma once
12 
13 #include "data.h"
14 #include "tree.h"
15 #include "randr.h"
16 
26 Con *workspace_get(const char *num, bool *created);
27 
28 /*
29  * Returns a pointer to a new workspace in the given output. The workspace
30  * is created attached to the tree hierarchy through the given content
31  * container.
32  *
33  */
34 Con *create_workspace_on_output(Output *output, Con *content);
35 
36 #if 0
37 
44 void workspace_set_name(Workspace *ws, const char *name);
45 #endif
46 
53 bool workspace_is_visible(Con *ws);
54 
59 void workspace_show(Con *ws);
60 
65 void workspace_show_by_name(const char *num);
66 
71 Con* workspace_next(void);
72 
77 Con* workspace_prev(void);
78 
84 
90 
95 void workspace_back_and_forth(void);
96 
102 
103 
104 #if 0
105 
114 void workspace_assign_to(Workspace *ws, Output *screen, bool hide_it);
115 
123 void workspace_initialize(Workspace *ws, Output *screen, bool recheck);
124 
130 Workspace *get_first_workspace_for_output(Output *screen);
131 
140 void workspace_unmap_clients(xcb_connection_t *conn, Workspace *u_ws);
141 
146 void workspace_map_clients(xcb_connection_t *conn, Workspace *ws);
147 #endif
148 
155 
162 void ws_force_orientation(Con *ws, orientation_t orientation);
163 
175 
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:761
xcb_connection_t * conn
Definition: main.c:47
void workspace_back_and_forth(void)
Focuses the previously focused workspace.
Definition: workspace.c:718
An Output is a physical output on your graphics driver.
Definition: data.h:301
Con * workspace_next(void)
Returns the next workspace.
Definition: workspace.c:465
Con * workspace_prev(void)
Returns the previous workspace.
Definition: workspace.c:535
bool workspace_is_visible(Con *ws)
Returns true if the workspace is currently visible.
Definition: workspace.c:232
Con * create_workspace_on_output(Output *output, Con *content)
Definition: workspace.c:110
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:44
Con * workspace_prev_on_output(void)
Returns the previous workspace on the same output.
Definition: workspace.c:661
void workspace_show(Con *ws)
Switches to the given workspace.
Definition: workspace.c:447
Con * workspace_encapsulate(Con *ws)
Creates a new container and re-parents all of children from the given workspace into it...
Definition: workspace.c:847
A 'Con' represents everything from the X11 root window down to a single X11 window.
Definition: data.h:479
orientation_t
Definition: data.h:55
void workspace_show_by_name(const char *num)
Looks up the workspace by name and switches to it.
Definition: workspace.c:455
Con * workspace_next_on_output(void)
Returns the next workspace on the same output.
Definition: workspace.c:606
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:818
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:775
Con * workspace_back_and_forth_get(void)
Returns the previously focused workspace con, or NULL if unavailable.
Definition: workspace.c:731