1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "eventdispatcher.hh"
13 OtkEventDispatcher::OtkEventDispatcher()
14 : _fallback(0), _master(0)
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)
38 void OtkEventDispatcher::dispatchEvents(void)
41 OtkEventHandler *handler;
42 OtkEventMap::iterator it;
44 while (XPending(OBDisplay::display)) {
45 XNextEvent(OBDisplay::display, &e);
47 #if defined(DEBUG) && 0
48 printf("Event %d window %lx\n", e.type, e.xany.window);
51 it = _map.find(e.xany.window);