]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/xcb.h
Merge branch 'master' into next
[i3/i3] / i3bar / include / xcb.h
index c1b7cc14e3575bd98051ddd3040b89af16fd90aa..69440537448c99096306b04dbc95659c04b9aeb4 100644 (file)
@@ -1,9 +1,10 @@
 /*
- * i3bar - an xcb-based status- and ws-bar for i3
+ * vim:ts=4:sw=4:expandtab
  *
- * © 2010-2011 Axel Wagner and contributors
+ * i3bar - an xcb-based status- and ws-bar for i3
+ * © 2010-2012 Axel Wagner and contributors (see also: LICENSE)
  *
- * See file LICNSE for license information
+ * xcb.c: Communicating with X
  *
  */
 #ifndef XCB_H_
@@ -29,21 +30,33 @@ struct xcb_color_strings_t {
     char *bar_bg;
     char *active_ws_fg;
     char *active_ws_bg;
+    char *active_ws_border;
     char *inactive_ws_fg;
     char *inactive_ws_bg;
+    char *inactive_ws_border;
     char *focus_ws_bg;
     char *focus_ws_fg;
+    char *focus_ws_border;
     char *urgent_ws_bg;
     char *urgent_ws_fg;
+    char *urgent_ws_border;
 };
 
 typedef struct xcb_colors_t xcb_colors_t;
 
 /*
- * Initialize xcb and use the specified fontname for text-rendering
+ * Early initialization of the connection to X11: Everything which does not
+ * depend on 'config'.
  *
  */
-char *init_xcb(char *fontname);
+char *init_xcb_early();
+
+/**
+ * Initialization which depends on 'config' being usable. Called after the
+ * configuration has arrived.
+ *
+ */
+void init_xcb_late(char *fontname);
 
 /*
  * Initialize the colors
@@ -56,13 +69,33 @@ void init_colors(const struct xcb_color_strings_t *colors);
  * Called once, before the program terminates.
  *
  */
-void clean_xcb();
+void clean_xcb(void);
 
 /*
  * Get the earlier requested atoms and save them in the prepared data-structure
  *
  */
-void get_atoms();
+void get_atoms(void);
+
+/*
+ * Reparents all tray clients of the specified output to the root window. This
+ * is either used when shutting down, when an output appears (xrandr --output
+ * VGA1 --off) or when the primary output changes.
+ *
+ * Applications using the tray will start the protocol from the beginning again
+ * afterwards.
+ *
+ */
+void kick_tray_clients(i3_output *output);
+
+/*
+ * We need to set the _NET_SYSTEM_TRAY_COLORS atom on the tray selection window
+ * to make GTK+ 3 applets with Symbolic Icons visible. If the colors are unset,
+ * they assume a light background.
+ * See also https://bugzilla.gnome.org/show_bug.cgi?id=679591
+ *
+ */
+void init_tray_colors(void);
 
 /*
  * Destroy the bar of the specified output
@@ -74,32 +107,30 @@ void destroy_window(i3_output *output);
  * Reallocate the statusline-buffer
  *
  */
-void realloc_sl_buffer();
+void realloc_sl_buffer(void);
 
 /*
  * Reconfigure all bars and create new for newly activated outputs
  *
  */
-void reconfig_windows();
+void reconfig_windows(void);
 
 /*
  * Render the bars, with buttons and statusline
  *
  */
-void draw_bars();
+void draw_bars(bool force_unhide);
 
 /*
  * Redraw the bars, i.e. simply copy the buffer to the barwindow
  *
  */
-void redraw_bars();
+void redraw_bars(void);
 
 /*
- * Predicts the length of text based on cached data.
- * The string has to be encoded in ucs2 and glyph_len has to be the length
- * of the string (in glyphs).
+ * Set the current binding mode
  *
  */
-uint32_t predict_text_extents(xcb_char2b_t *text, uint32_t length);
+void set_current_mode(struct mode *mode);
 
 #endif