text plugin: add color support
[babeltrace.git] / include / babeltrace / common-internal.h
index 1beb9d9bf1cb5510b0f72bd11e5edad1503e1603..e4825aec8cc564cd7ad19a2c09513310c5ed0b44 100644 (file)
@@ -3,6 +3,25 @@
 
 #include <babeltrace/babeltrace-internal.h>
 
+#define BT_COMMON_COLOR_RESET              "\033[0m"
+#define BT_COMMON_COLOR_BOLD               "\033[1m"
+#define BT_COMMON_COLOR_FG_DEFAULT         "\033[39m"
+#define BT_COMMON_COLOR_FG_RED             "\033[31m"
+#define BT_COMMON_COLOR_FG_GREEN           "\033[32m"
+#define BT_COMMON_COLOR_FG_YELLOW          "\033[33m"
+#define BT_COMMON_COLOR_FG_BLUE            "\033[34m"
+#define BT_COMMON_COLOR_FG_MAGENTA         "\033[35m"
+#define BT_COMMON_COLOR_FG_CYAN            "\033[36m"
+#define BT_COMMON_COLOR_FG_LIGHT_GRAY      "\033[37m"
+#define BT_COMMON_COLOR_BG_DEFAULT         "\033[49m"
+#define BT_COMMON_COLOR_BG_RED             "\033[41m"
+#define BT_COMMON_COLOR_BG_GREEN           "\033[42m"
+#define BT_COMMON_COLOR_BG_YELLOW          "\033[43m"
+#define BT_COMMON_COLOR_BG_BLUE            "\033[44m"
+#define BT_COMMON_COLOR_BG_MAGENTA         "\033[45m"
+#define BT_COMMON_COLOR_BG_CYAN            "\033[46m"
+#define BT_COMMON_COLOR_BG_LIGHT_GRAY      "\033[47m"
+
 BT_HIDDEN
 bool bt_common_is_setuid_setgid(void);
 
@@ -15,6 +34,9 @@ char *bt_common_get_home_plugin_path(void);
 BT_HIDDEN
 int bt_common_append_plugin_path_dirs(const char *paths, GPtrArray *dirs);
 
+BT_HIDDEN
+bool bt_common_colors_supported(void);
+
 BT_HIDDEN
 const char *bt_common_color_reset(void);
 
This page took 0.033844 seconds and 4 git commands to generate.