diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/commands.h | 2 | ||||
-rw-r--r-- | include/sway/config.h | 13 | ||||
-rw-r--r-- | include/sway/tree/workspace.h | 2 | ||||
-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 | ||||
-rw-r--r-- | include/swaylock/swaylock.h | 3 |
8 files changed, 49 insertions, 38 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index 1654eb48..370a1f7a 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -95,7 +95,7 @@ struct cmd_results *add_color(const char *name, | |||
95 | /** | 95 | /** |
96 | * TODO: Move this function and its dependent functions to container.c. | 96 | * TODO: Move this function and its dependent functions to container.c. |
97 | */ | 97 | */ |
98 | void container_resize_tiled(struct sway_container *parent, enum wlr_edges edge, | 98 | bool container_resize_tiled(struct sway_container *parent, enum wlr_edges edge, |
99 | int amount); | 99 | int amount); |
100 | 100 | ||
101 | sway_cmd cmd_assign; | 101 | sway_cmd cmd_assign; |
diff --git a/include/sway/config.h b/include/sway/config.h index 35f0e708..af5c7a18 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -167,13 +167,12 @@ struct output_config { | |||
167 | }; | 167 | }; |
168 | 168 | ||
169 | /** | 169 | /** |
170 | * Maps a workspace name to an output name. | 170 | * Stores configuration for a workspace, regardless of whether the workspace |
171 | * | 171 | * exists. |
172 | * Set via `workspace <x> output <y>` | ||
173 | */ | 172 | */ |
174 | struct workspace_output { | 173 | struct workspace_config { |
175 | char *output; | ||
176 | char *workspace; | 174 | char *workspace; |
175 | char *output; | ||
177 | }; | 176 | }; |
178 | 177 | ||
179 | struct bar_config { | 178 | struct bar_config { |
@@ -327,7 +326,7 @@ struct sway_config { | |||
327 | list_t *modes; | 326 | list_t *modes; |
328 | list_t *bars; | 327 | list_t *bars; |
329 | list_t *cmd_queue; | 328 | list_t *cmd_queue; |
330 | list_t *workspace_outputs; | 329 | list_t *workspace_configs; |
331 | list_t *output_configs; | 330 | list_t *output_configs; |
332 | list_t *input_configs; | 331 | list_t *input_configs; |
333 | list_t *seat_configs; | 332 | list_t *seat_configs; |
@@ -518,6 +517,8 @@ struct bar_config *default_bar_config(void); | |||
518 | 517 | ||
519 | void free_bar_config(struct bar_config *bar); | 518 | void free_bar_config(struct bar_config *bar); |
520 | 519 | ||
520 | void free_workspace_config(struct workspace_config *wsc); | ||
521 | |||
521 | /** | 522 | /** |
522 | * Updates the value of config->font_height based on the max title height | 523 | * Updates the value of config->font_height based on the max title height |
523 | * reported by each container. If recalculate is true, the containers will | 524 | * reported by each container. If recalculate is true, the containers will |
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h index e4b616d1..c8220b39 100644 --- a/include/sway/tree/workspace.h +++ b/include/sway/tree/workspace.h | |||
@@ -48,6 +48,8 @@ struct sway_workspace { | |||
48 | 48 | ||
49 | extern char *prev_workspace_name; | 49 | extern char *prev_workspace_name; |
50 | 50 | ||
51 | struct workspace_config *workspace_find_config(const char *ws_name); | ||
52 | |||
51 | struct sway_output *workspace_get_initial_output(const char *name); | 53 | struct sway_output *workspace_get_initial_output(const char *name); |
52 | 54 | ||
53 | struct sway_workspace *workspace_create(struct sway_output *output, | 55 | struct sway_workspace *workspace_create(struct sway_output *output, |
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 |
diff --git a/include/swaylock/swaylock.h b/include/swaylock/swaylock.h index 2f0cd34d..970e3cc9 100644 --- a/include/swaylock/swaylock.h +++ b/include/swaylock/swaylock.h | |||
@@ -101,5 +101,8 @@ void render_frame(struct swaylock_surface *surface); | |||
101 | void render_frames(struct swaylock_state *state); | 101 | void render_frames(struct swaylock_state *state); |
102 | void damage_surface(struct swaylock_surface *surface); | 102 | void damage_surface(struct swaylock_surface *surface); |
103 | void damage_state(struct swaylock_state *state); | 103 | void damage_state(struct swaylock_state *state); |
104 | void initialize_pw_backend(void); | ||
105 | bool attempt_password(struct swaylock_password *pw); | ||
106 | void clear_password_buffer(struct swaylock_password *pw); | ||
104 | 107 | ||
105 | #endif | 108 | #endif |