X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fepist.hh;h=1932902db45918bec99c83ac61fc9a5f9f892c71;hb=cd6c4ebcb27b796b214296aefd78a41235dd8640;hp=755fec8cd8a705958d40ab0c9ff50b7070abaac1;hpb=f586e55a8cd3d740a1b7b3a0801bad27030926f9;p=chaz%2Fopenbox diff --git a/util/epist/epist.hh b/util/epist/epist.hh index 755fec8c..1932902d 100644 --- a/util/epist/epist.hh +++ b/util/epist/epist.hh @@ -1,5 +1,5 @@ // -*- mode: C++; indent-tabs-mode: nil; -*- -// epist.hh for Epistory - a key handler for NETWM/EWMH window managers. +// epist.hh for Epistophy - a key handler for NETWM/EWMH window managers. // Copyright (c) 2002 - 2002 Ben Jansens // // Permission is hereby granted, free of charge, to any person obtaining a @@ -30,26 +30,29 @@ extern "C" { #include #include -#include +#include "actions.hh" +#include "window.hh" #include "../../src/BaseDisplay.hh" class XAtom; class screen; -class XWindow; class epist : public BaseDisplay { private: - std::string _rc_file; - XAtom *_xatom; - char **_argv; + std::string _rc_file; + XAtom *_xatom; + char **_argv; typedef std::vector ScreenList; - ScreenList _screens; + ScreenList _screens; typedef std::map WindowLookup; typedef WindowLookup::value_type WindowLookupPair; WindowLookup _windows; + + WindowList _clients; + WindowList::iterator _active; ActionList _actions; @@ -57,6 +60,11 @@ private: virtual bool handleSignal(int sig); void activateGrabs(); + void addAction(Action::ActionType act, unsigned int modifiers, + std::string key, int number = 0); + void addAction(Action::ActionType act, unsigned int modifiers, + std::string key, std::string str); + public: epist(char **argv, char *display_name, char *rc_file); virtual ~epist(); @@ -67,7 +75,17 @@ public: void removeWindow(XWindow *window); XWindow *findWindow(Window window) const; - list actions(void) { return _actions; } + void cycleScreen(int current, bool forward) const; + + void getLockModifiers(int &numlockMask, int &scrolllockMask) const { + numlockMask = NumLockMask; + scrolllockMask = ScrollLockMask; + } + + const ActionList &actions(void) { return _actions; } + + WindowList& clientsList() { return _clients; } + WindowList::iterator& activeWindow() { return _active; } }; #endif // __epist_hh