Back to index

libindicate  12.10.0
test-simple-client.c
Go to the documentation of this file.
00001 
00002 #include <glib.h>
00003 #include "libindicate/indicator.h"
00004 
00005 static gboolean passed = TRUE;
00006 static GMainLoop * mainloop = NULL;
00007 
00008 static gboolean
00009 done_timeout_cb (gpointer data)
00010 {
00011        g_debug("All done.");
00012        g_main_loop_quit(mainloop);
00013        return FALSE;
00014 }
00015 
00016 int
00017 main (int argc, char * argv)
00018 {
00019        g_type_init();
00020 
00021        IndicateIndicator * indicator = indicate_indicator_new();
00022        indicate_indicator_show(indicator);
00023 
00024        g_timeout_add_seconds(2, done_timeout_cb, indicator);
00025 
00026        mainloop = g_main_loop_new(NULL, FALSE);
00027        g_main_loop_run(mainloop);
00028 
00029        return !passed;
00030 }