2015-04-06 11:20:51 -05:00
|
|
|
// 6 april 2015
|
2015-04-06 23:26:27 -05:00
|
|
|
#include "uipriv_unix.h"
|
2015-04-06 11:20:51 -05:00
|
|
|
|
2015-04-06 16:41:33 -05:00
|
|
|
// #qo pkg-config: gtk+-3.0
|
|
|
|
|
2015-04-06 11:20:51 -05:00
|
|
|
void uiMain(void)
|
|
|
|
{
|
|
|
|
gtk_main();
|
|
|
|
}
|
|
|
|
|
2015-04-10 13:24:23 -05:00
|
|
|
// gtk_main_quit() may run immediately, or it may wait for other pending events; "it depends" (thanks mclasen in irc.gimp.net/#gtk+)
|
|
|
|
// PostQuitMessage() on Windows always waits, so we must do so too
|
|
|
|
// we'll do it by using an idle callback
|
|
|
|
static gboolean quit(gpointer data)
|
2015-04-06 11:20:51 -05:00
|
|
|
{
|
|
|
|
gtk_main_quit();
|
2015-04-10 13:24:23 -05:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void uiQuit(void)
|
|
|
|
{
|
|
|
|
gdk_threads_add_idle(quit, NULL);
|
2015-04-06 11:20:51 -05:00
|
|
|
}
|