static int gu_start(ui_t *ui, prop_t *root, int argc, char **argv, int primary) { gtk_ui_t *gu = calloc(1, sizeof(gtk_ui_t)); XInitThreads(); hts_mutex_init(&gu_mutex); g_thread_init(NULL); gdk_threads_set_lock_functions(gu_enter, gu_leave); gdk_threads_init(); gdk_threads_enter(); gtk_init(&argc, &argv); gu_pixbuf_init(); gu->gu_pc = prop_courier_create_thread(&gu_mutex, "GU"); gu_win_create(gu, prop_create(prop_get_global(), "nav"), 1); /* Init popup controller */ gu_popup_init(gu); gtk_main(); return 0; }
static void * gu_start(struct prop *nav) { gu_pixbuf_init(); gtk_ui_t *gu = calloc(1, sizeof(gtk_ui_t)); gu_win_create(gu, 1, nav); /* Init popup controller */ gu_popup_init(gu); return gu; }
void gu_init(int *argc, char ***argv) { XInitThreads(); hts_mutex_init(&gu_mutex); g_thread_init(NULL); gdk_threads_set_lock_functions(gu_enter, gu_leave); gdk_threads_init(); gdk_threads_enter(); gtk_init(argc, argv); gu_pixbuf_init(); }