aboutsummaryrefslogtreecommitdiff
path: root/include/sway/tree
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-05-05 11:08:33 -0400
committerGitHub <noreply@github.com>2018-05-05 11:08:33 -0400
commita8d1b05bac4cee56731d7e4aaafdcd0acd6bb787 (patch)
tree7a4017641b384f2c33fbcb3a23d3c2bc497a9d17 /include/sway/tree
parent8dae168b77173f086880db0878f0a4b34a53e8b3 (diff)
parent936226845fc08ee64b6914b233d901ae92994206 (diff)
Merge pull request #1915 from RyanDwyer/title-format
Implement title_format
Diffstat (limited to 'include/sway/tree')
-rw-r--r--include/sway/tree/container.h6
-rw-r--r--include/sway/tree/view.h10
2 files changed, 13 insertions, 3 deletions
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 {
*/
size_t id;
- char *name;
+ char *name; // The view's title (unformatted)
+ char *formatted_title; // The title displayed in the title bar
enum sway_container_type type;
enum sway_container_layout layout;
@@ -204,7 +205,6 @@ void container_update_title_textures(struct sway_container *container);
*/
void container_calculate_title_height(struct sway_container *container);
-void container_update_title(struct sway_container *container,
- const char *new_title);
+void container_notify_child_title_changed(struct sway_container *container);
#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 {
bool is_fullscreen;
+ char *title_format;
enum sway_container_border border;
int border_thickness;
@@ -164,6 +165,8 @@ const char *view_get_class(struct sway_view *view);
const char *view_get_instance(struct sway_view *view);
+const char *view_get_type(struct sway_view *view);
+
void view_configure(struct sway_view *view, double ox, double oy, int width,
int height);
@@ -207,4 +210,11 @@ void view_child_init(struct sway_view_child *child,
void view_child_destroy(struct sway_view_child *child);
+/**
+ * Re-read the view's title property and update any relevant title bars.
+ * The force argument makes it recreate the title bars even if the title hasn't
+ * changed.
+ */
+void view_update_title(struct sway_view *view, bool force);
+
#endif