3 This file is part of libmspio
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
7 #ifndef EVENTDISPATCHER_H_
8 #define EVENTDISPATCHER_H_
10 #include <sigc++/connection.h>
11 #include <sigc++/trackable.h>
18 Put your I/O objects inside one of these to get signaled when something happens
21 class EventDispatcher: public sigc::trackable
29 Checks for and dispatches events. If there are no events available, blocks
35 Checks for and dispatches events. If there are no events available, waits
36 at most the specified time before returning.
38 void tick(const Time::TimeDelta &);
43 sigc::connection evch_conn;
44 sigc::connection del_conn;
46 Slot(Base *o): obj(o) { }
48 typedef std::map<Base *, Slot> SlotMap;
53 void object_events_changed(PollEvent, Base *);
54 void object_deleted(Base *);