aboutsummaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2016-01-06 07:26:54 -0500
committerFurkan Sahin <furkan-dev@proton.me>2016-01-06 07:26:54 -0500
commit050039753c2a8d044482564576d1852e7cd5b8de (patch)
tree4826eca48ec5d4d2b827477c74de7d500f39f0fa /include/util.h
parent27a6939461b028723cfdfefee9f5d2639cb5e88f (diff)
parente5cf133c9527242346cc8eae9a44714c04f629ba (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