sdlterm/src/sdlterm.h
changeset 57 911927edbdde
parent 54 86b84535726e
child 58 50308ed5e4f9
--- a/sdlterm/src/sdlterm.h	Mon Jan 07 23:15:17 2013 +0100
+++ b/sdlterm/src/sdlterm.h	Tue Jan 08 01:12:07 2013 +0100
@@ -199,7 +199,12 @@
     void show_cursor(int x, int y) { _cursor_x = x; _cursor_y = y; _cursor_visible = true; };
     void hide_cursor() { _cursor_visible = false; };
 
-    void get_next_event(Event &event);
+    /* Wait for an event.
+     *
+     * Timeout is in miliseconds, zero means wait indefinitely.
+     * Returns false on timeout, true on event.
+     */
+    bool wait_event(Event &event, Uint32 timeout);
 
     int get_width() const { return _screen.get_width(); };
     int get_height() const { return _screen.get_height(); };
@@ -215,5 +220,6 @@
     int _mousemove_last_y;
 
     const char *_translate_keyname(SDLKey sym);
+    static Uint32 _wait_event_callback(Uint32 interval, void *param);
 };