From 4bf335497d20b85a5a8a966b85375b6b42d5f152 Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Sat, 12 Jun 1999 14:52:15 +0000 Subject: [PATCH] Removed direct references to CLASS internals. --- controls/icontitle.c | 2 +- controls/menu.c | 2 +- controls/widgets.c | 2 +- debugger/dbg.y | 3 +-- debugger/dbgmain.c | 4 ++-- loader/module.c | 1 - misc/spy.c | 2 +- windows/message.c | 4 ++-- windows/painting.c | 8 ++++---- windows/scroll.c | 1 - windows/user.c | 1 - windows/x11drv/event.c | 1 - 12 files changed, 13 insertions(+), 18 deletions(-) diff --git a/controls/icontitle.c b/controls/icontitle.c index b6c853d57be..006ffc64185 100644 --- a/controls/icontitle.c +++ b/controls/icontitle.c @@ -135,7 +135,7 @@ static BOOL ICONTITLE_Paint( WND* wnd, HDC hDC, BOOL bActive ) { if( wnd->dwStyle & WS_CHILD ) { - hBrush = wnd->parent->class->hbrBackground; + hBrush = (HBRUSH) GetClassLongA(wnd->hwndSelf, GCL_HBRBACKGROUND); if( hBrush ) { INT level; diff --git a/controls/menu.c b/controls/menu.c index 2e9b901fea4..85d9513659b 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -2053,7 +2053,7 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu, if (IS_SYSTEM_MENU(menu)) { - MENU_InitSysMenuPopup(item->hSubMenu, wndPtr->dwStyle, wndPtr->class->style); + MENU_InitSysMenuPopup(item->hSubMenu, wndPtr->dwStyle, GetClassLongA(wndPtr->hwndSelf, GCL_STYLE)); NC_GetSysPopupPos( wndPtr, &rect ); rect.top = rect.bottom; diff --git a/controls/widgets.c b/controls/widgets.c index f93207ed660..e81f6891bd2 100644 --- a/controls/widgets.c +++ b/controls/widgets.c @@ -115,5 +115,5 @@ BOOL WIDGETS_Init(void) BOOL WIDGETS_IsControl( WND* pWnd, BUILTIN_CLASS32 cls ) { assert( cls < BIC32_NB_CLASSES ); - return (pWnd->class->atomName == bicAtomTable[cls]); + return (GetClassWord(pWnd->hwndSelf, GCW_ATOM) == bicAtomTable[cls]); } diff --git a/debugger/dbg.y b/debugger/dbg.y index cdbab33af55..33bc94a69d9 100644 --- a/debugger/dbg.y +++ b/debugger/dbg.y @@ -19,7 +19,6 @@ #endif #include "winbase.h" -#include "class.h" #include "module.h" #include "task.h" #include "options.h" @@ -290,7 +289,7 @@ break_command: info_command: tINFO tBREAK tEOL { DEBUG_InfoBreakpoints(); } - | tINFO tCLASS expr_value tEOL { CLASS_DumpClass( (CLASS *)$3 ); + | tINFO tCLASS expr_value tEOL { CLASS_DumpClass( (struct tagCLASS *)$3 ); DEBUG_FreeExprMem(); } | tINFO tSHARE tEOL { DEBUG_InfoShare(); } | tINFO tMODULE expr_value tEOL { NE_DumpModule( $3 ); diff --git a/debugger/dbgmain.c b/debugger/dbgmain.c index d7fc973c246..114b4a1bd7e 100644 --- a/debugger/dbgmain.c +++ b/debugger/dbgmain.c @@ -11,7 +11,7 @@ #include "toolhelp.h" #include "module.h" #include "debugger.h" -#include "class.h" +#include "win.h" #include "debugger.h" #include "peexe.h" @@ -51,7 +51,7 @@ int PROFILE_GetWineIniString( const char *section, const char *key_name, } -void CLASS_DumpClass( CLASS *class ) +void CLASS_DumpClass( struct tagCLASS *class ) { exit(0); } diff --git a/loader/module.c b/loader/module.c index 44d600e3088..1415ae01b8e 100644 --- a/loader/module.c +++ b/loader/module.c @@ -14,7 +14,6 @@ #include "wine/winbase16.h" #include "windef.h" #include "winerror.h" -#include "class.h" #include "file.h" #include "global.h" #include "heap.h" diff --git a/misc/spy.c b/misc/spy.c index 978334ae662..f8afbe231cf 100644 --- a/misc/spy.c +++ b/misc/spy.c @@ -647,7 +647,7 @@ const char *SPY_GetWndName( HWND hwnd ) INT len; *(p++)='{'; - GlobalGetAtomNameA( pWnd->class->atomName, p, n + 1); + GlobalGetAtomNameA((ATOM) GetClassWord(pWnd->hwndSelf, GCW_ATOM), p, n + 1); src = p += (len = lstrlenA(p)); if( len >= n ) src = wnd_buffer; /* something nonzero */ postfix = '}'; diff --git a/windows/message.c b/windows/message.c index ed19b3667f0..8933b63ffae 100644 --- a/windows/message.c +++ b/windows/message.c @@ -180,7 +180,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last, * note that ...MOUSEMOVEs can slip in between * ...BUTTONDOWN and ...BUTTONDBLCLK messages */ - if( pWnd->class->style & CS_DBLCLKS || ht != HTCLIENT ) + if(GetClassLongA(hWnd, GCL_STYLE) & CS_DBLCLKS || ht != HTCLIENT ) { if ((message == clk_message) && (hWnd == clk_hwnd) && (msg->time - dblclk_time_limit < doubleClickSpeed) && @@ -1091,7 +1091,7 @@ static BOOL MSG_PeekMessage( LPMSG msg, HWND hwnd, DWORD first, DWORD last, if ((wndPtr = WIN_FindWndPtr(msg->hwnd))) { if( wndPtr->dwStyle & WS_MINIMIZE && - wndPtr->class->hIcon ) + (HICON) GetClassLongA(wndPtr->hwndSelf, GCL_HICON) ) { msg->message = WM_PAINTICON; msg->wParam = 1; diff --git a/windows/painting.c b/windows/painting.c index 4b68727eb7a..23f37464594 100644 --- a/windows/painting.c +++ b/windows/painting.c @@ -170,7 +170,7 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps ) WND *wndPtr = WIN_FindWndPtr( hwnd ); if (!wndPtr) return 0; - bIcon = (wndPtr->dwStyle & WS_MINIMIZE && wndPtr->class->hIcon); + bIcon = (wndPtr->dwStyle & WS_MINIMIZE && GetClassWord(wndPtr->hwndSelf, GCW_HICON)); wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; @@ -187,7 +187,7 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps ) TRACE_(win)("hrgnUpdate = %04x, \n", hrgnUpdate); - if (wndPtr->class->style & CS_PARENTDC) + if (GetClassWord16(wndPtr->hwndSelf, GCW_STYLE) & CS_PARENTDC) { /* Don't clip the output to the update region for CS_PARENTDC window */ if( hrgnUpdate ) @@ -545,7 +545,7 @@ static HRGN RDW_Paint( WND* wndPtr, HRGN hrgn, UINT flags, UINT ex ) */ HDC hDC; HWND hWnd = wndPtr->hwndSelf; - BOOL bIcon = ((wndPtr->dwStyle & WS_MINIMIZE) && wndPtr->class->hIcon); + BOOL bIcon = ((wndPtr->dwStyle & WS_MINIMIZE) && GetClassWord(wndPtr->hwndSelf, GCW_HICON)); /* Erase/update the window itself ... */ @@ -913,7 +913,7 @@ BOOL WINAPI GetUpdateRect( HWND hwnd, LPRECT rect, BOOL erase ) } GetRgnBox( hrgn, rect ); DeleteObject( hrgn ); - if (wndPtr->class->style & CS_OWNDC) + if (GetClassLongA(wndPtr->hwndSelf, GCL_STYLE) & CS_OWNDC) { if (GetMapMode(wndPtr->dce->hDC) != MM_TEXT) { diff --git a/windows/scroll.c b/windows/scroll.c index ca05da2db5f..ef817a4a794 100644 --- a/windows/scroll.c +++ b/windows/scroll.c @@ -10,7 +10,6 @@ #include #include "winuser.h" -#include "class.h" #include "dc.h" #include "win.h" #include "gdi.h" diff --git a/windows/user.c b/windows/user.c index 4f94ec77799..024c5a1e587 100644 --- a/windows/user.c +++ b/windows/user.c @@ -25,7 +25,6 @@ #include "shell.h" #include "callback.h" #include "local.h" -#include "class.h" #include "desktop.h" #include "process.h" #include "debugtools.h" diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c index bde01551827..769d76a76f2 100644 --- a/windows/x11drv/event.c +++ b/windows/x11drv/event.c @@ -17,7 +17,6 @@ #include #include #include "callback.h" -#include "class.h" #include "clipboard.h" #include "dce.h" #include "dde_proc.h"