]> git.sur5r.net Git - i3/i3/blobdiff - include/util.h
Implement mapping from string to layout as extra function
[i3/i3] / include / util.h
index e5ba3341336e0ce6531bd5139b60e9091903bdd1..cbe9778cf98169f469659b5719e0f4ce5f1cd3a8 100644 (file)
@@ -69,6 +69,14 @@ Rect rect_sub(Rect a, Rect b);
  */
 __attribute__((pure)) bool name_is_digits(const char *name);
 
+/**
+ * Set 'out' to the layout_t value for the given layout. The function
+ * returns true on success or false if the passed string is not a valid
+ * layout name.
+ *
+ */
+bool layout_from_name(const char *layout_str, layout_t *out);
+
 /**
  * Parses the workspace name as a number. Returns -1 if the workspace should be
  * interpreted as a "named workspace".