]> git.sur5r.net Git - i3/i3/blob - i3bar/include/common.h
remove unused statusline_buffer
[i3/i3] / i3bar / include / common.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3bar - an xcb-based status- and ws-bar for i3
5  * © 2010-2011 Axel Wagner and contributors (see also: LICENSE)
6  *
7  */
8 #pragma once
9
10 #include <stdbool.h>
11 #include <xcb/xcb.h>
12 #include <xcb/xproto.h>
13 #include "libi3.h"
14 #include "queue.h"
15
16 typedef struct rect_t rect;
17
18 struct ev_loop *main_loop;
19 char *statusline;
20
21 struct rect_t {
22     int x;
23     int y;
24     int w;
25     int h;
26 };
27
28 typedef enum {
29     /* First value to make it the default. */
30     ALIGN_LEFT,
31     ALIGN_CENTER,
32     ALIGN_RIGHT
33 } blockalign_t;
34
35 /* This data structure represents one JSON dictionary, multiple of these make
36  * up one status line. */
37 struct status_block {
38     i3String *full_text;
39
40     char *color;
41     uint32_t min_width;
42     blockalign_t align;
43
44     bool urgent;
45     bool no_separator;
46
47     /* The amount of pixels necessary to render a separater after the block. */
48     uint32_t sep_block_width;
49
50     /* The amount of pixels necessary to render this block. These variables are
51      * only temporarily used in refresh_statusline(). */
52     uint32_t width;
53     uint32_t x_offset;
54     uint32_t x_append;
55
56     /* Optional */
57     char *name;
58     char *instance;
59
60     TAILQ_ENTRY(status_block) blocks;
61 };
62
63 TAILQ_HEAD(statusline_head, status_block) statusline_head;
64
65 #include "child.h"
66 #include "ipc.h"
67 #include "outputs.h"
68 #include "util.h"
69 #include "workspaces.h"
70 #include "mode.h"
71 #include "trayclients.h"
72 #include "xcb.h"
73 #include "config.h"
74 #include "libi3.h"
75 #include "parse_json_header.h"