Commit in reactos on MAIN
include/win32k/ntuser.h+11.120 -> 1.121
lib/user32/include/user32.h+31.19 -> 1.20
lib/user32/windows/window.c+3-41.102 -> 1.103
subsys/win32k/include/window.h+171.53 -> 1.54
subsys/win32k/ntuser/misc.c+35-11.55 -> 1.56
                    /window.c+43-11.207 -> 1.208
                    /winpos.c+3-501.107 -> 1.108
+105-56
7 modified files
implemented GetWindowInfo()

reactos/include/win32k
ntuser.h 1.120 -> 1.121
diff -u -r1.120 -r1.121
--- ntuser.h	23 Mar 2004 21:47:36 -0000	1.120
+++ ntuser.h	2 Apr 2004 20:51:07 -0000	1.121
@@ -197,6 +197,7 @@
 #define TWOPARAM_ROUTINE_SETWNDCONTEXTHLPID 0x58
 #define TWOPARAM_ROUTINE_CURSORPOSITION     0x59
 #define TWOPARAM_ROUTINE_SETCARETPOS        0x60
+#define TWOPARAM_ROUTINE_GETWINDOWINFO      0x61
 DWORD
 STDCALL
 NtUserCallTwoParam(

reactos/lib/user32/include
user32.h 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- user32.h	16 Feb 2004 07:25:01 -0000	1.19
+++ user32.h	2 Apr 2004 20:51:07 -0000	1.20
@@ -55,6 +55,9 @@
 #define NtUserSetMenuBarHeight(menu, height) \
   (BOOL)NtUserCallTwoParam((DWORD)menu, (DWORD)height, TWOPARAM_ROUTINE_SETMENUBARHEIGHT)
 
+#define NtUserGetWindowInfo(hwnd, pwi) \
+  (BOOL)NtUserCallTwoParam((DWORD)hwnd, (DWORD)pwi, TWOPARAM_ROUTINE_GETWINDOWINFO)
+
 #define NtUserSetCaretBlinkTime(uMSeconds) \
   (BOOL)NtUserCallOneParam((DWORD)uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME)
 

reactos/lib/user32/windows
window.c 1.102 -> 1.103
diff -u -r1.102 -r1.103
--- window.c	14 Mar 2004 11:27:33 -0000	1.102
+++ window.c	2 Apr 2004 20:51:07 -0000	1.103
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.102 2004/03/14 11:27:33 gvg Exp $
+/* $Id: window.c,v 1.103 2004/04/02 20:51:07 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS user32.dll
@@ -890,14 +890,13 @@
 
 
 /*
- * @unimplemented
+ * @implemented
  */
 BOOL STDCALL
 GetWindowInfo(HWND hwnd,
 	      PWINDOWINFO pwi)
 {
-  UNIMPLEMENTED;
-  return FALSE;
+  return NtUserGetWindowInfo(hwnd, pwi);
 }
 
 

reactos/subsys/win32k/include
window.h 1.53 -> 1.54
diff -u -r1.53 -r1.54
--- window.h	23 Mar 2004 21:47:37 -0000	1.53
+++ window.h	2 Apr 2004 20:51:08 -0000	1.54
@@ -108,6 +108,17 @@
 #define WINDOWSTATUS_DESTROYING         (0x1)
 #define WINDOWSTATUS_DESTROYED          (0x2)
 
+#define HAS_DLGFRAME(Style, ExStyle) \
+            (((ExStyle) & WS_EX_DLGMODALFRAME) || \
+            (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
+
+#define HAS_THICKFRAME(Style, ExStyle) \
+            (((Style) & WS_THICKFRAME) && \
+            (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
+
+#define HAS_THINFRAME(Style, ExStyle) \
+            (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
+
 #define IntIsDesktopWindow(WndObj) \
   (WndObj->Parent == NULL)
 
@@ -194,6 +205,12 @@
 INT FASTCALL
 IntGetWindowRgnBox(HWND hWnd, RECT *Rect);
 
+BOOL FASTCALL
+IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi);
+
+VOID FASTCALL
+IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, INT *cx, INT *cy);
+
 DWORD IntRemoveWndProcHandle(WNDPROC Handle);
 DWORD IntRemoveProcessWndProcHandles(HANDLE ProcessID);
 DWORD IntAddWndProcHandle(WNDPROC WindowProc, BOOL IsUnicode);

reactos/subsys/win32k/ntuser
misc.c 1.55 -> 1.56
diff -u -r1.55 -r1.56
--- misc.c	23 Mar 2004 21:47:37 -0000	1.55
+++ misc.c	2 Apr 2004 20:51:08 -0000	1.56
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.55 2004/03/23 21:47:37 weiden Exp $
+/* $Id: misc.c,v 1.56 2004/04/02 20:51:08 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -369,6 +369,40 @@
     
     case TWOPARAM_ROUTINE_SETCARETPOS:
       return (DWORD)IntSetCaretPos((int)Param1, (int)Param2);
+    
+    case TWOPARAM_ROUTINE_GETWINDOWINFO:
+    {
+      WINDOWINFO wi;
+      DWORD Ret;
+      
+      if(!(WindowObject = IntGetWindowObject((HWND)Param1)))
+      {
+        SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
+        return FALSE;
+      }
+      
+      Status = MmCopyFromCaller(&wi.cbSize, (PVOID)Param2, sizeof(wi.cbSize));
+      if(!NT_SUCCESS(Status))
+      {
+        IntReleaseWindowObject(WindowObject);
+        SetLastNtError(Status);
+        return FALSE;
+      }
+      
+      if((Ret = (DWORD)IntGetWindowInfo(WindowObject, &wi)))
+      {
+        Status = MmCopyToCaller((PVOID)Param2, &wi, sizeof(WINDOWINFO));
+        if(!NT_SUCCESS(Status))
+        {
+          IntReleaseWindowObject(WindowObject);
+          SetLastNtError(Status);
+          return FALSE;
+        }
+      }
+      
+      IntReleaseWindowObject(WindowObject);
+      return Ret;
+    }
   }
   DPRINT1("Calling invalid routine number 0x%x in NtUserCallTwoParam()\n Param1=0x%x Parm2=0x%x\n",
           Routine, Param1, Param2);

reactos/subsys/win32k/ntuser
window.c 1.207 -> 1.208
diff -u -r1.207 -r1.208
--- window.c	31 Mar 2004 19:44:34 -0000	1.207
+++ window.c	2 Apr 2004 20:51:08 -0000	1.208
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: window.c,v 1.207 2004/03/31 19:44:34 weiden Exp $
+/* $Id: window.c,v 1.208 2004/04/02 20:51:08 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -430,6 +430,48 @@
   return 0;
 }
 
+VOID FASTCALL
+IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, INT *cx, INT *cy)
+{
+  if(HAS_DLGFRAME(WindowObject->Style, WindowObject->ExStyle) && !(WindowObject->Style & WS_MINIMIZE))
+  {
+    *cx = NtUserGetSystemMetrics(SM_CXDLGFRAME);
+    *cy = NtUserGetSystemMetrics(SM_CYDLGFRAME);
+  }
+  else
+  {
+    if(HAS_THICKFRAME(WindowObject->Style, WindowObject->ExStyle)&& !(WindowObject->Style & WS_MINIMIZE))
+    {
+      *cx = NtUserGetSystemMetrics(SM_CXFRAME);
+      *cy = NtUserGetSystemMetrics(SM_CYFRAME);
+    }
+    else if(HAS_THINFRAME(WindowObject->Style, WindowObject->ExStyle))
+    {
+      *cx = NtUserGetSystemMetrics(SM_CXBORDER);
+      *cy = NtUserGetSystemMetrics(SM_CYBORDER);
+    }
+    else
+    {
+      *cx = *cy = 0;
+    }
+  }
+}
+
+BOOL FASTCALL
+IntGetWindowInfo(PWINDOW_OBJECT WindowObject, PWINDOWINFO pwi)
+{
+  pwi->cbSize = sizeof(WINDOWINFO);
+  pwi->rcWindow = WindowObject->WindowRect;
+  pwi->rcClient = WindowObject->ClientRect;
+  pwi->dwStyle = WindowObject->Style;
+  pwi->dwExStyle = WindowObject->ExStyle;
+  pwi->dwWindowStatus = (NtUserGetForegroundWindow() == WindowObject->Self); /* WS_ACTIVECAPTION */
+  IntGetWindowBorderMeasures(WindowObject, &pwi->cxWindowBorders, &pwi->cyWindowBorders);
+  pwi->atomWindowType = (WindowObject->Class ? WindowObject->Class->Atom : 0);
+  pwi->wCreatorVersion = 0x400; /* FIXME - return a real version number */
+  return TRUE;
+}
+
 static BOOL FASTCALL
 IntSetMenu(
    PWINDOW_OBJECT WindowObject,

reactos/subsys/win32k/ntuser
winpos.c 1.107 -> 1.108
diff -u -r1.107 -r1.108
--- winpos.c	1 Apr 2004 23:16:21 -0000	1.107
+++ winpos.c	2 Apr 2004 20:51:08 -0000	1.108
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: winpos.c,v 1.107 2004/04/01 23:16:21 gvg Exp $
+/* $Id: winpos.c,v 1.108 2004/04/02 20:51:08 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -66,17 +66,6 @@
 
 /* FUNCTIONS *****************************************************************/
 
-#define HAS_DLGFRAME(Style, ExStyle) \
-            (((ExStyle) & WS_EX_DLGMODALFRAME) || \
-            (((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
-
-#define HAS_THICKFRAME(Style, ExStyle) \
-            (((Style) & WS_THICKFRAME) && \
-            (!(((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)))
-
-#define HAS_THINFRAME(Style, ExStyle) \
-            (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
-
 BOOL FASTCALL
 IntGetClientOrigin(HWND hWnd, LPPOINT Point)
 {
@@ -223,25 +212,7 @@
         return NULL;
       }
       WindowObject->InternalPos->NormalRect = WindowObject->WindowRect;
-      if (HAS_DLGFRAME(WindowObject->Style, WindowObject->ExStyle) && !(WindowObject->Style & WS_MINIMIZE))
-      {
-        XInc = NtUserGetSystemMetrics(SM_CXDLGFRAME);
-        YInc = NtUserGetSystemMetrics(SM_CYDLGFRAME);
-      }
-      else
-      {
-        XInc = YInc = 0;
-        if (HAS_THICKFRAME(WindowObject->Style, WindowObject->ExStyle)&& !(WindowObject->Style & WS_MINIMIZE))
-        {
-          XInc += NtUserGetSystemMetrics(SM_CXFRAME);
-          YInc += NtUserGetSystemMetrics(SM_CYFRAME);
-        }
-        else if (HAS_THINFRAME(WindowObject->Style, WindowObject->ExStyle))
-	{
-	  XInc += NtUserGetSystemMetrics(SM_CXBORDER);
-	  YInc += NtUserGetSystemMetrics(SM_CYBORDER);
-	}
-      }
+      IntGetWindowBorderMeasures(WindowObject, &XInc, &YInc);
       WindowObject->InternalPos->MaxPos.x = WorkArea.left - XInc;
       WindowObject->InternalPos->MaxPos.y = WorkArea.top - YInc;
       WindowObject->InternalPos->IconPos.x = WorkArea.left;
@@ -385,25 +356,7 @@
   Info->ptMaxTrackSize.x = Info->ptMaxSize.x;
   Info->ptMaxTrackSize.y = Info->ptMaxSize.y;
 
-  if (HAS_DLGFRAME(Window->Style, Window->ExStyle))
-    {
-      XInc = NtUserGetSystemMetrics(SM_CXDLGFRAME);
-      YInc = NtUserGetSystemMetrics(SM_CYDLGFRAME);
-    }
-  else
-    {
-      XInc = YInc = 0;
-      if (HAS_THICKFRAME(Window->Style, Window->ExStyle))
-	{
-	  XInc += NtUserGetSystemMetrics(SM_CXFRAME);
-	  YInc += NtUserGetSystemMetrics(SM_CYFRAME);
-	}
-      else if (HAS_THINFRAME(Window->Style, Window->ExStyle))
-	{
-	  XInc += NtUserGetSystemMetrics(SM_CXBORDER);
-	  YInc += NtUserGetSystemMetrics(SM_CYBORDER);
-	}
-    }
+  IntGetWindowBorderMeasures(Window, &XInc, &YInc);
   Info->ptMaxSize.x += 2 * XInc;
   Info->ptMaxSize.y += 2 * YInc;
 
CVSspam 0.2.8