]> Dogcows Code - chaz/openbox/blobdiff - util/epist/actions.hh
make both for's work teh same way
[chaz/openbox] / util / epist / actions.hh
index a61319c32f8f2b1c3e86b54acbd690b557a31232..71d20ce24c70acaf49f38f3a98c397886f5fb1a2 100644 (file)
@@ -1,41 +1,62 @@
-// xOr: this is crap.
-enum ActionType {
-  noaction = 0,
-  execute,
-  iconify,
-  raiseWindow,
-  lowerWindow,
-  closeWindow,
-  shade,
-  moveWindowUp,
-  moveWindowDown,
-  moveWindowLeft,
-  moveWindowRight,
-  nextWindow,
-  prevWindow,
-
-  nextWindow,
-  prevWindow,
-  nextWindowOnAllDesktops,
-  prevWindowOnAllDesktops,
-
-  nextWindowOfClass,
-  prevWindowOfClass,
-
-  changeDesktop,
-  nextDesktop,
-  prevDesktop,
-
-  // these are openbox extensions
-  showRootMenu,
-  showWorkspaceMenu,
-
-  stringChain, 
-  keyChain,
-  numberChain,
-
-  cancel,
-
-  NUM_ACTIONS
+#ifndef __actions_hh
+#define __actions_hh
+#include <list>
+
+extern "C" {
+#include <X11/X.h>
+}
+class Action {
+public:
+    // xOr: this is crap.
+  enum ActionType {
+    noaction = 0,
+    execute,
+    iconify,
+    raiseWindow,
+    lowerWindow,
+    closeWindow,
+    shade,
+    moveWindowUp,
+    moveWindowDown,
+    moveWindowLeft,
+    moveWindowRight,
+
+    nextWindow,
+    prevWindow,
+    nextWindowOnAllDesktops,
+    prevWindowOnAllDesktops,
+
+    nextWindowOfClass,
+    prevWindowOfClass,
+
+    changeDesktop,
+    nextDesktop,
+    prevDesktop,
+
+    // these are openbox extensions
+    showRootMenu,
+    showWorkspaceMenu,
+
+    stringChain, 
+    keyChain,
+    numberChain,
+
+    cancel,
+  };
+
+private:
+  enum Action::ActionType _type;
+  const KeyCode _keycode;
+  const int _modifierMask;
+  
+public:
+  inline enum ActionType type() const { return _type;}
+  inline const KeyCode keycode() const { return _keycode; }
+  inline const int modifierMask() const { return _modifierMask; }
+
+  Action::Action(enum ActionType type, KeyCode keycode, int modifierMask);
 };
+  
+typedef list<Action> ActionList;
 
+#endif
This page took 0.020941 seconds and 4 git commands to generate.