naming changes: -remove annying "Object" from variables. prepend handles with "h" instead. -rename window->Self -> Window->hSelf Modified: trunk/reactos/subsys/win32k/include/window.h Modified: trunk/reactos/subsys/win32k/ntuser/caret.c Modified: trunk/reactos/subsys/win32k/ntuser/class.c Modified: trunk/reactos/subsys/win32k/ntuser/focus.c Modified: trunk/reactos/subsys/win32k/ntuser/hotkey.c Modified: trunk/reactos/subsys/win32k/ntuser/menu.c Modified: trunk/reactos/subsys/win32k/ntuser/message.c Modified: trunk/reactos/subsys/win32k/ntuser/msgqueue.c Modified: trunk/reactos/subsys/win32k/ntuser/painting.c Modified: trunk/reactos/subsys/win32k/ntuser/scrollbar.c Modified: trunk/reactos/subsys/win32k/ntuser/windc.c Modified: trunk/reactos/subsys/win32k/ntuser/window.c Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c _____
Modified: trunk/reactos/subsys/win32k/include/window.h --- trunk/reactos/subsys/win32k/include/window.h 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/include/window.h 2005-09-06 11:00:27 UTC (rev 17695) @@ -53,7 +53,7 @@
/* Position of the window's client area. */ RECT ClientRect; /* Handle for the window. */ - HANDLE Self; + HWND hSelf; /* Window flags. */ ULONG Flags; /* Window menu handle or window id */ _____
Modified: trunk/reactos/subsys/win32k/ntuser/caret.c --- trunk/reactos/subsys/win32k/ntuser/caret.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/caret.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -334,7 +334,7 @@
ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue;
- if(ThreadQueue->CaretInfo->hWnd != WindowObject->Self) + if(ThreadQueue->CaretInfo->hWnd != WindowObject->hSelf) { SetLastWin32Error(ERROR_ACCESS_DENIED); return FALSE; @@ -342,7 +342,7 @@
if(ThreadQueue->CaretInfo->Visible) { - IntKillTimer(WindowObject->Self, IDCARETTIMER, TRUE); + IntKillTimer(WindowObject->hSelf, IDCARETTIMER, TRUE);
co_IntHideCaret(ThreadQueue->CaretInfo); ThreadQueue->CaretInfo->Visible = 0; @@ -384,11 +384,11 @@ }
-BOOL FASTCALL co_UserShowCaret(PWINDOW_OBJECT WindowObject) +BOOL FASTCALL co_UserShowCaret(PWINDOW_OBJECT Window) { PUSER_MESSAGE_QUEUE ThreadQueue;
- if(WindowObject->OwnerThread != PsGetCurrentThread()) + if(Window->OwnerThread != PsGetCurrentThread()) { SetLastWin32Error(ERROR_ACCESS_DENIED); return FALSE; @@ -396,7 +396,7 @@
ThreadQueue = (PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue;
- if(ThreadQueue->CaretInfo->hWnd != WindowObject->Self) + if(ThreadQueue->CaretInfo->hWnd != Window->hSelf) { SetLastWin32Error(ERROR_ACCESS_DENIED); return FALSE; @@ -409,7 +409,7 @@ { co_IntSendMessage(ThreadQueue->CaretInfo->hWnd, WM_SYSTIMER, IDCARETTIMER, 0); } - IntSetTimer(WindowObject->Self, IDCARETTIMER, IntGetCaretBlinkTime(), NULL, TRUE); + IntSetTimer(Window->hSelf, IDCARETTIMER, IntGetCaretBlinkTime(), NULL, TRUE); }
return TRUE; _____
Modified: trunk/reactos/subsys/win32k/ntuser/class.c --- trunk/reactos/subsys/win32k/ntuser/class.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/class.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -471,19 +471,19 @@
}
ULONG FASTCALL -IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi) +IntGetClassLong(struct _WINDOW_OBJECT *Window, ULONG Offset, BOOL Ansi) { LONG Ret;
if ((int)Offset >= 0) { - DPRINT("GetClassLong(%x, %d)\n", WindowObject->Self, Offset); - if ((Offset + sizeof(LONG)) > WindowObject->Class->cbClsExtra) + DPRINT("GetClassLong(%x, %d)\n", Window->hSelf, Offset); + if ((Offset + sizeof(LONG)) > Window->Class->cbClsExtra) { SetLastWin32Error(ERROR_INVALID_PARAMETER); return 0; } - Ret = *((LONG *)(WindowObject->Class->ExtraData + Offset)); + Ret = *((LONG *)(Window->Class->ExtraData + Offset)); DPRINT("Result: %x\n", Ret); return Ret; } @@ -491,40 +491,40 @@ switch (Offset) { case GCL_CBWNDEXTRA: - Ret = WindowObject->Class->cbWndExtra; + Ret = Window->Class->cbWndExtra; break; case GCL_CBCLSEXTRA: - Ret = WindowObject->Class->cbClsExtra; + Ret = Window->Class->cbClsExtra; break; case GCL_HBRBACKGROUND: - Ret = (ULONG)WindowObject->Class->hbrBackground; + Ret = (ULONG)Window->Class->hbrBackground; break; case GCL_HCURSOR: - Ret = (ULONG)WindowObject->Class->hCursor; + Ret = (ULONG)Window->Class->hCursor; break; case GCL_HICON: - Ret = (ULONG)WindowObject->Class->hIcon; + Ret = (ULONG)Window->Class->hIcon; break; case GCL_HICONSM: - Ret = (ULONG)WindowObject->Class->hIconSm; + Ret = (ULONG)Window->Class->hIconSm; break; case GCL_HMODULE: - Ret = (ULONG)WindowObject->Class->hInstance; + Ret = (ULONG)Window->Class->hInstance; break; case GCL_MENUNAME: - Ret = (ULONG)WindowObject->Class->lpszMenuName.Buffer; + Ret = (ULONG)Window->Class->lpszMenuName.Buffer; break; case GCL_STYLE: - Ret = WindowObject->Class->style; + Ret = Window->Class->style; break; case GCL_WNDPROC: if (Ansi) { - Ret = (ULONG)WindowObject->Class->lpfnWndProcA; + Ret = (ULONG)Window->Class->lpfnWndProcA; } else { - Ret = (ULONG)WindowObject->Class->lpfnWndProcW; + Ret = (ULONG)Window->Class->lpfnWndProcW; } break; default: @@ -537,21 +537,21 @@ DWORD STDCALL NtUserGetClassLong(HWND hWnd, DWORD Offset, BOOL Ansi) { - PWINDOW_OBJECT WindowObject; + PWINDOW_OBJECT Window; LONG Ret; DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserGetClassLong\n"); UserEnterExclusive();
- WindowObject = IntGetWindowObject(hWnd); - if (WindowObject == NULL) + Window = IntGetWindowObject(hWnd); + if (Window == NULL) { SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE); RETURN(0); } - Ret = IntGetClassLong(WindowObject, Offset, Ansi); - IntReleaseWindowObject(WindowObject); + Ret = IntGetClassLong(Window, Offset, Ansi); + IntReleaseWindowObject(Window); RETURN(Ret);
CLEANUP: @@ -561,44 +561,44 @@ }
void FASTCALL -co_IntSetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, LONG dwNewLong, BOOL Ansi) +co_IntSetClassLong(PWINDOW_OBJECT Window, ULONG Offset, LONG dwNewLong, BOOL Ansi) { PWINDOW_OBJECT Parent, Owner;
if ((int)Offset >= 0) { - DPRINT("SetClassLong(%x, %d, %x)\n", WindowObject->Self, Offset, dwNewLong); - if ((Offset + sizeof(LONG)) > WindowObject->Class->cbClsExtra) + DPRINT("SetClassLong(%x, %d, %x)\n", Window->hSelf, Offset, dwNewLong); + if ((Offset + sizeof(LONG)) > Window->Class->cbClsExtra) { SetLastWin32Error(ERROR_INVALID_PARAMETER); return; } - *((LONG *)(WindowObject->Class->ExtraData + Offset)) = dwNewLong; + *((LONG *)(Window->Class->ExtraData + Offset)) = dwNewLong; return; }
switch (Offset) { case GCL_CBWNDEXTRA: - WindowObject->Class->cbWndExtra = dwNewLong; + Window->Class->cbWndExtra = dwNewLong; break; case GCL_CBCLSEXTRA: - WindowObject->Class->cbClsExtra = dwNewLong; + Window->Class->cbClsExtra = dwNewLong; break; case GCL_HBRBACKGROUND: - WindowObject->Class->hbrBackground = (HBRUSH)dwNewLong; + Window->Class->hbrBackground = (HBRUSH)dwNewLong; break; case GCL_HCURSOR: - WindowObject->Class->hCursor = (HCURSOR)dwNewLong; + Window->Class->hCursor = (HCURSOR)dwNewLong; break; case GCL_HICON: - WindowObject->Class->hIcon = (HICON)dwNewLong; - Owner = IntGetOwner(WindowObject); - Parent = IntGetParent(WindowObject); + Window->Class->hIcon = (HICON)dwNewLong; + Owner = IntGetOwner(Window); + Parent = IntGetParent(Window);
if ((!Owner) && (!Parent)) { - co_IntShellHookNotify(HSHELL_REDRAW, (LPARAM) WindowObject->Self); + co_IntShellHookNotify(HSHELL_REDRAW, (LPARAM) Window->hSelf); }
if (Parent) @@ -614,43 +614,43 @@
break; case GCL_HICONSM: - WindowObject->Class->hIconSm = (HICON)dwNewLong; + Window->Class->hIconSm = (HICON)dwNewLong; break; case GCL_HMODULE: - WindowObject->Class->hInstance = (HINSTANCE)dwNewLong; + Window->Class->hInstance = (HINSTANCE)dwNewLong; break; case GCL_MENUNAME: - if (WindowObject->Class->lpszMenuName.MaximumLength) - RtlFreeUnicodeString(&WindowObject->Class->lpszMenuName); + if (Window->Class->lpszMenuName.MaximumLength) + RtlFreeUnicodeString(&Window->Class->lpszMenuName); if (!IS_INTRESOURCE(dwNewLong)) { - WindowObject->Class->lpszMenuName.Length = - WindowObject->Class->lpszMenuName.MaximumLength = ((PUNICODE_STRING)dwNewLong)->MaximumLength; - WindowObject->Class->lpszMenuName.Buffer = ExAllocatePoolWithTag(PagedPool, WindowObject->Class->lpszMenuName.MaximumLength, TAG_STRING); - RtlCopyUnicodeString(&WindowObject->Class->lpszMenuName, (PUNICODE_STRING)dwNewLong); + Window->Class->lpszMenuName.Length = + Window->Class->lpszMenuName.MaximumLength = ((PUNICODE_STRING)dwNewLong)->MaximumLength; + Window->Class->lpszMenuName.Buffer = ExAllocatePoolWithTag(PagedPool, Window->Class->lpszMenuName.MaximumLength, TAG_STRING); + RtlCopyUnicodeString(&Window->Class->lpszMenuName, (PUNICODE_STRING)dwNewLong); } else { - WindowObject->Class->lpszMenuName.Length = - WindowObject->Class->lpszMenuName.MaximumLength = 0; - WindowObject->Class->lpszMenuName.Buffer = (LPWSTR)dwNewLong; + Window->Class->lpszMenuName.Length = + Window->Class->lpszMenuName.MaximumLength = 0; + Window->Class->lpszMenuName.Buffer = (LPWSTR)dwNewLong; } break; case GCL_STYLE: - WindowObject->Class->style = dwNewLong; + Window->Class->style = dwNewLong; break; case GCL_WNDPROC: if (Ansi) { - WindowObject->Class->lpfnWndProcA = (WNDPROC)dwNewLong; - WindowObject->Class->lpfnWndProcW = (WNDPROC) IntAddWndProcHandle((WNDPROC)dwNewLong,FALSE); - WindowObject->Class->Unicode = FALSE; + Window->Class->lpfnWndProcA = (WNDPROC)dwNewLong; + Window->Class->lpfnWndProcW = (WNDPROC) IntAddWndProcHandle((WNDPROC)dwNewLong,FALSE); + Window->Class->Unicode = FALSE; } else { - WindowObject->Class->lpfnWndProcW = (WNDPROC)dwNewLong; - WindowObject->Class->lpfnWndProcA = (WNDPROC) IntAddWndProcHandle((WNDPROC)dwNewLong,TRUE); - WindowObject->Class->Unicode = TRUE; + Window->Class->lpfnWndProcW = (WNDPROC)dwNewLong; + Window->Class->lpfnWndProcA = (WNDPROC) IntAddWndProcHandle((WNDPROC)dwNewLong,TRUE); + Window->Class->Unicode = TRUE; } break; } @@ -662,22 +662,21 @@ LONG dwNewLong, BOOL Ansi) { - PWINDOW_OBJECT WindowObject; + PWINDOW_OBJECT Window; LONG Ret; DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserSetClassLong\n"); UserEnterExclusive();
- WindowObject = IntGetWindowObject(hWnd); - if (WindowObject == NULL) + if (!(Window = IntGetWindowObject(hWnd))) { SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE); RETURN(0); } - Ret = IntGetClassLong(WindowObject, Offset, Ansi); - co_IntSetClassLong(WindowObject, Offset, dwNewLong, Ansi); - IntReleaseWindowObject(WindowObject); + Ret = IntGetClassLong(Window, Offset, Ansi); + co_IntSetClassLong(Window, Offset, dwNewLong, Ansi); + IntReleaseWindowObject(Window); RETURN(Ret);
CLEANUP: @@ -702,7 +701,7 @@ DWORD Unknown) { PWNDCLASS_OBJECT Class; - PWINSTATION_OBJECT WinStaObject; + PWINSTATION_OBJECT WinSta; DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserUnregisterClass(%S)\n", ClassNameOrAtom); @@ -714,7 +713,7 @@ RETURN( FALSE); }
- WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinSta = PsGetWin32Thread()->Desktop->WindowStation;
if (!ClassReferenceClassByNameOrAtom(&Class, ClassNameOrAtom, hInstance)) { @@ -742,7 +741,7 @@
RemoveEntryList(&Class->ListEntry);
- RtlDeleteAtomFromAtomTable(WinStaObject->AtomTable, Class->Atom); + RtlDeleteAtomFromAtomTable(WinSta->AtomTable, Class->Atom);
/* Free the object */ ClassDereferenceObject(Class); _____
Modified: trunk/reactos/subsys/win32k/ntuser/focus.c --- trunk/reactos/subsys/win32k/ntuser/focus.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/focus.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -135,7 +135,7 @@
if(OwnerWnd == Owner) { - Ret = Child->Self; + Ret = Child->hSelf; IntReleaseWindowObject(OwnerWnd); return Ret; } @@ -148,9 +148,9 @@ STATIC BOOL FASTCALL co_IntSetForegroundAndFocusWindow(PWINDOW_OBJECT Window, PWINDOW_OBJECT FocusWindow, BOOL MouseActivate) { - HWND hWnd = Window->Self; + HWND hWnd = Window->hSelf; HWND hWndPrev = NULL; - HWND hWndFocus = FocusWindow->Self; + HWND hWndFocus = FocusWindow->hSelf; HWND hWndFocusPrev = NULL; PUSER_MESSAGE_QUEUE PrevForegroundQueue;
@@ -243,8 +243,8 @@ return FALSE; }
- Top = UserGetAncestor(Window->Self, GA_ROOT); - if (Top != Window->Self) + Top = UserGetAncestor(Window->hSelf, GA_ROOT); + if (Top != Window->hSelf) { TopWindow = IntGetWindowObject(Top); if (TopWindow == NULL) @@ -261,7 +261,7 @@ /* TMN: Check return valud from this function? */ co_IntSetForegroundAndFocusWindow(TopWindow, Window, TRUE);
- if (Top != Window->Self) + if (Top != Window->hSelf) { IntReleaseWindowObject(TopWindow); } @@ -285,7 +285,7 @@ { return ThreadQueue ? 0 : ThreadQueue->ActiveWindow; } - hWnd = Window->Self; + hWnd = Window->hSelf; }
hWndPrev = ThreadQueue->ActiveWindow; _____
Modified: trunk/reactos/subsys/win32k/ntuser/hotkey.c --- trunk/reactos/subsys/win32k/ntuser/hotkey.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/hotkey.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -128,7 +128,7 @@
HOT_KEY_ITEM, ListEntry); Entry = Entry->Flink; - if (HotKeyItem->hWnd == Window->Self) + if (HotKeyItem->hWnd == Window->hSelf) { RemoveEntryList (&HotKeyItem->ListEntry); ExFreePool (HotKeyItem); _____
Modified: trunk/reactos/subsys/win32k/ntuser/menu.c --- trunk/reactos/subsys/win32k/ntuser/menu.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/menu.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -1161,52 +1161,52 @@
}
VOID FASTCALL -co_IntInitTracking(PWINDOW_OBJECT WindowObject, PMENU_OBJECT MenuObject, BOOL Popup, +co_IntInitTracking(PWINDOW_OBJECT Window, PMENU_OBJECT Menu, BOOL Popup, UINT Flags) { /* FIXME - hide caret */
if(!(Flags & TPM_NONOTIFY)) - co_IntSendMessage(WindowObject->Self, WM_SETCURSOR, (WPARAM)WindowObject->Self, HTCAPTION); + co_IntSendMessage(Window->hSelf, WM_SETCURSOR, (WPARAM)Window->hSelf, HTCAPTION);
/* FIXME - send WM_SETCURSOR message */
if(!(Flags & TPM_NONOTIFY)) - co_IntSendMessage(WindowObject->Self, WM_INITMENU, (WPARAM)MenuObject->MenuInfo.Self, 0); + co_IntSendMessage(Window->hSelf, WM_INITMENU, (WPARAM)Menu->MenuInfo.Self, 0); }
VOID FASTCALL -co_IntExitTracking(PWINDOW_OBJECT WindowObject, PMENU_OBJECT MenuObject, BOOL Popup, +co_IntExitTracking(PWINDOW_OBJECT Window, PMENU_OBJECT Menu, BOOL Popup, UINT Flags) { if(!(Flags & TPM_NONOTIFY)) - co_IntSendMessage(WindowObject->Self, WM_EXITMENULOOP, 0 /* FIXME */, 0); + co_IntSendMessage(Window->hSelf, WM_EXITMENULOOP, 0 /* FIXME */, 0);
/* FIXME - Show caret again */ }
INT FASTCALL -IntTrackMenu(PMENU_OBJECT MenuObject, PWINDOW_OBJECT WindowObject, INT x, INT y, +IntTrackMenu(PMENU_OBJECT Menu, PWINDOW_OBJECT Window, INT x, INT y, RECT lprect) { return 0; }
BOOL FASTCALL -co_IntTrackPopupMenu(PMENU_OBJECT MenuObject, PWINDOW_OBJECT WindowObject, +co_IntTrackPopupMenu(PMENU_OBJECT Menu, PWINDOW_OBJECT Window, UINT Flags, POINT *Pos, UINT MenuPos, RECT *ExcludeRect) { - co_IntInitTracking(WindowObject, MenuObject, TRUE, Flags); + co_IntInitTracking(Window, Menu, TRUE, Flags);
- co_IntExitTracking(WindowObject, MenuObject, TRUE, Flags); + co_IntExitTracking(Window, Menu, TRUE, Flags); return FALSE; }
BOOL FASTCALL -IntSetMenuItemRect(PMENU_OBJECT MenuObject, UINT Item, BOOL fByPos, RECT *rcRect) +IntSetMenuItemRect(PMENU_OBJECT Menu, UINT Item, BOOL fByPos, RECT *rcRect) { PMENU_ITEM mi; - if(IntGetMenuItemByFlag(MenuObject, Item, (fByPos ? MF_BYPOSITION : MF_BYCOMMAND), + if(IntGetMenuItemByFlag(Menu, Item, (fByPos ? MF_BYPOSITION : MF_BYCOMMAND), &mi, NULL) > -1) { mi->Rect = *rcRect; _____
Modified: trunk/reactos/subsys/win32k/ntuser/message.c --- trunk/reactos/subsys/win32k/ntuser/message.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/message.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -513,7 +513,7 @@
return TRUE; }
- Result = co_IntSendMessage(MsgWindow->Self, WM_MOUSEACTIVATE, (WPARAM)IntGetParent(MsgWindow), (LPARAM)MAKELONG(*HitTest, Msg->message)); + Result = co_IntSendMessage(MsgWindow->hSelf, WM_MOUSEACTIVATE, (WPARAM)IntGetParent(MsgWindow), (LPARAM)MAKELONG(*HitTest, Msg->message)); switch (Result) { case MA_NOACTIVATEANDEAT: @@ -544,10 +544,10 @@ }
if(ThreadQueue == Window->MessageQueue && - ThreadQueue->CaptureWindow != Window->Self) + ThreadQueue->CaptureWindow != Window->hSelf) { /* only send WM_NCHITTEST messages if we're not capturing the window! */ - *HitTest = co_IntSendMessage(Window->Self, WM_NCHITTEST, 0, + *HitTest = co_IntSendMessage(Window->hSelf, WM_NCHITTEST, 0, MAKELONG(Msg->pt.x, Msg->pt.y));
if(*HitTest == (USHORT)HTTRANSPARENT) @@ -565,7 +565,7 @@ if(Wnd != Window) { /* post the message to the other window */ - Msg->hwnd = Wnd->Self; + Msg->hwnd = Wnd->hSelf; if(!(Wnd->Status & WINDOWSTATUS_DESTROYING)) { MsqPostMessage(Wnd->MessageQueue, Msg, FALSE, @@ -612,7 +612,7 @@ (((*HitTest) == HTCAPTION) || ((*HitTest) == HTSYSMENU))) { Msg->message = WM_CONTEXTMENU; - Msg->wParam = (WPARAM)Window->Self; + Msg->wParam = (WPARAM)Window->hSelf; } else { _____
Modified: trunk/reactos/subsys/win32k/ntuser/msgqueue.c --- trunk/reactos/subsys/win32k/ntuser/msgqueue.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/msgqueue.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -354,7 +354,7 @@
*ScreenPoint = Message->Msg.pt;
- if((hWnd != NULL && Window->Self != hWnd) || + if((hWnd != NULL && Window->hSelf != hWnd) || ((FilterLow != 0 || FilterLow != 0) && (Msg < FilterLow || Msg > FilterHigh))) { /* Reject the message because it doesn't match the filter */ @@ -395,7 +395,7 @@ }
/* FIXME - only assign if removing? */ - Message->Msg.hwnd = Window->Self; + Message->Msg.hwnd = Window->hSelf; Message->Msg.message = Msg; Message->Msg.lParam = MAKELONG(Message->Msg.pt.x, Message->Msg.pt.y);
@@ -924,7 +924,7 @@ { PostedMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE, ListEntry); - if (PostedMessage->Msg.hwnd == Window->Self) + if (PostedMessage->Msg.hwnd == Window->hSelf) { RemoveEntryList(&PostedMessage->ListEntry); MsqDestroyMessage(PostedMessage); @@ -944,7 +944,7 @@ CurrentEntry = RemoveHeadList(&MessageQueue->SentMessagesListHead); SentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE, ListEntry); - if(SentMessage->Msg.hwnd == Window->Self) + if(SentMessage->Msg.hwnd == Window->hSelf) { DPRINT("Notify the sender and remove a message from the queue that had not been dispatched\n");
_____
Modified: trunk/reactos/subsys/win32k/ntuser/painting.c --- trunk/reactos/subsys/win32k/ntuser/painting.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/painting.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -81,7 +81,7 @@
co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags) { HDC hDC; - HWND hWnd = Window->Self; + HWND hWnd = Window->hSelf; HRGN TempRegion;
if (Flags & (RDW_ERASENOW | RDW_UPDATENOW)) @@ -555,7 +555,7 @@ if (IntIsWindowDirty(Child) && IntWndBelongsToThread(Child, Thread)) { - hFoundWnd = Child->Self; + hFoundWnd = Child->hSelf; break; } } _____
Modified: trunk/reactos/subsys/win32k/ntuser/scrollbar.c --- trunk/reactos/subsys/win32k/ntuser/scrollbar.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/scrollbar.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -365,7 +365,7 @@
} else if ((nBar != SB_CTL) && bChangeParams) { - co_UserShowScrollBar(Window->Self, nBar, FALSE); + co_UserShowScrollBar(Window->hSelf, nBar, FALSE); return Info->nPos; } } @@ -374,7 +374,7 @@ /* new_flags = 0;*/ if ((nBar != SB_CTL) && bChangeParams) { - co_UserShowScrollBar(Window->Self, nBar, TRUE); + co_UserShowScrollBar(Window->hSelf, nBar, TRUE); } }
@@ -452,13 +452,13 @@ Size = 3 * (sizeof(WINDOW_SCROLLINFO)); if(!(Window->Scroll = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO))) { - DPRINT1("Unable to allocate memory for scrollbar information for window 0x%x\n", Window->Self); + DPRINT1("Unable to allocate memory for scrollbar information for window 0x%x\n", Window->hSelf); return FALSE; }
RtlZeroMemory(Window->Scroll, Size);
- Result = co_WinPosGetNonClientSize(Window->Self, + Result = co_WinPosGetNonClientSize(Window->hSelf, &Window->WindowRect, &Window->ClientRect);
_____
Modified: trunk/reactos/subsys/win32k/ntuser/windc.c --- trunk/reactos/subsys/win32k/ntuser/windc.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/windc.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -294,7 +294,7 @@
{ DcxFlags = Flags & ~(DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW); } - hRgnVisible = DceGetVisRgn(Parent->Self, DcxFlags, Window->Self, Flags); + hRgnVisible = DceGetVisRgn(Parent->hSelf, DcxFlags, Window->hSelf, Flags); if (hRgnVisible == NULL) { hRgnVisible = NtGdiCreateRectRgn(0, 0, 0, 0); @@ -332,7 +332,7 @@ } else { - hRgnVisible = DceGetVisRgn(Window->Self, Flags, 0, 0); + hRgnVisible = DceGetVisRgn(Window->hSelf, Flags, 0, 0); }
noparent: @@ -471,7 +471,7 @@ { DceEmpty = Dce; } - else if (Dce->hwndCurrent == (Window ? Window->Self : NULL) && + else if (Dce->hwndCurrent == (Window ? Window->hSelf : NULL) && ((Dce->DCXFlags & DCX_CACHECOMPAREMASK) == DcxFlags)) { #if 0 /* FIXME */ @@ -498,7 +498,7 @@ else { Dce = Window->Dce; - if (NULL != Dce && Dce->hwndCurrent == (Window ? Window->Self : NULL)) + if (NULL != Dce && Dce->hwndCurrent == (Window ? Window->hSelf : NULL)) { UpdateVisRgn = FALSE; /* updated automatically, via DCHook() */ } @@ -512,7 +512,7 @@ return(NULL); }
- Dce->hwndCurrent = (Window ? Window->Self : NULL); + Dce->hwndCurrent = (Window ? Window->hSelf : NULL); Dce->DCXFlags = DcxFlags | (Flags & DCX_WINDOWPAINT) | DCX_DCEBUSY;
if (0 == (Flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN)) && NULL != ClipRegion) @@ -781,7 +781,7 @@ pDCE = FirstDce; while (pDCE) { - if (pDCE->hwndCurrent == Window->Self) + if (pDCE->hwndCurrent == Window->hSelf) { if (pDCE == Window->Dce) /* owned or Class DCE*/ { @@ -808,7 +808,7 @@ * We should change this to DPRINT when ReactOS is more stable * (for 1.0?). */ - DPRINT1("[%p] GetDC() without ReleaseDC()!\n", Window->Self); + DPRINT1("[%p] GetDC() without ReleaseDC()!\n", Window->hSelf); DceReleaseDC(pDCE); }
@@ -854,7 +854,7 @@ { if (0 == (pDCE->DCXFlags & DCX_DCEEMPTY)) { - if (Window->Self == pDCE->hwndCurrent) + if (Window->hSelf == pDCE->hwndCurrent) { CurrentWindow = Window; } @@ -871,14 +871,14 @@ dc = DC_LockDc(pDCE->hDC); if (dc == NULL) { - if (Window->Self != pDCE->hwndCurrent) + if (Window->hSelf != pDCE->hwndCurrent) { IntReleaseWindowObject(CurrentWindow); } pDCE = pDCE->next; continue; } - if (Window == CurrentWindow || IntIsChildWindow(Window->Self, CurrentWindow->Self)) + if (Window == CurrentWindow || IntIsChildWindow(Window->hSelf, CurrentWindow->hSelf)) { if (pDCE->DCXFlags & DCX_WINDOW) { @@ -907,7 +907,7 @@
DceUpdateVisRgn(pDCE, CurrentWindow, pDCE->DCXFlags);
- if (Window->Self != pDCE->hwndCurrent) + if (Window->hSelf != pDCE->hwndCurrent) { // IntEngWindowChanged(CurrentWindow, WOC_RGN_CLIENT); IntReleaseWindowObject(CurrentWindow); _____
Modified: trunk/reactos/subsys/win32k/ntuser/window.c --- trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-06 10:05:31 UTC (rev 17694) +++ trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-06 11:00:27 UTC (rev 17695) @@ -124,16 +124,16 @@
PWINDOW_OBJECT FASTCALL IntGetProcessWindowObject(PW32THREAD Thread, HWND hWnd) { - PWINDOW_OBJECT WindowObject; + PWINDOW_OBJECT Window; NTSTATUS Status;
if(Thread->Desktop != NULL) { Status = ObmReferenceObjectByHandle(gHandleTable, - hWnd, otWindow, (PVOID*)&WindowObject); + hWnd, otWindow, (PVOID*)&Window); if (NT_SUCCESS(Status)) { - return WindowObject; + return Window; } } return NULL; @@ -208,7 +208,7 @@ for (Child = Window->FirstChild, Index = 0; Child != NULL; Child = Child->NextSibling, ++Index) - List[Index] = Child->Self; + List[Index] = Child->hSelf; List[Index] = NULL;
return List; @@ -317,12 +317,12 @@
BelongsToThreadData = IntWndBelongsToThread(Window, ThreadData);
- IntDeRegisterShellHookWindow(Window->Self); + IntDeRegisterShellHookWindow(Window->hSelf);
if(SendMessages) { /* Send destroy messages */ - IntSendDestroyMsg(Window->Self); + IntSendDestroyMsg(Window->hSelf); }
/* free child windows */ @@ -336,7 +336,7 @@ if(!IntWndBelongsToThread(Child, ThreadData)) { /* send WM_DESTROY messages to windows not belonging to the same thread */ - IntSendDestroyMsg(Child->Self); + IntSendDestroyMsg(Child->hSelf); } else co_IntDestroyWindow(Child, ProcessData, ThreadData, SendMessages); @@ -356,9 +356,9 @@ RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_NOCHILDREN); if(BelongsToThreadData) - co_IntSendMessage(Window->Self, WM_NCDESTROY, 0, 0); + co_IntSendMessage(Window->hSelf, WM_NCDESTROY, 0, 0); } - MsqRemoveTimersWindow(ThreadData->MessageQueue, Window->Self); + MsqRemoveTimersWindow(ThreadData->MessageQueue, Window->hSelf);
/* flush the message queue */ MsqRemoveWindowMessagesFromQueue(Window); @@ -370,10 +370,10 @@ /* reset shell window handles */ if(ThreadData->Desktop) { - if (Window->Self == ThreadData->Desktop->WindowStation->ShellWindow) + if (Window->hSelf == ThreadData->Desktop->WindowStation->ShellWindow) ThreadData->Desktop->WindowStation->ShellWindow = NULL;
- if (Window->Self == ThreadData->Desktop->WindowStation->ShellListView) + if (Window->hSelf == ThreadData->Desktop->WindowStation->ShellListView) ThreadData->Desktop->WindowStation->ShellListView = NULL; }
@@ -383,14 +383,14 @@ /* FIXME: do we need to fake QS_MOUSEMOVE wakebit? */
#if 0 /* FIXME */ - WinPosCheckInternalPos(Window->Self); - if (Window->Self == GetCapture()) + WinPosCheckInternalPos(Window->hSelf); + if (Window->hSelf == GetCapture()) { ReleaseCapture(); }
/* free resources associated with the window */ - TIMER_RemoveWindowTimers(Window->Self); + TIMER_RemoveWindowTimers(Window->hSelf); #endif
if (!(Window->Style & WS_CHILD) && Window->IDMenu @@ -418,7 +418,7 @@ IntUnlinkWindow(Window);
IntReferenceWindowObject(Window); - ObmCloseHandle(gHandleTable, Window->Self); + ObmCloseHandle(gHandleTable, Window->hSelf);
IntDestroyScrollBars(Window);
@@ -442,21 +442,21 @@ }
VOID FASTCALL -IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy) +IntGetWindowBorderMeasures(PWINDOW_OBJECT Window, UINT *cx, UINT *cy) { - if(HAS_DLGFRAME(WindowObject->Style, WindowObject->ExStyle) && !(WindowObject->Style & WS_MINIMIZE)) + if(HAS_DLGFRAME(Window->Style, Window->ExStyle) && !(Window->Style & WS_MINIMIZE)) { *cx = UserGetSystemMetrics(SM_CXDLGFRAME); *cy = UserGetSystemMetrics(SM_CYDLGFRAME); } else { - if(HAS_THICKFRAME(WindowObject->Style, WindowObject->ExStyle)&& !(WindowObject->Style & WS_MINIMIZE)) + if(HAS_THICKFRAME(Window->Style, Window->ExStyle)&& !(Window->Style & WS_MINIMIZE)) { *cx = UserGetSystemMetrics(SM_CXFRAME); *cy = UserGetSystemMetrics(SM_CYFRAME); } - else if(HAS_THINFRAME(WindowObject->Style, WindowObject->ExStyle)) + else if(HAS_THINFRAME(Window->Style, Window->ExStyle)) { *cx = UserGetSystemMetrics(SM_CXBORDER); *cy = UserGetSystemMetrics(SM_CYBORDER); @@ -469,68 +469,68 @@ }
BOOL FASTCALL -IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi) +IntGetWindowInfo(PWINDOW_OBJECT Window, PWINDOWINFO pwi) { pwi->cbSize = sizeof(WINDOWINFO); - pwi->rcWindow = WindowObject->WindowRect; - pwi->rcClient = WindowObject->ClientRect; - pwi->dwStyle = WindowObject->Style; - pwi->dwExStyle = WindowObject->ExStyle; - pwi->dwWindowStatus = (UserGetForegroundWindow() == WindowObject->Self); /* WS_ACTIVECAPTION */ - IntGetWindowBorderMeasures(WindowObject, &pwi->cxWindowBorders, &pwi->cyWindowBorders); - pwi->atomWindowType = (WindowObject->Class ? WindowObject->Class->Atom : 0); + pwi->rcWindow = Window->WindowRect; + pwi->rcClient = Window->ClientRect; + pwi->dwStyle = Window->Style; + pwi->dwExStyle = Window->ExStyle; + pwi->dwWindowStatus = (UserGetForegroundWindow() == Window->hSelf); /* WS_ACTIVECAPTION */ + IntGetWindowBorderMeasures(Window, &pwi->cxWindowBorders, &pwi->cyWindowBorders); + pwi->atomWindowType = (Window->Class ? Window->Class->Atom : 0); pwi->wCreatorVersion = 0x400; /* FIXME - return a real version number */ return TRUE; }
static BOOL FASTCALL IntSetMenu( - PWINDOW_OBJECT WindowObject, + PWINDOW_OBJECT Window, HMENU Menu, BOOL *Changed) { - PMENU_OBJECT OldMenuObject, NewMenuObject = NULL; + PMENU_OBJECT OldMenu, NewMenu = NULL;
- if ((WindowObject->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD) + if ((Window->Style & (WS_CHILD | WS_POPUP)) == WS_CHILD) { SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE); return FALSE; }
- *Changed = (WindowObject->IDMenu != (UINT) Menu); + *Changed = (Window->IDMenu != (UINT) Menu); if (! *Changed) { return TRUE; }
- if (WindowObject->IDMenu) + if (Window->IDMenu) { - OldMenuObject = IntGetMenuObject((HMENU) WindowObject->IDMenu); - ASSERT(NULL == OldMenuObject || OldMenuObject->MenuInfo.Wnd == WindowObject->Self); + OldMenu = IntGetMenuObject((HMENU) Window->IDMenu); + ASSERT(NULL == OldMenu || OldMenu->MenuInfo.Wnd == Window->hSelf); } else { - OldMenuObject = NULL; + OldMenu = NULL; }
if (NULL != Menu) { - NewMenuObject = IntGetMenuObject(Menu); - if (NULL == NewMenuObject) + NewMenu = IntGetMenuObject(Menu); + if (NULL == NewMenu) { - if (NULL != OldMenuObject) + if (NULL != OldMenu) { - IntReleaseMenuObject(OldMenuObject); + IntReleaseMenuObject(OldMenu); } SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); return FALSE; } - if (NULL != NewMenuObject->MenuInfo.Wnd) + if (NULL != NewMenu->MenuInfo.Wnd) { /* Can't use the same menu for two windows */ - if (NULL != OldMenuObject) + if (NULL != OldMenu) { - IntReleaseMenuObject(OldMenuObject); + IntReleaseMenuObject(OldMenu); } SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); return FALSE; @@ -538,16 +538,16 @@
}
- WindowObject->IDMenu = (UINT) Menu; - if (NULL != NewMenuObject) + Window->IDMenu = (UINT) Menu; + if (NULL != NewMenu) { - NewMenuObject->MenuInfo.Wnd = WindowObject->Self; - IntReleaseMenuObject(NewMenuObject); + NewMenu->MenuInfo.Wnd = Window->hSelf; + IntReleaseMenuObject(NewMenu); } - if (NULL != OldMenuObject) + if (NULL != OldMenu) { - OldMenuObject->MenuInfo.Wnd = NULL; - IntReleaseMenuObject(OldMenuObject); + OldMenu->MenuInfo.Wnd = NULL; + IntReleaseMenuObject(OldMenu); }
return TRUE; @@ -614,14 +614,14 @@ * \note Does not check the validity of the parameters */ VOID FASTCALL -IntGetClientRect(PWINDOW_OBJECT WindowObject, PRECT Rect) +IntGetClientRect(PWINDOW_OBJECT Window, PRECT Rect) { - ASSERT( WindowObject ); + ASSERT( Window ); ASSERT( Rect );
Rect->left = Rect->top = 0; - Rect->right = WindowObject->ClientRect.right - WindowObject->ClientRect.left; - Rect->bottom = WindowObject->ClientRect.bottom - WindowObject->ClientRect.top; + Rect->right = Window->ClientRect.right - Window->ClientRect.left; + Rect->bottom = Window->ClientRect.bottom - Window->ClientRect.top; }
@@ -645,11 +645,11 @@ [truncated at 1000 lines; 2256 more skipped]