Author: miguel
Date: 2007-07-20 18:48:49 -0400 (Fri, 20 Jul 2007)
New Revision: 82393
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/runtime.cpp
trunk/moon/src/runtime.h
Log:
2007-07-20 Miguel de Icaza <[EMAIL PROTECTED]>
* runtime.cpp (html_timer_timeout_add): Added helper routine to
setup Html timeouts.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-07-20 22:44:01 UTC (rev 82392)
+++ trunk/moon/src/ChangeLog 2007-07-20 22:48:49 UTC (rev 82393)
@@ -1,3 +1,8 @@
+2007-07-20 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * runtime.cpp (html_timer_timeout_add): Added helper routine to
+ setup Html timeouts.
+
2007-07-20 Chris Toshok <[EMAIL PROTECTED]>
* canvas.cpp, canvas.h, panel.cpp, panel.h: move much of the guts
Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp 2007-07-20 22:44:01 UTC (rev 82392)
+++ trunk/moon/src/runtime.cpp 2007-07-20 22:48:49 UTC (rev 82393)
@@ -17,6 +17,7 @@
#include <math.h>
#include <gtk/gtk.h>
+#include <glib.h>
#define Visual _XVisual
#include <gdk/gdkx.h>
@@ -777,7 +778,24 @@
stylus_init ();
}
+uint32_t
+html_timer_timeout_add (int32_t interval, GSourceFunc callback, gpointer data)
+{
+#if GLIB_CHECK_VERSION(2,14,0)
+ if (interval > 1000 && ((interval % 1000) == 0))
+ return g_timeout_add_seconds (interval / 1000, callback, data);
+ else
+#endif
+ return g_timeout_add (interval, callback, data);
+}
+
void
+html_timer_timeout_stop (uint32_t source_id)
+{
+ g_source_remove (source_id);
+}
+
+void
runtime_shutdown ()
{
if (!inited)
Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h 2007-07-20 22:44:01 UTC (rev 82392)
+++ trunk/moon/src/runtime.h 2007-07-20 22:48:49 UTC (rev 82393)
@@ -154,6 +154,9 @@
void runtime_init (void);
+uint32_t html_timer_timeout_add (int32_t interval, GSourceFunc callback,
gpointer data);
+void html_timer_timeout_stop (uint32_t source_id);
+
void runtime_shutdown (void);
G_END_DECLS
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches