Revert r20367 and r20368 since they crash the GUI in second boot by hitting a assert...
authorMaarten Bosma <maarten@bosma.de>
Wed, 28 Dec 2005 12:40:17 +0000 (12:40 +0000)
committerMaarten Bosma <maarten@bosma.de>
Wed, 28 Dec 2005 12:40:17 +0000 (12:40 +0000)
svn path=/trunk/; revision=20392

85 files changed:
reactos/include/win32k/bitmaps.h [new file with mode: 0644]
reactos/include/win32k/brush.h [moved from reactos/subsys/win32k/include/brush.h with 78% similarity]
reactos/include/win32k/caret.h [new file with mode: 0644]
reactos/include/win32k/cliprgn.h [new file with mode: 0644]
reactos/include/win32k/color.h [new file with mode: 0644]
reactos/include/win32k/coord.h [new file with mode: 0644]
reactos/include/win32k/cursoricon.h [new file with mode: 0644]
reactos/include/win32k/dc.h [moved from reactos/subsys/win32k/include/dc.h with 58% similarity]
reactos/include/win32k/driver.h [moved from reactos/subsys/win32k/include/driver.h with 50% similarity]
reactos/include/win32k/fillshap.h [new file with mode: 0644]
reactos/include/win32k/float.h [moved from reactos/subsys/win32k/include/gdifloat.h with 87% similarity]
reactos/include/win32k/font.h [new file with mode: 0644]
reactos/include/win32k/gdiobj.h [moved from reactos/subsys/win32k/include/gdiobj.h with 51% similarity]
reactos/include/win32k/icm.h [new file with mode: 0644]
reactos/include/win32k/kapi.h [new file with mode: 0644]
reactos/include/win32k/line.h [new file with mode: 0644]
reactos/include/win32k/math.h [new file with mode: 0644]
reactos/include/win32k/menu.h [new file with mode: 0644]
reactos/include/win32k/metafile.h [new file with mode: 0644]
reactos/include/win32k/misc.h [moved from reactos/subsys/win32k/include/misc.h with 89% similarity]
reactos/include/win32k/ntddraw.h [new file with mode: 0644]
reactos/include/win32k/ntgdibad.h [deleted file]
reactos/include/win32k/ntgdihdl.h [deleted file]
reactos/include/win32k/ntgdityp.h [deleted file]
reactos/include/win32k/ntuser.h
reactos/include/win32k/ntusrtyp.h [deleted file]
reactos/include/win32k/paint.h [new file with mode: 0644]
reactos/include/win32k/path.h [new file with mode: 0644]
reactos/include/win32k/pen.h [moved from reactos/subsys/win32k/include/pen.h with 54% similarity]
reactos/include/win32k/print.h [new file with mode: 0644]
reactos/include/win32k/region.h [new file with mode: 0644]
reactos/include/win32k/text.h [new file with mode: 0644]
reactos/include/win32k/win32k.h [new file with mode: 0644]
reactos/include/win32k/wingl.h [new file with mode: 0644]
reactos/lib/ddraw/hal/surface_hal.c
reactos/lib/gdi32/gdi32.def
reactos/lib/gdi32/include/gdi32p.h [deleted file]
reactos/lib/gdi32/include/precomp.h
reactos/lib/gdi32/misc/gdientry.c
reactos/lib/gdi32/misc/stubs.c
reactos/lib/gdi32/misc/stubsa.c
reactos/lib/gdi32/misc/stubsw.c
reactos/lib/gdi32/misc/wingl.c
reactos/lib/gdi32/objects/bitmap.c
reactos/lib/gdi32/objects/brush.c
reactos/lib/gdi32/objects/dc.c
reactos/lib/gdi32/objects/font.c
reactos/lib/gdi32/objects/path.c
reactos/lib/user32/include/user32.h
reactos/subsys/win32k/eng/objects.h
reactos/subsys/win32k/include/bitmaps.h [deleted file]
reactos/subsys/win32k/include/color.h
reactos/subsys/win32k/include/coord.h [deleted file]
reactos/subsys/win32k/include/dib.h
reactos/subsys/win32k/include/intgdi.h
reactos/subsys/win32k/include/menu.h
reactos/subsys/win32k/include/object.h
reactos/subsys/win32k/include/path.h
reactos/subsys/win32k/include/region.h [deleted file]
reactos/subsys/win32k/include/text.h
reactos/subsys/win32k/include/win32k.h
reactos/subsys/win32k/main/dllmain.c
reactos/subsys/win32k/ntddraw/stubs.c
reactos/subsys/win32k/ntuser/cursoricon.c
reactos/subsys/win32k/ntuser/desktop.c
reactos/subsys/win32k/ntuser/menu.c
reactos/subsys/win32k/ntuser/painting.c
reactos/subsys/win32k/ntuser/winpos.c
reactos/subsys/win32k/objects/bitmaps.c
reactos/subsys/win32k/objects/brush.c
reactos/subsys/win32k/objects/dc.c
reactos/subsys/win32k/objects/dib.c
reactos/subsys/win32k/objects/icm.c
reactos/subsys/win32k/objects/line.c
reactos/subsys/win32k/objects/paint.c
reactos/subsys/win32k/objects/path.c
reactos/subsys/win32k/objects/pen.c
reactos/subsys/win32k/objects/print.c
reactos/subsys/win32k/objects/region.c
reactos/subsys/win32k/objects/text.c
reactos/subsys/win32k/objects/wingl.c
reactos/subsys/win32k/w32k.h
reactos/tools/nci/w32ksvc.db
reactos/w32api/include/ntgdi.h [deleted file]
reactos/w32api/include/wingdi.h

diff --git a/reactos/include/win32k/bitmaps.h b/reactos/include/win32k/bitmaps.h
new file mode 100644 (file)
index 0000000..a0d9e89
--- /dev/null
@@ -0,0 +1,343 @@
+#ifndef __WIN32K_BITMAPS_H
+#define __WIN32K_BITMAPS_H
+
+/* GDI logical bitmap object */
+typedef struct _BITMAPOBJ
+{
+  SURFOBJ     SurfObj;
+  FLONG              flHooks;
+  FLONG       flFlags;
+  SIZE        dimension;    /* For SetBitmapDimension(), do NOT use
+                               to get width/height of bitmap, use
+                               bitmap.bmWidth/bitmap.bmHeight for
+                               that */
+#ifdef NTOS_MODE_USER
+  PVOID BitsLock;
+#else
+  PFAST_MUTEX BitsLock;     /* You need to hold this lock before you touch
+                               the actual bits in the bitmap */
+#endif
+
+  /* For device-independent bitmaps: */
+  DIBSECTION *dib;
+  HPALETTE hDIBPalette;
+} BITMAPOBJ, *PBITMAPOBJ;
+
+#define BITMAPOBJ_IS_APIBITMAP         0x1
+
+/*  Internal interface  */
+
+#define  BITMAPOBJ_AllocBitmap()  \
+  ((HBITMAP) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BITMAP))
+#define  BITMAPOBJ_FreeBitmap(hBMObj)  \
+  GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
+/* NOTE: Use shared locks! */
+#define  BITMAPOBJ_LockBitmap(hBMObj) (PBITMAPOBJ)EngLockSurface((HSURF)hBMObj)
+#define  BITMAPOBJ_UnlockBitmap(pBMObj) EngUnlockSurface(&pBMObj->SurfObj)
+BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody);
+
+BOOL INTERNAL_CALL BITMAPOBJ_InitBitsLock(BITMAPOBJ *pBMObj);
+#define BITMAPOBJ_LockBitmapBits(pBMObj) ExEnterCriticalRegionAndAcquireFastMutexUnsafe((pBMObj)->BitsLock)
+#define BITMAPOBJ_UnlockBitmapBits(pBMObj) ExReleaseFastMutexUnsafeAndLeaveCriticalRegion((pBMObj)->BitsLock)
+void INTERNAL_CALL BITMAPOBJ_CleanupBitsLock(BITMAPOBJ *pBMObj);
+
+INT     FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp);
+HBITMAP FASTCALL BITMAPOBJ_CopyBitmap (HBITMAP  hBitmap);
+INT     FASTCALL DIB_GetDIBWidthBytes (INT  width, INT  depth);
+int     STDCALL  DIB_GetDIBImageBytes (INT  width, INT  height, INT  depth);
+INT     FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);
+INT     STDCALL  BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer);
+HBITMAP FASTCALL BitmapToSurf(PBITMAPOBJ BitmapObj, HDEV GDIDevice);
+
+HBITMAP FASTCALL IntCreateCompatibleBitmap(PDC Dc, INT Width, INT Height);
+
+/*  User Entry Points  */
+BOOL
+STDCALL
+NtGdiAlphaBlend(
+       HDC  hDCDest,
+       INT  XOriginDest,
+       INT  YOriginDest,
+       INT  WidthDest,
+       INT  HeightDest,
+       HDC  hDCSrc,
+       INT  XOriginSrc,
+       INT  YOriginSrc,
+       INT  WidthSrc,
+       INT  HeightSrc,
+       BLENDFUNCTION  BlendFunc);
+
+BOOL
+STDCALL
+NtGdiBitBlt (
+       HDC     hDCDest,
+       INT     XDest,
+       INT     YDest,
+       INT     Width,
+       INT     Height,
+       HDC     hDCSrc,
+       INT     XSrc,
+       INT     YSrc,
+       DWORD   ROP
+       );
+HBITMAP
+STDCALL
+NtGdiCreateBitmap (
+       INT             Width,
+       INT             Height,
+       UINT            Planes,
+       UINT            BitsPerPel,
+       CONST VOID      * Bits
+       );
+HBITMAP
+STDCALL
+NtGdiCreateCompatibleBitmap (
+       HDC     hDC,
+       INT     Width,
+       INT     Height
+       );
+HBITMAP
+STDCALL
+NtGdiCreateBitmapIndirect (
+       CONST BITMAP    * BM
+       );
+HBITMAP
+STDCALL
+NtGdiCreateDIBitmap (
+       HDC                     hDC,
+       CONST BITMAPINFOHEADER  * bmih,
+       DWORD                   Init,
+       CONST VOID              * bInit,
+       CONST BITMAPINFO        * bmi,
+       UINT                    Usage
+       );
+HBITMAP
+STDCALL
+NtGdiCreateDIBSection (
+       HDC                     hDC,
+       CONST BITMAPINFO        * bmi,
+       UINT                    Usage,
+       VOID                    * Bits,
+       HANDLE                  hSection,
+       DWORD                   dwOffset
+       );
+HBITMAP
+STDCALL
+NtGdiCreateDiscardableBitmap (
+       HDC     hDC,
+       INT     Width,
+       INT     Height
+       );
+BOOL
+STDCALL
+NtGdiExtFloodFill (
+       HDC             hDC,
+       INT             XStart,
+       INT             YStart,
+       COLORREF        Color,
+       UINT            FillType
+       );
+BOOL
+STDCALL
+NtGdiFloodFill (
+       HDC             hDC,
+       INT             XStart,
+       INT             YStart,
+       COLORREF        Fill
+       );
+LONG
+STDCALL
+NtGdiGetBitmapBits (
+       HBITMAP hBitmap,
+       LONG    Buffer,
+       LPVOID  Bits
+       );
+BOOL
+STDCALL
+NtGdiGetBitmapDimensionEx (
+       HBITMAP hBitmap,
+       LPSIZE  Dimension
+       );
+UINT
+STDCALL
+NtGdiGetDIBColorTable (
+       HDC     hDC,
+       UINT    StartIndex,
+       UINT    Entries,
+       RGBQUAD * Colors
+       );
+INT
+STDCALL
+NtGdiGetDIBits (
+       HDC             hDC,
+       HBITMAP         hBitmap,
+       UINT            StartScan,
+       UINT            ScanLines,
+       LPVOID          Bits,
+       LPBITMAPINFO    bi,
+       UINT            Usage
+       );
+COLORREF
+STDCALL
+NtGdiGetPixel (
+       HDC     hDC,
+       INT     XPos,
+       INT     YPos
+       );
+BOOL
+STDCALL
+NtGdiGradientFill (
+       HDC hdc,
+       PTRIVERTEX pVertex,
+       ULONG uVertex,
+       PVOID pMesh,
+       ULONG uMesh,
+       ULONG ulMode
+       );
+BOOL
+STDCALL
+NtGdiMaskBlt (
+       HDC     hDCDest,
+       INT     XDest,
+       INT     YDest,
+       INT     Width,
+       INT     Height,
+       HDC     hDCSrc,
+       INT     XSrc,
+       INT     YSrc,
+       HBITMAP hMaskBitmap,
+       INT     xMask,
+       INT     yMask,
+       DWORD   ROP
+       );
+BOOL
+STDCALL
+NtGdiPlgBlt (
+       HDC             hDCDest,
+       CONST POINT     * Point,
+       HDC             hDCSrc,
+       INT             XSrc,
+       INT             YSrc,
+       INT             Width,
+       INT             Height,
+       HBITMAP         hMaskBitmap,
+       INT             xMask,
+       INT             yMask
+       );
+LONG
+STDCALL
+NtGdiSetBitmapBits (
+       HBITMAP         hBitmap,
+       DWORD           Bytes,
+       CONST VOID      * Bits
+       );
+BOOL
+STDCALL
+NtGdiSetBitmapDimensionEx (
+       HBITMAP hBitmap,
+       INT     Width,
+       INT     Height,
+       LPSIZE  Size
+       );
+UINT
+STDCALL
+NtGdiSetDIBColorTable (
+       HDC             hDC,
+       UINT            StartIndex,
+       UINT            Entries,
+       CONST RGBQUAD   * Colors
+       );
+INT
+STDCALL
+NtGdiSetDIBits (
+       HDC                     hDC,
+       HBITMAP                 hBitmap,
+       UINT                    StartScan,
+       UINT                    ScanLines,
+       CONST VOID              * Bits,
+       CONST BITMAPINFO        * bmi,
+       UINT                    ColorUse
+       );
+INT
+STDCALL
+NtGdiSetDIBitsToDevice (
+       HDC                     hDC,
+       INT                     XDest,
+       INT                     YDest,
+       DWORD                   Width,
+       DWORD                   Height,
+       INT                     XSrc,
+       INT                     YSrc,
+       UINT                    StartScan,
+       UINT                    ScanLines,
+       CONST VOID              * Bits,
+       CONST BITMAPINFO        * bmi,
+       UINT                    ColorUse
+       );
+COLORREF
+STDCALL
+NtGdiSetPixel (
+       HDC             hDC,
+       INT             X,
+       INT             Y,
+       COLORREF        Color
+       );
+BOOL
+STDCALL
+NtGdiSetPixelV (
+       HDC             hDC,
+       INT             X,
+       INT             Y,
+       COLORREF        Color
+       );
+BOOL
+STDCALL
+NtGdiStretchBlt (
+       HDC     hDCDest,
+       INT     XOriginDest,
+       INT     YOriginDest,
+       INT     WidthDest,
+       INT     HeightDest,
+       HDC     hDCSrc,
+       INT     XOriginSrc,
+       INT     YOriginSrc,
+       INT     WidthSrc,
+       INT     HeightSrc,
+       DWORD   ROP
+       );
+INT
+STDCALL
+NtGdiStretchDIBits (
+       HDC                     hDC,
+       INT                     XDest,
+       INT                     YDest,
+       INT                     DestWidth,
+       INT                     DestHeight,
+       INT                     XSrc,
+       INT                     YSrc,
+       INT                     SrcWidth,
+       INT                     SrcHeight,
+       CONST VOID              * Bits,
+       CONST BITMAPINFO        * BitsInfo,
+       UINT                    Usage,
+       DWORD                   ROP
+       );
+
+BOOL
+STDCALL
+NtGdiTransparentBlt(
+       HDC                     hdcDst,
+       INT                     xDst,
+       INT                     yDst,
+       INT                     cxDst,
+       INT                     cyDst,
+       HDC                     hdcSrc,
+       INT                     xSrc,
+       INT                     ySrc,
+       INT                     cxSrc,
+       INT                     cySrc,
+       COLORREF        TransColor
+       );
+
+#endif
+
similarity index 78%
rename from reactos/subsys/win32k/include/brush.h
rename to reactos/include/win32k/brush.h
index 65c40ca..116f410 100644 (file)
-#ifndef __WIN32K_BRUSH_H\r
-#define __WIN32K_BRUSH_H\r
-\r
-#include "gdiobj.h"\r
-\r
-/* Internal interface */\r
-\r
-#define NB_HATCH_STYLES  6\r
-\r
-/*\r
- * The layout of this structure is taken from "Windows Graphics Programming"\r
- * book written by Feng Yuan.\r
- *\r
- * DON'T MODIFY THIS STRUCTURE UNLESS REALLY NEEDED AND EVEN THEN ASK ON\r
- * A MAILING LIST FIRST.\r
- */\r
-\r
-typedef struct\r
-{\r
-   ULONG AttrFlags;\r
-   COLORREF lbColor;\r
-} BRUSHATTR, *PBRUSHATTR;\r
-\r
-typedef struct\r
-{\r
-   ULONG ulStyle;\r
-   HBITMAP hbmPattern;\r
-   HANDLE hbmClient;\r
-   ULONG flAttrs;\r
-\r
-   ULONG ulBrushUnique;\r
-   BRUSHATTR *pBrushAttr;\r
-   BRUSHATTR BrushAttr;\r
-   POINT ptOrigin;\r
-   ULONG bCacheGrabbed;\r
-   COLORREF crBack;\r
-   COLORREF crFore;\r
-   ULONG ulPalTime;\r
-   ULONG ulSurfTime;\r
-   PVOID ulRealization;\r
-   ULONG Unknown4C[3];\r
-   POINT ptPenWidth;\r
-   ULONG ulPenStyle;\r
-   DWORD *pStyle;\r
-   ULONG dwStyleCount;\r
-   ULONG Unknown6C;\r
-} GDIBRUSHOBJ, *PGDIBRUSHOBJ;\r
-\r
-typedef struct\r
-{\r
-   BRUSHOBJ BrushObject;\r
-   PGDIBRUSHOBJ GdiBrushObject;\r
-   XLATEOBJ *XlateObject;\r
-} GDIBRUSHINST, *PGDIBRUSHINST;\r
-\r
-/* GDI Brush Attributes */\r
-\r
-#define GDIBRUSH_NEED_BK_CLR           0x0002 /* Background color is needed */\r
-#define GDIBRUSH_DITHER_OK             0x0004 /* Allow color dithering */\r
-#define GDIBRUSH_IS_SOLID              0x0010 /* Solid brush */\r
-#define GDIBRUSH_IS_HATCH              0x0020 /* Hatch brush */\r
-#define GDIBRUSH_IS_BITMAP             0x0040 /* DDB pattern brush */\r
-#define GDIBRUSH_IS_DIB                        0x0080 /* DIB pattern brush */ \r
-#define GDIBRUSH_IS_NULL               0x0100 /* Null/hollow brush */\r
-#define GDIBRUSH_IS_GLOBAL             0x0200 /* Stock objects */\r
-#define GDIBRUSH_IS_PEN                        0x0400 /* Pen */\r
-#define GDIBRUSH_IS_OLDSTYLEPEN                0x0800 /* Geometric pen */\r
-#define GDIBRUSH_IS_MASKING            0x8000 /* Pattern bitmap is used as transparent mask (?) */\r
-#define GDIBRUSH_CACHED_IS_SOLID       0x80000000 \r
-\r
-#define  BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BRUSH))\r
-#define  BRUSHOBJ_FreeBrush(hBrush) GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)\r
-#define  BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))\r
-#define  BRUSHOBJ_UnlockBrush(pBrush) GDIOBJ_UnlockObjByPtr(pBrush)\r
-BOOL INTERNAL_CALL BRUSH_Cleanup(PVOID ObjectBody);\r
-\r
-#endif\r
+#ifndef __WIN32K_BRUSH_H
+#define __WIN32K_BRUSH_H
+
+#include <win32k/gdiobj.h>
+
+/* Internal interface */
+
+#define NB_HATCH_STYLES  6
+
+/*
+ * The layout of this structure is taken from "Windows Graphics Programming"
+ * book written by Feng Yuan.
+ *
+ * DON'T MODIFY THIS STRUCTURE UNLESS REALLY NEEDED AND EVEN THEN ASK ON
+ * A MAILING LIST FIRST.
+ */
+
+typedef struct
+{
+   ULONG AttrFlags;
+   COLORREF lbColor;
+} BRUSHATTR, *PBRUSHATTR;
+
+typedef struct
+{
+   ULONG ulStyle;
+   HBITMAP hbmPattern;
+   HANDLE hbmClient;
+   ULONG flAttrs;
+
+   ULONG ulBrushUnique;
+   BRUSHATTR *pBrushAttr;
+   BRUSHATTR BrushAttr;
+   POINT ptOrigin;
+   ULONG bCacheGrabbed;
+   COLORREF crBack;
+   COLORREF crFore;
+   ULONG ulPalTime;
+   ULONG ulSurfTime;
+   PVOID ulRealization;
+   ULONG Unknown4C[3];
+   POINT ptPenWidth;
+   ULONG ulPenStyle;
+   DWORD *pStyle;
+   ULONG dwStyleCount;
+   ULONG Unknown6C;
+} GDIBRUSHOBJ, *PGDIBRUSHOBJ;
+
+typedef struct
+{
+   BRUSHOBJ BrushObject;
+   PGDIBRUSHOBJ GdiBrushObject;
+   XLATEOBJ *XlateObject;
+} GDIBRUSHINST, *PGDIBRUSHINST;
+
+/* GDI Brush Attributes */
+
+#define GDIBRUSH_NEED_BK_CLR           0x0002 /* Background color is needed */
+#define GDIBRUSH_DITHER_OK             0x0004 /* Allow color dithering */
+#define GDIBRUSH_IS_SOLID              0x0010 /* Solid brush */
+#define GDIBRUSH_IS_HATCH              0x0020 /* Hatch brush */
+#define GDIBRUSH_IS_BITMAP             0x0040 /* DDB pattern brush */
+#define GDIBRUSH_IS_DIB                        0x0080 /* DIB pattern brush */ 
+#define GDIBRUSH_IS_NULL               0x0100 /* Null/hollow brush */
+#define GDIBRUSH_IS_GLOBAL             0x0200 /* Stock objects */
+#define GDIBRUSH_IS_PEN                        0x0400 /* Pen */
+#define GDIBRUSH_IS_OLDSTYLEPEN                0x0800 /* Geometric pen */
+#define GDIBRUSH_IS_MASKING            0x8000 /* Pattern bitmap is used as transparent mask (?) */
+#define GDIBRUSH_CACHED_IS_SOLID       0x80000000 
+
+#define  BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BRUSH))
+#define  BRUSHOBJ_FreeBrush(hBrush) GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)
+#define  BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))
+#define  BRUSHOBJ_UnlockBrush(pBrush) GDIOBJ_UnlockObjByPtr(pBrush)
+BOOL INTERNAL_CALL BRUSH_Cleanup(PVOID ObjectBody);
+
+HBRUSH STDCALL
+NtGdiCreateBrushIndirect(
+   CONST LOGBRUSH *LogBrush);
+
+HBRUSH STDCALL
+NtGdiCreateDIBBrush(
+   CONST BITMAPINFO *BitmapInfoAndData,
+   UINT ColorSpec,
+   UINT BitmapInfoSize,
+   CONST VOID *PackedDIB);
+
+HBRUSH STDCALL
+NtGdiCreateHatchBrush(
+   INT Style,
+   COLORREF Color);
+
+HBRUSH STDCALL
+NtGdiCreatePatternBrush(
+   HBITMAP hBitmap);
+
+HBRUSH STDCALL
+NtGdiCreateSolidBrush(
+   COLORREF Color);
+
+BOOL STDCALL
+NtGdiFixBrushOrgEx(
+   VOID);
+
+BOOL STDCALL
+NtGdiSetBrushOrgEx(
+   HDC hDC,
+   INT XOrg,
+   INT YOrg,
+   LPPOINT Point);
+
+#endif
diff --git a/reactos/include/win32k/caret.h b/reactos/include/win32k/caret.h
new file mode 100644 (file)
index 0000000..d0613ee
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS system libraries
+ * FILE:            include/win32k/caret.h
+ * PURPOSE:         GDI32/Win32k Caret interface
+ * PROGRAMMER:
+ *
+ */
+
+#ifndef WIN32K_CARET_H_INCLUDED
+#define WIN32K_CARET_H_INCLUDED
+
+typedef struct _THRDCARETINFO
+{
+  HWND hWnd;
+  HBITMAP Bitmap;
+  POINT Pos;
+  SIZE Size;
+  BYTE Visible;
+  BYTE Showing;
+} THRDCARETINFO, *PTHRDCARETINFO;
+
+#endif /* WIN32K_FONT_H_INCLUDED */
diff --git a/reactos/include/win32k/cliprgn.h b/reactos/include/win32k/cliprgn.h
new file mode 100644 (file)
index 0000000..6a0107e
--- /dev/null
@@ -0,0 +1,81 @@
+#ifndef _WIN32K_CLIPRGN_H
+#define _WIN32K_CLIPRGN_H
+
+HRGN WINAPI SaveVisRgn(HDC hdc);
+INT WINAPI SelectVisRgn(HDC hdc, HRGN hrgn);
+
+int
+STDCALL
+NtGdiExcludeClipRect (
+       HDC     hDC,
+       int     LeftRect,
+       int     TopRect,
+       int     RightRect,
+       int     BottomRect
+       );
+int
+STDCALL
+NtGdiExtSelectClipRgn (
+       HDC     hDC,
+       HRGN    hrgn,
+       int     fnMode
+       );
+int
+STDCALL
+NtGdiGetClipBox (
+       HDC     hDC,
+       LPRECT  rc
+       );
+int
+STDCALL
+NtGdiGetMetaRgn (
+       HDC     hDC,
+       HRGN    hrgn
+       );
+int
+STDCALL
+NtGdiIntersectClipRect (
+       HDC     hDC,
+       int     LeftRect,
+       int     TopRect,
+       int     RightRect,
+       int     BottomRect
+       );
+int
+STDCALL
+NtGdiOffsetClipRgn (
+       HDC     hDC,
+       int     XOffset,
+       int     YOffset
+       );
+BOOL
+STDCALL
+NtGdiPtVisible (
+       HDC     hDC,
+       int     X,
+       int     Y
+       );
+BOOL
+STDCALL
+NtGdiRectVisible (
+       HDC             hDC,
+       CONST PRECT     rc
+       );
+BOOL
+STDCALL
+NtGdiSelectClipPath (
+       HDC     hDC,
+       int     Mode
+       );
+int
+STDCALL
+NtGdiSelectClipRgn (
+       HDC     hDC,
+       HRGN    hrgn
+       );
+int
+STDCALL
+NtGdiSetMetaRgn (
+       HDC     hDC
+       );
+#endif
diff --git a/reactos/include/win32k/color.h b/reactos/include/win32k/color.h
new file mode 100644 (file)
index 0000000..c78610a
--- /dev/null
@@ -0,0 +1,116 @@
+#ifndef __WIN32K_COLOR_H
+#define __WIN32K_COLOR_H
+
+#ifndef CLR_INVALID
+#define CLR_INVALID         0xffffffff
+#endif
+#define PC_SYS_USED     0x80           /* palentry is used (both system and logical) */
+#define PC_SYS_RESERVED 0x40           /* system palentry is not to be mapped to */
+#define PC_SYS_MAPPED   0x10           /* logical palentry is a direct alias for system palentry */
+
+BOOL
+STDCALL
+NtGdiAnimatePalette (
+       HPALETTE                hpal,
+       UINT                    StartIndex,
+       UINT                    Entries,
+       CONST PPALETTEENTRY     ppe
+       );
+HPALETTE
+STDCALL
+NtGdiCreateHalftonePalette (
+       HDC     hDC
+       );
+HPALETTE
+STDCALL
+NtGdiCreatePalette (
+       CONST PLOGPALETTE       lgpl
+       );
+BOOL
+STDCALL
+NtGdiGetColorAdjustment (
+       HDC                     hDC,
+       LPCOLORADJUSTMENT       ca
+       );
+COLORREF
+STDCALL
+NtGdiGetNearestColor (
+       HDC             hDC,
+       COLORREF        Color
+       );
+UINT
+STDCALL
+NtGdiGetNearestPaletteIndex (
+       HPALETTE        hpal,
+       COLORREF        Color
+       );
+UINT
+STDCALL
+NtGdiGetPaletteEntries (
+       HPALETTE        hpal,
+       UINT            StartIndex,
+       UINT            Entries,
+       LPPALETTEENTRY  pe
+       );
+UINT
+STDCALL
+NtGdiGetSystemPaletteEntries (
+       HDC             hDC,
+       UINT            StartIndex,
+       UINT            Entries,
+       LPPALETTEENTRY  pe
+       );
+UINT
+STDCALL
+NtGdiGetSystemPaletteUse (
+       HDC     hDC
+       );
+UINT
+STDCALL
+NtGdiRealizePalette (
+       HDC     hDC
+       );
+BOOL
+STDCALL
+NtGdiResizePalette (
+       HPALETTE        hpal,
+       UINT            Entries
+       );
+HPALETTE
+STDCALL
+NtGdiSelectPalette (
+       HDC             hDC,
+       HPALETTE        hpal,
+       BOOL            ForceBackground
+       );
+BOOL
+STDCALL
+NtGdiSetColorAdjustment (
+       HDC                     hDC,
+       CONST LPCOLORADJUSTMENT ca
+       );
+UINT
+STDCALL
+NtGdiSetPaletteEntries (
+       HPALETTE                hpal,
+       UINT                    Start,
+       UINT                    Entries,
+       CONST LPPALETTEENTRY    pe
+       );
+UINT
+STDCALL
+NtGdiSetSystemPaletteUse (
+       HDC     hDC,
+       UINT    Usage
+       );
+BOOL
+STDCALL
+NtGdiUnrealizeObject (
+       HGDIOBJ hgdiobj
+       );
+BOOL
+STDCALL
+NtGdiUpdateColors (
+       HDC     hDC
+       );
+#endif
diff --git a/reactos/include/win32k/coord.h b/reactos/include/win32k/coord.h
new file mode 100644 (file)
index 0000000..f19d087
--- /dev/null
@@ -0,0 +1,151 @@
+#ifndef __WIN32K_COORD_H
+#define __WIN32K_COORD_H
+
+BOOL
+STDCALL
+NtGdiCombineTransform (
+       LPXFORM         XformResult,
+       CONST LPXFORM   xform1,
+       CONST LPXFORM   xform2
+       );
+
+VOID
+FASTCALL
+IntDPtoLP ( PDC dc, LPPOINT Points, INT Count );
+
+VOID
+FASTCALL
+CoordDPtoLP ( PDC Dc, LPPOINT Point );
+
+BOOL
+STDCALL
+NtGdiDPtoLP (
+       HDC     hDC,
+       LPPOINT Points,
+       int     Count
+       );
+
+int
+FASTCALL
+IntGetGraphicsMode ( PDC dc );
+
+int
+STDCALL
+NtGdiGetGraphicsMode ( HDC hDC );
+
+BOOL
+STDCALL
+NtGdiGetWorldTransform (
+       HDC     hDC,
+       LPXFORM Xform
+       );
+
+VOID
+FASTCALL
+CoordLPtoDP ( PDC Dc, LPPOINT Point );
+
+VOID
+FASTCALL
+IntLPtoDP ( PDC dc, LPPOINT Points, INT Count );
+
+BOOL
+STDCALL
+NtGdiLPtoDP (
+       HDC     hDC,
+       LPPOINT Points,
+       int     Count
+       );
+BOOL
+STDCALL
+NtGdiModifyWorldTransform (
+       HDC             hDC,
+       CONST LPXFORM   Xform,
+       DWORD           Mode
+       );
+BOOL
+STDCALL
+NtGdiOffsetViewportOrgEx (
+       HDC     hDC,
+       int     XOffset,
+       int     YOffset,
+       LPPOINT Point
+       );
+BOOL
+STDCALL
+NtGdiOffsetWindowOrgEx (
+       HDC     hDC,
+       int     XOffset,
+       int     YOffset,
+       LPPOINT Point
+       );
+BOOL
+STDCALL
+NtGdiScaleViewportExtEx (
+       HDC     hDC,
+       int     Xnum,
+       int     Xdenom,
+       int     Ynum,
+       int     Ydenom,
+       LPSIZE  Size
+       );
+BOOL
+STDCALL
+NtGdiScaleWindowExtEx (
+       HDC     hDC,
+       int     Xnum,
+       int     Xdenom,
+       int     Ynum,
+       int     Ydenom,
+       LPSIZE  Size
+       );
+int
+STDCALL
+NtGdiSetGraphicsMode (
+       HDC     hDC,
+       int     Mode
+       );
+int
+STDCALL
+NtGdiSetMapMode (
+       HDC     hDC,
+       int     MapMode
+       );
+BOOL
+STDCALL
+NtGdiSetViewportExtEx (
+       HDC     hDC,
+       int     XExtent,
+       int     YExtent,
+       LPSIZE  Size
+       );
+BOOL
+STDCALL
+NtGdiSetViewportOrgEx (
+       HDC     hDC,
+       int     X,
+       int     Y,
+       LPPOINT Point
+       );
+BOOL
+STDCALL
+NtGdiSetWindowExtEx (
+       HDC     hDC,
+       int     XExtent,
+       int     YExtent,
+       LPSIZE  Size
+       );
+BOOL
+STDCALL
+NtGdiSetWindowOrgEx (
+       HDC     hDC,
+       int     X,
+       int     Y,
+       LPPOINT Point
+       );
+BOOL
+STDCALL
+NtGdiSetWorldTransform (
+       HDC             hDC,
+       CONST LPXFORM   Xform
+       );
+#endif
diff --git a/reactos/include/win32k/cursoricon.h b/reactos/include/win32k/cursoricon.h
new file mode 100644 (file)
index 0000000..eb05867
--- /dev/null
@@ -0,0 +1,95 @@
+
+#ifndef __WIN32K_CURSORICON_H
+#define __WIN32K_CURSORICON_H
+
+#include <pshpack1.h>
+
+/* Structures for reading icon/cursor files and resources */
+// Structures for reading icon files and resources 
+typedef struct _ICONIMAGE
+{
+   BITMAPINFOHEADER   icHeader;      // DIB header
+   RGBQUAD         icColors[1];   // Color table
+   BYTE            icXOR[1];      // DIB bits for XOR mask
+   BYTE            icAND[1];      // DIB bits for AND mask
+} ICONIMAGE, *LPICONIMAGE;
+
+typedef struct _CURSORIMAGE
+{
+   BITMAPINFOHEADER   icHeader;      // DIB header
+   RGBQUAD         icColors[1];   // Color table
+   BYTE            icXOR[1];      // DIB bits for XOR mask
+   BYTE            icAND[1];      // DIB bits for AND mask
+} CURSORIMAGE, *LPCURSORIMAGE;
+
+typedef struct
+{
+    BYTE   bWidth;
+    BYTE   bHeight;
+    BYTE   bColorCount;
+    BYTE   bReserved;
+} ICONRESDIR;
+
+typedef struct
+{
+    WORD   wWidth;
+    WORD   wHeight;
+} CURSORRESDIR;
+
+typedef struct
+{
+    WORD   wPlanes;                            // Number of Color Planes in the XOR image
+    WORD   wBitCount;                  // Bits per pixel in the XOR image
+} ICONDIR;
+
+typedef struct
+{
+    WORD   wXHotspot;                          // Number of Color Planes in the XOR image
+    WORD   wYHotspot;                  // Bits per pixel in the XOR image
+} CURSORDIR;
+
+typedef struct
+{
+    BYTE   bWidth;                             // Width, in pixels, of the icon image
+    BYTE   bHeight;                            // Height, in pixels, of the icon image
+    BYTE   bColorCount;                        // Number of colors in image (0 if >=8bpp)
+    BYTE   bReserved;                  // Reserved ( must be 0)
+       union
+    { ICONDIR icon;
+      CURSORDIR  cursor;
+    } Info;
+    DWORD  dwBytesInRes;               // How many bytes in this resource?
+    DWORD  dwImageOffset;              // Where in the file is this image?
+} CURSORICONDIRENTRY;
+
+typedef struct
+{
+    WORD                               idReserved;             // Reserved (must be 0)
+    WORD                               idType;                 // Resource Type (1 for icons, 0 for cursors)
+    WORD                               idCount;                // How many images?
+    CURSORICONDIRENTRY  idEntries[1];   // An entry for idCount number of images
+} CURSORICONDIR;
+
+typedef struct
+{  
+       union
+    { ICONRESDIR icon;
+      CURSORRESDIR  cursor;
+    } ResInfo;
+       WORD   wPlanes;              // Color Planes
+       WORD   wBitCount;            // Bits per pixel
+       DWORD  dwBytesInRes;         // how many bytes in this resource?
+       WORD   nID;                  // the ID
+} GRPCURSORICONDIRENTRY;
+
+typedef struct 
+{
+   WORD            idReserved;   // Reserved (must be 0)
+   WORD            idType;       // Resource type (1 for icons)
+   WORD            idCount;      // How many images?
+   GRPCURSORICONDIRENTRY   idEntries[1]; // The entries for each image
+} GRPCURSORICONDIR;
+
+#include <poppack.h>
+
+#endif
similarity index 58%
rename from reactos/subsys/win32k/include/dc.h
rename to reactos/include/win32k/dc.h
index b131da6..efb71ab 100644 (file)
-\r
-#ifndef __WIN32K_DC_H\r
-#define __WIN32K_DC_H\r
-\r
-#include "driver.h"\r
-\r
-typedef enum tagGdiPathState\r
-{\r
-   PATH_Null,\r
-   PATH_Open,\r
-   PATH_Closed\r
-} GdiPathState;\r
-\r
-typedef struct tagGdiPath\r
-{\r
-   GdiPathState state;\r
-   POINT      *pPoints;\r
-   BYTE         *pFlags;\r
-   int          numEntriesUsed, numEntriesAllocated;\r
-   BOOL       newStroke;\r
-} GdiPath;\r
-\r
-typedef struct _WIN_DC_INFO\r
-{\r
-  int  flags;\r
-  HRGN  hClipRgn;     /* Clip region (may be 0) */\r
-  HRGN  hVisRgn;      /* Visible region (must never be 0) */\r
-  HRGN  hGCClipRgn;   /* GC clip region (ClipRgn AND VisRgn) */\r
-  HPEN  hPen;\r
-  HBRUSH  hBrush;\r
-  HFONT  hFont;\r
-  HBITMAP  hBitmap;\r
-  HBITMAP  hFirstBitmap; /* Bitmap selected at creation of the DC */\r
-\r
-/* #if 0 */\r
-    HANDLE      hDevice;\r
-    HPALETTE    hPalette;\r
-\r
-    GdiPath       path;\r
-/* #endif */\r
-\r
-  WORD  ROPmode;\r
-  WORD  polyFillMode;\r
-  WORD  stretchBltMode;\r
-  WORD  relAbsMode;\r
-  WORD  backgroundMode;\r
-  COLORREF  backgroundColor;\r
-  COLORREF  textColor;\r
-\r
-  short  brushOrgX;\r
-  short  brushOrgY;\r
-\r
-  WORD  textAlign;         /* Text alignment from SetTextAlign() */\r
-  short  charExtra;         /* Spacing from SetTextCharacterExtra() */\r
-  short  breakTotalExtra;   /* Total extra space for justification */\r
-  short  breakCount;        /* Break char. count */\r
-  short  breakExtra;        /* breakTotalExtra / breakCount */\r
-  short  breakRem;          /* breakTotalExtra % breakCount */\r
-\r
-  RECT   totalExtent;\r
-  BYTE   bitsPerPixel;\r
-\r
-  INT  MapMode;\r
-  INT  GraphicsMode;      /* Graphics mode */\r
-  INT  DCOrgX;            /* DC origin */\r
-  INT  DCOrgY;\r
-\r
-#if 0\r
-    FARPROC     lpfnPrint;         /* AbortProc for Printing */\r
-#endif\r
-\r
-  INT  CursPosX;          /* Current position */\r
-  INT  CursPosY;\r
-  INT  ArcDirection;\r
-\r
-  XFORM  xformWorld2Wnd;    /* World-to-window transformation */\r
-  XFORM  xformWorld2Vport;  /* World-to-viewport transformation */\r
-  XFORM  xformVport2World;  /* Inverse of the above transformation */\r
-  BOOL  vport2WorldValid;  /* Is xformVport2World valid? */\r
-} WIN_DC_INFO;\r
-\r
-  /* DC flags */\r
-#define DC_MEMORY     0x0001   /* It is a memory DC */\r
-#define DC_SAVED      0x0002   /* It is a saved DC */\r
-#define DC_DIRTY      0x0004   /* hVisRgn has to be updated */\r
-#define DC_THUNKHOOK  0x0008   /* DC hook is in the 16-bit code */\r
-\r
-#define  GDI_DC_TYPE  (1)\r
-\r
-typedef struct _DC\r
-{\r
-  HDC  hSelf;\r
-  HDC  hNext;\r
-  DHPDEV  PDev;\r
-  HSURF  FillPatternSurfaces[HS_DDI_MAX];\r
-  PGDIINFO  GDIInfo;\r
-  PDEVINFO  DevInfo;\r
-  HDEV   GDIDevice;\r
-\r
-  DRIVER_FUNCTIONS  DriverFunctions;\r
-  UNICODE_STRING    DriverName;\r
-  HANDLE  DeviceDriver;\r
-\r
-  INT  wndOrgX;          /* Window origin */\r
-  INT  wndOrgY;\r
-  INT  wndExtX;          /* Window extent */\r
-  INT  wndExtY;\r
-  INT  vportOrgX;        /* Viewport origin */\r
-  INT  vportOrgY;\r
-  INT  vportExtX;        /* Viewport extent */\r
-  INT  vportExtY;\r
-\r
-  CLIPOBJ *CombinedClip;\r
-\r
-  XLATEOBJ *XlateBrush;\r
-  XLATEOBJ *XlatePen;\r
-\r
-  INT  saveLevel;\r
-  BOOL IsIC;\r
-\r
-  HPALETTE PalIndexed;\r
-\r
-  WIN_DC_INFO  w;\r
-} DC, *PDC;\r
-\r
-typedef struct _GDIPOINTER /* should stay private to ENG */\r
-{\r
-  /* private GDI pointer handling information, required for software emulation */\r
-  BOOL Enabled;\r
-  POINTL Pos;\r
-  SIZEL Size;\r
-  POINTL HotSpot;\r
-  XLATEOBJ *XlateObject;\r
-  HSURF ColorSurface;\r
-  HSURF MaskSurface;\r
-  HSURF SaveSurface;\r
-  \r
-  /* public pointer information */\r
-  RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */\r
-  PGD_MOVEPOINTER MovePointer;\r
-  ULONG Status;\r
-} GDIPOINTER, *PGDIPOINTER;\r
-\r
-typedef struct\r
-{\r
-  HANDLE Handle;\r
-  DHPDEV PDev;\r
-  DEVMODEW DMW;\r
-  HSURF FillPatterns[HS_DDI_MAX];\r
-  GDIINFO GDIInfo;\r
-  DEVINFO DevInfo;\r
-  DRIVER_FUNCTIONS DriverFunctions;\r
-  PFILE_OBJECT VideoFileObject;\r
-  BOOLEAN PreparedDriver;\r
-  ULONG DisplayNumber;\r
-\r
-  GDIPOINTER Pointer;\r
-\r
-  /* Stuff to keep track of software cursors; win32k gdi part */\r
-  UINT SafetyRemoveLevel; /* at what level was the cursor removed?\r
-                            0 for not removed */\r
-  UINT SafetyRemoveCount;\r
-} GDIDEVICE;\r
-\r
-/*  Internal functions  */\r
-\r
-#define  DC_LockDc(hDC)  \\r
-  ((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))\r
-#define  DC_UnlockDc(pDC)  \\r
-  GDIOBJ_UnlockObjByPtr (pDC)\r
-\r
-HDC  FASTCALL RetrieveDisplayHDC(VOID);\r
-HDC  FASTCALL DC_AllocDC(PUNICODE_STRING  Driver);\r
-VOID FASTCALL DC_InitDC(HDC  DCToInit);\r
-HDC  FASTCALL DC_FindOpenDC(PUNICODE_STRING  Driver);\r
-VOID FASTCALL DC_FreeDC(HDC  DCToFree);\r
-BOOL INTERNAL_CALL DC_Cleanup(PVOID ObjectBody);\r
-HDC  FASTCALL DC_GetNextDC (PDC pDC);\r
-VOID FASTCALL DC_SetNextDC (PDC pDC, HDC hNextDC);\r
-VOID FASTCALL DC_SetOwnership(HDC DC, PEPROCESS Owner);\r
-\r
-VOID FASTCALL DC_UpdateXforms(PDC  dc);\r
-BOOL FASTCALL DC_InvertXform(const XFORM *xformSrc, XFORM *xformDest);\r
-\r
-#endif\r
+
+#ifndef __WIN32K_DC_H
+#define __WIN32K_DC_H
+
+typedef struct _WIN_DC_INFO
+{
+  int  flags;
+  HRGN  hClipRgn;     /* Clip region (may be 0) */
+  HRGN  hVisRgn;      /* Visible region (must never be 0) */
+  HRGN  hGCClipRgn;   /* GC clip region (ClipRgn AND VisRgn) */
+  HPEN  hPen;
+  HBRUSH  hBrush;
+  HFONT  hFont;
+  HBITMAP  hBitmap;
+  HBITMAP  hFirstBitmap; /* Bitmap selected at creation of the DC */
+
+/* #if 0 */
+    HANDLE      hDevice;
+    HPALETTE    hPalette;
+
+    GdiPath       path;
+/* #endif */
+
+  WORD  ROPmode;
+  WORD  polyFillMode;
+  WORD  stretchBltMode;
+  WORD  relAbsMode;
+  WORD  backgroundMode;
+  COLORREF  backgroundColor;
+  COLORREF  textColor;
+
+  short  brushOrgX;
+  short  brushOrgY;
+
+  WORD  textAlign;         /* Text alignment from SetTextAlign() */
+  short  charExtra;         /* Spacing from SetTextCharacterExtra() */
+  short  breakTotalExtra;   /* Total extra space for justification */
+  short  breakCount;        /* Break char. count */
+  short  breakExtra;        /* breakTotalExtra / breakCount */
+  short  breakRem;          /* breakTotalExtra % breakCount */
+
+  RECT   totalExtent;
+  BYTE   bitsPerPixel;
+
+  INT  MapMode;
+  INT  GraphicsMode;      /* Graphics mode */
+  INT  DCOrgX;            /* DC origin */
+  INT  DCOrgY;
+
+#if 0
+    FARPROC     lpfnPrint;         /* AbortProc for Printing */
+#endif
+
+  INT  CursPosX;          /* Current position */
+  INT  CursPosY;
+  INT  ArcDirection;
+
+  XFORM  xformWorld2Wnd;    /* World-to-window transformation */
+  XFORM  xformWorld2Vport;  /* World-to-viewport transformation */
+  XFORM  xformVport2World;  /* Inverse of the above transformation */
+  BOOL  vport2WorldValid;  /* Is xformVport2World valid? */
+} WIN_DC_INFO;
+
+  /* DC flags */
+#define DC_MEMORY     0x0001   /* It is a memory DC */
+#define DC_SAVED      0x0002   /* It is a saved DC */
+#define DC_DIRTY      0x0004   /* hVisRgn has to be updated */
+#define DC_THUNKHOOK  0x0008   /* DC hook is in the 16-bit code */
+
+#define  GDI_DC_TYPE  (1)
+
+typedef struct _DC
+{
+  HDC  hSelf;
+  HDC  hNext;
+  DHPDEV  PDev;
+  HSURF  FillPatternSurfaces[HS_DDI_MAX];
+  PGDIINFO  GDIInfo;
+  PDEVINFO  DevInfo;
+  HDEV   GDIDevice;
+
+  DRIVER_FUNCTIONS  DriverFunctions;
+  UNICODE_STRING    DriverName;
+  HANDLE  DeviceDriver;
+
+  INT  wndOrgX;          /* Window origin */
+  INT  wndOrgY;
+  INT  wndExtX;          /* Window extent */
+  INT  wndExtY;
+  INT  vportOrgX;        /* Viewport origin */
+  INT  vportOrgY;
+  INT  vportExtX;        /* Viewport extent */
+  INT  vportExtY;
+
+  CLIPOBJ *CombinedClip;
+
+  XLATEOBJ *XlateBrush;
+  XLATEOBJ *XlatePen;
+
+  INT  saveLevel;
+  BOOL IsIC;
+
+  HPALETTE PalIndexed;
+
+  WIN_DC_INFO  w;
+} DC, *PDC;
+
+typedef struct _GDIPOINTER /* should stay private to ENG */
+{
+  /* private GDI pointer handling information, required for software emulation */
+  BOOL Enabled;
+  POINTL Pos;
+  SIZEL Size;
+  POINTL HotSpot;
+  XLATEOBJ *XlateObject;
+  HSURF ColorSurface;
+  HSURF MaskSurface;
+  HSURF SaveSurface;
+  
+  /* public pointer information */
+  RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
+  PGD_MOVEPOINTER MovePointer;
+  ULONG Status;
+} GDIPOINTER, *PGDIPOINTER;
+
+typedef struct
+{
+  HANDLE Handle;
+  DHPDEV PDev;
+  DEVMODEW DMW;
+  HSURF FillPatterns[HS_DDI_MAX];
+  GDIINFO GDIInfo;
+  DEVINFO DevInfo;
+  DRIVER_FUNCTIONS DriverFunctions;
+#ifdef NTOS_MODE_USER
+  PVOID VideoFileObject;
+#else
+  PFILE_OBJECT VideoFileObject;
+#endif
+  BOOLEAN PreparedDriver;
+  ULONG DisplayNumber;
+
+  GDIPOINTER Pointer;
+
+  /* Stuff to keep track of software cursors; win32k gdi part */
+  UINT SafetyRemoveLevel; /* at what level was the cursor removed?
+                            0 for not removed */
+  UINT SafetyRemoveCount;
+} GDIDEVICE;
+
+/*  Internal functions  */
+
+#ifndef NTOS_MODE_USER
+
+#define  DC_LockDc(hDC)  \
+  ((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
+#define  DC_UnlockDc(pDC)  \
+  GDIOBJ_UnlockObjByPtr (pDC)
+
+HDC  FASTCALL RetrieveDisplayHDC(VOID);
+HDC  FASTCALL DC_AllocDC(PUNICODE_STRING  Driver);
+VOID FASTCALL DC_InitDC(HDC  DCToInit);
+HDC  FASTCALL DC_FindOpenDC(PUNICODE_STRING  Driver);
+VOID FASTCALL DC_FreeDC(HDC  DCToFree);
+BOOL INTERNAL_CALL DC_Cleanup(PVOID ObjectBody);
+HDC  FASTCALL DC_GetNextDC (PDC pDC);
+VOID FASTCALL DC_SetNextDC (PDC pDC, HDC hNextDC);
+VOID FASTCALL DC_SetOwnership(HDC DC, PEPROCESS Owner);
+
+VOID FASTCALL DC_UpdateXforms(PDC  dc);
+BOOL FASTCALL DC_InvertXform(const XFORM *xformSrc, XFORM *xformDest);
+
+#endif
+
+/*  User entry points */
+
+BOOL STDCALL  NtGdiCancelDC(HDC  hDC);
+HDC STDCALL  NtGdiCreateCompatibleDC(HDC  hDC);
+HDC STDCALL  NtGdiCreateDC(PUNICODE_STRING Driver,
+                           PUNICODE_STRING Device,
+                           PUNICODE_STRING Output,
+                           CONST PDEVMODEW  InitData);
+HDC STDCALL NtGdiCreateIC(PUNICODE_STRING Driver,
+                          PUNICODE_STRING Device,
+                          PUNICODE_STRING Output,
+                          CONST PDEVMODEW  DevMode);
+BOOL STDCALL  NtGdiDeleteDC(HDC  hDC);
+BOOL STDCALL  NtGdiDeleteObject(HGDIOBJ hObject);
+INT STDCALL  NtGdiDrawEscape(HDC  hDC,
+                            INT  nEscape,
+                            INT  cbInput,
+                            LPCSTR  lpszInData);
+
+INT STDCALL  NtGdiEnumObjects(HDC  hDC,
+                             INT  ObjectType,
+                             GOBJENUMPROC  ObjectFunc,
+                             LPARAM  lParam);
+
+COLORREF STDCALL  NtGdiGetBkColor(HDC  hDC);
+INT STDCALL  NtGdiGetBkMode(HDC  hDC);
+BOOL STDCALL  NtGdiGetBrushOrgEx(HDC  hDC, LPPOINT brushOrg);
+HRGN STDCALL  NtGdiGetClipRgn(HDC  hDC);
+HGDIOBJ STDCALL  NtGdiGetCurrentObject(HDC  hDC, UINT  ObjectType);
+VOID FASTCALL IntGetCurrentPositionEx (PDC  dc,  LPPOINT currentPosition);
+BOOL STDCALL  NtGdiGetCurrentPositionEx(HDC  hDC, LPPOINT currentPosition);
+BOOL STDCALL  NtGdiGetDCOrgEx(HDC  hDC, LPPOINT  Point);
+HDC STDCALL  NtGdiGetDCState(HDC  hDC);
+INT STDCALL  NtGdiGetDeviceCaps(HDC  hDC, INT  Index);
+INT STDCALL  NtGdiGetMapMode(HDC  hDC);
+INT STDCALL  NtGdiGetObject(HGDIOBJ  hGDIObj,
+                           INT  BufSize,
+                           LPVOID  Object);
+DWORD STDCALL  NtGdiGetObjectType(HGDIOBJ  hGDIObj);
+INT STDCALL  NtGdiGetPolyFillMode(HDC  hDC);
+INT STDCALL  NtGdiGetRelAbs(HDC  hDC);
+INT STDCALL  NtGdiGetROP2(HDC  hDC);
+HGDIOBJ STDCALL  NtGdiGetStockObject(INT  Object);
+INT STDCALL  NtGdiGetStretchBltMode(HDC  hDC);
+COLORREF STDCALL  NtGdiGetTextColor(HDC  hDC);
+UINT STDCALL  NtGdiGetTextAlign(HDC  hDC);
+BOOL STDCALL  NtGdiGetViewportExtEx(HDC  hDC, LPSIZE viewportExt);
+BOOL STDCALL  NtGdiGetViewportOrgEx(HDC  hDC, LPPOINT viewportOrg);
+BOOL STDCALL  NtGdiGetWindowExtEx(HDC  hDC, LPSIZE windowExt);
+BOOL STDCALL  NtGdiGetWindowOrgEx(HDC  hDC, LPPOINT windowOrg);
+HDC STDCALL  NtGdiResetDC(HDC  hDC, CONST DEVMODEW  *InitData);
+BOOL STDCALL  NtGdiRestoreDC(HDC  hDC, INT  SavedDC);
+INT STDCALL  NtGdiSaveDC(HDC  hDC);
+HGDIOBJ STDCALL  NtGdiSelectObject(HDC  hDC, HGDIOBJ  hGDIObj);
+INT STDCALL  NtGdiSetBkMode(HDC  hDC, INT  backgroundMode);
+VOID STDCALL NtGdiSetDCState ( HDC hDC, HDC hDCSave );
+WORD STDCALL NtGdiSetHookFlags(HDC hDC, WORD Flags);
+INT STDCALL  NtGdiSetPolyFillMode(HDC  hDC, INT polyFillMode);
+INT STDCALL  NtGdiSetRelAbs(HDC  hDC, INT  relAbsMode);
+INT STDCALL  NtGdiSetROP2(HDC  hDC, INT  ROPmode);
+INT STDCALL  NtGdiSetStretchBltMode(HDC  hDC, INT  stretchBltMode);
+COLORREF STDCALL  NtGdiSetTextColor(HDC hDC, COLORREF color);
+
+#endif
similarity index 50%
rename from reactos/subsys/win32k/include/driver.h
rename to reactos/include/win32k/driver.h
index d6febdd..53c26a7 100644 (file)
-\r
-#ifndef __WIN32K_DRIVER_H\r
-#define __WIN32K_DRIVER_H\r
-\r
-#include <winddi.h>\r
-\r
-typedef BOOL (NTAPI *PGD_ENABLEDRIVER)(ULONG, ULONG, PDRVENABLEDATA);\r
-typedef DHPDEV (NTAPI *PGD_ENABLEPDEV)(DEVMODEW  *,\r
-                                 LPWSTR,\r
-                                 ULONG,\r
-                                 HSURF  *,\r
-                                 ULONG,\r
-                                 ULONG  *,\r
-                                 ULONG,\r
-                                 DEVINFO  *,\r
-                                 LPWSTR,\r
-                                 LPWSTR,\r
-                                 HANDLE);\r
-typedef VOID (NTAPI *PGD_COMPLETEPDEV)(DHPDEV, HDEV);\r
-typedef VOID (NTAPI *PGD_DISABLEPDEV)(DHPDEV); \r
-typedef HSURF (NTAPI *PGD_ENABLESURFACE)(DHPDEV);\r
-typedef VOID (NTAPI *PGD_DISABLESURFACE)(DHPDEV);\r
-typedef BOOL (NTAPI *PGD_ASSERTMODE)(DHPDEV, BOOL);\r
-typedef BOOL (NTAPI *PGD_OFFSET)(SURFOBJ*, LONG, LONG, FLONG);\r
-typedef BOOL (NTAPI *PGD_RESETPDEV)(DHPDEV, DHPDEV);\r
-typedef VOID (NTAPI *PGD_DISABLEDRIVER)(VOID);\r
-typedef HBITMAP (NTAPI *PGD_CREATEDEVICEBITMAP)(DHPDEV, SIZEL, ULONG); \r
-typedef VOID (NTAPI *PGD_DELETEDEVICEBITMAP)(DHSURF); \r
-typedef BOOL (NTAPI *PGD_ALPHABLEND)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*, RECTL*, BLENDOBJ*);\r
-typedef BOOL (NTAPI *PGD_REALIZEBRUSH)(BRUSHOBJ*, SURFOBJ*, SURFOBJ*, SURFOBJ*,\r
-                                 XLATEOBJ*, ULONG); \r
-typedef ULONG (NTAPI *PGD_DITHERCOLOR)(DHPDEV, ULONG, ULONG, PULONG); \r
-typedef BOOL (NTAPI *PGD_STROKEPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, XFORMOBJ*,\r
-                               BRUSHOBJ*, POINTL*, PLINEATTRS, MIX); \r
-typedef BOOL (NTAPI *PGD_FILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, BRUSHOBJ*,\r
-                             POINTL*, MIX, ULONG); \r
-typedef BOOL (NTAPI *PGD_STROKEANDFILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*,\r
-                                      XFORMOBJ*, BRUSHOBJ*, PLINEATTRS,\r
-                                      BRUSHOBJ*, POINTL*, MIX, ULONG); \r
-typedef BOOL (NTAPI *PGD_PAINT)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, POINTL*, MIX); \r
-typedef BOOL (NTAPI *PGD_BITBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,\r
-                           XLATEOBJ*, RECTL*, POINTL*, POINTL*, BRUSHOBJ*,\r
-                           POINTL*, ROP4); \r
-typedef BOOL (NTAPI *PGD_TRANSPARENTBLT)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,\r
-                                           RECTL*, RECTL*, ULONG, ULONG);\r
-typedef BOOL (NTAPI *PGD_COPYBITS)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,\r
-                             RECTL*, POINTL*); \r
-typedef BOOL (NTAPI *PGD_STRETCHBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,\r
-                               XLATEOBJ*, COLORADJUSTMENT*, POINTL*,\r
-                               RECTL*, RECTL*, POINTL*, ULONG);\r
-typedef BOOL (NTAPI *PGD_STRETCHBLTROP)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,\r
-                                          XLATEOBJ*, COLORADJUSTMENT*, POINTL*,\r
-                                          RECTL*, RECTL*, POINTL*, ULONG,\r
-                                          BRUSHOBJ*, DWORD);\r
-typedef BOOL (NTAPI *PGD_SETPALETTE)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG); \r
-typedef BOOL (NTAPI *PGD_TEXTOUT)(SURFOBJ*, STROBJ*, FONTOBJ*, CLIPOBJ*, RECTL*,\r
-                            RECTL*, BRUSHOBJ*, BRUSHOBJ*, POINTL*, MIX); \r
-typedef ULONG (NTAPI *PGD_ESCAPE)(SURFOBJ*, ULONG, ULONG, PVOID *, ULONG, PVOID *); \r
-typedef ULONG (NTAPI *PGD_DRAWESCAPE)(SURFOBJ*, ULONG, CLIPOBJ*, RECTL*, ULONG, \r
-                                PVOID *); \r
-typedef PIFIMETRICS (NTAPI *PGD_QUERYFONT)(DHPDEV, ULONG, ULONG, PULONG); \r
-typedef PVOID (NTAPI *PGD_QUERYFONTTREE)(DHPDEV, ULONG, ULONG, ULONG, PULONG); \r
-typedef LONG (NTAPI *PGD_QUERYFONTDATA)(DHPDEV, FONTOBJ*, ULONG, HGLYPH, GLYPHDATA*,\r
-                                  PVOID, ULONG); \r
-typedef ULONG (NTAPI *PGD_SETPOINTERSHAPE)(SURFOBJ*, SURFOBJ*, SURFOBJ*, XLATEOBJ*,\r
-                                     LONG, LONG, LONG, LONG, RECTL*, ULONG); \r
-typedef VOID (NTAPI *PGD_MOVEPOINTER)(SURFOBJ*, LONG, LONG, RECTL*); \r
-typedef BOOL (NTAPI *PGD_LINETO)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, LONG, LONG, LONG,\r
-                           LONG, RECTL*, MIX);\r
-typedef BOOL (NTAPI *PGD_SENDPAGE)(SURFOBJ*);\r
-typedef BOOL (NTAPI *PGD_STARTPAGE)(SURFOBJ*);\r
-typedef BOOL (NTAPI *PGD_ENDDOC)(SURFOBJ*, ULONG);\r
-typedef BOOL (NTAPI *PGD_STARTDOC)(SURFOBJ*, PWSTR, DWORD);\r
-typedef ULONG (NTAPI *PGD_GETGLYPHMODE)(DHPDEV, FONTOBJ*);\r
-typedef VOID (NTAPI *PGD_SYNCHRONIZE)(DHPDEV, RECTL*);\r
-typedef ULONG (NTAPI *PGD_SAVESCREENBITS)(SURFOBJ*, ULONG, ULONG, RECTL*);\r
-typedef ULONG (NTAPI *PGD_GETMODES)(HANDLE, ULONG, PDEVMODEW);\r
-typedef VOID (NTAPI *PGD_FREE)(PVOID, ULONG);\r
-typedef VOID (NTAPI *PGD_DESTROYFONT)(FONTOBJ*);\r
-typedef LONG (NTAPI *PGD_QUERYFONTCAPS)(ULONG, PULONG);\r
-typedef ULONG (NTAPI *PGD_LOADFONTFILE)(ULONG, PVOID, ULONG, ULONG);\r
-typedef BOOL (NTAPI *PGD_UNLOADFONTFILE)(ULONG);\r
-typedef ULONG (NTAPI *PGD_FONTMANAGEMENT)(SURFOBJ*, FONTOBJ*, ULONG, ULONG, PVOID,\r
-                                    ULONG, PVOID);\r
-typedef LONG (NTAPI *PGD_QUERYTRUETYPETABLE)(ULONG, ULONG, ULONG, PTRDIFF, ULONG,\r
-                                       PBYTE);\r
-typedef LONG (NTAPI *PGD_QUERYTRUETYPEOUTLINE)(DHPDEV, FONTOBJ*, HGLYPH, BOOL,\r
-                                         GLYPHDATA*, ULONG, TTPOLYGONHEADER*);\r
-typedef PVOID (NTAPI *PGD_GETTRUETYPEFILE)(ULONG, PULONG);\r
-typedef LONG (NTAPI *PGD_QUERYFONTFILE)(ULONG, ULONG, ULONG, PULONG);\r
-typedef BOOL (NTAPI *PGD_QUERYADVANCEWIDTHS)(DHPDEV, FONTOBJ*, ULONG, HGLYPH *,\r
-                                       PVOID *, ULONG);\r
-typedef BOOL (NTAPI *PGD_SETPIXELFORMAT)(SURFOBJ*, LONG, ULONG);\r
-typedef LONG (NTAPI *PGD_DESCRIBEPIXELFORMAT)(DHPDEV, LONG, ULONG,\r
-                                        PPIXELFORMATDESCRIPTOR);\r
-typedef BOOL (NTAPI *PGD_SWAPBUFFERS)(SURFOBJ*, PWNDOBJ);\r
-typedef BOOL (NTAPI *PGD_STARTBANDING)(SURFOBJ*, POINTL*);\r
-typedef BOOL (NTAPI *PGD_NEXTBAND)(SURFOBJ*, POINTL*);\r
-\r
-typedef BOOL (NTAPI *PGD_GETDIRECTDRAWINFO)(DHPDEV, PDD_HALINFO, PDWORD, VIDEOMEMORY*, PDWORD, PDWORD);\r
-typedef BOOL (NTAPI *PGD_ENABLEDIRECTDRAW)(DHPDEV, PDD_CALLBACKS, PDD_SURFACECALLBACKS, PDD_PALETTECALLBACKS);\r
-typedef VOID (NTAPI *PGD_DISABLEDIRECTDRAW)(DHPDEV);\r
-\r
-typedef LONG (NTAPI *PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR);\r
-\r
-typedef BOOL (NTAPI *PGD_GRADIENTFILL)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG);\r
-\r
-typedef VOID (NTAPI *PGD_SYNCHRONIZESURFACE)(SURFOBJ*, RECTL *, FLONG);\r
-\r
-typedef struct _DRIVER_FUNCTIONS\r
-{\r
-  PGD_ENABLEDRIVER  EnableDriver;\r
-  PGD_ENABLEPDEV  EnablePDEV;\r
-  PGD_COMPLETEPDEV  CompletePDEV;\r
-  PGD_DISABLEPDEV  DisablePDEV;\r
-  PGD_ENABLESURFACE  EnableSurface;\r
-  PGD_DISABLESURFACE  DisableSurface;\r
-  PGD_ASSERTMODE  AssertMode;\r
-  PGD_OFFSET  Offset;\r
-  PGD_RESETPDEV  ResetPDEV;\r
-  PGD_DISABLEDRIVER  DisableDriver;\r
-  PGD_CREATEDEVICEBITMAP  CreateDeviceBitmap;\r
-  PGD_DELETEDEVICEBITMAP  DeleteDeviceBitmap;\r
-  PGD_REALIZEBRUSH  RealizeBrush;\r
-  PGD_DITHERCOLOR  DitherColor;\r
-  PGD_STROKEPATH  StrokePath;\r
-  PGD_FILLPATH  FillPath;\r
-  PGD_STROKEANDFILLPATH  StrokeAndFillPath;\r
-  PGD_PAINT  Paint;\r
-  PGD_BITBLT  BitBlt;\r
-  PGD_TRANSPARENTBLT TransparentBlt;\r
-  PGD_COPYBITS  CopyBits;\r
-  PGD_STRETCHBLT  StretchBlt;\r
-  PGD_STRETCHBLTROP  StretchBltROP;\r
-  PGD_SETPALETTE  SetPalette;\r
-  PGD_TEXTOUT  TextOut;\r
-  PGD_ESCAPE  Escape;\r
-  PGD_DRAWESCAPE  DrawEscape;\r
-  PGD_QUERYFONT  QueryFont;\r
-  PGD_QUERYFONTTREE  QueryFontTree;\r
-  PGD_QUERYFONTDATA  QueryFontData;\r
-  PGD_SETPOINTERSHAPE  SetPointerShape;\r
-  PGD_MOVEPOINTER  MovePointer;\r
-  PGD_LINETO  LineTo;\r
-  PGD_SENDPAGE  SendPage;\r
-  PGD_STARTPAGE  StartPage;\r
-  PGD_ENDDOC  EndDoc;\r
-  PGD_STARTDOC  StartDoc;\r
-  PGD_GETGLYPHMODE  GetGlyphMode;\r
-  PGD_SYNCHRONIZE  Synchronize;\r
-  PGD_SAVESCREENBITS  SaveScreenBits;\r
-  PGD_GETMODES  GetModes;\r
-  PGD_FREE  Free;\r
-  PGD_DESTROYFONT  DestroyFont;\r
-  PGD_QUERYFONTCAPS  QueryFontCaps;\r
-  PGD_LOADFONTFILE  LoadFontFile;\r
-  PGD_UNLOADFONTFILE  UnloadFontFile;\r
-  PGD_FONTMANAGEMENT  FontManagement;\r
-  PGD_QUERYTRUETYPETABLE  QueryTrueTypeTable;\r
-  PGD_QUERYTRUETYPEOUTLINE  QueryTrueTypeOutline;\r
-  PGD_GETTRUETYPEFILE  GetTrueTypeFile;\r
-  PGD_QUERYFONTFILE  QueryFontFile;\r
-  PGD_QUERYADVANCEWIDTHS  QueryAdvanceWidths;\r
-  PGD_SETPIXELFORMAT  SetPixelFormat;\r
-  PGD_DESCRIBEPIXELFORMAT  DescribePixelFormat;\r
-  PGD_SWAPBUFFERS  SwapBuffers;\r
-  PGD_STARTBANDING  StartBanding;\r
-  PGD_NEXTBAND  NextBand;\r
-  PGD_GETDIRECTDRAWINFO  GetDirectDrawInfo;\r
-  PGD_ENABLEDIRECTDRAW  EnableDirectDraw;\r
-  PGD_DISABLEDIRECTDRAW  DisableDirectDraw;\r
-  PGD_QUERYSPOOLTYPE  QuerySpoolType;\r
-  PGD_GRADIENTFILL  GradientFill;\r
-  PGD_SYNCHRONIZESURFACE SynchronizeSurface;\r
-  PGD_ALPHABLEND AlphaBlend;\r
-} DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;\r
-\r
-BOOL  DRIVER_RegisterDriver(LPCWSTR  Name, PGD_ENABLEDRIVER  EnableDriver);\r
-PGD_ENABLEDRIVER  DRIVER_FindDDIDriver(LPCWSTR  Name);\r
-PFILE_OBJECT DRIVER_FindMPDriver(ULONG  DisplayNumber);\r
-BOOL  DRIVER_BuildDDIFunctions(PDRVENABLEDATA  DED, \r
-                               PDRIVER_FUNCTIONS  DF);\r
-BOOL  DRIVER_UnregisterDriver(LPCWSTR  Name);\r
-INT  DRIVER_ReferenceDriver (LPCWSTR  Name);\r
-INT  DRIVER_UnreferenceDriver (LPCWSTR  Name);\r
-\r
-#endif\r
-\r
+
+#ifndef __WIN32K_DRIVER_H
+#define __WIN32K_DRIVER_H
+
+#include <winddi.h>
+
+typedef BOOL (STDCALL *PGD_ENABLEDRIVER)(ULONG, ULONG, PDRVENABLEDATA);
+typedef DHPDEV (STDCALL *PGD_ENABLEPDEV)(DEVMODEW  *,
+                                 LPWSTR,
+                                 ULONG,
+                                 HSURF  *,
+                                 ULONG,
+                                 ULONG  *,
+                                 ULONG,
+                                 DEVINFO  *,
+                                 LPWSTR,
+                                 LPWSTR,
+                                 HANDLE);
+typedef VOID (STDCALL *PGD_COMPLETEPDEV)(DHPDEV, HDEV);
+typedef VOID (STDCALL *PGD_DISABLEPDEV)(DHPDEV); 
+typedef HSURF (STDCALL *PGD_ENABLESURFACE)(DHPDEV);
+typedef VOID (STDCALL *PGD_DISABLESURFACE)(DHPDEV);
+typedef BOOL (STDCALL *PGD_ASSERTMODE)(DHPDEV, BOOL);
+typedef BOOL (STDCALL *PGD_OFFSET)(SURFOBJ*, LONG, LONG, FLONG);
+typedef BOOL (STDCALL *PGD_RESETPDEV)(DHPDEV, DHPDEV);
+typedef VOID (STDCALL *PGD_DISABLEDRIVER)(VOID);
+typedef HBITMAP (STDCALL *PGD_CREATEDEVICEBITMAP)(DHPDEV, SIZEL, ULONG); 
+typedef VOID (STDCALL *PGD_DELETEDEVICEBITMAP)(DHSURF); 
+typedef BOOL (STDCALL *PGD_ALPHABLEND)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*, RECTL*, RECTL*, BLENDOBJ*);
+typedef BOOL (STDCALL *PGD_REALIZEBRUSH)(BRUSHOBJ*, SURFOBJ*, SURFOBJ*, SURFOBJ*,
+                                 XLATEOBJ*, ULONG); 
+typedef ULONG (STDCALL *PGD_DITHERCOLOR)(DHPDEV, ULONG, ULONG, PULONG); 
+typedef BOOL (STDCALL *PGD_STROKEPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, XFORMOBJ*,
+                               BRUSHOBJ*, POINTL*, PLINEATTRS, MIX); 
+typedef BOOL (STDCALL *PGD_FILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*, BRUSHOBJ*,
+                             POINTL*, MIX, ULONG); 
+typedef BOOL (STDCALL *PGD_STROKEANDFILLPATH)(SURFOBJ*, PATHOBJ*, CLIPOBJ*,
+                                      XFORMOBJ*, BRUSHOBJ*, PLINEATTRS,
+                                      BRUSHOBJ*, POINTL*, MIX, ULONG); 
+typedef BOOL (STDCALL *PGD_PAINT)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, POINTL*, MIX); 
+typedef BOOL (STDCALL *PGD_BITBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
+                           XLATEOBJ*, RECTL*, POINTL*, POINTL*, BRUSHOBJ*,
+                           POINTL*, ROP4); 
+typedef BOOL (STDCALL *PGD_TRANSPARENTBLT)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,
+                                           RECTL*, RECTL*, ULONG, ULONG);
+typedef BOOL (STDCALL *PGD_COPYBITS)(SURFOBJ*, SURFOBJ*, CLIPOBJ*, XLATEOBJ*,
+                             RECTL*, POINTL*); 
+typedef BOOL (STDCALL *PGD_STRETCHBLT)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
+                               XLATEOBJ*, COLORADJUSTMENT*, POINTL*,
+                               RECTL*, RECTL*, POINTL*, ULONG);
+typedef BOOL (STDCALL *PGD_STRETCHBLTROP)(SURFOBJ*, SURFOBJ*, SURFOBJ*, CLIPOBJ*,
+                                          XLATEOBJ*, COLORADJUSTMENT*, POINTL*,
+                                          RECTL*, RECTL*, POINTL*, ULONG,
+                                          BRUSHOBJ*, DWORD);
+typedef BOOL (STDCALL *PGD_SETPALETTE)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG); 
+typedef BOOL (STDCALL *PGD_TEXTOUT)(SURFOBJ*, STROBJ*, FONTOBJ*, CLIPOBJ*, RECTL*,
+                            RECTL*, BRUSHOBJ*, BRUSHOBJ*, POINTL*, MIX); 
+typedef ULONG (STDCALL *PGD_ESCAPE)(SURFOBJ*, ULONG, ULONG, PVOID *, ULONG, PVOID *); 
+typedef ULONG (STDCALL *PGD_DRAWESCAPE)(SURFOBJ*, ULONG, CLIPOBJ*, RECTL*, ULONG, 
+                                PVOID *); 
+typedef PIFIMETRICS (STDCALL *PGD_QUERYFONT)(DHPDEV, ULONG, ULONG, PULONG); 
+typedef PVOID (STDCALL *PGD_QUERYFONTTREE)(DHPDEV, ULONG, ULONG, ULONG, PULONG); 
+typedef LONG (STDCALL *PGD_QUERYFONTDATA)(DHPDEV, FONTOBJ*, ULONG, HGLYPH, GLYPHDATA*,
+                                  PVOID, ULONG); 
+typedef ULONG (STDCALL *PGD_SETPOINTERSHAPE)(SURFOBJ*, SURFOBJ*, SURFOBJ*, XLATEOBJ*,
+                                     LONG, LONG, LONG, LONG, RECTL*, ULONG); 
+typedef VOID (STDCALL *PGD_MOVEPOINTER)(SURFOBJ*, LONG, LONG, RECTL*); 
+typedef BOOL (STDCALL *PGD_LINETO)(SURFOBJ*, CLIPOBJ*, BRUSHOBJ*, LONG, LONG, LONG,
+                           LONG, RECTL*, MIX);
+typedef BOOL (STDCALL *PGD_SENDPAGE)(SURFOBJ*);
+typedef BOOL (STDCALL *PGD_STARTPAGE)(SURFOBJ*);
+typedef BOOL (STDCALL *PGD_ENDDOC)(SURFOBJ*, ULONG);
+typedef BOOL (STDCALL *PGD_STARTDOC)(SURFOBJ*, PWSTR, DWORD);
+typedef ULONG (STDCALL *PGD_GETGLYPHMODE)(DHPDEV, FONTOBJ*);
+typedef VOID (STDCALL *PGD_SYNCHRONIZE)(DHPDEV, RECTL*);
+typedef ULONG (STDCALL *PGD_SAVESCREENBITS)(SURFOBJ*, ULONG, ULONG, RECTL*);
+typedef ULONG (STDCALL *PGD_GETMODES)(HANDLE, ULONG, PDEVMODEW);
+typedef VOID (STDCALL *PGD_FREE)(PVOID, ULONG);
+typedef VOID (STDCALL *PGD_DESTROYFONT)(FONTOBJ*);
+typedef LONG (STDCALL *PGD_QUERYFONTCAPS)(ULONG, PULONG);
+typedef ULONG (STDCALL *PGD_LOADFONTFILE)(ULONG, PVOID, ULONG, ULONG);
+typedef BOOL (STDCALL *PGD_UNLOADFONTFILE)(ULONG);
+typedef ULONG (STDCALL *PGD_FONTMANAGEMENT)(SURFOBJ*, FONTOBJ*, ULONG, ULONG, PVOID,
+                                    ULONG, PVOID);
+typedef LONG (STDCALL *PGD_QUERYTRUETYPETABLE)(ULONG, ULONG, ULONG, PTRDIFF, ULONG,
+                                       PBYTE);
+typedef LONG (STDCALL *PGD_QUERYTRUETYPEOUTLINE)(DHPDEV, FONTOBJ*, HGLYPH, BOOL,
+                                         GLYPHDATA*, ULONG, TTPOLYGONHEADER*);
+typedef PVOID (STDCALL *PGD_GETTRUETYPEFILE)(ULONG, PULONG);
+typedef LONG (STDCALL *PGD_QUERYFONTFILE)(ULONG, ULONG, ULONG, PULONG);
+typedef BOOL (STDCALL *PGD_QUERYADVANCEWIDTHS)(DHPDEV, FONTOBJ*, ULONG, HGLYPH *,
+                                       PVOID *, ULONG);
+typedef BOOL (STDCALL *PGD_SETPIXELFORMAT)(SURFOBJ*, LONG, ULONG);
+typedef LONG (STDCALL *PGD_DESCRIBEPIXELFORMAT)(DHPDEV, LONG, ULONG,
+                                        PPIXELFORMATDESCRIPTOR);
+typedef BOOL (STDCALL *PGD_SWAPBUFFERS)(SURFOBJ*, PWNDOBJ);
+typedef BOOL (STDCALL *PGD_STARTBANDING)(SURFOBJ*, POINTL*);
+typedef BOOL (STDCALL *PGD_NEXTBAND)(SURFOBJ*, POINTL*);
+
+typedef BOOL (STDCALL *PGD_GETDIRECTDRAWINFO)(DHPDEV, PDD_HALINFO, PDWORD, VIDEOMEMORY*, PDWORD, PDWORD);
+typedef BOOL (STDCALL *PGD_ENABLEDIRECTDRAW)(DHPDEV, PDD_CALLBACKS, PDD_SURFACECALLBACKS, PDD_PALETTECALLBACKS);
+typedef VOID (STDCALL *PGD_DISABLEDIRECTDRAW)(DHPDEV);
+
+typedef LONG (STDCALL *PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR);
+
+typedef BOOL (STDCALL *PGD_GRADIENTFILL)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG);
+
+typedef VOID (STDCALL *PGD_SYNCHRONIZESURFACE)(SURFOBJ*, RECTL *, FLONG);
+
+typedef struct _DRIVER_FUNCTIONS
+{
+  PGD_ENABLEDRIVER  EnableDriver;
+  PGD_ENABLEPDEV  EnablePDEV;
+  PGD_COMPLETEPDEV  CompletePDEV;
+  PGD_DISABLEPDEV  DisablePDEV;
+  PGD_ENABLESURFACE  EnableSurface;
+  PGD_DISABLESURFACE  DisableSurface;
+  PGD_ASSERTMODE  AssertMode;
+  PGD_OFFSET  Offset;
+  PGD_RESETPDEV  ResetPDEV;
+  PGD_DISABLEDRIVER  DisableDriver;
+  PGD_CREATEDEVICEBITMAP  CreateDeviceBitmap;
+  PGD_DELETEDEVICEBITMAP  DeleteDeviceBitmap;
+  PGD_REALIZEBRUSH  RealizeBrush;
+  PGD_DITHERCOLOR  DitherColor;
+  PGD_STROKEPATH  StrokePath;
+  PGD_FILLPATH  FillPath;
+  PGD_STROKEANDFILLPATH  StrokeAndFillPath;
+  PGD_PAINT  Paint;
+  PGD_BITBLT  BitBlt;
+  PGD_TRANSPARENTBLT TransparentBlt;
+  PGD_COPYBITS  CopyBits;
+  PGD_STRETCHBLT  StretchBlt;
+  PGD_STRETCHBLTROP  StretchBltROP;
+  PGD_SETPALETTE  SetPalette;
+  PGD_TEXTOUT  TextOut;
+  PGD_ESCAPE  Escape;
+  PGD_DRAWESCAPE  DrawEscape;
+  PGD_QUERYFONT  QueryFont;
+  PGD_QUERYFONTTREE  QueryFontTree;
+  PGD_QUERYFONTDATA  QueryFontData;
+  PGD_SETPOINTERSHAPE  SetPointerShape;
+  PGD_MOVEPOINTER  MovePointer;
+  PGD_LINETO  LineTo;
+  PGD_SENDPAGE  SendPage;
+  PGD_STARTPAGE  StartPage;
+  PGD_ENDDOC  EndDoc;
+  PGD_STARTDOC  StartDoc;
+  PGD_GETGLYPHMODE  GetGlyphMode;
+  PGD_SYNCHRONIZE  Synchronize;
+  PGD_SAVESCREENBITS  SaveScreenBits;
+  PGD_GETMODES  GetModes;
+  PGD_FREE  Free;
+  PGD_DESTROYFONT  DestroyFont;
+  PGD_QUERYFONTCAPS  QueryFontCaps;
+  PGD_LOADFONTFILE  LoadFontFile;
+  PGD_UNLOADFONTFILE  UnloadFontFile;
+  PGD_FONTMANAGEMENT  FontManagement;
+  PGD_QUERYTRUETYPETABLE  QueryTrueTypeTable;
+  PGD_QUERYTRUETYPEOUTLINE  QueryTrueTypeOutline;
+  PGD_GETTRUETYPEFILE  GetTrueTypeFile;
+  PGD_QUERYFONTFILE  QueryFontFile;
+  PGD_QUERYADVANCEWIDTHS  QueryAdvanceWidths;
+  PGD_SETPIXELFORMAT  SetPixelFormat;
+  PGD_DESCRIBEPIXELFORMAT  DescribePixelFormat;
+  PGD_SWAPBUFFERS  SwapBuffers;
+  PGD_STARTBANDING  StartBanding;
+  PGD_NEXTBAND  NextBand;
+  PGD_GETDIRECTDRAWINFO  GetDirectDrawInfo;
+  PGD_ENABLEDIRECTDRAW  EnableDirectDraw;
+  PGD_DISABLEDIRECTDRAW  DisableDirectDraw;
+  PGD_QUERYSPOOLTYPE  QuerySpoolType;
+  PGD_GRADIENTFILL  GradientFill;
+  PGD_SYNCHRONIZESURFACE SynchronizeSurface;
+  PGD_ALPHABLEND AlphaBlend;
+} DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
+
+#ifndef NTOS_MODE_USER
+
+BOOL  DRIVER_RegisterDriver(LPCWSTR  Name, PGD_ENABLEDRIVER  EnableDriver);
+PGD_ENABLEDRIVER  DRIVER_FindDDIDriver(LPCWSTR  Name);
+PFILE_OBJECT DRIVER_FindMPDriver(ULONG  DisplayNumber);
+BOOL  DRIVER_BuildDDIFunctions(PDRVENABLEDATA  DED, 
+                               PDRIVER_FUNCTIONS  DF);
+BOOL  DRIVER_UnregisterDriver(LPCWSTR  Name);
+INT  DRIVER_ReferenceDriver (LPCWSTR  Name);
+INT  DRIVER_UnreferenceDriver (LPCWSTR  Name);
+
+#endif
+
+#endif
+
diff --git a/reactos/include/win32k/fillshap.h b/reactos/include/win32k/fillshap.h
new file mode 100644 (file)
index 0000000..8a5506b
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef __WIN32K_FILLSHAP_H
+#define __WIN32K_FILLSHAP_H
+
+BOOL
+STDCALL
+NtGdiChord(HDC  hDC,
+                int  LeftRect,
+                int  TopRect,
+                int  RightRect,
+                int  BottomRect,
+                int  XRadial1,
+                int  YRadial1,
+                int  XRadial2,
+                int  YRadial2);
+
+BOOL
+STDCALL
+NtGdiEllipse(HDC  hDC,
+                  int  LeftRect,
+                  int  TopRect,
+                  int  RightRect,
+                  int  BottomRect);
+
+BOOL
+STDCALL
+NtGdiPie(HDC  hDC,
+              int  LeftRect,
+              int  TopRect,
+              int  RightRect,
+              int  BottomRect,
+              int  XRadial1,
+              int  YRadial1,
+              int  XRadial2,
+              int  YRadial2);
+
+BOOL
+STDCALL
+NtGdiPolygon(HDC  hDC,
+                  CONST PPOINT  Points,
+                  int  Count);
+
+BOOL
+STDCALL
+NtGdiPolyPolygon(HDC  hDC,
+                      CONST LPPOINT  Points,
+                      CONST LPINT  PolyCounts,
+                      int  Count);
+
+BOOL
+STDCALL
+NtGdiRectangle(HDC  hDC,
+                    int  LeftRect,
+                    int  TopRect,
+                    int  RightRect,
+                    int  BottomRect);
+
+BOOL
+STDCALL
+NtGdiRoundRect(HDC  hDC,
+                    int  LeftRect,
+                    int  TopRect,  
+                    int  RightRect, 
+                    int  BottomRect,
+                    int  Width,
+                    int  Height);
+
+#endif
+
similarity index 87%
rename from reactos/subsys/win32k/include/gdifloat.h
rename to reactos/include/win32k/float.h
index abc50f8..84f9968 100644 (file)
-#ifndef __WIN32K_FLOAT_H\r
-#define __WIN32K_FLOAT_H\r
-\r
-#include "dc.h"\r
-#include "math.h"\r
-#include <ft2build.h>\r
-#include FT_FREETYPE_H\r
-\r
-typedef struct tagFLOAT_POINT\r
-{\r
-   FLOAT x, y;\r
-} FLOAT_POINT;\r
-\r
-/* Rounds a floating point number to integer. The world-to-viewport\r
- * transformation process is done in floating point internally. This function\r
- * is then used to round these coordinates to integer values.\r
- */\r
-static inline INT GDI_ROUND(FLOAT val)\r
-{\r
-   return (int)floor(val + 0.5);\r
-}\r
-\r
-/* Performs a world-to-viewport transformation on the specified point (which\r
- * is in floating point format).\r
- */\r
-static inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)\r
-{\r
-    FLOAT x, y;\r
-\r
-    /* Perform the transformation */\r
-    x = point->x;\r
-    y = point->y;\r
-    point->x = x * dc->w.xformWorld2Vport.eM11 +\r
-               y * dc->w.xformWorld2Vport.eM21 +\r
-              dc->w.xformWorld2Vport.eDx;\r
-    point->y = x * dc->w.xformWorld2Vport.eM12 +\r
-               y * dc->w.xformWorld2Vport.eM22 +\r
-              dc->w.xformWorld2Vport.eDy;\r
-}\r
-\r
-/* Performs a viewport-to-world transformation on the specified point (which\r
- * is in integer format). Returns TRUE if successful, else FALSE.\r
- */\r
-#if 0\r
-static inline BOOL INTERNAL_DPTOLP(DC *dc, LPPOINT point)\r
-{\r
-    FLOAT_POINT floatPoint;\r
-\r
-    /* Perform operation with floating point */\r
-    floatPoint.x=(FLOAT)point->x;\r
-    floatPoint.y=(FLOAT)point->y;\r
-    if (!INTERNAL_DPTOLP_FLOAT(dc, &floatPoint))\r
-        return FALSE;\r
-\r
-    /* Round to integers */\r
-    point->x = GDI_ROUND(floatPoint.x);\r
-    point->y = GDI_ROUND(floatPoint.y);\r
-\r
-    return TRUE;\r
-}\r
-\r
-/* Performs a world-to-viewport transformation on the specified point (which\r
- * is in integer format).\r
- */\r
-static inline void INTERNAL_LPTODP(DC *dc, LPPOINT point)\r
-{\r
-    FLOAT_POINT floatPoint;\r
-\r
-    /* Perform operation with floating point */\r
-    floatPoint.x=(FLOAT)point->x;\r
-    floatPoint.y=(FLOAT)point->y;\r
-    INTERNAL_LPTODP_FLOAT(dc, &floatPoint);\r
-\r
-    /* Round to integers */\r
-    point->x = GDI_ROUND(floatPoint.x);\r
-    point->y = GDI_ROUND(floatPoint.y);\r
-}\r
-\r
-#endif\r
-\r
-#define MulDiv( x, y, z ) EngMulDiv( x, y, z )\r
-\r
-#define XDPTOLP(dc,x) \\r
-    (MulDiv(((x)-(dc)->vportOrgX), (dc)->wndExtX, (dc)->vportExtX) + (dc)->wndOrgX)\r
-#define YDPTOLP(dc,y) \\r
-    (MulDiv(((y)-(dc)->vportOrgY), (dc)->wndExtY, (dc)->vportExtY) + (dc)->wndOrgY)\r
-#define XLPTODP(dc,x) \\r
-    (MulDiv(((x)-(dc)->wndOrgX), (dc)->vportExtX, (dc)->wndExtX) + (dc)->vportOrgX)\r
-#define YLPTODP(dc,y) \\r
-    (MulDiv(((y)-(dc)->wndOrgY), (dc)->vportExtY, (dc)->wndExtY) + (dc)->vportOrgY)\r
-\r
-  /* Device <-> logical size conversion */\r
-\r
-#define XDSTOLS(dc,x) \\r
-    MulDiv((x), (dc)->wndExtX, (dc)->vportExtX)\r
-#define YDSTOLS(dc,y) \\r
-    MulDiv((y), (dc)->wndExtY, (dc)->vportExtY)\r
-#define XLSTODS(dc,x) \\r
-    MulDiv((x), (dc)->vportExtX, (dc)->wndExtX)\r
-#define YLSTODS(dc,y) \\r
-    MulDiv((y), (dc)->vportExtY, (dc)->wndExtY)\r
-\r
-#endif\r
+#ifndef __WIN32K_FLOAT_H
+#define __WIN32K_FLOAT_H
+
+#include <win32k/math.h>
+#include <win32k/dc.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+typedef struct tagFLOAT_POINT
+{
+   FLOAT x, y;
+} FLOAT_POINT;
+
+/* Rounds a floating point number to integer. The world-to-viewport
+ * transformation process is done in floating point internally. This function
+ * is then used to round these coordinates to integer values.
+ */
+static __inline INT GDI_ROUND(FLOAT val)
+{
+   return (int)floor(val + 0.5);
+}
+
+/* Performs a world-to-viewport transformation on the specified point (which
+ * is in floating point format).
+ */
+static __inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)
+{
+    FLOAT x, y;
+
+    /* Perform the transformation */
+    x = point->x;
+    y = point->y;
+    point->x = x * dc->w.xformWorld2Vport.eM11 +
+               y * dc->w.xformWorld2Vport.eM21 +
+              dc->w.xformWorld2Vport.eDx;
+    point->y = x * dc->w.xformWorld2Vport.eM12 +
+               y * dc->w.xformWorld2Vport.eM22 +
+              dc->w.xformWorld2Vport.eDy;
+}
+
+/* Performs a viewport-to-world transformation on the specified point (which
+ * is in integer format). Returns TRUE if successful, else FALSE.
+ */
+#if 0
+static __inline BOOL INTERNAL_DPTOLP(DC *dc, LPPOINT point)
+{
+    FLOAT_POINT floatPoint;
+
+    /* Perform operation with floating point */
+    floatPoint.x=(FLOAT)point->x;
+    floatPoint.y=(FLOAT)point->y;
+    if (!INTERNAL_DPTOLP_FLOAT(dc, &floatPoint))
+        return FALSE;
+
+    /* Round to integers */
+    point->x = GDI_ROUND(floatPoint.x);
+    point->y = GDI_ROUND(floatPoint.y);
+
+    return TRUE;
+}
+
+/* Performs a world-to-viewport transformation on the specified point (which
+ * is in integer format).
+ */
+static __inline void INTERNAL_LPTODP(DC *dc, LPPOINT point)
+{
+    FLOAT_POINT floatPoint;
+
+    /* Perform operation with floating point */
+    floatPoint.x=(FLOAT)point->x;
+    floatPoint.y=(FLOAT)point->y;
+    INTERNAL_LPTODP_FLOAT(dc, &floatPoint);
+
+    /* Round to integers */
+    point->x = GDI_ROUND(floatPoint.x);
+    point->y = GDI_ROUND(floatPoint.y);
+}
+
+#endif
+
+#define MulDiv( x, y, z ) EngMulDiv( x, y, z )
+
+#define XDPTOLP(dc,x) \
+    (MulDiv(((x)-(dc)->vportOrgX), (dc)->wndExtX, (dc)->vportExtX) + (dc)->wndOrgX)
+#define YDPTOLP(dc,y) \
+    (MulDiv(((y)-(dc)->vportOrgY), (dc)->wndExtY, (dc)->vportExtY) + (dc)->wndOrgY)
+#define XLPTODP(dc,x) \
+    (MulDiv(((x)-(dc)->wndOrgX), (dc)->vportExtX, (dc)->wndExtX) + (dc)->vportOrgX)
+#define YLPTODP(dc,y) \
+    (MulDiv(((y)-(dc)->wndOrgY), (dc)->vportExtY, (dc)->wndExtY) + (dc)->vportOrgY)
+
+  /* Device <-> logical size conversion */
+
+#define XDSTOLS(dc,x) \
+    MulDiv((x), (dc)->wndExtX, (dc)->vportExtX)
+#define YDSTOLS(dc,y) \
+    MulDiv((y), (dc)->wndExtY, (dc)->vportExtY)
+#define XLSTODS(dc,x) \
+    MulDiv((x), (dc)->vportExtX, (dc)->wndExtX)
+#define YLSTODS(dc,y) \
+    MulDiv((y), (dc)->vportExtY, (dc)->wndExtY)
+
+#endif
diff --git a/reactos/include/win32k/font.h b/reactos/include/win32k/font.h
new file mode 100644 (file)
index 0000000..8382a14
--- /dev/null
@@ -0,0 +1,25 @@
+/* $Id$
+ *
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS system libraries
+ * FILE:            include/win32k/font.h
+ * PURPOSE:         GDI32/Win32k font interface
+ * PROGRAMMER:
+ *
+ */
+
+#ifndef WIN32K_FONT_H_INCLUDED
+#define WIN32K_FONT_H_INCLUDED
+
+typedef struct tagFONTFAMILYINFO
+{
+  ENUMLOGFONTEXW EnumLogFontEx;
+  NEWTEXTMETRICEXW NewTextMetricEx;
+  DWORD FontType;
+} FONTFAMILYINFO, *PFONTFAMILYINFO;
+
+int STDCALL NtGdiGetFontFamilyInfo(HDC Dc, LPLOGFONTW LogFont, PFONTFAMILYINFO Info, DWORD Size);
+BOOL STDCALL NtGdiTranslateCharsetInfo(PDWORD Src, LPCHARSETINFO CSI, DWORD Flags);
+DWORD STDCALL NtGdiGetFontData(HDC,DWORD,DWORD,LPVOID,DWORD);
+
+#endif /* WIN32K_FONT_H_INCLUDED */
similarity index 51%
rename from reactos/subsys/win32k/include/gdiobj.h
rename to reactos/include/win32k/gdiobj.h
index 4772206..aa8019e 100644 (file)
-/*\r
- *  GDI object common header definition\r
- *\r
- */\r
-\r
-#ifndef __WIN32K_GDIOBJ_H\r
-#define __WIN32K_GDIOBJ_H\r
-\r
-/* Public GDI Object/Handle definitions */\r
-#include <win32k/ntgdihdl.h>\r
-\r
-typedef PVOID PGDIOBJ;\r
-\r
-typedef BOOL (INTERNAL_CALL *GDICLEANUPPROC)(PVOID ObjectBody);\r
-\r
-/*!\r
- * GDI object header. This is a part of any GDI object\r
-*/\r
-typedef struct _GDIOBJHDR\r
-{\r
-  PETHREAD LockingThread; /* only assigned if a thread is holding the lock! */\r
-  ULONG Locks;\r
-#ifdef GDI_DEBUG\r
-  const char* createdfile;\r
-  int createdline;\r
-  const char* lockfile;\r
-  int lockline;\r
-#endif\r
-} GDIOBJHDR, *PGDIOBJHDR;\r
-\r
-BOOL    INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);\r
-void    INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);\r
-void    INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);\r
-BOOL    INTERNAL_CALL GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj);\r
-VOID    INTERNAL_CALL GDIOBJ_UnlockObjByPtr(PGDIOBJ Object);\r
-\r
-#define GDIOBJ_GetObjectType(Handle) \\r
-  GDI_HANDLE_GET_TYPE(Handle)\r
-\r
-#ifdef GDI_DEBUG\r
-\r
-/* a couple macros for debugging GDIOBJ locking */\r
-#define GDIOBJ_AllocObj(ty) GDIOBJ_AllocObjDbg(__FILE__,__LINE__,ty)\r
-#define GDIOBJ_FreeObj(obj,ty) GDIOBJ_FreeObjDbg(__FILE__,__LINE__,obj,ty)\r
-#define GDIOBJ_LockObj(obj,ty) GDIOBJ_LockObjDbg(__FILE__,__LINE__,obj,ty)\r
-#define GDIOBJ_ShareLockObj(obj,ty) GDIOBJ_ShareLockObjDbg(__FILE__,__LINE__,obj,ty)\r
-\r
-HGDIOBJ INTERNAL_CALL GDIOBJ_AllocObjDbg(const char* file, int line, ULONG ObjectType);\r
-BOOL    INTERNAL_CALL GDIOBJ_FreeObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);\r
-PGDIOBJ INTERNAL_CALL GDIOBJ_LockObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);\r
-PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);\r
-\r
-#else /* !GDI_DEBUG */\r
-\r
-HGDIOBJ INTERNAL_CALL GDIOBJ_AllocObj(ULONG ObjectType);\r
-BOOL    INTERNAL_CALL GDIOBJ_FreeObj (HGDIOBJ hObj, DWORD ObjectType);\r
-PGDIOBJ INTERNAL_CALL GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType);\r
-PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj (HGDIOBJ hObj, DWORD ObjectType);\r
-\r
-#endif /* GDI_DEBUG */\r
-\r
-PVOID   INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);\r
-\r
-#define GDIOBJFLAG_DEFAULT     (0x0)\r
-#define GDIOBJFLAG_IGNOREPID   (0x1)\r
-#define GDIOBJFLAG_IGNORELOCK  (0x2)\r
-\r
-#endif\r
+/*
+ *  GDI object common header definition
+ *
+ */
+
+#ifndef __WIN32K_GDIOBJ_H
+#define __WIN32K_GDIOBJ_H
+
+/* base address where the handle table is mapped to */
+#define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000)
+
+/* gdi handle table can hold 0x4000 handles */
+#define GDI_HANDLE_COUNT 0x4000
+
+#define GDI_GLOBAL_PROCESS (0x0)
+
+#define GDI_HANDLE_INDEX_MASK (GDI_HANDLE_COUNT - 1)
+#define GDI_HANDLE_TYPE_MASK  0x007f0000
+#define GDI_HANDLE_STOCK_MASK 0x00800000
+#define GDI_HANDLE_REUSE_MASK 0xff000000
+
+#define GDI_HANDLE_REUSECNT_SHIFT 24
+
+#define GDI_HANDLE_CREATE(i, t)    ((HANDLE)(((i) & GDI_HANDLE_INDEX_MASK) | ((t) & GDI_HANDLE_TYPE_MASK)))
+#define GDI_HANDLE_GET_INDEX(h)    (((ULONG_PTR)(h)) & GDI_HANDLE_INDEX_MASK)
+#define GDI_HANDLE_GET_TYPE(h)     (((ULONG_PTR)(h)) & GDI_HANDLE_TYPE_MASK)
+#define GDI_HANDLE_IS_TYPE(h, t)   ((t) == (((ULONG_PTR)(h)) & GDI_HANDLE_TYPE_MASK))
+#define GDI_HANDLE_IS_STOCKOBJ(h)  (0 != (((ULONG_PTR)(h)) & GDI_HANDLE_STOCK_MASK))
+#define GDI_HANDLE_SET_STOCKOBJ(h) ((h) = (HANDLE)(((ULONG_PTR)(h)) | GDI_HANDLE_STOCK_MASK))
+
+
+/*! \defgroup GDI object types
+ *
+ *  GDI object types
+ *
+ */
+/*@{*/
+#define GDI_OBJECT_TYPE_DC          0x00010000
+#define GDI_OBJECT_TYPE_REGION      0x00040000
+#define GDI_OBJECT_TYPE_BITMAP      0x00050000
+#define GDI_OBJECT_TYPE_PALETTE     0x00080000
+#define GDI_OBJECT_TYPE_FONT        0x000a0000
+#define GDI_OBJECT_TYPE_BRUSH       0x00100000
+#define GDI_OBJECT_TYPE_EMF         0x00210000
+#define GDI_OBJECT_TYPE_PEN         0x00300000
+#define GDI_OBJECT_TYPE_EXTPEN      0x00500000
+/* Following object types made up for ROS */
+#define GDI_OBJECT_TYPE_METADC      0x00710000
+#define GDI_OBJECT_TYPE_METAFILE    0x00720000
+#define GDI_OBJECT_TYPE_ENHMETAFILE 0x00730000
+#define GDI_OBJECT_TYPE_ENHMETADC   0x00740000
+#define GDI_OBJECT_TYPE_MEMDC       0x00750000
+#define GDI_OBJECT_TYPE_DCE         0x00770000
+#define GDI_OBJECT_TYPE_DONTCARE    0x007f0000
+/** Not really an object type. Forces GDI_FreeObj to be silent. */
+#define GDI_OBJECT_TYPE_SILENT      0x80000000
+/*@}*/
+
+typedef PVOID PGDIOBJ;
+
+#ifndef NTOS_MODE_USER
+typedef BOOL (INTERNAL_CALL *GDICLEANUPPROC)(PVOID ObjectBody);
+#endif
+
+/*!
+ * GDI object header. This is a part of any GDI object
+*/
+typedef struct _GDIOBJHDR
+{
+#ifdef NTOS_MODE_USER
+  PVOID LockingThread;
+#else
+  PETHREAD LockingThread; /* only assigned if a thread is holding the lock! */
+#endif
+  ULONG Locks;
+#ifdef GDI_DEBUG
+  const char* createdfile;
+  int createdline;
+  const char* lockfile;
+  int lockline;
+#endif
+} GDIOBJHDR, *PGDIOBJHDR;
+
+#ifndef NTOS_MODE_USER
+
+BOOL    INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
+void    INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
+void    INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
+BOOL    INTERNAL_CALL GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj);
+VOID    INTERNAL_CALL GDIOBJ_UnlockObjByPtr(PGDIOBJ Object);
+
+#define GDIOBJ_GetObjectType(Handle) \
+  GDI_HANDLE_GET_TYPE(Handle)
+
+#ifdef GDI_DEBUG
+
+/* a couple macros for debugging GDIOBJ locking */
+#define GDIOBJ_AllocObj(ty) GDIOBJ_AllocObjDbg(__FILE__,__LINE__,ty)
+#define GDIOBJ_FreeObj(obj,ty) GDIOBJ_FreeObjDbg(__FILE__,__LINE__,obj,ty)
+#define GDIOBJ_LockObj(obj,ty) GDIOBJ_LockObjDbg(__FILE__,__LINE__,obj,ty)
+#define GDIOBJ_ShareLockObj(obj,ty) GDIOBJ_ShareLockObjDbg(__FILE__,__LINE__,obj,ty)
+
+HGDIOBJ INTERNAL_CALL GDIOBJ_AllocObjDbg(const char* file, int line, ULONG ObjectType);
+BOOL    INTERNAL_CALL GDIOBJ_FreeObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);
+PGDIOBJ INTERNAL_CALL GDIOBJ_LockObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);
+PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);
+
+#else /* !GDI_DEBUG */
+
+HGDIOBJ INTERNAL_CALL GDIOBJ_AllocObj(ULONG ObjectType);
+BOOL    INTERNAL_CALL GDIOBJ_FreeObj (HGDIOBJ hObj, DWORD ObjectType);
+PGDIOBJ INTERNAL_CALL GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType);
+PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj (HGDIOBJ hObj, DWORD ObjectType);
+
+#endif /* GDI_DEBUG */
+
+PVOID   INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);
+
+#endif
+
+#define GDIOBJFLAG_DEFAULT     (0x0)
+#define GDIOBJFLAG_IGNOREPID   (0x1)
+#define GDIOBJFLAG_IGNORELOCK  (0x2)
+
+#endif
diff --git a/reactos/include/win32k/icm.h b/reactos/include/win32k/icm.h
new file mode 100644 (file)
index 0000000..9502d25
--- /dev/null
@@ -0,0 +1,81 @@
+
+#ifndef __WIN32K_ICM_H
+#define __WIN32K_ICM_H
+
+BOOL
+STDCALL
+NtGdiCheckColorsInGamut(HDC  hDC,
+                             LPVOID  RGBTriples,
+                             LPVOID  Buffer,
+                             UINT  Count);
+
+BOOL
+STDCALL
+NtGdiColorMatchToTarget(HDC  hDC,
+                             HDC  hDCTarget, 
+                             DWORD  Action);
+
+HCOLORSPACE
+STDCALL
+NtGdiCreateColorSpace(LPLOGCOLORSPACEW  LogColorSpace);
+
+BOOL
+STDCALL
+NtGdiDeleteColorSpace(HCOLORSPACE  hColorSpace);
+
+INT
+STDCALL
+NtGdiEnumICMProfiles(HDC    hDC,
+                    LPWSTR lpstrBuffer,
+                    UINT   cch );
+
+HCOLORSPACE
+STDCALL
+NtGdiGetColorSpace(HDC  hDC);
+
+BOOL
+STDCALL
+NtGdiGetDeviceGammaRamp(HDC  hDC,
+                             LPVOID  Ramp);
+
+BOOL
+STDCALL
+NtGdiGetICMProfile(HDC  hDC,  
+                        LPDWORD  NameSize,
+                        LPWSTR  Filename);
+
+BOOL
+STDCALL
+NtGdiGetLogColorSpace(HCOLORSPACE  hColorSpace,
+                           LPLOGCOLORSPACEW  Buffer,
+                           DWORD  Size);
+
+HCOLORSPACE
+STDCALL
+NtGdiSetColorSpace(HDC  hDC,  
+                               HCOLORSPACE  hColorSpace);
+
+BOOL
+STDCALL
+NtGdiSetDeviceGammaRamp(HDC  hDC,
+                             LPVOID  Ramp);
+
+INT
+STDCALL
+NtGdiSetICMMode(HDC  hDC,
+                    INT  EnableICM);
+
+BOOL
+STDCALL
+NtGdiSetICMProfile(HDC  hDC,
+                        LPWSTR  Filename);
+
+BOOL
+STDCALL
+NtGdiUpdateICMRegKey(DWORD  Reserved,  
+                          LPWSTR  CMID, 
+                          LPWSTR  Filename,
+                          UINT  Command);
+
+#endif
+
diff --git a/reactos/include/win32k/kapi.h b/reactos/include/win32k/kapi.h
new file mode 100644 (file)
index 0000000..fa6c7ab
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef _WIN32K_KAPI_H
+#define _WIN32K_KAPI_H
+
+#ifndef INTERNAL_CALL
+#define INTERNAL_CALL STDCALL
+#endif
+
+#include <win32k/brush.h>
+#include <win32k/callback.h>
+#include <win32k/caret.h>
+#include <win32k/cliprgn.h>
+#include <win32k/color.h>
+#include <win32k/cursoricon.h>
+#include <win32k/path.h>
+#include <win32k/driver.h>
+#include <win32k/dc.h>
+#include <win32k/coord.h>
+#include <win32k/bitmaps.h>
+#include <win32k/fillshap.h>
+#include <win32k/font.h>
+#include <win32k/icm.h>
+#include <win32k/line.h>
+#include <win32k/metafile.h>
+#include <win32k/menu.h>
+#include <win32k/misc.h>
+#include <win32k/ntuser.h>
+#include <win32k/paint.h>
+#include <win32k/pen.h>
+#include <win32k/print.h>
+#include <win32k/region.h>
+#include <win32k/text.h>
+#include <win32k/wingl.h>
+#endif /* ndef _WIN32K_KAPI_H */
diff --git a/reactos/include/win32k/line.h b/reactos/include/win32k/line.h
new file mode 100644 (file)
index 0000000..c3767f1
--- /dev/null
@@ -0,0 +1,101 @@
+#ifndef __WIN32K_LINE_H
+#define __WIN32K_LINE_H
+
+BOOL
+STDCALL
+NtGdiAngleArc(HDC  hDC,
+                   int  X,
+                   int  Y,
+                   DWORD  Radius,
+                   FLOAT  StartAngle,
+                   FLOAT  SweepAngle);
+
+BOOL
+STDCALL
+NtGdiArc(HDC  hDC,
+              int  LeftRect,
+              int  TopRect,
+              int  RightRect, 
+              int  BottomRect,
+              int  XStartArc,
+              int  YStartArc,
+              int  XEndArc,  
+              int  YEndArc);
+
+BOOL
+STDCALL
+NtGdiArcTo(HDC  hDC,
+                int  LeftRect,
+                int  TopRect,
+                int  RightRect,
+                int  BottomRect,
+                int  XRadial1,
+                int  YRadial1,
+                int  XRadial2,
+                int  YRadial2);
+
+INT
+FASTCALL
+IntGetArcDirection ( PDC dc );
+
+INT
+STDCALL
+NtGdiGetArcDirection ( HDC hDC );
+
+BOOL
+STDCALL
+NtGdiLineTo(HDC  hDC,
+           int  XEnd,
+           int  YEnd );
+
+BOOL
+STDCALL
+NtGdiMoveToEx(HDC  hDC,
+                   int  X,
+                   int  Y,
+                   LPPOINT  Point);
+
+BOOL
+STDCALL
+NtGdiPolyBezier(HDC  hDC,
+                     CONST LPPOINT  pt,
+                     DWORD  Count);
+
+BOOL
+STDCALL
+NtGdiPolyBezierTo(HDC  hDC,
+                       CONST LPPOINT  pt,
+                       DWORD  Count);
+
+BOOL
+STDCALL
+NtGdiPolyDraw(HDC  hDC,
+                   CONST LPPOINT  pt,
+                   CONST LPBYTE  Types,
+                   int  Count);
+
+BOOL
+STDCALL
+NtGdiPolyline(HDC  hDC,
+                   CONST LPPOINT  pt,
+                   int  Count);
+
+BOOL
+STDCALL
+NtGdiPolylineTo(HDC  hDC,
+                     CONST LPPOINT  pt,
+                     DWORD  Count);
+
+BOOL
+STDCALL
+NtGdiPolyPolyline(HDC  hDC,
+                       CONST LPPOINT  pt,
+                       CONST LPDWORD  PolyPoints,
+                       DWORD  Count);
+
+int
+STDCALL
+NtGdiSetArcDirection(HDC  hDC,
+                         int  ArcDirection);
+
+#endif
diff --git a/reactos/include/win32k/math.h b/reactos/include/win32k/math.h
new file mode 100644 (file)
index 0000000..28d6591
--- /dev/null
@@ -0,0 +1,168 @@
+/* 
+ * math.h
+ *
+ * Mathematical functions.
+ *
+ * This file is part of the Mingw32 package.
+ *
+ * Contributors:
+ *  Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
+ *
+ *  THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ *  This source code is offered for use in the public domain. You may
+ *  use, modify or distribute it freely.
+ *
+ *  This code is distributed in the hope that it will be useful but
+ *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ *  DISCLAMED. This includes but is not limited to warranties of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $Revision: 1.4 $
+ * $Author$
+ * $Date$
+ *
+ */
+/* added modfl */
+
+#ifndef _MATH_H_
+#define _MATH_H_
+
+#include_next <math.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * HUGE_VAL is returned by strtod when the value would overflow the
+ * representation of 'double'. There are other uses as well.
+ *
+ * __imp__HUGE is a pointer to the actual variable _HUGE in
+ * MSVCRT.DLL. If we used _HUGE directly we would get a pointer
+ * to a thunk function.
+ *
+ * NOTE: The CRTDLL version uses _HUGE_dll instead.
+ */
+#ifdef __MSVCRT__
+extern double* __imp__HUGE;
+#define        HUGE_VAL        (*__imp__HUGE)
+#else
+/* CRTDLL */
+extern double* _HUGE_dll;
+#define        HUGE_VAL        (*_HUGE_dll)
+#endif
+
+#define M_PI   22 / 7
+#define M_PI_2 M_PI * 2
+
+struct _exception
+{
+       int     type;
+       char    *name;
+       double  arg1;
+       double  arg2;
+       double  retval;
+};
+
+/*
+ * Types for the above _exception structure.
+ */
+
+#define        _DOMAIN         1       /* domain error in argument */
+#define        _SING           2       /* singularity */
+#define        _OVERFLOW       3       /* range overflow */
+#define        _UNDERFLOW      4       /* range underflow */
+#define        _TLOSS          5       /* total loss of precision */
+#define        _PLOSS          6       /* partial loss of precision */
+
+/*
+ * Exception types with non-ANSI names for compatibility.
+ */
+
+#ifndef        __STRICT_ANSI__
+#ifndef        _NO_OLDNAMES
+
+#define        DOMAIN          _DOMAIN
+#define        SING            _SING
+#define        OVERFLOW        _OVERFLOW
+#define        UNDERFLOW       _UNDERFLOW
+#define        TLOSS           _TLOSS
+#define        PLOSS           _PLOSS
+
+#endif /* Not _NO_OLDNAMES */
+#endif /* Not __STRICT_ANSI__ */
+
+
+double sin (double x);
+double cos (double x);
+double tan (double x);
+double sinh (double x);
+double cosh (double x);
+double tanh (double x);
+double asin (double x);
+double acos (double x);
+double atan (double x);
+double atan2 (double y, double x);
+double exp (double x);
+double log (double x);
+double log10 (double x);
+double pow (double x, double y);
+long double    powl (long double x,long double y);
+double sqrt (double x);
+double ceil (double x);
+double floor (double x);
+double fabs (double x);
+double ldexp (double x, int n);
+double frexp (double x, int* exp);
+double modf (double x, double* ip);
+long double modfl (long double x,long double* ip);
+double fmod (double x, double y);
+
+
+#ifndef        __STRICT_ANSI__
+
+/* Complex number (for cabs) */
+struct _complex
+{
+       double  x;      /* Real part */
+       double  y;      /* Imaginary part */
+};
+
+double _cabs (struct _complex x);
+double _hypot (double x, double y);
+double _j0 (double x);
+double _j1 (double x);
+double _jn (int n, double x);
+double _y0 (double x);
+double _y1 (double x);
+double _yn (int n, double x);
+
+#ifndef        _NO_OLDNAMES
+
+/*
+ * Non-underscored versions of non-ANSI functions. These reside in
+ * liboldnames.a. Provided for extra portability.
+ */
+#if 0
+/* GCC 3.4 warns that this is not equal to it's internal definition for cabs */
+double cabs (struct _complex x);
+#endif
+double hypot (double x, double y);
+double j0 (double x);
+double j1 (double x);
+double jn (int n, double x);
+double y0 (double x);
+double y1 (double x);
+double yn (int n, double x);
+
+#endif /* Not _NO_OLDNAMES */
+
+#endif /* Not __STRICT_ANSI__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* Not _MATH_H_ */
+
diff --git a/reactos/include/win32k/menu.h b/reactos/include/win32k/menu.h
new file mode 100644 (file)
index 0000000..ff204c7
--- /dev/null
@@ -0,0 +1,250 @@
+/* $Id$ */
+
+#ifndef WIN32K_MENU_H_INCLUDED
+#define WIN32K_MENU_H_INCLUDED
+
+typedef struct tagROSMENUINFO {
+  /* ----------- MENUINFO ----------- */
+  DWORD   cbSize;
+  DWORD   fMask;
+  DWORD   dwStyle;
+  UINT    cyMax;
+  HBRUSH  hbrBack;
+  DWORD   dwContextHelpID;
+  ULONG_PTR  dwMenuData;
+  /* ----------- Extra ----------- */
+  HMENU Self;         /* Handle of this menu */
+  WORD Flags;         /* Menu flags (MF_POPUP, MF_SYSMENU) */
+  UINT FocusedItem;   /* Currently focused item */
+  UINT MenuItemCount; /* Number of items in the menu */
+  HWND Wnd;           /* Window containing the menu */
+  WORD Width;         /* Width of the whole menu */
+  WORD Height;        /* Height of the whole menu */
+  HWND WndOwner;     /* window receiving the messages for ownerdraw */
+  BOOL TimeToHide;   /* Request hiding when receiving a second click in the top-level menu item */
+  SIZE maxBmpSize;   /* Maximum size of the bitmap items in MIIM_BITMAP state */
+} ROSMENUINFO, *PROSMENUINFO;
+
+/* (other FocusedItem values give the position of the focused item) */
+#define NO_SELECTED_ITEM  0xffff
+
+typedef struct tagROSMENUITEMINFO
+{
+  /* ----------- MENUITEMINFOW ----------- */
+  UINT    cbSize;
+  UINT    fMask;
+  UINT    fType;
+  UINT    fState;
+  UINT    wID;
+  HMENU   hSubMenu;
+  HBITMAP hbmpChecked;
+  HBITMAP hbmpUnchecked;
+  DWORD   dwItemData;
+  LPWSTR  dwTypeData;
+  UINT    cch;
+  HBITMAP hbmpItem;
+  /* ----------- Extra ----------- */
+  RECT    Rect;        /* Item area (relative to menu window) */
+  UINT    XTab; /* X position of text after Tab */
+} ROSMENUITEMINFO, *PROSMENUITEMINFO;
+
+typedef struct _SETMENUITEMRECT
+{
+  UINT uItem;
+  BOOL fByPosition;
+  RECT rcRect;
+} SETMENUITEMRECT, *PSETMENUITEMRECT;
+
+DWORD
+STDCALL
+NtUserBuildMenuItemList(
+ HMENU hMenu,
+ PVOID Buffer,
+ ULONG nBufSize,
+ DWORD Reserved);
+
+DWORD
+STDCALL
+NtUserCheckMenuItem(
+  HMENU hmenu,
+  UINT uIDCheckItem,
+  UINT uCheck);
+
+HMENU
+STDCALL
+NtUserCreateMenu(BOOL PopupMenu);
+
+BOOL
+STDCALL
+NtUserDeleteMenu(
+  HMENU hMenu,
+  UINT uPosition,
+  UINT uFlags);
+
+BOOL
+STDCALL
+NtUserDestroyMenu(
+  HMENU hMenu);
+
+DWORD
+STDCALL
+NtUserDrawMenuBarTemp(
+  HWND hWnd,
+  HDC hDC,
+  PRECT hRect,
+  HMENU hMenu,
+  HFONT hFont);
+
+UINT
+STDCALL
+NtUserEnableMenuItem(
+  HMENU hMenu,
+  UINT uIDEnableItem,
+  UINT uEnable);
+  
+DWORD
+STDCALL
+NtUserInsertMenuItem(
+  HMENU hMenu,
+  UINT uItem,
+  BOOL fByPosition,
+  LPCMENUITEMINFOW lpmii);
+
+BOOL
+STDCALL
+NtUserEndMenu(VOID);
+
+UINT STDCALL
+NtUserGetMenuDefaultItem(
+  HMENU hMenu,
+  UINT fByPos,
+  UINT gmdiFlags);
+
+BOOL
+STDCALL
+NtUserGetMenuBarInfo(
+  HWND hwnd,
+  LONG idObject,
+  LONG idItem,
+  PMENUBARINFO pmbi);
+
+UINT
+STDCALL
+NtUserGetMenuIndex(
+  HMENU hMenu,
+  UINT wID);
+
+BOOL
+STDCALL
+NtUserGetMenuItemRect(
+  HWND hWnd,
+  HMENU hMenu,
+  UINT uItem,
+  LPRECT lprcItem);
+
+HMENU
+STDCALL
+NtUserGetSystemMenu(
+  HWND hWnd,
+  BOOL bRevert);
+
+BOOL
+STDCALL
+NtUserHiliteMenuItem(
+  HWND hwnd,
+  HMENU hmenu,
+  UINT uItemHilite,
+  UINT uHilite);
+
+BOOL
+STDCALL
+NtUserMenuInfo(
+ HMENU hmenu,
+ PROSMENUINFO lpmi,
+ BOOL fsog
+);
+
+int
+STDCALL
+NtUserMenuItemFromPoint(
+  HWND hWnd,
+  HMENU hMenu,
+  DWORD X,
+  DWORD Y);
+
+BOOL
+STDCALL
+NtUserMenuItemInfo(
+ HMENU hMenu,
+ UINT uItem,
+ BOOL fByPosition,
+ PROSMENUITEMINFO lpmii,
+ BOOL fsog
+);
+
+BOOL
+STDCALL
+NtUserRemoveMenu(
+  HMENU hMenu,
+  UINT uPosition,
+  UINT uFlags);
+
+BOOL
+STDCALL
+NtUserSetMenu(
+  HWND hWnd,
+  HMENU hMenu,
+  BOOL bRepaint);
+
+BOOL
+STDCALL
+NtUserSetMenuContextHelpId(
+  HMENU hmenu,
+  DWORD dwContextHelpId);
+
+BOOL
+STDCALL
+NtUserSetMenuDefaultItem(
+  HMENU hMenu,
+  UINT uItem,
+  UINT fByPos);
+
+BOOL
+STDCALL
+NtUserSetMenuFlagRtoL(
+  HMENU hMenu);
+
+BOOL
+STDCALL
+NtUserSetSystemMenu(
+  HWND hWnd,
+  HMENU hMenu);
+
+DWORD
+STDCALL
+NtUserThunkedMenuInfo(
+  HMENU hMenu,
+  LPCMENUINFO lpcmi);
+
+DWORD
+STDCALL
+NtUserThunkedMenuItemInfo(
+  HMENU hMenu,
+  UINT uItem,
+  BOOL fByPosition,
+  BOOL bInsert,
+  LPMENUITEMINFOW lpmii,
+  PUNICODE_STRING lpszCaption);
+
+BOOL
+STDCALL
+NtUserTrackPopupMenuEx(
+  HMENU hmenu,
+  UINT fuFlags,
+  int x,
+  int y,
+  HWND hwnd,
+  LPTPMPARAMS lptpm);
+
+#endif /* WIN32K_MENU_H_INCLUDED */
+
diff --git a/reactos/include/win32k/metafile.h b/reactos/include/win32k/metafile.h
new file mode 100644 (file)
index 0000000..b589bb4
--- /dev/null
@@ -0,0 +1,180 @@
+#ifndef __WIN32K_METAFILE_H
+#define __WIN32K_METAFILE_H
+
+HENHMETAFILE
+STDCALL
+NtGdiCloseEnhMetaFile (
+       HDC     hDC
+       );
+HMETAFILE
+STDCALL
+NtGdiCloseMetaFile (
+       HDC     hDC
+       );
+HENHMETAFILE
+STDCALL
+NtGdiCopyEnhMetaFile (
+       HENHMETAFILE    Src,
+       LPCWSTR         File
+       );
+HMETAFILE
+STDCALL
+NtGdiCopyMetaFile (
+       HMETAFILE       Src,
+       LPCWSTR         File
+       );
+HDC
+STDCALL
+NtGdiCreateEnhMetaFile (
+       HDC             hDCRef,
+       LPCWSTR         File,
+       CONST LPRECT    Rect,
+       LPCWSTR         Description
+       );
+HDC
+STDCALL
+NtGdiCreateMetaFile (
+       LPCWSTR         File
+       );
+BOOL
+STDCALL
+NtGdiDeleteEnhMetaFile (
+       HENHMETAFILE    emf
+       );
+BOOL
+STDCALL
+NtGdiDeleteMetaFile (
+       HMETAFILE       mf
+       );
+BOOL
+STDCALL
+NtGdiEnumEnhMetaFile (
+       HDC             hDC,
+       HENHMETAFILE    emf,
+       ENHMFENUMPROC   EnhMetaFunc,
+       LPVOID          Data,
+       CONST LPRECT    Rect
+       );
+BOOL
+STDCALL
+NtGdiEnumMetaFile (
+       HDC             hDC,
+       HMETAFILE       mf,
+       MFENUMPROC      MetaFunc,
+       LPARAM          lParam
+       );
+BOOL
+STDCALL
+NtGdiGdiComment (
+       HDC             hDC,
+       UINT            Size,
+       CONST LPBYTE    Data
+       );
+HENHMETAFILE
+STDCALL
+NtGdiGetEnhMetaFile (
+       LPCWSTR MetaFile
+       );
+UINT
+STDCALL
+NtGdiGetEnhMetaFileBits (
+       HENHMETAFILE    hemf,
+       UINT            BufSize,
+       LPBYTE          Buffer
+       );
+UINT
+STDCALL
+NtGdiGetEnhMetaFileDescription (
+       HENHMETAFILE    hemf,
+       UINT            BufSize,
+       LPWSTR          Description
+       );
+UINT
+STDCALL
+NtGdiGetEnhMetaFileHeader (
+       HENHMETAFILE    hemf,
+       UINT            BufSize,
+       LPENHMETAHEADER emh
+       );
+UINT
+STDCALL
+NtGdiGetEnhMetaFilePaletteEntries (
+       HENHMETAFILE    hemf,
+       UINT            Entries,
+       LPPALETTEENTRY  pe
+       );
+HMETAFILE
+STDCALL
+NtGdiGetMetaFile (
+       LPCWSTR MetaFile
+       );
+UINT
+STDCALL
+NtGdiGetMetaFileBitsEx (
+       HMETAFILE       hmf,
+       UINT            Size,
+       LPVOID          Data
+       );
+UINT
+STDCALL
+NtGdiGetWinMetaFileBits (
+       HENHMETAFILE    hemf,
+       UINT            BufSize,
+       LPBYTE          Buffer,
+       INT             MapMode,
+       HDC             Ref
+       );
+BOOL
+STDCALL
+NtGdiPlayEnhMetaFile (
+       HDC             hDC,
+       HENHMETAFILE    hemf,
+       CONST PRECT     Rect
+       );
+BOOL
+STDCALL
+NtGdiPlayEnhMetaFileRecord (
+       HDC                     hDC,
+       LPHANDLETABLE           Handletable,
+       CONST ENHMETARECORD     * EnhMetaRecord,
+       UINT                    Handles
+       );
+BOOL
+STDCALL
+NtGdiPlayMetaFile (
+       HDC             hDC,
+       HMETAFILE       hmf
+       );
+BOOL
+STDCALL
+NtGdiPlayMetaFileRecord (
+       HDC             hDC,
+       LPHANDLETABLE   Handletable,
+       LPMETARECORD    MetaRecord,
+       UINT            Handles
+       );
+HENHMETAFILE
+STDCALL
+NtGdiSetEnhMetaFileBits (
+       UINT            BufSize,
+       CONST PBYTE     Data
+       );
+HMETAFILE
+STDCALL
+NtGdiSetMetaFileBitsEx (
+       UINT            Size,
+       CONST PBYTE     Data
+       );
+#if 0
+HENHMETAFILE
+STDCALL
+NtGdiSetWinMetaFileBits (
+       UINT                    BufSize,
+       CONST PBYTE             Buffer,
+       HDC                     Ref,
+       CONST METAFILEPICT      * mfp
+       );
+#endif
+
+#endif
+
similarity index 89%
rename from reactos/subsys/win32k/include/misc.h
rename to reactos/include/win32k/misc.h
index 85491f4..e03faa6 100644 (file)
@@ -1,13 +1,17 @@
-#ifndef __WIN32K_MISC_H\r
-#define __WIN32K_MISC_H\r
-\r
-/* W32PROCESS flags */\r
-#define W32PF_NOWINDOWGHOSTING (0x0001)\r
-#define W32PF_MANUALGUICHECK   (0x0002)\r
-#define W32PF_CREATEDWINORDC   (0x0004)\r
-\r
-VOID\r
-FASTCALL\r
-DestroyThreadWindows(struct _ETHREAD *Thread);\r
-\r
-#endif /* __WIN32K_MISC_H */\r
+#ifndef __WIN32K_MISC_H
+#define __WIN32K_MISC_H
+
+#ifndef NTOS_MODE_USER
+
+/* W32PROCESS flags */
+#define W32PF_NOWINDOWGHOSTING (0x0001)
+#define W32PF_MANUALGUICHECK   (0x0002)
+#define W32PF_CREATEDWINORDC   (0x0004)
+
+VOID
+FASTCALL
+DestroyThreadWindows(struct _ETHREAD *Thread);
+
+#endif
+
+#endif /* __WIN32K_MISC_H */
diff --git a/reactos/include/win32k/ntddraw.h b/reactos/include/win32k/ntddraw.h
new file mode 100644 (file)
index 0000000..e476c10
--- /dev/null
@@ -0,0 +1,325 @@
+
+#ifndef __WIN32K_NTDDRAW_H
+#define __WIN32K_NTDDRAW_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+BOOL STDCALL NtGdiD3dContextCreate(
+    HANDLE hDirectDrawLocal,
+    HANDLE hSurfColor,
+    HANDLE hSurfZ,
+    /* Is msdn wrong on D3DNTHAL_CONTEXTCREATEDATA ?? */
+    D3DNTHAL_CONTEXTCREATEDATA *pdcci
+);
+
+
+DWORD STDCALL NtGdiD3dContextDestroy(      
+    LPD3DNTHAL_CONTEXTDESTROYDATA  pContextDestroyData
+);
+
+DWORD STDCALL NtGdiD3dContextDestroyAll(VOID);
+
+DWORD STDCALL NtGdiD3dDrawPrimitives2(      
+    HANDLE hCmdBuf,
+    HANDLE hVBuf,
+    LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
+    FLATPTR *pfpVidMemCmd,
+    DWORD *pdwSizeCmd,
+    FLATPTR *pfpVidMemVtx,
+    DWORD *pdwSizeVtx
+
+);
+
+DWORD STDCALL NtGdiD3dValidateTextureStageState(      
+    LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
+);
+
+DWORD STDCALL NtGdiDdAddAttachedSurface(      
+    HANDLE hSurface,
+    HANDLE hSurfaceAttached,
+    PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
+);
+
+DWORD STDCALL NtGdiDdAlphaBlt(VOID);
+
+BOOL STDCALL NtGdiDdAttachSurface(      
+    HANDLE hSurfaceFrom,
+    HANDLE hSurfaceTo
+);
+
+DWORD STDCALL NtGdiDdBeginMoCompFrame(      
+    HANDLE hMoComp,
+    PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
+);
+
+DWORD STDCALL NtGdiDdBlt(      
+    HANDLE hSurfaceDest,
+    HANDLE hSurfaceSrc,
+    PDD_BLTDATA puBltData
+);
+
+DWORD STDCALL NtGdiDdCanCreateD3DBuffer(      
+    HANDLE hDirectDraw,
+    PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+);
+
+DWORD STDCALL NtGdiDdCanCreateSurface(      
+    HANDLE hDirectDraw,
+    PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+);
+
+DWORD STDCALL NtGdiDdColorControl(      
+    HANDLE hSurface,
+    PDD_COLORCONTROLDATA puColorControlData
+);
+
+DWORD STDCALL NtGdiDdCreateD3DBuffer(      
+    HANDLE hDirectDraw,
+    HANDLE *hSurface,
+    DDSURFACEDESC *puSurfaceDescription,
+    DD_SURFACE_GLOBAL *puSurfaceGlobalData,
+    DD_SURFACE_LOCAL *puSurfaceLocalData,
+    DD_SURFACE_MORE *puSurfaceMoreData,
+    PDD_CREATESURFACEDATA puCreateSurfaceData,
+    HANDLE *puhSurface
+);
+
+HANDLE STDCALL NtGdiDdCreateDirectDrawObject(      
+    HDC hdc
+);
+
+HANDLE STDCALL NtGdiDdCreateMoComp(      
+    HANDLE hDirectDraw,
+    PDD_CREATEMOCOMPDATA puCreateMoCompData
+);
+
+DWORD STDCALL NtGdiDdCreateSurface(      
+    HANDLE hDirectDraw,
+    HANDLE *hSurface,
+    DDSURFACEDESC *puSurfaceDescription,
+    DD_SURFACE_GLOBAL *puSurfaceGlobalData,
+    DD_SURFACE_LOCAL *puSurfaceLocalData,
+    DD_SURFACE_MORE *puSurfaceMoreData,
+    PDD_CREATESURFACEDATA puCreateSurfaceData,
+    HANDLE *puhSurface
+);
+
+DWORD STDCALL NtGdiDdCreateSurfaceEx(      
+    HANDLE hDirectDraw,
+    HANDLE hSurface,
+    DWORD dwSurfaceHandle
+);
+
+HANDLE STDCALL NtGdiDdCreateSurfaceObject(      
+    HANDLE hDirectDrawLocal,
+    HANDLE hSurface,
+    PDD_SURFACE_LOCAL puSurfaceLocal,
+    PDD_SURFACE_MORE puSurfaceMore,
+    PDD_SURFACE_GLOBAL puSurfaceGlobal,
+    BOOL bComplete
+);
+
+BOOL STDCALL NtGdiDdDeleteDirectDrawObject(      
+    HANDLE hDirectDrawLocal
+);
+
+BOOL STDCALL NtGdiDdDeleteSurfaceObject(      
+    HANDLE hSurface
+);
+
+DWORD STDCALL NtGdiDdDestroyD3DBuffer(      
+    HANDLE hSurface
+);
+
+DWORD STDCALL NtGdiDdDestroyMoComp(      
+    HANDLE hMoComp,
+    PDD_DESTROYMOCOMPDATA puBeginFrameData
+);
+
+DWORD STDCALL NtGdiDdDestroySurface(      
+    HANDLE hSurface,
+    BOOL bRealDestroy
+);
+
+DWORD STDCALL NtGdiDdEndMoCompFrame(      
+    HANDLE hMoComp,
+    PDD_ENDMOCOMPFRAMEDATA puEndFrameData
+);
+
+DWORD STDCALL NtGdiDdFlip(      
+    HANDLE hSurfaceCurrent,
+    HANDLE hSurfaceTarget,
+    HANDLE hSurfaceCurrentLeft,
+    HANDLE hSurfaceTargetLeft,
+    PDD_FLIPDATA puFlipData
+);
+
+DWORD STDCALL NtGdiDdFlipToGDISurface(      
+    HANDLE hDirectDraw,
+    PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
+);
+
+DWORD STDCALL NtGdiDdGetAvailDriverMemory(      
+    HANDLE hDirectDraw,
+    PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
+);
+
+DWORD STDCALL NtGdiDdGetBltStatus(      
+    HANDLE hSurface,
+    PDD_GETBLTSTATUSDATA puGetBltStatusData
+);
+
+HDC STDCALL NtGdiDdGetDC(      
+    HANDLE hSurface,
+    PALETTEENTRY *puColorTable
+);
+
+DWORD STDCALL NtGdiDdGetDriverInfo(      
+    HANDLE hDirectDraw,
+    PDD_GETDRIVERINFODATA puGetDriverInfoData
+);
+
+DWORD STDCALL NtGdiDdGetDriverState(      
+    PDD_GETDRIVERSTATEDATA pdata
+);
+
+DWORD STDCALL NtGdiDdGetDxHandle(      
+    HANDLE hDirectDraw,
+    HANDLE hSurface,
+    BOOL bRelease
+);
+
+DWORD STDCALL NtGdiDdGetFlipStatus(      
+    HANDLE hSurface,
+    PDD_GETFLIPSTATUSDATA puGetFlipStatusData
+);
+
+DWORD STDCALL NtGdiDdGetInternalMoCompInfo(      
+    HANDLE hDirectDraw,
+    PDD_GETINTERNALMOCOMPDATA puGetInternalData
+);
+
+DWORD STDCALL NtGdiDdGetMoCompBuffInfo(      
+    HANDLE hDirectDraw,
+    PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
+);
+
+DWORD STDCALL NtGdiDdGetMoCompFormats(      
+    HANDLE hDirectDraw,
+    PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
+);
+
+DWORD STDCALL NtGdiDdGetMoCompGuids(      
+    HANDLE hDirectDraw,
+    PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
+);
+
+DWORD STDCALL NtGdiDdGetScanLine(      
+    HANDLE hDirectDraw,
+    PDD_GETSCANLINEDATA puGetScanLineData
+);
+
+DWORD STDCALL NtGdiDdLock(      
+    HANDLE hSurface,
+    PDD_LOCKDATA puLockData,
+    HDC hdcClip
+);
+
+DWORD STDCALL NtGdiDdLockD3D(      
+    HANDLE hSurface,
+    PDD_LOCKDATA puLockData
+);
+
+BOOL STDCALL NtGdiDdQueryDirectDrawObject(      
+    HANDLE hDirectDrawLocal,
+    DD_HALINFO *pHalInfo,
+    DWORD *pCallBackFlags,
+    LPD3DNTHAL_CALLBACKS puD3dCallbacks,
+    LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
+    PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
+    LPDDSURFACEDESC puD3dTextureFormats,
+    DWORD *puNumHeaps,
+    VIDEOMEMORY *puvmList,
+    DWORD *puNumFourCC,
+    DWORD *puFourCC
+);
+
+DWORD STDCALL NtGdiDdQueryMoCompStatus(      
+    HANDLE hMoComp,
+    PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
+);
+
+BOOL STDCALL NtGdiDdReenableDirectDrawObject(      
+    HANDLE hDirectDrawLocal,
+    BOOL *pubNewMode
+);
+
+BOOL STDCALL NtGdiDdReleaseDC(      
+    HANDLE hSurface
+);
+
+DWORD STDCALL NtGdiDdRenderMoComp(      
+    HANDLE hMoComp,
+    PDD_RENDERMOCOMPDATA puRenderMoCompData
+);
+
+BOOL STDCALL NtGdiDdResetVisrgn(      
+    HANDLE hSurface,
+    HWND hwnd
+);
+
+DWORD STDCALL NtGdiDdSetColorKey(      
+    HANDLE hSurface,
+    PDD_SETCOLORKEYDATA puSetColorKeyData
+);
+
+DWORD STDCALL NtGdiDdSetExclusiveMode(      
+    HANDLE hDirectDraw,
+    PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
+);
+
+BOOL STDCALL NtGdiDdSetGammaRamp(      
+    HANDLE hDirectDraw,
+    HDC hdc,
+    LPVOID lpGammaRamp
+);
+
+DWORD STDCALL NtGdiDdSetOverlayPosition(      
+    HANDLE hSurfaceSource,
+    HANDLE hSurfaceDestination,
+    PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
+);
+
+VOID STDCALL NtGdiDdUnattachSurface(      
+    HANDLE hSurface,
+    HANDLE hSurfaceAttached
+);
+
+DWORD STDCALL NtGdiDdUnlock(      
+    HANDLE hSurface,
+    PDD_UNLOCKDATA puUnlockData
+);
+
+DWORD STDCALL NtGdiDdUnlockD3D(      
+    HANDLE hSurface,
+    PDD_UNLOCKDATA puUnlockData
+);
+
+DWORD STDCALL NtGdiDdUpdateOverlay(      
+    HANDLE hSurfaceDestination,
+    HANDLE hSurfaceSource,
+    PDD_UPDATEOVERLAYDATA puUpdateOverlayData
+);
+
+DWORD STDCALL NtGdiDdWaitForVerticalBlank(      
+    HANDLE hDirectDraw,
+    PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
+);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
diff --git a/reactos/include/win32k/ntgdibad.h b/reactos/include/win32k/ntgdibad.h
deleted file mode 100644 (file)
index bfb2941..0000000
+++ /dev/null
@@ -1,1256 +0,0 @@
-#ifndef WIN32K_NTGDI_BAD_INCLUDED\r
-#define WIN32K_NTGDI_BAD_INCLUDED\r
-\r
-/*\r
- *\r
- * If you want to help, please read this:\r
- *\r
- * This file contains NtGdi APIs which are specific to ROS, including\r
- * a short comment describing the solution on how to use the actual NtGdi\r
- * call documented in ntgdi.h. Here are the main cases and information on\r
- * how to remove them from this header.\r
- *\r
- * - Simple rename. This deals with an API simply having a different name,\r
- *                  with absolutely no other changes needed.\r
- * - Rename and new parameters. This deals with a case similar to the one\r
- *                              above, except that new parameters have now\r
- *                              been added. This is also usually extremly\r
- *                              simple to fix. Either pass the right params\r
- *                              or pass null/0 values that you ignore.\r
- * - Rename and new structure. This is similar to the above, except that the\r
- *                             information is now passed in a differently\r
- *                             named and organized structure. Ask Alex for\r
- *                             the structure you need and he will add it to\r
- *                             ntgdityp.h\r
- * - Rename and different semantics. Similar to the previous examples, except\r
- *                                   that parameters have usually been removed\r
- *                                   or need to be converted in user-mode in\r
- *                                   one form of another.\r
- * - Does not exist: user-mode. This means that the API can be fully done in\r
- *                              user mode. In 80% of cases, our API was already\r
- *                              returning NOT_IMPLEMENTED in kernel-mode, so\r
- *                              the work to be done is minimal. A good example\r
- *                              are the ICM and Metafile APIs, which can simply\r
- *                              be removed and added into gdi32.\r
- * - Does not exist: GDI Shared Objects. This is by far the hardest case. This\r
- *                                       class cannot be fixed until ReactOS\r
- *                                       has a working Shared GDI Object table\r
- *                                       and a DC_ATTR structure in which the\r
- *                                       attributes, selection and deletion of\r
- *                                       objects can be quickly done from user-\r
- *                                       mode without requiring a kernel mode\r
- *                                       call.\r
- */\r
-/* Should be using ENUMFONTDATAW */\r
-typedef struct tagFONTFAMILYINFO\r
-{\r
-  ENUMLOGFONTEXW EnumLogFontEx;\r
-  NEWTEXTMETRICEXW NewTextMetricEx;\r
-  DWORD FontType;\r
-} FONTFAMILYINFO, *PFONTFAMILYINFO;\r
-\r
-/* Should be using NtGdiHfontCreate with an ENUMLOGFONT */\r
-HFONT\r
-NTAPI\r
-NtGdiCreateFontIndirect(CONST LPLOGFONTW lf);\r
-\r
-/* Should be using NtGdiHfontCreate with an ENUMLOGFONT */\r
-HFONT\r
-NTAPI\r
-NtGdiCreateFont(\r
-    int  Height,\r
-    int  Width,\r
-    int  Escapement,\r
-    int  Orientation,\r
-    int  Weight,\r
-    DWORD  Italic,\r
-    DWORD  Underline,\r
-    DWORD  StrikeOut,\r
-    DWORD  CharSet,\r
-    DWORD  OutputPrecision,\r
-    DWORD  ClipPrecision,\r
-    DWORD  Quality,\r
-    DWORD  PitchAndFamily,\r
-    LPCWSTR  Face\r
-);\r
-\r
-/* Should be using NtGdiEnumFontChunk */\r
-INT\r
-NTAPI\r
-NtGdiGetFontFamilyInfo(\r
-    HDC Dc,\r
-    LPLOGFONTW LogFont,\r
-    PFONTFAMILYINFO Info,\r
-    DWORD Size\r
-);\r
-\r
-/* Should be using NtGdiEnumFontChunk */\r
-BOOL\r
-NTAPI\r
-NtGdiTranslateCharsetInfo(\r
-    PDWORD Src,\r
-    LPCHARSETINFO CSI,\r
-    DWORD Flags\r
-);\r
-\r
-/* The gdi32 call does all the work in user-mode, save for NtGdiMakeFontDir */\r
-BOOL\r
-NTAPI\r
-NtGdiCreateScalableFontResource(\r
-    DWORD Hidden,\r
-    LPCWSTR FontRes,\r
-    LPCWSTR FontFile,\r
-    LPCWSTR CurrentPath\r
-);\r
-\r
-/* The gdi32 call Should Use NtGdiGetRandomRgn and nothing else */\r
-HRGN\r
-NTAPI\r
-NtGdiGetClipRgn(HDC hDC);\r
-\r
-/* The gdi32 call Should Use NtGdiGetTextExtent */\r
-BOOL\r
-NTAPI\r
-NtGdiGetTextExtentPoint32(\r
-    HDC hDC,\r
-    LPCWSTR String,\r
-    int Count,\r
-    LPSIZE   \r
-);\r
-\r
-BOOL\r
-STDCALL\r
-NtGdiGetCharWidth32(\r
-    HDC hDC,\r
-    UINT FirstChar,\r
-    UINT LastChar,\r
-    LPINT Buffer\r
-);\r
-\r
-/* Use NtGdiOpenDCW */\r
-HDC\r
-NTAPI \r
-NtGdiCreateDC(\r
-    PUNICODE_STRING Driver,\r
-    PUNICODE_STRING Device,\r
-    PUNICODE_STRING Output,\r
-    CONST PDEVMODEW InitData\r
-);\r
-\r
-HDC\r
-NTAPI\r
-NtGdiCreateIC(\r
-    PUNICODE_STRING Driver,\r
-    PUNICODE_STRING Device,\r
-    PUNICODE_STRING Output,\r
-    CONST PDEVMODEW DevMode\r
-);\r
-\r
-/* Use NtGdiAddFontResourceW */\r
-int\r
-STDCALL\r
-NtGdiAddFontResource(PUNICODE_STRING Filename,\r
-                                        DWORD fl);\r
-\r
-/* Use NtGdiDoPalette with GdiPalAnimate */\r
-BOOL\r
-STDCALL\r
-NtGdiAnimatePalette (\r
-       HPALETTE                hpal,\r
-       UINT                    StartIndex,\r
-       UINT                    Entries,\r
-       CONST PPALETTEENTRY     ppe\r
-       );\r
-\r
-/* Use NtGdiArcInternal with GdiTypeArc */\r
-BOOL\r
-STDCALL\r
-NtGdiArc(HDC  hDC,\r
-              int  LeftRect,\r
-              int  TopRect,\r
-              int  RightRect, \r
-              int  BottomRect,\r
-              int  XStartArc,\r
-              int  YStartArc,\r
-              int  XEndArc,  \r
-              int  YEndArc);\r
-\r
-/* Use NtGdiArcInternal with GdiTypeArcTo */\r
-BOOL\r
-STDCALL\r
-NtGdiArcTo(HDC  hDC,\r
-                int  LeftRect,\r
-                int  TopRect,\r
-                int  RightRect,\r
-                int  BottomRect,\r
-                int  XRadial1,\r
-                int  YRadial1,\r
-                int  XRadial2,\r
-                int  YRadial2);\r
-\r
-/* Does not exist */\r
-BOOL\r
-STDCALL\r
-NtGdiCheckColorsInGamut(HDC  hDC,\r
-                             LPVOID  RGBTriples,\r
-                             LPVOID  Buffer,\r
-                             UINT  Count);\r
-\r
-/* Use NtGdiArcInternal with GdiTypeChord */\r
-BOOL\r
-STDCALL\r
-NtGdiChord(HDC  hDC,\r
-                int  LeftRect,\r
-                int  TopRect,\r
-                int  RightRect,\r
-                int  BottomRect,\r
-                int  XRadial1,\r
-                int  YRadial1,\r
-                int  XRadial2,\r
-                int  YRadial2);\r
-\r
-/* Metafiles are user mode */\r
-HENHMETAFILE\r
-STDCALL\r
-NtGdiCloseEnhMetaFile (\r
-       HDC     hDC\r
-       );\r
-\r
-/* Metafiles are user mode */\r
-HMETAFILE\r
-STDCALL\r
-NtGdiCloseMetaFile (\r
-       HDC     hDC\r
-       );\r
-\r
-/* Does not exist */\r
-BOOL\r
-STDCALL\r
-NtGdiColorMatchToTarget(HDC  hDC,\r
-                             HDC  hDCTarget, \r
-                             DWORD  Action);\r
-\r
-/* Metafiles are user mode */\r
-HENHMETAFILE\r
-STDCALL\r
-NtGdiCopyEnhMetaFile (\r
-       HENHMETAFILE    Src,\r
-       LPCWSTR         File\r
-       );\r
-\r
-/* Metafiles are user mode */\r
-HMETAFILE\r
-STDCALL\r
-NtGdiCopyMetaFile (\r
-       HMETAFILE       Src,\r
-       LPCWSTR         File\r
-       );\r
-\r
-/* Use NtGdiCreateBitmap and expand the pbm-> */\r
-HBITMAP\r
-STDCALL\r
-NtGdiCreateBitmapIndirect (\r
-       CONST BITMAP    * BM\r
-       );\r
-\r
-/* Use NtGdiCreateDIBitmapInternal */\r
-HBITMAP\r
-STDCALL\r
-NtGdiCreateDIBitmap (\r
-       HDC                     hDC,\r
-       CONST BITMAPINFOHEADER  * bmih,\r
-       DWORD                   Init,\r
-       CONST VOID              * bInit,\r
-       CONST BITMAPINFO        * bmi,\r
-       UINT                    Usage\r
-       );\r
-\r
-/* Use NtGdiCreateCompatibleBitmap */\r
-HBITMAP\r
-STDCALL\r
-NtGdiCreateDiscardableBitmap (\r
-       HDC     hDC,\r
-       INT     Width,\r
-       INT     Height\r
-       );\r
-\r
-/* Use NtGdiCreateEllipticRgn and expand the lprect-> */\r
-HRGN\r
-STDCALL\r
-NtGdiCreateEllipticRgnIndirect(CONST PRECT  rc);\r
-\r
-/* Metafiles are user mode */\r
-HDC\r
-STDCALL\r
-NtGdiCreateEnhMetaFile (\r
-       HDC             hDCRef,\r
-       LPCWSTR         File,\r
-       CONST LPRECT    Rect,\r
-       LPCWSTR         Description\r
-       );\r
-\r
-/* Use NtGdiCreateHatchBrushInternal with FALSE at the end. */\r
-HBRUSH STDCALL\r
-NtGdiCreateHatchBrush(\r
-   INT Style,\r
-   COLORREF Color);\r
-\r
-/* Metafiles are user mode */\r
-HDC\r
-STDCALL\r
-NtGdiCreateMetaFile (\r
-       LPCWSTR         File\r
-       );\r
-\r
-/* Use NtGdiCreatePaletteInternal with palNumEntries at the end. */\r
-HPALETTE\r
-STDCALL\r
-NtGdiCreatePalette (\r
-       CONST PLOGPALETTE       lgpl\r
-       );\r
-\r
-/* Use NtGdiCreatePatternBrushInternal with false, false at the end. */\r
-HBRUSH STDCALL\r
-NtGdiCreatePatternBrush(\r
-   HBITMAP hBitmap);\r
-\r
-/* Use NtGdiCreatePen with -> as parameters. */\r
-HPEN STDCALL\r
-NtGdiCreatePenIndirect(\r
-   CONST PLOGPEN LogBrush);\r
-\r
-/* Use NtGdiPolyPolyDraw with PolyPolyRgn. */\r
-HRGN\r
-STDCALL\r
-NtGdiCreatePolygonRgn(CONST PPOINT  pt,\r
-                           INT  Count,\r
-                           INT  PolyFillMode);\r
-\r
-/* Use NtGdiPolyPolyDraw with PolyPolyRgn. */\r
-HRGN\r
-STDCALL\r
-NtGdiCreatePolyPolygonRgn(CONST PPOINT  pt,\r
-                               CONST PINT  PolyCounts,\r
-                               INT  Count,\r
-                               INT  PolyFillMode);\r
-\r
-/* Use NtGdiCreateRectRgn with expanded paraemters. */\r
-HRGN\r
-STDCALL\r
-NtGdiCreateRectRgnIndirect(CONST PRECT  rc);\r
-\r
-/* Use NtGdiTransformPoints with GdiDpToLp. */\r
-BOOL\r
-STDCALL\r
-NtGdiDPtoLP (\r
-       HDC     hDC,\r
-       LPPOINT Points,\r
-       int     Count\r
-       );\r
-\r
-/* Use NtGdiDeleteObjectApp. */\r
-BOOL STDCALL  NtGdiDeleteDC(HDC  hDC);\r
-\r
-/* Meta are user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiDeleteEnhMetaFile (\r
-       HENHMETAFILE    emf\r
-       );\r
-\r
-/* Meta are user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiDeleteMetaFile (\r
-       HMETAFILE       mf\r
-       );\r
-\r
-/* Should be done in user-mode. */\r
-BOOL STDCALL  NtGdiDeleteObject(HGDIOBJ hObject);\r
-\r
-/* Meta are user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiEnumEnhMetaFile (\r
-       HDC             hDC,\r
-       HENHMETAFILE    emf,\r
-       ENHMFENUMPROC   EnhMetaFunc,\r
-       LPVOID          Data,\r
-       CONST LPRECT    Rect\r
-       );\r
-\r
-/* Should be done in user-mode. */\r
-int\r
-STDCALL\r
-NtGdiEnumFonts(HDC  hDC,\r
-                   LPCWSTR FaceName,\r
-                   FONTENUMPROCW  FontFunc,\r
-                   LPARAM  lParam);\r
-\r
-/* Should be done in user-mode. */\r
-INT\r
-STDCALL\r
-NtGdiEnumICMProfiles(HDC    hDC,\r
-                    LPWSTR lpstrBuffer,\r
-                    UINT   cch );\r
-\r
-/* Meta are user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiEnumMetaFile (\r
-       HDC             hDC,\r
-       HMETAFILE       mf,\r
-       MFENUMPROC      MetaFunc,\r
-       LPARAM          lParam\r
-       );\r
-\r
-/* Should be done in user-mode. */\r
-INT\r
-STDCALL\r
-NtGdiEscape(HDC  hDC,\r
-                INT  Escape,\r
-                INT  InSize,\r
-                LPCSTR  InData,\r
-                LPVOID  OutData);\r
-\r
-/* Use NtGdiExtTextOutW with 0, 0 at the end. */\r
-BOOL\r
-STDCALL\r
-NtGdiExtTextOut(HDC  hdc,\r
-                     int  X,\r
-                     int  Y,\r
-                     UINT  fuOptions,\r
-                     CONST RECT  *lprc,\r
-                     LPCWSTR  lpString,\r
-                     UINT  cbCount,\r
-                     CONST INT  *lpDx);\r
-\r
-/* Use NtGdiExtFloodFill with FLOODFILLBORDER. */\r
-BOOL\r
-STDCALL\r
-NtGdiFloodFill (\r
-       HDC             hDC,\r
-       INT             XStart,\r
-       INT             YStart,\r
-       COLORREF        Fill\r
-       );\r
-\r
-/* Should be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiGdiComment (\r
-       HDC             hDC,\r
-       UINT            Size,\r
-       CONST LPBYTE    Data\r
-       );\r
-\r
-/* Should be done in user-mode. */\r
-BOOL STDCALL NtGdiGdiFlush (VOID);\r
-\r
-/* Should be done in user-mode. */\r
-DWORD STDCALL NtGdiGdiGetBatchLimit (VOID);\r
-\r
-/* Should be done in user-mode. */\r
-DWORD STDCALL NtGdiGdiSetBatchLimit (DWORD  Limit);\r
-\r
-/* Use NtGdiGetDCDword with GdiGetArcDirection. */\r
-INT\r
-STDCALL\r
-NtGdiGetArcDirection ( HDC hDC );\r
-\r
-/* Should be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiGetAspectRatioFilterEx(HDC  hDC,\r
-                                 LPSIZE  AspectRatio);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-BOOL\r
-STDCALL\r
-NtGdiGetBitmapDimensionEx (\r
-       HBITMAP hBitmap,\r
-       LPSIZE  Dimension\r
-       );\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-COLORREF STDCALL  NtGdiGetBkColor(HDC  hDC);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-INT STDCALL  NtGdiGetBkMode(HDC  hDC);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-BOOL STDCALL  NtGdiGetBrushOrgEx(HDC  hDC, LPPOINT brushOrg);\r
-\r
-/* Use NtGdiGetCharABCWidthsW */\r
-BOOL\r
-STDCALL\r
-NtGdiGetCharABCWidths(HDC  hDC,\r
-                           UINT  FirstChar,\r
-                           UINT  LastChar,\r
-                           LPABC  abc);\r
-\r
-/* Should be done in user mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiGetCharABCWidthsFloat(HDC  hDC,\r
-                                UINT  FirstChar,\r
-                                UINT  LastChar,\r
-                                LPABCFLOAT  abcF);\r
-\r
-/* Should be done in user mode. */\r
-DWORD\r
-STDCALL\r
-NtGdiGetCharacterPlacement(HDC  hDC,\r
-                                 LPCWSTR  String,\r
-                                 int  Count,\r
-                                 int  MaxExtent,\r
-                                 LPGCP_RESULTSW Results,\r
-                                 DWORD  Flags);\r
-\r
-/* Should be done in user mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiGetCharWidthFloat(HDC  hDC,\r
-                            UINT  FirstChar,\r
-                            UINT  LastChar,\r
-                            PFLOAT  Buffer);\r
-\r
-/* Use NtGdiGetAppClipBox. */\r
-int\r
-STDCALL\r
-NtGdiGetClipBox (\r
-       HDC     hDC,\r
-       LPRECT  rc\r
-       );\r
-\r
-/* Use NtGdiGetColorSpaceforBitmap. */\r
-HCOLORSPACE\r
-STDCALL\r
-NtGdiGetColorSpace(HDC  hDC);\r
-\r
-/* Should be done in user-mode and/or NtGdiGetDCObject. */\r
-HGDIOBJ STDCALL  NtGdiGetCurrentObject(HDC  hDC, UINT  ObjectType);\r
-\r
-/* Should be done in user mode. */\r
-BOOL STDCALL  NtGdiGetCurrentPositionEx(HDC  hDC, LPPOINT currentPosition);\r
-\r
-/* Use NtGdiGetDCPoint with GdiGetDCOrg. */\r
-BOOL STDCALL  NtGdiGetDCOrgEx(HDC  hDC, LPPOINT  Point);\r
-\r
-/* Use NtGdiDoPalette with GdiPalGetColorTable. */\r
-UINT\r
-STDCALL\r
-NtGdiGetDIBColorTable (\r
-       HDC     hDC,\r
-       UINT    StartIndex,\r
-       UINT    Entries,\r
-       RGBQUAD * Colors\r
-       );\r
-\r
-/* Use NtGdiGetDIBitsInternal. */\r
-INT\r
-STDCALL\r
-NtGdiGetDIBits (\r
-       HDC             hDC,\r
-       HBITMAP         hBitmap,\r
-       UINT            StartScan,\r
-       UINT            ScanLines,\r
-       LPVOID          Bits,\r
-       LPBITMAPINFO    bi,\r
-       UINT            Usage\r
-       );\r
-\r
-\r
-/* Meta are user-mode. */\r
-HENHMETAFILE\r
-STDCALL\r
-NtGdiGetEnhMetaFile (\r
-       LPCWSTR MetaFile\r
-       );\r
-\r
-/* Meta are user-mode. */\r
-UINT\r
-STDCALL\r
-NtGdiGetEnhMetaFileBits (\r
-       HENHMETAFILE    hemf,\r
-       UINT            BufSize,\r
-       LPBYTE          Buffer\r
-       );\r
-\r
-/* Meta are user-mode. */\r
-UINT\r
-STDCALL\r
-NtGdiGetEnhMetaFileDescription (\r
-       HENHMETAFILE    hemf,\r
-       UINT            BufSize,\r
-       LPWSTR          Description\r
-       );\r
-\r
-/* Meta are user-mode. */\r
-UINT\r
-STDCALL\r
-NtGdiGetEnhMetaFileHeader (\r
-       HENHMETAFILE    hemf,\r
-       UINT            BufSize,\r
-       LPENHMETAHEADER emh\r
-       );\r
-\r
-/* Meta are user-mode. */\r
-UINT\r
-STDCALL\r
-NtGdiGetEnhMetaFilePaletteEntries (\r
-       HENHMETAFILE    hemf,\r
-       UINT            Entries,\r
-       LPPALETTEENTRY  pe\r
-       );\r
-\r
-/* Meta are user-mode. */\r
-UINT\r
-STDCALL\r
-NtGdiGetEnhMetaFilePixelFormat(HENHMETAFILE  hEMF,\r
-                                    DWORD  BufSize, \r
-                                    CONST PPIXELFORMATDESCRIPTOR  pfd);\r
-\r
-/* Should be done in user-mode. */\r
-DWORD\r
-STDCALL\r
-NtGdiGetFontLanguageInfo(HDC  hDC);\r
-\r
-/* Should be done in user-mode. */\r
-int\r
-STDCALL\r
-NtGdiGetGraphicsMode ( HDC hDC );\r
-\r
-/* Should be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiGetICMProfile(HDC  hDC,  \r
-                        LPDWORD  NameSize,\r
-                        LPWSTR  Filename);\r
-\r
-/* Should be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiGetLogColorSpace(HCOLORSPACE  hColorSpace,\r
-                           LPLOGCOLORSPACEW  Buffer,\r
-                           DWORD  Size);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-INT STDCALL  NtGdiGetMapMode(HDC  hDC);\r
-\r
-/* Meta files are user-mode. */\r
-HMETAFILE\r
-STDCALL\r
-NtGdiGetMetaFile (\r
-       LPCWSTR MetaFile\r
-       );\r
-\r
-/* Meta files are user-mode. */\r
-UINT\r
-STDCALL\r
-NtGdiGetMetaFileBitsEx (\r
-       HMETAFILE       hmf,\r
-       UINT            Size,\r
-       LPVOID          Data\r
-       );\r
-\r
-/* Meta files are user-mode. */\r
-int\r
-STDCALL\r
-NtGdiGetMetaRgn (\r
-       HDC     hDC,\r
-       HRGN    hrgn\r
-       );\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-INT STDCALL  NtGdiGetObject(HGDIOBJ  hGDIObj,\r
-                           INT  BufSize,\r
-                           LPVOID  Object);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-DWORD STDCALL  NtGdiGetObjectType(HGDIOBJ  hGDIObj);\r
-\r
-/* Use NtGdiGetOutlineTextMetricsInternalW. */\r
-UINT\r
-STDCALL\r
-NtGdiGetOutlineTextMetrics(HDC  hDC,\r
-                                UINT  Data,\r
-                                LPOUTLINETEXTMETRICW otm);\r
-\r
-/* Use NtGdiDoPalette with GdiPalGetEntries. */\r
-UINT\r
-STDCALL\r
-NtGdiGetPaletteEntries (\r
-       HPALETTE        hpal,\r
-       UINT            StartIndex,\r
-       UINT            Entries,\r
-       LPPALETTEENTRY  pe\r
-       );\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-INT\r
-STDCALL\r
-NtGdiGetPixelFormat(HDC  hDC);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-INT STDCALL  NtGdiGetPolyFillMode(HDC  hDC);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-INT STDCALL  NtGdiGetROP2(HDC  hDC);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-INT STDCALL  NtGdiGetRelAbs(HDC  hDC);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-INT STDCALL  NtGdiGetStretchBltMode(HDC  hDC);\r
-\r
-/* Use NtGdiDoPalette with GdiPalSetSystemEntries. */\r
-UINT\r
-STDCALL\r
-NtGdiGetSystemPaletteEntries (\r
-       HDC             hDC,\r
-       UINT            StartIndex,\r
-       UINT            Entries,\r
-       LPPALETTEENTRY  pe\r
-       );\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-UINT STDCALL  NtGdiGetTextAlign(HDC  hDC);\r
-\r
-/* Should be done in user-mode using shared GDI Objects. */\r
-UINT\r
-STDCALL\r
-NtGdiGetTextCharset(HDC  hDC);\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-COLORREF STDCALL  NtGdiGetTextColor(HDC  hDC);\r
-\r
-/* Rename to NtGdiGetTextExtentExW. Add 0 at the end. */\r
-BOOL\r
-STDCALL\r
-NtGdiGetTextExtentExPoint(HDC  hDC,\r
-                               LPCWSTR String,\r
-                               int  Count,\r
-                               int  MaxExtent,\r
-                               LPINT  Fit,\r
-                               LPINT  Dx,\r
-                               LPSIZE  Size);\r
-\r
-/* Rename to NtGdiGetTextExtent. Add 0 at the end. */\r
-BOOL\r
-STDCALL\r
-NtGdiGetTextExtentPoint(HDC  hDC,\r
-                             LPCWSTR  String,\r
-                             int  Count,\r
-                             LPSIZE  Size);\r
-\r
-/* Rename to NtGdiGetTextFaceW, add FALSE at the end. */\r
-int\r
-STDCALL\r
-NtGdiGetTextFace(HDC  hDC,\r
-                     int  Count,\r
-                     LPWSTR  FaceName);\r
-\r
-/* Use NtGdiGetTextMetricsW with 0 at the end */\r
-BOOL\r
-STDCALL\r
-NtGdiGetTextMetrics(HDC  hDC,\r
-                         LPTEXTMETRICW  tm);\r
-\r
-/* Use NtGdiGetDCPoint with GdiGetViewPortExt */\r
-BOOL STDCALL  NtGdiGetViewportExtEx(HDC  hDC, LPSIZE viewportExt);\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL STDCALL  NtGdiGetViewportOrgEx(HDC  hDC, LPPOINT viewportOrg);\r
-\r
-/* Metafiles are user-mode. */\r
-UINT\r
-STDCALL\r
-NtGdiGetWinMetaFileBits (\r
-       HENHMETAFILE    hemf,\r
-       UINT            BufSize,\r
-       LPBYTE          Buffer,\r
-       INT             MapMode,\r
-       HDC             Ref\r
-       );\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL STDCALL  NtGdiGetWindowExtEx(HDC  hDC, LPSIZE windowExt);\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL STDCALL  NtGdiGetWindowOrgEx(HDC  hDC, LPPOINT windowOrg);\r
-\r
-/* Use NtGdiGetTransform with GdiWorldSpaceToPageSpace */\r
-BOOL\r
-STDCALL\r
-NtGdiGetWorldTransform (\r
-       HDC     hDC,\r
-       LPXFORM Xform\r
-       );\r
-\r
-/* Use NtGdiTransformPoints with GdiDpToLp */\r
-BOOL\r
-STDCALL\r
-NtGdiLPtoDP (\r
-       HDC     hDC,\r
-       LPPOINT Points,\r
-       int     Count\r
-       );\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiMoveToEx(HDC  hDC,\r
-                   int  X,\r
-                   int  Y,\r
-                   LPPOINT  Point);\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiOffsetViewportOrgEx (\r
-       HDC     hDC,\r
-       int     XOffset,\r
-       int     YOffset,\r
-       LPPOINT Point\r
-       );\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiOffsetWindowOrgEx (\r
-       HDC     hDC,\r
-       int     XOffset,\r
-       int     YOffset,\r
-       LPPOINT Point\r
-       );\r
-\r
-/* Use NtGdiFillRgn. Add 0 at the end. */\r
-BOOL\r
-STDCALL\r
-NtGdiPaintRgn(HDC  hDC,\r
-                   HRGN  hRgn);\r
-\r
-/* Use NtGdiArcInternal with GdiTypePie. */\r
-BOOL\r
-STDCALL\r
-NtGdiPie(HDC  hDC,\r
-              int  LeftRect,\r
-              int  TopRect,\r
-              int  RightRect,\r
-              int  BottomRect,\r
-              int  XRadial1,\r
-              int  YRadial1,\r
-              int  XRadial2,\r
-              int  YRadial2);\r
-\r
-/* Metafiles are user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiPlayEnhMetaFile (\r
-       HDC             hDC,\r
-       HENHMETAFILE    hemf,\r
-       CONST PRECT     Rect\r
-       );\r
-\r
-/* Metafiles are user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiPlayEnhMetaFileRecord (\r
-       HDC                     hDC,\r
-       LPHANDLETABLE           Handletable,\r
-       CONST ENHMETARECORD     * EnhMetaRecord,\r
-       UINT                    Handles\r
-       );\r
-\r
-/* Metafiles are user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiPlayMetaFile (\r
-       HDC             hDC,\r
-       HMETAFILE       hmf\r
-       );\r
-\r
-/* Metafiles are user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiPlayMetaFileRecord (\r
-       HDC             hDC,\r
-       LPHANDLETABLE   Handletable,\r
-       LPMETARECORD    MetaRecord,\r
-       UINT            Handles\r
-       );\r
-\r
-/* Use NtGdiPolyPolyDraw with GdiPolyBezier. */\r
-BOOL\r
-STDCALL\r
-NtGdiPolyBezier(HDC  hDC,\r
-                     CONST LPPOINT  pt,\r
-                     DWORD  Count);\r
-\r
-/* Use NtGdiPolyPolyDraw with GdiPolyBezierTo. */\r
-BOOL\r
-STDCALL\r
-NtGdiPolyBezierTo(HDC  hDC,\r
-                       CONST LPPOINT  pt,\r
-                       DWORD  Count);\r
-\r
-/* Use NtGdiPolyPolyDraw with GdiPolyPolyLine. */\r
-BOOL\r
-STDCALL\r
-NtGdiPolyline(HDC  hDC,\r
-                   CONST LPPOINT  pt,\r
-                   int  Count);\r
-\r
-/* Use NtGdiPolyPolyDraw with GdiPolyLineTo. */\r
-BOOL\r
-STDCALL\r
-NtGdiPolylineTo(HDC  hDC,\r
-                     CONST LPPOINT  pt,\r
-                     DWORD  Count);\r
-\r
-/* Use NtGdiPolyPolyDraw with GdiPolyPolyLine. */\r
-BOOL\r
-STDCALL\r
-NtGdiPolyPolyline(HDC  hDC,\r
-                       CONST LPPOINT  pt,\r
-                       CONST LPDWORD  PolyPoints,\r
-                       DWORD  Count);\r
-\r
-/* Use NtGdiPolyTextOutW with 0 at the end. */\r
-BOOL\r
-STDCALL\r
-NtGdiPolyTextOut(HDC  hDC,\r
-                      CONST LPPOLYTEXTW txt,\r
-                      int  Count);\r
-\r
-/* Use NtGdiPolyPolyDraw with GdiPolyPolygon. */\r
-BOOL\r
-STDCALL\r
-NtGdiPolygon(HDC  hDC,\r
-                  CONST PPOINT  Points,\r
-                  int  Count);\r
-\r
-/* Use NtGdiPolyPolyDraw with GdiPolyPolygon. */\r
-BOOL\r
-STDCALL\r
-NtGdiPolyPolygon(HDC  hDC,\r
-                      CONST LPPOINT  Points,\r
-                      CONST LPINT  PolyCounts,\r
-                      int  Count);\r
-\r
-/* Call UserRealizePalette. */\r
-UINT\r
-STDCALL\r
-NtGdiRealizePalette (\r
-       HDC     hDC\r
-       );\r
-\r
-/* Should be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiRemoveFontResource(LPCWSTR  FileName);\r
-\r
-/* Use NtGdiExtSelectClipRgn with RGN_COPY. */\r
-int\r
-STDCALL\r
-NtGdiSelectClipRgn (\r
-       HDC     hDC,\r
-       HRGN    hrgn\r
-       );\r
-\r
-/* Should be done in user-mode. */\r
-HGDIOBJ STDCALL  NtGdiSelectObject(HDC  hDC, HGDIOBJ  hGDIObj);\r
-\r
-/* Use NtUserSelectPalette. */\r
-HPALETTE\r
-STDCALL\r
-NtGdiSelectPalette (\r
-       HDC             hDC,\r
-       HPALETTE        hpal,\r
-       BOOL            ForceBackground\r
-       );\r
-\r
-/* Should be done in user-mode. */\r
-INT\r
-STDCALL\r
-NtGdiSetAbortProc(HDC  hDC,\r
-                      ABORTPROC  AbortProc);\r
-\r
-/* Use NtGdiGetAndSetDCDword with GdiGetSetArcDirection. */\r
-int\r
-STDCALL\r
-NtGdiSetArcDirection(HDC  hDC,\r
-                         int  ArcDirection);\r
-\r
-/* Use NtGdiSetBitmapDimension. */\r
-BOOL\r
-STDCALL\r
-NtGdiSetBitmapDimensionEx (\r
-       HBITMAP hBitmap,\r
-       INT     Width,\r
-       INT     Height,\r
-       LPSIZE  Size\r
-       );\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-COLORREF STDCALL NtGdiSetBkColor (HDC hDC, COLORREF Color);\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-INT STDCALL  NtGdiSetBkMode(HDC  hDC, INT  backgroundMode);\r
-\r
-/* Use NtGdiSetBrushOrg. */\r
-BOOL STDCALL\r
-NtGdiSetBrushOrgEx(\r
-   HDC hDC,\r
-   INT XOrg,\r
-   INT YOrg,\r
-   LPPOINT Point);\r
-\r
-/* Use NtGdiDoPalette with GdiPalSetColorTable, TRUE. */\r
-UINT\r
-STDCALL\r
-NtGdiSetDIBColorTable (\r
-       HDC             hDC,\r
-       UINT            StartIndex,\r
-       UINT            Entries,\r
-       CONST RGBQUAD   * Colors\r
-       );\r
-\r
-/* Use SetDIBitsToDevice in gdi32. */\r
-INT\r
-STDCALL\r
-NtGdiSetDIBits (\r
-       HDC                     hDC,\r
-       HBITMAP                 hBitmap,\r
-       UINT                    StartScan,\r
-       UINT                    ScanLines,\r
-       CONST VOID              * Bits,\r
-       CONST BITMAPINFO        * bmi,\r
-       UINT                    ColorUse\r
-       );\r
-\r
-/* Use NtGdiSetDIBitsToDeviceInternal. */\r
-INT\r
-STDCALL\r
-NtGdiSetDIBitsToDevice (\r
-       HDC                     hDC,\r
-       INT                     XDest,\r
-       INT                     YDest,\r
-       DWORD                   Width,\r
-       DWORD                   Height,\r
-       INT                     XSrc,\r
-       INT                     YSrc,\r
-       UINT                    StartScan,\r
-       UINT                    ScanLines,\r
-       CONST VOID              * Bits,\r
-       CONST BITMAPINFO        * bmi,\r
-       UINT                    ColorUse\r
-       );\r
-\r
-/* Metafiles are user-mode. */\r
-HENHMETAFILE\r
-STDCALL\r
-NtGdiSetEnhMetaFileBits (\r
-       UINT            BufSize,\r
-       CONST PBYTE     Data\r
-       );\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-int\r
-STDCALL\r
-NtGdiSetGraphicsMode (\r
-       HDC     hDC,\r
-       int     Mode\r
-       );\r
-\r
-/* Use NtGdiSetIcmMode. */\r
-INT\r
-STDCALL\r
-NtGdiSetICMMode(HDC  hDC,\r
-                    INT  EnableICM);\r
-\r
-/* Should be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiSetICMProfile(HDC  hDC,\r
-                        LPWSTR  Filename);\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-int\r
-STDCALL\r
-NtGdiSetMapMode (\r
-       HDC     hDC,\r
-       int     MapMode\r
-       );\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-DWORD\r
-STDCALL\r
-NtGdiSetMapperFlags(HDC  hDC,\r
-                          DWORD  Flag);\r
-\r
-/* Metafiles are user-mode. */\r
-HMETAFILE\r
-STDCALL\r
-NtGdiSetMetaFileBitsEx (\r
-       UINT            Size,\r
-       CONST PBYTE     Data\r
-       );\r
-\r
-/* Use NtGdiDoPalette with GdiPalSetEntries, TRUE. */\r
-UINT\r
-STDCALL\r
-NtGdiSetPaletteEntries (\r
-       HPALETTE                hpal,\r
-       UINT                    Start,\r
-       UINT                    Entries,\r
-       CONST LPPALETTEENTRY    pe\r
-       );\r
-\r
-/* Use NtGdiSetPixel(hdc, x, y, color) != CLR_INVALID; */\r
-BOOL\r
-STDCALL\r
-NtGdiSetPixelV (\r
-       HDC             hDC,\r
-       INT             X,\r
-       INT             Y,\r
-       COLORREF        Color\r
-       );\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-INT STDCALL  NtGdiSetPolyFillMode(HDC  hDC, INT polyFillMode);\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-INT STDCALL  NtGdiSetROP2(HDC  hDC, INT  ROPmode);\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-INT STDCALL  NtGdiSetStretchBltMode(HDC  hDC, INT  stretchBltMode);\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-UINT\r
-STDCALL\r
-NtGdiSetTextAlign(HDC  hDC,\r
-                       UINT  Mode);\r
-\r
-/* Needs to be done in user-mode, using shared GDI Object Attributes. */\r
-COLORREF STDCALL  NtGdiSetTextColor(HDC hDC, COLORREF color);\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiSetWindowExtEx (\r
-       HDC     hDC,\r
-       int     XExtent,\r
-       int     YExtent,\r
-       LPSIZE  Size\r
-       );\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiSetViewportOrgEx (\r
-       HDC     hDC,\r
-       int     X,\r
-       int     Y,\r
-       LPPOINT Point\r
-       );\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiSetViewportExtEx (\r
-       HDC     hDC,\r
-       int     XExtent,\r
-       int     YExtent,\r
-       LPSIZE  Size\r
-       );\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiSetWindowOrgEx (\r
-       HDC     hDC,\r
-       int     X,\r
-       int     Y,\r
-       LPPOINT Point\r
-       );\r
-\r
-/* Use NtGdiModifyWorldTransform with MWT_MAX + 1; */\r
-BOOL\r
-STDCALL\r
-NtGdiSetWorldTransform (\r
-       HDC             hDC,\r
-       CONST LPXFORM   Xform\r
-       );\r
-\r
-/* Use NtGdiStretchDIBitsInternal. */\r
-INT\r
-STDCALL\r
-NtGdiStretchDIBits (\r
-       HDC                     hDC,\r
-       INT                     XDest,\r
-       INT                     YDest,\r
-       INT                     DestWidth,\r
-       INT                     DestHeight,\r
-       INT                     XSrc,\r
-       INT                     YSrc,\r
-       INT                     SrcWidth,\r
-       INT                     SrcHeight,\r
-       CONST VOID              * Bits,\r
-       CONST BITMAPINFO        * BitsInfo,\r
-       UINT                    Usage,\r
-       DWORD                   ROP\r
-       );\r
-\r
-/* Use NtGdiExtTextOutW with 0, 0 at the end. */\r
-BOOL\r
-STDCALL\r
-NtGdiTextOut(HDC  hDC,\r
-                  int  XStart,\r
-                  int  YStart,\r
-                  LPCWSTR  String,\r
-                  int  Count);\r
-\r
-/* Needs to be done in user-mode. */\r
-BOOL\r
-STDCALL\r
-NtGdiUpdateICMRegKey(DWORD  Reserved,  \r
-                          LPWSTR  CMID, \r
-                          LPWSTR  Filename,\r
-                          UINT  Command);\r
-\r
-/* These shouldn't even be called NtGdi */\r
-HDC STDCALL  NtGdiGetDCState(HDC  hDC);\r
-WORD STDCALL NtGdiSetHookFlags(HDC hDC, WORD Flags);\r
-INT\r
-STDCALL\r
-NtGdiSelectVisRgn(HDC hdc,\r
-                     HRGN hrgn);\r
-VOID STDCALL NtGdiSetDCState ( HDC hDC, HDC hDCSave );\r
-\r
-/* All this Should be in user-mode, not NtUser calls. Especially not in GDI! */\r
-DWORD\r
-NTAPI\r
-NtUserCallTwoParam(\r
-  DWORD Param1,\r
-  DWORD Param2,\r
-  DWORD Routine);\r
-\r
-#define TWOPARAM_ROUTINE_SETDCPENCOLOR      0x45\r
-#define TWOPARAM_ROUTINE_SETDCBRUSHCOLOR    0x46\r
-#define TWOPARAM_ROUTINE_GETDCCOLOR         0x47\r
-\r
-#define NtUserGetDCBrushColor(hbr) \\r
-  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_BRUSH, TWOPARAM_ROUTINE_GETDCCOLOR)\r
-\r
-#define NtUserGetDCPenColor(hbr) \\r
-  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_PEN, TWOPARAM_ROUTINE_GETDCCOLOR)\r
-\r
-#define NtUserSetDCBrushColor(hbr, crColor) \\r
-  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), (DWORD)crColor, TWOPARAM_ROUTINE_SETDCBRUSHCOLOR)\r
-\r
-#define NtUserSetDCPenColor(hbr, crColor) \\r
-  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), (DWORD)crColor, TWOPARAM_ROUTINE_SETDCPENCOLOR)\r
-\r
-#endif /* WIN32K_NTGDI_BAD_INCLUDED */\r
diff --git a/reactos/include/win32k/ntgdihdl.h b/reactos/include/win32k/ntgdihdl.h
deleted file mode 100644 (file)
index 363050f..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*\r
- * COPYRIGHT:       See COPYING in the top level directory\r
- * PROJECT:         ReactOS Win32 Graphical Subsystem (WIN32K)\r
- * FILE:            include/win32k/ntgdihal.h\r
- * PURPOSE:         Win32 Shared GDI Handle/Object Types\r
- * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)\r
- */\r
-\r
-/* INCLUDES ******************************************************************/\r
-\r
-#ifndef _NTGDIHDL_\r
-#define _NTGDIHDL_\r
-\r
-/* DEFINES *******************************************************************/\r
-\r
-/* Base address where the handle table is mapped to */\r
-#define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000)\r
-\r
-/* GDI handle table can hold 0x4000 handles */\r
-#define GDI_HANDLE_COUNT 0x4000\r
-#define GDI_GLOBAL_PROCESS (0x0)\r
-\r
-/* Handle Masks and shifts */\r
-#define GDI_HANDLE_INDEX_MASK (GDI_HANDLE_COUNT - 1)\r
-#define GDI_HANDLE_TYPE_MASK  0x007f0000\r
-#define GDI_HANDLE_STOCK_MASK 0x00800000\r
-#define GDI_HANDLE_REUSE_MASK 0xff000000\r
-#define GDI_HANDLE_REUSECNT_SHIFT 24\r
-\r
-/*! \defgroup GDI object types\r
- *\r
- *  GDI object types\r
- *\r
- */\r
-/*@{*/\r
-#define GDI_OBJECT_TYPE_DC          0x00010000\r
-#define GDI_OBJECT_TYPE_REGION      0x00040000\r
-#define GDI_OBJECT_TYPE_BITMAP      0x00050000\r
-#define GDI_OBJECT_TYPE_PALETTE     0x00080000\r
-#define GDI_OBJECT_TYPE_FONT        0x000a0000\r
-#define GDI_OBJECT_TYPE_BRUSH       0x00100000\r
-#define GDI_OBJECT_TYPE_EMF         0x00210000\r
-#define GDI_OBJECT_TYPE_PEN         0x00300000\r
-#define GDI_OBJECT_TYPE_EXTPEN      0x00500000\r
-/* Following object types made up for ROS */\r
-#define GDI_OBJECT_TYPE_METADC      0x00710000\r
-#define GDI_OBJECT_TYPE_METAFILE    0x00720000\r
-#define GDI_OBJECT_TYPE_ENHMETAFILE 0x00730000\r
-#define GDI_OBJECT_TYPE_ENHMETADC   0x00740000\r
-#define GDI_OBJECT_TYPE_MEMDC       0x00750000\r
-#define GDI_OBJECT_TYPE_DCE         0x00770000\r
-#define GDI_OBJECT_TYPE_DONTCARE    0x007f0000\r
-/** Not really an object type. Forces GDI_FreeObj to be silent. */\r
-#define GDI_OBJECT_TYPE_SILENT      0x80000000\r
-/*@}*/\r
-\r
-/* Handle macros */\r
-#define GDI_HANDLE_CREATE(i, t)    \\r
-    ((HANDLE)(((i) & GDI_HANDLE_INDEX_MASK) | ((t) & GDI_HANDLE_TYPE_MASK)))\r
-\r
-#define GDI_HANDLE_GET_INDEX(h)    \\r
-    (((ULONG_PTR)(h)) & GDI_HANDLE_INDEX_MASK)\r
-\r
-#define GDI_HANDLE_GET_TYPE(h)     \\r
-    (((ULONG_PTR)(h)) & GDI_HANDLE_TYPE_MASK)\r
-\r
-#define GDI_HANDLE_IS_TYPE(h, t)   \\r
-    ((t) == (((ULONG_PTR)(h)) & GDI_HANDLE_TYPE_MASK))\r
-\r
-#define GDI_HANDLE_IS_STOCKOBJ(h)  \\r
-    (0 != (((ULONG_PTR)(h)) & GDI_HANDLE_STOCK_MASK))\r
-\r
-#define GDI_HANDLE_SET_STOCKOBJ(h) \\r
-    ((h) = (HANDLE)(((ULONG_PTR)(h)) | GDI_HANDLE_STOCK_MASK))\r
-\r
-/* TYPES *********************************************************************/\r
-\r
-typedef struct _GDI_TABLE_ENTRY\r
-{\r
-    PVOID KernelData; /* Points to the kernel mode structure */\r
-    HANDLE ProcessId; /* process id that created the object, 0 for stock objects */\r
-    LONG Type;        /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */\r
-    PVOID UserData;   /* Points to the user mode structure, usually NULL though */\r
-} GDI_TABLE_ENTRY, *PGDI_TABLE_ENTRY;\r
-\r
-#endif\r
diff --git a/reactos/include/win32k/ntgdityp.h b/reactos/include/win32k/ntgdityp.h
deleted file mode 100644 (file)
index 93ba590..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*\r
- * COPYRIGHT:       See COPYING in the top level directory\r
- * PROJECT:         ReactOS Win32 Graphical Subsystem (WIN32K)\r
- * FILE:            include/win32k/ntgdityp.h\r
- * PURPOSE:         Win32 Shared GDI Types for NtGdi*\r
- * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)\r
- */\r
-\r
-/* INCLUDES ******************************************************************/\r
-\r
-#ifndef _NTGDITYP_\r
-#define _NTGDITYP_\r
-\r
-/* ENUMERATIONS **************************************************************/\r
-\r
-typedef enum _ARCTYPE\r
-{\r
-    GdiTypeArc,\r
-    GdiTypeArcTo,\r
-    GdiTypeChord,\r
-    GdiTypePie,\r
-} ARCTYPE, *PARCTYPE;\r
-\r
-typedef enum _PALFUNCTYPE\r
-{\r
-    GdiPalAnimate,\r
-    GdiPalSetEntries,\r
-    GdiPalGetEntries,\r
-    GdiPalGetSystemEntries,\r
-    GdiPalSetColorTable,\r
-    GdiPalGetColorTable,\r
-} PALFUNCTYPE, *PPALFUNCTYPE;\r
-\r
-typedef enum _POLYFUNCTYPE\r
-{\r
-    GdiPolyPolygon = 1,\r
-    GdiPolyPolyLine,\r
-    GdiPolyBezier,\r
-    GdiPolyLineTo,\r
-    GdiPolyBezierTo,\r
-    GdiPolyPolyRgn,\r
-} POLYFUNCTYPE, *PPOLYFUNCTYPE;\r
-\r
-typedef enum _GETDCDWORD\r
-{\r
-    GdiGetRelAbs = 1,\r
-    GdiGetArcDirection = 4,\r
-} GETDCDWORD, *PGETDCDWORD;\r
-\r
-typedef enum _GETSETDCDWORD\r
-{\r
-    GdiGetSetArcDirection = 9,\r
-} GETSETDCDWORD, *PGETSETDCDWORD;\r
-\r
-typedef enum _GETDCPOINT\r
-{\r
-    GdiGetViewPortExt = 1,\r
-    GdiGetDCOrg = 7,\r
-} GETDCPOINT, *PGETDCPOINT;\r
-\r
-typedef enum _TRANSFORMTYPE\r
-{\r
-    GdiDpToLp,\r
-    GdiLpToDp,\r
-} TRANSFORMTYPE, *PTRANSFORMTYPE;\r
-\r
-#define GdiWorldSpaceToPageSpace    0x203\r
-\r
-/* FIXME: Unknown */\r
-typedef DWORD FULLSCREENCONTROL;\r
-typedef DWORD LFTYPE;\r
-\r
-/* TYPES *********************************************************************/\r
-\r
-typedef PVOID KERNEL_PVOID;\r
-typedef DWORD UNIVERSAL_FONT_ID;\r
-typedef UNIVERSAL_FONT_ID *PUNIVERSAL_FONT_ID;\r
-typedef DWORD CHWIDTHINFO;\r
-typedef CHWIDTHINFO *PCHWIDTHINFO;\r
-typedef D3DNTHAL_CONTEXTCREATEDATA D3DNTHAL_CONTEXTCREATEI;\r
-\r
-/* FIXME: Unknown; easy to guess, usually based on public types and converted */\r
-typedef struct _WIDTHDATA WIDTHDATA, *PWIDTHDATA;\r
-typedef struct _TMDIFF TMDIFF, *PTMDIFF;\r
-typedef struct _TMW_INTERNAL TMW_INTERNAL, *PTMW_INTERNAL;\r
-typedef struct _ENUMFONTDATAW ENUMFONTDATAW, *PENUMFONTDATAW;\r
-typedef struct _DEVCAPS DEVCAPS, *PDEVCAPS;\r
-typedef struct _REALIZATION_INFO REALIZATION_INFO, *PREALIZATION_INFO;\r
-\r
-#endif\r
index 7c4f6cb..8f75340 100644 (file)
 #define __WIN32K_NTUSER_H
 
 
-DWORD
-NTAPI
-NtUserBuildMenuItemList(
- HMENU hMenu,
- PVOID Buffer,
- ULONG nBufSize,
- DWORD Reserved);
-
-DWORD
-NTAPI
-NtUserCheckMenuItem(
-  HMENU hmenu,
-  UINT uIDCheckItem,
-  UINT uCheck);
-
-HMENU
-NTAPI
-NtUserCreateMenu(BOOL PopupMenu);
-
-BOOL
-NTAPI
-NtUserDeleteMenu(
-  HMENU hMenu,
-  UINT uPosition,
-  UINT uFlags);
-
-BOOL
-NTAPI
-NtUserDestroyMenu(
-  HMENU hMenu);
-
-DWORD
-NTAPI
-NtUserDrawMenuBarTemp(
-  HWND hWnd,
-  HDC hDC,
-  PRECT hRect,
-  HMENU hMenu,
-  HFONT hFont);
-
-UINT
-NTAPI
-NtUserEnableMenuItem(
-  HMENU hMenu,
-  UINT uIDEnableItem,
-  UINT uEnable);
-  
-DWORD
-NTAPI
-NtUserInsertMenuItem(
-  HMENU hMenu,
-  UINT uItem,
-  BOOL fByPosition,
-  LPCMENUITEMINFOW lpmii);
-
-BOOL
-NTAPI
-NtUserEndMenu(VOID);
-
-UINT NTAPI
-NtUserGetMenuDefaultItem(
-  HMENU hMenu,
-  UINT fByPos,
-  UINT gmdiFlags);
-
-BOOL
-NTAPI
-NtUserGetMenuBarInfo(
-  HWND hwnd,
-  LONG idObject,
-  LONG idItem,
-  PMENUBARINFO pmbi);
-
-UINT
-NTAPI
-NtUserGetMenuIndex(
-  HMENU hMenu,
-  UINT wID);
-
-BOOL
-NTAPI
-NtUserGetMenuItemRect(
-  HWND hWnd,
-  HMENU hMenu,
-  UINT uItem,
-  LPRECT lprcItem);
-
-HMENU
-NTAPI
-NtUserGetSystemMenu(
-  HWND hWnd,
-  BOOL bRevert);
-
-BOOL
-NTAPI
-NtUserHiliteMenuItem(
-  HWND hwnd,
-  HMENU hmenu,
-  UINT uItemHilite,
-  UINT uHilite);
-
-BOOL
-NTAPI
-NtUserMenuInfo(
- HMENU hmenu,
- PROSMENUINFO lpmi,
- BOOL fsog
-);
-
-int
-NTAPI
-NtUserMenuItemFromPoint(
-  HWND hWnd,
-  HMENU hMenu,
-  DWORD X,
-  DWORD Y);
-
-BOOL
-NTAPI
-NtUserMenuItemInfo(
- HMENU hMenu,
- UINT uItem,
- BOOL fByPosition,
- PROSMENUITEMINFO lpmii,
- BOOL fsog
-);
-
-BOOL
-NTAPI
-NtUserRemoveMenu(
-  HMENU hMenu,
-  UINT uPosition,
-  UINT uFlags);
-
-BOOL
-NTAPI
-NtUserSetMenu(
-  HWND hWnd,
-  HMENU hMenu,
-  BOOL bRepaint);
-
-BOOL
-NTAPI
-NtUserSetMenuContextHelpId(
-  HMENU hmenu,
-  DWORD dwContextHelpId);
-
-BOOL
-NTAPI
-NtUserSetMenuDefaultItem(
-  HMENU hMenu,
-  UINT uItem,
-  UINT fByPos);
-
-BOOL
-NTAPI
-NtUserSetMenuFlagRtoL(
-  HMENU hMenu);
-
-BOOL
-NTAPI
-NtUserSetSystemMenu(
-  HWND hWnd,
-  HMENU hMenu);
-
-DWORD
-NTAPI
-NtUserThunkedMenuInfo(
-  HMENU hMenu,
-  LPCMENUINFO lpcmi);
-
-DWORD
-NTAPI
-NtUserThunkedMenuItemInfo(
-  HMENU hMenu,
-  UINT uItem,
-  BOOL fByPosition,
-  BOOL bInsert,
-  LPMENUITEMINFOW lpmii,
-  PUNICODE_STRING lpszCaption);
-
-BOOL
-NTAPI
-NtUserTrackPopupMenuEx(
-  HMENU hmenu,
-  UINT fuFlags,
-  int x,
-  int y,
-  HWND hwnd,
-  LPTPMPARAMS lptpm);
-
-ULONG NTAPI
+ULONG STDCALL
 NtUserGetSystemMetrics(ULONG Index);
 
-DWORD NTAPI
+DWORD STDCALL
 NtUserGetClassLong(HWND hWnd, DWORD Offset, BOOL Ansi);
 
-LONG NTAPI
+LONG STDCALL
 NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi);
 
-INT NTAPI
+INT STDCALL
 NtUserReleaseDC(HWND hWnd, HDC hDc);
 
-BOOL NTAPI
+BOOL STDCALL
 NtUserGetWindowRect(HWND hWnd, LPRECT Rect);
 
-BOOL NTAPI
+BOOL STDCALL
 NtUserGetClientRect(HWND hWnd, LPRECT Rect);
 
-HANDLE NTAPI
+HANDLE STDCALL
 NtUserGetProp(HWND hWnd, ATOM Atom);
 
-BOOL NTAPI
+BOOL STDCALL
 NtUserGetClientOrigin(HWND hWnd, LPPOINT Point);
 
-HWND NTAPI
+HWND STDCALL
 NtUserGetDesktopWindow();
 
 NTSTATUS
-NTAPI
+STDCALL
 NtUserAcquireOrReleaseInputOwnership(
   BOOLEAN Release);
 
 DWORD
-NTAPI
+STDCALL
 NtUserActivateKeyboardLayout(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserAlterWindowStyle(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserAttachThreadInput(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
-HDC NTAPI
+HDC STDCALL
 NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* lPs);
 
 DWORD
-NTAPI
+STDCALL
 NtUserBitBltSysBmp(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -261,12 +70,12 @@ NtUserBitBltSysBmp(
   DWORD Unknown7);
 
 BOOL
-NTAPI
+STDCALL
 NtUserBlockInput(
   BOOL BlockIt);
 
 ULONG
-NTAPI
+STDCALL
 NtUserBuildHwndList(
   HDESK hDesktop,
   HWND hwndParent,
@@ -276,7 +85,7 @@ NtUserBuildHwndList(
   HWND* pWnd,
   ULONG nBufSize);
 
-NTSTATUS NTAPI
+NTSTATUS STDCALL
 NtUserBuildNameList(
    HWINSTA hWinSta,
    ULONG dwSize,
@@ -284,7 +93,7 @@ NtUserBuildNameList(
    PULONG pRequiredSize);
 
 NTSTATUS
-NTAPI
+STDCALL
 NtUserBuildPropList(
   HWND hWnd,
   LPVOID Buffer,
@@ -297,7 +106,7 @@ enum {
 };
 
 DWORD
-NTAPI
+STDCALL
 NtUserCallHwnd(
   DWORD Unknown0,
   DWORD Unknown1);
@@ -308,7 +117,7 @@ NtUserCallHwnd(
 #define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW       0x5B
 #define HWNDLOCK_ROUTINE_UPDATEWINDOW              0x5E
 BOOL
-NTAPI
+STDCALL
 NtUserCallHwndLock(
   HWND hWnd,
   DWORD Routine);
@@ -316,33 +125,33 @@ NtUserCallHwndLock(
 #define HWNDOPT_ROUTINE_SETPROGMANWINDOW       0x4A
 #define HWNDOPT_ROUTINE_SETTASKMANWINDOW       0x4B
 HWND
-NTAPI
+STDCALL
 NtUserCallHwndOpt(
   HWND Param,
   DWORD Routine);
 
 DWORD
-NTAPI
+STDCALL
 NtUserCallHwndParam(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserCallHwndParamLock(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 BOOL
-NTAPI
+STDCALL
 NtUserCallMsgFilter(
   LPMSG msg,
   INT code);
  
 LRESULT
-NTAPI
+STDCALL
 NtUserCallNextHookEx(
   HHOOK Hook,
   int Code,
@@ -358,7 +167,7 @@ NtUserCallNextHookEx(
 #define NOPARAM_ROUTINE_ANYPOPUP              0xffff0006
 #define NOPARAM_ROUTINE_CSRSS_INITIALIZED     0xffff0007
 DWORD
-NTAPI
+STDCALL
 NtUserCallNoParam(
   DWORD Routine);
 
@@ -380,7 +189,7 @@ NtUserCallNoParam(
 #define ONEPARAM_ROUTINE_GETKEYBOARDTYPE      0x28
 #define ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT    0x29
 DWORD
-NTAPI
+STDCALL
 NtUserCallOneParam(
   DWORD Param,
   DWORD Routine);
@@ -413,20 +222,20 @@ NtUserCallOneParam(
 #define TWOPARAM_ROUTINE_SETSYSCOLORS       0x66
 #define TWOPARAM_ROUTINE_ROS_SHOWWINDOW     0x1000
 DWORD
-NTAPI
+STDCALL
 NtUserCallTwoParam(
   DWORD Param1,
   DWORD Param2,
   DWORD Routine);
 
 BOOL
-NTAPI
+STDCALL
 NtUserChangeClipboardChain(
   HWND hWndRemove,
   HWND hWndNewNext);
 
 LONG
-NTAPI
+STDCALL
 NtUserChangeDisplaySettings(
   PUNICODE_STRING lpszDeviceName,
   LPDEVMODEW lpDevMode,
@@ -434,56 +243,56 @@ NtUserChangeDisplaySettings(
   DWORD dwflags,
   LPVOID lParam);
 
-HWND NTAPI
+HWND STDCALL
 NtUserChildWindowFromPointEx(HWND Parent,
                             LONG x,
                             LONG y,
                             UINT Flags);
 
 BOOL
-NTAPI
+STDCALL
 NtUserClipCursor(
   RECT *lpRect);
 
 BOOL
-NTAPI
+STDCALL
 NtUserCloseClipboard(VOID);
 
 BOOL
-NTAPI
+STDCALL
 NtUserCloseDesktop(
   HDESK hDesktop);
 
 BOOL
-NTAPI
+STDCALL
 NtUserCloseWindowStation(
   HWINSTA hWinSta);
 
 DWORD
-NTAPI
+STDCALL
 NtUserConvertMemHandle(
   DWORD Unknown0,
   DWORD Unknown1);
 
 int
-NTAPI
+STDCALL
 NtUserCopyAcceleratorTable(
   HACCEL Table,
   LPACCEL Entries,
   int EntriesCount);
 
 DWORD
-NTAPI
+STDCALL
 NtUserCountClipboardFormats(VOID);
 
 HACCEL
-NTAPI
+STDCALL
 NtUserCreateAcceleratorTable(
   LPACCEL Entries,
   SIZE_T EntriesCount);
 
 BOOL
-NTAPI
+STDCALL
 NtUserCreateCaret(
   HWND hWnd,
   HBITMAP hBitmap,
@@ -491,13 +300,13 @@ NtUserCreateCaret(
   int nHeight);
 
 HANDLE
-NTAPI
+STDCALL
 NtUserCreateCursorIconHandle(
   PICONINFO IconInfo,
   BOOL Indirect);
 
 HDESK
-NTAPI
+STDCALL
 NtUserCreateDesktop(
   PUNICODE_STRING lpszDesktopName,
   DWORD dwFlags,
@@ -506,7 +315,7 @@ NtUserCreateDesktop(
   HWINSTA hWindowStation);
 
 DWORD
-NTAPI
+STDCALL
 NtUserCreateLocalMemHandle(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -514,7 +323,7 @@ NtUserCreateLocalMemHandle(
   DWORD Unknown3);
 
 HWND
-NTAPI
+STDCALL
 NtUserCreateWindowEx(
   DWORD dwExStyle,
   PUNICODE_STRING lpClassName,
@@ -532,7 +341,7 @@ NtUserCreateWindowEx(
   BOOL bUnicodeWindow);
 
 HWINSTA
-NTAPI
+STDCALL
 NtUserCreateWindowStation(
   PUNICODE_STRING lpszWindowStationName,
   ACCESS_MASK dwDesiredAccess,
@@ -542,14 +351,14 @@ NtUserCreateWindowStation(
   DWORD Unknown5);
 
 DWORD
-NTAPI
+STDCALL
 NtUserDdeGetQualityOfService(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserDdeInitialize(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -558,13 +367,13 @@ NtUserDdeInitialize(
   DWORD Unknown4);
 
 DWORD
-NTAPI
+STDCALL
 NtUserDdeSetQualityOfService(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
-HDWP NTAPI
+HDWP STDCALL
 NtUserDeferWindowPos(HDWP WinPosInfo,
                     HWND Wnd,
                     HWND WndInsertAfter,
@@ -573,21 +382,21 @@ NtUserDeferWindowPos(HDWP WinPosInfo,
          int cx,
          int cy,
                     UINT Flags);
-BOOL NTAPI
+BOOL STDCALL
 NtUserDefSetText(HWND WindowHandle, PUNICODE_STRING WindowText);
 
 BOOLEAN
-NTAPI
+STDCALL
 NtUserDestroyAcceleratorTable(
   HACCEL Table);
 
 BOOL
-NTAPI
+STDCALL
 NtUserDestroyCursorIcon(
   HANDLE Handle,
   DWORD Unknown);
 
-BOOLEAN NTAPI
+BOOLEAN STDCALL
 NtUserDestroyWindow(HWND Wnd);
 
 typedef struct tagNTUSERDISPATCHMESSAGEINFO
@@ -599,18 +408,18 @@ typedef struct tagNTUSERDISPATCHMESSAGEINFO
 } NTUSERDISPATCHMESSAGEINFO, *PNTUSERDISPATCHMESSAGEINFO;
 
 LRESULT
-NTAPI
+STDCALL
 NtUserDispatchMessage(PNTUSERDISPATCHMESSAGEINFO MsgInfo);
 
 BOOL
-NTAPI
+STDCALL
 NtUserDragDetect(
   HWND hWnd,
   LONG x,
   LONG y);
 
 DWORD
-NTAPI
+STDCALL
 NtUserDragObject(
           HWND    hwnd1,
           HWND    hwnd2,
@@ -620,7 +429,7 @@ NtUserDragObject(
           );
 
 DWORD
-NTAPI
+STDCALL
 NtUserDrawAnimatedRects(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -628,7 +437,7 @@ NtUserDrawAnimatedRects(
   DWORD Unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserDrawCaption(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -636,7 +445,7 @@ NtUserDrawCaption(
   DWORD Unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserDrawCaptionTemp(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -647,7 +456,7 @@ NtUserDrawCaptionTemp(
   DWORD Unknown6);
 
 BOOL
-NTAPI
+STDCALL
 NtUserDrawIconEx(
   HDC hdc,
   int xLeft,
@@ -662,27 +471,27 @@ NtUserDrawIconEx(
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserEmptyClipboard(VOID);
 
 BOOL
-NTAPI
+STDCALL
 NtUserEnableScrollBar(
   HWND hWnd,
   UINT wSBflags,
   UINT wArrows);
 
 DWORD
-NTAPI
+STDCALL
 NtUserEndDeferWindowPosEx(
   DWORD Unknown0,
   DWORD Unknown1);
 
-BOOL NTAPI
+BOOL STDCALL
 NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* lPs);
 
 BOOL
-NTAPI
+STDCALL
 NtUserEnumDisplayDevices (
   PUNICODE_STRING lpDevice, /* device name */
   DWORD iDevNum, /* display device */
@@ -690,15 +499,19 @@ NtUserEnumDisplayDevices (
   DWORD dwFlags ); /* reserved */
 
 /*BOOL
-NTAPI
+STDCALL
 NtUserEnumDisplayMonitors (
   HDC hdc,
   LPCRECT lprcClip,
   MONITORENUMPROC lpfnEnum,
   LPARAM dwData );*/
 
+#define MONITORINFOF_PRIMARY 1
+#define MONITOR_DEFAULTTONULL 0
+#define MONITOR_DEFAULTTOPRIMARY 1
+#define MONITOR_DEFAULTTONEAREST 2
 INT
-NTAPI
+STDCALL
 NtUserEnumDisplayMonitors(
   OPTIONAL IN HDC hDC,
   OPTIONAL IN LPCRECT pRect,
@@ -708,7 +521,7 @@ NtUserEnumDisplayMonitors(
 
 
 BOOL
-NTAPI
+STDCALL
 NtUserEnumDisplaySettings(
   PUNICODE_STRING lpszDeviceName,
   DWORD iModeNum,
@@ -716,18 +529,18 @@ NtUserEnumDisplaySettings(
   DWORD dwFlags );
 
 DWORD
-NTAPI
+STDCALL
 NtUserEvent(
   DWORD Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserExcludeUpdateRgn(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserFillWindow(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -735,7 +548,7 @@ NtUserFillWindow(
   DWORD Unknown3);
 
 HICON
-NTAPI
+STDCALL
 NtUserFindExistingCursorIcon(
   HMODULE hModule,
   HRSRC hRsrc,
@@ -743,7 +556,7 @@ NtUserFindExistingCursorIcon(
   LONG cy);
 
 HWND
-NTAPI
+STDCALL
 NtUserFindWindowEx(
   HWND  hwndParent,
   HWND  hwndChildAfter,
@@ -752,12 +565,12 @@ NtUserFindWindowEx(
   );
 
 DWORD
-NTAPI
+STDCALL
 NtUserFlashWindowEx(
   DWORD Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetAltTabInfo(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -766,25 +579,25 @@ NtUserGetAltTabInfo(
   DWORD Unknown4,
   DWORD Unknown5);
 
-HWND NTAPI
+HWND STDCALL
 NtUserGetAncestor(HWND hWnd, UINT Flags);
 
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetAsyncKeyState(
   DWORD Unknown0);
 
 UINT
-NTAPI
+STDCALL
 NtUserGetCaretBlinkTime(VOID);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetCaretPos(
   LPPOINT lpPoint);
 
-DWORD NTAPI
+DWORD STDCALL
 NtUserGetClassInfo(HINSTANCE hInst,
                   LPCWSTR str,
                   LPWNDCLASSEXW wcex,
@@ -792,56 +605,56 @@ NtUserGetClassInfo(HINSTANCE hInst,
                   DWORD unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetClassName(HWND hWnd,
                   LPWSTR lpClassName,
                   ULONG nMaxCount);
 
 HANDLE
-NTAPI
+STDCALL
 NtUserGetClipboardData(
   UINT uFormat,
   DWORD Unknown1);
 
 INT
-NTAPI
+STDCALL
 NtUserGetClipboardFormatName(
   UINT format,
   PUNICODE_STRING FormatName,
   INT cchMaxCount);
 
 HWND
-NTAPI
+STDCALL
 NtUserGetClipboardOwner(VOID);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetClipboardSequenceNumber(VOID);
 
 HWND
-NTAPI
+STDCALL
 NtUserGetClipboardViewer(VOID);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetClipCursor(
   RECT *lpRect);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetComboBoxInfo(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetControlBrush(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetControlColor(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -849,14 +662,14 @@ NtUserGetControlColor(
   DWORD Unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetCPD(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetCursorFrameInfo(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -864,57 +677,57 @@ NtUserGetCursorFrameInfo(
   DWORD Unknown3);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetCursorInfo(
   PCURSORINFO pci);
 
 HDC
-NTAPI
+STDCALL
 NtUserGetDC(
   HWND hWnd);
 
 HDC
-NTAPI
+STDCALL
 NtUserGetDCEx(
   HWND hWnd,
   HANDLE hRegion,
   ULONG Flags);
 
 UINT
-NTAPI
+STDCALL
 NtUserGetDoubleClickTime(VOID);
 
 HWND
-NTAPI
+STDCALL
 NtUserGetForegroundWindow(VOID);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetGuiResources(
   HANDLE hProcess,
   DWORD uiFlags);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetGUIThreadInfo(
   DWORD idThread,
   LPGUITHREADINFO lpgui);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetCursorIconInfo(
   HANDLE Handle,
   PICONINFO IconInfo);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetCursorIconSize(
   HANDLE Handle,
   BOOL *fIcon,
   SIZE *Size);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetImeHotKey(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -922,49 +735,49 @@ NtUserGetImeHotKey(
   DWORD Unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetInternalWindowPos(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 HKL
-NTAPI 
+STDCALL 
 NtUserGetKeyboardLayout(
   DWORD dwThreadid);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetKeyboardLayoutList(
   DWORD Unknown0,
   DWORD Unknown1);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetKeyboardLayoutName(
   LPWSTR lpszName);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetKeyboardState(
   LPBYTE Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetKeyboardType(
   DWORD TypeFlag);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetKeyNameText( LONG lParam, LPWSTR lpString, int nSize );
   
 DWORD
-NTAPI
+STDCALL
 NtUserGetKeyState(
   DWORD Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetListBoxInfo(
   DWORD Unknown0);
 
@@ -975,7 +788,7 @@ typedef struct tagNTUSERGETMESSAGEINFO
 } NTUSERGETMESSAGEINFO, *PNTUSERGETMESSAGEINFO;
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetMessage(
   PNTUSERGETMESSAGEINFO MsgInfo,
   HWND hWnd,
@@ -983,13 +796,13 @@ NtUserGetMessage(
   UINT wMsgFilterMax);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetMonitorInfo(
   IN HMONITOR hMonitor,
   OUT LPMONITORINFO pMonitorInfo);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetMouseMovePointsEx(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -998,7 +811,7 @@ NtUserGetMouseMovePointsEx(
   DWORD Unknown4);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetObjectInformation(
   HANDLE hObject,
   DWORD nIndex,
@@ -1007,35 +820,35 @@ NtUserGetObjectInformation(
   PDWORD nLengthNeeded);
 
 HWND
-NTAPI
+STDCALL
 NtUserGetOpenClipboardWindow(VOID);
 
 INT
-NTAPI
+STDCALL
 NtUserGetPriorityClipboardFormat(
   UINT *paFormatPriorityList,
   INT cFormats);
 
 HWINSTA
-NTAPI
+STDCALL
 NtUserGetProcessWindowStation(VOID);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetScrollBarInfo(
   HWND hWnd, 
   LONG idObject, 
   PSCROLLBARINFO psbi);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetScrollInfo(
   HWND hwnd, 
   int fnBar, 
   LPSCROLLINFO lpsi);
 
 HDESK
-NTAPI
+STDCALL
 NtUserGetThreadDesktop(
   DWORD dwThreadId,
   DWORD Unknown1);
@@ -1043,51 +856,51 @@ NtUserGetThreadDesktop(
 #define THREADSTATE_FOCUSWINDOW (1)
 #define THREADSTATE_INSENDMESSAGE       (2)
 DWORD
-NTAPI
+STDCALL
 NtUserGetThreadState(
   DWORD Routine);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetTitleBarInfo(
   DWORD Unknown0,
   DWORD Unknown1);
 
-BOOL NTAPI
+BOOL STDCALL
 NtUserGetUpdateRect(HWND hWnd, LPRECT lpRect, BOOL fErase);
 
 int
-NTAPI
+STDCALL
 NtUserGetUpdateRgn(
   HWND hWnd,
   HRGN hRgn,
   BOOL bErase);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetWindowDC(
   HWND hWnd);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetWindowPlacement(
   HWND hWnd,
   WINDOWPLACEMENT *lpwndpl);
 
 DWORD
-NTAPI
+STDCALL
 NtUserGetWOWClass(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserImpersonateDdeClientWindow(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserInitializeClientPfnArrays(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1095,7 +908,7 @@ NtUserInitializeClientPfnArrays(
   DWORD Unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserInitTask(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1110,7 +923,7 @@ NtUserInitTask(
   DWORD Unknown10);
 
 INT
-NTAPI
+STDCALL
 NtUserInternalGetWindowText(
   HWND hWnd,
   LPWSTR lpString,
@@ -1118,12 +931,12 @@ NtUserInternalGetWindowText(
 
 
 BOOL
-NTAPI
+STDCALL
 NtUserIsClipboardFormatAvailable(
   UINT format);
 
 BOOL
-NTAPI
+STDCALL
 NtUserKillSystemTimer
 (
  HWND hWnd,
@@ -1131,7 +944,7 @@ NtUserKillSystemTimer
 );
 
 BOOL
-NTAPI
+STDCALL
 NtUserKillTimer
 (
  HWND hWnd,
@@ -1139,7 +952,7 @@ NtUserKillTimer
 );
 
 DWORD
-NTAPI
+STDCALL
 NtUserLoadKeyboardLayoutEx(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1149,28 +962,28 @@ NtUserLoadKeyboardLayoutEx(
   DWORD Unknown5);
 
 BOOL
-NTAPI
+STDCALL
 NtUserLockWindowStation(
   HWINSTA hWindowStation);
 
 DWORD
-NTAPI
+STDCALL
 NtUserLockWindowUpdate(
   DWORD Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserLockWorkStation(VOID);
 
 UINT
-NTAPI
+STDCALL
 NtUserMapVirtualKeyEx( UINT keyCode,
                       UINT transType,
                       DWORD keyboardId,
                       HKL dwhkl );
 
 DWORD
-NTAPI
+STDCALL
 NtUserMessageCall(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1181,49 +994,49 @@ NtUserMessageCall(
   DWORD Unknown6);
 
 BOOL
-NTAPI
+STDCALL
 NtUserGetMinMaxInfo(
   HWND hwnd,
   MINMAXINFO *MinMaxInfo,
   BOOL SendMessage);
 
 DWORD
-NTAPI
+STDCALL
 NtUserMNDragLeave(VOID);
 
 DWORD
-NTAPI
+STDCALL
 NtUserMNDragOver(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserModifyUserStartupInfoFlags(
   DWORD Unknown0,
   DWORD Unknown1);
 
 HMONITOR
-NTAPI
+STDCALL
 NtUserMonitorFromPoint(
   IN POINT point,
   IN DWORD dwFlags);
 
 HMONITOR
-NTAPI
+STDCALL
 NtUserMonitorFromRect(
   IN LPCRECT pRect,
   IN DWORD dwFlags);
 
 HMONITOR
-NTAPI
+STDCALL
 NtUserMonitorFromWindow(
   IN HWND hWnd,
   IN DWORD dwFlags);
 
 
 BOOL
-NTAPI
+STDCALL
 NtUserMoveWindow(      
     HWND hWnd,
     int X,
@@ -1234,14 +1047,14 @@ NtUserMoveWindow(
 );
 
 DWORD
-NTAPI
+STDCALL
 NtUserNotifyIMEStatus(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserNotifyWinEvent(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1249,38 +1062,38 @@ NtUserNotifyWinEvent(
   DWORD Unknown3);
 
 BOOL
-NTAPI
+STDCALL
 NtUserOpenClipboard(
   HWND hWnd,
   DWORD Unknown1);
 
 HDESK
-NTAPI
+STDCALL
 NtUserOpenDesktop(
   PUNICODE_STRING lpszDesktopName,
   DWORD dwFlags,
   ACCESS_MASK dwDesiredAccess);
 
 HDESK
-NTAPI
+STDCALL
 NtUserOpenInputDesktop(
   DWORD dwFlags,
   BOOL fInherit,
   ACCESS_MASK dwDesiredAccess);
 
 HWINSTA
-NTAPI
+STDCALL
 NtUserOpenWindowStation(
   PUNICODE_STRING lpszWindowStationName,
   ACCESS_MASK dwDesiredAccess);
 
 BOOL
-NTAPI
+STDCALL
 NtUserPaintDesktop(
   HDC hDC);
 
 BOOL
-NTAPI
+STDCALL
 NtUserPeekMessage(
   PNTUSERGETMESSAGEINFO MsgInfo,
   HWND hWnd,
@@ -1289,7 +1102,7 @@ NtUserPeekMessage(
   UINT wRemoveMsg);
 
 BOOL
-NTAPI
+STDCALL
 NtUserPostMessage(
   HWND hWnd,
   UINT Msg,
@@ -1297,7 +1110,7 @@ NtUserPostMessage(
   LPARAM lParam);
 
 BOOL
-NTAPI
+STDCALL
 NtUserPostThreadMessage(
   DWORD idThread,
   UINT Msg,
@@ -1305,12 +1118,12 @@ NtUserPostThreadMessage(
   LPARAM lParam);
 
 DWORD
-NTAPI
+STDCALL
 NtUserQuerySendMessage(
   DWORD Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserQueryUserCounters(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1322,24 +1135,20 @@ NtUserQueryUserCounters(
 #define QUERY_WINDOW_UNIQUE_THREAD_ID  0x01
 #define QUERY_WINDOW_ISHUNG    0x04
 DWORD
-NTAPI
+STDCALL
 NtUserQueryWindow(
   HWND hWnd,
   DWORD Index);
 
-UINT
-NTAPI
-NtUserRealizePalette(HDC hDC);
-
 DWORD
-NTAPI
+STDCALL
 NtUserRealChildWindowFromPoint(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 BOOL
-NTAPI
+STDCALL
 NtUserRedrawWindow
 (
  HWND hWnd,
@@ -1353,7 +1162,7 @@ NtUserRedrawWindow
 #define REGISTERCLASS_SYSTEM   4
 #define REGISTERCLASS_ALL      (REGISTERCLASS_ANSI | REGISTERCLASS_SYSTEM)
 
-RTL_ATOM NTAPI
+RTL_ATOM STDCALL
 NtUserRegisterClassExWOW(
    CONST WNDCLASSEXW* lpwcx,
    PUNICODE_STRING ClassName,
@@ -1365,30 +1174,30 @@ NtUserRegisterClassExWOW(
    HMENU hMenu);
 
 BOOL
-NTAPI
+STDCALL
 NtUserRegisterHotKey(HWND hWnd,
                     int id,
                     UINT fsModifiers,
                     UINT vk);
 
 DWORD
-NTAPI
+STDCALL
 NtUserRegisterTasklist(
   DWORD Unknown0);
 
-UINT NTAPI
+UINT STDCALL
 NtUserRegisterWindowMessage(PUNICODE_STRING MessageName);
 
-HANDLE NTAPI
+HANDLE STDCALL
 NtUserRemoveProp(HWND hWnd, ATOM Atom);
 
 DWORD
-NTAPI
+STDCALL
 NtUserResolveDesktopForWOW(
   DWORD Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSBGetParms(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1396,7 +1205,7 @@ NtUserSBGetParms(
   DWORD Unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserScrollDC(
   HDC hDC,
   int dx,
@@ -1406,12 +1215,12 @@ NtUserScrollDC(
   HRGN hrgnUpdate,
   LPRECT lprcUpdate);
 
-DWORD NTAPI
+DWORD STDCALL
 NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *rect,
    const RECT *clipRect, HRGN hrgnUpdate, LPRECT rcUpdate, UINT flags);
 
 UINT
-NTAPI
+STDCALL
 NtUserSendInput(
   UINT nInputs,
   LPINPUT pInput,
@@ -1424,7 +1233,7 @@ typedef struct tagNTUSERSENDMESSAGEINFO
   WNDPROC Proc;
 } NTUSERSENDMESSAGEINFO, *PNTUSERSENDMESSAGEINFO;
 
-LRESULT NTAPI
+LRESULT STDCALL
 NtUserSendMessage(HWND hWnd,
                  UINT Msg,
                  WPARAM wParam,
@@ -1432,7 +1241,7 @@ NtUserSendMessage(HWND hWnd,
                   PNTUSERSENDMESSAGEINFO Info);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSendMessageCallback(
   HWND hWnd,
   UINT Msg,
@@ -1441,7 +1250,7 @@ NtUserSendMessageCallback(
   SENDASYNCPROC lpCallBack,
   ULONG_PTR dwData);
 
-LRESULT NTAPI
+LRESULT STDCALL
 NtUserSendMessageTimeout(HWND hWnd,
                         UINT Msg,
                         WPARAM wParam,
@@ -1452,24 +1261,24 @@ NtUserSendMessageTimeout(HWND hWnd,
                         PNTUSERSENDMESSAGEINFO Info);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSendNotifyMessage(
   HWND hWnd,
   UINT Msg,
   WPARAM wParam,
   LPARAM lParam);
 
-HWND NTAPI
+HWND STDCALL
 NtUserSetActiveWindow(HWND Wnd);
-HWND NTAPI
+HWND STDCALL
 NtUserGetActiveWindow(VOID);
 
-HWND NTAPI
+HWND STDCALL
 NtUserSetCapture(HWND Wnd);
-HWND NTAPI
+HWND STDCALL
 NtUserGetCapture(VOID);
 
-DWORD NTAPI
+DWORD STDCALL
 NtUserSetClassLong(
   HWND  hWnd,
   DWORD Offset,
@@ -1478,51 +1287,43 @@ NtUserSetClassLong(
 
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetClassWord(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 HANDLE
-NTAPI
+STDCALL
 NtUserSetClipboardData(
   UINT uFormat,
   HANDLE hMem,
   DWORD Unknown2);
 
 HWND
-NTAPI
+STDCALL
 NtUserSetClipboardViewer(
   HWND hWndNewViewer);
 
-HPALETTE
-STDCALL
-NtUserSelectPalette(
-    HDC hDC,
-    HPALETTE  hpal,
-    BOOL  ForceBackground
-);
-
 DWORD
-NTAPI
+STDCALL
 NtUserSetConsoleReserveKeys(
   DWORD Unknown0,
   DWORD Unknown1);
 
 HCURSOR
-NTAPI
+STDCALL
 NtUserSetCursor(
   HCURSOR hCursor);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetCursorIconContents(
   HANDLE Handle,
   PICONINFO IconInfo);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetCursorIconData(
   HANDLE Handle,
   PBOOL fIcon,
@@ -1532,18 +1333,18 @@ NtUserSetCursorIconData(
   HRSRC hGroupRsrc);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetDbgTag(
   DWORD Unknown0,
   DWORD Unknown1);
 
 HWND
-NTAPI
+STDCALL
 NtUserSetFocus(
   HWND hWnd);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetImeHotKey(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1552,13 +1353,13 @@ NtUserSetImeHotKey(
   DWORD Unknown4);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetImeOwnerWindow(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetInternalWindowPos(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1566,12 +1367,12 @@ NtUserSetInternalWindowPos(
   DWORD Unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetKeyboardState(
   LPBYTE Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetLayeredWindowAttributes(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1579,12 +1380,12 @@ NtUserSetLayeredWindowAttributes(
   DWORD Unknown3);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetLogonNotifyWindow(
   DWORD Unknown0);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetObjectInformation(
   HANDLE hObject,
   DWORD nIndex,
@@ -1592,27 +1393,27 @@ NtUserSetObjectInformation(
   DWORD nLength);
 
 HWND
-NTAPI
+STDCALL
 NtUserSetParent(
   HWND hWndChild,
   HWND hWndNewParent);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetProcessWindowStation(
   HWINSTA hWindowStation);
 
-BOOL NTAPI
+BOOL STDCALL
 NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetRipFlags(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetScrollInfo(
   HWND hwnd, 
   int fnBar, 
@@ -1620,17 +1421,17 @@ NtUserSetScrollInfo(
   BOOL bRedraw);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetShellWindowEx(
   HWND hwndShell,
   HWND hwndShellListView);
 
 HWND
-NTAPI
+STDCALL
 NtUserGetShellWindow();
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetSysColors(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1638,24 +1439,24 @@ NtUserSetSysColors(
   DWORD Unknown3);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetSystemCursor(
   HCURSOR hcur,
   DWORD id);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetThreadDesktop(
   HDESK hDesktop);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetThreadState(
   DWORD Unknown0,
   DWORD Unknown1);
 
 UINT_PTR
-NTAPI
+STDCALL
 NtUserSetSystemTimer
 (
  HWND hWnd,
@@ -1665,7 +1466,7 @@ NtUserSetSystemTimer
 );
 
 UINT_PTR
-NTAPI
+STDCALL
 NtUserSetTimer
 (
  HWND hWnd,
@@ -1675,13 +1476,13 @@ NtUserSetTimer
 );
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetWindowFNID(
   DWORD Unknown0,
   DWORD Unknown1);
 
 LONG
-NTAPI
+STDCALL
 NtUserSetWindowLong(
   HWND hWnd,
   DWORD Index,
@@ -1689,13 +1490,13 @@ NtUserSetWindowLong(
   BOOL Ansi);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetWindowPlacement(
   HWND hWnd,
   WINDOWPLACEMENT *lpwndpl);
 
 BOOL 
-NTAPI NtUserSetWindowPos(      
+STDCALL NtUserSetWindowPos(      
     HWND hWnd,
     HWND hWndInsertAfter,
     int X,
@@ -1706,21 +1507,21 @@ NTAPI NtUserSetWindowPos(
 );
 
 INT
-NTAPI
+STDCALL
 NtUserSetWindowRgn(
   HWND hWnd,
   HRGN hRgn,
   BOOL bRedraw);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetWindowsHookAW(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 HHOOK
-NTAPI
+STDCALL
 NtUserSetWindowsHookEx(
   HINSTANCE Mod,
   PUNICODE_STRING ModuleName,
@@ -1730,18 +1531,18 @@ NtUserSetWindowsHookEx(
   BOOL Ansi);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetWindowStationUser(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2,
   DWORD Unknown3);
 
-WORD NTAPI
+WORD STDCALL
 NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewVal);
 
 DWORD
-NTAPI
+STDCALL
 NtUserSetWinEventHook(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1753,34 +1554,34 @@ NtUserSetWinEventHook(
   DWORD Unknown7);
 
 BOOL
-NTAPI
+STDCALL
 NtUserShowCaret(
   HWND hWnd,
   BOOL bShow);
 
 DWORD
-NTAPI
+STDCALL
 NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow);
 
 BOOL
-NTAPI
+STDCALL
 NtUserShowWindow(
   HWND hWnd,
   LONG nCmdShow);
 
 BOOL
-NTAPI
+STDCALL
 NtUserShowWindowAsync(
   HWND hWnd,
   LONG nCmdShow);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSwitchDesktop(
   HDESK hDesktop);
 
 BOOL
-NTAPI
+STDCALL
 NtUserSystemParametersInfo(
   UINT uiAction,
   UINT uiParam,
@@ -1788,7 +1589,7 @@ NtUserSystemParametersInfo(
   UINT fWinIni);
 
 int
-NTAPI
+STDCALL
 NtUserToUnicodeEx(
                  UINT wVirtKey,
                  UINT wScanCode,
@@ -1799,71 +1600,71 @@ NtUserToUnicodeEx(
                  HKL dwhkl );
 
 DWORD
-NTAPI
+STDCALL
 NtUserTrackMouseEvent(
   DWORD Unknown0);
 
 int
-NTAPI
+STDCALL
 NtUserTranslateAccelerator(
   HWND Window,
   HACCEL Table,
   LPMSG Message);
 
 BOOL
-NTAPI
+STDCALL
 NtUserTranslateMessage(
   LPMSG lpMsg,
   HKL dwhkl );
 
 BOOL
-NTAPI
+STDCALL
 NtUserUnhookWindowsHookEx(
   HHOOK Hook);
 
 DWORD
-NTAPI
+STDCALL
 NtUserUnhookWinEvent(
   DWORD Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserUnloadKeyboardLayout(
   DWORD Unknown0);
 
 BOOL
-NTAPI
+STDCALL
 NtUserUnlockWindowStation(
   HWINSTA hWindowStation);
 
 BOOL
-NTAPI
+STDCALL
 NtUserUnregisterClass(
   LPCWSTR ClassNameOrAtom,
   HINSTANCE hInstance,
   DWORD Unknown);
 
 BOOL
-NTAPI
+STDCALL
 NtUserUnregisterHotKey(HWND hWnd,
                       int id);
 
 DWORD
-NTAPI
+STDCALL
 NtUserUpdateInputContext(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserUpdateInstance(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserUpdateLayeredWindow(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1876,48 +1677,48 @@ NtUserUpdateLayeredWindow(
   DWORD Unknown8);
 
 BOOL
-NTAPI
+STDCALL
 NtUserUpdatePerUserSystemParameters(
   DWORD dwReserved,
   BOOL bEnable);
 
 DWORD
-NTAPI
+STDCALL
 NtUserUserHandleGrantAccess(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserValidateHandleSecure(
   DWORD Unknown0);
 
 DWORD
-NTAPI
+STDCALL
 NtUserVkKeyScanEx(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserWaitForInputIdle(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-NTAPI
+STDCALL
 NtUserWaitForMsgAndEvent(
   DWORD Unknown0);
 
 BOOL
-NTAPI
+STDCALL
 NtUserWaitMessage(VOID);
 
 DWORD
-NTAPI
+STDCALL
 NtUserWin32PoolAllocationStats(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1927,28 +1728,28 @@ NtUserWin32PoolAllocationStats(
   DWORD Unknown5);
 
 HWND
-NTAPI
+STDCALL
 NtUserWindowFromPoint(
   LONG X,
   LONG Y);
 
 DWORD
-NTAPI
+STDCALL
 NtUserYieldTask(VOID);
 
-DWORD NTAPI
+DWORD STDCALL
 NtUserGetWindowThreadProcessId(HWND hWnd, LPDWORD UnsafePid);
 
-DWORD NTAPI
+DWORD STDCALL
 NtUserGetQueueStatus(BOOL ClearChanges);
 
-HWND NTAPI
+HWND STDCALL
 NtUserGetParent(HWND hWnd);
 
-HWND NTAPI
+HWND STDCALL
 NtUserGetWindow(HWND hWnd, UINT Relationship);
 
-HWND NTAPI
+HWND STDCALL
 NtUserGetLastActivePopup(HWND hWnd);
 typedef struct _WndProcHandle
 {
@@ -1957,24 +1758,12 @@ typedef struct _WndProcHandle
   HANDLE ProcessID;
 } WndProcHandle;
                                     
-DWORD NTAPI
+DWORD STDCALL
 NtUserDereferenceWndProcHandle(WNDPROC wpHandle, WndProcHandle *Data);
 
-VOID NTAPI
+VOID STDCALL
 NtUserManualGuiCheck(LONG Check);
 
-#define NtUserGetDCBrushColor(hbr) \
-  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_BRUSH, TWOPARAM_ROUTINE_GETDCCOLOR)
-
-#define NtUserGetDCPenColor(hbr) \
-  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_PEN, TWOPARAM_ROUTINE_GETDCCOLOR)
-
-#define NtUserSetDCBrushColor(hbr, crColor) \
-  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), (DWORD)crColor, TWOPARAM_ROUTINE_SETDCBRUSHCOLOR)
-
-#define NtUserSetDCPenColor(hbr, crColor) \
-  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), (DWORD)crColor, TWOPARAM_ROUTINE_SETDCPENCOLOR)
-
 typedef struct _SETSCROLLBARINFO
 {
   int nTrackPos; 
@@ -1983,7 +1772,7 @@ typedef struct _SETSCROLLBARINFO
 } SETSCROLLBARINFO, *PSETSCROLLBARINFO;
 
 BOOL
-NTAPI
+STDCALL
 NtUserSetScrollBarInfo(
   HWND hwnd,
   LONG idObject,
@@ -2011,6 +1800,14 @@ typedef struct tagKMDDELPARAM
     } Value;
 } KMDDELPARAM, *PKMDDELPARAM;
 
+typedef struct _GDI_TABLE_ENTRY
+{
+  PVOID KernelData; /* Points to the kernel mode structure */
+  HANDLE ProcessId; /* process id that created the object, 0 for stock objects */
+  LONG Type;        /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */
+  PVOID UserData;   /* Points to the user mode structure, usually NULL though */
+} GDI_TABLE_ENTRY, *PGDI_TABLE_ENTRY;
+
 #endif /* __WIN32K_NTUSER_H */
 
 /* EOF */
diff --git a/reactos/include/win32k/ntusrtyp.h b/reactos/include/win32k/ntusrtyp.h
deleted file mode 100644 (file)
index c94598e..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*\r
- * COPYRIGHT:       See COPYING in the top level directory\r
- * PROJECT:         ReactOS Win32 Graphical Subsystem (WIN32K)\r
- * FILE:            include/win32k/ntusrtyp.h\r
- * PURPOSE:         Win32 Shared USER Types for NtUser*\r
- * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)\r
- */\r
-\r
-/* INCLUDES ******************************************************************/\r
-\r
-#ifndef _NTUSRTYP_\r
-#define _NTUSRTYP_\r
-\r
-/* ENUMERATIONS **************************************************************/\r
-\r
-/* TYPES *********************************************************************/\r
-\r
-typedef struct _PATRECT\r
-{\r
-    RECT r;\r
-    HBRUSH hBrush;\r
-} PATRECT, * PPATRECT;\r
-\r
-/* Structures for reading icon/cursor files and resources */\r
-typedef struct _ICONIMAGE\r
-{\r
-    BITMAPINFOHEADER icHeader;      // DIB header\r
-    RGBQUAD icColors[1];            // Color table\r
-    BYTE icXOR[1];                  // DIB bits for XOR mask\r
-    BYTE icAND[1];                  // DIB bits for AND mask\r
-} ICONIMAGE, *LPICONIMAGE;\r
-\r
-typedef struct _CURSORIMAGE\r
-{\r
-    BITMAPINFOHEADER icHeader;       // DIB header\r
-    RGBQUAD icColors[1];             // Color table\r
-    BYTE icXOR[1];                   // DIB bits for XOR mask\r
-    BYTE icAND[1];                   // DIB bits for AND mask\r
-} CURSORIMAGE, *LPCURSORIMAGE;\r
-\r
-typedef struct\r
-{\r
-    BYTE bWidth;\r
-    BYTE bHeight;\r
-    BYTE bColorCount;\r
-    BYTE bReserved;\r
-} ICONRESDIR;\r
-\r
-typedef struct\r
-{\r
-    WORD wWidth;\r
-    WORD wHeight;\r
-} CURSORRESDIR;\r
-\r
-typedef struct\r
-{\r
-    WORD wPlanes;                   // Number of Color Planes in the XOR image\r
-    WORD wBitCount;                 // Bits per pixel in the XOR image\r
-} ICONDIR;\r
-\r
-typedef struct\r
-{\r
-    WORD wXHotspot;                 // Number of Color Planes in the XOR image\r
-    WORD wYHotspot;                 // Bits per pixel in the XOR image\r
-} CURSORDIR;\r
-\r
-typedef struct\r
-{\r
-    BYTE bWidth;                    // Width, in pixels, of the icon image\r
-    BYTE bHeight;                   // Height, in pixels, of the icon image\r
-    BYTE bColorCount;               // Number of colors in image (0 if >=8bpp)\r
-    BYTE bReserved;                 // Reserved ( must be 0)\r
-    union\r
-    {\r
-        ICONDIR icon;\r
-        CURSORDIR  cursor;\r
-    } Info;\r
-    DWORD dwBytesInRes;             // How many bytes in this resource?\r
-    DWORD dwImageOffset;            // Where in the file is this image?\r
-} CURSORICONDIRENTRY;\r
-\r
-typedef struct\r
-{\r
-    WORD idReserved;                // Reserved (must be 0)\r
-    WORD idType;                    // Resource Type (1 for icons, 0 for cursors)\r
-    WORD idCount;                   // How many images?\r
-    CURSORICONDIRENTRY idEntries[1];// An entry for idCount number of images\r
-} CURSORICONDIR;\r
-\r
-typedef struct\r
-{\r
-    union\r
-    {\r
-        ICONRESDIR icon;\r
-        CURSORRESDIR cursor;\r
-    } ResInfo;\r
-    WORD wPlanes;                   // Color Planes\r
-    WORD wBitCount;                 // Bits per pixel\r
-    DWORD dwBytesInRes;             // how many bytes in this resource?\r
-    WORD nID;                       // the ID\r
-} GRPCURSORICONDIRENTRY;\r
-\r
-typedef struct\r
-{\r
-    WORD idReserved;                    // Reserved (must be 0)\r
-    WORD idType;                        // Resource type (1 for icons)\r
-    WORD idCount;                       // How many images?\r
-    GRPCURSORICONDIRENTRY idEntries[1]; // The entries for each image\r
-} GRPCURSORICONDIR;\r
-\r
-typedef struct _THRDCARETINFO\r
-{\r
-    HWND hWnd;\r
-    HBITMAP Bitmap;\r
-    POINT Pos;\r
-    SIZE Size;\r
-    BYTE Visible;\r
-    BYTE Showing;\r
-} THRDCARETINFO, *PTHRDCARETINFO;\r
-\r
-typedef struct tagROSMENUINFO\r
-{\r
-    /* ----------- MENUINFO ----------- */\r
-    DWORD cbSize;\r
-    DWORD fMask;\r
-    DWORD dwStyle;\r
-    UINT cyMax;\r
-    HBRUSH  hbrBack;\r
-    DWORD dwContextHelpID;\r
-    ULONG_PTR dwMenuData;\r
-    /* ----------- Extra ----------- */\r
-    HMENU Self;         /* Handle of this menu */\r
-    WORD Flags;         /* Menu flags (MF_POPUP, MF_SYSMENU) */\r
-    UINT FocusedItem;   /* Currently focused item */\r
-    UINT MenuItemCount; /* Number of items in the menu */\r
-    HWND Wnd;           /* Window containing the menu */\r
-    WORD Width;         /* Width of the whole menu */\r
-    WORD Height;        /* Height of the whole menu */\r
-    HWND WndOwner;     /* window receiving the messages for ownerdraw */\r
-    BOOL TimeToHide;   /* Request hiding when receiving a second click in the top-level menu item */\r
-    SIZE maxBmpSize;   /* Maximum size of the bitmap items in MIIM_BITMAP state */\r
-} ROSMENUINFO, *PROSMENUINFO;\r
-\r
-/* (other FocusedItem values give the position of the focused item) */\r
-#define NO_SELECTED_ITEM  0xffff\r
-\r
-typedef struct tagROSMENUITEMINFO\r
-{\r
-    /* ----------- MENUITEMINFOW ----------- */\r
-    UINT cbSize;\r
-    UINT fMask;\r
-    UINT fType;\r
-    UINT fState;\r
-    UINT wID;\r
-    HMENU hSubMenu;\r
-    HBITMAP hbmpChecked;\r
-    HBITMAP hbmpUnchecked;\r
-    DWORD dwItemData;\r
-    LPWSTR dwTypeData;\r
-    UINT cch;\r
-    HBITMAP hbmpItem;\r
-    /* ----------- Extra ----------- */\r
-    RECT Rect;      /* Item area (relative to menu window) */\r
-    UINT XTab;      /* X position of text after Tab */\r
-} ROSMENUITEMINFO, *PROSMENUITEMINFO;\r
-\r
-#endif\r
diff --git a/reactos/include/win32k/paint.h b/reactos/include/win32k/paint.h
new file mode 100644 (file)
index 0000000..dec0ca0
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef __WIN32K_PAINT_H
+#define __WIN32K_PAINT_H
+
+typedef struct _PATRECT {
+       RECT r;
+       HBRUSH hBrush;
+} PATRECT, * PPATRECT;
+
+BOOL STDCALL
+NtGdiPatBlt(
+   HDC hDC,
+   INT XLeft,
+   INT YLeft,
+   INT Width,
+   INT Height,
+   DWORD ROP);
+
+BOOL STDCALL
+NtGdiPolyPatBlt(
+   HDC hDC,
+   DWORD dwRop,
+   PPATRECT pRects,
+   INT cRects,
+   ULONG Reserved);
+
+BOOL STDCALL
+NtGdiPatBlt(
+   HDC hDC,
+   INT XLeft,
+   INT YLeft,
+   INT Width,
+   INT Height,
+   DWORD ROP);
+
+BOOL STDCALL NtGdiGdiFlush (VOID);
+DWORD STDCALL NtGdiGdiGetBatchLimit (VOID);
+DWORD STDCALL NtGdiGdiSetBatchLimit (DWORD  Limit);
+UINT STDCALL NtGdiGetBoundsRect (HDC hDC, LPRECT Bounds, UINT Flags);
+COLORREF STDCALL NtGdiSetBkColor (HDC hDC, COLORREF Color);
+UINT STDCALL NtGdiSetBoundsRect (HDC hDC, CONST PRECT Bounds, UINT Flags);
+
+#endif
+
diff --git a/reactos/include/win32k/path.h b/reactos/include/win32k/path.h
new file mode 100644 (file)
index 0000000..31467b4
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef __WIN32K_PATH_H
+#define __WIN32K_PATH_H
+
+typedef enum tagGdiPathState
+{
+   PATH_Null,
+   PATH_Open,
+   PATH_Closed
+} GdiPathState;
+
+typedef struct tagGdiPath
+{
+   GdiPathState state;
+   POINT      *pPoints;
+   BYTE         *pFlags;
+   int          numEntriesUsed, numEntriesAllocated;
+   BOOL       newStroke;
+} GdiPath;
+
+#define PATH_IsPathOpen(path) ((path).state==PATH_Open)
+
+BOOL STDCALL NtGdiAbortPath(HDC  hDC);
+
+BOOL STDCALL NtGdiBeginPath(HDC  hDC);
+
+BOOL STDCALL NtGdiCloseFigure(HDC  hDC);
+
+BOOL STDCALL NtGdiEndPath(HDC  hDC);
+
+BOOL STDCALL NtGdiFillPath(HDC  hDC);
+
+BOOL STDCALL NtGdiFlattenPath(HDC  hDC);
+
+BOOL STDCALL NtGdiGetMiterLimit(HDC  hDC,
+                        PFLOAT  Limit);
+
+INT STDCALL NtGdiGetPath(HDC  hDC,
+                 LPPOINT  Points,
+                 LPBYTE  Types,
+                 INT  nSize);
+
+HRGN STDCALL NtGdiPathToRegion(HDC  hDC);
+
+BOOL STDCALL NtGdiSetMiterLimit(HDC  hDC,
+                        FLOAT  NewLimit,
+                        PFLOAT  OldLimit);
+
+BOOL STDCALL NtGdiStrokeAndFillPath(HDC  hDC);
+
+BOOL STDCALL NtGdiStrokePath(HDC  hDC);
+
+BOOL STDCALL NtGdiWidenPath(HDC  hDC);
+
+#endif
similarity index 54%
rename from reactos/subsys/win32k/include/pen.h
rename to reactos/include/win32k/pen.h
index e76555d..ce2c5ac 100644 (file)
@@ -1,14 +1,32 @@
-#ifndef __WIN32K_PEN_H\r
-#define __WIN32K_PEN_H\r
-\r
-#include "gdiobj.h"\r
-#include "brush.h"\r
-\r
-/* Internal interface */\r
-\r
-#define PENOBJ_AllocPen() ((HPEN)GDIOBJ_AllocObj(GDI_OBJECT_TYPE_PEN))\r
-#define PENOBJ_FreePen(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN)\r
-#define PENOBJ_LockPen(hBMObj) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN))\r
-#define PENOBJ_UnlockPen(pPenObj) GDIOBJ_UnlockObjByPtr(pPenObj)\r
-\r
-#endif\r
+#ifndef __WIN32K_PEN_H
+#define __WIN32K_PEN_H
+
+#include <win32k/gdiobj.h>
+#include <win32k/brush.h>
+
+/* Internal interface */
+
+#define PENOBJ_AllocPen() ((HPEN)GDIOBJ_AllocObj(GDI_OBJECT_TYPE_PEN))
+#define PENOBJ_FreePen(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN)
+#define PENOBJ_LockPen(hBMObj) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN))
+#define PENOBJ_UnlockPen(pPenObj) GDIOBJ_UnlockObjByPtr(pPenObj)
+
+HPEN STDCALL
+NtGdiCreatePen(
+   INT PenStyle,
+   INT Width,
+   COLORREF Color);
+
+HPEN STDCALL
+NtGdiCreatePenIndirect(
+   CONST PLOGPEN LogBrush);
+
+HPEN STDCALL
+NtGdiExtCreatePen(
+   DWORD PenStyle,
+   DWORD Width,
+   CONST LOGBRUSH *LogBrush,
+   DWORD StyleCount,
+   CONST DWORD *Style);
+
+#endif
diff --git a/reactos/include/win32k/print.h b/reactos/include/win32k/print.h
new file mode 100644 (file)
index 0000000..9dab57f
--- /dev/null
@@ -0,0 +1,48 @@
+
+#ifndef __WIN32K_PRINT_H
+#define __WIN32K_PRINT_H
+
+INT
+STDCALL
+NtGdiAbortDoc(HDC  hDC);
+
+INT
+STDCALL
+NtGdiEndDoc(HDC  hDC);
+
+INT
+STDCALL
+NtGdiEndPage(HDC  hDC);
+
+INT
+STDCALL
+NtGdiEscape(HDC  hDC,
+                INT  Escape,
+                INT  InSize,
+                LPCSTR  InData,
+                LPVOID  OutData);
+
+INT
+STDCALL
+NtGdiExtEscape(HDC  hDC,
+                   INT  Escape,
+                   INT  InSize,
+                   LPCSTR  InData,
+                   INT  OutSize,
+                   LPSTR  OutData);
+
+INT
+STDCALL
+NtGdiSetAbortProc(HDC  hDC,
+                      ABORTPROC  AbortProc);
+
+INT
+STDCALL
+NtGdiStartDoc(HDC  hDC,
+                  CONST LPDOCINFOW  di);
+
+INT
+STDCALL
+NtGdiStartPage(HDC  hDC);
+
+#endif
diff --git a/reactos/include/win32k/region.h b/reactos/include/win32k/region.h
new file mode 100644 (file)
index 0000000..9627490
--- /dev/null
@@ -0,0 +1,151 @@
+
+#ifndef __WIN32K_REGION_H
+#define __WIN32K_REGION_H
+
+#include <win32k/gdiobj.h>
+
+/* Internal region data. Can't use RGNDATA structure because buffer is allocated statically */
+typedef struct _ROSRGNDATA {
+  RGNDATAHEADER rdh;
+  PRECT         Buffer;
+} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
+
+
+#define  RGNDATA_FreeRgn(hRgn)  GDIOBJ_FreeObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
+#define  RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))
+#define  RGNDATA_UnlockRgn(pRgn) GDIOBJ_UnlockObjByPtr(pRgn)
+HRGN FASTCALL RGNDATA_AllocRgn(INT n);
+BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody);
+
+/*  User entry points */
+HRGN STDCALL
+NtGdiUnionRectWithRgn(HRGN hDest, CONST PRECT Rect);
+
+INT
+STDCALL
+NtGdiCombineRgn(HRGN  hDest,
+                    HRGN  hSrc1,
+                    HRGN  hSrc2,
+                    INT  CombineMode);
+
+HRGN
+STDCALL
+NtGdiCreateEllipticRgn(INT  LeftRect,
+                            INT  TopRect,
+                            INT  RightRect,
+                            INT  BottomRect);
+
+HRGN
+STDCALL
+NtGdiCreateEllipticRgnIndirect(CONST PRECT  rc);
+
+HRGN
+STDCALL
+NtGdiCreatePolygonRgn(CONST PPOINT  pt,
+                           INT  Count,
+                           INT  PolyFillMode);
+
+HRGN
+STDCALL
+NtGdiCreatePolyPolygonRgn(CONST PPOINT  pt,
+                               CONST PINT  PolyCounts,
+                               INT  Count,
+                               INT  PolyFillMode);
+
+HRGN
+STDCALL
+NtGdiCreateRectRgn(INT  LeftRect,
+                        INT  TopRect,
+                        INT  RightRect,
+                        INT  BottomRect);
+
+HRGN
+STDCALL
+NtGdiCreateRectRgnIndirect(CONST PRECT  rc);
+
+HRGN
+STDCALL
+NtGdiCreateRoundRectRgn(INT  LeftRect,
+                             INT  TopRect,
+                             INT  RightRect,
+                             INT  BottomRect,
+                             INT  WidthEllipse,
+                             INT  HeightEllipse);
+
+BOOL
+STDCALL
+NtGdiEqualRgn(HRGN  hSrcRgn1,
+                   HRGN  hSrcRgn2);
+
+HRGN
+STDCALL
+NtGdiExtCreateRegion(CONST XFORM *Xform,
+                          DWORD Count,
+                          CONST RGNDATA *RgnData);
+
+BOOL
+STDCALL
+NtGdiFillRgn(HDC  hDC,
+                  HRGN  hRgn,
+                  HBRUSH  hBrush);
+
+BOOL
+STDCALL
+NtGdiFrameRgn(HDC  hDC,
+                   HRGN  hRgn,
+                   HBRUSH  hBrush,
+                   INT  Width,
+                   INT  Height);
+
+INT
+STDCALL
+NtGdiGetRgnBox(HRGN  hRgn,
+                   LPRECT  Rect);
+
+BOOL
+STDCALL
+NtGdiInvertRgn(HDC  hDC,
+                    HRGN  hRgn);
+
+INT
+STDCALL
+NtGdiOffsetRgn(HRGN  hRgn,
+                   INT  XOffset,
+                   INT  YOffset);
+
+BOOL
+STDCALL
+NtGdiPaintRgn(HDC  hDC,
+                   HRGN  hRgn);
+
+BOOL
+STDCALL
+NtGdiPtInRegion(HRGN  hRgn,
+                     INT  X,
+                     INT  Y);
+
+BOOL
+STDCALL
+NtGdiRectInRegion(HRGN  hRgn,
+                       CONST LPRECT  rc);
+
+INT
+STDCALL
+NtGdiSelectVisRgn(HDC hdc,
+                     HRGN hrgn);
+
+BOOL
+STDCALL
+NtGdiSetRectRgn(HRGN  hRgn,
+                     INT  LeftRect,
+                     INT  TopRect,
+                     INT  RightRect,
+                     INT  BottomRect);
+
+DWORD
+STDCALL
+NtGdiGetRegionData(HRGN hrgn,
+                                               DWORD count,
+                                               LPRGNDATA rgndata);
+#endif
+
diff --git a/reactos/include/win32k/text.h b/reactos/include/win32k/text.h
new file mode 100644 (file)
index 0000000..8af356a
--- /dev/null
@@ -0,0 +1,233 @@
+
+#ifndef __WIN32K_TEXT_H
+#define __WIN32K_TEXT_H
+
+/* GDI logical font object */
+typedef struct
+{
+   LOGFONTW   logfont;
+   FONTOBJ    *Font;
+   BOOLEAN Initialized; /* Don't reinitialize for each DC */
+} TEXTOBJ, *PTEXTOBJ;
+
+/*  Internal interface  */
+
+#define  TEXTOBJ_AllocText() \
+  ((HFONT) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_FONT))
+#define  TEXTOBJ_FreeText(hBMObj)  GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT)
+#define  TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT))
+#define  TEXTOBJ_UnlockText(pBMObj) GDIOBJ_UnlockObjByPtr (pBMObj)
+
+NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle);
+NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont);
+
+int
+STDCALL
+NtGdiAddFontResource(PUNICODE_STRING Filename,
+                                        DWORD fl);
+
+HFONT
+STDCALL
+NtGdiCreateFont(int  Height,
+                      int  Width,
+                      int  Escapement,
+                      int  Orientation,
+                      int  Weight,
+                      DWORD  Italic,
+                      DWORD  Underline,
+                      DWORD  StrikeOut,
+                      DWORD  CharSet,
+                      DWORD  OutputPrecision,
+                      DWORD  ClipPrecision,
+                      DWORD  Quality,
+                      DWORD  PitchAndFamily,
+                      LPCWSTR  Face);
+
+HFONT
+STDCALL
+NtGdiCreateFontIndirect(CONST LPLOGFONTW lf);
+
+BOOL
+STDCALL
+NtGdiCreateScalableFontResource(DWORD  Hidden,
+                                     LPCWSTR  FontRes,
+                                     LPCWSTR  FontFile,
+                                     LPCWSTR  CurrentPath);
+
+int
+STDCALL
+NtGdiEnumFonts(HDC  hDC,
+                   LPCWSTR FaceName,
+                   FONTENUMPROCW  FontFunc,
+                   LPARAM  lParam);
+
+BOOL
+STDCALL
+NtGdiExtTextOut(HDC  hdc,
+                     int  X,
+                     int  Y,
+                     UINT  fuOptions,
+                     CONST RECT  *lprc,
+                     LPCWSTR  lpString,
+                     UINT  cbCount,
+                     CONST INT  *lpDx);
+
+BOOL
+STDCALL
+NtGdiGetAspectRatioFilterEx(HDC  hDC,
+                                 LPSIZE  AspectRatio);
+
+BOOL
+STDCALL
+NtGdiGetCharABCWidths(HDC  hDC,
+                           UINT  FirstChar,
+                           UINT  LastChar,
+                           LPABC  abc);
+
+BOOL
+STDCALL
+NtGdiGetCharABCWidthsFloat(HDC  hDC,
+                                UINT  FirstChar,
+                                UINT  LastChar,
+                                LPABCFLOAT  abcF);
+
+DWORD
+STDCALL
+NtGdiGetCharacterPlacement(HDC  hDC,
+                                 LPCWSTR  String,
+                                 int  Count,
+                                 int  MaxExtent,
+                                 LPGCP_RESULTSW Results,
+                                 DWORD  Flags);
+
+BOOL
+STDCALL
+NtGdiGetCharWidth32(HDC  hDC,
+                         UINT  FirstChar,
+                         UINT  LastChar,
+                         LPINT  Buffer);
+
+BOOL
+STDCALL
+NtGdiGetCharWidthFloat(HDC  hDC,
+                            UINT  FirstChar,
+                            UINT  LastChar,
+                            PFLOAT  Buffer);
+
+DWORD
+STDCALL
+NtGdiGetFontLanguageInfo(HDC  hDC);
+
+DWORD
+STDCALL
+NtGdiGetGlyphOutline(HDC  hDC,
+                           UINT  Char,
+                           UINT  Format,
+                           LPGLYPHMETRICS  gm,
+                           DWORD  Bufsize,
+                           LPVOID  Buffer,
+                           CONST LPMAT2 mat2);
+
+DWORD
+STDCALL
+NtGdiGetKerningPairs(HDC  hDC,
+                           DWORD  NumPairs,
+                           LPKERNINGPAIR  krnpair);
+
+UINT
+STDCALL
+NtGdiGetOutlineTextMetrics(HDC  hDC,
+                                UINT  Data,
+                                LPOUTLINETEXTMETRICW otm);
+
+BOOL
+STDCALL
+NtGdiGetRasterizerCaps(LPRASTERIZER_STATUS  rs,
+                            UINT  Size);
+
+UINT
+STDCALL
+NtGdiGetTextCharset(HDC  hDC);
+
+UINT
+STDCALL
+NtGdiGetTextCharsetInfo(HDC  hDC,
+                             LPFONTSIGNATURE  Sig,
+                             DWORD  Flags);
+
+BOOL
+STDCALL
+NtGdiGetTextExtentExPoint(HDC  hDC,
+                               LPCWSTR String,
+                               int  Count,
+                               int  MaxExtent,
+                               LPINT  Fit,
+                               LPINT  Dx,
+                               LPSIZE  Size);
+
+BOOL
+STDCALL
+NtGdiGetTextExtentPoint(HDC  hDC,
+                             LPCWSTR  String,
+                             int  Count,
+                             LPSIZE  Size);
+
+BOOL
+STDCALL
+NtGdiGetTextExtentPoint32(HDC  hDC,
+                               LPCWSTR  String,
+                               int  Count,
+                               LPSIZE  Size);
+
+int
+STDCALL
+NtGdiGetTextFace(HDC  hDC,
+                     int  Count,
+                     LPWSTR  FaceName);
+
+BOOL
+STDCALL
+NtGdiGetTextMetrics(HDC  hDC,
+                         LPTEXTMETRICW  tm);
+
+BOOL
+STDCALL
+NtGdiPolyTextOut(HDC  hDC,
+                      CONST LPPOLYTEXTW txt,
+                      int  Count);
+
+BOOL
+STDCALL
+NtGdiRemoveFontResource(LPCWSTR  FileName);
+
+DWORD
+STDCALL
+NtGdiSetMapperFlags(HDC  hDC,
+                          DWORD  Flag);
+
+UINT
+STDCALL
+NtGdiSetTextAlign(HDC  hDC,
+                       UINT  Mode);
+
+COLORREF
+STDCALL
+NtGdiSetTextColor(HDC  hDC,
+                           COLORREF  Color);
+
+BOOL
+STDCALL
+NtGdiSetTextJustification(HDC  hDC,
+                               int  BreakExtra,
+                               int  BreakCount);
+
+BOOL
+STDCALL
+NtGdiTextOut(HDC  hDC,
+                  int  XStart,
+                  int  YStart,
+                  LPCWSTR  String,
+                  int  Count);
+
+#endif
+
diff --git a/reactos/include/win32k/win32k.h b/reactos/include/win32k/win32k.h
new file mode 100644 (file)
index 0000000..89a8210
--- /dev/null
@@ -0,0 +1 @@
+#include <win32k/kapi.h>
diff --git a/reactos/include/win32k/wingl.h b/reactos/include/win32k/wingl.h
new file mode 100644 (file)
index 0000000..70ba8d5
--- /dev/null
@@ -0,0 +1,38 @@
+
+#ifndef __WIN32K_WINGL_H
+#define __WIN32K_WINGL_H
+
+INT
+STDCALL
+NtGdiChoosePixelFormat(HDC  hDC,
+                           CONST PPIXELFORMATDESCRIPTOR  pfd);
+
+INT
+STDCALL
+NtGdiDescribePixelFormat(HDC  hDC,
+                             INT  PixelFormat,
+                             UINT  BufSize,
+                             PPIXELFORMATDESCRIPTOR  pfd);
+
+UINT
+STDCALL
+NtGdiGetEnhMetaFilePixelFormat(HENHMETAFILE  hEMF,
+                                    DWORD  BufSize, 
+                                    CONST PPIXELFORMATDESCRIPTOR  pfd);
+
+INT
+STDCALL
+NtGdiGetPixelFormat(HDC  hDC);
+
+BOOL
+STDCALL
+NtGdiSetPixelFormat(HDC  hDC,
+                         INT  PixelFormat,
+                         CONST PPIXELFORMATDESCRIPTOR  pfd);
+
+BOOL
+STDCALL
+NtGdiSwapBuffers(HDC  hDC);
+
+#endif
+
index 1622a27..68df4f3 100644 (file)
@@ -99,11 +99,13 @@ HRESULT Hal_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW pD
        CreateData.lpDDSurfaceDesc = (LPDDSURFACEDESC)&This->ddsd; 
        CreateData.dwSCnt = 1;
        CreateData.lplpSList = This->pLocal;    
-       CreateData.ddRVal = DD_FALSE;
-               
+       asm("int3");
+       CreateData.ddRVal = 1;
+
        /* this is the call we were waiting for */
        if(This->owner->DirectDrawGlobal.lpDDCBtmp->HALDD.CreateSurface(&CreateData) == DDHAL_DRIVER_NOTHANDLED)
                return DDERR_INVALIDPARAMS;
+       asm("int3");
 
        /* FIXME remove the if and debug string*/
        if(CreateData.ddRVal != DD_OK)
index 195e6e3..ed3bd92 100644 (file)
@@ -26,7 +26,7 @@ BRUSHOBJ_hGetColorTransform@4
 BRUSHOBJ_pvAllocRbrush@8
 BRUSHOBJ_pvGetRbrush@4
 BRUSHOBJ_ulGetBrushColor@4
-BitBlt@36
+BitBlt@36=NtGdiBitBlt@36
 CancelDC@4
 CheckColorsInGamut@16
 ChoosePixelFormat@8
@@ -88,7 +88,7 @@ CreateRectRgnIndirect@4=NtGdiCreateRectRgnIndirect@4
 CreateRoundRectRgn@24=NtGdiCreateRoundRectRgn@24
 CreateScalableFontResourceA@16
 CreateScalableFontResourceW@16
-CreateSolidBrush@4
+CreateSolidBrush@4=NtGdiCreateSolidBrush@4
 DPtoLP@12=NtGdiDPtoLP@12
 DeleteColorSpace@4
 DeleteDC@4=NtGdiDeleteDC@4
@@ -393,7 +393,7 @@ GetGlyphIndicesA@20
 GetGlyphIndicesW@20
 GetGlyphOutline=GetGlyphOutlineA@28
 GetGlyphOutlineA@28
-GetGlyphOutlineW@28
+GetGlyphOutlineW@28=NtGdiGetGlyphOutline@28
 GetGlyphOutlineWow@28
 GetGraphicsMode@4=NtGdiGetGraphicsMode@4
 GetHFONT@4
diff --git a/reactos/lib/gdi32/include/gdi32p.h b/reactos/lib/gdi32/include/gdi32p.h
deleted file mode 100644 (file)
index a7ea6bd..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*\r
- * COPYRIGHT:       See COPYING in the top level directory\r
- * PROJECT:         ReactOS System Libraries\r
- * FILE:            lib/gdi32/include/gdi32p.h\r
- * PURPOSE:         User-Mode Win32 GDI Library Private Header\r
- * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)\r
- */\r
-\r
-/* DATA **********************************************************************/\r
-\r
-extern PGDI_TABLE_ENTRY GdiHandleTable;\r
-extern HANDLE hProcessHeap;\r
-extern HANDLE CurrentProcessId;\r
-\r
-typedef INT\r
-(CALLBACK* EMFPLAYPROC)(\r
-    HDC hdc,\r
-    INT iFunction,\r
-    HANDLE hPageQuery\r
-);\r
-\r
-/* FUNCTIONS *****************************************************************/\r
-\r
-PVOID\r
-HEAP_alloc(DWORD len);\r
-\r
-NTSTATUS\r
-HEAP_strdupA2W(\r
-    LPWSTR* ppszW,\r
-    LPCSTR lpszA\r
-);\r
-\r
-VOID\r
-HEAP_free(LPVOID memory);\r
-\r
-BOOL\r
-FASTCALL\r
-TextMetricW2A(\r
-    TEXTMETRICA *tma,\r
-    TEXTMETRICW *tmw\r
-);\r
-\r
-BOOL\r
-FASTCALL\r
-NewTextMetricW2A(\r
-    NEWTEXTMETRICA *tma,\r
-    NEWTEXTMETRICW *tmw\r
-);\r
-\r
-BOOL\r
-FASTCALL\r
-NewTextMetricExW2A(\r
-    NEWTEXTMETRICEXA *tma,\r
-    NEWTEXTMETRICEXW *tmw\r
-);\r
-\r
-BOOL\r
-GdiIsHandleValid(HGDIOBJ hGdiObj);\r
-\r
-BOOL\r
-GdiGetHandleUserData(\r
-    HGDIOBJ hGdiObj,\r
-    PVOID *UserData\r
-);\r
-\r
-BOOL\r
-WINAPI\r
-CalculateColorTableSize(\r
-    CONST BITMAPINFOHEADER *BitmapInfoHeader,\r
-    UINT *ColorSpec,\r
-    UINT *ColorTableSize\r
-);\r
-\r
-LPBITMAPINFO\r
-WINAPI\r
-ConvertBitmapInfo(\r
-    CONST BITMAPINFO *BitmapInfo,\r
-    UINT ColorSpec,\r
-    UINT *BitmapInfoSize,\r
-    BOOL FollowedByData\r
-);\r
-\r
-DEVMODEW *\r
-NTAPI\r
-GdiConvertToDevmodeW(DEVMODEA *dm);\r
-\r
-VOID\r
-NTAPI\r
-LogFontA2W(\r
-    LPLOGFONTW pW,\r
-    CONST LOGFONTA *pA\r
-);\r
-\r
-VOID\r
-NTAPI\r
-LogFontW2A(\r
-    LPLOGFONTA pA,\r
-    CONST LOGFONTW *pW\r
-);\r
-\r
-/* FIXME: Put in some public header */\r
-UINT\r
-WINAPI\r
-UserRealizePalette(HDC hDC);\r
-\r
-/* EOF */\r
index 1eeb88e..50750cb 100644 (file)
@@ -8,26 +8,89 @@
 
 /* INCLUDES ******************************************************************/
 
-/* Definitions */
+/* SDK/DDK/NDK Headers. */
 #define WIN32_NO_STATUS
 #define NTOS_MODE_USER
-
-/* SDK/DDK/NDK Headers. */
+#define __GDI32__
 #include <windows.h>
-#include <ndk/ntndk.h>
+#include <ddraw.h>
+#include <ddrawi.h>
 #include <winddi.h>
-#include <d3dnthal.h>
 #include <prntfont.h>
+#include <ddrawgdi.h>
+#include <ndk/ntndk.h>
+#include <tchar.h>
+
+/* Win32K External Headers */
+#include <win32k/kapi.h>
+
+/* directdraw syscall */
+#include <win32k/ntddraw.h>
+
+
+#define NtUserGetDCBrushColor(hbr) \
+  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_BRUSH, TWOPARAM_ROUTINE_GETDCCOLOR)
+
+#define NtUserGetDCPenColor(hbr) \
+  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_PEN, TWOPARAM_ROUTINE_GETDCCOLOR)
+
+#define NtUserSetDCBrushColor(hbr, crColor) \
+  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), (DWORD)crColor, TWOPARAM_ROUTINE_SETDCBRUSHCOLOR)
+
+#define NtUserSetDCPenColor(hbr, crColor) \
+  (COLORREF)NtUserCallTwoParam((DWORD)(hbr), (DWORD)crColor, TWOPARAM_ROUTINE_SETDCPENCOLOR)
+
+typedef int (CALLBACK* EMFPLAYPROC)( HDC, INT, HANDLE );
+typedef DWORD FULLSCREENCONTROL;
+typedef DWORD UNIVERSAL_FONT_ID;
+typedef UNIVERSAL_FONT_ID *PUNIVERSAL_FONT_ID;
+typedef DWORD REALIZATION_INFO;
+typedef REALIZATION_INFO *PREALIZATION_INFO;
+typedef DWORD CHWIDTHINFO;
+typedef CHWIDTHINFO *PCHWIDTHINFO;
+
+/* == GLOBAL VARIABLES ====================================================== */
+
+extern PGDI_TABLE_ENTRY GdiHandleTable;
+extern HANDLE hProcessHeap;
+extern HANDLE CurrentProcessId;
+
+/* == HEAP ================================================================== */
+
+PVOID    HEAP_alloc ( DWORD len );
+NTSTATUS HEAP_strdupA2W ( LPWSTR* ppszW, LPCSTR lpszA );
+VOID     HEAP_free ( LPVOID memory );
+
+/* == FONT ================================================================== */
+
+BOOL FASTCALL TextMetricW2A(TEXTMETRICA *tma, TEXTMETRICW *tmw);
+BOOL FASTCALL NewTextMetricW2A(NEWTEXTMETRICA *tma, NEWTEXTMETRICW *tmw);
+BOOL FASTCALL NewTextMetricExW2A(NEWTEXTMETRICEXA *tma, NEWTEXTMETRICEXW *tmw);
+
+/* == GDI HANDLES =========================================================== */
+
+BOOL GdiIsHandleValid(HGDIOBJ hGdiObj);
+BOOL GdiGetHandleUserData(HGDIOBJ hGdiObj, PVOID *UserData);
+
+/* == BITMAP UTILITY FUNCTIONS ============================================== */
+
+BOOL STDCALL CalculateColorTableSize(CONST BITMAPINFOHEADER *BitmapInfoHeader, UINT *ColorSpec, UINT *ColorTableSize);
+LPBITMAPINFO STDCALL ConvertBitmapInfo(CONST BITMAPINFO *BitmapInfo, UINT ColorSpec, UINT *BitmapInfoSize, BOOL FollowedByData);
 
-/* Public Win32K Headers */
-#include <win32k/ntgdityp.h>
-#include <ntgdi.h>
-#include <win32k/ntgdihdl.h>
+/* == CONVERSION FUNCTIONS ================================================== */
+DEVMODEW *
+STDCALL
+GdiConvertToDevmodeW(DEVMODEA *dm);
 
-/* Private GDI32 Header */
-#include "gdi32p.h"
+VOID
+STDCALL
+LogFontA2W(LPLOGFONTW pW, CONST LOGFONTA *pA);
 
-/* Deprecated NTGDI calls which shouldn't exist */
-#include <win32k/ntgdibad.h>
+VOID
+STDCALL
+LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW);
 
+/* == Directx FUNCTIONS ================================================== */
+BOOL
+intDDCreateSurface ( LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bComplete);
 /* EOF */
index 78c75b8..e21fdfc 100644 (file)
 
 
 #include "precomp.h"
-#include <ddraw.h>
-#include <ddrawi.h>
-#include <ddrawint.h>
-#include <ddrawgdi.h>
 static LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobalInternal;
 static ULONG RemberDdQueryDisplaySettingsUniquenessID = 0;
 
-BOOL
-intDDCreateSurface ( LPDDRAWI_DDRAWSURFACE_LCL pSurface, 
-                                    BOOL bComplete);
 
 /*
  * @implemented
@@ -98,42 +91,8 @@ DdCreateDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
   return TRUE;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-DdQueryDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
-                        LPDDHALINFO pHalInfo,
-                        LPDDHAL_DDCALLBACKS pDDCallbacks,
-                        LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks,
-                        LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks,
-                        LPD3DHAL_CALLBACKS pD3dCallbacks,
-                        LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData,
-                        LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks,
-                        LPDDSURFACEDESC pD3dTextureFormats,
-                        LPDWORD pdwFourCC,
-                        LPVIDMEM pvmList)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
 
-/*
- * @unimplemented
- */
-HBITMAP
-STDCALL
-DdCreateDIBSection(HDC hdc,
-                   CONST BITMAPINFO *pbmi,
-                   UINT iUsage,
-                   VOID **ppvBits,
-                   HANDLE hSectionApp,
-                   DWORD dwOffset)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
+
 
 /*
  * @implemented
index d212219..a9808a4 100644 (file)
@@ -3634,6 +3634,49 @@ XLATEOBJ_piVector(XLATEOBJ *XlateObj)
        return 0;
 }
 
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdQueryDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+LPDDHALINFO pHalInfo,
+LPDDHAL_DDCALLBACKS pDDCallbacks,
+LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks,
+LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks,
+LPD3DHAL_CALLBACKS pD3dCallbacks,
+LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData,
+LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks,
+LPDDSURFACEDESC pD3dTextureFormats,
+LPDWORD pdwFourCC,
+LPVIDMEM pvmList
+)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+
+
+/*
+ * @unimplemented
+ */
+HBITMAP STDCALL DdCreateDIBSection( 
+HDC hdc,
+CONST BITMAPINFO *pbmi,
+UINT iUsage,
+VOID **ppvBits,
+HANDLE hSectionApp,
+DWORD dwOffset
+)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+
 /*
  * @unimplemented
  */
index 4c6de64..067c353 100644 (file)
@@ -157,9 +157,9 @@ CreateColorSpaceA(
 BOOL
 STDCALL
 GetICMProfileA(
-       HDC             hdc,
-       LPDWORD pBufSize,
-       LPSTR           pszFilename
+       HDC             a0,
+       DWORD           a1,     /* MS says LPDWORD! */
+       LPSTR           a2
        )
 {
        UNIMPLEMENTED;
@@ -258,7 +258,7 @@ BOOL
 STDCALL
 UpdateICMRegKeyA(
        DWORD   a0,
-       LPSTR   a1,
+       DWORD   a1,
        LPSTR   a2,
        UINT    a3
        )
index cd9431e..4260ee0 100644 (file)
@@ -129,7 +129,7 @@ BOOL
 STDCALL
 GetICMProfileW(
        HDC             a0,
-       LPDWORD         a1,
+       DWORD           a1,     /* MS says LPDWORD! */
        LPWSTR          a2
        )
 {
@@ -228,7 +228,7 @@ BOOL
 STDCALL
 UpdateICMRegKeyW(
        DWORD   a0,
-       LPWSTR  a1,
+       DWORD   a1,
        LPWSTR  a2,
        UINT    a3
        )
index 72b7b92..8db96ff 100644 (file)
@@ -187,8 +187,8 @@ UINT
 STDCALL
 GetEnhMetaFilePixelFormat(
        HENHMETAFILE                    hemf,
-       UINT                            cbBuffer,
-       PIXELFORMATDESCRIPTOR   *ppfd
+       DWORD                           cbBuffer,
+       CONST PIXELFORMATDESCRIPTOR     *ppfd
        )
 {
        ENHMETAHEADER pemh;
@@ -199,7 +199,7 @@ GetEnhMetaFilePixelFormat(
        {
                if(pemh.cbPixelFormat)
                {
-               memcpy((void*)ppfd, UlongToPtr(pemh.offPixelFormat), cbBuffer );
+               memcpy((void*)ppfd, (const void *)pemh.offPixelFormat, cbBuffer );
                return(pemh.cbPixelFormat);
                }
        }
index 9fd1043..c4f6248 100644 (file)
@@ -20,7 +20,8 @@ CreateDIBSection(
                                       &ConvertedInfoSize, FALSE);
    if (pConvertedInfo)
    {
-      hBitmap = NtGdiCreateDIBSection(hDC, hSection, dwOffset, pConvertedInfo, Usage, 0, 0, 0, Bits);
+      hBitmap = NtGdiCreateDIBSection(hDC, pConvertedInfo, Usage, Bits,
+                                      hSection, dwOffset);
       if (BitmapInfo != pConvertedInfo)
          RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
    }
@@ -28,34 +29,6 @@ CreateDIBSection(
    return hBitmap;
 }
 
-/*
- * @implemented
- */
-BOOL
-STDCALL
-BitBlt(HDC hdcDest,      /* handle to destination DC */
-       int nXOriginDest, /* x-coord of destination upper-left corner */
-       int nYOriginDest, /* y-coord of destination upper-left corner */
-       int nWidthDest,   /* width of destination rectangle */
-       int nHeightDest,  /* height of destination rectangle */
-       HDC hdcSrc,       /* handle to source DC */
-       int nXSrc,        /* x-coordinate of source upper-left corner */
-       int nYSrc,        /* y-coordinate of source upper-left corner */
-       DWORD dwRop)      /* raster operation code */
-{
-    return NtGdiBitBlt(hdcDest,
-                       nXOriginDest,
-                       nYOriginDest,
-                       nWidthDest,
-                       nHeightDest,
-                       hdcSrc,
-                       nXSrc,
-                       nYSrc,
-                       dwRop,
-                       0,
-                       0);
-}
-
 /*
  * @implemented
  */
@@ -78,9 +51,9 @@ StretchBlt(
    {
       return NtGdiStretchBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest,
                              nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc,
-                             nWidthSrc, nHeightSrc, dwRop, 0);
+                             nWidthSrc, nHeightSrc, dwRop);
    }
   
    return NtGdiBitBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest,
-                      nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, dwRop, 0, 0);
+                      nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, dwRop);
 }
index 538f111..ebf0174 100644 (file)
@@ -39,7 +39,7 @@ CreateDIBPatternBrush(
    if (pConvertedInfo)
    {
       hBrush = NtGdiCreateDIBBrush(pConvertedInfo, fuColorSpec,
-                                   ConvertedInfoSize, FALSE, FALSE, lpPackedDIB);
+                                   ConvertedInfoSize, lpPackedDIB);
       if ((PBITMAPINFO)lpPackedDIB != pConvertedInfo)
          RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
    }
@@ -69,7 +69,7 @@ CreateDIBPatternBrushPt(
    if (pConvertedInfo)
    {
       hBrush = NtGdiCreateDIBBrush(pConvertedInfo, fuColorSpec,
-                                   ConvertedInfoSize, FALSE, FALSE, (PVOID)lpPackedDIB);
+                                   ConvertedInfoSize, lpPackedDIB);
       if ((PBITMAPINFO)lpPackedDIB != pConvertedInfo)
          RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
    }
@@ -77,17 +77,6 @@ CreateDIBPatternBrushPt(
    return hBrush;
 }
 
-/*
- * @implemented
- */
-HBRUSH
-STDCALL
-CreateSolidBrush(IN COLORREF crColor)
-{
-    /* Call Server-Side API */
-    return NtGdiCreateSolidBrush(crColor, NULL);
-}
-
 /*
  * @implemented
  */
@@ -116,7 +105,7 @@ CreateBrushIndirect(
          break;
 
       case BS_SOLID:
-         hBrush = NtGdiCreateSolidBrush(LogBrush->lbColor, 0);
+         hBrush = NtGdiCreateSolidBrush(LogBrush->lbColor);
          break;
 
       case BS_HATCHED:
index 70ce7bb..781d0a1 100644 (file)
@@ -348,8 +348,7 @@ ResetDCW(
        CONST DEVMODEW  *lpInitData
        )
 {
-  NtGdiResetDC ( hdc, (PDEVMODEW)lpInitData, NULL, NULL, NULL);
-  return hdc;
+  return NtGdiResetDC ( hdc, lpInitData );
 }
 
 
@@ -364,12 +363,13 @@ ResetDCA(
        )
 {
   LPDEVMODEW InitDataW;
+  HDC hDc;
 
   InitDataW = GdiConvertToDevmodeW((LPDEVMODEA)lpInitData);
 
-  NtGdiResetDC ( hdc, InitDataW, NULL, NULL, NULL);
+  hDc = NtGdiResetDC ( hdc, InitDataW );
   HEAP_free(InitDataW);
-  return hdc;
+  return hDc;
 }
 
 
@@ -383,7 +383,7 @@ StartDocW(
        CONST DOCINFOW  *a1
        )
 {
-       return NtGdiStartDoc ( hdc, (DOCINFOW *)a1, NULL, 0);
+       return NtGdiStartDoc ( hdc, (DOCINFOW *)a1 );
 }
 
 
index c055111..c7495d6 100644 (file)
@@ -517,28 +517,9 @@ GetGlyphOutlineA(
        CONST MAT2      *lpmat2
        )
 {
-  return NtGdiGetGlyphOutline ( hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, (CONST LPMAT2)lpmat2, TRUE);
+  return NtGdiGetGlyphOutline ( hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, (CONST LPMAT2)lpmat2 );
 }
 
-/*
- * @implemented
- */
-DWORD
-STDCALL
-GetGlyphOutlineW(
-       HDC             hdc,
-       UINT            uChar,
-       UINT            uFormat,
-       LPGLYPHMETRICS  lpgm,
-       DWORD           cbBuffer,
-       LPVOID          lpvBuffer,
-       CONST MAT2      *lpmat2
-       )
-{
-  return NtGdiGetGlyphOutline ( hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, (CONST LPMAT2)lpmat2, TRUE);
-}
-
-
 
 /*
  * @implemented
index dda7616..925dfc0 100644 (file)
@@ -127,7 +127,7 @@ SetMiterLimit(
        PFLOAT  a2
        )
 {
-       return NtGdiSetMiterLimit ( hdc, a1, (PDWORD)a2 );
+       return NtGdiSetMiterLimit ( hdc, a1, a2 );
 }
 
 
@@ -180,7 +180,7 @@ GetMiterLimit(
        PFLOAT  a1
        )
 {
-       return NtGdiGetMiterLimit ( hdc, (PDWORD)a1 );
+       return NtGdiGetMiterLimit ( hdc, a1 );
 }
 
 /*
index e7c83ec..f11b8bb 100644 (file)
 /* CSRSS Headers */
 #include <csrss/csrss.h>
 
-/* Public Win32K Headers */
-#include <win32k/ntusrtyp.h>
+/* External Win32K Headers */
 #include <win32k/ntuser.h>
+#include <win32k/caret.h>
 #include <win32k/callback.h>
+#include <win32k/cursoricon.h>
+#include <win32k/menu.h>
+#include <win32k/paint.h>
 
 /* WINE Headers */
 #include <wine/debug.h>
@@ -38,7 +41,6 @@
 /* Internal User32 Headers */
 #include "user32p.h"
 
-/* FIXME: Use ntgdi.h then cleanup... */
+/* FIXME: FILIP */
 HGDIOBJ STDCALL  NtGdiSelectObject(HDC  hDC, HGDIOBJ  hGDIObj);
-BOOL STDCALL NtGdiPatBlt(HDC hdcDst, INT x, INT y, INT cx, INT cy, DWORD rop4);
-DWORD STDCALL GdiGetCharDimensions(HDC, LPTEXTMETRICW, DWORD *);
+DWORD STDCALL GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
index 6d7382b..e591573 100644 (file)
@@ -83,50 +83,50 @@ typedef struct _STRGDI {
   STROBJ StrObj;
 } STRGDI;
 
-typedef BOOL (STDCALL *PFN_BitBlt)(SURFOBJ *, SURFOBJ *, SURFOBJ *, CLIPOBJ *,
+typedef BOOL STDCALL (*PFN_BitBlt)(SURFOBJ *, SURFOBJ *, SURFOBJ *, CLIPOBJ *,
                            XLATEOBJ *, RECTL *, POINTL *, POINTL *,
                            BRUSHOBJ *, POINTL *, ROP4);
 
-typedef BOOL (STDCALL *PFN_TransparentBlt)(SURFOBJ *, SURFOBJ *, CLIPOBJ *, XLATEOBJ *, RECTL *, RECTL *, ULONG, ULONG);
+typedef BOOL STDCALL (*PFN_TransparentBlt)(SURFOBJ *, SURFOBJ *, CLIPOBJ *, XLATEOBJ *, RECTL *, RECTL *, ULONG, ULONG);
 
-typedef BOOL (STDCALL *PFN_StretchBlt)(SURFOBJ *, SURFOBJ *, SURFOBJ *, CLIPOBJ *,
+typedef BOOL STDCALL (*PFN_StretchBlt)(SURFOBJ *, SURFOBJ *, SURFOBJ *, CLIPOBJ *,
                                XLATEOBJ *, COLORADJUSTMENT *, POINTL *,
                                RECTL *, RECTL *, PPOINT, ULONG);
 
-typedef BOOL (STDCALL *PFN_TextOut)(SURFOBJ *, STROBJ *, FONTOBJ *, CLIPOBJ *,
+typedef BOOL STDCALL (*PFN_TextOut)(SURFOBJ *, STROBJ *, FONTOBJ *, CLIPOBJ *,
                             RECTL *, RECTL *, BRUSHOBJ *, BRUSHOBJ *,
                             POINTL *, MIX);
 
-typedef BOOL (STDCALL *PFN_Paint)(SURFOBJ *, CLIPOBJ *, BRUSHOBJ *, POINTL *, MIX);
+typedef BOOL STDCALL (*PFN_Paint)(SURFOBJ *, CLIPOBJ *, BRUSHOBJ *, POINTL *, MIX);
 
-typedef BOOL (STDCALL *PFN_StrokePath)(SURFOBJ *, PATHOBJ *, CLIPOBJ *, XFORMOBJ *,
+typedef BOOL STDCALL (*PFN_StrokePath)(SURFOBJ *, PATHOBJ *, CLIPOBJ *, XFORMOBJ *,
                                BRUSHOBJ *, POINTL *, LINEATTRS *, MIX);
 
-typedef BOOL (STDCALL *PFN_FillPath)(SURFOBJ *, PATHOBJ *, CLIPOBJ *, BRUSHOBJ *,
+typedef BOOL STDCALL (*PFN_FillPath)(SURFOBJ *, PATHOBJ *, CLIPOBJ *, BRUSHOBJ *,
                              POINTL *, MIX, ULONG);
 
-typedef BOOL (STDCALL *PFN_StrokeAndFillPath)(SURFOBJ *, PATHOBJ *, CLIPOBJ *,
+typedef BOOL STDCALL (*PFN_StrokeAndFillPath)(SURFOBJ *, PATHOBJ *, CLIPOBJ *,
                 XFORMOBJ *, BRUSHOBJ *, LINEATTRS *, BRUSHOBJ *,
                 POINTL *, MIX, ULONG);
 
-typedef BOOL (STDCALL *PFN_LineTo)(SURFOBJ *, CLIPOBJ *, BRUSHOBJ *,
+typedef BOOL STDCALL (*PFN_LineTo)(SURFOBJ *, CLIPOBJ *, BRUSHOBJ *,
                            LONG, LONG, LONG, LONG, RECTL *, MIX);
 
-typedef BOOL (STDCALL *PFN_CopyBits)(SURFOBJ *, SURFOBJ *, CLIPOBJ *,
+typedef BOOL STDCALL (*PFN_CopyBits)(SURFOBJ *, SURFOBJ *, CLIPOBJ *,
                              XLATEOBJ *, RECTL *, POINTL *);
 
-typedef VOID (STDCALL *PFN_Synchronize)(DHPDEV, RECTL *);
+typedef VOID STDCALL (*PFN_Synchronize)(DHPDEV, RECTL *);
 
-typedef VOID (STDCALL *PFN_MovePointer)(SURFOBJ *, LONG, LONG, RECTL *);
+typedef VOID STDCALL (*PFN_MovePointer)(SURFOBJ *, LONG, LONG, RECTL *);
 
-typedef ULONG (STDCALL *PFN_SetPointerShape)(SURFOBJ *, SURFOBJ *, SURFOBJ *, XLATEOBJ *,
+typedef ULONG STDCALL (*PFN_SetPointerShape)(SURFOBJ *, SURFOBJ *, SURFOBJ *, XLATEOBJ *,
                            LONG, LONG, LONG, LONG, RECTL *, FLONG);
 
-typedef HBITMAP (STDCALL *PFN_CreateDeviceBitmap)(DHPDEV, SIZEL, ULONG);
+typedef HBITMAP STDCALL (*PFN_CreateDeviceBitmap)(DHPDEV, SIZEL, ULONG);
 
-typedef BOOL (STDCALL *PFN_SetPalette)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG);
+typedef BOOL STDCALL (*PFN_SetPalette)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG);
 
-typedef BOOL (STDCALL *PFN_GradientFill)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG);
+typedef BOOL STDCALL (*PFN_GradientFill)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG);
 
 typedef struct _WNDGDI {
   WNDOBJ            WndObj;
diff --git a/reactos/subsys/win32k/include/bitmaps.h b/reactos/subsys/win32k/include/bitmaps.h
deleted file mode 100644 (file)
index 6537abb..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-\r
-#ifndef __WIN32K_BITMAPS_H\r
-#define __WIN32K_BITMAPS_H\r
-\r
-/* GDI logical bitmap object */\r
-typedef struct _BITMAPOBJ\r
-{\r
-  SURFOBJ     SurfObj;\r
-  FLONG              flHooks;\r
-  FLONG       flFlags;\r
-  SIZE        dimension;    /* For SetBitmapDimension(), do NOT use\r
-                               to get width/height of bitmap, use\r
-                               bitmap.bmWidth/bitmap.bmHeight for\r
-                               that */\r
-  PFAST_MUTEX BitsLock;     /* You need to hold this lock before you touch\r
-                               the actual bits in the bitmap */\r
-\r
-  /* For device-independent bitmaps: */\r
-  DIBSECTION *dib;\r
-  HPALETTE hDIBPalette;\r
-} BITMAPOBJ, *PBITMAPOBJ;\r
-\r
-#define BITMAPOBJ_IS_APIBITMAP         0x1\r
-\r
-/*  Internal interface  */\r
-\r
-#define  BITMAPOBJ_AllocBitmap()  \\r
-  ((HBITMAP) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BITMAP))\r
-#define  BITMAPOBJ_FreeBitmap(hBMObj)  \\r
-  GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)\r
-/* NOTE: Use shared locks! */\r
-#define  BITMAPOBJ_LockBitmap(hBMObj) (PBITMAPOBJ)EngLockSurface((HSURF)hBMObj)\r
-#define  BITMAPOBJ_UnlockBitmap(pBMObj) EngUnlockSurface(&pBMObj->SurfObj)\r
-BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody);\r
-\r
-BOOL INTERNAL_CALL BITMAPOBJ_InitBitsLock(BITMAPOBJ *pBMObj);\r
-#define BITMAPOBJ_LockBitmapBits(pBMObj) ExAcquireFastMutex((pBMObj)->BitsLock)\r
-#define BITMAPOBJ_UnlockBitmapBits(pBMObj) ExReleaseFastMutex((pBMObj)->BitsLock)\r
-void INTERNAL_CALL BITMAPOBJ_CleanupBitsLock(BITMAPOBJ *pBMObj);\r
-\r
-INT     FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp);\r
-HBITMAP FASTCALL BITMAPOBJ_CopyBitmap (HBITMAP  hBitmap);\r
-INT     FASTCALL DIB_GetDIBWidthBytes (INT  width, INT  depth);\r
-int     NTAPI  DIB_GetDIBImageBytes (INT  width, INT  height, INT  depth);\r
-INT     FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);\r
-INT     NTAPI  BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer);\r
-HBITMAP FASTCALL BitmapToSurf(PBITMAPOBJ BitmapObj, HDEV GDIDevice);\r
-\r
-#endif\r
-\r
index 3a3a99e..8106d65 100644 (file)
@@ -1,13 +1,6 @@
 #ifndef _WIN32K_COLOR_H
 #define _WIN32K_COLOR_H
 
-#ifndef CLR_INVALID
-#define CLR_INVALID         0xffffffff
-#endif
-#define PC_SYS_USED     0x80           /* palentry is used (both system and logical) */
-#define PC_SYS_RESERVED 0x40           /* system palentry is not to be mapped to */
-#define PC_SYS_MAPPED   0x10           /* logical palentry is a direct alias for system palentry */
-
 #define NB_RESERVED_COLORS              20 /* number of fixed colors in system palette */
 
 const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate (VOID);
@@ -15,5 +8,4 @@ COLORREF STDCALL COLOR_LookupNearestColor (PALETTEENTRY* palPalEntry, INT size,
 INT STDCALL COLOR_PaletteLookupExactIndex (PALETTEENTRY* palPalEntry, INT size, COLORREF col);
 INT STDCALL COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, XLATEOBJ *XlateObj, COLORREF col, BOOL skipReserved);
 
-
 #endif /* _WIN32K_COLOR_H */
diff --git a/reactos/subsys/win32k/include/coord.h b/reactos/subsys/win32k/include/coord.h
deleted file mode 100644 (file)
index fe6badc..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __WIN32K_COORD_H\r
-#define __WIN32K_COORD_H\r
-\r
-VOID\r
-FASTCALL\r
-IntDPtoLP ( PDC dc, LPPOINT Points, INT Count );\r
-\r
-VOID\r
-FASTCALL\r
-CoordDPtoLP ( PDC Dc, LPPOINT Point );\r
-\r
-int\r
-FASTCALL\r
-IntGetGraphicsMode ( PDC dc );\r
-\r
-VOID\r
-FASTCALL\r
-CoordLPtoDP ( PDC Dc, LPPOINT Point );\r
-\r
-VOID\r
-FASTCALL\r
-IntLPtoDP ( PDC dc, LPPOINT Points, INT Count );\r
-\r
-#endif\r
index 415fb20..49a13af 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _WIN32K_DIB_H
 #define _WIN32K_DIB_H
 
-#include "dc.h"
+#include <win32k/dc.h>
 
 INT FASTCALL
 DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);
index 70a4edb..23adf58 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WIN32K_INTGDI_H
 #define _WIN32K_INTGDI_H
 
-#include "region.h"
-
 /* Brush functions */
 
 XLATEOBJ* FASTCALL
index 36ec888..5b24901 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _WIN32K_MENU_H
 #define _WIN32K_MENU_H
 
+#include <win32k/menu.h>
+
 #define IS_ATOM(x) \
   (((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
 
@@ -36,13 +38,6 @@ typedef struct _MENU_OBJECT
   BOOL RtoL;
 } MENU_OBJECT, *PMENU_OBJECT;
 
-typedef struct _SETMENUITEMRECT
-{
-  UINT uItem;
-  BOOL fByPosition;
-  RECT rcRect;
-} SETMENUITEMRECT, *PSETMENUITEMRECT;
-
 PMENU_OBJECT FASTCALL
 IntGetMenuObject(HMENU hMenu);
 
index 2fd1898..a3711d0 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef _WIN32K_OBJECT_H
 #define _WIN32K_OBJECT_H
 
-#include "gdiobj.h"
-#include "bitmaps.h"
-#include "pen.h"
+#include <win32k/gdiobj.h>
+#include <win32k/bitmaps.h>
+#include <win32k/pen.h>
 
 #define FIRST_USER_HANDLE 0x0020  /* first possible value for low word of user handle */
 #define LAST_USER_HANDLE  0xffef  /* last possible value for low word of user handle */
index 9fcce87..9631b1f 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WIN32K_PATH_H
 #define _WIN32K_PATH_H
 
-#define PATH_IsPathOpen(path) ((path).state==PATH_Open)
-
 BOOL FASTCALL PATH_Arc (PDC dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd);
 BOOL FASTCALL PATH_AssignGdiPath (GdiPath *pPathDest, const GdiPath *pPathSrc);
 VOID FASTCALL PATH_DestroyGdiPath (GdiPath *pPath);
diff --git a/reactos/subsys/win32k/include/region.h b/reactos/subsys/win32k/include/region.h
deleted file mode 100644 (file)
index c86c7cb..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-\r
-#ifndef __WIN32K_REGION_H\r
-#define __WIN32K_REGION_H\r
-\r
-#include "gdiobj.h"\r
-\r
-/* Internal region data. Can't use RGNDATA structure because buffer is allocated statically */\r
-typedef struct _ROSRGNDATA {\r
-  RGNDATAHEADER rdh;\r
-  PRECT         Buffer;\r
-} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;\r
-\r
-\r
-#define  RGNDATA_FreeRgn(hRgn)  GDIOBJ_FreeObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)\r
-#define  RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))\r
-#define  RGNDATA_UnlockRgn(pRgn) GDIOBJ_UnlockObjByPtr(pRgn)\r
-HRGN FASTCALL RGNDATA_AllocRgn(INT n);\r
-BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody);\r
-\r
-#endif\r
-\r
index b1cfa16..1072e64 100644 (file)
@@ -1,24 +1,6 @@
 #ifndef _WIN32K_TEXT_H
 #define _WIN32K_TEXT_H
 
-/* GDI logical font object */
-typedef struct
-{
-   LOGFONTW   logfont;
-   FONTOBJ    *Font;
-   BOOLEAN Initialized; /* Don't reinitialize for each DC */
-} TEXTOBJ, *PTEXTOBJ;
-
-/*  Internal interface  */
-
-#define  TEXTOBJ_AllocText() \
-  ((HFONT) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_FONT))
-#define  TEXTOBJ_FreeText(hBMObj)  GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT)
-#define  TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT))
-#define  TEXTOBJ_UnlockText(pBMObj) GDIOBJ_UnlockObjByPtr (pBMObj)
-
-NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle);
-NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont);
 BOOL FASTCALL InitFontSupport(VOID);
 BOOL FASTCALL IntIsFontRenderingEnabled(VOID);
 BOOL FASTCALL IntIsFontRenderingEnabled(VOID);
index e00a604..431f3e9 100644 (file)
@@ -9,8 +9,6 @@
 /* INCLUDES ******************************************************************/
 #ifndef __WIN32K_H
 #define __WIN32K_H
-#define INTERNAL_CALL NTAPI
-
 /* Internal Win32k Headers */
 #include <include/ntuser.h>
 #include <include/win32.h>
@@ -61,9 +59,6 @@
 #include <include/winpos.h>
 #include <include/winsta.h>
 #include <include/mmcopy.h>
-#include <include/misc.h>
-#include <include/coord.h>
-#include <include/gdifloat.h>
 #include <eng/objects.h>
 #include <eng/misc.h>
 #include <dib/dib.h>
index 9596aa2..94eb7a8 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include <w32k.h>
+#include <win32k/ntddraw.h>
 #include <include/napi.h>
 
 #define NDEBUG
index 107907e..03d799d 100644 (file)
 
 
 
-DWORD STDCALL NtGdiD3dContextCreate(
+BOOL STDCALL NtGdiD3dContextCreate(
     HANDLE hDirectDrawLocal,
     HANDLE hSurfColor,
     HANDLE hSurfZ,
-    LPD3DNTHAL_CONTEXTCREATEDATA pdcci
+    D3DNTHAL_CONTEXTCREATEDATA *pdcci
 )
 {
        UNIMPLEMENTED
@@ -37,7 +37,7 @@ DWORD STDCALL NtGdiD3dContextDestroy(
        return 0;
 }
 
-DWORD STDCALL NtGdiD3dContextDestroyAll(LPD3DNTHAL_CONTEXTDESTROYALLDATA pdcad)
+DWORD STDCALL NtGdiD3dContextDestroyAll(VOID)
 {
        /* This entry point is not supported on NT5 and ROS */
        UNIMPLEMENTED
@@ -226,7 +226,7 @@ DWORD STDCALL NtGdiDdGetDriverState(
        return 0;
 }
 
-HANDLE STDCALL NtGdiDdGetDxHandle(
+DWORD STDCALL NtGdiDdGetDxHandle(
     HANDLE hDirectDraw,
     HANDLE hSurface,
     BOOL bRelease
@@ -383,9 +383,7 @@ DWORD STDCALL NtGdiDdUnlockD3D(
 
 
 
-DWORD STDCALL NtGdiDdAlphaBlt(IN HANDLE hSurfaceDest,
-                              IN OPTIONAL HANDLE hSurfaceSrc,
-                              IN OUT PDD_BLTDATA puBltData)
+DWORD STDCALL NtGdiDdAlphaBlt(VOID)
 {
        UNIMPLEMENTED
 
index f061296..82fd424 100644 (file)
@@ -1285,13 +1285,13 @@ DoStretchBlt(HDC DcDest, int XDest, int YDest, int WidthDest, int HeightDest,
    if (WidthDest == WidthSrc && HeightDest == HeightSrc)
    {
       NtGdiBitBlt(DcDest, XDest, YDest, WidthDest, HeightDest,
-                  DcSrc, XSrc, YSrc, Rop3, 0, 0);
+                  DcSrc, XSrc, YSrc, Rop3);
    }
    else if (SRCCOPY == Rop3)
    {
       NtGdiStretchBlt(DcDest, XDest, YDest, WidthDest, HeightDest,
                       DcSrc, XSrc, YSrc, WidthSrc, HeightSrc,
-                      Rop3, 0);
+                      Rop3);
    }
    else
    {
@@ -1326,9 +1326,9 @@ DoStretchBlt(HDC DcDest, int XDest, int YDest, int WidthDest, int HeightDest,
       }
       if (! NtGdiStretchBlt(DcStretched, 0, 0, WidthDest, HeightDest,
                             DcSrc, XSrc, YSrc, WidthSrc, HeightSrc,
-                            SRCCOPY, 0) ||
+                            SRCCOPY) ||
           ! NtGdiBitBlt(DcDest, XDest, YDest, WidthDest, HeightDest,
-                        DcStretched, 0, 0, Rop3, 0, 0))
+                        DcStretched, 0, 0, Rop3))
       {
          DPRINT1("Failed to blt\n");
       }
@@ -1342,7 +1342,7 @@ DoStretchBlt(HDC DcDest, int XDest, int YDest, int WidthDest, int HeightDest,
                      DcSrc, XSrc, YSrc, WidthSrc, HeightSrc, Rop3, Color) \
         NtGdiStretchBlt((DcDest), (XDest), (YDest), (WidthDest), (HeightDest), \
                         (DcSrc), (XSrc), (YSrc), (WidthSrc), (HeightSrc), \
-                        (Rop3), 0)
+                        (Rop3))
 #endif /* STRETCH_CAN_SRCCOPY_ONLY */
 
 /*
@@ -1495,7 +1495,7 @@ NtUserDrawIconEx(
    }
 
    if(DoFlickerFree)
-      NtGdiBitBlt(hdc, xLeft, yTop, cxWidth, cyHeight, hdcOff, 0, 0, SRCCOPY, 0, 0);
+      NtGdiBitBlt(hdc, xLeft, yTop, cxWidth, cyHeight, hdcOff, 0, 0, SRCCOPY);
 
    NtGdiSetTextColor(hdcOff, oldFg);
    NtGdiSetBkColor(hdcOff, oldBg);
index fd993c2..5b88940 100644 (file)
@@ -1281,8 +1281,7 @@ NtUserPaintDesktop(HDC hDC)
                                 0, 
                                 WinSta->cxWallpaper, 
                                 WinSta->cyWallpaper, 
-                                SRCCOPY,
-                                0);
+                                SRCCOPY);
             }
             else if (WinSta->WallpaperMode == wmTile)
             {
@@ -1299,9 +1298,7 @@ NtUserPaintDesktop(HDC hDC)
                                     hWallpaperDC, 
                                     0, 
                                     0, 
-                                    SRCCOPY,
-                                    0,
-                                    0);
+                                    SRCCOPY);
                     }
                 }
             }
@@ -1315,9 +1312,7 @@ NtUserPaintDesktop(HDC hDC)
                             hWallpaperDC, 
                             0, 
                             0, 
-                            SRCCOPY,
-                            0,
-                            0);
+                            SRCCOPY);
             } 
             NtGdiSelectObject(hWallpaperDC, hOldBitmap); 
             NtGdiDeleteDC(hWallpaperDC);
index ff4128a..33ee8d7 100644 (file)
@@ -322,7 +322,7 @@ IntCreateMenu(PHANDLE Handle, BOOL IsMenuBar)
    Menu->MenuInfo.dwStyle = 0; /* FIXME */
    Menu->MenuInfo.cyMax = 0; /* default */
    Menu->MenuInfo.hbrBack =
-      NtGdiCreateSolidBrush(RGB(192, 192, 192), 0); /* FIXME: default background color */
+      NtGdiCreateSolidBrush(RGB(192, 192, 192)); /* FIXME: default background color */
    Menu->MenuInfo.dwContextHelpID = 0; /* default */
    Menu->MenuInfo.dwMenuData = 0; /* default */
    Menu->MenuInfo.Self = *Handle;
index 4dfece9..524f39c 100644 (file)
@@ -1132,7 +1132,7 @@ UserScrollDC(HDC hDC, INT dx, INT dy, const RECT *lprcScroll,
 
       if (!NtGdiBitBlt(hDC, rDst_lp.left, rDst_lp.top, rDst_lp.right - rDst_lp.left,
                        rDst_lp.bottom - rDst_lp.top, hDC, rSrc_lp.left, rSrc_lp.top,
-                       SRCCOPY, 0, 0))
+                       SRCCOPY))
          return FALSE;
    }
    else
index 5d2ad61..76ffe46 100644 (file)
@@ -1192,7 +1192,7 @@ co_WinPosSetWindowPos(
                         CopyRect.left, CopyRect.top, CopyRect.right - CopyRect.left,
                         CopyRect.bottom - CopyRect.top, Dc,
                         CopyRect.left + (OldWindowRect.left - NewWindowRect.left),
-                        CopyRect.top + (OldWindowRect.top - NewWindowRect.top), SRCCOPY, 0, 0);
+                        CopyRect.top + (OldWindowRect.top - NewWindowRect.top), SRCCOPY);
             UserReleaseDC(Window, Dc, FALSE);
             IntValidateParent(Window, CopyRgn);
             NtGdiOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top);
index a9f2718..1733f48 100644 (file)
@@ -41,9 +41,7 @@ NtGdiBitBlt(
        HDC  hDCSrc,
        INT  XSrc,
        INT  YSrc,
-       DWORD  ROP,
-       IN DWORD crBackColor,
-       IN FLONG fl)
+       DWORD  ROP)
 {
        PDC DCDest = NULL;
        PDC DCSrc  = NULL;
@@ -459,7 +457,7 @@ NtGdiCreateBitmap(
        INT  Height,
        UINT  Planes,
        UINT  BitsPixel,
-       IN OPTIONAL LPBYTE Bits)
+       CONST VOID *Bits)
 {
    BITMAP BM;
 
@@ -469,7 +467,7 @@ NtGdiCreateBitmap(
    BM.bmWidthBytes = BITMAPOBJ_GetWidthBytes(Width, Planes * BitsPixel);
    BM.bmPlanes = Planes;
    BM.bmBitsPixel = BitsPixel;
-   BM.bmBits = Bits;
+   BM.bmBits = (LPVOID) Bits;
 
    return IntCreateBitmapIndirect(&BM);
 }
@@ -714,7 +712,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
                                {
                                        PBITMAPOBJ bmpobj;
 
-                                       NtGdiBitBlt ( hDCTmp, 0, 0, 1, 1, hDC, XPos, YPos, SRCCOPY, 0, 0 );
+                                       NtGdiBitBlt ( hDCTmp, 0, 0, 1, 1, hDC, XPos, YPos, SRCCOPY );
                                        NtGdiSelectObject ( hDCTmp, hBmpOld );
 
                                        // our bitmap is no longer selected, so we can access it's stuff...
@@ -758,8 +756,7 @@ NtGdiMaskBlt (
        HDC hdcDest, INT nXDest, INT nYDest,
        INT nWidth, INT nHeight, HDC hdcSrc,
        INT nXSrc, INT nYSrc, HBITMAP hbmMask,
-       INT xMask, INT yMask, DWORD dwRop,
-       IN DWORD crBackColor)
+       INT xMask, INT yMask, DWORD dwRop)
 {
        HBITMAP hOldMaskBitmap, hBitmap2, hOldBitmap2, hBitmap3, hOldBitmap3;
        HDC hDCMask, hDC1, hDC2;
@@ -896,7 +893,7 @@ NtGdiMaskBlt (
        };
 
        if (!hbmMask)
-               return NtGdiBitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, FRGND_ROP3(dwRop), 0, 0);
+               return NtGdiBitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, FRGND_ROP3(dwRop));
 
        /* 1. make mask bitmap's dc */
        hDCMask = NtGdiCreateCompatibleDC(hdcDest);
@@ -910,9 +907,9 @@ NtGdiMaskBlt (
        hOldBitmap2 = (HBITMAP)NtGdiSelectObject(hDC1, hBitmap2);
 
        /* 2.2 draw dest bitmap and mask */
-       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, SRCCOPY, 0, 0);
-       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hdcDest, nXDest, nYDest, BKGND_ROP3(dwRop), 0, 0);
-       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hDCMask, xMask, yMask, DSTERASE, 0, 0);
+       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, SRCCOPY);
+       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hdcDest, nXDest, nYDest, BKGND_ROP3(dwRop));
+       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hDCMask, xMask, yMask, DSTERASE);
 
        /* 3. make masked Foreground bitmap */
 
@@ -922,13 +919,13 @@ NtGdiMaskBlt (
        hOldBitmap3 = (HBITMAP)NtGdiSelectObject(hDC2, hBitmap3);
 
        /* 3.2 draw src bitmap and mask */
-       NtGdiBitBlt(hDC2, 0, 0, nWidth, nHeight, hdcDest, nXDest, nYDest, SRCCOPY, 0, 0);
-       NtGdiBitBlt(hDC2, 0, 0, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, FRGND_ROP3(dwRop), 0,0);
-       NtGdiBitBlt(hDC2, 0, 0, nWidth, nHeight, hDCMask, xMask, yMask, SRCAND, 0, 0);
+       NtGdiBitBlt(hDC2, 0, 0, nWidth, nHeight, hdcDest, nXDest, nYDest, SRCCOPY);
+       NtGdiBitBlt(hDC2, 0, 0, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, FRGND_ROP3(dwRop));
+       NtGdiBitBlt(hDC2, 0, 0, nWidth, nHeight, hDCMask, xMask, yMask, SRCAND);
 
        /* 4. combine two bitmap and copy it to hdcDest */
-       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hDC2, 0, 0, SRCPAINT, 0, 0);
-       NtGdiBitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hDC1, 0, 0, SRCCOPY, 0, 0);
+       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hDC2, 0, 0, SRCPAINT);
+       NtGdiBitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hDC1, 0, 0, SRCCOPY);
 
        /* 5. restore all object */
        NtGdiSelectObject(hDCMask, hOldMaskBitmap);
@@ -946,20 +943,18 @@ NtGdiMaskBlt (
        return TRUE;
 }
 
-BOOL
-APIENTRY
+BOOL STDCALL
 NtGdiPlgBlt(
-    IN HDC hdcTrg,
-    IN LPPOINT pptlTrg,
-    IN HDC hdcSrc,
-    IN INT xSrc,
-    IN INT ySrc,
-    IN INT cxSrc,
-    IN INT cySrc,
-    IN HBITMAP hbmMask,
-    IN INT xMask,
-    IN INT yMask,
-    IN DWORD crBackColor)
+       HDC  hDCDest,
+       CONST POINT  *Point,
+       HDC  hDCSrc,
+       INT  XSrc,
+       INT  YSrc,
+       INT  Width,
+       INT  Height,
+       HBITMAP  hMaskBitmap,
+       INT  xMask,
+       INT  yMask)
 {
        UNIMPLEMENTED;
        return FALSE;
@@ -969,7 +964,7 @@ LONG STDCALL
 NtGdiSetBitmapBits(
        HBITMAP  hBitmap,
        DWORD  Bytes,
-       IN PBYTE Bits)
+       CONST VOID *Bits)
 {
        LONG height, ret;
        PBITMAPOBJ bmp;
@@ -1077,7 +1072,7 @@ NtGdiSetPixelV(
        INT  Y,
        COLORREF  Color)
 {
-       HBRUSH NewBrush = NtGdiCreateSolidBrush(Color, NULL);
+       HBRUSH NewBrush = NtGdiCreateSolidBrush(Color);
        HGDIOBJ OldBrush;
 
        if (NewBrush == NULL)
@@ -1106,8 +1101,7 @@ NtGdiStretchBlt(
        INT  YOriginSrc,
        INT  WidthSrc,
        INT  HeightSrc,
-       DWORD  ROP,
-       IN DWORD dwBackColor)
+       DWORD  ROP)
 {
        PDC DCDest = NULL;
        PDC DCSrc  = NULL;
@@ -1329,17 +1323,16 @@ failed:
 BOOL STDCALL
 NtGdiAlphaBlend(
        HDC  hDCDest,
-       LONG  XOriginDest,
-       LONG  YOriginDest,
-       LONG  WidthDest,
-       LONG  HeightDest,
+       INT  XOriginDest,
+       INT  YOriginDest,
+       INT  WidthDest,
+       INT  HeightDest,
        HDC  hDCSrc,
-       LONG  XOriginSrc,
-       LONG  YOriginSrc,
-       LONG  WidthSrc,
-       LONG  HeightSrc,
-       BLENDFUNCTION  BlendFunc,
-       IN HANDLE hcmXform)
+       INT  XOriginSrc,
+       INT  YOriginSrc,
+       INT  WidthSrc,
+       INT  HeightSrc,
+       BLENDFUNCTION  BlendFunc)
 {
        PDC DCDest = NULL;
        PDC DCSrc  = NULL;
index 1e69f1e..0c89d91 100644 (file)
@@ -318,7 +318,7 @@ IntGdiCreateHatchBrush(
       return 0;
    }
 
-   hPattern = NtGdiCreateBitmap(8, 8, 1, 1, (LPBYTE)HatchBrushes[Style]);
+   hPattern = NtGdiCreateBitmap(8, 8, 1, 1, HatchBrushes[Style]);
    if (hPattern == NULL)
    {
       SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
@@ -557,12 +557,10 @@ IntGdiPolyPatBlt(
 
 HBRUSH STDCALL
 NtGdiCreateDIBBrush(
-   IN PVOID BitmapInfoAndData,
-   IN FLONG ColorSpec,
-   IN UINT BitmapInfoSize,
-   IN BOOL  b8X8,
-   IN BOOL bPen,
-   IN PVOID PackedDIB)
+   CONST BITMAPINFO *BitmapInfoAndData,
+   UINT ColorSpec,
+   UINT BitmapInfoSize,
+   CONST VOID *PackedDIB)
 {
    BITMAPINFO *SafeBitmapInfoAndData;
    NTSTATUS Status = STATUS_SUCCESS;
@@ -621,8 +619,7 @@ NtGdiCreatePatternBrush(
 }
 
 HBRUSH STDCALL
-NtGdiCreateSolidBrush(COLORREF Color,
-                      IN OPTIONAL HBRUSH hbr)
+NtGdiCreateSolidBrush(COLORREF Color)
 {
    return IntGdiCreateSolidBrush(Color);
 }
@@ -685,9 +682,9 @@ BOOL STDCALL
 NtGdiPolyPatBlt(
    HDC hDC,
    DWORD dwRop,
-   IN PPOLYPATBLT pRects,
-   IN DWORD cRects,
-   IN DWORD Mode)
+   PPATRECT pRects,
+   INT cRects,
+   ULONG Reserved)
 {
    PPATRECT rb = NULL;
    NTSTATUS Status = STATUS_SUCCESS;
@@ -724,7 +721,7 @@ NtGdiPolyPatBlt(
       }
    }
 
-   Ret = IntGdiPolyPatBlt(hDC, dwRop, (PPATRECT)pRects, cRects, Mode);
+   Ret = IntGdiPolyPatBlt(hDC, dwRop, pRects, cRects, Reserved);
 
    if (cRects > 0)
       ExFreePool(rb);
index 6dd08f6..bdf409c 100644 (file)
@@ -1137,25 +1137,21 @@ NtGdiDeleteDC(HDC  DCHandle)
   return TRUE;
 }
 
-INT
-APIENTRY
-NtGdiDrawEscape(
-    IN HDC hdc,
-    IN INT iEsc,
-    IN INT cjIn,
-    IN OPTIONAL LPSTR pjIn)
+INT STDCALL
+NtGdiDrawEscape(HDC  hDC,
+               INT  nEscape,
+               INT  cbInput,
+               LPCSTR  lpszInData)
 {
   UNIMPLEMENTED;
   return 0;
 }
 
-ULONG
-APIENTRY
-NtGdiEnumObjects(
-    IN HDC hdc,
-    IN INT iObjectType,
-    IN ULONG cjBuf,
-    OUT OPTIONAL PVOID pvBuf)
+INT STDCALL
+NtGdiEnumObjects(HDC  hDC,
+                INT  ObjectType,
+                GOBJENUMPROC  ObjectFunc,
+                LPARAM  lParam)
 {
   UNIMPLEMENTED;
   return 0;
@@ -1919,14 +1915,8 @@ DC_GET_VAL_EX( GetViewportOrgEx, vportOrgX, vportOrgY, POINT, x, y )
 DC_GET_VAL_EX( GetWindowExtEx, wndExtX, wndExtY, SIZE, cx, cy )
 DC_GET_VAL_EX( GetWindowOrgEx, wndOrgX, wndOrgY, POINT, x, y )
 
-BOOL
-APIENTRY
-NtGdiResetDC(
-    IN HDC hdc,
-    IN LPDEVMODEW pdm,
-    OUT PBOOL pbBanding,
-    IN OPTIONAL VOID *pDriverInfo2,
-    OUT VOID *ppUMdhpdev)
+HDC STDCALL
+NtGdiResetDC(HDC  hDC, CONST DEVMODEW *InitData)
 {
   UNIMPLEMENTED;
   return 0;
index 4f46e2b..3d8137f 100644 (file)
@@ -557,11 +557,11 @@ INT STDCALL NtGdiStretchDIBits(HDC  hDC,
       /* copy existing bitmap from destination dc */
       if (SrcWidth == DestWidth && SrcHeight == DestHeight)
          NtGdiBitBlt(hdcMem, XSrc, abs(BitsInfo->bmiHeader.biHeight) - SrcHeight - YSrc,
-                     SrcWidth, SrcHeight, hDC, XDest, YDest, ROP, 0, 0);
+                     SrcWidth, SrcHeight, hDC, XDest, YDest, ROP);
       else
          NtGdiStretchBlt(hdcMem, XSrc, abs(BitsInfo->bmiHeader.biHeight) - SrcHeight - YSrc,
                          SrcWidth, SrcHeight, hDC, XDest, YDest, DestWidth, DestHeight,
-                         ROP, 0);
+                         ROP);
    }
 
    NtGdiSetDIBits(hdcMem, hBitmap, 0, BitsInfo->bmiHeader.biHeight, Bits,
@@ -572,11 +572,11 @@ INT STDCALL NtGdiStretchDIBits(HDC  hDC,
    if (SrcWidth == DestWidth && SrcHeight == DestHeight)
       NtGdiBitBlt(hDC, XDest, YDest, DestWidth, DestHeight,
                   hdcMem, XSrc, abs(BitsInfo->bmiHeader.biHeight) - SrcHeight - YSrc,
-                  ROP, 0, 0);
+                  ROP);
    else
       NtGdiStretchBlt(hDC, XDest, YDest, DestWidth, DestHeight,
                       hdcMem, XSrc, abs(BitsInfo->bmiHeader.biHeight) - SrcHeight - YSrc,
-                      SrcWidth, SrcHeight, ROP, 0);
+                      SrcWidth, SrcHeight, ROP);
 
    NtGdiSelectObject(hdcMem, hOldBitmap);
    NtGdiDeleteDC(hdcMem);
@@ -586,8