Mercurial > dwindows
diff gtk/dw.c @ 1528:5facb5380944
Added dw_main_quit() function for exiting the dw_main() loop.
Also some cleanups added to dw_exit() on OS/2 and Windows.
Changed OS/2 to no longer destroy the message queue when leaving dw_main()... it should be done in dw_exit().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 05 Jan 2012 15:45:11 +0000 |
parents | ff78ae1d7429 |
children | 282727422698 |
line wrap: on
line diff
--- a/gtk/dw.c Tue Jan 03 15:59:00 2012 +0000 +++ b/gtk/dw.c Thu Jan 05 15:45:11 2012 +0000 @@ -2214,7 +2214,7 @@ /* * Runs a message loop for Dynamic Windows. */ -void dw_main(void) +void API dw_main(void) { gdk_threads_enter(); _dw_thread = pthread_self(); @@ -2224,11 +2224,19 @@ } /* + * Causes running dw_main() to return. + */ +void API dw_main_quit(void) +{ + gtk_main_quit(); +} + +/* * Runs a message loop for Dynamic Windows, for a period of milliseconds. * Parameters: * milliseconds: Number of milliseconds to run the loop for. */ -void dw_main_sleep(int milliseconds) +void API dw_main_sleep(int milliseconds) { struct timeval tv, start; pthread_t curr = pthread_self(); @@ -2278,7 +2286,7 @@ /* * Processes a single message iteration and returns. */ -void dw_main_iteration(void) +void API dw_main_iteration(void) { pthread_t orig = _dw_thread; pthread_t curr = pthread_self();