]> git.sur5r.net Git - i3/i3/blobdiff - include/data.h
Refactor binding accessor
[i3/i3] / include / data.h
index 659a362b05e4b09f47f21d037fa02b39b97ef0f5..f6dc0d7c6bae1765cf86e8d754a808bf73ab76d6 100644 (file)
@@ -91,6 +91,14 @@ typedef enum {
     L_SPLITH = 6
 } layout_t;
 
+/**
+ * Binding input types. See Binding::input_type.
+ */
+typedef enum {
+    B_KEYBOARD = 0,
+    B_MOUSE = 1
+} input_type_t;
+
 /**
  * Stores a rectangle, for example the size of a window, the child window etc.
  * It needs to be packed so that the compiler will not add any padding bytes.
@@ -213,6 +221,10 @@ struct regex {
  *
  */
 struct Binding {
+    /* The type of input this binding is for. (Mouse bindings are not yet
+     * implemented. All bindings are currently assumed to be keyboard bindings.) */
+    input_type_t input_type;
+
     /** If true, the binding should be executed upon a KeyRelease event, not a
      * KeyPress (the default). */
     enum {
@@ -449,6 +461,9 @@ struct Assignment {
     TAILQ_ENTRY(Assignment) assignments;
 };
 
+/** Fullscreen modes. Used by Con.fullscreen_mode. */
+typedef enum { CF_NONE = 0, CF_OUTPUT = 1, CF_GLOBAL = 2 } fullscreen_mode_t;
+
 /**
  * A 'Con' represents everything from the X11 root window down to a single X11 window.
  *
@@ -537,7 +552,7 @@ struct Con {
 
     TAILQ_HEAD(swallow_head, Match) swallow_head;
 
-    enum { CF_NONE = 0, CF_OUTPUT = 1, CF_GLOBAL = 2 } fullscreen_mode;
+    fullscreen_mode_t fullscreen_mode;
     /* layout is the layout of this container: one of split[v|h], stacked or
      * tabbed. Special containers in the tree (above workspaces) have special
      * layouts like dockarea or output.