diff gtk3/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 010e1d916ee7
children b7136c130a66
line wrap: on
line diff
--- a/gtk3/dw.c	Tue Jan 03 15:59:00 2012 +0000
+++ b/gtk3/dw.c	Thu Jan 05 15:45:11 2012 +0000
@@ -1857,7 +1857,7 @@
 /*
  * Runs a message loop for Dynamic Windows.
  */
-void dw_main(void)
+void API dw_main(void)
 {
    gdk_threads_enter();
    _dw_thread = pthread_self();
@@ -1867,11 +1867,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();
@@ -1921,7 +1929,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();