]> git.sur5r.net Git - i3/i3/blob - i3bar/include/outputs.h
Merge branch 'fix-fullscreen-scratch'
[i3/i3] / i3bar / include / outputs.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3bar - an xcb-based status- and ws-bar for i3
5  * © 2010-2011 Axel Wagner and contributors (see also: LICENSE)
6  *
7  * outputs.c: Maintaining the output-list
8  *
9  */
10 #ifndef OUTPUTS_H_
11 #define OUTPUTS_H_
12
13 #include <xcb/xcb.h>
14
15 #include "common.h"
16
17 typedef struct i3_output i3_output;
18
19 SLIST_HEAD(outputs_head, i3_output);
20 struct outputs_head *outputs;
21
22 /*
23  * Start parsing the received json-string
24  *
25  */
26 void parse_outputs_json(char* json);
27
28 /*
29  * Initiate the output-list
30  *
31  */
32 void init_outputs();
33
34 /*
35  * Returns the output with the given name
36  *
37  */
38 i3_output* get_output_by_name(char* name);
39
40 struct i3_output {
41     char*          name;          /* Name of the output */
42     bool           active;        /* If the output is active */
43     bool           primary;       /* If it is the primary output */
44     int            ws;            /* The number of the currently visible ws */
45     rect           rect;          /* The rect (relative to the root-win) */
46
47     xcb_window_t   bar;           /* The id of the bar of the output */
48     xcb_pixmap_t   buffer;        /* An extra pixmap for double-buffering */
49     xcb_gcontext_t bargc;         /* The graphical context of the bar */
50
51     struct ws_head *workspaces;   /* The workspaces on this output */
52     struct tc_head *trayclients;  /* The tray clients on this output */
53
54     SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */
55 };
56
57 #endif