Author: jimtabor
Date: Sun Jan 10 08:50:57 2010
New Revision: 45021
URL:
http://svn.reactos.org/svn/reactos?rev=45021&view=rev
Log:
[Win32k]
- Removed NtUserGetScrollInfo and replaced it, move more type names in window object to
WND.
Modified:
trunk/reactos/dll/win32/user32/controls/scrollbar.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/include/scroll.h
trunk/reactos/subsystems/win32/win32k/include/window.h
trunk/reactos/subsystems/win32/win32k/include/winpos.h
trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c
trunk/reactos/subsystems/win32/win32k/ntuser/vis.c
trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/user32/controls/scrollbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] Sun Jan 10 08:50:57
2010
@@ -573,7 +573,7 @@
{
SCROLLINFO Info;
- NtUserGetScrollInfo(Wnd, Bar, &Info);
+ NtUserSBGetParms(Wnd, Bar, NULL, &Info);
*ArrowSize = GetSystemMetrics(SM_CXVSCROLL);
Pixels -= (2 * GetSystemMetrics(SM_CXVSCROLL));
@@ -637,7 +637,7 @@
si.cbSize = sizeof(SCROLLINFO);
si.fMask = SIF_RANGE | SIF_PAGE;
- NtUserGetScrollInfo(Wnd, SBType, &si);
+ NtUserSBGetParms(Wnd, SBType, NULL, &si);
if ((Pixels -= 2 * ScrollBarInfo->dxyLineButton) <= 0)
{
return si.nMin;
@@ -1139,7 +1139,7 @@
ScrollInfo.cbSize = sizeof(SCROLLINFO);
ScrollInfo.fMask = SIF_POS;
- if (! NtUserGetScrollInfo(Wnd, Bar, &ScrollInfo))
+ if (! NtUserSBGetParms(Wnd, Bar, NULL, &ScrollInfo))
{
return 0;
}
@@ -1161,7 +1161,7 @@
ScrollInfo.cbSize = sizeof(SCROLLINFO);
ScrollInfo.fMask = SIF_RANGE;
- Result = NtUserGetScrollInfo(Wnd, Bar, &ScrollInfo);
+ Result = NtUserSBGetParms(Wnd, Bar, NULL, &ScrollInfo);
if (Result)
{
*MinPos = ScrollInfo.nMin;
@@ -1431,7 +1431,7 @@
return NtUserSetScrollInfo(Wnd, SB_CTL, (SCROLLINFO *) lParam, wParam);
case SBM_GETSCROLLINFO:
- return NtUserGetScrollInfo(Wnd, SB_CTL, (SCROLLINFO *) lParam);
+ return NtUserSBGetParms(Wnd, SB_CTL, NULL, (SCROLLINFO *) lParam);
case 0x00e5:
case 0x00e7:
@@ -1502,14 +1502,24 @@
BOOL WINAPI
RealGetScrollInfo(HWND Wnd, INT SBType, LPSCROLLINFO Info)
{
- if (SB_CTL == SBType)
- {
- return SendMessageW(Wnd, SBM_GETSCROLLINFO, 0, (LPARAM) Info);
- }
- else
- {
- return NtUserGetScrollInfo(Wnd, SBType, Info);
- }
+ PWND pWnd;
+ PSBDATA pSBData = NULL;
+
+ if (SB_CTL == SBType)
+ {
+ return SendMessageW(Wnd, SBM_GETSCROLLINFO, 0, (LPARAM) Info);
+ }
+
+ pWnd = ValidateHwnd(Wnd);
+ if (!pWnd) return FALSE;
+
+ if (SBType < SB_HORZ || SBType > SB_VERT)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+ // FIXME add support to set pSBData from pWnd->pSBInfo
+ return NtUserSBGetParms(Wnd, SBType, pSBData, Info);
}
/*
@@ -1636,10 +1646,10 @@
ScrollInfo.fMask = SIF_POS;
/*
- * Call NtUserGetScrollInfo() to get the previous position that
+ * Call NtUserSBGetParms() to get the previous position that
* we will later return.
*/
- if (NtUserGetScrollInfo(hWnd, nBar, &ScrollInfo))
+ if (NtUserSBGetParms(hWnd, nBar, NULL, &ScrollInfo))
{
Result = ScrollInfo.nPos;
if (Result != nPos)
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Sun Jan 10 08:50:57 2010
@@ -2459,13 +2459,13 @@
NtUserResolveDesktopForWOW(
DWORD Unknown0);
-DWORD
+BOOL
NTAPI
NtUserSBGetParms(
- DWORD Unknown0,
- DWORD Unknown1,
- DWORD Unknown2,
- DWORD Unknown3);
+ HWND hwnd,
+ int fnBar,
+ PSBDATA pSBData,
+ LPSCROLLINFO lpsi);
BOOL
NTAPI
@@ -3129,12 +3129,6 @@
OUT LPMONITORINFO pMonitorInfo);
/* Should be done in usermode */
-BOOL
-NTAPI
-NtUserGetScrollInfo(
- HWND hwnd,
- int fnBar,
- LPSCROLLINFO lpsi);
/* (other FocusedItem values give the position of the focused item) */
#define NO_SELECTED_ITEM 0xffff
Modified: trunk/reactos/subsystems/win32/win32k/include/scroll.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/scroll.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/scroll.h [iso-8859-1] Sun Jan 10
08:50:57 2010
@@ -1,17 +1,17 @@
#ifndef _WIN32K_SCROLL_H
#define _WIN32K_SCROLL_H
-typedef struct _WINDOW_SCROLLINFO
+typedef struct _SBINFOEX
{
SCROLLBARINFO ScrollBarInfo;
SCROLLINFO ScrollInfo;
-} WINDOW_SCROLLINFO, *PWINDOW_SCROLLINFO;
+} SBINFOEX, *PSBINFOEX;
#define IntGetScrollbarInfoFromWindow(Window, i) \
- ((PSCROLLBARINFO)(&((Window)->Scroll + i)->ScrollBarInfo))
+ ((PSCROLLBARINFO)(&((Window)->pSBInfo + i)->ScrollBarInfo))
#define IntGetScrollInfoFromWindow(Window, i) \
- ((LPSCROLLINFO)(&((Window)->Scroll + i)->ScrollInfo))
+ ((LPSCROLLINFO)(&((Window)->pSBInfo + i)->ScrollInfo))
#define SBOBJ_TO_SBID(Obj) ((Obj) - OBJID_HSCROLL)
#define SBID_IS_VALID(id) (id == SB_HORZ || id == SB_VERT || id == SB_CTL)
Modified: trunk/reactos/subsystems/win32/win32k/include/window.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/window.h [iso-8859-1] Sun Jan 10
08:50:57 2010
@@ -32,13 +32,13 @@
/* Entry in the thread's list of windows. */
LIST_ENTRY ListEntry;
/* Handle for the window. */
- HWND hSelf;
+ HWND hSelf; // Use Wnd->head.h
/* Window flags. */
ULONG state;
/* Handle of region of the window to be updated. */
- HANDLE UpdateRegion;
+ HANDLE hrgnUpdate;
/* Handle of the window region. */
- HANDLE WindowRegion;
+ HANDLE hrgnClip;
/* Pointer to the owning thread's message queue. */
PUSER_MESSAGE_QUEUE MessageQueue;
struct _WINDOW_OBJECT* spwndChild;
@@ -53,13 +53,12 @@
/* DC Entries (DCE) */
PDCE Dce;
/* Scrollbar info */
- PWINDOW_SCROLLINFO Scroll;
+ PSBINFOEX pSBInfo; // convert to PSBINFO
PETHREAD OwnerThread; // Use Wnd->head.pti
- HWND hWndLastPopup; /* handle to last active popup window (wine doesn't use
pointer, for unk. reason)*/
/* counter for tiled child windows */
ULONG TiledCounter;
/* WNDOBJ list */
- LIST_ENTRY WndObjListHead;
+ LIST_ENTRY WndObjListHead; // Use Props
} WINDOW_OBJECT; /* PWINDOW_OBJECT already declared at top of file */
/* Window flags. */
@@ -93,13 +92,15 @@
#define IntWndBelongsToThread(WndObj, W32Thread) \
(((WndObj->OwnerThread && WndObj->OwnerThread->Tcb.Win32Thread))
&& \
(WndObj->OwnerThread->Tcb.Win32Thread == W32Thread))
+// ((WndObj->head.pti) && (WndObj->head.pti == W32Thread))
#define IntGetWndThreadId(WndObj) \
WndObj->OwnerThread->Cid.UniqueThread
+// WndObj->head.pti->pEThread->Cid.UniqueThread
#define IntGetWndProcessId(WndObj) \
WndObj->OwnerThread->ThreadsProcess->UniqueProcessId
-
+// WndObj->head.pti->pEThread->ThreadsProcess->UniqueProcessId
BOOL FASTCALL
IntIsWindow(HWND hWnd);
Modified: trunk/reactos/subsystems/win32/win32k/include/winpos.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/winpos.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/winpos.h [iso-8859-1] Sun Jan 10
08:50:57 2010
@@ -10,8 +10,8 @@
(x) < (WndObject)->Wnd->rcWindow.right && \
(y) >= (WndObject)->Wnd->rcWindow.top && \
(y) < (WndObject)->Wnd->rcWindow.bottom && \
- (!(WndObject)->WindowRegion || ((WndObject)->Wnd->style & WS_MINIMIZE) ||
\
- NtGdiPtInRegion((WndObject)->WindowRegion, (INT)((x) -
(WndObject)->Wnd->rcWindow.left), \
+ (!(WndObject)->hrgnClip || ((WndObject)->Wnd->style & WS_MINIMIZE) || \
+ NtGdiPtInRegion((WndObject)->hrgnClip, (INT)((x) -
(WndObject)->Wnd->rcWindow.left), \
(INT)((y) - (WndObject)->Wnd->rcWindow.top))))
UINT
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Sun Jan 10
08:50:57 2010
@@ -650,7 +650,7 @@
Window = UserGetDesktopWindow();
IntInvalidateWindows( Window,
- Window->UpdateRegion,
+ Window->hrgnUpdate,
RDW_FRAME |
RDW_ERASE |
RDW_INVALIDATE |
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c [iso-8859-1] Sun Jan 10
08:50:57 2010
@@ -505,25 +505,10 @@
return 0;
}
-
DWORD
APIENTRY
NtUserRegisterTasklist(
DWORD Unknown0)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-DWORD
-APIENTRY
-NtUserSBGetParms(
- DWORD Unknown0,
- DWORD Unknown1,
- DWORD Unknown2,
- DWORD Unknown3)
{
UNIMPLEMENTED
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Sun Jan 10
08:50:57 2010
@@ -76,7 +76,7 @@
if (ParentWnd->style & WS_CLIPCHILDREN)
break;
- if (ParentWindow->UpdateRegion != 0)
+ if (ParentWindow->hrgnUpdate != 0)
{
if (Recurse)
return FALSE;
@@ -110,12 +110,12 @@
else
hRgnWindow = UnsafeIntCreateRectRgnIndirect(&Wnd->rcWindow);
- if (Window->WindowRegion != NULL && !(Wnd->style & WS_MINIMIZE))
+ if (Window->hrgnClip != NULL && !(Wnd->style & WS_MINIMIZE))
{
NtGdiOffsetRgn(hRgnWindow,
-Wnd->rcWindow.left,
-Wnd->rcWindow.top);
- RgnType = NtGdiCombineRgn(hRgnWindow, hRgnWindow, Window->WindowRegion,
RGN_AND);
+ RgnType = NtGdiCombineRgn(hRgnWindow, hRgnWindow, Window->hrgnClip, RGN_AND);
NtGdiOffsetRgn(hRgnWindow,
Wnd->rcWindow.left,
Wnd->rcWindow.top);
@@ -146,8 +146,8 @@
HRGN hRgnWindow;
UINT RgnType;
- if (Window->UpdateRegion != NULL &&
- Window->UpdateRegion != (HRGN)1)
+ if (Window->hrgnUpdate != NULL &&
+ Window->hrgnUpdate != (HRGN)1)
{
hRgnNonClient = IntCalcWindowRgn(Window, FALSE);
@@ -189,12 +189,12 @@
if (Validate)
{
- if (NtGdiCombineRgn(Window->UpdateRegion, Window->UpdateRegion,
+ if (NtGdiCombineRgn(Window->hrgnUpdate, Window->hrgnUpdate,
hRgnWindow, RGN_AND) == NULLREGION)
{
- GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
- GreDeleteObject(Window->UpdateRegion);
- Window->UpdateRegion = NULL;
+ GDIOBJ_SetOwnership(Window->hrgnUpdate, PsGetCurrentProcess());
+ GreDeleteObject(Window->hrgnUpdate);
+ Window->hrgnUpdate = NULL;
if (!(Window->state & WINDOWOBJECT_NEED_INTERNALPAINT))
MsqDecPaintCountQueue(Window->MessageQueue);
}
@@ -206,7 +206,7 @@
}
else
{
- return Window->UpdateRegion;
+ return Window->hrgnUpdate;
}
}
@@ -228,15 +228,15 @@
if (Flags & (RDW_ERASENOW | RDW_UPDATENOW))
{
- if (Window->UpdateRegion)
- {
- if (!IntValidateParent(Window, Window->UpdateRegion, Recurse))
+ if (Window->hrgnUpdate)
+ {
+ if (!IntValidateParent(Window, Window->hrgnUpdate, Recurse))
return;
}
if (Flags & RDW_UPDATENOW)
{
- if (Window->UpdateRegion != NULL ||
+ if (Window->hrgnUpdate != NULL ||
Window->state & WINDOWOBJECT_NEED_INTERNALPAINT)
{
co_IntSendMessage(hWnd, WM_PAINT, 0, 0);
@@ -259,9 +259,9 @@
if (Window->state & WINDOWOBJECT_NEED_ERASEBKGND)
{
- if (Window->UpdateRegion)
+ if (Window->hrgnUpdate)
{
- hDC = UserGetDCEx(Window, Window->UpdateRegion,
+ hDC = UserGetDCEx(Window, Window->hrgnUpdate,
DCX_CACHE | DCX_USESTYLE |
DCX_INTERSECTRGN | DCX_KEEPCLIPRGN);
if (co_IntSendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0))
@@ -343,7 +343,7 @@
* Clip the given region with window rectangle (or region)
*/
- if (!Window->WindowRegion || (Wnd->style & WS_MINIMIZE))
+ if (!Window->hrgnClip || (Wnd->style & WS_MINIMIZE))
{
HRGN hRgnWindow;
@@ -356,7 +356,7 @@
NtGdiOffsetRgn(hRgn,
-Wnd->rcWindow.left,
-Wnd->rcWindow.top);
- RgnType = NtGdiCombineRgn(hRgn, hRgn, Window->WindowRegion, RGN_AND);
+ RgnType = NtGdiCombineRgn(hRgn, hRgn, Window->hrgnClip, RGN_AND);
NtGdiOffsetRgn(hRgn,
Wnd->rcWindow.left,
Wnd->rcWindow.top);
@@ -366,7 +366,7 @@
* Save current state of pending updates
*/
- HadPaintMessage = Window->UpdateRegion != NULL ||
+ HadPaintMessage = Window->hrgnUpdate != NULL ||
Window->state & WINDOWOBJECT_NEED_INTERNALPAINT;
HadNCPaintMessage = Window->state & WINDOWOBJECT_NEED_NCPAINT;
@@ -376,18 +376,18 @@
if (Flags & RDW_INVALIDATE && RgnType != NULLREGION)
{
- if (Window->UpdateRegion == NULL)
- {
- Window->UpdateRegion = NtGdiCreateRectRgn(0, 0, 0, 0);
- GDIOBJ_SetOwnership(Window->UpdateRegion, NULL);
- }
-
- if (NtGdiCombineRgn(Window->UpdateRegion, Window->UpdateRegion,
+ if (Window->hrgnUpdate == NULL)
+ {
+ Window->hrgnUpdate = NtGdiCreateRectRgn(0, 0, 0, 0);
+ GDIOBJ_SetOwnership(Window->hrgnUpdate, NULL);
+ }
+
+ if (NtGdiCombineRgn(Window->hrgnUpdate, Window->hrgnUpdate,
hRgn, RGN_OR) == NULLREGION)
{
- GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
- GreDeleteObject(Window->UpdateRegion);
- Window->UpdateRegion = NULL;
+ GDIOBJ_SetOwnership(Window->hrgnUpdate, PsGetCurrentProcess());
+ GreDeleteObject(Window->hrgnUpdate);
+ Window->hrgnUpdate = NULL;
}
if (Flags & RDW_FRAME)
@@ -400,18 +400,18 @@
if (Flags & RDW_VALIDATE && RgnType != NULLREGION)
{
- if (Window->UpdateRegion != NULL)
- {
- if (NtGdiCombineRgn(Window->UpdateRegion, Window->UpdateRegion,
+ if (Window->hrgnUpdate != NULL)
+ {
+ if (NtGdiCombineRgn(Window->hrgnUpdate, Window->hrgnUpdate,
hRgn, RGN_DIFF) == NULLREGION)
{
- GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
- GreDeleteObject(Window->UpdateRegion);
- Window->UpdateRegion = NULL;
+ GDIOBJ_SetOwnership(Window->hrgnUpdate, PsGetCurrentProcess());
+ GreDeleteObject(Window->hrgnUpdate);
+ Window->hrgnUpdate = NULL;
}
}
- if (Window->UpdateRegion == NULL)
+ if (Window->hrgnUpdate == NULL)
Window->state &= ~WINDOWOBJECT_NEED_ERASEBKGND;
if (Flags & RDW_NOFRAME)
Window->state &= ~WINDOWOBJECT_NEED_NCPAINT;
@@ -443,7 +443,7 @@
if (Child->Wnd->style & WS_VISIBLE)
{
/*
- * Recursive call to update children UpdateRegion
+ * Recursive call to update children hrgnUpdate
*/
HRGN hRgnTemp = NtGdiCreateRectRgn(0, 0, 0, 0);
NtGdiCombineRgn(hRgnTemp, hRgn, 0, RGN_COPY);
@@ -458,7 +458,7 @@
* Fake post paint messages to window message queue if needed
*/
- HasPaintMessage = Window->UpdateRegion != NULL ||
+ HasPaintMessage = Window->hrgnUpdate != NULL ||
Window->state & WINDOWOBJECT_NEED_INTERNALPAINT;
HasNCPaintMessage = Window->state & WINDOWOBJECT_NEED_NCPAINT;
@@ -611,7 +611,7 @@
{
PWND Wnd = Window->Wnd;
return (Wnd->style & WS_VISIBLE) &&
- ((Window->UpdateRegion != NULL) ||
+ ((Window->hrgnUpdate != NULL) ||
(Window->state & WINDOWOBJECT_NEED_INTERNALPAINT) ||
(Window->state & WINDOWOBJECT_NEED_NCPAINT));
}
@@ -787,19 +787,19 @@
RtlZeroMemory(&Ps, sizeof(PAINTSTRUCT));
- Ps.hdc = UserGetDCEx(Window, Window->UpdateRegion, DCX_INTERSECTRGN |
DCX_USESTYLE);
+ Ps.hdc = UserGetDCEx(Window, Window->hrgnUpdate, DCX_INTERSECTRGN | DCX_USESTYLE);
if (!Ps.hdc)
{
RETURN(NULL);
}
- if (Window->UpdateRegion != NULL)
+ if (Window->hrgnUpdate != NULL)
{
MsqDecPaintCountQueue(Window->MessageQueue);
GdiGetClipBox(Ps.hdc, &Ps.rcPaint);
- GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess());
+ GDIOBJ_SetOwnership(Window->hrgnUpdate, PsGetCurrentProcess());
/* The region is part of the dc now and belongs to the process! */
- Window->UpdateRegion = NULL;
+ Window->hrgnUpdate = NULL;
}
else
{
@@ -820,14 +820,14 @@
{
Ps.fErase = FALSE;
}
- if (Window->UpdateRegion)
+ if (Window->hrgnUpdate)
{
if (!(Wnd->style & WS_CLIPCHILDREN))
{
PWINDOW_OBJECT Child;
for (Child = Window->spwndChild; Child; Child = Child->spwndNext)
{
- IntInvalidateWindows(Child, Window->UpdateRegion, RDW_FRAME | RDW_ERASE |
RDW_INVALIDATE | RDW_ALLCHILDREN);
+ IntInvalidateWindows(Child, Window->hrgnUpdate, RDW_FRAME | RDW_ERASE |
RDW_INVALIDATE | RDW_ALLCHILDREN);
}
}
}
@@ -912,7 +912,7 @@
ASSERT_REFS_CO(Window);
- if (Window->UpdateRegion == NULL)
+ if (Window->hrgnUpdate == NULL)
{
RegionType = (NtGdiSetRectRgn(hRgn, 0, 0, 0, 0) ? NULLREGION : ERROR);
}
@@ -921,7 +921,7 @@
Rect = Window->Wnd->rcClient;
IntIntersectWithParents(Window, &Rect);
NtGdiSetRectRgn(hRgn, Rect.left, Rect.top, Rect.right, Rect.bottom);
- RegionType = NtGdiCombineRgn(hRgn, hRgn, Window->UpdateRegion, RGN_AND);
+ RegionType = NtGdiCombineRgn(hRgn, hRgn, Window->hrgnUpdate, RGN_AND);
NtGdiOffsetRgn(hRgn, -Window->Wnd->rcClient.left,
-Window->Wnd->rcClient.top);
}
@@ -993,20 +993,20 @@
RETURN(FALSE);
}
- if (Window->UpdateRegion == NULL)
+ if (Window->hrgnUpdate == NULL)
{
Rect.left = Rect.top = Rect.right = Rect.bottom = 0;
}
else
{
/* Get the update region bounding box. */
- if (Window->UpdateRegion == (HRGN)1)
+ if (Window->hrgnUpdate == (HRGN)1)
{
Rect = Window->Wnd->rcClient;
}
else
{
- RgnData = RGNOBJAPI_Lock(Window->UpdateRegion, NULL);
+ RgnData = RGNOBJAPI_Lock(Window->hrgnUpdate, NULL);
ASSERT(RgnData != NULL);
RegionType = REGION_GetRgnBox(RgnData, &Rect);
RGNOBJAPI_Unlock(RgnData);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/scrollbar.c [iso-8859-1] Sun Jan 10
08:50:57 2010
@@ -167,7 +167,7 @@
LPSCROLLINFO psi;
ASSERT(Window);
- ASSERT(Window->Scroll);
+ ASSERT(Window->pSBInfo);
sbi = IntGetScrollbarInfoFromWindow(Window, wBar);
psi = IntGetScrollInfoFromWindow(Window, wBar);
@@ -429,21 +429,21 @@
ASSERT_REFS_CO(Window);
- if(Window->Scroll)
+ if(Window->pSBInfo)
{
/* no need to create it anymore */
return TRUE;
}
/* allocate memory for all scrollbars (HORZ, VERT, CONTROL) */
- Size = 3 * (sizeof(WINDOW_SCROLLINFO));
- if(!(Window->Scroll = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO)))
+ Size = 3 * (sizeof(SBINFOEX));
+ if(!(Window->pSBInfo = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO)))
{
DPRINT1("Unable to allocate memory for scrollbar information for window
0x%x\n", Window->hSelf);
return FALSE;
}
- RtlZeroMemory(Window->Scroll, Size);
+ RtlZeroMemory(Window->pSBInfo, Size);
Result = co_WinPosGetNonClientSize(Window,
&Window->Wnd->rcWindow,
@@ -470,10 +470,10 @@
BOOL FASTCALL
IntDestroyScrollBars(PWINDOW_OBJECT Window)
{
- if(Window->Scroll)
- {
- ExFreePool(Window->Scroll);
- Window->Scroll = NULL;
+ if(Window->pSBInfo)
+ {
+ ExFreePool(Window->pSBInfo);
+ Window->pSBInfo = NULL;
return TRUE;
}
return FALSE;
@@ -567,7 +567,11 @@
BOOL
APIENTRY
-NtUserGetScrollInfo(HWND hWnd, int fnBar, LPSCROLLINFO lpsi)
+NtUserSBGetParms(
+ HWND hWnd,
+ int fnBar,
+ PSBDATA pSBData,
+ LPSCROLLINFO lpsi)
{
NTSTATUS Status;
PWINDOW_OBJECT Window;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/vis.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/vis.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/vis.c [iso-8859-1] Sun Jan 10 08:50:57
2010
@@ -98,10 +98,10 @@
{
ClipRgn =
UnsafeIntCreateRectRgnIndirect(&CurrentSiblingWnd->rcWindow);
/* Combine it with the window region if available */
- if (CurrentSibling->WindowRegion &&
!(CurrentSiblingWnd->style & WS_MINIMIZE))
+ if (CurrentSibling->hrgnClip && !(CurrentSiblingWnd->style
& WS_MINIMIZE))
{
NtGdiOffsetRgn(ClipRgn, -CurrentSiblingWnd->rcWindow.left,
-CurrentSiblingWnd->rcWindow.top);
- NtGdiCombineRgn(ClipRgn, ClipRgn, CurrentSibling->WindowRegion,
RGN_AND);
+ NtGdiCombineRgn(ClipRgn, ClipRgn, CurrentSibling->hrgnClip,
RGN_AND);
NtGdiOffsetRgn(ClipRgn, CurrentSiblingWnd->rcWindow.left,
CurrentSiblingWnd->rcWindow.top);
}
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF);
@@ -127,10 +127,10 @@
{
ClipRgn = UnsafeIntCreateRectRgnIndirect(&CurrentWnd->rcWindow);
/* Combine it with the window region if available */
- if (CurrentWindow->WindowRegion && !(CurrentWnd->style &
WS_MINIMIZE))
+ if (CurrentWindow->hrgnClip && !(CurrentWnd->style &
WS_MINIMIZE))
{
NtGdiOffsetRgn(ClipRgn, -CurrentWnd->rcWindow.left,
-CurrentWnd->rcWindow.top);
- NtGdiCombineRgn(ClipRgn, ClipRgn, CurrentWindow->WindowRegion,
RGN_AND);
+ NtGdiCombineRgn(ClipRgn, ClipRgn, CurrentWindow->hrgnClip, RGN_AND);
NtGdiOffsetRgn(ClipRgn, CurrentWnd->rcWindow.left,
CurrentWnd->rcWindow.top);
}
NtGdiCombineRgn(VisRgn, VisRgn, ClipRgn, RGN_DIFF);
@@ -140,10 +140,10 @@
}
}
- if (Window->WindowRegion && !(Wnd->style & WS_MINIMIZE))
+ if (Window->hrgnClip && !(Wnd->style & WS_MINIMIZE))
{
NtGdiOffsetRgn(VisRgn, -Wnd->rcWindow.left, -Wnd->rcWindow.top);
- NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND);
+ NtGdiCombineRgn(VisRgn, VisRgn, Window->hrgnClip, RGN_AND);
NtGdiOffsetRgn(VisRgn, Wnd->rcWindow.left, Wnd->rcWindow.top);
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] Sun Jan 10 08:50:57
2010
@@ -536,7 +536,7 @@
{
Flags |= DCX_INTERSECTRGN | DCX_KEEPCLIPRGN;
Dce->DCXFlags |= DCX_INTERSECTRGN | DCX_KEEPCLIPRGN;
- ClipRegion = Window->UpdateRegion;
+ ClipRegion = Window->hrgnUpdate;
}
if (ClipRegion == (HRGN) 1)
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Sun Jan 10 08:50:57
2010
@@ -498,9 +498,9 @@
Window->pti->ppi);
Wnd->pcls = NULL;
- if(Window->WindowRegion)
- {
- GreDeleteObject(Window->WindowRegion);
+ if(Window->hrgnClip)
+ {
+ GreDeleteObject(Window->hrgnClip);
}
ASSERT(Window->Wnd != NULL);
@@ -2312,7 +2312,6 @@
}
IntLinkWindow(Window, ParentWindow, InsertAfter /* prev sibling */);
-
}
}
@@ -4552,8 +4551,8 @@
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcWindow);
NtGdiOffsetRgn(VisRgn, -Window->Wnd->rcWindow.left,
-Window->Wnd->rcWindow.top);
/* if there's a region assigned to the window, combine them both */
- if(Window->WindowRegion && !(Wnd->style & WS_MINIMIZE))
- NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND);
+ if(Window->hrgnClip && !(Wnd->style & WS_MINIMIZE))
+ NtGdiCombineRgn(VisRgn, VisRgn, Window->hrgnClip, RGN_AND);
/* Copy the region into hRgn */
NtGdiCombineRgn(hRgn, VisRgn, NULL, RGN_COPY);
@@ -4593,8 +4592,8 @@
VisRgn = UnsafeIntCreateRectRgnIndirect(&Window->Wnd->rcWindow);
NtGdiOffsetRgn(VisRgn, -Window->Wnd->rcWindow.left,
-Window->Wnd->rcWindow.top);
/* if there's a region assigned to the window, combine them both */
- if(Window->WindowRegion && !(Wnd->style & WS_MINIMIZE))
- NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND);
+ if(Window->hrgnClip && !(Wnd->style & WS_MINIMIZE))
+ NtGdiCombineRgn(VisRgn, VisRgn, Window->hrgnClip, RGN_AND);
if((pRgn = RGNOBJAPI_Lock(VisRgn, NULL)))
{
@@ -4634,12 +4633,12 @@
/* FIXME - Verify if hRgn is a valid handle!!!!
Propably make this operation thread-safe, but maybe it's not necessary
*/
- if(Window->WindowRegion)
+ if(Window->hrgnClip)
{
/* Delete no longer needed region handle */
- GreDeleteObject(Window->WindowRegion);
- }
- Window->WindowRegion = hRgn;
+ GreDeleteObject(Window->hrgnClip);
+ }
+ Window->hrgnClip = hRgn;
/* FIXME - send WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages to the window
*/
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] Sun Jan 10 08:50:57
2010
@@ -1097,9 +1097,9 @@
Window->Wnd->style |= WS_VISIBLE;
}
- if (Window->UpdateRegion != NULL && Window->UpdateRegion != (HRGN)1)
- {
- NtGdiOffsetRgn(Window->UpdateRegion,
+ if (Window->hrgnUpdate != NULL && Window->hrgnUpdate != (HRGN)1)
+ {
+ NtGdiOffsetRgn(Window->hrgnUpdate,
NewWindowRect.left - OldWindowRect.left,
NewWindowRect.top - OldWindowRect.top);
}
@@ -1162,10 +1162,10 @@
}
/* No use in copying bits which are in the update region. */
- if (Window->UpdateRegion != NULL)
+ if (Window->hrgnUpdate != NULL)
{
NtGdiOffsetRgn(CopyRgn, NewWindowRect.left, NewWindowRect.top);
- NtGdiCombineRgn(CopyRgn, CopyRgn, Window->UpdateRegion, RGN_DIFF);
+ NtGdiCombineRgn(CopyRgn, CopyRgn, Window->hrgnUpdate, RGN_DIFF);
NtGdiOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top);
}
Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sun Jan 10 08:50:57
2010
@@ -689,7 +689,6 @@
NtUserGetLastInputInfo 1
NtUserGetMinMaxInfo 3
NtUserGetMonitorInfo 2
-NtUserGetScrollInfo 3
NtUserMenuInfo 3
NtUserMenuItemInfo 5
NtUserMonitorFromPoint 3