]> git.sur5r.net Git - i3/i3/blobdiff - include/libi3.h
Consolidate all convert_* functions into libi3.
[i3/i3] / include / libi3.h
index 71fba764540f41ab5c4ff8e2c1e6e50a48373ba0..c87ec3e3d43f64c9a098c5f48a66628b5232e02b 100644 (file)
@@ -179,4 +179,20 @@ uint32_t get_mod_mask_for(uint32_t keysym,
  */
 i3Font load_font(const char *pattern, bool fallback);
 
+/**
+ * Converts the given string to UTF-8 from UCS-2 big endian. The return value
+ * must be freed after use.
+ *
+ */
+char *convert_ucs2_to_utf8(xcb_char2b_t *text, size_t num_glyphs);
+
+/**
+ * Converts the given string to UCS-2 big endian for use with
+ * xcb_image_text_16(). The amount of real glyphs is stored in real_strlen,
+ * a buffer containing the UCS-2 encoded string (16 bit per glyph) is
+ * returned. It has to be freed when done.
+ *
+ */
+xcb_char2b_t *convert_utf8_to_ucs2(char *input, int *real_strlen);
+
 #endif