Mercurial > audlegacy
diff src/audacious/eventqueue.c @ 3720:6f6982108001
Add a function to eventqueue API, event_queue_timed() which calls a hook at a postponed time.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Thu, 11 Oct 2007 20:00:05 -0500 |
parents | 331bfc72ef66 |
children | e71fe9091fc9 |
line wrap: on
line diff
--- a/src/audacious/eventqueue.c Thu Oct 11 19:51:08 2007 -0500 +++ b/src/audacious/eventqueue.c Thu Oct 11 20:00:05 2007 -0500 @@ -45,3 +45,17 @@ g_idle_add_full(G_PRIORITY_HIGH_IDLE, eventqueue_handle, hq, NULL); } + +void event_queue_timed(gint time, const gchar *name, gpointer data) +{ + HookCallQueue *hq; + + g_return_if_fail(name != NULL); + g_return_if_fail(user_data != NULL); + + hq = g_slice_new0(HookCallQueue); + hq->name = g_strdup(name); + hq->user_data = user_data; + + g_timeout_add(time, eventqueue_handle, hq); +}