1 #ifndef EVENTDISPATCHER_H_
2 #define EVENTDISPATCHER_H_
4 #include <sigc++/connection.h>
5 #include <sigc++/trackable.h>
12 Put your I/O objects inside one of these to get signaled when something happens
15 class EventDispatcher: public sigc::trackable
21 sigc::connection evch_conn;
22 sigc::connection del_conn;
24 Slot(EventObject *o): obj(o) { }
27 typedef std::map<EventObject *, Slot> SlotMap;
35 void add(EventObject &);
36 void remove(EventObject &);
38 /** Checks for and dispatches events. If there are no events available,
39 blocks until there are. */
42 /** Checks for and dispatches events. If there are no events available,
43 waits at most the specified time before returning. */
44 void tick(const Time::TimeDelta &);
47 void object_events_changed(PollEvent, EventObject *);
48 void object_deleted(EventObject *);