summaryrefslogtreecommitdiffstats
path: root/eglib
diff options
context:
space:
mode:
Diffstat (limited to 'eglib')
-rw-r--r--eglib/gmain.c5
-rw-r--r--eglib/gmain.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/eglib/gmain.c b/eglib/gmain.c
index 027fd60c..ed708fc2 100644
--- a/eglib/gmain.c
+++ b/eglib/gmain.c
@@ -561,6 +561,11 @@ guint g_timeout_add(guint interval, GSourceFunc function, gpointer data)
return t->id;
}
+guint g_idle_add(GSourceFunc function, gpointer data)
+{
+ return g_timeout_add(1, function, data);
+}
+
/* GError */
GError* g_error_new_literal(GQuark domain, gint code, const gchar *message)
diff --git a/eglib/gmain.h b/eglib/gmain.h
index 8eb70dc7..a04d4ea0 100644
--- a/eglib/gmain.h
+++ b/eglib/gmain.h
@@ -108,6 +108,7 @@ void g_main_loop_run(GMainLoop *loop);
void g_main_loop_quit(GMainLoop *loop);
void g_main_loop_unref(GMainLoop *loop);
guint g_timeout_add(guint interval, GSourceFunc function, gpointer data);
+guint g_idle_add(GSourceFunc function, gpointer data);
gboolean g_source_remove(guint tag);
/* GError */
@@ -198,6 +199,8 @@ gpointer g_slist_nth_data(GSList *list, guint n);
int g_slist_position(GSList *list, GSList *link);
GSList* g_slist_last(GSList *list);
+#define g_slist_next(l) ((l)->next)
+
/* End GSList declarations */
/* Memory allocation related */