2 * vim:ts=4:sw=4:expandtab
4 * i3bar - an xcb-based status- and ws-bar for i3
5 * © 2010 Axel Wagner and contributors (see also: LICENSE)
7 * outputs.c: Maintaining the outputs list
15 #include <cairo/cairo-xcb.h>
19 typedef struct i3_output i3_output;
21 SLIST_HEAD(outputs_head, i3_output);
22 struct outputs_head* outputs;
25 * Start parsing the received JSON string
28 void parse_outputs_json(char* json);
31 * Initiate the outputs list
34 void init_outputs(void);
37 * Returns the output with the given name
40 i3_output* get_output_by_name(char* name);
43 * Returns true if the output has the currently focused workspace
46 bool output_has_focus(i3_output* output);
49 char* name; /* Name of the output */
50 bool active; /* If the output is active */
51 bool primary; /* If it is the primary output */
52 bool visible; /* If the bar is visible on this output */
53 int ws; /* The number of the currently visible ws */
54 rect rect; /* The rect (relative to the root window) */
56 /* Off-screen buffer for preliminary rendering of the bar. */
58 /* Off-screen buffer for pre-rendering the statusline, separated to make clipping easier. */
59 surface_t statusline_buffer;
60 /* How much of statusline_buffer's horizontal space was used on last statusline render. */
62 /* Whether statusline block short texts where used on last statusline render. */
63 bool statusline_short_text;
64 /* The actual window on which we draw. */
67 struct ws_head* workspaces; /* The workspaces on this output */
68 struct tc_head* trayclients; /* The tray clients on this output */
70 SLIST_ENTRY(i3_output)
71 slist; /* Pointer for the SLIST-Macro */