]> git.sur5r.net Git - i3/i3/blobdiff - include/libi3.h
Merge branch 'master' into next
[i3/i3] / include / libi3.h
index 2c46815621c4ebfc4a05c394d6bb418b7cbc9281..54fa0cc730a6e4e83e174f6c2762aa4b20edae1d 100644 (file)
@@ -8,8 +8,8 @@
  * as i3-msg, i3-config-wizard, …
  *
  */
-#ifndef _LIBI3_H
-#define _LIBI3_H
+#ifndef I3_LIBI3_H
+#define I3_LIBI3_H
 
 #include <stdbool.h>
 #include <stdarg.h>
 #include <xcb/xproto.h>
 #include <xcb/xcb_keysyms.h>
 
+#if PANGO_SUPPORT
+#include <pango/pango.h>
+#endif
+
 /**
  * Opaque data structure for storing strings.
  *
@@ -54,13 +58,23 @@ struct Font {
             /** Font table for this font (may be NULL) */
             xcb_charinfo_t *table;
         } xcb;
+
+#if PANGO_SUPPORT
+        /** The pango font description */
+        PangoFontDescription *pango_desc;
+#endif
     } specific;
 };
 
 /* Since this file also gets included by utilities which don’t use the i3 log
  * infrastructure, we define a fallback. */
+#if !defined(LOG)
+void verboselog(char *fmt, ...);
+#define LOG(fmt, ...) verboselog("[libi3] " __FILE__ " " fmt, ##__VA_ARGS__)
+#endif
 #if !defined(ELOG)
-#define ELOG(fmt, ...) fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__)
+void errorlog(char *fmt, ...);
+#define ELOG(fmt, ...) errorlog("[libi3] ERROR: " fmt, ##__VA_ARGS__)
 #endif
 
 /**
@@ -341,4 +355,10 @@ xcb_visualtype_t *get_visualtype(xcb_screen_t *screen);
  */
 bool is_debug_build() __attribute__((const));
 
+/**
+ * Returns the name of a temporary file with the specified prefix.
+ *
+ */
+char *get_process_filename(const char *prefix);
+
 #endif