Large-scale renaming of all Win32 functions and types to use the standard Windows names.
diff --git a/windows/caret.c b/windows/caret.c index a5f61ca..b0f04d3 100644 --- a/windows/caret.c +++ b/windows/caret.c
@@ -12,16 +12,16 @@ typedef struct { - HWND32 hwnd; - UINT32 hidden; - BOOL32 on; - INT32 x; - INT32 y; - INT32 width; - INT32 height; + HWND hwnd; + UINT hidden; + BOOL on; + INT x; + INT y; + INT width; + INT height; HBRUSH16 hBrush; - UINT32 timeout; - UINT32 timerid; + UINT timeout; + UINT timerid; } CARET; typedef enum @@ -36,7 +36,7 @@ /***************************************************************** * CARET_GetHwnd */ -HWND32 CARET_GetHwnd(void) +HWND CARET_GetHwnd(void) { return Caret.hwnd; } @@ -44,7 +44,7 @@ /***************************************************************** * CARET_GetRect */ -void CARET_GetRect(LPRECT32 lprc) +void CARET_GetRect(LPRECT lprc) { lprc->right = (lprc->left = Caret.x) + Caret.width - 1; lprc->bottom = (lprc->top = Caret.y) + Caret.height - 1; @@ -55,7 +55,7 @@ */ static void CARET_DisplayCaret( DISPLAY_CARET status ) { - HDC32 hdc; + HDC hdc; HBRUSH16 hPrevBrush; if (Caret.on && (status == CARET_ON)) return; @@ -65,18 +65,18 @@ Caret.on = !Caret.on; /* do not use DCX_CACHE here, for x,y,width,height are in logical units */ - if (!(hdc = GetDCEx32( Caret.hwnd, 0, DCX_USESTYLE /*| DCX_CACHE*/ ))) return; - hPrevBrush = SelectObject32( hdc, Caret.hBrush ); - PatBlt32( hdc, Caret.x, Caret.y, Caret.width, Caret.height, PATINVERT ); - SelectObject32( hdc, hPrevBrush ); - ReleaseDC32( Caret.hwnd, hdc ); + if (!(hdc = GetDCEx( Caret.hwnd, 0, DCX_USESTYLE /*| DCX_CACHE*/ ))) return; + hPrevBrush = SelectObject( hdc, Caret.hBrush ); + PatBlt( hdc, Caret.x, Caret.y, Caret.width, Caret.height, PATINVERT ); + SelectObject( hdc, hPrevBrush ); + ReleaseDC( Caret.hwnd, hdc ); } /***************************************************************** * CARET_Callback */ -static VOID CALLBACK CARET_Callback( HWND32 hwnd, UINT32 msg, UINT32 id, DWORD ctime) +static VOID CALLBACK CARET_Callback( HWND hwnd, UINT msg, UINT id, DWORD ctime) { TRACE(caret,"hwnd=%04x, timerid=%d, caret=%d\n", hwnd, id, Caret.on); @@ -89,8 +89,8 @@ */ static void CARET_SetTimer(void) { - if (Caret.timerid) KillSystemTimer32( (HWND32)0, Caret.timerid ); - Caret.timerid = SetSystemTimer32( (HWND32)0, 0, Caret.timeout, + if (Caret.timerid) KillSystemTimer( (HWND)0, Caret.timerid ); + Caret.timerid = SetSystemTimer( (HWND)0, 0, Caret.timeout, CARET_Callback ); } @@ -102,8 +102,8 @@ { if (Caret.timerid) { - KillSystemTimer32( (HWND32)0, Caret.timerid ); - Caret.timerid = SetSystemTimer32( (HWND32)0, 0, Caret.timeout, + KillSystemTimer( (HWND)0, Caret.timerid ); + Caret.timerid = SetSystemTimer( (HWND)0, 0, Caret.timeout, CARET_Callback ); } } @@ -116,7 +116,7 @@ { if (Caret.timerid) { - KillSystemTimer32( (HWND32)0, Caret.timerid ); + KillSystemTimer( (HWND)0, Caret.timerid ); Caret.timerid = 0; } } @@ -128,21 +128,21 @@ void WINAPI CreateCaret16( HWND16 hwnd, HBITMAP16 bitmap, INT16 width, INT16 height ) { - CreateCaret32( hwnd, bitmap, width, height ); + CreateCaret( hwnd, bitmap, width, height ); } /***************************************************************** * CreateCaret32 (USER32.66) */ -BOOL32 WINAPI CreateCaret32( HWND32 hwnd, HBITMAP32 bitmap, - INT32 width, INT32 height ) +BOOL WINAPI CreateCaret( HWND hwnd, HBITMAP bitmap, + INT width, INT height ) { TRACE(caret,"hwnd=%04x\n", hwnd); if (!hwnd) return FALSE; /* if cursor already exists, destroy it */ - if (Caret.hwnd) DestroyCaret32(); + if (Caret.hwnd) DestroyCaret(); if (bitmap && (bitmap != 1)) { @@ -151,15 +151,15 @@ Caret.width = bmp.bmWidth; Caret.height = bmp.bmHeight; /* FIXME: we should make a copy of the bitmap instead of a brush */ - Caret.hBrush = CreatePatternBrush32( bitmap ); + Caret.hBrush = CreatePatternBrush( bitmap ); } else { - Caret.width = width ? width : GetSystemMetrics32(SM_CXBORDER); - Caret.height = height ? height : GetSystemMetrics32(SM_CYBORDER); - Caret.hBrush = CreateSolidBrush32(bitmap ? - GetSysColor32(COLOR_GRAYTEXT) : - GetSysColor32(COLOR_WINDOW) ); + Caret.width = width ? width : GetSystemMetrics(SM_CXBORDER); + Caret.height = height ? height : GetSystemMetrics(SM_CYBORDER); + Caret.hBrush = CreateSolidBrush(bitmap ? + GetSysColor(COLOR_GRAYTEXT) : + GetSysColor(COLOR_WINDOW) ); } Caret.hwnd = hwnd; @@ -168,7 +168,7 @@ Caret.x = 0; Caret.y = 0; - Caret.timeout = GetProfileInt32A( "windows", "CursorBlinkRate", 500 ); + Caret.timeout = GetProfileIntA( "windows", "CursorBlinkRate", 500 ); return TRUE; } @@ -178,14 +178,14 @@ */ void WINAPI DestroyCaret16(void) { - DestroyCaret32(); + DestroyCaret(); } /***************************************************************** * DestroyCaret32 (USER32.131) */ -BOOL32 WINAPI DestroyCaret32(void) +BOOL WINAPI DestroyCaret(void) { if (!Caret.hwnd) return FALSE; @@ -194,7 +194,7 @@ CARET_KillTimer(); CARET_DisplayCaret(CARET_OFF); - DeleteObject32( Caret.hBrush ); + DeleteObject( Caret.hBrush ); Caret.hwnd = 0; return TRUE; } @@ -205,14 +205,14 @@ */ void WINAPI SetCaretPos16( INT16 x, INT16 y ) { - SetCaretPos32( x, y ); + SetCaretPos( x, y ); } /***************************************************************** * SetCaretPos32 (USER32.466) */ -BOOL32 WINAPI SetCaretPos32( INT32 x, INT32 y) +BOOL WINAPI SetCaretPos( INT x, INT y) { if (!Caret.hwnd) return FALSE; if ((x == Caret.x) && (y == Caret.y)) return TRUE; @@ -237,14 +237,14 @@ */ void WINAPI HideCaret16( HWND16 hwnd ) { - HideCaret32( hwnd ); + HideCaret( hwnd ); } /***************************************************************** * HideCaret32 (USER32.317) */ -BOOL32 WINAPI HideCaret32( HWND32 hwnd ) +BOOL WINAPI HideCaret( HWND hwnd ) { if (!Caret.hwnd) return FALSE; if (hwnd && (Caret.hwnd != hwnd)) return FALSE; @@ -264,14 +264,14 @@ */ void WINAPI ShowCaret16( HWND16 hwnd ) { - ShowCaret32( hwnd ); + ShowCaret( hwnd ); } /***************************************************************** * ShowCaret32 (USER32.529) */ -BOOL32 WINAPI ShowCaret32( HWND32 hwnd ) +BOOL WINAPI ShowCaret( HWND hwnd ) { if (!Caret.hwnd) return FALSE; if (hwnd && (Caret.hwnd != hwnd)) return FALSE; @@ -297,13 +297,13 @@ */ void WINAPI SetCaretBlinkTime16( UINT16 msecs ) { - SetCaretBlinkTime32( msecs ); + SetCaretBlinkTime( msecs ); } /***************************************************************** * SetCaretBlinkTime32 (USER32.465) */ -BOOL32 WINAPI SetCaretBlinkTime32( UINT32 msecs ) +BOOL WINAPI SetCaretBlinkTime( UINT msecs ) { if (!Caret.hwnd) return FALSE; @@ -321,14 +321,14 @@ */ UINT16 WINAPI GetCaretBlinkTime16(void) { - return (UINT16)GetCaretBlinkTime32(); + return (UINT16)GetCaretBlinkTime(); } /***************************************************************** * GetCaretBlinkTime32 (USER32.209) */ -UINT32 WINAPI GetCaretBlinkTime32(void) +UINT WINAPI GetCaretBlinkTime(void) { return Caret.timeout; } @@ -351,7 +351,7 @@ /***************************************************************** * GetCaretPos32 (USER32.210) */ -BOOL32 WINAPI GetCaretPos32( LPPOINT32 pt ) +BOOL WINAPI GetCaretPos( LPPOINT pt ) { if (!Caret.hwnd || !pt) return FALSE; pt->x = Caret.x;
diff --git a/windows/class.c b/windows/class.c index 69db221..ed39c79 100644 --- a/windows/class.c +++ b/windows/class.c
@@ -46,14 +46,14 @@ return; } - GlobalGetAtomName32A( ptr->atomName, className, sizeof(className) ); + GlobalGetAtomNameA( ptr->atomName, className, sizeof(className) ); DUMP( "Class %p:\n", ptr ); DUMP( "next=%p name=%04x '%s' style=%08x wndProc=%08x\n" "inst=%04x dce=%08x icon=%04x cursor=%04x bkgnd=%04x\n" "clsExtra=%d winExtra=%d #windows=%d\n", ptr->next, ptr->atomName, className, ptr->style, - (UINT32)ptr->winproc, ptr->hInstance, (UINT32)ptr->dce, + (UINT)ptr->winproc, ptr->hInstance, (UINT)ptr->dce, ptr->hIcon, ptr->hCursor, ptr->hbrBackground, ptr->cbClsExtra, ptr->cbWndExtra, ptr->cWindows ); if (ptr->cbClsExtra) @@ -80,9 +80,9 @@ DUMP( " Class Name Style WndProc\n" ); for (ptr = firstClass; ptr; ptr = ptr->next) { - GlobalGetAtomName32A( ptr->atomName, className, sizeof(className) ); - DUMP( "%08x %-20.20s %08x %08x\n", (UINT32)ptr, className, - ptr->style, (UINT32)ptr->winproc ); + GlobalGetAtomNameA( ptr->atomName, className, sizeof(className) ); + DUMP( "%08x %-20.20s %08x %08x\n", (UINT)ptr, className, + ptr->style, (UINT)ptr->winproc ); } DUMP( "\n" ); } @@ -152,8 +152,8 @@ if (HIWORD(classPtr->menuNameA)) SEGPTR_FREE( classPtr->menuNameA ); if (classPtr->menuNameW) HeapFree( SystemHeap, 0, classPtr->menuNameW ); if ((classPtr->menuNameW = HeapAlloc( SystemHeap, 0, - (lstrlen32W(name)+1)*sizeof(WCHAR) ))) - lstrcpy32W( classPtr->menuNameW, name ); + (lstrlenW(name)+1)*sizeof(WCHAR) ))) + lstrcpyW( classPtr->menuNameW, name ); classPtr->menuNameA = 0; } @@ -221,8 +221,8 @@ if (HIWORD(classPtr->classNameA)) SEGPTR_FREE( classPtr->classNameA ); if (classPtr->classNameW) HeapFree( SystemHeap, 0, classPtr->classNameW ); if ((classPtr->classNameW = HeapAlloc( SystemHeap, 0, - (lstrlen32W(name)+1)*sizeof(WCHAR) ))) - lstrcpy32W( classPtr->classNameW, name ); + (lstrlenW(name)+1)*sizeof(WCHAR) ))) + lstrcpyW( classPtr->classNameW, name ); classPtr->classNameA = 0; } @@ -232,7 +232,7 @@ * * Free a class structure. */ -static BOOL32 CLASS_FreeClass( CLASS *classPtr ) +static BOOL CLASS_FreeClass( CLASS *classPtr ) { CLASS **ppClass; TRACE(class,"%p \n", classPtr); @@ -255,7 +255,7 @@ /* Delete the class */ if (classPtr->dce) DCE_FreeDCE( classPtr->dce ); - if (classPtr->hbrBackground) DeleteObject32( classPtr->hbrBackground ); + if (classPtr->hbrBackground) DeleteObject( classPtr->hbrBackground ); GlobalDeleteAtom( classPtr->atomName ); CLASS_SetMenuNameA( classPtr, NULL ); CLASS_SetClassNameA( classPtr, NULL ); @@ -292,7 +292,7 @@ * 980805 a local class will be found now if registred with hInst=0 * and looed up with a hInst!=0. msmoney does it (jsch) */ -CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE32 hinstance ) +CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE hinstance ) { CLASS * class, *tclass=0; TRACE(class,"0x%08x 0x%08x\n", atom, hinstance); @@ -342,9 +342,9 @@ * * The real RegisterClass() functionality. */ -static CLASS *CLASS_RegisterClass( ATOM atom, HINSTANCE32 hInstance, - DWORD style, INT32 classExtra, - INT32 winExtra, WNDPROC16 wndProc, +static CLASS *CLASS_RegisterClass( ATOM atom, HINSTANCE hInstance, + DWORD style, INT classExtra, + INT winExtra, WNDPROC16 wndProc, WINDOWPROCTYPE wndProcType ) { CLASS *classPtr; @@ -449,13 +449,13 @@ * >0: Unique identifier * 0: Failure */ -ATOM WINAPI RegisterClass32A( - const WNDCLASS32A* wc /* Address of structure with class data */ +ATOM WINAPI RegisterClassA( + const WNDCLASSA* wc /* Address of structure with class data */ ) { ATOM atom; CLASS *classPtr; - if (!(atom = GlobalAddAtom32A( wc->lpszClassName ))) + if (!(atom = GlobalAddAtomA( wc->lpszClassName ))) { SetLastError(ERROR_CLASS_ALREADY_EXISTS); return FALSE; @@ -489,12 +489,12 @@ /*********************************************************************** * RegisterClass32W (USER32.430) */ -ATOM WINAPI RegisterClass32W( const WNDCLASS32W* wc ) +ATOM WINAPI RegisterClassW( const WNDCLASSW* wc ) { ATOM atom; CLASS *classPtr; - if (!(atom = GlobalAddAtom32W( wc->lpszClassName ))) + if (!(atom = GlobalAddAtomW( wc->lpszClassName ))) { SetLastError(ERROR_CLASS_ALREADY_EXISTS); return FALSE; @@ -564,12 +564,12 @@ /*********************************************************************** * RegisterClassEx32A (USER32.428) */ -ATOM WINAPI RegisterClassEx32A( const WNDCLASSEX32A* wc ) +ATOM WINAPI RegisterClassExA( const WNDCLASSEXA* wc ) { ATOM atom; CLASS *classPtr; - if (!(atom = GlobalAddAtom32A( wc->lpszClassName ))) + if (!(atom = GlobalAddAtomA( wc->lpszClassName ))) { SetLastError(ERROR_CLASS_ALREADY_EXISTS); return FALSE; @@ -602,12 +602,12 @@ /*********************************************************************** * RegisterClassEx32W (USER32.429) */ -ATOM WINAPI RegisterClassEx32W( const WNDCLASSEX32W* wc ) +ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc ) { ATOM atom; CLASS *classPtr; - if (!(atom = GlobalAddAtom32W( wc->lpszClassName ))) + if (!(atom = GlobalAddAtomW( wc->lpszClassName ))) { SetLastError(ERROR_CLASS_ALREADY_EXISTS); return 0; @@ -657,14 +657,14 @@ * UnregisterClass32A (USER32.563) * */ -BOOL32 WINAPI UnregisterClass32A( LPCSTR className, HINSTANCE32 hInstance ) +BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance ) { CLASS *classPtr; ATOM atom; - BOOL32 ret; + BOOL ret; TRACE(class,"%s %x\n",className, hInstance); - if (!(atom = GlobalFindAtom32A( className ))) + if (!(atom = GlobalFindAtomA( className ))) { SetLastError(ERROR_CLASS_DOES_NOT_EXIST); return FALSE; @@ -683,14 +683,14 @@ /*********************************************************************** * UnregisterClass32W (USER32.564) */ -BOOL32 WINAPI UnregisterClass32W( LPCWSTR className, HINSTANCE32 hInstance ) +BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance ) { CLASS *classPtr; ATOM atom; - BOOL32 ret; + BOOL ret; TRACE(class,"%s %x\n",debugstr_w(className), hInstance); - if (!(atom = GlobalFindAtom32W( className ))) + if (!(atom = GlobalFindAtomW( className ))) { SetLastError(ERROR_CLASS_DOES_NOT_EXIST); return FALSE; @@ -711,14 +711,14 @@ */ WORD WINAPI GetClassWord16( HWND16 hwnd, INT16 offset ) { - return GetClassWord32( hwnd, offset ); + return GetClassWord( hwnd, offset ); } /*********************************************************************** * GetClassWord32 (USER32.219) */ -WORD WINAPI GetClassWord32( HWND32 hwnd, INT32 offset ) +WORD WINAPI GetClassWord( HWND hwnd, INT offset ) { WND * wndPtr; @@ -741,7 +741,7 @@ case GCW_CBWNDEXTRA: case GCW_CBCLSEXTRA: case GCW_HMODULE: - return (WORD)GetClassLong32A( hwnd, offset ); + return (WORD)GetClassLongA( hwnd, offset ); } WARN(class, "Invalid offset %d\n", offset); @@ -765,10 +765,10 @@ if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0; return (LONG)WINPROC_GetProc( wndPtr->class->winproc, WIN_PROC_16 ); case GCL_MENUNAME: - ret = GetClassLong32A( hwnd, offset ); + ret = GetClassLongA( hwnd, offset ); return (LONG)SEGPTR_GET( (void *)ret ); default: - return GetClassLong32A( hwnd, offset ); + return GetClassLongA( hwnd, offset ); } } @@ -776,7 +776,7 @@ /*********************************************************************** * GetClassLong32A (USER32.215) */ -LONG WINAPI GetClassLong32A( HWND32 hwnd, INT32 offset ) +LONG WINAPI GetClassLongA( HWND hwnd, INT offset ) { WND * wndPtr; @@ -803,7 +803,7 @@ case GCL_HCURSOR: case GCL_HICON: case GCL_HICONSM: - return GetClassWord32( hwnd, offset ); + return GetClassWord( hwnd, offset ); } WARN(class, "Invalid offset %d\n", offset); return 0; @@ -813,7 +813,7 @@ /*********************************************************************** * GetClassLong32W (USER32.216) */ -LONG WINAPI GetClassLong32W( HWND32 hwnd, INT32 offset ) +LONG WINAPI GetClassLongW( HWND hwnd, INT offset ) { WND * wndPtr; @@ -828,7 +828,7 @@ if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0; return (LONG)CLASS_GetMenuNameW( wndPtr->class ); default: - return GetClassLong32A( hwnd, offset ); + return GetClassLongA( hwnd, offset ); } } @@ -838,14 +838,14 @@ */ WORD WINAPI SetClassWord16( HWND16 hwnd, INT16 offset, WORD newval ) { - return SetClassWord32( hwnd, offset, newval ); + return SetClassWord( hwnd, offset, newval ); } /*********************************************************************** * SetClassWord32 (USER32.469) */ -WORD WINAPI SetClassWord32( HWND32 hwnd, INT32 offset, WORD newval ) +WORD WINAPI SetClassWord( HWND hwnd, INT offset, WORD newval ) { WND * wndPtr; WORD retval = 0; @@ -870,7 +870,7 @@ case GCW_CBWNDEXTRA: case GCW_CBCLSEXTRA: case GCW_HMODULE: - return (WORD)SetClassLong32A( hwnd, offset, (LONG)newval ); + return (WORD)SetClassLongA( hwnd, offset, (LONG)newval ); case GCW_HBRBACKGROUND: ptr = &wndPtr->class->hbrBackground; break; case GCW_HCURSOR: ptr = &wndPtr->class->hCursor; break; case GCW_HICON: ptr = &wndPtr->class->hIcon; break; @@ -915,9 +915,9 @@ WIN_PROC_16, WIN_PROC_CLASS ); return retval; case GCL_MENUNAME: - return SetClassLong32A( hwnd, offset, (LONG)PTR_SEG_TO_LIN(newval) ); + return SetClassLongA( hwnd, offset, (LONG)PTR_SEG_TO_LIN(newval) ); default: - return SetClassLong32A( hwnd, offset, newval ); + return SetClassLongA( hwnd, offset, newval ); } } @@ -925,7 +925,7 @@ /*********************************************************************** * SetClassLong32A (USER32.467) */ -LONG WINAPI SetClassLong32A( HWND32 hwnd, INT32 offset, LONG newval ) +LONG WINAPI SetClassLongA( HWND hwnd, INT offset, LONG newval ) { WND * wndPtr; LONG retval = 0; @@ -959,7 +959,7 @@ case GCL_HCURSOR: case GCL_HICON: case GCL_HICONSM: - return SetClassWord32( hwnd, offset, (WORD)newval ); + return SetClassWord( hwnd, offset, (WORD)newval ); case GCL_STYLE: ptr = &wndPtr->class->style; break; case GCL_CBWNDEXTRA: ptr = &wndPtr->class->cbWndExtra; break; case GCL_CBCLSEXTRA: ptr = &wndPtr->class->cbClsExtra; break; @@ -977,7 +977,7 @@ /*********************************************************************** * SetClassLong32W (USER32.468) */ -LONG WINAPI SetClassLong32W( HWND32 hwnd, INT32 offset, LONG newval ) +LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval ) { WND *wndPtr; LONG retval; @@ -997,7 +997,7 @@ CLASS_SetMenuNameW( wndPtr->class, (LPCWSTR)newval ); return 0; /* Old value is now meaningless anyway */ default: - return SetClassLong32A( hwnd, offset, newval ); + return SetClassLongA( hwnd, offset, newval ); } } @@ -1016,12 +1016,12 @@ /*********************************************************************** * GetClassName32A (USER32.217) */ -INT32 WINAPI GetClassName32A( HWND32 hwnd, LPSTR buffer, INT32 count ) -{ INT32 ret; +INT WINAPI GetClassNameA( HWND hwnd, LPSTR buffer, INT count ) +{ INT ret; WND *wndPtr; if (!(wndPtr = WIN_FindWndPtr(hwnd))) return 0; - ret = GlobalGetAtomName32A( wndPtr->class->atomName, buffer, count ); + ret = GlobalGetAtomNameA( wndPtr->class->atomName, buffer, count ); TRACE(class,"%x %s %x\n",hwnd, buffer, count); return ret; @@ -1031,12 +1031,12 @@ /*********************************************************************** * GetClassName32W (USER32.218) */ -INT32 WINAPI GetClassName32W( HWND32 hwnd, LPWSTR buffer, INT32 count ) -{ INT32 ret; +INT WINAPI GetClassNameW( HWND hwnd, LPWSTR buffer, INT count ) +{ INT ret; WND *wndPtr; if (!(wndPtr = WIN_FindWndPtr(hwnd))) return 0; - ret = GlobalGetAtomName32W( wndPtr->class->atomName, buffer, count ); + ret = GlobalGetAtomNameW( wndPtr->class->atomName, buffer, count ); TRACE(class,"%x %s %x\n",hwnd, debugstr_w(buffer), count); @@ -1083,8 +1083,8 @@ /*********************************************************************** * GetClassInfo32A (USER32.211) */ -BOOL32 WINAPI GetClassInfo32A( HINSTANCE32 hInstance, LPCSTR name, - WNDCLASS32A *wc ) +BOOL WINAPI GetClassInfoA( HINSTANCE hInstance, LPCSTR name, + WNDCLASSA *wc ) { ATOM atom; CLASS *classPtr; @@ -1096,7 +1096,7 @@ registred with hInstance=NULL in WINE because of the late loading of this dll. fixes file dialogs in WinWord95 (jsch)*/ - if (!(atom=GlobalFindAtom32A(name)) || !(classPtr=CLASS_FindClassByAtom(atom,hInstance))) + if (!(atom=GlobalFindAtomA(name)) || !(classPtr=CLASS_FindClassByAtom(atom,hInstance))) return FALSE; if (classPtr->hInstance && (hInstance != classPtr->hInstance)) @@ -1107,14 +1107,14 @@ } wc->style = classPtr->style; - wc->lpfnWndProc = (WNDPROC32)WINPROC_GetProc( classPtr->winproc, + wc->lpfnWndProc = (WNDPROC)WINPROC_GetProc( classPtr->winproc, WIN_PROC_32A ); wc->cbClsExtra = classPtr->cbClsExtra; wc->cbWndExtra = classPtr->cbWndExtra; wc->hInstance = classPtr->hInstance; - wc->hIcon = (HICON32)classPtr->hIcon; - wc->hCursor = (HCURSOR32)classPtr->hCursor; - wc->hbrBackground = (HBRUSH32)classPtr->hbrBackground; + wc->hIcon = (HICON)classPtr->hIcon; + wc->hCursor = (HCURSOR)classPtr->hCursor; + wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->lpszMenuName = CLASS_GetMenuNameA( classPtr ); wc->lpszClassName = CLASS_GetClassNameA( classPtr ); return TRUE; @@ -1124,28 +1124,28 @@ /*********************************************************************** * GetClassInfo32W (USER32.214) */ -BOOL32 WINAPI GetClassInfo32W( HINSTANCE32 hInstance, LPCWSTR name, - WNDCLASS32W *wc ) +BOOL WINAPI GetClassInfoW( HINSTANCE hInstance, LPCWSTR name, + WNDCLASSW *wc ) { ATOM atom; CLASS *classPtr; TRACE(class,"%x %p %p\n",hInstance, name, wc); - if (!(atom = GlobalFindAtom32W( name )) || + if (!(atom = GlobalFindAtomW( name )) || !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) || (classPtr->hInstance && (hInstance != classPtr->hInstance))) return FALSE; wc->style = classPtr->style; - wc->lpfnWndProc = (WNDPROC32)WINPROC_GetProc( classPtr->winproc, + wc->lpfnWndProc = (WNDPROC)WINPROC_GetProc( classPtr->winproc, WIN_PROC_32W ); wc->cbClsExtra = classPtr->cbClsExtra; wc->cbWndExtra = classPtr->cbWndExtra; wc->hInstance = classPtr->hInstance; - wc->hIcon = (HICON32)classPtr->hIcon; - wc->hCursor = (HCURSOR32)classPtr->hCursor; - wc->hbrBackground = (HBRUSH32)classPtr->hbrBackground; + wc->hIcon = (HICON)classPtr->hIcon; + wc->hCursor = (HCURSOR)classPtr->hCursor; + wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->lpszMenuName = CLASS_GetMenuNameW( classPtr ); wc->lpszClassName = CLASS_GetClassNameW( classPtr ); return TRUE; @@ -1193,27 +1193,27 @@ /*********************************************************************** * GetClassInfoEx32A (USER32.212) */ -BOOL32 WINAPI GetClassInfoEx32A( HINSTANCE32 hInstance, LPCSTR name, - WNDCLASSEX32A *wc ) +BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, + WNDCLASSEXA *wc ) { ATOM atom; CLASS *classPtr; TRACE(class,"%x %p %p\n",hInstance, name, wc); - if (!(atom = GlobalFindAtom32A( name )) || + if (!(atom = GlobalFindAtomA( name )) || !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) /*|| (hInstance != classPtr->hInstance) */ ) return FALSE; wc->style = classPtr->style; - wc->lpfnWndProc = (WNDPROC32)WINPROC_GetProc( classPtr->winproc, + wc->lpfnWndProc = (WNDPROC)WINPROC_GetProc( classPtr->winproc, WIN_PROC_32A ); wc->cbClsExtra = classPtr->cbClsExtra; wc->cbWndExtra = classPtr->cbWndExtra; wc->hInstance = classPtr->hInstance; - wc->hIcon = (HICON32)classPtr->hIcon; - wc->hIconSm = (HICON32)classPtr->hIconSm; - wc->hCursor = (HCURSOR32)classPtr->hCursor; - wc->hbrBackground = (HBRUSH32)classPtr->hbrBackground; + wc->hIcon = (HICON)classPtr->hIcon; + wc->hIconSm = (HICON)classPtr->hIconSm; + wc->hCursor = (HCURSOR)classPtr->hCursor; + wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->lpszMenuName = CLASS_GetMenuNameA( classPtr ); wc->lpszClassName = CLASS_GetClassNameA( classPtr ); return TRUE; @@ -1223,27 +1223,27 @@ /*********************************************************************** * GetClassInfoEx32W (USER32.213) */ -BOOL32 WINAPI GetClassInfoEx32W( HINSTANCE32 hInstance, LPCWSTR name, - WNDCLASSEX32W *wc ) +BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name, + WNDCLASSEXW *wc ) { ATOM atom; CLASS *classPtr; TRACE(class,"%x %p %p\n",hInstance, name, wc); - if (!(atom = GlobalFindAtom32W( name )) || + if (!(atom = GlobalFindAtomW( name )) || !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) || (hInstance != classPtr->hInstance)) return FALSE; wc->style = classPtr->style; - wc->lpfnWndProc = (WNDPROC32)WINPROC_GetProc( classPtr->winproc, + wc->lpfnWndProc = (WNDPROC)WINPROC_GetProc( classPtr->winproc, WIN_PROC_32W ); wc->cbClsExtra = classPtr->cbClsExtra; wc->cbWndExtra = classPtr->cbWndExtra; wc->hInstance = classPtr->hInstance; - wc->hIcon = (HICON32)classPtr->hIcon; - wc->hIconSm = (HICON32)classPtr->hIconSm; - wc->hCursor = (HCURSOR32)classPtr->hCursor; - wc->hbrBackground = (HBRUSH32)classPtr->hbrBackground; + wc->hIcon = (HICON)classPtr->hIcon; + wc->hIconSm = (HICON)classPtr->hIconSm; + wc->hCursor = (HCURSOR)classPtr->hCursor; + wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->lpszMenuName = CLASS_GetMenuNameW( classPtr ); wc->lpszClassName = CLASS_GetClassNameW( classPtr );; return TRUE; @@ -1253,18 +1253,18 @@ /*********************************************************************** * ClassFirst (TOOLHELP.69) */ -BOOL16 WINAPI ClassFirst( CLASSENTRY *pClassEntry ) +BOOL16 WINAPI ClassFirst16( CLASSENTRY *pClassEntry ) { TRACE(class,"%p\n",pClassEntry); pClassEntry->wNext = 1; - return ClassNext( pClassEntry ); + return ClassNext16( pClassEntry ); } /*********************************************************************** * ClassNext (TOOLHELP.70) */ -BOOL16 WINAPI ClassNext( CLASSENTRY *pClassEntry ) +BOOL16 WINAPI ClassNext16( CLASSENTRY *pClassEntry ) { int i; CLASS *class = firstClass; @@ -1280,7 +1280,7 @@ } pClassEntry->hInst = class->hInstance; pClassEntry->wNext++; - GlobalGetAtomName32A( class->atomName, pClassEntry->szClassName, + GlobalGetAtomNameA( class->atomName, pClassEntry->szClassName, sizeof(pClassEntry->szClassName) ); return TRUE; }
diff --git a/windows/clipboard.c b/windows/clipboard.c index d6753b5..c7af89c 100644 --- a/windows/clipboard.c +++ b/windows/clipboard.c
@@ -34,34 +34,34 @@ */ static HQUEUE16 hqClipLock = 0; -static BOOL32 bCBHasChanged = FALSE; +static BOOL bCBHasChanged = FALSE; -HWND32 hWndClipOwner = 0; /* current clipboard owner */ -HWND32 hWndClipWindow = 0; /* window that opened clipboard */ -static HWND32 hWndViewer = 0; /* start of viewers chain */ +HWND hWndClipOwner = 0; /* current clipboard owner */ +HWND hWndClipWindow = 0; /* window that opened clipboard */ +static HWND hWndViewer = 0; /* start of viewers chain */ static WORD LastRegFormat = CF_REGFORMATBASE; -CLIPFORMAT ClipFormats[16] = { - { CF_TEXT, 1, 0, "Text", (HANDLE32)NULL, 0, NULL, &ClipFormats[1] , (HANDLE16)NULL}, - { CF_BITMAP, 1, 0, "Bitmap", (HANDLE32)NULL, 0, &ClipFormats[0], &ClipFormats[2] , (HANDLE16)NULL}, - { CF_METAFILEPICT, 1, 0, "MetaFile Picture", (HANDLE32)NULL, 0, &ClipFormats[1], &ClipFormats[3] , (HANDLE16)NULL}, - { CF_SYLK, 1, 0, "Sylk", (HANDLE32)NULL, 0, &ClipFormats[2], &ClipFormats[4] , (HANDLE16)NULL}, - { CF_DIF, 1, 0, "DIF", (HANDLE32)NULL, 0, &ClipFormats[3], &ClipFormats[5] , (HANDLE16)NULL}, - { CF_TIFF, 1, 0, "TIFF", (HANDLE32)NULL, 0, &ClipFormats[4], &ClipFormats[6] , (HANDLE16)NULL}, - { CF_OEMTEXT, 1, 0, "OEM Text", (HANDLE32)NULL, 0, &ClipFormats[5], &ClipFormats[7] , (HANDLE16)NULL}, - { CF_DIB, 1, 0, "DIB", (HANDLE32)NULL, 0, &ClipFormats[6], &ClipFormats[8] , (HANDLE16)NULL}, - { CF_PALETTE, 1, 0, "Palette", (HANDLE32)NULL, 0, &ClipFormats[7], &ClipFormats[9] , (HANDLE16)NULL}, - { CF_PENDATA, 1, 0, "PenData", (HANDLE32)NULL, 0, &ClipFormats[8], &ClipFormats[10] , (HANDLE16)NULL}, - { CF_RIFF, 1, 0, "RIFF", (HANDLE32)NULL, 0, &ClipFormats[9], &ClipFormats[11] , (HANDLE16)NULL}, - { CF_WAVE, 1, 0, "Wave", (HANDLE32)NULL, 0, &ClipFormats[10], &ClipFormats[12] , (HANDLE16)NULL}, - { CF_OWNERDISPLAY, 1, 0, "Owner Display", (HANDLE32)NULL, 0, &ClipFormats[11], &ClipFormats[13] , (HANDLE16)NULL}, - { CF_DSPTEXT, 1, 0, "DSPText", (HANDLE32)NULL, 0, &ClipFormats[12], &ClipFormats[14] , (HANDLE16)NULL}, - { CF_DSPMETAFILEPICT, 1, 0, "DSPMetaFile Picture", (HANDLE32)NULL, 0, &ClipFormats[13], &ClipFormats[15] , (HANDLE16)NULL}, - { CF_DSPBITMAP, 1, 0, "DSPBitmap", (HANDLE32)NULL, 0, &ClipFormats[14], NULL , (HANDLE16)NULL} +WINE_CLIPFORMAT ClipFormats[16] = { + { CF_TEXT, 1, 0, "Text", (HANDLE)NULL, 0, NULL, &ClipFormats[1] , (HANDLE16)NULL}, + { CF_BITMAP, 1, 0, "Bitmap", (HANDLE)NULL, 0, &ClipFormats[0], &ClipFormats[2] , (HANDLE16)NULL}, + { CF_METAFILEPICT, 1, 0, "MetaFile Picture", (HANDLE)NULL, 0, &ClipFormats[1], &ClipFormats[3] , (HANDLE16)NULL}, + { CF_SYLK, 1, 0, "Sylk", (HANDLE)NULL, 0, &ClipFormats[2], &ClipFormats[4] , (HANDLE16)NULL}, + { CF_DIF, 1, 0, "DIF", (HANDLE)NULL, 0, &ClipFormats[3], &ClipFormats[5] , (HANDLE16)NULL}, + { CF_TIFF, 1, 0, "TIFF", (HANDLE)NULL, 0, &ClipFormats[4], &ClipFormats[6] , (HANDLE16)NULL}, + { CF_OEMTEXT, 1, 0, "OEM Text", (HANDLE)NULL, 0, &ClipFormats[5], &ClipFormats[7] , (HANDLE16)NULL}, + { CF_DIB, 1, 0, "DIB", (HANDLE)NULL, 0, &ClipFormats[6], &ClipFormats[8] , (HANDLE16)NULL}, + { CF_PALETTE, 1, 0, "Palette", (HANDLE)NULL, 0, &ClipFormats[7], &ClipFormats[9] , (HANDLE16)NULL}, + { CF_PENDATA, 1, 0, "PenData", (HANDLE)NULL, 0, &ClipFormats[8], &ClipFormats[10] , (HANDLE16)NULL}, + { CF_RIFF, 1, 0, "RIFF", (HANDLE)NULL, 0, &ClipFormats[9], &ClipFormats[11] , (HANDLE16)NULL}, + { CF_WAVE, 1, 0, "Wave", (HANDLE)NULL, 0, &ClipFormats[10], &ClipFormats[12] , (HANDLE16)NULL}, + { CF_OWNERDISPLAY, 1, 0, "Owner Display", (HANDLE)NULL, 0, &ClipFormats[11], &ClipFormats[13] , (HANDLE16)NULL}, + { CF_DSPTEXT, 1, 0, "DSPText", (HANDLE)NULL, 0, &ClipFormats[12], &ClipFormats[14] , (HANDLE16)NULL}, + { CF_DSPMETAFILEPICT, 1, 0, "DSPMetaFile Picture", (HANDLE)NULL, 0, &ClipFormats[13], &ClipFormats[15] , (HANDLE16)NULL}, + { CF_DSPBITMAP, 1, 0, "DSPBitmap", (HANDLE)NULL, 0, &ClipFormats[14], NULL , (HANDLE16)NULL} }; -static LPCLIPFORMAT __lookup_format( LPCLIPFORMAT lpFormat, WORD wID ) +static LPWINE_CLIPFORMAT __lookup_format( LPWINE_CLIPFORMAT lpFormat, WORD wID ) { while(TRUE) { @@ -98,7 +98,7 @@ { hWndClipOwner = 0; hWndClipWindow = 0; - EmptyClipboard32(); + EmptyClipboard(); hqClipLock = 0; } } @@ -108,13 +108,13 @@ /************************************************************************** * CLIPBOARD_DeleteRecord */ -void CLIPBOARD_DeleteRecord(LPCLIPFORMAT lpFormat, BOOL32 bChange) +void CLIPBOARD_DeleteRecord(LPWINE_CLIPFORMAT lpFormat, BOOL bChange) { if( (lpFormat->wFormatID >= CF_GDIOBJFIRST && lpFormat->wFormatID <= CF_GDIOBJLAST) || lpFormat->wFormatID == CF_BITMAP ) { if (lpFormat->hData32) - DeleteObject32(lpFormat->hData32); + DeleteObject(lpFormat->hData32); if (lpFormat->hData16) DeleteObject16(lpFormat->hData16); } @@ -122,8 +122,8 @@ { if (lpFormat->hData32) { - DeleteMetaFile32( ((METAFILEPICT32 *)GlobalLock32( lpFormat->hData32 ))->hMF ); - GlobalFree32(lpFormat->hData32); + DeleteMetaFile( ((METAFILEPICT *)GlobalLock( lpFormat->hData32 ))->hMF ); + GlobalFree(lpFormat->hData32); if (lpFormat->hData16) /* HMETAFILE16 and HMETAFILE32 are apparently the same thing, and a shallow copy is enough to share a METAFILEPICT @@ -140,7 +140,7 @@ else { if (lpFormat->hData32) - GlobalFree32(lpFormat->hData32); + GlobalFree(lpFormat->hData32); if (lpFormat->hData16) GlobalFree16(lpFormat->hData16); } @@ -155,7 +155,7 @@ /************************************************************************** * CLIPBOARD_IsPresent */ -BOOL32 CLIPBOARD_IsPresent(WORD wFormat) +BOOL CLIPBOARD_IsPresent(WORD wFormat) { /* special case */ @@ -164,7 +164,7 @@ ClipFormats[CF_OEMTEXT-1].wDataPresent; else { - LPCLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat ); + LPWINE_CLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat ); if( lpFormat ) return (lpFormat->wDataPresent); } return FALSE; @@ -175,7 +175,7 @@ */ BOOL16 WINAPI OpenClipboard16( HWND16 hWnd ) { - return OpenClipboard32( hWnd ); + return OpenClipboard( hWnd ); } @@ -184,15 +184,15 @@ * * Note: Netscape uses NULL hWnd to open the clipboard. */ -BOOL32 WINAPI OpenClipboard32( HWND32 hWnd ) +BOOL WINAPI OpenClipboard( HWND hWnd ) { - BOOL32 bRet; + BOOL bRet; TRACE(clipboard,"(%04x)...\n", hWnd); if (!hqClipLock) { - hqClipLock = GetFastQueue(); + hqClipLock = GetFastQueue16(); hWndClipWindow = hWnd; bCBHasChanged = FALSE; bRet = TRUE; @@ -209,18 +209,18 @@ */ BOOL16 WINAPI CloseClipboard16(void) { - return CloseClipboard32(); + return CloseClipboard(); } /************************************************************************** * CloseClipboard32 (USER32.54) */ -BOOL32 WINAPI CloseClipboard32(void) +BOOL WINAPI CloseClipboard(void) { TRACE(clipboard,"!\n"); - if (hqClipLock == GetFastQueue()) + if (hqClipLock == GetFastQueue16()) { hWndClipWindow = 0; @@ -237,20 +237,20 @@ */ BOOL16 WINAPI EmptyClipboard16(void) { - return EmptyClipboard32(); + return EmptyClipboard(); } /************************************************************************** * EmptyClipboard32 (USER32.169) */ -BOOL32 WINAPI EmptyClipboard32(void) +BOOL WINAPI EmptyClipboard(void) { - LPCLIPFORMAT lpFormat = ClipFormats; + LPWINE_CLIPFORMAT lpFormat = ClipFormats; TRACE(clipboard,"(void)\n"); - if (hqClipLock != GetFastQueue()) return FALSE; + if (hqClipLock != GetFastQueue16()) return FALSE; /* destroy private objects */ @@ -285,7 +285,7 @@ /************************************************************************** * GetClipboardOwner32 (USER32.225) */ -HWND32 WINAPI GetClipboardOwner32(void) +HWND WINAPI GetClipboardOwner(void) { return hWndClipOwner; } @@ -296,7 +296,7 @@ */ HANDLE16 WINAPI SetClipboardData16( UINT16 wFormat, HANDLE16 hData ) { - LPCLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat ); + LPWINE_CLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat ); TRACE(clipboard, "(%04X, %04x) !\n", wFormat, hData); @@ -307,7 +307,7 @@ * adding new data). */ - if( (hqClipLock != GetFastQueue()) || !lpFormat || + if( (hqClipLock != GetFastQueue16()) || !lpFormat || (!hData && (!hWndClipOwner || (hWndClipOwner != hWndClipWindow))) ) return 0; CLIPBOARD_GetDriver()->pSetClipboardData(wFormat); @@ -342,9 +342,9 @@ /************************************************************************** * SetClipboardData32 (USER32.470) */ -HANDLE32 WINAPI SetClipboardData32( UINT32 wFormat, HANDLE32 hData ) +HANDLE WINAPI SetClipboardData( UINT wFormat, HANDLE hData ) { - LPCLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat ); + LPWINE_CLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat ); TRACE(clipboard, "(%08X, %08x) !\n", wFormat, hData); @@ -355,7 +355,7 @@ * adding new data). */ - if( (hqClipLock != GetFastQueue()) || !lpFormat || + if( (hqClipLock != GetFastQueue16()) || !lpFormat || (!hData && (!hWndClipOwner || (hWndClipOwner != hWndClipWindow))) ) return 0; CLIPBOARD_GetDriver()->pSetClipboardData(wFormat); @@ -390,11 +390,11 @@ /************************************************************************** * CLIPBOARD_RenderFormat */ -static BOOL32 CLIPBOARD_RenderFormat(LPCLIPFORMAT lpFormat) +static BOOL CLIPBOARD_RenderFormat(LPWINE_CLIPFORMAT lpFormat) { if( lpFormat->wDataPresent && !lpFormat->hData16 && !lpFormat->hData32 ) { - if( IsWindow32(hWndClipOwner) ) + if( IsWindow(hWndClipOwner) ) SendMessage16(hWndClipOwner,WM_RENDERFORMAT, (WPARAM16)lpFormat->wFormatID,0L); else @@ -413,7 +413,7 @@ * * Convert text between UNIX and DOS formats. */ -static BOOL32 CLIPBOARD_RenderText(LPCLIPFORMAT lpTarget, LPCLIPFORMAT lpSource) +static BOOL CLIPBOARD_RenderText(LPWINE_CLIPFORMAT lpTarget, LPWINE_CLIPFORMAT lpSource) { UINT16 size; LPCSTR lpstrS; @@ -421,8 +421,8 @@ if (lpSource->hData32) { - size = GlobalSize32( lpSource->hData32 ); - lpstrS = (LPSTR)GlobalLock32(lpSource->hData32); + size = GlobalSize( lpSource->hData32 ); + lpstrS = (LPSTR)GlobalLock(lpSource->hData32); } else { @@ -434,19 +434,19 @@ TRACE(clipboard,"\tconverting from '%s' to '%s', %i chars\n", lpSource->Name, lpTarget->Name, size); - lpTarget->hData32 = GlobalAlloc32(GMEM_ZEROINIT, size); - lpstrT = (LPSTR)GlobalLock32(lpTarget->hData32); + lpTarget->hData32 = GlobalAlloc(GMEM_ZEROINIT, size); + lpstrT = (LPSTR)GlobalLock(lpTarget->hData32); if( lpstrT ) { if( lpSource->wFormatID == CF_TEXT ) - CharToOemBuff32A(lpstrS, lpstrT, size); + CharToOemBuffA(lpstrS, lpstrT, size); else - OemToCharBuff32A(lpstrS, lpstrT, size); + OemToCharBuffA(lpstrS, lpstrT, size); TRACE(clipboard,"\tgot %s\n", lpstrT); - GlobalUnlock32(lpTarget->hData32); + GlobalUnlock(lpTarget->hData32); if (lpSource->hData32) - GlobalUnlock32(lpSource->hData32); + GlobalUnlock(lpSource->hData32); else GlobalUnlock16(lpSource->hData16); return TRUE; @@ -454,7 +454,7 @@ lpTarget->hData32 = 0; if (lpSource->hData32) - GlobalUnlock32(lpSource->hData32); + GlobalUnlock(lpSource->hData32); else GlobalUnlock16(lpSource->hData16); return FALSE; @@ -465,10 +465,10 @@ */ HANDLE16 WINAPI GetClipboardData16( UINT16 wFormat ) { - LPCLIPFORMAT lpRender = ClipFormats; - LPCLIPFORMAT lpUpdate = NULL; + LPWINE_CLIPFORMAT lpRender = ClipFormats; + LPWINE_CLIPFORMAT lpUpdate = NULL; - if (hqClipLock != GetFastQueue()) return 0; + if (hqClipLock != GetFastQueue16()) return 0; TRACE(clipboard,"(%04X)\n", wFormat); @@ -504,7 +504,7 @@ if( lpUpdate->wFormatID == CF_METAFILEPICT ) size = sizeof( METAFILEPICT16 ); else - size = GlobalSize32(lpUpdate->hData32); + size = GlobalSize(lpUpdate->hData32); lpUpdate->hData16 = GlobalAlloc16(GMEM_ZEROINIT, size); if( !lpUpdate->hData16 ) ERR(clipboard, "(%04X) -- not enough memory in 16b heap\n", wFormat); @@ -516,17 +516,17 @@ FIXME(clipboard,"\tin the appropriate file.\n"); #ifdef SOMEONE_IMPLEMENTED_ME CopyMetaFilePict32to16( GlobalLock16(lpUpdate->hData16), - GlobalLock32(lpUpdate->hData32) ); + GlobalLock(lpUpdate->hData32) ); #endif } else { memcpy( GlobalLock16(lpUpdate->hData16), - GlobalLock32(lpUpdate->hData32), + GlobalLock(lpUpdate->hData32), size ); } GlobalUnlock16(lpUpdate->hData16); - GlobalUnlock32(lpUpdate->hData32); + GlobalUnlock(lpUpdate->hData32); } } @@ -539,12 +539,12 @@ /************************************************************************** * GetClipboardData32 (USER32.222) */ -HANDLE32 WINAPI GetClipboardData32( UINT32 wFormat ) +HANDLE WINAPI GetClipboardData( UINT wFormat ) { - LPCLIPFORMAT lpRender = ClipFormats; - LPCLIPFORMAT lpUpdate = NULL; + LPWINE_CLIPFORMAT lpRender = ClipFormats; + LPWINE_CLIPFORMAT lpUpdate = NULL; - if (hqClipLock != GetFastQueue()) return 0; + if (hqClipLock != GetFastQueue16()) return 0; TRACE(clipboard,"(%08X)\n", wFormat); @@ -578,26 +578,26 @@ { int size; if( lpUpdate->wFormatID == CF_METAFILEPICT ) - size = sizeof( METAFILEPICT32 ); + size = sizeof( METAFILEPICT ); else size = GlobalSize16(lpUpdate->hData16); - lpUpdate->hData32 = GlobalAlloc32(GMEM_ZEROINIT, size); + lpUpdate->hData32 = GlobalAlloc(GMEM_ZEROINIT, size); if( lpUpdate->wFormatID == CF_METAFILEPICT ) { FIXME(clipboard,"\timplement function CopyMetaFilePict16to32\n"); FIXME(clipboard,"\tin the appropriate file.\n"); #ifdef SOMEONE_IMPLEMENTED_ME CopyMetaFilePict16to32( GlobalLock16(lpUpdate->hData32), - GlobalLock32(lpUpdate->hData16) ); + GlobalLock(lpUpdate->hData16) ); #endif } else { - memcpy( GlobalLock32(lpUpdate->hData32), + memcpy( GlobalLock(lpUpdate->hData32), GlobalLock16(lpUpdate->hData16), size ); } - GlobalUnlock32(lpUpdate->hData32); + GlobalUnlock(lpUpdate->hData32); GlobalUnlock16(lpUpdate->hData16); } @@ -611,17 +611,17 @@ */ INT16 WINAPI CountClipboardFormats16(void) { - return CountClipboardFormats32(); + return CountClipboardFormats(); } /************************************************************************** * CountClipboardFormats32 (USER32.63) */ -INT32 WINAPI CountClipboardFormats32(void) +INT WINAPI CountClipboardFormats(void) { - INT32 FormatCount = 0; - LPCLIPFORMAT lpFormat = ClipFormats; + INT FormatCount = 0; + LPWINE_CLIPFORMAT lpFormat = ClipFormats; TRACE(clipboard,"(void)\n"); @@ -652,20 +652,20 @@ */ UINT16 WINAPI EnumClipboardFormats16( UINT16 wFormat ) { - return EnumClipboardFormats32( wFormat ); + return EnumClipboardFormats( wFormat ); } /************************************************************************** * EnumClipboardFormats32 (USER32.179) */ -UINT32 WINAPI EnumClipboardFormats32( UINT32 wFormat ) +UINT WINAPI EnumClipboardFormats( UINT wFormat ) { - LPCLIPFORMAT lpFormat = ClipFormats; + LPWINE_CLIPFORMAT lpFormat = ClipFormats; TRACE(clipboard,"(%04X)\n", wFormat); - if( hqClipLock != GetFastQueue() ) return 0; + if( hqClipLock != GetFastQueue16() ) return 0; if( (!wFormat || wFormat == CF_TEXT || wFormat == CF_OEMTEXT) ) CLIPBOARD_GetDriver()->pRequestSelection(); @@ -703,8 +703,8 @@ */ UINT16 WINAPI RegisterClipboardFormat16( LPCSTR FormatName ) { - LPCLIPFORMAT lpNewFormat; - LPCLIPFORMAT lpFormat = ClipFormats; + LPWINE_CLIPFORMAT lpNewFormat; + LPWINE_CLIPFORMAT lpFormat = ClipFormats; if (FormatName == NULL) return 0; @@ -727,7 +727,7 @@ /* allocate storage for new format entry */ - lpNewFormat = (LPCLIPFORMAT)xmalloc(sizeof(CLIPFORMAT)); + lpNewFormat = (LPWINE_CLIPFORMAT)xmalloc(sizeof(WINE_CLIPFORMAT)); lpFormat->NextFormat = lpNewFormat; lpNewFormat->wFormatID = LastRegFormat; lpNewFormat->wRefCount = 1; @@ -749,7 +749,7 @@ /************************************************************************** * RegisterClipboardFormat32A (USER32.431) */ -UINT32 WINAPI RegisterClipboardFormat32A( LPCSTR formatName ) +UINT WINAPI RegisterClipboardFormatA( LPCSTR formatName ) { return RegisterClipboardFormat16( formatName ); } @@ -758,10 +758,10 @@ /************************************************************************** * RegisterClipboardFormat32W (USER32.432) */ -UINT32 WINAPI RegisterClipboardFormat32W( LPCWSTR formatName ) +UINT WINAPI RegisterClipboardFormatW( LPCWSTR formatName ) { LPSTR aFormat = HEAP_strdupWtoA( GetProcessHeap(), 0, formatName ); - UINT32 ret = RegisterClipboardFormat32A( aFormat ); + UINT ret = RegisterClipboardFormatA( aFormat ); HeapFree( GetProcessHeap(), 0, aFormat ); return ret; } @@ -771,16 +771,16 @@ */ INT16 WINAPI GetClipboardFormatName16( UINT16 wFormat, LPSTR retStr, INT16 maxlen ) { - return GetClipboardFormatName32A( wFormat, retStr, maxlen ); + return GetClipboardFormatNameA( wFormat, retStr, maxlen ); } /************************************************************************** * GetClipboardFormatName32A (USER32.223) */ -INT32 WINAPI GetClipboardFormatName32A( UINT32 wFormat, LPSTR retStr, INT32 maxlen ) +INT WINAPI GetClipboardFormatNameA( UINT wFormat, LPSTR retStr, INT maxlen ) { - LPCLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat ); + LPWINE_CLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat ); TRACE(clipboard, "(%04X, %p, %d) !\n", wFormat, retStr, maxlen); @@ -789,7 +789,7 @@ TRACE(clipboard, "Name='%s' !\n", lpFormat->Name); - lstrcpyn32A( retStr, lpFormat->Name, maxlen ); + lstrcpynA( retStr, lpFormat->Name, maxlen ); return strlen(retStr); } @@ -797,10 +797,10 @@ /************************************************************************** * GetClipboardFormatName32W (USER32.224) */ -INT32 WINAPI GetClipboardFormatName32W( UINT32 wFormat, LPWSTR retStr, INT32 maxlen ) +INT WINAPI GetClipboardFormatNameW( UINT wFormat, LPWSTR retStr, INT maxlen ) { LPSTR p = HEAP_xalloc( GetProcessHeap(), 0, maxlen ); - INT32 ret = GetClipboardFormatName32A( wFormat, p, maxlen ); + INT ret = GetClipboardFormatNameA( wFormat, p, maxlen ); lstrcpynAtoW( retStr, p, maxlen ); HeapFree( GetProcessHeap(), 0, p ); return ret; @@ -812,16 +812,16 @@ */ HWND16 WINAPI SetClipboardViewer16( HWND16 hWnd ) { - return SetClipboardViewer32( hWnd ); + return SetClipboardViewer( hWnd ); } /************************************************************************** * SetClipboardViewer32 (USER32.471) */ -HWND32 WINAPI SetClipboardViewer32( HWND32 hWnd ) +HWND WINAPI SetClipboardViewer( HWND hWnd ) { - HWND32 hwndPrev = hWndViewer; + HWND hwndPrev = hWndViewer; TRACE(clipboard,"(%04x): returning %04x\n", hWnd, hwndPrev); @@ -842,7 +842,7 @@ /************************************************************************** * GetClipboardViewer32 (USER32.226) */ -HWND32 WINAPI GetClipboardViewer32(void) +HWND WINAPI GetClipboardViewer(void) { return hWndViewer; } @@ -853,15 +853,15 @@ */ BOOL16 WINAPI ChangeClipboardChain16(HWND16 hWnd, HWND16 hWndNext) { - return ChangeClipboardChain32(hWnd, hWndNext); + return ChangeClipboardChain(hWnd, hWndNext); } /************************************************************************** * ChangeClipboardChain32 (USER32.22) */ -BOOL32 WINAPI ChangeClipboardChain32(HWND32 hWnd, HWND32 hWndNext) +BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext) { - BOOL32 bRet = 0; + BOOL bRet = 0; FIXME(clipboard, "(0x%04x, 0x%04x): stub?\n", hWnd, hWndNext); @@ -883,14 +883,14 @@ */ BOOL16 WINAPI IsClipboardFormatAvailable16( UINT16 wFormat ) { - return IsClipboardFormatAvailable32( wFormat ); + return IsClipboardFormatAvailable( wFormat ); } /************************************************************************** * IsClipboardFormatAvailable32 (USER32.340) */ -BOOL32 WINAPI IsClipboardFormatAvailable32( UINT32 wFormat ) +BOOL WINAPI IsClipboardFormatAvailable( UINT wFormat ) { TRACE(clipboard,"(%04X) !\n", wFormat); @@ -913,7 +913,7 @@ /************************************************************************** * GetOpenClipboardWindow32 (USER32.277) */ -HWND32 WINAPI GetOpenClipboardWindow32(void) +HWND WINAPI GetOpenClipboardWindow(void) { return hWndClipWindow; } @@ -932,19 +932,19 @@ /************************************************************************** * GetPriorityClipboardFormat32 (USER32.279) */ -INT32 WINAPI GetPriorityClipboardFormat32( UINT32 *lpPriorityList, INT32 nCount ) +INT WINAPI GetPriorityClipboardFormat( UINT *lpPriorityList, INT nCount ) { int Counter; - if(CountClipboardFormats32() == 0) + if(CountClipboardFormats() == 0) { return 0; } for(Counter = 0; Counter <= nCount; Counter++) { - if(IsClipboardFormatAvailable32(*(lpPriorityList+sizeof(INT32)*Counter))) - return *(lpPriorityList+sizeof(INT32)*Counter); + if(IsClipboardFormatAvailable(*(lpPriorityList+sizeof(INT)*Counter))) + return *(lpPriorityList+sizeof(INT)*Counter); } return -1;
diff --git a/windows/dce.c b/windows/dce.c index 8aee87e..25bf236 100644 --- a/windows/dce.c +++ b/windows/dce.c
@@ -34,10 +34,10 @@ #define NB_DCE 5 /* Number of DCEs created at startup */ static DCE *firstDCE = 0; -static HDC32 defaultDCstate = 0; +static HDC defaultDCstate = 0; static void DCE_DeleteClipRgn( DCE* ); -static INT32 DCE_ReleaseDC( DCE* ); +static INT DCE_ReleaseDC( DCE* ); /*********************************************************************** @@ -63,7 +63,7 @@ * * Allocate a new DCE. */ -DCE *DCE_AllocDCE( HWND32 hWnd, DCE_TYPE type ) +DCE *DCE_AllocDCE( HWND hWnd, DCE_TYPE type ) { DCE * dce; if (!(dce = HeapAlloc( SystemHeap, 0, sizeof(DCE) ))) return NULL; @@ -75,7 +75,7 @@ /* store DCE handle in DC hook data field */ - SetDCHook( dce->hDC, (FARPROC16)DCHook, (DWORD)dce ); + SetDCHook( dce->hDC, (FARPROC16)DCHook16, (DWORD)dce ); dce->hwndCurrent = hWnd; dce->hClipRgn = 0; @@ -92,7 +92,7 @@ if( wnd->dwStyle & WS_CLIPCHILDREN ) dce->DCXflags |= DCX_CLIPCHILDREN; if( wnd->dwStyle & WS_CLIPSIBLINGS ) dce->DCXflags |= DCX_CLIPSIBLINGS; } - SetHookFlags(dce->hDC,DCHF_INVALIDATEVISRGN); + SetHookFlags16(dce->hDC,DCHF_INVALIDATEVISRGN); } else dce->DCXflags = DCX_CACHE | DCX_DCEEMPTY; @@ -113,9 +113,9 @@ SetDCHook(dce->hDC, NULL, 0L); - DeleteDC32( dce->hDC ); + DeleteDC( dce->hDC ); if( dce->hClipRgn && !(dce->DCXflags & DCX_KEEPCLIPRGN) ) - DeleteObject32(dce->hClipRgn); + DeleteObject(dce->hClipRgn); HeapFree( SystemHeap, 0, dce ); return *ppDCE; } @@ -174,20 +174,20 @@ dce->DCXflags &= ~DCX_KEEPCLIPRGN; else if( dce->hClipRgn > 1 ) - DeleteObject32( dce->hClipRgn ); + DeleteObject( dce->hClipRgn ); dce->hClipRgn = 0; TRACE(dc,"\trestoring VisRgn\n"); - RestoreVisRgn(dce->hDC); + RestoreVisRgn16(dce->hDC); } /*********************************************************************** * DCE_ReleaseDC */ -static INT32 DCE_ReleaseDC( DCE* dce ) +static INT DCE_ReleaseDC( DCE* dce ) { if ((dce->DCXflags & (DCX_DCEEMPTY | DCX_DCEBUSY)) != DCX_DCEBUSY) return 0; @@ -199,7 +199,7 @@ if (dce->DCXflags & DCX_CACHE) { - SetDCState( dce->hDC, defaultDCstate ); + SetDCState16( dce->hDC, defaultDCstate ); dce->DCXflags &= ~DCX_DCEBUSY; if (dce->DCXflags & DCX_DCEDIRTY) { @@ -223,10 +223,10 @@ * DCE's for windows that have pWnd->parent as an ansector and whose client * rect intersects with specified update rectangle. */ -BOOL32 DCE_InvalidateDCE(WND* pWnd, const RECT32* pRectUpdate) +BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate) { WND* wndScope = pWnd->parent; - BOOL32 bRet = FALSE; + BOOL bRet = FALSE; if( wndScope ) { @@ -249,7 +249,7 @@ if( wndCurrent && wndCurrent != WIN_GetDesktop() ) { WND* wnd = wndCurrent; - INT32 xoffset = 0, yoffset = 0; + INT xoffset = 0, yoffset = 0; if( (wndCurrent == wndScope) && !(dce->DCXflags & DCX_CLIPCHILDREN) ) continue; @@ -259,15 +259,15 @@ { if( wnd == wndScope ) { - RECT32 wndRect; + RECT wndRect; wndRect = wndCurrent->rectWindow; - OffsetRect32( &wndRect, xoffset - wndCurrent->rectClient.left, + OffsetRect( &wndRect, xoffset - wndCurrent->rectClient.left, yoffset - wndCurrent->rectClient.top); if (pWnd == wndCurrent || - IntersectRect32( &wndRect, &wndRect, pRectUpdate )) + IntersectRect( &wndRect, &wndRect, pRectUpdate )) { if( !(dce->DCXflags & DCX_DCEBUSY) ) { @@ -288,7 +288,7 @@ (unsigned)dce, wndCurrent->hwndSelf); dce->DCXflags |= DCX_DCEDIRTY; - SetHookFlags(dce->hDC, DCHF_INVALIDATEVISRGN); + SetHookFlags16(dce->hDC, DCHF_INVALIDATEVISRGN); bRet = TRUE; } } @@ -315,7 +315,7 @@ for (i = 0; i < NB_DCE; i++) { if (!(dce = DCE_AllocDCE( 0, DCE_CACHE_DC ))) return; - if (!defaultDCstate) defaultDCstate = GetDCState( dce->hDC ); + if (!defaultDCstate) defaultDCstate = GetDCState16( dce->hDC ); } } @@ -327,14 +327,14 @@ * window area clipped by the client area of all ancestors) in the * corresponding coordinates. Return FALSE if the visible region is empty. */ -static BOOL32 DCE_GetVisRect( WND *wndPtr, BOOL32 clientArea, RECT32 *lprect ) +static BOOL DCE_GetVisRect( WND *wndPtr, BOOL clientArea, RECT *lprect ) { *lprect = clientArea ? wndPtr->rectClient : wndPtr->rectWindow; if (wndPtr->dwStyle & WS_VISIBLE) { - INT32 xoffset = lprect->left; - INT32 yoffset = lprect->top; + INT xoffset = lprect->left; + INT yoffset = lprect->top; while (wndPtr->dwStyle & WS_CHILD) { @@ -345,7 +345,7 @@ xoffset += wndPtr->rectClient.left; yoffset += wndPtr->rectClient.top; - OffsetRect32( lprect, wndPtr->rectClient.left, + OffsetRect( lprect, wndPtr->rectClient.left, wndPtr->rectClient.top ); if( (wndPtr->rectClient.left >= wndPtr->rectClient.right) || @@ -361,12 +361,12 @@ lprect->top = MAX( lprect->top, wndPtr->rectClient.top ); lprect->bottom = MIN( lprect->bottom, wndPtr->rectClient.bottom ); } - OffsetRect32( lprect, -xoffset, -yoffset ); + OffsetRect( lprect, -xoffset, -yoffset ); return TRUE; } fail: - SetRectEmpty32( lprect ); + SetRectEmpty( lprect ); return FALSE; } @@ -378,10 +378,10 @@ * adding to the clip region the intersection of the target rectangle * with an offset window rectangle. */ -static BOOL32 DCE_AddClipRects( WND *pWndStart, WND *pWndEnd, - HRGN32 hrgnClip, LPRECT32 lpRect, int x, int y ) +static BOOL DCE_AddClipRects( WND *pWndStart, WND *pWndEnd, + HRGN hrgnClip, LPRECT lpRect, int x, int y ) { - RECT32 rect; + RECT rect; if( pWndStart->pDriver->pIsSelfClipping( pWndStart ) ) return TRUE; /* The driver itself will do the clipping */ @@ -395,7 +395,7 @@ rect.right = pWndStart->rectWindow.right + x; rect.bottom = pWndStart->rectWindow.bottom + y; - if( IntersectRect32( &rect, &rect, lpRect )) + if( IntersectRect( &rect, &rect, lpRect )) if(!REGION_UnionRectWithRgn( hrgnClip, &rect )) break; } @@ -410,10 +410,10 @@ * clipped by the client area of all ancestors, and then optionally * by siblings and children. */ -HRGN32 DCE_GetVisRgn( HWND32 hwnd, WORD flags, HWND32 hwndChild, WORD cflags ) +HRGN DCE_GetVisRgn( HWND hwnd, WORD flags, HWND hwndChild, WORD cflags ) { - HRGN32 hrgnVis = 0; - RECT32 rect; + HRGN hrgnVis = 0; + RECT rect; WND *wndPtr = WIN_FindWndPtr( hwnd ); WND *childWnd = WIN_FindWndPtr( hwndChild ); @@ -421,10 +421,10 @@ if (wndPtr && DCE_GetVisRect(wndPtr, !(flags & DCX_WINDOW), &rect)) { - if((hrgnVis = CreateRectRgnIndirect32( &rect ))) + if((hrgnVis = CreateRectRgnIndirect( &rect ))) { - HRGN32 hrgnClip = CreateRectRgn32( 0, 0, 0, 0 ); - INT32 xoffset, yoffset; + HRGN hrgnClip = CreateRectRgn( 0, 0, 0, 0 ); + INT xoffset, yoffset; if( hrgnClip ) { @@ -514,18 +514,18 @@ * to substract it from the visible rectangle. */ - CombineRgn32( hrgnVis, hrgnVis, hrgnClip, RGN_DIFF ); - DeleteObject32( hrgnClip ); + CombineRgn( hrgnVis, hrgnVis, hrgnClip, RGN_DIFF ); + DeleteObject( hrgnClip ); } else { - DeleteObject32( hrgnVis ); + DeleteObject( hrgnVis ); hrgnVis = 0; } } } else - hrgnVis = CreateRectRgn32(0, 0, 0, 0); /* empty */ + hrgnVis = CreateRectRgn(0, 0, 0, 0); /* empty */ return hrgnVis; } @@ -535,12 +535,12 @@ * Change region from DC-origin relative coordinates to screen coords. */ -static void DCE_OffsetVisRgn( HDC32 hDC, HRGN32 hVisRgn ) +static void DCE_OffsetVisRgn( HDC hDC, HRGN hVisRgn ) { DC *dc; if (!(dc = (DC *) GDI_GetObjPtr( hDC, DC_MAGIC ))) return; - OffsetRgn32( hVisRgn, dc->w.DCOrgX, dc->w.DCOrgY ); + OffsetRgn( hVisRgn, dc->w.DCOrgX, dc->w.DCOrgY ); GDI_HEAP_UNLOCK( hDC ); } @@ -551,15 +551,15 @@ * Translate given region from the wnd client to the DC coordinates * and add it to the clipping region. */ -INT16 DCE_ExcludeRgn( HDC32 hDC, WND* wnd, HRGN32 hRgn ) +INT16 DCE_ExcludeRgn( HDC hDC, WND* wnd, HRGN hRgn ) { - POINT32 pt = {0, 0}; + POINT pt = {0, 0}; DCE *dce = firstDCE; while (dce && (dce->hDC != hDC)) dce = dce->next; if( dce ) { - MapWindowPoints32( wnd->hwndSelf, dce->hwndCurrent, &pt, 1); + MapWindowPoints( wnd->hwndSelf, dce->hwndCurrent, &pt, 1); if( dce->DCXflags & DCX_WINDOW ) { wnd = WIN_FindWndPtr(dce->hwndCurrent); @@ -568,7 +568,7 @@ } } else return ERROR; - OffsetRgn32(hRgn, pt.x, pt.y); + OffsetRgn(hRgn, pt.x, pt.y); return ExtSelectClipRgn( hDC, hRgn, RGN_DIFF ); } @@ -578,7 +578,7 @@ */ HDC16 WINAPI GetDCEx16( HWND16 hwnd, HRGN16 hrgnClip, DWORD flags ) { - return (HDC16)GetDCEx32( hwnd, hrgnClip, flags ); + return (HDC16)GetDCEx( hwnd, hrgnClip, flags ); } @@ -589,16 +589,16 @@ * * FIXME: Full support for hrgnClip == 1 (alias for entire window). */ -HDC32 WINAPI GetDCEx32( HWND32 hwnd, HRGN32 hrgnClip, DWORD flags ) +HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags ) { - HRGN32 hrgnVisible = 0; - HDC32 hdc = 0; + HRGN hrgnVisible = 0; + HDC hdc = 0; DCE * dce; DC * dc; WND * wndPtr; DWORD dcxFlags = 0; - BOOL32 bUpdateVisRgn = TRUE; - BOOL32 bUpdateClipOrigin = FALSE; + BOOL bUpdateVisRgn = TRUE; + BOOL bUpdateClipOrigin = FALSE; TRACE(dc,"hwnd %04x, hrgnClip %04x, flags %08x\n", hwnd, hrgnClip, (unsigned)flags); @@ -709,7 +709,7 @@ DCE_DeleteClipRgn( dce ); } else - RestoreVisRgn(dce->hDC); + RestoreVisRgn16(dce->hDC); } } } @@ -744,20 +744,20 @@ hrgnVisible = DCE_GetVisRgn( parentPtr->hwndSelf, dcxFlags, wndPtr->hwndSelf, flags ); if( flags & DCX_WINDOW ) - OffsetRgn32( hrgnVisible, -wndPtr->rectWindow.left, + OffsetRgn( hrgnVisible, -wndPtr->rectWindow.left, -wndPtr->rectWindow.top ); else - OffsetRgn32( hrgnVisible, -wndPtr->rectClient.left, + OffsetRgn( hrgnVisible, -wndPtr->rectClient.left, -wndPtr->rectClient.top ); DCE_OffsetVisRgn( hdc, hrgnVisible ); } else - hrgnVisible = CreateRectRgn32( 0, 0, 0, 0 ); + hrgnVisible = CreateRectRgn( 0, 0, 0, 0 ); } else - if ((hwnd == GetDesktopWindow32()) && + if ((hwnd == GetDesktopWindow()) && (X11DRV_WND_GetXRootWindow(wndPtr) == DefaultRootWindow(display))) - hrgnVisible = CreateRectRgn32( 0, 0, SYSMETRICS_CXSCREEN, + hrgnVisible = CreateRectRgn( 0, 0, SYSMETRICS_CXSCREEN, SYSMETRICS_CYSCREEN ); else { @@ -767,7 +767,7 @@ dc->w.flags &= ~DC_DIRTY; dce->DCXflags &= ~DCX_DCEDIRTY; - SelectVisRgn( hdc, hrgnVisible ); + SelectVisRgn16( hdc, hrgnVisible ); } else TRACE(dc,"no visrgn update %08x dce, hwnd [%04x]\n", (unsigned)dce, hwnd); @@ -776,22 +776,22 @@ if( flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) ) { - if( !hrgnVisible ) hrgnVisible = CreateRectRgn32( 0, 0, 0, 0 ); + if( !hrgnVisible ) hrgnVisible = CreateRectRgn( 0, 0, 0, 0 ); dce->DCXflags |= flags & (DCX_KEEPCLIPRGN | DCX_INTERSECTRGN | DCX_EXCLUDERGN); dce->hClipRgn = hrgnClip; TRACE(dc, "\tsaved VisRgn, clipRgn = %04x\n", hrgnClip); - SaveVisRgn( hdc ); - CombineRgn32( hrgnVisible, hrgnClip, 0, RGN_COPY ); + SaveVisRgn16( hdc ); + CombineRgn( hrgnVisible, hrgnClip, 0, RGN_COPY ); DCE_OffsetVisRgn( hdc, hrgnVisible ); - CombineRgn32( hrgnVisible, InquireVisRgn( hdc ), hrgnVisible, + CombineRgn( hrgnVisible, InquireVisRgn16( hdc ), hrgnVisible, (flags & DCX_INTERSECTRGN) ? RGN_AND : RGN_DIFF ); - SelectVisRgn( hdc, hrgnVisible ); + SelectVisRgn16( hdc, hrgnVisible ); } - if( hrgnVisible ) DeleteObject32( hrgnVisible ); + if( hrgnVisible ) DeleteObject( hrgnVisible ); TRACE(dc, "(%04x,%04x,0x%lx): returning %04x\n", hwnd, hrgnClip, flags, hdc); @@ -804,7 +804,7 @@ */ HDC16 WINAPI GetDC16( HWND16 hwnd ) { - return (HDC16)GetDC32( hwnd ); + return (HDC16)GetDC( hwnd ); } @@ -814,12 +814,12 @@ * :Handle to DC * NULL: Failure */ -HDC32 WINAPI GetDC32( - HWND32 hwnd /* handle of window */ +HDC WINAPI GetDC( + HWND hwnd /* handle of window */ ) { if (!hwnd) - return GetDCEx32( GetDesktopWindow32(), 0, DCX_CACHE | DCX_WINDOW ); - return GetDCEx32( hwnd, 0, DCX_USESTYLE ); + return GetDCEx( GetDesktopWindow(), 0, DCX_CACHE | DCX_WINDOW ); + return GetDCEx( hwnd, 0, DCX_USESTYLE ); } @@ -836,10 +836,10 @@ /*********************************************************************** * GetWindowDC32 (USER32.304) */ -HDC32 WINAPI GetWindowDC32( HWND32 hwnd ) +HDC WINAPI GetWindowDC( HWND hwnd ) { - if (!hwnd) hwnd = GetDesktopWindow32(); - return GetDCEx32( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ); + if (!hwnd) hwnd = GetDesktopWindow(); + return GetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ); } @@ -848,7 +848,7 @@ */ INT16 WINAPI ReleaseDC16( HWND16 hwnd, HDC16 hdc ) { - return (INT16)ReleaseDC32( hwnd, hdc ); + return (INT16)ReleaseDC( hwnd, hdc ); } @@ -859,9 +859,9 @@ * 1: Success * 0: Failure */ -INT32 WINAPI ReleaseDC32( - HWND32 hwnd /* Handle of window - ignored */, - HDC32 hdc /* Handle of device context */ +INT WINAPI ReleaseDC( + HWND hwnd /* Handle of window - ignored */, + HDC hdc /* Handle of device context */ ) { DCE * dce = firstDCE; @@ -880,9 +880,9 @@ * * See "Undoc. Windows" for hints (DC, SetDCHook, SetHookFlags).. */ -BOOL16 WINAPI DCHook( HDC16 hDC, WORD code, DWORD data, LPARAM lParam ) +BOOL16 WINAPI DCHook16( HDC16 hDC, WORD code, DWORD data, LPARAM lParam ) { - HRGN32 hVisRgn; + HRGN hVisRgn; DCE *dce = firstDCE;; TRACE(dc,"hDC = %04x, %i\n", hDC, code); @@ -901,7 +901,7 @@ if( dce->DCXflags & DCX_DCEBUSY ) { - SetHookFlags(hDC, DCHF_VALIDATEVISRGN); + SetHookFlags16(hDC, DCHF_VALIDATEVISRGN); hVisRgn = DCE_GetVisRgn(dce->hwndCurrent, dce->DCXflags, 0, 0); TRACE(dc,"\tapplying saved clipRgn\n"); @@ -914,15 +914,15 @@ if( (!dce->hClipRgn && dce->DCXflags & DCX_INTERSECTRGN) || (dce->hClipRgn == 1 && dce->DCXflags & DCX_EXCLUDERGN) ) - SetRectRgn32(hVisRgn,0,0,0,0); + SetRectRgn(hVisRgn,0,0,0,0); else - CombineRgn32(hVisRgn, hVisRgn, dce->hClipRgn, + CombineRgn(hVisRgn, hVisRgn, dce->hClipRgn, (dce->DCXflags & DCX_EXCLUDERGN)? RGN_DIFF:RGN_AND); } dce->DCXflags &= ~DCX_DCEDIRTY; DCE_OffsetVisRgn( hDC, hVisRgn ); - SelectVisRgn(hDC, hVisRgn); - DeleteObject32( hVisRgn ); + SelectVisRgn16(hDC, hVisRgn); + DeleteObject( hVisRgn ); } else /* non-fatal but shouldn't happen */ WARN(dc, "DC is not in use!\n"); @@ -943,14 +943,14 @@ */ HWND16 WINAPI WindowFromDC16( HDC16 hDC ) { - return (HWND16)WindowFromDC32( hDC ); + return (HWND16)WindowFromDC( hDC ); } /********************************************************************** * WindowFromDC32 (USER32.581) */ -HWND32 WINAPI WindowFromDC32( HDC32 hDC ) +HWND WINAPI WindowFromDC( HDC hDC ) { DCE *dce = firstDCE; while (dce && (dce->hDC != hDC)) dce = dce->next; @@ -963,14 +963,14 @@ */ BOOL16 WINAPI LockWindowUpdate16( HWND16 hwnd ) { - return LockWindowUpdate32( hwnd ); + return LockWindowUpdate( hwnd ); } /*********************************************************************** * LockWindowUpdate32 (USER32.378) */ -BOOL32 WINAPI LockWindowUpdate32( HWND32 hwnd ) +BOOL WINAPI LockWindowUpdate( HWND hwnd ) { /* FIXME? DCX_LOCKWINDOWUPDATE is unimplemented */ return TRUE;
diff --git a/windows/defdlg.c b/windows/defdlg.c index 01fb79f..5ad889e 100644 --- a/windows/defdlg.c +++ b/windows/defdlg.c
@@ -17,29 +17,29 @@ * Set the focus to a control of the dialog, selecting the text if * the control is an edit dialog. */ -static void DEFDLG_SetFocus( HWND32 hwndDlg, HWND32 hwndCtrl ) +static void DEFDLG_SetFocus( HWND hwndDlg, HWND hwndCtrl ) { - HWND32 hwndPrev = GetFocus32(); + HWND hwndPrev = GetFocus(); - if (IsChild32( hwndDlg, hwndPrev )) + if (IsChild( hwndDlg, hwndPrev )) { if (SendMessage16( hwndPrev, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL) SendMessage16( hwndPrev, EM_SETSEL16, TRUE, MAKELONG( -1, 0 ) ); } if (SendMessage16( hwndCtrl, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL) SendMessage16( hwndCtrl, EM_SETSEL16, FALSE, MAKELONG( 0, -1 ) ); - SetFocus32( hwndCtrl ); + SetFocus( hwndCtrl ); } /*********************************************************************** * DEFDLG_SaveFocus */ -static BOOL32 DEFDLG_SaveFocus( HWND32 hwnd, DIALOGINFO *infoPtr ) +static BOOL DEFDLG_SaveFocus( HWND hwnd, DIALOGINFO *infoPtr ) { - HWND32 hwndFocus = GetFocus32(); + HWND hwndFocus = GetFocus(); - if (!hwndFocus || !IsChild32( hwnd, hwndFocus )) return FALSE; + if (!hwndFocus || !IsChild( hwnd, hwndFocus )) return FALSE; infoPtr->hwndFocus = hwndFocus; /* Remove default button */ return TRUE; @@ -49,10 +49,10 @@ /*********************************************************************** * DEFDLG_RestoreFocus */ -static BOOL32 DEFDLG_RestoreFocus( HWND32 hwnd, DIALOGINFO *infoPtr ) +static BOOL DEFDLG_RestoreFocus( HWND hwnd, DIALOGINFO *infoPtr ) { - if (!infoPtr->hwndFocus || IsIconic32(hwnd)) return FALSE; - if (!IsWindow32( infoPtr->hwndFocus )) return FALSE; + if (!infoPtr->hwndFocus || IsIconic(hwnd)) return FALSE; + if (!IsWindow( infoPtr->hwndFocus )) return FALSE; DEFDLG_SetFocus( hwnd, infoPtr->hwndFocus ); /* This used to set infoPtr->hwndFocus to NULL for no apparent reason, sometimes losing focus when receiving WM_SETFOCUS messages. */ @@ -65,14 +65,14 @@ * * Find the current default push-button. */ -static HWND32 DEFDLG_FindDefButton( HWND32 hwndDlg ) +static HWND DEFDLG_FindDefButton( HWND hwndDlg ) { - HWND32 hwndChild = GetWindow32( hwndDlg, GW_CHILD ); + HWND hwndChild = GetWindow( hwndDlg, GW_CHILD ); while (hwndChild) { if (SendMessage16( hwndChild, WM_GETDLGCODE, 0, 0 ) & DLGC_DEFPUSHBUTTON) break; - hwndChild = GetWindow32( hwndChild, GW_HWNDNEXT ); + hwndChild = GetWindow( hwndChild, GW_HWNDNEXT ); } return hwndChild; } @@ -83,8 +83,8 @@ * * Set the new default button to be hwndNew. */ -static BOOL32 DEFDLG_SetDefButton( HWND32 hwndDlg, DIALOGINFO *dlgInfo, - HWND32 hwndNew ) +static BOOL DEFDLG_SetDefButton( HWND hwndDlg, DIALOGINFO *dlgInfo, + HWND hwndNew ) { if (hwndNew && !(SendMessage16(hwndNew, WM_GETDLGCODE, 0, 0 ) & DLGC_UNDEFPUSHBUTTON)) @@ -92,14 +92,14 @@ if (dlgInfo->idResult) /* There's already a default pushbutton */ { - HWND32 hwndOld = GetDlgItem32( hwndDlg, dlgInfo->idResult ); - if (SendMessage32A( hwndOld, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON) - SendMessage32A( hwndOld, BM_SETSTYLE32, BS_PUSHBUTTON, TRUE ); + HWND hwndOld = GetDlgItem( hwndDlg, dlgInfo->idResult ); + if (SendMessageA( hwndOld, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON) + SendMessageA( hwndOld, BM_SETSTYLE, BS_PUSHBUTTON, TRUE ); } if (hwndNew) { - SendMessage32A( hwndNew, BM_SETSTYLE32, BS_DEFPUSHBUTTON, TRUE ); - dlgInfo->idResult = GetDlgCtrlID32( hwndNew ); + SendMessageA( hwndNew, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE ); + dlgInfo->idResult = GetDlgCtrlID( hwndNew ); } else dlgInfo->idResult = 0; return TRUE; @@ -112,13 +112,13 @@ * Implementation of DefDlgProc(). Only handle messages that need special * handling for dialogs. */ -static LRESULT DEFDLG_Proc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, +static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, DIALOGINFO *dlgInfo ) { switch(msg) { case WM_ERASEBKGND: - FillWindow( hwnd, hwnd, (HDC16)wParam, (HBRUSH16)CTLCOLOR_DLG ); + FillWindow16( hwnd, hwnd, (HDC16)wParam, (HBRUSH16)CTLCOLOR_DLG ); return 1; case WM_NCDESTROY: @@ -134,14 +134,14 @@ /* Delete font */ if (dlgInfo->hUserFont) { - DeleteObject32( dlgInfo->hUserFont ); + DeleteObject( dlgInfo->hUserFont ); dlgInfo->hUserFont = 0; } /* Delete menu */ if (dlgInfo->hMenu) { - DestroyMenu32( dlgInfo->hMenu ); + DestroyMenu( dlgInfo->hMenu ); dlgInfo->hMenu = 0; } @@ -151,11 +151,11 @@ dlgInfo->flags |= DF_END; /* just in case */ /* Window clean-up */ - return DefWindowProc32A( hwnd, msg, wParam, lParam ); + return DefWindowProcA( hwnd, msg, wParam, lParam ); case WM_SHOWWINDOW: if (!wParam) DEFDLG_SaveFocus( hwnd, dlgInfo ); - return DefWindowProc32A( hwnd, msg, wParam, lParam ); + return DefWindowProcA( hwnd, msg, wParam, lParam ); case WM_ACTIVATE: if (wParam) DEFDLG_RestoreFocus( hwnd, dlgInfo ); @@ -169,25 +169,25 @@ case DM_SETDEFID: if (dlgInfo->flags & DF_END) return 1; DEFDLG_SetDefButton( hwnd, dlgInfo, - wParam ? GetDlgItem32( hwnd, wParam ) : 0 ); + wParam ? GetDlgItem( hwnd, wParam ) : 0 ); return 1; case DM_GETDEFID: { - HWND32 hwndDefId; + HWND hwndDefId; if (dlgInfo->flags & DF_END) return 0; if (dlgInfo->idResult) return MAKELONG( dlgInfo->idResult, DC_HASDEFID ); if ((hwndDefId = DEFDLG_FindDefButton( hwnd ))) - return MAKELONG( GetDlgCtrlID32( hwndDefId ), DC_HASDEFID); + return MAKELONG( GetDlgCtrlID( hwndDefId ), DC_HASDEFID); } return 0; case WM_NEXTDLGCTL: { - HWND32 hwndDest = (HWND32)wParam; + HWND hwndDest = (HWND)wParam; if (!lParam) - hwndDest = GetNextDlgTabItem32(hwnd, GetFocus32(), wParam); + hwndDest = GetNextDlgTabItem(hwnd, GetFocus(), wParam); if (hwndDest) DEFDLG_SetFocus( hwnd, hwndDest ); DEFDLG_SetDefButton( hwnd, dlgInfo, hwndDest ); } @@ -197,7 +197,7 @@ case WM_LBUTTONDOWN: case WM_NCLBUTTONDOWN: { - HWND32 hwndFocus = GetFocus32(); + HWND hwndFocus = GetFocus(); if (hwndFocus) { WND *wnd = WIN_FindWndPtr( hwndFocus ); @@ -206,25 +206,25 @@ { /* always make combo box hide its listbox control */ - if( WIDGETS_IsControl32( wnd, BIC32_COMBO ) ) - SendMessage32A( hwndFocus, CB_SHOWDROPDOWN32, + if( WIDGETS_IsControl( wnd, BIC32_COMBO ) ) + SendMessageA( hwndFocus, CB_SHOWDROPDOWN, FALSE, 0 ); - else if( WIDGETS_IsControl32( wnd, BIC32_EDIT ) && - WIDGETS_IsControl32( wnd->parent, + else if( WIDGETS_IsControl( wnd, BIC32_EDIT ) && + WIDGETS_IsControl( wnd->parent, BIC32_COMBO )) - SendMessage32A( wnd->parent->hwndSelf, - CB_SHOWDROPDOWN32, FALSE, 0 ); + SendMessageA( wnd->parent->hwndSelf, + CB_SHOWDROPDOWN, FALSE, 0 ); } } } - return DefWindowProc32A( hwnd, msg, wParam, lParam ); + return DefWindowProcA( hwnd, msg, wParam, lParam ); case WM_GETFONT: return dlgInfo->hUserFont; case WM_CLOSE: - PostMessage32A( hwnd, WM_COMMAND, IDCANCEL, - (LPARAM)GetDlgItem32( hwnd, IDCANCEL ) ); + PostMessageA( hwnd, WM_COMMAND, IDCANCEL, + (LPARAM)GetDlgItem( hwnd, IDCANCEL ) ); return 0; } return 0; @@ -233,7 +233,7 @@ /*********************************************************************** * DEFDLG_Epilog */ -static LRESULT DEFDLG_Epilog(DIALOGINFO* dlgInfo, UINT32 msg, BOOL32 fResult) +static LRESULT DEFDLG_Epilog(DIALOGINFO* dlgInfo, UINT msg, BOOL fResult) { /* see SDK 3.1 */ @@ -253,7 +253,7 @@ LPARAM lParam ) { DIALOGINFO * dlgInfo; - BOOL32 result = FALSE; + BOOL result = FALSE; WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return 0; @@ -268,7 +268,7 @@ result = LOWORD(result); } - if (!result && IsWindow32(hwnd)) + if (!result && IsWindow(hwnd)) { /* callback didn't process this message */ @@ -287,8 +287,8 @@ case WM_ENTERMENULOOP: case WM_LBUTTONDOWN: case WM_NCLBUTTONDOWN: - return DEFDLG_Proc( (HWND32)hwnd, msg, - (WPARAM32)wParam, lParam, dlgInfo ); + return DEFDLG_Proc( (HWND)hwnd, msg, + (WPARAM)wParam, lParam, dlgInfo ); case WM_INITDIALOG: case WM_VKEYTOITEM: case WM_COMPAREITEM: @@ -306,11 +306,11 @@ /*********************************************************************** * DefDlgProc32A (USER32.120) */ -LRESULT WINAPI DefDlgProc32A( HWND32 hwnd, UINT32 msg, - WPARAM32 wParam, LPARAM lParam ) +LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, + WPARAM wParam, LPARAM lParam ) { DIALOGINFO * dlgInfo; - BOOL32 result = FALSE; + BOOL result = FALSE; WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return 0; @@ -318,14 +318,14 @@ dlgInfo->msgResult = 0; if (dlgInfo->dlgProc) { /* Call dialog procedure */ - result = CallWindowProc32A( (WNDPROC32)dlgInfo->dlgProc, + result = CallWindowProcA( (WNDPROC)dlgInfo->dlgProc, hwnd, msg, wParam, lParam ); /* 16 bit dlg procs only return BOOL16 */ if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 ) result = LOWORD(result); } - if (!result && IsWindow32(hwnd)) + if (!result && IsWindow(hwnd)) { /* callback didn't process this message */ @@ -344,8 +344,8 @@ case WM_ENTERMENULOOP: case WM_LBUTTONDOWN: case WM_NCLBUTTONDOWN: - return DEFDLG_Proc( (HWND32)hwnd, msg, - (WPARAM32)wParam, lParam, dlgInfo ); + return DEFDLG_Proc( (HWND)hwnd, msg, + (WPARAM)wParam, lParam, dlgInfo ); case WM_INITDIALOG: case WM_VKEYTOITEM: case WM_COMPAREITEM: @@ -353,7 +353,7 @@ break; default: - return DefWindowProc32A( hwnd, msg, wParam, lParam ); + return DefWindowProcA( hwnd, msg, wParam, lParam ); } } return DEFDLG_Epilog(dlgInfo, msg, result); @@ -363,11 +363,11 @@ /*********************************************************************** * DefDlgProc32W (USER32.121) */ -LRESULT WINAPI DefDlgProc32W( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, +LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { DIALOGINFO * dlgInfo; - BOOL32 result = FALSE; + BOOL result = FALSE; WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return 0; @@ -375,14 +375,14 @@ dlgInfo->msgResult = 0; if (dlgInfo->dlgProc) { /* Call dialog procedure */ - result = CallWindowProc32W( (WNDPROC32)dlgInfo->dlgProc, + result = CallWindowProcW( (WNDPROC)dlgInfo->dlgProc, hwnd, msg, wParam, lParam ); /* 16 bit dlg procs only return BOOL16 */ if( WINPROC_GetProcType( dlgInfo->dlgProc ) == WIN_PROC_16 ) result = LOWORD(result); } - if (!result && IsWindow32(hwnd)) + if (!result && IsWindow(hwnd)) { /* callback didn't process this message */ @@ -401,8 +401,8 @@ case WM_ENTERMENULOOP: case WM_LBUTTONDOWN: case WM_NCLBUTTONDOWN: - return DEFDLG_Proc( (HWND32)hwnd, msg, - (WPARAM32)wParam, lParam, dlgInfo ); + return DEFDLG_Proc( (HWND)hwnd, msg, + (WPARAM)wParam, lParam, dlgInfo ); case WM_INITDIALOG: case WM_VKEYTOITEM: case WM_COMPAREITEM: @@ -410,7 +410,7 @@ break; default: - return DefWindowProc32W( hwnd, msg, wParam, lParam ); + return DefWindowProcW( hwnd, msg, wParam, lParam ); } } return DEFDLG_Epilog(dlgInfo, msg, result);
diff --git a/windows/defwnd.c b/windows/defwnd.c index d202250..265a559 100644 --- a/windows/defwnd.c +++ b/windows/defwnd.c
@@ -33,7 +33,7 @@ * * Handle the WM_WINDOWPOSCHANGED message. */ -static void DEFWND_HandleWindowPosChanged( WND *wndPtr, UINT32 flags ) +static void DEFWND_HandleWindowPosChanged( WND *wndPtr, UINT flags ) { WPARAM16 wp = SIZE_RESTORED; @@ -70,39 +70,39 @@ * * Default colors for control painting. */ -HBRUSH32 DEFWND_ControlColor( HDC32 hDC, UINT16 ctlType ) +HBRUSH DEFWND_ControlColor( HDC hDC, UINT16 ctlType ) { if( ctlType == CTLCOLOR_SCROLLBAR) { - HBRUSH32 hb = GetSysColorBrush32(COLOR_SCROLLBAR); - SetBkColor32( hDC, RGB(255, 255, 255) ); - SetTextColor32( hDC, RGB(0, 0, 0) ); - UnrealizeObject32( hb ); + HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR); + SetBkColor( hDC, RGB(255, 255, 255) ); + SetTextColor( hDC, RGB(0, 0, 0) ); + UnrealizeObject( hb ); return hb; } - SetTextColor32( hDC, GetSysColor32(COLOR_WINDOWTEXT)); + SetTextColor( hDC, GetSysColor(COLOR_WINDOWTEXT)); if (TWEAK_WineLook > WIN31_LOOK) { if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX)) - SetBkColor32( hDC, GetSysColor32(COLOR_WINDOW) ); + SetBkColor( hDC, GetSysColor(COLOR_WINDOW) ); else { - SetBkColor32( hDC, GetSysColor32(COLOR_3DFACE) ); - return GetSysColorBrush32(COLOR_3DFACE); + SetBkColor( hDC, GetSysColor(COLOR_3DFACE) ); + return GetSysColorBrush(COLOR_3DFACE); } } else - SetBkColor32( hDC, GetSysColor32(COLOR_WINDOW) ); - return GetSysColorBrush32(COLOR_WINDOW); + SetBkColor( hDC, GetSysColor(COLOR_WINDOW) ); + return GetSysColorBrush(COLOR_WINDOW); } /*********************************************************************** * DEFWND_SetRedraw */ -static void DEFWND_SetRedraw( WND* wndPtr, WPARAM32 wParam ) +static void DEFWND_SetRedraw( WND* wndPtr, WPARAM wParam ) { - BOOL32 bVisible = wndPtr->dwStyle & WS_VISIBLE; + BOOL bVisible = wndPtr->dwStyle & WS_VISIBLE; TRACE(win,"%04x %i\n", wndPtr->hwndSelf, (wParam!=0) ); @@ -130,13 +130,13 @@ * * Default window procedure for messages that are the same in Win16 and Win32. */ -static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam, +static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam, LPARAM lParam ) { switch(msg) { case WM_NCPAINT: - return NC_HandleNCPaint( wndPtr->hwndSelf, (HRGN32)wParam ); + return NC_HandleNCPaint( wndPtr->hwndSelf, (HRGN)wParam ); case WM_NCHITTEST: return NC_HandleNCHitTest( wndPtr->hwndSelf, MAKEPOINT16(lParam) ); @@ -153,14 +153,14 @@ if ((wndPtr->flags & WIN_ISWIN32) || (TWEAK_WineLook > WIN31_LOOK)) { ClientToScreen16(wndPtr->hwndSelf, (LPPOINT16)&lParam); - SendMessage32A( wndPtr->hwndSelf, WM_CONTEXTMENU, + SendMessageA( wndPtr->hwndSelf, WM_CONTEXTMENU, wndPtr->hwndSelf, lParam); } break; case WM_CONTEXTMENU: if( wndPtr->dwStyle & WS_CHILD ) - SendMessage32A( wndPtr->parent->hwndSelf, msg, wParam, lParam ); + SendMessageA( wndPtr->parent->hwndSelf, msg, wParam, lParam ); else if (wndPtr->hSysMenu) { /* @@ -198,7 +198,7 @@ SYSMETRICS_CYICON)/2; TRACE(win,"Painting class icon: vis rect=(%i,%i - %i,%i)\n", ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom ); - DrawIcon32( hdc, x, y, wndPtr->class->hIcon ); + DrawIcon( hdc, x, y, wndPtr->class->hIcon ); } EndPaint16( wndPtr->hwndSelf, &ps ); } @@ -210,7 +210,7 @@ return 0; case WM_CLOSE: - DestroyWindow32( wndPtr->hwndSelf ); + DestroyWindow( wndPtr->hwndSelf ); return 0; case WM_MOUSEACTIVATE: @@ -230,10 +230,10 @@ if (LOWORD(wParam) != WA_INACTIVE) { /* I don't know who put this SetWindowPos here, it does not * seem very logical to have it here... (FIXME?) */ - SetWindowPos32(wndPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0, + SetWindowPos(wndPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); if (!(wndPtr->dwStyle & WS_MINIMIZE)) - SetFocus32(wndPtr->hwndSelf); + SetFocus(wndPtr->hwndSelf); } break; @@ -244,13 +244,13 @@ if (wndPtr->class->hbrBackground <= (HBRUSH16)(COLOR_MAX+1)) { - HBRUSH32 hbrush = CreateSolidBrush32( - GetSysColor32(((DWORD)wndPtr->class->hbrBackground)-1)); - FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf, + HBRUSH hbrush = CreateSolidBrush( + GetSysColor(((DWORD)wndPtr->class->hbrBackground)-1)); + FillWindow16( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf, (HDC16)wParam, hbrush); - DeleteObject32( hbrush ); + DeleteObject( hbrush ); } - else FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf, + else FillWindow16( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf, (HDC16)wParam, wndPtr->class->hbrBackground ); return 1; } @@ -265,10 +265,10 @@ case WM_CTLCOLORDLG: case WM_CTLCOLORSTATIC: case WM_CTLCOLORSCROLLBAR: - return (LRESULT)DEFWND_ControlColor( (HDC32)wParam, msg - WM_CTLCOLORMSGBOX ); + return (LRESULT)DEFWND_ControlColor( (HDC)wParam, msg - WM_CTLCOLORMSGBOX ); case WM_CTLCOLOR: - return (LRESULT)DEFWND_ControlColor( (HDC32)wParam, HIWORD(lParam) ); + return (LRESULT)DEFWND_ControlColor( (HDC)wParam, HIWORD(lParam) ); case WM_GETTEXTLENGTH: if (wndPtr->text) return (LRESULT)strlen(wndPtr->text); @@ -302,7 +302,7 @@ if( wParam == VK_F4 ) /* try to close the window */ { - HWND32 hWnd = WIN_GetTopParent( wndPtr->hwndSelf ); + HWND hWnd = WIN_GetTopParent( wndPtr->hwndSelf ); wndPtr = WIN_FindWndPtr( hWnd ); if( wndPtr && !(wndPtr->class->style & CS_NOCLOSE) ) PostMessage16( hWnd, WM_SYSCOMMAND, SC_CLOSE, 0 ); @@ -311,7 +311,7 @@ else if( wParam == VK_F10 ) iF10Key = 1; else - if( wParam == VK_ESCAPE && (GetKeyState32(VK_SHIFT) & 0x8000)) + if( wParam == VK_ESCAPE && (GetKeyState(VK_SHIFT) & 0x8000)) SendMessage16( wndPtr->hwndSelf, WM_SYSCOMMAND, (WPARAM16)SC_KEYMENU, (LPARAM)VK_SPACE); break; @@ -344,7 +344,7 @@ (WPARAM16)SC_KEYMENU, (LPARAM)(DWORD)wParam ); } else /* check for Ctrl-Esc */ - if (wParam != VK_ESCAPE) MessageBeep32(0); + if (wParam != VK_ESCAPE) MessageBeep(0); break; case WM_SHOWWINDOW: @@ -352,12 +352,12 @@ if (!(wndPtr->dwStyle & WS_POPUP) || !wndPtr->owner) return 0; if ((wndPtr->dwStyle & WS_VISIBLE) && wParam) return 0; else if (!(wndPtr->dwStyle & WS_VISIBLE) && !wParam) return 0; - ShowWindow32( wndPtr->hwndSelf, wParam ? SW_SHOWNOACTIVATE : SW_HIDE ); + ShowWindow( wndPtr->hwndSelf, wParam ? SW_SHOWNOACTIVATE : SW_HIDE ); break; case WM_CANCELMODE: if (wndPtr->parent == WIN_GetDesktop()) EndMenu(); - if (GetCapture32() == wndPtr->hwndSelf) ReleaseCapture(); + if (GetCapture() == wndPtr->hwndSelf) ReleaseCapture(); break; case WM_VKEYTOITEM: @@ -421,7 +421,7 @@ case WM_NCCALCSIZE: { - RECT32 rect32; + RECT rect32; CONV_RECT16TO32( (RECT16 *)PTR_SEG_TO_LIN(lParam), &rect32 ); result = NC_HandleNCCalcSize( wndPtr, &rect32 ); CONV_RECT32TO16( &rect32, (RECT16 *)PTR_SEG_TO_LIN(lParam) ); @@ -443,14 +443,14 @@ case WM_GETTEXT: if (wParam && wndPtr->text) { - lstrcpyn32A( (LPSTR)PTR_SEG_TO_LIN(lParam), wndPtr->text, wParam ); + lstrcpynA( (LPSTR)PTR_SEG_TO_LIN(lParam), wndPtr->text, wParam ); result = (LRESULT)strlen( (LPSTR)PTR_SEG_TO_LIN(lParam) ); } break; case WM_SETTEXT: DEFWND_SetText( wndPtr, (LPSTR)PTR_SEG_TO_LIN(lParam) ); - if( wndPtr->dwStyle & WS_CAPTION ) NC_HandleNCPaint( hwnd , (HRGN32)1 ); + if( wndPtr->dwStyle & WS_CAPTION ) NC_HandleNCPaint( hwnd , (HRGN)1 ); break; default: @@ -467,37 +467,37 @@ * DefWindowProc32A [USER32.126] * */ -LRESULT WINAPI DefWindowProc32A( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, +LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); LRESULT result = 0; if (!wndPtr) return 0; - SPY_EnterMessage( SPY_DEFWNDPROC32, hwnd, msg, wParam, lParam ); + SPY_EnterMessage( SPY_DEFWNDPROC, hwnd, msg, wParam, lParam ); switch(msg) { case WM_NCCREATE: { - CREATESTRUCT32A *cs = (CREATESTRUCT32A *)lParam; + CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam; if (cs->lpszName) DEFWND_SetText( wndPtr, cs->lpszName ); result = 1; } break; case WM_NCCALCSIZE: - result = NC_HandleNCCalcSize( wndPtr, (RECT32 *)lParam ); + result = NC_HandleNCCalcSize( wndPtr, (RECT *)lParam ); break; case WM_WINDOWPOSCHANGING: - result = WINPOS_HandleWindowPosChanging32( wndPtr, - (WINDOWPOS32 *)lParam ); + result = WINPOS_HandleWindowPosChanging( wndPtr, + (WINDOWPOS *)lParam ); break; case WM_WINDOWPOSCHANGED: { - WINDOWPOS32 * winPos = (WINDOWPOS32 *)lParam; + WINDOWPOS * winPos = (WINDOWPOS *)lParam; DEFWND_HandleWindowPosChanged( wndPtr, winPos->flags ); } break; @@ -505,14 +505,14 @@ case WM_GETTEXT: if (wParam && wndPtr->text) { - lstrcpyn32A( (LPSTR)lParam, wndPtr->text, wParam ); + lstrcpynA( (LPSTR)lParam, wndPtr->text, wParam ); result = (LRESULT)strlen( (LPSTR)lParam ); } break; case WM_SETTEXT: DEFWND_SetText( wndPtr, (LPSTR)lParam ); - NC_HandleNCPaint( hwnd , (HRGN32)1 ); /* Repaint caption */ + NC_HandleNCPaint( hwnd , (HRGN)1 ); /* Repaint caption */ break; default: @@ -520,7 +520,7 @@ break; } - SPY_ExitMessage( SPY_RESULT_DEFWND32, hwnd, msg, result ); + SPY_ExitMessage( SPY_RESULT_DEFWND, hwnd, msg, result ); return result; } @@ -534,10 +534,10 @@ * RETURNS * Return value is dependent upon the message. */ -LRESULT WINAPI DefWindowProc32W( - HWND32 hwnd, /* [in] window procedure recieving message */ - UINT32 msg, /* [in] message identifier */ - WPARAM32 wParam, /* [in] first message parameter */ +LRESULT WINAPI DefWindowProcW( + HWND hwnd, /* [in] window procedure recieving message */ + UINT msg, /* [in] message identifier */ + WPARAM wParam, /* [in] first message parameter */ LPARAM lParam ) /* [in] second message parameter */ { LRESULT result; @@ -546,7 +546,7 @@ { case WM_NCCREATE: { - CREATESTRUCT32W *cs = (CREATESTRUCT32W *)lParam; + CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam; if (cs->lpszName) { WND *wndPtr = WIN_FindWndPtr( hwnd ); @@ -561,7 +561,7 @@ case WM_GETTEXT: { LPSTR str = HeapAlloc( GetProcessHeap(), 0, wParam ); - result = DefWindowProc32A( hwnd, msg, wParam, (LPARAM)str ); + result = DefWindowProcA( hwnd, msg, wParam, (LPARAM)str ); lstrcpynAtoW( (LPWSTR)lParam, str, wParam ); HeapFree( GetProcessHeap(), 0, str ); } @@ -570,13 +570,13 @@ case WM_SETTEXT: { LPSTR str = HEAP_strdupWtoA( GetProcessHeap(), 0, (LPWSTR)lParam ); - result = DefWindowProc32A( hwnd, msg, wParam, (LPARAM)str ); + result = DefWindowProcA( hwnd, msg, wParam, (LPARAM)str ); HeapFree( GetProcessHeap(), 0, str ); } break; default: - result = DefWindowProc32A( hwnd, msg, wParam, lParam ); + result = DefWindowProcA( hwnd, msg, wParam, lParam ); break; } return result;
diff --git a/windows/dialog.c b/windows/dialog.c index 8752738..bec3965 100644 --- a/windows/dialog.c +++ b/windows/dialog.c
@@ -34,7 +34,7 @@ INT16 y; INT16 cx; INT16 cy; - UINT32 id; + UINT id; LPCSTR className; LPCSTR windowName; LPVOID data; @@ -56,9 +56,9 @@ LPCSTR caption; WORD pointSize; WORD weight; - BOOL32 italic; + BOOL italic; LPCSTR faceName; - BOOL32 dialogEx; + BOOL dialogEx; } DLG_TEMPLATE; /* Dialog base units */ @@ -70,7 +70,7 @@ * * Initialisation of the dialog manager. */ -BOOL32 DIALOG_Init(void) +BOOL DIALOG_Init(void) { TEXTMETRIC16 tm; HDC16 hdc; @@ -79,7 +79,7 @@ if (!(hdc = CreateDC16( "DISPLAY", NULL, NULL, NULL ))) return FALSE; GetTextMetrics16( hdc, &tm ); - DeleteDC32( hdc ); + DeleteDC( hdc ); xBaseUnit = tm.tmAveCharWidth; yBaseUnit = tm.tmHeight; @@ -138,7 +138,7 @@ if (int_id) { /* Integer id, not documented (?). Only works for SS_ICON controls */ - info->windowName = (LPCSTR)(UINT32)GET_WORD(p+1); + info->windowName = (LPCSTR)(UINT)GET_WORD(p+1); p += 3; } else @@ -172,7 +172,7 @@ * fill the header structure and return a pointer to the next control. */ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info, - BOOL32 dialogEx ) + BOOL dialogEx ) { if (dialogEx) { @@ -227,18 +227,18 @@ else { info->className = (LPCSTR)p; - p += lstrlen32W( (LPCWSTR)p ) + 1; + p += lstrlenW( (LPCWSTR)p ) + 1; } if (GET_WORD(p) == 0xffff) /* Is it an integer id? */ { - info->windowName = (LPCSTR)(UINT32)GET_WORD(p + 1); + info->windowName = (LPCSTR)(UINT)GET_WORD(p + 1); p += 2; } else { info->windowName = (LPCSTR)p; - p += lstrlen32W( (LPCWSTR)p ) + 1; + p += lstrlenW( (LPCWSTR)p ) + 1; } TRACE(dialog," %s %s %d, %d, %d, %d, %d, %08lx, %08lx, %08lx\n", @@ -274,14 +274,14 @@ * * Create the control windows for a dialog. */ -static BOOL32 DIALOG_CreateControls( WND *pWnd, LPCSTR template, +static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template, const DLG_TEMPLATE *dlgTemplate, - HINSTANCE32 hInst, BOOL32 win32 ) + HINSTANCE hInst, BOOL win32 ) { DIALOGINFO *dlgInfo = (DIALOGINFO *)pWnd->wExtra; DLG_CONTROL_INFO info; - HWND32 hwndCtrl, hwndDefButton = 0; - INT32 items = dlgTemplate->nbItems; + HWND hwndCtrl, hwndDefButton = 0; + INT items = dlgTemplate->nbItems; TRACE(dialog, " BEGIN\n" ); while (items--) @@ -301,7 +301,7 @@ ERR(dialog, "Insufficient memory to create heap for edit control\n" ); continue; } - LocalInit(dlgInfo->hDialogHeap, 0, 0xffff); + LocalInit16(dlgInfo->hDialogHeap, 0, 0xffff); } instance = dlgInfo->hDialogHeap; } @@ -321,7 +321,7 @@ { template = (LPCSTR)DIALOG_GetControl32( (WORD *)template, &info, dlgTemplate->dialogEx ); - hwndCtrl = CreateWindowEx32W( info.exStyle | WS_EX_NOPARENTNOTIFY, + hwndCtrl = CreateWindowExW( info.exStyle | WS_EX_NOPARENTNOTIFY, (LPCWSTR)info.className, (LPCWSTR)info.windowName, info.style | WS_CHILD, @@ -329,23 +329,23 @@ info.y * dlgInfo->yBaseUnit / 8, info.cx * dlgInfo->xBaseUnit / 4, info.cy * dlgInfo->yBaseUnit / 8, - pWnd->hwndSelf, (HMENU32)info.id, + pWnd->hwndSelf, (HMENU)info.id, hInst, info.data ); } if (!hwndCtrl) return FALSE; /* Send initialisation messages to the control */ - if (dlgInfo->hUserFont) SendMessage32A( hwndCtrl, WM_SETFONT, - (WPARAM32)dlgInfo->hUserFont, 0 ); - if (SendMessage32A(hwndCtrl, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON) + if (dlgInfo->hUserFont) SendMessageA( hwndCtrl, WM_SETFONT, + (WPARAM)dlgInfo->hUserFont, 0 ); + if (SendMessageA(hwndCtrl, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON) { /* If there's already a default push-button, set it back */ /* to normal and use this one instead. */ if (hwndDefButton) - SendMessage32A( hwndDefButton, BM_SETSTYLE32, + SendMessageA( hwndDefButton, BM_SETSTYLE, BS_PUSHBUTTON,FALSE ); hwndDefButton = hwndCtrl; - dlgInfo->idResult = GetWindowWord32( hwndCtrl, GWW_ID ); + dlgInfo->idResult = GetWindowWord( hwndCtrl, GWW_ID ); } } TRACE(dialog, " END\n" ); @@ -381,7 +381,7 @@ p++; break; case 0xff: - result->menuName = (LPCSTR)(UINT32)GET_WORD( p + 1 ); + result->menuName = (LPCSTR)(UINT)GET_WORD( p + 1 ); p += 3; TRACE(dialog, " MENU %04x\n", LOWORD(result->menuName) ); break; @@ -467,14 +467,14 @@ p++; break; case 0xffff: - result->menuName = (LPCSTR)(UINT32)GET_WORD( p + 1 ); + result->menuName = (LPCSTR)(UINT)GET_WORD( p + 1 ); p += 2; TRACE(dialog, " MENU %04x\n", LOWORD(result->menuName) ); break; default: result->menuName = (LPCSTR)p; TRACE(dialog, " MENU %s\n", debugstr_w( (LPCWSTR)p )); - p += lstrlen32W( (LPCWSTR)p ) + 1; + p += lstrlenW( (LPCWSTR)p ) + 1; break; } @@ -487,21 +487,21 @@ p++; break; case 0xffff: - result->className = (LPCSTR)(UINT32)GET_WORD( p + 1 ); + result->className = (LPCSTR)(UINT)GET_WORD( p + 1 ); p += 2; TRACE(dialog, " CLASS %04x\n", LOWORD(result->className) ); break; default: result->className = (LPCSTR)p; TRACE(dialog, " CLASS %s\n", debugstr_w( (LPCWSTR)p )); - p += lstrlen32W( (LPCWSTR)p ) + 1; + p += lstrlenW( (LPCWSTR)p ) + 1; break; } /* Get the window caption */ result->caption = (LPCSTR)p; - p += lstrlen32W( (LPCWSTR)p ) + 1; + p += lstrlenW( (LPCWSTR)p ) + 1; TRACE(dialog, " CAPTION %s\n", debugstr_w( (LPCWSTR)result->caption ) ); /* Get the font name */ @@ -521,7 +521,7 @@ result->italic = FALSE; } result->faceName = (LPCSTR)p; - p += lstrlen32W( (LPCWSTR)p ) + 1; + p += lstrlenW( (LPCWSTR)p ) + 1; TRACE(dialog, " FONT %d, %s, %d, %s\n", result->pointSize, debugstr_w( (LPCWSTR)result->faceName ), result->weight, result->italic ? "TRUE" : "FALSE" ); @@ -535,15 +535,15 @@ /*********************************************************************** * DIALOG_CreateIndirect */ -HWND32 DIALOG_CreateIndirect( HINSTANCE32 hInst, LPCSTR dlgTemplate, - BOOL32 win32Template, HWND32 owner, +HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate, + BOOL win32Template, HWND owner, DLGPROC16 dlgProc, LPARAM param, WINDOWPROCTYPE procType ) { HMENU16 hMenu = 0; HFONT16 hFont = 0; - HWND32 hwnd; - RECT32 rect; + HWND hwnd; + RECT rect; WND * wndPtr; DLG_TEMPLATE template; DIALOGINFO * dlgInfo; @@ -568,7 +568,7 @@ hMenu = LoadMenu16( hInst, SEGPTR_GET(str) ); SEGPTR_FREE( str ); } - else hMenu = LoadMenu32W( hInst, (LPCWSTR)template.menuName ); + else hMenu = LoadMenuW( hInst, (LPCWSTR)template.menuName ); } /* Create custom font if needed */ @@ -579,7 +579,7 @@ /* (see CreateFont() documentation in the Windows SDK). */ if (win32Template) - hFont = CreateFont32W( -template.pointSize, 0, 0, 0, + hFont = CreateFontW( -template.pointSize, 0, 0, 0, template.weight, template.italic, FALSE, FALSE, DEFAULT_CHARSET, 0, 0, PROOF_QUALITY, FF_DONTCARE, (LPCWSTR)template.faceName ); @@ -593,11 +593,11 @@ TEXTMETRIC16 tm; HFONT16 oldFont; - HDC32 hdc = GetDC32(0); - oldFont = SelectObject32( hdc, hFont ); + HDC hdc = GetDC(0); + oldFont = SelectObject( hdc, hFont ); GetTextMetrics16( hdc, &tm ); - SelectObject32( hdc, oldFont ); - ReleaseDC32( 0, hdc ); + SelectObject( hdc, oldFont ); + ReleaseDC( 0, hdc ); xUnit = tm.tmAveCharWidth; yUnit = tm.tmHeight; if (!(tm.tmPitchAndFamily & TMPF_FIXED_PITCH)) @@ -612,7 +612,7 @@ rect.bottom = template.cy * yUnit / 8; if (template.style & DS_MODALFRAME) template.exStyle |= WS_EX_DLGMODALFRAME; - AdjustWindowRectEx32( &rect, template.style, + AdjustWindowRectEx( &rect, template.style, hMenu ? TRUE : FALSE , template.exStyle ); rect.right -= rect.left; rect.bottom -= rect.top; @@ -620,7 +620,7 @@ if ((INT16)template.x == CW_USEDEFAULT16) { rect.left = rect.top = (procType == WIN_PROC_16) ? CW_USEDEFAULT16 - : CW_USEDEFAULT32; + : CW_USEDEFAULT; } else { @@ -639,7 +639,7 @@ INT16 dX, dY; if( !(template.style & DS_ABSALIGN) ) - ClientToScreen32( owner, (POINT32 *)&rect ); + ClientToScreen( owner, (POINT *)&rect ); /* try to fit it into the desktop */ @@ -658,7 +658,7 @@ rect.left, rect.top, rect.right, rect.bottom, owner, hMenu, hInst, NULL ); else - hwnd = CreateWindowEx32W(template.exStyle, (LPCWSTR)template.className, + hwnd = CreateWindowExW(template.exStyle, (LPCWSTR)template.className, (LPCWSTR)template.caption, template.style & ~WS_VISIBLE, rect.left, rect.top, rect.right, rect.bottom, @@ -666,8 +666,8 @@ if (!hwnd) { - if (hFont) DeleteObject32( hFont ); - if (hMenu) DestroyMenu32( hMenu ); + if (hFont) DeleteObject( hFont ); + if (hMenu) DestroyMenu( hMenu ); return 0; } wndPtr = WIN_FindWndPtr( hwnd ); @@ -688,7 +688,7 @@ dlgInfo->hDialogHeap = 0; if (dlgInfo->hUserFont) - SendMessage32A( hwnd, WM_SETFONT, (WPARAM32)dlgInfo->hUserFont, 0 ); + SendMessageA( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 ); /* Create controls */ @@ -697,20 +697,20 @@ { /* Send initialisation messages and set focus */ - dlgInfo->hwndFocus = GetNextDlgTabItem32( hwnd, 0, FALSE ); + dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE ); - if (SendMessage32A( hwnd, WM_INITDIALOG, (WPARAM32)dlgInfo->hwndFocus, param )) - SetFocus32( dlgInfo->hwndFocus ); + if (SendMessageA( hwnd, WM_INITDIALOG, (WPARAM)dlgInfo->hwndFocus, param )) + SetFocus( dlgInfo->hwndFocus ); if (template.style & WS_VISIBLE && !(wndPtr->dwStyle & WS_VISIBLE)) { - ShowWindow32( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */ - UpdateWindow32( hwnd ); + ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */ + UpdateWindow( hwnd ); } return hwnd; } - if( IsWindow32(hwnd) ) DestroyWindow32( hwnd ); + if( IsWindow(hwnd) ) DestroyWindow( hwnd ); return 0; } @@ -752,32 +752,32 @@ /*********************************************************************** * CreateDialogParam32A (USER32.73) */ -HWND32 WINAPI CreateDialogParam32A( HINSTANCE32 hInst, LPCSTR name, - HWND32 owner, DLGPROC32 dlgProc, +HWND WINAPI CreateDialogParamA( HINSTANCE hInst, LPCSTR name, + HWND owner, DLGPROC dlgProc, LPARAM param ) { if (HIWORD(name)) { LPWSTR str = HEAP_strdupAtoW( GetProcessHeap(), 0, name ); - HWND32 hwnd = CreateDialogParam32W( hInst, str, owner, dlgProc, param); + HWND hwnd = CreateDialogParamW( hInst, str, owner, dlgProc, param); HeapFree( GetProcessHeap(), 0, str ); return hwnd; } - return CreateDialogParam32W( hInst, (LPCWSTR)name, owner, dlgProc, param ); + return CreateDialogParamW( hInst, (LPCWSTR)name, owner, dlgProc, param ); } /*********************************************************************** * CreateDialogParam32W (USER32.74) */ -HWND32 WINAPI CreateDialogParam32W( HINSTANCE32 hInst, LPCWSTR name, - HWND32 owner, DLGPROC32 dlgProc, +HWND WINAPI CreateDialogParamW( HINSTANCE hInst, LPCWSTR name, + HWND owner, DLGPROC dlgProc, LPARAM param ) { - HANDLE32 hrsrc = FindResource32W( hInst, name, RT_DIALOG32W ); + HANDLE hrsrc = FindResourceW( hInst, name, RT_DIALOGW ); if (!hrsrc) return 0; - return CreateDialogIndirectParam32W( hInst, - (LPVOID)LoadResource32(hInst, hrsrc), + return CreateDialogIndirectParamW( hInst, + (LPVOID)LoadResource(hInst, hrsrc), owner, dlgProc, param ); } @@ -808,9 +808,9 @@ /*********************************************************************** * CreateDialogIndirectParam32A (USER32.69) */ -HWND32 WINAPI CreateDialogIndirectParam32A( HINSTANCE32 hInst, +HWND WINAPI CreateDialogIndirectParamA( HINSTANCE hInst, LPCVOID dlgTemplate, - HWND32 owner, DLGPROC32 dlgProc, + HWND owner, DLGPROC dlgProc, LPARAM param ) { return DIALOG_CreateIndirect( hInst, dlgTemplate, TRUE, owner, @@ -820,9 +820,9 @@ /*********************************************************************** * CreateDialogIndirectParam32AorW (USER32.71) */ -HWND32 WINAPI CreateDialogIndirectParam32AorW( HINSTANCE32 hInst, +HWND WINAPI CreateDialogIndirectParamAorW( HINSTANCE hInst, LPCVOID dlgTemplate, - HWND32 owner, DLGPROC32 dlgProc, + HWND owner, DLGPROC dlgProc, LPARAM param ) { FIXME(dialog,"assume WIN_PROC_32W\n"); return DIALOG_CreateIndirect( hInst, dlgTemplate, TRUE, owner, @@ -832,9 +832,9 @@ /*********************************************************************** * CreateDialogIndirectParam32W (USER32.72) */ -HWND32 WINAPI CreateDialogIndirectParam32W( HINSTANCE32 hInst, +HWND WINAPI CreateDialogIndirectParamW( HINSTANCE hInst, LPCVOID dlgTemplate, - HWND32 owner, DLGPROC32 dlgProc, + HWND owner, DLGPROC dlgProc, LPARAM param ) { return DIALOG_CreateIndirect( hInst, dlgTemplate, TRUE, owner, @@ -845,12 +845,12 @@ /*********************************************************************** * DIALOG_DoDialogBox */ -INT32 DIALOG_DoDialogBox( HWND32 hwnd, HWND32 owner ) +INT DIALOG_DoDialogBox( HWND hwnd, HWND owner ) { WND * wndPtr; DIALOGINFO * dlgInfo; - MSG32 msg; - INT32 retval; + MSG msg; + INT retval; /* Owner must be a top-level window */ owner = WIN_GetTopParent( owner ); @@ -859,22 +859,22 @@ if (!dlgInfo->flags & DF_END) /* was EndDialog called in WM_INITDIALOG ? */ { - EnableWindow32( owner, FALSE ); - ShowWindow32( hwnd, SW_SHOW ); + EnableWindow( owner, FALSE ); + ShowWindow( hwnd, SW_SHOW ); while (MSG_InternalGetMessage(&msg, hwnd, owner, MSGF_DIALOGBOX, PM_REMOVE, !(wndPtr->dwStyle & DS_NOIDLEMSG) )) { - if (!IsDialogMessage32A( hwnd, &msg)) + if (!IsDialogMessageA( hwnd, &msg)) { - TranslateMessage32( &msg ); - DispatchMessage32A( &msg ); + TranslateMessage( &msg ); + DispatchMessageA( &msg ); } if (dlgInfo->flags & DF_END) break; } - EnableWindow32( owner, TRUE ); + EnableWindow( owner, TRUE ); } retval = dlgInfo->idResult; - DestroyWindow32( hwnd ); + DestroyWindow( hwnd ); return retval; } @@ -904,10 +904,10 @@ /*********************************************************************** * DialogBoxParam32A (USER32.139) */ -INT32 WINAPI DialogBoxParam32A( HINSTANCE32 hInst, LPCSTR name, - HWND32 owner, DLGPROC32 dlgProc, LPARAM param ) +INT WINAPI DialogBoxParamA( HINSTANCE hInst, LPCSTR name, + HWND owner, DLGPROC dlgProc, LPARAM param ) { - HWND32 hwnd = CreateDialogParam32A( hInst, name, owner, dlgProc, param ); + HWND hwnd = CreateDialogParamA( hInst, name, owner, dlgProc, param ); if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); return -1; } @@ -916,10 +916,10 @@ /*********************************************************************** * DialogBoxParam32W (USER32.140) */ -INT32 WINAPI DialogBoxParam32W( HINSTANCE32 hInst, LPCWSTR name, - HWND32 owner, DLGPROC32 dlgProc, LPARAM param ) +INT WINAPI DialogBoxParamW( HINSTANCE hInst, LPCWSTR name, + HWND owner, DLGPROC dlgProc, LPARAM param ) { - HWND32 hwnd = CreateDialogParam32W( hInst, name, owner, dlgProc, param ); + HWND hwnd = CreateDialogParamW( hInst, name, owner, dlgProc, param ); if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); return -1; } @@ -956,11 +956,11 @@ /*********************************************************************** * DialogBoxIndirectParam32A (USER32.136) */ -INT32 WINAPI DialogBoxIndirectParam32A(HINSTANCE32 hInstance, LPCVOID template, - HWND32 owner, DLGPROC32 dlgProc, +INT WINAPI DialogBoxIndirectParamA(HINSTANCE hInstance, LPCVOID template, + HWND owner, DLGPROC dlgProc, LPARAM param ) { - HWND32 hwnd = CreateDialogIndirectParam32A( hInstance, template, + HWND hwnd = CreateDialogIndirectParamA( hInstance, template, owner, dlgProc, param ); if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); return -1; @@ -970,11 +970,11 @@ /*********************************************************************** * DialogBoxIndirectParam32W (USER32.138) */ -INT32 WINAPI DialogBoxIndirectParam32W(HINSTANCE32 hInstance, LPCVOID template, - HWND32 owner, DLGPROC32 dlgProc, +INT WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance, LPCVOID template, + HWND owner, DLGPROC dlgProc, LPARAM param ) { - HWND32 hwnd = CreateDialogIndirectParam32W( hInstance, template, + HWND hwnd = CreateDialogIndirectParamW( hInstance, template, owner, dlgProc, param ); if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); return -1; @@ -986,14 +986,14 @@ */ BOOL16 WINAPI EndDialog16( HWND16 hwnd, INT16 retval ) { - return EndDialog32( hwnd, retval ); + return EndDialog( hwnd, retval ); } /*********************************************************************** * EndDialog32 (USER.88) */ -BOOL32 WINAPI EndDialog32( HWND32 hwnd, INT32 retval ) +BOOL WINAPI EndDialog( HWND hwnd, INT retval ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); DIALOGINFO * dlgInfo = (DIALOGINFO *)wndPtr->wExtra; @@ -1012,21 +1012,21 @@ /*********************************************************************** * DIALOG_IsAccelerator */ -static BOOL32 DIALOG_IsAccelerator( HWND32 hwnd, HWND32 hwndDlg, WPARAM32 vKey ) +static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM vKey ) { - HWND32 hwndControl = hwnd; - HWND32 hwndNext; + HWND hwndControl = hwnd; + HWND hwndNext; WND *wndPtr; - BOOL32 RetVal = FALSE; - INT32 dlgCode; + BOOL RetVal = FALSE; + INT dlgCode; if (vKey == VK_SPACE) { - dlgCode = SendMessage32A( hwndControl, WM_GETDLGCODE, 0, 0 ); + dlgCode = SendMessageA( hwndControl, WM_GETDLGCODE, 0, 0 ); if (dlgCode & DLGC_BUTTON) { - SendMessage32A( hwndControl, WM_LBUTTONDOWN, 0, 0); - SendMessage32A( hwndControl, WM_LBUTTONUP, 0, 0); + SendMessageA( hwndControl, WM_LBUTTONDOWN, 0, 0); + SendMessageA( hwndControl, WM_LBUTTONUP, 0, 0); RetVal = TRUE; } } @@ -1038,7 +1038,7 @@ if (wndPtr != NULL && wndPtr->text != NULL && (wndPtr->dwStyle & (WS_VISIBLE | WS_DISABLED)) == WS_VISIBLE) { - dlgCode = SendMessage32A( hwndControl, WM_GETDLGCODE, 0, 0 ); + dlgCode = SendMessageA( hwndControl, WM_GETDLGCODE, 0, 0 ); if (dlgCode & (DLGC_BUTTON | DLGC_STATIC)) { /* find the accelerator key */ @@ -1056,16 +1056,16 @@ (wndPtr->dwStyle & 0x0f) == BS_GROUPBOX ) { /* set focus to the control */ - SendMessage32A( hwndDlg, WM_NEXTDLGCTL, + SendMessageA( hwndDlg, WM_NEXTDLGCTL, hwndControl, 1); /* and bump it on to next */ - SendMessage32A( hwndDlg, WM_NEXTDLGCTL, 0, 0); + SendMessageA( hwndDlg, WM_NEXTDLGCTL, 0, 0); } else if (dlgCode & (DLGC_DEFPUSHBUTTON | DLGC_UNDEFPUSHBUTTON)) { /* send command message as from the control */ - SendMessage32A( hwndDlg, WM_COMMAND, + SendMessageA( hwndDlg, WM_COMMAND, MAKEWPARAM( LOWORD(wndPtr->wIDmenu), BN_CLICKED ), (LPARAM)hwndControl ); @@ -1073,29 +1073,29 @@ else { /* click the control */ - SendMessage32A( hwndControl, WM_LBUTTONDOWN, 0, 0); - SendMessage32A( hwndControl, WM_LBUTTONUP, 0, 0); + SendMessageA( hwndControl, WM_LBUTTONDOWN, 0, 0); + SendMessageA( hwndControl, WM_LBUTTONUP, 0, 0); } RetVal = TRUE; break; } } } - hwndNext = GetWindow32( hwndControl, GW_CHILD ); + hwndNext = GetWindow( hwndControl, GW_CHILD ); if (!hwndNext) { - hwndNext = GetWindow32( hwndControl, GW_HWNDNEXT ); + hwndNext = GetWindow( hwndControl, GW_HWNDNEXT ); } while (!hwndNext) { - hwndControl = GetParent32( hwndControl ); + hwndControl = GetParent( hwndControl ); if (hwndControl == hwndDlg) { - hwndNext = GetWindow32( hwndDlg, GW_CHILD ); + hwndNext = GetWindow( hwndDlg, GW_CHILD ); } else { - hwndNext = GetWindow32( hwndControl, GW_HWNDNEXT ); + hwndNext = GetWindow( hwndControl, GW_HWNDNEXT ); } } hwndControl = hwndNext; @@ -1109,10 +1109,10 @@ /*********************************************************************** * DIALOG_IsDialogMessage */ -static BOOL32 DIALOG_IsDialogMessage( HWND32 hwnd, HWND32 hwndDlg, - UINT32 message, WPARAM32 wParam, - LPARAM lParam, BOOL32 *translate, - BOOL32 *dispatch, INT32 dlgCode ) +static BOOL DIALOG_IsDialogMessage( HWND hwnd, HWND hwndDlg, + UINT message, WPARAM wParam, + LPARAM lParam, BOOL *translate, + BOOL *dispatch, INT dlgCode ) { *translate = *dispatch = FALSE; @@ -1143,8 +1143,8 @@ case VK_TAB: if (!(dlgCode & DLGC_WANTTAB)) { - SendMessage32A( hwndDlg, WM_NEXTDLGCTL, - (GetKeyState32(VK_SHIFT) & 0x8000), 0 ); + SendMessageA( hwndDlg, WM_NEXTDLGCTL, + (GetKeyState(VK_SHIFT) & 0x8000), 0 ); return TRUE; } break; @@ -1155,17 +1155,17 @@ case VK_UP: if (!(dlgCode & DLGC_WANTARROWS)) { - BOOL32 fPrevious = (wParam == VK_LEFT || wParam == VK_UP); - HWND32 hwndNext = - GetNextDlgGroupItem32 (hwndDlg, GetFocus32(), fPrevious ); - SendMessage32A( hwndDlg, WM_NEXTDLGCTL, hwndNext, 1 ); + BOOL fPrevious = (wParam == VK_LEFT || wParam == VK_UP); + HWND hwndNext = + GetNextDlgGroupItem (hwndDlg, GetFocus(), fPrevious ); + SendMessageA( hwndDlg, WM_NEXTDLGCTL, hwndNext, 1 ); return TRUE; } break; case VK_ESCAPE: - SendMessage32A( hwndDlg, WM_COMMAND, IDCANCEL, - (LPARAM)GetDlgItem32( hwndDlg, IDCANCEL ) ); + SendMessageA( hwndDlg, WM_COMMAND, IDCANCEL, + (LPARAM)GetDlgItem( hwndDlg, IDCANCEL ) ); return TRUE; case VK_RETURN: @@ -1173,14 +1173,14 @@ DWORD dw = SendMessage16( hwndDlg, DM_GETDEFID, 0, 0 ); if (HIWORD(dw) == DC_HASDEFID) { - SendMessage32A( hwndDlg, WM_COMMAND, + SendMessageA( hwndDlg, WM_COMMAND, MAKEWPARAM( LOWORD(dw), BN_CLICKED ), - (LPARAM)GetDlgItem32(hwndDlg, LOWORD(dw))); + (LPARAM)GetDlgItem(hwndDlg, LOWORD(dw))); } else { - SendMessage32A( hwndDlg, WM_COMMAND, IDOK, - (LPARAM)GetDlgItem32( hwndDlg, IDOK ) ); + SendMessageA( hwndDlg, WM_COMMAND, IDOK, + (LPARAM)GetDlgItem( hwndDlg, IDOK ) ); } } @@ -1215,8 +1215,8 @@ BOOL16 WINAPI WIN16_IsDialogMessage16( HWND16 hwndDlg, SEGPTR msg16 ) { LPMSG16 msg = PTR_SEG_TO_LIN(msg16); - BOOL32 ret, translate, dispatch; - INT32 dlgCode; + BOOL ret, translate, dispatch; + INT dlgCode; if ((hwndDlg != msg->hwnd) && !IsChild16( hwndDlg, msg->hwnd )) return FALSE; @@ -1234,7 +1234,7 @@ BOOL16 WINAPI IsDialogMessage16( HWND16 hwndDlg, LPMSG16 msg ) { LPMSG16 msg16 = SEGPTR_NEW(MSG16); - BOOL32 ret; + BOOL ret; *msg16 = *msg; ret = WIN16_IsDialogMessage16( hwndDlg, SEGPTR_GET(msg16) ); @@ -1245,20 +1245,20 @@ /*********************************************************************** * IsDialogMessage32A (USER32.342) */ -BOOL32 WINAPI IsDialogMessage32A( HWND32 hwndDlg, LPMSG32 msg ) +BOOL WINAPI IsDialogMessageA( HWND hwndDlg, LPMSG msg ) { - BOOL32 ret, translate, dispatch; - INT32 dlgCode; + BOOL ret, translate, dispatch; + INT dlgCode; - if ((hwndDlg != msg->hwnd) && !IsChild32( hwndDlg, msg->hwnd )) + if ((hwndDlg != msg->hwnd) && !IsChild( hwndDlg, msg->hwnd )) return FALSE; - dlgCode = SendMessage32A( msg->hwnd, WM_GETDLGCODE, 0, (LPARAM)msg); + dlgCode = SendMessageA( msg->hwnd, WM_GETDLGCODE, 0, (LPARAM)msg); ret = DIALOG_IsDialogMessage( msg->hwnd, hwndDlg, msg->message, msg->wParam, msg->lParam, &translate, &dispatch, dlgCode ); - if (translate) TranslateMessage32( msg ); - if (dispatch) DispatchMessage32A( msg ); + if (translate) TranslateMessage( msg ); + if (dispatch) DispatchMessageA( msg ); return ret; } @@ -1266,20 +1266,20 @@ /*********************************************************************** * IsDialogMessage32W (USER32.343) */ -BOOL32 WINAPI IsDialogMessage32W( HWND32 hwndDlg, LPMSG32 msg ) +BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg ) { - BOOL32 ret, translate, dispatch; - INT32 dlgCode; + BOOL ret, translate, dispatch; + INT dlgCode; - if ((hwndDlg != msg->hwnd) && !IsChild32( hwndDlg, msg->hwnd )) + if ((hwndDlg != msg->hwnd) && !IsChild( hwndDlg, msg->hwnd )) return FALSE; - dlgCode = SendMessage32W( msg->hwnd, WM_GETDLGCODE, 0, (LPARAM)msg); + dlgCode = SendMessageW( msg->hwnd, WM_GETDLGCODE, 0, (LPARAM)msg); ret = DIALOG_IsDialogMessage( msg->hwnd, hwndDlg, msg->message, msg->wParam, msg->lParam, &translate, &dispatch, dlgCode ); - if (translate) TranslateMessage32( msg ); - if (dispatch) DispatchMessage32W( msg ); + if (translate) TranslateMessage( msg ); + if (dispatch) DispatchMessageW( msg ); return ret; } @@ -1298,7 +1298,7 @@ /**************************************************************** * GetDlgCtrlID32 (USER32.234) */ -INT32 WINAPI GetDlgCtrlID32( HWND32 hwnd ) +INT WINAPI GetDlgCtrlID( HWND hwnd ) { WND *wndPtr = WIN_FindWndPtr(hwnd); if (wndPtr) return wndPtr->wIDmenu; @@ -1323,7 +1323,7 @@ /*********************************************************************** * GetDlgItem32 (USER32.235) */ -HWND32 WINAPI GetDlgItem32( HWND32 hwndDlg, INT32 id ) +HWND WINAPI GetDlgItem( HWND hwndDlg, INT id ) { WND *pWnd; @@ -1349,11 +1349,11 @@ /******************************************************************* * SendDlgItemMessage32A (USER32.452) */ -LRESULT WINAPI SendDlgItemMessage32A( HWND32 hwnd, INT32 id, UINT32 msg, - WPARAM32 wParam, LPARAM lParam ) +LRESULT WINAPI SendDlgItemMessageA( HWND hwnd, INT id, UINT msg, + WPARAM wParam, LPARAM lParam ) { - HWND32 hwndCtrl = GetDlgItem32( hwnd, id ); - if (hwndCtrl) return SendMessage32A( hwndCtrl, msg, wParam, lParam ); + HWND hwndCtrl = GetDlgItem( hwnd, id ); + if (hwndCtrl) return SendMessageA( hwndCtrl, msg, wParam, lParam ); else return 0; } @@ -1361,11 +1361,11 @@ /******************************************************************* * SendDlgItemMessage32W (USER32.453) */ -LRESULT WINAPI SendDlgItemMessage32W( HWND32 hwnd, INT32 id, UINT32 msg, - WPARAM32 wParam, LPARAM lParam ) +LRESULT WINAPI SendDlgItemMessageW( HWND hwnd, INT id, UINT msg, + WPARAM wParam, LPARAM lParam ) { - HWND32 hwndCtrl = GetDlgItem32( hwnd, id ); - if (hwndCtrl) return SendMessage32W( hwndCtrl, msg, wParam, lParam ); + HWND hwndCtrl = GetDlgItem( hwnd, id ); + if (hwndCtrl) return SendMessageW( hwndCtrl, msg, wParam, lParam ); else return 0; } @@ -1382,18 +1382,18 @@ /******************************************************************* * SetDlgItemText32A (USER32.478) */ -BOOL32 WINAPI SetDlgItemText32A( HWND32 hwnd, INT32 id, LPCSTR lpString ) +BOOL WINAPI SetDlgItemTextA( HWND hwnd, INT id, LPCSTR lpString ) { - return SendDlgItemMessage32A( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString ); + return SendDlgItemMessageA( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString ); } /******************************************************************* * SetDlgItemText32W (USER32.479) */ -BOOL32 WINAPI SetDlgItemText32W( HWND32 hwnd, INT32 id, LPCWSTR lpString ) +BOOL WINAPI SetDlgItemTextW( HWND hwnd, INT id, LPCWSTR lpString ) { - return SendDlgItemMessage32W( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString ); + return SendDlgItemMessageW( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString ); } @@ -1410,9 +1410,9 @@ /*********************************************************************** * GetDlgItemText32A (USER32.237) */ -INT32 WINAPI GetDlgItemText32A( HWND32 hwnd, INT32 id, LPSTR str, UINT32 len ) +INT WINAPI GetDlgItemTextA( HWND hwnd, INT id, LPSTR str, UINT len ) { - return (INT32)SendDlgItemMessage32A( hwnd, id, WM_GETTEXT, + return (INT)SendDlgItemMessageA( hwnd, id, WM_GETTEXT, len, (LPARAM)str ); } @@ -1420,9 +1420,9 @@ /*********************************************************************** * GetDlgItemText32W (USER32.238) */ -INT32 WINAPI GetDlgItemText32W( HWND32 hwnd, INT32 id, LPWSTR str, UINT32 len ) +INT WINAPI GetDlgItemTextW( HWND hwnd, INT id, LPWSTR str, UINT len ) { - return (INT32)SendDlgItemMessage32W( hwnd, id, WM_GETTEXT, + return (INT)SendDlgItemMessageW( hwnd, id, WM_GETTEXT, len, (LPARAM)str ); } @@ -1432,21 +1432,21 @@ */ void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned ) { - SetDlgItemInt32( hwnd, (UINT32)(UINT16)id, value, fSigned ); + SetDlgItemInt( hwnd, (UINT)(UINT16)id, value, fSigned ); } /******************************************************************* * SetDlgItemInt32 (USER32.477) */ -BOOL32 WINAPI SetDlgItemInt32( HWND32 hwnd, INT32 id, UINT32 value, - BOOL32 fSigned ) +BOOL WINAPI SetDlgItemInt( HWND hwnd, INT id, UINT value, + BOOL fSigned ) { char str[20]; - if (fSigned) sprintf( str, "%d", (INT32)value ); + if (fSigned) sprintf( str, "%d", (INT)value ); else sprintf( str, "%u", value ); - SendDlgItemMessage32A( hwnd, id, WM_SETTEXT, 0, (LPARAM)str ); + SendDlgItemMessageA( hwnd, id, WM_SETTEXT, 0, (LPARAM)str ); return TRUE; } @@ -1457,15 +1457,15 @@ UINT16 WINAPI GetDlgItemInt16( HWND16 hwnd, INT16 id, BOOL16 *translated, BOOL16 fSigned ) { - UINT32 result; - BOOL32 ok; + UINT result; + BOOL ok; if (translated) *translated = FALSE; - result = GetDlgItemInt32( hwnd, (UINT32)(UINT16)id, &ok, fSigned ); + result = GetDlgItemInt( hwnd, (UINT)(UINT16)id, &ok, fSigned ); if (!ok) return 0; if (fSigned) { - if (((INT32)result < -32767) || ((INT32)result > 32767)) return 0; + if (((INT)result < -32767) || ((INT)result > 32767)) return 0; } else { @@ -1479,15 +1479,15 @@ /*********************************************************************** * GetDlgItemInt32 (USER32.236) */ -UINT32 WINAPI GetDlgItemInt32( HWND32 hwnd, INT32 id, BOOL32 *translated, - BOOL32 fSigned ) +UINT WINAPI GetDlgItemInt( HWND hwnd, INT id, BOOL *translated, + BOOL fSigned ) { char str[30]; char * endptr; long result = 0; if (translated) *translated = FALSE; - if (!SendDlgItemMessage32A(hwnd, id, WM_GETTEXT, sizeof(str), (LPARAM)str)) + if (!SendDlgItemMessageA(hwnd, id, WM_GETTEXT, sizeof(str), (LPARAM)str)) return 0; if (fSigned) { @@ -1505,7 +1505,7 @@ if ((result == ULONG_MAX) && (errno == ERANGE)) return 0; } if (translated) *translated = TRUE; - return (UINT32)result; + return (UINT)result; } @@ -1514,7 +1514,7 @@ */ BOOL16 WINAPI CheckDlgButton16( HWND16 hwnd, INT16 id, UINT16 check ) { - SendDlgItemMessage32A( hwnd, id, BM_SETCHECK32, check, 0 ); + SendDlgItemMessageA( hwnd, id, BM_SETCHECK, check, 0 ); return TRUE; } @@ -1522,9 +1522,9 @@ /*********************************************************************** * CheckDlgButton32 (USER32.45) */ -BOOL32 WINAPI CheckDlgButton32( HWND32 hwnd, INT32 id, UINT32 check ) +BOOL WINAPI CheckDlgButton( HWND hwnd, INT id, UINT check ) { - SendDlgItemMessage32A( hwnd, id, BM_SETCHECK32, check, 0 ); + SendDlgItemMessageA( hwnd, id, BM_SETCHECK, check, 0 ); return TRUE; } @@ -1534,16 +1534,16 @@ */ UINT16 WINAPI IsDlgButtonChecked16( HWND16 hwnd, UINT16 id ) { - return (UINT16)SendDlgItemMessage32A( hwnd, id, BM_GETCHECK32, 0, 0 ); + return (UINT16)SendDlgItemMessageA( hwnd, id, BM_GETCHECK, 0, 0 ); } /*********************************************************************** * IsDlgButtonChecked32 (USER32.344) */ -UINT32 WINAPI IsDlgButtonChecked32( HWND32 hwnd, UINT32 id ) +UINT WINAPI IsDlgButtonChecked( HWND hwnd, UINT id ) { - return (UINT32)SendDlgItemMessage32A( hwnd, id, BM_GETCHECK32, 0, 0 ); + return (UINT)SendDlgItemMessageA( hwnd, id, BM_GETCHECK, 0, 0 ); } @@ -1553,15 +1553,15 @@ BOOL16 WINAPI CheckRadioButton16( HWND16 hwndDlg, UINT16 firstID, UINT16 lastID, UINT16 checkID ) { - return CheckRadioButton32( hwndDlg, firstID, lastID, checkID ); + return CheckRadioButton( hwndDlg, firstID, lastID, checkID ); } /*********************************************************************** * CheckRadioButton32 (USER32.48) */ -BOOL32 WINAPI CheckRadioButton32( HWND32 hwndDlg, UINT32 firstID, - UINT32 lastID, UINT32 checkID ) +BOOL WINAPI CheckRadioButton( HWND hwndDlg, UINT firstID, + UINT lastID, UINT checkID ) { WND *pWnd = WIN_FindWndPtr( hwndDlg ); if (!pWnd) return FALSE; @@ -1574,7 +1574,7 @@ lastID = firstID; /* Buttons are in reverse order */ while (pWnd) { - SendMessage32A( pWnd->hwndSelf, BM_SETCHECK32, + SendMessageA( pWnd->hwndSelf, BM_SETCHECK, (pWnd->wIDmenu == checkID), 0 ); if (pWnd->wIDmenu == lastID) break; pWnd = pWnd->next; @@ -1611,7 +1611,7 @@ /*********************************************************************** * MapDialogRect32 (USER32.382) */ -BOOL32 WINAPI MapDialogRect32( HWND32 hwnd, LPRECT32 rect ) +BOOL WINAPI MapDialogRect( HWND hwnd, LPRECT rect ) { DIALOGINFO * dlgInfo; WND * wndPtr = WIN_FindWndPtr( hwnd ); @@ -1631,15 +1631,15 @@ HWND16 WINAPI GetNextDlgGroupItem16( HWND16 hwndDlg, HWND16 hwndCtrl, BOOL16 fPrevious ) { - return (HWND16)GetNextDlgGroupItem32( hwndDlg, hwndCtrl, fPrevious ); + return (HWND16)GetNextDlgGroupItem( hwndDlg, hwndCtrl, fPrevious ); } /*********************************************************************** * GetNextDlgGroupItem32 (USER32.275) */ -HWND32 WINAPI GetNextDlgGroupItem32( HWND32 hwndDlg, HWND32 hwndCtrl, - BOOL32 fPrevious ) +HWND WINAPI GetNextDlgGroupItem( HWND hwndDlg, HWND hwndCtrl, + BOOL fPrevious ) { WND *pWnd, *pWndLast, *pWndCtrl, *pWndDlg; @@ -1692,15 +1692,15 @@ HWND16 WINAPI GetNextDlgTabItem16( HWND16 hwndDlg, HWND16 hwndCtrl, BOOL16 fPrevious ) { - return (HWND16)GetNextDlgTabItem32( hwndDlg, hwndCtrl, fPrevious ); + return (HWND16)GetNextDlgTabItem( hwndDlg, hwndCtrl, fPrevious ); } /*********************************************************************** * GetNextDlgTabItem32 (USER32.276) */ -HWND32 WINAPI GetNextDlgTabItem32( HWND32 hwndDlg, HWND32 hwndCtrl, - BOOL32 fPrevious ) +HWND WINAPI GetNextDlgTabItem( HWND hwndDlg, HWND hwndCtrl, + BOOL fPrevious ) { WND *pWnd, *pWndLast, *pWndCtrl, *pWndDlg; @@ -1743,32 +1743,32 @@ * * Helper function for DlgDirSelect* */ -static BOOL32 DIALOG_DlgDirSelect( HWND32 hwnd, LPSTR str, INT32 len, - INT32 id, BOOL32 win32, BOOL32 unicode, - BOOL32 combo ) +static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPSTR str, INT len, + INT id, BOOL win32, BOOL unicode, + BOOL combo ) { char *buffer, *ptr; - INT32 item, size; - BOOL32 ret; - HWND32 listbox = GetDlgItem32( hwnd, id ); + INT item, size; + BOOL ret; + HWND listbox = GetDlgItem( hwnd, id ); TRACE(dialog, "%04x '%s' %d\n", hwnd, str, id ); if (!listbox) return FALSE; if (win32) { - item = SendMessage32A(listbox, combo ? CB_GETCURSEL32 - : LB_GETCURSEL32, 0, 0 ); + item = SendMessageA(listbox, combo ? CB_GETCURSEL + : LB_GETCURSEL, 0, 0 ); if (item == LB_ERR) return FALSE; - size = SendMessage32A(listbox, combo ? CB_GETLBTEXTLEN32 - : LB_GETTEXTLEN32, 0, 0 ); + size = SendMessageA(listbox, combo ? CB_GETLBTEXTLEN + : LB_GETTEXTLEN, 0, 0 ); if (size == LB_ERR) return FALSE; } else { - item = SendMessage32A(listbox, combo ? CB_GETCURSEL16 + item = SendMessageA(listbox, combo ? CB_GETCURSEL16 : LB_GETCURSEL16, 0, 0 ); if (item == LB_ERR) return FALSE; - size = SendMessage32A(listbox, combo ? CB_GETLBTEXTLEN16 + size = SendMessageA(listbox, combo ? CB_GETLBTEXTLEN16 : LB_GETTEXTLEN16, 0, 0 ); if (size == LB_ERR) return FALSE; } @@ -1776,7 +1776,7 @@ if (!(buffer = SEGPTR_ALLOC( size+1 ))) return FALSE; if (win32) - SendMessage32A( listbox, combo ? CB_GETLBTEXT32 : LB_GETTEXT32, + SendMessageA( listbox, combo ? CB_GETLBTEXT : LB_GETTEXT, item, (LPARAM)buffer ); else SendMessage16( listbox, combo ? CB_GETLBTEXT16 : LB_GETTEXT16, @@ -1799,7 +1799,7 @@ else ptr = buffer; if (unicode) lstrcpynAtoW( (LPWSTR)str, ptr, len ); - else lstrcpyn32A( str, ptr, len ); + else lstrcpynA( str, ptr, len ); SEGPTR_FREE( buffer ); TRACE(dialog, "Returning %d '%s'\n", ret, str ); return ret; @@ -1811,16 +1811,16 @@ * * Helper function for DlgDirList* */ -static INT32 DIALOG_DlgDirList( HWND32 hDlg, LPSTR spec, INT32 idLBox, - INT32 idStatic, UINT32 attrib, BOOL32 combo ) +static INT DIALOG_DlgDirList( HWND hDlg, LPSTR spec, INT idLBox, + INT idStatic, UINT attrib, BOOL combo ) { int drive; - HWND32 hwnd; + HWND hwnd; LPSTR orig_spec = spec; #define SENDMSG(msg,wparam,lparam) \ - ((attrib & DDL_POSTMSGS) ? PostMessage32A( hwnd, msg, wparam, lparam ) \ - : SendMessage32A( hwnd, msg, wparam, lparam )) + ((attrib & DDL_POSTMSGS) ? PostMessageA( hwnd, msg, wparam, lparam ) \ + : SendMessageA( hwnd, msg, wparam, lparam )) TRACE(dialog, "%04x '%s' %d %d %04x\n", hDlg, spec ? spec : "NULL", idLBox, idStatic, attrib ); @@ -1857,41 +1857,41 @@ TRACE(dialog, "path=%c:\\%s mask=%s\n", 'A' + drive, DRIVE_GetDosCwd(drive), spec ); - if (idLBox && ((hwnd = GetDlgItem32( hDlg, idLBox )) != 0)) + if (idLBox && ((hwnd = GetDlgItem( hDlg, idLBox )) != 0)) { - SENDMSG( combo ? CB_RESETCONTENT32 : LB_RESETCONTENT32, 0, 0 ); + SENDMSG( combo ? CB_RESETCONTENT : LB_RESETCONTENT, 0, 0 ); if (attrib & DDL_DIRECTORY) { if (!(attrib & DDL_EXCLUSIVE)) { - if (SENDMSG( combo ? CB_DIR32 : LB_DIR32, + if (SENDMSG( combo ? CB_DIR : LB_DIR, attrib & ~(DDL_DIRECTORY | DDL_DRIVES), (LPARAM)spec ) == LB_ERR) return FALSE; } - if (SENDMSG( combo ? CB_DIR32 : LB_DIR32, + if (SENDMSG( combo ? CB_DIR : LB_DIR, (attrib & (DDL_DIRECTORY | DDL_DRIVES)) | DDL_EXCLUSIVE, (LPARAM)"*.*" ) == LB_ERR) return FALSE; } else { - if (SENDMSG( combo ? CB_DIR32 : LB_DIR32, attrib, + if (SENDMSG( combo ? CB_DIR : LB_DIR, attrib, (LPARAM)spec ) == LB_ERR) return FALSE; } } - if (idStatic && ((hwnd = GetDlgItem32( hDlg, idStatic )) != 0)) + if (idStatic && ((hwnd = GetDlgItem( hDlg, idStatic )) != 0)) { char temp[512]; int drive = DRIVE_GetCurrentDrive(); strcpy( temp, "A:\\" ); temp[0] += drive; - lstrcpyn32A( temp + 3, DRIVE_GetDosCwd(drive), sizeof(temp)-3 ); - CharLower32A( temp ); + lstrcpynA( temp + 3, DRIVE_GetDosCwd(drive), sizeof(temp)-3 ); + CharLowerA( temp ); /* Can't use PostMessage() here, because the string is on the stack */ - SetDlgItemText32A( hDlg, idStatic, temp ); + SetDlgItemTextA( hDlg, idStatic, temp ); } if (orig_spec && (spec != orig_spec)) @@ -1911,13 +1911,13 @@ * * Helper function for DlgDirList*32W */ -static INT32 DIALOG_DlgDirListW( HWND32 hDlg, LPWSTR spec, INT32 idLBox, - INT32 idStatic, UINT32 attrib, BOOL32 combo ) +static INT DIALOG_DlgDirListW( HWND hDlg, LPWSTR spec, INT idLBox, + INT idStatic, UINT attrib, BOOL combo ) { if (spec) { LPSTR specA = HEAP_strdupWtoA( GetProcessHeap(), 0, spec ); - INT32 ret = DIALOG_DlgDirList( hDlg, specA, idLBox, idStatic, + INT ret = DIALOG_DlgDirList( hDlg, specA, idLBox, idStatic, attrib, combo ); lstrcpyAtoW( spec, specA ); HeapFree( GetProcessHeap(), 0, specA ); @@ -1930,7 +1930,7 @@ /********************************************************************** * DlgDirSelect (USER.99) */ -BOOL16 WINAPI DlgDirSelect( HWND16 hwnd, LPSTR str, INT16 id ) +BOOL16 WINAPI DlgDirSelect16( HWND16 hwnd, LPSTR str, INT16 id ) { return DlgDirSelectEx16( hwnd, str, 128, id ); } @@ -1939,7 +1939,7 @@ /********************************************************************** * DlgDirSelectComboBox (USER.194) */ -BOOL16 WINAPI DlgDirSelectComboBox( HWND16 hwnd, LPSTR str, INT16 id ) +BOOL16 WINAPI DlgDirSelectComboBox16( HWND16 hwnd, LPSTR str, INT16 id ) { return DlgDirSelectComboBoxEx16( hwnd, str, 128, id ); } @@ -1957,7 +1957,7 @@ /********************************************************************** * DlgDirSelectEx32A (USER32.149) */ -BOOL32 WINAPI DlgDirSelectEx32A( HWND32 hwnd, LPSTR str, INT32 len, INT32 id ) +BOOL WINAPI DlgDirSelectExA( HWND hwnd, LPSTR str, INT len, INT id ) { return DIALOG_DlgDirSelect( hwnd, str, len, id, TRUE, FALSE, FALSE ); } @@ -1966,7 +1966,7 @@ /********************************************************************** * DlgDirSelectEx32W (USER32.150) */ -BOOL32 WINAPI DlgDirSelectEx32W( HWND32 hwnd, LPWSTR str, INT32 len, INT32 id ) +BOOL WINAPI DlgDirSelectExW( HWND hwnd, LPWSTR str, INT len, INT id ) { return DIALOG_DlgDirSelect( hwnd, (LPSTR)str, len, id, TRUE, TRUE, FALSE ); } @@ -1985,8 +1985,8 @@ /********************************************************************** * DlgDirSelectComboBoxEx32A (USER32.147) */ -BOOL32 WINAPI DlgDirSelectComboBoxEx32A( HWND32 hwnd, LPSTR str, INT32 len, - INT32 id ) +BOOL WINAPI DlgDirSelectComboBoxExA( HWND hwnd, LPSTR str, INT len, + INT id ) { return DIALOG_DlgDirSelect( hwnd, str, len, id, TRUE, FALSE, TRUE ); } @@ -1995,8 +1995,8 @@ /********************************************************************** * DlgDirSelectComboBoxEx32W (USER32.148) */ -BOOL32 WINAPI DlgDirSelectComboBoxEx32W( HWND32 hwnd, LPWSTR str, INT32 len, - INT32 id) +BOOL WINAPI DlgDirSelectComboBoxExW( HWND hwnd, LPWSTR str, INT len, + INT id) { return DIALOG_DlgDirSelect( hwnd, (LPSTR)str, len, id, TRUE, TRUE, TRUE ); } @@ -2015,8 +2015,8 @@ /********************************************************************** * DlgDirList32A (USER32.143) */ -INT32 WINAPI DlgDirList32A( HWND32 hDlg, LPSTR spec, INT32 idLBox, - INT32 idStatic, UINT32 attrib ) +INT WINAPI DlgDirListA( HWND hDlg, LPSTR spec, INT idLBox, + INT idStatic, UINT attrib ) { return DIALOG_DlgDirList( hDlg, spec, idLBox, idStatic, attrib, FALSE ); } @@ -2025,8 +2025,8 @@ /********************************************************************** * DlgDirList32W (USER32.146) */ -INT32 WINAPI DlgDirList32W( HWND32 hDlg, LPWSTR spec, INT32 idLBox, - INT32 idStatic, UINT32 attrib ) +INT WINAPI DlgDirListW( HWND hDlg, LPWSTR spec, INT idLBox, + INT idStatic, UINT attrib ) { return DIALOG_DlgDirListW( hDlg, spec, idLBox, idStatic, attrib, FALSE ); } @@ -2045,8 +2045,8 @@ /********************************************************************** * DlgDirListComboBox32A (USER32.144) */ -INT32 WINAPI DlgDirListComboBox32A( HWND32 hDlg, LPSTR spec, INT32 idCBox, - INT32 idStatic, UINT32 attrib ) +INT WINAPI DlgDirListComboBoxA( HWND hDlg, LPSTR spec, INT idCBox, + INT idStatic, UINT attrib ) { return DIALOG_DlgDirList( hDlg, spec, idCBox, idStatic, attrib, TRUE ); } @@ -2055,8 +2055,8 @@ /********************************************************************** * DlgDirListComboBox32W (USER32.145) */ -INT32 WINAPI DlgDirListComboBox32W( HWND32 hDlg, LPWSTR spec, INT32 idCBox, - INT32 idStatic, UINT32 attrib ) +INT WINAPI DlgDirListComboBoxW( HWND hDlg, LPWSTR spec, INT idCBox, + INT idStatic, UINT attrib ) { return DIALOG_DlgDirListW( hDlg, spec, idCBox, idStatic, attrib, TRUE ); }
diff --git a/windows/dinput.c b/windows/dinput.c index feb0c89..7812ca6 100644 --- a/windows/dinput.c +++ b/windows/dinput.c
@@ -78,7 +78,7 @@ /* Previous position for relative moves */ LONG prevX, prevY; LPMOUSE_EVENT_PROC prev_handler; - HWND32 win; + HWND win; int xwin; DWORD win_centerX, win_centerY; LPDIDEVICEOBJECTDATA data_queue; @@ -138,7 +138,7 @@ /****************************************************************************** * DirectInputCreate32A */ -HRESULT WINAPI DirectInputCreate32A(HINSTANCE32 hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter) +HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter) { IDirectInputAImpl* This; TRACE(dinput, "(0x%08lx,%04lx,%p,%p)\n", @@ -154,17 +154,17 @@ * IDirectInputA_EnumDevices */ static HRESULT WINAPI IDirectInputAImpl_EnumDevices( - LPDIRECTINPUTA iface, DWORD dwDevType, LPDIENUMDEVICESCALLBACK32A lpCallback, + LPDIRECTINPUTA iface, DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback, LPVOID pvRef, DWORD dwFlags ) { ICOM_THIS(IDirectInputAImpl,iface); - DIDEVICEINSTANCE32A devInstance; + DIDEVICEINSTANCEA devInstance; int ret; TRACE(dinput, "(this=%p,0x%04lx,%p,%p,%04lx)\n", This, dwDevType, lpCallback, pvRef, dwFlags); - devInstance.dwSize = sizeof(DIDEVICEINSTANCE32A); + devInstance.dwSize = sizeof(DIDEVICEINSTANCEA); if ((dwDevType == 0) || (dwDevType == DIDEVTYPE_KEYBOARD)) { /* Return keyboard */ @@ -269,7 +269,7 @@ } static HRESULT WINAPI IDirectInputAImpl_Initialize( - LPDIRECTINPUTA iface,HINSTANCE32 hinst,DWORD x + LPDIRECTINPUTA iface,HINSTANCE hinst,DWORD x ) { return DIERR_ALREADYINITIALIZED; } @@ -286,7 +286,7 @@ } static HRESULT WINAPI IDirectInputAImpl_RunControlPanel(LPDIRECTINPUTA iface, - HWND32 hwndOwner, + HWND hwndOwner, DWORD dwFlags) { ICOM_THIS(IDirectInputAImpl,iface); FIXME(dinput,"(%p)->(%08lx,%08lx): stub\n",This, (DWORD) hwndOwner, dwFlags); @@ -339,7 +339,7 @@ } static HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel( - LPDIRECTINPUTDEVICE2A iface,HWND32 hwnd,DWORD dwflags + LPDIRECTINPUTDEVICE2A iface,HWND hwnd,DWORD dwflags ) { ICOM_THIS(IDirectInputDevice2AImpl,iface); FIXME(dinput,"(this=%p,0x%08lx,0x%08lx): stub\n",This,(DWORD)hwnd,dwflags); @@ -349,7 +349,7 @@ } static HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification( - LPDIRECTINPUTDEVICE2A iface,HANDLE32 hnd + LPDIRECTINPUTDEVICE2A iface,HANDLE hnd ) { ICOM_THIS(IDirectInputDevice2AImpl,iface); FIXME(dinput,"(this=%p,0x%08lx): stub\n",This,(DWORD)hnd); @@ -520,7 +520,7 @@ static HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects( LPDIRECTINPUTDEVICE2A iface, - LPDIENUMDEVICEOBJECTSCALLBACK32A lpCallback, + LPDIENUMDEVICEOBJECTSCALLBACKA lpCallback, LPVOID lpvRef, DWORD dwFlags) { @@ -543,7 +543,7 @@ static HRESULT WINAPI IDirectInputDevice2AImpl_GetObjectInfo( LPDIRECTINPUTDEVICE2A iface, - LPDIDEVICEOBJECTINSTANCE32A pdidoi, + LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) { @@ -553,7 +553,7 @@ static HRESULT WINAPI IDirectInputDevice2AImpl_GetDeviceInfo( LPDIRECTINPUTDEVICE2A iface, - LPDIDEVICEINSTANCE32A pdidi) + LPDIDEVICEINSTANCEA pdidi) { FIXME(dinput, "stub!\n"); return DI_OK; @@ -561,7 +561,7 @@ static HRESULT WINAPI IDirectInputDevice2AImpl_RunControlPanel( LPDIRECTINPUTDEVICE2A iface, - HWND32 hwndOwner, + HWND hwndOwner, DWORD dwFlags) { FIXME(dinput, "stub!\n"); @@ -570,7 +570,7 @@ static HRESULT WINAPI IDirectInputDevice2AImpl_Initialize( LPDIRECTINPUTDEVICE2A iface, - HINSTANCE32 hinst, + HINSTANCE hinst, DWORD dwVersion, REFGUID rguid) { @@ -702,7 +702,7 @@ * grabbing. */ static HRESULT WINAPI SysMouseAImpl_SetCooperativeLevel( - LPDIRECTINPUTDEVICE2A iface,HWND32 hwnd,DWORD dwflags + LPDIRECTINPUTDEVICE2A iface,HWND hwnd,DWORD dwflags ) { ICOM_THIS(SysMouseAImpl,iface); @@ -791,7 +791,7 @@ DWORD posX, posY, keyState, time, extra; SysMouseAImpl* This = (SysMouseAImpl*) current_lock; - if ( !IsBadReadPtr32( (LPVOID)dwExtraInfo, sizeof(WINE_MOUSEEVENT) ) + if ( !IsBadReadPtr( (LPVOID)dwExtraInfo, sizeof(WINE_MOUSEEVENT) ) && ((WINE_MOUSEEVENT *)dwExtraInfo)->magic == WINE_MOUSEEVENT_MAGIC ) { WINE_MOUSEEVENT *wme = (WINE_MOUSEEVENT *)dwExtraInfo; keyState = wme->keyState; @@ -886,7 +886,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface) { ICOM_THIS(SysMouseAImpl,iface); - RECT32 rect; + RECT rect; TRACE(dinput,"(this=%p)\n",This); @@ -902,7 +902,7 @@ MOUSE_Enable(dinput_mouse_event); /* Get the window dimension and find the center */ - GetWindowRect32(This->win, &rect); + GetWindowRect(This->win, &rect); This->xwin = ((X11DRV_WND_DATA *) WIN_FindWndPtr(This->win)->pDriverData)->window; This->win_centerX = (rect.right - rect.left) / 2; This->win_centerY = (rect.bottom - rect.top ) / 2;
diff --git a/windows/display.c b/windows/display.c index b1c8299..c40fdc2 100644 --- a/windows/display.c +++ b/windows/display.c
@@ -67,7 +67,7 @@ /*********************************************************************** * UserRepaintDisable (DISPLAY.500) */ -VOID WINAPI UserRepaintDisable( BOOL16 disable ) +VOID WINAPI UserRepaintDisable16( BOOL16 disable ) { TRACE( cursor, "(%d): stub\n", disable ); }
diff --git a/windows/driver.c b/windows/driver.c index d375f07..cce1911 100644 --- a/windows/driver.c +++ b/windows/driver.c
@@ -34,12 +34,12 @@ char str[256]; LPSTR ptr; - if (GetPrivateProfileString32A("drivers", NULL, "", str, sizeof(str), "SYSTEM.INI") < 2) { + if (GetPrivateProfileStringA("drivers", NULL, "", str, sizeof(str), "SYSTEM.INI") < 2) { ERR(driver,"Can't find drivers section in system.ini\n"); return; } - for (ptr = str; lstrlen32A(ptr) != 0; ptr += lstrlen32A(ptr) + 1) { + for (ptr = str; lstrlenA(ptr) != 0; ptr += lstrlenA(ptr) + 1) { TRACE(driver, "str='%s'\n", ptr); hDrv = OpenDriver16(ptr, "drivers", 0L); TRACE(driver, "hDrv=%04x\n", hDrv); @@ -128,11 +128,11 @@ case DRV_INSTALL: /* lParam1 is a handle to a window (or not used), lParam2 is a pointer to DRVCONFIGINFO */ if (*lParam2) { - LPDRVCONFIGINFO32 dci32 = HeapAlloc(SystemHeap, 0, sizeof(DRVCONFIGINFO32)); + LPDRVCONFIGINFO dci32 = HeapAlloc(SystemHeap, 0, sizeof(DRVCONFIGINFO)); LPDRVCONFIGINFO16 dci16 = PTR_SEG_TO_LIN(*lParam2); if (dci32) { - dci32->dwDCISize = sizeof(DRVCONFIGINFO32); + dci32->dwDCISize = sizeof(DRVCONFIGINFO); dci32->lpszDCISectionName = HEAP_strdupAtoW(SystemHeap, 0, PTR_SEG_TO_LIN(dci16->lpszDCISectionName)); dci32->lpszDCIAliasName = HEAP_strdupAtoW(SystemHeap, 0, PTR_SEG_TO_LIN(dci16->lpszDCIAliasName)); if (dci32->lpszDCISectionName == NULL || dci32->lpszDCIAliasName == NULL) @@ -184,7 +184,7 @@ case DRV_INSTALL: /* lParam1 is a handle to a window (or not used), lParam2 is a pointer to DRVCONFIGINFO, lParam2 */ if (lParam2) { - LPDRVCONFIGINFO32 dci32 = (LPDRVCONFIGINFO32)lParam2; + LPDRVCONFIGINFO dci32 = (LPDRVCONFIGINFO)lParam2; HeapFree(SystemHeap, 0, (LPVOID)dci32->lpszDCISectionName); HeapFree(SystemHeap, 0, (LPVOID)dci32->lpszDCIAliasName); HeapFree(SystemHeap, 0, dci32); @@ -243,7 +243,7 @@ /* lParam1 is a handle to a window (or not used), lParam2 is a pointer to DRVCONFIGINFO */ if (*lParam2) { LPDRVCONFIGINFO16 dci16 = (LPDRVCONFIGINFO16)SEGPTR_ALLOC(sizeof(DRVCONFIGINFO16)); - LPDRVCONFIGINFO32 dci32 = (LPDRVCONFIGINFO32)lParam2; + LPDRVCONFIGINFO dci32 = (LPDRVCONFIGINFO)lParam2; if (dci16) { LPSTR str1, str2; @@ -369,7 +369,7 @@ /************************************************************************** * SendDriverMessage [WINMM.19] */ -LRESULT WINAPI SendDriverMessage32(HDRVR32 hDriver, UINT32 msg, LPARAM lParam1, +LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT msg, LPARAM lParam1, LPARAM lParam2) { LPWINE_DRIVER lpDrv = (LPWINE_DRIVER)hDriver; @@ -411,15 +411,15 @@ * Adds a driver struct to the list of open drivers. * Generates all the logic to handle driver creation / open. */ -static BOOL32 DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam) +static BOOL DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam) { /* First driver to be loaded for this module, need to load correctly the module */ if (DRIVER_GetNumberOfModuleRefs(lpNewDrv) == 0) { - if (SendDriverMessage32((HDRVR32)lpNewDrv, DRV_LOAD, 0L, 0L) != DRV_SUCCESS) { + if (SendDriverMessage((HDRVR)lpNewDrv, DRV_LOAD, 0L, 0L) != DRV_SUCCESS) { TRACE(driver, "DRV_LOAD failed on driver 0x%08lx\n", (DWORD)lpNewDrv); return FALSE; } - if (SendDriverMessage32((HDRVR32)lpNewDrv, DRV_ENABLE, 0L, 0L) != DRV_SUCCESS) { + if (SendDriverMessage((HDRVR)lpNewDrv, DRV_ENABLE, 0L, 0L) != DRV_SUCCESS) { TRACE(driver, "DRV_ENABLE failed on driver 0x%08lx\n", (DWORD)lpNewDrv); return FALSE; } @@ -431,7 +431,7 @@ * + and we send it through SendDriverMessage32 as a 32 bit value... * => so we might have trouble with this little guy (FIXME ???) */ - lpNewDrv->dwDriverID = SendDriverMessage32((HDRVR32)lpNewDrv, DRV_OPEN, (DWORD)lpNewDrv->szAliasName, lParam); + lpNewDrv->dwDriverID = SendDriverMessage((HDRVR)lpNewDrv, DRV_OPEN, (DWORD)lpNewDrv->szAliasName, lParam); if (lpNewDrv->dwDriverID == 0) { TRACE(driver, "DRV_OPEN failed on driver 0x%08lx\n", (DWORD)lpNewDrv); return FALSE; @@ -458,14 +458,14 @@ * Generates all the logic to handle driver closure / deletion * Removes a driver struct to the list of open drivers. */ -static BOOL32 DRIVER_RemoveFromList(LPWINE_DRIVER lpDrv, LPARAM lParam1, LPARAM lParam2) +static BOOL DRIVER_RemoveFromList(LPWINE_DRIVER lpDrv, LPARAM lParam1, LPARAM lParam2) { - SendDriverMessage32((HDRVR32)lpDrv, DRV_CLOSE, lParam1, lParam2); + SendDriverMessage((HDRVR)lpDrv, DRV_CLOSE, lParam1, lParam2); lpDrv->dwDriverID = 0; if (DRIVER_GetNumberOfModuleRefs(lpDrv) == 1) { - SendDriverMessage16((HDRVR32)lpDrv, DRV_DISABLE, 0L, 0L); - SendDriverMessage16((HDRVR32)lpDrv, DRV_FREE, 0L, 0L); + SendDriverMessage16((HDRVR)lpDrv, DRV_DISABLE, 0L, 0L); + SendDriverMessage16((HDRVR)lpDrv, DRV_FREE, 0L, 0L); if (lpDrv->lpPrevItem) lpDrv->lpPrevItem->lpNextItem = lpDrv->lpNextItem; @@ -518,7 +518,7 @@ * Creates all the WINE internal representations for a 32 bit driver. * The driver is also open by sending the correct messages. */ -LPWINE_DRIVER DRIVER_RegisterDriver32(LPCSTR lpName, HMODULE32 hModule, DRIVERPROC32 lpProc, LPARAM lParam) +LPWINE_DRIVER DRIVER_RegisterDriver32(LPCSTR lpName, HMODULE hModule, DRIVERPROC lpProc, LPARAM lParam) { LPWINE_DRIVER lpDrv; @@ -553,7 +553,7 @@ TRACE(driver,"('%s', %08lX);\n", lpFileName, lParam); - if (lstrlen32A(lpFileName) < 1) + if (lstrlenA(lpFileName) < 1) return 0; lpSFN = strrchr(lpFileName, '\\'); @@ -576,23 +576,23 @@ * * Tries to load a 32 bit driver whose DLL's (module) name is lpFileName. */ -static HDRVR32 DRIVER_TryOpenDriver32(LPCSTR lpFileName, LPARAM lParam) +static HDRVR DRIVER_TryOpenDriver32(LPCSTR lpFileName, LPARAM lParam) { LPWINE_DRIVER lpDrv = NULL; LPCSTR lpSFN; - HMODULE32 hModule; - DRIVERPROC32 lpProc; + HMODULE hModule; + DRIVERPROC lpProc; TRACE(driver,"('%s', %08lX);\n", lpFileName, lParam); - if (lstrlen32A(lpFileName) < 1) + if (lstrlenA(lpFileName) < 1) return 0; lpSFN = strrchr(lpFileName, '\\'); lpSFN = (lpSFN) ? (lpSFN + 1) : lpFileName; - if ((hModule = LoadLibrary32A(lpFileName)) != 0) { - if ((lpProc = GetProcAddress32(hModule, "DriverProc")) != NULL) { + if ((hModule = LoadLibraryA(lpFileName)) != 0) { + if ((lpProc = GetProcAddress(hModule, "DriverProc")) != NULL) { lpDrv = DRIVER_RegisterDriver32(lpSFN, hModule, lpProc, lParam); } else { TRACE(driver, "No DriverProc found\n"); @@ -600,7 +600,7 @@ } else { TRACE(driver, "Unable to load module (%s)\n", lpFileName); } - return (HDRVR32)lpDrv; + return (HDRVR)lpDrv; } /************************************************************************** @@ -620,7 +620,7 @@ lpSectionName = "Drivers"; } } - if (!hDriver && GetPrivateProfileString32A(lpSectionName, lpDriverName, "", + if (!hDriver && GetPrivateProfileStringA(lpSectionName, lpDriverName, "", drvName, sizeof(drvName), "SYSTEM.INI") > 0) { hDriver = DRIVER_TryOpenDriver16(drvName, lParam); } @@ -633,9 +633,9 @@ * (0,1,DRV_ENABLE,0 ,0) * (0,1,DRV_OPEN ,buf[256],0) */ -HDRVR32 WINAPI OpenDriver32A(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam) +HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam) { - HDRVR32 hDriver = 0; + HDRVR hDriver = 0; char drvName[128]; TRACE(driver,"('%s', '%s', %08lX);\n", lpDriverName, lpSectionName, lParam); @@ -648,21 +648,21 @@ hDriver = DRIVER_TryOpenDriver16(lpDriverName, lParam); } if (!hDriver) { - if (GetPrivateProfileString32A("Drivers32", lpDriverName, "", drvName, + if (GetPrivateProfileStringA("Drivers32", lpDriverName, "", drvName, sizeof(drvName), "SYSTEM.INI")) { hDriver = DRIVER_TryOpenDriver32(drvName, lParam); } } if (!hDriver) { - if (GetPrivateProfileString32A("Drivers", lpDriverName, "", drvName, + if (GetPrivateProfileStringA("Drivers", lpDriverName, "", drvName, sizeof(drvName), "SYSTEM.INI")) { hDriver = DRIVER_TryOpenDriver16(drvName, lParam); } } } else { - if (GetPrivateProfileString32A(lpSectionName, lpDriverName, "", drvName, + if (GetPrivateProfileStringA(lpSectionName, lpDriverName, "", drvName, sizeof(drvName), "SYSTEM.INI")) { hDriver = DRIVER_TryOpenDriver32(drvName, lParam); } @@ -675,11 +675,11 @@ /************************************************************************** * OpenDriver32W [WINMM.15] */ -HDRVR32 WINAPI OpenDriver32W(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam) +HDRVR WINAPI OpenDriverW(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam) { LPSTR dn = HEAP_strdupWtoA(GetProcessHeap(), 0, lpDriverName); LPSTR sn = HEAP_strdupWtoA(GetProcessHeap(), 0, lpSectionName); - HDRVR32 ret = OpenDriver32A(dn, sn, lParam); + HDRVR ret = OpenDriverA(dn, sn, lParam); if (dn) HeapFree(GetProcessHeap(), 0, dn); if (sn) HeapFree(GetProcessHeap(), 0, sn); @@ -707,7 +707,7 @@ /************************************************************************** * CloseDriver32 [WINMM.4] */ -LRESULT WINAPI CloseDriver32(HDRVR32 hDrvr, LPARAM lParam1, LPARAM lParam2) +LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2) { LPWINE_DRIVER lpDrv; @@ -744,10 +744,10 @@ /************************************************************************** * GetDriverModuleHandle [USER.254] */ -HMODULE32 WINAPI GetDriverModuleHandle32(HDRVR32 hDrvr) +HMODULE WINAPI GetDriverModuleHandle(HDRVR hDrvr) { LPWINE_DRIVER lpDrv = (LPWINE_DRIVER)hDrvr; - HMODULE32 hModule = 0; + HMODULE hModule = 0; TRACE(driver, "(%04x);\n", hDrvr); @@ -771,7 +771,7 @@ case DRV_ENABLE: return (LRESULT)0L; case DRV_DISABLE: return (LRESULT)0L; case DRV_QUERYCONFIGURE: return (LRESULT)0L; - case DRV_CONFIGURE: MessageBox32A(0, "Driver isn't configurable !", "Wine Driver", MB_OK); return (LRESULT)0L; + case DRV_CONFIGURE: MessageBoxA(0, "Driver isn't configurable !", "Wine Driver", MB_OK); return (LRESULT)0L; case DRV_INSTALL: return (LRESULT)DRVCNF_RESTART; case DRV_REMOVE: return (LRESULT)DRVCNF_RESTART; default: return (LRESULT)0L; @@ -781,7 +781,7 @@ /************************************************************************** * GetDriverInfo [USER.256] */ -BOOL16 WINAPI GetDriverInfo(HDRVR16 hDrvr, LPDRIVERINFOSTRUCT16 lpDrvInfo) +BOOL16 WINAPI GetDriverInfo16(HDRVR16 hDrvr, LPDRIVERINFOSTRUCT16 lpDrvInfo) { LPWINE_DRIVER lpDrv; BOOL16 ret = FALSE; @@ -806,7 +806,7 @@ /************************************************************************** * GetNextDriver [USER.257] */ -HDRVR16 WINAPI GetNextDriver(HDRVR16 hDrvr, DWORD dwFlags) +HDRVR16 WINAPI GetNextDriver16(HDRVR16 hDrvr, DWORD dwFlags) { HDRVR16 hRetDrv = 0; LPWINE_DRIVER lpDrv;
diff --git a/windows/event.c b/windows/event.c index eeefc6e..636cb11 100644 --- a/windows/event.c +++ b/windows/event.c
@@ -32,7 +32,7 @@ * * Initialize network IO. */ -BOOL32 EVENT_Init(void) +BOOL EVENT_Init(void) { return EVENT_GetDriver()->pInit(); } @@ -60,7 +60,7 @@ * Return TRUE if an event is pending, FALSE on timeout or error * (for instance lost connection with the server). */ -BOOL32 EVENT_WaitNetEvent(BOOL32 sleep, BOOL32 peek) +BOOL EVENT_WaitNetEvent(BOOL sleep, BOOL peek) { return EVENT_GetDriver()->pWaitNetEvent(sleep, peek); } @@ -78,7 +78,7 @@ /********************************************************************** * EVENT_CheckFocus */ -BOOL32 EVENT_CheckFocus(void) +BOOL EVENT_CheckFocus(void) { return EVENT_GetDriver()->pCheckFocus(); } @@ -86,7 +86,7 @@ /*********************************************************************** * EVENT_QueryPointer */ -BOOL32 EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state) +BOOL EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state) { return EVENT_GetDriver()->pQueryPointer(posX, posY, state); } @@ -105,7 +105,7 @@ /********************************************************************** * X11DRV_EVENT_Pending */ -BOOL32 EVENT_Pending() +BOOL EVENT_Pending() { return EVENT_GetDriver()->pPending(); } @@ -115,7 +115,7 @@ * * Check if we have pending X events. */ -BOOL16 WINAPI IsUserIdle(void) +BOOL16 WINAPI IsUserIdle16(void) { return EVENT_GetDriver()->pIsUserIdle(); }
diff --git a/windows/focus.c b/windows/focus.c index 55b6430..69d68a1 100644 --- a/windows/focus.c +++ b/windows/focus.c
@@ -19,14 +19,14 @@ * FOCUS_SwitchFocus * pMsgQ is the queue whose perQData focus is to be modified */ -void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND32 hFocusFrom, HWND32 hFocusTo ) +void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND hFocusFrom, HWND hFocusTo ) { WND *pFocusTo = WIN_FindWndPtr( hFocusTo ); PERQDATA_SetFocusWnd( pMsgQ->pQData, hFocusTo ); #if 0 - if (hFocusFrom) SendMessage32A( hFocusFrom, WM_KILLFOCUS, hFocusTo, 0 ); + if (hFocusFrom) SendMessageA( hFocusFrom, WM_KILLFOCUS, hFocusTo, 0 ); #else /* FIXME: must be SendMessage16() because 32A doesn't do * intertask at this time */ @@ -42,7 +42,7 @@ pFocusTo->pDriver->pSetFocus(pFocusTo); #if 0 - SendMessage32A( hFocusTo, WM_SETFOCUS, hFocusFrom, 0 ); + SendMessageA( hFocusTo, WM_SETFOCUS, hFocusFrom, 0 ); #else SendMessage16( hFocusTo, WM_SETFOCUS, hFocusFrom, 0 ); #endif @@ -54,22 +54,22 @@ */ HWND16 WINAPI SetFocus16( HWND16 hwnd ) { - return (HWND16)SetFocus32( hwnd ); + return (HWND16)SetFocus( hwnd ); } /***************************************************************** * SetFocus32 (USER32.481) */ -HWND32 WINAPI SetFocus32( HWND32 hwnd ) +HWND WINAPI SetFocus( HWND hwnd ) { - HWND32 hWndFocus = 0, hwndTop = hwnd; + HWND hWndFocus = 0, hwndTop = hwnd; WND *wndPtr = WIN_FindWndPtr( hwnd ); MESSAGEQUEUE *pMsgQ = 0, *pCurMsgQ = 0; BOOL16 bRet = 0; /* Get the messageQ for the current thread */ - if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) + if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) { WARN( win, "\tCurrent message queue not found. Exiting!\n" ); goto CLEANUP; @@ -119,11 +119,11 @@ goto CLEANUP; /* activate hwndTop if needed. */ - if (hwndTop != GetActiveWindow32()) + if (hwndTop != GetActiveWindow()) { if (!WINPOS_SetActiveWindow(hwndTop, 0, 0)) goto CLEANUP; - if (!IsWindow32( hwnd )) goto CLEANUP; /* Abort if window destroyed */ + if (!IsWindow( hwnd )) goto CLEANUP; /* Abort if window destroyed */ } /* Get the current focus window from the perQ data */ @@ -163,20 +163,20 @@ */ HWND16 WINAPI GetFocus16(void) { - return (HWND16)GetFocus32(); + return (HWND16)GetFocus(); } /***************************************************************** * GetFocus32 (USER32.240) */ -HWND32 WINAPI GetFocus32(void) +HWND WINAPI GetFocus(void) { MESSAGEQUEUE *pCurMsgQ = 0; - HWND32 hwndFocus = 0; + HWND hwndFocus = 0; /* Get the messageQ for the current thread */ - if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) + if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) { WARN( win, "\tCurrent message queue not found. Exiting!\n" ); return 0;
diff --git a/windows/hook.c b/windows/hook.c index c03a40d..81feb35 100644 --- a/windows/hook.c +++ b/windows/hook.c
@@ -32,7 +32,7 @@ typedef struct { HANDLE16 next; /* 00 Next hook in chain */ - HOOKPROC32 proc WINE_PACKED; /* 02 Hook procedure */ + HOOKPROC proc WINE_PACKED; /* 02 Hook procedure */ INT16 id; /* 06 Hook id (WH_xxx) */ HQUEUE16 ownerQueue; /* 08 Owner queue (0 for system hook) */ HMODULE16 ownerModule; /* 0a Owner module */ @@ -46,15 +46,15 @@ /* This should probably reside in USER heap */ static HANDLE16 HOOK_systemHooks[WH_NB_HOOKS] = { 0, }; -typedef VOID (*HOOK_MapFunc)(INT32, INT32, WPARAM32 *, LPARAM *); -typedef VOID (*HOOK_UnMapFunc)(INT32, INT32, WPARAM32, LPARAM, WPARAM32, +typedef VOID (*HOOK_MapFunc)(INT, INT, WPARAM *, LPARAM *); +typedef VOID (*HOOK_UnMapFunc)(INT, INT, WPARAM, LPARAM, WPARAM, LPARAM); /*********************************************************************** * HOOK_Map16To32Common */ -static void HOOK_Map16To32Common(INT32 id, INT32 code, WPARAM32 *pwParam, - LPARAM *plParam, BOOL32 bA ) +static void HOOK_Map16To32Common(INT id, INT code, WPARAM *pwParam, + LPARAM *plParam, BOOL bA ) { switch( id ) @@ -65,7 +65,7 @@ case WH_JOURNALRECORD: { LPMSG16 lpmsg16 = PTR_SEG_TO_LIN(*plParam); - LPMSG32 lpmsg32 = HeapAlloc( SystemHeap, 0, sizeof(*lpmsg32) ); + LPMSG lpmsg32 = HeapAlloc( SystemHeap, 0, sizeof(*lpmsg32) ); STRUCT32_MSG16to32( lpmsg16, lpmsg32 ); *plParam = (LPARAM)lpmsg32; @@ -75,7 +75,7 @@ case WH_JOURNALPLAYBACK: { LPEVENTMSG16 lpem16 = PTR_SEG_TO_LIN(*plParam); - LPEVENTMSG32 lpem32 = HeapAlloc( SystemHeap, 0, sizeof(*lpem32) ); + LPEVENTMSG lpem32 = HeapAlloc( SystemHeap, 0, sizeof(*lpem32) ); lpem32->message = lpem16->message; lpem32->paramL = lpem16->paramL; @@ -90,7 +90,7 @@ case WH_CALLWNDPROC: { LPCWPSTRUCT16 lpcwp16 = PTR_SEG_TO_LIN(*plParam); - LPCWPSTRUCT32 lpcwp32 = HeapAlloc( SystemHeap, 0, sizeof(*lpcwp32) ); + LPCWPSTRUCT lpcwp32 = HeapAlloc( SystemHeap, 0, sizeof(*lpcwp32) ); lpcwp32->hwnd = lpcwp16->hwnd; lpcwp32->lParam = lpcwp16->lParam; @@ -112,13 +112,13 @@ { LPCBT_CREATEWND16 lpcbtcw16 = PTR_SEG_TO_LIN(*plParam); LPCREATESTRUCT16 lpcs16 = PTR_SEG_TO_LIN(lpcbtcw16->lpcs); - LPCBT_CREATEWND32A lpcbtcw32 = HeapAlloc( SystemHeap, 0, + LPCBT_CREATEWNDA lpcbtcw32 = HeapAlloc( SystemHeap, 0, sizeof(*lpcbtcw32) ); lpcbtcw32->lpcs = HeapAlloc( SystemHeap, 0, sizeof(*lpcbtcw32->lpcs) ); STRUCT32_CREATESTRUCT16to32A( lpcs16, - (LPCREATESTRUCT32A)lpcbtcw32->lpcs ); + (LPCREATESTRUCTA)lpcbtcw32->lpcs ); if (HIWORD(lpcs16->lpszName)) lpcbtcw32->lpcs->lpszName = @@ -144,7 +144,7 @@ case HCBT_ACTIVATE: { LPCBTACTIVATESTRUCT16 lpcas16 = PTR_SEG_TO_LIN(*plParam); - LPCBTACTIVATESTRUCT32 lpcas32 = HeapAlloc( SystemHeap, 0, + LPCBTACTIVATESTRUCT lpcas32 = HeapAlloc( SystemHeap, 0, sizeof(*lpcas32) ); lpcas32->fMouse = lpcas16->fMouse; lpcas32->hWndActive = lpcas16->hWndActive; @@ -154,14 +154,14 @@ case HCBT_CLICKSKIPPED: { LPMOUSEHOOKSTRUCT16 lpms16 = PTR_SEG_TO_LIN(*plParam); - LPMOUSEHOOKSTRUCT32 lpms32 = HeapAlloc( SystemHeap, 0, + LPMOUSEHOOKSTRUCT lpms32 = HeapAlloc( SystemHeap, 0, sizeof(*lpms32) ); CONV_POINT16TO32( &lpms16->pt, &lpms32->pt ); /* wHitTestCode may be negative, so convince compiler to do correct sign extension. Yay. :| */ - lpms32->wHitTestCode = (INT32)((INT16)lpms16->wHitTestCode); + lpms32->wHitTestCode = (INT)((INT16)lpms16->wHitTestCode); lpms32->dwExtraInfo = lpms16->dwExtraInfo; lpms32->hwnd = lpms16->hwnd; @@ -171,7 +171,7 @@ case HCBT_MOVESIZE: { LPRECT16 lprect16 = PTR_SEG_TO_LIN(*plParam); - LPRECT32 lprect32 = HeapAlloc( SystemHeap, 0, + LPRECT lprect32 = HeapAlloc( SystemHeap, 0, sizeof(*lprect32) ); CONV_RECT16TO32( lprect16, lprect32 ); @@ -184,14 +184,14 @@ case WH_MOUSE: { LPMOUSEHOOKSTRUCT16 lpms16 = PTR_SEG_TO_LIN(*plParam); - LPMOUSEHOOKSTRUCT32 lpms32 = HeapAlloc( SystemHeap, 0, + LPMOUSEHOOKSTRUCT lpms32 = HeapAlloc( SystemHeap, 0, sizeof(*lpms32) ); CONV_POINT16TO32( &lpms16->pt, &lpms32->pt ); /* wHitTestCode may be negative, so convince compiler to do correct sign extension. Yay. :| */ - lpms32->wHitTestCode = (INT32)((INT16)lpms16->wHitTestCode); + lpms32->wHitTestCode = (INT)((INT16)lpms16->wHitTestCode); lpms32->dwExtraInfo = lpms16->dwExtraInfo; lpms32->hwnd = lpms16->hwnd; *plParam = (LPARAM)lpms32; @@ -201,7 +201,7 @@ case WH_DEBUG: { LPDEBUGHOOKINFO16 lpdh16 = PTR_SEG_TO_LIN(*plParam); - LPDEBUGHOOKINFO32 lpdh32 = HeapAlloc( SystemHeap, 0, + LPDEBUGHOOKINFO lpdh32 = HeapAlloc( SystemHeap, 0, sizeof(*lpdh32) ); lpdh32->idThread = 0; /* FIXME */ @@ -232,7 +232,7 @@ /*********************************************************************** * HOOK_Map16To32A */ -static void HOOK_Map16To32A(INT32 id, INT32 code, WPARAM32 *pwParam, +static void HOOK_Map16To32A(INT id, INT code, WPARAM *pwParam, LPARAM *plParam) { HOOK_Map16To32Common( id, code, pwParam, plParam, TRUE ); @@ -242,7 +242,7 @@ /*********************************************************************** * HOOK_Map16To32W */ -static void HOOK_Map16To32W(INT32 id, INT32 code, WPARAM32 *pwParam, +static void HOOK_Map16To32W(INT id, INT code, WPARAM *pwParam, LPARAM *plParam) { HOOK_Map16To32Common( id, code, pwParam, plParam, FALSE ); @@ -252,9 +252,9 @@ /*********************************************************************** * HOOK_UnMap16To32Common */ -static void HOOK_UnMap16To32Common(INT32 id, INT32 code, WPARAM32 wParamOrig, - LPARAM lParamOrig, WPARAM32 wParam, - LPARAM lParam, BOOL32 bA) +static void HOOK_UnMap16To32Common(INT id, INT code, WPARAM wParamOrig, + LPARAM lParamOrig, WPARAM wParam, + LPARAM lParam, BOOL bA) { switch (id) { @@ -268,7 +268,7 @@ case WH_CALLWNDPROC: { - LPCWPSTRUCT32 lpcwp32 = (LPCWPSTRUCT32)lParam; + LPCWPSTRUCT lpcwp32 = (LPCWPSTRUCT)lParam; if (bA) WINPROC_UnmapMsg16To32A( lpcwp32->hwnd,lpcwp32->message, lpcwp32->wParam, lpcwp32->lParam, 0 ); else WINPROC_UnmapMsg16To32W( lpcwp32->hwnd,lpcwp32->message, lpcwp32->wParam, @@ -280,7 +280,7 @@ case WH_GETMESSAGE: { LPMSG16 lpmsg16 = PTR_SEG_TO_LIN(lParamOrig); - STRUCT32_MSG32to16( (LPMSG32)lParam, lpmsg16 ); + STRUCT32_MSG32to16( (LPMSG)lParam, lpmsg16 ); HeapFree( SystemHeap, 0, (LPVOID)lParam ); break; } @@ -296,7 +296,7 @@ { case HCBT_CREATEWND: { - LPCBT_CREATEWND32A lpcbtcw32 = (LPCBT_CREATEWND32A)lParam; + LPCBT_CREATEWNDA lpcbtcw32 = (LPCBT_CREATEWNDA)lParam; LPCBT_CREATEWND16 lpcbtcw16 = PTR_SEG_TO_LIN(lParamOrig); if( !bA ) @@ -337,8 +337,8 @@ /*********************************************************************** * HOOK_UnMap16To32A */ -static void HOOK_UnMap16To32A(INT32 id, INT32 code, WPARAM32 wParamOrig, - LPARAM lParamOrig, WPARAM32 wParam, +static void HOOK_UnMap16To32A(INT id, INT code, WPARAM wParamOrig, + LPARAM lParamOrig, WPARAM wParam, LPARAM lParam) { HOOK_UnMap16To32Common( id, code, wParamOrig, lParamOrig, wParam, @@ -349,8 +349,8 @@ /*********************************************************************** * HOOK_UnMap16To32W */ -static void HOOK_UnMap16To32W(INT32 id, INT32 code, WPARAM32 wParamOrig, - LPARAM lParamOrig, WPARAM32 wParam, +static void HOOK_UnMap16To32W(INT id, INT code, WPARAM wParamOrig, + LPARAM lParamOrig, WPARAM wParam, LPARAM lParam) { HOOK_UnMap16To32Common( id, code, wParamOrig, lParamOrig, wParam, @@ -361,8 +361,8 @@ /*********************************************************************** * HOOK_Map32To16Common */ -static void HOOK_Map32To16Common(INT32 id, INT32 code, WPARAM32 *pwParam, - LPARAM *plParam, BOOL32 bA) +static void HOOK_Map32To16Common(INT id, INT code, WPARAM *pwParam, + LPARAM *plParam, BOOL bA) { switch (id) { @@ -371,7 +371,7 @@ case WH_GETMESSAGE: case WH_JOURNALRECORD: { - LPMSG32 lpmsg32 = (LPMSG32)*plParam; + LPMSG lpmsg32 = (LPMSG)*plParam; LPMSG16 lpmsg16 = SEGPTR_NEW( MSG16 ); STRUCT32_MSG32to16( lpmsg32, lpmsg16 ); @@ -382,7 +382,7 @@ case WH_JOURNALPLAYBACK: { - LPEVENTMSG32 lpem32 = (LPEVENTMSG32)*plParam; + LPEVENTMSG lpem32 = (LPEVENTMSG)*plParam; LPEVENTMSG16 lpem16 = SEGPTR_NEW( EVENTMSG16 ); lpem16->message = lpem32->message; @@ -396,7 +396,7 @@ case WH_CALLWNDPROC: { - LPCWPSTRUCT32 lpcwp32 = (LPCWPSTRUCT32)*plParam; + LPCWPSTRUCT lpcwp32 = (LPCWPSTRUCT)*plParam; LPCWPSTRUCT16 lpcwp16 = SEGPTR_NEW( CWPSTRUCT16 ); lpcwp16->hwnd = lpcwp32->hwnd; @@ -417,7 +417,7 @@ { case HCBT_ACTIVATE: { - LPCBTACTIVATESTRUCT32 lpcas32 = (LPCBTACTIVATESTRUCT32)*plParam; + LPCBTACTIVATESTRUCT lpcas32 = (LPCBTACTIVATESTRUCT)*plParam; LPCBTACTIVATESTRUCT16 lpcas16 =SEGPTR_NEW( CBTACTIVATESTRUCT16 ); lpcas16->fMouse = lpcas32->fMouse; @@ -429,7 +429,7 @@ case HCBT_CLICKSKIPPED: { - LPMOUSEHOOKSTRUCT32 lpms32 = (LPMOUSEHOOKSTRUCT32)*plParam; + LPMOUSEHOOKSTRUCT lpms32 = (LPMOUSEHOOKSTRUCT)*plParam; LPMOUSEHOOKSTRUCT16 lpms16 = SEGPTR_NEW( MOUSEHOOKSTRUCT16 ); CONV_POINT32TO16( &lpms32->pt, &lpms16->pt ); @@ -444,7 +444,7 @@ case HCBT_MOVESIZE: { - LPRECT32 lprect32 = (LPRECT32)*plParam; + LPRECT lprect32 = (LPRECT)*plParam; LPRECT16 lprect16 = SEGPTR_NEW( RECT16 ); CONV_RECT32TO16( lprect32, lprect16 ); @@ -457,7 +457,7 @@ case WH_MOUSE: { - LPMOUSEHOOKSTRUCT32 lpms32 = (LPMOUSEHOOKSTRUCT32)*plParam; + LPMOUSEHOOKSTRUCT lpms32 = (LPMOUSEHOOKSTRUCT)*plParam; LPMOUSEHOOKSTRUCT16 lpms16 = SEGPTR_NEW( MOUSEHOOKSTRUCT16 ); CONV_POINT32TO16( &lpms32->pt, &lpms16->pt ); @@ -472,7 +472,7 @@ case WH_DEBUG: { - LPDEBUGHOOKINFO32 lpdh32 = (LPDEBUGHOOKINFO32)*plParam; + LPDEBUGHOOKINFO lpdh32 = (LPDEBUGHOOKINFO)*plParam; LPDEBUGHOOKINFO16 lpdh16 = SEGPTR_NEW( DEBUGHOOKINFO16 ); lpdh16->hModuleHook = 0; /* FIXME */ @@ -500,12 +500,12 @@ /*********************************************************************** * HOOK_Map32ATo16 */ -static void HOOK_Map32ATo16(INT32 id, INT32 code, WPARAM32 *pwParam, +static void HOOK_Map32ATo16(INT id, INT code, WPARAM *pwParam, LPARAM *plParam) { if (id == WH_CBT && code == HCBT_CREATEWND) { - LPCBT_CREATEWND32A lpcbtcw32 = (LPCBT_CREATEWND32A)*plParam; + LPCBT_CREATEWNDA lpcbtcw32 = (LPCBT_CREATEWNDA)*plParam; LPCBT_CREATEWND16 lpcbtcw16 = SEGPTR_NEW( CBT_CREATEWND16 ); LPCREATESTRUCT16 lpcs16 = SEGPTR_NEW( CREATESTRUCT16 ); @@ -535,18 +535,18 @@ /*********************************************************************** * HOOK_Map32WTo16 */ -static void HOOK_Map32WTo16(INT32 id, INT32 code, WPARAM32 *pwParam, +static void HOOK_Map32WTo16(INT id, INT code, WPARAM *pwParam, LPARAM *plParam) { if (id == WH_CBT && code == HCBT_CREATEWND) { LPSTR name, cls; - LPCBT_CREATEWND32W lpcbtcw32 = (LPCBT_CREATEWND32W)*plParam; + LPCBT_CREATEWNDW lpcbtcw32 = (LPCBT_CREATEWNDW)*plParam; LPCBT_CREATEWND16 lpcbtcw16 = SEGPTR_NEW( CBT_CREATEWND16 ); LPCREATESTRUCT16 lpcs16 = SEGPTR_NEW( CREATESTRUCT16 ); lpcbtcw16->lpcs = (LPCREATESTRUCT16)SEGPTR_GET( lpcs16 ); - STRUCT32_CREATESTRUCT32Ato16( (LPCREATESTRUCT32A)lpcbtcw32->lpcs, + STRUCT32_CREATESTRUCT32Ato16( (LPCREATESTRUCTA)lpcbtcw32->lpcs, lpcs16 ); name = SEGPTR_STRDUP_WtoA( lpcbtcw32->lpcs->lpszName ); @@ -564,9 +564,9 @@ /*********************************************************************** * HOOK_UnMap32To16Common */ -static void HOOK_UnMap32To16Common(INT32 id, INT32 code, WPARAM32 wParamOrig, - LPARAM lParamOrig, WPARAM32 wParam, - LPARAM lParam, BOOL32 bA) +static void HOOK_UnMap32To16Common(INT id, INT code, WPARAM wParamOrig, + LPARAM lParamOrig, WPARAM wParam, + LPARAM lParam, BOOL bA) { switch (id) { @@ -582,7 +582,7 @@ case WH_CALLWNDPROC: { LPCWPSTRUCT16 lpcwp16 = (LPCWPSTRUCT16)PTR_SEG_TO_LIN(lParam); - LPCWPSTRUCT32 lpcwp32 = (LPCWPSTRUCT32)lParamOrig; + LPCWPSTRUCT lpcwp32 = (LPCWPSTRUCT)lParamOrig; MSGPARAM16 mp16 = { lpcwp16->wParam, lpcwp16->lParam, 0 }; if (bA) WINPROC_UnmapMsg32ATo16( lpcwp32->hwnd,lpcwp32->message, lpcwp32->wParam, @@ -595,7 +595,7 @@ case WH_GETMESSAGE: { - LPMSG32 lpmsg32 = (LPMSG32)lParamOrig; + LPMSG lpmsg32 = (LPMSG)lParamOrig; STRUCT32_MSG16to32( (LPMSG16)PTR_SEG_TO_LIN(lParam), lpmsg32 ); SEGPTR_FREE( PTR_SEG_TO_LIN(lParam) ); @@ -607,7 +607,7 @@ { case HCBT_CREATEWND: { - LPCBT_CREATEWND32A lpcbtcw32 = (LPCBT_CREATEWND32A)(lParamOrig); + LPCBT_CREATEWNDA lpcbtcw32 = (LPCBT_CREATEWNDA)(lParamOrig); LPCBT_CREATEWND16 lpcbtcw16 = PTR_SEG_TO_LIN(lParam); LPCREATESTRUCT16 lpcs16 = PTR_SEG_TO_LIN(lpcbtcw16->lpcs); @@ -646,8 +646,8 @@ /*********************************************************************** * HOOK_UnMap32ATo16 */ -static void HOOK_UnMap32ATo16(INT32 id, INT32 code, WPARAM32 wParamOrig, - LPARAM lParamOrig, WPARAM32 wParam, +static void HOOK_UnMap32ATo16(INT id, INT code, WPARAM wParamOrig, + LPARAM lParamOrig, WPARAM wParam, LPARAM lParam) { HOOK_UnMap32To16Common( id, code, wParamOrig, lParamOrig, wParam, @@ -658,8 +658,8 @@ /*********************************************************************** * HOOK_UnMap32WTo16 */ -static void HOOK_UnMap32WTo16(INT32 id, INT32 code, WPARAM32 wParamOrig, - LPARAM lParamOrig, WPARAM32 wParam, +static void HOOK_UnMap32WTo16(INT id, INT code, WPARAM wParamOrig, + LPARAM lParamOrig, WPARAM wParam, LPARAM lParam) { HOOK_UnMap32To16Common( id, code, wParamOrig, lParamOrig, wParam, @@ -670,18 +670,18 @@ /*********************************************************************** * HOOK_Map32ATo32W */ -static void HOOK_Map32ATo32W(INT32 id, INT32 code, WPARAM32 *pwParam, +static void HOOK_Map32ATo32W(INT id, INT code, WPARAM *pwParam, LPARAM *plParam) { if (id == WH_CBT && code == HCBT_CREATEWND) { - LPCBT_CREATEWND32A lpcbtcwA = (LPCBT_CREATEWND32A)*plParam; - LPCBT_CREATEWND32W lpcbtcwW = HeapAlloc( SystemHeap, 0, + LPCBT_CREATEWNDA lpcbtcwA = (LPCBT_CREATEWNDA)*plParam; + LPCBT_CREATEWNDW lpcbtcwW = HeapAlloc( SystemHeap, 0, sizeof(*lpcbtcwW) ); lpcbtcwW->lpcs = HeapAlloc( SystemHeap, 0, sizeof(*lpcbtcwW->lpcs) ); lpcbtcwW->hwndInsertAfter = lpcbtcwA->hwndInsertAfter; - *lpcbtcwW->lpcs = *(LPCREATESTRUCT32W)lpcbtcwA->lpcs; + *lpcbtcwW->lpcs = *(LPCREATESTRUCTW)lpcbtcwA->lpcs; if (HIWORD(lpcbtcwA->lpcs->lpszName)) { @@ -707,13 +707,13 @@ /*********************************************************************** * HOOK_UnMap32ATo32W */ -static void HOOK_UnMap32ATo32W(INT32 id, INT32 code, WPARAM32 wParamOrig, - LPARAM lParamOrig, WPARAM32 wParam, +static void HOOK_UnMap32ATo32W(INT id, INT code, WPARAM wParamOrig, + LPARAM lParamOrig, WPARAM wParam, LPARAM lParam) { if (id == WH_CBT && code == HCBT_CREATEWND) { - LPCBT_CREATEWND32W lpcbtcwW = (LPCBT_CREATEWND32W)lParam; + LPCBT_CREATEWNDW lpcbtcwW = (LPCBT_CREATEWNDW)lParam; if (HIWORD(lpcbtcwW->lpcs->lpszName)) HeapFree( SystemHeap, 0, (LPWSTR)lpcbtcwW->lpcs->lpszName ); if (HIWORD(lpcbtcwW->lpcs->lpszClass)) @@ -728,18 +728,18 @@ /*********************************************************************** * HOOK_Map32WTo32A */ -static void HOOK_Map32WTo32A(INT32 id, INT32 code, WPARAM32 *pwParam, +static void HOOK_Map32WTo32A(INT id, INT code, WPARAM *pwParam, LPARAM *plParam) { if (id == WH_CBT && code == HCBT_CREATEWND) { - LPCBT_CREATEWND32W lpcbtcwW = (LPCBT_CREATEWND32W)*plParam; - LPCBT_CREATEWND32A lpcbtcwA = HeapAlloc( SystemHeap, 0, + LPCBT_CREATEWNDW lpcbtcwW = (LPCBT_CREATEWNDW)*plParam; + LPCBT_CREATEWNDA lpcbtcwA = HeapAlloc( SystemHeap, 0, sizeof(*lpcbtcwA) ); lpcbtcwA->lpcs = HeapAlloc( SystemHeap, 0, sizeof(*lpcbtcwA->lpcs) ); lpcbtcwA->hwndInsertAfter = lpcbtcwW->hwndInsertAfter; - *lpcbtcwA->lpcs = *(LPCREATESTRUCT32A)lpcbtcwW->lpcs; + *lpcbtcwA->lpcs = *(LPCREATESTRUCTA)lpcbtcwW->lpcs; if (HIWORD(lpcbtcwW->lpcs->lpszName)) lpcbtcwA->lpcs->lpszName = HEAP_strdupWtoA( SystemHeap, 0, @@ -761,13 +761,13 @@ /*********************************************************************** * HOOK_UnMap32WTo32A */ -static void HOOK_UnMap32WTo32A(INT32 id, INT32 code, WPARAM32 wParamOrig, - LPARAM lParamOrig, WPARAM32 wParam, +static void HOOK_UnMap32WTo32A(INT id, INT code, WPARAM wParamOrig, + LPARAM lParamOrig, WPARAM wParam, LPARAM lParam) { if (id == WH_CBT && code == HCBT_CREATEWND) { - LPCBT_CREATEWND32A lpcbtcwA = (LPCBT_CREATEWND32A)lParam; + LPCBT_CREATEWNDA lpcbtcwA = (LPCBT_CREATEWNDA)lParam; if (HIWORD(lpcbtcwA->lpcs->lpszName)) HeapFree( SystemHeap, 0, (LPSTR)lpcbtcwA->lpcs->lpszName ); if (HIWORD(lpcbtcwA->lpcs->lpszClass)) @@ -843,7 +843,7 @@ * * Install a given hook. */ -static HHOOK HOOK_SetHook( INT16 id, LPVOID proc, INT32 type, +static HHOOK HOOK_SetHook( INT16 id, LPVOID proc, INT type, HMODULE16 hModule, DWORD dwThreadId ) { HOOKDATA *data; @@ -853,18 +853,18 @@ if ((id < WH_MINHOOK) || (id > WH_MAXHOOK)) return 0; TRACE(hook, "Setting hook %d: %08x %04x %08lx\n", - id, (UINT32)proc, hModule, dwThreadId ); + id, (UINT)proc, hModule, dwThreadId ); /* Create task queue if none present */ - GetFastQueue(); + GetFastQueue16(); - if (id == WH_JOURNALPLAYBACK) EnableHardwareInput(FALSE); + if (id == WH_JOURNALPLAYBACK) EnableHardwareInput16(FALSE); if (dwThreadId) /* Task-specific hook */ { if ((id == WH_JOURNALRECORD) || (id == WH_JOURNALPLAYBACK) || (id == WH_SYSMSGFILTER)) return 0; /* System-only hooks */ - if (!(hQueue = GetThreadQueue( dwThreadId ))) + if (!(hQueue = GetThreadQueue16( dwThreadId ))) return 0; } @@ -904,7 +904,7 @@ * * Remove a hook from the list. */ -static BOOL32 HOOK_RemoveHook( HANDLE16 hook ) +static BOOL HOOK_RemoveHook( HANDLE16 hook ) { HOOKDATA *data; HANDLE16 *prevHook; @@ -916,11 +916,11 @@ { /* Mark it for deletion later on */ WARN(hook, "Hook still running, deletion delayed\n" ); - data->proc = (HOOKPROC32)0; + data->proc = (HOOKPROC)0; return TRUE; } - if (data->id == WH_JOURNALPLAYBACK) EnableHardwareInput(TRUE); + if (data->id == WH_JOURNALPLAYBACK) EnableHardwareInput16(TRUE); /* Remove it from the linked list */ @@ -964,15 +964,15 @@ * * Call a hook procedure. */ -static LRESULT HOOK_CallHook( HANDLE16 hook, INT32 fromtype, INT32 code, - WPARAM32 wParam, LPARAM lParam ) +static LRESULT HOOK_CallHook( HANDLE16 hook, INT fromtype, INT code, + WPARAM wParam, LPARAM lParam ) { MESSAGEQUEUE *queue; HANDLE16 prevHook; HOOKDATA *data = (HOOKDATA *)USER_HEAP_LIN_ADDR(hook); LRESULT ret; - WPARAM32 wParamOrig = wParam; + WPARAM wParamOrig = wParam; LPARAM lParamOrig = lParam; HOOK_MapFunc MapFunc; HOOK_UnMapFunc UnMapFunc; @@ -985,7 +985,7 @@ /* Now call it */ - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return 0; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return 0; prevHook = queue->hCurHook; queue->hCurHook = hook; data->flags |= HOOK_INUSE; @@ -1034,12 +1034,12 @@ * * Replacement for calling HOOK_GetHook from other modules. */ -BOOL32 HOOK_IsHooked( INT16 id ) +BOOL HOOK_IsHooked( INT16 id ) { /* Hmmm. Use GetThreadQueue(0) instead of GetFastQueue() here to avoid queue being created if someone wants to merely check ... */ - return HOOK_GetHook( id, GetThreadQueue(0) ) != 0; + return HOOK_GetHook( id, GetThreadQueue16(0) ) != 0; } @@ -1053,7 +1053,7 @@ { HANDLE16 hook; - if (!(hook = HOOK_GetHook( id, GetFastQueue() ))) return 0; + if (!(hook = HOOK_GetHook( id, GetFastQueue16() ))) return 0; if (!(hook = HOOK_FindValidHook(hook))) return 0; return HOOK_CallHook( hook, HOOK_WIN16, code, wParam, lParam ); } @@ -1063,12 +1063,12 @@ * * Call a hook chain. */ -LRESULT HOOK_CallHooks32A( INT32 id, INT32 code, WPARAM32 wParam, +LRESULT HOOK_CallHooksA( INT id, INT code, WPARAM wParam, LPARAM lParam ) { HANDLE16 hook; - if (!(hook = HOOK_GetHook( id, GetFastQueue() ))) return 0; + if (!(hook = HOOK_GetHook( id, GetFastQueue16() ))) return 0; if (!(hook = HOOK_FindValidHook(hook))) return 0; return HOOK_CallHook( hook, HOOK_WIN32A, code, wParam, lParam ); } @@ -1078,12 +1078,12 @@ * * Call a hook chain. */ -LRESULT HOOK_CallHooks32W( INT32 id, INT32 code, WPARAM32 wParam, +LRESULT HOOK_CallHooksW( INT id, INT code, WPARAM wParam, LPARAM lParam ) { HANDLE16 hook; - if (!(hook = HOOK_GetHook( id, GetFastQueue() ))) return 0; + if (!(hook = HOOK_GetHook( id, GetFastQueue16() ))) return 0; if (!(hook = HOOK_FindValidHook(hook))) return 0; return HOOK_CallHook( hook, HOOK_WIN32W, code, wParam, lParam ); @@ -1183,7 +1183,7 @@ */ FARPROC16 WINAPI SetWindowsHook16( INT16 id, HOOKPROC16 proc ) { - HINSTANCE16 hInst = FarGetOwner( HIWORD(proc) ); + HINSTANCE16 hInst = FarGetOwner16( HIWORD(proc) ); /* WH_MSGFILTER is the only task-specific hook for SetWindowsHook() */ HTASK16 hTask = (id == WH_MSGFILTER) ? GetCurrentTask() : 0; @@ -1194,17 +1194,17 @@ /*********************************************************************** * SetWindowsHook32A (USER32.525) */ -HHOOK WINAPI SetWindowsHook32A( INT32 id, HOOKPROC32 proc ) +HHOOK WINAPI SetWindowsHookA( INT id, HOOKPROC proc ) { - return SetWindowsHookEx32A( id, proc, 0, GetCurrentThreadId() ); + return SetWindowsHookExA( id, proc, 0, GetCurrentThreadId() ); } /*********************************************************************** * SetWindowsHook32W (USER32.528) */ -HHOOK WINAPI SetWindowsHook32W( INT32 id, HOOKPROC32 proc ) +HHOOK WINAPI SetWindowsHookW( INT id, HOOKPROC proc ) { - return SetWindowsHookEx32W( id, proc, 0, GetCurrentThreadId() ); + return SetWindowsHookExW( id, proc, 0, GetCurrentThreadId() ); } @@ -1225,7 +1225,7 @@ /*********************************************************************** * SetWindowsHookEx32A (USER32.526) */ -HHOOK WINAPI SetWindowsHookEx32A( INT32 id, HOOKPROC32 proc, HINSTANCE32 hInst, +HHOOK WINAPI SetWindowsHookExA( INT id, HOOKPROC proc, HINSTANCE hInst, DWORD dwThreadId ) { return HOOK_SetHook( id, proc, HOOK_WIN32A, MapHModuleLS(hInst), dwThreadId ); @@ -1234,7 +1234,7 @@ /*********************************************************************** * SetWindowsHookEx32W (USER32.527) */ -HHOOK WINAPI SetWindowsHookEx32W( INT32 id, HOOKPROC32 proc, HINSTANCE32 hInst, +HHOOK WINAPI SetWindowsHookExW( INT id, HOOKPROC proc, HINSTANCE hInst, DWORD dwThreadId ) { return HOOK_SetHook( id, proc, HOOK_WIN32W, MapHModuleLS(hInst), dwThreadId ); @@ -1246,15 +1246,15 @@ */ BOOL16 WINAPI UnhookWindowsHook16( INT16 id, HOOKPROC16 proc ) { - return UnhookWindowsHook32( id, (HOOKPROC32)proc ); + return UnhookWindowsHook( id, (HOOKPROC)proc ); } /*********************************************************************** * UnhookWindowsHook32 (USER32.557) */ -BOOL32 WINAPI UnhookWindowsHook32( INT32 id, HOOKPROC32 proc ) +BOOL WINAPI UnhookWindowsHook( INT id, HOOKPROC proc ) { - HANDLE16 hook = HOOK_GetHook( id, GetFastQueue() ); + HANDLE16 hook = HOOK_GetHook( id, GetFastQueue16() ); TRACE(hook, "%d %08lx\n", id, (DWORD)proc ); @@ -1274,13 +1274,13 @@ */ BOOL16 WINAPI UnhookWindowsHookEx16( HHOOK hhook ) { - return UnhookWindowsHookEx32( hhook ); + return UnhookWindowsHookEx( hhook ); } /*********************************************************************** * UnhookWindowHookEx32 (USER32.558) */ -BOOL32 WINAPI UnhookWindowsHookEx32( HHOOK hhook ) +BOOL WINAPI UnhookWindowsHookEx( HHOOK hhook ) { if (HIWORD(hhook) != HOOK_MAGIC) return FALSE; /* Not a new format hook */ return HOOK_RemoveHook( LOWORD(hhook) ); @@ -1310,11 +1310,11 @@ * * There aren't ANSI and UNICODE versions of this. */ -LRESULT WINAPI CallNextHookEx32( HHOOK hhook, INT32 code, WPARAM32 wParam, +LRESULT WINAPI CallNextHookEx( HHOOK hhook, INT code, WPARAM wParam, LPARAM lParam ) { HANDLE16 next; - INT32 fromtype; /* figure out Ansi/Unicode */ + INT fromtype; /* figure out Ansi/Unicode */ HOOKDATA *oldhook; if (HIWORD(hhook) != HOOK_MAGIC) return 0; /* Not a new format hook */ @@ -1341,7 +1341,7 @@ MESSAGEQUEUE *queue; LRESULT ret; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return 0; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return 0; ret = CallNextHookEx16( queue->hCurHook, code, wParam, lParam ); QUEUE_Unlock( queue ); return ret; @@ -1362,9 +1362,9 @@ /*********************************************************************** * WIN16_CallMsgFilter32 (USER.823) */ -BOOL16 WINAPI WIN16_CallMsgFilter32( SEGPTR msg16_32, INT16 code, BOOL16 wHaveParamHigh ) +BOOL16 WINAPI CallMsgFilter32_16( SEGPTR msg16_32, INT16 code, BOOL16 wHaveParamHigh ) { - MSG16_32 *lpmsg16_32 = (MSG16_32 *)PTR_SEG_TO_LIN(msg16_32); + MSG32_16 *lpmsg16_32 = (MSG32_16 *)PTR_SEG_TO_LIN(msg16_32); if (wHaveParamHigh == FALSE) { @@ -1374,7 +1374,7 @@ } else { - MSG32 msg32; + MSG msg32; BOOL16 ret; msg32.hwnd = lpmsg16_32->msg.hwnd; @@ -1383,10 +1383,10 @@ MAKELONG(lpmsg16_32->msg.wParam, lpmsg16_32->wParamHigh); msg32.lParam = lpmsg16_32->msg.lParam; msg32.time = lpmsg16_32->msg.time; - msg32.pt.x = (INT32)lpmsg16_32->msg.pt.x; - msg32.pt.y = (INT32)lpmsg16_32->msg.pt.y; + msg32.pt.x = (INT)lpmsg16_32->msg.pt.x; + msg32.pt.y = (INT)lpmsg16_32->msg.pt.y; - ret = (BOOL16)CallMsgFilter32A(&msg32, (INT32)code); + ret = (BOOL16)CallMsgFilterA(&msg32, (INT)code); lpmsg16_32->msg.hwnd = msg32.hwnd; lpmsg16_32->msg.message = msg32.message; @@ -1409,23 +1409,23 @@ * FIXME: There are ANSI and UNICODE versions of this, plus an unspecified * version, plus USER (the 16bit one) has a CallMsgFilter32 function. */ -BOOL32 WINAPI CallMsgFilter32A( LPMSG32 msg, INT32 code ) +BOOL WINAPI CallMsgFilterA( LPMSG msg, INT code ) { if (GetSysModalWindow16()) return FALSE; /* ??? */ - if (HOOK_CallHooks32A( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) + if (HOOK_CallHooksA( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) return TRUE; - return HOOK_CallHooks32A( WH_MSGFILTER, code, 0, (LPARAM)msg ); + return HOOK_CallHooksA( WH_MSGFILTER, code, 0, (LPARAM)msg ); } /*********************************************************************** * CallMsgFilter32W (USER32.16) */ -BOOL32 WINAPI CallMsgFilter32W( LPMSG32 msg, INT32 code ) +BOOL WINAPI CallMsgFilterW( LPMSG msg, INT code ) { if (GetSysModalWindow16()) return FALSE; /* ??? */ - if (HOOK_CallHooks32W( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) + if (HOOK_CallHooksW( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) return TRUE; - return HOOK_CallHooks32W( WH_MSGFILTER, code, 0, (LPARAM)msg ); + return HOOK_CallHooksW( WH_MSGFILTER, code, 0, (LPARAM)msg ); }
diff --git a/windows/input.c b/windows/input.c index f1660f5..8fd22a2 100644 --- a/windows/input.c +++ b/windows/input.c
@@ -32,11 +32,11 @@ #include "winerror.h" #include "task.h" -static BOOL32 InputEnabled = TRUE; -static BOOL32 SwappedButtons = FALSE; +static BOOL InputEnabled = TRUE; +static BOOL SwappedButtons = FALSE; -BOOL32 MouseButtonsStates[3]; -BOOL32 AsyncMouseButtonsStates[3]; +BOOL MouseButtonsStates[3]; +BOOL AsyncMouseButtonsStates[3]; BYTE InputKeyStateTable[256]; BYTE QueueKeyStateTable[256]; BYTE AsyncKeyStateTable[256]; @@ -76,7 +76,7 @@ * Otherwise, we need to determine that info ourselves (probably * less accurate, but we can't help that ...). */ - if ( !IsBadReadPtr32( (LPVOID)dwExtraInfo, sizeof(WINE_KEYBDEVENT) ) + if ( !IsBadReadPtr( (LPVOID)dwExtraInfo, sizeof(WINE_KEYBDEVENT) ) && ((WINE_KEYBDEVENT *)dwExtraInfo)->magic == WINE_KEYBDEVENT_MAGIC ) { WINE_KEYBDEVENT *wke = (WINE_KEYBDEVENT *)dwExtraInfo; @@ -106,7 +106,7 @@ if ( dwFlags & KEYEVENTF_KEYUP ) { - BOOL32 sysKey = (InputKeyStateTable[VK_MENU] & 0x80) + BOOL sysKey = (InputKeyStateTable[VK_MENU] & 0x80) && !(InputKeyStateTable[VK_CONTROL] & 0x80) && !(dwFlags & KEYEVENTF_WINE_FORCEEXTENDED); /* for Alt from AltGr */ @@ -155,7 +155,7 @@ * Otherwise, we need to determine that info ourselves (probably * less accurate, but we can't help that ...). */ - if ( !IsBadReadPtr32( (LPVOID)dwExtraInfo, sizeof(WINE_MOUSEEVENT) ) + if ( !IsBadReadPtr( (LPVOID)dwExtraInfo, sizeof(WINE_MOUSEEVENT) ) && ((WINE_MOUSEEVENT *)dwExtraInfo)->magic == WINE_MOUSEEVENT_MAGIC ) { WINE_MOUSEEVENT *wme = (WINE_MOUSEEVENT *)dwExtraInfo; @@ -188,7 +188,7 @@ posY += dy; } /* We have to actually move the cursor */ - SetCursorPos32( posX, posY ); + SetCursorPos( posX, posY ); } } @@ -238,7 +238,7 @@ /********************************************************************** * EnableHardwareInput (USER.331) */ -BOOL16 WINAPI EnableHardwareInput(BOOL16 bEnable) +BOOL16 WINAPI EnableHardwareInput16(BOOL16 bEnable) { BOOL16 bOldState = InputEnabled; FIXME(event,"(%d) - stub\n", bEnable); @@ -261,9 +261,9 @@ /*********************************************************************** * SwapMouseButton32 (USER32.537) */ -BOOL32 WINAPI SwapMouseButton32( BOOL32 fSwap ) +BOOL WINAPI SwapMouseButton( BOOL fSwap ) { - BOOL32 ret = SwappedButtons; + BOOL ret = SwappedButtons; SwappedButtons = fSwap; return ret; } @@ -274,15 +274,15 @@ * We need this to be able to generate double click messages * when menu code captures mouse in the window without CS_DBLCLK style. */ -HWND32 EVENT_Capture(HWND32 hwnd, INT16 ht) +HWND EVENT_Capture(HWND hwnd, INT16 ht) { - HWND32 capturePrev = 0, captureWnd = 0; + HWND capturePrev = 0, captureWnd = 0; MESSAGEQUEUE *pMsgQ = 0, *pCurMsgQ = 0; WND* wndPtr = 0; INT16 captureHT = 0; /* Get the messageQ for the current thread */ - if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) + if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) { WARN( win, "\tCurrent message queue not found. Exiting!\n" ); goto CLEANUP; @@ -334,7 +334,7 @@ { WND* wndPtr = WIN_FindWndPtr( capturePrev ); if( wndPtr && (wndPtr->flags & WIN_ISWIN32) ) - SendMessage32A( capturePrev, WM_CAPTURECHANGED, 0L, hwnd); + SendMessageA( capturePrev, WM_CAPTURECHANGED, 0L, hwnd); } } @@ -361,7 +361,7 @@ /********************************************************************** * SetCapture32 (USER32.464) */ -HWND32 WINAPI SetCapture32( HWND32 hwnd ) +HWND WINAPI SetCapture( HWND hwnd ) { return EVENT_Capture( hwnd, HTCLIENT ); } @@ -381,19 +381,19 @@ */ HWND16 WINAPI GetCapture16(void) { - return (HWND16)GetCapture32(); + return (HWND16)GetCapture(); } /********************************************************************** * GetCapture32 (USER32.208) */ -HWND32 WINAPI GetCapture32(void) +HWND WINAPI GetCapture(void) { MESSAGEQUEUE *pCurMsgQ = 0; - HWND32 hwndCapture = 0; + HWND hwndCapture = 0; /* Get the messageQ for the current thread */ - if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) + if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) { TRACE( win, "GetCapture32: Current message queue not found. Exiting!\n" ); return 0; @@ -411,7 +411,7 @@ */ INT16 WINAPI GetKeyState16(INT16 vkey) { - return GetKeyState32(vkey); + return GetKeyState(vkey); } /********************************************************************** @@ -421,9 +421,9 @@ * keyboard-input message. This function retrieves the state of the key * at the time the input message was generated. (SDK 3.1 Vol 2. p 390) */ -INT16 WINAPI GetKeyState32(INT32 vkey) +INT16 WINAPI GetKeyState(INT vkey) { - INT32 retval; + INT retval; switch (vkey) { @@ -491,7 +491,7 @@ * mouse or key had been depressed since the last call to * GetAsyncKeyState. */ -WORD WINAPI GetAsyncKeyState32(INT32 nKey) +WORD WINAPI GetAsyncKeyState(INT nKey) { short retval; @@ -527,7 +527,7 @@ */ WORD WINAPI GetAsyncKeyState16(INT16 nKey) { - return GetAsyncKeyState32(nKey); + return GetAsyncKeyState(nKey); } /********************************************************************** @@ -535,10 +535,10 @@ * * FIXME: should send some WM_INITMENU or/and WM_INITMENUPOPUP -messages */ -static BOOL32 KBD_translate_accelerator(HWND32 hWnd,LPMSG32 msg, +static BOOL KBD_translate_accelerator(HWND hWnd,LPMSG msg, BYTE fVirt,WORD key,WORD cmd) { - BOOL32 sendmsg = FALSE; + BOOL sendmsg = FALSE; if(msg->wParam == key) { @@ -551,12 +551,12 @@ } } else { if(fVirt & FVIRTKEY) { - INT32 mask = 0; + INT mask = 0; TRACE(accel,"found accel for virt_key %04x (scan %04x)\n", msg->wParam,0xff & HIWORD(msg->lParam)); - if(GetKeyState32(VK_SHIFT) & 0x8000) mask |= FSHIFT; - if(GetKeyState32(VK_CONTROL) & 0x8000) mask |= FCONTROL; - if(GetKeyState32(VK_MENU) & 0x8000) mask |= FALT; + if(GetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT; + if(GetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL; + if(GetKeyState(VK_MENU) & 0x8000) mask |= FALT; if(mask == (fVirt & (FSHIFT | FCONTROL | FALT))) sendmsg=TRUE; else @@ -583,19 +583,19 @@ if (msg->message == WM_KEYUP || msg->message == WM_SYSKEYUP) mesg=1; else - if (GetCapture32()) + if (GetCapture()) mesg=2; else - if (!IsWindowEnabled32(hWnd)) + if (!IsWindowEnabled(hWnd)) mesg=3; else { WND* wndPtr = WIN_FindWndPtr(hWnd); - hMenu = (wndPtr->dwStyle & WS_CHILD) ? 0 : (HMENU32)wndPtr->wIDmenu; - iSysStat = (wndPtr->hSysMenu) ? GetMenuState32(GetSubMenu16(wndPtr->hSysMenu, 0), + hMenu = (wndPtr->dwStyle & WS_CHILD) ? 0 : (HMENU)wndPtr->wIDmenu; + iSysStat = (wndPtr->hSysMenu) ? GetMenuState(GetSubMenu16(wndPtr->hSysMenu, 0), cmd, MF_BYCOMMAND) : -1 ; - iStat = (hMenu) ? GetMenuState32(hMenu, + iStat = (hMenu) ? GetMenuState(hMenu, cmd, MF_BYCOMMAND) : -1 ; if (iSysStat!=-1) @@ -609,7 +609,7 @@ { if (iStat!=-1) { - if (IsIconic32(hWnd)) + if (IsIconic(hWnd)) mesg=5; else { @@ -628,7 +628,7 @@ TRACE(accel,", sending %s, wParam=%0x\n", mesg==WM_COMMAND ? "WM_COMMAND" : "WM_SYSCOMMAND", cmd); - SendMessage32A(hWnd, mesg, cmd, 0x00010000L); + SendMessageA(hWnd, mesg, cmd, 0x00010000L); } else { @@ -654,7 +654,7 @@ /********************************************************************** * TranslateAccelerator32 (USER32.551)(USER32.552)(USER32.553) */ -INT32 WINAPI TranslateAccelerator32(HWND32 hWnd, HACCEL32 hAccel, LPMSG32 msg) +INT WINAPI TranslateAccelerator(HWND hWnd, HACCEL hAccel, LPMSG msg) { /* YES, Accel16! */ LPACCEL16 lpAccelTbl = (LPACCEL16)LockResource16(hAccel); @@ -695,7 +695,7 @@ { LPACCEL16 lpAccelTbl = (LPACCEL16)LockResource16(hAccel); int i; - MSG32 msg32; + MSG msg32; if (hAccel == 0 || msg == NULL || (msg->message != WM_KEYDOWN && @@ -728,7 +728,7 @@ /********************************************************************** * VkKeyScanA (USER32.573) */ -WORD WINAPI VkKeyScan32A(CHAR cChar) +WORD WINAPI VkKeyScanA(CHAR cChar) { return VkKeyScan16(cChar); } @@ -736,15 +736,15 @@ /****************************************************************************** * VkKeyScanW (USER32.576) */ -WORD WINAPI VkKeyScan32W(WCHAR cChar) +WORD WINAPI VkKeyScanW(WCHAR cChar) { - return VkKeyScan32A((CHAR)cChar); /* FIXME: check unicode */ + return VkKeyScanA((CHAR)cChar); /* FIXME: check unicode */ } /****************************************************************************** * GetKeyboardType32 (USER32.255) */ -INT32 WINAPI GetKeyboardType32(INT32 nTypeFlag) +INT WINAPI GetKeyboardType(INT nTypeFlag) { return GetKeyboardType16(nTypeFlag); } @@ -752,7 +752,7 @@ /****************************************************************************** * MapVirtualKey32A (USER32.383) */ -UINT32 WINAPI MapVirtualKey32A(UINT32 code, UINT32 maptype) +UINT WINAPI MapVirtualKeyA(UINT code, UINT maptype) { return MapVirtualKey16(code,maptype); } @@ -760,7 +760,7 @@ /****************************************************************************** * MapVirtualKey32W (USER32.385) */ -UINT32 WINAPI MapVirtualKey32W(UINT32 code, UINT32 maptype) +UINT WINAPI MapVirtualKeyW(UINT code, UINT maptype) { return MapVirtualKey16(code,maptype); } @@ -768,7 +768,7 @@ /****************************************************************************** * MapVirtualKeyEx32A (USER32.384) */ -UINT32 WINAPI MapVirtualKeyEx32A(UINT32 code, UINT32 maptype, HKL32 hkl) +UINT WINAPI MapVirtualKeyEx32A(UINT code, UINT maptype, HKL hkl) { if (hkl) FIXME(keyboard,"(%d,%d,0x%08lx), hkl unhandled!\n",code,maptype,(DWORD)hkl); @@ -778,7 +778,7 @@ /**************************************************************************** * GetKBCodePage32 (USER32.246) */ -UINT32 WINAPI GetKBCodePage32(void) +UINT WINAPI GetKBCodePage(void) { return GetKBCodePage16(); } @@ -788,13 +788,13 @@ */ INT16 WINAPI GetKeyboardLayoutName16(LPSTR pwszKLID) { - return GetKeyboardLayoutName32A(pwszKLID); + return GetKeyboardLayoutNameA(pwszKLID); } /**************************************************************************** * GetKeyboardLayoutName32A (USER32.252) */ -INT32 WINAPI GetKeyboardLayoutName32A(LPSTR pwszKLID) +INT WINAPI GetKeyboardLayoutNameA(LPSTR pwszKLID) { FIXME(keyboard,"always returns primary U.S. English layout\n"); strcpy(pwszKLID,"00000409"); @@ -804,10 +804,10 @@ /**************************************************************************** * GetKeyboardLayoutName32W (USER32.253) */ -INT32 WINAPI GetKeyboardLayoutName32W(LPWSTR pwszKLID) +INT WINAPI GetKeyboardLayoutNameW(LPWSTR pwszKLID) { LPSTR buf = HEAP_xalloc( GetProcessHeap(), 0, strlen("00000409")+1); - int res = GetKeyboardLayoutName32A(buf); + int res = GetKeyboardLayoutNameA(buf); lstrcpyAtoW(pwszKLID,buf); HeapFree( GetProcessHeap(), 0, buf ); return res; @@ -816,7 +816,7 @@ /**************************************************************************** * GetKeyNameText32A (USER32.247) */ -INT32 WINAPI GetKeyNameText32A(LONG lParam, LPSTR lpBuffer, INT32 nSize) +INT WINAPI GetKeyNameTextA(LONG lParam, LPSTR lpBuffer, INT nSize) { return GetKeyNameText16(lParam,lpBuffer,nSize); } @@ -824,10 +824,10 @@ /**************************************************************************** * GetKeyNameText32W (USER32.248) */ -INT32 WINAPI GetKeyNameText32W(LONG lParam, LPWSTR lpBuffer, INT32 nSize) +INT WINAPI GetKeyNameTextW(LONG lParam, LPWSTR lpBuffer, INT nSize) { LPSTR buf = HEAP_xalloc( GetProcessHeap(), 0, nSize ); - int res = GetKeyNameText32A(lParam,buf,nSize); + int res = GetKeyNameTextA(lParam,buf,nSize); lstrcpynAtoW(lpBuffer,buf,nSize); HeapFree( GetProcessHeap(), 0, buf ); @@ -837,8 +837,8 @@ /**************************************************************************** * ToAscii32 (USER32.546) */ -INT32 WINAPI ToAscii32( UINT32 virtKey,UINT32 scanCode,LPBYTE lpKeyState, - LPWORD lpChar,UINT32 flags ) +INT WINAPI ToAscii( UINT virtKey,UINT scanCode,LPBYTE lpKeyState, + LPWORD lpChar,UINT flags ) { return ToAscii16(virtKey,scanCode,lpKeyState,lpChar,flags); } @@ -846,9 +846,9 @@ /*********************************************************************** * GetKeyboardLayout (USER32.250) */ -HKL32 WINAPI GetKeyboardLayout(DWORD dwLayout) +HKL WINAPI GetKeyboardLayout(DWORD dwLayout) { - HKL32 layout; + HKL layout; FIXME(keyboard,"(%ld): stub\n",dwLayout); layout = (0xcafe<<16)|GetSystemDefaultLCID(); /* FIXME */ TRACE(keyboard,"returning %x\n",layout); @@ -858,7 +858,7 @@ /********************************************************************** * ActivateKeyboardLayout32 (USER32.1) */ -HKL32 WINAPI ActivateKeyboardLayout32(HKL32 hLayout, UINT32 flags) +HKL WINAPI ActivateKeyboardLayout(HKL hLayout, UINT flags) { FIXME(keyboard, "(%d, %d): stub\n", hLayout, flags); @@ -870,7 +870,7 @@ * GetKeyboardLayoutList (USER32.251) * FIXME */ -INT32 WINAPI GetKeyboardLayoutList(INT32 nBuff,HKL32 *layouts) +INT WINAPI GetKeyboardLayoutList(INT nBuff,HKL *layouts) { FIXME(keyboard,"(%d,%p): stub\n",nBuff,layouts); if (layouts) @@ -882,7 +882,7 @@ /*********************************************************************** * RegisterHotKey (USER32.433) */ -BOOL32 WINAPI RegisterHotKey(HWND32 hwnd,INT32 id,UINT32 modifiers,UINT32 vk) { +BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) { FIXME(keyboard,"(0x%08x,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk); return TRUE; } @@ -890,7 +890,7 @@ /*********************************************************************** * UnregisterHotKey (USER32.565) */ -BOOL32 WINAPI UnregisterHotKey(HWND32 hwnd,INT32 id) { +BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) { FIXME(keyboard,"(0x%08x,%d): stub\n",hwnd,id); return TRUE; } @@ -899,13 +899,13 @@ /*********************************************************************** * ToUnicode32 (USER32.548) */ -INT32 WINAPI ToUnicode32( - UINT32 wVirtKey, - UINT32 wScanCode, +INT WINAPI ToUnicode( + UINT wVirtKey, + UINT wScanCode, PBYTE lpKeyState, LPWSTR pwszBuff, int cchBuff, - UINT32 wFlags) { + UINT wFlags) { FIXME(keyboard,": stub\n"); return 0; @@ -914,7 +914,7 @@ /*********************************************************************** * LoadKeyboardLayout32A (USER32.367) */ -HKL32 WINAPI LoadKeyboardLayout32A(LPCSTR pwszKLID, UINT32 Flags) +HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags) { FIXME(keyboard, "%s, %d): stub\n", pwszKLID, Flags); return 0; @@ -923,7 +923,7 @@ /*********************************************************************** * LoadKeyboardLayout32W (USER32.368) */ -HKL32 WINAPI LoadKeyboardLayout32W(LPCWSTR pwszKLID, UINT32 Flags) +HKL WINAPI LoadKeyboardLayoutW(LPCWSTR pwszKLID, UINT Flags) { FIXME(keyboard, "%p, %d): stub\n", pwszKLID, Flags); return 0;
diff --git a/windows/keyboard.c b/windows/keyboard.c index 7b500ed..9df57fa 100644 --- a/windows/keyboard.c +++ b/windows/keyboard.c
@@ -67,7 +67,7 @@ VOID WINAPI KEYBOARD_Enable( LPKEYBD_EVENT_PROC lpKeybEventProc, LPBYTE lpKeyState ) { - static BOOL32 initDone = FALSE; + static BOOL initDone = FALSE; DefKeybEventProc = lpKeybEventProc; pKeyStateTable = lpKeyState; @@ -111,7 +111,7 @@ /********************************************************************** * ScreenSwitchEnable (KEYBOARD.100) */ -VOID WINAPI ScreenSwitchEnable(WORD unused) +VOID WINAPI ScreenSwitchEnable16(WORD unused) { FIXME(keyboard,"(%04x): stub\n",unused); }
diff --git a/windows/mdi.c b/windows/mdi.c index 5204be0..10c9ff3 100644 --- a/windows/mdi.c +++ b/windows/mdi.c
@@ -33,33 +33,33 @@ static HBITMAP16 hBmpClose = 0; static HBITMAP16 hBmpRestore = 0; -INT32 SCROLL_SetNCSbState(WND*,int,int,int,int,int,int); +INT SCROLL_SetNCSbState(WND*,int,int,int,int,int,int); /* ----------------- declarations ----------------- */ -static void MDI_UpdateFrameText(WND *, HWND32, BOOL32, LPCSTR); -static BOOL32 MDI_AugmentFrameMenu(MDICLIENTINFO*, WND *, HWND32); -static BOOL32 MDI_RestoreFrameMenu(WND *, HWND32); +static void MDI_UpdateFrameText(WND *, HWND, BOOL, LPCSTR); +static BOOL MDI_AugmentFrameMenu(MDICLIENTINFO*, WND *, HWND); +static BOOL MDI_RestoreFrameMenu(WND *, HWND); -static LONG MDI_ChildActivate( WND*, HWND32 ); +static LONG MDI_ChildActivate( WND*, HWND ); /* -------- Miscellaneous service functions ---------- * * MDI_GetChildByID */ -static HWND32 MDI_GetChildByID(WND* wndPtr, INT32 id) +static HWND MDI_GetChildByID(WND* wndPtr, INT id) { for (wndPtr = wndPtr->child; wndPtr; wndPtr = wndPtr->next) if (wndPtr->wIDmenu == id) return wndPtr->hwndSelf; return 0; } -static void MDI_PostUpdate(HWND32 hwnd, MDICLIENTINFO* ci, WORD recalc) +static void MDI_PostUpdate(HWND hwnd, MDICLIENTINFO* ci, WORD recalc) { if( !(ci->mdiFlags & MDIF_NEEDUPDATE) ) { ci->mdiFlags |= MDIF_NEEDUPDATE; - PostMessage32A( hwnd, WM_MDICALCCHILDSCROLL, 0, 0); + PostMessageA( hwnd, WM_MDICALCCHILDSCROLL, 0, 0); } ci->sbRecalc = recalc; } @@ -67,41 +67,41 @@ /********************************************************************** * MDI_MenuModifyItem */ -static BOOL32 MDI_MenuModifyItem(WND* clientWnd, HWND32 hWndChild ) +static BOOL MDI_MenuModifyItem(WND* clientWnd, HWND hWndChild ) { char buffer[128]; MDICLIENTINFO *clientInfo = (MDICLIENTINFO*)clientWnd->wExtra; WND *wndPtr = WIN_FindWndPtr(hWndChild); - UINT32 n = sprintf(buffer, "%d ", + UINT n = sprintf(buffer, "%d ", wndPtr->wIDmenu - clientInfo->idFirstChild + 1); - BOOL32 bRet = 0; + BOOL bRet = 0; if( !clientInfo->hWindowMenu ) return 0; - if (wndPtr->text) lstrcpyn32A(buffer + n, wndPtr->text, sizeof(buffer) - n ); + if (wndPtr->text) lstrcpynA(buffer + n, wndPtr->text, sizeof(buffer) - n ); - n = GetMenuState32(clientInfo->hWindowMenu,wndPtr->wIDmenu ,MF_BYCOMMAND); - bRet = ModifyMenu32A(clientInfo->hWindowMenu , wndPtr->wIDmenu, + n = GetMenuState(clientInfo->hWindowMenu,wndPtr->wIDmenu ,MF_BYCOMMAND); + bRet = ModifyMenuA(clientInfo->hWindowMenu , wndPtr->wIDmenu, MF_BYCOMMAND | MF_STRING, wndPtr->wIDmenu, buffer ); - CheckMenuItem32(clientInfo->hWindowMenu ,wndPtr->wIDmenu , n & MF_CHECKED); + CheckMenuItem(clientInfo->hWindowMenu ,wndPtr->wIDmenu , n & MF_CHECKED); return bRet; } /********************************************************************** * MDI_MenuDeleteItem */ -static BOOL32 MDI_MenuDeleteItem(WND* clientWnd, HWND32 hWndChild ) +static BOOL MDI_MenuDeleteItem(WND* clientWnd, HWND hWndChild ) { char buffer[128]; MDICLIENTINFO *clientInfo = (MDICLIENTINFO*)clientWnd->wExtra; WND *wndPtr = WIN_FindWndPtr(hWndChild); - UINT32 index = 0,id,n; + UINT index = 0,id,n; if( !clientInfo->nActiveChildren || !clientInfo->hWindowMenu ) return 0; id = wndPtr->wIDmenu; - DeleteMenu32(clientInfo->hWindowMenu,id,MF_BYCOMMAND); + DeleteMenu(clientInfo->hWindowMenu,id,MF_BYCOMMAND); /* walk the rest of MDI children to prevent gaps in the id * sequence and in the menu child list */ @@ -121,10 +121,10 @@ n = sprintf(buffer, "%d ",index - clientInfo->idFirstChild); if (wndPtr->text) - lstrcpyn32A(buffer + n, wndPtr->text, sizeof(buffer) - n ); + lstrcpynA(buffer + n, wndPtr->text, sizeof(buffer) - n ); /* change menu */ - ModifyMenu32A(clientInfo->hWindowMenu ,index ,MF_BYCOMMAND | MF_STRING, + ModifyMenuA(clientInfo->hWindowMenu ,index ,MF_BYCOMMAND | MF_STRING, index - 1 , buffer ); } return 1; @@ -135,7 +135,7 @@ * * returns "activateable" child different from the current or zero */ -static HWND32 MDI_GetWindow(WND *clientWnd, HWND32 hWnd, BOOL32 bNext, +static HWND MDI_GetWindow(WND *clientWnd, HWND hWnd, BOOL bNext, DWORD dwStyleMask ) { MDICLIENTINFO *clientInfo = (MDICLIENTINFO*)clientWnd->wExtra; @@ -166,13 +166,13 @@ * * It seems that the default height is about 2/3 of the client rect */ -static void MDI_CalcDefaultChildPos( WND* w, WORD n, LPPOINT32 lpPos, - INT32 delta) +static void MDI_CalcDefaultChildPos( WND* w, WORD n, LPPOINT lpPos, + INT delta) { - INT32 nstagger; - RECT32 rect = w->rectClient; - INT32 spacing = GetSystemMetrics32(SM_CYCAPTION) + - GetSystemMetrics32(SM_CYFRAME) - 1; + INT nstagger; + RECT rect = w->rectClient; + INT spacing = GetSystemMetrics(SM_CYCAPTION) + + GetSystemMetrics(SM_CYFRAME) - 1; if( rect.bottom - rect.top - delta >= spacing ) rect.bottom -= delta; @@ -186,13 +186,13 @@ /********************************************************************** * MDISetMenu */ -static LRESULT MDISetMenu( HWND32 hwnd, HMENU32 hmenuFrame, - HMENU32 hmenuWindow) +static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame, + HMENU hmenuWindow) { WND *w = WIN_FindWndPtr(hwnd); MDICLIENTINFO *ci; - HWND32 hwndFrame = GetParent32(hwnd); - HMENU32 oldFrameMenu = GetMenu32(hwndFrame); + HWND hwndFrame = GetParent(hwnd); + HMENU oldFrameMenu = GetMenu(hwndFrame); TRACE(mdi, "%04x %04x %04x\n", hwnd, hmenuFrame, hmenuWindow); @@ -207,40 +207,40 @@ /* delete menu items from ci->hWindowMenu * and add them to hmenuWindow */ - INT32 i = GetMenuItemCount32(ci->hWindowMenu) - 1; - INT32 pos = GetMenuItemCount32(hmenuWindow) + 1; + INT i = GetMenuItemCount(ci->hWindowMenu) - 1; + INT pos = GetMenuItemCount(hmenuWindow) + 1; - AppendMenu32A( hmenuWindow, MF_SEPARATOR, 0, NULL); + AppendMenuA( hmenuWindow, MF_SEPARATOR, 0, NULL); if( ci->nActiveChildren ) { - INT32 j = i - ci->nActiveChildren + 1; + INT j = i - ci->nActiveChildren + 1; char buffer[100]; - UINT32 id,state; + UINT id,state; for( ; i >= j ; i-- ) { - id = GetMenuItemID32(ci->hWindowMenu,i ); - state = GetMenuState32(ci->hWindowMenu,i,MF_BYPOSITION); + id = GetMenuItemID(ci->hWindowMenu,i ); + state = GetMenuState(ci->hWindowMenu,i,MF_BYPOSITION); - GetMenuString32A(ci->hWindowMenu, i, buffer, 100, MF_BYPOSITION); + GetMenuStringA(ci->hWindowMenu, i, buffer, 100, MF_BYPOSITION); - DeleteMenu32(ci->hWindowMenu, i , MF_BYPOSITION); - InsertMenu32A(hmenuWindow, pos, MF_BYPOSITION | MF_STRING, + DeleteMenu(ci->hWindowMenu, i , MF_BYPOSITION); + InsertMenuA(hmenuWindow, pos, MF_BYPOSITION | MF_STRING, id, buffer); - CheckMenuItem32(hmenuWindow ,pos , MF_BYPOSITION | (state & MF_CHECKED)); + CheckMenuItem(hmenuWindow ,pos , MF_BYPOSITION | (state & MF_CHECKED)); } } /* remove separator */ - DeleteMenu32(ci->hWindowMenu, i, MF_BYPOSITION); + DeleteMenu(ci->hWindowMenu, i, MF_BYPOSITION); ci->hWindowMenu = hmenuWindow; } if( hmenuFrame && hmenuFrame!=oldFrameMenu) { - SetMenu32(hwndFrame, hmenuFrame); + SetMenu(hwndFrame, hmenuFrame); if( ci->hwndChildMaximized ) MDI_AugmentFrameMenu(ci, w->parent, ci->hwndChildMaximized ); return oldFrameMenu; @@ -251,11 +251,11 @@ /********************************************************************** * MDIRefreshMenu */ -static LRESULT MDIRefreshMenu( HWND32 hwnd, HMENU32 hmenuFrame, - HMENU32 hmenuWindow) +static LRESULT MDIRefreshMenu( HWND hwnd, HMENU hmenuFrame, + HMENU hmenuWindow) { - HWND32 hwndFrame = GetParent32(hwnd); - HMENU32 oldFrameMenu = GetMenu32(hwndFrame); + HWND hwndFrame = GetParent(hwnd); + HMENU oldFrameMenu = GetMenu(hwndFrame); TRACE(mdi, "%04x %04x %04x\n", hwnd, hmenuFrame, hmenuWindow); @@ -272,12 +272,12 @@ /********************************************************************** * MDICreateChild */ -static HWND32 MDICreateChild( WND *w, MDICLIENTINFO *ci, HWND32 parent, - LPMDICREATESTRUCT32A cs ) +static HWND MDICreateChild( WND *w, MDICLIENTINFO *ci, HWND parent, + LPMDICREATESTRUCTA cs ) { - POINT32 pos[2]; + POINT pos[2]; DWORD style = cs->style | (WS_CHILD | WS_CLIPSIBLINGS); - HWND32 hwnd, hwndMax = 0; + HWND hwnd, hwndMax = 0; WORD wIDmenu = ci->idFirstChild + ci->nActiveChildren; char lpstrDef[]="junk!"; @@ -286,10 +286,10 @@ /* calculate placement */ MDI_CalcDefaultChildPos(w, ci->nTotalCreated++, pos, 0); - if (cs->cx == CW_USEDEFAULT32 || !cs->cx) cs->cx = pos[1].x; - if (cs->cy == CW_USEDEFAULT32 || !cs->cy) cs->cy = pos[1].y; + if (cs->cx == CW_USEDEFAULT || !cs->cx) cs->cx = pos[1].x; + if (cs->cy == CW_USEDEFAULT || !cs->cy) cs->cy = pos[1].y; - if( cs->x == CW_USEDEFAULT32 ) + if( cs->x == CW_USEDEFAULT ) { cs->x = pos[0].x; cs->y = pos[0].y; @@ -299,15 +299,15 @@ if( style & WS_VISIBLE && ci->hwndChildMaximized ) { if( style & WS_MAXIMIZE ) - SendMessage32A(w->hwndSelf, WM_SETREDRAW, FALSE, 0L ); + SendMessageA(w->hwndSelf, WM_SETREDRAW, FALSE, 0L ); hwndMax = ci->hwndChildMaximized; - ShowWindow32( hwndMax, SW_SHOWNOACTIVATE ); + ShowWindow( hwndMax, SW_SHOWNOACTIVATE ); if( style & WS_MAXIMIZE ) - SendMessage32A(w->hwndSelf, WM_SETREDRAW, TRUE, 0L ); + SendMessageA(w->hwndSelf, WM_SETREDRAW, TRUE, 0L ); } /* this menu is needed to set a check mark in MDI_ChildActivate */ - AppendMenu32A(ci->hWindowMenu ,MF_STRING ,wIDmenu, lpstrDef ); + AppendMenuA(ci->hWindowMenu ,MF_STRING ,wIDmenu, lpstrDef ); ci->nActiveChildren++; @@ -321,7 +321,7 @@ if( w->flags & WIN_ISWIN32 ) { - hwnd = CreateWindow32A( cs->szClass, cs->szTitle, style, + hwnd = CreateWindowA( cs->szClass, cs->szTitle, style, cs->x, cs->y, cs->cx, cs->cy, parent, (HMENU16)wIDmenu, cs->hOwner, cs ); } @@ -339,7 +339,7 @@ hwnd = CreateWindow16( cs->szClass, cs->szTitle, style, cs16->x, cs16->y, cs16->cx, cs16->cy, parent, - (HMENU32)wIDmenu, cs16->hOwner, + (HMENU)wIDmenu, cs16->hOwner, (LPVOID)SEGPTR_GET(cs16) ); SEGPTR_FREE( title ); SEGPTR_FREE( cls ); @@ -354,7 +354,7 @@ MDI_MenuModifyItem(w ,hwnd); if( wnd->dwStyle & WS_MINIMIZE && ci->hwndActiveChild ) - ShowWindow32( hwnd, SW_SHOWMINNOACTIVE ); + ShowWindow( hwnd, SW_SHOWMINNOACTIVE ); else { /* WS_VISIBLE is clear if a) the MDI client has @@ -368,7 +368,7 @@ */ wnd->dwStyle &= ~WS_VISIBLE; if(showflag){ - SetWindowPos32( hwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE ); + SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE ); /* Set maximized state here in case hwnd didn't receive WM_SIZE * during CreateWindow - bad! @@ -382,7 +382,7 @@ } }else /* needed, harmless ? */ - SetWindowPos32( hwnd, 0, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE ); + SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE ); } TRACE(mdi, "created child - %04x\n",hwnd); @@ -390,9 +390,9 @@ else { ci->nActiveChildren--; - DeleteMenu32(ci->hWindowMenu,wIDmenu,MF_BYCOMMAND); - if( IsWindow32(hwndMax) ) - ShowWindow32(hwndMax, SW_SHOWMAXIMIZED); + DeleteMenu(ci->hWindowMenu,wIDmenu,MF_BYCOMMAND); + if( IsWindow(hwndMax) ) + ShowWindow(hwndMax, SW_SHOWMAXIMIZED); } return hwnd; @@ -404,15 +404,15 @@ * Note: The rule here is that client rect of the maximized MDI child * is equal to the client rect of the MDI client window. */ -static void MDI_ChildGetMinMaxInfo( WND* clientWnd, HWND32 hwnd, +static void MDI_ChildGetMinMaxInfo( WND* clientWnd, HWND hwnd, MINMAXINFO16* lpMinMax ) { WND* childWnd = WIN_FindWndPtr(hwnd); - RECT32 rect = clientWnd->rectClient; + RECT rect = clientWnd->rectClient; - MapWindowPoints32( clientWnd->parent->hwndSelf, - ((MDICLIENTINFO*)clientWnd->wExtra)->self, (LPPOINT32)&rect, 2); - AdjustWindowRectEx32( &rect, childWnd->dwStyle, 0, childWnd->dwExStyle ); + MapWindowPoints( clientWnd->parent->hwndSelf, + ((MDICLIENTINFO*)clientWnd->wExtra)->self, (LPPOINT)&rect, 2); + AdjustWindowRectEx( &rect, childWnd->dwStyle, 0, childWnd->dwExStyle ); lpMinMax->ptMaxSize.x = rect.right -= rect.left; lpMinMax->ptMaxSize.y = rect.bottom -= rect.top; @@ -430,12 +430,12 @@ * Note: SetWindowPos sends WM_CHILDACTIVATE to the child window that is * being activated */ -static void MDI_SwitchActiveChild( HWND32 clientHwnd, HWND32 childHwnd, - BOOL32 bNextWindow ) +static void MDI_SwitchActiveChild( HWND clientHwnd, HWND childHwnd, + BOOL bNextWindow ) { WND *w = WIN_FindWndPtr(clientHwnd); - HWND32 hwndTo = 0; - HWND32 hwndPrev = 0; + HWND hwndTo = 0; + HWND hwndPrev = 0; MDICLIENTINFO *ci; hwndTo = MDI_GetWindow(w, childHwnd, bNextWindow, 0); @@ -450,7 +450,7 @@ if ( hwndTo != hwndPrev ) { - BOOL32 bOptimize = 0; + BOOL bOptimize = 0; if( ci->hwndChildMaximized ) { @@ -458,14 +458,14 @@ w->dwStyle &= ~WS_VISIBLE; } - SetWindowPos32( hwndTo, HWND_TOP, 0, 0, 0, 0, + SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); if( bNextWindow && hwndPrev ) - SetWindowPos32( hwndPrev, HWND_BOTTOM, 0, 0, 0, 0, + SetWindowPos( hwndPrev, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ); if( bOptimize ) - ShowWindow32( clientHwnd, SW_SHOW ); + ShowWindow( clientHwnd, SW_SHOW ); } } @@ -474,8 +474,8 @@ * MDIDestroyChild */ static LRESULT MDIDestroyChild( WND *w_parent, MDICLIENTINFO *ci, - HWND32 parent, HWND32 child, - BOOL32 flagDestroy ) + HWND parent, HWND child, + BOOL flagDestroy ) { WND *childPtr = WIN_FindWndPtr(child); @@ -487,7 +487,7 @@ if( child == ci->hwndActiveChild ) { - ShowWindow32( child, SW_HIDE); + ShowWindow( child, SW_HIDE); if( child == ci->hwndChildMaximized ) { MDI_RestoreFrameMenu(w_parent->parent, child); @@ -506,8 +506,8 @@ if (flagDestroy) { - MDI_PostUpdate(GetParent32(child), ci, SB_BOTH+1); - DestroyWindow32(child); + MDI_PostUpdate(GetParent(child), ci, SB_BOTH+1); + DestroyWindow(child); } } @@ -520,13 +520,13 @@ * * Note: hWndChild is NULL when last child is being destroyed */ -static LONG MDI_ChildActivate( WND *clientPtr, HWND32 hWndChild ) +static LONG MDI_ChildActivate( WND *clientPtr, HWND hWndChild ) { MDICLIENTINFO *clientInfo = (MDICLIENTINFO*)clientPtr->wExtra; - HWND32 prevActiveWnd = clientInfo->hwndActiveChild; + HWND prevActiveWnd = clientInfo->hwndActiveChild; WND *wndPtr = WIN_FindWndPtr( hWndChild ); WND *wndPrev = WIN_FindWndPtr( prevActiveWnd ); - BOOL32 isActiveFrameWnd = 0; + BOOL isActiveFrameWnd = 0; if( hWndChild == prevActiveWnd ) return 0L; @@ -535,19 +535,19 @@ TRACE(mdi,"%04x\n", hWndChild); - if( GetActiveWindow32() == clientPtr->parent->hwndSelf ) + if( GetActiveWindow() == clientPtr->parent->hwndSelf ) isActiveFrameWnd = TRUE; /* deactivate prev. active child */ if( wndPrev ) { wndPrev->dwStyle |= WS_SYSMENU; - SendMessage32A( prevActiveWnd, WM_NCACTIVATE, FALSE, 0L ); - SendMessage32A( prevActiveWnd, WM_MDIACTIVATE, (WPARAM32)prevActiveWnd, + SendMessageA( prevActiveWnd, WM_NCACTIVATE, FALSE, 0L ); + SendMessageA( prevActiveWnd, WM_MDIACTIVATE, (WPARAM)prevActiveWnd, (LPARAM)hWndChild); /* uncheck menu item */ if( clientInfo->hWindowMenu ) - CheckMenuItem32( clientInfo->hWindowMenu, + CheckMenuItem( clientInfo->hWindowMenu, wndPrev->wIDmenu, 0); } @@ -557,9 +557,9 @@ if( clientInfo->hwndChildMaximized != hWndChild ) { if( hWndChild ) { clientInfo->hwndActiveChild = hWndChild; - ShowWindow32( hWndChild, SW_SHOWMAXIMIZED); + ShowWindow( hWndChild, SW_SHOWMAXIMIZED); } else - ShowWindow32( clientInfo->hwndActiveChild, SW_SHOWNORMAL ); + ShowWindow( clientInfo->hwndActiveChild, SW_SHOWNORMAL ); } } @@ -569,28 +569,28 @@ if( !hWndChild ) { if( isActiveFrameWnd ) - SetFocus32( clientInfo->self ); + SetFocus( clientInfo->self ); return 0; } /* check menu item */ if( clientInfo->hWindowMenu ) - CheckMenuItem32( clientInfo->hWindowMenu, + CheckMenuItem( clientInfo->hWindowMenu, wndPtr->wIDmenu, MF_CHECKED); /* bring active child to the top */ - SetWindowPos32( hWndChild, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); + SetWindowPos( hWndChild, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); if( isActiveFrameWnd ) { - SendMessage32A( hWndChild, WM_NCACTIVATE, TRUE, 0L); - if( GetFocus32() == clientInfo->self ) - SendMessage32A( clientInfo->self, WM_SETFOCUS, - (WPARAM32)clientInfo->self, 0L ); + SendMessageA( hWndChild, WM_NCACTIVATE, TRUE, 0L); + if( GetFocus() == clientInfo->self ) + SendMessageA( clientInfo->self, WM_SETFOCUS, + (WPARAM)clientInfo->self, 0L ); else - SetFocus32( clientInfo->self ); + SetFocus( clientInfo->self ); } - SendMessage32A( hWndChild, WM_MDIACTIVATE, (WPARAM32)prevActiveWnd, + SendMessageA( hWndChild, WM_MDIACTIVATE, (WPARAM)prevActiveWnd, (LPARAM)hWndChild ); return 1; } @@ -602,31 +602,31 @@ */ static HBITMAP16 CreateMDIMenuBitmap(void) { - HDC32 hDCSrc = CreateCompatibleDC32(0); - HDC32 hDCDest = CreateCompatibleDC32(hDCSrc); + HDC hDCSrc = CreateCompatibleDC(0); + HDC hDCDest = CreateCompatibleDC(hDCSrc); HBITMAP16 hbClose = LoadBitmap16(0, MAKEINTRESOURCE16(OBM_CLOSE) ); HBITMAP16 hbCopy; HANDLE16 hobjSrc, hobjDest; - hobjSrc = SelectObject32(hDCSrc, hbClose); - hbCopy = CreateCompatibleBitmap32(hDCSrc,SYSMETRICS_CXSIZE,SYSMETRICS_CYSIZE); - hobjDest = SelectObject32(hDCDest, hbCopy); + hobjSrc = SelectObject(hDCSrc, hbClose); + hbCopy = CreateCompatibleBitmap(hDCSrc,SYSMETRICS_CXSIZE,SYSMETRICS_CYSIZE); + hobjDest = SelectObject(hDCDest, hbCopy); - BitBlt32(hDCDest, 0, 0, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE, + BitBlt(hDCDest, 0, 0, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE, hDCSrc, SYSMETRICS_CXSIZE, 0, SRCCOPY); - SelectObject32(hDCSrc, hobjSrc); - DeleteObject32(hbClose); - DeleteDC32(hDCSrc); + SelectObject(hDCSrc, hobjSrc); + DeleteObject(hbClose); + DeleteDC(hDCSrc); - hobjSrc = SelectObject32( hDCDest, GetStockObject32(BLACK_PEN) ); + hobjSrc = SelectObject( hDCDest, GetStockObject(BLACK_PEN) ); - MoveToEx32( hDCDest, SYSMETRICS_CXSIZE - 1, 0, NULL ); - LineTo32( hDCDest, SYSMETRICS_CXSIZE - 1, SYSMETRICS_CYSIZE - 1); + MoveToEx( hDCDest, SYSMETRICS_CXSIZE - 1, 0, NULL ); + LineTo( hDCDest, SYSMETRICS_CXSIZE - 1, SYSMETRICS_CYSIZE - 1); - SelectObject32(hDCDest, hobjSrc ); - SelectObject32(hDCDest, hobjDest); - DeleteDC32(hDCDest); + SelectObject(hDCDest, hobjSrc ); + SelectObject(hDCDest, hobjDest); + DeleteDC(hDCDest); return hbCopy; } @@ -637,11 +637,11 @@ static LONG MDICascade(WND* clientWnd, MDICLIENTINFO *ci) { WND** ppWnd; - UINT32 total; + UINT total; if (ci->hwndChildMaximized) - SendMessage32A( clientWnd->hwndSelf, WM_MDIRESTORE, - (WPARAM32)ci->hwndChildMaximized, 0); + SendMessageA( clientWnd->hwndSelf, WM_MDIRESTORE, + (WPARAM)ci->hwndChildMaximized, 0); if (ci->nActiveChildren == 0) return 0; @@ -651,8 +651,8 @@ WND** heapPtr = ppWnd; if( total ) { - INT32 delta = 0, n = 0; - POINT32 pos[2]; + INT delta = 0, n = 0; + POINT pos[2]; if( total < ci->nActiveChildren ) delta = SYSMETRICS_CYICONSPACING + SYSMETRICS_CYICON; @@ -665,7 +665,7 @@ (*ppWnd)->hwndSelf, pos[0].x, pos[0].y, pos[1].x, pos[1].y); MDI_CalcDefaultChildPos(clientWnd, n++, pos, delta); - SetWindowPos32( (*ppWnd)->hwndSelf, 0, pos[0].x, pos[0].y, + SetWindowPos( (*ppWnd)->hwndSelf, 0, pos[0].x, pos[0].y, pos[1].x, pos[1].y, SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER); } @@ -674,21 +674,21 @@ } if( total < ci->nActiveChildren ) - ArrangeIconicWindows32( clientWnd->hwndSelf ); + ArrangeIconicWindows( clientWnd->hwndSelf ); return 0; } /********************************************************************** * MDITile */ -static void MDITile( WND* wndClient, MDICLIENTINFO *ci, WPARAM32 wParam ) +static void MDITile( WND* wndClient, MDICLIENTINFO *ci, WPARAM wParam ) { WND** ppWnd; - UINT32 total = 0; + UINT total = 0; if (ci->hwndChildMaximized) - SendMessage32A( wndClient->hwndSelf, WM_MDIRESTORE, - (WPARAM32)ci->hwndChildMaximized, 0); + SendMessageA( wndClient->hwndSelf, WM_MDIRESTORE, + (WPARAM)ci->hwndChildMaximized, 0); if (ci->nActiveChildren == 0) return; @@ -703,7 +703,7 @@ if( total ) { - RECT32 rect; + RECT rect; int x, y, xsize, ysize; int rows, columns, r, c, i; @@ -738,7 +738,7 @@ y = 0; for (r = 1; r <= rows && *ppWnd; r++, i++) { - SetWindowPos32((*ppWnd)->hwndSelf, 0, x, y, xsize, ysize, + SetWindowPos((*ppWnd)->hwndSelf, 0, x, y, xsize, ysize, SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER); y += ysize; ppWnd++; @@ -749,7 +749,7 @@ HeapFree( SystemHeap, 0, heapPtr ); } - if( total < ci->nActiveChildren ) ArrangeIconicWindows32( wndClient->hwndSelf ); + if( total < ci->nActiveChildren ) ArrangeIconicWindows( wndClient->hwndSelf ); } /* ----------------------- Frame window ---------------------------- */ @@ -758,11 +758,11 @@ /********************************************************************** * MDI_AugmentFrameMenu */ -static BOOL32 MDI_AugmentFrameMenu( MDICLIENTINFO* ci, WND *frame, - HWND32 hChild ) +static BOOL MDI_AugmentFrameMenu( MDICLIENTINFO* ci, WND *frame, + HWND hChild ) { WND* child = WIN_FindWndPtr(hChild); - HMENU32 hSysPopup = 0; + HMENU hSysPopup = 0; TRACE(mdi,"frame %p,child %04x\n",frame,hChild); @@ -770,38 +770,38 @@ /* create a copy of sysmenu popup and insert it into frame menu bar */ - if (!(hSysPopup = LoadMenuIndirect32A(SYSRES_GetResPtr(SYSRES_MENU_SYSMENU)))) + if (!(hSysPopup = LoadMenuIndirectA(SYSRES_GetResPtr(SYSRES_MENU_SYSMENU)))) return 0; TRACE(mdi,"\tgot popup %04x in sysmenu %04x\n", hSysPopup, child->hSysMenu); - AppendMenu32A(frame->wIDmenu,MF_HELP | MF_BITMAP, + AppendMenuA(frame->wIDmenu,MF_HELP | MF_BITMAP, SC_MINIMIZE, (LPSTR)(DWORD)MAGIC_REDUCE ) ; - AppendMenu32A(frame->wIDmenu,MF_HELP | MF_BITMAP, + AppendMenuA(frame->wIDmenu,MF_HELP | MF_BITMAP, SC_RESTORE, (LPSTR)(DWORD)MAGIC_RESTORE ); - if( !InsertMenu32A(frame->wIDmenu,0,MF_BYPOSITION | MF_BITMAP | MF_POPUP, + if( !InsertMenuA(frame->wIDmenu,0,MF_BYPOSITION | MF_BITMAP | MF_POPUP, hSysPopup, (LPSTR)(DWORD)hBmpClose )) { TRACE(mdi,"not inserted\n"); - DestroyMenu32(hSysPopup); + DestroyMenu(hSysPopup); return 0; } // The close button is only present in Win 95 look if(TWEAK_WineLook > WIN31_LOOK) { - AppendMenu32A(frame->wIDmenu,MF_HELP | MF_BITMAP, + AppendMenuA(frame->wIDmenu,MF_HELP | MF_BITMAP, SC_CLOSE, (LPSTR)(DWORD)MAGIC_CLOSE ); } - EnableMenuItem32(hSysPopup, SC_SIZE, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem32(hSysPopup, SC_MOVE, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem32(hSysPopup, SC_MAXIMIZE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(hSysPopup, SC_SIZE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(hSysPopup, SC_MOVE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(hSysPopup, SC_MAXIMIZE, MF_BYCOMMAND | MF_GRAYED); /* redraw menu */ - DrawMenuBar32(frame->hwndSelf); + DrawMenuBar(frame->hwndSelf); return 1; } @@ -809,10 +809,10 @@ /********************************************************************** * MDI_RestoreFrameMenu */ -static BOOL32 MDI_RestoreFrameMenu( WND *frameWnd, HWND32 hChild ) +static BOOL MDI_RestoreFrameMenu( WND *frameWnd, HWND hChild ) { - INT32 nItems = GetMenuItemCount32(frameWnd->wIDmenu) - 1; - UINT32 iId = GetMenuItemID32(frameWnd->wIDmenu,nItems) ; + INT nItems = GetMenuItemCount(frameWnd->wIDmenu) - 1; + UINT iId = GetMenuItemID(frameWnd->wIDmenu,nItems) ; TRACE(mdi,"frameWnd %p,child %04x\n",frameWnd,hChild); @@ -820,19 +820,19 @@ return 0; // app button - RemoveMenu32(frameWnd->wIDmenu,0,MF_BYPOSITION); + RemoveMenu(frameWnd->wIDmenu,0,MF_BYPOSITION); if(TWEAK_WineLook > WIN31_LOOK) { // close - DeleteMenu32(frameWnd->wIDmenu,GetMenuItemCount32(frameWnd->wIDmenu) - 1,MF_BYPOSITION); + DeleteMenu(frameWnd->wIDmenu,GetMenuItemCount(frameWnd->wIDmenu) - 1,MF_BYPOSITION); } // restore - DeleteMenu32(frameWnd->wIDmenu,GetMenuItemCount32(frameWnd->wIDmenu) - 1,MF_BYPOSITION); + DeleteMenu(frameWnd->wIDmenu,GetMenuItemCount(frameWnd->wIDmenu) - 1,MF_BYPOSITION); // minimize - DeleteMenu32(frameWnd->wIDmenu,GetMenuItemCount32(frameWnd->wIDmenu) - 1,MF_BYPOSITION); + DeleteMenu(frameWnd->wIDmenu,GetMenuItemCount(frameWnd->wIDmenu) - 1,MF_BYPOSITION); - DrawMenuBar32(frameWnd->hwndSelf); + DrawMenuBar(frameWnd->hwndSelf); return 1; } @@ -845,8 +845,8 @@ * * Note: lpTitle can be NULL */ -static void MDI_UpdateFrameText( WND *frameWnd, HWND32 hClient, - BOOL32 repaint, LPCSTR lpTitle ) +static void MDI_UpdateFrameText( WND *frameWnd, HWND hClient, + BOOL repaint, LPCSTR lpTitle ) { char lpBuffer[MDI_MAXTITLELENGTH+1]; WND* clientWnd = WIN_FindWndPtr(hClient); @@ -879,7 +879,7 @@ int i_frame_text_length = strlen(ci->frameTitle); int i_child_text_length = strlen(childWnd->text); - lstrcpyn32A( lpBuffer, ci->frameTitle, MDI_MAXTITLELENGTH); + lstrcpynA( lpBuffer, ci->frameTitle, MDI_MAXTITLELENGTH); if( i_frame_text_length + 6 < MDI_MAXTITLELENGTH ) { @@ -892,7 +892,7 @@ } else { - lstrcpyn32A( lpBuffer + i_frame_text_length + 4, + lstrcpynA( lpBuffer + i_frame_text_length + 4, childWnd->text, MDI_MAXTITLELENGTH - i_frame_text_length - 5 ); strcat( lpBuffer, "]" ); } @@ -909,7 +909,7 @@ DEFWND_SetText( frameWnd, lpBuffer ); if( repaint == MDI_REPAINTFRAME) - SetWindowPos32( frameWnd->hwndSelf, 0,0,0,0,0, SWP_FRAMECHANGED | + SetWindowPos( frameWnd->hwndSelf, 0,0,0,0,0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER ); } @@ -922,15 +922,15 @@ * * This function handles all MDI requests. */ -LRESULT WINAPI MDIClientWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam, +LRESULT WINAPI MDIClientWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { - LPCREATESTRUCT32A cs; + LPCREATESTRUCTA cs; MDICLIENTINFO *ci; - RECT32 rect; + RECT rect; WND *w = WIN_FindWndPtr(hwnd); WND *frameWnd = w->parent; - INT32 nItems; + INT nItems; ci = (MDICLIENTINFO *) w->wExtra; @@ -938,14 +938,14 @@ { case WM_CREATE: - cs = (LPCREATESTRUCT32A)lParam; + cs = (LPCREATESTRUCTA)lParam; /* Translation layer doesn't know what's in the cs->lpCreateParams * so we have to keep track of what environment we're in. */ if( w->flags & WIN_ISWIN32 ) { -#define ccs ((LPCLIENTCREATESTRUCT32)cs->lpCreateParams) +#define ccs ((LPCLIENTCREATESTRUCT)cs->lpCreateParams) ci->hWindowMenu = ccs->hWindowMenu; ci->idFirstChild = ccs->idFirstChild; #undef ccs @@ -973,9 +973,9 @@ } MDI_UpdateFrameText(frameWnd, hwnd, MDI_NOFRAMEREPAINT,frameWnd->text); - AppendMenu32A( ci->hWindowMenu, MF_SEPARATOR, 0, NULL ); + AppendMenuA( ci->hWindowMenu, MF_SEPARATOR, 0, NULL ); - GetClientRect32(frameWnd->hwndSelf, &rect); + GetClientRect(frameWnd->hwndSelf, &rect); NC_HandleNCCalcSize( w, &rect ); w->rectClient = rect; @@ -986,18 +986,18 @@ case WM_DESTROY: if( ci->hwndChildMaximized ) MDI_RestoreFrameMenu(w, frameWnd->hwndSelf); - if((nItems = GetMenuItemCount32(ci->hWindowMenu)) > 0) + if((nItems = GetMenuItemCount(ci->hWindowMenu)) > 0) { ci->idFirstChild = nItems - 1; ci->nActiveChildren++; /* to delete a separator */ while( ci->nActiveChildren-- ) - DeleteMenu32(ci->hWindowMenu,MF_BYPOSITION,ci->idFirstChild--); + DeleteMenu(ci->hWindowMenu,MF_BYPOSITION,ci->idFirstChild--); } return 0; case WM_MDIACTIVATE: - if( ci->hwndActiveChild != (HWND32)wParam ) - SetWindowPos32((HWND32)wParam, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE); + if( ci->hwndActiveChild != (HWND)wParam ) + SetWindowPos((HWND)wParam, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE); return 0; case WM_MDICASCADE: @@ -1005,44 +1005,44 @@ case WM_MDICREATE: if (lParam) return MDICreateChild( w, ci, hwnd, - (MDICREATESTRUCT32A*)lParam ); + (MDICREATESTRUCTA*)lParam ); return 0; case WM_MDIDESTROY: - return MDIDestroyChild( w, ci, hwnd, (HWND32)wParam, TRUE ); + return MDIDestroyChild( w, ci, hwnd, (HWND)wParam, TRUE ); case WM_MDIGETACTIVE: - if (lParam) *(BOOL32 *)lParam = (ci->hwndChildMaximized > 0); + if (lParam) *(BOOL *)lParam = (ci->hwndChildMaximized > 0); return ci->hwndActiveChild; case WM_MDIICONARRANGE: ci->mdiFlags |= MDIF_NEEDUPDATE; - ArrangeIconicWindows32(hwnd); + ArrangeIconicWindows(hwnd); ci->sbRecalc = SB_BOTH+1; - SendMessage32A(hwnd, WM_MDICALCCHILDSCROLL, 0, 0L); + SendMessageA(hwnd, WM_MDICALCCHILDSCROLL, 0, 0L); return 0; case WM_MDIMAXIMIZE: - ShowWindow32( (HWND32)wParam, SW_MAXIMIZE ); + ShowWindow( (HWND)wParam, SW_MAXIMIZE ); return 0; case WM_MDINEXT: /* lParam != 0 means previous window */ - MDI_SwitchActiveChild(hwnd, (HWND32)wParam, (lParam)? FALSE : TRUE ); + MDI_SwitchActiveChild(hwnd, (HWND)wParam, (lParam)? FALSE : TRUE ); break; case WM_MDIRESTORE: - SendMessage32A( (HWND32)wParam, WM_SYSCOMMAND, SC_RESTORE, 0); + SendMessageA( (HWND)wParam, WM_SYSCOMMAND, SC_RESTORE, 0); return 0; case WM_MDISETMENU: - return MDISetMenu( hwnd, (HMENU32)wParam, (HMENU32)lParam ); + return MDISetMenu( hwnd, (HMENU)wParam, (HMENU)lParam ); case WM_MDIREFRESHMENU: - return MDIRefreshMenu( hwnd, (HMENU32)wParam, (HMENU32)lParam ); + return MDIRefreshMenu( hwnd, (HMENU)wParam, (HMENU)lParam ); case WM_MDITILE: ci->mdiFlags |= MDIF_NEEDUPDATE; - ShowScrollBar32(hwnd,SB_BOTH,FALSE); + ShowScrollBar(hwnd,SB_BOTH,FALSE); MDITile(w, ci, wParam); ci->mdiFlags &= ~MDIF_NEEDUPDATE; return 0; @@ -1050,7 +1050,7 @@ case WM_VSCROLL: case WM_HSCROLL: ci->mdiFlags |= MDIF_NEEDUPDATE; - ScrollChildren32(hwnd, message, wParam, lParam); + ScrollChildren(hwnd, message, wParam, lParam); ci->mdiFlags &= ~MDIF_NEEDUPDATE; return 0; @@ -1059,13 +1059,13 @@ { w = WIN_FindWndPtr( ci->hwndActiveChild ); if( !(w->dwStyle & WS_MINIMIZE) ) - SetFocus32( ci->hwndActiveChild ); + SetFocus( ci->hwndActiveChild ); } return 0; case WM_NCACTIVATE: if( ci->hwndActiveChild ) - SendMessage32A(ci->hwndActiveChild, message, wParam, lParam); + SendMessageA(ci->hwndActiveChild, message, wParam, lParam); break; case WM_PARENTNOTIFY: @@ -1077,18 +1077,18 @@ TRACE(mdi,"notification from %04x (%i,%i)\n",child,pt.x,pt.y); if( child && child != hwnd && child != ci->hwndActiveChild ) - SetWindowPos32(child, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE ); + SetWindowPos(child, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE ); } return 0; case WM_SIZE: - if( IsWindow32(ci->hwndChildMaximized) ) + if( IsWindow(ci->hwndChildMaximized) ) { WND* child = WIN_FindWndPtr(ci->hwndChildMaximized); - RECT32 rect = { 0, 0, LOWORD(lParam), HIWORD(lParam) }; + RECT rect = { 0, 0, LOWORD(lParam), HIWORD(lParam) }; - AdjustWindowRectEx32(&rect, child->dwStyle, 0, child->dwExStyle); - MoveWindow32(ci->hwndChildMaximized, rect.left, rect.top, + AdjustWindowRectEx(&rect, child->dwStyle, 0, child->dwExStyle); + MoveWindow(ci->hwndChildMaximized, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 1); } else @@ -1099,14 +1099,14 @@ case WM_MDICALCCHILDSCROLL: if( (ci->mdiFlags & MDIF_NEEDUPDATE) && ci->sbRecalc ) { - CalcChildScroll(hwnd, ci->sbRecalc-1); + CalcChildScroll16(hwnd, ci->sbRecalc-1); ci->sbRecalc = 0; ci->mdiFlags &= ~MDIF_NEEDUPDATE; } return 0; } - return DefWindowProc32A( hwnd, message, wParam, lParam ); + return DefWindowProcA( hwnd, message, wParam, lParam ); } @@ -1171,7 +1171,7 @@ return 0; case WM_SETFOCUS: - SetFocus32(hwndMDIClient); + SetFocus(hwndMDIClient); break; case WM_SIZE: @@ -1211,8 +1211,8 @@ /*********************************************************************** * DefFrameProc32A (USER32.122) */ -LRESULT WINAPI DefFrameProc32A( HWND32 hwnd, HWND32 hwndMDIClient, - UINT32 message, WPARAM32 wParam, LPARAM lParam) +LRESULT WINAPI DefFrameProcA( HWND hwnd, HWND hwndMDIClient, + UINT message, WPARAM wParam, LPARAM lParam) { if (hwndMDIClient) { @@ -1224,7 +1224,7 @@ MAKELPARAM( (HWND16)lParam, HIWORD(wParam) ) ); case WM_NCACTIVATE: - SendMessage32A(hwndMDIClient, message, wParam, lParam); + SendMessageA(hwndMDIClient, message, wParam, lParam); break; case WM_SETTEXT: { @@ -1245,15 +1245,15 @@ } } - return DefWindowProc32A(hwnd, message, wParam, lParam); + return DefWindowProcA(hwnd, message, wParam, lParam); } /*********************************************************************** * DefFrameProc32W (USER32.123) */ -LRESULT WINAPI DefFrameProc32W( HWND32 hwnd, HWND32 hwndMDIClient, - UINT32 message, WPARAM32 wParam, LPARAM lParam) +LRESULT WINAPI DefFrameProcW( HWND hwnd, HWND hwndMDIClient, + UINT message, WPARAM wParam, LPARAM lParam) { if (hwndMDIClient) { @@ -1265,13 +1265,13 @@ MAKELPARAM( (HWND16)lParam, HIWORD(wParam) ) ); case WM_NCACTIVATE: - SendMessage32W(hwndMDIClient, message, wParam, lParam); + SendMessageW(hwndMDIClient, message, wParam, lParam); break; case WM_SETTEXT: { LPSTR txt = HEAP_strdupWtoA(GetProcessHeap(),0,(LPWSTR)lParam); - LRESULT ret = DefFrameProc32A( hwnd, hwndMDIClient, message, + LRESULT ret = DefFrameProcA( hwnd, hwndMDIClient, message, wParam, (DWORD)txt ); HeapFree(GetProcessHeap(),0,txt); return ret; @@ -1279,12 +1279,12 @@ case WM_NEXTMENU: case WM_SETFOCUS: case WM_SIZE: - return DefFrameProc32A( hwnd, hwndMDIClient, message, + return DefFrameProcA( hwnd, hwndMDIClient, message, wParam, lParam ); } } - return DefWindowProc32W( hwnd, message, wParam, lParam ); + return DefWindowProcW( hwnd, message, wParam, lParam ); } @@ -1446,8 +1446,8 @@ /*********************************************************************** * DefMDIChildProc32A (USER32.124) */ -LRESULT WINAPI DefMDIChildProc32A( HWND32 hwnd, UINT32 message, - WPARAM32 wParam, LPARAM lParam ) +LRESULT WINAPI DefMDIChildProcA( HWND hwnd, UINT message, + WPARAM wParam, LPARAM lParam ) { MDICLIENTINFO *ci; WND *clientWnd; @@ -1458,7 +1458,7 @@ switch (message) { case WM_SETTEXT: - DefWindowProc32A(hwnd, message, wParam, lParam); + DefWindowProcA(hwnd, message, wParam, lParam); MDI_MenuModifyItem(clientWnd,hwnd); if( ci->hwndChildMaximized == hwnd ) MDI_UpdateFrameText( clientWnd->parent, ci->self, @@ -1468,9 +1468,9 @@ case WM_GETMINMAXINFO: { MINMAXINFO16 mmi; - STRUCT32_MINMAXINFO32to16( (MINMAXINFO32 *)lParam, &mmi ); + STRUCT32_MINMAXINFO32to16( (MINMAXINFO *)lParam, &mmi ); MDI_ChildGetMinMaxInfo( clientWnd, hwnd, &mmi ); - STRUCT32_MINMAXINFO16to32( &mmi, (MINMAXINFO32 *)lParam ); + STRUCT32_MINMAXINFO16to32( &mmi, (MINMAXINFO *)lParam ); } return 0; @@ -1494,20 +1494,20 @@ case WM_SYSCHAR: if (wParam == '-') { - SendMessage32A(hwnd,WM_SYSCOMMAND, - (WPARAM32)SC_KEYMENU, (LPARAM)(DWORD)VK_SPACE); + SendMessageA(hwnd,WM_SYSCOMMAND, + (WPARAM)SC_KEYMENU, (LPARAM)(DWORD)VK_SPACE); return 0; } } - return DefWindowProc32A(hwnd, message, wParam, lParam); + return DefWindowProcA(hwnd, message, wParam, lParam); } /*********************************************************************** * DefMDIChildProc32W (USER32.125) */ -LRESULT WINAPI DefMDIChildProc32W( HWND32 hwnd, UINT32 message, - WPARAM32 wParam, LPARAM lParam ) +LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message, + WPARAM wParam, LPARAM lParam ) { MDICLIENTINFO *ci; WND *clientWnd; @@ -1518,7 +1518,7 @@ switch (message) { case WM_SETTEXT: - DefWindowProc32W(hwnd, message, wParam, lParam); + DefWindowProcW(hwnd, message, wParam, lParam); MDI_MenuModifyItem(clientWnd,hwnd); if( ci->hwndChildMaximized == hwnd ) MDI_UpdateFrameText( clientWnd->parent, ci->self, @@ -1535,17 +1535,17 @@ case WM_SETVISIBLE: case WM_SIZE: case WM_NEXTMENU: - return DefMDIChildProc32A( hwnd, message, (WPARAM16)wParam, lParam ); + return DefMDIChildProcA( hwnd, message, (WPARAM16)wParam, lParam ); case WM_SYSCHAR: if (wParam == '-') { - SendMessage32W(hwnd,WM_SYSCOMMAND, - (WPARAM32)SC_KEYMENU, (LPARAM)(DWORD)VK_SPACE); + SendMessageW(hwnd,WM_SYSCOMMAND, + (WPARAM)SC_KEYMENU, (LPARAM)(DWORD)VK_SPACE); return 0; } } - return DefWindowProc32W(hwnd, message, wParam, lParam); + return DefWindowProcW(hwnd, message, wParam, lParam); } @@ -1557,20 +1557,20 @@ * Success: Handle to created window * Failure: NULL */ -HWND32 WINAPI CreateMDIWindow32A( +HWND WINAPI CreateMDIWindowA( LPCSTR lpClassName, /* [in] Pointer to registered child class name */ LPCSTR lpWindowName, /* [in] Pointer to window name */ DWORD dwStyle, /* [in] Window style */ - INT32 X, /* [in] Horizontal position of window */ - INT32 Y, /* [in] Vertical position of window */ - INT32 nWidth, /* [in] Width of window */ - INT32 nHeight, /* [in] Height of window */ - HWND32 hWndParent, /* [in] Handle to parent window */ - HINSTANCE32 hInstance, /* [in] Handle to application instance */ + INT X, /* [in] Horizontal position of window */ + INT Y, /* [in] Vertical position of window */ + INT nWidth, /* [in] Width of window */ + INT nHeight, /* [in] Height of window */ + HWND hWndParent, /* [in] Handle to parent window */ + HINSTANCE hInstance, /* [in] Handle to application instance */ LPARAM lParam) /* [in] Application-defined value */ { WARN(mdi,"is only single threaded!\n"); - return MDI_CreateMDIWindow32A(lpClassName, lpWindowName, dwStyle, X, Y, + return MDI_CreateMDIWindowA(lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hInstance, lParam); } @@ -1579,20 +1579,20 @@ * single threaded version of CreateMDIWindowA * called by CreateWindowEx32A */ -HWND32 MDI_CreateMDIWindow32A( +HWND MDI_CreateMDIWindowA( LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, - INT32 X, - INT32 Y, - INT32 nWidth, - INT32 nHeight, - HWND32 hWndParent, - HINSTANCE32 hInstance, + INT X, + INT Y, + INT nWidth, + INT nHeight, + HWND hWndParent, + HINSTANCE hInstance, LPARAM lParam) { MDICLIENTINFO* pCi; - MDICREATESTRUCT32A cs; + MDICREATESTRUCTA cs; WND *pWnd=WIN_FindWndPtr(hWndParent); TRACE(mdi, "(%s,%s,%ld,%d,%d,%d,%d,%x,%d,%ld)\n", @@ -1625,22 +1625,22 @@ * Success: Handle to created window * Failure: NULL */ -HWND32 WINAPI CreateMDIWindow32W( +HWND WINAPI CreateMDIWindowW( LPCWSTR lpClassName, /* [in] Pointer to registered child class name */ LPCWSTR lpWindowName, /* [in] Pointer to window name */ DWORD dwStyle, /* [in] Window style */ - INT32 X, /* [in] Horizontal position of window */ - INT32 Y, /* [in] Vertical position of window */ - INT32 nWidth, /* [in] Width of window */ - INT32 nHeight, /* [in] Height of window */ - HWND32 hWndParent, /* [in] Handle to parent window */ - HINSTANCE32 hInstance, /* [in] Handle to application instance */ + INT X, /* [in] Horizontal position of window */ + INT Y, /* [in] Vertical position of window */ + INT nWidth, /* [in] Width of window */ + INT nHeight, /* [in] Height of window */ + HWND hWndParent, /* [in] Handle to parent window */ + HINSTANCE hInstance, /* [in] Handle to application instance */ LPARAM lParam) /* [in] Application-defined value */ { FIXME(mdi, "(%s,%s,%ld,%d,%d,%d,%d,%x,%d,%ld): stub\n", debugstr_w(lpClassName),debugstr_w(lpWindowName),dwStyle,X,Y, nWidth,nHeight,hWndParent,hInstance,lParam); - return (HWND32)NULL; + return (HWND)NULL; } @@ -1649,29 +1649,29 @@ * single threaded version of CreateMDIWindow * called by CreateWindowEx32W(). */ -HWND32 MDI_CreateMDIWindow32W( +HWND MDI_CreateMDIWindowW( LPCWSTR lpClassName, /* [in] Pointer to registered child class name */ LPCWSTR lpWindowName, /* [in] Pointer to window name */ DWORD dwStyle, /* [in] Window style */ - INT32 X, /* [in] Horizontal position of window */ - INT32 Y, /* [in] Vertical position of window */ - INT32 nWidth, /* [in] Width of window */ - INT32 nHeight, /* [in] Height of window */ - HWND32 hWndParent, /* [in] Handle to parent window */ - HINSTANCE32 hInstance, /* [in] Handle to application instance */ + INT X, /* [in] Horizontal position of window */ + INT Y, /* [in] Vertical position of window */ + INT nWidth, /* [in] Width of window */ + INT nHeight, /* [in] Height of window */ + HWND hWndParent, /* [in] Handle to parent window */ + HINSTANCE hInstance, /* [in] Handle to application instance */ LPARAM lParam) /* [in] Application-defined value */ { FIXME(mdi, "(%s,%s,%ld,%d,%d,%d,%d,%x,%d,%ld): stub\n", debugstr_w(lpClassName),debugstr_w(lpWindowName),dwStyle,X,Y, nWidth,nHeight,hWndParent,hInstance,lParam); - return (HWND32)NULL; + return (HWND)NULL; } /********************************************************************** * TranslateMDISysAccel32 (USER32.555) */ -BOOL32 WINAPI TranslateMDISysAccel32( HWND32 hwndClient, LPMSG32 msg ) +BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg ) { MSG16 msg16; @@ -1701,14 +1701,14 @@ /* translate if the Ctrl key is down and Alt not. */ - if( (GetKeyState32(VK_CONTROL) & 0x8000) && - !(GetKeyState32(VK_MENU) & 0x8000)) + if( (GetKeyState(VK_CONTROL) & 0x8000) && + !(GetKeyState(VK_MENU) & 0x8000)) { switch( msg->wParam ) { case VK_F6: case VK_TAB: - wParam = ( GetKeyState32(VK_SHIFT) & 0x8000 ) + wParam = ( GetKeyState(VK_SHIFT) & 0x8000 ) ? SC_NEXTWINDOW : SC_PREVWINDOW; break; case VK_F4: @@ -1732,27 +1732,27 @@ /*********************************************************************** * CalcChildScroll (USER.462) */ -void WINAPI CalcChildScroll( HWND16 hwnd, WORD scroll ) +void WINAPI CalcChildScroll16( HWND16 hwnd, WORD scroll ) { SCROLLINFO info; - RECT32 childRect, clientRect; - INT32 vmin, vmax, hmin, hmax, vpos, hpos; + RECT childRect, clientRect; + INT vmin, vmax, hmin, hmax, vpos, hpos; WND *pWnd, *Wnd; if (!(Wnd = pWnd = WIN_FindWndPtr( hwnd ))) return; - GetClientRect32( hwnd, &clientRect ); - SetRectEmpty32( &childRect ); + GetClientRect( hwnd, &clientRect ); + SetRectEmpty( &childRect ); for ( pWnd = pWnd->child; pWnd; pWnd = pWnd->next ) { if( pWnd->dwStyle & WS_MAXIMIZE ) { - ShowScrollBar32(hwnd, SB_BOTH, FALSE); + ShowScrollBar(hwnd, SB_BOTH, FALSE); return; } - UnionRect32( &childRect, &pWnd->rectWindow, &childRect ); + UnionRect( &childRect, &pWnd->rectWindow, &childRect ); } - UnionRect32( &childRect, &clientRect, &childRect ); + UnionRect( &childRect, &clientRect, &childRect ); hmin = childRect.left; hmax = childRect.right - clientRect.right; hpos = clientRect.left - childRect.left; @@ -1767,7 +1767,7 @@ info.cbSize = sizeof(info); info.nMax = vmax; info.nMin = vmin; info.nPos = vpos; info.fMask = SIF_POS | SIF_RANGE; - SetScrollInfo32(hwnd, scroll, &info, TRUE); + SetScrollInfo(hwnd, scroll, &info, TRUE); break; case SB_BOTH: SCROLL_SetNCSbState( Wnd, vmin, vmax, vpos, @@ -1781,33 +1781,33 @@ */ void WINAPI ScrollChildren16(HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam, LPARAM lParam) { - return ScrollChildren32( hWnd, uMsg, wParam, lParam ); + return ScrollChildren( hWnd, uMsg, wParam, lParam ); } /*********************************************************************** * ScrollChildren32 (USER32.448) */ -void WINAPI ScrollChildren32(HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam, +void WINAPI ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { WND *wndPtr = WIN_FindWndPtr(hWnd); - INT32 newPos = -1; - INT32 curPos, length, minPos, maxPos, shift; + INT newPos = -1; + INT curPos, length, minPos, maxPos, shift; if( !wndPtr ) return; if( uMsg == WM_HSCROLL ) { - GetScrollRange32(hWnd,SB_HORZ,&minPos,&maxPos); - curPos = GetScrollPos32(hWnd,SB_HORZ); + GetScrollRange(hWnd,SB_HORZ,&minPos,&maxPos); + curPos = GetScrollPos(hWnd,SB_HORZ); length = (wndPtr->rectClient.right - wndPtr->rectClient.left)/2; shift = SYSMETRICS_CYHSCROLL; } else if( uMsg == WM_VSCROLL ) { - GetScrollRange32(hWnd,SB_VERT,&minPos,&maxPos); - curPos = GetScrollPos32(hWnd,SB_VERT); + GetScrollRange(hWnd,SB_VERT,&minPos,&maxPos); + curPos = GetScrollPos(hWnd,SB_VERT); length = (wndPtr->rectClient.bottom - wndPtr->rectClient.top)/2; shift = SYSMETRICS_CXVSCROLL; } @@ -1842,7 +1842,7 @@ newPos = maxPos; break; case SB_ENDSCROLL: - CalcChildScroll(hWnd,(uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ); + CalcChildScroll16(hWnd,(uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ); return; } @@ -1852,13 +1852,13 @@ if( newPos < minPos ) newPos = minPos; - SetScrollPos32(hWnd, (uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ , newPos, TRUE); + SetScrollPos(hWnd, (uMsg == WM_VSCROLL)?SB_VERT:SB_HORZ , newPos, TRUE); if( uMsg == WM_VSCROLL ) - ScrollWindowEx32(hWnd ,0 ,curPos - newPos, NULL, NULL, 0, NULL, + ScrollWindowEx(hWnd ,0 ,curPos - newPos, NULL, NULL, 0, NULL, SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN ); else - ScrollWindowEx32(hWnd ,curPos - newPos, 0, NULL, NULL, 0, NULL, + ScrollWindowEx(hWnd ,curPos - newPos, 0, NULL, NULL, 0, NULL, SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN ); } @@ -1871,8 +1871,8 @@ * Failure: 0 */ WORD WINAPI -CascadeWindows (HWND32 hwndParent, UINT32 wFlags, const LPRECT32 lpRect, - UINT32 cKids, const HWND32 *lpKids) +CascadeWindows (HWND hwndParent, UINT wFlags, const LPRECT lpRect, + UINT cKids, const HWND *lpKids) { FIXME (mdi, "(0x%08x,0x%08x,...,%u,...): stub\n", hwndParent, wFlags, cKids); @@ -1889,8 +1889,8 @@ * Failure: 0 */ WORD WINAPI -TileWindows (HWND32 hwndParent, UINT32 wFlags, const LPRECT32 lpRect, - UINT32 cKids, const HWND32 *lpKids) +TileWindows (HWND hwndParent, UINT wFlags, const LPRECT lpRect, + UINT cKids, const HWND *lpKids) { FIXME (mdi, "(0x%08x,0x%08x,...,%u,...): stub\n", hwndParent, wFlags, cKids);
diff --git a/windows/message.c b/windows/message.c index b703e04..089b08c 100644 --- a/windows/message.c +++ b/windows/message.c
@@ -42,13 +42,13 @@ DWORD MSG_WineStartTicks; /* Ticks at Wine startup */ -static UINT32 doubleClickSpeed = 452; +static UINT doubleClickSpeed = 452; /*********************************************************************** * MSG_CheckFilter */ -BOOL32 MSG_CheckFilter(DWORD uMsg, DWORD first, DWORD last) +BOOL MSG_CheckFilter(DWORD uMsg, DWORD first, DWORD last) { if( first || last ) return (uMsg >= first && uMsg <= last); @@ -74,7 +74,7 @@ lppt->x += wndPtr->rectClient.left; lppt->y += wndPtr->rectClient.top; wndPtr = wndPtr->parent; - SendMessage32A( wndPtr->hwndSelf, WM_PARENTNOTIFY, + SendMessageA( wndPtr->hwndSelf, WM_PARENTNOTIFY, MAKEWPARAM( event, idChild ), lValue ); } #undef lppt @@ -89,8 +89,8 @@ * to the user, left in the queue, or skipped entirely (in this case * HIWORD contains hit test code). */ -static DWORD MSG_TranslateMouseMsg( HWND32 hTopWnd, DWORD first, DWORD last, - MSG32 *msg, BOOL32 remove, WND* pWndScope ) +static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last, + MSG *msg, BOOL remove, WND* pWndScope ) { static DWORD dblclk_time_limit = 0; static UINT16 clk_message = 0; @@ -98,14 +98,14 @@ static POINT16 clk_pos = { 0, 0 }; WND *pWnd; - HWND32 hWnd; + HWND hWnd; INT16 ht, hittest, sendSC = 0; - UINT32 message = msg->message; + UINT message = msg->message; POINT16 screen_pt, pt; - HANDLE16 hQ = GetFastQueue(); + HANDLE16 hQ = GetFastQueue16(); MESSAGEQUEUE *queue = (MESSAGEQUEUE *)QUEUE_Lock(hQ); - BOOL32 eatMsg = FALSE; - BOOL32 mouseClick = ((message == WM_LBUTTONDOWN) || + BOOL eatMsg = FALSE; + BOOL mouseClick = ((message == WM_LBUTTONDOWN) || (message == WM_RBUTTONDOWN) || (message == WM_MBUTTONDOWN))?1:0; SYSQ_STATUS ret = 0; @@ -115,7 +115,7 @@ CONV_POINT32TO16( &msg->pt, &pt ); ht = hittest = HTCLIENT; - hWnd = GetCapture32(); + hWnd = GetCapture(); if( !hWnd ) { ht = hittest = WINPOS_WindowFromPoint( pWndScope, pt, &pWnd ); @@ -148,7 +148,7 @@ /* check if hWnd is within hWndScope */ if( hTopWnd && hWnd != hTopWnd ) - if( !IsChild32(hTopWnd, hWnd) ) + if( !IsChild(hTopWnd, hWnd) ) { QUEUE_Unlock( queue ); return SYSQ_MSG_CONTINUE; @@ -214,7 +214,7 @@ eatMsg = sendSC = 1; else if( remove && mouseClick ) { - HWND32 hwndTop = WIN_GetTopParent( hWnd ); + HWND hwndTop = WIN_GetTopParent( hWnd ); if( mouseClick == 1 ) { @@ -238,16 +238,16 @@ /* Activate the window if needed */ - if (hWnd != GetActiveWindow32() && hWnd != GetDesktopWindow32()) + if (hWnd != GetActiveWindow() && hWnd != GetDesktopWindow()) { - LONG ret = SendMessage32A( hWnd, WM_MOUSEACTIVATE, hwndTop, + LONG ret = SendMessageA( hWnd, WM_MOUSEACTIVATE, hwndTop, MAKELONG( hittest, message ) ); if ((ret == MA_ACTIVATEANDEAT) || (ret == MA_NOACTIVATEANDEAT)) eatMsg = TRUE; if (((ret == MA_ACTIVATE) || (ret == MA_ACTIVATEANDEAT)) - && hwndTop != GetActiveWindow32() ) + && hwndTop != GetActiveWindow() ) if (!WINPOS_SetActiveWindow( hwndTop, TRUE , TRUE )) eatMsg = TRUE; } @@ -257,7 +257,7 @@ /* Send the WM_SETCURSOR message */ if (sendSC) - SendMessage32A( hWnd, WM_SETCURSOR, hWnd, + SendMessageA( hWnd, WM_SETCURSOR, hWnd, MAKELONG( hittest, message )); if (eatMsg) return MAKELONG( (UINT16)SYSQ_MSG_SKIP, hittest); @@ -273,11 +273,11 @@ * * Translate an keyboard hardware event into a real message. */ -static DWORD MSG_TranslateKbdMsg( HWND32 hTopWnd, DWORD first, DWORD last, - MSG32 *msg, BOOL32 remove ) +static DWORD MSG_TranslateKbdMsg( HWND hTopWnd, DWORD first, DWORD last, + MSG *msg, BOOL remove ) { WORD message = msg->message; - HWND32 hWnd = GetFocus32(); + HWND hWnd = GetFocus(); WND *pWnd; /* Should check Ctrl-Esc and PrintScreen here */ @@ -287,16 +287,16 @@ /* Send the message to the active window instead, */ /* translating messages to their WM_SYS equivalent */ - hWnd = GetActiveWindow32(); + hWnd = GetActiveWindow(); if( message < WM_SYSKEYDOWN ) message += WM_SYSKEYDOWN - WM_KEYDOWN; } pWnd = WIN_FindWndPtr( hWnd ); - if (pWnd && (pWnd->hmemTaskQ != GetFastQueue())) + if (pWnd && (pWnd->hmemTaskQ != GetFastQueue16())) { /* Not for the current task */ - MESSAGEQUEUE *queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ); + MESSAGEQUEUE *queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ); if (queue) QUEUE_ClearWakeBit( queue, QS_KEY ); QUEUE_Unlock( queue ); @@ -308,7 +308,7 @@ } if (hTopWnd && hWnd != hTopWnd) - if (!IsChild32(hTopWnd, hWnd)) return SYSQ_MSG_CONTINUE; + if (!IsChild(hTopWnd, hWnd)) return SYSQ_MSG_CONTINUE; if (!MSG_CheckFilter(message, first, last)) return SYSQ_MSG_CONTINUE; msg->hwnd = hWnd; @@ -325,9 +325,9 @@ * * Build an EVENTMSG structure and call JOURNALRECORD hook */ -static void MSG_JournalRecordMsg( MSG32 *msg ) +static void MSG_JournalRecordMsg( MSG *msg ) { - EVENTMSG32 *event = (EVENTMSG32 *) HeapAlloc(SystemHeap, 0, sizeof(EVENTMSG32)); + EVENTMSG *event = (EVENTMSG *) HeapAlloc(SystemHeap, 0, sizeof(EVENTMSG)); if (!event) return; event->message = msg->message; event->time = msg->time; @@ -337,14 +337,14 @@ event->paramH = msg->lParam & 0x7FFF; if (HIWORD(msg->lParam) & 0x0100) event->paramH |= 0x8000; /* special_key - bit */ - HOOK_CallHooks32A( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)event ); + HOOK_CallHooksA( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)event ); } else if ((msg->message >= WM_MOUSEFIRST) && (msg->message <= WM_MOUSELAST)) { event->paramL = LOWORD(msg->lParam); /* X pos */ event->paramH = HIWORD(msg->lParam); /* Y pos */ ClientToScreen16( msg->hwnd, (LPPOINT16)&event->paramL ); - HOOK_CallHooks32A( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)event ); + HOOK_CallHooksA( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)event ); } else if ((msg->message >= WM_NCMOUSEFIRST) && (msg->message <= WM_NCMOUSELAST)) @@ -352,7 +352,7 @@ event->paramL = LOWORD(msg->lParam); /* X pos */ event->paramH = HIWORD(msg->lParam); /* Y pos */ event->message += WM_MOUSEMOVE-WM_NCMOUSEMOVE;/* give no info about NC area */ - HOOK_CallHooks32A( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)event ); + HOOK_CallHooksA( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)event ); } HeapFree(SystemHeap, 0, event); @@ -365,16 +365,16 @@ */ static int MSG_JournalPlayBackMsg(void) { - EVENTMSG32 *tmpMsg; + EVENTMSG *tmpMsg; long wtime,lParam,wParam; WORD keyDown,i,result=0; if ( HOOK_IsHooked( WH_JOURNALPLAYBACK ) ) { - tmpMsg = (EVENTMSG32 *) HeapAlloc(SystemHeap, 0, sizeof(EVENTMSG32)); + tmpMsg = (EVENTMSG *) HeapAlloc(SystemHeap, 0, sizeof(EVENTMSG)); if (!tmpMsg) return result; - wtime=HOOK_CallHooks32A( WH_JOURNALPLAYBACK, HC_GETNEXT, 0, + wtime=HOOK_CallHooksA( WH_JOURNALPLAYBACK, HC_GETNEXT, 0, (LPARAM) tmpMsg ); /* TRACE(msg,"Playback wait time =%ld\n",wtime); */ if (wtime<=0) @@ -427,7 +427,7 @@ AsyncKeyStateTable[VK_LBUTTON]= InputKeyStateTable[VK_LBUTTON] = MouseButtonsStates[0] ? 0x80 : 0; AsyncKeyStateTable[VK_MBUTTON]= InputKeyStateTable[VK_MBUTTON] = MouseButtonsStates[1] ? 0x80 : 0; AsyncKeyStateTable[VK_RBUTTON]= InputKeyStateTable[VK_RBUTTON] = MouseButtonsStates[2] ? 0x80 : 0; - SetCursorPos32(tmpMsg->paramL,tmpMsg->paramH); + SetCursorPos(tmpMsg->paramL,tmpMsg->paramH); lParam=MAKELONG(tmpMsg->paramL,tmpMsg->paramH); wParam=0; if (MouseButtonsStates[0]) wParam |= MK_LBUTTON; @@ -437,7 +437,7 @@ tmpMsg->paramL, tmpMsg->paramH, tmpMsg->time, 0 ); } } - HOOK_CallHooks32A( WH_JOURNALPLAYBACK, HC_SKIP, 0, + HOOK_CallHooksA( WH_JOURNALPLAYBACK, HC_SKIP, 0, (LPARAM) tmpMsg); } else @@ -445,7 +445,7 @@ if( tmpMsg->message == WM_QUEUESYNC ) if (HOOK_IsHooked( WH_CBT )) - HOOK_CallHooks32A( WH_CBT, HCBT_QS, 0, 0L); + HOOK_CallHooksA( WH_CBT, HCBT_QS, 0, 0L); result= QS_MOUSE | QS_KEY; /* ? */ } @@ -459,8 +459,8 @@ * * Peek for a hardware message matching the hwnd and message filters. */ -static BOOL32 MSG_PeekHardwareMsg( MSG32 *msg, HWND32 hwnd, DWORD first, DWORD last, - BOOL32 remove ) +static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, DWORD first, DWORD last, + BOOL remove ) { /* FIXME: should deal with MSG32 instead of MSG16 */ @@ -492,10 +492,10 @@ if ((msg->message >= WM_MOUSEFIRST) && (msg->message <= WM_MOUSELAST)) { - HWND32 hWndScope = (HWND32)qmsg->extraInfo; + HWND hWndScope = (HWND)qmsg->extraInfo; status = MSG_TranslateMouseMsg(hwnd, first, last, msg, remove, - (Options.managed && IsWindow32(hWndScope) ) + (Options.managed && IsWindow(hWndScope) ) ? WIN_FindWndPtr(hWndScope) : WIN_GetDesktop() ); kbd_msg = 0; } @@ -509,7 +509,7 @@ HARDWAREHOOKSTRUCT16 *hook; if ((hook = SEGPTR_NEW(HARDWAREHOOKSTRUCT16))) { - BOOL32 ret; + BOOL ret; hook->hWnd = msg->hwnd; hook->wMessage = msg->message & 0xffff; hook->wParam = LOWORD (msg->wParam); @@ -584,14 +584,14 @@ */ void WINAPI SetDoubleClickTime16( UINT16 interval ) { - SetDoubleClickTime32( interval ); + SetDoubleClickTime( interval ); } /********************************************************************** * SetDoubleClickTime32 (USER32.480) */ -BOOL32 WINAPI SetDoubleClickTime32( UINT32 interval ) +BOOL WINAPI SetDoubleClickTime( UINT interval ) { doubleClickSpeed = interval ? interval : 500; return TRUE; @@ -610,7 +610,7 @@ /********************************************************************** * GetDoubleClickTime32 (USER32.239) */ -UINT32 WINAPI GetDoubleClickTime32(void) +UINT WINAPI GetDoubleClickTime(void) { return doubleClickSpeed; } @@ -621,21 +621,21 @@ * * Implementation of an inter-task SendMessage. */ -static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND32 hwnd, UINT32 msg, - WPARAM32 wParam, LPARAM lParam, WORD flags ) +static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND hwnd, UINT msg, + WPARAM wParam, LPARAM lParam, WORD flags ) { MESSAGEQUEUE *queue, *destQ; SMSG *smsg; LRESULT lResult = 0; - if (IsTaskLocked() || !IsWindow32(hwnd)) + if (IsTaskLocked16() || !IsWindow(hwnd)) return 0; /* create a SMSG structure to hold SendMessage() parameters */ if (! (smsg = (SMSG *) HeapAlloc( SystemHeap, 0, sizeof(SMSG) )) ) return 0; - if (!(queue = (MESSAGEQUEUE*)QUEUE_Lock( GetFastQueue() ))) return 0; + if (!(queue = (MESSAGEQUEUE*)QUEUE_Lock( GetFastQueue16() ))) return 0; if (!(destQ = (MESSAGEQUEUE*)QUEUE_Lock( hDestQueue ))) { @@ -653,7 +653,7 @@ smsg->lParam = lParam; smsg->lResult = 0; - smsg->hSrcQueue = GetFastQueue(); + smsg->hSrcQueue = GetFastQueue16(); smsg->hDstQueue = hDestQueue; smsg->flags = flags; @@ -669,7 +669,7 @@ { /* force destination task to run next, if 16 bit threads */ if (THREAD_IsWin16(THREAD_Current()) && THREAD_IsWin16(destQ->thdb) ) - DirectedYield( destQ->thdb->teb.htask16 ); + DirectedYield16( destQ->thdb->teb.htask16 ); QUEUE_WaitBits( QS_SMRESULT ); @@ -730,20 +730,20 @@ */ void WINAPI ReplyMessage16( LRESULT result ) { - ReplyMessage32( result ); + ReplyMessage( result ); } /*********************************************************************** * ReplyMessage (USER.115) */ -BOOL32 WINAPI ReplyMessage32( LRESULT result ) +BOOL WINAPI ReplyMessage( LRESULT result ) { MESSAGEQUEUE *senderQ = 0; MESSAGEQUEUE *queue = 0; SMSG *smsg; - BOOL32 ret = FALSE; + BOOL ret = FALSE; - if (!(queue = (MESSAGEQUEUE*)QUEUE_Lock( GetFastQueue() ))) return FALSE; + if (!(queue = (MESSAGEQUEUE*)QUEUE_Lock( GetFastQueue16() ))) return FALSE; TRACE(sendmsg,"ReplyMessage, queue %04x\n", queue->self); @@ -793,7 +793,7 @@ /* switch directly to sending task (16 bit thread only) */ if (THREAD_IsWin16( THREAD_Current() )) - DirectedYield( senderQ->thdb->teb.htask16 ); + DirectedYield16( senderQ->thdb->teb.htask16 ); ret = TRUE; @@ -809,8 +809,8 @@ /*********************************************************************** * MSG_PeekMessage */ -static BOOL32 MSG_PeekMessage( LPMSG32 msg, HWND32 hwnd, DWORD first, DWORD last, - WORD flags, BOOL32 peek ) +static BOOL MSG_PeekMessage( LPMSG msg, HWND hwnd, DWORD first, DWORD last, + WORD flags, BOOL peek ) { int mask; MESSAGEQUEUE *msgQueue; @@ -834,7 +834,7 @@ } else mask |= QS_MOUSE | QS_KEY | QS_TIMER | QS_PAINT; - if (IsTaskLocked()) flags |= PM_NOYIELD; + if (IsTaskLocked16()) flags |= PM_NOYIELD; /* Never yield on Win32 threads */ if (!THREAD_IsWin16(THREAD_Current())) flags |= PM_NOYIELD; @@ -843,7 +843,7 @@ { QMSG *qmsg; - hQueue = GetFastQueue(); + hQueue = GetFastQueue16(); msgQueue = (MESSAGEQUEUE *)QUEUE_Lock( hQueue ); if (!msgQueue) return FALSE; msgQueue->changeBits = 0; @@ -938,7 +938,7 @@ if (!(flags & PM_NOYIELD)) { - UserYield(); + UserYield16(); while (msgQueue->wakeBits & QS_SENDMESSAGE) QUEUE_ReceiveMessage( msgQueue ); } @@ -949,7 +949,7 @@ if (peek) { - if (!(flags & PM_NOYIELD)) UserYield(); + if (!(flags & PM_NOYIELD)) UserYield16(); QUEUE_Unlock( msgQueue ); return FALSE; @@ -991,8 +991,8 @@ * 'hwnd' must be the handle of the dialog or menu window. * 'code' is the message filter value (MSGF_??? codes). */ -BOOL32 MSG_InternalGetMessage( MSG32 *msg, HWND32 hwnd, HWND32 hwndOwner, - WPARAM32 code, WORD flags, BOOL32 sendIdle ) +BOOL MSG_InternalGetMessage( MSG *msg, HWND hwnd, HWND hwndOwner, + WPARAM code, WORD flags, BOOL sendIdle ) { for (;;) { @@ -1001,8 +1001,8 @@ if (!MSG_PeekMessage( msg, 0, 0, 0, flags, TRUE )) { /* No message present -> send ENTERIDLE and wait */ - if (IsWindow32(hwndOwner)) - SendMessage32A( hwndOwner, WM_ENTERIDLE, + if (IsWindow(hwndOwner)) + SendMessageA( hwndOwner, WM_ENTERIDLE, code, (LPARAM)hwnd ); MSG_PeekMessage( msg, 0, 0, 0, flags, FALSE ); } @@ -1014,14 +1014,14 @@ if (HOOK_IsHooked( WH_SYSMSGFILTER ) || HOOK_IsHooked( WH_MSGFILTER )) { - MSG32 *pmsg = HeapAlloc( SystemHeap, 0, sizeof(MSG32) ); + MSG *pmsg = HeapAlloc( SystemHeap, 0, sizeof(MSG) ); if (pmsg) { - BOOL32 ret; + BOOL ret; *pmsg = *msg; - ret = (HOOK_CallHooks32A( WH_SYSMSGFILTER, code, 0, + ret = (HOOK_CallHooksA( WH_SYSMSGFILTER, code, 0, (LPARAM) pmsg ) || - HOOK_CallHooks32A( WH_MSGFILTER, code, 0, + HOOK_CallHooksA( WH_MSGFILTER, code, 0, (LPARAM) pmsg )); HeapFree( SystemHeap, 0, pmsg ); @@ -1047,9 +1047,9 @@ BOOL16 WINAPI PeekMessage16( LPMSG16 lpmsg, HWND16 hwnd, UINT16 first, UINT16 last, UINT16 flags ) { - MSG32 msg32; + MSG msg32; BOOL16 ret; - ret = PeekMessage32A(&msg32, hwnd, first, last, flags); + ret = PeekMessageA(&msg32, hwnd, first, last, flags); STRUCT32_MSG32to16(&msg32, lpmsg); return ret; } @@ -1057,7 +1057,7 @@ /*********************************************************************** * WIN16_PeekMessage32 (USER.819) */ -BOOL16 WINAPI WIN16_PeekMessage32( LPMSG16_32 lpmsg16_32, HWND16 hwnd, +BOOL16 WINAPI PeekMessage32_16( LPMSG16_32 lpmsg16_32, HWND16 hwnd, UINT16 first, UINT16 last, UINT16 flags, BOOL16 wHaveParamHigh ) { if (wHaveParamHigh == FALSE) @@ -1067,11 +1067,11 @@ } else { - MSG32 msg32; + MSG msg32; BOOL16 ret; - ret = (BOOL16)PeekMessage32A(&msg32, (HWND32)hwnd, - (UINT32)first, (UINT32)last, (UINT32)flags); + ret = (BOOL16)PeekMessageA(&msg32, (HWND)hwnd, + (UINT)first, (UINT)last, (UINT)flags); lpmsg16_32->msg.hwnd = msg32.hwnd; lpmsg16_32->msg.message = msg32.message; lpmsg16_32->msg.wParam = LOWORD(msg32.wParam); @@ -1088,8 +1088,8 @@ /*********************************************************************** * PeekMessageA */ -BOOL32 WINAPI PeekMessage32A( LPMSG32 lpmsg, HWND32 hwnd, - UINT32 min,UINT32 max,UINT32 wRemoveMsg) +BOOL WINAPI PeekMessageA( LPMSG lpmsg, HWND hwnd, + UINT min,UINT max,UINT wRemoveMsg) { return MSG_PeekMessage( lpmsg, hwnd, min, max, wRemoveMsg, TRUE ); } @@ -1121,15 +1121,15 @@ * ECMA-234, Win32 * */ -BOOL32 WINAPI PeekMessage32W( - LPMSG32 lpmsg, /* buffer to receive message */ - HWND32 hwnd, /* restrict to messages for hwnd */ - UINT32 min, /* minimum message to receive */ - UINT32 max, /* maximum message to receive */ - UINT32 wRemoveMsg /* removal flags */ +BOOL WINAPI PeekMessageW( + LPMSG lpmsg, /* buffer to receive message */ + HWND hwnd, /* restrict to messages for hwnd */ + UINT min, /* minimum message to receive */ + UINT max, /* maximum message to receive */ + UINT wRemoveMsg /* removal flags */ ) { /* FIXME: Should perform Unicode translation on specific messages */ - return PeekMessage32A(lpmsg,hwnd,min,max,wRemoveMsg); + return PeekMessageA(lpmsg,hwnd,min,max,wRemoveMsg); } /*********************************************************************** @@ -1137,11 +1137,11 @@ */ BOOL16 WINAPI GetMessage16( SEGPTR msg, HWND16 hwnd, UINT16 first, UINT16 last) { - BOOL32 ret; + BOOL ret; MSG16 *lpmsg = (MSG16 *)PTR_SEG_TO_LIN(msg); - MSG32 msg32; + MSG msg32; - ret = GetMessage32A( &msg32, hwnd, first, last ); + ret = GetMessageA( &msg32, hwnd, first, last ); STRUCT32_MSG32to16( &msg32, lpmsg ); @@ -1154,10 +1154,10 @@ /*********************************************************************** * WIN16_GetMessage32 (USER.820) */ -BOOL16 WINAPI WIN16_GetMessage32( SEGPTR msg16_32, HWND16 hWnd, UINT16 first, +BOOL16 WINAPI GetMessage32_16( SEGPTR msg16_32, HWND16 hWnd, UINT16 first, UINT16 last, BOOL16 wHaveParamHigh ) { - MSG16_32 *lpmsg16_32 = (MSG16_32 *)PTR_SEG_TO_LIN(msg16_32); + MSG32_16 *lpmsg16_32 = (MSG32_16 *)PTR_SEG_TO_LIN(msg16_32); if (wHaveParamHigh == FALSE) /* normal GetMessage16 call */ { @@ -1168,10 +1168,10 @@ } else { - MSG32 msg32; + MSG msg32; BOOL16 ret; - ret = (BOOL16)GetMessage32A(&msg32, hWnd, first, last); + ret = (BOOL16)GetMessageA(&msg32, hWnd, first, last); lpmsg16_32->msg.hwnd = msg32.hwnd; lpmsg16_32->msg.message = msg32.message; lpmsg16_32->msg.wParam = LOWORD(msg32.wParam); @@ -1187,14 +1187,14 @@ /*********************************************************************** * GetMessage32A (USER32.270) */ -BOOL32 WINAPI GetMessage32A(MSG32* lpmsg,HWND32 hwnd,UINT32 min,UINT32 max) +BOOL WINAPI GetMessageA(MSG* lpmsg,HWND hwnd,UINT min,UINT max) { MSG_PeekMessage( lpmsg, hwnd, min, max, PM_REMOVE, FALSE ); TRACE(msg,"message %04x, hwnd %04x, filter(%04x - %04x)\n", lpmsg->message, hwnd, min, max ); - HOOK_CallHooks32A( WH_GETMESSAGE, HC_ACTION, 0, (LPARAM)lpmsg ); + HOOK_CallHooksA( WH_GETMESSAGE, HC_ACTION, 0, (LPARAM)lpmsg ); return (lpmsg->message != WM_QUIT); } @@ -1226,14 +1226,14 @@ * ECMA-234, Win32 * */ -BOOL32 WINAPI GetMessage32W( - MSG32* lpmsg, /* buffer to receive message */ - HWND32 hwnd, /* restrict to messages for hwnd */ - UINT32 min, /* minimum message to receive */ - UINT32 max /* maximum message to receive */ +BOOL WINAPI GetMessageW( + MSG* lpmsg, /* buffer to receive message */ + HWND hwnd, /* restrict to messages for hwnd */ + UINT min, /* minimum message to receive */ + UINT max /* maximum message to receive */ ) { /* FIXME */ - return GetMessage32A(lpmsg, hwnd, min, max); + return GetMessageA(lpmsg, hwnd, min, max); } @@ -1243,17 +1243,17 @@ BOOL16 WINAPI PostMessage16( HWND16 hwnd, UINT16 message, WPARAM16 wParam, LPARAM lParam ) { - return (BOOL16) PostMessage32A( hwnd, message, wParam, lParam ); + return (BOOL16) PostMessageA( hwnd, message, wParam, lParam ); } /*********************************************************************** * PostMessage32A (USER32.419) */ -BOOL32 WINAPI PostMessage32A( HWND32 hwnd, UINT32 message, WPARAM32 wParam, +BOOL WINAPI PostMessageA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { - MSG32 msg; + MSG msg; WND *wndPtr; msg.hwnd = hwnd; @@ -1278,7 +1278,7 @@ { TRACE(msg,"BROADCAST Message to hWnd=%04x m=%04X w=%04X l=%08lX !\n", wndPtr->hwndSelf, message, wParam, lParam); - PostMessage32A( wndPtr->hwndSelf, message, wParam, lParam ); + PostMessageA( wndPtr->hwndSelf, message, wParam, lParam ); } } TRACE(msg,"End of HWND_BROADCAST !\n"); @@ -1295,11 +1295,11 @@ /*********************************************************************** * PostMessage32W (USER32.420) */ -BOOL32 WINAPI PostMessage32W( HWND32 hwnd, UINT32 message, WPARAM32 wParam, +BOOL WINAPI PostMessageW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { /* FIXME */ - return PostMessage32A( hwnd, message, wParam, lParam ); + return PostMessageA( hwnd, message, wParam, lParam ); } @@ -1309,9 +1309,9 @@ BOOL16 WINAPI PostAppMessage16( HTASK16 hTask, UINT16 message, WPARAM16 wParam, LPARAM lParam ) { - MSG32 msg; + MSG msg; - if (GetTaskQueue(hTask) == 0) return FALSE; + if (GetTaskQueue16(hTask) == 0) return FALSE; msg.hwnd = 0; msg.message = message; msg.wParam = wParam; @@ -1320,7 +1320,7 @@ msg.pt.x = 0; msg.pt.y = 0; - return QUEUE_AddMsg( GetTaskQueue(hTask), &msg, 0 ); + return QUEUE_AddMsg( GetTaskQueue16(hTask), &msg, 0 ); } @@ -1347,7 +1347,7 @@ for (ppWnd = list; *ppWnd; ppWnd++) { wndPtr = *ppWnd; - if (!IsWindow32(wndPtr->hwndSelf)) continue; + if (!IsWindow(wndPtr->hwndSelf)) continue; if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION) { TRACE(msg,"BROADCAST Message to hWnd=%04x m=%04X w=%04lX l=%08lX !\n", @@ -1390,7 +1390,7 @@ SPY_EnterMessage( SPY_SENDMESSAGE16, hwnd, msg, wParam, lParam ); - if (wndPtr->hmemTaskQ != GetFastQueue()) + if (wndPtr->hmemTaskQ != GetFastQueue16()) ret = MSG_SendMessage( wndPtr->hmemTaskQ, hwnd, msg, wParam, lParam, 0 ); else @@ -1404,17 +1404,17 @@ /************************************************************************ * MSG_CallWndProcHook32 */ -static void MSG_CallWndProcHook32( LPMSG32 pmsg, BOOL32 bUnicode ) +static void MSG_CallWndProcHook( LPMSG pmsg, BOOL bUnicode ) { - CWPSTRUCT32 cwp; + CWPSTRUCT cwp; cwp.lParam = pmsg->lParam; cwp.wParam = pmsg->wParam; cwp.message = pmsg->message; cwp.hwnd = pmsg->hwnd; - if (bUnicode) HOOK_CallHooks32W(WH_CALLWNDPROC, HC_ACTION, 1, (LPARAM)&cwp); - else HOOK_CallHooks32A( WH_CALLWNDPROC, HC_ACTION, 1, (LPARAM)&cwp ); + if (bUnicode) HOOK_CallHooksW(WH_CALLWNDPROC, HC_ACTION, 1, (LPARAM)&cwp); + else HOOK_CallHooksA( WH_CALLWNDPROC, HC_ACTION, 1, (LPARAM)&cwp ); pmsg->lParam = cwp.lParam; pmsg->wParam = cwp.wParam; @@ -1430,13 +1430,13 @@ * Thread-local message queues are not supported. * */ -BOOL32 WINAPI PostThreadMessage32A(DWORD idThread , UINT32 message, - WPARAM32 wParam, LPARAM lParam ) +BOOL WINAPI PostThreadMessageA(DWORD idThread , UINT message, + WPARAM wParam, LPARAM lParam ) { - MSG32 msg; + MSG msg; HQUEUE16 hQueue; - if ((hQueue = GetThreadQueue(idThread)) == 0) + if ((hQueue = GetThreadQueue16(idThread)) == 0) return FALSE; msg.hwnd = 0; @@ -1458,17 +1458,17 @@ * Thread-local message queues are not supported. * */ -BOOL32 WINAPI PostThreadMessage32W(DWORD idThread , UINT32 message, - WPARAM32 wParam, LPARAM lParam ) +BOOL WINAPI PostThreadMessageW(DWORD idThread , UINT message, + WPARAM wParam, LPARAM lParam ) { FIXME(sendmsg, "(...): Should do unicode/ascii conversion!\n"); - return PostThreadMessage32A(idThread, message, wParam, lParam); + return PostThreadMessageA(idThread, message, wParam, lParam); } /*********************************************************************** * SendMessage32A (USER32.454) */ -LRESULT WINAPI SendMessage32A( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, +LRESULT WINAPI SendMessageA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { WND * wndPtr; @@ -1482,16 +1482,16 @@ for (ppWnd = list; *ppWnd; ppWnd++) { wndPtr = *ppWnd; - if (!IsWindow32(wndPtr->hwndSelf)) continue; + if (!IsWindow(wndPtr->hwndSelf)) continue; if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION) - SendMessage32A( wndPtr->hwndSelf, msg, wParam, lParam ); + SendMessageA( wndPtr->hwndSelf, msg, wParam, lParam ); } HeapFree( SystemHeap, 0, list ); return TRUE; } if (HOOK_IsHooked( WH_CALLWNDPROC )) - MSG_CallWndProcHook32( (LPMSG32)&hwnd, FALSE); + MSG_CallWndProcHook( (LPMSG)&hwnd, FALSE); if (!(wndPtr = WIN_FindWndPtr( hwnd ))) { @@ -1502,16 +1502,16 @@ if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ)) return 0; /* Don't send anything if the task is dying */ - SPY_EnterMessage( SPY_SENDMESSAGE32, hwnd, msg, wParam, lParam ); + SPY_EnterMessage( SPY_SENDMESSAGE, hwnd, msg, wParam, lParam ); - if (wndPtr->hmemTaskQ != GetFastQueue()) + if (wndPtr->hmemTaskQ != GetFastQueue16()) ret = MSG_SendMessage( wndPtr->hmemTaskQ, hwnd, msg, wParam, lParam, SMSG_WIN32 ); else - ret = CallWindowProc32A( (WNDPROC32)wndPtr->winproc, + ret = CallWindowProcA( (WNDPROC)wndPtr->winproc, hwnd, msg, wParam, lParam ); - SPY_ExitMessage( SPY_RESULT_OK32, hwnd, msg, ret ); + SPY_ExitMessage( SPY_RESULT_OK, hwnd, msg, ret ); return ret; } @@ -1535,12 +1535,12 @@ * * ECMA-234, Win32 */ -LRESULT WINAPI SendMessage32W( - HWND32 hwnd, /* Window to send message to. If HWND_BROADCAST, +LRESULT WINAPI SendMessageW( + HWND hwnd, /* Window to send message to. If HWND_BROADCAST, the message will be sent to all top-level windows. */ - UINT32 msg, /* message */ - WPARAM32 wParam, /* message parameter */ + UINT msg, /* message */ + WPARAM wParam, /* message parameter */ LPARAM lParam /* additional message parameter */ ) { WND * wndPtr; @@ -1554,16 +1554,16 @@ for (ppWnd = list; *ppWnd; ppWnd++) { wndPtr = *ppWnd; - if (!IsWindow32(wndPtr->hwndSelf)) continue; + if (!IsWindow(wndPtr->hwndSelf)) continue; if (wndPtr->dwStyle & WS_POPUP || wndPtr->dwStyle & WS_CAPTION) - SendMessage32W( wndPtr->hwndSelf, msg, wParam, lParam ); + SendMessageW( wndPtr->hwndSelf, msg, wParam, lParam ); } HeapFree( SystemHeap, 0, list ); return TRUE; } if (HOOK_IsHooked( WH_CALLWNDPROC )) - MSG_CallWndProcHook32( (LPMSG32)&hwnd, TRUE); + MSG_CallWndProcHook( (LPMSG)&hwnd, TRUE); if (!(wndPtr = WIN_FindWndPtr( hwnd ))) { @@ -1573,16 +1573,16 @@ if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ)) return 0; /* Don't send anything if the task is dying */ - SPY_EnterMessage( SPY_SENDMESSAGE32, hwnd, msg, wParam, lParam ); + SPY_EnterMessage( SPY_SENDMESSAGE, hwnd, msg, wParam, lParam ); - if (wndPtr->hmemTaskQ != GetFastQueue()) + if (wndPtr->hmemTaskQ != GetFastQueue16()) ret = MSG_SendMessage( wndPtr->hmemTaskQ, hwnd, msg, wParam, lParam, SMSG_WIN32 | SMSG_UNICODE ); else - ret = CallWindowProc32W( (WNDPROC32)wndPtr->winproc, + ret = CallWindowProcW( (WNDPROC)wndPtr->winproc, hwnd, msg, wParam, lParam ); - SPY_ExitMessage( SPY_RESULT_OK32, hwnd, msg, ret ); + SPY_ExitMessage( SPY_RESULT_OK, hwnd, msg, ret ); return ret; } @@ -1602,24 +1602,24 @@ /*********************************************************************** * SendMessageTimeout32A (USER32.457) */ -LRESULT WINAPI SendMessageTimeout32A( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, - LPARAM lParam, UINT32 flags, - UINT32 timeout, LPDWORD resultp) +LRESULT WINAPI SendMessageTimeoutA( HWND hwnd, UINT msg, WPARAM wParam, + LPARAM lParam, UINT flags, + UINT timeout, LPDWORD resultp) { FIXME(sendmsg, "(...): semistub\n"); - return SendMessage32A (hwnd, msg, wParam, lParam); + return SendMessageA (hwnd, msg, wParam, lParam); } /*********************************************************************** * SendMessageTimeout32W (USER32.458) */ -LRESULT WINAPI SendMessageTimeout32W( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, - LPARAM lParam, UINT32 flags, - UINT32 timeout, LPDWORD resultp) +LRESULT WINAPI SendMessageTimeoutW( HWND hwnd, UINT msg, WPARAM wParam, + LPARAM lParam, UINT flags, + UINT timeout, LPDWORD resultp) { FIXME(sendmsg, "(...): semistub\n"); - return SendMessage32W (hwnd, msg, wParam, lParam); + return SendMessageW (hwnd, msg, wParam, lParam); } @@ -1648,15 +1648,15 @@ /*********************************************************************** * MsgWaitForMultipleObjects (USER32.400) */ -DWORD WINAPI MsgWaitForMultipleObjects( DWORD nCount, HANDLE32 *pHandles, - BOOL32 fWaitAll, DWORD dwMilliseconds, +DWORD WINAPI MsgWaitForMultipleObjects( DWORD nCount, HANDLE *pHandles, + BOOL fWaitAll, DWORD dwMilliseconds, DWORD dwWakeMask ) { DWORD i; - HANDLE32 handles[MAXIMUM_WAIT_OBJECTS]; + HANDLE handles[MAXIMUM_WAIT_OBJECTS]; DWORD ret; - HQUEUE16 hQueue = GetFastQueue(); + HQUEUE16 hQueue = GetFastQueue16(); MESSAGEQUEUE *msgQueue = (MESSAGEQUEUE *)QUEUE_Lock( hQueue ); if (!msgQueue) return WAIT_FAILED; @@ -1683,7 +1683,7 @@ * This will all go away when the real Win32 threads are implemented for all * the threads of an applications. Including the main thread. */ - DWORD curTime = GetCurrentTime32(); + DWORD curTime = GetCurrentTime(); do { @@ -1715,7 +1715,7 @@ /* * And continue doing this until we hit the timeout. */ - } while ((dwMilliseconds == INFINITE32) || (GetCurrentTime32()-curTime < dwMilliseconds) ); + } while ((dwMilliseconds == INFINITE) || (GetCurrentTime()-curTime < dwMilliseconds) ); } else { @@ -1864,8 +1864,8 @@ * This produces WM_CHAR messages only for keys mapped to ASCII characters * by the keyboard driver. */ -static BOOL32 MSG_DoTranslateMessage( UINT32 message, HWND32 hwnd, - WPARAM32 wParam, LPARAM lParam ) +static BOOL MSG_DoTranslateMessage( UINT message, HWND hwnd, + WPARAM wParam, LPARAM lParam ) { static int dead_char; BYTE wp[2]; @@ -1883,7 +1883,7 @@ wParam, HIWORD(lParam) ); /* FIXME : should handle ToAscii yielding 2 */ - switch (ToAscii32(wParam, HIWORD(lParam), + switch (ToAscii(wParam, HIWORD(lParam), QueueKeyStateTable,(LPWORD)wp, 0)) { case 1 : @@ -1939,14 +1939,14 @@ /*********************************************************************** * WIN16_TranslateMessage32 (USER.821) */ -BOOL16 WINAPI WIN16_TranslateMessage32( const MSG16_32 *msg, BOOL16 wHaveParamHigh ) +BOOL16 WINAPI TranslateMessage32_16( const MSG32_16 *msg, BOOL16 wHaveParamHigh ) { - WPARAM32 wParam; + WPARAM wParam; if (wHaveParamHigh) wParam = MAKELONG(msg->msg.wParam, msg->wParamHigh); else - wParam = (WPARAM32)msg->msg.wParam; + wParam = (WPARAM)msg->msg.wParam; return MSG_DoTranslateMessage( msg->msg.message, msg->msg.hwnd, wParam, msg->msg.lParam ); @@ -1955,7 +1955,7 @@ /*********************************************************************** * TranslateMessage32 (USER32.556) */ -BOOL32 WINAPI TranslateMessage32( const MSG32 *msg ) +BOOL WINAPI TranslateMessage( const MSG *msg ) { return MSG_DoTranslateMessage( msg->message, msg->hwnd, msg->wParam, msg->lParam ); @@ -2001,7 +2001,7 @@ msg->hwnd); wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; /* Validate the update region to avoid infinite WM_PAINT loop */ - ValidateRect32( msg->hwnd, NULL ); + ValidateRect( msg->hwnd, NULL ); } return retval; } @@ -2010,29 +2010,29 @@ /*********************************************************************** * WIN16_DispatchMessage32 (USER.822) */ -LONG WINAPI WIN16_DispatchMessage32( const MSG16_32* lpmsg16_32, BOOL16 wHaveParamHigh ) +LONG WINAPI DispatchMessage32_16( const MSG32_16* lpmsg16_32, BOOL16 wHaveParamHigh ) { if (wHaveParamHigh == FALSE) return DispatchMessage16(&(lpmsg16_32->msg)); else { - MSG32 msg; + MSG msg; msg.hwnd = lpmsg16_32->msg.hwnd; msg.message = lpmsg16_32->msg.message; msg.wParam = MAKELONG(lpmsg16_32->msg.wParam, lpmsg16_32->wParamHigh); msg.lParam = lpmsg16_32->msg.lParam; msg.time = lpmsg16_32->msg.time; - msg.pt.x = (INT32)lpmsg16_32->msg.pt.x; - msg.pt.y = (INT32)lpmsg16_32->msg.pt.y; - return DispatchMessage32A(&msg); + msg.pt.x = (INT)lpmsg16_32->msg.pt.x; + msg.pt.y = (INT)lpmsg16_32->msg.pt.y; + return DispatchMessageA(&msg); } } /*********************************************************************** * DispatchMessage32A (USER32.141) */ -LONG WINAPI DispatchMessage32A( const MSG32* msg ) +LONG WINAPI DispatchMessageA( const MSG* msg ) { WND * wndPtr; LONG retval; @@ -2044,7 +2044,7 @@ if (msg->lParam) { /* HOOK_CallHooks32A( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */ - return CallWindowProc32A( (WNDPROC32)msg->lParam, msg->hwnd, + return CallWindowProcA( (WNDPROC)msg->lParam, msg->hwnd, msg->message, msg->wParam, GetTickCount() ); } } @@ -2056,12 +2056,12 @@ if (painting) wndPtr->flags |= WIN_NEEDS_BEGINPAINT; /* HOOK_CallHooks32A( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */ - SPY_EnterMessage( SPY_DISPATCHMESSAGE32, msg->hwnd, msg->message, + SPY_EnterMessage( SPY_DISPATCHMESSAGE, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - retval = CallWindowProc32A( (WNDPROC32)wndPtr->winproc, + retval = CallWindowProcA( (WNDPROC)wndPtr->winproc, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - SPY_ExitMessage( SPY_RESULT_OK32, msg->hwnd, msg->message, retval ); + SPY_ExitMessage( SPY_RESULT_OK, msg->hwnd, msg->message, retval ); if (painting && (wndPtr = WIN_FindWndPtr( msg->hwnd )) && (wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) @@ -2070,7 +2070,7 @@ msg->hwnd); wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; /* Validate the update region to avoid infinite WM_PAINT loop */ - ValidateRect32( msg->hwnd, NULL ); + ValidateRect( msg->hwnd, NULL ); } return retval; } @@ -2097,7 +2097,7 @@ * ECMA-234, Win32 * */ -LONG WINAPI DispatchMessage32W( const MSG32* msg ) +LONG WINAPI DispatchMessageW( const MSG* msg ) { WND * wndPtr; LONG retval; @@ -2109,7 +2109,7 @@ if (msg->lParam) { /* HOOK_CallHooks32W( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */ - return CallWindowProc32W( (WNDPROC32)msg->lParam, msg->hwnd, + return CallWindowProcW( (WNDPROC)msg->lParam, msg->hwnd, msg->message, msg->wParam, GetTickCount() ); } } @@ -2121,12 +2121,12 @@ if (painting) wndPtr->flags |= WIN_NEEDS_BEGINPAINT; /* HOOK_CallHooks32W( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */ - SPY_EnterMessage( SPY_DISPATCHMESSAGE32, msg->hwnd, msg->message, + SPY_EnterMessage( SPY_DISPATCHMESSAGE, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - retval = CallWindowProc32W( (WNDPROC32)wndPtr->winproc, + retval = CallWindowProcW( (WNDPROC)wndPtr->winproc, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - SPY_ExitMessage( SPY_RESULT_OK32, msg->hwnd, msg->message, retval ); + SPY_ExitMessage( SPY_RESULT_OK, msg->hwnd, msg->message, retval ); if (painting && (wndPtr = WIN_FindWndPtr( msg->hwnd )) && (wndPtr->flags & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) @@ -2135,7 +2135,7 @@ msg->hwnd); wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; /* Validate the update region to avoid infinite WM_PAINT loop */ - ValidateRect32( msg->hwnd, NULL ); + ValidateRect( msg->hwnd, NULL ); } return retval; } @@ -2154,20 +2154,20 @@ /*********************************************************************** * RegisterWindowMessage32A (USER32.437) */ -WORD WINAPI RegisterWindowMessage32A( LPCSTR str ) +WORD WINAPI RegisterWindowMessageA( LPCSTR str ) { TRACE(msg, "%s\n", str ); - return GlobalAddAtom32A( str ); + return GlobalAddAtomA( str ); } /*********************************************************************** * RegisterWindowMessage32W (USER32.438) */ -WORD WINAPI RegisterWindowMessage32W( LPCWSTR str ) +WORD WINAPI RegisterWindowMessageW( LPCWSTR str ) { TRACE(msg, "%p\n", str ); - return GlobalAddAtom32W( str ); + return GlobalAddAtomW( str ); } @@ -2205,21 +2205,21 @@ */ BOOL16 WINAPI InSendMessage16(void) { - return InSendMessage32(); + return InSendMessage(); } /*********************************************************************** * InSendMessage32 (USER32.320) */ -BOOL32 WINAPI InSendMessage32(void) +BOOL WINAPI InSendMessage(void) { MESSAGEQUEUE *queue; - BOOL32 ret; + BOOL ret; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return 0; - ret = (BOOL32)queue->smWaiting; + ret = (BOOL)queue->smWaiting; QUEUE_Unlock( queue ); return ret; @@ -2229,7 +2229,7 @@ * BroadcastSystemMessage (USER32.12) */ LONG WINAPI BroadcastSystemMessage( - DWORD dwFlags,LPDWORD recipients,UINT32 uMessage,WPARAM32 wParam, + DWORD dwFlags,LPDWORD recipients,UINT uMessage,WPARAM wParam, LPARAM lParam ) { FIXME(sendmsg,"(%08lx,%08lx,%08x,%08x,%08lx): stub!\n", @@ -2245,16 +2245,16 @@ * with a higher priority as the other "Posted" messages. * QUEUE_AddMsg has to be modifyed. */ -BOOL32 WINAPI SendNotifyMessage32A(HWND32 hwnd,UINT32 msg,WPARAM32 wParam,LPARAM lParam) -{ BOOL32 ret = TRUE; +BOOL WINAPI SendNotifyMessageA(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) +{ BOOL ret = TRUE; FIXME(msg,"(%04x,%08x,%08x,%08lx) not complete\n", hwnd, msg, wParam, lParam); if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL)) - { ret=SendMessage32A ( hwnd, msg, wParam, lParam ); + { ret=SendMessageA ( hwnd, msg, wParam, lParam ); } else - { PostMessage32A ( hwnd, msg, wParam, lParam ); + { PostMessageA ( hwnd, msg, wParam, lParam ); } return ret; } @@ -2266,16 +2266,16 @@ * with a higher priority as the other "Posted" messages. * QUEUE_AddMsg has to be modifyed. */ -BOOL32 WINAPI SendNotifyMessage32W(HWND32 hwnd,UINT32 msg,WPARAM32 wParam,LPARAM lParam) -{ BOOL32 ret = TRUE; +BOOL WINAPI SendNotifyMessageW(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) +{ BOOL ret = TRUE; FIXME(msg,"(%04x,%08x,%08x,%08lx) not complete\n", hwnd, msg, wParam, lParam); if ( GetCurrentThreadId() == GetWindowThreadProcessId ( hwnd, NULL)) - { ret=SendMessage32W ( hwnd, msg, wParam, lParam ); + { ret=SendMessageW ( hwnd, msg, wParam, lParam ); } else - { PostMessage32W ( hwnd, msg, wParam, lParam ); + { PostMessageW ( hwnd, msg, wParam, lParam ); } return ret; } @@ -2286,17 +2286,17 @@ * is processed. We have to modify the message processing for a exact * implementation... */ -BOOL32 WINAPI SendMessageCallBack32A( - HWND32 hWnd,UINT32 Msg,WPARAM32 wParam,LPARAM lParam, - FARPROC32 lpResultCallBack,DWORD dwData) +BOOL WINAPI SendMessageCallBackA( + HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam, + FARPROC lpResultCallBack,DWORD dwData) { FIXME(msg,"(0x%04x,0x%04x,0x%08x,0x%08lx,%p,0x%08lx),stub!\n", hWnd,Msg,wParam,lParam,lpResultCallBack,dwData); if ( hWnd == HWND_BROADCAST) - { PostMessage32A( hWnd, Msg, wParam, lParam); + { PostMessageA( hWnd, Msg, wParam, lParam); FIXME(msg,"Broadcast: Callback will not be called!\n"); return TRUE; } - (lpResultCallBack)( hWnd, Msg, dwData, SendMessage32A ( hWnd, Msg, wParam, lParam )); + (lpResultCallBack)( hWnd, Msg, dwData, SendMessageA ( hWnd, Msg, wParam, lParam )); return TRUE; }
diff --git a/windows/mouse.c b/windows/mouse.c index aa641b0..64f4998 100644 --- a/windows/mouse.c +++ b/windows/mouse.c
@@ -15,7 +15,7 @@ /**********************************************************************/ -extern BOOL32 X11DRV_MOUSE_DisableWarpPointer; +extern BOOL X11DRV_MOUSE_DisableWarpPointer; static LPMOUSE_EVENT_PROC DefMouseEventProc = NULL; @@ -57,7 +57,7 @@ * MOUSE_SendEvent */ void MOUSE_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY, - DWORD keyState, DWORD time, HWND32 hWnd ) + DWORD keyState, DWORD time, HWND hWnd ) { int width = MONITOR_GetWidth (&MONITOR_PrimaryMonitor); int height = MONITOR_GetHeight(&MONITOR_PrimaryMonitor);
diff --git a/windows/msgbox.c b/windows/msgbox.c index 1a1aa5d..826d82e 100644 --- a/windows/msgbox.c +++ b/windows/msgbox.c
@@ -20,62 +20,62 @@ * * Dialog procedure for message boxes. */ -static LRESULT CALLBACK MSGBOX_DlgProc( HWND32 hwnd, UINT32 message, - WPARAM32 wParam, LPARAM lParam ) +static LRESULT CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message, + WPARAM wParam, LPARAM lParam ) { - static HFONT32 hFont = 0; - LPMSGBOXPARAMS32A lpmb; + static HFONT hFont = 0; + LPMSGBOXPARAMSA lpmb; - RECT32 rect, textrect; - HWND32 hItem; - HDC32 hdc; + RECT rect, textrect; + HWND hItem; + HDC hdc; LRESULT lRet; int i, buttons, bwidth, bheight, theight, wwidth, bpos; int borheight, iheight, tiheight; switch(message) { case WM_INITDIALOG: - lpmb = (LPMSGBOXPARAMS32A)lParam; + lpmb = (LPMSGBOXPARAMSA)lParam; if (TWEAK_WineLook >= WIN95_LOOK) { - NONCLIENTMETRICS32A nclm; - INT32 i; - nclm.cbSize = sizeof(NONCLIENTMETRICS32A); - SystemParametersInfo32A (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); - hFont = CreateFontIndirect32A (&nclm.lfMessageFont); + NONCLIENTMETRICSA nclm; + INT i; + nclm.cbSize = sizeof(NONCLIENTMETRICSA); + SystemParametersInfoA (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); + hFont = CreateFontIndirectA (&nclm.lfMessageFont); /* set button font */ for (i=1; i < 8; i++) - SendDlgItemMessage32A (hwnd, i, WM_SETFONT, (WPARAM32)hFont, 0); + SendDlgItemMessageA (hwnd, i, WM_SETFONT, (WPARAM)hFont, 0); /* set text font */ - SendDlgItemMessage32A (hwnd, 100, WM_SETFONT, (WPARAM32)hFont, 0); + SendDlgItemMessageA (hwnd, 100, WM_SETFONT, (WPARAM)hFont, 0); } - if (lpmb->lpszCaption) SetWindowText32A(hwnd, lpmb->lpszCaption); - SetWindowText32A(GetDlgItem32(hwnd, 100), lpmb->lpszText); + if (lpmb->lpszCaption) SetWindowTextA(hwnd, lpmb->lpszCaption); + SetWindowTextA(GetDlgItem(hwnd, 100), lpmb->lpszText); /* Hide not selected buttons */ switch(lpmb->dwStyle & MB_TYPEMASK) { case MB_OK: - ShowWindow32(GetDlgItem32(hwnd, 2), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 2), SW_HIDE); /* fall through */ case MB_OKCANCEL: - ShowWindow32(GetDlgItem32(hwnd, 3), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 4), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 5), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 6), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 7), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 3), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 4), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 5), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 6), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 7), SW_HIDE); break; case MB_ABORTRETRYIGNORE: - ShowWindow32(GetDlgItem32(hwnd, 1), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 2), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 6), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 7), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 1), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 2), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 6), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 7), SW_HIDE); break; case MB_YESNO: - ShowWindow32(GetDlgItem32(hwnd, 2), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 2), SW_HIDE); /* fall through */ case MB_YESNOCANCEL: - ShowWindow32(GetDlgItem32(hwnd, 1), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 3), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 4), SW_HIDE); - ShowWindow32(GetDlgItem32(hwnd, 5), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 1), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 3), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 4), SW_HIDE); + ShowWindow(GetDlgItem(hwnd, 5), SW_HIDE); break; } /* Set the icon */ @@ -100,69 +100,69 @@ } /* Position everything */ - GetWindowRect32(hwnd, &rect); + GetWindowRect(hwnd, &rect); borheight = rect.bottom - rect.top; wwidth = rect.right - rect.left; - GetClientRect32(hwnd, &rect); + GetClientRect(hwnd, &rect); borheight -= rect.bottom - rect.top; /* Get the icon height */ - GetWindowRect32(GetDlgItem32(hwnd, 1088), &rect); + GetWindowRect(GetDlgItem(hwnd, 1088), &rect); iheight = rect.bottom - rect.top; /* Get the number of visible buttons and their width */ - GetWindowRect32(GetDlgItem32(hwnd, 2), &rect); + GetWindowRect(GetDlgItem(hwnd, 2), &rect); bheight = rect.bottom - rect.top; bwidth = rect.left; - GetWindowRect32(GetDlgItem32(hwnd, 1), &rect); + GetWindowRect(GetDlgItem(hwnd, 1), &rect); bwidth -= rect.left; for (buttons = 0, i = 1; i < 8; i++) { - hItem = GetDlgItem32(hwnd, i); - if (GetWindowLong32A(hItem, GWL_STYLE) & WS_VISIBLE) buttons++; + hItem = GetDlgItem(hwnd, i); + if (GetWindowLongA(hItem, GWL_STYLE) & WS_VISIBLE) buttons++; } /* Get the text size */ - hItem = GetDlgItem32(hwnd, 100); - GetWindowRect32(hItem, &textrect); - MapWindowPoints32(0, hwnd, (LPPOINT32)&textrect, 2); + hItem = GetDlgItem(hwnd, 100); + GetWindowRect(hItem, &textrect); + MapWindowPoints(0, hwnd, (LPPOINT)&textrect, 2); - GetClientRect32(hItem, &rect); - hdc = GetDC32(hItem); - lRet = DrawText32A( hdc, lpmb->lpszText, -1, &rect, + GetClientRect(hItem, &rect); + hdc = GetDC(hItem); + lRet = DrawTextA( hdc, lpmb->lpszText, -1, &rect, DT_LEFT | DT_EXPANDTABS | DT_WORDBREAK | DT_CALCRECT); theight = rect.bottom - rect.top; tiheight = 16 + MAX(iheight, theight); - ReleaseDC32(hItem, hdc); + ReleaseDC(hItem, hdc); /* Position the text */ - SetWindowPos32(hItem, 0, textrect.left, (tiheight - theight) / 2, + SetWindowPos(hItem, 0, textrect.left, (tiheight - theight) / 2, rect.right - rect.left, theight, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); /* Position the icon */ - hItem = GetDlgItem32(hwnd, 1088); - GetWindowRect32(hItem, &rect); - MapWindowPoints32(0, hwnd, (LPPOINT32)&rect, 2); - SetWindowPos32(hItem, 0, rect.left, (tiheight - iheight) / 2, 0, 0, + hItem = GetDlgItem(hwnd, 1088); + GetWindowRect(hItem, &rect); + MapWindowPoints(0, hwnd, (LPPOINT)&rect, 2); + SetWindowPos(hItem, 0, rect.left, (tiheight - iheight) / 2, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); /* Resize the window */ - SetWindowPos32(hwnd, 0, 0, 0, wwidth, 8 + tiheight + bheight + borheight, + SetWindowPos(hwnd, 0, 0, 0, wwidth, 8 + tiheight + bheight + borheight, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); /* Position the buttons */ bpos = (wwidth - bwidth * buttons) / 2; - GetWindowRect32(GetDlgItem32(hwnd, 1), &rect); + GetWindowRect(GetDlgItem(hwnd, 1), &rect); for (buttons = i = 0; i < 7; i++) { /* some arithmetic to get the right order for YesNoCancel windows */ - hItem = GetDlgItem32(hwnd, (i + 5) % 7 + 1); - if (GetWindowLong32A(hItem, GWL_STYLE) & WS_VISIBLE) { + hItem = GetDlgItem(hwnd, (i + 5) % 7 + 1); + if (GetWindowLongA(hItem, GWL_STYLE) & WS_VISIBLE) { if (buttons++ == ((lpmb->dwStyle & MB_DEFMASK) >> 8)) { - SetFocus32(hItem); - SendMessage32A( hItem, BM_SETSTYLE32, BS_DEFPUSHBUTTON, TRUE ); + SetFocus(hItem); + SendMessageA( hItem, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE ); } - SetWindowPos32(hItem, 0, bpos, tiheight, 0, 0, + SetWindowPos(hItem, 0, bpos, tiheight, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOREDRAW); bpos += bwidth; } @@ -181,8 +181,8 @@ case IDYES: case IDNO: if ((TWEAK_WineLook > WIN31_LOOK) && hFont) - DeleteObject32 (hFont); - EndDialog32(hwnd, wParam); + DeleteObject (hFont); + EndDialog(hwnd, wParam); break; } @@ -201,7 +201,7 @@ INT16 WINAPI MessageBox16( HWND16 hwnd, LPCSTR text, LPCSTR title, UINT16 type) { WARN(dialog,"Messagebox\n"); - return MessageBox32A( hwnd, text, title, type ); + return MessageBoxA( hwnd, text, title, type ); } @@ -212,9 +212,9 @@ * The WARN is here to help debug erroneous MessageBoxes * Use: -debugmsg warn+dialog,+relay */ -INT32 WINAPI MessageBox32A(HWND32 hWnd, LPCSTR text, LPCSTR title, UINT32 type) +INT WINAPI MessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type) { - MSGBOXPARAMS32A mbox; + MSGBOXPARAMSA mbox; WARN(dialog,"Messagebox\n"); if (!text) text="<WINE-NULL>"; if (!title) @@ -222,25 +222,25 @@ mbox.lpszCaption = title; mbox.lpszText = text; mbox.dwStyle = type; - return DialogBoxIndirectParam32A( WIN_GetWindowInstance(hWnd), + return DialogBoxIndirectParamA( WIN_GetWindowInstance(hWnd), SYSRES_GetResPtr( SYSRES_DIALOG_MSGBOX ), - hWnd, (DLGPROC32)MSGBOX_DlgProc, (LPARAM)&mbox ); + hWnd, (DLGPROC)MSGBOX_DlgProc, (LPARAM)&mbox ); } /************************************************************************** * MessageBox32W (USER32.396) */ -INT32 WINAPI MessageBox32W( HWND32 hwnd, LPCWSTR text, LPCWSTR title, - UINT32 type ) +INT WINAPI MessageBoxW( HWND hwnd, LPCWSTR text, LPCWSTR title, + UINT type ) { LPSTR titleA = HEAP_strdupWtoA( GetProcessHeap(), 0, title ); LPSTR textA = HEAP_strdupWtoA( GetProcessHeap(), 0, text ); - INT32 ret; + INT ret; WARN(dialog,"Messagebox\n"); - ret = MessageBox32A( hwnd, textA, titleA, type ); + ret = MessageBoxA( hwnd, textA, titleA, type ); HeapFree( GetProcessHeap(), 0, titleA ); HeapFree( GetProcessHeap(), 0, textA ); return ret; @@ -250,23 +250,23 @@ /************************************************************************** * MessageBoxEx32A (USER32.392) */ -INT32 WINAPI MessageBoxEx32A( HWND32 hWnd, LPCSTR text, LPCSTR title, - UINT32 type, WORD langid ) +INT WINAPI MessageBoxExA( HWND hWnd, LPCSTR text, LPCSTR title, + UINT type, WORD langid ) { WARN(dialog,"Messagebox\n"); /* ignore language id for now */ - return MessageBox32A(hWnd,text,title,type); + return MessageBoxA(hWnd,text,title,type); } /************************************************************************** * MessageBoxEx32W (USER32.393) */ -INT32 WINAPI MessageBoxEx32W( HWND32 hWnd, LPCWSTR text, LPCWSTR title, - UINT32 type, WORD langid ) +INT WINAPI MessageBoxExW( HWND hWnd, LPCWSTR text, LPCWSTR title, + UINT type, WORD langid ) { WARN(dialog,"Messagebox\n"); /* ignore language id for now */ - return MessageBox32W(hWnd,text,title,type); + return MessageBoxW(hWnd,text,title,type); } /************************************************************************** @@ -274,7 +274,7 @@ */ INT16 WINAPI MessageBoxIndirect16( LPMSGBOXPARAMS16 msgbox ) { - MSGBOXPARAMS32A msgbox32; + MSGBOXPARAMSA msgbox32; WARN(dialog,"Messagebox\n"); msgbox32.cbSize = msgbox->cbSize; @@ -288,30 +288,30 @@ msgbox32.lpfnMsgBoxCallback = msgbox->lpfnMsgBoxCallback; msgbox32.dwLanguageId = msgbox->dwLanguageId; - return DialogBoxIndirectParam32A( msgbox32.hInstance, + return DialogBoxIndirectParamA( msgbox32.hInstance, SYSRES_GetResPtr( SYSRES_DIALOG_MSGBOX ), - msgbox32.hwndOwner, (DLGPROC32)MSGBOX_DlgProc, + msgbox32.hwndOwner, (DLGPROC)MSGBOX_DlgProc, (LPARAM)&msgbox32 ); } /************************************************************************** * MessageBoxIndirect32A (USER32.394) */ -INT32 WINAPI MessageBoxIndirect32A( LPMSGBOXPARAMS32A msgbox ) +INT WINAPI MessageBoxIndirectA( LPMSGBOXPARAMSA msgbox ) { WARN(dialog,"Messagebox\n"); - return DialogBoxIndirectParam32A( msgbox->hInstance, + return DialogBoxIndirectParamA( msgbox->hInstance, SYSRES_GetResPtr( SYSRES_DIALOG_MSGBOX ), - msgbox->hwndOwner, (DLGPROC32)MSGBOX_DlgProc, + msgbox->hwndOwner, (DLGPROC)MSGBOX_DlgProc, (LPARAM)msgbox ); } /************************************************************************** * MessageBoxIndirect32W (USER32.395) */ -INT32 WINAPI MessageBoxIndirect32W( LPMSGBOXPARAMS32W msgbox ) +INT WINAPI MessageBoxIndirectW( LPMSGBOXPARAMSW msgbox ) { - MSGBOXPARAMS32A msgboxa; + MSGBOXPARAMSA msgboxa; WARN(dialog,"Messagebox\n"); memcpy(&msgboxa,msgbox,sizeof(msgboxa)); @@ -320,7 +320,7 @@ if (msgbox->lpszText) lstrcpyWtoA((LPSTR)msgboxa.lpszText,msgbox->lpszText); - return MessageBoxIndirect32A(&msgboxa); + return MessageBoxIndirectA(&msgboxa); } @@ -330,17 +330,17 @@ void WINAPI FatalAppExit16( UINT16 action, LPCSTR str ) { WARN(dialog,"AppExit\n"); - FatalAppExit32A( action, str ); + FatalAppExitA( action, str ); } /************************************************************************** * FatalAppExit32A (KERNEL32.108) */ -void WINAPI FatalAppExit32A( UINT32 action, LPCSTR str ) +void WINAPI FatalAppExitA( UINT action, LPCSTR str ) { WARN(dialog,"AppExit\n"); - MessageBox32A( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); + MessageBoxA( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); ExitProcess(0); } @@ -348,10 +348,10 @@ /************************************************************************** * FatalAppExit32W (KERNEL32.109) */ -void WINAPI FatalAppExit32W( UINT32 action, LPCWSTR str ) +void WINAPI FatalAppExitW( UINT action, LPCWSTR str ) { WARN(dialog,"AppExit\n"); - MessageBox32W( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); + MessageBoxW( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); ExitProcess(0); }
diff --git a/windows/multimon.c b/windows/multimon.c index a85d8f4..12ba428 100644 --- a/windows/multimon.c +++ b/windows/multimon.c
@@ -56,42 +56,42 @@ /**********************************************************************/ -HMONITOR WINAPI MonitorFromPoint(POINT32 ptScreenCoords, DWORD dwFlags) +HMONITOR WINAPI MonitorFromPoint(POINT ptScreenCoords, DWORD dwFlags) { if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) || ((ptScreenCoords.x >= 0) && - (ptScreenCoords.x < GetSystemMetrics32(SM_CXSCREEN)) && + (ptScreenCoords.x < GetSystemMetrics(SM_CXSCREEN)) && (ptScreenCoords.y >= 0) && - (ptScreenCoords.y < GetSystemMetrics32(SM_CYSCREEN)))) + (ptScreenCoords.y < GetSystemMetrics(SM_CYSCREEN)))) { return xPRIMARY_MONITOR; } return NULL; } -HMONITOR WINAPI MonitorFromRect(LPRECT32 lprcScreenCoords, DWORD dwFlags) +HMONITOR WINAPI MonitorFromRect(LPRECT lprcScreenCoords, DWORD dwFlags) { if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) || ((lprcScreenCoords->right > 0) && (lprcScreenCoords->bottom > 0) && - (lprcScreenCoords->left < GetSystemMetrics32(SM_CXSCREEN)) && - (lprcScreenCoords->top < GetSystemMetrics32(SM_CYSCREEN)))) + (lprcScreenCoords->left < GetSystemMetrics(SM_CXSCREEN)) && + (lprcScreenCoords->top < GetSystemMetrics(SM_CYSCREEN)))) { return xPRIMARY_MONITOR; } return NULL; } -HMONITOR WINAPI MonitorFromWindow(HWND32 hWnd, DWORD dwFlags) +HMONITOR WINAPI MonitorFromWindow(HWND hWnd, DWORD dwFlags) { - WINDOWPLACEMENT32 wp; + WINDOWPLACEMENT wp; if (dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) return xPRIMARY_MONITOR; - if (IsIconic32(hWnd) ? - GetWindowPlacement32(hWnd, &wp) : - GetWindowRect32(hWnd, &wp.rcNormalPosition)) { + if (IsIconic(hWnd) ? + GetWindowPlacement(hWnd, &wp) : + GetWindowRect(hWnd, &wp.rcNormalPosition)) { return MonitorFromRect(&wp.rcNormalPosition, dwFlags); } @@ -99,24 +99,24 @@ return NULL; } -BOOL32 WINAPI GetMonitorInfo32A(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo) +BOOL WINAPI GetMonitorInfoA(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo) { - RECT32 rcWork; + RECT rcWork; if ((hMonitor == xPRIMARY_MONITOR) && lpMonitorInfo && (lpMonitorInfo->cbSize >= sizeof(MONITORINFO)) && - SystemParametersInfo32A(SPI_GETWORKAREA, 0, &rcWork, 0)) + SystemParametersInfoA(SPI_GETWORKAREA, 0, &rcWork, 0)) { lpMonitorInfo->rcMonitor.left = 0; lpMonitorInfo->rcMonitor.top = 0; - lpMonitorInfo->rcMonitor.right = GetSystemMetrics32(SM_CXSCREEN); - lpMonitorInfo->rcMonitor.bottom = GetSystemMetrics32(SM_CYSCREEN); + lpMonitorInfo->rcMonitor.right = GetSystemMetrics(SM_CXSCREEN); + lpMonitorInfo->rcMonitor.bottom = GetSystemMetrics(SM_CYSCREEN); lpMonitorInfo->rcWork = rcWork; lpMonitorInfo->dwFlags = MONITORINFOF_PRIMARY; - if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX32A)) - lstrcpy32A(((MONITORINFOEX32A*)lpMonitorInfo)->szDevice, "DISPLAY"); + if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEXA)) + lstrcpyA(((MONITORINFOEXA*)lpMonitorInfo)->szDevice, "DISPLAY"); return TRUE; } @@ -124,24 +124,24 @@ return FALSE; } -BOOL32 WINAPI GetMonitorInfo32W(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo) +BOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo) { - RECT32 rcWork; + RECT rcWork; if ((hMonitor == xPRIMARY_MONITOR) && lpMonitorInfo && (lpMonitorInfo->cbSize >= sizeof(MONITORINFO)) && - SystemParametersInfo32W(SPI_GETWORKAREA, 0, &rcWork, 0)) + SystemParametersInfoW(SPI_GETWORKAREA, 0, &rcWork, 0)) { lpMonitorInfo->rcMonitor.left = 0; lpMonitorInfo->rcMonitor.top = 0; - lpMonitorInfo->rcMonitor.right = GetSystemMetrics32(SM_CXSCREEN); - lpMonitorInfo->rcMonitor.bottom = GetSystemMetrics32(SM_CYSCREEN); + lpMonitorInfo->rcMonitor.right = GetSystemMetrics(SM_CXSCREEN); + lpMonitorInfo->rcMonitor.bottom = GetSystemMetrics(SM_CYSCREEN); lpMonitorInfo->rcWork = rcWork; lpMonitorInfo->dwFlags = MONITORINFOF_PRIMARY; - if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX32W)) - lstrcpy32W(((MONITORINFOEX32W*)lpMonitorInfo)->szDevice, (LPCWSTR)"D\0I\0S\0P\0L\0A\0Y\0\0"); + if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEXW)) + lstrcpyW(((MONITORINFOEXW*)lpMonitorInfo)->szDevice, (LPCWSTR)"D\0I\0S\0P\0L\0A\0Y\0\0"); return TRUE; } @@ -149,37 +149,37 @@ return FALSE; } -BOOL32 WINAPI EnumDisplayMonitors( - HDC32 hdcOptionalForPainting, - LPRECT32 lprcEnumMonitorsThatIntersect, +BOOL WINAPI EnumDisplayMonitors( + HDC hdcOptionalForPainting, + LPRECT lprcEnumMonitorsThatIntersect, MONITORENUMPROC lpfnEnumProc, LPARAM dwData) { - RECT32 rcLimit; + RECT rcLimit; if (!lpfnEnumProc) return FALSE; rcLimit.left = 0; rcLimit.top = 0; - rcLimit.right = GetSystemMetrics32(SM_CXSCREEN); - rcLimit.bottom = GetSystemMetrics32(SM_CYSCREEN); + rcLimit.right = GetSystemMetrics(SM_CXSCREEN); + rcLimit.bottom = GetSystemMetrics(SM_CYSCREEN); if (hdcOptionalForPainting) { - RECT32 rcClip; - POINT32 ptOrg; + RECT rcClip; + POINT ptOrg; - switch (GetClipBox32(hdcOptionalForPainting, &rcClip)) + switch (GetClipBox(hdcOptionalForPainting, &rcClip)) { default: if (!GetDCOrgEx(hdcOptionalForPainting, &ptOrg)) return FALSE; - OffsetRect32(&rcLimit, -ptOrg.x, -ptOrg.y); - if (IntersectRect32(&rcLimit, &rcLimit, &rcClip) && + OffsetRect(&rcLimit, -ptOrg.x, -ptOrg.y); + if (IntersectRect(&rcLimit, &rcLimit, &rcClip) && (!lprcEnumMonitorsThatIntersect || - IntersectRect32(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect))) { + IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect))) { break; } @@ -191,7 +191,7 @@ } } else { if ( lprcEnumMonitorsThatIntersect && - !IntersectRect32(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect)) { + !IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect)) { return TRUE; }
diff --git a/windows/nonclient.c b/windows/nonclient.c index 89f7af5..e14d008 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c
@@ -73,7 +73,7 @@ * Compute the size of the window rectangle from the size of the * client rectangle. */ -static void NC_AdjustRect( LPRECT16 rect, DWORD style, BOOL32 menu, +static void NC_AdjustRect( LPRECT16 rect, DWORD style, BOOL menu, DWORD exStyle ) { if (TWEAK_WineLook > WIN31_LOOK) @@ -142,7 +142,7 @@ *****************************************************************************/ static void -NC_AdjustRectOuter95 (LPRECT16 rect, DWORD style, BOOL32 menu, DWORD exStyle) +NC_AdjustRectOuter95 (LPRECT16 rect, DWORD style, BOOL menu, DWORD exStyle) { if(style & WS_ICONIC) return; @@ -236,12 +236,12 @@ BOOL16 WINAPI DrawCaption16 (HWND16 hwnd, HDC16 hdc, const RECT16 *rect, UINT16 uFlags) { - RECT32 rect32; + RECT rect32; if (rect) CONV_RECT16TO32 (rect, &rect32); - return (BOOL16)DrawCaptionTemp32A (hwnd, hdc, rect ? &rect32 : NULL, + return (BOOL16)DrawCaptionTempA (hwnd, hdc, rect ? &rect32 : NULL, 0, 0, NULL, uFlags & 0x1F); } @@ -260,10 +260,10 @@ * Failure: */ -BOOL32 WINAPI -DrawCaption32 (HWND32 hwnd, HDC32 hdc, const RECT32 *lpRect, UINT32 uFlags) +BOOL WINAPI +DrawCaption (HWND hwnd, HDC hdc, const RECT *lpRect, UINT uFlags) { - return DrawCaptionTemp32A (hwnd, hdc, lpRect, 0, 0, NULL, uFlags & 0x1F); + return DrawCaptionTempA (hwnd, hdc, lpRect, 0, 0, NULL, uFlags & 0x1F); } @@ -281,12 +281,12 @@ DrawCaptionTemp16 (HWND16 hwnd, HDC16 hdc, const RECT16 *rect, HFONT16 hFont, HICON16 hIcon, LPCSTR str, UINT16 uFlags) { - RECT32 rect32; + RECT rect32; if (rect) CONV_RECT16TO32(rect,&rect32); - return (BOOL16)DrawCaptionTemp32A (hwnd, hdc, rect?&rect32:NULL, hFont, + return (BOOL16)DrawCaptionTempA (hwnd, hdc, rect?&rect32:NULL, hFont, hIcon, str, uFlags & 0x1F); } @@ -301,53 +301,53 @@ * Failure: */ -BOOL32 WINAPI -DrawCaptionTemp32A (HWND32 hwnd, HDC32 hdc, const RECT32 *rect, HFONT32 hFont, - HICON32 hIcon, LPCSTR str, UINT32 uFlags) +BOOL WINAPI +DrawCaptionTempA (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont, + HICON hIcon, LPCSTR str, UINT uFlags) { - RECT32 rc = *rect; + RECT rc = *rect; TRACE (nonclient, "(%08x,%08x,%p,%08x,%08x,\"%s\",%08x)\n", hwnd, hdc, rect, hFont, hIcon, str, uFlags); /* drawing background */ if (uFlags & DC_INBUTTON) { - FillRect32 (hdc, &rc, GetSysColorBrush32 (COLOR_3DFACE)); + FillRect (hdc, &rc, GetSysColorBrush (COLOR_3DFACE)); if (uFlags & DC_ACTIVE) { - HBRUSH32 hbr = SelectObject32 (hdc, CACHE_GetPattern55AABrush ()); - PatBlt32 (hdc, rc.left, rc.top, + HBRUSH hbr = SelectObject (hdc, CACHE_GetPattern55AABrush ()); + PatBlt (hdc, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0xFA0089); - SelectObject32 (hdc, hbr); + SelectObject (hdc, hbr); } } else { - FillRect32 (hdc, &rc, GetSysColorBrush32 ((uFlags & DC_ACTIVE) ? + FillRect (hdc, &rc, GetSysColorBrush ((uFlags & DC_ACTIVE) ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION)); } /* drawing icon */ if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP)) { - POINT32 pt; + POINT pt; pt.x = rc.left + 2; pt.y = (rc.bottom + rc.top - sysMetrics[SM_CYSMICON]) / 2; if (hIcon) { - DrawIconEx32 (hdc, pt.x, pt.y, hIcon, sysMetrics[SM_CXSMICON], + DrawIconEx (hdc, pt.x, pt.y, hIcon, sysMetrics[SM_CXSMICON], sysMetrics[SM_CYSMICON], 0, 0, DI_NORMAL); } else { WND *wndPtr = WIN_FindWndPtr(hwnd); - HICON32 hAppIcon = 0; + HICON hAppIcon = 0; if (wndPtr->class->hIconSm) hAppIcon = wndPtr->class->hIconSm; else if (wndPtr->class->hIcon) hAppIcon = wndPtr->class->hIcon; - DrawIconEx32 (hdc, pt.x, pt.y, hAppIcon, sysMetrics[SM_CXSMICON], + DrawIconEx (hdc, pt.x, pt.y, hAppIcon, sysMetrics[SM_CXSMICON], sysMetrics[SM_CYSMICON], 0, 0, DI_NORMAL); } @@ -356,44 +356,44 @@ /* drawing text */ if (uFlags & DC_TEXT) { - HFONT32 hOldFont; + HFONT hOldFont; if (uFlags & DC_INBUTTON) - SetTextColor32 (hdc, GetSysColor32 (COLOR_BTNTEXT)); + SetTextColor (hdc, GetSysColor (COLOR_BTNTEXT)); else if (uFlags & DC_ACTIVE) - SetTextColor32 (hdc, GetSysColor32 (COLOR_CAPTIONTEXT)); + SetTextColor (hdc, GetSysColor (COLOR_CAPTIONTEXT)); else - SetTextColor32 (hdc, GetSysColor32 (COLOR_INACTIVECAPTIONTEXT)); + SetTextColor (hdc, GetSysColor (COLOR_INACTIVECAPTIONTEXT)); - SetBkMode32 (hdc, TRANSPARENT); + SetBkMode (hdc, TRANSPARENT); if (hFont) - hOldFont = SelectObject32 (hdc, hFont); + hOldFont = SelectObject (hdc, hFont); else { - NONCLIENTMETRICS32A nclm; - HFONT32 hNewFont; - nclm.cbSize = sizeof(NONCLIENTMETRICS32A); - SystemParametersInfo32A (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); - hNewFont = CreateFontIndirect32A ((uFlags & DC_SMALLCAP) ? + NONCLIENTMETRICSA nclm; + HFONT hNewFont; + nclm.cbSize = sizeof(NONCLIENTMETRICSA); + SystemParametersInfoA (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); + hNewFont = CreateFontIndirectA ((uFlags & DC_SMALLCAP) ? &nclm.lfSmCaptionFont : &nclm.lfCaptionFont); - hOldFont = SelectObject32 (hdc, hNewFont); + hOldFont = SelectObject (hdc, hNewFont); } if (str) - DrawText32A (hdc, str, -1, &rc, + DrawTextA (hdc, str, -1, &rc, DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT); else { CHAR szText[128]; - INT32 nLen; - nLen = GetWindowText32A (hwnd, szText, 128); - DrawText32A (hdc, szText, nLen, &rc, + INT nLen; + nLen = GetWindowTextA (hwnd, szText, 128); + DrawTextA (hdc, szText, nLen, &rc, DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT); } if (hFont) - SelectObject32 (hdc, hOldFont); + SelectObject (hdc, hOldFont); else - DeleteObject32 (SelectObject32 (hdc, hOldFont)); + DeleteObject (SelectObject (hdc, hOldFont)); } /* drawing focus ??? */ @@ -414,12 +414,12 @@ * Failure: */ -BOOL32 WINAPI -DrawCaptionTemp32W (HWND32 hwnd, HDC32 hdc, const RECT32 *rect, HFONT32 hFont, - HICON32 hIcon, LPCWSTR str, UINT32 uFlags) +BOOL WINAPI +DrawCaptionTempW (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont, + HICON hIcon, LPCWSTR str, UINT uFlags) { LPSTR p = HEAP_strdupWtoA (GetProcessHeap (), 0, str); - BOOL32 res = DrawCaptionTemp32A (hwnd, hdc, rect, hFont, hIcon, p, uFlags); + BOOL res = DrawCaptionTempA (hwnd, hdc, rect, hFont, hIcon, p, uFlags); HeapFree (GetProcessHeap (), 0, p); return res; } @@ -437,9 +437,9 @@ /*********************************************************************** * AdjustWindowRect32 (USER32.2) */ -BOOL32 WINAPI AdjustWindowRect32( LPRECT32 rect, DWORD style, BOOL32 menu ) +BOOL WINAPI AdjustWindowRect( LPRECT rect, DWORD style, BOOL menu ) { - return AdjustWindowRectEx32( rect, style, menu, 0 ); + return AdjustWindowRectEx( rect, style, menu, 0 ); } @@ -476,11 +476,11 @@ /*********************************************************************** * AdjustWindowRectEx32 (USER32.3) */ -BOOL32 WINAPI AdjustWindowRectEx32( LPRECT32 rect, DWORD style, - BOOL32 menu, DWORD exStyle ) +BOOL WINAPI AdjustWindowRectEx( LPRECT rect, DWORD style, + BOOL menu, DWORD exStyle ) { RECT16 rect16; - BOOL32 ret; + BOOL ret; CONV_RECT32TO16( rect, &rect16 ); ret = AdjustWindowRectEx16( &rect16, style, (BOOL16)menu, exStyle ); @@ -494,7 +494,7 @@ * * Handle a WM_NCCALCSIZE message. Called from DefWindowProc(). */ -LONG NC_HandleNCCalcSize( WND *pWnd, RECT32 *winRect ) +LONG NC_HandleNCCalcSize( WND *pWnd, RECT *winRect ) { RECT16 tmpRect = { 0, 0, 0, 0 }; LONG result = 0; @@ -546,7 +546,7 @@ * but without the borders (if any). * The rectangle is in window coordinates (for drawing with GetWindowDC()). */ -static void NC_GetInsideRect( HWND32 hwnd, RECT32 *rect ) +static void NC_GetInsideRect( HWND hwnd, RECT *rect ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); @@ -559,16 +559,16 @@ /* Remove frame from rectangle */ if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle )) { - InflateRect32( rect, -SYSMETRICS_CXDLGFRAME, -SYSMETRICS_CYDLGFRAME); + InflateRect( rect, -SYSMETRICS_CXDLGFRAME, -SYSMETRICS_CYDLGFRAME); if (wndPtr->dwExStyle & WS_EX_DLGMODALFRAME) - InflateRect32( rect, -1, 0 ); + InflateRect( rect, -1, 0 ); } else { if (HAS_THICKFRAME( wndPtr->dwStyle )) - InflateRect32( rect, -SYSMETRICS_CXFRAME, -SYSMETRICS_CYFRAME ); + InflateRect( rect, -SYSMETRICS_CXFRAME, -SYSMETRICS_CYFRAME ); if (wndPtr->dwStyle & WS_BORDER) - InflateRect32( rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER ); + InflateRect( rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER ); } return; @@ -584,7 +584,7 @@ */ static void -NC_GetInsideRect95 (HWND32 hwnd, RECT32 *rect) +NC_GetInsideRect95 (HWND hwnd, RECT *rect) { WND * wndPtr = WIN_FindWndPtr( hwnd ); @@ -597,11 +597,11 @@ /* Remove frame from rectangle */ if (HAS_FIXEDFRAME (wndPtr->dwStyle, wndPtr->dwExStyle )) { - InflateRect32( rect, -SYSMETRICS_CXFIXEDFRAME, -SYSMETRICS_CYFIXEDFRAME); + InflateRect( rect, -SYSMETRICS_CXFIXEDFRAME, -SYSMETRICS_CYFIXEDFRAME); } else if (HAS_SIZEFRAME (wndPtr->dwStyle)) { - InflateRect32( rect, -SYSMETRICS_CXSIZEFRAME, -SYSMETRICS_CYSIZEFRAME ); + InflateRect( rect, -SYSMETRICS_CXSIZEFRAME, -SYSMETRICS_CYSIZEFRAME ); /* if (wndPtr->dwStyle & WS_BORDER) InflateRect32( rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER );*/ @@ -609,10 +609,10 @@ if (wndPtr->dwStyle & WS_CHILD) { if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE) - InflateRect32 (rect, -SYSMETRICS_CXEDGE, -SYSMETRICS_CYEDGE); + InflateRect (rect, -SYSMETRICS_CXEDGE, -SYSMETRICS_CYEDGE); if (wndPtr->dwExStyle & WS_EX_STATICEDGE) - InflateRect32 (rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER); + InflateRect (rect, -SYSMETRICS_CXBORDER, -SYSMETRICS_CYBORDER); } return; @@ -905,7 +905,7 @@ * Handle a WM_NCHITTEST message. Called from DefWindowProc(). */ LONG -NC_HandleNCHitTest (HWND32 hwnd , POINT16 pt) +NC_HandleNCHitTest (HWND hwnd , POINT16 pt) { WND *wndPtr = WIN_FindWndPtr (hwnd); @@ -922,23 +922,23 @@ /*********************************************************************** * NC_DrawSysButton */ -void NC_DrawSysButton( HWND32 hwnd, HDC32 hdc, BOOL32 down ) +void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down ) { - RECT32 rect; - HDC32 hdcMem; - HBITMAP32 hbitmap; + RECT rect; + HDC hdcMem; + HBITMAP hbitmap; WND *wndPtr = WIN_FindWndPtr( hwnd ); if( !(wndPtr->flags & WIN_MANAGED) ) { NC_GetInsideRect( hwnd, &rect ); - hdcMem = CreateCompatibleDC32( hdc ); - hbitmap = SelectObject32( hdcMem, hbitmapClose ); - BitBlt32(hdc, rect.left, rect.top, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE, + hdcMem = CreateCompatibleDC( hdc ); + hbitmap = SelectObject( hdcMem, hbitmapClose ); + BitBlt(hdc, rect.left, rect.top, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE, hdcMem, (wndPtr->dwStyle & WS_CHILD) ? SYSMETRICS_CXSIZE : 0, 0, down ? NOTSRCCOPY : SRCCOPY ); - SelectObject32( hdcMem, hbitmap ); - DeleteDC32( hdcMem ); + SelectObject( hdcMem, hbitmap ); + DeleteDC( hdcMem ); } } @@ -946,23 +946,23 @@ /*********************************************************************** * NC_DrawMaxButton */ -static void NC_DrawMaxButton( HWND32 hwnd, HDC16 hdc, BOOL32 down ) +static void NC_DrawMaxButton( HWND hwnd, HDC16 hdc, BOOL down ) { - RECT32 rect; + RECT rect; WND *wndPtr = WIN_FindWndPtr( hwnd ); - HDC32 hdcMem; + HDC hdcMem; if( !(wndPtr->flags & WIN_MANAGED) ) { NC_GetInsideRect( hwnd, &rect ); - hdcMem = CreateCompatibleDC32( hdc ); - SelectObject32( hdcMem, (IsZoomed32(hwnd) + hdcMem = CreateCompatibleDC( hdc ); + SelectObject( hdcMem, (IsZoomed(hwnd) ? (down ? hbitmapRestoreD : hbitmapRestore) : (down ? hbitmapMaximizeD : hbitmapMaximize)) ); - BitBlt32( hdc, rect.right - SYSMETRICS_CXSIZE - 1, rect.top, + BitBlt( hdc, rect.right - SYSMETRICS_CXSIZE - 1, rect.top, SYSMETRICS_CXSIZE + 1, SYSMETRICS_CYSIZE, hdcMem, 0, 0, SRCCOPY ); - DeleteDC32( hdcMem ); + DeleteDC( hdcMem ); } } @@ -970,22 +970,22 @@ /*********************************************************************** * NC_DrawMinButton */ -static void NC_DrawMinButton( HWND32 hwnd, HDC16 hdc, BOOL32 down ) +static void NC_DrawMinButton( HWND hwnd, HDC16 hdc, BOOL down ) { - RECT32 rect; + RECT rect; WND *wndPtr = WIN_FindWndPtr( hwnd ); - HDC32 hdcMem; + HDC hdcMem; if( !(wndPtr->flags & WIN_MANAGED) ) { NC_GetInsideRect( hwnd, &rect ); - hdcMem = CreateCompatibleDC32( hdc ); - SelectObject32( hdcMem, (down ? hbitmapMinimizeD : hbitmapMinimize) ); + hdcMem = CreateCompatibleDC( hdc ); + SelectObject( hdcMem, (down ? hbitmapMinimizeD : hbitmapMinimize) ); if (wndPtr->dwStyle & WS_MAXIMIZEBOX) rect.right -= SYSMETRICS_CXSIZE+1; - BitBlt32( hdc, rect.right - SYSMETRICS_CXSIZE - 1, rect.top, + BitBlt( hdc, rect.right - SYSMETRICS_CXSIZE - 1, rect.top, SYSMETRICS_CXSIZE + 1, SYSMETRICS_CYSIZE, hdcMem, 0, 0, SRCCOPY ); - DeleteDC32( hdcMem ); + DeleteDC( hdcMem ); } } @@ -1007,15 +1007,15 @@ * *****************************************************************************/ -BOOL32 -NC_DrawSysButton95 (HWND32 hwnd, HDC32 hdc, BOOL32 down) +BOOL +NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down) { WND *wndPtr = WIN_FindWndPtr( hwnd ); if( !(wndPtr->flags & WIN_MANAGED) ) { - HICON32 hIcon = 0; - RECT32 rect; + HICON hIcon = 0; + RECT rect; NC_GetInsideRect95( hwnd, &rect ); @@ -1025,7 +1025,7 @@ hIcon = wndPtr->class->hIcon; if (hIcon) - DrawIconEx32 (hdc, rect.left + 2, rect.top + 2, hIcon, + DrawIconEx (hdc, rect.left + 2, rect.top + 2, hIcon, sysMetrics[SM_CXSMICON], sysMetrics[SM_CYSMICON], 0, 0, DI_NORMAL); @@ -1051,29 +1051,29 @@ * *****************************************************************************/ -void NC_DrawCloseButton95 (HWND32 hwnd, HDC32 hdc, BOOL32 down) +void NC_DrawCloseButton95 (HWND hwnd, HDC hdc, BOOL down) { - RECT32 rect; - HDC32 hdcMem; + RECT rect; + HDC hdcMem; WND *wndPtr = WIN_FindWndPtr( hwnd ); if( !(wndPtr->flags & WIN_MANAGED) ) { - BITMAP32 bmp; - HBITMAP32 hBmp, hOldBmp; + BITMAP bmp; + HBITMAP hBmp, hOldBmp; NC_GetInsideRect95( hwnd, &rect ); - hdcMem = CreateCompatibleDC32( hdc ); + hdcMem = CreateCompatibleDC( hdc ); hBmp = down ? hbitmapCloseD : hbitmapClose; - hOldBmp = SelectObject32 (hdcMem, hBmp); - GetObject32A (hBmp, sizeof(BITMAP32), &bmp); - BitBlt32 (hdc, rect.right - (sysMetrics[SM_CYCAPTION] + 1 + bmp.bmWidth) / 2, + hOldBmp = SelectObject (hdcMem, hBmp); + GetObjectA (hBmp, sizeof(BITMAP), &bmp); + BitBlt (hdc, rect.right - (sysMetrics[SM_CYCAPTION] + 1 + bmp.bmWidth) / 2, rect.top + (sysMetrics[SM_CYCAPTION] - 1 - bmp.bmHeight) / 2, bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, down ? NOTSRCCOPY : SRCCOPY); - SelectObject32 (hdcMem, hOldBmp); - DeleteDC32 (hdcMem); + SelectObject (hdcMem, hOldBmp); + DeleteDC (hdcMem); } } @@ -1097,33 +1097,33 @@ * *****************************************************************************/ -static void NC_DrawMaxButton95(HWND32 hwnd,HDC16 hdc,BOOL32 down ) +static void NC_DrawMaxButton95(HWND hwnd,HDC16 hdc,BOOL down ) { - RECT32 rect; - HDC32 hdcMem; + RECT rect; + HDC hdcMem; WND *wndPtr = WIN_FindWndPtr( hwnd ); if( !(wndPtr->flags & WIN_MANAGED)) { - BITMAP32 bmp; - HBITMAP32 hBmp,hOldBmp; + BITMAP bmp; + HBITMAP hBmp,hOldBmp; NC_GetInsideRect95( hwnd, &rect ); - hdcMem = CreateCompatibleDC32( hdc ); - hBmp = IsZoomed32(hwnd) ? + hdcMem = CreateCompatibleDC( hdc ); + hBmp = IsZoomed(hwnd) ? (down ? hbitmapRestoreD : hbitmapRestore ) : (down ? hbitmapMaximizeD: hbitmapMaximize); - hOldBmp=SelectObject32( hdcMem, hBmp ); - GetObject32A (hBmp, sizeof(BITMAP32), &bmp); + hOldBmp=SelectObject( hdcMem, hBmp ); + GetObjectA (hBmp, sizeof(BITMAP), &bmp); if (wndPtr->dwStyle & WS_SYSMENU) rect.right -= sysMetrics[SM_CYCAPTION] + 1; - BitBlt32( hdc, rect.right - (sysMetrics[SM_CXSIZE] + bmp.bmWidth) / 2, + BitBlt( hdc, rect.right - (sysMetrics[SM_CXSIZE] + bmp.bmWidth) / 2, rect.top + (sysMetrics[SM_CYCAPTION] - 1 - bmp.bmHeight) / 2, bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY ); - SelectObject32 (hdcMem, hOldBmp); - DeleteDC32( hdcMem ); + SelectObject (hdcMem, hOldBmp); + DeleteDC( hdcMem ); } } @@ -1146,24 +1146,24 @@ * *****************************************************************************/ -static void NC_DrawMinButton95(HWND32 hwnd,HDC16 hdc,BOOL32 down ) +static void NC_DrawMinButton95(HWND hwnd,HDC16 hdc,BOOL down ) { - RECT32 rect; - HDC32 hdcMem; + RECT rect; + HDC hdcMem; WND *wndPtr = WIN_FindWndPtr( hwnd ); if( !(wndPtr->flags & WIN_MANAGED)) { - BITMAP32 bmp; - HBITMAP32 hBmp,hOldBmp; + BITMAP bmp; + HBITMAP hBmp,hOldBmp; NC_GetInsideRect95( hwnd, &rect ); - hdcMem = CreateCompatibleDC32( hdc ); + hdcMem = CreateCompatibleDC( hdc ); hBmp = down ? hbitmapMinimizeD : hbitmapMinimize; - hOldBmp= SelectObject32( hdcMem, hBmp ); - GetObject32A (hBmp, sizeof(BITMAP32), &bmp); + hOldBmp= SelectObject( hdcMem, hBmp ); + GetObjectA (hBmp, sizeof(BITMAP), &bmp); if (wndPtr->dwStyle & WS_SYSMENU) rect.right -= sysMetrics[SM_CYCAPTION] + 1; @@ -1171,12 +1171,12 @@ if (wndPtr->dwStyle & WS_MAXIMIZEBOX) rect.right += -1 - (sysMetrics[SM_CXSIZE] + bmp.bmWidth) / 2; - BitBlt32( hdc, rect.right - (sysMetrics[SM_CXSIZE] + bmp.bmWidth) / 2, + BitBlt( hdc, rect.right - (sysMetrics[SM_CXSIZE] + bmp.bmWidth) / 2, rect.top + (sysMetrics[SM_CYCAPTION] - 1 - bmp.bmHeight) / 2, bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY ); - SelectObject32 (hdcMem, hOldBmp); - DeleteDC32( hdcMem ); + SelectObject (hdcMem, hOldBmp); + DeleteDC( hdcMem ); } } @@ -1186,10 +1186,10 @@ * Draw a window frame inside the given rectangle, and update the rectangle. * The correct pen for the frame must be selected in the DC. */ -static void NC_DrawFrame( HDC32 hdc, RECT32 *rect, BOOL32 dlgFrame, - BOOL32 active ) +static void NC_DrawFrame( HDC hdc, RECT *rect, BOOL dlgFrame, + BOOL active ) { - INT32 width, height; + INT width, height; if (TWEAK_WineLook != WIN31_LOOK) ERR (nonclient, "Called in Win95 mode. Aiee! Please report this.\n" ); @@ -1198,63 +1198,63 @@ { width = SYSMETRICS_CXDLGFRAME - 1; height = SYSMETRICS_CYDLGFRAME - 1; - SelectObject32( hdc, GetSysColorBrush32(active ? COLOR_ACTIVECAPTION : + SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION) ); } else { width = SYSMETRICS_CXFRAME - 1; height = SYSMETRICS_CYFRAME - 1; - SelectObject32( hdc, GetSysColorBrush32(active ? COLOR_ACTIVEBORDER : + SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVEBORDER : COLOR_INACTIVEBORDER) ); } /* Draw frame */ - PatBlt32( hdc, rect->left, rect->top, + PatBlt( hdc, rect->left, rect->top, rect->right - rect->left, height, PATCOPY ); - PatBlt32( hdc, rect->left, rect->top, + PatBlt( hdc, rect->left, rect->top, width, rect->bottom - rect->top, PATCOPY ); - PatBlt32( hdc, rect->left, rect->bottom, + PatBlt( hdc, rect->left, rect->bottom, rect->right - rect->left, -height, PATCOPY ); - PatBlt32( hdc, rect->right, rect->top, + PatBlt( hdc, rect->right, rect->top, -width, rect->bottom - rect->top, PATCOPY ); if (dlgFrame) { - InflateRect32( rect, -width, -height ); + InflateRect( rect, -width, -height ); } else { - INT32 decYOff = SYSMETRICS_CXFRAME + SYSMETRICS_CXSIZE; - INT32 decXOff = SYSMETRICS_CYFRAME + SYSMETRICS_CYSIZE; + INT decYOff = SYSMETRICS_CXFRAME + SYSMETRICS_CXSIZE; + INT decXOff = SYSMETRICS_CYFRAME + SYSMETRICS_CYSIZE; /* Draw inner rectangle */ - SelectObject32( hdc, GetStockObject32(NULL_BRUSH) ); - Rectangle32( hdc, rect->left + width, rect->top + height, + SelectObject( hdc, GetStockObject(NULL_BRUSH) ); + Rectangle( hdc, rect->left + width, rect->top + height, rect->right - width , rect->bottom - height ); /* Draw the decorations */ - MoveToEx32( hdc, rect->left, rect->top + decYOff, NULL ); - LineTo32( hdc, rect->left + width, rect->top + decYOff ); - MoveToEx32( hdc, rect->right - 1, rect->top + decYOff, NULL ); - LineTo32( hdc, rect->right - width - 1, rect->top + decYOff ); - MoveToEx32( hdc, rect->left, rect->bottom - decYOff, NULL ); - LineTo32( hdc, rect->left + width, rect->bottom - decYOff ); - MoveToEx32( hdc, rect->right - 1, rect->bottom - decYOff, NULL ); - LineTo32( hdc, rect->right - width - 1, rect->bottom - decYOff ); + MoveToEx( hdc, rect->left, rect->top + decYOff, NULL ); + LineTo( hdc, rect->left + width, rect->top + decYOff ); + MoveToEx( hdc, rect->right - 1, rect->top + decYOff, NULL ); + LineTo( hdc, rect->right - width - 1, rect->top + decYOff ); + MoveToEx( hdc, rect->left, rect->bottom - decYOff, NULL ); + LineTo( hdc, rect->left + width, rect->bottom - decYOff ); + MoveToEx( hdc, rect->right - 1, rect->bottom - decYOff, NULL ); + LineTo( hdc, rect->right - width - 1, rect->bottom - decYOff ); - MoveToEx32( hdc, rect->left + decXOff, rect->top, NULL ); - LineTo32( hdc, rect->left + decXOff, rect->top + height); - MoveToEx32( hdc, rect->left + decXOff, rect->bottom - 1, NULL ); - LineTo32( hdc, rect->left + decXOff, rect->bottom - height - 1 ); - MoveToEx32( hdc, rect->right - decXOff, rect->top, NULL ); - LineTo32( hdc, rect->right - decXOff, rect->top + height ); - MoveToEx32( hdc, rect->right - decXOff, rect->bottom - 1, NULL ); - LineTo32( hdc, rect->right - decXOff, rect->bottom - height - 1 ); + MoveToEx( hdc, rect->left + decXOff, rect->top, NULL ); + LineTo( hdc, rect->left + decXOff, rect->top + height); + MoveToEx( hdc, rect->left + decXOff, rect->bottom - 1, NULL ); + LineTo( hdc, rect->left + decXOff, rect->bottom - height - 1 ); + MoveToEx( hdc, rect->right - decXOff, rect->top, NULL ); + LineTo( hdc, rect->right - decXOff, rect->top + height ); + MoveToEx( hdc, rect->right - decXOff, rect->bottom - 1, NULL ); + LineTo( hdc, rect->right - decXOff, rect->bottom - height - 1 ); - InflateRect32( rect, -width - 1, -height - 1 ); + InflateRect( rect, -width - 1, -height - 1 ); } } @@ -1290,12 +1290,12 @@ *****************************************************************************/ static void NC_DrawFrame95( - HDC32 hdc, - RECT32 *rect, - BOOL32 dlgFrame, - BOOL32 active ) + HDC hdc, + RECT *rect, + BOOL dlgFrame, + BOOL active ) { - INT32 width, height; + INT width, height; if (dlgFrame) { @@ -1308,20 +1308,20 @@ height = sysMetrics[SM_CYFRAME] - sysMetrics[SM_CYEDGE]; } - SelectObject32( hdc, GetSysColorBrush32(active ? COLOR_ACTIVEBORDER : + SelectObject( hdc, GetSysColorBrush(active ? COLOR_ACTIVEBORDER : COLOR_INACTIVEBORDER) ); /* Draw frame */ - PatBlt32( hdc, rect->left, rect->top, + PatBlt( hdc, rect->left, rect->top, rect->right - rect->left, height, PATCOPY ); - PatBlt32( hdc, rect->left, rect->top, + PatBlt( hdc, rect->left, rect->top, width, rect->bottom - rect->top, PATCOPY ); - PatBlt32( hdc, rect->left, rect->bottom, + PatBlt( hdc, rect->left, rect->bottom, rect->right - rect->left, -height, PATCOPY ); - PatBlt32( hdc, rect->right, rect->top, + PatBlt( hdc, rect->right, rect->top, -width, rect->bottom - rect->top, PATCOPY ); - InflateRect32( rect, -width, -height ); + InflateRect( rect, -width, -height ); } /*********************************************************************** @@ -1331,16 +1331,16 @@ * * FIXME: This causes problems in Win95 mode. (why?) */ -static void NC_DrawMovingFrame( HDC32 hdc, RECT32 *rect, BOOL32 thickframe ) +static void NC_DrawMovingFrame( HDC hdc, RECT *rect, BOOL thickframe ) { if (thickframe) { RECT16 r16; CONV_RECT32TO16( rect, &r16 ); - FastWindowFrame( hdc, &r16, SYSMETRICS_CXFRAME, + FastWindowFrame16( hdc, &r16, SYSMETRICS_CXFRAME, SYSMETRICS_CYFRAME, PATINVERT ); } - else DrawFocusRect32( hdc, rect ); + else DrawFocusRect( hdc, rect ); } @@ -1350,10 +1350,10 @@ * Draw the window caption. * The correct pen for the window frame must be selected in the DC. */ -static void NC_DrawCaption( HDC32 hdc, RECT32 *rect, HWND32 hwnd, - DWORD style, BOOL32 active ) +static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd, + DWORD style, BOOL active ) { - RECT32 r = *rect; + RECT r = *rect; WND * wndPtr = WIN_FindWndPtr( hwnd ); char buffer[256]; @@ -1374,24 +1374,24 @@ if (wndPtr->dwExStyle & WS_EX_DLGMODALFRAME) { - HBRUSH32 hbrushOld = SelectObject32(hdc, GetSysColorBrush32(COLOR_WINDOW) ); - PatBlt32( hdc, r.left, r.top, 1, r.bottom-r.top+1,PATCOPY ); - PatBlt32( hdc, r.right-1, r.top, 1, r.bottom-r.top+1, PATCOPY ); - PatBlt32( hdc, r.left, r.top-1, r.right-r.left, 1, PATCOPY ); + HBRUSH hbrushOld = SelectObject(hdc, GetSysColorBrush(COLOR_WINDOW) ); + PatBlt( hdc, r.left, r.top, 1, r.bottom-r.top+1,PATCOPY ); + PatBlt( hdc, r.right-1, r.top, 1, r.bottom-r.top+1, PATCOPY ); + PatBlt( hdc, r.left, r.top-1, r.right-r.left, 1, PATCOPY ); r.left++; r.right--; - SelectObject32( hdc, hbrushOld ); + SelectObject( hdc, hbrushOld ); } - MoveTo( hdc, r.left, r.bottom ); - LineTo32( hdc, r.right, r.bottom ); + MoveTo16( hdc, r.left, r.bottom ); + LineTo( hdc, r.right, r.bottom ); if (style & WS_SYSMENU) { NC_DrawSysButton( hwnd, hdc, FALSE ); r.left += SYSMETRICS_CXSIZE + 1; - MoveTo( hdc, r.left - 1, r.top ); - LineTo32( hdc, r.left - 1, r.bottom ); + MoveTo16( hdc, r.left - 1, r.top ); + LineTo( hdc, r.left - 1, r.bottom ); } if (style & WS_MAXIMIZEBOX) { @@ -1404,15 +1404,15 @@ r.right -= SYSMETRICS_CXSIZE + 1; } - FillRect32( hdc, &r, GetSysColorBrush32(active ? COLOR_ACTIVECAPTION : + FillRect( hdc, &r, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION) ); - if (GetWindowText32A( hwnd, buffer, sizeof(buffer) )) + if (GetWindowTextA( hwnd, buffer, sizeof(buffer) )) { - if (active) SetTextColor32( hdc, GetSysColor32( COLOR_CAPTIONTEXT ) ); - else SetTextColor32( hdc, GetSysColor32( COLOR_INACTIVECAPTIONTEXT ) ); - SetBkMode32( hdc, TRANSPARENT ); - DrawText32A( hdc, buffer, -1, &r, + if (active) SetTextColor( hdc, GetSysColor( COLOR_CAPTIONTEXT ) ); + else SetTextColor( hdc, GetSysColor( COLOR_INACTIVECAPTIONTEXT ) ); + SetBkMode( hdc, TRANSPARENT ); + DrawTextA( hdc, buffer, -1, &r, DT_SINGLELINE | DT_CENTER | DT_VCENTER | DT_NOPREFIX ); } } @@ -1443,27 +1443,27 @@ *****************************************************************************/ static void NC_DrawCaption95( - HDC32 hdc, - RECT32 *rect, - HWND32 hwnd, + HDC hdc, + RECT *rect, + HWND hwnd, DWORD style, DWORD exStyle, - BOOL32 active ) + BOOL active ) { - RECT32 r = *rect; + RECT r = *rect; WND *wndPtr = WIN_FindWndPtr( hwnd ); char buffer[256]; - HPEN32 hPrevPen; + HPEN hPrevPen; if (wndPtr->flags & WIN_MANAGED) return; - hPrevPen = SelectObject32( hdc, GetSysColorPen32(COLOR_3DFACE) ); - MoveToEx32( hdc, r.left, r.bottom - 1, NULL ); - LineTo32( hdc, r.right, r.bottom - 1 ); - SelectObject32( hdc, hPrevPen ); + hPrevPen = SelectObject( hdc, GetSysColorPen(COLOR_3DFACE) ); + MoveToEx( hdc, r.left, r.bottom - 1, NULL ); + LineTo( hdc, r.right, r.bottom - 1 ); + SelectObject( hdc, hPrevPen ); r.bottom--; - FillRect32( hdc, &r, GetSysColorBrush32(active ? COLOR_ACTIVECAPTION : + FillRect( hdc, &r, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION) ); if (!hbitmapClose) { @@ -1495,23 +1495,23 @@ r.right -= SYSMETRICS_CXSIZE + 1; } - if (GetWindowText32A( hwnd, buffer, sizeof(buffer) )) { - NONCLIENTMETRICS32A nclm; - HFONT32 hFont, hOldFont; - nclm.cbSize = sizeof(NONCLIENTMETRICS32A); - SystemParametersInfo32A (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); + if (GetWindowTextA( hwnd, buffer, sizeof(buffer) )) { + NONCLIENTMETRICSA nclm; + HFONT hFont, hOldFont; + nclm.cbSize = sizeof(NONCLIENTMETRICSA); + SystemParametersInfoA (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); if (exStyle & WS_EX_TOOLWINDOW) - hFont = CreateFontIndirect32A (&nclm.lfSmCaptionFont); + hFont = CreateFontIndirectA (&nclm.lfSmCaptionFont); else - hFont = CreateFontIndirect32A (&nclm.lfCaptionFont); - hOldFont = SelectObject32 (hdc, hFont); - if (active) SetTextColor32( hdc, GetSysColor32( COLOR_CAPTIONTEXT ) ); - else SetTextColor32( hdc, GetSysColor32( COLOR_INACTIVECAPTIONTEXT ) ); - SetBkMode32( hdc, TRANSPARENT ); + hFont = CreateFontIndirectA (&nclm.lfCaptionFont); + hOldFont = SelectObject (hdc, hFont); + if (active) SetTextColor( hdc, GetSysColor( COLOR_CAPTIONTEXT ) ); + else SetTextColor( hdc, GetSysColor( COLOR_INACTIVECAPTIONTEXT ) ); + SetBkMode( hdc, TRANSPARENT ); r.left += 2; - DrawText32A( hdc, buffer, -1, &r, + DrawTextA( hdc, buffer, -1, &r, DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT ); - DeleteObject32 (SelectObject32 (hdc, hOldFont)); + DeleteObject (SelectObject (hdc, hOldFont)); } } @@ -1522,12 +1522,12 @@ * * Paint the non-client area. clip is currently unused. */ -void NC_DoNCPaint( WND* wndPtr, HRGN32 clip, BOOL32 suppress_menupaint ) +void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint ) { - HDC32 hdc; - RECT32 rect; - BOOL32 active; - HWND32 hwnd = wndPtr->hwndSelf; + HDC hdc; + RECT rect; + BOOL active; + HWND hwnd = wndPtr->hwndSelf; if ( wndPtr->dwStyle & WS_MINIMIZE || !WIN_IsWindowDrawable( wndPtr, 0 )) return; /* Nothing to do */ @@ -1536,15 +1536,15 @@ TRACE(nonclient, "%04x %d\n", hwnd, active ); - if (!(hdc = GetDCEx32( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ))) return; + if (!(hdc = GetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ))) return; - if (ExcludeVisRect( hdc, wndPtr->rectClient.left-wndPtr->rectWindow.left, + if (ExcludeVisRect16( hdc, wndPtr->rectClient.left-wndPtr->rectWindow.left, wndPtr->rectClient.top-wndPtr->rectWindow.top, wndPtr->rectClient.right-wndPtr->rectWindow.left, wndPtr->rectClient.bottom-wndPtr->rectWindow.top ) == NULLREGION) { - ReleaseDC32( hwnd, hdc ); + ReleaseDC( hwnd, hdc ); return; } @@ -1552,16 +1552,16 @@ rect.right = wndPtr->rectWindow.right - wndPtr->rectWindow.left; rect.bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top; - SelectObject32( hdc, GetSysColorPen32(COLOR_WINDOWFRAME) ); + SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) ); if (!(wndPtr->flags & WIN_MANAGED)) { if ((wndPtr->dwStyle & WS_BORDER) || (wndPtr->dwStyle & WS_DLGFRAME) || (wndPtr->dwExStyle & WS_EX_DLGMODALFRAME)) { - SelectObject32( hdc, GetStockObject32(NULL_BRUSH) ); - Rectangle32( hdc, 0, 0, rect.right, rect.bottom ); - InflateRect32( &rect, -1, -1 ); + SelectObject( hdc, GetStockObject(NULL_BRUSH) ); + Rectangle( hdc, 0, 0, rect.right, rect.bottom ); + InflateRect( &rect, -1, -1 ); } if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle )) @@ -1571,7 +1571,7 @@ if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION) { - RECT32 r = rect; + RECT r = rect; r.bottom = rect.top + SYSMETRICS_CYSIZE; rect.top += SYSMETRICS_CYSIZE + SYSMETRICS_CYBORDER; NC_DrawCaption( hdc, &r, hwnd, wndPtr->dwStyle, active ); @@ -1580,7 +1580,7 @@ if (HAS_MENU(wndPtr)) { - RECT32 r = rect; + RECT r = rect; r.bottom = rect.top + SYSMETRICS_CYMENU; /* default height */ rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ); } @@ -1596,17 +1596,17 @@ if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL)) { - RECT32 r = rect; + RECT r = rect; r.left = r.right - SYSMETRICS_CXVSCROLL + 1; r.top = r.bottom - SYSMETRICS_CYHSCROLL + 1; if(wndPtr->dwStyle & WS_BORDER) { r.left++; r.top++; } - FillRect32( hdc, &r, GetSysColorBrush32(COLOR_SCROLLBAR) ); + FillRect( hdc, &r, GetSysColorBrush(COLOR_SCROLLBAR) ); } - ReleaseDC32( hwnd, hdc ); + ReleaseDC( hwnd, hdc ); } @@ -1634,13 +1634,13 @@ void NC_DoNCPaint95( WND *wndPtr, - HRGN32 clip, - BOOL32 suppress_menupaint ) + HRGN clip, + BOOL suppress_menupaint ) { - HDC32 hdc; - RECT32 rect; - BOOL32 active; - HWND32 hwnd = wndPtr->hwndSelf; + HDC hdc; + RECT rect; + BOOL active; + HWND hwnd = wndPtr->hwndSelf; if ( wndPtr->dwStyle & WS_MINIMIZE || !WIN_IsWindowDrawable( wndPtr, 0 )) return; /* Nothing to do */ @@ -1649,15 +1649,15 @@ TRACE(nonclient, "%04x %d\n", hwnd, active ); - if (!(hdc = GetDCEx32( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ))) return; + if (!(hdc = GetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW ))) return; - if (ExcludeVisRect( hdc, wndPtr->rectClient.left-wndPtr->rectWindow.left, + if (ExcludeVisRect16( hdc, wndPtr->rectClient.left-wndPtr->rectWindow.left, wndPtr->rectClient.top-wndPtr->rectWindow.top, wndPtr->rectClient.right-wndPtr->rectWindow.left, wndPtr->rectClient.bottom-wndPtr->rectWindow.top ) == NULLREGION) { - ReleaseDC32( hwnd, hdc ); + ReleaseDC( hwnd, hdc ); return; } @@ -1665,12 +1665,12 @@ rect.right = wndPtr->rectWindow.right - wndPtr->rectWindow.left; rect.bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top; - SelectObject32( hdc, GetSysColorPen32(COLOR_WINDOWFRAME) ); + SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) ); if(!(wndPtr->flags & WIN_MANAGED)) { if ((wndPtr->dwStyle & WS_BORDER) && ((wndPtr->dwStyle & WS_DLGFRAME) || (wndPtr->dwExStyle & WS_EX_DLGMODALFRAME) || (wndPtr->dwStyle & WS_THICKFRAME))) { - DrawEdge32 (hdc, &rect, EDGE_RAISED, BF_RECT | BF_ADJUST); + DrawEdge (hdc, &rect, EDGE_RAISED, BF_RECT | BF_ADJUST); } if (HAS_FIXEDFRAME( wndPtr->dwStyle, wndPtr->dwExStyle )) @@ -1680,7 +1680,7 @@ if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION) { - RECT32 r = rect; + RECT r = rect; if (wndPtr->dwExStyle & WS_EX_TOOLWINDOW) { r.bottom = rect.top + sysMetrics[SM_CYSMCAPTION]; rect.top += sysMetrics[SM_CYSMCAPTION]; @@ -1696,7 +1696,7 @@ if (HAS_MENU(wndPtr)) { - RECT32 r = rect; + RECT r = rect; r.bottom = rect.top + sysMetrics[SM_CYMENU]; TRACE(nonclient, "Calling DrawMenuBar with " @@ -1710,10 +1710,10 @@ rect.left, rect.top, rect.right, rect.bottom ); if (wndPtr->dwExStyle & WS_EX_CLIENTEDGE) - DrawEdge32 (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); + DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); if (wndPtr->dwExStyle & WS_EX_STATICEDGE) - DrawEdge32 (hdc, &rect, BDR_SUNKENOUTER, BF_RECT | BF_ADJUST); + DrawEdge (hdc, &rect, BDR_SUNKENOUTER, BF_RECT | BF_ADJUST); /* Draw the scroll-bars */ @@ -1725,13 +1725,13 @@ /* Draw the "size-box" */ if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL)) { - RECT32 r = rect; + RECT r = rect; r.left = r.right - SYSMETRICS_CXVSCROLL + 1; r.top = r.bottom - SYSMETRICS_CYHSCROLL + 1; - FillRect32( hdc, &r, GetSysColorBrush32(COLOR_SCROLLBAR) ); + FillRect( hdc, &r, GetSysColorBrush(COLOR_SCROLLBAR) ); } - ReleaseDC32( hwnd, hdc ); + ReleaseDC( hwnd, hdc ); } @@ -1742,7 +1742,7 @@ * * Handle a WM_NCPAINT message. Called from DefWindowProc(). */ -LONG NC_HandleNCPaint( HWND32 hwnd , HRGN32 clip) +LONG NC_HandleNCPaint( HWND hwnd , HRGN clip) { WND* wndPtr = WIN_FindWndPtr( hwnd ); @@ -1779,9 +1779,9 @@ if( wndPtr->dwStyle & WS_MINIMIZE ) WINPOS_RedrawIconTitle( wndPtr->hwndSelf ); else if (TWEAK_WineLook == WIN31_LOOK) - NC_DoNCPaint( wndPtr, (HRGN32)1, FALSE ); + NC_DoNCPaint( wndPtr, (HRGN)1, FALSE ); else - NC_DoNCPaint95( wndPtr, (HRGN32)1, FALSE ); + NC_DoNCPaint95( wndPtr, (HRGN)1, FALSE ); } return TRUE; } @@ -1792,9 +1792,9 @@ * * Handle a WM_SETCURSOR message. Called from DefWindowProc(). */ -LONG NC_HandleSetCursor( HWND32 hwnd, WPARAM16 wParam, LPARAM lParam ) +LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam ) { - if (hwnd != (HWND32)wParam) return 0; /* Don't set the cursor for child windows */ + if (hwnd != (HWND)wParam) return 0; /* Don't set the cursor for child windows */ switch(LOWORD(lParam)) { @@ -1803,7 +1803,7 @@ WORD msg = HIWORD( lParam ); if ((msg == WM_LBUTTONDOWN) || (msg == WM_MBUTTONDOWN) || (msg == WM_RBUTTONDOWN)) - MessageBeep32(0); + MessageBeep(0); } break; @@ -1843,21 +1843,21 @@ /*********************************************************************** * NC_GetSysPopupPos */ -BOOL32 NC_GetSysPopupPos( WND* wndPtr, RECT32* rect ) +BOOL NC_GetSysPopupPos( WND* wndPtr, RECT* rect ) { if( wndPtr->hSysMenu ) { if( wndPtr->dwStyle & WS_MINIMIZE ) - GetWindowRect32( wndPtr->hwndSelf, rect ); + GetWindowRect( wndPtr->hwndSelf, rect ); else { if (TWEAK_WineLook == WIN31_LOOK) NC_GetInsideRect( wndPtr->hwndSelf, rect ); else NC_GetInsideRect95( wndPtr->hwndSelf, rect ); - OffsetRect32( rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top); + OffsetRect( rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top); if (wndPtr->dwStyle & WS_CHILD) - ClientToScreen32( wndPtr->parent->hwndSelf, (POINT32 *)rect ); + ClientToScreen( wndPtr->parent->hwndSelf, (POINT *)rect ); if (TWEAK_WineLook == WIN31_LOOK) { rect->right = rect->left + SYSMETRICS_CXSIZE; rect->bottom = rect->top + SYSMETRICS_CYSIZE; @@ -1883,12 +1883,12 @@ { LONG hittest = 0; POINT16 pt; - MSG32 msg; + MSG msg; if ((wParam & 0xfff0) == SC_MOVE) { /* Move pointer at the center of the caption */ - RECT32 rect; + RECT rect; if (TWEAK_WineLook == WIN31_LOOK) NC_GetInsideRect( wndPtr->hwndSelf, &rect ); else @@ -1951,7 +1951,7 @@ } *capturePoint = pt; } - SetCursorPos32( pt.x, pt.y ); + SetCursorPos( pt.x, pt.y ); NC_HandleSetCursor( wndPtr->hwndSelf, wndPtr->hwndSelf, MAKELONG( hittest, WM_MOUSEMOVE )); return hittest; @@ -1963,24 +1963,24 @@ * * Perform SC_MOVE and SC_SIZE commands. ` */ -static void NC_DoSizeMove( HWND32 hwnd, WORD wParam ) +static void NC_DoSizeMove( HWND hwnd, WORD wParam ) { - MSG32 msg; - RECT32 sizingRect, mouseRect; - HDC32 hdc; + MSG msg; + RECT sizingRect, mouseRect; + HDC hdc; LONG hittest = (LONG)(wParam & 0x0f); HCURSOR16 hDragCursor = 0, hOldCursor = 0; - POINT32 minTrack, maxTrack; + POINT minTrack, maxTrack; POINT16 capturePoint, pt; WND * wndPtr = WIN_FindWndPtr( hwnd ); - BOOL32 thickframe = HAS_THICKFRAME( wndPtr->dwStyle ); - BOOL32 iconic = wndPtr->dwStyle & WS_MINIMIZE; - BOOL32 moved = FALSE; + BOOL thickframe = HAS_THICKFRAME( wndPtr->dwStyle ); + BOOL iconic = wndPtr->dwStyle & WS_MINIMIZE; + BOOL moved = FALSE; DWORD dwPoint = GetMessagePos (); capturePoint = pt = *(POINT16*)&dwPoint; - if (IsZoomed32(hwnd) || !IsWindowVisible32(hwnd) || + if (IsZoomed(hwnd) || !IsWindowVisible(hwnd) || (wndPtr->flags & WIN_MANAGED)) return; if ((wParam & 0xfff0) == SC_MOVE) @@ -1996,7 +1996,7 @@ if ( hittest && hittest != HTSYSMENU ) hittest += 2; else { - SetCapture32(hwnd); + SetCapture(hwnd); hittest = NC_StartSizeMove( wndPtr, wParam, &capturePoint ); if (!hittest) { @@ -2011,9 +2011,9 @@ WINPOS_GetMinMaxInfo( wndPtr, NULL, NULL, &minTrack, &maxTrack ); sizingRect = wndPtr->rectWindow; if (wndPtr->dwStyle & WS_CHILD) - GetClientRect32( wndPtr->parent->hwndSelf, &mouseRect ); + GetClientRect( wndPtr->parent->hwndSelf, &mouseRect ); else - SetRect32(&mouseRect, 0, 0, SYSMETRICS_CXSCREEN, SYSMETRICS_CYSCREEN); + SetRect(&mouseRect, 0, 0, SYSMETRICS_CXSCREEN, SYSMETRICS_CYSCREEN); if (ON_LEFT_BORDER(hittest)) { mouseRect.left = MAX( mouseRect.left, sizingRect.right-maxTrack.x ); @@ -2036,21 +2036,21 @@ } if (wndPtr->dwStyle & WS_CHILD) { - MapWindowPoints32( wndPtr->parent->hwndSelf, 0, - (LPPOINT32)&mouseRect, 2 ); + MapWindowPoints( wndPtr->parent->hwndSelf, 0, + (LPPOINT)&mouseRect, 2 ); } SendMessage16( hwnd, WM_ENTERSIZEMOVE, 0, 0 ); - if (GetCapture32() != hwnd) SetCapture32( hwnd ); + if (GetCapture() != hwnd) SetCapture( hwnd ); if (wndPtr->dwStyle & WS_CHILD) { /* Retrieve a default cache DC (without using the window style) */ - hdc = GetDCEx32( wndPtr->parent->hwndSelf, 0, DCX_CACHE ); + hdc = GetDCEx( wndPtr->parent->hwndSelf, 0, DCX_CACHE ); } else { /* Grab the server only when moving top-level windows without desktop */ - hdc = GetDC32( 0 ); + hdc = GetDC( 0 ); } wndPtr->pDriver->pPreSizeMove(wndPtr); @@ -2105,18 +2105,18 @@ moved = TRUE; if( iconic ) /* ok, no system popup tracking */ { - hOldCursor = SetCursor32(hDragCursor); - ShowCursor32( TRUE ); + hOldCursor = SetCursor(hDragCursor); + ShowCursor( TRUE ); WINPOS_ShowIconTitle( wndPtr, FALSE ); } } - if (msg.message == WM_KEYDOWN) SetCursorPos32( pt.x, pt.y ); + if (msg.message == WM_KEYDOWN) SetCursorPos( pt.x, pt.y ); else { - RECT32 newRect = sizingRect; + RECT newRect = sizingRect; - if (hittest == HTCAPTION) OffsetRect32( &newRect, dx, dy ); + if (hittest == HTCAPTION) OffsetRect( &newRect, dx, dy ); if (ON_LEFT_BORDER(hittest)) newRect.left += dx; else if (ON_RIGHT_BORDER(hittest)) newRect.right += dx; if (ON_TOP_BORDER(hittest)) newRect.top += dy; @@ -2137,19 +2137,19 @@ { if( moved ) /* restore cursors, show icon title later on */ { - ShowCursor32( FALSE ); - SetCursor32( hOldCursor ); + ShowCursor( FALSE ); + SetCursor( hOldCursor ); } - DestroyCursor32( hDragCursor ); + DestroyCursor( hDragCursor ); } else NC_DrawMovingFrame( hdc, &sizingRect, thickframe ); if (wndPtr->dwStyle & WS_CHILD) - ReleaseDC32( wndPtr->parent->hwndSelf, hdc ); + ReleaseDC( wndPtr->parent->hwndSelf, hdc ); else { - ReleaseDC32( 0, hdc ); + ReleaseDC( 0, hdc ); } wndPtr->pDriver->pPostSizeMove(wndPtr); @@ -2174,13 +2174,13 @@ if( moved && !((msg.message == WM_KEYDOWN) && (msg.wParam == VK_ESCAPE)) ) { /* NOTE: SWP_NOACTIVATE prevents document window activation in Word 6 */ - SetWindowPos32( hwnd, 0, sizingRect.left, sizingRect.top, + SetWindowPos( hwnd, 0, sizingRect.left, sizingRect.top, sizingRect.right - sizingRect.left, sizingRect.bottom - sizingRect.top, ( hittest == HTCAPTION ) ? SWP_NOSIZE : 0 ); } - if( IsWindow32(hwnd) ) + if( IsWindow(hwnd) ) if( wndPtr->dwStyle & WS_MINIMIZE ) { /* Single click brings up the system menu when iconized */ @@ -2201,15 +2201,15 @@ * * Track a mouse button press on the minimize or maximize box. */ -static void NC_TrackMinMaxBox( HWND32 hwnd, WORD wParam ) +static void NC_TrackMinMaxBox( HWND hwnd, WORD wParam ) { - MSG32 msg; + MSG msg; POINT16 pt16; - HDC32 hdc = GetWindowDC32( hwnd ); - BOOL32 pressed = TRUE; - void (*paintButton)(HWND32, HDC16, BOOL32); + HDC hdc = GetWindowDC( hwnd ); + BOOL pressed = TRUE; + void (*paintButton)(HWND, HDC16, BOOL); - SetCapture32( hwnd ); + SetCapture( hwnd ); if (wParam == HTMINBUTTON) paintButton = (TWEAK_WineLook == WIN31_LOOK) ? &NC_DrawMinButton : &NC_DrawMinButton95; @@ -2221,7 +2221,7 @@ do { - BOOL32 oldstate = pressed; + BOOL oldstate = pressed; MSG_InternalGetMessage( &msg, 0, 0, 0, PM_REMOVE, FALSE ); CONV_POINT32TO16( &msg.pt, &pt16 ); @@ -2233,14 +2233,14 @@ (*paintButton)( hwnd, hdc, FALSE ); ReleaseCapture(); - ReleaseDC32( hwnd, hdc ); + ReleaseDC( hwnd, hdc ); if (!pressed) return; if (wParam == HTMINBUTTON) SendMessage16( hwnd, WM_SYSCOMMAND, SC_MINIMIZE, *(LONG*)&pt16 ); else SendMessage16( hwnd, WM_SYSCOMMAND, - IsZoomed32(hwnd) ? SC_RESTORE:SC_MAXIMIZE, *(LONG*)&pt16 ); + IsZoomed(hwnd) ? SC_RESTORE:SC_MAXIMIZE, *(LONG*)&pt16 ); } @@ -2250,20 +2250,20 @@ * Track a mouse button press on the Win95 close button. */ static void -NC_TrackCloseButton95 (HWND32 hwnd, WORD wParam) +NC_TrackCloseButton95 (HWND hwnd, WORD wParam) { - MSG32 msg; + MSG msg; POINT16 pt16; - HDC32 hdc = GetWindowDC32( hwnd ); - BOOL32 pressed = TRUE; + HDC hdc = GetWindowDC( hwnd ); + BOOL pressed = TRUE; - SetCapture32( hwnd ); + SetCapture( hwnd ); NC_DrawCloseButton95 (hwnd, hdc, TRUE); do { - BOOL32 oldstate = pressed; + BOOL oldstate = pressed; MSG_InternalGetMessage( &msg, 0, 0, 0, PM_REMOVE, FALSE ); CONV_POINT32TO16( &msg.pt, &pt16 ); @@ -2275,7 +2275,7 @@ NC_DrawCloseButton95 (hwnd, hdc, FALSE); ReleaseCapture(); - ReleaseDC32( hwnd, hdc ); + ReleaseDC( hwnd, hdc ); if (!pressed) return; SendMessage16( hwnd, WM_SYSCOMMAND, SC_CLOSE, *(LONG*)&pt16 ); @@ -2287,10 +2287,10 @@ * * Track a mouse button press on the horizontal or vertical scroll-bar. */ -static void NC_TrackScrollBar( HWND32 hwnd, WPARAM32 wParam, POINT32 pt ) +static void NC_TrackScrollBar( HWND hwnd, WPARAM wParam, POINT pt ) { MSG16 *msg; - INT32 scrollbar; + INT scrollbar; WND *wndPtr = WIN_FindWndPtr( hwnd ); if ((wParam & 0xfff0) == SC_HSCROLL) @@ -2307,7 +2307,7 @@ if (!(msg = SEGPTR_NEW(MSG16))) return; pt.x -= wndPtr->rectWindow.left; pt.y -= wndPtr->rectWindow.top; - SetCapture32( hwnd ); + SetCapture( hwnd ); SCROLL_HandleScrollEvent( hwnd, scrollbar, WM_LBUTTONDOWN, pt ); do @@ -2329,7 +2329,7 @@ DispatchMessage16( msg ); break; } - if (!IsWindow32( hwnd )) + if (!IsWindow( hwnd )) { ReleaseCapture(); break; @@ -2345,14 +2345,14 @@ */ LONG NC_HandleNCLButtonDown( WND* pWnd, WPARAM16 wParam, LPARAM lParam ) { - HWND32 hwnd = pWnd->hwndSelf; + HWND hwnd = pWnd->hwndSelf; switch(wParam) /* Hit test */ { case HTCAPTION: hwnd = WIN_GetTopParent(hwnd); - if( WINPOS_SetActiveWindow(hwnd, TRUE, TRUE) || (GetActiveWindow32() == hwnd) ) + if( WINPOS_SetActiveWindow(hwnd, TRUE, TRUE) || (GetActiveWindow() == hwnd) ) SendMessage16( pWnd->hwndSelf, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, lParam ); break; @@ -2361,12 +2361,12 @@ { if( !(pWnd->dwStyle & WS_MINIMIZE) ) { - HDC32 hDC = GetWindowDC32(hwnd); + HDC hDC = GetWindowDC(hwnd); if (TWEAK_WineLook == WIN31_LOOK) NC_DrawSysButton( hwnd, hDC, TRUE ); else NC_DrawSysButton95( hwnd, hDC, TRUE ); - ReleaseDC32( hwnd, hDC ); + ReleaseDC( hwnd, hDC ); } SendMessage16( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lParam ); } @@ -2464,10 +2464,10 @@ * * Handle a WM_SYSCOMMAND message. Called from DefWindowProc(). */ -LONG NC_HandleSysCommand( HWND32 hwnd, WPARAM16 wParam, POINT16 pt ) +LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt ) { WND *wndPtr = WIN_FindWndPtr( hwnd ); - POINT32 pt32; + POINT pt32; UINT16 uCommand = wParam & 0xFFF0; TRACE(nonclient, "Handling WM_SYSCOMMAND %x %d,%d\n", @@ -2484,15 +2484,15 @@ break; case SC_MINIMIZE: - ShowWindow32( hwnd, SW_MINIMIZE ); + ShowWindow( hwnd, SW_MINIMIZE ); break; case SC_MAXIMIZE: - ShowWindow32( hwnd, SW_MAXIMIZE ); + ShowWindow( hwnd, SW_MAXIMIZE ); break; case SC_RESTORE: - ShowWindow32( hwnd, SW_RESTORE ); + ShowWindow( hwnd, SW_RESTORE ); break; case SC_CLOSE: @@ -2514,12 +2514,12 @@ break; case SC_TASKLIST: - WinExec32( "taskman.exe", SW_SHOWNORMAL ); + WinExec( "taskman.exe", SW_SHOWNORMAL ); break; case SC_SCREENSAVE: if (wParam == SC_ABOUTWINE) - ShellAbout32A(hwnd,"Wine", WINE_RELEASE_INFO, 0); + ShellAboutA(hwnd,"Wine", WINE_RELEASE_INFO, 0); else if (wParam == SC_PUTMARK) TRACE(shell,"Mark requested by user\n");
diff --git a/windows/painting.c b/windows/painting.c index 1f7f89b..9af95e2 100644 --- a/windows/painting.c +++ b/windows/painting.c
@@ -23,10 +23,10 @@ * WIN_UpdateNCArea * */ -void WIN_UpdateNCArea(WND* wnd, BOOL32 bUpdate) +void WIN_UpdateNCArea(WND* wnd, BOOL bUpdate) { POINT16 pt = {0, 0}; - HRGN32 hClip = 1; + HRGN hClip = 1; TRACE(nonclient,"hwnd %04x, hrgnUpdate %04x\n", wnd->hwndSelf, wnd->hrgnUpdate ); @@ -42,46 +42,46 @@ { ClientToScreen16(wnd->hwndSelf, &pt); - hClip = CreateRectRgn32( 0, 0, 0, 0 ); - if (!CombineRgn32( hClip, wnd->hrgnUpdate, 0, RGN_COPY )) + hClip = CreateRectRgn( 0, 0, 0, 0 ); + if (!CombineRgn( hClip, wnd->hrgnUpdate, 0, RGN_COPY )) { - DeleteObject32(hClip); + DeleteObject(hClip); hClip = 1; } else - OffsetRgn32( hClip, pt.x, pt.y ); + OffsetRgn( hClip, pt.x, pt.y ); if (bUpdate) { /* exclude non-client area from update region */ - HRGN32 hrgn = CreateRectRgn32( 0, 0, + HRGN hrgn = CreateRectRgn( 0, 0, wnd->rectClient.right - wnd->rectClient.left, wnd->rectClient.bottom - wnd->rectClient.top); - if (hrgn && (CombineRgn32( wnd->hrgnUpdate, wnd->hrgnUpdate, + if (hrgn && (CombineRgn( wnd->hrgnUpdate, wnd->hrgnUpdate, hrgn, RGN_AND) == NULLREGION)) { - DeleteObject32( wnd->hrgnUpdate ); + DeleteObject( wnd->hrgnUpdate ); wnd->hrgnUpdate = 1; } - DeleteObject32( hrgn ); + DeleteObject( hrgn ); } } wnd->flags &= ~WIN_NEEDS_NCPAINT; - if ((wnd->hwndSelf == GetActiveWindow32()) && + if ((wnd->hwndSelf == GetActiveWindow()) && !(wnd->flags & WIN_NCACTIVATED)) { wnd->flags |= WIN_NCACTIVATED; - if( hClip > 1) DeleteObject32( hClip ); + if( hClip > 1) DeleteObject( hClip ); hClip = 1; } if (hClip) SendMessage16( wnd->hwndSelf, WM_NCPAINT, hClip, 0L ); - if (hClip > 1) DeleteObject32( hClip ); + if (hClip > 1) DeleteObject( hClip ); } @@ -90,8 +90,8 @@ */ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps ) { - BOOL32 bIcon; - HRGN32 hrgnUpdate; + BOOL bIcon; + HRGN hrgnUpdate; WND *wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return 0; @@ -108,7 +108,7 @@ wndPtr->hrgnUpdate = 0; wndPtr->flags &= ~WIN_INTERNAL_PAINT; - HideCaret32( hwnd ); + HideCaret( hwnd ); TRACE(win,"hrgnUpdate = %04x, \n", hrgnUpdate); @@ -120,7 +120,7 @@ { /* Don't clip the output to the update region for CS_PARENTDC window */ if(hrgnUpdate > 1) - DeleteObject32(hrgnUpdate); + DeleteObject(hrgnUpdate); lps->hdc = GetDCEx16( hwnd, 0, DCX_WINDOWPAINT | DCX_USESTYLE | (bIcon ? DCX_WINDOW : 0) ); } @@ -160,12 +160,12 @@ /*********************************************************************** * BeginPaint32 (USER32.10) */ -HDC32 WINAPI BeginPaint32( HWND32 hwnd, PAINTSTRUCT32 *lps ) +HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps ) { PAINTSTRUCT16 ps; BeginPaint16( hwnd, &ps ); - lps->hdc = (HDC32)ps.hdc; + lps->hdc = (HDC)ps.hdc; lps->fErase = ps.fErase; lps->rcPaint.top = ps.rcPaint.top; lps->rcPaint.left = ps.rcPaint.left; @@ -183,7 +183,7 @@ BOOL16 WINAPI EndPaint16( HWND16 hwnd, const PAINTSTRUCT16* lps ) { ReleaseDC16( hwnd, lps->hdc ); - ShowCaret32( hwnd ); + ShowCaret( hwnd ); return TRUE; } @@ -191,10 +191,10 @@ /*********************************************************************** * EndPaint32 (USER32.176) */ -BOOL32 WINAPI EndPaint32( HWND32 hwnd, const PAINTSTRUCT32 *lps ) +BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps ) { - ReleaseDC32( hwnd, lps->hdc ); - ShowCaret32( hwnd ); + ReleaseDC( hwnd, lps->hdc ); + ShowCaret( hwnd ); return TRUE; } @@ -202,23 +202,23 @@ /*********************************************************************** * FillWindow (USER.324) */ -void WINAPI FillWindow( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, HBRUSH16 hbrush ) +void WINAPI FillWindow16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, HBRUSH16 hbrush ) { RECT16 rect; GetClientRect16( hwnd, &rect ); DPtoLP16( hdc, (LPPOINT16)&rect, 2 ); - PaintRect( hwndParent, hwnd, hdc, hbrush, &rect ); + PaintRect16( hwndParent, hwnd, hdc, hbrush, &rect ); } /*********************************************************************** * PAINT_GetControlBrush */ -static HBRUSH16 PAINT_GetControlBrush( HWND32 hParent, HWND32 hWnd, HDC16 hDC, UINT16 ctlType ) +static HBRUSH16 PAINT_GetControlBrush( HWND hParent, HWND hWnd, HDC16 hDC, UINT16 ctlType ) { - HBRUSH16 bkgBrush = (HBRUSH16)SendMessage32A( hParent, WM_CTLCOLORMSGBOX + ctlType, - (WPARAM32)hDC, (LPARAM)hWnd ); - if( !IsGDIObject(bkgBrush) ) + HBRUSH16 bkgBrush = (HBRUSH16)SendMessageA( hParent, WM_CTLCOLORMSGBOX + ctlType, + (WPARAM)hDC, (LPARAM)hWnd ); + if( !IsGDIObject16(bkgBrush) ) bkgBrush = DEFWND_ControlColor( hDC, ctlType ); return bkgBrush; } @@ -227,7 +227,7 @@ /*********************************************************************** * PaintRect (USER.325) */ -void WINAPI PaintRect( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, +void WINAPI PaintRect16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, HBRUSH16 hbrush, const RECT16 *rect) { if( hbrush <= CTLCOLOR_MAX ) @@ -245,7 +245,7 @@ /*********************************************************************** * GetControlBrush (USER.326) */ -HBRUSH16 WINAPI GetControlBrush( HWND16 hwnd, HDC16 hdc, UINT16 ctlType ) +HBRUSH16 WINAPI GetControlBrush16( HWND16 hwnd, HDC16 hdc, UINT16 ctlType ) { WND* wndPtr = WIN_FindWndPtr( hwnd ); @@ -278,16 +278,16 @@ * * All in all, a prime candidate for a rewrite. */ -BOOL32 PAINT_RedrawWindow( HWND32 hwnd, const RECT32 *rectUpdate, - HRGN32 hrgnUpdate, UINT32 flags, UINT32 control ) +BOOL PAINT_RedrawWindow( HWND hwnd, const RECT *rectUpdate, + HRGN hrgnUpdate, UINT flags, UINT control ) { - BOOL32 bIcon; - HRGN32 hrgn; - RECT32 rectClient; + BOOL bIcon; + HRGN hrgn; + RECT rectClient; WND* wndPtr; WND **list, **ppWnd; - if (!hwnd) hwnd = GetDesktopWindow32(); + if (!hwnd) hwnd = GetDesktopWindow(); if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE; if (!WIN_IsWindowDrawable( wndPtr, !(flags & RDW_FRAME) ) ) return TRUE; /* No redraw needed */ @@ -304,7 +304,7 @@ TRACE(win, "%04x NULL %04x flags=%04x\n", hwnd, hrgnUpdate, flags); } - GetClientRect32( hwnd, &rectClient ); + GetClientRect( hwnd, &rectClient ); if (flags & RDW_INVALIDATE) /* Invalidate */ { @@ -313,11 +313,11 @@ if (wndPtr->hrgnUpdate > 1) /* Is there already an update region? */ { if ((hrgn = hrgnUpdate) == 0) - hrgn = CreateRectRgnIndirect32( rectUpdate ? rectUpdate : + hrgn = CreateRectRgnIndirect( rectUpdate ? rectUpdate : &rectClient ); - rgnNotEmpty = CombineRgn32( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, + rgnNotEmpty = CombineRgn( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, hrgn, RGN_OR ); - if (!hrgnUpdate) DeleteObject32( hrgn ); + if (!hrgnUpdate) DeleteObject( hrgn ); } else /* No update region yet */ { @@ -325,11 +325,11 @@ QUEUE_IncPaintCount( wndPtr->hmemTaskQ ); if (hrgnUpdate) { - wndPtr->hrgnUpdate = CreateRectRgn32( 0, 0, 0, 0 ); - rgnNotEmpty = CombineRgn32( wndPtr->hrgnUpdate, hrgnUpdate, + wndPtr->hrgnUpdate = CreateRectRgn( 0, 0, 0, 0 ); + rgnNotEmpty = CombineRgn( wndPtr->hrgnUpdate, hrgnUpdate, 0, RGN_COPY ); } - else wndPtr->hrgnUpdate = CreateRectRgnIndirect32( rectUpdate ? + else wndPtr->hrgnUpdate = CreateRectRgnIndirect( rectUpdate ? rectUpdate : &rectClient ); } @@ -338,17 +338,17 @@ /* restrict update region to client area (FIXME: correct?) */ if (wndPtr->hrgnUpdate) { - HRGN32 clientRgn = CreateRectRgnIndirect32( &rectClient ); - rgnNotEmpty = CombineRgn32( wndPtr->hrgnUpdate, clientRgn, + HRGN clientRgn = CreateRectRgnIndirect( &rectClient ); + rgnNotEmpty = CombineRgn( wndPtr->hrgnUpdate, clientRgn, wndPtr->hrgnUpdate, RGN_AND ); - DeleteObject32( clientRgn ); + DeleteObject( clientRgn ); } /* check for bogus update region */ if ( rgnNotEmpty == NULLREGION ) { wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND; - DeleteObject32( wndPtr->hrgnUpdate ); + DeleteObject( wndPtr->hrgnUpdate ); wndPtr->hrgnUpdate=0; if (!(wndPtr->flags & WIN_INTERNAL_PAINT)) QUEUE_DecPaintCount( wndPtr->hmemTaskQ ); @@ -365,20 +365,20 @@ if (!hrgnUpdate && !rectUpdate) { /* Special case: validate everything */ - DeleteObject32( wndPtr->hrgnUpdate ); + DeleteObject( wndPtr->hrgnUpdate ); wndPtr->hrgnUpdate = 0; } else { if ((hrgn = hrgnUpdate) == 0) - hrgn = CreateRectRgnIndirect32( rectUpdate ); - if (CombineRgn32( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, + hrgn = CreateRectRgnIndirect( rectUpdate ); + if (CombineRgn( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, hrgn, RGN_DIFF ) == NULLREGION) { - DeleteObject32( wndPtr->hrgnUpdate ); + DeleteObject( wndPtr->hrgnUpdate ); wndPtr->hrgnUpdate = 0; } - if (!hrgnUpdate) DeleteObject32( hrgn ); + if (!hrgnUpdate) DeleteObject( hrgn ); } if (!wndPtr->hrgnUpdate) /* No more update region */ if (!(wndPtr->flags & WIN_INTERNAL_PAINT)) @@ -417,7 +417,7 @@ if (wndPtr->flags & WIN_NEEDS_ERASEBKGND) { - HDC32 hdc = GetDCEx32( hwnd, wndPtr->hrgnUpdate, + HDC hdc = GetDCEx( hwnd, wndPtr->hrgnUpdate, DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN | DCX_WINDOWPAINT | (bIcon ? DCX_WINDOW : 0) ); @@ -427,7 +427,7 @@ : WM_ERASEBKGND, (WPARAM16)hdc, 0 )) wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND; - ReleaseDC32( hwnd, hdc ); + ReleaseDC( hwnd, hdc ); } } } @@ -440,13 +440,13 @@ { if ( hrgnUpdate || rectUpdate ) { - if (!(hrgn = CreateRectRgn32( 0, 0, 0, 0 ))) return TRUE; + if (!(hrgn = CreateRectRgn( 0, 0, 0, 0 ))) return TRUE; if( !hrgnUpdate ) { control |= (RDW_C_DELETEHRGN | RDW_C_USEHRGN); - if( !(hrgnUpdate = CreateRectRgnIndirect32( rectUpdate )) ) + if( !(hrgnUpdate = CreateRectRgnIndirect( rectUpdate )) ) { - DeleteObject32( hrgn ); + DeleteObject( hrgn ); return TRUE; } } @@ -455,15 +455,15 @@ for (ppWnd = list; *ppWnd; ppWnd++) { wndPtr = *ppWnd; - if (!IsWindow32(wndPtr->hwndSelf)) continue; + if (!IsWindow(wndPtr->hwndSelf)) continue; if (wndPtr->dwStyle & WS_VISIBLE) { - SetRectRgn32( hrgn, + SetRectRgn( hrgn, wndPtr->rectWindow.left, wndPtr->rectWindow.top, wndPtr->rectWindow.right, wndPtr->rectWindow.bottom ); - if (CombineRgn32( hrgn, hrgn, hrgnUpdate, RGN_AND )) + if (CombineRgn( hrgn, hrgn, hrgnUpdate, RGN_AND )) { - OffsetRgn32( hrgn, -wndPtr->rectClient.left, + OffsetRgn( hrgn, -wndPtr->rectClient.left, -wndPtr->rectClient.top ); PAINT_RedrawWindow( wndPtr->hwndSelf, NULL, hrgn, flags, RDW_C_USEHRGN ); @@ -472,8 +472,8 @@ } HeapFree( SystemHeap, 0, list ); } - DeleteObject32( hrgn ); - if (control & RDW_C_DELETEHRGN) DeleteObject32( hrgnUpdate ); + DeleteObject( hrgn ); + if (control & RDW_C_DELETEHRGN) DeleteObject( hrgnUpdate ); } else { @@ -482,7 +482,7 @@ for (ppWnd = list; *ppWnd; ppWnd++) { wndPtr = *ppWnd; - if (IsWindow32( wndPtr->hwndSelf )) + if (IsWindow( wndPtr->hwndSelf )) PAINT_RedrawWindow( wndPtr->hwndSelf, NULL, 0, flags, 0 ); } HeapFree( SystemHeap, 0, list ); @@ -497,8 +497,8 @@ /*********************************************************************** * RedrawWindow32 (USER32.426) */ -BOOL32 WINAPI RedrawWindow32( HWND32 hwnd, const RECT32 *rectUpdate, - HRGN32 hrgnUpdate, UINT32 flags ) +BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rectUpdate, + HRGN hrgnUpdate, UINT flags ) { return PAINT_RedrawWindow( hwnd, rectUpdate, hrgnUpdate, flags, 0 ); } @@ -512,12 +512,12 @@ { if (rectUpdate) { - RECT32 r; + RECT r; CONV_RECT16TO32( rectUpdate, &r ); - return (BOOL16)RedrawWindow32( (HWND32)hwnd, &r, hrgnUpdate, flags ); + return (BOOL16)RedrawWindow( (HWND)hwnd, &r, hrgnUpdate, flags ); } - return (BOOL16)PAINT_RedrawWindow( (HWND32)hwnd, NULL, - (HRGN32)hrgnUpdate, flags, 0 ); + return (BOOL16)PAINT_RedrawWindow( (HWND)hwnd, NULL, + (HRGN)hrgnUpdate, flags, 0 ); } @@ -532,7 +532,7 @@ /*********************************************************************** * UpdateWindow32 (USER32.567) */ -void WINAPI UpdateWindow32( HWND32 hwnd ) +void WINAPI UpdateWindow( HWND hwnd ) { PAINT_RedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_NOCHILDREN, 0 ); } @@ -542,7 +542,7 @@ */ void WINAPI InvalidateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase ) { - PAINT_RedrawWindow((HWND32)hwnd, NULL, (HRGN32)hrgn, + PAINT_RedrawWindow((HWND)hwnd, NULL, (HRGN)hrgn, RDW_INVALIDATE | (erase ? RDW_ERASE : 0), 0 ); } @@ -550,7 +550,7 @@ /*********************************************************************** * InvalidateRgn32 (USER32.329) */ -BOOL32 WINAPI InvalidateRgn32( HWND32 hwnd, HRGN32 hrgn, BOOL32 erase ) +BOOL WINAPI InvalidateRgn( HWND hwnd, HRGN hrgn, BOOL erase ) { return PAINT_RedrawWindow(hwnd, NULL, hrgn, RDW_INVALIDATE | (erase ? RDW_ERASE : 0), 0 ); } @@ -568,7 +568,7 @@ /*********************************************************************** * InvalidateRect32 (USER32.328) */ -BOOL32 WINAPI InvalidateRect32( HWND32 hwnd, const RECT32 *rect, BOOL32 erase ) +BOOL WINAPI InvalidateRect( HWND hwnd, const RECT *rect, BOOL erase ) { return PAINT_RedrawWindow( hwnd, rect, 0, RDW_INVALIDATE | (erase ? RDW_ERASE : 0), 0 ); @@ -580,7 +580,7 @@ */ void WINAPI ValidateRgn16( HWND16 hwnd, HRGN16 hrgn ) { - PAINT_RedrawWindow( (HWND32)hwnd, NULL, (HRGN32)hrgn, + PAINT_RedrawWindow( (HWND)hwnd, NULL, (HRGN)hrgn, RDW_VALIDATE | RDW_NOCHILDREN, 0 ); } @@ -588,7 +588,7 @@ /*********************************************************************** * ValidateRgn32 (USER32.572) */ -void WINAPI ValidateRgn32( HWND32 hwnd, HRGN32 hrgn ) +void WINAPI ValidateRgn( HWND hwnd, HRGN hrgn ) { PAINT_RedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE | RDW_NOCHILDREN, 0 ); } @@ -606,7 +606,7 @@ /*********************************************************************** * ValidateRect32 (USER32.571) */ -void WINAPI ValidateRect32( HWND32 hwnd, const RECT32 *rect ) +void WINAPI ValidateRect( HWND hwnd, const RECT *rect ) { PAINT_RedrawWindow( hwnd, rect, 0, RDW_VALIDATE | RDW_NOCHILDREN, 0 ); } @@ -617,11 +617,11 @@ */ BOOL16 WINAPI GetUpdateRect16( HWND16 hwnd, LPRECT16 rect, BOOL16 erase ) { - RECT32 r; + RECT r; BOOL16 ret; - if (!rect) return GetUpdateRect32( hwnd, NULL, erase ); - ret = GetUpdateRect32( hwnd, &r, erase ); + if (!rect) return GetUpdateRect( hwnd, NULL, erase ); + ret = GetUpdateRect( hwnd, &r, erase ); CONV_RECT32TO16( &r, rect ); return ret; } @@ -630,7 +630,7 @@ /*********************************************************************** * GetUpdateRect32 (USER32.297) */ -BOOL32 WINAPI GetUpdateRect32( HWND32 hwnd, LPRECT32 rect, BOOL32 erase ) +BOOL WINAPI GetUpdateRect( HWND hwnd, LPRECT rect, BOOL erase ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return FALSE; @@ -639,19 +639,19 @@ { if (wndPtr->hrgnUpdate > 1) { - HRGN32 hrgn = CreateRectRgn32( 0, 0, 0, 0 ); - if (GetUpdateRgn32( hwnd, hrgn, erase ) == ERROR) return FALSE; - GetRgnBox32( hrgn, rect ); - DeleteObject32( hrgn ); + HRGN hrgn = CreateRectRgn( 0, 0, 0, 0 ); + if (GetUpdateRgn( hwnd, hrgn, erase ) == ERROR) return FALSE; + GetRgnBox( hrgn, rect ); + DeleteObject( hrgn ); if (wndPtr->class->style & CS_OWNDC) { - if (GetMapMode32(wndPtr->dce->hDC) != MM_TEXT) + if (GetMapMode(wndPtr->dce->hDC) != MM_TEXT) { - DPtoLP32 (wndPtr->dce->hDC, (LPPOINT32)rect, 2); + DPtoLP (wndPtr->dce->hDC, (LPPOINT)rect, 2); } } } - else SetRectEmpty32( rect ); + else SetRectEmpty( rect ); } return (wndPtr->hrgnUpdate > 1); } @@ -662,26 +662,26 @@ */ INT16 WINAPI GetUpdateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase ) { - return GetUpdateRgn32( hwnd, hrgn, erase ); + return GetUpdateRgn( hwnd, hrgn, erase ); } /*********************************************************************** * GetUpdateRgn32 (USER32.298) */ -INT32 WINAPI GetUpdateRgn32( HWND32 hwnd, HRGN32 hrgn, BOOL32 erase ) +INT WINAPI GetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase ) { - INT32 retval; + INT retval; WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return ERROR; if (wndPtr->hrgnUpdate <= 1) { - SetRectRgn32( hrgn, 0, 0, 0, 0 ); + SetRectRgn( hrgn, 0, 0, 0, 0 ); return NULLREGION; } - retval = CombineRgn32( hrgn, wndPtr->hrgnUpdate, 0, RGN_COPY ); - if (erase) RedrawWindow32( hwnd, NULL, 0, RDW_ERASENOW | RDW_NOCHILDREN ); + retval = CombineRgn( hrgn, wndPtr->hrgnUpdate, 0, RGN_COPY ); + if (erase) RedrawWindow( hwnd, NULL, 0, RDW_ERASENOW | RDW_NOCHILDREN ); return retval; } @@ -691,37 +691,37 @@ */ INT16 WINAPI ExcludeUpdateRgn16( HDC16 hdc, HWND16 hwnd ) { - return ExcludeUpdateRgn32( hdc, hwnd ); + return ExcludeUpdateRgn( hdc, hwnd ); } /*********************************************************************** * ExcludeUpdateRgn32 (USER32.195) */ -INT32 WINAPI ExcludeUpdateRgn32( HDC32 hdc, HWND32 hwnd ) +INT WINAPI ExcludeUpdateRgn( HDC hdc, HWND hwnd ) { - RECT32 rect; + RECT rect; WND * wndPtr; if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return ERROR; if (wndPtr->hrgnUpdate) { - INT32 ret; - HRGN32 hrgn = CreateRectRgn32(wndPtr->rectWindow.left - wndPtr->rectClient.left, + INT ret; + HRGN hrgn = CreateRectRgn(wndPtr->rectWindow.left - wndPtr->rectClient.left, wndPtr->rectWindow.top - wndPtr->rectClient.top, wndPtr->rectClient.right - wndPtr->rectClient.left, wndPtr->rectClient.bottom - wndPtr->rectClient.top); if( wndPtr->hrgnUpdate > 1 ) - CombineRgn32(hrgn, wndPtr->hrgnUpdate, 0, RGN_COPY); + CombineRgn(hrgn, wndPtr->hrgnUpdate, 0, RGN_COPY); /* do ugly coordinate translations in dce.c */ ret = DCE_ExcludeRgn( hdc, wndPtr, hrgn ); - DeleteObject32( hrgn ); + DeleteObject( hrgn ); return ret; } - return GetClipBox32( hdc, &rect ); + return GetClipBox( hdc, &rect ); }
diff --git a/windows/property.c b/windows/property.c index f2ffc8a..a7f7d93 100644 --- a/windows/property.c +++ b/windows/property.c
@@ -13,7 +13,7 @@ typedef struct tagPROPERTY { struct tagPROPERTY *next; /* Next property in window list */ - HANDLE32 handle; /* User's data */ + HANDLE handle; /* User's data */ LPSTR string; /* Property string (or atom) */ } PROPERTY; @@ -21,7 +21,7 @@ /*********************************************************************** * PROP_FindProp */ -static PROPERTY *PROP_FindProp( HWND32 hwnd, LPCSTR str ) +static PROPERTY *PROP_FindProp( HWND hwnd, LPCSTR str ) { ATOM atom; PROPERTY *prop; @@ -30,12 +30,12 @@ if (!pWnd) return NULL; if (HIWORD(str)) { - atom = GlobalFindAtom32A( str ); + atom = GlobalFindAtomA( str ); for (prop = pWnd->pProp; prop; prop = prop->next) { if (HIWORD(prop->string)) { - if (!lstrcmpi32A( prop->string, str )) return prop; + if (!lstrcmpiA( prop->string, str )) return prop; } else if (LOWORD(prop->string) == atom) return prop; } @@ -47,7 +47,7 @@ { if (HIWORD(prop->string)) { - if (GlobalFindAtom32A( prop->string ) == atom) return prop; + if (GlobalFindAtomA( prop->string ) == atom) return prop; } else if (LOWORD(prop->string) == atom) return prop; } @@ -61,14 +61,14 @@ */ HANDLE16 WINAPI GetProp16( HWND16 hwnd, LPCSTR str ) { - return (HANDLE16)GetProp32A( hwnd, str ); + return (HANDLE16)GetPropA( hwnd, str ); } /*********************************************************************** * GetProp32A (USER32.281) */ -HANDLE32 WINAPI GetProp32A( HWND32 hwnd, LPCSTR str ) +HANDLE WINAPI GetPropA( HWND hwnd, LPCSTR str ) { PROPERTY *prop = PROP_FindProp( hwnd, str ); @@ -86,14 +86,14 @@ /*********************************************************************** * GetProp32W (USER32.282) */ -HANDLE32 WINAPI GetProp32W( HWND32 hwnd, LPCWSTR str ) +HANDLE WINAPI GetPropW( HWND hwnd, LPCWSTR str ) { LPSTR strA; - HANDLE32 ret; + HANDLE ret; - if (!HIWORD(str)) return GetProp32A( hwnd, (LPCSTR)(UINT32)LOWORD(str) ); + if (!HIWORD(str)) return GetPropA( hwnd, (LPCSTR)(UINT)LOWORD(str) ); strA = HEAP_strdupWtoA( GetProcessHeap(), 0, str ); - ret = GetProp32A( hwnd, strA ); + ret = GetPropA( hwnd, strA ); HeapFree( GetProcessHeap(), 0, strA ); return ret; } @@ -104,14 +104,14 @@ */ BOOL16 WINAPI SetProp16( HWND16 hwnd, LPCSTR str, HANDLE16 handle ) { - return (BOOL16)SetProp32A( hwnd, str, handle ); + return (BOOL16)SetPropA( hwnd, str, handle ); } /*********************************************************************** * SetProp32A (USER32.497) */ -BOOL32 WINAPI SetProp32A( HWND32 hwnd, LPCSTR str, HANDLE32 handle ) +BOOL WINAPI SetPropA( HWND hwnd, LPCSTR str, HANDLE handle ) { PROPERTY *prop; @@ -143,15 +143,15 @@ /*********************************************************************** * SetProp32W (USER32.498) */ -BOOL32 WINAPI SetProp32W( HWND32 hwnd, LPCWSTR str, HANDLE32 handle ) +BOOL WINAPI SetPropW( HWND hwnd, LPCWSTR str, HANDLE handle ) { - BOOL32 ret; + BOOL ret; LPSTR strA; if (!HIWORD(str)) - return SetProp32A( hwnd, (LPCSTR)(UINT32)LOWORD(str), handle ); + return SetPropA( hwnd, (LPCSTR)(UINT)LOWORD(str), handle ); strA = HEAP_strdupWtoA( GetProcessHeap(), 0, str ); - ret = SetProp32A( hwnd, strA, handle ); + ret = SetPropA( hwnd, strA, handle ); HeapFree( GetProcessHeap(), 0, strA ); return ret; } @@ -162,17 +162,17 @@ */ HANDLE16 WINAPI RemoveProp16( HWND16 hwnd, LPCSTR str ) { - return (HANDLE16)RemoveProp32A( hwnd, str ); + return (HANDLE16)RemovePropA( hwnd, str ); } /*********************************************************************** * RemoveProp32A (USER32.442) */ -HANDLE32 WINAPI RemoveProp32A( HWND32 hwnd, LPCSTR str ) +HANDLE WINAPI RemovePropA( HWND hwnd, LPCSTR str ) { ATOM atom; - HANDLE32 handle; + HANDLE handle; PROPERTY **pprop, *prop; WND *pWnd = WIN_FindWndPtr( hwnd ); @@ -182,15 +182,15 @@ TRACE(prop, "%04x #%04x\n", hwnd, LOWORD(str)); - if (!pWnd) return (HANDLE32)0; + if (!pWnd) return (HANDLE)0; if (HIWORD(str)) { - atom = GlobalFindAtom32A( str ); + atom = GlobalFindAtomA( str ); for (pprop=(PROPERTY**)&pWnd->pProp; (*pprop); pprop = &(*pprop)->next) { if (HIWORD((*pprop)->string)) { - if (!lstrcmpi32A( (*pprop)->string, str )) break; + if (!lstrcmpiA( (*pprop)->string, str )) break; } else if (LOWORD((*pprop)->string) == atom) break; } @@ -202,7 +202,7 @@ { if (HIWORD((*pprop)->string)) { - if (GlobalFindAtom32A( (*pprop)->string ) == atom) break; + if (GlobalFindAtomA( (*pprop)->string ) == atom) break; } else if (LOWORD((*pprop)->string) == atom) break; } @@ -220,15 +220,15 @@ /*********************************************************************** * RemoveProp32W (USER32.443) */ -HANDLE32 WINAPI RemoveProp32W( HWND32 hwnd, LPCWSTR str ) +HANDLE WINAPI RemovePropW( HWND hwnd, LPCWSTR str ) { LPSTR strA; - HANDLE32 ret; + HANDLE ret; if (!HIWORD(str)) - return RemoveProp32A( hwnd, (LPCSTR)(UINT32)LOWORD(str) ); + return RemovePropA( hwnd, (LPCSTR)(UINT)LOWORD(str) ); strA = HEAP_strdupWtoA( GetProcessHeap(), 0, str ); - ret = RemoveProp32A( hwnd, strA ); + ret = RemovePropA( hwnd, strA ); HeapFree( GetProcessHeap(), 0, strA ); return ret; } @@ -262,7 +262,7 @@ WND *pWnd; INT16 ret = -1; - TRACE(prop, "%04x %08x\n", hwnd, (UINT32)func ); + TRACE(prop, "%04x %08x\n", hwnd, (UINT)func ); if (!(pWnd = WIN_FindWndPtr( hwnd ))) return -1; for (prop = pWnd->pProp; (prop); prop = next) { @@ -282,32 +282,32 @@ /*********************************************************************** * EnumProps32A (USER32.186) */ -INT32 WINAPI EnumProps32A( HWND32 hwnd, PROPENUMPROC32A func ) +INT WINAPI EnumPropsA( HWND hwnd, PROPENUMPROCA func ) { - return EnumPropsEx32A( hwnd, (PROPENUMPROCEX32A)func, 0 ); + return EnumPropsExA( hwnd, (PROPENUMPROCEXA)func, 0 ); } /*********************************************************************** * EnumProps32W (USER32.189) */ -INT32 WINAPI EnumProps32W( HWND32 hwnd, PROPENUMPROC32W func ) +INT WINAPI EnumPropsW( HWND hwnd, PROPENUMPROCW func ) { - return EnumPropsEx32W( hwnd, (PROPENUMPROCEX32W)func, 0 ); + return EnumPropsExW( hwnd, (PROPENUMPROCEXW)func, 0 ); } /*********************************************************************** * EnumPropsEx32A (USER32.187) */ -INT32 WINAPI EnumPropsEx32A(HWND32 hwnd, PROPENUMPROCEX32A func, LPARAM lParam) +INT WINAPI EnumPropsExA(HWND hwnd, PROPENUMPROCEXA func, LPARAM lParam) { PROPERTY *prop, *next; WND *pWnd; - INT32 ret = -1; + INT ret = -1; TRACE(prop, "%04x %08x %08lx\n", - hwnd, (UINT32)func, lParam ); + hwnd, (UINT)func, lParam ); if (!(pWnd = WIN_FindWndPtr( hwnd ))) return -1; for (prop = pWnd->pProp; (prop); prop = next) { @@ -327,14 +327,14 @@ /*********************************************************************** * EnumPropsEx32W (USER32.188) */ -INT32 WINAPI EnumPropsEx32W(HWND32 hwnd, PROPENUMPROCEX32W func, LPARAM lParam) +INT WINAPI EnumPropsExW(HWND hwnd, PROPENUMPROCEXW func, LPARAM lParam) { PROPERTY *prop, *next; WND *pWnd; - INT32 ret = -1; + INT ret = -1; TRACE(prop, "%04x %08x %08lx\n", - hwnd, (UINT32)func, lParam ); + hwnd, (UINT)func, lParam ); if (!(pWnd = WIN_FindWndPtr( hwnd ))) return -1; for (prop = pWnd->pProp; (prop); prop = next) { @@ -351,7 +351,7 @@ HeapFree( GetProcessHeap(), 0, str ); } else - ret = func( hwnd, (LPCWSTR)(UINT32)LOWORD( prop->string ), + ret = func( hwnd, (LPCWSTR)(UINT)LOWORD( prop->string ), prop->handle, lParam ); if (!ret) break; }
diff --git a/windows/queue.c b/windows/queue.c index 988016a..d801e5c 100644 --- a/windows/queue.c +++ b/windows/queue.c
@@ -150,9 +150,9 @@ * * Get the focus hwnd member in a threadsafe manner */ -HWND32 PERQDATA_GetFocusWnd( PERQUEUEDATA *pQData ) +HWND PERQDATA_GetFocusWnd( PERQUEUEDATA *pQData ) { - HWND32 hWndFocus; + HWND hWndFocus; assert(pQData != 0 ); EnterCriticalSection( &pQData->cSection ); @@ -168,9 +168,9 @@ * * Set the focus hwnd member in a threadsafe manner */ -HWND32 PERQDATA_SetFocusWnd( PERQUEUEDATA *pQData, HWND32 hWndFocus ) +HWND PERQDATA_SetFocusWnd( PERQUEUEDATA *pQData, HWND hWndFocus ) { - HWND32 hWndFocusPrv; + HWND hWndFocusPrv; assert(pQData != 0 ); EnterCriticalSection( &pQData->cSection ); @@ -187,9 +187,9 @@ * * Get the active hwnd member in a threadsafe manner */ -HWND32 PERQDATA_GetActiveWnd( PERQUEUEDATA *pQData ) +HWND PERQDATA_GetActiveWnd( PERQUEUEDATA *pQData ) { - HWND32 hWndActive; + HWND hWndActive; assert(pQData != 0 ); EnterCriticalSection( &pQData->cSection ); @@ -205,9 +205,9 @@ * * Set the active focus hwnd member in a threadsafe manner */ -HWND32 PERQDATA_SetActiveWnd( PERQUEUEDATA *pQData, HWND32 hWndActive ) +HWND PERQDATA_SetActiveWnd( PERQUEUEDATA *pQData, HWND hWndActive ) { - HWND32 hWndActivePrv; + HWND hWndActivePrv; assert(pQData != 0 ); EnterCriticalSection( &pQData->cSection ); @@ -224,9 +224,9 @@ * * Get the capture hwnd member in a threadsafe manner */ -HWND32 PERQDATA_GetCaptureWnd( PERQUEUEDATA *pQData ) +HWND PERQDATA_GetCaptureWnd( PERQUEUEDATA *pQData ) { - HWND32 hWndCapture; + HWND hWndCapture; assert(pQData != 0 ); EnterCriticalSection( &pQData->cSection ); @@ -242,9 +242,9 @@ * * Set the capture hwnd member in a threadsafe manner */ -HWND32 PERQDATA_SetCaptureWnd( PERQUEUEDATA *pQData, HWND32 hWndCapture ) +HWND PERQDATA_SetCaptureWnd( PERQUEUEDATA *pQData, HWND hWndCapture ) { - HWND32 hWndCapturePrv; + HWND hWndCapturePrv; assert(pQData != 0 ); EnterCriticalSection( &pQData->cSection ); @@ -397,7 +397,7 @@ WARN( msg, "Bad queue handle %04x\n", hQueue ); return; } - if (!GetModuleName( queue->thdb->process->task, module, sizeof(module ))) + if (!GetModuleName16( queue->thdb->process->task, module, sizeof(module ))) strcpy( module, "???" ); DUMP( "%04x %4d %p %04x %s\n", hQueue,queue->msgCount, queue->thdb, queue->thdb->process->task, module ); @@ -411,7 +411,7 @@ /*********************************************************************** * QUEUE_IsExitingQueue */ -BOOL32 QUEUE_IsExitingQueue( HQUEUE16 hQueue ) +BOOL QUEUE_IsExitingQueue( HQUEUE16 hQueue ) { return (hExitingQueue && (hQueue == hExitingQueue)); } @@ -458,7 +458,7 @@ only */ if ( !THREAD_IsWin16( THREAD_Current() ) ) { - msgQueue->hEvent = CreateEvent32A( NULL, FALSE, FALSE, NULL); + msgQueue->hEvent = CreateEventA( NULL, FALSE, FALSE, NULL); if (msgQueue->hEvent == 0) { @@ -526,7 +526,7 @@ * Note: We need to mask asynchronous events to make sure PostMessage works * even in the signal handler. */ -BOOL32 QUEUE_DeleteMsgQueue( HQUEUE16 hQueue ) +BOOL QUEUE_DeleteMsgQueue( HQUEUE16 hQueue ) { MESSAGEQUEUE * msgQueue = (MESSAGEQUEUE*)QUEUE_Lock(hQueue); HQUEUE16 *pPrev; @@ -591,7 +591,7 @@ * Create the system message queue, and set the double-click speed. * Must be called only once. */ -BOOL32 QUEUE_CreateSysMsgQueue( int size ) +BOOL QUEUE_CreateSysMsgQueue( int size ) { /* Note: We dont need perQ data for the system message queue */ if (!(hmemSysMsgQueue = QUEUE_CreateMsgQueue( FALSE ))) @@ -617,11 +617,11 @@ static void QUEUE_Wait( DWORD wait_mask ) { if ( THREAD_IsWin16( THREAD_Current() ) ) - WaitEvent( 0 ); + WaitEvent16( 0 ); else { TRACE(msg, "current task is 32-bit, calling SYNC_DoWait\n"); - MsgWaitForMultipleObjects( 0, NULL, FALSE, INFINITE32, wait_mask ); + MsgWaitForMultipleObjects( 0, NULL, FALSE, INFINITE, wait_mask ); } } @@ -646,7 +646,7 @@ /* Wake up thread waiting for message */ if ( THREAD_IsWin16( queue->thdb ) ) - PostEvent( queue->thdb->process->task ); + PostEvent16( queue->thdb->process->task ); else { SetEvent( queue->hEvent ); @@ -674,11 +674,11 @@ { MESSAGEQUEUE *queue; - TRACE(msg,"q %04x waiting for %04x\n", GetFastQueue(), bits); + TRACE(msg,"q %04x waiting for %04x\n", GetFastQueue16(), bits); for (;;) { - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return; if (queue->changeBits & bits) { @@ -719,7 +719,7 @@ * This routine is called when a SMSG need to be added to one of the three * SM list. (SM_PROCESSING_LIST, SM_PENDING_LIST, SM_WAITING_LIST) */ -BOOL32 QUEUE_AddSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg ) +BOOL QUEUE_AddSMSG( MESSAGEQUEUE *queue, int list, SMSG *smsg ) { TRACE(sendmsg,"queue=%x, list=%d, smsg=%p msg=%s\n", queue->self, list, smsg, SPY_GetMsgName(smsg->msg)); @@ -881,7 +881,7 @@ TRACE(sendmsg,"RM: %s [%04x] (%04x -> %04x)\n", SPY_GetMsgName(smsg->msg), smsg->msg, smsg->hSrcQueue, smsg->hDstQueue ); - if (IsWindow32( smsg->hWnd )) + if (IsWindow( smsg->hWnd )) { WND *wndPtr = WIN_FindWndPtr( smsg->hWnd ); DWORD extraInfo = queue->GetMessageExtraInfoVal; /* save ExtraInfo */ @@ -899,11 +899,11 @@ { TRACE(sendmsg, "\trcm: msg is Win32\n" ); if (smsg->flags & SMSG_UNICODE) - result = CallWindowProc32W( wndPtr->winproc, + result = CallWindowProcW( wndPtr->winproc, smsg->hWnd, smsg->msg, smsg->wParam, smsg->lParam ); else - result = CallWindowProc32A( wndPtr->winproc, + result = CallWindowProcA( wndPtr->winproc, smsg->hWnd, smsg->msg, smsg->wParam, smsg->lParam ); } @@ -965,7 +965,7 @@ /* set SMSG_SENDING_REPLY flag to tell ReplyMessage16, it's not an early reply */ smsg->flags |= SMSG_SENDING_REPLY; - ReplyMessage32( result ); + ReplyMessage( result ); } TRACE( sendmsg,"done! \n" ); @@ -978,7 +978,7 @@ * * Add a message to the queue. Return FALSE if queue is full. */ -BOOL32 QUEUE_AddMsg( HQUEUE16 hQueue, MSG32 *msg, DWORD extraInfo ) +BOOL QUEUE_AddMsg( HQUEUE16 hQueue, MSG *msg, DWORD extraInfo ) { MESSAGEQUEUE *msgQueue; QMSG *qmsg; @@ -1028,7 +1028,7 @@ * * Find a message matching the given parameters. Return -1 if none available. */ -QMSG* QUEUE_FindMsg( MESSAGEQUEUE * msgQueue, HWND32 hwnd, int first, int last ) +QMSG* QUEUE_FindMsg( MESSAGEQUEUE * msgQueue, HWND hwnd, int first, int last ) { QMSG* qmsg; @@ -1043,7 +1043,7 @@ /* look in linked list for message matching first and last criteria */ for (qmsg = msgQueue->firstMsg; qmsg; qmsg = qmsg->nextMsg) { - MSG32 *msg = &(qmsg->msg); + MSG *msg = &(qmsg->msg); if (!hwnd || (msg->hwnd == hwnd)) { @@ -1100,11 +1100,11 @@ * * Wake a queue upon reception of a hardware event. */ -static void QUEUE_WakeSomeone( UINT32 message ) +static void QUEUE_WakeSomeone( UINT message ) { WND* wndPtr = NULL; WORD wakeBit; - HWND32 hwnd; + HWND hwnd; HQUEUE16 hQueue = 0; MESSAGEQUEUE *queue = NULL; @@ -1120,7 +1120,7 @@ else { wakeBit = (message == WM_MOUSEMOVE) ? QS_MOUSEMOVE : QS_MOUSEBUTTON; - if( (hwnd = GetCapture32()) ) + if( (hwnd = GetCapture()) ) if( (wndPtr = WIN_FindWndPtr( hwnd )) ) { hQueue = wndPtr->hmemTaskQ; @@ -1168,7 +1168,7 @@ void hardware_event( WORD message, WORD wParam, LONG lParam, int xPos, int yPos, DWORD time, DWORD extraInfo ) { - MSG32 *msg; + MSG *msg; QMSG *qmsg = sysMsgQueue->lastMsg; int mergeMsg = 0; @@ -1309,7 +1309,7 @@ */ void WINAPI PostQuitMessage16( INT16 exitCode ) { - PostQuitMessage32( exitCode ); + PostQuitMessage( exitCode ); } @@ -1327,11 +1327,11 @@ * * ECMA-234, Win32 */ -void WINAPI PostQuitMessage32( INT32 exitCode ) +void WINAPI PostQuitMessage( INT exitCode ) { MESSAGEQUEUE *queue; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return; queue->wPostQMsg = TRUE; queue->wExitCode = (WORD)exitCode; QUEUE_Unlock( queue ); @@ -1352,7 +1352,7 @@ /*********************************************************************** * GetWindowThreadProcessId (USER32.313) */ -DWORD WINAPI GetWindowThreadProcessId( HWND32 hwnd, LPDWORD process ) +DWORD WINAPI GetWindowThreadProcessId( HWND hwnd, LPDWORD process ) { HTASK16 htask; TDB *tdb; @@ -1373,20 +1373,20 @@ */ BOOL16 WINAPI SetMessageQueue16( INT16 size ) { - return SetMessageQueue32( size ); + return SetMessageQueue( size ); } /*********************************************************************** * SetMessageQueue32 (USER32.494) */ -BOOL32 WINAPI SetMessageQueue32( INT32 size ) +BOOL WINAPI SetMessageQueue( INT size ) { /* now obsolete the message queue will be expanded dynamically as necessary */ /* access the queue to create it if it's not existing */ - GetFastQueue(); + GetFastQueue16(); return TRUE; } @@ -1394,7 +1394,7 @@ /*********************************************************************** * InitThreadInput (USER.409) */ -HQUEUE16 WINAPI InitThreadInput( WORD unknown, WORD flags ) +HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags ) { HQUEUE16 hQueue; MESSAGEQUEUE *queuePtr; @@ -1420,7 +1420,7 @@ queuePtr->thdb = THREAD_Current(); SYSTEM_LOCK(); - SetThreadQueue( 0, hQueue ); + SetThreadQueue16( 0, hQueue ); thdb->teb.queue = hQueue; queuePtr->next = hFirstQueue; @@ -1441,7 +1441,7 @@ MESSAGEQUEUE *queue; DWORD ret; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return 0; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return 0; ret = MAKELONG( queue->changeBits, queue->wakeBits ); queue->changeBits = 0; QUEUE_Unlock( queue ); @@ -1452,12 +1452,12 @@ /*********************************************************************** * GetQueueStatus32 (USER32.283) */ -DWORD WINAPI GetQueueStatus32( UINT32 flags ) +DWORD WINAPI GetQueueStatus( UINT flags ) { MESSAGEQUEUE *queue; DWORD ret; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return 0; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return 0; ret = MAKELONG( queue->changeBits, queue->wakeBits ); queue->changeBits = 0; QUEUE_Unlock( queue ); @@ -1471,13 +1471,13 @@ */ BOOL16 WINAPI GetInputState16(void) { - return GetInputState32(); + return GetInputState(); } /*********************************************************************** * WaitForInputIdle (USER32.577) */ -DWORD WINAPI WaitForInputIdle (HANDLE32 hProcess, DWORD dwTimeOut) +DWORD WINAPI WaitForInputIdle (HANDLE hProcess, DWORD dwTimeOut) { FIXME (msg, "(hProcess=%d, dwTimeOut=%ld): stub\n", hProcess, dwTimeOut); @@ -1488,12 +1488,12 @@ /*********************************************************************** * GetInputState32 (USER32.244) */ -BOOL32 WINAPI GetInputState32(void) +BOOL WINAPI GetInputState(void) { MESSAGEQUEUE *queue; - BOOL32 ret; + BOOL ret; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return FALSE; ret = queue->wakeBits & (QS_KEY | QS_MOUSEBUTTON); QUEUE_Unlock( queue ); @@ -1504,7 +1504,7 @@ /*********************************************************************** * UserYield (USER.332) */ -void WINAPI UserYield(void) +void WINAPI UserYield16(void) { TDB *pCurTask = (TDB *)GlobalLock16( GetCurrentTask() ); MESSAGEQUEUE *queue = (MESSAGEQUEUE *)QUEUE_Lock( pCurTask->hQueue ); @@ -1522,7 +1522,7 @@ QUEUE_Unlock( queue ); - OldYield(); + OldYield16(); queue = (MESSAGEQUEUE *)QUEUE_Lock( pCurTask->hQueue ); while (queue && (queue->wakeBits & QS_SENDMESSAGE)) @@ -1557,7 +1557,7 @@ MESSAGEQUEUE *queue; DWORD ret; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return 0; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return 0; ret = queue->GetMessagePosVal; QUEUE_Unlock( queue ); @@ -1589,7 +1589,7 @@ MESSAGEQUEUE *queue; LONG ret; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return 0; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return 0; ret = queue->GetMessageTimeVal; QUEUE_Unlock( queue ); @@ -1605,7 +1605,7 @@ MESSAGEQUEUE *queue; LONG ret; - if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) return 0; + if (!(queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) return 0; ret = queue->GetMessageExtraInfoVal; QUEUE_Unlock( queue );
diff --git a/windows/rect.c b/windows/rect.c index 4c0043b..e7f924c 100644 --- a/windows/rect.c +++ b/windows/rect.c
@@ -25,8 +25,8 @@ /*********************************************************************** * SetRect32 (USER32.499) */ -BOOL32 WINAPI SetRect32( LPRECT32 rect, INT32 left, INT32 top, - INT32 right, INT32 bottom ) +BOOL WINAPI SetRect( LPRECT rect, INT left, INT top, + INT right, INT bottom ) { rect->left = left; rect->right = right; @@ -48,7 +48,7 @@ /*********************************************************************** * SetRectEmpty32 (USER32.500) */ -BOOL32 WINAPI SetRectEmpty32( LPRECT32 rect ) +BOOL WINAPI SetRectEmpty( LPRECT rect ) { rect->left = rect->right = rect->top = rect->bottom = 0; return TRUE; @@ -68,7 +68,7 @@ /*********************************************************************** * CopyRect32 (USER32.62) */ -BOOL32 WINAPI CopyRect32( RECT32 *dest, const RECT32 *src ) +BOOL WINAPI CopyRect( RECT *dest, const RECT *src ) { *dest = *src; return TRUE; @@ -87,7 +87,7 @@ /*********************************************************************** * IsRectEmpty32 (USER32.347) */ -BOOL32 WINAPI IsRectEmpty32( const RECT32 *rect ) +BOOL WINAPI IsRectEmpty( const RECT *rect ) { return ((rect->left == rect->right) || (rect->top == rect->bottom)); } @@ -106,7 +106,7 @@ /*********************************************************************** * PtInRect32 (USER32.424) */ -BOOL32 WINAPI PtInRect32( const RECT32 *rect, POINT32 pt ) +BOOL WINAPI PtInRect( const RECT *rect, POINT pt ) { return ((pt.x >= rect->left) && (pt.x < rect->right) && (pt.y >= rect->top) && (pt.y < rect->bottom)); @@ -128,7 +128,7 @@ /*********************************************************************** * OffsetRect32 (USER32.406) */ -BOOL32 WINAPI OffsetRect32( LPRECT32 rect, INT32 x, INT32 y ) +BOOL WINAPI OffsetRect( LPRECT rect, INT x, INT y ) { rect->left += x; rect->right += x; @@ -153,7 +153,7 @@ /*********************************************************************** * InflateRect32 (USER32.321) */ -BOOL32 WINAPI InflateRect32( LPRECT32 rect, INT32 x, INT32 y ) +BOOL WINAPI InflateRect( LPRECT rect, INT x, INT y ) { rect->left -= x; rect->top -= y; @@ -187,14 +187,14 @@ /*********************************************************************** * IntersectRect32 (USER32.327) */ -BOOL32 WINAPI IntersectRect32( LPRECT32 dest, const RECT32 *src1, - const RECT32 *src2 ) +BOOL WINAPI IntersectRect( LPRECT dest, const RECT *src1, + const RECT *src2 ) { - if (IsRectEmpty32(src1) || IsRectEmpty32(src2) || + if (IsRectEmpty(src1) || IsRectEmpty(src2) || (src1->left >= src2->right) || (src2->left >= src1->right) || (src1->top >= src2->bottom) || (src2->top >= src1->bottom)) { - SetRectEmpty32( dest ); + SetRectEmpty( dest ); return FALSE; } dest->left = MAX( src1->left, src2->left ); @@ -238,21 +238,21 @@ /*********************************************************************** * UnionRect32 (USER32.559) */ -BOOL32 WINAPI UnionRect32( LPRECT32 dest, const RECT32 *src1, - const RECT32 *src2 ) +BOOL WINAPI UnionRect( LPRECT dest, const RECT *src1, + const RECT *src2 ) { - if (IsRectEmpty32(src1)) + if (IsRectEmpty(src1)) { - if (IsRectEmpty32(src2)) + if (IsRectEmpty(src2)) { - SetRectEmpty32( dest ); + SetRectEmpty( dest ); return FALSE; } else *dest = *src2; } else { - if (IsRectEmpty32(src2)) *dest = *src1; + if (IsRectEmpty(src2)) *dest = *src1; else { dest->left = MIN( src1->left, src2->left ); @@ -278,7 +278,7 @@ /*********************************************************************** * EqualRect32 (USER32.194) */ -BOOL32 WINAPI EqualRect32( const RECT32* rect1, const RECT32* rect2 ) +BOOL WINAPI EqualRect( const RECT* rect1, const RECT* rect2 ) { return ((rect1->left == rect2->left) && (rect1->right == rect2->right) && (rect1->top == rect2->top) && (rect1->bottom == rect2->bottom)); @@ -324,22 +324,22 @@ /*********************************************************************** * SubtractRect32 (USER32.536) */ -BOOL32 WINAPI SubtractRect32( LPRECT32 dest, const RECT32 *src1, - const RECT32 *src2 ) +BOOL WINAPI SubtractRect( LPRECT dest, const RECT *src1, + const RECT *src2 ) { - RECT32 tmp; + RECT tmp; - if (IsRectEmpty32( src1 )) + if (IsRectEmpty( src1 )) { - SetRectEmpty32( dest ); + SetRectEmpty( dest ); return FALSE; } *dest = *src1; - if (IntersectRect32( &tmp, src1, src2 )) + if (IntersectRect( &tmp, src1, src2 )) { - if (EqualRect32( &tmp, dest )) + if (EqualRect( &tmp, dest )) { - SetRectEmpty32( dest ); + SetRectEmpty( dest ); return FALSE; } if ((tmp.top == dest->top) && (tmp.bottom == dest->bottom))
diff --git a/windows/scroll.c b/windows/scroll.c index fee224e..c54b49d 100644 --- a/windows/scroll.c +++ b/windows/scroll.c
@@ -24,11 +24,11 @@ void WINAPI ScrollWindow16(HWND16 hwnd, INT16 dx, INT16 dy, const RECT16 *rect, const RECT16 *clipRect ) { - RECT32 rect32, clipRect32; + RECT rect32, clipRect32; if (rect) CONV_RECT16TO32( rect, &rect32 ); if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 ); - ScrollWindow32( hwnd, dx, dy, rect ? &rect32 : NULL, + ScrollWindow( hwnd, dx, dy, rect ? &rect32 : NULL, clipRect ? &clipRect32 : NULL ); } @@ -36,11 +36,11 @@ * ScrollWindow32 (USER32.450) * */ -BOOL32 WINAPI ScrollWindow32( HWND32 hwnd, INT32 dx, INT32 dy, - const RECT32 *rect, const RECT32 *clipRect ) +BOOL WINAPI ScrollWindow( HWND hwnd, INT dx, INT dy, + const RECT *rect, const RECT *clipRect ) { return - (ERROR != ScrollWindowEx32( hwnd, dx, dy, rect, clipRect, 0, NULL, + (ERROR != ScrollWindowEx( hwnd, dx, dy, rect, clipRect, 0, NULL, (rect ? 0 : SW_SCROLLCHILDREN) | SW_INVALIDATE )); } @@ -52,12 +52,12 @@ const RECT16 *cliprc, HRGN16 hrgnUpdate, LPRECT16 rcUpdate ) { - RECT32 rect32, clipRect32, rcUpdate32; + RECT rect32, clipRect32, rcUpdate32; BOOL16 ret; if (rect) CONV_RECT16TO32( rect, &rect32 ); if (cliprc) CONV_RECT16TO32( cliprc, &clipRect32 ); - ret = ScrollDC32( hdc, dx, dy, rect ? &rect32 : NULL, + ret = ScrollDC( hdc, dx, dy, rect ? &rect32 : NULL, cliprc ? &clipRect32 : NULL, hrgnUpdate, &rcUpdate32 ); if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate ); return ret; @@ -71,12 +71,12 @@ * rcUpdate must be returned in logical coordinate to comply with win API. * */ -BOOL32 WINAPI ScrollDC32( HDC32 hdc, INT32 dx, INT32 dy, const RECT32 *rc, - const RECT32 *prLClip, HRGN32 hrgnUpdate, - LPRECT32 rcUpdate ) +BOOL WINAPI ScrollDC( HDC hdc, INT dx, INT dy, const RECT *rc, + const RECT *prLClip, HRGN hrgnUpdate, + LPRECT rcUpdate ) { - RECT32 rect, rClip, rSrc; - POINT32 src, dest; + RECT rect, rClip, rSrc; + POINT src, dest; DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC); TRACE(scroll,"%04x %d,%d hrgnUpdate=%04x rcUpdate = %p cliprc = (%d,%d-%d,%d), rc=(%d,%d-%d,%d)\n", @@ -98,27 +98,27 @@ if ( rc ) rect = *rc; else /* maybe we should just return FALSE? */ - GetClipBox32( hdc, &rect ); + GetClipBox( hdc, &rect ); if (prLClip) - IntersectRect32( &rClip,&rect,prLClip ); + IntersectRect( &rClip,&rect,prLClip ); else rClip = rect; rSrc = rClip; - OffsetRect32( &rSrc, -dx, -dy ); - IntersectRect32( &rSrc, &rSrc, &rect ); + OffsetRect( &rSrc, -dx, -dy ); + IntersectRect( &rSrc, &rSrc, &rect ); if(dc->w.hVisRgn) { - if (!IsRectEmpty32(&rSrc)) + if (!IsRectEmpty(&rSrc)) { dest.x = (src.x = rSrc.left) + dx; dest.y = (src.y = rSrc.top) + dy; /* copy bits */ - if (!BitBlt32( hdc, dest.x, dest.y, + if (!BitBlt( hdc, dest.x, dest.y, rSrc.right - rSrc.left, rSrc.bottom - rSrc.top, hdc, src.x, src.y, SRCCOPY)) { @@ -131,40 +131,40 @@ if (hrgnUpdate || rcUpdate) { - HRGN32 hrgn = - (hrgnUpdate) ? hrgnUpdate : CreateRectRgn32( 0,0,0,0 ); - HRGN32 hrgn2; + HRGN hrgn = + (hrgnUpdate) ? hrgnUpdate : CreateRectRgn( 0,0,0,0 ); + HRGN hrgn2; dx = XLPTODP ( dc, rect.left + dx) - XLPTODP ( dc, rect.left); dy = YLPTODP ( dc, rect.top + dy) - YLPTODP ( dc, rect.top); - LPtoDP32( hdc, (LPPOINT32)&rect, 2 ); - LPtoDP32( hdc, (LPPOINT32)&rClip, 2 ); - hrgn2 = CreateRectRgnIndirect32( &rect ); - OffsetRgn32( hrgn2, dc->w.DCOrgX, dc->w.DCOrgY ); - CombineRgn32( hrgn2, hrgn2, dc->w.hVisRgn, RGN_AND ); - OffsetRgn32( hrgn2, -dc->w.DCOrgX, -dc->w.DCOrgY ); - SetRectRgn32( hrgn, rClip.left, rClip.top, + LPtoDP( hdc, (LPPOINT)&rect, 2 ); + LPtoDP( hdc, (LPPOINT)&rClip, 2 ); + hrgn2 = CreateRectRgnIndirect( &rect ); + OffsetRgn( hrgn2, dc->w.DCOrgX, dc->w.DCOrgY ); + CombineRgn( hrgn2, hrgn2, dc->w.hVisRgn, RGN_AND ); + OffsetRgn( hrgn2, -dc->w.DCOrgX, -dc->w.DCOrgY ); + SetRectRgn( hrgn, rClip.left, rClip.top, rClip.right, rClip.bottom ); - CombineRgn32( hrgn, hrgn, hrgn2, RGN_AND ); - OffsetRgn32( hrgn2, dx, dy ); - CombineRgn32( hrgn, hrgn, hrgn2, RGN_DIFF ); + CombineRgn( hrgn, hrgn, hrgn2, RGN_AND ); + OffsetRgn( hrgn2, dx, dy ); + CombineRgn( hrgn, hrgn, hrgn2, RGN_DIFF ); if( rcUpdate ) { - GetRgnBox32( hrgn, rcUpdate ); + GetRgnBox( hrgn, rcUpdate ); //Put the rcUpdate in logical coordinate - DPtoLP32( hdc, (LPPOINT32)rcUpdate, 2 ); + DPtoLP( hdc, (LPPOINT)rcUpdate, 2 ); } - if (!hrgnUpdate) DeleteObject32( hrgn ); - DeleteObject32( hrgn2 ); + if (!hrgnUpdate) DeleteObject( hrgn ); + DeleteObject( hrgn2 ); } } else { - if (hrgnUpdate) SetRectRgn32(hrgnUpdate, 0, 0, 0, 0); - if (rcUpdate) SetRectEmpty32(rcUpdate); + if (hrgnUpdate) SetRectRgn(hrgnUpdate, 0, 0, 0, 0); + if (rcUpdate) SetRectEmpty(rcUpdate); } GDI_HEAP_UNLOCK( hdc ); @@ -180,12 +180,12 @@ HRGN16 hrgnUpdate, LPRECT16 rcUpdate, UINT16 flags ) { - RECT32 rect32, clipRect32, rcUpdate32; + RECT rect32, clipRect32, rcUpdate32; BOOL16 ret; if (rect) CONV_RECT16TO32( rect, &rect32 ); if (clipRect) CONV_RECT16TO32( clipRect, &clipRect32 ); - ret = ScrollWindowEx32( hwnd, dx, dy, rect ? &rect32 : NULL, + ret = ScrollWindowEx( hwnd, dx, dy, rect ? &rect32 : NULL, clipRect ? &clipRect32 : NULL, hrgnUpdate, (rcUpdate) ? &rcUpdate32 : NULL, flags ); if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate ); @@ -195,24 +195,24 @@ /************************************************************************* * SCROLL_FixCaret */ -static BOOL32 SCROLL_FixCaret(HWND32 hWnd, LPRECT32 lprc, UINT32 flags) +static BOOL SCROLL_FixCaret(HWND hWnd, LPRECT lprc, UINT flags) { - HWND32 hCaret = CARET_GetHwnd(); + HWND hCaret = CARET_GetHwnd(); if( hCaret ) { - RECT32 rc; + RECT rc; CARET_GetRect( &rc ); if( hCaret == hWnd || - (flags & SW_SCROLLCHILDREN && IsChild32(hWnd, hCaret)) ) + (flags & SW_SCROLLCHILDREN && IsChild(hWnd, hCaret)) ) { - POINT32 pt; + POINT pt; pt.x = rc.left; pt.y = rc.top; - MapWindowPoints32( hCaret, hWnd, (LPPOINT32)&rc, 2 ); - if( IntersectRect32(lprc, lprc, &rc) ) + MapWindowPoints( hCaret, hWnd, (LPPOINT)&rc, 2 ); + if( IntersectRect(lprc, lprc, &rc) ) { - HideCaret32(0); + HideCaret(0); lprc->left = pt.x; lprc->top = pt.y; return TRUE; } @@ -226,32 +226,32 @@ * * NOTE: Use this function instead of ScrollWindow32 */ -INT32 WINAPI ScrollWindowEx32( HWND32 hwnd, INT32 dx, INT32 dy, - const RECT32 *rect, const RECT32 *clipRect, - HRGN32 hrgnUpdate, LPRECT32 rcUpdate, - UINT32 flags ) +INT WINAPI ScrollWindowEx( HWND hwnd, INT dx, INT dy, + const RECT *rect, const RECT *clipRect, + HRGN hrgnUpdate, LPRECT rcUpdate, + UINT flags ) { - INT32 retVal = NULLREGION; - BOOL32 bCaret = FALSE, bOwnRgn = TRUE; - RECT32 rc, cliprc; + INT retVal = NULLREGION; + BOOL bCaret = FALSE, bOwnRgn = TRUE; + RECT rc, cliprc; WND* wnd = WIN_FindWndPtr( hwnd ); if( !wnd || !WIN_IsWindowDrawable( wnd, TRUE )) return ERROR; - GetClientRect32(hwnd, &rc); - if (rect) IntersectRect32(&rc, &rc, rect); + GetClientRect(hwnd, &rc); + if (rect) IntersectRect(&rc, &rc, rect); - if (clipRect) IntersectRect32(&cliprc,&rc,clipRect); + if (clipRect) IntersectRect(&cliprc,&rc,clipRect); else cliprc = rc; - if (!IsRectEmpty32(&cliprc) && (dx || dy)) + if (!IsRectEmpty(&cliprc) && (dx || dy)) { DC* dc; - HDC32 hDC; - BOOL32 bUpdate = (rcUpdate || hrgnUpdate || flags & (SW_INVALIDATE | SW_ERASE)); - HRGN32 hrgnClip = CreateRectRgnIndirect32(&cliprc); - HRGN32 hrgnTemp = CreateRectRgnIndirect32(&rc); - RECT32 caretrc; + HDC hDC; + BOOL bUpdate = (rcUpdate || hrgnUpdate || flags & (SW_INVALIDATE | SW_ERASE)); + HRGN hrgnClip = CreateRectRgnIndirect(&cliprc); + HRGN hrgnTemp = CreateRectRgnIndirect(&rc); + RECT caretrc; TRACE(scroll,"%04x, %d,%d hrgnUpdate=%04x rcUpdate = %p \ cliprc = (%d,%d-%d,%d), rc=(%d,%d-%d,%d) %04x\n", @@ -263,9 +263,9 @@ bCaret = SCROLL_FixCaret(hwnd, &caretrc, flags); if( hrgnUpdate ) bOwnRgn = FALSE; - else if( bUpdate ) hrgnUpdate = CreateRectRgn32( 0, 0, 0, 0 ); + else if( bUpdate ) hrgnUpdate = CreateRectRgn( 0, 0, 0, 0 ); - hDC = GetDCEx32( hwnd, hrgnClip, DCX_CACHE | DCX_USESTYLE | + hDC = GetDCEx( hwnd, hrgnClip, DCX_CACHE | DCX_USESTYLE | DCX_KEEPCLIPRGN | DCX_INTERSECTRGN | ((flags & SW_SCROLLCHILDREN) ? DCX_NOCLIPCHILDREN : 0) ); if( (dc = (DC *)GDI_GetObjPtr(hDC, DC_MAGIC)) ) @@ -275,21 +275,21 @@ if( bUpdate ) { - OffsetRgn32( hrgnTemp, dc->w.DCOrgX, dc->w.DCOrgY ); - CombineRgn32( hrgnTemp, hrgnTemp, dc->w.hVisRgn, + OffsetRgn( hrgnTemp, dc->w.DCOrgX, dc->w.DCOrgY ); + CombineRgn( hrgnTemp, hrgnTemp, dc->w.hVisRgn, RGN_AND ); - OffsetRgn32( hrgnTemp, -dc->w.DCOrgX, -dc->w.DCOrgY ); - CombineRgn32( hrgnUpdate, hrgnTemp, hrgnClip, + OffsetRgn( hrgnTemp, -dc->w.DCOrgX, -dc->w.DCOrgY ); + CombineRgn( hrgnUpdate, hrgnTemp, hrgnClip, RGN_AND ); - OffsetRgn32( hrgnTemp, dx, dy ); + OffsetRgn( hrgnTemp, dx, dy ); retVal = - CombineRgn32( hrgnUpdate, hrgnUpdate, hrgnTemp, + CombineRgn( hrgnUpdate, hrgnUpdate, hrgnTemp, RGN_DIFF ); - if( rcUpdate ) GetRgnBox32( hrgnUpdate, rcUpdate ); + if( rcUpdate ) GetRgnBox( hrgnUpdate, rcUpdate ); } } - ReleaseDC32(hwnd, hDC); + ReleaseDC(hwnd, hDC); GDI_HEAP_UNLOCK( hDC ); } @@ -297,21 +297,21 @@ { /* Takes into account the fact that some damages may have occured during the scroll. */ - CombineRgn32( hrgnTemp, wnd->hrgnUpdate, 0, RGN_COPY ); - OffsetRgn32( hrgnTemp, dx, dy ); - CombineRgn32( hrgnTemp, hrgnTemp, hrgnClip, RGN_AND ); - CombineRgn32( wnd->hrgnUpdate, wnd->hrgnUpdate, hrgnTemp, RGN_OR ); + CombineRgn( hrgnTemp, wnd->hrgnUpdate, 0, RGN_COPY ); + OffsetRgn( hrgnTemp, dx, dy ); + CombineRgn( hrgnTemp, hrgnTemp, hrgnClip, RGN_AND ); + CombineRgn( wnd->hrgnUpdate, wnd->hrgnUpdate, hrgnTemp, RGN_OR ); } if( flags & SW_SCROLLCHILDREN ) { - RECT32 r; + RECT r; WND* w; for( w = wnd->child; w; w = w->next ) { CONV_RECT16TO32( &w->rectWindow, &r ); - if( IntersectRect32(&r, &r, &rc) ) - SetWindowPos32(w->hwndSelf, 0, w->rectWindow.left + dx, + if( IntersectRect(&r, &r, &rc) ) + SetWindowPos(w->hwndSelf, 0, w->rectWindow.left + dx, w->rectWindow.top + dy, 0,0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_DEFERERASE ); @@ -324,13 +324,13 @@ if( bCaret ) { - SetCaretPos32( caretrc.left + dx, caretrc.top + dy ); - ShowCaret32(0); + SetCaretPos( caretrc.left + dx, caretrc.top + dy ); + ShowCaret(0); } - if( bOwnRgn && hrgnUpdate ) DeleteObject32( hrgnUpdate ); - DeleteObject32( hrgnClip ); - DeleteObject32( hrgnTemp ); + if( bOwnRgn && hrgnUpdate ) DeleteObject( hrgnUpdate ); + DeleteObject( hrgnClip ); + DeleteObject( hrgnTemp ); } return retVal; }
diff --git a/windows/syscolor.c b/windows/syscolor.c index 19a597a..b2222ca 100644 --- a/windows/syscolor.c +++ b/windows/syscolor.c
@@ -85,11 +85,11 @@ #define NUM_SYS_COLORS (COLOR_GRADIENTINACTIVECAPTION+1) static COLORREF SysColors[NUM_SYS_COLORS]; -static HBRUSH32 SysColorBrushes[NUM_SYS_COLORS]; -static HPEN32 SysColorPens[NUM_SYS_COLORS]; +static HBRUSH SysColorBrushes[NUM_SYS_COLORS]; +static HPEN SysColorPens[NUM_SYS_COLORS]; #define MAKE_SOLID(color) \ - (PALETTEINDEX(GetNearestPaletteIndex32(STOCK_DEFAULT_PALETTE,(color)))) + (PALETTEINDEX(GetNearestPaletteIndex(STOCK_DEFAULT_PALETTE,(color)))) /************************************************************************* * SYSCOLOR_SetColor @@ -98,10 +98,10 @@ { if (index < 0 || index >= NUM_SYS_COLORS) return; SysColors[index] = color; - if (SysColorBrushes[index]) DeleteObject32( SysColorBrushes[index] ); - SysColorBrushes[index] = CreateSolidBrush32( color ); - if (SysColorPens[index]) DeleteObject32( SysColorPens[index] ); - SysColorPens[index] = CreatePen32( PS_SOLID, 1, color ); + if (SysColorBrushes[index]) DeleteObject( SysColorBrushes[index] ); + SysColorBrushes[index] = CreateSolidBrush( color ); + if (SysColorPens[index]) DeleteObject( SysColorPens[index] ); + SysColorPens[index] = CreatePen( PS_SOLID, 1, color ); } @@ -117,7 +117,7 @@ p = (TWEAK_WineLook == WIN31_LOOK) ? DefSysColors : DefSysColors95; for (i = 0; i < NUM_SYS_COLORS; i++, p += 2) { - GetProfileString32A( "colors", p[0], p[1], buffer, 100 ); + GetProfileStringA( "colors", p[0], p[1], buffer, 100 ); if (sscanf( buffer, " %d %d %d", &r, &g, &b ) != 3) r = g = b = 0; SYSCOLOR_SetColor( i, RGB(r,g,b) ); } @@ -129,14 +129,14 @@ */ COLORREF WINAPI GetSysColor16( INT16 nIndex ) { - return GetSysColor32 (nIndex); + return GetSysColor (nIndex); } /************************************************************************* * GetSysColor32 (USER32.289) */ -COLORREF WINAPI GetSysColor32( INT32 nIndex ) +COLORREF WINAPI GetSysColor( INT nIndex ) { if (nIndex >= 0 && nIndex < NUM_SYS_COLORS) return SysColors[nIndex]; @@ -160,11 +160,11 @@ /* Send WM_SYSCOLORCHANGE message to all windows */ - SendMessage32A( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0 ); + SendMessageA( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0 ); /* Repaint affected portions of all visible windows */ - RedrawWindow32( GetDesktopWindow32(), NULL, 0, + RedrawWindow( GetDesktopWindow(), NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN ); } @@ -172,7 +172,7 @@ /************************************************************************* * SetSysColors32 (USER32.505) */ -BOOL32 WINAPI SetSysColors32( INT32 nChanges, const INT32 *lpSysColor, +BOOL WINAPI SetSysColors( INT nChanges, const INT *lpSysColor, const COLORREF *lpColorValues ) { int i; @@ -184,11 +184,11 @@ /* Send WM_SYSCOLORCHANGE message to all windows */ - SendMessage32A( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0 ); + SendMessageA( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0 ); /* Repaint affected portions of all visible windows */ - RedrawWindow32( GetDesktopWindow32(), NULL, 0, + RedrawWindow( GetDesktopWindow(), NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN ); return TRUE; } @@ -199,19 +199,19 @@ */ HBRUSH16 WINAPI GetSysColorBrush16( INT16 index ) { - return (HBRUSH16)GetSysColorBrush32(index); + return (HBRUSH16)GetSysColorBrush(index); } /*********************************************************************** * GetSysColorBrush32 (USER32.290) */ -HBRUSH32 WINAPI GetSysColorBrush32( INT32 index ) +HBRUSH WINAPI GetSysColorBrush( INT index ) { if (0 <= index && index < NUM_SYS_COLORS) return SysColorBrushes[index]; WARN(syscolor, "Unknown index(%d)\n", index ); - return GetStockObject32(LTGRAY_BRUSH); + return GetStockObject(LTGRAY_BRUSH); } @@ -220,7 +220,7 @@ */ HPEN16 WINAPI GetSysColorPen16( INT16 index ) { - return (HPEN16)GetSysColorPen32(index); + return (HPEN16)GetSysColorPen(index); } @@ -231,7 +231,7 @@ * Windows. However, it is a natural complement for GetSysColorBrush * in the Win32 API and is needed quite a bit inside Wine. */ -HPEN32 WINAPI GetSysColorPen32( INT32 index ) +HPEN WINAPI GetSysColorPen( INT index ) { /* We can assert here, because this function is internal to Wine */ assert (0 <= index && index < NUM_SYS_COLORS);
diff --git a/windows/sysmetrics.c b/windows/sysmetrics.c index 37b53e2..8803fa5 100644 --- a/windows/sysmetrics.c +++ b/windows/sysmetrics.c
@@ -88,20 +88,20 @@ sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - 2; sysMetrics[SM_CYSIZE] = sysMetrics[SM_CXSIZE]; - sysMetrics[SM_CXFRAME] = GetProfileInt32A("Windows", "BorderWidth", 4); + sysMetrics[SM_CXFRAME] = GetProfileIntA("Windows", "BorderWidth", 4); sysMetrics[SM_CYFRAME] = sysMetrics[SM_CXFRAME]; sysMetrics[SM_CXMINTRACK] = sysMetrics[SM_CXMIN]; sysMetrics[SM_CYMINTRACK] = sysMetrics[SM_CYMIN]; sysMetrics[SM_CXDOUBLECLK] = - (GetProfileInt32A("Windows", "DoubleClickWidth", 4) + 1) & ~1; + (GetProfileIntA("Windows", "DoubleClickWidth", 4) + 1) & ~1; sysMetrics[SM_CYDOUBLECLK] = - (GetProfileInt32A("Windows","DoubleClickHeight", 4) + 1) & ~1; + (GetProfileIntA("Windows","DoubleClickHeight", 4) + 1) & ~1; sysMetrics[SM_CXICONSPACING] = - GetProfileInt32A("Desktop","IconSpacing", 75); + GetProfileIntA("Desktop","IconSpacing", 75); sysMetrics[SM_CYICONSPACING] = - GetProfileInt32A("Desktop", "IconVerticalSpacing", 75); + GetProfileIntA("Desktop", "IconVerticalSpacing", 75); sysMetrics[SM_MENUDROPALIGNMENT] = - GetProfileInt32A("Windows", "MenuDropAlignment", 0); + GetProfileIntA("Windows", "MenuDropAlignment", 0); sysMetrics[SM_PENWINDOWS] = 0; sysMetrics[SM_DBCSENABLED] = 0; @@ -170,14 +170,14 @@ */ INT16 WINAPI GetSystemMetrics16( INT16 index ) { - return (INT16)GetSystemMetrics32(index); + return (INT16)GetSystemMetrics(index); } /*********************************************************************** * GetSystemMetrics32 (USER32.292) */ -INT32 WINAPI GetSystemMetrics32( INT32 index ) +INT WINAPI GetSystemMetrics( INT index ) { if ((index < 0) || (index > SM_CMETRICS)) return 0; else return sysMetrics[index];
diff --git a/windows/timer.c b/windows/timer.c index c09c434..e75e7c7 100644 --- a/windows/timer.c +++ b/windows/timer.c
@@ -13,11 +13,11 @@ typedef struct tagTIMER { - HWND32 hwnd; + HWND hwnd; HQUEUE16 hq; UINT16 msg; /* WM_TIMER or WM_SYSTIMER */ - UINT32 id; - UINT32 timeout; + UINT id; + UINT timeout; struct tagTIMER *next; DWORD expires; /* Next expiration, or 0 if already expired */ HWINDOWPROC proc; @@ -110,7 +110,7 @@ * * Remove all timers for a given window. */ -void TIMER_RemoveWindowTimers( HWND32 hwnd ) +void TIMER_RemoveWindowTimers( HWND hwnd ) { int i; TIMER *pTimer; @@ -187,8 +187,8 @@ * * Build a message for an expired timer. */ -BOOL32 TIMER_GetTimerMsg( MSG32 *msg, HWND32 hwnd, - HQUEUE16 hQueue, BOOL32 remove ) +BOOL TIMER_GetTimerMsg( MSG *msg, HWND hwnd, + HQUEUE16 hQueue, BOOL remove ) { TIMER *pTimer = pNextTimer; DWORD curTime = GetTickCount(); @@ -217,8 +217,8 @@ /*********************************************************************** * TIMER_SetTimer */ -static UINT32 TIMER_SetTimer( HWND32 hwnd, UINT32 id, UINT32 timeout, - WNDPROC16 proc, WINDOWPROCTYPE type, BOOL32 sys ) +static UINT TIMER_SetTimer( HWND hwnd, UINT id, UINT timeout, + WNDPROC16 proc, WINDOWPROCTYPE type, BOOL sys ) { int i; TIMER * pTimer; @@ -255,8 +255,8 @@ /* Add the timer */ pTimer->hwnd = hwnd; - pTimer->hq = (hwnd) ? GetThreadQueue( GetWindowThreadProcessId( hwnd, NULL ) ) - : GetFastQueue( ); + pTimer->hq = (hwnd) ? GetThreadQueue16( GetWindowThreadProcessId( hwnd, NULL ) ) + : GetFastQueue16( ); pTimer->msg = sys ? WM_SYSTIMER : WM_TIMER; pTimer->id = id; pTimer->timeout = timeout; @@ -275,7 +275,7 @@ /*********************************************************************** * TIMER_KillTimer */ -static BOOL32 TIMER_KillTimer( HWND32 hwnd, UINT32 id, BOOL32 sys ) +static BOOL TIMER_KillTimer( HWND hwnd, UINT id, BOOL sys ) { int i; TIMER * pTimer; @@ -313,8 +313,8 @@ /*********************************************************************** * SetTimer32 (USER32.511) */ -UINT32 WINAPI SetTimer32( HWND32 hwnd, UINT32 id, UINT32 timeout, - TIMERPROC32 proc ) +UINT WINAPI SetTimer( HWND hwnd, UINT id, UINT timeout, + TIMERPROC proc ) { TRACE(timer, "%04x %d %d %08lx\n", hwnd, id, timeout, (LONG)proc ); @@ -339,8 +339,8 @@ /*********************************************************************** * SetSystemTimer32 (USER32.509) */ -UINT32 WINAPI SetSystemTimer32( HWND32 hwnd, UINT32 id, UINT32 timeout, - TIMERPROC32 proc ) +UINT WINAPI SetSystemTimer( HWND hwnd, UINT id, UINT timeout, + TIMERPROC proc ) { TRACE(timer, "%04x %d %d %08lx\n", hwnd, id, timeout, (LONG)proc ); @@ -362,7 +362,7 @@ /*********************************************************************** * KillTimer32 (USER32.354) */ -BOOL32 WINAPI KillTimer32( HWND32 hwnd, UINT32 id ) +BOOL WINAPI KillTimer( HWND hwnd, UINT id ) { TRACE(timer, "%04x %d\n", hwnd, id ); return TIMER_KillTimer( hwnd, id, FALSE ); @@ -382,7 +382,7 @@ /*********************************************************************** * KillSystemTimer32 (USER32.353) */ -BOOL32 WINAPI KillSystemTimer32( HWND32 hwnd, UINT32 id ) +BOOL WINAPI KillSystemTimer( HWND hwnd, UINT id ) { TRACE(timer, "%04x %d\n", hwnd, id ); return TIMER_KillTimer( hwnd, id, TRUE );
diff --git a/windows/ttydrv/clipboard.c b/windows/ttydrv/clipboard.c index ac59413..f6c0c3c 100644 --- a/windows/ttydrv/clipboard.c +++ b/windows/ttydrv/clipboard.c
@@ -27,14 +27,14 @@ /*********************************************************************** * TTYDRV_CLIPBOARD_SetClipboardData */ -void TTYDRV_CLIPBOARD_SetClipboardData(UINT32 wFormat) +void TTYDRV_CLIPBOARD_SetClipboardData(UINT wFormat) { } /*********************************************************************** * TTYDRV_CLIPBOARD_RequestSelection */ -BOOL32 TTYDRV_CLIPBOARD_RequestSelection() +BOOL TTYDRV_CLIPBOARD_RequestSelection() { return FALSE; } @@ -42,6 +42,6 @@ /*********************************************************************** * TTYDRV_CLIPBOARD_ResetOwner */ -void TTYDRV_CLIPBOARD_ResetOwner(WND *pWnd, BOOL32 bFooBar) +void TTYDRV_CLIPBOARD_ResetOwner(WND *pWnd, BOOL bFooBar) { }
diff --git a/windows/ttydrv/event.c b/windows/ttydrv/event.c index 9d73e86..0ab61ea 100644 --- a/windows/ttydrv/event.c +++ b/windows/ttydrv/event.c
@@ -9,7 +9,7 @@ /*********************************************************************** * TTYDRV_EVENT_Init */ -BOOL32 TTYDRV_EVENT_Init(void) +BOOL TTYDRV_EVENT_Init(void) { return TRUE; } @@ -31,7 +31,7 @@ /*********************************************************************** * TTYDRV_EVENT_WaitNetEvent */ -BOOL32 TTYDRV_EVENT_WaitNetEvent(BOOL32 sleep, BOOL32 peek) +BOOL TTYDRV_EVENT_WaitNetEvent(BOOL sleep, BOOL peek) { return TRUE; } @@ -46,7 +46,7 @@ /*********************************************************************** * TTYDRV_EVENT_CheckFocus */ -BOOL32 TTYDRV_EVENT_CheckFocus(void) +BOOL TTYDRV_EVENT_CheckFocus(void) { return TRUE; } @@ -54,7 +54,7 @@ /*********************************************************************** * TTYDRV_EVENT_QueryPointer */ -BOOL32 TTYDRV_EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state) +BOOL TTYDRV_EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state) { if(posX) *posX = 0; @@ -78,7 +78,7 @@ /*********************************************************************** * TTYDRV_EVENT_Pending */ -BOOL32 TTYDRV_EVENT_Pending(void) +BOOL TTYDRV_EVENT_Pending(void) { return FALSE; }
diff --git a/windows/ttydrv/wnd.c b/windows/ttydrv/wnd.c index d6e2e6e..da2b184 100644 --- a/windows/ttydrv/wnd.c +++ b/windows/ttydrv/wnd.c
@@ -26,7 +26,7 @@ /********************************************************************** * TTYDRV_WND_CreateDesktopWindow */ -BOOL32 TTYDRV_WND_CreateDesktopWindow(WND *wndPtr, CLASS *classPtr, BOOL32 bUnicode) +BOOL TTYDRV_WND_CreateDesktopWindow(WND *wndPtr, CLASS *classPtr, BOOL bUnicode) { return FALSE; } @@ -34,7 +34,7 @@ /********************************************************************** * TTYDRV_WND_CreateWindow */ -BOOL32 TTYDRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCT32A *cs, BOOL32 bUnicode) +BOOL TTYDRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BOOL bUnicode) { return FALSE; } @@ -42,7 +42,7 @@ /*********************************************************************** * TTYDRV_WND_DestroyWindow */ -BOOL32 TTYDRV_WND_DestroyWindow(WND *wndPtr) +BOOL TTYDRV_WND_DestroyWindow(WND *wndPtr) { return FALSE; } @@ -67,7 +67,7 @@ * * SetWindowPos() for an X window. Used by the real SetWindowPos(). */ -void TTYDRV_WND_SetWindowPos(WND *wndPtr, const WINDOWPOS32 *winpos, BOOL32 bSMC_SETXPOS) +void TTYDRV_WND_SetWindowPos(WND *wndPtr, const WINDOWPOS *winpos, BOOL bSMC_SETXPOS) { } @@ -104,22 +104,22 @@ * TTYDRV_WND_ScrollWindow */ void TTYDRV_WND_ScrollWindow( - WND *wndPtr, DC *dcPtr, INT32 dx, INT32 dy, - const RECT32 *clipRect, BOOL32 bUpdate) + WND *wndPtr, DC *dcPtr, INT dx, INT dy, + const RECT *clipRect, BOOL bUpdate) { } /*********************************************************************** * TTYDRV_WND_SetDrawable */ -void TTYDRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL32 bSetClipOrigin) +void TTYDRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL bSetClipOrigin) { } /*********************************************************************** * TTYDRV_WND_IsSelfClipping */ -BOOL32 TTYDRV_WND_IsSelfClipping(WND *wndPtr) +BOOL TTYDRV_WND_IsSelfClipping(WND *wndPtr) { return FALSE; }
diff --git a/windows/user.c b/windows/user.c index 489e626..4c5d320 100644 --- a/windows/user.c +++ b/windows/user.c
@@ -31,7 +31,7 @@ /*********************************************************************** * GetFreeSystemResources (USER.284) */ -WORD WINAPI GetFreeSystemResources( WORD resType ) +WORD WINAPI GetFreeSystemResources16( WORD resType ) { int userPercent, gdiPercent; @@ -66,10 +66,10 @@ /*********************************************************************** * SystemHeapInfo (TOOLHELP.71) */ -BOOL16 WINAPI SystemHeapInfo( SYSHEAPINFO *pHeapInfo ) +BOOL16 WINAPI SystemHeapInfo16( SYSHEAPINFO *pHeapInfo ) { - pHeapInfo->wUserFreePercent = GetFreeSystemResources( GFSR_USERRESOURCES ); - pHeapInfo->wGDIFreePercent = GetFreeSystemResources( GFSR_GDIRESOURCES ); + pHeapInfo->wUserFreePercent = GetFreeSystemResources16( GFSR_USERRESOURCES ); + pHeapInfo->wGDIFreePercent = GetFreeSystemResources16( GFSR_GDIRESOURCES ); pHeapInfo->hUserSegment = USER_HeapSel; pHeapInfo->hGDISegment = GDI_HeapSel; return TRUE; @@ -79,7 +79,7 @@ /*********************************************************************** * TimerCount (TOOLHELP.80) */ -BOOL16 WINAPI TimerCount( TIMERINFO *pTimerInfo ) +BOOL16 WINAPI TimerCount16( TIMERINFO *pTimerInfo ) { /* FIXME * In standard mode, dwmsSinceStart = dwmsThisVM @@ -118,11 +118,11 @@ /* SetResourceHandler() returns previous function which is set * when a module's resource table is loaded. */ - proc = SetResourceHandler( hInstance, RT_ICON16, + proc = SetResourceHandler16( hInstance, RT_ICON16, MODULE_GetWndProcEntry16("LoadDIBIconHandler") ); if (!__r16loader) __r16loader = proc; - proc = SetResourceHandler( hInstance, RT_CURSOR16, + proc = SetResourceHandler16( hInstance, RT_CURSOR16, MODULE_GetWndProcEntry16("LoadDIBCursorHandler") ); if (!__r16loader) __r16loader = proc; } @@ -130,7 +130,7 @@ /********************************************************************** * InitApp (USER.5) */ -INT16 WINAPI InitApp( HINSTANCE16 hInstance ) +INT16 WINAPI InitApp16( HINSTANCE16 hInstance ) { /* InitTask() calls LibMain()'s of implicitly loaded DLLs * prior to InitApp() so there is no clean way to do @@ -146,7 +146,7 @@ INT_SetPMHandler( 0, INT_GetPMHandler( 0xff ) ); /* Create task message queue */ - if ( !GetFastQueue() ) return 0; + if ( !GetFastQueue16() ) return 0; return 1; } @@ -199,14 +199,14 @@ /* Patch desktop window */ if( desktop->hmemTaskQ == hQueue ) - desktop->hmemTaskQ = GetTaskQueue(TASK_GetNextTask(hTask)); + desktop->hmemTaskQ = GetTaskQueue16(TASK_GetNextTask(hTask)); USER_QueueCleanup(hQueue); /* ModuleUnload() in "Internals" */ hInstance = GetExePtr( hInstance ); - if( GetModuleUsage( hInstance ) <= 1 ) + if( GetModuleUsage16( hInstance ) <= 1 ) USER_ModuleUnload( hInstance ); } @@ -222,7 +222,7 @@ { /* Do the clean-up stuff */ - WriteOutProfiles(); + WriteOutProfiles16(); SHELL_SaveRegistry(); exit(0); @@ -280,10 +280,10 @@ /*********************************************************************** * ExitWindowsEx (USER32.196) */ -BOOL32 WINAPI ExitWindowsEx( UINT32 flags, DWORD reserved ) +BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved ) { int i; - BOOL32 result; + BOOL result; WND **list, **ppWnd; /* We have to build a list of all windows first, as in EnumWindows */ @@ -295,7 +295,7 @@ for (ppWnd = list, i = 0; *ppWnd; ppWnd++, i++) { /* Make sure that the window still exists */ - if (!IsWindow32( (*ppWnd)->hwndSelf )) continue; + if (!IsWindow( (*ppWnd)->hwndSelf )) continue; if (!SendMessage16( (*ppWnd)->hwndSelf, WM_QUERYENDSESSION, 0, 0 )) break; } @@ -305,7 +305,7 @@ for (ppWnd = list; i > 0; i--, ppWnd++) { - if (!IsWindow32( (*ppWnd)->hwndSelf )) continue; + if (!IsWindow( (*ppWnd)->hwndSelf )) continue; SendMessage16( (*ppWnd)->hwndSelf, WM_ENDSESSION, result, 0 ); } HeapFree( SystemHeap, 0, list ); @@ -318,7 +318,7 @@ /*********************************************************************** * ChangeDisplaySettingA (USER32.589) */ -LONG WINAPI ChangeDisplaySettings32A( LPDEVMODE32A devmode, DWORD flags ) +LONG WINAPI ChangeDisplaySettingsA( LPDEVMODEA devmode, DWORD flags ) { FIXME(system, ": stub\n"); if (devmode==NULL) @@ -350,10 +350,10 @@ * TRUE if nth setting exists found (described in the LPDEVMODE32A struct) * FALSE if we do not have the nth setting */ -BOOL32 WINAPI EnumDisplaySettings32A( +BOOL WINAPI EnumDisplaySettingsA( LPCSTR name, /* [in] huh? */ DWORD n, /* [in] nth entry in display settings list*/ - LPDEVMODE32A devmode /* [out] devmode for that setting */ + LPDEVMODEA devmode /* [out] devmode for that setting */ ) { #define NRMODES 5 #define NRDEPTHS 4 @@ -381,10 +381,10 @@ /*********************************************************************** * EnumDisplaySettingsW (USER32.593) */ -BOOL32 WINAPI EnumDisplaySettings32W(LPCWSTR name,DWORD n,LPDEVMODE32W devmode) { +BOOL WINAPI EnumDisplaySettingsW(LPCWSTR name,DWORD n,LPDEVMODEW devmode) { LPSTR nameA = HEAP_strdupWtoA(GetProcessHeap(),0,name); - DEVMODE32A devmodeA; - BOOL32 ret = EnumDisplaySettings32A(nameA,n,&devmodeA); + DEVMODEA devmodeA; + BOOL ret = EnumDisplaySettingsA(nameA,n,&devmodeA); if (ret) { devmode->dmBitsPerPel = devmodeA.dmBitsPerPel; @@ -401,16 +401,16 @@ * * Used by Turbo Debugger for Windows */ -FARPROC16 WINAPI SetEventHook(FARPROC16 lpfnEventHook) +FARPROC16 WINAPI SetEventHook16(FARPROC16 lpfnEventHook) { - FIXME(hook, "(lpfnEventHook=%08x): stub\n", (UINT32)lpfnEventHook); + FIXME(hook, "(lpfnEventHook=%08x): stub\n", (UINT)lpfnEventHook); return NULL; } /*********************************************************************** * UserSeeUserDo (USER.216) */ -DWORD WINAPI UserSeeUserDo(WORD wReqType, WORD wParam1, WORD wParam2, WORD wParam3) +DWORD WINAPI UserSeeUserDo16(WORD wReqType, WORD wParam1, WORD wParam2, WORD wParam3) { switch (wReqType) { @@ -434,7 +434,7 @@ /*********************************************************************** * RegisterLogonProcess (USER32.434) */ -DWORD WINAPI RegisterLogonProcess(HANDLE32 hprocess,BOOL32 x) { +DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) { FIXME(win32,"(%d,%d),stub!\n",hprocess,x); return 1; } @@ -442,7 +442,7 @@ /*********************************************************************** * CreateWindowStation32W (USER32.86) */ -HWINSTA32 WINAPI CreateWindowStation32W( +HWINSTA WINAPI CreateWindowStationW( LPWSTR winstation,DWORD res1,DWORD desiredaccess, LPSECURITY_ATTRIBUTES lpsa ) { @@ -455,7 +455,7 @@ /*********************************************************************** * SetProcessWindowStation (USER32.496) */ -BOOL32 WINAPI SetProcessWindowStation(HWINSTA32 hWinSta) { +BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) { FIXME(win32,"(%d),stub!\n",hWinSta); return TRUE; } @@ -463,8 +463,8 @@ /*********************************************************************** * SetUserObjectSecurity (USER32.514) */ -BOOL32 WINAPI SetUserObjectSecurity( - HANDLE32 hObj, +BOOL WINAPI SetUserObjectSecurity( + HANDLE hObj, /*LPSECURITY_INFORMATION*/LPVOID pSIRequested, PSECURITY_DESCRIPTOR pSID ) { @@ -475,8 +475,8 @@ /*********************************************************************** * CreateDesktop32W (USER32.69) */ -HDESK32 WINAPI CreateDesktop32W( - LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODE32W pDevmode, +HDESK WINAPI CreateDesktopW( + LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode, DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa ) { FIXME(win32,"(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", @@ -497,7 +497,7 @@ /*********************************************************************** * SetLogonNotifyWindow (USER32.486) */ -DWORD WINAPI SetLogonNotifyWindow(HWINSTA32 hwinsta,HWND32 hwnd) { +DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) { FIXME(win32,"(0x%x,%04x),stub!\n",hwinsta,hwnd); return 1; } @@ -512,21 +512,21 @@ /*********************************************************************** * GetUserObjectInformation32A (USER32.299) */ -BOOL32 WINAPI GetUserObjectInformation32A( HANDLE32 hObj, int nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) +BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, int nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) { FIXME(win32,"(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); return TRUE; } /*********************************************************************** * GetUserObjectInformation32W (USER32.300) */ -BOOL32 WINAPI GetUserObjectInformation32W( HANDLE32 hObj, int nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) +BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, int nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) { FIXME(win32,"(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); return TRUE; } /*********************************************************************** * GetUserObjectSecurity32 (USER32.300) */ -BOOL32 WINAPI GetUserObjectSecurity32(HANDLE32 hObj, SECURITY_INFORMATION * pSIRequested, +BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, SECURITY_INFORMATION * pSIRequested, PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded) { FIXME(win32,"(0x%x %p %p len=%ld %p),stub!\n", hObj, pSIRequested, pSID, nLength, lpnLengthNeeded); return TRUE;
diff --git a/windows/win.c b/windows/win.c index e6a5157..e86e017 100644 --- a/windows/win.c +++ b/windows/win.c
@@ -47,7 +47,7 @@ /* Desktop window */ static WND *pWndDesktop = NULL; -static HWND32 hwndSysModal = 0; +static HWND hwndSysModal = 0; static WORD wDragWidth = 4; static WORD wDragHeight= 3; @@ -119,7 +119,7 @@ * * Return a pointer to the WND structure corresponding to a HWND. */ -WND * WIN_FindWndPtr( HWND32 hwnd ) +WND * WIN_FindWndPtr( HWND hwnd ) { WND * ptr; @@ -176,7 +176,7 @@ * * Dump the content of a window structure to stderr. */ -void WIN_DumpWindow( HWND32 hwnd ) +void WIN_DumpWindow( HWND hwnd ) { WND *ptr; char className[80]; @@ -188,7 +188,7 @@ return; } - if (!GetClassName32A( hwnd, className, sizeof(className ) )) + if (!GetClassNameA( hwnd, className, sizeof(className ) )) strcpy( className, "#NULL#" ); TRACE( win, "Window %04x (%p):\n", hwnd, ptr ); @@ -200,7 +200,7 @@ ptr->next, ptr->child, ptr->parent, ptr->owner, ptr->class, className, ptr->hInstance, ptr->hmemTaskQ, ptr->hrgnUpdate, ptr->hwndLastActive, ptr->dce, ptr->wIDmenu, - ptr->dwStyle, ptr->dwExStyle, (UINT32)ptr->winproc, + ptr->dwStyle, ptr->dwExStyle, (UINT)ptr->winproc, ptr->text ? ptr->text : "", ptr->rectClient.left, ptr->rectClient.top, ptr->rectClient.right, ptr->rectClient.bottom, ptr->rectWindow.left, ptr->rectWindow.top, @@ -223,7 +223,7 @@ * * Walk the windows tree and print each window on stderr. */ -void WIN_WalkWindows( HWND32 hwnd, int indent ) +void WIN_WalkWindows( HWND hwnd, int indent ) { WND *ptr; char className[80]; @@ -248,7 +248,7 @@ DUMP( "%08lx %-6.4x %-17.17s %08x %08x %.14s\n", (DWORD)ptr, ptr->hmemTaskQ, className, - (UINT32)ptr->dwStyle, (UINT32)ptr->winproc, + (UINT)ptr->dwStyle, (UINT)ptr->winproc, ptr->text?ptr->text:"<null>"); if (ptr->child) WIN_WalkWindows( ptr->child->hwndSelf, indent+1 ); @@ -261,7 +261,7 @@ * * Remove a window from the siblings linked list. */ -BOOL32 WIN_UnlinkWindow( HWND32 hwnd ) +BOOL WIN_UnlinkWindow( HWND hwnd ) { WND *wndPtr, **ppWnd; @@ -280,7 +280,7 @@ * The window is inserted after the specified window, which can also * be specified as HWND_TOP or HWND_BOTTOM. */ -BOOL32 WIN_LinkWindow( HWND32 hwnd, HWND32 hwndInsertAfter ) +BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter ) { WND *wndPtr, **ppWnd; @@ -309,9 +309,9 @@ * * Find a window that needs repaint. */ -HWND32 WIN_FindWinToRepaint( HWND32 hwnd, HQUEUE16 hQueue ) +HWND WIN_FindWinToRepaint( HWND hwnd, HQUEUE16 hQueue ) { - HWND32 hwndRet; + HWND hwndRet; WND *pWnd = pWndDesktop; /* Note: the desktop window never gets WM_PAINT messages @@ -360,7 +360,7 @@ */ static WND* WIN_DestroyWindow( WND* wndPtr ) { - HWND32 hwnd = wndPtr->hwndSelf; + HWND hwnd = wndPtr->hwndSelf; WND *pWnd; TRACE(win, "%04x\n", wndPtr->hwndSelf ); @@ -375,12 +375,12 @@ while ((pWnd = wndPtr->child)) wndPtr->child = WIN_DestroyWindow( pWnd ); - SendMessage32A( wndPtr->hwndSelf, WM_NCDESTROY, 0, 0); + SendMessageA( wndPtr->hwndSelf, WM_NCDESTROY, 0, 0); /* FIXME: do we need to fake QS_MOUSEMOVE wakebit? */ WINPOS_CheckInternalPos( wndPtr ); - if( hwnd == GetCapture32()) ReleaseCapture(); + if( hwnd == GetCapture()) ReleaseCapture(); /* free resources associated with the window */ @@ -391,7 +391,7 @@ if ((wndPtr->hrgnUpdate) || (wndPtr->flags & WIN_INTERNAL_PAINT)) { - if (wndPtr->hrgnUpdate > 1) DeleteObject32( wndPtr->hrgnUpdate ); + if (wndPtr->hrgnUpdate > 1) DeleteObject( wndPtr->hrgnUpdate ); QUEUE_DecPaintCount( wndPtr->hmemTaskQ ); } @@ -399,8 +399,8 @@ if( wndPtr->hmemTaskQ ) { - BOOL32 bPostQuit = FALSE; - WPARAM32 wQuitParam = 0; + BOOL bPostQuit = FALSE; + WPARAM wQuitParam = 0; MESSAGEQUEUE* msgQ = (MESSAGEQUEUE*) QUEUE_Lock(wndPtr->hmemTaskQ); QMSG *qmsg; @@ -417,13 +417,13 @@ QUEUE_Unlock(msgQ); /* repost WM_QUIT to make sure this app exits its message loop */ - if( bPostQuit ) PostQuitMessage32(wQuitParam); + if( bPostQuit ) PostQuitMessage(wQuitParam); wndPtr->hmemTaskQ = 0; } if (!(wndPtr->dwStyle & WS_CHILD)) - if (wndPtr->wIDmenu) DestroyMenu32( (HMENU32)wndPtr->wIDmenu ); - if (wndPtr->hSysMenu) DestroyMenu32( wndPtr->hSysMenu ); + if (wndPtr->wIDmenu) DestroyMenu( (HMENU)wndPtr->wIDmenu ); + if (wndPtr->hSysMenu) DestroyMenu( wndPtr->hSysMenu ); wndPtr->pDriver->pDestroyWindow( wndPtr ); DCE_FreeWindowDCE( wndPtr ); /* Always do this to catch orphaned DCs */ WINPROC_FreeProc( wndPtr->winproc, WIN_PROC_WINDOW ); @@ -443,9 +443,9 @@ * Reset the queue of all the children of a given window. * Return TRUE if something was done. */ -BOOL32 WIN_ResetQueueWindows( WND* wnd, HQUEUE16 hQueue, HQUEUE16 hNew ) +BOOL WIN_ResetQueueWindows( WND* wnd, HQUEUE16 hQueue, HQUEUE16 hNew ) { - BOOL32 ret = FALSE; + BOOL ret = FALSE; if (hNew) /* Set a new queue */ { @@ -470,7 +470,7 @@ { if (tmp->hmemTaskQ == hQueue) { - DestroyWindow32( tmp->hwndSelf ); + DestroyWindow( tmp->hwndSelf ); ret = TRUE; break; } @@ -490,10 +490,10 @@ * * Create the desktop window. */ -BOOL32 WIN_CreateDesktopWindow(void) +BOOL WIN_CreateDesktopWindow(void) { CLASS *class; - HWND32 hwndDesktop; + HWND hwndDesktop; DESKTOP *pDesktop; TRACE(win,"Creating desktop window\n"); @@ -533,7 +533,7 @@ pWndDesktop->rectWindow.bottom = SYSMETRICS_CYSCREEN; pWndDesktop->rectClient = pWndDesktop->rectWindow; pWndDesktop->text = NULL; - pWndDesktop->hmemTaskQ = GetFastQueue(); + pWndDesktop->hmemTaskQ = GetFastQueue16(); pWndDesktop->hrgnUpdate = 0; pWndDesktop->hwndLastActive = hwndDesktop; pWndDesktop->dwStyle = WS_VISIBLE | WS_CLIPCHILDREN | @@ -554,7 +554,7 @@ if(!pWndDesktop->pDriver->pCreateDesktopWindow(pWndDesktop, class, FALSE)) return FALSE; - SendMessage32A( hwndDesktop, WM_NCCREATE, 0, 0 ); + SendMessageA( hwndDesktop, WM_NCCREATE, 0, 0 ); pWndDesktop->flags |= WIN_NEEDS_ERASEBKGND; return TRUE; } @@ -565,14 +565,14 @@ * * Implementation of CreateWindowEx(). */ -static HWND32 WIN_CreateWindowEx( CREATESTRUCT32A *cs, ATOM classAtom, - BOOL32 win32, BOOL32 unicode ) +static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom, + BOOL win32, BOOL unicode ) { CLASS *classPtr; WND *wndPtr; HWND16 hwnd, hwndLinkAfter; - POINT32 maxSize, maxPos, minTrack, maxTrack; - LRESULT (CALLBACK *localSend32)(HWND32, UINT32, WPARAM32, LPARAM); + POINT maxSize, maxPos, minTrack, maxTrack; + LRESULT (CALLBACK *localSend32)(HWND, UINT, WPARAM, LPARAM); TRACE(win, "%s %s %08lx %08lx %d,%d %dx%d %04x %04x %08x %p\n", unicode ? debugres_w((LPWSTR)cs->lpszName) : debugres_a(cs->lpszName), @@ -585,7 +585,7 @@ if (cs->hwndParent) { /* Make sure parent is valid */ - if (!IsWindow32( cs->hwndParent )) + if (!IsWindow( cs->hwndParent )) { WARN( win, "Bad parent %04x\n", cs->hwndParent ); return 0; @@ -599,16 +599,16 @@ if (!(classPtr = CLASS_FindClassByAtom( classAtom, win32?cs->hInstance:GetExePtr(cs->hInstance) ))) { char buffer[256]; - GlobalGetAtomName32A( classAtom, buffer, sizeof(buffer) ); + GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) ); WARN( win, "Bad class '%s'\n", buffer ); return 0; } /* Fix the coordinates */ - if (cs->x == CW_USEDEFAULT32) + if (cs->x == CW_USEDEFAULT) { - PDB32 *pdb = PROCESS_Current(); + PDB *pdb = PROCESS_Current(); if ( !(cs->style & (WS_CHILD | WS_POPUP)) && (pdb->env_db->startup_info->dwFlags & STARTF_USEPOSITION) ) { @@ -621,9 +621,9 @@ cs->y = 0; } } - if (cs->cx == CW_USEDEFAULT32) + if (cs->cx == CW_USEDEFAULT) { - PDB32 *pdb = PROCESS_Current(); + PDB *pdb = PROCESS_Current(); if ( !(cs->style & (WS_CHILD | WS_POPUP)) && (pdb->env_db->startup_info->dwFlags & STARTF_USESIZE) ) { @@ -675,7 +675,7 @@ wndPtr->hwndSelf = hwnd; wndPtr->hInstance = cs->hInstance; wndPtr->text = NULL; - wndPtr->hmemTaskQ = GetFastQueue(); + wndPtr->hmemTaskQ = GetFastQueue16(); wndPtr->hrgnUpdate = 0; wndPtr->hwndLastActive = hwnd; wndPtr->dwStyle = cs->style & ~WS_VISIBLE; @@ -699,13 +699,13 @@ if (HOOK_IsHooked( WH_CBT )) { - CBT_CREATEWND32A cbtc; + CBT_CREATEWNDA cbtc; LRESULT ret; cbtc.lpcs = cs; cbtc.hwndInsertAfter = hwndLinkAfter; - ret = unicode ? HOOK_CallHooks32W(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc) - : HOOK_CallHooks32A(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc); + ret = unicode ? HOOK_CallHooksW(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc) + : HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, hwnd, (LPARAM)&cbtc); if (ret) { TRACE(win, "CBT-hook returned 0\n"); @@ -769,7 +769,7 @@ if ((wndPtr->dwStyle & (WS_CAPTION | WS_CHILD)) == WS_CAPTION ) { - if (cs->hMenu) SetMenu32(hwnd, cs->hMenu); + if (cs->hMenu) SetMenu(hwnd, cs->hMenu); else { #if 0 /* FIXME: should check if classPtr->menuNameW can be used as is */ @@ -782,16 +782,16 @@ if (menuName) { if (HIWORD(cs->hInstance)) - cs->hMenu = LoadMenu32A(cs->hInstance,PTR_SEG_TO_LIN(menuName)); + cs->hMenu = LoadMenuA(cs->hInstance,PTR_SEG_TO_LIN(menuName)); else cs->hMenu = LoadMenu16(cs->hInstance,menuName); - if (cs->hMenu) SetMenu32( hwnd, cs->hMenu ); + if (cs->hMenu) SetMenu( hwnd, cs->hMenu ); } #endif } } - else wndPtr->wIDmenu = (UINT32)cs->hMenu; + else wndPtr->wIDmenu = (UINT)cs->hMenu; /* Send the WM_CREATE message * Perhaps we shouldn't allow width/height changes as well. @@ -800,7 +800,7 @@ maxPos.x = wndPtr->rectWindow.left; maxPos.y = wndPtr->rectWindow.top; - localSend32 = unicode ? SendMessage32W : SendMessage32A; + localSend32 = unicode ? SendMessageW : SendMessageA; if( (*localSend32)( hwnd, WM_NCCREATE, 0, (LPARAM)cs) ) { /* Insert the window in the linked list */ @@ -809,7 +809,7 @@ WINPOS_SendNCCalcSize( hwnd, FALSE, &wndPtr->rectWindow, NULL, NULL, 0, &wndPtr->rectClient ); - OffsetRect32(&wndPtr->rectWindow, maxPos.x - wndPtr->rectWindow.left, + OffsetRect(&wndPtr->rectWindow, maxPos.x - wndPtr->rectWindow.left, maxPos.y - wndPtr->rectWindow.top); if( ((*localSend32)( hwnd, WM_CREATE, 0, (LPARAM)cs )) != -1 ) { @@ -823,10 +823,10 @@ WARN(win,"sending bogus WM_SIZE message 0x%08lx\n", MAKELONG(wndPtr->rectClient.right-wndPtr->rectClient.left, wndPtr->rectClient.bottom-wndPtr->rectClient.top)); - SendMessage32A( hwnd, WM_SIZE, SIZE_RESTORED, + SendMessageA( hwnd, WM_SIZE, SIZE_RESTORED, MAKELONG(wndPtr->rectClient.right-wndPtr->rectClient.left, wndPtr->rectClient.bottom-wndPtr->rectClient.top)); - SendMessage32A( hwnd, WM_MOVE, 0, + SendMessageA( hwnd, WM_MOVE, 0, MAKELONG( wndPtr->rectClient.left, wndPtr->rectClient.top ) ); } @@ -839,10 +839,10 @@ UINT16 swFlag = (wndPtr->dwStyle & WS_MINIMIZE) ? SW_MINIMIZE : SW_MAXIMIZE; wndPtr->dwStyle &= ~(WS_MAXIMIZE | WS_MINIMIZE); WINPOS_MinMaximize( wndPtr, swFlag, &newPos ); - swFlag = ((wndPtr->dwStyle & WS_CHILD) || GetActiveWindow32()) + swFlag = ((wndPtr->dwStyle & WS_CHILD) || GetActiveWindow()) ? SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED : SWP_NOZORDER | SWP_FRAMECHANGED; - SetWindowPos32( hwnd, 0, newPos.left, newPos.top, + SetWindowPos( hwnd, 0, newPos.left, newPos.top, newPos.right, newPos.bottom, swFlag ); } @@ -850,12 +850,12 @@ { /* Notify the parent window only */ - SendMessage32A( wndPtr->parent->hwndSelf, WM_PARENTNOTIFY, + SendMessageA( wndPtr->parent->hwndSelf, WM_PARENTNOTIFY, MAKEWPARAM(WM_CREATE, wndPtr->wIDmenu), (LPARAM)hwnd ); - if( !IsWindow32(hwnd) ) return 0; + if( !IsWindow(hwnd) ) return 0; } - if (cs->style & WS_VISIBLE) ShowWindow32( hwnd, SW_SHOW ); + if (cs->style & WS_VISIBLE) ShowWindow( hwnd, SW_SHOW ); /* Call WH_SHELL hook */ @@ -899,11 +899,11 @@ HINSTANCE16 instance, LPVOID data ) { ATOM classAtom; - CREATESTRUCT32A cs; + CREATESTRUCTA cs; /* Find the class atom */ - if (!(classAtom = GlobalFindAtom32A( className ))) + if (!(classAtom = GlobalFindAtomA( className ))) { fprintf( stderr, "CreateWindowEx16: bad class name " ); if (!HIWORD(className)) fprintf( stderr, "%04x\n", LOWORD(className) ); @@ -913,17 +913,17 @@ /* Fix the coordinates */ - cs.x = (x == CW_USEDEFAULT16) ? CW_USEDEFAULT32 : (INT32)x; - cs.y = (y == CW_USEDEFAULT16) ? CW_USEDEFAULT32 : (INT32)y; - cs.cx = (width == CW_USEDEFAULT16) ? CW_USEDEFAULT32 : (INT32)width; - cs.cy = (height == CW_USEDEFAULT16) ? CW_USEDEFAULT32 : (INT32)height; + cs.x = (x == CW_USEDEFAULT16) ? CW_USEDEFAULT : (INT)x; + cs.y = (y == CW_USEDEFAULT16) ? CW_USEDEFAULT : (INT)y; + cs.cx = (width == CW_USEDEFAULT16) ? CW_USEDEFAULT : (INT)width; + cs.cy = (height == CW_USEDEFAULT16) ? CW_USEDEFAULT : (INT)height; /* Create the window */ cs.lpCreateParams = data; - cs.hInstance = (HINSTANCE32)instance; - cs.hMenu = (HMENU32)menu; - cs.hwndParent = (HWND32)parent; + cs.hInstance = (HINSTANCE)instance; + cs.hMenu = (HMENU)menu; + cs.hwndParent = (HWND)parent; cs.style = style; cs.lpszName = windowName; cs.lpszClass = className; @@ -935,20 +935,20 @@ /*********************************************************************** * CreateWindowEx32A (USER32.83) */ -HWND32 WINAPI CreateWindowEx32A( DWORD exStyle, LPCSTR className, - LPCSTR windowName, DWORD style, INT32 x, - INT32 y, INT32 width, INT32 height, - HWND32 parent, HMENU32 menu, - HINSTANCE32 instance, LPVOID data ) +HWND WINAPI CreateWindowExA( DWORD exStyle, LPCSTR className, + LPCSTR windowName, DWORD style, INT x, + INT y, INT width, INT height, + HWND parent, HMENU menu, + HINSTANCE instance, LPVOID data ) { ATOM classAtom; - CREATESTRUCT32A cs; + CREATESTRUCTA cs; if(exStyle & WS_EX_MDICHILD) - return MDI_CreateMDIWindow32A(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data); + return MDI_CreateMDIWindowA(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data); /* Find the class atom */ - if (!(classAtom = GlobalFindAtom32A( className ))) + if (!(classAtom = GlobalFindAtomA( className ))) { fprintf( stderr, "CreateWindowEx32A: bad class name " ); if (!HIWORD(className)) fprintf( stderr, "%04x\n", LOWORD(className) ); @@ -977,21 +977,21 @@ /*********************************************************************** * CreateWindowEx32W (USER32.84) */ -HWND32 WINAPI CreateWindowEx32W( DWORD exStyle, LPCWSTR className, - LPCWSTR windowName, DWORD style, INT32 x, - INT32 y, INT32 width, INT32 height, - HWND32 parent, HMENU32 menu, - HINSTANCE32 instance, LPVOID data ) +HWND WINAPI CreateWindowExW( DWORD exStyle, LPCWSTR className, + LPCWSTR windowName, DWORD style, INT x, + INT y, INT width, INT height, + HWND parent, HMENU menu, + HINSTANCE instance, LPVOID data ) { ATOM classAtom; - CREATESTRUCT32W cs; + CREATESTRUCTW cs; if(exStyle & WS_EX_MDICHILD) - return MDI_CreateMDIWindow32W(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data); + return MDI_CreateMDIWindowW(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data); /* Find the class atom */ - if (!(classAtom = GlobalFindAtom32W( className ))) + if (!(classAtom = GlobalFindAtomW( className ))) { if (HIWORD(className)) { @@ -1020,7 +1020,7 @@ cs.dwExStyle = exStyle; /* Note: we rely on the fact that CREATESTRUCT32A and */ /* CREATESTRUCT32W have the same layout. */ - return WIN_CreateWindowEx( (CREATESTRUCT32A *)&cs, classAtom, TRUE, TRUE ); + return WIN_CreateWindowEx( (CREATESTRUCTA *)&cs, classAtom, TRUE, TRUE ); } @@ -1040,12 +1040,12 @@ { WIN_CheckFocus(pWnd); - if( CARET_GetHwnd() == pWnd->hwndSelf ) DestroyCaret32(); + if( CARET_GetHwnd() == pWnd->hwndSelf ) DestroyCaret(); CLIPBOARD_GetDriver()->pResetOwner( pWnd, TRUE ); - SendMessage32A( pWnd->hwndSelf, WM_DESTROY, 0, 0); + SendMessageA( pWnd->hwndSelf, WM_DESTROY, 0, 0); - if( IsWindow32(pWnd->hwndSelf) ) + if( IsWindow(pWnd->hwndSelf) ) { WND* pChild = pWnd->child; while( pChild ) @@ -1065,14 +1065,14 @@ */ BOOL16 WINAPI DestroyWindow16( HWND16 hwnd ) { - return DestroyWindow32(hwnd); + return DestroyWindow(hwnd); } /*********************************************************************** * DestroyWindow32 (USER32.135) */ -BOOL32 WINAPI DestroyWindow32( HWND32 hwnd ) +BOOL WINAPI DestroyWindow( HWND hwnd ) { WND * wndPtr; @@ -1098,9 +1098,9 @@ if( wndPtr->dwStyle & WS_CHILD && !(wndPtr->dwExStyle & WS_EX_NOPARENTNOTIFY) ) { /* Notify the parent window only */ - SendMessage32A( wndPtr->parent->hwndSelf, WM_PARENTNOTIFY, + SendMessageA( wndPtr->parent->hwndSelf, WM_PARENTNOTIFY, MAKEWPARAM(WM_DESTROY, wndPtr->wIDmenu), (LPARAM)hwnd ); - if( !IsWindow32(hwnd) ) return TRUE; + if( !IsWindow(hwnd) ) return TRUE; } CLIPBOARD_GetDriver()->pResetOwner( wndPtr, FALSE ); /* before the window is unmapped */ @@ -1109,10 +1109,10 @@ if (wndPtr->dwStyle & WS_VISIBLE) { - SetWindowPos32( hwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW | + SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW | SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE| ((QUEUE_IsExitingQueue(wndPtr->hmemTaskQ))?SWP_DEFERERASE:0) ); - if (!IsWindow32(hwnd)) return TRUE; + if (!IsWindow(hwnd)) return TRUE; } /* Recursively destroy owned windows */ @@ -1136,7 +1136,7 @@ } siblingPtr = siblingPtr->next; } - if (siblingPtr) DestroyWindow32( siblingPtr->hwndSelf ); + if (siblingPtr) DestroyWindow( siblingPtr->hwndSelf ); else break; } @@ -1151,7 +1151,7 @@ /* Send destroy messages */ WIN_SendDestroyMsg( wndPtr ); - if (!IsWindow32(hwnd)) return TRUE; + if (!IsWindow(hwnd)) return TRUE; /* Unlink now so we won't bother with the children later on */ @@ -1169,18 +1169,18 @@ */ BOOL16 WINAPI CloseWindow16( HWND16 hwnd ) { - return CloseWindow32( hwnd ); + return CloseWindow( hwnd ); } /*********************************************************************** * CloseWindow32 (USER32.56) */ -BOOL32 WINAPI CloseWindow32( HWND32 hwnd ) +BOOL WINAPI CloseWindow( HWND hwnd ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr || (wndPtr->dwStyle & WS_CHILD)) return FALSE; - ShowWindow32( hwnd, SW_MINIMIZE ); + ShowWindow( hwnd, SW_MINIMIZE ); return TRUE; } @@ -1190,17 +1190,17 @@ */ BOOL16 WINAPI OpenIcon16( HWND16 hwnd ) { - return OpenIcon32( hwnd ); + return OpenIcon( hwnd ); } /*********************************************************************** * OpenIcon32 (USER32.410) */ -BOOL32 WINAPI OpenIcon32( HWND32 hwnd ) +BOOL WINAPI OpenIcon( HWND hwnd ) { - if (!IsIconic32( hwnd )) return FALSE; - ShowWindow32( hwnd, SW_SHOWNORMAL ); + if (!IsIconic( hwnd )) return FALSE; + ShowWindow( hwnd, SW_SHOWNORMAL ); return TRUE; } @@ -1210,7 +1210,7 @@ * * Implementation of FindWindow() and FindWindowEx(). */ -static HWND32 WIN_FindWindow( HWND32 parent, HWND32 child, ATOM className, +static HWND WIN_FindWindow( HWND parent, HWND child, ATOM className, LPCSTR title ) { WND *pWnd; @@ -1298,9 +1298,9 @@ /*********************************************************************** * FindWindow32A (USER32.198) */ -HWND32 WINAPI FindWindow32A( LPCSTR className, LPCSTR title ) +HWND WINAPI FindWindowA( LPCSTR className, LPCSTR title ) { - HWND32 ret = FindWindowEx32A( 0, 0, className, title ); + HWND ret = FindWindowExA( 0, 0, className, title ); if (!ret) SetLastError (ERROR_CANNOT_FIND_WND_CLASS); return ret; } @@ -1309,7 +1309,7 @@ /*********************************************************************** * FindWindowEx32A (USER32.199) */ -HWND32 WINAPI FindWindowEx32A( HWND32 parent, HWND32 child, +HWND WINAPI FindWindowExA( HWND parent, HWND child, LPCSTR className, LPCSTR title ) { ATOM atom = 0; @@ -1318,7 +1318,7 @@ { /* If the atom doesn't exist, then no class */ /* with this name exists either. */ - if (!(atom = GlobalFindAtom32A( className ))) + if (!(atom = GlobalFindAtomA( className ))) { SetLastError (ERROR_CANNOT_FIND_WND_CLASS); return 0; @@ -1331,18 +1331,18 @@ /*********************************************************************** * FindWindowEx32W (USER32.200) */ -HWND32 WINAPI FindWindowEx32W( HWND32 parent, HWND32 child, +HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR title ) { ATOM atom = 0; char *buffer; - HWND32 hwnd; + HWND hwnd; if (className) { /* If the atom doesn't exist, then no class */ /* with this name exists either. */ - if (!(atom = GlobalFindAtom32W( className ))) + if (!(atom = GlobalFindAtomW( className ))) { SetLastError (ERROR_CANNOT_FIND_WND_CLASS); return 0; @@ -1358,9 +1358,9 @@ /*********************************************************************** * FindWindow32W (USER32.201) */ -HWND32 WINAPI FindWindow32W( LPCWSTR className, LPCWSTR title ) +HWND WINAPI FindWindowW( LPCWSTR className, LPCWSTR title ) { - return FindWindowEx32W( 0, 0, className, title ); + return FindWindowExW( 0, 0, className, title ); } @@ -1385,7 +1385,7 @@ /********************************************************************** * GetDesktopWindow32 (USER32.232) */ -HWND32 WINAPI GetDesktopWindow32(void) +HWND WINAPI GetDesktopWindow(void) { return pWndDesktop->hwndSelf; } @@ -1397,7 +1397,7 @@ * Exactly the same thing as GetDesktopWindow(), but not documented. * Don't ask me why... */ -HWND16 WINAPI GetDesktopHwnd(void) +HWND16 WINAPI GetDesktopHwnd16(void) { return (HWND16)pWndDesktop->hwndSelf; } @@ -1408,14 +1408,14 @@ */ BOOL16 WINAPI EnableWindow16( HWND16 hwnd, BOOL16 enable ) { - return EnableWindow32( hwnd, enable ); + return EnableWindow( hwnd, enable ); } /******************************************************************* * EnableWindow32 (USER32.172) */ -BOOL32 WINAPI EnableWindow32( HWND32 hwnd, BOOL32 enable ) +BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable ) { WND *wndPtr; @@ -1426,22 +1426,22 @@ { /* Enable window */ wndPtr->dwStyle &= ~WS_DISABLED; - SendMessage32A( hwnd, WM_ENABLE, TRUE, 0 ); + SendMessageA( hwnd, WM_ENABLE, TRUE, 0 ); return TRUE; } else if (!enable && !(wndPtr->dwStyle & WS_DISABLED)) { /* Disable window */ wndPtr->dwStyle |= WS_DISABLED; - if ((hwnd == GetFocus32()) || IsChild32( hwnd, GetFocus32() )) + if ((hwnd == GetFocus()) || IsChild( hwnd, GetFocus() )) { - SetFocus32( 0 ); /* A disabled window can't have the focus */ + SetFocus( 0 ); /* A disabled window can't have the focus */ } - if ((hwnd == GetCapture32()) || IsChild32( hwnd, GetCapture32() )) + if ((hwnd == GetCapture()) || IsChild( hwnd, GetCapture() )) { ReleaseCapture(); /* A disabled window can't capture the mouse */ } - SendMessage32A( hwnd, WM_ENABLE, FALSE, 0 ); + SendMessageA( hwnd, WM_ENABLE, FALSE, 0 ); return FALSE; } return ((wndPtr->dwStyle & WS_DISABLED) != 0); @@ -1453,14 +1453,14 @@ */ BOOL16 WINAPI IsWindowEnabled16(HWND16 hWnd) { - return IsWindowEnabled32(hWnd); + return IsWindowEnabled(hWnd); } /*********************************************************************** * IsWindowEnabled32 (USER32.349) */ -BOOL32 WINAPI IsWindowEnabled32(HWND32 hWnd) +BOOL WINAPI IsWindowEnabled(HWND hWnd) { WND * wndPtr; @@ -1472,7 +1472,7 @@ /*********************************************************************** * IsWindowUnicode (USER32.350) */ -BOOL32 WINAPI IsWindowUnicode( HWND32 hwnd ) +BOOL WINAPI IsWindowUnicode( HWND hwnd ) { WND * wndPtr; @@ -1486,14 +1486,14 @@ */ WORD WINAPI GetWindowWord16( HWND16 hwnd, INT16 offset ) { - return GetWindowWord32( hwnd, offset ); + return GetWindowWord( hwnd, offset ); } /********************************************************************** * GetWindowWord32 (USER32.314) */ -WORD WINAPI GetWindowWord32( HWND32 hwnd, INT32 offset ) +WORD WINAPI GetWindowWord( HWND hwnd, INT offset ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return 0; @@ -1514,7 +1514,7 @@ wndPtr->wIDmenu); return (WORD)wndPtr->wIDmenu; case GWW_HWNDPARENT: - return GetParent32( hwnd ); + return GetParent( hwnd ); case GWW_HINSTANCE: if (HIWORD(wndPtr->hInstance)) WARN(win,"GWW_HINSTANCE: discards high bits of 0x%08x!\n", @@ -1530,10 +1530,10 @@ /********************************************************************** * WIN_GetWindowInstance */ -HINSTANCE32 WIN_GetWindowInstance( HWND32 hwnd ) +HINSTANCE WIN_GetWindowInstance( HWND hwnd ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); - if (!wndPtr) return (HINSTANCE32)0; + if (!wndPtr) return (HINSTANCE)0; return wndPtr->hInstance; } @@ -1543,14 +1543,14 @@ */ WORD WINAPI SetWindowWord16( HWND16 hwnd, INT16 offset, WORD newval ) { - return SetWindowWord32( hwnd, offset, newval ); + return SetWindowWord( hwnd, offset, newval ); } /********************************************************************** * SetWindowWord32 (USER32.524) */ -WORD WINAPI SetWindowWord32( HWND32 hwnd, INT32 offset, WORD newval ) +WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval ) { WORD *ptr, retval; WND * wndPtr = WIN_FindWndPtr( hwnd ); @@ -1568,7 +1568,7 @@ { case GWW_ID: ptr = (WORD *)&wndPtr->wIDmenu; break; case GWW_HINSTANCE: ptr = (WORD *)&wndPtr->hInstance; break; - case GWW_HWNDPARENT: return SetParent32( hwnd, newval ); + case GWW_HWNDPARENT: return SetParent( hwnd, newval ); default: WARN( win, "Invalid offset %d\n", offset ); return 0; @@ -1584,7 +1584,7 @@ * * Helper function for GetWindowLong(). */ -static LONG WIN_GetWindowLong( HWND32 hwnd, INT32 offset, WINDOWPROCTYPE type ) +static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type ) { LONG retval; WND * wndPtr = WIN_FindWndPtr( hwnd ); @@ -1610,7 +1610,7 @@ case GWL_ID: return (LONG)wndPtr->wIDmenu; case GWL_WNDPROC: return (LONG)WINPROC_GetProc( wndPtr->winproc, type ); - case GWL_HWNDPARENT: return GetParent32(hwnd); + case GWL_HWNDPARENT: return GetParent(hwnd); case GWL_HINSTANCE: return wndPtr->hInstance; default: WARN( win, "Unknown offset %d\n", offset ); @@ -1630,7 +1630,7 @@ * FIXME: The error values for SetLastError may not be right. Can * someone check with the real thing? */ -static LONG WIN_SetWindowLong( HWND32 hwnd, INT32 offset, LONG newval, +static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval, WINDOWPROCTYPE type ) { LONG *ptr, retval; @@ -1673,7 +1673,7 @@ ptr = (DWORD*)&wndPtr->wIDmenu; break; case GWL_HINSTANCE: - return SetWindowWord32( hwnd, offset, newval ); + return SetWindowWord( hwnd, offset, newval ); case GWL_WNDPROC: retval = (LONG)WINPROC_GetProc( wndPtr->winproc, type ); WINPROC_SetProc( &wndPtr->winproc, (WNDPROC16)newval, @@ -1685,10 +1685,10 @@ style.styleNew = newval | (style.styleOld & (WS_VISIBLE | WS_CHILD)); if (wndPtr->flags & WIN_ISWIN32) - SendMessage32A(hwnd,WM_STYLECHANGING,GWL_STYLE,(LPARAM)&style); + SendMessageA(hwnd,WM_STYLECHANGING,GWL_STYLE,(LPARAM)&style); wndPtr->dwStyle = style.styleNew; if (wndPtr->flags & WIN_ISWIN32) - SendMessage32A(hwnd,WM_STYLECHANGED,GWL_STYLE,(LPARAM)&style); + SendMessageA(hwnd,WM_STYLECHANGED,GWL_STYLE,(LPARAM)&style); return style.styleOld; case GWL_USERDATA: @@ -1698,10 +1698,10 @@ style.styleOld = wndPtr->dwExStyle; style.styleNew = newval; if (wndPtr->flags & WIN_ISWIN32) - SendMessage32A(hwnd,WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&style); + SendMessageA(hwnd,WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&style); wndPtr->dwExStyle = newval; if (wndPtr->flags & WIN_ISWIN32) - SendMessage32A(hwnd,WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&style); + SendMessageA(hwnd,WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&style); return style.styleOld; default: @@ -1723,14 +1723,14 @@ */ LONG WINAPI GetWindowLong16( HWND16 hwnd, INT16 offset ) { - return WIN_GetWindowLong( (HWND32)hwnd, offset, WIN_PROC_16 ); + return WIN_GetWindowLong( (HWND)hwnd, offset, WIN_PROC_16 ); } /********************************************************************** * GetWindowLong32A (USER32.305) */ -LONG WINAPI GetWindowLong32A( HWND32 hwnd, INT32 offset ) +LONG WINAPI GetWindowLongA( HWND hwnd, INT offset ) { return WIN_GetWindowLong( hwnd, offset, WIN_PROC_32A ); } @@ -1739,7 +1739,7 @@ /********************************************************************** * GetWindowLong32W (USER32.306) */ -LONG WINAPI GetWindowLong32W( HWND32 hwnd, INT32 offset ) +LONG WINAPI GetWindowLongW( HWND hwnd, INT offset ) { return WIN_GetWindowLong( hwnd, offset, WIN_PROC_32W ); } @@ -1757,7 +1757,7 @@ /********************************************************************** * SetWindowLong32A (USER32.517) */ -LONG WINAPI SetWindowLong32A( HWND32 hwnd, INT32 offset, LONG newval ) +LONG WINAPI SetWindowLongA( HWND hwnd, INT offset, LONG newval ) { return WIN_SetWindowLong( hwnd, offset, newval, WIN_PROC_32A ); } @@ -1838,9 +1838,9 @@ * ECMA-234, Win32 * */ -LONG WINAPI SetWindowLong32W( - HWND32 hwnd, /* window to alter */ - INT32 offset, /* offset, in bytes, of location to alter */ +LONG WINAPI SetWindowLongW( + HWND hwnd, /* window to alter */ + INT offset, /* offset, in bytes, of location to alter */ LONG newval /* new value of location */ ) { return WIN_SetWindowLong( hwnd, offset, newval, WIN_PROC_32W ); @@ -1859,28 +1859,28 @@ /******************************************************************* * GetWindowText32A (USER32.309) */ -INT32 WINAPI GetWindowText32A( HWND32 hwnd, LPSTR lpString, INT32 nMaxCount ) +INT WINAPI GetWindowTextA( HWND hwnd, LPSTR lpString, INT nMaxCount ) { - return (INT32)SendMessage32A( hwnd, WM_GETTEXT, nMaxCount, + return (INT)SendMessageA( hwnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); } /******************************************************************* * InternalGetWindowText (USER32.326) */ -INT32 WINAPI InternalGetWindowText(HWND32 hwnd,LPWSTR lpString,INT32 nMaxCount ) +INT WINAPI InternalGetWindowText(HWND hwnd,LPWSTR lpString,INT nMaxCount ) { FIXME(win,"(0x%08x,%p,0x%x),stub!\n",hwnd,lpString,nMaxCount); - return GetWindowText32W(hwnd,lpString,nMaxCount); + return GetWindowTextW(hwnd,lpString,nMaxCount); } /******************************************************************* * GetWindowText32W (USER32.312) */ -INT32 WINAPI GetWindowText32W( HWND32 hwnd, LPWSTR lpString, INT32 nMaxCount ) +INT WINAPI GetWindowTextW( HWND hwnd, LPWSTR lpString, INT nMaxCount ) { - return (INT32)SendMessage32W( hwnd, WM_GETTEXT, nMaxCount, + return (INT)SendMessageW( hwnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); } @@ -1897,18 +1897,18 @@ /******************************************************************* * SetWindowText32A (USER32.521) */ -BOOL32 WINAPI SetWindowText32A( HWND32 hwnd, LPCSTR lpString ) +BOOL WINAPI SetWindowTextA( HWND hwnd, LPCSTR lpString ) { - return (BOOL32)SendMessage32A( hwnd, WM_SETTEXT, 0, (LPARAM)lpString ); + return (BOOL)SendMessageA( hwnd, WM_SETTEXT, 0, (LPARAM)lpString ); } /******************************************************************* * SetWindowText32W (USER32.523) */ -BOOL32 WINAPI SetWindowText32W( HWND32 hwnd, LPCWSTR lpString ) +BOOL WINAPI SetWindowTextW( HWND hwnd, LPCWSTR lpString ) { - return (BOOL32)SendMessage32W( hwnd, WM_SETTEXT, 0, (LPARAM)lpString ); + return (BOOL)SendMessageW( hwnd, WM_SETTEXT, 0, (LPARAM)lpString ); } @@ -1924,17 +1924,17 @@ /******************************************************************* * GetWindowTextLength32A (USER32.310) */ -INT32 WINAPI GetWindowTextLength32A( HWND32 hwnd ) +INT WINAPI GetWindowTextLengthA( HWND hwnd ) { - return SendMessage32A( hwnd, WM_GETTEXTLENGTH, 0, 0 ); + return SendMessageA( hwnd, WM_GETTEXTLENGTH, 0, 0 ); } /******************************************************************* * GetWindowTextLength32W (USER32.311) */ -INT32 WINAPI GetWindowTextLength32W( HWND32 hwnd ) +INT WINAPI GetWindowTextLengthW( HWND hwnd ) { - return SendMessage32W( hwnd, WM_GETTEXTLENGTH, 0, 0 ); + return SendMessageW( hwnd, WM_GETTEXTLENGTH, 0, 0 ); } @@ -1943,7 +1943,7 @@ */ BOOL16 WINAPI IsWindow16( HWND16 hwnd ) { - return IsWindow32( hwnd ); + return IsWindow( hwnd ); } void WINAPI WIN16_IsWindow16( CONTEXT *context ) @@ -1951,7 +1951,7 @@ WORD *stack = PTR_SEG_OFF_TO_LIN(SS_reg(context), SP_reg(context)); HWND16 hwnd = (HWND16)stack[2]; - AX_reg(context) = IsWindow32( hwnd ); + AX_reg(context) = IsWindow( hwnd ); ES_reg(context) = USER_HeapSel; } @@ -1959,7 +1959,7 @@ /******************************************************************* * IsWindow32 (USER32.348) */ -BOOL32 WINAPI IsWindow32( HWND32 hwnd ) +BOOL WINAPI IsWindow( HWND hwnd ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); return ((wndPtr != NULL) && (wndPtr->dwMagic == WND_MAGIC)); @@ -1971,14 +1971,14 @@ */ HWND16 WINAPI GetParent16( HWND16 hwnd ) { - return (HWND16)GetParent32( hwnd ); + return (HWND16)GetParent( hwnd ); } /***************************************************************** * GetParent32 (USER32.278) */ -HWND32 WINAPI GetParent32( HWND32 hwnd ) +HWND WINAPI GetParent( HWND hwnd ) { WND *wndPtr = WIN_FindWndPtr(hwnd); if ((!wndPtr) || (!(wndPtr->dwStyle & (WS_POPUP|WS_CHILD)))) return 0; @@ -2002,7 +2002,7 @@ * * Get the top-level parent for a child window. */ -HWND32 WIN_GetTopParent( HWND32 hwnd ) +HWND WIN_GetTopParent( HWND hwnd ) { WND *wndPtr = WIN_GetTopParentPtr ( WIN_FindWndPtr( hwnd ) ); return wndPtr ? wndPtr->hwndSelf : 0; @@ -2014,14 +2014,14 @@ */ HWND16 WINAPI SetParent16( HWND16 hwndChild, HWND16 hwndNewParent ) { - return SetParent32( hwndChild, hwndNewParent ); + return SetParent( hwndChild, hwndNewParent ); } /***************************************************************** * SetParent32 (USER32.495) */ -HWND32 WINAPI SetParent32( HWND32 hwndChild, HWND32 hwndNewParent ) +HWND WINAPI SetParent( HWND hwndChild, HWND hwndNewParent ) { WND *wndPtr = WIN_FindWndPtr( hwndChild ); DWORD dwStyle = (wndPtr)?(wndPtr->dwStyle):0; @@ -2032,7 +2032,7 @@ /* Windows hides the window first, then shows it again * including the WM_SHOWWINDOW messages and all */ if (dwStyle & WS_VISIBLE) - ShowWindow32( hwndChild, SW_HIDE ); + ShowWindow( hwndChild, SW_HIDE ); pWndOldParent = (wndPtr)?(*wndPtr->pDriver->pSetParent)(wndPtr, pWndNewParent):NULL; @@ -2040,7 +2040,7 @@ in the x-order and send the expected WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED notification messages. */ - SetWindowPos32( hwndChild, HWND_TOPMOST, 0, 0, 0, 0, + SetWindowPos( hwndChild, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|((dwStyle & WS_VISIBLE)?SWP_SHOWWINDOW:0)); /* FIXME: a WM_MOVE is also generated (in the DefWindowProc handler * for WM_WINDOWPOSCHANGED) in Windows, should probably remove SWP_NOMOVE */ @@ -2053,14 +2053,14 @@ */ BOOL16 WINAPI IsChild16( HWND16 parent, HWND16 child ) { - return IsChild32(parent,child); + return IsChild(parent,child); } /******************************************************************* * IsChild32 (USER32.339) */ -BOOL32 WINAPI IsChild32( HWND32 parent, HWND32 child ) +BOOL WINAPI IsChild( HWND parent, HWND child ) { WND * wndPtr = WIN_FindWndPtr( child ); while (wndPtr && (wndPtr->dwStyle & WS_CHILD)) @@ -2077,14 +2077,14 @@ */ BOOL16 WINAPI IsWindowVisible16( HWND16 hwnd ) { - return IsWindowVisible32(hwnd); + return IsWindowVisible(hwnd); } /*********************************************************************** * IsWindowVisible32 (USER32.351) */ -BOOL32 WINAPI IsWindowVisible32( HWND32 hwnd ) +BOOL WINAPI IsWindowVisible( HWND hwnd ) { WND *wndPtr = WIN_FindWndPtr( hwnd ); while (wndPtr && (wndPtr->dwStyle & WS_CHILD)) @@ -2103,7 +2103,7 @@ * minimized, and it is itself not minimized unless we are * trying to draw its default class icon. */ -BOOL32 WIN_IsWindowDrawable( WND* wnd, BOOL32 icon ) +BOOL WIN_IsWindowDrawable( WND* wnd, BOOL icon ) { if( (wnd->dwStyle & WS_MINIMIZE && icon && wnd->class->hIcon) || @@ -2120,14 +2120,14 @@ */ HWND16 WINAPI GetTopWindow16( HWND16 hwnd ) { - return GetTopWindow32(hwnd); + return GetTopWindow(hwnd); } /******************************************************************* * GetTopWindow32 (USER.229) */ -HWND32 WINAPI GetTopWindow32( HWND32 hwnd ) +HWND WINAPI GetTopWindow( HWND hwnd ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); if (wndPtr && wndPtr->child) return wndPtr->child->hwndSelf; @@ -2140,14 +2140,14 @@ */ HWND16 WINAPI GetWindow16( HWND16 hwnd, WORD rel ) { - return GetWindow32( hwnd,rel ); + return GetWindow( hwnd,rel ); } /******************************************************************* * GetWindow32 (USER32.302) */ -HWND32 WINAPI GetWindow32( HWND32 hwnd, WORD rel ) +HWND WINAPI GetWindow( HWND hwnd, WORD rel ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return 0; @@ -2201,21 +2201,21 @@ */ void WINAPI ShowOwnedPopups16( HWND16 owner, BOOL16 fShow ) { - ShowOwnedPopups32( owner, fShow ); + ShowOwnedPopups( owner, fShow ); } /******************************************************************* * ShowOwnedPopups32 (USER32.531) */ -BOOL32 WINAPI ShowOwnedPopups32( HWND32 owner, BOOL32 fShow ) +BOOL WINAPI ShowOwnedPopups( HWND owner, BOOL fShow ) { WND *pWnd = pWndDesktop->child; while (pWnd) { if (pWnd->owner && (pWnd->owner->hwndSelf == owner) && (pWnd->dwStyle & WS_POPUP)) - ShowWindow32( pWnd->hwndSelf, fShow ? SW_SHOW : SW_HIDE ); + ShowWindow( pWnd->hwndSelf, fShow ? SW_SHOW : SW_HIDE ); pWnd = pWnd->next; } return TRUE; @@ -2227,13 +2227,13 @@ */ HWND16 WINAPI GetLastActivePopup16( HWND16 hwnd ) { - return GetLastActivePopup32( hwnd ); + return GetLastActivePopup( hwnd ); } /******************************************************************* * GetLastActivePopup32 (USER32.256) */ -HWND32 WINAPI GetLastActivePopup32( HWND32 hwnd ) +HWND WINAPI GetLastActivePopup( HWND hwnd ) { WND *wndPtr; wndPtr = WIN_FindWndPtr(hwnd); @@ -2249,11 +2249,11 @@ * The array must be freed with HeapFree(SystemHeap). Return NULL * when no windows are found. */ -WND **WIN_BuildWinArray( WND *wndPtr, UINT32 bwaFlags, UINT32* pTotal ) +WND **WIN_BuildWinArray( WND *wndPtr, UINT bwaFlags, UINT* pTotal ) { WND **list, **ppWnd; WND *pWnd; - UINT32 count, skipOwned, skipHidden; + UINT count, skipOwned, skipHidden; DWORD skipFlags; skipHidden = bwaFlags & BWA_SKIPHIDDEN; @@ -2313,7 +2313,7 @@ for (ppWnd = list; *ppWnd; ppWnd++) { /* Make sure that the window still exists */ - if (!IsWindow32((*ppWnd)->hwndSelf)) continue; + if (!IsWindow((*ppWnd)->hwndSelf)) continue; if (!lpEnumFunc( (*ppWnd)->hwndSelf, lParam )) break; } HeapFree( SystemHeap, 0, list ); @@ -2324,9 +2324,9 @@ /******************************************************************* * EnumWindows32 (USER32.193) */ -BOOL32 WINAPI EnumWindows32( WNDENUMPROC32 lpEnumFunc, LPARAM lParam ) +BOOL WINAPI EnumWindows( WNDENUMPROC lpEnumFunc, LPARAM lParam ) { - return (BOOL32)EnumWindows16( (WNDENUMPROC16)lpEnumFunc, lParam ); + return (BOOL)EnumWindows16( (WNDENUMPROC16)lpEnumFunc, lParam ); } @@ -2348,7 +2348,7 @@ for (ppWnd = list; *ppWnd; ppWnd++) { /* Make sure that the window still exists */ - if (!IsWindow32((*ppWnd)->hwndSelf)) continue; + if (!IsWindow((*ppWnd)->hwndSelf)) continue; if (QUEUE_GetQueueTask((*ppWnd)->hmemTaskQ) != hTask) continue; if (!func( (*ppWnd)->hwndSelf, lParam )) break; } @@ -2360,7 +2360,7 @@ /********************************************************************** * EnumThreadWindows (USER32.190) */ -BOOL32 WINAPI EnumThreadWindows( DWORD id, WNDENUMPROC32 func, LPARAM lParam ) +BOOL WINAPI EnumThreadWindows( DWORD id, WNDENUMPROC func, LPARAM lParam ) { THDB *tdb = THREAD_ID_TO_THDB(id); @@ -2382,7 +2382,7 @@ for ( ; *ppWnd; ppWnd++) { /* Make sure that the window still exists */ - if (!IsWindow32((*ppWnd)->hwndSelf)) continue; + if (!IsWindow((*ppWnd)->hwndSelf)) continue; /* Build children list first */ childList = WIN_BuildWinArray( *ppWnd, BWA_SKIPOWNED, NULL ); ret = func( (*ppWnd)->hwndSelf, lParam ); @@ -2416,10 +2416,10 @@ /********************************************************************** * EnumChildWindows32 (USER32.178) */ -BOOL32 WINAPI EnumChildWindows32( HWND32 parent, WNDENUMPROC32 func, +BOOL WINAPI EnumChildWindows( HWND parent, WNDENUMPROC func, LPARAM lParam ) { - return (BOOL32)EnumChildWindows16( (HWND16)parent, (WNDENUMPROC16)func, + return (BOOL)EnumChildWindows16( (HWND16)parent, (WNDENUMPROC16)func, lParam ); } @@ -2429,14 +2429,14 @@ */ BOOL16 WINAPI AnyPopup16(void) { - return AnyPopup32(); + return AnyPopup(); } /******************************************************************* * AnyPopup32 (USER32.4) */ -BOOL32 WINAPI AnyPopup32(void) +BOOL WINAPI AnyPopup(void) { WND *wndPtr; for (wndPtr = pWndDesktop->child; wndPtr; wndPtr = wndPtr->next) @@ -2450,14 +2450,14 @@ */ BOOL16 WINAPI FlashWindow16( HWND16 hWnd, BOOL16 bInvert ) { - return FlashWindow32( hWnd, bInvert ); + return FlashWindow( hWnd, bInvert ); } /******************************************************************* * FlashWindow32 (USER32.202) */ -BOOL32 WINAPI FlashWindow32( HWND32 hWnd, BOOL32 bInvert ) +BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert ) { WND *wndPtr = WIN_FindWndPtr(hWnd); @@ -2469,12 +2469,12 @@ { if (bInvert && !(wndPtr->flags & WIN_NCACTIVATED)) { - HDC32 hDC = GetDC32(hWnd); + HDC hDC = GetDC(hWnd); if (!SendMessage16( hWnd, WM_ERASEBKGND, (WPARAM16)hDC, 0 )) wndPtr->flags |= WIN_NEEDS_ERASEBKGND; - ReleaseDC32( hWnd, hDC ); + ReleaseDC( hWnd, hDC ); wndPtr->flags |= WIN_NCACTIVATED; } else @@ -2489,7 +2489,7 @@ { WPARAM16 wparam; if (bInvert) wparam = !(wndPtr->flags & WIN_NCACTIVATED); - else wparam = (hWnd == GetActiveWindow32()); + else wparam = (hWnd == GetActiveWindow()); SendMessage16( hWnd, WM_NCACTIVATE, wparam, (LPARAM)0 ); return wparam; @@ -2502,7 +2502,7 @@ */ HWND16 WINAPI SetSysModalWindow16( HWND16 hWnd ) { - HWND32 hWndOldModal = hwndSysModal; + HWND hWndOldModal = hwndSysModal; hwndSysModal = hWnd; FIXME(win, "EMPTY STUB !! SetSysModalWindow(%04x) !\n", hWnd); return hWndOldModal; @@ -2521,7 +2521,7 @@ /******************************************************************* * GetWindowContextHelpId (USER32.303) */ -DWORD WINAPI GetWindowContextHelpId( HWND32 hwnd ) +DWORD WINAPI GetWindowContextHelpId( HWND hwnd ) { WND *wnd = WIN_FindWndPtr( hwnd ); if (!wnd) return 0; @@ -2532,7 +2532,7 @@ /******************************************************************* * SetWindowContextHelpId (USER32.515) */ -BOOL32 WINAPI SetWindowContextHelpId( HWND32 hwnd, DWORD id ) +BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id ) { WND *wnd = WIN_FindWndPtr( hwnd ); if (!wnd) return FALSE; @@ -2547,21 +2547,21 @@ * recursively find a child that contains spDragInfo->pt point * and send WM_QUERYDROPOBJECT */ -BOOL16 DRAG_QueryUpdate( HWND32 hQueryWnd, SEGPTR spDragInfo, BOOL32 bNoSend ) +BOOL16 DRAG_QueryUpdate( HWND hQueryWnd, SEGPTR spDragInfo, BOOL bNoSend ) { BOOL16 wParam,bResult = 0; - POINT32 pt; + POINT pt; LPDRAGINFO ptrDragInfo = (LPDRAGINFO) PTR_SEG_TO_LIN(spDragInfo); WND *ptrQueryWnd = WIN_FindWndPtr(hQueryWnd),*ptrWnd; - RECT32 tempRect; + RECT tempRect; if( !ptrQueryWnd || !ptrDragInfo ) return 0; CONV_POINT16TO32( &ptrDragInfo->pt, &pt ); - GetWindowRect32(hQueryWnd,&tempRect); + GetWindowRect(hQueryWnd,&tempRect); - if( !PtInRect32(&tempRect,pt) || + if( !PtInRect(&tempRect,pt) || (ptrQueryWnd->dwStyle & WS_DISABLED) ) return 0; @@ -2569,18 +2569,18 @@ { tempRect = ptrQueryWnd->rectClient; if(ptrQueryWnd->dwStyle & WS_CHILD) - MapWindowPoints32( ptrQueryWnd->parent->hwndSelf, 0, - (LPPOINT32)&tempRect, 2 ); + MapWindowPoints( ptrQueryWnd->parent->hwndSelf, 0, + (LPPOINT)&tempRect, 2 ); - if (PtInRect32( &tempRect, pt)) + if (PtInRect( &tempRect, pt)) { wParam = 0; for (ptrWnd = ptrQueryWnd->child; ptrWnd ;ptrWnd = ptrWnd->next) if( ptrWnd->dwStyle & WS_VISIBLE ) { - GetWindowRect32( ptrWnd->hwndSelf, &tempRect ); - if (PtInRect32( &tempRect, pt )) break; + GetWindowRect( ptrWnd->hwndSelf, &tempRect ); + if (PtInRect( &tempRect, pt )) break; } if(ptrWnd) @@ -2618,15 +2618,15 @@ */ BOOL16 WINAPI DragDetect16( HWND16 hWnd, POINT16 pt ) { - POINT32 pt32; + POINT pt32; CONV_POINT16TO32( &pt, &pt32 ); - return DragDetect32( hWnd, pt32 ); + return DragDetect( hWnd, pt32 ); } /******************************************************************* * DragDetect32 (USER32.151) */ -BOOL32 WINAPI DragDetect32( HWND32 hWnd, POINT32 pt ) +BOOL WINAPI DragDetect( HWND hWnd, POINT pt ) { MSG16 msg; RECT16 rect; @@ -2637,7 +2637,7 @@ rect.top = pt.y - wDragHeight; rect.bottom = pt.y + wDragHeight; - SetCapture32(hWnd); + SetCapture(hWnd); while(1) { @@ -2701,7 +2701,7 @@ if( hDragCursor == hCursor ) hDragCursor = 0; else hCursor = hDragCursor; - hOldCursor = SetCursor32(hDragCursor); + hOldCursor = SetCursor(hDragCursor); } lpDragInfo->hWnd = hWnd; @@ -2711,8 +2711,8 @@ lpDragInfo->hOfStruct = hOfStruct; lpDragInfo->l = 0L; - SetCapture32(hWnd); - ShowCursor32( TRUE ); + SetCapture(hWnd); + ShowCursor( TRUE ); do { @@ -2734,7 +2734,7 @@ lpDragInfo->hScope = 0; } if( hCurrentCursor ) - SetCursor32(hCurrentCursor); + SetCursor(hCurrentCursor); /* send WM_DRAGLOOP */ SendMessage16( hWnd, WM_DRAGLOOP, (WPARAM16)(hCurrentCursor != hBummer), @@ -2757,12 +2757,12 @@ } while( msg.message != WM_LBUTTONUP && msg.message != WM_NCLBUTTONUP ); ReleaseCapture(); - ShowCursor32( FALSE ); + ShowCursor( FALSE ); if( hCursor ) { - SetCursor32( hOldCursor ); - if (hDragCursor) DestroyCursor32( hDragCursor ); + SetCursor( hOldCursor ); + if (hDragCursor) DestroyCursor( hDragCursor ); } if( hCurrentCursor != hBummer )
diff --git a/windows/winhelp.c b/windows/winhelp.c index c8ac998..991ac5f 100644 --- a/windows/winhelp.c +++ b/windows/winhelp.c
@@ -19,7 +19,7 @@ BOOL16 WINAPI WinHelp16( HWND16 hWnd, LPCSTR lpHelpFile, UINT16 wCommand, DWORD dwData ) { - return WinHelp32A( hWnd, lpHelpFile, wCommand, + return WinHelpA( hWnd, lpHelpFile, wCommand, (DWORD)PTR_SEG_TO_LIN(dwData) ); } @@ -27,17 +27,17 @@ /********************************************************************** * WinHelp32A (USER32.579) */ -BOOL32 WINAPI WinHelp32A( HWND32 hWnd, LPCSTR lpHelpFile, UINT32 wCommand, +BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand, DWORD dwData ) { static WORD WM_WINHELP = 0; - HWND32 hDest; + HWND hDest; LPWINHELP lpwh; HGLOBAL16 hwh; int size,dsize,nlen; if (wCommand != HELP_QUIT) /* FIXME */ { - if (WinExec32("winhelp.exe -x",SW_SHOWNORMAL) <= 32) + if (WinExec("winhelp.exe -x",SW_SHOWNORMAL) <= 32) return FALSE; /* NOTE: Probably, this should be directed yield, @@ -47,12 +47,12 @@ if(!WM_WINHELP) { - WM_WINHELP=RegisterWindowMessage32A("WM_WINHELP"); + WM_WINHELP=RegisterWindowMessageA("WM_WINHELP"); if(!WM_WINHELP) return FALSE; } - hDest = FindWindow32A( "MS_WINHELP", NULL ); + hDest = FindWindowA( "MS_WINHELP", NULL ); if(!hDest) { if(wCommand == HELP_QUIT) @@ -115,11 +115,11 @@ /********************************************************************** * WinHelp32W (USER32.580) */ -BOOL32 WINAPI WinHelp32W( HWND32 hWnd, LPCWSTR helpFile, UINT32 command, +BOOL WINAPI WinHelpW( HWND hWnd, LPCWSTR helpFile, UINT command, DWORD dwData ) { LPSTR file = HEAP_strdupWtoA( GetProcessHeap(), 0, helpFile ); - BOOL32 ret = WinHelp32A( hWnd, file, command, dwData ); + BOOL ret = WinHelpA( hWnd, file, command, dwData ); HeapFree( GetProcessHeap(), 0, file ); return ret; }
diff --git a/windows/winpos.c b/windows/winpos.c index 7a4ff6a..590cf21 100644 --- a/windows/winpos.c +++ b/windows/winpos.c
@@ -53,8 +53,8 @@ /* ----- internal variables ----- */ -static HWND32 hwndPrevActive = 0; /* Previously active window */ -static HWND32 hGlobalShellWindow=0; /*the shell*/ +static HWND hwndPrevActive = 0; /* Previously active window */ +static HWND hGlobalShellWindow=0; /*the shell*/ static LPCSTR atomInternalPos; @@ -63,10 +63,10 @@ /*********************************************************************** * WINPOS_CreateInternalPosAtom */ -BOOL32 WINPOS_CreateInternalPosAtom() +BOOL WINPOS_CreateInternalPosAtom() { LPSTR str = "SysIP"; - atomInternalPos = (LPCSTR)(DWORD)GlobalAddAtom32A(str); + atomInternalPos = (LPCSTR)(DWORD)GlobalAddAtomA(str); return (atomInternalPos) ? TRUE : FALSE; } @@ -79,9 +79,9 @@ { LPINTERNALPOS lpPos; MESSAGEQUEUE *pMsgQ = 0; - HWND32 hwnd = wndPtr->hwndSelf; + HWND hwnd = wndPtr->hwndSelf; - lpPos = (LPINTERNALPOS) GetProp32A( hwnd, atomInternalPos ); + lpPos = (LPINTERNALPOS) GetPropA( hwnd, atomInternalPos ); /* Retrieve the message queue associated with this window */ pMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( wndPtr->hmemTaskQ ); @@ -101,8 +101,8 @@ if( lpPos ) { - if( IsWindow32(lpPos->hwndIconTitle) ) - DestroyWindow32( lpPos->hwndIconTitle ); + if( IsWindow(lpPos->hwndIconTitle) ) + DestroyWindow( lpPos->hwndIconTitle ); HeapFree( SystemHeap, 0, lpPos ); } @@ -164,33 +164,33 @@ */ UINT16 WINAPI ArrangeIconicWindows16( HWND16 parent) { - return ArrangeIconicWindows32(parent); + return ArrangeIconicWindows(parent); } /*********************************************************************** * ArrangeIconicWindows32 (USER32.7) */ -UINT32 WINAPI ArrangeIconicWindows32( HWND32 parent ) +UINT WINAPI ArrangeIconicWindows( HWND parent ) { - RECT32 rectParent; - HWND32 hwndChild; - INT32 x, y, xspacing, yspacing; + RECT rectParent; + HWND hwndChild; + INT x, y, xspacing, yspacing; - GetClientRect32( parent, &rectParent ); + GetClientRect( parent, &rectParent ); x = rectParent.left; y = rectParent.bottom; xspacing = SYSMETRICS_CXICONSPACING; yspacing = SYSMETRICS_CYICONSPACING; - hwndChild = GetWindow32( parent, GW_CHILD ); + hwndChild = GetWindow( parent, GW_CHILD ); while (hwndChild) { - if( IsIconic32( hwndChild ) ) + if( IsIconic( hwndChild ) ) { WINPOS_ShowIconTitle( WIN_FindWndPtr(hwndChild), FALSE ); - SetWindowPos32( hwndChild, 0, x + (xspacing - SYSMETRICS_CXICON) / 2, + SetWindowPos( hwndChild, 0, x + (xspacing - SYSMETRICS_CXICON) / 2, y - yspacing - SYSMETRICS_CYICON/2, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); - if( IsWindow32(hwndChild) ) + if( IsWindow(hwndChild) ) WINPOS_ShowIconTitle( WIN_FindWndPtr(hwndChild), TRUE ); if (x <= rectParent.right - xspacing) x += xspacing; else @@ -199,7 +199,7 @@ y -= yspacing; } } - hwndChild = GetWindow32( hwndChild, GW_HWNDNEXT ); + hwndChild = GetWindow( hwndChild, GW_HWNDNEXT ); } return yspacing; } @@ -210,16 +210,16 @@ */ void WINAPI SwitchToThisWindow16( HWND16 hwnd, BOOL16 restore ) { - SwitchToThisWindow32( hwnd, restore ); + SwitchToThisWindow( hwnd, restore ); } /*********************************************************************** * SwitchToThisWindow32 (USER32.539) */ -void WINAPI SwitchToThisWindow32( HWND32 hwnd, BOOL32 restore ) +void WINAPI SwitchToThisWindow( HWND hwnd, BOOL restore ) { - ShowWindow32( hwnd, restore ? SW_RESTORE : SW_SHOWMINIMIZED ); + ShowWindow( hwnd, restore ? SW_RESTORE : SW_SHOWMINIMIZED ); } @@ -240,14 +240,14 @@ /*********************************************************************** * GetWindowRect32 (USER32.308) */ -BOOL32 WINAPI GetWindowRect32( HWND32 hwnd, LPRECT32 rect ) +BOOL WINAPI GetWindowRect( HWND hwnd, LPRECT rect ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return FALSE; *rect = wndPtr->rectWindow; if (wndPtr->dwStyle & WS_CHILD) - MapWindowPoints32( wndPtr->parent->hwndSelf, 0, (POINT32 *)rect, 2 ); + MapWindowPoints( wndPtr->parent->hwndSelf, 0, (POINT *)rect, 2 ); return TRUE; } @@ -255,10 +255,10 @@ /*********************************************************************** * GetWindowRgn32 */ -BOOL32 WINAPI GetWindowRgn32 ( HWND32 hwnd, HRGN32 hrgn ) +BOOL WINAPI GetWindowRgn ( HWND hwnd, HRGN hrgn ) { - RECT32 rect; + RECT rect; WND * wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return (ERROR); @@ -266,11 +266,11 @@ memset (&rect, 0, sizeof(rect)); - GetWindowRect32 ( hwnd, &rect ); + GetWindowRect ( hwnd, &rect ); FIXME (win, "Check whether a valid region here\n"); - SetRectRgn32 ( hrgn, rect.left, rect.top, rect.right, rect.bottom ); + SetRectRgn ( hrgn, rect.left, rect.top, rect.right, rect.bottom ); return (SIMPLEREGION); } @@ -278,7 +278,7 @@ /*********************************************************************** * SetWindowRgn32 */ -INT32 WINAPI SetWindowRgn32( HWND32 hwnd, HRGN32 hrgn,BOOL32 bRedraw) +INT WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn,BOOL bRedraw) { @@ -317,7 +317,7 @@ /*********************************************************************** * GetClientRect32 (USER32.220) */ -BOOL32 WINAPI GetClientRect32( HWND32 hwnd, LPRECT32 rect ) +BOOL WINAPI GetClientRect( HWND hwnd, LPRECT rect ) { WND * wndPtr = WIN_FindWndPtr( hwnd ); @@ -341,9 +341,9 @@ /******************************************************************* * ClientToScreen32 (USER32.52) */ -BOOL32 WINAPI ClientToScreen32( HWND32 hwnd, LPPOINT32 lppnt ) +BOOL WINAPI ClientToScreen( HWND hwnd, LPPOINT lppnt ) { - MapWindowPoints32( hwnd, 0, lppnt, 1 ); + MapWindowPoints( hwnd, 0, lppnt, 1 ); return TRUE; } @@ -360,9 +360,9 @@ /******************************************************************* * ScreenToClient32 (USER32.447) */ -BOOL32 WINAPI ScreenToClient32( HWND32 hwnd, LPPOINT32 lppnt ) +BOOL WINAPI ScreenToClient( HWND hwnd, LPPOINT lppnt ) { - MapWindowPoints32( 0, hwnd, lppnt, 1 ); + MapWindowPoints( 0, hwnd, lppnt, 1 ); return TRUE; } @@ -429,7 +429,7 @@ if (!*ppWnd) *ppWnd = wndScope; /* Send the WM_NCHITTEST message (only if to the same task) */ - if ((*ppWnd)->hmemTaskQ == GetFastQueue()) + if ((*ppWnd)->hmemTaskQ == GetFastQueue16()) { hittest = (INT16)SendMessage16( (*ppWnd)->hwndSelf, WM_NCHITTEST, 0, MAKELONG( pt.x, pt.y ) ); @@ -465,13 +465,13 @@ /******************************************************************* * WindowFromPoint32 (USER32.582) */ -HWND32 WINAPI WindowFromPoint32( POINT32 pt ) +HWND WINAPI WindowFromPoint( POINT pt ) { WND *pWnd; POINT16 pt16; CONV_POINT32TO16( &pt, &pt16 ); WINPOS_WindowFromPoint( WIN_GetDesktop(), pt16, &pWnd ); - return (HWND32)pWnd->hwndSelf; + return (HWND)pWnd->hwndSelf; } @@ -480,21 +480,21 @@ */ HWND16 WINAPI ChildWindowFromPoint16( HWND16 hwndParent, POINT16 pt ) { - POINT32 pt32; + POINT pt32; CONV_POINT16TO32( &pt, &pt32 ); - return (HWND16)ChildWindowFromPoint32( hwndParent, pt32 ); + return (HWND16)ChildWindowFromPoint( hwndParent, pt32 ); } /******************************************************************* * ChildWindowFromPoint32 (USER32.49) */ -HWND32 WINAPI ChildWindowFromPoint32( HWND32 hwndParent, POINT32 pt ) +HWND WINAPI ChildWindowFromPoint( HWND hwndParent, POINT pt ) { /* pt is in the client coordinates */ WND* wnd = WIN_FindWndPtr(hwndParent); - RECT32 rect; + RECT rect; if( !wnd ) return 0; @@ -503,12 +503,12 @@ rect.right = wnd->rectClient.right - wnd->rectClient.left; rect.bottom = wnd->rectClient.bottom - wnd->rectClient.top; - if (!PtInRect32( &rect, pt )) return 0; + if (!PtInRect( &rect, pt )) return 0; wnd = wnd->child; while ( wnd ) { - if (PtInRect32( &wnd->rectWindow, pt )) return wnd->hwndSelf; + if (PtInRect( &wnd->rectWindow, pt )) return wnd->hwndSelf; wnd = wnd->next; } return hwndParent; @@ -519,22 +519,22 @@ */ HWND16 WINAPI ChildWindowFromPointEx16( HWND16 hwndParent, POINT16 pt, UINT16 uFlags) { - POINT32 pt32; + POINT pt32; CONV_POINT16TO32( &pt, &pt32 ); - return (HWND16)ChildWindowFromPointEx32( hwndParent, pt32, uFlags ); + return (HWND16)ChildWindowFromPointEx( hwndParent, pt32, uFlags ); } /******************************************************************* * ChildWindowFromPointEx32 (USER32.50) */ -HWND32 WINAPI ChildWindowFromPointEx32( HWND32 hwndParent, POINT32 pt, - UINT32 uFlags) +HWND WINAPI ChildWindowFromPointEx( HWND hwndParent, POINT pt, + UINT uFlags) { /* pt is in the client coordinates */ WND* wnd = WIN_FindWndPtr(hwndParent); - RECT32 rect; + RECT rect; if( !wnd ) return 0; @@ -543,12 +543,12 @@ rect.right = wnd->rectClient.right - wnd->rectClient.left; rect.bottom = wnd->rectClient.bottom - wnd->rectClient.top; - if (!PtInRect32( &rect, pt )) return 0; + if (!PtInRect( &rect, pt )) return 0; wnd = wnd->child; while ( wnd ) { - if (PtInRect32( &wnd->rectWindow, pt )) { + if (PtInRect( &wnd->rectWindow, pt )) { if ( (uFlags & CWP_SKIPINVISIBLE) && !(wnd->dwStyle & WS_VISIBLE) ) wnd = wnd->next; @@ -572,8 +572,8 @@ * Calculate the offset between the origin of the two windows. Used * to implement MapWindowPoints. */ -static void WINPOS_GetWinOffset( HWND32 hwndFrom, HWND32 hwndTo, - POINT32 *offset ) +static void WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, + POINT *offset ) { WND * wndPtr; @@ -620,7 +620,7 @@ void WINAPI MapWindowPoints16( HWND16 hwndFrom, HWND16 hwndTo, LPPOINT16 lppt, UINT16 count ) { - POINT32 offset; + POINT offset; WINPOS_GetWinOffset( hwndFrom, hwndTo, &offset ); while (count--) @@ -635,10 +635,10 @@ /******************************************************************* * MapWindowPoints32 (USER32.386) */ -INT32 WINAPI MapWindowPoints32( HWND32 hwndFrom, HWND32 hwndTo, - LPPOINT32 lppt, UINT32 count ) +INT WINAPI MapWindowPoints( HWND hwndFrom, HWND hwndTo, + LPPOINT lppt, UINT count ) { - POINT32 offset; + POINT offset; WINPOS_GetWinOffset( hwndFrom, hwndTo, &offset ); while (count--) @@ -656,14 +656,14 @@ */ BOOL16 WINAPI IsIconic16(HWND16 hWnd) { - return IsIconic32(hWnd); + return IsIconic(hWnd); } /*********************************************************************** * IsIconic32 (USER32.345) */ -BOOL32 WINAPI IsIconic32(HWND32 hWnd) +BOOL WINAPI IsIconic(HWND hWnd) { WND * wndPtr = WIN_FindWndPtr(hWnd); if (wndPtr == NULL) return FALSE; @@ -676,14 +676,14 @@ */ BOOL16 WINAPI IsZoomed16(HWND16 hWnd) { - return IsZoomed32(hWnd); + return IsZoomed(hWnd); } /*********************************************************************** * IsZoomed (USER32.352) */ -BOOL32 WINAPI IsZoomed32(HWND32 hWnd) +BOOL WINAPI IsZoomed(HWND hWnd) { WND * wndPtr = WIN_FindWndPtr(hWnd); if (wndPtr == NULL) return FALSE; @@ -696,19 +696,19 @@ */ HWND16 WINAPI GetActiveWindow16(void) { - return (HWND16)GetActiveWindow32(); + return (HWND16)GetActiveWindow(); } /******************************************************************* * GetActiveWindow (USER32.205) */ -HWND32 WINAPI GetActiveWindow32(void) +HWND WINAPI GetActiveWindow(void) { MESSAGEQUEUE *pCurMsgQ = 0; - HWND32 hwndActive = 0; + HWND hwndActive = 0; /* Get the messageQ for the current thread */ - if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) + if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) { WARN( win, "\tCurrent message queue not found. Exiting!\n" ); return 0; @@ -725,7 +725,7 @@ /******************************************************************* * WINPOS_CanActivate */ -static BOOL32 WINPOS_CanActivate(WND* pWnd) +static BOOL WINPOS_CanActivate(WND* pWnd) { if( pWnd && ((pWnd->dwStyle & (WS_DISABLED | WS_VISIBLE | WS_CHILD)) == WS_VISIBLE) ) return TRUE; @@ -738,23 +738,23 @@ */ HWND16 WINAPI SetActiveWindow16( HWND16 hwnd ) { - return SetActiveWindow32(hwnd); + return SetActiveWindow(hwnd); } /******************************************************************* * SetActiveWindow32 (USER32.463) */ -HWND32 WINAPI SetActiveWindow32( HWND32 hwnd ) +HWND WINAPI SetActiveWindow( HWND hwnd ) { - HWND32 prev = 0; + HWND prev = 0; WND *wndPtr = WIN_FindWndPtr( hwnd ); MESSAGEQUEUE *pMsgQ = 0, *pCurMsgQ = 0; if ( !WINPOS_CanActivate(wndPtr) ) return 0; /* Get the messageQ for the current thread */ - if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue() ))) + if (!(pCurMsgQ = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() ))) { WARN( win, "\tCurrent message queue not found. Exiting!\n" ); goto CLEANUP; @@ -795,7 +795,7 @@ */ HWND16 WINAPI GetForegroundWindow16(void) { - return (HWND16)GetForegroundWindow32(); + return (HWND16)GetForegroundWindow(); } @@ -804,25 +804,25 @@ */ BOOL16 WINAPI SetForegroundWindow16( HWND16 hwnd ) { - return SetForegroundWindow32( hwnd ); + return SetForegroundWindow( hwnd ); } /******************************************************************* * GetForegroundWindow32 (USER32.241) */ -HWND32 WINAPI GetForegroundWindow32(void) +HWND WINAPI GetForegroundWindow(void) { - return GetActiveWindow32(); + return GetActiveWindow(); } /******************************************************************* * SetForegroundWindow32 (USER32.482) */ -BOOL32 WINAPI SetForegroundWindow32( HWND32 hwnd ) +BOOL WINAPI SetForegroundWindow( HWND hwnd ) { - SetActiveWindow32( hwnd ); + SetActiveWindow( hwnd ); return TRUE; } @@ -832,13 +832,13 @@ */ HWND16 WINAPI GetShellWindow16(void) { - return GetShellWindow32(); + return GetShellWindow(); } /******************************************************************* * SetShellWindow32 (USER32.504) */ -HWND32 WINAPI SetShellWindow32(HWND32 hwndshell) +HWND WINAPI SetShellWindow(HWND hwndshell) { WARN(win, "(hWnd=%08x) semi stub\n",hwndshell ); hGlobalShellWindow = hwndshell; @@ -849,7 +849,7 @@ /******************************************************************* * GetShellWindow32 (USER32.287) */ -HWND32 WINAPI GetShellWindow32(void) +HWND WINAPI GetShellWindow(void) { WARN(win, "(hWnd=%x) semi stub\n",hGlobalShellWindow ); return hGlobalShellWindow; @@ -861,16 +861,16 @@ */ BOOL16 WINAPI BringWindowToTop16( HWND16 hwnd ) { - return BringWindowToTop32(hwnd); + return BringWindowToTop(hwnd); } /*********************************************************************** * BringWindowToTop32 (USER32.11) */ -BOOL32 WINAPI BringWindowToTop32( HWND32 hwnd ) +BOOL WINAPI BringWindowToTop( HWND hwnd ) { - return SetWindowPos32( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE ); + return SetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE ); } @@ -880,30 +880,30 @@ BOOL16 WINAPI MoveWindow16( HWND16 hwnd, INT16 x, INT16 y, INT16 cx, INT16 cy, BOOL16 repaint ) { - return MoveWindow32(hwnd,x,y,cx,cy,repaint); + return MoveWindow(hwnd,x,y,cx,cy,repaint); } /*********************************************************************** * MoveWindow32 (USER32.399) */ -BOOL32 WINAPI MoveWindow32( HWND32 hwnd, INT32 x, INT32 y, INT32 cx, INT32 cy, - BOOL32 repaint ) +BOOL WINAPI MoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, + BOOL repaint ) { int flags = SWP_NOZORDER | SWP_NOACTIVATE; if (!repaint) flags |= SWP_NOREDRAW; TRACE(win, "%04x %d,%d %dx%d %d\n", hwnd, x, y, cx, cy, repaint ); - return SetWindowPos32( hwnd, 0, x, y, cx, cy, flags ); + return SetWindowPos( hwnd, 0, x, y, cx, cy, flags ); } /*********************************************************************** * WINPOS_InitInternalPos */ -static LPINTERNALPOS WINPOS_InitInternalPos( WND* wnd, POINT32 pt, - LPRECT32 restoreRect ) +static LPINTERNALPOS WINPOS_InitInternalPos( WND* wnd, POINT pt, + LPRECT restoreRect ) { - LPINTERNALPOS lpPos = (LPINTERNALPOS) GetProp32A( wnd->hwndSelf, + LPINTERNALPOS lpPos = (LPINTERNALPOS) GetPropA( wnd->hwndSelf, atomInternalPos ); if( !lpPos ) { @@ -913,10 +913,10 @@ lpPos = HeapAlloc( SystemHeap, 0, sizeof(INTERNALPOS) ); if( !lpPos ) return NULL; - SetProp32A( wnd->hwndSelf, atomInternalPos, (HANDLE32)lpPos ); + SetPropA( wnd->hwndSelf, atomInternalPos, (HANDLE)lpPos ); lpPos->hwndIconTitle = 0; /* defer until needs to be shown */ CONV_RECT32TO16( &wnd->rectWindow, &lpPos->rectNormal ); - *(UINT32*)&lpPos->ptIconPos = *(UINT32*)&lpPos->ptMaxPos = 0xFFFFFFFF; + *(UINT*)&lpPos->ptIconPos = *(UINT*)&lpPos->ptMaxPos = 0xFFFFFFFF; } if( wnd->dwStyle & WS_MINIMIZE ) @@ -932,15 +932,15 @@ /*********************************************************************** * WINPOS_RedrawIconTitle */ -BOOL32 WINPOS_RedrawIconTitle( HWND32 hWnd ) +BOOL WINPOS_RedrawIconTitle( HWND hWnd ) { - LPINTERNALPOS lpPos = (LPINTERNALPOS)GetProp32A( hWnd, atomInternalPos ); + LPINTERNALPOS lpPos = (LPINTERNALPOS)GetPropA( hWnd, atomInternalPos ); if( lpPos ) { if( lpPos->hwndIconTitle ) { - SendMessage32A( lpPos->hwndIconTitle, WM_SHOWWINDOW, TRUE, 0); - InvalidateRect32( lpPos->hwndIconTitle, NULL, TRUE ); + SendMessageA( lpPos->hwndIconTitle, WM_SHOWWINDOW, TRUE, 0); + InvalidateRect( lpPos->hwndIconTitle, NULL, TRUE ); return TRUE; } } @@ -950,9 +950,9 @@ /*********************************************************************** * WINPOS_ShowIconTitle */ -BOOL32 WINPOS_ShowIconTitle( WND* pWnd, BOOL32 bShow ) +BOOL WINPOS_ShowIconTitle( WND* pWnd, BOOL bShow ) { - LPINTERNALPOS lpPos = (LPINTERNALPOS)GetProp32A( pWnd->hwndSelf, atomInternalPos ); + LPINTERNALPOS lpPos = (LPINTERNALPOS)GetPropA( pWnd->hwndSelf, atomInternalPos ); if( lpPos && !(pWnd->flags & WIN_MANAGED)) { @@ -968,12 +968,12 @@ if( !(pWnd->dwStyle & WS_VISIBLE) ) { - SendMessage32A( hWnd, WM_SHOWWINDOW, TRUE, 0 ); - SetWindowPos32( hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | + SendMessageA( hWnd, WM_SHOWWINDOW, TRUE, 0 ); + SetWindowPos( hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW ); } } - else ShowWindow32( hWnd, SW_HIDE ); + else ShowWindow( hWnd, SW_HIDE ); } return FALSE; } @@ -983,12 +983,12 @@ * * Get the minimized and maximized information for a window. */ -void WINPOS_GetMinMaxInfo( WND *wndPtr, POINT32 *maxSize, POINT32 *maxPos, - POINT32 *minTrack, POINT32 *maxTrack ) +void WINPOS_GetMinMaxInfo( WND *wndPtr, POINT *maxSize, POINT *maxPos, + POINT *minTrack, POINT *maxTrack ) { LPINTERNALPOS lpPos; - MINMAXINFO32 MinMax; - INT32 xinc, yinc; + MINMAXINFO MinMax; + INT xinc, yinc; /* Compute default values */ @@ -1022,7 +1022,7 @@ MinMax.ptMaxSize.x += 2 * xinc; MinMax.ptMaxSize.y += 2 * yinc; - lpPos = (LPINTERNALPOS)GetProp32A( wndPtr->hwndSelf, atomInternalPos ); + lpPos = (LPINTERNALPOS)GetPropA( wndPtr->hwndSelf, atomInternalPos ); if( lpPos && !EMPTYPOINT(lpPos->ptMaxPos) ) CONV_POINT16TO32( &lpPos->ptMaxPos, &MinMax.ptMaxPosition ); else @@ -1031,7 +1031,7 @@ MinMax.ptMaxPosition.y = -yinc; } - SendMessage32A( wndPtr->hwndSelf, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax ); + SendMessageA( wndPtr->hwndSelf, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax ); /* Some sanity checks */ @@ -1061,8 +1061,8 @@ UINT16 WINPOS_MinMaximize( WND* wndPtr, UINT16 cmd, LPRECT16 lpRect ) { UINT16 swpFlags = 0; - POINT32 pt; - POINT32 size = { wndPtr->rectWindow.left, wndPtr->rectWindow.top }; + POINT pt; + POINT size = { wndPtr->rectWindow.left, wndPtr->rectWindow.top }; LPINTERNALPOS lpPos = WINPOS_InitInternalPos( wndPtr, size, &wndPtr->rectWindow ); @@ -1072,7 +1072,7 @@ { if( wndPtr->dwStyle & WS_MINIMIZE ) { - if( !SendMessage32A( wndPtr->hwndSelf, WM_QUERYOPEN, 0, 0L ) ) + if( !SendMessageA( wndPtr->hwndSelf, WM_QUERYOPEN, 0, 0L ) ) return (SWP_NOSIZE | SWP_NOMOVE); swpFlags |= SWP_NOCOPYBITS; } @@ -1149,10 +1149,10 @@ * doesn't wait; returns immediately. * used by threads to toggle windows in other (possibly hanging) threads */ -BOOL32 WINAPI ShowWindowAsync32( HWND32 hwnd, INT32 cmd ) +BOOL WINAPI ShowWindowAsync( HWND hwnd, INT cmd ) { /* FIXME: does ShowWindow32() return immediately ? */ - return ShowWindow32(hwnd, cmd); + return ShowWindow(hwnd, cmd); } @@ -1161,17 +1161,17 @@ */ BOOL16 WINAPI ShowWindow16( HWND16 hwnd, INT16 cmd ) { - return ShowWindow32(hwnd,cmd); + return ShowWindow(hwnd,cmd); } /*********************************************************************** * ShowWindow32 (USER32.534) */ -BOOL32 WINAPI ShowWindow32( HWND32 hwnd, INT32 cmd ) +BOOL WINAPI ShowWindow( HWND hwnd, INT cmd ) { WND* wndPtr = WIN_FindWndPtr( hwnd ); - BOOL32 wasVisible, showFlag; + BOOL wasVisible, showFlag; RECT16 newPos = {0, 0, 0, 0}; int swp = 0; @@ -1187,10 +1187,10 @@ if (!wasVisible) return FALSE; swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER; - if ((hwnd == GetFocus32()) || IsChild32( hwnd, GetFocus32())) + if ((hwnd == GetFocus()) || IsChild( hwnd, GetFocus())) { /* Revert focus to parent */ - SetFocus32( GetParent32(hwnd) ); + SetFocus( GetParent(hwnd) ); } break; @@ -1223,7 +1223,7 @@ case SW_SHOWNOACTIVATE: swp |= SWP_NOZORDER; - if (GetActiveWindow32()) swp |= SWP_NOACTIVATE; + if (GetActiveWindow()) swp |= SWP_NOACTIVATE; /* fall through */ case SW_SHOWNORMAL: /* same as SW_NORMAL: */ case SW_SHOWDEFAULT: /* FIXME: should have its own handler */ @@ -1239,12 +1239,12 @@ showFlag = (cmd != SW_HIDE); if (showFlag != wasVisible) { - SendMessage32A( hwnd, WM_SHOWWINDOW, showFlag, 0 ); - if (!IsWindow32( hwnd )) return wasVisible; + SendMessageA( hwnd, WM_SHOWWINDOW, showFlag, 0 ); + if (!IsWindow( hwnd )) return wasVisible; } if ((wndPtr->dwStyle & WS_CHILD) && - !IsWindowVisible32( wndPtr->parent->hwndSelf ) && + !IsWindowVisible( wndPtr->parent->hwndSelf ) && (swp & (SWP_NOSIZE | SWP_NOMOVE)) == (SWP_NOSIZE | SWP_NOMOVE) ) { /* Don't call SetWindowPos32() on invisible child windows */ @@ -1255,9 +1255,9 @@ { /* We can't activate a child window */ if (wndPtr->dwStyle & WS_CHILD) swp |= SWP_NOACTIVATE | SWP_NOZORDER; - SetWindowPos32( hwnd, HWND_TOP, + SetWindowPos( hwnd, HWND_TOP, newPos.left, newPos.top, newPos.right, newPos.bottom, swp ); - if (!IsWindow32( hwnd )) return wasVisible; + if (!IsWindow( hwnd )) return wasVisible; else if( wndPtr->dwStyle & WS_MINIMIZE ) WINPOS_ShowIconTitle( wndPtr, TRUE ); } @@ -1269,10 +1269,10 @@ wndPtr->flags &= ~WIN_NEED_SIZE; if (wndPtr->dwStyle & WS_MAXIMIZE) wParam = SIZE_MAXIMIZED; else if (wndPtr->dwStyle & WS_MINIMIZE) wParam = SIZE_MINIMIZED; - SendMessage32A( hwnd, WM_SIZE, wParam, + SendMessageA( hwnd, WM_SIZE, wParam, MAKELONG(wndPtr->rectClient.right-wndPtr->rectClient.left, wndPtr->rectClient.bottom-wndPtr->rectClient.top)); - SendMessage32A( hwnd, WM_MOVE, 0, + SendMessageA( hwnd, WM_MOVE, 0, MAKELONG(wndPtr->rectClient.left, wndPtr->rectClient.top) ); } @@ -1300,11 +1300,11 @@ /*********************************************************************** * GetInternalWindowPos32 (USER32.245) */ -UINT32 WINAPI GetInternalWindowPos32( HWND32 hwnd, LPRECT32 rectWnd, - LPPOINT32 ptIcon ) +UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd, + LPPOINT ptIcon ) { - WINDOWPLACEMENT32 wndpl; - if (GetWindowPlacement32( hwnd, &wndpl )) + WINDOWPLACEMENT wndpl; + if (GetWindowPlacement( hwnd, &wndpl )) { if (rectWnd) *rectWnd = wndpl.rcNormalPosition; if (ptIcon) *ptIcon = wndpl.ptMinPosition; @@ -1322,7 +1322,7 @@ if( pWnd ) { LPINTERNALPOS lpPos = (LPINTERNALPOS)WINPOS_InitInternalPos( pWnd, - *(LPPOINT32)&pWnd->rectWindow.left, &pWnd->rectWindow ); + *(LPPOINT)&pWnd->rectWindow.left, &pWnd->rectWindow ); wndpl->length = sizeof(*wndpl); if( pWnd->dwStyle & WS_MINIMIZE ) wndpl->showCmd = SW_SHOWMINIMIZED; @@ -1348,7 +1348,7 @@ * Win95: * Fails if wndpl->length of Win95 (!) apps is invalid. */ -BOOL32 WINAPI GetWindowPlacement32( HWND32 hwnd, WINDOWPLACEMENT32 *pwpl32 ) +BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *pwpl32 ) { if( pwpl32 ) { @@ -1372,14 +1372,14 @@ /*********************************************************************** * WINPOS_SetPlacement */ -static BOOL32 WINPOS_SetPlacement( HWND32 hwnd, const WINDOWPLACEMENT16 *wndpl, - UINT32 flags ) +static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT16 *wndpl, + UINT flags ) { WND *pWnd = WIN_FindWndPtr( hwnd ); if( pWnd ) { LPINTERNALPOS lpPos = (LPINTERNALPOS)WINPOS_InitInternalPos( pWnd, - *(LPPOINT32)&pWnd->rectWindow.left, &pWnd->rectWindow ); + *(LPPOINT)&pWnd->rectWindow.left, &pWnd->rectWindow ); if( flags & PLACE_MIN ) lpPos->ptIconPos = wndpl->ptMinPosition; if( flags & PLACE_MAX ) lpPos->ptMaxPos = wndpl->ptMaxPosition; @@ -1389,23 +1389,23 @@ { WINPOS_ShowIconTitle( pWnd, FALSE ); if( wndpl->flags & WPF_SETMINPOSITION && !EMPTYPOINT(lpPos->ptIconPos)) - SetWindowPos32( hwnd, 0, lpPos->ptIconPos.x, lpPos->ptIconPos.y, + SetWindowPos( hwnd, 0, lpPos->ptIconPos.x, lpPos->ptIconPos.y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); } else if( pWnd->dwStyle & WS_MAXIMIZE ) { if( !EMPTYPOINT(lpPos->ptMaxPos) ) - SetWindowPos32( hwnd, 0, lpPos->ptMaxPos.x, lpPos->ptMaxPos.y, + SetWindowPos( hwnd, 0, lpPos->ptMaxPos.x, lpPos->ptMaxPos.y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); } else if( flags & PLACE_RECT ) - SetWindowPos32( hwnd, 0, lpPos->rectNormal.left, lpPos->rectNormal.top, + SetWindowPos( hwnd, 0, lpPos->rectNormal.left, lpPos->rectNormal.top, lpPos->rectNormal.right - lpPos->rectNormal.left, lpPos->rectNormal.bottom - lpPos->rectNormal.top, SWP_NOZORDER | SWP_NOACTIVATE ); - ShowWindow32( hwnd, wndpl->showCmd ); - if( IsWindow32(hwnd) && pWnd->dwStyle & WS_MINIMIZE ) + ShowWindow( hwnd, wndpl->showCmd ); + if( IsWindow(hwnd) && pWnd->dwStyle & WS_MINIMIZE ) { if( pWnd->dwStyle & WS_VISIBLE ) WINPOS_ShowIconTitle( pWnd, TRUE ); @@ -1433,7 +1433,7 @@ * Win95: * Fails if wndpl->length of Win95 (!) apps is invalid. */ -BOOL32 WINAPI SetWindowPlacement32( HWND32 hwnd, const WINDOWPLACEMENT32 *pwpl32 ) +BOOL WINAPI SetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *pwpl32 ) { if( pwpl32 ) { @@ -1459,7 +1459,7 @@ if( IsWindow16(hwnd) ) { WINDOWPLACEMENT16 wndpl; - UINT32 flags; + UINT flags; wndpl.length = sizeof(wndpl); wndpl.showCmd = showCmd; @@ -1484,13 +1484,13 @@ /*********************************************************************** * SetInternalWindowPos32 (USER32.483) */ -void WINAPI SetInternalWindowPos32( HWND32 hwnd, UINT32 showCmd, - LPRECT32 rect, LPPOINT32 pt ) +void WINAPI SetInternalWindowPos( HWND hwnd, UINT showCmd, + LPRECT rect, LPPOINT pt ) { - if( IsWindow32(hwnd) ) + if( IsWindow(hwnd) ) { WINDOWPLACEMENT16 wndpl; - UINT32 flags; + UINT flags; wndpl.length = sizeof(wndpl); wndpl.showCmd = showCmd; @@ -1518,15 +1518,15 @@ * can assign active status to a window. It must be called only * for the top level windows. */ -BOOL32 WINPOS_SetActiveWindow( HWND32 hWnd, BOOL32 fMouse, BOOL32 fChangeFocus) +BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus) { CBTACTIVATESTRUCT16* cbtStruct; WND* wndPtr, *wndTemp; HQUEUE16 hOldActiveQueue, hNewActiveQueue; MESSAGEQUEUE *pOldActiveQueue = 0, *pNewActiveQueue = 0; WORD wIconized = 0; - HWND32 hwndActive = 0; - BOOL32 bRet = 0; + HWND hwndActive = 0; + BOOL bRet = 0; /* Get current active window from the active queue */ if ( hActiveQueue ) @@ -1537,7 +1537,7 @@ } /* paranoid checks */ - if( hWnd == GetDesktopWindow32() || hWnd == hwndActive ) goto CLEANUP; + if( hWnd == GetDesktopWindow() || hWnd == hwndActive ) goto CLEANUP; /* if (wndPtr && (GetFastQueue() != wndPtr->hmemTaskQ)) * return 0; @@ -1569,18 +1569,18 @@ } /* set prev active wnd to current active wnd and send notification */ - if ((hwndPrevActive = hwndActive) && IsWindow32(hwndPrevActive)) + if ((hwndPrevActive = hwndActive) && IsWindow(hwndPrevActive)) { MESSAGEQUEUE *pTempActiveQueue = 0; - if (!SendMessage32A( hwndPrevActive, WM_NCACTIVATE, FALSE, 0 )) + if (!SendMessageA( hwndPrevActive, WM_NCACTIVATE, FALSE, 0 )) { if (GetSysModalWindow16() != hWnd) goto CLEANUP; /* disregard refusal if hWnd is sysmodal */ } #if 1 - SendMessage32A( hwndPrevActive, WM_ACTIVATE, + SendMessageA( hwndPrevActive, WM_ACTIVATE, MAKEWPARAM( WA_INACTIVE, wIconized ), (LPARAM)hWnd ); #else @@ -1614,7 +1614,7 @@ SendMessage16((HWND16)-1, WM_PALETTEISCHANGING, (WPARAM16)hWnd, 0L ); /* if prev wnd is minimized redraw icon title */ - if( IsIconic32( hwndPrevActive ) ) WINPOS_RedrawIconTitle(hwndPrevActive); + if( IsIconic( hwndPrevActive ) ) WINPOS_RedrawIconTitle(hwndPrevActive); /* managed windows will get ConfigureNotify event */ if (wndPtr && !(wndPtr->dwStyle & WS_CHILD) && !(wndPtr->flags & WIN_MANAGED)) @@ -1624,9 +1624,9 @@ if (wndTemp->dwStyle & WS_VISIBLE) break; if( wndTemp != wndPtr ) - SetWindowPos32(hWnd, HWND_TOP, 0,0,0,0, + SetWindowPos(hWnd, HWND_TOP, 0,0,0,0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE ); - if (!IsWindow32(hWnd)) goto CLEANUP; + if (!IsWindow(hWnd)) goto CLEANUP; } /* Get a handle to the new active queue */ @@ -1641,7 +1641,7 @@ { for (ppWnd = list; *ppWnd; ppWnd++) { - if (!IsWindow32( (*ppWnd)->hwndSelf )) continue; + if (!IsWindow( (*ppWnd)->hwndSelf )) continue; if ((*ppWnd)->hmemTaskQ == hOldActiveQueue) SendMessage16( (*ppWnd)->hwndSelf, WM_ACTIVATEAPP, @@ -1656,7 +1656,7 @@ { for (ppWnd = list; *ppWnd; ppWnd++) { - if (!IsWindow32( (*ppWnd)->hwndSelf )) continue; + if (!IsWindow( (*ppWnd)->hwndSelf )) continue; if ((*ppWnd)->hmemTaskQ == hNewActiveQueue) SendMessage16( (*ppWnd)->hwndSelf, WM_ACTIVATEAPP, @@ -1665,7 +1665,7 @@ HeapFree( SystemHeap, 0, list ); } - if (!IsWindow32(hWnd)) goto CLEANUP; + if (!IsWindow(hWnd)) goto CLEANUP; } if (hWnd) @@ -1677,9 +1677,9 @@ wndTemp->hwndLastActive = hWnd; wIconized = HIWORD(wndTemp->dwStyle & WS_MINIMIZE); - SendMessage32A( hWnd, WM_NCACTIVATE, TRUE, 0 ); + SendMessageA( hWnd, WM_NCACTIVATE, TRUE, 0 ); #if 1 - SendMessage32A( hWnd, WM_ACTIVATE, + SendMessageA( hWnd, WM_ACTIVATE, MAKEWPARAM( (fMouse) ? WA_CLICKACTIVE : WA_ACTIVE, wIconized), (LPARAM)hwndPrevActive ); #else @@ -1687,13 +1687,13 @@ MAKELPARAM( (HWND16)hwndPrevActive, wIconized) ); #endif - if( !IsWindow32(hWnd) ) goto CLEANUP; + if( !IsWindow(hWnd) ) goto CLEANUP; } /* change focus if possible */ - if( fChangeFocus && GetFocus32() ) - if( WIN_GetTopParent(GetFocus32()) != hwndActive ) - FOCUS_SwitchFocus( pNewActiveQueue, GetFocus32(), + if( fChangeFocus && GetFocus() ) + if( WIN_GetTopParent(GetFocus()) != hwndActive ) + FOCUS_SwitchFocus( pNewActiveQueue, GetFocus(), (wndPtr && (wndPtr->dwStyle & WS_MINIMIZE))? 0: hwndActive @@ -1703,7 +1703,7 @@ (*wndPtr->pDriver->pForceWindowRaise)(wndPtr); /* if active wnd is minimized redraw icon title */ - if( IsIconic32(hwndActive) ) WINPOS_RedrawIconTitle(hwndActive); + if( IsIconic(hwndActive) ) WINPOS_RedrawIconTitle(hwndActive); bRet = 1; // Success @@ -1722,11 +1722,11 @@ * * Activates window other than pWnd. */ -BOOL32 WINPOS_ActivateOtherWindow(WND* pWnd) +BOOL WINPOS_ActivateOtherWindow(WND* pWnd) { - BOOL32 bRet = 0; + BOOL bRet = 0; WND* pWndTo = NULL; - HWND32 hwndActive = 0; + HWND hwndActive = 0; /* Get current active window from the active queue */ if ( hActiveQueue ) @@ -1776,10 +1776,10 @@ * WINPOS_ChangeActiveWindow * */ -BOOL32 WINPOS_ChangeActiveWindow( HWND32 hWnd, BOOL32 mouseMsg ) +BOOL WINPOS_ChangeActiveWindow( HWND hWnd, BOOL mouseMsg ) { WND *wndPtr = WIN_FindWndPtr(hWnd); - HWND32 hwndActive = 0; + HWND hwndActive = 0; /* Get current active window from the active queue */ if ( hActiveQueue ) @@ -1798,7 +1798,7 @@ /* child windows get WM_CHILDACTIVATE message */ if( (wndPtr->dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD ) - return SendMessage32A(hWnd, WM_CHILDACTIVATE, 0, 0L); + return SendMessageA(hWnd, WM_CHILDACTIVATE, 0, 0L); /* owned popups imply owner activation - not sure */ if ((wndPtr->dwStyle & WS_POPUP) && wndPtr->owner && @@ -1830,13 +1830,13 @@ * oldWindowRect, oldClientRect and winpos must be non-NULL only * when calcValidRect is TRUE. */ -LONG WINPOS_SendNCCalcSize( HWND32 hwnd, BOOL32 calcValidRect, - RECT32 *newWindowRect, RECT32 *oldWindowRect, - RECT32 *oldClientRect, WINDOWPOS32 *winpos, - RECT32 *newClientRect ) +LONG WINPOS_SendNCCalcSize( HWND hwnd, BOOL calcValidRect, + RECT *newWindowRect, RECT *oldWindowRect, + RECT *oldClientRect, WINDOWPOS *winpos, + RECT *newClientRect ) { - NCCALCSIZE_PARAMS32 params; - WINDOWPOS32 winposCopy; + NCCALCSIZE_PARAMS params; + WINDOWPOS winposCopy; LONG result; params.rgrc[0] = *newWindowRect; @@ -1847,7 +1847,7 @@ params.rgrc[2] = *oldClientRect; params.lppos = &winposCopy; } - result = SendMessage32A( hwnd, WM_NCCALCSIZE, calcValidRect, + result = SendMessageA( hwnd, WM_NCCALCSIZE, calcValidRect, (LPARAM)¶ms ); TRACE(win, "%d,%d-%d,%d\n", params.rgrc[0].left, params.rgrc[0].top, @@ -1864,7 +1864,7 @@ */ LONG WINPOS_HandleWindowPosChanging16( WND *wndPtr, WINDOWPOS16 *winpos ) { - POINT32 maxSize, minTrack; + POINT maxSize, minTrack; if (winpos->flags & SWP_NOSIZE) return 0; if ((wndPtr->dwStyle & WS_THICKFRAME) || ((wndPtr->dwStyle & (WS_POPUP | WS_CHILD)) == 0)) @@ -1887,9 +1887,9 @@ * * Default handling for a WM_WINDOWPOSCHANGING. Called from DefWindowProc(). */ -LONG WINPOS_HandleWindowPosChanging32( WND *wndPtr, WINDOWPOS32 *winpos ) +LONG WINPOS_HandleWindowPosChanging( WND *wndPtr, WINDOWPOS *winpos ) { - POINT32 maxSize; + POINT maxSize; if (winpos->flags & SWP_NOSIZE) return 0; if ((wndPtr->dwStyle & WS_THICKFRAME) || ((wndPtr->dwStyle & (WS_POPUP | WS_CHILD)) == 0)) @@ -1908,9 +1908,9 @@ * Move a window in Z order, invalidating everything that needs it. * Only necessary for windows without associated X window. */ -static void WINPOS_MoveWindowZOrder( HWND32 hwnd, HWND32 hwndAfter ) +static void WINPOS_MoveWindowZOrder( HWND hwnd, HWND hwndAfter ) { - BOOL32 movingUp; + BOOL movingUp; WND *pWndAfter, *pWndCur, *wndPtr = WIN_FindWndPtr( hwnd ); /* We have two possible cases: @@ -1949,11 +1949,11 @@ pWndCur = wndPtr->next; while (pWndCur != pWndPrevAfter) { - RECT32 rect = { pWndCur->rectWindow.left, + RECT rect = { pWndCur->rectWindow.left, pWndCur->rectWindow.top, pWndCur->rectWindow.right, pWndCur->rectWindow.bottom }; - OffsetRect32( &rect, -wndPtr->rectClient.left, + OffsetRect( &rect, -wndPtr->rectClient.left, -wndPtr->rectClient.top ); PAINT_RedrawWindow( hwnd, &rect, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_FRAME | RDW_ERASE, 0 ); @@ -1967,11 +1967,11 @@ WIN_LinkWindow( hwnd, hwndAfter ); while (pWndCur != wndPtr) { - RECT32 rect = { pWndCur->rectWindow.left, + RECT rect = { pWndCur->rectWindow.left, pWndCur->rectWindow.top, pWndCur->rectWindow.right, pWndCur->rectWindow.bottom }; - OffsetRect32( &rect, -pWndCur->rectClient.left, + OffsetRect( &rect, -pWndCur->rectClient.left, -pWndCur->rectClient.top ); PAINT_RedrawWindow( pWndCur->hwndSelf, &rect, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_FRAME | RDW_ERASE, 0 ); @@ -1986,7 +1986,7 @@ * fix Z order taking into account owned popups - * basically we need to maintain them above the window that owns them */ -HWND32 WINPOS_ReorderOwnedPopups(HWND32 hwndInsertAfter,WND* wndPtr,WORD flags) +HWND WINPOS_ReorderOwnedPopups(HWND hwndInsertAfter,WND* wndPtr,WORD flags) { WND* w = WIN_GetDesktop()->child; @@ -1994,7 +1994,7 @@ { /* implement "local z-order" between the top and owner window */ - HWND32 hwndLocalPrev = HWND_TOP; + HWND hwndLocalPrev = HWND_TOP; if( hwndInsertAfter != HWND_TOP ) { @@ -2017,7 +2017,7 @@ if( w->dwStyle & WS_POPUP && w->owner == wndPtr ) { - SetWindowPos32(w->hwndSelf, hwndInsertAfter, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | + SetWindowPos(w->hwndSelf, hwndInsertAfter, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING | SWP_DEFERERASE); hwndInsertAfter = w->hwndSelf; } @@ -2041,12 +2041,12 @@ * FIXME: Move visible and update regions to the same coordinate system * (either parent client or window). This is a lot of work though. */ -static UINT32 WINPOS_SizeMoveClean( WND* Wnd, HRGN32 oldVisRgn, - LPRECT32 lpOldWndRect, - LPRECT32 lpOldClientRect, UINT32 uFlags ) +static UINT WINPOS_SizeMoveClean( WND* Wnd, HRGN oldVisRgn, + LPRECT lpOldWndRect, + LPRECT lpOldClientRect, UINT uFlags ) { - HRGN32 newVisRgn = DCE_GetVisRgn(Wnd->hwndSelf,DCX_WINDOW | DCX_CLIPSIBLINGS,0,0); - HRGN32 dirtyRgn = CreateRectRgn32(0,0,0,0); + HRGN newVisRgn = DCE_GetVisRgn(Wnd->hwndSelf,DCX_WINDOW | DCX_CLIPSIBLINGS,0,0); + HRGN dirtyRgn = CreateRectRgn(0,0,0,0); int other, my; TRACE(win,"cleaning up...new wnd=(%i %i-%i %i) old wnd=(%i %i-%i %i)\n", @@ -2064,28 +2064,28 @@ (lpOldWndRect->bottom - lpOldWndRect->top) != (Wnd->rectWindow.bottom - Wnd->rectWindow.top) ) uFlags |= SMC_DRAWFRAME; - CombineRgn32( dirtyRgn, newVisRgn, 0, RGN_COPY); + CombineRgn( dirtyRgn, newVisRgn, 0, RGN_COPY); if( !(uFlags & SMC_NOCOPY) ) - CombineRgn32( newVisRgn, newVisRgn, oldVisRgn, RGN_AND ); + CombineRgn( newVisRgn, newVisRgn, oldVisRgn, RGN_AND ); /* map regions to the parent client area */ - OffsetRgn32( dirtyRgn, Wnd->rectWindow.left, Wnd->rectWindow.top ); - OffsetRgn32( oldVisRgn, lpOldWndRect->left, lpOldWndRect->top ); + OffsetRgn( dirtyRgn, Wnd->rectWindow.left, Wnd->rectWindow.top ); + OffsetRgn( oldVisRgn, lpOldWndRect->left, lpOldWndRect->top ); /* compute invalidated region outside Wnd - (in client coordinates of the parent window) */ - other = CombineRgn32(dirtyRgn, oldVisRgn, dirtyRgn, RGN_DIFF); + other = CombineRgn(dirtyRgn, oldVisRgn, dirtyRgn, RGN_DIFF); /* map visible region to the Wnd client area */ - OffsetRgn32( newVisRgn, Wnd->rectWindow.left - Wnd->rectClient.left, + OffsetRgn( newVisRgn, Wnd->rectWindow.left - Wnd->rectClient.left, Wnd->rectWindow.top - Wnd->rectClient.top ); /* substract previously invalidated region from the Wnd visible region */ - my = (Wnd->hrgnUpdate > 1) ? CombineRgn32( newVisRgn, newVisRgn, + my = (Wnd->hrgnUpdate > 1) ? CombineRgn( newVisRgn, newVisRgn, Wnd->hrgnUpdate, RGN_DIFF) : COMPLEXREGION; @@ -2099,9 +2099,9 @@ } else /* bitblt old client area */ { - HDC32 hDC; + HDC hDC; int update; - HRGN32 updateRgn; + HRGN updateRgn; int xfrom,yfrom,xto,yto,width,height; if( uFlags & SMC_DRAWFRAME ) @@ -2111,9 +2111,9 @@ xfrom = lpOldClientRect->left; yfrom = lpOldClientRect->top; xto = Wnd->rectClient.left; yto = Wnd->rectClient.top; width = lpOldClientRect->right - xfrom; height = lpOldClientRect->bottom - yfrom; - updateRgn = CreateRectRgn32( 0, 0, width, height ); - CombineRgn32( newVisRgn, newVisRgn, updateRgn, RGN_AND ); - SetRectRgn32( updateRgn, 0, 0, Wnd->rectClient.right - xto, + updateRgn = CreateRectRgn( 0, 0, width, height ); + CombineRgn( newVisRgn, newVisRgn, updateRgn, RGN_AND ); + SetRectRgn( updateRgn, 0, 0, Wnd->rectClient.right - xto, Wnd->rectClient.bottom - yto ); } else @@ -2121,17 +2121,17 @@ xfrom = lpOldWndRect->left; yfrom = lpOldWndRect->top; xto = Wnd->rectWindow.left; yto = Wnd->rectWindow.top; width = lpOldWndRect->right - xfrom; height = lpOldWndRect->bottom - yfrom; - updateRgn = CreateRectRgn32( xto - Wnd->rectClient.left, + updateRgn = CreateRectRgn( xto - Wnd->rectClient.left, yto - Wnd->rectClient.top, Wnd->rectWindow.right - Wnd->rectClient.left, Wnd->rectWindow.bottom - Wnd->rectClient.top ); } - CombineRgn32( newVisRgn, newVisRgn, updateRgn, RGN_AND ); + CombineRgn( newVisRgn, newVisRgn, updateRgn, RGN_AND ); /* substract new visRgn from target rect to get a region that won't be copied */ - update = CombineRgn32( updateRgn, updateRgn, newVisRgn, RGN_DIFF ); + update = CombineRgn( updateRgn, updateRgn, newVisRgn, RGN_DIFF ); /* Blt valid bits using parent window DC */ @@ -2140,22 +2140,22 @@ /* compute clipping region in parent client coordinates */ - OffsetRgn32( newVisRgn, Wnd->rectClient.left, Wnd->rectClient.top ); - CombineRgn32( oldVisRgn, oldVisRgn, newVisRgn, RGN_OR ); + OffsetRgn( newVisRgn, Wnd->rectClient.left, Wnd->rectClient.top ); + CombineRgn( oldVisRgn, oldVisRgn, newVisRgn, RGN_OR ); - hDC = GetDCEx32( Wnd->parent->hwndSelf, oldVisRgn, + hDC = GetDCEx( Wnd->parent->hwndSelf, oldVisRgn, DCX_KEEPCLIPRGN | DCX_INTERSECTRGN | DCX_CACHE | DCX_CLIPSIBLINGS); - BitBlt32( hDC, xto, yto, width, height, hDC, xfrom, yfrom, SRCCOPY ); - ReleaseDC32( Wnd->parent->hwndSelf, hDC); + BitBlt( hDC, xto, yto, width, height, hDC, xfrom, yfrom, SRCCOPY ); + ReleaseDC( Wnd->parent->hwndSelf, hDC); } if( update != NULLREGION ) PAINT_RedrawWindow( Wnd->hwndSelf, NULL, updateRgn, RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN | RDW_ERASE, RDW_C_USEHRGN ); else if( uFlags & SMC_DRAWFRAME ) Wnd->flags |= WIN_NEEDS_NCPAINT; - DeleteObject32( updateRgn ); + DeleteObject( updateRgn ); } /* erase uncovered areas */ @@ -2163,8 +2163,8 @@ if( !(uFlags & SMC_NOPARENTERASE) && (other != NULLREGION ) ) PAINT_RedrawWindow( Wnd->parent->hwndSelf, NULL, dirtyRgn, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_ERASE, RDW_C_USEHRGN ); - DeleteObject32(dirtyRgn); - DeleteObject32(newVisRgn); + DeleteObject(dirtyRgn); + DeleteObject(newVisRgn); return uFlags; } @@ -2174,24 +2174,24 @@ BOOL16 WINAPI SetWindowPos16( HWND16 hwnd, HWND16 hwndInsertAfter, INT16 x, INT16 y, INT16 cx, INT16 cy, WORD flags) { - return SetWindowPos32(hwnd,(INT32)(INT16)hwndInsertAfter,x,y,cx,cy,flags); + return SetWindowPos(hwnd,(INT)(INT16)hwndInsertAfter,x,y,cx,cy,flags); } /*********************************************************************** * SetWindowPos (USER32.520) */ -BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter, - INT32 x, INT32 y, INT32 cx, INT32 cy, WORD flags) +BOOL WINAPI SetWindowPos( HWND hwnd, HWND hwndInsertAfter, + INT x, INT y, INT cx, INT cy, WORD flags) { - WINDOWPOS32 winpos; + WINDOWPOS winpos; WND * wndPtr; - RECT32 newWindowRect, newClientRect, oldWindowRect; - HRGN32 visRgn = 0; - HWND32 tempInsertAfter= 0; + RECT newWindowRect, newClientRect, oldWindowRect; + HRGN visRgn = 0; + HWND tempInsertAfter= 0; int result = 0; - UINT32 uFlags = 0; - BOOL32 resync = FALSE; - HWND32 hwndActive = 0; + UINT uFlags = 0; + BOOL resync = FALSE; + HWND hwndActive = 0; /* Get current active window from the active queue */ if ( hActiveQueue ) @@ -2208,7 +2208,7 @@ hwnd, x, y, x+cx, y+cy, flags); /* Check window handle */ - if (hwnd == GetDesktopWindow32()) return FALSE; + if (hwnd == GetDesktopWindow()) return FALSE; if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE; if(wndPtr->dwStyle & WS_VISIBLE) @@ -2285,7 +2285,7 @@ /* Send WM_WINDOWPOSCHANGING message */ if (!(winpos.flags & SWP_NOSENDCHANGING)) - SendMessage32A( hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)&winpos ); + SendMessageA( hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)&winpos ); /* Calculate new position and size */ @@ -2305,7 +2305,7 @@ newWindowRect.right += winpos.x - wndPtr->rectWindow.left; newWindowRect.bottom += winpos.y - wndPtr->rectWindow.top; - OffsetRect32( &newClientRect, winpos.x - wndPtr->rectWindow.left, + OffsetRect( &newClientRect, winpos.x - wndPtr->rectWindow.left, winpos.y - wndPtr->rectWindow.top ); } @@ -2367,9 +2367,9 @@ wndPtr->dwStyle & WS_VISIBLE) || (flags & (SWP_HIDEWINDOW | SWP_SHOWWINDOW)) ) { - RECT32 rect; + RECT rect; - UnionRect32(&rect, &newWindowRect, &wndPtr->rectWindow); + UnionRect(&rect, &newWindowRect, &wndPtr->rectWindow); DCE_InvalidateDCE(wndPtr, &rect); } @@ -2379,7 +2379,7 @@ if (X11DRV_WND_GetXWindow(wndPtr)) { - RECT32 oldClientRect = wndPtr->rectClient; + RECT oldClientRect = wndPtr->rectClient; tempInsertAfter = winpos.hwndInsertAfter; @@ -2418,7 +2418,7 @@ if( winpos.flags & SWP_FRAMECHANGED ) { WORD wErase = 0; - RECT32 rect; + RECT rect; if( newClientRect.right > oldClientRect.right ) /* redraw exposed client area on the right */ { @@ -2449,7 +2449,7 @@ } else /* not an X window */ { - RECT32 oldClientRect = wndPtr->rectClient; + RECT oldClientRect = wndPtr->rectClient; wndPtr->rectWindow = newWindowRect; wndPtr->rectClient = newClientRect; @@ -2477,7 +2477,7 @@ if( winpos.flags & SWP_NOZORDER ) uFlags |= SMC_NOPARENTERASE; } } - DeleteObject32(visRgn); + DeleteObject(visRgn); } if (flags & SWP_SHOWWINDOW) @@ -2485,7 +2485,7 @@ wndPtr->dwStyle |= WS_VISIBLE; if (X11DRV_WND_GetXWindow(wndPtr)) { - HWND32 focus, curr; + HWND focus, curr; wndPtr->pDriver->pSetWindowPos(wndPtr, &winpos, uFlags & SMC_SETXPOS ); if( uFlags & SMC_SETXPOS ) @@ -2496,7 +2496,7 @@ if (wndPtr->flags & WIN_MANAGED) resync = TRUE; /* If focus was set to an unmapped window, reset X focus now */ - focus = curr = GetFocus32(); + focus = curr = GetFocus(); while (curr) { if (curr == hwnd) { WND *pFocus = WIN_FindWndPtr( focus ); @@ -2504,7 +2504,7 @@ pFocus->pDriver->pSetFocus(pFocus); break; } - curr = GetParent32(curr); + curr = GetParent(curr); } } else @@ -2535,7 +2535,7 @@ uFlags |= SMC_NOPARENTERASE; } - if (hwnd == CARET_GetHwnd()) DestroyCaret32(); + if (hwnd == CARET_GetHwnd()) DestroyCaret(); /* FIXME: This will cause the window to be activated irrespective * of whether it is owned by the same thread. @@ -2555,7 +2555,7 @@ if (X11DRV_WND_GetXWindow(wndPtr)) EVENT_Synchronize(); /* Wait for all expose events */ - if (!GetCapture32() && ((wndPtr->dwStyle & WS_VISIBLE) || (flags & SWP_HIDEWINDOW))) + if (!GetCapture() && ((wndPtr->dwStyle & WS_VISIBLE) || (flags & SWP_HIDEWINDOW))) EVENT_DummyMotionNotify(); /* Simulate a mouse event to set the cursor */ if (!(flags & SWP_DEFERERASE) && !(uFlags & SMC_NOPARENTERASE) ) @@ -2571,7 +2571,7 @@ (((winpos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE) && !(winpos.flags & SWP_NOSENDCHANGING)) ) { - SendMessage32A( winpos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)&winpos ); + SendMessageA( winpos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)&winpos ); if (resync) EVENT_Synchronize (); } @@ -2584,20 +2584,20 @@ */ HDWP16 WINAPI BeginDeferWindowPos16( INT16 count ) { - return BeginDeferWindowPos32( count ); + return BeginDeferWindowPos( count ); } /*********************************************************************** * BeginDeferWindowPos32 (USER32.9) */ -HDWP32 WINAPI BeginDeferWindowPos32( INT32 count ) +HDWP WINAPI BeginDeferWindowPos( INT count ) { - HDWP32 handle; + HDWP handle; DWP *pDWP; if (count <= 0) return 0; - handle = USER_HEAP_ALLOC( sizeof(DWP) + (count-1)*sizeof(WINDOWPOS32) ); + handle = USER_HEAP_ALLOC( sizeof(DWP) + (count-1)*sizeof(WINDOWPOS) ); if (!handle) return 0; pDWP = (DWP *) USER_HEAP_LIN_ADDR( handle ); pDWP->actualCount = 0; @@ -2616,7 +2616,7 @@ INT16 x, INT16 y, INT16 cx, INT16 cy, UINT16 flags ) { - return DeferWindowPos32( hdwp, hwnd, (INT32)(INT16)hwndAfter, + return DeferWindowPos( hdwp, hwnd, (INT)(INT16)hwndAfter, x, y, cx, cy, flags ); } @@ -2624,19 +2624,19 @@ /*********************************************************************** * DeferWindowPos32 (USER32.128) */ -HDWP32 WINAPI DeferWindowPos32( HDWP32 hdwp, HWND32 hwnd, HWND32 hwndAfter, - INT32 x, INT32 y, INT32 cx, INT32 cy, - UINT32 flags ) +HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter, + INT x, INT y, INT cx, INT cy, + UINT flags ) { DWP *pDWP; int i; - HDWP32 newhdwp = hdwp; + HDWP newhdwp = hdwp; /* HWND32 parent; */ WND *pWnd; pDWP = (DWP *) USER_HEAP_LIN_ADDR( hdwp ); if (!pDWP) return 0; - if (hwnd == GetDesktopWindow32()) return 0; + if (hwnd == GetDesktopWindow()) return 0; if (!(pWnd=WIN_FindWndPtr( hwnd ))) { USER_HEAP_FREE( hdwp ); @@ -2689,7 +2689,7 @@ if (pDWP->actualCount >= pDWP->suggestedCount) { newhdwp = USER_HEAP_REALLOC( hdwp, - sizeof(DWP) + pDWP->suggestedCount*sizeof(WINDOWPOS32) ); + sizeof(DWP) + pDWP->suggestedCount*sizeof(WINDOWPOS) ); if (!newhdwp) return 0; pDWP = (DWP *) USER_HEAP_LIN_ADDR( newhdwp ); pDWP->suggestedCount++; @@ -2711,25 +2711,25 @@ */ BOOL16 WINAPI EndDeferWindowPos16( HDWP16 hdwp ) { - return EndDeferWindowPos32( hdwp ); + return EndDeferWindowPos( hdwp ); } /*********************************************************************** * EndDeferWindowPos32 (USER32.173) */ -BOOL32 WINAPI EndDeferWindowPos32( HDWP32 hdwp ) +BOOL WINAPI EndDeferWindowPos( HDWP hdwp ) { DWP *pDWP; - WINDOWPOS32 *winpos; - BOOL32 res = TRUE; + WINDOWPOS *winpos; + BOOL res = TRUE; int i; pDWP = (DWP *) USER_HEAP_LIN_ADDR( hdwp ); if (!pDWP) return FALSE; for (i = 0, winpos = pDWP->winPos; i < pDWP->actualCount; i++, winpos++) { - if (!(res = SetWindowPos32( winpos->hwnd, winpos->hwndInsertAfter, + if (!(res = SetWindowPos( winpos->hwnd, winpos->hwndInsertAfter, winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags ))) break; } @@ -2741,7 +2741,7 @@ /*********************************************************************** * TileChildWindows (USER.199) */ -void WINAPI TileChildWindows( HWND16 parent, WORD action ) +void WINAPI TileChildWindows16( HWND16 parent, WORD action ) { FIXME(win, "(%04x, %d): stub\n", parent, action); } @@ -2749,7 +2749,7 @@ /*********************************************************************** * CascageChildWindows (USER.198) */ -void WINAPI CascadeChildWindows( HWND16 parent, WORD action ) +void WINAPI CascadeChildWindows16( HWND16 parent, WORD action ) { FIXME(win, "(%04x, %d): stub\n", parent, action); }
diff --git a/windows/winproc.c b/windows/winproc.c index 3cbb380..e994b44 100644 --- a/windows/winproc.c +++ b/windows/winproc.c
@@ -26,7 +26,7 @@ { BYTE popl_eax; /* popl %eax (return address) */ BYTE pushl_func; /* pushl $proc */ - WNDPROC32 proc WINE_PACKED; + WNDPROC proc WINE_PACKED; BYTE pushl_eax; /* pushl %eax */ WORD pushw_bp WINE_PACKED; /* pushw %bp */ BYTE pushl_thunk; /* pushl $thunkfrom16 */ @@ -53,7 +53,7 @@ typedef struct { BYTE jmp; /* jmp proc (relative jump) */ - WNDPROC32 proc WINE_PACKED; + WNDPROC proc WINE_PACKED; } WINPROC_JUMP; typedef union @@ -67,7 +67,7 @@ WINPROC_THUNK thunk; /* Thunk */ WINPROC_JUMP jmp; /* Jump */ struct tagWINDOWPROC *next; /* Next window proc */ - UINT32 magic; /* Magic number */ + UINT magic; /* Magic number */ WINDOWPROCTYPE type; /* Function type */ WINDOWPROCUSER user; /* Function user */ } WINDOWPROC; @@ -79,26 +79,26 @@ (WNDPROC16)((pproc)->thunk.t_from32.proc) : \ (WNDPROC16)((pproc)->thunk.t_from16.proc)) -static LRESULT WINAPI WINPROC_CallProc32ATo16( WNDPROC16 func, HWND32 hwnd, - UINT32 msg, WPARAM32 wParam, +static LRESULT WINAPI WINPROC_CallProc32ATo16( WNDPROC16 func, HWND hwnd, + UINT msg, WPARAM wParam, LPARAM lParam ); -static LRESULT WINAPI WINPROC_CallProc32WTo16( WNDPROC16 func, HWND32 hwnd, - UINT32 msg, WPARAM32 wParam, +static LRESULT WINAPI WINPROC_CallProc32WTo16( WNDPROC16 func, HWND hwnd, + UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINPROC_CallProc16To32A( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam, - WNDPROC32 func ); + WNDPROC func ); static LRESULT WINPROC_CallProc16To32W( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam, - WNDPROC32 func ); + WNDPROC func ); -static HANDLE32 WinProcHeap; +static HANDLE WinProcHeap; /********************************************************************** * WINPROC_Init */ -BOOL32 WINPROC_Init(void) +BOOL WINPROC_Init(void) { WinProcHeap = HeapCreate( HEAP_WINE_SEGPTR | HEAP_WINE_CODESEG, 0, 0 ); if (!WinProcHeap) @@ -115,8 +115,8 @@ * * Call a 32-bit WndProc. */ -static LRESULT WINPROC_CallWndProc32( WNDPROC32 proc, HWND32 hwnd, UINT32 msg, - WPARAM32 wParam, LPARAM lParam ) +static LRESULT WINPROC_CallWndProc( WNDPROC proc, HWND hwnd, UINT msg, + WPARAM wParam, LPARAM lParam ) { TRACE(relay, "(wndproc=%p,hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)\n", proc, hwnd, SPY_GetMsgName(msg), wParam, lParam ); @@ -204,7 +204,7 @@ case WIN_PROC_32W: proc->thunk.t_from16.popl_eax = 0x58; /* popl %eax */ proc->thunk.t_from16.pushl_func = 0x68; /* pushl $proc */ - proc->thunk.t_from16.proc = (FARPROC32)func; + proc->thunk.t_from16.proc = (FARPROC)func; proc->thunk.t_from16.pushl_eax = 0x50; /* pushl %eax */ proc->thunk.t_from16.pushw_bp = 0x5566; /* pushw %bp */ proc->thunk.t_from16.pushl_thunk = 0x68; /* pushl $thunkfrom16 */ @@ -216,7 +216,7 @@ GET_CS(proc->thunk.t_from16.cs); proc->jmp.jmp = 0xe9; /* Fixup relative jump */ - proc->jmp.proc = (WNDPROC32)((DWORD)func - + proc->jmp.proc = (WNDPROC)((DWORD)func - (DWORD)(&proc->jmp.proc + 1)); break; default: @@ -229,7 +229,7 @@ } proc->next = NULL; TRACE(win, "(%08x,%d): returning %08x\n", - (UINT32)func, type, (UINT32)proc ); + (UINT)func, type, (UINT)proc ); return proc; } @@ -285,10 +285,10 @@ * window is destroyed. * */ -BOOL32 WINPROC_SetProc( HWINDOWPROC *pFirst, WNDPROC16 func, +BOOL WINPROC_SetProc( HWINDOWPROC *pFirst, WNDPROC16 func, WINDOWPROCTYPE type, WINDOWPROCUSER user ) { - BOOL32 bRecycle = FALSE; + BOOL bRecycle = FALSE; WINDOWPROC *proc, **ppPrev; /* Check if function is already in the list */ @@ -348,7 +348,7 @@ /* Add the win proc at the head of the list */ TRACE(win, "(%08x,%08x,%d): res=%08x\n", - (UINT32)*pFirst, (UINT32)func, type, (UINT32)proc ); + (UINT)*pFirst, (UINT)func, type, (UINT)proc ); proc->next = *(WINDOWPROC **)pFirst; *(WINDOWPROC **)pFirst = proc; return TRUE; @@ -366,7 +366,7 @@ { WINDOWPROC *next = ((WINDOWPROC *)proc)->next; if (((WINDOWPROC *)proc)->user != user) break; - TRACE(win, "freeing %08x\n", (UINT32)proc); + TRACE(win, "freeing %08x\n", (UINT)proc); HeapFree( WinProcHeap, 0, proc ); proc = next; } @@ -390,7 +390,7 @@ * * Return TRUE if the lparam is a string */ -BOOL32 WINPROC_TestCBForStr ( HWND32 hwnd ) +BOOL WINPROC_TestCBForStr ( HWND hwnd ) { WND * wnd = WIN_FindWndPtr(hwnd); return ( !(LOWORD(wnd->dwStyle) & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) || (LOWORD(wnd->dwStyle) & CBS_HASSTRINGS) ); @@ -400,7 +400,7 @@ * * Return TRUE if the lparam is a string */ -BOOL32 WINPROC_TestLBForStr ( HWND32 hwnd ) +BOOL WINPROC_TestLBForStr ( HWND hwnd ) { WND * wnd = WIN_FindWndPtr(hwnd); return ( !(LOWORD(wnd->dwStyle) & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) || (LOWORD(wnd->dwStyle) & LBS_HASSTRINGS) ); @@ -419,7 +419,7 @@ * the first four bytes are the handle of the icon * when the WM_SETTEXT message has been used to set the icon */ -INT32 WINPROC_MapMsg32ATo32W( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM *plparam ) +INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam, LPARAM *plparam ) { switch(msg) { @@ -434,25 +434,25 @@ return 1; case WM_SETTEXT: - case CB_DIR32: - case CB_FINDSTRING32: - case CB_FINDSTRINGEXACT32: - case CB_SELECTSTRING32: - case LB_DIR32: - case LB_ADDFILE32: - case LB_FINDSTRING32: - case LB_SELECTSTRING32: - case EM_REPLACESEL32: + case CB_DIR: + case CB_FINDSTRING: + case CB_FINDSTRINGEXACT: + case CB_SELECTSTRING: + case LB_DIR: + case LB_ADDFILE: + case LB_FINDSTRING: + case LB_SELECTSTRING: + case EM_REPLACESEL: *plparam = (LPARAM)HEAP_strdupAtoW( SystemHeap, 0, (LPCSTR)*plparam ); return (*plparam ? 1 : -1); case WM_NCCREATE: case WM_CREATE: { - CREATESTRUCT32W *cs = (CREATESTRUCT32W *)HeapAlloc( SystemHeap, 0, + CREATESTRUCTW *cs = (CREATESTRUCTW *)HeapAlloc( SystemHeap, 0, sizeof(*cs) ); if (!cs) return -1; - *cs = *(CREATESTRUCT32W *)*plparam; + *cs = *(CREATESTRUCTW *)*plparam; if (HIWORD(cs->lpszName)) cs->lpszName = HEAP_strdupAtoW( SystemHeap, 0, (LPCSTR)cs->lpszName ); @@ -464,10 +464,10 @@ return 1; case WM_MDICREATE: { - MDICREATESTRUCT32W *cs = - (MDICREATESTRUCT32W *)HeapAlloc( SystemHeap, 0, sizeof(*cs) ); + MDICREATESTRUCTW *cs = + (MDICREATESTRUCTW *)HeapAlloc( SystemHeap, 0, sizeof(*cs) ); if (!cs) return -1; - *cs = *(MDICREATESTRUCT32W *)*plparam; + *cs = *(MDICREATESTRUCTW *)*plparam; if (HIWORD(cs->szClass)) cs->szClass = HEAP_strdupAtoW( SystemHeap, 0, (LPCSTR)cs->szClass ); @@ -479,13 +479,13 @@ return 1; /* Listbox */ - case LB_ADDSTRING32: - case LB_INSERTSTRING32: + case LB_ADDSTRING: + case LB_INSERTSTRING: if ( WINPROC_TestLBForStr( hwnd )) *plparam = (LPARAM)HEAP_strdupAtoW( SystemHeap, 0, (LPCSTR)*plparam ); return (*plparam ? 1 : -1); - case LB_GETTEXT32: /* fixme: fixed sized buffer */ + case LB_GETTEXT: /* fixme: fixed sized buffer */ { if ( WINPROC_TestLBForStr( hwnd )) { LPARAM *ptr = (LPARAM *)HeapAlloc( SystemHeap, 0, 256 * sizeof(WCHAR) + sizeof(LPARAM) ); if (!ptr) return -1; @@ -496,13 +496,13 @@ return 1; /* Combobox */ - case CB_ADDSTRING32: - case CB_INSERTSTRING32: + case CB_ADDSTRING: + case CB_INSERTSTRING: if ( WINPROC_TestCBForStr( hwnd )) *plparam = (LPARAM)HEAP_strdupAtoW( SystemHeap, 0, (LPCSTR)*plparam ); return (*plparam ? 1 : -1); - case CB_GETLBTEXT32: /* fixme: fixed sized buffer */ + case CB_GETLBTEXT: /* fixme: fixed sized buffer */ { if ( WINPROC_TestCBForStr( hwnd )) { LPARAM *ptr = (LPARAM *)HeapAlloc( SystemHeap, 0, 256 * sizeof(WCHAR) + sizeof(LPARAM) ); if (!ptr) return -1; @@ -513,7 +513,7 @@ return 1; /* Multiline edit */ - case EM_GETLINE32: + case EM_GETLINE: { WORD len = (WORD)*plparam; LPARAM *ptr = (LPARAM *) HEAP_xalloc( SystemHeap, 0, sizeof(LPARAM) + sizeof (WORD) + len*sizeof(WCHAR) ); if (!ptr) return -1; @@ -528,7 +528,7 @@ case WM_PAINTCLIPBOARD: case WM_SIZECLIPBOARD: case WM_WININICHANGE: - case EM_SETPASSWORDCHAR32: + case EM_SETPASSWORDCHAR: FIXME(msg, "message %s (0x%x) needs translation, please report\n", SPY_GetMsgName(msg), msg ); return -1; default: /* No translation needed */ @@ -542,7 +542,7 @@ * * Unmap a message that was mapped from Ansi to Unicode. */ -void WINPROC_UnmapMsg32ATo32W( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam ) +void WINPROC_UnmapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { switch(msg) { @@ -557,7 +557,7 @@ case WM_NCCREATE: case WM_CREATE: { - CREATESTRUCT32W *cs = (CREATESTRUCT32W *)lParam; + CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam; if (HIWORD(cs->lpszName)) HeapFree( SystemHeap, 0, (LPVOID)cs->lpszName ); if (HIWORD(cs->lpszClass)) @@ -568,7 +568,7 @@ case WM_MDICREATE: { - MDICREATESTRUCT32W *cs = (MDICREATESTRUCT32W *)lParam; + MDICREATESTRUCTW *cs = (MDICREATESTRUCTW *)lParam; if (HIWORD(cs->szTitle)) HeapFree( SystemHeap, 0, (LPVOID)cs->szTitle ); if (HIWORD(cs->szClass)) @@ -578,26 +578,26 @@ break; case WM_SETTEXT: - case CB_DIR32: - case CB_FINDSTRING32: - case CB_FINDSTRINGEXACT32: - case CB_SELECTSTRING32: - case LB_DIR32: - case LB_ADDFILE32: - case LB_FINDSTRING32: - case LB_SELECTSTRING32: - case EM_REPLACESEL32: + case CB_DIR: + case CB_FINDSTRING: + case CB_FINDSTRINGEXACT: + case CB_SELECTSTRING: + case LB_DIR: + case LB_ADDFILE: + case LB_FINDSTRING: + case LB_SELECTSTRING: + case EM_REPLACESEL: HeapFree( SystemHeap, 0, (void *)lParam ); break; /* Listbox */ - case LB_ADDSTRING32: - case LB_INSERTSTRING32: + case LB_ADDSTRING: + case LB_INSERTSTRING: if ( WINPROC_TestLBForStr( hwnd )) HeapFree( SystemHeap, 0, (void *)lParam ); break; - case LB_GETTEXT32: + case LB_GETTEXT: { if ( WINPROC_TestLBForStr( hwnd )) { LPARAM *ptr = (LPARAM *)lParam - 1; lstrcpyWtoA( (LPSTR)*ptr, (LPWSTR)(lParam) ); @@ -607,13 +607,13 @@ break; /* Combobox */ - case CB_ADDSTRING32: - case CB_INSERTSTRING32: + case CB_ADDSTRING: + case CB_INSERTSTRING: if ( WINPROC_TestCBForStr( hwnd )) HeapFree( SystemHeap, 0, (void *)lParam ); break; - case CB_GETLBTEXT32: + case CB_GETLBTEXT: { if ( WINPROC_TestCBForStr( hwnd )) { LPARAM *ptr = (LPARAM *)lParam - 1; lstrcpyWtoA( (LPSTR)*ptr, (LPWSTR)(lParam) ); @@ -623,7 +623,7 @@ break; /* Multiline edit */ - case EM_GETLINE32: + case EM_GETLINE: { LPARAM * ptr = (LPARAM *)lParam - 1; /* get the old lParam */ WORD len = *(WORD *) lParam; lstrcpynWtoA( (LPSTR)*ptr , (LPWSTR)lParam, len ); @@ -640,7 +640,7 @@ * Map a message from Unicode to Ansi. * Return value is -1 on error, 0 if OK, 1 if an UnmapMsg call is needed. */ -INT32 WINPROC_MapMsg32WTo32A( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM *plparam ) +INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPARAM *plparam ) { switch(msg) { case WM_GETTEXT: @@ -654,25 +654,25 @@ return 1; case WM_SETTEXT: - case CB_DIR32: - case CB_FINDSTRING32: - case CB_FINDSTRINGEXACT32: - case CB_SELECTSTRING32: - case LB_DIR32: - case LB_ADDFILE32: - case LB_FINDSTRING32: - case LB_SELECTSTRING32: - case EM_REPLACESEL32: + case CB_DIR: + case CB_FINDSTRING: + case CB_FINDSTRINGEXACT: + case CB_SELECTSTRING: + case LB_DIR: + case LB_ADDFILE: + case LB_FINDSTRING: + case LB_SELECTSTRING: + case EM_REPLACESEL: *plparam = (LPARAM)HEAP_strdupWtoA( SystemHeap, 0, (LPCWSTR)*plparam ); return (*plparam ? 1 : -1); case WM_NCCREATE: case WM_CREATE: { - CREATESTRUCT32A *cs = (CREATESTRUCT32A *)HeapAlloc( SystemHeap, 0, + CREATESTRUCTA *cs = (CREATESTRUCTA *)HeapAlloc( SystemHeap, 0, sizeof(*cs) ); if (!cs) return -1; - *cs = *(CREATESTRUCT32A *)*plparam; + *cs = *(CREATESTRUCTA *)*plparam; if (HIWORD(cs->lpszName)) cs->lpszName = HEAP_strdupWtoA( SystemHeap, 0, (LPCWSTR)cs->lpszName ); @@ -684,10 +684,10 @@ return 1; case WM_MDICREATE: { - MDICREATESTRUCT32A *cs = - (MDICREATESTRUCT32A *)HeapAlloc( SystemHeap, 0, sizeof(*cs) ); + MDICREATESTRUCTA *cs = + (MDICREATESTRUCTA *)HeapAlloc( SystemHeap, 0, sizeof(*cs) ); if (!cs) return -1; - *cs = *(MDICREATESTRUCT32A *)*plparam; + *cs = *(MDICREATESTRUCTA *)*plparam; if (HIWORD(cs->szTitle)) cs->szTitle = HEAP_strdupWtoA( SystemHeap, 0, (LPCWSTR)cs->szTitle ); @@ -699,13 +699,13 @@ return 1; /* Listbox */ - case LB_ADDSTRING32: - case LB_INSERTSTRING32: + case LB_ADDSTRING: + case LB_INSERTSTRING: if ( WINPROC_TestLBForStr( hwnd )) *plparam = (LPARAM)HEAP_strdupWtoA( SystemHeap, 0, (LPCWSTR)*plparam ); return (*plparam ? 1 : -1); - case LB_GETTEXT32: /* fixme: fixed sized buffer */ + case LB_GETTEXT: /* fixme: fixed sized buffer */ { if ( WINPROC_TestLBForStr( hwnd )) { LPARAM *ptr = (LPARAM *)HeapAlloc( SystemHeap, 0, 256 + sizeof(LPARAM) ); if (!ptr) return -1; @@ -716,13 +716,13 @@ return 1; /* Combobox */ - case CB_ADDSTRING32: - case CB_INSERTSTRING32: + case CB_ADDSTRING: + case CB_INSERTSTRING: if ( WINPROC_TestCBForStr( hwnd )) *plparam = (LPARAM)HEAP_strdupWtoA( SystemHeap, 0, (LPCWSTR)*plparam ); return (*plparam ? 1 : -1); - case CB_GETLBTEXT32: /* fixme: fixed sized buffer */ + case CB_GETLBTEXT: /* fixme: fixed sized buffer */ { if ( WINPROC_TestCBForStr( hwnd )) { LPARAM *ptr = (LPARAM *)HeapAlloc( SystemHeap, 0, 256 + sizeof(LPARAM) ); if (!ptr) return -1; @@ -733,7 +733,7 @@ return 1; /* Multiline edit */ - case EM_GETLINE32: + case EM_GETLINE: { WORD len = (WORD)*plparam; LPARAM *ptr = (LPARAM *) HEAP_xalloc( SystemHeap, 0, sizeof(LPARAM) + sizeof (WORD) + len*sizeof(CHAR) ); if (!ptr) return -1; @@ -748,7 +748,7 @@ case WM_PAINTCLIPBOARD: case WM_SIZECLIPBOARD: case WM_WININICHANGE: - case EM_SETPASSWORDCHAR32: + case EM_SETPASSWORDCHAR: FIXME(msg, "message %s (%04x) needs translation, please report\n",SPY_GetMsgName(msg),msg ); return -1; default: /* No translation needed */ @@ -762,7 +762,7 @@ * * Unmap a message that was mapped from Unicode to Ansi. */ -void WINPROC_UnmapMsg32WTo32A( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam ) +void WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { switch(msg) { @@ -775,22 +775,22 @@ break; case WM_SETTEXT: - case CB_DIR32: - case CB_FINDSTRING32: - case CB_FINDSTRINGEXACT32: - case CB_SELECTSTRING32: - case LB_DIR32: - case LB_ADDFILE32: - case LB_FINDSTRING32: - case LB_SELECTSTRING32: - case EM_REPLACESEL32: + case CB_DIR: + case CB_FINDSTRING: + case CB_FINDSTRINGEXACT: + case CB_SELECTSTRING: + case LB_DIR: + case LB_ADDFILE: + case LB_FINDSTRING: + case LB_SELECTSTRING: + case EM_REPLACESEL: HeapFree( SystemHeap, 0, (void *)lParam ); break; case WM_NCCREATE: case WM_CREATE: { - CREATESTRUCT32A *cs = (CREATESTRUCT32A *)lParam; + CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam; if (HIWORD(cs->lpszName)) HeapFree( SystemHeap, 0, (LPVOID)cs->lpszName ); if (HIWORD(cs->lpszClass)) @@ -801,7 +801,7 @@ case WM_MDICREATE: { - MDICREATESTRUCT32A *cs = (MDICREATESTRUCT32A *)lParam; + MDICREATESTRUCTA *cs = (MDICREATESTRUCTA *)lParam; if (HIWORD(cs->szTitle)) HeapFree( SystemHeap, 0, (LPVOID)cs->szTitle ); if (HIWORD(cs->szClass)) @@ -811,13 +811,13 @@ break; /* Listbox */ - case LB_ADDSTRING32: - case LB_INSERTSTRING32: + case LB_ADDSTRING: + case LB_INSERTSTRING: if ( WINPROC_TestLBForStr( hwnd )) HeapFree( SystemHeap, 0, (void *)lParam ); break; - case LB_GETTEXT32: + case LB_GETTEXT: { if ( WINPROC_TestLBForStr( hwnd )) { LPARAM *ptr = (LPARAM *)lParam - 1; lstrcpyAtoW( (LPWSTR)*ptr, (LPSTR)(lParam) ); @@ -827,13 +827,13 @@ break; /* Combobox */ - case CB_ADDSTRING32: - case CB_INSERTSTRING32: + case CB_ADDSTRING: + case CB_INSERTSTRING: if ( WINPROC_TestCBForStr( hwnd )) HeapFree( SystemHeap, 0, (void *)lParam ); break; - case CB_GETLBTEXT32: + case CB_GETLBTEXT: { if ( WINPROC_TestCBForStr( hwnd )) { LPARAM *ptr = (LPARAM *)lParam - 1; lstrcpyAtoW( (LPWSTR)*ptr, (LPSTR)(lParam) ); @@ -843,7 +843,7 @@ break; /* Multiline edit */ - case EM_GETLINE32: + case EM_GETLINE: { LPARAM * ptr = (LPARAM *)lParam - 1; /* get the old lparam */ WORD len = *(WORD *)ptr; lstrcpynAtoW( (LPWSTR) *ptr, (LPSTR)lParam, len ); @@ -860,11 +860,11 @@ * Map a message from 16- to 32-bit Ansi. * Return value is -1 on error, 0 if OK, 1 if an UnmapMsg call is needed. */ -INT32 WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT32 *pmsg32, - WPARAM32 *pwparam32, LPARAM *plparam ) +INT WINPROC_MapMsg16To32A( UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32, + WPARAM *pwparam32, LPARAM *plparam ) { - *pmsg32 = (UINT32)msg16; - *pwparam32 = (WPARAM32)wParam16; + *pmsg32 = (UINT)msg16; + *pwparam32 = (WPARAM)wParam16; switch(msg16) { case WM_ACTIVATE: @@ -872,23 +872,23 @@ case WM_COMMAND: case WM_VKEYTOITEM: *pwparam32 = MAKEWPARAM( wParam16, HIWORD(*plparam) ); - *plparam = (LPARAM)(HWND32)LOWORD(*plparam); + *plparam = (LPARAM)(HWND)LOWORD(*plparam); return 0; case WM_HSCROLL: case WM_VSCROLL: *pwparam32 = MAKEWPARAM( wParam16, LOWORD(*plparam) ); - *plparam = (LPARAM)(HWND32)HIWORD(*plparam); + *plparam = (LPARAM)(HWND)HIWORD(*plparam); return 0; case WM_CTLCOLOR: if ( HIWORD(*plparam) > CTLCOLOR_STATIC ) return -1; *pmsg32 = WM_CTLCOLORMSGBOX + HIWORD(*plparam); - *pwparam32 = (WPARAM32)(HDC32)wParam16; - *plparam = (LPARAM)(HWND32)LOWORD(*plparam); + *pwparam32 = (WPARAM)(HDC)wParam16; + *plparam = (LPARAM)(HWND)LOWORD(*plparam); return 0; case WM_COMPAREITEM: { COMPAREITEMSTRUCT16* cis16 = (COMPAREITEMSTRUCT16 *)PTR_SEG_TO_LIN(*plparam); - COMPAREITEMSTRUCT32 *cis = (COMPAREITEMSTRUCT32 *) + COMPAREITEMSTRUCT *cis = (COMPAREITEMSTRUCT *) HeapAlloc(SystemHeap, 0, sizeof(*cis)); if (!cis) return -1; cis->CtlType = cis16->CtlType; @@ -905,7 +905,7 @@ case WM_DELETEITEM: { DELETEITEMSTRUCT16* dis16 = (DELETEITEMSTRUCT16 *)PTR_SEG_TO_LIN(*plparam); - DELETEITEMSTRUCT32 *dis = (DELETEITEMSTRUCT32 *) + DELETEITEMSTRUCT *dis = (DELETEITEMSTRUCT *) HeapAlloc(SystemHeap, 0, sizeof(*dis)); if (!dis) return -1; dis->CtlType = dis16->CtlType; @@ -918,7 +918,7 @@ case WM_MEASUREITEM: { MEASUREITEMSTRUCT16* mis16 = (MEASUREITEMSTRUCT16 *)PTR_SEG_TO_LIN(*plparam); - MEASUREITEMSTRUCT32 *mis = (MEASUREITEMSTRUCT32 *) + MEASUREITEMSTRUCT *mis = (MEASUREITEMSTRUCT *) HeapAlloc(SystemHeap, 0, sizeof(*mis) + sizeof(LPARAM)); if (!mis) return -1; @@ -935,7 +935,7 @@ case WM_DRAWITEM: { DRAWITEMSTRUCT16* dis16 = (DRAWITEMSTRUCT16 *)PTR_SEG_TO_LIN(*plparam); - DRAWITEMSTRUCT32 *dis = (DRAWITEMSTRUCT32*)HeapAlloc(SystemHeap, 0, + DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT*)HeapAlloc(SystemHeap, 0, sizeof(*dis)); if (!dis) return -1; dis->CtlType = dis16->CtlType; @@ -952,7 +952,7 @@ return 1; case WM_GETMINMAXINFO: { - MINMAXINFO32 *mmi = (MINMAXINFO32 *)HeapAlloc( SystemHeap, 0, + MINMAXINFO *mmi = (MINMAXINFO *)HeapAlloc( SystemHeap, 0, sizeof(*mmi) + sizeof(LPARAM)); if (!mmi) return -1; STRUCT32_MINMAXINFO16to32( (MINMAXINFO16*)PTR_SEG_TO_LIN(*plparam), @@ -969,8 +969,8 @@ { MDICREATESTRUCT16 *cs16 = (MDICREATESTRUCT16 *)PTR_SEG_TO_LIN(*plparam); - MDICREATESTRUCT32A *cs = - (MDICREATESTRUCT32A *)HeapAlloc( SystemHeap, 0, + MDICREATESTRUCTA *cs = + (MDICREATESTRUCTA *)HeapAlloc( SystemHeap, 0, sizeof(*cs) + sizeof(LPARAM) ); if (!cs) return -1; STRUCT32_MDICREATESTRUCT16to32A( cs16, cs ); @@ -981,25 +981,25 @@ } return 1; case WM_MDIGETACTIVE: - *plparam = (LPARAM)HeapAlloc( SystemHeap, 0, sizeof(BOOL32) ); - *(BOOL32*)(*plparam) = 0; + *plparam = (LPARAM)HeapAlloc( SystemHeap, 0, sizeof(BOOL) ); + *(BOOL*)(*plparam) = 0; return 1; case WM_MDISETMENU: if(wParam16==TRUE) *pmsg32=WM_MDIREFRESHMENU; - *pwparam32 = (WPARAM32)(HMENU32)LOWORD(*plparam); - *plparam = (LPARAM)(HMENU32)HIWORD(*plparam); + *pwparam32 = (WPARAM)(HMENU)LOWORD(*plparam); + *plparam = (LPARAM)(HMENU)HIWORD(*plparam); return 0; case WM_MENUCHAR: case WM_MENUSELECT: *pwparam32 = MAKEWPARAM( wParam16, LOWORD(*plparam) ); - *plparam = (LPARAM)(HMENU32)HIWORD(*plparam); + *plparam = (LPARAM)(HMENU)HIWORD(*plparam); return 0; case WM_MDIACTIVATE: if( *plparam ) { - *pwparam32 = (WPARAM32)(HWND32)HIWORD(*plparam); - *plparam = (LPARAM)(HWND32)LOWORD(*plparam); + *pwparam32 = (WPARAM)(HWND)HIWORD(*plparam); + *plparam = (LPARAM)(HWND)LOWORD(*plparam); } else /* message sent to MDI client */ *pwparam32 = wParam16; @@ -1007,16 +1007,16 @@ case WM_NCCALCSIZE: { NCCALCSIZE_PARAMS16 *nc16; - NCCALCSIZE_PARAMS32 *nc; + NCCALCSIZE_PARAMS *nc; - nc = (NCCALCSIZE_PARAMS32 *)HeapAlloc( SystemHeap, 0, + nc = (NCCALCSIZE_PARAMS *)HeapAlloc( SystemHeap, 0, sizeof(*nc) + sizeof(LPARAM) ); if (!nc) return -1; nc16 = (NCCALCSIZE_PARAMS16 *)PTR_SEG_TO_LIN(*plparam); CONV_RECT16TO32( &nc16->rgrc[0], &nc->rgrc[0] ); if (wParam16) { - nc->lppos = (WINDOWPOS32 *)HeapAlloc( SystemHeap, 0, + nc->lppos = (WINDOWPOS *)HeapAlloc( SystemHeap, 0, sizeof(*nc->lppos) ); CONV_RECT16TO32( &nc16->rgrc[1], &nc->rgrc[1] ); CONV_RECT16TO32( &nc16->rgrc[2], &nc->rgrc[2] ); @@ -1030,7 +1030,7 @@ case WM_CREATE: { CREATESTRUCT16 *cs16 = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(*plparam); - CREATESTRUCT32A *cs = (CREATESTRUCT32A *)HeapAlloc( SystemHeap, 0, + CREATESTRUCTA *cs = (CREATESTRUCTA *)HeapAlloc( SystemHeap, 0, sizeof(*cs) + sizeof(LPARAM) ); if (!cs) return -1; STRUCT32_CREATESTRUCT16to32A( cs16, cs ); @@ -1044,13 +1044,13 @@ if ((wParam16 == WM_CREATE) || (wParam16 == WM_DESTROY)) { *pwparam32 = MAKEWPARAM( wParam16, HIWORD(*plparam) ); - *plparam = (LPARAM)(HWND32)LOWORD(*plparam); + *plparam = (LPARAM)(HWND)LOWORD(*plparam); } return 0; case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGED: { - WINDOWPOS32 *wp = (WINDOWPOS32 *)HeapAlloc( SystemHeap, 0, + WINDOWPOS *wp = (WINDOWPOS *)HeapAlloc( SystemHeap, 0, sizeof(*wp) + sizeof(LPARAM) ); if (!wp) return -1; STRUCT32_WINDOWPOS16to32( (WINDOWPOS16 *)PTR_SEG_TO_LIN(*plparam), @@ -1063,7 +1063,7 @@ if (*plparam) { LPMSG16 msg16 = (LPMSG16)PTR_SEG_TO_LIN(*plparam); - LPMSG32 msg32 = (LPMSG32)HeapAlloc( SystemHeap, 0, sizeof(MSG32) ); + LPMSG msg32 = (LPMSG)HeapAlloc( SystemHeap, 0, sizeof(MSG) ); if (!msg32) return -1; msg32->hwnd = msg16->hwnd; @@ -1114,7 +1114,7 @@ * * Unmap a message that was mapped from 16- to 32-bit Ansi. */ -LRESULT WINPROC_UnmapMsg16To32A( HWND16 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam, +LRESULT WINPROC_UnmapMsg16To32A( HWND16 hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT result ) { switch(msg) @@ -1127,7 +1127,7 @@ case WM_MEASUREITEM: { MEASUREITEMSTRUCT16 *mis16; - MEASUREITEMSTRUCT32 *mis = (MEASUREITEMSTRUCT32 *)lParam; + MEASUREITEMSTRUCT *mis = (MEASUREITEMSTRUCT *)lParam; lParam = *(LPARAM *)(mis + 1); mis16 = (MEASUREITEMSTRUCT16 *)PTR_SEG_TO_LIN(lParam); mis16->itemWidth = (UINT16)mis->itemWidth; @@ -1137,7 +1137,7 @@ break; case WM_GETMINMAXINFO: { - MINMAXINFO32 *mmi = (MINMAXINFO32 *)lParam; + MINMAXINFO *mmi = (MINMAXINFO *)lParam; lParam = *(LPARAM *)(mmi + 1); STRUCT32_MINMAXINFO32to16( mmi, (MINMAXINFO16 *)PTR_SEG_TO_LIN(lParam)); @@ -1146,7 +1146,7 @@ break; case WM_MDICREATE: { - MDICREATESTRUCT32A *cs = (MDICREATESTRUCT32A *)lParam; + MDICREATESTRUCTA *cs = (MDICREATESTRUCTA *)lParam; lParam = *(LPARAM *)(cs + 1); STRUCT32_MDICREATESTRUCT32Ato16( cs, (MDICREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam) ); @@ -1154,13 +1154,13 @@ } break; case WM_MDIGETACTIVE: - result = MAKELONG( LOWORD(result), (BOOL16)(*(BOOL32 *)lParam) ); - HeapFree( SystemHeap, 0, (BOOL32 *)lParam ); + result = MAKELONG( LOWORD(result), (BOOL16)(*(BOOL *)lParam) ); + HeapFree( SystemHeap, 0, (BOOL *)lParam ); break; case WM_NCCALCSIZE: { NCCALCSIZE_PARAMS16 *nc16; - NCCALCSIZE_PARAMS32 *nc = (NCCALCSIZE_PARAMS32 *)lParam; + NCCALCSIZE_PARAMS *nc = (NCCALCSIZE_PARAMS *)lParam; lParam = *(LPARAM *)(nc + 1); nc16 = (NCCALCSIZE_PARAMS16 *)PTR_SEG_TO_LIN(lParam); CONV_RECT32TO16( &nc->rgrc[0], &nc16->rgrc[0] ); @@ -1181,7 +1181,7 @@ case WM_NCCREATE: case WM_CREATE: { - CREATESTRUCT32A *cs = (CREATESTRUCT32A *)lParam; + CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam; lParam = *(LPARAM *)(cs + 1); STRUCT32_CREATESTRUCT32Ato16( cs, (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam) ); @@ -1191,7 +1191,7 @@ case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGED: { - WINDOWPOS32 *wp = (WINDOWPOS32 *)lParam; + WINDOWPOS *wp = (WINDOWPOS *)lParam; lParam = *(LPARAM *)(wp + 1); STRUCT32_WINDOWPOS32to16(wp,(WINDOWPOS16 *)PTR_SEG_TO_LIN(lParam)); HeapFree( SystemHeap, 0, wp ); @@ -1200,7 +1200,7 @@ case WM_GETDLGCODE: if (lParam) { - LPMSG32 msg32 = (LPMSG32)lParam; + LPMSG msg32 = (LPMSG)lParam; WINPROC_UnmapMsg16To32A( hwnd, msg32->message, msg32->wParam, msg32->lParam, result); @@ -1218,8 +1218,8 @@ * Map a message from 16- to 32-bit Unicode. * Return value is -1 on error, 0 if OK, 1 if an UnmapMsg call is needed. */ -INT32 WINPROC_MapMsg16To32W( HWND16 hwnd, UINT16 msg16, WPARAM16 wParam16, UINT32 *pmsg32, - WPARAM32 *pwparam32, LPARAM *plparam ) +INT WINPROC_MapMsg16To32W( HWND16 hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pmsg32, + WPARAM *pwparam32, LPARAM *plparam ) { switch(msg16) { @@ -1231,10 +1231,10 @@ case WM_CREATE: { CREATESTRUCT16 *cs16 = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(*plparam); - CREATESTRUCT32W *cs = (CREATESTRUCT32W *)HeapAlloc( SystemHeap, 0, + CREATESTRUCTW *cs = (CREATESTRUCTW *)HeapAlloc( SystemHeap, 0, sizeof(*cs) + sizeof(LPARAM) ); if (!cs) return -1; - STRUCT32_CREATESTRUCT16to32A( cs16, (CREATESTRUCT32A *)cs ); + STRUCT32_CREATESTRUCT16to32A( cs16, (CREATESTRUCTA *)cs ); cs->lpszName = (LPCWSTR)PTR_SEG_TO_LIN(cs16->lpszName); cs->lpszClass = (LPCWSTR)PTR_SEG_TO_LIN(cs16->lpszClass); if (HIWORD(cs->lpszName)) @@ -1251,11 +1251,11 @@ { MDICREATESTRUCT16 *cs16 = (MDICREATESTRUCT16 *)PTR_SEG_TO_LIN(*plparam); - MDICREATESTRUCT32W *cs = - (MDICREATESTRUCT32W *)HeapAlloc( SystemHeap, 0, + MDICREATESTRUCTW *cs = + (MDICREATESTRUCTW *)HeapAlloc( SystemHeap, 0, sizeof(*cs) + sizeof(LPARAM) ); if (!cs) return -1; - STRUCT32_MDICREATESTRUCT16to32A( cs16, (MDICREATESTRUCT32A *)cs ); + STRUCT32_MDICREATESTRUCT16to32A( cs16, (MDICREATESTRUCTA *)cs ); cs->szTitle = (LPCWSTR)PTR_SEG_TO_LIN(cs16->szTitle); cs->szClass = (LPCWSTR)PTR_SEG_TO_LIN(cs16->szClass); if (HIWORD(cs->szTitle)) @@ -1272,7 +1272,7 @@ if (*plparam) { LPMSG16 msg16 = (LPMSG16)PTR_SEG_TO_LIN(*plparam); - LPMSG32 msg32 = (LPMSG32)HeapAlloc( SystemHeap, 0, sizeof(MSG32) ); + LPMSG msg32 = (LPMSG)HeapAlloc( SystemHeap, 0, sizeof(MSG) ); if (!msg32) return -1; msg32->hwnd = msg16->hwnd; @@ -1302,7 +1302,7 @@ * * Unmap a message that was mapped from 16- to 32-bit Unicode. */ -LRESULT WINPROC_UnmapMsg16To32W( HWND16 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam, +LRESULT WINPROC_UnmapMsg16To32W( HWND16 hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT result ) { switch(msg) @@ -1314,9 +1314,9 @@ case WM_NCCREATE: case WM_CREATE: { - CREATESTRUCT32W *cs = (CREATESTRUCT32W *)lParam; + CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam; lParam = *(LPARAM *)(cs + 1); - STRUCT32_CREATESTRUCT32Ato16( (CREATESTRUCT32A *)cs, + STRUCT32_CREATESTRUCT32Ato16( (CREATESTRUCTA *)cs, (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam) ); if (HIWORD(cs->lpszName)) HeapFree( SystemHeap, 0, (LPVOID)cs->lpszName ); @@ -1327,9 +1327,9 @@ break; case WM_MDICREATE: { - MDICREATESTRUCT32W *cs = (MDICREATESTRUCT32W *)lParam; + MDICREATESTRUCTW *cs = (MDICREATESTRUCTW *)lParam; lParam = *(LPARAM *)(cs + 1); - STRUCT32_MDICREATESTRUCT32Ato16( (MDICREATESTRUCT32A *)cs, + STRUCT32_MDICREATESTRUCT32Ato16( (MDICREATESTRUCTA *)cs, (MDICREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam) ); if (HIWORD(cs->szTitle)) HeapFree( SystemHeap, 0, (LPVOID)cs->szTitle ); @@ -1341,7 +1341,7 @@ case WM_GETDLGCODE: if (lParam) { - LPMSG32 msg32 = (LPMSG32)lParam; + LPMSG msg32 = (LPMSG)lParam; WINPROC_UnmapMsg16To32W( hwnd, msg32->message, msg32->wParam, msg32->lParam, result); @@ -1361,7 +1361,7 @@ * Map a message from 32-bit Ansi to 16-bit. * Return value is -1 on error, 0 if OK, 1 if an UnmapMsg call is needed. */ -INT32 WINPROC_MapMsg32ATo16( HWND32 hwnd, UINT32 msg32, WPARAM32 wParam32, +INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32, UINT16 *pmsg16, WPARAM16 *pwparam16, LPARAM *plparam ) { @@ -1369,126 +1369,126 @@ *pwparam16 = (WPARAM16)LOWORD(wParam32); switch(msg32) { - case BM_GETCHECK32: - case BM_SETCHECK32: - case BM_GETSTATE32: - case BM_SETSTATE32: - case BM_SETSTYLE32: - *pmsg16 = (UINT16)msg32 + (BM_GETCHECK16 - BM_GETCHECK32); + case BM_GETCHECK: + case BM_SETCHECK: + case BM_GETSTATE: + case BM_SETSTATE: + case BM_SETSTYLE: + *pmsg16 = (UINT16)msg32 + (BM_GETCHECK16 - BM_GETCHECK); return 0; - case EM_GETSEL32: - case EM_GETRECT32: - case EM_SETRECT32: - case EM_SETRECTNP32: - case EM_SCROLL32: - case EM_LINESCROLL32: - case EM_SCROLLCARET32: - case EM_GETMODIFY32: - case EM_SETMODIFY32: - case EM_GETLINECOUNT32: - case EM_LINEINDEX32: - case EM_SETHANDLE32: - case EM_GETHANDLE32: - case EM_GETTHUMB32: - case EM_LINELENGTH32: - case EM_REPLACESEL32: - case EM_GETLINE32: - case EM_LIMITTEXT32: - case EM_CANUNDO32: - case EM_UNDO32: - case EM_FMTLINES32: - case EM_LINEFROMCHAR32: - case EM_SETTABSTOPS32: - case EM_SETPASSWORDCHAR32: - case EM_EMPTYUNDOBUFFER32: - case EM_GETFIRSTVISIBLELINE32: - case EM_SETREADONLY32: - case EM_SETWORDBREAKPROC32: - case EM_GETWORDBREAKPROC32: - case EM_GETPASSWORDCHAR32: - *pmsg16 = (UINT16)msg32 + (EM_GETSEL16 - EM_GETSEL32); + case EM_GETSEL: + case EM_GETRECT: + case EM_SETRECT: + case EM_SETRECTNP: + case EM_SCROLL: + case EM_LINESCROLL: + case EM_SCROLLCARET: + case EM_GETMODIFY: + case EM_SETMODIFY: + case EM_GETLINECOUNT: + case EM_LINEINDEX: + case EM_SETHANDLE: + case EM_GETHANDLE: + case EM_GETTHUMB: + case EM_LINELENGTH: + case EM_REPLACESEL: + case EM_GETLINE: + case EM_LIMITTEXT: + case EM_CANUNDO: + case EM_UNDO: + case EM_FMTLINES: + case EM_LINEFROMCHAR: + case EM_SETTABSTOPS: + case EM_SETPASSWORDCHAR: + case EM_EMPTYUNDOBUFFER: + case EM_GETFIRSTVISIBLELINE: + case EM_SETREADONLY: + case EM_SETWORDBREAKPROC: + case EM_GETWORDBREAKPROC: + case EM_GETPASSWORDCHAR: + *pmsg16 = (UINT16)msg32 + (EM_GETSEL16 - EM_GETSEL); return 0; - case LB_CARETOFF32: - case LB_CARETON32: - case LB_DELETESTRING32: - case LB_GETANCHORINDEX32: - case LB_GETCARETINDEX32: - case LB_GETCOUNT32: - case LB_GETCURSEL32: - case LB_GETHORIZONTALEXTENT32: - case LB_GETITEMDATA32: - case LB_GETITEMHEIGHT32: - case LB_GETSEL32: - case LB_GETSELCOUNT32: - case LB_GETTEXTLEN32: - case LB_GETTOPINDEX32: - case LB_RESETCONTENT32: - case LB_SELITEMRANGE32: - case LB_SELITEMRANGEEX32: - case LB_SETANCHORINDEX32: - case LB_SETCARETINDEX32: - case LB_SETCOLUMNWIDTH32: - case LB_SETCURSEL32: - case LB_SETHORIZONTALEXTENT32: - case LB_SETITEMDATA32: - case LB_SETITEMHEIGHT32: - case LB_SETSEL32: - case LB_SETTOPINDEX32: - *pmsg16 = (UINT16)msg32 + (LB_ADDSTRING16 - LB_ADDSTRING32); + case LB_CARETOFF: + case LB_CARETON: + case LB_DELETESTRING: + case LB_GETANCHORINDEX: + case LB_GETCARETINDEX: + case LB_GETCOUNT: + case LB_GETCURSEL: + case LB_GETHORIZONTALEXTENT: + case LB_GETITEMDATA: + case LB_GETITEMHEIGHT: + case LB_GETSEL: + case LB_GETSELCOUNT: + case LB_GETTEXTLEN: + case LB_GETTOPINDEX: + case LB_RESETCONTENT: + case LB_SELITEMRANGE: + case LB_SELITEMRANGEEX: + case LB_SETANCHORINDEX: + case LB_SETCARETINDEX: + case LB_SETCOLUMNWIDTH: + case LB_SETCURSEL: + case LB_SETHORIZONTALEXTENT: + case LB_SETITEMDATA: + case LB_SETITEMHEIGHT: + case LB_SETSEL: + case LB_SETTOPINDEX: + *pmsg16 = (UINT16)msg32 + (LB_ADDSTRING16 - LB_ADDSTRING); return 0; - case CB_DELETESTRING32: - case CB_GETCOUNT32: - case CB_GETLBTEXTLEN32: - case CB_LIMITTEXT32: - case CB_RESETCONTENT32: - case CB_SETEDITSEL32: - case CB_GETCURSEL32: - case CB_SETCURSEL32: - case CB_SHOWDROPDOWN32: - case CB_SETITEMDATA32: - case CB_SETITEMHEIGHT32: - case CB_GETITEMHEIGHT32: - case CB_SETEXTENDEDUI32: - case CB_GETEXTENDEDUI32: - case CB_GETDROPPEDSTATE32: - *pmsg16 = (UINT16)msg32 + (CB_GETEDITSEL16 - CB_GETEDITSEL32); + case CB_DELETESTRING: + case CB_GETCOUNT: + case CB_GETLBTEXTLEN: + case CB_LIMITTEXT: + case CB_RESETCONTENT: + case CB_SETEDITSEL: + case CB_GETCURSEL: + case CB_SETCURSEL: + case CB_SHOWDROPDOWN: + case CB_SETITEMDATA: + case CB_SETITEMHEIGHT: + case CB_GETITEMHEIGHT: + case CB_SETEXTENDEDUI: + case CB_GETEXTENDEDUI: + case CB_GETDROPPEDSTATE: + *pmsg16 = (UINT16)msg32 + (CB_GETEDITSEL16 - CB_GETEDITSEL); return 0; - case CB_GETEDITSEL32: + case CB_GETEDITSEL: *pmsg16 = CB_GETEDITSEL16; return 1; - case LB_ADDSTRING32: - case LB_FINDSTRING32: - case LB_FINDSTRINGEXACT32: - case LB_INSERTSTRING32: - case LB_SELECTSTRING32: - case LB_DIR32: - case LB_ADDFILE32: + case LB_ADDSTRING: + case LB_FINDSTRING: + case LB_FINDSTRINGEXACT: + case LB_INSERTSTRING: + case LB_SELECTSTRING: + case LB_DIR: + case LB_ADDFILE: { LPSTR str = SEGPTR_STRDUP( (LPSTR)*plparam ); if (!str) return -1; *plparam = (LPARAM)SEGPTR_GET(str); } - *pmsg16 = (UINT16)msg32 + (LB_ADDSTRING16 - LB_ADDSTRING32); + *pmsg16 = (UINT16)msg32 + (LB_ADDSTRING16 - LB_ADDSTRING); return 1; - case CB_ADDSTRING32: - case CB_FINDSTRING32: - case CB_FINDSTRINGEXACT32: - case CB_INSERTSTRING32: - case CB_SELECTSTRING32: - case CB_DIR32: + case CB_ADDSTRING: + case CB_FINDSTRING: + case CB_FINDSTRINGEXACT: + case CB_INSERTSTRING: + case CB_SELECTSTRING: + case CB_DIR: { LPSTR str = SEGPTR_STRDUP( (LPSTR)*plparam ); if (!str) return -1; *plparam = (LPARAM)SEGPTR_GET(str); } - *pmsg16 = (UINT16)msg32 + (CB_GETEDITSEL16 - CB_GETEDITSEL32); + *pmsg16 = (UINT16)msg32 + (CB_GETEDITSEL16 - CB_GETEDITSEL); return 1; - case LB_GETITEMRECT32: + case LB_GETITEMRECT: { RECT16 *rect; rect = (RECT16 *)SEGPTR_ALLOC( sizeof(RECT16) + sizeof(LPARAM) ); @@ -1498,7 +1498,7 @@ } *pmsg16 = LB_GETITEMRECT16; return 1; - case LB_GETSELITEMS32: + case LB_GETSELITEMS: { LPINT16 items; *pwparam16 = (WPARAM16)MIN( wParam32, 0x7f80 ); /* Must be < 64K */ @@ -1509,22 +1509,22 @@ } *pmsg16 = LB_GETSELITEMS16; return 1; - case LB_SETTABSTOPS32: + case LB_SETTABSTOPS: if (wParam32) { - INT32 i; + INT i; LPINT16 stops; *pwparam16 = (WPARAM16)MIN( wParam32, 0x7f80 ); /* Must be < 64K */ if (!(stops = SEGPTR_ALLOC( *pwparam16 * sizeof(INT16) + sizeof(LPARAM)))) return -1; - for (i = 0; i < *pwparam16; i++) stops[i] = *((LPINT32)*plparam+i); + for (i = 0; i < *pwparam16; i++) stops[i] = *((LPINT)*plparam+i); *plparam = (LPARAM)SEGPTR_GET(stops); return 1; } *pmsg16 = LB_SETTABSTOPS16; return 0; - case CB_GETDROPPEDCONTROLRECT32: + case CB_GETDROPPEDCONTROLRECT: { RECT16 *rect; rect = (RECT16 *)SEGPTR_ALLOC( sizeof(RECT16) + sizeof(LPARAM) ); @@ -1535,19 +1535,19 @@ *pmsg16 = CB_GETDROPPEDCONTROLRECT16; return 1; - case LB_GETTEXT32: + case LB_GETTEXT: *plparam = (LPARAM)MapLS( (LPVOID)(*plparam) ); *pmsg16 = LB_GETTEXT16; return 1; - case CB_GETLBTEXT32: + case CB_GETLBTEXT: *plparam = (LPARAM)MapLS( (LPVOID)(*plparam) ); *pmsg16 = CB_GETLBTEXT16; return 1; - case EM_SETSEL32: + case EM_SETSEL: *pwparam16 = 0; - *plparam = MAKELONG( (INT16)(INT32)wParam32, (INT16)*plparam ); + *plparam = MAKELONG( (INT16)(INT)wParam32, (INT16)*plparam ); *pmsg16 = EM_SETSEL16; return 0; @@ -1574,7 +1574,7 @@ return 0; case WM_COMPAREITEM: { - COMPAREITEMSTRUCT32 *cis32 = (COMPAREITEMSTRUCT32 *)*plparam; + COMPAREITEMSTRUCT *cis32 = (COMPAREITEMSTRUCT *)*plparam; COMPAREITEMSTRUCT16 *cis = SEGPTR_NEW(COMPAREITEMSTRUCT16); if (!cis) return -1; cis->CtlType = (UINT16)cis32->CtlType; @@ -1589,7 +1589,7 @@ return 1; case WM_DELETEITEM: { - DELETEITEMSTRUCT32 *dis32 = (DELETEITEMSTRUCT32 *)*plparam; + DELETEITEMSTRUCT *dis32 = (DELETEITEMSTRUCT *)*plparam; DELETEITEMSTRUCT16 *dis = SEGPTR_NEW(DELETEITEMSTRUCT16); if (!dis) return -1; dis->CtlType = (UINT16)dis32->CtlType; @@ -1602,7 +1602,7 @@ return 1; case WM_DRAWITEM: { - DRAWITEMSTRUCT32 *dis32 = (DRAWITEMSTRUCT32 *)*plparam; + DRAWITEMSTRUCT *dis32 = (DRAWITEMSTRUCT *)*plparam; DRAWITEMSTRUCT16 *dis = SEGPTR_NEW(DRAWITEMSTRUCT16); if (!dis) return -1; dis->CtlType = (UINT16)dis32->CtlType; @@ -1619,7 +1619,7 @@ return 1; case WM_MEASUREITEM: { - MEASUREITEMSTRUCT32 *mis32 = (MEASUREITEMSTRUCT32 *)*plparam; + MEASUREITEMSTRUCT *mis32 = (MEASUREITEMSTRUCT *)*plparam; MEASUREITEMSTRUCT16 *mis = (MEASUREITEMSTRUCT16 *) SEGPTR_ALLOC(sizeof(*mis)+sizeof(LPARAM)); if (!mis) return -1; @@ -1638,7 +1638,7 @@ MINMAXINFO16 *mmi = (MINMAXINFO16 *)SEGPTR_ALLOC( sizeof(*mmi) + sizeof(LPARAM) ); if (!mmi) return -1; - STRUCT32_MINMAXINFO32to16( (MINMAXINFO32 *)*plparam, mmi ); + STRUCT32_MINMAXINFO32to16( (MINMAXINFO *)*plparam, mmi ); *(LPARAM *)(mmi + 1) = *plparam; /* Store the previous lParam */ *plparam = (LPARAM)SEGPTR_GET(mmi); } @@ -1655,7 +1655,7 @@ case WM_MDICREATE: { MDICREATESTRUCT16 *cs; - MDICREATESTRUCT32A *cs32 = (MDICREATESTRUCT32A *)*plparam; + MDICREATESTRUCTA *cs32 = (MDICREATESTRUCTA *)*plparam; LPSTR name, cls; if (!(cs = SEGPTR_NEW(MDICREATESTRUCT16))) return -1; @@ -1679,21 +1679,21 @@ *plparam = MAKELPARAM( HIWORD(wParam32), (HMENU16)*plparam ); return 0; case WM_MDIACTIVATE: - if( WIDGETS_IsControl32(WIN_FindWndPtr(hwnd), BIC32_MDICLIENT) ) + if( WIDGETS_IsControl(WIN_FindWndPtr(hwnd), BIC32_MDICLIENT) ) { - *pwparam16 = (HWND32)wParam32; + *pwparam16 = (HWND)wParam32; *plparam = 0; } else { - *pwparam16 = ((HWND32)*plparam == hwnd); + *pwparam16 = ((HWND)*plparam == hwnd); *plparam = MAKELPARAM( (HWND16)LOWORD(*plparam), (HWND16)LOWORD(wParam32) ); } return 0; case WM_NCCALCSIZE: { - NCCALCSIZE_PARAMS32 *nc32 = (NCCALCSIZE_PARAMS32 *)*plparam; + NCCALCSIZE_PARAMS *nc32 = (NCCALCSIZE_PARAMS *)*plparam; NCCALCSIZE_PARAMS16 *nc = (NCCALCSIZE_PARAMS16 *)SEGPTR_ALLOC( sizeof(*nc) + sizeof(LPARAM) ); if (!nc) return -1; @@ -1719,7 +1719,7 @@ case WM_CREATE: { CREATESTRUCT16 *cs; - CREATESTRUCT32A *cs32 = (CREATESTRUCT32A *)*plparam; + CREATESTRUCTA *cs32 = (CREATESTRUCTA *)*plparam; LPSTR name, cls; if (!(cs = SEGPTR_NEW(CREATESTRUCT16))) return -1; @@ -1752,14 +1752,14 @@ WINDOWPOS16 *wp = (WINDOWPOS16 *)SEGPTR_ALLOC( sizeof(*wp) + sizeof(LPARAM) ); if (!wp) return -1; - STRUCT32_WINDOWPOS32to16( (WINDOWPOS32 *)*plparam, wp ); + STRUCT32_WINDOWPOS32to16( (WINDOWPOS *)*plparam, wp ); *(LPARAM *)(wp + 1) = *plparam; /* Store the previous lParam */ *plparam = (LPARAM)SEGPTR_GET(wp); } return 1; case WM_GETDLGCODE: if (*plparam) { - LPMSG32 msg32 = (LPMSG32) *plparam; + LPMSG msg32 = (LPMSG) *plparam; LPMSG16 msg16 = (LPMSG16) SEGPTR_NEW( MSG16 ); if (!msg16) return -1; @@ -1801,25 +1801,25 @@ * * Unmap a message that was mapped from 32-bit Ansi to 16-bit. */ -void WINPROC_UnmapMsg32ATo16( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam, +void WINPROC_UnmapMsg32ATo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, MSGPARAM16* p16 ) { switch(msg) { - case LB_ADDFILE32: - case LB_ADDSTRING32: - case LB_DIR32: - case LB_FINDSTRING32: - case LB_FINDSTRINGEXACT32: - case LB_INSERTSTRING32: - case LB_SELECTSTRING32: - case LB_SETTABSTOPS32: - case CB_ADDSTRING32: - case CB_FINDSTRING32: - case CB_FINDSTRINGEXACT32: - case CB_INSERTSTRING32: - case CB_SELECTSTRING32: - case CB_DIR32: + case LB_ADDFILE: + case LB_ADDSTRING: + case LB_DIR: + case LB_FINDSTRING: + case LB_FINDSTRINGEXACT: + case LB_INSERTSTRING: + case LB_SELECTSTRING: + case LB_SETTABSTOPS: + case CB_ADDSTRING: + case CB_FINDSTRING: + case CB_FINDSTRINGEXACT: + case CB_INSERTSTRING: + case CB_SELECTSTRING: + case CB_DIR: case WM_COMPAREITEM: case WM_DELETEITEM: case WM_DRAWITEM: @@ -1827,41 +1827,41 @@ SEGPTR_FREE( PTR_SEG_TO_LIN(p16->lParam) ); break; - case CB_GETDROPPEDCONTROLRECT32: - case LB_GETITEMRECT32: + case CB_GETDROPPEDCONTROLRECT: + case LB_GETITEMRECT: { RECT16 *rect = (RECT16 *)PTR_SEG_TO_LIN(p16->lParam); p16->lParam = *(LPARAM *)(rect + 1); - CONV_RECT16TO32( rect, (RECT32 *)(p16->lParam)); + CONV_RECT16TO32( rect, (RECT *)(p16->lParam)); SEGPTR_FREE( rect ); } break; - case LB_GETSELITEMS32: + case LB_GETSELITEMS: { - INT32 i; + INT i; LPINT16 items = (LPINT16)PTR_SEG_TO_LIN(lParam); p16->lParam = *((LPARAM *)items - 1); - for (i = 0; i < p16->wParam; i++) *((LPINT32)(p16->lParam) + i) = items[i]; + for (i = 0; i < p16->wParam; i++) *((LPINT)(p16->lParam) + i) = items[i]; SEGPTR_FREE( (LPARAM *)items - 1 ); } break; - case CB_GETEDITSEL32: + case CB_GETEDITSEL: if( wParam ) - *((LPUINT32)(wParam)) = LOWORD(p16->lResult); + *((LPUINT)(wParam)) = LOWORD(p16->lResult); if( lParam ) - *((LPUINT32)(lParam)) = HIWORD(p16->lResult); /* FIXME: substract 1? */ + *((LPUINT)(lParam)) = HIWORD(p16->lResult); /* FIXME: substract 1? */ break; - case LB_GETTEXT32: - case CB_GETLBTEXT32: + case LB_GETTEXT: + case CB_GETLBTEXT: UnMapLS( (SEGPTR)(p16->lParam) ); break; case WM_MEASUREITEM: { MEASUREITEMSTRUCT16 *mis = (MEASUREITEMSTRUCT16 *)PTR_SEG_TO_LIN(p16->lParam); - MEASUREITEMSTRUCT32 *mis32 = *(MEASUREITEMSTRUCT32 **)(mis + 1); + MEASUREITEMSTRUCT *mis32 = *(MEASUREITEMSTRUCT **)(mis + 1); mis32->itemWidth = mis->itemWidth; mis32->itemHeight = mis->itemHeight; SEGPTR_FREE(mis); @@ -1871,7 +1871,7 @@ { MINMAXINFO16 *mmi = (MINMAXINFO16 *)PTR_SEG_TO_LIN(p16->lParam); p16->lParam = *(LPARAM *)(mmi + 1); - STRUCT32_MINMAXINFO16to32( mmi, (MINMAXINFO32 *)(p16->lParam) ); + STRUCT32_MINMAXINFO16to32( mmi, (MINMAXINFO *)(p16->lParam) ); SEGPTR_FREE(mmi); } break; @@ -1879,7 +1879,7 @@ { LPSTR str = (LPSTR)PTR_SEG_TO_LIN(p16->lParam); p16->lParam = *((LPARAM *)str - 1); - lstrcpyn32A( (LPSTR)(p16->lParam), str, p16->wParam ); + lstrcpynA( (LPSTR)(p16->lParam), str, p16->wParam ); SEGPTR_FREE( (LPARAM *)str - 1 ); } break; @@ -1892,15 +1892,15 @@ } break; case WM_MDIGETACTIVE: - if (lParam) *(BOOL32 *)lParam = (BOOL16)HIWORD(p16->lResult); - p16->lResult = (HWND32)LOWORD(p16->lResult); + if (lParam) *(BOOL *)lParam = (BOOL16)HIWORD(p16->lResult); + p16->lResult = (HWND)LOWORD(p16->lResult); break; case WM_NCCALCSIZE: { - NCCALCSIZE_PARAMS32 *nc32; + NCCALCSIZE_PARAMS *nc32; NCCALCSIZE_PARAMS16 *nc = (NCCALCSIZE_PARAMS16 *)PTR_SEG_TO_LIN(p16->lParam); p16->lParam = *(LPARAM *)(nc + 1); - nc32 = (NCCALCSIZE_PARAMS32 *)(p16->lParam); + nc32 = (NCCALCSIZE_PARAMS *)(p16->lParam); CONV_RECT16TO32( &nc->rgrc[0], &nc32->rgrc[0] ); if (p16->wParam) { @@ -1927,7 +1927,7 @@ { WINDOWPOS16 *wp = (WINDOWPOS16 *)PTR_SEG_TO_LIN(p16->lParam); p16->lParam = *(LPARAM *)(wp + 1); - STRUCT32_WINDOWPOS16to32( wp, (WINDOWPOS32 *)p16->lParam ); + STRUCT32_WINDOWPOS16to32( wp, (WINDOWPOS *)p16->lParam ); SEGPTR_FREE(wp); } break; @@ -1941,8 +1941,8 @@ MSGPARAM16 msgp16; msgp16.wParam=msg16->wParam; msgp16.lParam=msg16->lParam; - WINPROC_UnmapMsg32ATo16(((LPMSG32)lParam)->hwnd, ((LPMSG32)lParam)->message, - ((LPMSG32)lParam)->wParam, ((LPMSG32)lParam)->lParam, + WINPROC_UnmapMsg32ATo16(((LPMSG)lParam)->hwnd, ((LPMSG)lParam)->message, + ((LPMSG)lParam)->wParam, ((LPMSG)lParam)->lParam, &msgp16 ); SEGPTR_FREE(msg16); } @@ -1957,52 +1957,52 @@ * Map a message from 32-bit Unicode to 16-bit. * Return value is -1 on error, 0 if OK, 1 if an UnmapMsg call is needed. */ -INT32 WINPROC_MapMsg32WTo16( HWND32 hwnd, UINT32 msg32, WPARAM32 wParam32, +INT WINPROC_MapMsg32WTo16( HWND hwnd, UINT msg32, WPARAM wParam32, UINT16 *pmsg16, WPARAM16 *pwparam16, LPARAM *plparam ) { switch(msg32) { - case LB_ADDSTRING32: - case LB_FINDSTRING32: - case LB_FINDSTRINGEXACT32: - case LB_INSERTSTRING32: - case LB_SELECTSTRING32: - case LB_DIR32: - case LB_ADDFILE32: + case LB_ADDSTRING: + case LB_FINDSTRING: + case LB_FINDSTRINGEXACT: + case LB_INSERTSTRING: + case LB_SELECTSTRING: + case LB_DIR: + case LB_ADDFILE: { LPSTR str = SEGPTR_STRDUP_WtoA( (LPWSTR)*plparam ); if (!str) return -1; *pwparam16 = (WPARAM16)LOWORD(wParam32); *plparam = (LPARAM)SEGPTR_GET(str); } - *pmsg16 = (UINT16)msg32 + (LB_ADDSTRING16 - LB_ADDSTRING32); + *pmsg16 = (UINT16)msg32 + (LB_ADDSTRING16 - LB_ADDSTRING); return 1; - case CB_ADDSTRING32: - case CB_FINDSTRING32: - case CB_FINDSTRINGEXACT32: - case CB_INSERTSTRING32: - case CB_SELECTSTRING32: - case CB_DIR32: + case CB_ADDSTRING: + case CB_FINDSTRING: + case CB_FINDSTRINGEXACT: + case CB_INSERTSTRING: + case CB_SELECTSTRING: + case CB_DIR: { LPSTR str = SEGPTR_STRDUP_WtoA( (LPWSTR)*plparam ); if (!str) return -1; *pwparam16 = (WPARAM16)LOWORD(wParam32); *plparam = (LPARAM)SEGPTR_GET(str); } - *pmsg16 = (UINT16)msg32 + (CB_ADDSTRING16 - CB_ADDSTRING32); + *pmsg16 = (UINT16)msg32 + (CB_ADDSTRING16 - CB_ADDSTRING); return 1; case WM_NCCREATE: case WM_CREATE: { CREATESTRUCT16 *cs; - CREATESTRUCT32W *cs32 = (CREATESTRUCT32W *)*plparam; + CREATESTRUCTW *cs32 = (CREATESTRUCTW *)*plparam; LPSTR name, cls; if (!(cs = SEGPTR_NEW(CREATESTRUCT16))) return -1; - STRUCT32_CREATESTRUCT32Ato16( (CREATESTRUCT32A *)cs32, cs ); + STRUCT32_CREATESTRUCT32Ato16( (CREATESTRUCTA *)cs32, cs ); name = SEGPTR_STRDUP_WtoA( cs32->lpszName ); cls = SEGPTR_STRDUP_WtoA( cs32->lpszClass ); cs->lpszName = SEGPTR_GET(name); @@ -2015,11 +2015,11 @@ case WM_MDICREATE: { MDICREATESTRUCT16 *cs; - MDICREATESTRUCT32W *cs32 = (MDICREATESTRUCT32W *)*plparam; + MDICREATESTRUCTW *cs32 = (MDICREATESTRUCTW *)*plparam; LPSTR name, cls; if (!(cs = SEGPTR_NEW(MDICREATESTRUCT16))) return -1; - STRUCT32_MDICREATESTRUCT32Ato16( (MDICREATESTRUCT32A *)cs32, cs ); + STRUCT32_MDICREATESTRUCT32Ato16( (MDICREATESTRUCTA *)cs32, cs ); name = SEGPTR_STRDUP_WtoA( cs32->szTitle ); cls = SEGPTR_STRDUP_WtoA( cs32->szClass ); cs->szTitle = SEGPTR_GET(name); @@ -2050,7 +2050,7 @@ * * Unmap a message that was mapped from 32-bit Unicode to 16-bit. */ -void WINPROC_UnmapMsg32WTo16( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam, +void WINPROC_UnmapMsg32WTo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, MSGPARAM16* p16 ) { switch(msg) @@ -2075,14 +2075,14 @@ * * Call a window procedure, translating args from Ansi to Unicode. */ -static LRESULT WINPROC_CallProc32ATo32W( WNDPROC32 func, HWND32 hwnd, - UINT32 msg, WPARAM32 wParam, +static LRESULT WINPROC_CallProc32ATo32W( WNDPROC func, HWND hwnd, + UINT msg, WPARAM wParam, LPARAM lParam ) { LRESULT result; if (WINPROC_MapMsg32ATo32W( hwnd, msg, wParam, &lParam ) == -1) return 0; - result = WINPROC_CallWndProc32( func, hwnd, msg, wParam, lParam ); + result = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); WINPROC_UnmapMsg32ATo32W( hwnd, msg, wParam, lParam ); return result; } @@ -2093,14 +2093,14 @@ * * Call a window procedure, translating args from Unicode to Ansi. */ -static LRESULT WINPROC_CallProc32WTo32A( WNDPROC32 func, HWND32 hwnd, - UINT32 msg, WPARAM32 wParam, +static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, + UINT msg, WPARAM wParam, LPARAM lParam ) { LRESULT result; if (WINPROC_MapMsg32WTo32A( hwnd, msg, wParam, &lParam ) == -1) return 0; - result = WINPROC_CallWndProc32( func, hwnd, msg, wParam, lParam ); + result = WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); WINPROC_UnmapMsg32WTo32A( hwnd, msg, wParam, lParam ); return result; } @@ -2113,15 +2113,15 @@ */ LRESULT WINPROC_CallProc16To32A( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam, - WNDPROC32 func ) + WNDPROC func ) { LRESULT result; - UINT32 msg32; - WPARAM32 wParam32; + UINT msg32; + WPARAM wParam32; if (WINPROC_MapMsg16To32A( msg, wParam, &msg32, &wParam32, &lParam ) == -1) return 0; - result = WINPROC_CallWndProc32( func, hwnd, msg32, wParam32, lParam ); + result = WINPROC_CallWndProc( func, hwnd, msg32, wParam32, lParam ); return WINPROC_UnmapMsg16To32A( hwnd, msg32, wParam32, lParam, result ); } @@ -2133,15 +2133,15 @@ */ LRESULT WINPROC_CallProc16To32W( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam, - WNDPROC32 func ) + WNDPROC func ) { LRESULT result; - UINT32 msg32; - WPARAM32 wParam32; + UINT msg32; + WPARAM wParam32; if (WINPROC_MapMsg16To32W( hwnd, msg, wParam, &msg32, &wParam32, &lParam ) == -1) return 0; - result = WINPROC_CallWndProc32( func, hwnd, msg32, wParam32, lParam ); + result = WINPROC_CallWndProc( func, hwnd, msg32, wParam32, lParam ); return WINPROC_UnmapMsg16To32W( hwnd, msg32, wParam32, lParam, result ); } @@ -2151,8 +2151,8 @@ * * Call a 16-bit window procedure, translating the 32-bit args. */ -static LRESULT WINAPI WINPROC_CallProc32ATo16( WNDPROC16 func, HWND32 hwnd, - UINT32 msg, WPARAM32 wParam, +static LRESULT WINAPI WINPROC_CallProc32ATo16( WNDPROC16 func, HWND hwnd, + UINT msg, WPARAM wParam, LPARAM lParam ) { UINT16 msg16; @@ -2174,8 +2174,8 @@ * * Call a 16-bit window procedure, translating the 32-bit args. */ -static LRESULT WINAPI WINPROC_CallProc32WTo16( WNDPROC16 func, HWND32 hwnd, - UINT32 msg, WPARAM32 wParam, +static LRESULT WINAPI WINPROC_CallProc32WTo16( WNDPROC16 func, HWND hwnd, + UINT msg, WPARAM wParam, LPARAM lParam ) { UINT16 msg16; @@ -2253,20 +2253,20 @@ * * ECMA-234, Win32 */ -LRESULT WINAPI CallWindowProc32A( - WNDPROC32 func, /* window procedure */ - HWND32 hwnd, /* target window */ - UINT32 msg, /* message */ - WPARAM32 wParam, /* message dependent parameter */ +LRESULT WINAPI CallWindowProcA( + WNDPROC func, /* window procedure */ + HWND hwnd, /* target window */ + UINT msg, /* message */ + WPARAM wParam, /* message dependent parameter */ LPARAM lParam /* message dependent parameter */ ) { WINDOWPROC *proc = WINPROC_GetPtr( (WNDPROC16)func ); - if (!proc) return WINPROC_CallWndProc32( func, hwnd, msg, wParam, lParam ); + if (!proc) return WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); #if testing func = WINPROC_GetProc( (HWINDOWPROC)proc, WIN_PROC_32A ); - return WINPROC_CallWndProc32( func, hwnd, msg, wParam, lParam ); + return WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); #endif switch(proc->type) @@ -2277,7 +2277,7 @@ hwnd, msg, wParam, lParam ); case WIN_PROC_32A: if (!proc->thunk.t_from16.proc) return 0; - return WINPROC_CallWndProc32( proc->thunk.t_from16.proc, + return WINPROC_CallWndProc( proc->thunk.t_from16.proc, hwnd, msg, wParam, lParam ); case WIN_PROC_32W: if (!proc->thunk.t_from16.proc) return 0; @@ -2293,16 +2293,16 @@ /********************************************************************** * CallWindowProc32W (USER32.19) */ -LRESULT WINAPI CallWindowProc32W( WNDPROC32 func, HWND32 hwnd, UINT32 msg, - WPARAM32 wParam, LPARAM lParam ) +LRESULT WINAPI CallWindowProcW( WNDPROC func, HWND hwnd, UINT msg, + WPARAM wParam, LPARAM lParam ) { WINDOWPROC *proc = WINPROC_GetPtr( (WNDPROC16)func ); - if (!proc) return WINPROC_CallWndProc32( func, hwnd, msg, wParam, lParam ); + if (!proc) return WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); #if testing func = WINPROC_GetProc( (HWINDOWPROC)proc, WIN_PROC_32W ); - return WINPROC_CallWndProc32( func, hwnd, msg, wParam, lParam ); + return WINPROC_CallWndProc( func, hwnd, msg, wParam, lParam ); #endif switch(proc->type) @@ -2317,7 +2317,7 @@ hwnd, msg, wParam, lParam ); case WIN_PROC_32W: if (!proc->thunk.t_from16.proc) return 0; - return WINPROC_CallWndProc32( proc->thunk.t_from16.proc, + return WINPROC_CallWndProc( proc->thunk.t_from16.proc, hwnd, msg, wParam, lParam ); default: WARN( relay, "Invalid proc %p\n", proc );
diff --git a/windows/x11drv/clipboard.c b/windows/x11drv/clipboard.c index 29e5bc9..e1a6499 100644 --- a/windows/x11drv/clipboard.c +++ b/windows/x11drv/clipboard.c
@@ -19,9 +19,9 @@ #include "wintypes.h" #include "x11drv.h" -extern HWND32 hWndClipOwner; -extern HWND32 hWndClipWindow; -extern CLIPFORMAT ClipFormats[]; +extern HWND hWndClipOwner; +extern HWND hWndClipWindow; +extern WINE_CLIPFORMAT ClipFormats[]; static Bool selectionWait = False; static Bool selectionAcquired = False; @@ -71,8 +71,8 @@ */ void X11DRV_CLIPBOARD_ReadSelection(Window w,Atom prop) { - HANDLE32 hText = 0; - LPCLIPFORMAT lpFormat = ClipFormats; + HANDLE hText = 0; + LPWINE_CLIPFORMAT lpFormat = ClipFormats; TRACE(clipboard,"ReadSelection callback\n"); @@ -107,8 +107,8 @@ if( nitems ) { - hText=GlobalAlloc32(GMEM_MOVEABLE, nitems + inlcount + 1); - if( (lpstr = (char*)GlobalLock32(hText)) ) + hText=GlobalAlloc(GMEM_MOVEABLE, nitems + inlcount + 1); + if( (lpstr = (char*)GlobalLock(hText)) ) for(i=0,inlcount=0; i <= nitems; i++) { if( val[i] == '\n' ) lpstr[inlcount++]='\r'; @@ -146,7 +146,7 @@ * Wine might have lost XA_PRIMARY selection because of * EmptyClipboard() or other client. */ -void X11DRV_CLIPBOARD_ReleaseSelection(Window w, HWND32 hwnd) +void X11DRV_CLIPBOARD_ReleaseSelection(Window w, HWND hwnd) { /* w is the window that lost selection, * @@ -199,7 +199,7 @@ /************************************************************************** * X11DRV_CLIPBOARD_SetClipboardData */ -void X11DRV_CLIPBOARD_SetClipboardData(UINT32 wFormat) +void X11DRV_CLIPBOARD_SetClipboardData(UINT wFormat) { Window owner; @@ -209,7 +209,7 @@ (wFormat == CF_TEXT || wFormat == CF_OEMTEXT) ) { owner = X11DRV_WND_FindXWindow( - WIN_FindWndPtr( hWndClipWindow ? hWndClipWindow : AnyPopup32() ) + WIN_FindWndPtr( hWndClipWindow ? hWndClipWindow : AnyPopup() ) ); TSXSetSelectionOwner(display,XA_PRIMARY, owner, CurrentTime); @@ -227,9 +227,9 @@ /************************************************************************** * X11DRV_CLIPBOARD_RequestSelection */ -BOOL32 X11DRV_CLIPBOARD_RequestSelection() +BOOL X11DRV_CLIPBOARD_RequestSelection() { - HWND32 hWnd = (hWndClipWindow) ? hWndClipWindow : GetActiveWindow32(); + HWND hWnd = (hWndClipWindow) ? hWndClipWindow : GetActiveWindow(); if( selectionAcquired ) return TRUE; @@ -260,7 +260,7 @@ TRACE(clipboard,"\tgot CF_OEMTEXT = %i\n", ClipFormats[CF_OEMTEXT-1].wDataPresent); - return (BOOL32)ClipFormats[CF_OEMTEXT-1].wDataPresent; + return (BOOL)ClipFormats[CF_OEMTEXT-1].wDataPresent; } /************************************************************************** @@ -268,9 +268,9 @@ * * Called from DestroyWindow(). */ -void X11DRV_CLIPBOARD_ResetOwner(WND *pWnd, BOOL32 bFooBar) +void X11DRV_CLIPBOARD_ResetOwner(WND *pWnd, BOOL bFooBar) { - LPCLIPFORMAT lpFormat = ClipFormats; + LPWINE_CLIPFORMAT lpFormat = ClipFormats; if(bFooBar && X11DRV_WND_GetXWindow(pWnd)) return;
diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c index a032932..7d41561 100644 --- a/windows/x11drv/event.c +++ b/windows/x11drv/event.c
@@ -98,7 +98,7 @@ static void EVENT_SelectionNotify( XSelectionEvent *event); static void EVENT_SelectionClear( WND *pWnd, XSelectionClearEvent *event); static void EVENT_ClientMessage( WND *pWnd, XClientMessageEvent *event ); -static void EVENT_MapNotify( HWND32 hwnd, XMapEvent *event ); +static void EVENT_MapNotify( HWND hwnd, XMapEvent *event ); /* Usable only with OLVWM - compile option perhaps? static void EVENT_EnterNotify( WND *pWnd, XCrossingEvent *event ); @@ -113,7 +113,7 @@ * * Initialize network IO. */ -BOOL32 X11DRV_EVENT_Init(void) +BOOL X11DRV_EVENT_Init(void) { int i; for( i = 0; i < 3; i++ ) @@ -199,7 +199,7 @@ * 'peek' mode, FALSE otherwise. */ -BOOL32 X11DRV_EVENT_WaitNetEvent( BOOL32 sleep, BOOL32 peek ) +BOOL X11DRV_EVENT_WaitNetEvent( BOOL sleep, BOOL peek ) { XEvent event; LONG maxWait = sleep ? TIMER_GetNextExpiration() : 0; @@ -513,7 +513,7 @@ * Try to synchronize internal z-order with the window manager's. * Probably a futile endeavor. */ -static BOOL32 __check_query_condition( WND** pWndA, WND** pWndB ) +static BOOL __check_query_condition( WND** pWndA, WND** pWndB ) { /* return TRUE if we have at least two managed windows */ @@ -567,10 +567,10 @@ return i; } -static BOOL32 EVENT_QueryZOrder( WND* pWndCheck ) +static BOOL EVENT_QueryZOrder( WND* pWndCheck ) { - BOOL32 bRet = FALSE; - HWND32 hwndInsertAfter = HWND_TOP; + BOOL bRet = FALSE; + HWND hwndInsertAfter = HWND_TOP; WND* pWnd, *pWndZ = WIN_GetDesktop()->child; Window w, parent, *children = NULL; unsigned total, check, pos, best; @@ -633,7 +633,7 @@ /*********************************************************************** * X11DRV_EVENT_QueryPointer */ -BOOL32 X11DRV_EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state) +BOOL X11DRV_EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state) { Window root, child; int rootX, rootY, winX, winY; @@ -658,7 +658,7 @@ */ static void EVENT_Expose( WND *pWnd, XExposeEvent *event ) { - RECT32 rect; + RECT rect; /* Make position relative to client area instead of window */ rect.left = event->x - (pWnd? (pWnd->rectClient.left - pWnd->rectWindow.left) : 0); @@ -666,7 +666,7 @@ rect.right = rect.left + event->width; rect.bottom = rect.top + event->height; - Callout.RedrawWindow32( pWnd? pWnd->hwndSelf : 0, &rect, 0, + Callout.RedrawWindow( pWnd? pWnd->hwndSelf : 0, &rect, 0, RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN | RDW_ERASE | (event->count ? 0 : RDW_ERASENOW) ); } @@ -680,7 +680,7 @@ */ static void EVENT_GraphicsExpose( WND *pWnd, XGraphicsExposeEvent *event ) { - RECT32 rect; + RECT rect; /* Make position relative to client area instead of window */ rect.left = event->x - (pWnd? (pWnd->rectClient.left - pWnd->rectWindow.left) : 0); @@ -688,7 +688,7 @@ rect.right = rect.left + event->width; rect.bottom = rect.top + event->height; - Callout.RedrawWindow32( pWnd? pWnd->hwndSelf : 0, &rect, 0, + Callout.RedrawWindow( pWnd? pWnd->hwndSelf : 0, &rect, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_ERASE | (event->count ? 0 : RDW_ERASENOW) ); } @@ -837,15 +837,15 @@ if (event->detail != NotifyPointer) { - HWND32 hwnd = pWnd->hwndSelf; + HWND hwnd = pWnd->hwndSelf; - if (hwnd != GetActiveWindow32()) + if (hwnd != GetActiveWindow()) { WINPOS_ChangeActiveWindow( hwnd, FALSE ); X11DRV_KEYBOARD_UpdateState(); } - if ((hwnd != GetFocus32()) && !IsChild32( hwnd, GetFocus32())) - SetFocus32( hwnd ); + if ((hwnd != GetFocus()) && !IsChild( hwnd, GetFocus())) + SetFocus( hwnd ); } } @@ -859,19 +859,19 @@ { if (event->detail != NotifyPointer) { - HWND32 hwnd = pWnd->hwndSelf; + HWND hwnd = pWnd->hwndSelf; - if (hwnd == GetActiveWindow32()) + if (hwnd == GetActiveWindow()) WINPOS_ChangeActiveWindow( 0, FALSE ); - if ((hwnd == GetFocus32()) || IsChild32( hwnd, GetFocus32())) - SetFocus32( 0 ); + if ((hwnd == GetFocus()) || IsChild( hwnd, GetFocus())) + SetFocus( 0 ); } } /********************************************************************** * X11DRV_EVENT_CheckFocus */ -BOOL32 X11DRV_EVENT_CheckFocus(void) +BOOL X11DRV_EVENT_CheckFocus(void) { WND* pWnd; Window xW; @@ -928,9 +928,9 @@ */ static void EVENT_ConfigureNotify( WND *pWnd, XConfigureEvent *event ) { - WINDOWPOS32 winpos; - RECT32 newWindowRect, newClientRect; - HRGN32 hrgnOldPos, hrgnNewPos; + WINDOWPOS winpos; + RECT newWindowRect, newClientRect; + HRGN hrgnOldPos, hrgnNewPos; Window above = event->above; int x, y; unsigned int width, height; @@ -959,13 +959,13 @@ winpos.flags |= SWP_NOSIZE; else { - RECT32 rect = { 0, 0, pWnd->rectWindow.right - pWnd->rectWindow.left, + RECT rect = { 0, 0, pWnd->rectWindow.right - pWnd->rectWindow.left, pWnd->rectWindow.bottom - pWnd->rectWindow.top }; DCE_InvalidateDCE( pWnd, &rect ); } /* Send WM_WINDOWPOSCHANGING */ - SendMessage32A( winpos.hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)&winpos ); + SendMessageA( winpos.hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)&winpos ); /* Calculate new position and size */ newWindowRect.left = x; @@ -977,18 +977,18 @@ &pWnd->rectWindow, &pWnd->rectClient, &winpos, &newClientRect ); - hrgnOldPos = CreateRectRgnIndirect32( &pWnd->rectWindow ); - hrgnNewPos = CreateRectRgnIndirect32( &newWindowRect ); - CombineRgn32( hrgnOldPos, hrgnOldPos, hrgnNewPos, RGN_DIFF ); - DeleteObject32(hrgnOldPos); - DeleteObject32(hrgnNewPos); + hrgnOldPos = CreateRectRgnIndirect( &pWnd->rectWindow ); + hrgnNewPos = CreateRectRgnIndirect( &newWindowRect ); + CombineRgn( hrgnOldPos, hrgnOldPos, hrgnNewPos, RGN_DIFF ); + DeleteObject(hrgnOldPos); + DeleteObject(hrgnNewPos); /* Set new size and position */ pWnd->rectWindow = newWindowRect; pWnd->rectClient = newClientRect; - SendMessage32A( winpos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)&winpos ); + SendMessageA( winpos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)&winpos ); - if (!IsWindow32( winpos.hwnd )) return; + if (!IsWindow( winpos.hwnd )) return; if( above == None ) /* absolute bottom */ { WIN_UnlinkWindow( winpos.hwnd ); @@ -1023,7 +1023,7 @@ { /* open to make sure that clipboard is available */ - BOOL32 couldOpen = OpenClipboard32( pWnd->hwndSelf ); + BOOL couldOpen = OpenClipboard( pWnd->hwndSelf ); char* lpstr = 0; hText = GetClipboardData16(CF_TEXT); @@ -1048,7 +1048,7 @@ /* close only if we opened before */ - if(couldOpen) CloseClipboard32(); + if(couldOpen) CloseClipboard(); } } @@ -1102,7 +1102,7 @@ unsigned char* p_data = NULL; union { Atom atom_aux; - POINT32 pt_aux; + POINT pt_aux; int i; } u; int x, y; @@ -1156,7 +1156,7 @@ if( u.i == -1 ) *p = -1; /* mark as "bad" */ else { - INT32 len = GetShortPathName32A( p, NULL, 0 ); + INT len = GetShortPathNameA( p, NULL, 0 ); if (len) aux_long += len + 1; else *p = -1; } @@ -1187,7 +1187,7 @@ { if( *p != -1 ) /* use only "good" entries */ { - GetShortPathName32A( p, p_drop, 65535 ); + GetShortPathNameA( p, p_drop, 65535 ); p_drop += strlen( p_drop ) + 1; } p += strlen(p) + 1; @@ -1222,13 +1222,13 @@ int x, y, drop32 = FALSE ; union { Atom atom_aux; - POINT32 pt_aux; + POINT pt_aux; int i; Window w_aux; } u; /* unused */ union { HDROP16 h16; - HDROP32 h32; + HDROP h32; } hDrop; drop32 = pWnd->flags & WIN_ISWIN32; @@ -1251,7 +1251,7 @@ while (p) { if (next) *next=0; if (strncmp(p,"file:",5) == 0 ) { - INT32 len = GetShortPathName32A( p+5, NULL, 0 ); + INT len = GetShortPathNameA( p+5, NULL, 0 ); if (len) drop_len += len + 1; } if (next) { @@ -1269,22 +1269,22 @@ pDropWnd = WIN_FindWndPtr( pWnd->hwndSelf ); if (drop32) { - LPDROPFILESTRUCT32 lpDrop; - drop_len += sizeof(DROPFILESTRUCT32) + 1; - hDrop.h32 = (HDROP32)GlobalAlloc32( GMEM_SHARE, drop_len ); - lpDrop = (LPDROPFILESTRUCT32) GlobalLock32( hDrop.h32 ); + LPDROPFILESTRUCT lpDrop; + drop_len += sizeof(DROPFILESTRUCT) + 1; + hDrop.h32 = (HDROP)GlobalAlloc( GMEM_SHARE, drop_len ); + lpDrop = (LPDROPFILESTRUCT) GlobalLock( hDrop.h32 ); if( lpDrop ) { - lpDrop->lSize = sizeof(DROPFILESTRUCT32); - lpDrop->ptMousePos.x = (INT32)x; - lpDrop->ptMousePos.y = (INT32)y; - lpDrop->fInNonClientArea = (BOOL32) + lpDrop->lSize = sizeof(DROPFILESTRUCT); + lpDrop->ptMousePos.x = (INT)x; + lpDrop->ptMousePos.y = (INT)y; + lpDrop->fInNonClientArea = (BOOL) ( x < (pDropWnd->rectClient.left - pDropWnd->rectWindow.left) || y < (pDropWnd->rectClient.top - pDropWnd->rectWindow.top) || x > (pDropWnd->rectClient.right - pDropWnd->rectWindow.left) || y > (pDropWnd->rectClient.bottom - pDropWnd->rectWindow.top) ); lpDrop->fWideChar = FALSE; - p_drop = ((char*)lpDrop) + sizeof(DROPFILESTRUCT32); + p_drop = ((char*)lpDrop) + sizeof(DROPFILESTRUCT); } } else { LPDROPFILESTRUCT16 lpDrop; @@ -1312,7 +1312,7 @@ while (p) { if (next) *next=0; if (strncmp(p,"file:",5) == 0 ) { - INT32 len = GetShortPathName32A( p+5, p_drop, 65535 ); + INT len = GetShortPathNameA( p+5, p_drop, 65535 ); if (len) { TRACE(event, "drop file %s as %s\n", p+5, p_drop); p_drop += len+1; @@ -1336,9 +1336,9 @@ /* can not use PostMessage32A because it is currently based on * PostMessage16 and WPARAM32 would be truncated to WPARAM16 */ - GlobalUnlock32(hDrop.h32); - SendMessage32A( pWnd->hwndSelf, WM_DROPFILES, - (WPARAM32)hDrop.h32, 0L ); + GlobalUnlock(hDrop.h32); + SendMessageA( pWnd->hwndSelf, WM_DROPFILES, + (WPARAM)hDrop.h32, 0L ); } else { GlobalUnlock16(hDrop.h16); PostMessage16( pWnd->hwndSelf, WM_DROPFILES, @@ -1398,7 +1398,7 @@ void EVENT_EnterNotify( WND *pWnd, XCrossingEvent *event ) { if( !Options.managed && X11DRV_GetXRootWindow() == DefaultRootWindow(display) && - (COLOR_GetSystemPaletteFlags() & COLOR_PRIVATE) && GetFocus32() ) + (COLOR_GetSystemPaletteFlags() & COLOR_PRIVATE) && GetFocus() ) TSXInstallColormap( display, X11DRV_COLOR_GetColormap() ); } #endif @@ -1406,11 +1406,11 @@ /********************************************************************** * EVENT_MapNotify */ -void EVENT_MapNotify( HWND32 hWnd, XMapEvent *event ) +void EVENT_MapNotify( HWND hWnd, XMapEvent *event ) { - HWND32 hwndFocus = GetFocus32(); + HWND hwndFocus = GetFocus(); - if (hwndFocus && IsChild32( hWnd, hwndFocus )) + if (hwndFocus && IsChild( hWnd, hwndFocus )) X11DRV_WND_SetFocus( WIN_FindWndPtr( hwndFocus ) ); return; @@ -1419,7 +1419,7 @@ /********************************************************************** * X11DRV_EVENT_Pending */ -BOOL32 X11DRV_EVENT_Pending() +BOOL X11DRV_EVENT_Pending() { return TSXPending(display); }
diff --git a/windows/x11drv/keyboard.c b/windows/x11drv/keyboard.c index cb71a37..b71b2a7 100644 --- a/windows/x11drv/keyboard.c +++ b/windows/x11drv/keyboard.c
@@ -96,7 +96,7 @@ return keyc2vkey[e->keycode]; } -static BOOL32 NumState=FALSE, CapsState=FALSE; +static BOOL NumState=FALSE, CapsState=FALSE; /********************************************************************** * KEYBOARD_GenerateMsg @@ -106,10 +106,10 @@ * Convention : called with vkey only VK_NUMLOCK or VK_CAPITAL * */ -void KEYBOARD_GenerateMsg( WORD vkey, int Evtype, INT32 event_x, INT32 event_y, +void KEYBOARD_GenerateMsg( WORD vkey, int Evtype, INT event_x, INT event_y, DWORD event_time ) { - BOOL32 * State = (vkey==VK_NUMLOCK? &NumState : &CapsState); + BOOL * State = (vkey==VK_NUMLOCK? &NumState : &CapsState); if (*State) { /* The INTERMEDIARY state means : just after a 'press' event, if a 'release' event comes, @@ -211,12 +211,12 @@ KeySym keysym; WORD vkey = 0, bScan; DWORD dwFlags; - static BOOL32 force_extended = FALSE; /* hack for AltGr translation */ + static BOOL force_extended = FALSE; /* hack for AltGr translation */ int ascii_chars; - INT32 event_x = (pWnd? pWnd->rectWindow.left : 0) + event->x; - INT32 event_y = (pWnd? pWnd->rectWindow.top : 0) + event->y; + INT event_x = (pWnd? pWnd->rectWindow.left : 0) + event->x; + INT event_y = (pWnd? pWnd->rectWindow.top : 0) + event->y; DWORD event_time = event->time - MSG_WineStartTicks; /* this allows support for dead keys */ @@ -618,7 +618,7 @@ for (i = 0 ; i != KeyTableSize ; i++) if (KeyTable[i].scancode == lParam) { - lstrcpyn32A( lpBuffer, KeyTable[i].name, nSize ); + lstrcpynA( lpBuffer, KeyTable[i].name, nSize ); return strlen(lpBuffer); } #endif @@ -652,7 +652,7 @@ XKeyEvent e; KeySym keysym; static XComposeStatus cs; - INT32 ret; + INT ret; int keyc; if (scanCode==0) {
diff --git a/windows/x11drv/mouse.c b/windows/x11drv/mouse.c index fa4f886..26c08d2 100644 --- a/windows/x11drv/mouse.c +++ b/windows/x11drv/mouse.c
@@ -21,12 +21,12 @@ Cursor X11DRV_MOUSE_XCursor = None; /* Current X cursor */ -BOOL32 X11DRV_MOUSE_DisableWarpPointer = FALSE; /* hack; see DISPLAY_MoveCursor */ +BOOL X11DRV_MOUSE_DisableWarpPointer = FALSE; /* hack; see DISPLAY_MoveCursor */ /*********************************************************************** * X11DRV_MOUSE_DoSetCursor */ -static BOOL32 X11DRV_MOUSE_DoSetCursor( CURSORICONINFO *ptr ) +static BOOL X11DRV_MOUSE_DoSetCursor( CURSORICONINFO *ptr ) { Pixmap pixmapBits, pixmapMask, pixmapAll; XColor fg, bg; @@ -151,13 +151,13 @@ /* FIXME: this won't work correctly with native USER !*/ /* Set the same cursor for all top-level windows */ - HWND32 hwnd = GetWindow32( GetDesktopWindow32(), GW_CHILD ); + HWND hwnd = GetWindow( GetDesktopWindow(), GW_CHILD ); while(hwnd) { Window win = X11DRV_WND_FindXWindow( WIN_FindWndPtr( hwnd ) ); if (win && win!=DefaultRootWindow(display)) XDefineCursor( display, win, cursor ); - hwnd = GetWindow32( hwnd, GW_HWNDNEXT ); + hwnd = GetWindow( hwnd, GW_HWNDNEXT ); } } return TRUE;
diff --git a/windows/x11drv/wnd.c b/windows/x11drv/wnd.c index 2e9cac3..c30686e 100644 --- a/windows/x11drv/wnd.c +++ b/windows/x11drv/wnd.c
@@ -142,7 +142,7 @@ /********************************************************************** * X11DRV_WND_CreateDesktopWindow */ -BOOL32 X11DRV_WND_CreateDesktopWindow(WND *wndPtr, CLASS *classPtr, BOOL32 bUnicode) +BOOL X11DRV_WND_CreateDesktopWindow(WND *wndPtr, CLASS *classPtr, BOOL bUnicode) { if (wmProtocols == None) wmProtocols = TSXInternAtom( display, "WM_PROTOCOLS", True ); @@ -163,7 +163,7 @@ /********************************************************************** * X11DRV_WND_CreateWindow */ -BOOL32 X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCT32A *cs, BOOL32 bUnicode) +BOOL X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BOOL bUnicode) { /* Create the X window (only for top-level windows, and then only */ /* when there's no desktop window) */ @@ -245,7 +245,7 @@ /*********************************************************************** * X11DRV_WND_DestroyWindow */ -BOOL32 X11DRV_WND_DestroyWindow(WND *wndPtr) +BOOL X11DRV_WND_DestroyWindow(WND *wndPtr) { if (X11DRV_WND_GetXWindow(wndPtr)) { @@ -290,7 +290,7 @@ wndPtr->wIDmenu = 0; if( X11DRV_WND_GetXRootWindow(wndPtr) == DefaultRootWindow(display) ) { - CREATESTRUCT32A cs; + CREATESTRUCTA cs; cs.lpCreateParams = NULL; cs.hInstance = 0; /* not used if following call */ cs.hMenu = 0; /* not used in following call */ @@ -314,7 +314,7 @@ wndPtr->dwStyle |= WS_CHILD; if( wndPtr->wIDmenu != 0) { - DestroyMenu32( (HMENU32) wndPtr->wIDmenu ); + DestroyMenu( (HMENU) wndPtr->wIDmenu ); wndPtr->wIDmenu = 0; } } @@ -389,7 +389,7 @@ * * SetWindowPos() for an X window. Used by the real SetWindowPos(). */ -void X11DRV_WND_SetWindowPos(WND *wndPtr, const WINDOWPOS32 *winpos, BOOL32 bSMC_SETXPOS) +void X11DRV_WND_SetWindowPos(WND *wndPtr, const WINDOWPOS *winpos, BOOL bSMC_SETXPOS) { XWindowChanges winChanges; int changeMask = 0; @@ -490,7 +490,7 @@ */ void X11DRV_WND_SetFocus(WND *wndPtr) { - HWND32 hwnd = wndPtr->hwndSelf; + HWND hwnd = wndPtr->hwndSelf; XWindowAttributes win_attr; Window win; @@ -544,11 +544,11 @@ * X11DRV_WND_ScrollWindow */ void X11DRV_WND_ScrollWindow( - WND *wndPtr, DC *dcPtr, INT32 dx, INT32 dy, - const RECT32 *rect, BOOL32 bUpdate) + WND *wndPtr, DC *dcPtr, INT dx, INT dy, + const RECT *rect, BOOL bUpdate) { X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dcPtr->physDev; - POINT32 dst, src; + POINT dst, src; dst.x = (src.x = dcPtr->w.DCOrgX + rect->left) + dx; dst.y = (src.y = dcPtr->w.DCOrgY + rect->top) + dy; @@ -574,7 +574,7 @@ * Set the drawable, origin and dimensions for the DC associated to * a given window. */ -void X11DRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL32 bSetClipOrigin) +void X11DRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL bSetClipOrigin) { X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev; @@ -622,7 +622,7 @@ /*********************************************************************** * X11DRV_WND_IsSelfClipping */ -BOOL32 X11DRV_WND_IsSelfClipping(WND *wndPtr) +BOOL X11DRV_WND_IsSelfClipping(WND *wndPtr) { if( X11DRV_WND_GetXWindow(wndPtr) ) return TRUE; /* X itself will do the clipping */