X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Factions.hh;h=71d20ce24c70acaf49f38f3a98c397886f5fb1a2;hb=1ed841ef2a92dbe7d2b6f279967d42f6fc044580;hp=ed96fe8fe62a9b72e84442d4cb947715d71f5bd9;hpb=129f5655578f3118fbbf7d03e0b60fdcf9161474;p=chaz%2Fopenbox diff --git a/util/epist/actions.hh b/util/epist/actions.hh index ed96fe8f..71d20ce2 100644 --- a/util/epist/actions.hh +++ b/util/epist/actions.hh @@ -1,26 +1,62 @@ -// xOr: this is crap. -enum ActionType { - noaction = 0, - execute, - iconify, - raiseWindow, - lowerWindow, - closeWindow, - changeDesktop, - shade, - moveWindowUp, - moveWindowDown, - moveLeft, - moveRight, - nextWindow, - prevWindow, - - stringChain, - keyChain, - numberChain, - - cancel, - - NUM_ACTIONS +#ifndef __actions_hh +#define __actions_hh +#include + +extern "C" { +#include +} +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 ActionList; +#endif