GtkApplication Thread Initialization

If I use the new GtkApplication class, how do I initialize threading support?

I used to do this...

g_type_init ();
gdk_threads_init ();
gdk_threads_enter ();
gtk_init (&argc, &argv);
/*app code*/
gtk_main ();
gdk_threads_leave ()

So If I use the new GtkApplication class where do I do that (in example below)?

GtkApplication *app;
gint status;
app = gtk_application_new ("org.codeslayer", G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]