[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Sun, 10 Jan 2010 07:50:57 +0000 (07:50 +0000)
committerJames Tabor <james.tabor@reactos.org>
Sun, 10 Jan 2010 07:50:57 +0000 (07:50 +0000)
- Removed NtUserGetScrollInfo and replaced it, move more type names in window object to WND.

svn path=/trunk/; revision=45021

14 files changed:
reactos/dll/win32/user32/controls/scrollbar.c
reactos/include/reactos/win32k/ntuser.h
reactos/subsystems/win32/win32k/include/scroll.h
reactos/subsystems/win32/win32k/include/window.h
reactos/subsystems/win32/win32k/include/winpos.h
reactos/subsystems/win32/win32k/ntuser/desktop.c
reactos/subsystems/win32/win32k/ntuser/ntstubs.c
reactos/subsystems/win32/win32k/ntuser/painting.c
reactos/subsystems/win32/win32k/ntuser/scrollbar.c
reactos/subsystems/win32/win32k/ntuser/vis.c
reactos/subsystems/win32/win32k/ntuser/windc.c
reactos/subsystems/win32/win32k/ntuser/window.c
reactos/subsystems/win32/win32k/ntuser/winpos.c
reactos/subsystems/win32/win32k/w32ksvc.db

index 700da56..e55baad 100644 (file)
@@ -573,7 +573,7 @@ IntScrollGetScrollBarRect(HWND Wnd, INT Bar, RECT *Rect,
     {
       SCROLLINFO Info;
 
-      NtUserGetScrollInfo(Wnd, Bar, &Info);
+      NtUserSBGetParms(Wnd, Bar, NULL, &Info);
       *ArrowSize = GetSystemMetrics(SM_CXVSCROLL);
       Pixels -= (2 * GetSystemMetrics(SM_CXVSCROLL));
 
@@ -637,7 +637,7 @@ IntScrollGetThumbVal(HWND Wnd, INT SBType, PSCROLLBARINFO ScrollBarInfo,
 
   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 @@ IntScrollGetScrollPos(HWND Wnd, INT Bar)
 
   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 @@ IntScrollGetScrollRange(HWND Wnd, int Bar, LPINT MinPos, LPINT MaxPos)
 
   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 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA
         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 EnableScrollBar( HWND hwnd, UINT nBar, UINT flags )
 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 @@ SetScrollPos(HWND hWnd, INT nBar, INT nPos, BOOL bRedraw)
   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)
index b57bd76..ff21d4c 100644 (file)
@@ -2459,13 +2459,13 @@ NTAPI
 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 @@ NtUserGetMonitorInfo(
   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
index e09bc2e..25c5aef 100644 (file)
@@ -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)
index 0e6b4d6..bad558b 100644 (file)
@@ -32,13 +32,13 @@ typedef struct _WINDOW_OBJECT
   /* 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 @@ typedef struct _WINDOW_OBJECT
   /* 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 @@ typedef struct _WINDOW_OBJECT
 #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);
index 4c37378..513d4d5 100644 (file)
@@ -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
index cb3a64f..7c14a65 100644 (file)
@@ -650,7 +650,7 @@ UserRedrawDesktop()
     Window = UserGetDesktopWindow();
 
     IntInvalidateWindows( Window,
-            Window->UpdateRegion,
+              Window->hrgnUpdate,
                        RDW_FRAME |
                        RDW_ERASE |
                   RDW_INVALIDATE |
index d014a00..33abd9a 100644 (file)
@@ -505,7 +505,6 @@ NtUserQueryUserCounters(
    return 0;
 }
 
-
 DWORD
 APIENTRY
 NtUserRegisterTasklist(
@@ -516,20 +515,6 @@ NtUserRegisterTasklist(
    return 0;
 }
 
-
-DWORD
-APIENTRY
-NtUserSBGetParms(
-   DWORD Unknown0,
-   DWORD Unknown1,
-   DWORD Unknown2,
-   DWORD Unknown3)
-{
-   UNIMPLEMENTED
-
-   return 0;
-}
-
 DWORD
 APIENTRY
 NtUserSetConsoleReserveKeys(
index f419e7e..0444e55 100644 (file)
@@ -76,7 +76,7 @@ IntValidateParent(PWINDOW_OBJECT Child, HRGN hValidateRgn, BOOL Recurse)
       if (ParentWnd->style & WS_CLIPCHILDREN)
          break;
 
-      if (ParentWindow->UpdateRegion != 0)
+      if (ParentWindow->hrgnUpdate != 0)
       {
          if (Recurse)
             return FALSE;
@@ -110,12 +110,12 @@ IntCalcWindowRgn(PWINDOW_OBJECT Window, BOOL Client)
    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 @@ IntGetNCUpdateRgn(PWINDOW_OBJECT Window, BOOL Validate)
    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 @@ IntGetNCUpdateRgn(PWINDOW_OBJECT Window, BOOL Validate)
 
       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 @@ IntGetNCUpdateRgn(PWINDOW_OBJECT Window, BOOL Validate)
    }
    else
    {
-      return Window->UpdateRegion;
+      return Window->hrgnUpdate;
    }
 }
 
@@ -228,15 +228,15 @@ co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse)
 
    if (Flags & (RDW_ERASENOW | RDW_UPDATENOW))
    {
-      if (Window->UpdateRegion)
+      if (Window->hrgnUpdate)
       {
-         if (!IntValidateParent(Window, Window->UpdateRegion, Recurse))
+         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 @@ co_IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags, BOOL Recurse)
 
          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 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
     * 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 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
       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 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
     * 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 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
 
    if (Flags & RDW_INVALIDATE && RgnType != NULLREGION)
    {
-      if (Window->UpdateRegion == NULL)
+      if (Window->hrgnUpdate == NULL)
       {
-         Window->UpdateRegion = NtGdiCreateRectRgn(0, 0, 0, 0);
-         GDIOBJ_SetOwnership(Window->UpdateRegion, NULL);
+         Window->hrgnUpdate = NtGdiCreateRectRgn(0, 0, 0, 0);
+         GDIOBJ_SetOwnership(Window->hrgnUpdate, NULL);
       }
 
-      if (NtGdiCombineRgn(Window->UpdateRegion, Window->UpdateRegion,
+      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 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
 
    if (Flags & RDW_VALIDATE && RgnType != NULLREGION)
    {
-      if (Window->UpdateRegion != NULL)
+      if (Window->hrgnUpdate != NULL)
       {
-         if (NtGdiCombineRgn(Window->UpdateRegion, Window->UpdateRegion,
+         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 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
          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 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
     * 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 @@ IntIsWindowDirty(PWINDOW_OBJECT Window)
 {
    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 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
 
    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 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
    {
       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 @@ co_UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase)
 
    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 @@ co_UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase)
       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 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
       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);
index b5aaa73..6e855b5 100644 (file)
@@ -167,7 +167,7 @@ IntUpdateSBInfo(PWINDOW_OBJECT Window, int wBar)
    LPSCROLLINFO psi;
 
    ASSERT(Window);
-   ASSERT(Window->Scroll);
+   ASSERT(Window->pSBInfo);
 
    sbi = IntGetScrollbarInfoFromWindow(Window, wBar);
    psi = IntGetScrollInfoFromWindow(Window, wBar);
@@ -429,21 +429,21 @@ co_IntCreateScrollBars(PWINDOW_OBJECT Window)
 
    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 @@ co_IntCreateScrollBars(PWINDOW_OBJECT Window)
 BOOL FASTCALL
 IntDestroyScrollBars(PWINDOW_OBJECT Window)
 {
-   if(Window->Scroll)
+   if(Window->pSBInfo)
    {
-      ExFreePool(Window->Scroll);
-      Window->Scroll = NULL;
+      ExFreePool(Window->pSBInfo);
+      Window->pSBInfo = NULL;
       return TRUE;
    }
    return FALSE;
@@ -567,7 +567,11 @@ CLEANUP:
 
 BOOL
 APIENTRY
-NtUserGetScrollInfo(HWND hWnd, int fnBar, LPSCROLLINFO lpsi)
+NtUserSBGetParms(
+  HWND hWnd, 
+  int fnBar, 
+  PSBDATA pSBData,
+  LPSCROLLINFO lpsi)
 {
    NTSTATUS Status;
    PWINDOW_OBJECT Window;
index 9247931..4496bf4 100644 (file)
@@ -98,10 +98,10 @@ VIS_ComputeVisibleRegion(
             {
                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 @@ VIS_ComputeVisibleRegion(
          {
             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 @@ VIS_ComputeVisibleRegion(
       }
    }
 
-   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);
    }
 
index 61f0f0c..4198baf 100644 (file)
@@ -536,7 +536,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
    {
       Flags |= DCX_INTERSECTRGN | DCX_KEEPCLIPRGN;
       Dce->DCXFlags |= DCX_INTERSECTRGN | DCX_KEEPCLIPRGN;
-      ClipRegion = Window->UpdateRegion;
+      ClipRegion = Window->hrgnUpdate;
    }
 
    if (ClipRegion == (HRGN) 1)
index beded04..8dd8d4f 100644 (file)
@@ -498,9 +498,9 @@ static LRESULT co_UserFreeWindow(PWINDOW_OBJECT Window,
                        Window->pti->ppi);
    Wnd->pcls = NULL;
 
-   if(Window->WindowRegion)
+   if(Window->hrgnClip)
    {
-      GreDeleteObject(Window->WindowRegion);
+      GreDeleteObject(Window->hrgnClip);
    }
 
    ASSERT(Window->Wnd != NULL);
@@ -2312,7 +2312,6 @@ AllocErr:
          }
 
          IntLinkWindow(Window, ParentWindow, InsertAfter /* prev sibling */);
-
       }
    }
 
@@ -4552,8 +4551,8 @@ IntGetWindowRgn(PWINDOW_OBJECT Window, HRGN hRgn)
    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 @@ IntGetWindowRgnBox(PWINDOW_OBJECT Window, RECTL *Rect)
    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 @@ NtUserSetWindowRgn(
    /* 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);
+      GreDeleteObject(Window->hrgnClip);
    }
-   Window->WindowRegion = hRgn;
+   Window->hrgnClip = hRgn;
 
    /* FIXME - send WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages to the window */
 
index 67d468e..85ccb07 100644 (file)
@@ -1097,9 +1097,9 @@ co_WinPosSetWindowPos(
       Window->Wnd->style |= WS_VISIBLE;
    }
 
-   if (Window->UpdateRegion != NULL && Window->UpdateRegion != (HRGN)1)
+   if (Window->hrgnUpdate != NULL && Window->hrgnUpdate != (HRGN)1)
    {
-      NtGdiOffsetRgn(Window->UpdateRegion,
+      NtGdiOffsetRgn(Window->hrgnUpdate,
                      NewWindowRect.left - OldWindowRect.left,
                      NewWindowRect.top - OldWindowRect.top);
    }
@@ -1162,10 +1162,10 @@ co_WinPosSetWindowPos(
          }
 
          /* 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);
          }
 
index 71b2521..acce601 100644 (file)
@@ -689,7 +689,6 @@ NtUserGetMenuDefaultItem                3
 NtUserGetLastInputInfo                  1
 NtUserGetMinMaxInfo                     3
 NtUserGetMonitorInfo                    2
-NtUserGetScrollInfo                     3
 NtUserMenuInfo                          3
 NtUserMenuItemInfo                      5
 NtUserMonitorFromPoint                  3