summaryrefslogtreecommitdiffstats
path: root/eglib
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-08-16 15:36:11 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-08-16 15:36:11 +0000
commit3863eba35ca65bb4ea17d3763ae27afafdf0f4c2 (patch)
tree7f006254bb86e66fcb055c60461bf89df1855092 /eglib
parent60bef734ae800110dfdba8d88c33dc023498b18b (diff)
Implement some missing functions
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 */