diff options
| author | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-07-19 13:11:27 +0000 |
|---|---|---|
| committer | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-07-19 13:11:27 +0000 |
| commit | f586e55a8cd3d740a1b7b3a0801bad27030926f9 (patch) | |
| tree | d9a6889fbb1f4088af2b56b3ddc0934acd7f2a26 /util/epist/actions.hh | |
| parent | 0326ac961fb82d8d7aab22e4da1859adeeceb2f7 (diff) | |
Added an action class and started the even handler.
Diffstat (limited to 'util/epist/actions.hh')
| -rw-r--r-- | util/epist/actions.hh | 99 |
1 files changed, 60 insertions, 39 deletions
diff --git a/util/epist/actions.hh b/util/epist/actions.hh index a61319c3..71d20ce2 100644 --- a/util/epist/actions.hh +++ b/util/epist/actions.hh @@ -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 |
