From 9a9f87d1ca698811134adcf2804c89c343cdba58 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 19 Apr 2004 22:46:46 +0000 Subject: find eventhandler --- src/FbTk/EventManager.cc | 7 ++++++- src/FbTk/EventManager.hh | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/FbTk/EventManager.cc b/src/FbTk/EventManager.cc index 6c697e6..9a11ab2 100644 --- a/src/FbTk/EventManager.cc +++ b/src/FbTk/EventManager.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: EventManager.cc,v 1.10 2003/10/14 16:23:16 rathnor Exp $ +// $Id: EventManager.cc,v 1.11 2004/04/19 22:46:46 fluxgen Exp $ #include "EventManager.hh" #include "FbWindow.hh" @@ -57,6 +57,11 @@ void EventManager::remove(const FbWindow &win) { unregisterEventHandler(win.window()); } +EventHandler *EventManager::find(Window win) { + return m_eventhandlers[win]; +} + + Window EventManager::getEventWindow(XEvent &ev) { // we only have cases for events that differ from xany switch (ev.type) { diff --git a/src/FbTk/EventManager.hh b/src/FbTk/EventManager.hh index 4b693ff..049d527 100644 --- a/src/FbTk/EventManager.hh +++ b/src/FbTk/EventManager.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: EventManager.hh,v 1.7 2003/12/16 17:06:49 fluxgen Exp $ +// $Id: EventManager.hh,v 1.8 2004/04/19 22:46:46 fluxgen Exp $ #include "EventHandler.hh" #include @@ -43,6 +43,8 @@ public: void add(EventHandler &ev, Window win) { registerEventHandler(ev, win); } void remove(Window win) { unregisterEventHandler(win); } + EventHandler *find(Window win); + // Some events have the parent window as the xany.window // This function always returns the actual window member of the event structure static Window getEventWindow(XEvent &ev); -- cgit v0.11.2