- Major Win32k Header Cleanup: Add ntgdi.h based on latest Platform SDK Public header...
authorAlex Ionescu <aionescu@gmail.com>
Tue, 27 Dec 2005 03:41:13 +0000 (03:41 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Tue, 27 Dec 2005 03:41:13 +0000 (03:41 +0000)
- Added ntgdityps.h for structures needed to use the header (which were sadly not publically shipped).
- Removed internal win32k header data from public headers and put it to internal win32k headers.
- Fixed ntuser.h STDCALL->WINAPI.
- Added ntgdihdl.h for shared GDI Handle information between gdi32/win32k
- Added ntusrtyp.h for some shared NtUser types.
- Added ntgdibad.h which contains all non-compatible NtGdi prototypes, along with a detailed comment for each, and information on how to fix it. I had a 20 000+ line patch fixing all these issues, but it contained many bugs and I scrapped it in place for this approach, which while dirtier at first, simplifies the number of changes needed so that others can work on it as well.
- Fixed some gdi32/win32k/user32 header issues.

svn path=/trunk/; revision=20367

84 files changed:
reactos/include/win32k/bitmaps.h [deleted file]
reactos/include/win32k/caret.h [deleted file]
reactos/include/win32k/cliprgn.h [deleted file]
reactos/include/win32k/color.h [deleted file]
reactos/include/win32k/coord.h [deleted file]
reactos/include/win32k/cursoricon.h [deleted file]
reactos/include/win32k/fillshap.h [deleted file]
reactos/include/win32k/font.h [deleted file]
reactos/include/win32k/icm.h [deleted file]
reactos/include/win32k/kapi.h [deleted file]
reactos/include/win32k/line.h [deleted file]
reactos/include/win32k/math.h [deleted file]
reactos/include/win32k/menu.h [deleted file]
reactos/include/win32k/metafile.h [deleted file]
reactos/include/win32k/ntddraw.h [deleted file]
reactos/include/win32k/ntgdibad.h [new file with mode: 0644]
reactos/include/win32k/ntgdihdl.h [new file with mode: 0644]
reactos/include/win32k/ntgdityp.h [new file with mode: 0644]
reactos/include/win32k/ntuser.h
reactos/include/win32k/ntusrtyp.h [new file with mode: 0644]
reactos/include/win32k/paint.h [deleted file]
reactos/include/win32k/path.h [deleted file]
reactos/include/win32k/print.h [deleted file]
reactos/include/win32k/region.h [deleted file]
reactos/include/win32k/text.h [deleted file]
reactos/include/win32k/win32k.h [deleted file]
reactos/include/win32k/wingl.h [deleted file]
reactos/lib/gdi32/gdi32.def
reactos/lib/gdi32/include/gdi32p.h [new file with mode: 0644]
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 [new file with mode: 0644]
reactos/subsys/win32k/include/brush.h [moved from reactos/include/win32k/brush.h with 78% similarity]
reactos/subsys/win32k/include/color.h
reactos/subsys/win32k/include/coord.h [new file with mode: 0644]
reactos/subsys/win32k/include/dc.h [moved from reactos/include/win32k/dc.h with 58% similarity]
reactos/subsys/win32k/include/dib.h
reactos/subsys/win32k/include/driver.h [moved from reactos/include/win32k/driver.h with 50% similarity]
reactos/subsys/win32k/include/gdifloat.h [moved from reactos/include/win32k/float.h with 87% similarity]
reactos/subsys/win32k/include/gdiobj.h [moved from reactos/include/win32k/gdiobj.h with 51% similarity]
reactos/subsys/win32k/include/intgdi.h
reactos/subsys/win32k/include/menu.h
reactos/subsys/win32k/include/misc.h [moved from reactos/include/win32k/misc.h with 89% similarity]
reactos/subsys/win32k/include/object.h
reactos/subsys/win32k/include/path.h
reactos/subsys/win32k/include/pen.h [moved from reactos/include/win32k/pen.h with 54% similarity]
reactos/subsys/win32k/include/region.h [new file with mode: 0644]
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 [new file with mode: 0644]
reactos/w32api/include/wingdi.h

diff --git a/reactos/include/win32k/bitmaps.h b/reactos/include/win32k/bitmaps.h
deleted file mode 100644 (file)
index a0d9e89..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-#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
-
diff --git a/reactos/include/win32k/caret.h b/reactos/include/win32k/caret.h
deleted file mode 100644 (file)
index d0613ee..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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
deleted file mode 100644 (file)
index 6a0107e..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#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
deleted file mode 100644 (file)
index c78610a..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#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
deleted file mode 100644 (file)
index f19d087..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-#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
deleted file mode 100644 (file)
index eb05867..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-
-#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
diff --git a/reactos/include/win32k/fillshap.h b/reactos/include/win32k/fillshap.h
deleted file mode 100644 (file)
index 8a5506b..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#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
-
diff --git a/reactos/include/win32k/font.h b/reactos/include/win32k/font.h
deleted file mode 100644 (file)
index 8382a14..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* $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 */
diff --git a/reactos/include/win32k/icm.h b/reactos/include/win32k/icm.h
deleted file mode 100644 (file)
index 9502d25..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#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
deleted file mode 100644 (file)
index fa6c7ab..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#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
deleted file mode 100644 (file)
index c3767f1..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#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
deleted file mode 100644 (file)
index 28d6591..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/* 
- * 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
deleted file mode 100644 (file)
index ff204c7..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-/* $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
deleted file mode 100644 (file)
index b589bb4..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-#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
-
diff --git a/reactos/include/win32k/ntddraw.h b/reactos/include/win32k/ntddraw.h
deleted file mode 100644 (file)
index e476c10..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-
-#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
new file mode 100644 (file)
index 0000000..bfb2941
--- /dev/null
@@ -0,0 +1,1256 @@
+#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
new file mode 100644 (file)
index 0000000..363050f
--- /dev/null
@@ -0,0 +1,86 @@
+/*\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
new file mode 100644 (file)
index 0000000..93ba590
--- /dev/null
@@ -0,0 +1,90 @@
+/*\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 8f75340..7c4f6cb 100644 (file)
 #define __WIN32K_NTUSER_H
 
 
-ULONG STDCALL
+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
 NtUserGetSystemMetrics(ULONG Index);
 
-DWORD STDCALL
+DWORD NTAPI
 NtUserGetClassLong(HWND hWnd, DWORD Offset, BOOL Ansi);
 
-LONG STDCALL
+LONG NTAPI
 NtUserGetWindowLong(HWND hWnd, DWORD Index, BOOL Ansi);
 
-INT STDCALL
+INT NTAPI
 NtUserReleaseDC(HWND hWnd, HDC hDc);
 
-BOOL STDCALL
+BOOL NTAPI
 NtUserGetWindowRect(HWND hWnd, LPRECT Rect);
 
-BOOL STDCALL
+BOOL NTAPI
 NtUserGetClientRect(HWND hWnd, LPRECT Rect);
 
-HANDLE STDCALL
+HANDLE NTAPI
 NtUserGetProp(HWND hWnd, ATOM Atom);
 
-BOOL STDCALL
+BOOL NTAPI
 NtUserGetClientOrigin(HWND hWnd, LPPOINT Point);
 
-HWND STDCALL
+HWND NTAPI
 NtUserGetDesktopWindow();
 
 NTSTATUS
-STDCALL
+NTAPI
 NtUserAcquireOrReleaseInputOwnership(
   BOOLEAN Release);
 
 DWORD
-STDCALL
+NTAPI
 NtUserActivateKeyboardLayout(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserAlterWindowStyle(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserAttachThreadInput(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
-HDC STDCALL
+HDC NTAPI
 NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* lPs);
 
 DWORD
-STDCALL
+NTAPI
 NtUserBitBltSysBmp(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -70,12 +261,12 @@ NtUserBitBltSysBmp(
   DWORD Unknown7);
 
 BOOL
-STDCALL
+NTAPI
 NtUserBlockInput(
   BOOL BlockIt);
 
 ULONG
-STDCALL
+NTAPI
 NtUserBuildHwndList(
   HDESK hDesktop,
   HWND hwndParent,
@@ -85,7 +276,7 @@ NtUserBuildHwndList(
   HWND* pWnd,
   ULONG nBufSize);
 
-NTSTATUS STDCALL
+NTSTATUS NTAPI
 NtUserBuildNameList(
    HWINSTA hWinSta,
    ULONG dwSize,
@@ -93,7 +284,7 @@ NtUserBuildNameList(
    PULONG pRequiredSize);
 
 NTSTATUS
-STDCALL
+NTAPI
 NtUserBuildPropList(
   HWND hWnd,
   LPVOID Buffer,
@@ -106,7 +297,7 @@ enum {
 };
 
 DWORD
-STDCALL
+NTAPI
 NtUserCallHwnd(
   DWORD Unknown0,
   DWORD Unknown1);
@@ -117,7 +308,7 @@ NtUserCallHwnd(
 #define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW       0x5B
 #define HWNDLOCK_ROUTINE_UPDATEWINDOW              0x5E
 BOOL
-STDCALL
+NTAPI
 NtUserCallHwndLock(
   HWND hWnd,
   DWORD Routine);
@@ -125,33 +316,33 @@ NtUserCallHwndLock(
 #define HWNDOPT_ROUTINE_SETPROGMANWINDOW       0x4A
 #define HWNDOPT_ROUTINE_SETTASKMANWINDOW       0x4B
 HWND
-STDCALL
+NTAPI
 NtUserCallHwndOpt(
   HWND Param,
   DWORD Routine);
 
 DWORD
-STDCALL
+NTAPI
 NtUserCallHwndParam(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserCallHwndParamLock(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 BOOL
-STDCALL
+NTAPI
 NtUserCallMsgFilter(
   LPMSG msg,
   INT code);
  
 LRESULT
-STDCALL
+NTAPI
 NtUserCallNextHookEx(
   HHOOK Hook,
   int Code,
@@ -167,7 +358,7 @@ NtUserCallNextHookEx(
 #define NOPARAM_ROUTINE_ANYPOPUP              0xffff0006
 #define NOPARAM_ROUTINE_CSRSS_INITIALIZED     0xffff0007
 DWORD
-STDCALL
+NTAPI
 NtUserCallNoParam(
   DWORD Routine);
 
@@ -189,7 +380,7 @@ NtUserCallNoParam(
 #define ONEPARAM_ROUTINE_GETKEYBOARDTYPE      0x28
 #define ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT    0x29
 DWORD
-STDCALL
+NTAPI
 NtUserCallOneParam(
   DWORD Param,
   DWORD Routine);
@@ -222,20 +413,20 @@ NtUserCallOneParam(
 #define TWOPARAM_ROUTINE_SETSYSCOLORS       0x66
 #define TWOPARAM_ROUTINE_ROS_SHOWWINDOW     0x1000
 DWORD
-STDCALL
+NTAPI
 NtUserCallTwoParam(
   DWORD Param1,
   DWORD Param2,
   DWORD Routine);
 
 BOOL
-STDCALL
+NTAPI
 NtUserChangeClipboardChain(
   HWND hWndRemove,
   HWND hWndNewNext);
 
 LONG
-STDCALL
+NTAPI
 NtUserChangeDisplaySettings(
   PUNICODE_STRING lpszDeviceName,
   LPDEVMODEW lpDevMode,
@@ -243,56 +434,56 @@ NtUserChangeDisplaySettings(
   DWORD dwflags,
   LPVOID lParam);
 
-HWND STDCALL
+HWND NTAPI
 NtUserChildWindowFromPointEx(HWND Parent,
                             LONG x,
                             LONG y,
                             UINT Flags);
 
 BOOL
-STDCALL
+NTAPI
 NtUserClipCursor(
   RECT *lpRect);
 
 BOOL
-STDCALL
+NTAPI
 NtUserCloseClipboard(VOID);
 
 BOOL
-STDCALL
+NTAPI
 NtUserCloseDesktop(
   HDESK hDesktop);
 
 BOOL
-STDCALL
+NTAPI
 NtUserCloseWindowStation(
   HWINSTA hWinSta);
 
 DWORD
-STDCALL
+NTAPI
 NtUserConvertMemHandle(
   DWORD Unknown0,
   DWORD Unknown1);
 
 int
-STDCALL
+NTAPI
 NtUserCopyAcceleratorTable(
   HACCEL Table,
   LPACCEL Entries,
   int EntriesCount);
 
 DWORD
-STDCALL
+NTAPI
 NtUserCountClipboardFormats(VOID);
 
 HACCEL
-STDCALL
+NTAPI
 NtUserCreateAcceleratorTable(
   LPACCEL Entries,
   SIZE_T EntriesCount);
 
 BOOL
-STDCALL
+NTAPI
 NtUserCreateCaret(
   HWND hWnd,
   HBITMAP hBitmap,
@@ -300,13 +491,13 @@ NtUserCreateCaret(
   int nHeight);
 
 HANDLE
-STDCALL
+NTAPI
 NtUserCreateCursorIconHandle(
   PICONINFO IconInfo,
   BOOL Indirect);
 
 HDESK
-STDCALL
+NTAPI
 NtUserCreateDesktop(
   PUNICODE_STRING lpszDesktopName,
   DWORD dwFlags,
@@ -315,7 +506,7 @@ NtUserCreateDesktop(
   HWINSTA hWindowStation);
 
 DWORD
-STDCALL
+NTAPI
 NtUserCreateLocalMemHandle(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -323,7 +514,7 @@ NtUserCreateLocalMemHandle(
   DWORD Unknown3);
 
 HWND
-STDCALL
+NTAPI
 NtUserCreateWindowEx(
   DWORD dwExStyle,
   PUNICODE_STRING lpClassName,
@@ -341,7 +532,7 @@ NtUserCreateWindowEx(
   BOOL bUnicodeWindow);
 
 HWINSTA
-STDCALL
+NTAPI
 NtUserCreateWindowStation(
   PUNICODE_STRING lpszWindowStationName,
   ACCESS_MASK dwDesiredAccess,
@@ -351,14 +542,14 @@ NtUserCreateWindowStation(
   DWORD Unknown5);
 
 DWORD
-STDCALL
+NTAPI
 NtUserDdeGetQualityOfService(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserDdeInitialize(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -367,13 +558,13 @@ NtUserDdeInitialize(
   DWORD Unknown4);
 
 DWORD
-STDCALL
+NTAPI
 NtUserDdeSetQualityOfService(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
-HDWP STDCALL
+HDWP NTAPI
 NtUserDeferWindowPos(HDWP WinPosInfo,
                     HWND Wnd,
                     HWND WndInsertAfter,
@@ -382,21 +573,21 @@ NtUserDeferWindowPos(HDWP WinPosInfo,
          int cx,
          int cy,
                     UINT Flags);
-BOOL STDCALL
+BOOL NTAPI
 NtUserDefSetText(HWND WindowHandle, PUNICODE_STRING WindowText);
 
 BOOLEAN
-STDCALL
+NTAPI
 NtUserDestroyAcceleratorTable(
   HACCEL Table);
 
 BOOL
-STDCALL
+NTAPI
 NtUserDestroyCursorIcon(
   HANDLE Handle,
   DWORD Unknown);
 
-BOOLEAN STDCALL
+BOOLEAN NTAPI
 NtUserDestroyWindow(HWND Wnd);
 
 typedef struct tagNTUSERDISPATCHMESSAGEINFO
@@ -408,18 +599,18 @@ typedef struct tagNTUSERDISPATCHMESSAGEINFO
 } NTUSERDISPATCHMESSAGEINFO, *PNTUSERDISPATCHMESSAGEINFO;
 
 LRESULT
-STDCALL
+NTAPI
 NtUserDispatchMessage(PNTUSERDISPATCHMESSAGEINFO MsgInfo);
 
 BOOL
-STDCALL
+NTAPI
 NtUserDragDetect(
   HWND hWnd,
   LONG x,
   LONG y);
 
 DWORD
-STDCALL
+NTAPI
 NtUserDragObject(
           HWND    hwnd1,
           HWND    hwnd2,
@@ -429,7 +620,7 @@ NtUserDragObject(
           );
 
 DWORD
-STDCALL
+NTAPI
 NtUserDrawAnimatedRects(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -437,7 +628,7 @@ NtUserDrawAnimatedRects(
   DWORD Unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserDrawCaption(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -445,7 +636,7 @@ NtUserDrawCaption(
   DWORD Unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserDrawCaptionTemp(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -456,7 +647,7 @@ NtUserDrawCaptionTemp(
   DWORD Unknown6);
 
 BOOL
-STDCALL
+NTAPI
 NtUserDrawIconEx(
   HDC hdc,
   int xLeft,
@@ -471,27 +662,27 @@ NtUserDrawIconEx(
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserEmptyClipboard(VOID);
 
 BOOL
-STDCALL
+NTAPI
 NtUserEnableScrollBar(
   HWND hWnd,
   UINT wSBflags,
   UINT wArrows);
 
 DWORD
-STDCALL
+NTAPI
 NtUserEndDeferWindowPosEx(
   DWORD Unknown0,
   DWORD Unknown1);
 
-BOOL STDCALL
+BOOL NTAPI
 NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* lPs);
 
 BOOL
-STDCALL
+NTAPI
 NtUserEnumDisplayDevices (
   PUNICODE_STRING lpDevice, /* device name */
   DWORD iDevNum, /* display device */
@@ -499,19 +690,15 @@ NtUserEnumDisplayDevices (
   DWORD dwFlags ); /* reserved */
 
 /*BOOL
-STDCALL
+NTAPI
 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
-STDCALL
+NTAPI
 NtUserEnumDisplayMonitors(
   OPTIONAL IN HDC hDC,
   OPTIONAL IN LPCRECT pRect,
@@ -521,7 +708,7 @@ NtUserEnumDisplayMonitors(
 
 
 BOOL
-STDCALL
+NTAPI
 NtUserEnumDisplaySettings(
   PUNICODE_STRING lpszDeviceName,
   DWORD iModeNum,
@@ -529,18 +716,18 @@ NtUserEnumDisplaySettings(
   DWORD dwFlags );
 
 DWORD
-STDCALL
+NTAPI
 NtUserEvent(
   DWORD Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserExcludeUpdateRgn(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserFillWindow(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -548,7 +735,7 @@ NtUserFillWindow(
   DWORD Unknown3);
 
 HICON
-STDCALL
+NTAPI
 NtUserFindExistingCursorIcon(
   HMODULE hModule,
   HRSRC hRsrc,
@@ -556,7 +743,7 @@ NtUserFindExistingCursorIcon(
   LONG cy);
 
 HWND
-STDCALL
+NTAPI
 NtUserFindWindowEx(
   HWND  hwndParent,
   HWND  hwndChildAfter,
@@ -565,12 +752,12 @@ NtUserFindWindowEx(
   );
 
 DWORD
-STDCALL
+NTAPI
 NtUserFlashWindowEx(
   DWORD Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetAltTabInfo(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -579,25 +766,25 @@ NtUserGetAltTabInfo(
   DWORD Unknown4,
   DWORD Unknown5);
 
-HWND STDCALL
+HWND NTAPI
 NtUserGetAncestor(HWND hWnd, UINT Flags);
 
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetAsyncKeyState(
   DWORD Unknown0);
 
 UINT
-STDCALL
+NTAPI
 NtUserGetCaretBlinkTime(VOID);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetCaretPos(
   LPPOINT lpPoint);
 
-DWORD STDCALL
+DWORD NTAPI
 NtUserGetClassInfo(HINSTANCE hInst,
                   LPCWSTR str,
                   LPWNDCLASSEXW wcex,
@@ -605,56 +792,56 @@ NtUserGetClassInfo(HINSTANCE hInst,
                   DWORD unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetClassName(HWND hWnd,
                   LPWSTR lpClassName,
                   ULONG nMaxCount);
 
 HANDLE
-STDCALL
+NTAPI
 NtUserGetClipboardData(
   UINT uFormat,
   DWORD Unknown1);
 
 INT
-STDCALL
+NTAPI
 NtUserGetClipboardFormatName(
   UINT format,
   PUNICODE_STRING FormatName,
   INT cchMaxCount);
 
 HWND
-STDCALL
+NTAPI
 NtUserGetClipboardOwner(VOID);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetClipboardSequenceNumber(VOID);
 
 HWND
-STDCALL
+NTAPI
 NtUserGetClipboardViewer(VOID);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetClipCursor(
   RECT *lpRect);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetComboBoxInfo(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetControlBrush(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetControlColor(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -662,14 +849,14 @@ NtUserGetControlColor(
   DWORD Unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetCPD(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetCursorFrameInfo(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -677,57 +864,57 @@ NtUserGetCursorFrameInfo(
   DWORD Unknown3);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetCursorInfo(
   PCURSORINFO pci);
 
 HDC
-STDCALL
+NTAPI
 NtUserGetDC(
   HWND hWnd);
 
 HDC
-STDCALL
+NTAPI
 NtUserGetDCEx(
   HWND hWnd,
   HANDLE hRegion,
   ULONG Flags);
 
 UINT
-STDCALL
+NTAPI
 NtUserGetDoubleClickTime(VOID);
 
 HWND
-STDCALL
+NTAPI
 NtUserGetForegroundWindow(VOID);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetGuiResources(
   HANDLE hProcess,
   DWORD uiFlags);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetGUIThreadInfo(
   DWORD idThread,
   LPGUITHREADINFO lpgui);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetCursorIconInfo(
   HANDLE Handle,
   PICONINFO IconInfo);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetCursorIconSize(
   HANDLE Handle,
   BOOL *fIcon,
   SIZE *Size);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetImeHotKey(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -735,49 +922,49 @@ NtUserGetImeHotKey(
   DWORD Unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetInternalWindowPos(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 HKL
-STDCALL 
+NTAPI 
 NtUserGetKeyboardLayout(
   DWORD dwThreadid);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetKeyboardLayoutList(
   DWORD Unknown0,
   DWORD Unknown1);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetKeyboardLayoutName(
   LPWSTR lpszName);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetKeyboardState(
   LPBYTE Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetKeyboardType(
   DWORD TypeFlag);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetKeyNameText( LONG lParam, LPWSTR lpString, int nSize );
   
 DWORD
-STDCALL
+NTAPI
 NtUserGetKeyState(
   DWORD Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetListBoxInfo(
   DWORD Unknown0);
 
@@ -788,7 +975,7 @@ typedef struct tagNTUSERGETMESSAGEINFO
 } NTUSERGETMESSAGEINFO, *PNTUSERGETMESSAGEINFO;
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetMessage(
   PNTUSERGETMESSAGEINFO MsgInfo,
   HWND hWnd,
@@ -796,13 +983,13 @@ NtUserGetMessage(
   UINT wMsgFilterMax);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetMonitorInfo(
   IN HMONITOR hMonitor,
   OUT LPMONITORINFO pMonitorInfo);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetMouseMovePointsEx(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -811,7 +998,7 @@ NtUserGetMouseMovePointsEx(
   DWORD Unknown4);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetObjectInformation(
   HANDLE hObject,
   DWORD nIndex,
@@ -820,35 +1007,35 @@ NtUserGetObjectInformation(
   PDWORD nLengthNeeded);
 
 HWND
-STDCALL
+NTAPI
 NtUserGetOpenClipboardWindow(VOID);
 
 INT
-STDCALL
+NTAPI
 NtUserGetPriorityClipboardFormat(
   UINT *paFormatPriorityList,
   INT cFormats);
 
 HWINSTA
-STDCALL
+NTAPI
 NtUserGetProcessWindowStation(VOID);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetScrollBarInfo(
   HWND hWnd, 
   LONG idObject, 
   PSCROLLBARINFO psbi);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetScrollInfo(
   HWND hwnd, 
   int fnBar, 
   LPSCROLLINFO lpsi);
 
 HDESK
-STDCALL
+NTAPI
 NtUserGetThreadDesktop(
   DWORD dwThreadId,
   DWORD Unknown1);
@@ -856,51 +1043,51 @@ NtUserGetThreadDesktop(
 #define THREADSTATE_FOCUSWINDOW (1)
 #define THREADSTATE_INSENDMESSAGE       (2)
 DWORD
-STDCALL
+NTAPI
 NtUserGetThreadState(
   DWORD Routine);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetTitleBarInfo(
   DWORD Unknown0,
   DWORD Unknown1);
 
-BOOL STDCALL
+BOOL NTAPI
 NtUserGetUpdateRect(HWND hWnd, LPRECT lpRect, BOOL fErase);
 
 int
-STDCALL
+NTAPI
 NtUserGetUpdateRgn(
   HWND hWnd,
   HRGN hRgn,
   BOOL bErase);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetWindowDC(
   HWND hWnd);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetWindowPlacement(
   HWND hWnd,
   WINDOWPLACEMENT *lpwndpl);
 
 DWORD
-STDCALL
+NTAPI
 NtUserGetWOWClass(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserImpersonateDdeClientWindow(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserInitializeClientPfnArrays(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -908,7 +1095,7 @@ NtUserInitializeClientPfnArrays(
   DWORD Unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserInitTask(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -923,7 +1110,7 @@ NtUserInitTask(
   DWORD Unknown10);
 
 INT
-STDCALL
+NTAPI
 NtUserInternalGetWindowText(
   HWND hWnd,
   LPWSTR lpString,
@@ -931,12 +1118,12 @@ NtUserInternalGetWindowText(
 
 
 BOOL
-STDCALL
+NTAPI
 NtUserIsClipboardFormatAvailable(
   UINT format);
 
 BOOL
-STDCALL
+NTAPI
 NtUserKillSystemTimer
 (
  HWND hWnd,
@@ -944,7 +1131,7 @@ NtUserKillSystemTimer
 );
 
 BOOL
-STDCALL
+NTAPI
 NtUserKillTimer
 (
  HWND hWnd,
@@ -952,7 +1139,7 @@ NtUserKillTimer
 );
 
 DWORD
-STDCALL
+NTAPI
 NtUserLoadKeyboardLayoutEx(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -962,28 +1149,28 @@ NtUserLoadKeyboardLayoutEx(
   DWORD Unknown5);
 
 BOOL
-STDCALL
+NTAPI
 NtUserLockWindowStation(
   HWINSTA hWindowStation);
 
 DWORD
-STDCALL
+NTAPI
 NtUserLockWindowUpdate(
   DWORD Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserLockWorkStation(VOID);
 
 UINT
-STDCALL
+NTAPI
 NtUserMapVirtualKeyEx( UINT keyCode,
                       UINT transType,
                       DWORD keyboardId,
                       HKL dwhkl );
 
 DWORD
-STDCALL
+NTAPI
 NtUserMessageCall(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -994,49 +1181,49 @@ NtUserMessageCall(
   DWORD Unknown6);
 
 BOOL
-STDCALL
+NTAPI
 NtUserGetMinMaxInfo(
   HWND hwnd,
   MINMAXINFO *MinMaxInfo,
   BOOL SendMessage);
 
 DWORD
-STDCALL
+NTAPI
 NtUserMNDragLeave(VOID);
 
 DWORD
-STDCALL
+NTAPI
 NtUserMNDragOver(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserModifyUserStartupInfoFlags(
   DWORD Unknown0,
   DWORD Unknown1);
 
 HMONITOR
-STDCALL
+NTAPI
 NtUserMonitorFromPoint(
   IN POINT point,
   IN DWORD dwFlags);
 
 HMONITOR
-STDCALL
+NTAPI
 NtUserMonitorFromRect(
   IN LPCRECT pRect,
   IN DWORD dwFlags);
 
 HMONITOR
-STDCALL
+NTAPI
 NtUserMonitorFromWindow(
   IN HWND hWnd,
   IN DWORD dwFlags);
 
 
 BOOL
-STDCALL
+NTAPI
 NtUserMoveWindow(      
     HWND hWnd,
     int X,
@@ -1047,14 +1234,14 @@ NtUserMoveWindow(
 );
 
 DWORD
-STDCALL
+NTAPI
 NtUserNotifyIMEStatus(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserNotifyWinEvent(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1062,38 +1249,38 @@ NtUserNotifyWinEvent(
   DWORD Unknown3);
 
 BOOL
-STDCALL
+NTAPI
 NtUserOpenClipboard(
   HWND hWnd,
   DWORD Unknown1);
 
 HDESK
-STDCALL
+NTAPI
 NtUserOpenDesktop(
   PUNICODE_STRING lpszDesktopName,
   DWORD dwFlags,
   ACCESS_MASK dwDesiredAccess);
 
 HDESK
-STDCALL
+NTAPI
 NtUserOpenInputDesktop(
   DWORD dwFlags,
   BOOL fInherit,
   ACCESS_MASK dwDesiredAccess);
 
 HWINSTA
-STDCALL
+NTAPI
 NtUserOpenWindowStation(
   PUNICODE_STRING lpszWindowStationName,
   ACCESS_MASK dwDesiredAccess);
 
 BOOL
-STDCALL
+NTAPI
 NtUserPaintDesktop(
   HDC hDC);
 
 BOOL
-STDCALL
+NTAPI
 NtUserPeekMessage(
   PNTUSERGETMESSAGEINFO MsgInfo,
   HWND hWnd,
@@ -1102,7 +1289,7 @@ NtUserPeekMessage(
   UINT wRemoveMsg);
 
 BOOL
-STDCALL
+NTAPI
 NtUserPostMessage(
   HWND hWnd,
   UINT Msg,
@@ -1110,7 +1297,7 @@ NtUserPostMessage(
   LPARAM lParam);
 
 BOOL
-STDCALL
+NTAPI
 NtUserPostThreadMessage(
   DWORD idThread,
   UINT Msg,
@@ -1118,12 +1305,12 @@ NtUserPostThreadMessage(
   LPARAM lParam);
 
 DWORD
-STDCALL
+NTAPI
 NtUserQuerySendMessage(
   DWORD Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserQueryUserCounters(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1135,20 +1322,24 @@ NtUserQueryUserCounters(
 #define QUERY_WINDOW_UNIQUE_THREAD_ID  0x01
 #define QUERY_WINDOW_ISHUNG    0x04
 DWORD
-STDCALL
+NTAPI
 NtUserQueryWindow(
   HWND hWnd,
   DWORD Index);
 
+UINT
+NTAPI
+NtUserRealizePalette(HDC hDC);
+
 DWORD
-STDCALL
+NTAPI
 NtUserRealChildWindowFromPoint(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 BOOL
-STDCALL
+NTAPI
 NtUserRedrawWindow
 (
  HWND hWnd,
@@ -1162,7 +1353,7 @@ NtUserRedrawWindow
 #define REGISTERCLASS_SYSTEM   4
 #define REGISTERCLASS_ALL      (REGISTERCLASS_ANSI | REGISTERCLASS_SYSTEM)
 
-RTL_ATOM STDCALL
+RTL_ATOM NTAPI
 NtUserRegisterClassExWOW(
    CONST WNDCLASSEXW* lpwcx,
    PUNICODE_STRING ClassName,
@@ -1174,30 +1365,30 @@ NtUserRegisterClassExWOW(
    HMENU hMenu);
 
 BOOL
-STDCALL
+NTAPI
 NtUserRegisterHotKey(HWND hWnd,
                     int id,
                     UINT fsModifiers,
                     UINT vk);
 
 DWORD
-STDCALL
+NTAPI
 NtUserRegisterTasklist(
   DWORD Unknown0);
 
-UINT STDCALL
+UINT NTAPI
 NtUserRegisterWindowMessage(PUNICODE_STRING MessageName);
 
-HANDLE STDCALL
+HANDLE NTAPI
 NtUserRemoveProp(HWND hWnd, ATOM Atom);
 
 DWORD
-STDCALL
+NTAPI
 NtUserResolveDesktopForWOW(
   DWORD Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSBGetParms(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1205,7 +1396,7 @@ NtUserSBGetParms(
   DWORD Unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserScrollDC(
   HDC hDC,
   int dx,
@@ -1215,12 +1406,12 @@ NtUserScrollDC(
   HRGN hrgnUpdate,
   LPRECT lprcUpdate);
 
-DWORD STDCALL
+DWORD NTAPI
 NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *rect,
    const RECT *clipRect, HRGN hrgnUpdate, LPRECT rcUpdate, UINT flags);
 
 UINT
-STDCALL
+NTAPI
 NtUserSendInput(
   UINT nInputs,
   LPINPUT pInput,
@@ -1233,7 +1424,7 @@ typedef struct tagNTUSERSENDMESSAGEINFO
   WNDPROC Proc;
 } NTUSERSENDMESSAGEINFO, *PNTUSERSENDMESSAGEINFO;
 
-LRESULT STDCALL
+LRESULT NTAPI
 NtUserSendMessage(HWND hWnd,
                  UINT Msg,
                  WPARAM wParam,
@@ -1241,7 +1432,7 @@ NtUserSendMessage(HWND hWnd,
                   PNTUSERSENDMESSAGEINFO Info);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSendMessageCallback(
   HWND hWnd,
   UINT Msg,
@@ -1250,7 +1441,7 @@ NtUserSendMessageCallback(
   SENDASYNCPROC lpCallBack,
   ULONG_PTR dwData);
 
-LRESULT STDCALL
+LRESULT NTAPI
 NtUserSendMessageTimeout(HWND hWnd,
                         UINT Msg,
                         WPARAM wParam,
@@ -1261,24 +1452,24 @@ NtUserSendMessageTimeout(HWND hWnd,
                         PNTUSERSENDMESSAGEINFO Info);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSendNotifyMessage(
   HWND hWnd,
   UINT Msg,
   WPARAM wParam,
   LPARAM lParam);
 
-HWND STDCALL
+HWND NTAPI
 NtUserSetActiveWindow(HWND Wnd);
-HWND STDCALL
+HWND NTAPI
 NtUserGetActiveWindow(VOID);
 
-HWND STDCALL
+HWND NTAPI
 NtUserSetCapture(HWND Wnd);
-HWND STDCALL
+HWND NTAPI
 NtUserGetCapture(VOID);
 
-DWORD STDCALL
+DWORD NTAPI
 NtUserSetClassLong(
   HWND  hWnd,
   DWORD Offset,
@@ -1287,43 +1478,51 @@ NtUserSetClassLong(
 
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetClassWord(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 HANDLE
-STDCALL
+NTAPI
 NtUserSetClipboardData(
   UINT uFormat,
   HANDLE hMem,
   DWORD Unknown2);
 
 HWND
-STDCALL
+NTAPI
 NtUserSetClipboardViewer(
   HWND hWndNewViewer);
 
-DWORD
+HPALETTE
 STDCALL
+NtUserSelectPalette(
+    HDC hDC,
+    HPALETTE  hpal,
+    BOOL  ForceBackground
+);
+
+DWORD
+NTAPI
 NtUserSetConsoleReserveKeys(
   DWORD Unknown0,
   DWORD Unknown1);
 
 HCURSOR
-STDCALL
+NTAPI
 NtUserSetCursor(
   HCURSOR hCursor);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetCursorIconContents(
   HANDLE Handle,
   PICONINFO IconInfo);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetCursorIconData(
   HANDLE Handle,
   PBOOL fIcon,
@@ -1333,18 +1532,18 @@ NtUserSetCursorIconData(
   HRSRC hGroupRsrc);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetDbgTag(
   DWORD Unknown0,
   DWORD Unknown1);
 
 HWND
-STDCALL
+NTAPI
 NtUserSetFocus(
   HWND hWnd);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetImeHotKey(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1353,13 +1552,13 @@ NtUserSetImeHotKey(
   DWORD Unknown4);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetImeOwnerWindow(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetInternalWindowPos(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1367,12 +1566,12 @@ NtUserSetInternalWindowPos(
   DWORD Unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetKeyboardState(
   LPBYTE Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetLayeredWindowAttributes(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1380,12 +1579,12 @@ NtUserSetLayeredWindowAttributes(
   DWORD Unknown3);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetLogonNotifyWindow(
   DWORD Unknown0);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetObjectInformation(
   HANDLE hObject,
   DWORD nIndex,
@@ -1393,27 +1592,27 @@ NtUserSetObjectInformation(
   DWORD nLength);
 
 HWND
-STDCALL
+NTAPI
 NtUserSetParent(
   HWND hWndChild,
   HWND hWndNewParent);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetProcessWindowStation(
   HWINSTA hWindowStation);
 
-BOOL STDCALL
+BOOL NTAPI
 NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetRipFlags(
   DWORD Unknown0,
   DWORD Unknown1);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetScrollInfo(
   HWND hwnd, 
   int fnBar, 
@@ -1421,17 +1620,17 @@ NtUserSetScrollInfo(
   BOOL bRedraw);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetShellWindowEx(
   HWND hwndShell,
   HWND hwndShellListView);
 
 HWND
-STDCALL
+NTAPI
 NtUserGetShellWindow();
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetSysColors(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1439,24 +1638,24 @@ NtUserSetSysColors(
   DWORD Unknown3);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetSystemCursor(
   HCURSOR hcur,
   DWORD id);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetThreadDesktop(
   HDESK hDesktop);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetThreadState(
   DWORD Unknown0,
   DWORD Unknown1);
 
 UINT_PTR
-STDCALL
+NTAPI
 NtUserSetSystemTimer
 (
  HWND hWnd,
@@ -1466,7 +1665,7 @@ NtUserSetSystemTimer
 );
 
 UINT_PTR
-STDCALL
+NTAPI
 NtUserSetTimer
 (
  HWND hWnd,
@@ -1476,13 +1675,13 @@ NtUserSetTimer
 );
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetWindowFNID(
   DWORD Unknown0,
   DWORD Unknown1);
 
 LONG
-STDCALL
+NTAPI
 NtUserSetWindowLong(
   HWND hWnd,
   DWORD Index,
@@ -1490,13 +1689,13 @@ NtUserSetWindowLong(
   BOOL Ansi);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetWindowPlacement(
   HWND hWnd,
   WINDOWPLACEMENT *lpwndpl);
 
 BOOL 
-STDCALL NtUserSetWindowPos(      
+NTAPI NtUserSetWindowPos(      
     HWND hWnd,
     HWND hWndInsertAfter,
     int X,
@@ -1507,21 +1706,21 @@ STDCALL NtUserSetWindowPos(
 );
 
 INT
-STDCALL
+NTAPI
 NtUserSetWindowRgn(
   HWND hWnd,
   HRGN hRgn,
   BOOL bRedraw);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetWindowsHookAW(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 HHOOK
-STDCALL
+NTAPI
 NtUserSetWindowsHookEx(
   HINSTANCE Mod,
   PUNICODE_STRING ModuleName,
@@ -1531,18 +1730,18 @@ NtUserSetWindowsHookEx(
   BOOL Ansi);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetWindowStationUser(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2,
   DWORD Unknown3);
 
-WORD STDCALL
+WORD NTAPI
 NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewVal);
 
 DWORD
-STDCALL
+NTAPI
 NtUserSetWinEventHook(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1554,34 +1753,34 @@ NtUserSetWinEventHook(
   DWORD Unknown7);
 
 BOOL
-STDCALL
+NTAPI
 NtUserShowCaret(
   HWND hWnd,
   BOOL bShow);
 
 DWORD
-STDCALL
+NTAPI
 NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow);
 
 BOOL
-STDCALL
+NTAPI
 NtUserShowWindow(
   HWND hWnd,
   LONG nCmdShow);
 
 BOOL
-STDCALL
+NTAPI
 NtUserShowWindowAsync(
   HWND hWnd,
   LONG nCmdShow);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSwitchDesktop(
   HDESK hDesktop);
 
 BOOL
-STDCALL
+NTAPI
 NtUserSystemParametersInfo(
   UINT uiAction,
   UINT uiParam,
@@ -1589,7 +1788,7 @@ NtUserSystemParametersInfo(
   UINT fWinIni);
 
 int
-STDCALL
+NTAPI
 NtUserToUnicodeEx(
                  UINT wVirtKey,
                  UINT wScanCode,
@@ -1600,71 +1799,71 @@ NtUserToUnicodeEx(
                  HKL dwhkl );
 
 DWORD
-STDCALL
+NTAPI
 NtUserTrackMouseEvent(
   DWORD Unknown0);
 
 int
-STDCALL
+NTAPI
 NtUserTranslateAccelerator(
   HWND Window,
   HACCEL Table,
   LPMSG Message);
 
 BOOL
-STDCALL
+NTAPI
 NtUserTranslateMessage(
   LPMSG lpMsg,
   HKL dwhkl );
 
 BOOL
-STDCALL
+NTAPI
 NtUserUnhookWindowsHookEx(
   HHOOK Hook);
 
 DWORD
-STDCALL
+NTAPI
 NtUserUnhookWinEvent(
   DWORD Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserUnloadKeyboardLayout(
   DWORD Unknown0);
 
 BOOL
-STDCALL
+NTAPI
 NtUserUnlockWindowStation(
   HWINSTA hWindowStation);
 
 BOOL
-STDCALL
+NTAPI
 NtUserUnregisterClass(
   LPCWSTR ClassNameOrAtom,
   HINSTANCE hInstance,
   DWORD Unknown);
 
 BOOL
-STDCALL
+NTAPI
 NtUserUnregisterHotKey(HWND hWnd,
                       int id);
 
 DWORD
-STDCALL
+NTAPI
 NtUserUpdateInputContext(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserUpdateInstance(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserUpdateLayeredWindow(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1677,48 +1876,48 @@ NtUserUpdateLayeredWindow(
   DWORD Unknown8);
 
 BOOL
-STDCALL
+NTAPI
 NtUserUpdatePerUserSystemParameters(
   DWORD dwReserved,
   BOOL bEnable);
 
 DWORD
-STDCALL
+NTAPI
 NtUserUserHandleGrantAccess(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserValidateHandleSecure(
   DWORD Unknown0);
 
 DWORD
-STDCALL
+NTAPI
 NtUserVkKeyScanEx(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserWaitForInputIdle(
   DWORD Unknown0,
   DWORD Unknown1,
   DWORD Unknown2);
 
 DWORD
-STDCALL
+NTAPI
 NtUserWaitForMsgAndEvent(
   DWORD Unknown0);
 
 BOOL
-STDCALL
+NTAPI
 NtUserWaitMessage(VOID);
 
 DWORD
-STDCALL
+NTAPI
 NtUserWin32PoolAllocationStats(
   DWORD Unknown0,
   DWORD Unknown1,
@@ -1728,28 +1927,28 @@ NtUserWin32PoolAllocationStats(
   DWORD Unknown5);
 
 HWND
-STDCALL
+NTAPI
 NtUserWindowFromPoint(
   LONG X,
   LONG Y);
 
 DWORD
-STDCALL
+NTAPI
 NtUserYieldTask(VOID);
 
-DWORD STDCALL
+DWORD NTAPI
 NtUserGetWindowThreadProcessId(HWND hWnd, LPDWORD UnsafePid);
 
-DWORD STDCALL
+DWORD NTAPI
 NtUserGetQueueStatus(BOOL ClearChanges);
 
-HWND STDCALL
+HWND NTAPI
 NtUserGetParent(HWND hWnd);
 
-HWND STDCALL
+HWND NTAPI
 NtUserGetWindow(HWND hWnd, UINT Relationship);
 
-HWND STDCALL
+HWND NTAPI
 NtUserGetLastActivePopup(HWND hWnd);
 typedef struct _WndProcHandle
 {
@@ -1758,12 +1957,24 @@ typedef struct _WndProcHandle
   HANDLE ProcessID;
 } WndProcHandle;
                                     
-DWORD STDCALL
+DWORD NTAPI
 NtUserDereferenceWndProcHandle(WNDPROC wpHandle, WndProcHandle *Data);
 
-VOID STDCALL
+VOID NTAPI
 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; 
@@ -1772,7 +1983,7 @@ typedef struct _SETSCROLLBARINFO
 } SETSCROLLBARINFO, *PSETSCROLLBARINFO;
 
 BOOL
-STDCALL
+NTAPI
 NtUserSetScrollBarInfo(
   HWND hwnd,
   LONG idObject,
@@ -1800,14 +2011,6 @@ 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
new file mode 100644 (file)
index 0000000..c94598e
--- /dev/null
@@ -0,0 +1,167 @@
+/*\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
deleted file mode 100644 (file)
index dec0ca0..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#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
deleted file mode 100644 (file)
index 31467b4..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#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
diff --git a/reactos/include/win32k/print.h b/reactos/include/win32k/print.h
deleted file mode 100644 (file)
index 9dab57f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-
-#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
deleted file mode 100644 (file)
index 9627490..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-
-#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
deleted file mode 100644 (file)
index 8af356a..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-
-#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
deleted file mode 100644 (file)
index 89a8210..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <win32k/kapi.h>
diff --git a/reactos/include/win32k/wingl.h b/reactos/include/win32k/wingl.h
deleted file mode 100644 (file)
index 70ba8d5..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#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 ed3bd92..195e6e3 100644 (file)
@@ -26,7 +26,7 @@ BRUSHOBJ_hGetColorTransform@4
 BRUSHOBJ_pvAllocRbrush@8
 BRUSHOBJ_pvGetRbrush@4
 BRUSHOBJ_ulGetBrushColor@4
-BitBlt@36=NtGdiBitBlt@36
+BitBlt@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=NtGdiCreateSolidBrush@4
+CreateSolidBrush@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=NtGdiGetGlyphOutline@28
+GetGlyphOutlineW@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
new file mode 100644 (file)
index 0000000..a7ea6bd
--- /dev/null
@@ -0,0 +1,106 @@
+/*\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 50750cb..1eeb88e 100644 (file)
@@ -8,89 +8,26 @@
 
 /* INCLUDES ******************************************************************/
 
-/* SDK/DDK/NDK Headers. */
+/* Definitions */
 #define WIN32_NO_STATUS
 #define NTOS_MODE_USER
-#define __GDI32__
+
+/* SDK/DDK/NDK Headers. */
 #include <windows.h>
-#include <ddraw.h>
-#include <ddrawi.h>
+#include <ndk/ntndk.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);
 
-/* == CONVERSION FUNCTIONS ================================================== */
-DEVMODEW *
-STDCALL
-GdiConvertToDevmodeW(DEVMODEA *dm);
+/* Public Win32K Headers */
+#include <win32k/ntgdityp.h>
+#include <ntgdi.h>
+#include <win32k/ntgdihdl.h>
 
-VOID
-STDCALL
-LogFontA2W(LPLOGFONTW pW, CONST LOGFONTA *pA);
+/* Private GDI32 Header */
+#include "gdi32p.h"
 
-VOID
-STDCALL
-LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW);
+/* Deprecated NTGDI calls which shouldn't exist */
+#include <win32k/ntgdibad.h>
 
-/* == Directx FUNCTIONS ================================================== */
-BOOL
-intDDCreateSurface ( LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bComplete);
 /* EOF */
index e21fdfc..78c75b8 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
@@ -91,8 +98,42 @@ 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 a9808a4..d212219 100644 (file)
@@ -3634,49 +3634,6 @@ 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 067c353..4c6de64 100644 (file)
@@ -157,9 +157,9 @@ CreateColorSpaceA(
 BOOL
 STDCALL
 GetICMProfileA(
-       HDC             a0,
-       DWORD           a1,     /* MS says LPDWORD! */
-       LPSTR           a2
+       HDC             hdc,
+       LPDWORD pBufSize,
+       LPSTR           pszFilename
        )
 {
        UNIMPLEMENTED;
@@ -258,7 +258,7 @@ BOOL
 STDCALL
 UpdateICMRegKeyA(
        DWORD   a0,
-       DWORD   a1,
+       LPSTR   a1,
        LPSTR   a2,
        UINT    a3
        )
index 4260ee0..cd9431e 100644 (file)
@@ -129,7 +129,7 @@ BOOL
 STDCALL
 GetICMProfileW(
        HDC             a0,
-       DWORD           a1,     /* MS says LPDWORD! */
+       LPDWORD         a1,
        LPWSTR          a2
        )
 {
@@ -228,7 +228,7 @@ BOOL
 STDCALL
 UpdateICMRegKeyW(
        DWORD   a0,
-       DWORD   a1,
+       LPWSTR  a1,
        LPWSTR  a2,
        UINT    a3
        )
index 8db96ff..72b7b92 100644 (file)
@@ -187,8 +187,8 @@ UINT
 STDCALL
 GetEnhMetaFilePixelFormat(
        HENHMETAFILE                    hemf,
-       DWORD                           cbBuffer,
-       CONST PIXELFORMATDESCRIPTOR     *ppfd
+       UINT                            cbBuffer,
+       PIXELFORMATDESCRIPTOR   *ppfd
        )
 {
        ENHMETAHEADER pemh;
@@ -199,7 +199,7 @@ GetEnhMetaFilePixelFormat(
        {
                if(pemh.cbPixelFormat)
                {
-               memcpy((void*)ppfd, (const void *)pemh.offPixelFormat, cbBuffer );
+               memcpy((void*)ppfd, UlongToPtr(pemh.offPixelFormat), cbBuffer );
                return(pemh.cbPixelFormat);
                }
        }
index c4f6248..9fd1043 100644 (file)
@@ -20,8 +20,7 @@ CreateDIBSection(
                                       &ConvertedInfoSize, FALSE);
    if (pConvertedInfo)
    {
-      hBitmap = NtGdiCreateDIBSection(hDC, pConvertedInfo, Usage, Bits,
-                                      hSection, dwOffset);
+      hBitmap = NtGdiCreateDIBSection(hDC, hSection, dwOffset, pConvertedInfo, Usage, 0, 0, 0, Bits);
       if (BitmapInfo != pConvertedInfo)
          RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
    }
@@ -29,6 +28,34 @@ 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
  */
@@ -51,9 +78,9 @@ StretchBlt(
    {
       return NtGdiStretchBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest,
                              nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc,
-                             nWidthSrc, nHeightSrc, dwRop);
+                             nWidthSrc, nHeightSrc, dwRop, 0);
    }
   
    return NtGdiBitBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest,
-                      nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, dwRop);
+                      nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, dwRop, 0, 0);
 }
index ebf0174..538f111 100644 (file)
@@ -39,7 +39,7 @@ CreateDIBPatternBrush(
    if (pConvertedInfo)
    {
       hBrush = NtGdiCreateDIBBrush(pConvertedInfo, fuColorSpec,
-                                   ConvertedInfoSize, lpPackedDIB);
+                                   ConvertedInfoSize, FALSE, FALSE, lpPackedDIB);
       if ((PBITMAPINFO)lpPackedDIB != pConvertedInfo)
          RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
    }
@@ -69,7 +69,7 @@ CreateDIBPatternBrushPt(
    if (pConvertedInfo)
    {
       hBrush = NtGdiCreateDIBBrush(pConvertedInfo, fuColorSpec,
-                                   ConvertedInfoSize, lpPackedDIB);
+                                   ConvertedInfoSize, FALSE, FALSE, (PVOID)lpPackedDIB);
       if ((PBITMAPINFO)lpPackedDIB != pConvertedInfo)
          RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
    }
@@ -77,6 +77,17 @@ CreateDIBPatternBrushPt(
    return hBrush;
 }
 
+/*
+ * @implemented
+ */
+HBRUSH
+STDCALL
+CreateSolidBrush(IN COLORREF crColor)
+{
+    /* Call Server-Side API */
+    return NtGdiCreateSolidBrush(crColor, NULL);
+}
+
 /*
  * @implemented
  */
@@ -105,7 +116,7 @@ CreateBrushIndirect(
          break;
 
       case BS_SOLID:
-         hBrush = NtGdiCreateSolidBrush(LogBrush->lbColor);
+         hBrush = NtGdiCreateSolidBrush(LogBrush->lbColor, 0);
          break;
 
       case BS_HATCHED:
index 781d0a1..70ce7bb 100644 (file)
@@ -348,7 +348,8 @@ ResetDCW(
        CONST DEVMODEW  *lpInitData
        )
 {
-  return NtGdiResetDC ( hdc, lpInitData );
+  NtGdiResetDC ( hdc, (PDEVMODEW)lpInitData, NULL, NULL, NULL);
+  return hdc;
 }
 
 
@@ -363,13 +364,12 @@ ResetDCA(
        )
 {
   LPDEVMODEW InitDataW;
-  HDC hDc;
 
   InitDataW = GdiConvertToDevmodeW((LPDEVMODEA)lpInitData);
 
-  hDc = NtGdiResetDC ( hdc, InitDataW );
+  NtGdiResetDC ( hdc, InitDataW, NULL, NULL, NULL);
   HEAP_free(InitDataW);
-  return hDc;
+  return hdc;
 }
 
 
@@ -383,7 +383,7 @@ StartDocW(
        CONST DOCINFOW  *a1
        )
 {
-       return NtGdiStartDoc ( hdc, (DOCINFOW *)a1 );
+       return NtGdiStartDoc ( hdc, (DOCINFOW *)a1, NULL, 0);
 }
 
 
index c7495d6..c055111 100644 (file)
@@ -517,9 +517,28 @@ GetGlyphOutlineA(
        CONST MAT2      *lpmat2
        )
 {
-  return NtGdiGetGlyphOutline ( hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, (CONST LPMAT2)lpmat2 );
+  return NtGdiGetGlyphOutline ( hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, (CONST LPMAT2)lpmat2, TRUE);
 }
 
+/*
+ * @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 925dfc0..dda7616 100644 (file)
@@ -127,7 +127,7 @@ SetMiterLimit(
        PFLOAT  a2
        )
 {
-       return NtGdiSetMiterLimit ( hdc, a1, a2 );
+       return NtGdiSetMiterLimit ( hdc, a1, (PDWORD)a2 );
 }
 
 
@@ -180,7 +180,7 @@ GetMiterLimit(
        PFLOAT  a1
        )
 {
-       return NtGdiGetMiterLimit ( hdc, a1 );
+       return NtGdiGetMiterLimit ( hdc, (PDWORD)a1 );
 }
 
 /*
index f11b8bb..e7c83ec 100644 (file)
 /* CSRSS Headers */
 #include <csrss/csrss.h>
 
-/* External Win32K Headers */
+/* Public Win32K Headers */
+#include <win32k/ntusrtyp.h>
 #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>
@@ -41,6 +38,7 @@
 /* Internal User32 Headers */
 #include "user32p.h"
 
-/* FIXME: FILIP */
+/* FIXME: Use ntgdi.h then cleanup... */
 HGDIOBJ STDCALL  NtGdiSelectObject(HDC  hDC, HGDIOBJ  hGDIObj);
-DWORD STDCALL GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
+BOOL STDCALL NtGdiPatBlt(HDC hdcDst, INT x, INT y, INT cx, INT cy, DWORD rop4);
+DWORD STDCALL GdiGetCharDimensions(HDC, LPTEXTMETRICW, DWORD *);
index e591573..6d7382b 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
new file mode 100644 (file)
index 0000000..6537abb
--- /dev/null
@@ -0,0 +1,50 @@
+\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
similarity index 78%
rename from reactos/include/win32k/brush.h
rename to reactos/subsys/win32k/include/brush.h
index 116f410..65c40ca 100644 (file)
-#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
+#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
index 8106d65..3a3a99e 100644 (file)
@@ -1,6 +1,13 @@
 #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);
@@ -8,4 +15,5 @@ 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
new file mode 100644 (file)
index 0000000..fe6badc
--- /dev/null
@@ -0,0 +1,24 @@
+#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
similarity index 58%
rename from reactos/include/win32k/dc.h
rename to reactos/subsys/win32k/include/dc.h
index efb71ab..b131da6 100644 (file)
-
-#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
+\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
index 49a13af..415fb20 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _WIN32K_DIB_H
 #define _WIN32K_DIB_H
 
-#include <win32k/dc.h>
+#include "dc.h"
 
 INT FASTCALL
 DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse);
similarity index 50%
rename from reactos/include/win32k/driver.h
rename to reactos/subsys/win32k/include/driver.h
index 53c26a7..d6febdd 100644 (file)
-
-#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
-
+\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
similarity index 87%
rename from reactos/include/win32k/float.h
rename to reactos/subsys/win32k/include/gdifloat.h
index 84f9968..abc50f8 100644 (file)
-#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
+#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
similarity index 51%
rename from reactos/include/win32k/gdiobj.h
rename to reactos/subsys/win32k/include/gdiobj.h
index aa8019e..4772206 100644 (file)
-/*
- *  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
+/*\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
index 23adf58..70a4edb 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _WIN32K_INTGDI_H
 #define _WIN32K_INTGDI_H
 
+#include "region.h"
+
 /* Brush functions */
 
 XLATEOBJ* FASTCALL
index 5b24901..36ec888 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _WIN32K_MENU_H
 #define _WIN32K_MENU_H
 
-#include <win32k/menu.h>
-
 #define IS_ATOM(x) \
   (((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
 
@@ -38,6 +36,13 @@ 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);
 
similarity index 89%
rename from reactos/include/win32k/misc.h
rename to reactos/subsys/win32k/include/misc.h
index e03faa6..85491f4 100644 (file)
@@ -1,17 +1,13 @@
-#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 */
+#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
index a3711d0..2fd1898 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef _WIN32K_OBJECT_H
 #define _WIN32K_OBJECT_H
 
-#include <win32k/gdiobj.h>
-#include <win32k/bitmaps.h>
-#include <win32k/pen.h>
+#include "gdiobj.h"
+#include "bitmaps.h"
+#include "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 9631b1f..9fcce87 100644 (file)
@@ -1,6 +1,8 @@
 #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);
similarity index 54%
rename from reactos/include/win32k/pen.h
rename to reactos/subsys/win32k/include/pen.h
index ce2c5ac..e76555d 100644 (file)
@@ -1,32 +1,14 @@
-#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
+#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
diff --git a/reactos/subsys/win32k/include/region.h b/reactos/subsys/win32k/include/region.h
new file mode 100644 (file)
index 0000000..c86c7cb
--- /dev/null
@@ -0,0 +1,21 @@
+\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 1072e64..b1cfa16 100644 (file)
@@ -1,6 +1,24 @@
 #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 431f3e9..8c3cf28 100644 (file)
@@ -1,4 +1,4 @@
-/*
+t/*
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS Graphics Subsystem
  * FILE:            subsys/win32k/include/win32k.h
@@ -9,6 +9,8 @@
 /* INCLUDES ******************************************************************/
 #ifndef __WIN32K_H
 #define __WIN32K_H
+#define INTERNAL_CALL NTAPI
+
 /* Internal Win32k Headers */
 #include <include/ntuser.h>
 #include <include/win32.h>
@@ -59,6 +61,9 @@
 #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 94eb7a8..9596aa2 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include <w32k.h>
-#include <win32k/ntddraw.h>
 #include <include/napi.h>
 
 #define NDEBUG
index 03d799d..107907e 100644 (file)
 
 
 
-BOOL STDCALL NtGdiD3dContextCreate(
+DWORD STDCALL NtGdiD3dContextCreate(
     HANDLE hDirectDrawLocal,
     HANDLE hSurfColor,
     HANDLE hSurfZ,
-    D3DNTHAL_CONTEXTCREATEDATA *pdcci
+    LPD3DNTHAL_CONTEXTCREATEDATA pdcci
 )
 {
        UNIMPLEMENTED
@@ -37,7 +37,7 @@ DWORD STDCALL NtGdiD3dContextDestroy(
        return 0;
 }
 
-DWORD STDCALL NtGdiD3dContextDestroyAll(VOID)
+DWORD STDCALL NtGdiD3dContextDestroyAll(LPD3DNTHAL_CONTEXTDESTROYALLDATA pdcad)
 {
        /* This entry point is not supported on NT5 and ROS */
        UNIMPLEMENTED
@@ -226,7 +226,7 @@ DWORD STDCALL NtGdiDdGetDriverState(
        return 0;
 }
 
-DWORD STDCALL NtGdiDdGetDxHandle(
+HANDLE STDCALL NtGdiDdGetDxHandle(
     HANDLE hDirectDraw,
     HANDLE hSurface,
     BOOL bRelease
@@ -383,7 +383,9 @@ DWORD STDCALL NtGdiDdUnlockD3D(
 
 
 
-DWORD STDCALL NtGdiDdAlphaBlt(VOID)
+DWORD STDCALL NtGdiDdAlphaBlt(IN HANDLE hSurfaceDest,
+                              IN OPTIONAL HANDLE hSurfaceSrc,
+                              IN OUT PDD_BLTDATA puBltData)
 {
        UNIMPLEMENTED
 
index 82fd424..f061296 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);
+                  DcSrc, XSrc, YSrc, Rop3, 0, 0);
    }
    else if (SRCCOPY == Rop3)
    {
       NtGdiStretchBlt(DcDest, XDest, YDest, WidthDest, HeightDest,
                       DcSrc, XSrc, YSrc, WidthSrc, HeightSrc,
-                      Rop3);
+                      Rop3, 0);
    }
    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) ||
+                            SRCCOPY, 0) ||
           ! NtGdiBitBlt(DcDest, XDest, YDest, WidthDest, HeightDest,
-                        DcStretched, 0, 0, Rop3))
+                        DcStretched, 0, 0, Rop3, 0, 0))
       {
          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))
+                        (Rop3), 0)
 #endif /* STRETCH_CAN_SRCCOPY_ONLY */
 
 /*
@@ -1495,7 +1495,7 @@ NtUserDrawIconEx(
    }
 
    if(DoFlickerFree)
-      NtGdiBitBlt(hdc, xLeft, yTop, cxWidth, cyHeight, hdcOff, 0, 0, SRCCOPY);
+      NtGdiBitBlt(hdc, xLeft, yTop, cxWidth, cyHeight, hdcOff, 0, 0, SRCCOPY, 0, 0);
 
    NtGdiSetTextColor(hdcOff, oldFg);
    NtGdiSetBkColor(hdcOff, oldBg);
index 5b88940..fd993c2 100644 (file)
@@ -1281,7 +1281,8 @@ NtUserPaintDesktop(HDC hDC)
                                 0, 
                                 WinSta->cxWallpaper, 
                                 WinSta->cyWallpaper, 
-                                SRCCOPY);
+                                SRCCOPY,
+                                0);
             }
             else if (WinSta->WallpaperMode == wmTile)
             {
@@ -1298,7 +1299,9 @@ NtUserPaintDesktop(HDC hDC)
                                     hWallpaperDC, 
                                     0, 
                                     0, 
-                                    SRCCOPY);
+                                    SRCCOPY,
+                                    0,
+                                    0);
                     }
                 }
             }
@@ -1312,7 +1315,9 @@ NtUserPaintDesktop(HDC hDC)
                             hWallpaperDC, 
                             0, 
                             0, 
-                            SRCCOPY);
+                            SRCCOPY,
+                            0,
+                            0);
             } 
             NtGdiSelectObject(hWallpaperDC, hOldBitmap); 
             NtGdiDeleteDC(hWallpaperDC);
index 33ee8d7..ff4128a 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)); /* FIXME: default background color */
+      NtGdiCreateSolidBrush(RGB(192, 192, 192), 0); /* FIXME: default background color */
    Menu->MenuInfo.dwContextHelpID = 0; /* default */
    Menu->MenuInfo.dwMenuData = 0; /* default */
    Menu->MenuInfo.Self = *Handle;
index 524f39c..4dfece9 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))
+                       SRCCOPY, 0, 0))
          return FALSE;
    }
    else
index 76ffe46..5d2ad61 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);
+                        CopyRect.top + (OldWindowRect.top - NewWindowRect.top), SRCCOPY, 0, 0);
             UserReleaseDC(Window, Dc, FALSE);
             IntValidateParent(Window, CopyRgn);
             NtGdiOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top);
index d2271b3..fe11e36 100644 (file)
@@ -41,7 +41,9 @@ NtGdiBitBlt(
        HDC  hDCSrc,
        INT  XSrc,
        INT  YSrc,
-       DWORD  ROP)
+       DWORD  ROP,
+       IN DWORD crBackColor,
+       IN FLONG fl)
 {
        PDC DCDest = NULL;
        PDC DCSrc  = NULL;
@@ -457,7 +459,7 @@ NtGdiCreateBitmap(
        INT  Height,
        UINT  Planes,
        UINT  BitsPixel,
-       CONST VOID *Bits)
+       IN OPTIONAL LPBYTE Bits)
 {
    BITMAP BM;
 
@@ -467,7 +469,7 @@ NtGdiCreateBitmap(
    BM.bmWidthBytes = BITMAPOBJ_GetWidthBytes(Width, Planes * BitsPixel);
    BM.bmPlanes = Planes;
    BM.bmBitsPixel = BitsPixel;
-   BM.bmBits = (LPVOID) Bits;
+   BM.bmBits = Bits;
 
    return IntCreateBitmapIndirect(&BM);
 }
@@ -712,7 +714,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
                                {
                                        PBITMAPOBJ bmpobj;
 
-                                       NtGdiBitBlt ( hDCTmp, 0, 0, 1, 1, hDC, XPos, YPos, SRCCOPY );
+                                       NtGdiBitBlt ( hDCTmp, 0, 0, 1, 1, hDC, XPos, YPos, SRCCOPY, 0, 0 );
                                        NtGdiSelectObject ( hDCTmp, hBmpOld );
 
                                        // our bitmap is no longer selected, so we can access it's stuff...
@@ -756,7 +758,8 @@ 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)
+       INT xMask, INT yMask, DWORD dwRop,
+       IN DWORD crBackColor)
 {
        HBITMAP hOldMaskBitmap, hBitmap2, hOldBitmap2, hBitmap3, hOldBitmap3;
        HDC hDCMask, hDC1, hDC2;
@@ -893,7 +896,7 @@ NtGdiMaskBlt (
        };
 
        if (!hbmMask)
-               return NtGdiBitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, FRGND_ROP3(dwRop));
+               return NtGdiBitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, FRGND_ROP3(dwRop), 0, 0);
 
        /* 1. make mask bitmap's dc */
        hDCMask = NtGdiCreateCompatibleDC(hdcDest);
@@ -907,9 +910,9 @@ NtGdiMaskBlt (
        hOldBitmap2 = (HBITMAP)NtGdiSelectObject(hDC1, hBitmap2);
 
        /* 2.2 draw dest bitmap and mask */
-       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);
+       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);
 
        /* 3. make masked Foreground bitmap */
 
@@ -919,13 +922,13 @@ NtGdiMaskBlt (
        hOldBitmap3 = (HBITMAP)NtGdiSelectObject(hDC2, hBitmap3);
 
        /* 3.2 draw src bitmap and mask */
-       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);
+       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);
 
        /* 4. combine two bitmap and copy it to hdcDest */
-       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hDC2, 0, 0, SRCPAINT);
-       NtGdiBitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hDC1, 0, 0, SRCCOPY);
+       NtGdiBitBlt(hDC1, 0, 0, nWidth, nHeight, hDC2, 0, 0, SRCPAINT, 0, 0);
+       NtGdiBitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hDC1, 0, 0, SRCCOPY, 0, 0);
 
        /* 5. restore all object */
        NtGdiSelectObject(hDCMask, hOldMaskBitmap);
@@ -943,18 +946,20 @@ NtGdiMaskBlt (
        return TRUE;
 }
 
-BOOL STDCALL
+BOOL
+APIENTRY
 NtGdiPlgBlt(
-       HDC  hDCDest,
-       CONST POINT  *Point,
-       HDC  hDCSrc,
-       INT  XSrc,
-       INT  YSrc,
-       INT  Width,
-       INT  Height,
-       HBITMAP  hMaskBitmap,
-       INT  xMask,
-       INT  yMask)
+    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)
 {
        UNIMPLEMENTED;
        return FALSE;
@@ -964,7 +969,7 @@ LONG STDCALL
 NtGdiSetBitmapBits(
        HBITMAP  hBitmap,
        DWORD  Bytes,
-       CONST VOID *Bits)
+       IN PBYTE Bits)
 {
        LONG height, ret;
        PBITMAPOBJ bmp;
@@ -1072,7 +1077,7 @@ NtGdiSetPixelV(
        INT  Y,
        COLORREF  Color)
 {
-       HBRUSH NewBrush = NtGdiCreateSolidBrush(Color);
+       HBRUSH NewBrush = NtGdiCreateSolidBrush(Color, NULL);
        HGDIOBJ OldBrush;
 
        if (NewBrush == NULL)
@@ -1101,7 +1106,8 @@ NtGdiStretchBlt(
        INT  YOriginSrc,
        INT  WidthSrc,
        INT  HeightSrc,
-       DWORD  ROP)
+       DWORD  ROP,
+       IN DWORD dwBackColor)
 {
        PDC DCDest = NULL;
        PDC DCSrc  = NULL;
@@ -1323,16 +1329,17 @@ failed:
 BOOL STDCALL
 NtGdiAlphaBlend(
        HDC  hDCDest,
-       INT  XOriginDest,
-       INT  YOriginDest,
-       INT  WidthDest,
-       INT  HeightDest,
+       LONG  XOriginDest,
+       LONG  YOriginDest,
+       LONG  WidthDest,
+       LONG  HeightDest,
        HDC  hDCSrc,
-       INT  XOriginSrc,
-       INT  YOriginSrc,
-       INT  WidthSrc,
-       INT  HeightSrc,
-       BLENDFUNCTION  BlendFunc)
+       LONG  XOriginSrc,
+       LONG  YOriginSrc,
+       LONG  WidthSrc,
+       LONG  HeightSrc,
+       BLENDFUNCTION  BlendFunc,
+       IN HANDLE hcmXform)
 {
        PDC DCDest = NULL;
        PDC DCSrc  = NULL;
index 0c89d91..1e69f1e 100644 (file)
@@ -318,7 +318,7 @@ IntGdiCreateHatchBrush(
       return 0;
    }
 
-   hPattern = NtGdiCreateBitmap(8, 8, 1, 1, HatchBrushes[Style]);
+   hPattern = NtGdiCreateBitmap(8, 8, 1, 1, (LPBYTE)HatchBrushes[Style]);
    if (hPattern == NULL)
    {
       SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
@@ -557,10 +557,12 @@ IntGdiPolyPatBlt(
 
 HBRUSH STDCALL
 NtGdiCreateDIBBrush(
-   CONST BITMAPINFO *BitmapInfoAndData,
-   UINT ColorSpec,
-   UINT BitmapInfoSize,
-   CONST VOID *PackedDIB)
+   IN PVOID BitmapInfoAndData,
+   IN FLONG ColorSpec,
+   IN UINT BitmapInfoSize,
+   IN BOOL  b8X8,
+   IN BOOL bPen,
+   IN PVOID PackedDIB)
 {
    BITMAPINFO *SafeBitmapInfoAndData;
    NTSTATUS Status = STATUS_SUCCESS;
@@ -619,7 +621,8 @@ NtGdiCreatePatternBrush(
 }
 
 HBRUSH STDCALL
-NtGdiCreateSolidBrush(COLORREF Color)
+NtGdiCreateSolidBrush(COLORREF Color,
+                      IN OPTIONAL HBRUSH hbr)
 {
    return IntGdiCreateSolidBrush(Color);
 }
@@ -682,9 +685,9 @@ BOOL STDCALL
 NtGdiPolyPatBlt(
    HDC hDC,
    DWORD dwRop,
-   PPATRECT pRects,
-   INT cRects,
-   ULONG Reserved)
+   IN PPOLYPATBLT pRects,
+   IN DWORD cRects,
+   IN DWORD Mode)
 {
    PPATRECT rb = NULL;
    NTSTATUS Status = STATUS_SUCCESS;
@@ -721,7 +724,7 @@ NtGdiPolyPatBlt(
       }
    }
 
-   Ret = IntGdiPolyPatBlt(hDC, dwRop, pRects, cRects, Reserved);
+   Ret = IntGdiPolyPatBlt(hDC, dwRop, (PPATRECT)pRects, cRects, Mode);
 
    if (cRects > 0)
       ExFreePool(rb);
index bdf409c..6dd08f6 100644 (file)
@@ -1137,21 +1137,25 @@ NtGdiDeleteDC(HDC  DCHandle)
   return TRUE;
 }
 
-INT STDCALL
-NtGdiDrawEscape(HDC  hDC,
-               INT  nEscape,
-               INT  cbInput,
-               LPCSTR  lpszInData)
+INT
+APIENTRY
+NtGdiDrawEscape(
+    IN HDC hdc,
+    IN INT iEsc,
+    IN INT cjIn,
+    IN OPTIONAL LPSTR pjIn)
 {
   UNIMPLEMENTED;
   return 0;
 }
 
-INT STDCALL
-NtGdiEnumObjects(HDC  hDC,
-                INT  ObjectType,
-                GOBJENUMPROC  ObjectFunc,
-                LPARAM  lParam)
+ULONG
+APIENTRY
+NtGdiEnumObjects(
+    IN HDC hdc,
+    IN INT iObjectType,
+    IN ULONG cjBuf,
+    OUT OPTIONAL PVOID pvBuf)
 {
   UNIMPLEMENTED;
   return 0;
@@ -1915,8 +1919,14 @@ 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 )
 
-HDC STDCALL
-NtGdiResetDC(HDC  hDC, CONST DEVMODEW *InitData)
+BOOL
+APIENTRY
+NtGdiResetDC(
+    IN HDC hdc,
+    IN LPDEVMODEW pdm,
+    OUT PBOOL pbBanding,
+    IN OPTIONAL VOID *pDriverInfo2,
+    OUT VOID *ppUMdhpdev)
 {
   UNIMPLEMENTED;
   return 0;
index 3d8137f..4f46e2b 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);
+                     SrcWidth, SrcHeight, hDC, XDest, YDest, ROP, 0, 0);
       else
          NtGdiStretchBlt(hdcMem, XSrc, abs(BitsInfo->bmiHeader.biHeight) - SrcHeight - YSrc,
                          SrcWidth, SrcHeight, hDC, XDest, YDest, DestWidth, DestHeight,
-                         ROP);
+                         ROP, 0);
    }
 
    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);
+                  ROP, 0, 0);
    else
       NtGdiStretchBlt(hDC, XDest, YDest, DestWidth, DestHeight,
                       hdcMem, XSrc, abs(BitsInfo->bmiHeader.biHeight) - SrcHeight - YSrc,
-                      SrcWidth, SrcHeight, ROP);
+                      SrcWidth, SrcHeight, ROP, 0);
 
    NtGdiSelectObject(hdcMem, hOldBitmap);
    NtGdiDeleteDC(hdcMem);
@@ -586,8 +586,8 @@ INT STDCALL NtGdiStretchDIBits(HDC  hDC,
 }
 
 LONG STDCALL NtGdiGetBitmapBits(HBITMAP  hBitmap,
-                        LONG  Count,
-                        LPVOID  Bits)
+                        ULONG  Count,
+                        OUT OPTIONAL PBYTE Bits)
 {
   PBITMAPOBJ  bmp;
   LONG  height, ret;
@@ -767,11 +767,14 @@ HBITMAP STDCALL NtGdiCreateDIBitmap(HDC hDc, const BITMAPINFOHEADER *Header,
 }
 
 HBITMAP STDCALL NtGdiCreateDIBSection(HDC hDC,
-                              CONST BITMAPINFO  *bmi,
-                              UINT  Usage,
-