diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/swaybar/bar.h | 5 | ||||
-rw-r--r-- | include/swaybar/i3bar.h | 34 | ||||
-rw-r--r-- | include/swaybar/ipc.h | 2 | ||||
-rw-r--r-- | include/swaybar/status_line.h | 26 |
4 files changed, 36 insertions, 31 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index 29e96159..20992014 100644 --- a/include/swaybar/bar.h +++ b/include/swaybar/bar.h | |||
@@ -54,7 +54,6 @@ struct swaybar { | |||
54 | struct wl_seat *seat; | 54 | struct wl_seat *seat; |
55 | 55 | ||
56 | struct swaybar_config *config; | 56 | struct swaybar_config *config; |
57 | struct swaybar_output *focused_output; | ||
58 | struct swaybar_pointer pointer; | 57 | struct swaybar_pointer pointer; |
59 | struct status_line *status; | 58 | struct status_line *status; |
60 | 59 | ||
@@ -95,9 +94,7 @@ struct swaybar_workspace { | |||
95 | bool urgent; | 94 | bool urgent; |
96 | }; | 95 | }; |
97 | 96 | ||
98 | void bar_setup(struct swaybar *bar, | 97 | bool bar_setup(struct swaybar *bar, const char *socket_path, const char *bar_id); |
99 | const char *socket_path, | ||
100 | const char *bar_id); | ||
101 | void bar_run(struct swaybar *bar); | 98 | void bar_run(struct swaybar *bar); |
102 | void bar_teardown(struct swaybar *bar); | 99 | void bar_teardown(struct swaybar *bar); |
103 | 100 | ||
diff --git a/include/swaybar/i3bar.h b/include/swaybar/i3bar.h new file mode 100644 index 00000000..12d9b317 --- /dev/null +++ b/include/swaybar/i3bar.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef _SWAYBAR_I3BAR_H | ||
2 | #define _SWAYBAR_I3BAR_H | ||
3 | |||
4 | #include "bar.h" | ||
5 | #include "status_line.h" | ||
6 | |||
7 | struct i3bar_block { | ||
8 | struct wl_list link; | ||
9 | int ref_count; | ||
10 | char *full_text, *short_text, *align; | ||
11 | bool urgent; | ||
12 | uint32_t *color; | ||
13 | int min_width; | ||
14 | char *name, *instance; | ||
15 | bool separator; | ||
16 | int separator_block_width; | ||
17 | bool markup; | ||
18 | // Airblader features | ||
19 | uint32_t background; | ||
20 | uint32_t border; | ||
21 | int border_top; | ||
22 | int border_bottom; | ||
23 | int border_left; | ||
24 | int border_right; | ||
25 | }; | ||
26 | |||
27 | void i3bar_block_unref(struct i3bar_block *block); | ||
28 | bool i3bar_handle_readable(struct status_line *status); | ||
29 | enum hotspot_event_handling i3bar_block_send_click(struct status_line *status, | ||
30 | struct i3bar_block *block, int x, int y, enum x11_button button); | ||
31 | enum x11_button wl_button_to_x11_button(uint32_t button); | ||
32 | enum x11_button wl_axis_to_x11_button(uint32_t axis, wl_fixed_t value); | ||
33 | |||
34 | #endif | ||
diff --git a/include/swaybar/ipc.h b/include/swaybar/ipc.h index a1696bcf..81e48a6b 100644 --- a/include/swaybar/ipc.h +++ b/include/swaybar/ipc.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
4 | #include "swaybar/bar.h" | 4 | #include "swaybar/bar.h" |
5 | 5 | ||
6 | void ipc_initialize(struct swaybar *bar, const char *bar_id); | 6 | bool ipc_initialize(struct swaybar *bar, const char *bar_id); |
7 | bool handle_ipc_readable(struct swaybar *bar); | 7 | bool handle_ipc_readable(struct swaybar *bar); |
8 | void ipc_get_workspaces(struct swaybar *bar); | 8 | void ipc_get_workspaces(struct swaybar *bar); |
9 | void ipc_send_workspace_command(struct swaybar *bar, const char *ws); | 9 | void ipc_send_workspace_command(struct swaybar *bar, const char *ws); |
diff --git a/include/swaybar/status_line.h b/include/swaybar/status_line.h index d3eabdf6..e6c7dac2 100644 --- a/include/swaybar/status_line.h +++ b/include/swaybar/status_line.h | |||
@@ -13,26 +13,6 @@ enum status_protocol { | |||
13 | PROTOCOL_I3BAR, | 13 | PROTOCOL_I3BAR, |
14 | }; | 14 | }; |
15 | 15 | ||
16 | struct i3bar_block { | ||
17 | struct wl_list link; | ||
18 | int ref_count; | ||
19 | char *full_text, *short_text, *align; | ||
20 | bool urgent; | ||
21 | uint32_t *color; | ||
22 | int min_width; | ||
23 | char *name, *instance; | ||
24 | bool separator; | ||
25 | int separator_block_width; | ||
26 | bool markup; | ||
27 | // Airblader features | ||
28 | uint32_t background; | ||
29 | uint32_t border; | ||
30 | int border_top; | ||
31 | int border_bottom; | ||
32 | int border_left; | ||
33 | int border_right; | ||
34 | }; | ||
35 | |||
36 | struct status_line { | 16 | struct status_line { |
37 | pid_t pid; | 17 | pid_t pid; |
38 | int read_fd, write_fd; | 18 | int read_fd, write_fd; |
@@ -55,11 +35,5 @@ struct status_line *status_line_init(char *cmd); | |||
55 | void status_error(struct status_line *status, const char *text); | 35 | void status_error(struct status_line *status, const char *text); |
56 | bool status_handle_readable(struct status_line *status); | 36 | bool status_handle_readable(struct status_line *status); |
57 | void status_line_free(struct status_line *status); | 37 | void status_line_free(struct status_line *status); |
58 | bool i3bar_handle_readable(struct status_line *status); | ||
59 | enum hotspot_event_handling i3bar_block_send_click(struct status_line *status, | ||
60 | struct i3bar_block *block, int x, int y, enum x11_button button); | ||
61 | void i3bar_block_unref(struct i3bar_block *block); | ||
62 | enum x11_button wl_button_to_x11_button(uint32_t button); | ||
63 | enum x11_button wl_axis_to_x11_button(uint32_t axis, wl_fixed_t value); | ||
64 | 38 | ||
65 | #endif | 39 | #endif |