]> Dogcows Code - chaz/openbox/blob - otk/eventdispatcher.hh
make shape work with the titlebar and handle
[chaz/openbox] / otk / eventdispatcher.hh
1 #ifndef __eventdispatcher
2 #define __eventdispatcher
3
4 #include "eventhandler.hh"
5 #include <map>
6 #include <utility>
7
8 namespace otk {
9
10 typedef std::map<unsigned int, OtkEventHandler *> OtkEventMap;
11
12 class OtkEventDispatcher {
13 public:
14
15 OtkEventDispatcher();
16 virtual ~OtkEventDispatcher();
17
18 virtual void clearAllHandlers(void);
19 virtual void registerHandler(Window id, OtkEventHandler *handler);
20 virtual void clearHandler(Window id);
21 virtual void dispatchEvents(void);
22
23 inline void setFallbackHandler(OtkEventHandler *fallback)
24 { _fallback = fallback; }
25 OtkEventHandler *getFallbackHandler(void) const { return _fallback; }
26
27 private:
28 OtkEventMap _map;
29 OtkEventHandler *_fallback;
30
31 //! The time at which the last XEvent with a time was received
32 Time _lasttime; // XXX: store this! also provide an accessor!
33 };
34
35 }
36
37 #endif
This page took 0.036258 seconds and 4 git commands to generate.