ocarina: Register an idle function

This function will call the libsaria_idle_task() function to process the
next idle task.
This commit is contained in:
Bryan Schumaker 2011-09-10 11:22:57 -04:00
parent 84c0f7fe21
commit a660d5a34a
1 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,12 @@
#include <ocarina/window.h>
#include <libsaria/libsaria.h>
static gboolean ocarina_idle(gpointer data)
{
libsaria_idle_task();
return TRUE; /* Keep processing idle events */
}
void ocarina_init(int argc, char **argv)
{
GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
@ -22,6 +28,7 @@ void ocarina_init(int argc, char **argv)
window_add(vbox);
settings_init();
g_idle_add(ocarina_idle, NULL);
}
void ocarina_quit()