X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Feventdispatcher.h;h=dca659274f5cc3cdc6c1f48f003399f814290f25;hb=49c1f3c3ffdf318579a809f3f800442c0c76c818;hp=6f6fe6f72a9455320e8954655eda10f2a01d1dcd;hpb=8dbddc01acb154403c38348fd3fbea22ee0b33c4;p=libs%2Fcore.git diff --git a/source/eventdispatcher.h b/source/eventdispatcher.h index 6f6fe6f..dca6592 100644 --- a/source/eventdispatcher.h +++ b/source/eventdispatcher.h @@ -1,9 +1,3 @@ -/* $Id$ - -This file is part of libmspio -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ #ifndef EVENTDISPATCHER_H_ #define EVENTDISPATCHER_H_ @@ -26,10 +20,16 @@ public: void remove(Base &); /** - Checks for and dispatches events. If block is true, will block until events - are available. + Checks for and dispatches events. If there are no events available, blocks + until there are. + */ + void tick(); + + /** + Checks for and dispatches events. If there are no events available, waits + at most the specified time before returning. */ - void tick(bool =true); + void tick(const Time::TimeDelta &); private: struct Slot { @@ -46,6 +46,7 @@ private: void object_events_changed(PollEvent, Base *); void object_deleted(Base *); + void dispatch(); }; } // namespace IO