]>
Dogcows Code - chaz/openbox/blob - otk/eventdispatcher.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __eventdispatcher
3 #define __eventdispatcher
5 #include "eventhandler.hh"
11 typedef std::map
<unsigned int, EventHandler
*> EventMap
;
13 class EventDispatcher
{
17 virtual ~EventDispatcher();
19 virtual void clearAllHandlers(void);
20 virtual void registerHandler(Window id
, EventHandler
*handler
);
21 virtual void clearHandler(Window id
);
22 virtual void dispatchEvents(void);
24 inline void setFallbackHandler(EventHandler
*fallback
)
25 { _fallback
= fallback
; }
26 EventHandler
*getFallbackHandler(void) const { return _fallback
; }
28 //! Sets an event handler that gets all events for all handlers after
29 //! any specific handlers have received them
30 inline void setMasterHandler(EventHandler
*master
)
32 EventHandler
*getMasterHandler(void) const { return _master
; }
34 EventHandler
*findHandler(Window win
);
36 inline Time
lastTime() const { return _lasttime
; }
40 EventHandler
*_fallback
;
41 EventHandler
*_master
;
43 //! The time at which the last XEvent with a time was received
46 void dispatch(Window win
, const XEvent
&e
);
47 void dispatchFocus(const XEvent
&e
);
This page took 0.039108 seconds and 4 git commands to generate.