summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/config.h5
-rw-r--r--include/sway/tree/container.h6
-rw-r--r--include/sway/tree/view.h10
4 files changed, 18 insertions, 4 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 0732a90a..d39ac56c 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -144,6 +144,7 @@ sway_cmd cmd_splitt;
144sway_cmd cmd_splitv; 144sway_cmd cmd_splitv;
145sway_cmd cmd_sticky; 145sway_cmd cmd_sticky;
146sway_cmd cmd_swaybg_command; 146sway_cmd cmd_swaybg_command;
147sway_cmd cmd_title_format;
147sway_cmd cmd_unmark; 148sway_cmd cmd_unmark;
148sway_cmd cmd_workspace; 149sway_cmd cmd_workspace;
149sway_cmd cmd_ws_auto_back_and_forth; 150sway_cmd cmd_ws_auto_back_and_forth;
diff --git a/include/sway/config.h b/include/sway/config.h
index db942c3f..fa40ef4e 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -465,8 +465,11 @@ void free_bar_config(struct bar_config *bar);
465 * Updates the value of config->font_height based on the max title height 465 * Updates the value of config->font_height based on the max title height
466 * reported by each container. If recalculate is true, the containers will 466 * reported by each container. If recalculate is true, the containers will
467 * recalculate their heights before reporting. 467 * recalculate their heights before reporting.
468 *
469 * If the height has changed, all containers will be rearranged to take on the
470 * new size.
468 */ 471 */
469void config_find_font_height(bool recalculate); 472void config_update_font_height(bool recalculate);
470 473
471/* Global config singleton. */ 474/* Global config singleton. */
472extern struct sway_config *config; 475extern struct sway_config *config;
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index b07af72c..61ab7ca1 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -63,7 +63,8 @@ struct sway_container {
63 */ 63 */
64 size_t id; 64 size_t id;
65 65
66 char *name; 66 char *name; // The view's title (unformatted)
67 char *formatted_title; // The title displayed in the title bar
67 68
68 enum sway_container_type type; 69 enum sway_container_type type;
69 enum sway_container_layout layout; 70 enum sway_container_layout layout;
@@ -204,7 +205,6 @@ void container_update_title_textures(struct sway_container *container);
204 */ 205 */
205void container_calculate_title_height(struct sway_container *container); 206void container_calculate_title_height(struct sway_container *container);
206 207
207void container_update_title(struct sway_container *container, 208void container_notify_child_title_changed(struct sway_container *container);
208 const char *new_title);
209 209
210#endif 210#endif
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 21127ab1..9d4256f7 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -48,6 +48,7 @@ struct sway_view {
48 48
49 bool is_fullscreen; 49 bool is_fullscreen;
50 50
51 char *title_format;
51 enum sway_container_border border; 52 enum sway_container_border border;
52 int border_thickness; 53 int border_thickness;
53 54
@@ -164,6 +165,8 @@ const char *view_get_class(struct sway_view *view);
164 165
165const char *view_get_instance(struct sway_view *view); 166const char *view_get_instance(struct sway_view *view);
166 167
168const char *view_get_type(struct sway_view *view);
169
167void view_configure(struct sway_view *view, double ox, double oy, int width, 170void view_configure(struct sway_view *view, double ox, double oy, int width,
168 int height); 171 int height);
169 172
@@ -207,4 +210,11 @@ void view_child_init(struct sway_view_child *child,
207 210
208void view_child_destroy(struct sway_view_child *child); 211void view_child_destroy(struct sway_view_child *child);
209 212
213/**
214 * Re-read the view's title property and update any relevant title bars.
215 * The force argument makes it recreate the title bars even if the title hasn't
216 * changed.
217 */
218void view_update_title(struct sway_view *view, bool force);
219
210#endif 220#endif