From f586e55a8cd3d740a1b7b3a0801bad27030926f9 Mon Sep 17 00:00:00 2001 From: Scott Moynes Date: Fri, 19 Jul 2002 13:11:27 +0000 Subject: Added an action class and started the even handler. --- util/epist/actions.hh | 99 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 39 deletions(-) (limited to 'util/epist/actions.hh') 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 + +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 -- cgit v1.2.3