summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authoremersion <[email protected]>2018-08-02 23:49:25 +0100
committerGitHub <[email protected]>2018-08-02 23:49:25 +0100
commit3a54e2291c017397ceff60511c29fe70d229bc8b (patch)
treed340b7776f945462f5ecffc830ada4d5fbe82f51 /include/util.h
parentc35a34262f8da368f65d37f811a2264647e0dae6 (diff)
parente07da5fc5c6ac5c186662b56b08ca71531119de0 (diff)
Merge branch 'master' into wlr-gamma-control
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h9
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 @@
#define _SWAY_UTIL_H
#include <stdint.h>
+#include <stdbool.h>
#include <unistd.h>
#include <sys/types.h>
#include <xkbcommon/xkbcommon.h>
@@ -51,6 +52,14 @@ pid_t get_parent_pid(pid_t pid);
uint32_t parse_color(const char *color);
/**
+ * Given a string that represents a boolean, return the boolean value. This
+ * function also takes in the current boolean value to support toggling. If
+ * toggling is not desired, pass in true for current so that toggling values
+ * get parsed as not true.
+ */
+bool parse_boolean(const char *boolean, bool current);
+
+/**
* Given a path string, recurseively resolves any symlinks to their targets
* (which may be a file, directory) and returns the result.
* argument is returned. Caller must free the returned buffer.