# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1035474807 0 # Node ID 2a0d7b57a6dab18423ce2eb3cc98fda9eca33a20 # Parent 6028f787f7c8fc2b837465f3c37c83852a218898 Removed unnecessary parameters from dw_main(). diff -r 6028f787f7c8 -r 2a0d7b57a6da dw.h --- a/dw.h Thu Oct 24 05:39:00 2002 +0000 +++ b/dw.h Thu Oct 24 15:53:27 2002 +0000 @@ -290,7 +290,6 @@ int realid; } NotebookPage; -typedef unsigned long HAB; typedef HANDLE HMTX; typedef HANDLE HEV; @@ -473,7 +472,6 @@ #define HWND_DESKTOP ((HWND)0) typedef GtkWidget *HWND; -typedef void *HAB; #ifndef _ENVRNMNT_H typedef unsigned long ULONG; #endif @@ -606,7 +604,7 @@ #else int dw_init(int newthread, int argc, char *argv[]); #endif -void dw_main(HAB currenthab, void *filterfunc); +void dw_main(void); void dw_main_sleep(int seconds); void dw_free(void *ptr); int dw_window_show(HWND handle); diff -r 6028f787f7c8 -r 2a0d7b57a6da gtk/dw.c --- a/gtk/dw.c Thu Oct 24 05:39:00 2002 +0000 +++ b/gtk/dw.c Thu Oct 24 15:53:27 2002 +0000 @@ -782,12 +782,8 @@ /* * Runs a message loop for Dynamic Windows. - * Parameters: - * currenthab: The handle to the current anchor block - * or NULL if this DW is handling the message loop. - * func: Function pointer to the message filter function. - */ -void dw_main(HAB currenthab, void *func) + */ +void dw_main(void) { _dw_thread = pthread_self(); _dw_thread_add(_dw_thread); diff -r 6028f787f7c8 -r 2a0d7b57a6da os2/dw.c --- a/os2/dw.c Thu Oct 24 05:39:00 2002 +0000 +++ b/os2/dw.c Thu Oct 24 15:53:27 2002 +0000 @@ -33,11 +33,6 @@ char SplitbarClassName[] = "dwsplitbar"; char DefaultFont[] = "9.WarpSans"; -/* this is the callback handle for the window procedure - * make sure you always match the calling convention! - */ -int (* EXPENTRY filterfunc)(HWND, ULONG, MPARAM, MPARAM) = 0L; - HAB dwhab = 0; HMQ dwhmq = 0; DWTID _dwtid = 0; @@ -2097,10 +2092,7 @@ static int command_active = 0; void (* windowfunc)(PVOID) = 0L; - if(filterfunc) - result = filterfunc(hWnd, msg, mp1, mp2); - - if(result == -1 && !command_active) + if(!command_active) { /* Make sure we don't end up in infinite recursion */ command_active = 1; @@ -2804,38 +2796,22 @@ /* * Runs a message loop for Dynamic Windows. - * Parameters: - * currenthab: The handle to the current anchor block - * or NULL if this DW is handling the message loop. - * func: Function pointer to the message filter function. - */ -void dw_main(HAB currenthab, void *func) + */ +void dw_main(void) { QMSG qmsg; - HAB habtouse; - - if(!currenthab) - habtouse = dwhab; - else - habtouse = currenthab; - - /* Setup the filter function */ - filterfunc = (int (* EXPENTRY)(HWND, ULONG, MPARAM, MPARAM))func; _dwtid = dw_thread_id(); - while (WinGetMsg(habtouse, &qmsg, 0, 0, 0)) - WinDispatchMsg(habtouse, &qmsg); + while (WinGetMsg(dwhab, &qmsg, 0, 0, 0)) + WinDispatchMsg(dwhab, &qmsg); #ifdef DWDEBUG fclose(f); #endif - if(!currenthab) - { - WinDestroyMsgQueue(dwhmq); - WinTerminate(dwhab); - } + WinDestroyMsgQueue(dwhmq); + WinTerminate(dwhab); } /* diff -r 6028f787f7c8 -r 2a0d7b57a6da win/dw.c --- a/win/dw.c Thu Oct 24 05:39:00 2002 +0000 +++ b/win/dw.c Thu Oct 24 15:53:27 2002 +0000 @@ -18,10 +18,6 @@ #include #include "dw.h" -/* this is the callback handle for the window procedure */ -/* make sure you always match the calling convention! */ -int (*filterfunc)(HWND, UINT, WPARAM, LPARAM) = 0L; - HWND popup = (HWND)NULL, hwndBubble = (HWND)NULL, hwndBubbleLast, DW_HWND_OBJECT = (HWND)NULL; HINSTANCE DWInstance = NULL; @@ -1185,9 +1181,6 @@ if(msg == WM_HSCROLL) msg = WM_VSCROLL; - if(filterfunc) - result = filterfunc(hWnd, msg, mp1, mp2); - if(result == -1) { /* Avoid infinite recursion */ @@ -2782,18 +2775,11 @@ /* * Runs a message loop for Dynamic Windows. - * Parameters: - * currenthab: The handle to the current anchor block - * or NULL if this DW is handling the message loop. - * func: Function pointer to the message filter function. - */ -void dw_main(HAB currenthab, void *func) + */ +void dw_main(void) { MSG msg; - /* Setup the filter function */ - filterfunc = func; - _dwtid = dw_thread_id(); while (GetMessage(&msg, NULL, 0, 0))