]> git.sur5r.net Git - i3/i3/blobdiff - include/libi3.h
Merge branch 'master' into next
[i3/i3] / include / libi3.h
index c08bbd81dde5a152b832572edea30d83df20ce14..b8ed6c31c875f299929341e5e19590b36b7b318c 100644 (file)
@@ -184,7 +184,19 @@ uint32_t get_mod_mask_for(uint32_t keysym,
  * the fonts 'fixed' or '-misc-*' will be loaded instead of exiting.
  *
  */
-i3Font load_font(const char *pattern, bool fallback);
+i3Font load_font(const char *pattern, const bool fallback);
+
+/**
+ * Defines the font to be used for the forthcoming calls.
+ *
+ */
+void set_font(i3Font *font);
+
+/**
+ * Frees the resources taken by the current font.
+ *
+ */
+void free_font();
 
 /**
  * Converts the given string to UTF-8 from UCS-2 big endian. The return value
@@ -200,14 +212,13 @@ char *convert_ucs2_to_utf8(xcb_char2b_t *text, size_t num_glyphs);
  * returned. It has to be freed when done.
  *
  */
-xcb_char2b_t *convert_utf8_to_ucs2(char *input, int *real_strlen);
+xcb_char2b_t *convert_utf8_to_ucs2(char *input, size_t *real_strlen);
 
 /**
- * Defines the font to be used for the forthcoming draw_text and
- * predict_text_width calls.
+ * Defines the colors to be used for the forthcoming draw_text calls.
  *
  */
-void set_font(i3Font *font);
+void set_font_colors(xcb_gcontext_t gc, uint32_t foreground, uint32_t background);
 
 /**
  * Draws text onto the specified X drawable (normally a pixmap) at the
@@ -215,8 +226,8 @@ void set_font(i3Font *font);
  * glyph) and using the provided gc. Text can be specified as UCS-2 or UTF-8.
  *
  */
-void draw_text(char *text, size_t text_len, bool is_ucs2,
-        xcb_drawable_t drawable, xcb_gcontext_t gc, int x, int y);
+void draw_text(char *text, size_t text_len, bool is_ucs2, xcb_drawable_t drawable,
+        xcb_gcontext_t gc, int x, int y, int max_width);
 
 /**
  * Predict the text width in pixels for the given text. Text can be specified