changeset 151:656de0c52c56

Removed the filter from the test program and updated dw_main().
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 26 Oct 2002 21:33:31 +0000
parents 2a0d7b57a6da
children e78027768548
files gtk/dw.c os2/dw.c win/dw.c
diffstat 3 files changed, 3 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Thu Oct 24 15:53:27 2002 +0000
+++ b/gtk/dw.c	Sat Oct 26 21:33:31 2002 +0000
@@ -7096,7 +7096,7 @@
 	dw_signal_connect(mainwindow, "delete_event", DW_SIGNAL_FUNC(test_callback), (void *)mainwindow);
 	dw_signal_connect(testwindow, "delete_event", DW_SIGNAL_FUNC(test_callback), (void *)testwindow);
 
-	dw_main(0L, NULL);
+	dw_main();
 
 	return 0;
 }
--- a/os2/dw.c	Thu Oct 24 15:53:27 2002 +0000
+++ b/os2/dw.c	Sat Oct 26 21:33:31 2002 +0000
@@ -7327,34 +7327,6 @@
 	 notebook;
 int count = 2;
 
-#ifdef USE_FILTER
-/* Do any handling you need in the filter function */
-LONG testfilter(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-	switch(msg)
-	{
-	case WM_COMMAND:
-		switch (COMMANDMSG(&msg)->cmd)
-		{
-		case 1001L:
-		case 1002L:
-			dw_window_destroy(mainwindow);;
-			count--;
-			break;
-		case 1003L:
-		case 1004L:
-			dw_window_destroy(testwindow);;
-			count--;
-			break;
-		}
-		if(!count)
-			exit(0);
-		break;
-	}
-	/* Return -1 to allow the default handlers to return. */
-	return TRUE;
-}
-#else
 int test_callback(HWND window, void *data)
 {
 	dw_window_destroy((HWND)data);
@@ -7364,7 +7336,6 @@
 		exit(0);
 	return -1;
 }
-#endif
 
 /*
  * Let's demonstrate the functionality of this library. :)
@@ -7473,9 +7444,6 @@
 
 	dw_window_show(testwindow);
 
-#ifdef USE_FILTER
-	dw_main(0L, (void *)testfilter);
-#else
 	/* Setup the function callbacks */
 	dw_signal_connect(okbutton, "clicked", DW_SIGNAL_FUNC(test_callback), (void *)mainwindow);
 	dw_signal_connect(cancelbutton, "clicked", DW_SIGNAL_FUNC(test_callback), (void *)mainwindow);
@@ -7486,8 +7454,7 @@
 	dw_signal_connect(mainwindow, "delete_event", DW_SIGNAL_FUNC(test_callback), (void *)mainwindow);
 	dw_signal_connect(testwindow, "delete_event", DW_SIGNAL_FUNC(test_callback), (void *)testwindow);
 
-	dw_main(0L, NULL);
-#endif
+	dw_main();
 
 	return 0;
 }
--- a/win/dw.c	Thu Oct 24 15:53:27 2002 +0000
+++ b/win/dw.c	Sat Oct 26 21:33:31 2002 +0000
@@ -7205,34 +7205,6 @@
 	 notebook;
 int count = 2;
 
-#ifdef USE_FILTER
-/* Do any handling you need in the filter function */
-LONG testfilter(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-	switch(msg)
-	{
-	case WM_COMMAND:
-		switch (COMMANDMSG(&msg)->cmd)
-		{
-		case 1001L:
-		case 1002L:
-			dw_window_destroy(mainwindow);;
-			count--;
-			break;
-		case 1003L:
-		case 1004L:
-			dw_window_destroy(testwindow);;
-            count--;
-			break;
-		}
-		if(!count)
-			exit(0);
-		break;
-	}
-	/* Return -1 to allow the default handlers to return. */
-	return TRUE;
-}
-#else
 int test_callback(HWND window, void *data)
 {
 	dw_window_destroy((HWND)data);
@@ -7242,7 +7214,6 @@
         exit(0);
 	return -1;
 }
-#endif
 
 /*
  * Let's demonstrate the functionality of this library. :)
@@ -7351,10 +7322,6 @@
 
 	dw_window_show(testwindow);
 
-#ifdef USE_FILTER
-
-	dw_main(0L, (void *)testfilter);
-#else
 	/* Setup the function callbacks */
 	dw_signal_connect(okbutton, "clicked", DW_SIGNAL_FUNC(test_callback), (void *)mainwindow);
 	dw_signal_connect(cancelbutton, "clicked", DW_SIGNAL_FUNC(test_callback), (void *)mainwindow);
@@ -7365,8 +7332,7 @@
 	dw_signal_connect(mainwindow, "delete_event", DW_SIGNAL_FUNC(test_callback), (void *)mainwindow);
 	dw_signal_connect(testwindow, "delete_event", DW_SIGNAL_FUNC(test_callback), (void *)testwindow);
 
-	dw_main(0L, NULL);
-#endif
+	dw_main();
 
 	return 0;
 }