]> git.sur5r.net Git - i3/i3/blob - i3bar/include/outputs.h
Add comments
[i3/i3] / i3bar / include / outputs.h
1 #ifndef OUTPUTS_H_
2 #define OUTPUTS_H_
3
4 #include <xcb/xcb.h>
5
6 #include "common.h"
7
8 typedef struct i3_output i3_output;
9
10 SLIST_HEAD(outputs_head, i3_output);
11 struct outputs_head *outputs;
12
13 /*
14  * Start parsing the received json-string
15  *
16  */
17 void        parse_outputs_json(char* json);
18
19 /*
20  * Initiate the output-list
21  *
22  */
23 void        init_outputs();
24
25 /*
26  * Returns the output with the given name
27  *
28  */
29 i3_output*  get_output_by_name(char* name);
30
31 struct i3_output {
32         char*           name;         /* Name of the output */
33         bool            active;       /* If the output is active */
34         int             ws;           /* The number of the currently visible ws */
35         rect            rect;         /* The rect (relative to the root-win) */
36
37         xcb_window_t    bar;          /* The id of the bar of the output */
38         xcb_gcontext_t  bargc;        /* The graphical context of the bar */
39
40         struct ws_head  *workspaces;  /* The workspaces on this output */
41
42         SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */
43 };
44
45 #endif