summaryrefslogtreecommitdiff
path: root/monkey/schedule.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-02-12 13:36:12 +0000
committerVincent Sanders <vince@kyllikki.org>2016-02-12 13:37:50 +0000
commit5d3c38a704e2e13fae7ed93e9029fa4543c8525b (patch)
treeb416edf65013ec3717879537b07ae9080d41c204 /monkey/schedule.h
parenta1e79a8ff60682915e963b845c495a4690ce68db (diff)
downloadnetsurf-5d3c38a704e2e13fae7ed93e9029fa4543c8525b.tar.gz
netsurf-5d3c38a704e2e13fae7ed93e9029fa4543c8525b.tar.bz2
remove reliance on GLib from monkey frontend
This changes the monkey implemntation to use a simple scheduler list and select instead of glib events.
Diffstat (limited to 'monkey/schedule.h')
-rw-r--r--monkey/schedule.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/monkey/schedule.h b/monkey/schedule.h
index 44ef9bf3b..14fad8247 100644
--- a/monkey/schedule.h
+++ b/monkey/schedule.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Daniel Silverstone <dsilvers@digital-scurf.org>
+ * Copyright 2008 Vincent Sanders <vince@simtec.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,11 +16,33 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NETSURF_GTK_CALLBACK_H
-#define NETSURF_GTK_CALLBACK_H 1
+#ifndef NETSURF_MONKEY_SCHEDULE_H
+#define NETSURF_MONKEY_SCHEDULE_H
-nserror monkey_schedule(int t, void (*callback)(void *p), void *p);
+/**
+ * Schedule a callback.
+ *
+ * \param tival interval before the callback should be made in ms
+ * \param callback callback function
+ * \param p user parameter, passed to callback function
+ *
+ * The callback function will be called as soon as possible after t ms have
+ * passed.
+ */
+
+nserror monkey_schedule(int tival, void (*callback)(void *p), void *p);
-bool schedule_run(void);
+/**
+ * Process scheduled callbacks up to current time.
+ *
+ * @return The number of milliseconds untill the next scheduled event
+ * or -1 for no event.
+ */
+int monkey_schedule_run(void);
+
+/**
+ * Log a list of all scheduled callbacks.
+ */
+void monkey_schedule_list(void);
-#endif /* NETSURF_GTK_CALLBACK_H */
+#endif