diff options
Diffstat (limited to 'include/util.h')
-rw-r--r-- | include/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h index f68deae8..9277fa6e 100644 --- a/include/util.h +++ b/include/util.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _SWAY_UTIL_H | 2 | #define _SWAY_UTIL_H |
3 | 3 | ||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | #include <stdbool.h> | ||
5 | #include <unistd.h> | 6 | #include <unistd.h> |
6 | #include <sys/types.h> | 7 | #include <sys/types.h> |
7 | #include <xkbcommon/xkbcommon.h> | 8 | #include <xkbcommon/xkbcommon.h> |
@@ -51,6 +52,14 @@ pid_t get_parent_pid(pid_t pid); | |||
51 | uint32_t parse_color(const char *color); | 52 | uint32_t parse_color(const char *color); |
52 | 53 | ||
53 | /** | 54 | /** |
55 | * Given a string that represents a boolean, return the boolean value. This | ||
56 | * function also takes in the current boolean value to support toggling. If | ||
57 | * toggling is not desired, pass in true for current so that toggling values | ||
58 | * get parsed as not true. | ||
59 | */ | ||
60 | bool parse_boolean(const char *boolean, bool current); | ||
61 | |||
62 | /** | ||
54 | * Given a path string, recurseively resolves any symlinks to their targets | 63 | * Given a path string, recurseively resolves any symlinks to their targets |
55 | * (which may be a file, directory) and returns the result. | 64 | * (which may be a file, directory) and returns the result. |
56 | * argument is returned. Caller must free the returned buffer. | 65 | * argument is returned. Caller must free the returned buffer. |