Update of /cvsroot/perl-win32-gui/Win32-GUI
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31588
Modified Files:
GUI.h GUI_MessageLoops.cpp
Log Message:
Change to make GUI.h work under a C compiler, DoHook now explicitly passes zero
Index: GUI.h
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** GUI.h 3 Dec 2005 01:56:31 -0000 1.22
--- GUI.h 5 Dec 2005 09:38:58 -0000 1.23
***************
*** 437,441 ****
int DoEvent_NotifyIcon (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, int iNotifyId, char* Name, ...);
int DoEvent_Paint (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud);
! void DoHook(NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam, int* PerlResult, int notify = 0);
BOOL ProcessEventError(NOTXSPROC char *Name, int* PerlResult);
--- 437,441 ----
int DoEvent_NotifyIcon (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, int iNotifyId, char* Name, ...);
int DoEvent_Paint (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud);
! void DoHook(NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam, int* PerlResult, int notify);
BOOL ProcessEventError(NOTXSPROC char *Name, int* PerlResult);
***************
*** 683,687 ****
int MonthCal_onEvent (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam);
! // From windowsX.h (if we use any more from there, then probably better to
// include it, and remove these)
#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
--- 683,687 ----
int MonthCal_onEvent (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam);
! // From windowsX.h (if we use any more from there, then probably better to
// include it, and remove these)
#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
***************
*** 807,811 ****
#define WS_ACTIVECAPTION 0x0001
! extern "C" BOOL WINAPI
GetWindowInfo(
HWND hwnd,
--- 807,814 ----
#define WS_ACTIVECAPTION 0x0001
! #ifdef __cplusplus
! extern "C"
! #endif
! BOOL WINAPI
GetWindowInfo(
HWND hwnd,
Index: GUI_MessageLoops.cpp
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_MessageLoops.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** GUI_MessageLoops.cpp 13 Nov 2005 18:57:52 -0000 1.15
--- GUI_MessageLoops.cpp 5 Dec 2005 09:38:58 -0000 1.16
***************
*** 82,87 ****
(perlud->iClass == WIN32__GUI__WINDOW || perlud->iClass == WIN32__GUI__DIALOG) ) {
RECT rc;
! GetUpdateRect((HWND)hwnd, &rc, 0);
! FillRect((HDC)wParam, &rc, perlud->hBackgroundBrush);
return (LRESULT) 1;
}
--- 82,87 ----
(perlud->iClass == WIN32__GUI__WINDOW || perlud->iClass == WIN32__GUI__DIALOG) ) {
RECT rc;
! GetUpdateRect((HWND)hwnd, &rc, 0);
! FillRect((HDC)wParam, &rc, perlud->hBackgroundBrush);
return (LRESULT) 1;
}
***************
*** 621,625 ****
// Hook processing
if(perlud->avHooks != NULL) {
! DoHook(NOTXSCALL perlud, uMsg, wParam, lParam, &PerlResult);
}
--- 621,625 ----
// Hook processing
if(perlud->avHooks != NULL) {
! DoHook(NOTXSCALL perlud, uMsg, wParam, lParam, &PerlResult,0);
}
***************
*** 954,958 ****
if (perlud->avHooks != NULL)
! DoHook(NOTXSCALL perlud, uMsg,wParam,lParam,&PerlResult);
--- 954,958 ----
if (perlud->avHooks != NULL)
! DoHook(NOTXSCALL perlud, uMsg,wParam,lParam,&PerlResult,0);
***************
*** 1060,1064 ****
// Hook for non interactive control
if (perlud->avHooks != NULL && !(perlud->dwPlStyle & PERLWIN32GUI_INTERACTIVE))
! DoHook(NOTXSCALL perlud, uMsg,wParam,lParam,&PerlResult);
if (PerlResult != 0) {
--- 1060,1064 ----
// Hook for non interactive control
if (perlud->avHooks != NULL && !(perlud->dwPlStyle & PERLWIN32GUI_INTERACTIVE))
! DoHook(NOTXSCALL perlud, uMsg,wParam,lParam,&PerlResult,0);
if (PerlResult != 0) {
|