aboutsummaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-01-06 07:26:54 -0500
committerDrew DeVault <sir@cmpwn.com>2016-01-06 07:26:54 -0500
commit8f5de70c93b2afaab0dd7d384c58ff3d3007193c (patch)
tree4826eca48ec5d4d2b827477c74de7d500f39f0fa /include/util.h
parent18f81850114af1ca969387e0715d9284e77b0148 (diff)
parent843e2ad2c140288733110691f7dc8252fbe4dc16 (diff)
Merge pull request #434 from mikkeloscar/detect-modifier
Send IPC modifier event on bar_modifier up/down
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 9cb861dd..4bbb64c8 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,6 +1,10 @@
#ifndef _SWAY_UTIL_H
#define _SWAY_UTIL_H
+#include <stdint.h>
+#include <wlc/wlc.h>
+#include <xkbcommon/xkbcommon.h>
+
/**
* Wrap i into the range [0, max[
*/
@@ -11,4 +15,18 @@ int wrap(int i, int max);
*/
int numlen(int n);
+/**
+ * Get modifier mask from modifier name.
+ *
+ * Returns the modifer mask or 0 if the name isn't found.
+ */
+uint32_t get_modifier_mask_by_name(const char *name);
+
+/**
+ * Get modifier name from modifier mask.
+ *
+ * Returns the modifier name or NULL if it isn't found.
+ */
+const char *get_modifier_name_by_mask(uint32_t modifier);
+
#endif