summaryrefslogtreecommitdiff
path: root/textscreen/txt_desktop.h
diff options
context:
space:
mode:
authorSimon Howard2011-09-18 14:16:27 +0000
committerSimon Howard2011-09-18 14:16:27 +0000
commit96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa (patch)
tree4ae7dd32a8ce3da3f44c67b31c12b1ea242dad62 /textscreen/txt_desktop.h
parent4dc7b33e17069c6559e9b1b7cc1ecd878162f629 (diff)
downloadchocolate-doom-96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa.tar.gz
chocolate-doom-96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa.tar.bz2
chocolate-doom-96f7da6adf5d4b6eb7b6ab66bd1758a2b14d1efa.zip
Hook query code into setup tool, and add search results window.
Subversion-branch: /branches/v2-branch Subversion-revision: 2383
Diffstat (limited to 'textscreen/txt_desktop.h')
-rw-r--r--textscreen/txt_desktop.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/textscreen/txt_desktop.h b/textscreen/txt_desktop.h
index 42a011e7..4b6bd4b5 100644
--- a/textscreen/txt_desktop.h
+++ b/textscreen/txt_desktop.h
@@ -30,6 +30,8 @@
#include "txt_window.h"
+typedef void (*TxtIdleCallback)(void *user_data);
+
void TXT_AddDesktopWindow(txt_window_t *win);
void TXT_RemoveDesktopWindow(txt_window_t *win);
void TXT_DrawDesktop(void);
@@ -72,6 +74,21 @@ void TXT_GUIMainLoop(void);
txt_window_t *TXT_GetActiveWindow(void);
-#endif /* #ifndef TXT_DESKTOP_H */
+/**
+ * Set a callback function to be invoked periodically by the main
+ * loop code.
+ *
+ * @param callback The callback to invoke, or NULL to cancel
+ * an existing callback.
+ * @param user_data Extra data to pass to the callback.
+ * @param period Maximum time between invoking each callback.
+ * eg. a value of 200 will cause the callback
+ * to be invoked at least once every 200ms.
+ */
+
+void TXT_SetPeriodicCallback(TxtIdleCallback callback,
+ void *user_data,
+ unsigned int period);
+#endif /* #ifndef TXT_DESKTOP_H */