X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fglk.c;h=dbec7596f581f478af528bc8473699e1b1820e5f;hb=5d71044dd816436be6c5d7a93bc87e53c94d9f31;hp=885f36f86fc94007926f16adaea048c7365d751d;hpb=65fae93f40acb49a7d18202bbf7fdac05cb12a19;p=projects%2Fchimara%2Fchimara.git diff --git a/src/glk.c b/src/glk.c index 885f36f..dbec759 100644 --- a/src/glk.c +++ b/src/glk.c @@ -1,18 +1,28 @@ +#include #include #include "glk.h" +/** + * glk_exit: + * + * Shuts down the Glk program. This function does not return. + * + * If you print some text to a window and then shut down your program, you can + * assume that the player will be able to read it. + * + * + * You should only shut down your program with glk_exit() or by returning from + * your glk_main() function. If you call the ANSI exit() + * function, bad things may happen. This Glk library is designed for multiple + * sessions, for example, and you would be cutting off all the sessions instead + * of just yours. You would also prevent final text from being visible to the + * player. + * + */ void glk_exit(void) { - gtk_main(); + g_thread_exit(NULL); } -void -glk_select(event_t *event) -{ - gtk_main_iteration(); -} - - -