Change output format from dzen2 to i3bar
[sysstatus.git] / include / common.h
1 #ifndef __COMMON_H__
2 #define __COMMON_H__
3
4 #include <sys/types.h>
5
6 typedef struct GlobalData GlobalData;
7
8 typedef struct {
9   char *color;
10   char *text;
11 } StatusItem;
12
13
14 typedef struct GlobalData {
15   char *line;
16   size_t linelen;
17   size_t linemax; /* Buffer size, including NUL */
18   int firstItemDone;
19 } GlobalData;
20
21
22
23 void line_clear(GlobalData *g);
24 void line_append_strn(GlobalData *g, char *string, size_t len);
25 void line_append_str(GlobalData *g, char *string);
26
27 void line_append_item(GlobalData *g, StatusItem *s);
28
29 void line_print(GlobalData *g);
30
31 void statusitem_init(StatusItem *s);
32
33 #endif