2 * vim:ts=4:sw=4:expandtab
4 * i3bar - an xcb-based status- and ws-bar for i3
5 * © 2010-2012 Axel Wagner and contributors (see also: LICENSE)
7 * xcb.c: Communicating with X
14 //#include "outputs.h"
17 #define XCB_ATOM_CARDINAL CARDINAL
20 #define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0
21 #define _NET_SYSTEM_TRAY_ORIENTATION_VERT 1
22 #define SYSTEM_TRAY_REQUEST_DOCK 0
23 #define SYSTEM_TRAY_BEGIN_MESSAGE 1
24 #define SYSTEM_TRAY_CANCEL_MESSAGE 2
25 #define XEMBED_MAPPED (1 << 0)
26 #define XEMBED_EMBEDDED_NOTIFY 0
28 struct xcb_color_strings_t {
34 char *active_ws_border;
37 char *inactive_ws_border;
40 char *focus_ws_border;
43 char *urgent_ws_border;
46 typedef struct xcb_colors_t xcb_colors_t;
49 * Early initialization of the connection to X11: Everything which does not
53 char *init_xcb_early();
56 * Initialization which depends on 'config' being usable. Called after the
57 * configuration has arrived.
60 void init_xcb_late(char *fontname);
63 * Initialize the colors
66 void init_colors(const struct xcb_color_strings_t *colors);
69 * Cleanup the xcb-stuff.
70 * Called once, before the program terminates.
76 * Get the earlier requested atoms and save them in the prepared data-structure
82 * Reparents all tray clients of the specified output to the root window. This
83 * is either used when shutting down, when an output appears (xrandr --output
84 * VGA1 --off) or when the primary output changes.
86 * Applications using the tray will start the protocol from the beginning again
90 void kick_tray_clients(i3_output *output);
93 * We need to set the _NET_SYSTEM_TRAY_COLORS atom on the tray selection window
94 * to make GTK+ 3 applets with Symbolic Icons visible. If the colors are unset,
95 * they assume a light background.
96 * See also https://bugzilla.gnome.org/show_bug.cgi?id=679591
99 void init_tray_colors(void);
102 * Destroy the bar of the specified output
105 void destroy_window(i3_output *output);
108 * Reallocate the statusline-buffer
111 void realloc_sl_buffer(void);
114 * Reconfigure all bars and create new for newly activated outputs
117 void reconfig_windows(void);
120 * Render the bars, with buttons and statusline
123 void draw_bars(bool force_unhide);
126 * Redraw the bars, i.e. simply copy the buffer to the barwindow
129 void redraw_bars(void);
132 * Set the current binding mode
135 void set_current_mode(struct mode *mode);