1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "eventdispatcher.hh"
13 OtkEventDispatcher::OtkEventDispatcher()
18 OtkEventDispatcher::~OtkEventDispatcher()
22 void OtkEventDispatcher::clearAllHandlers(void)
27 void OtkEventDispatcher::registerHandler(Window id, OtkEventHandler *handler)
29 _map.insert(std::pair<Window, OtkEventHandler*>(id, handler));
32 void OtkEventDispatcher::clearHandler(Window id)
37 void OtkEventDispatcher::dispatchEvents(void)
40 OtkEventHandler *handler;
41 OtkEventMap::iterator it;
43 while (XPending(OBDisplay::display)) {
44 XNextEvent(OBDisplay::display, &e);
45 it = _map.find(e.xany.window);