Build GDI32 with NDK and without DDK.

svn path=/trunk/; revision=16186
This commit is contained in:
Filip Navara 2005-06-20 21:35:05 +00:00
parent 9eea30f8b3
commit d373bd32e7
11 changed files with 40 additions and 28 deletions

View file

@ -2,9 +2,6 @@
#ifndef __WIN32K_BITMAPS_H #ifndef __WIN32K_BITMAPS_H
#define __WIN32K_BITMAPS_H #define __WIN32K_BITMAPS_H
#include <win32k/dc.h>
#include <win32k/gdiobj.h>
/* GDI logical bitmap object */ /* GDI logical bitmap object */
typedef struct _BITMAPOBJ typedef struct _BITMAPOBJ
{ {
@ -15,8 +12,12 @@ typedef struct _BITMAPOBJ
to get width/height of bitmap, use to get width/height of bitmap, use
bitmap.bmWidth/bitmap.bmHeight for bitmap.bmWidth/bitmap.bmHeight for
that */ that */
#ifdef NTOS_MODE_USER
PVOID BitsLock;
#else
PFAST_MUTEX BitsLock; /* You need to hold this lock before you touch PFAST_MUTEX BitsLock; /* You need to hold this lock before you touch
the actual bits in the bitmap */ the actual bits in the bitmap */
#endif
/* For device-independent bitmaps: */ /* For device-independent bitmaps: */
DIBSECTION *dib; DIBSECTION *dib;

View file

@ -1,8 +1,6 @@
#ifndef __WIN32K_COORD_H #ifndef __WIN32K_COORD_H
#define __WIN32K_COORD_H #define __WIN32K_COORD_H
#include "dc.h"
BOOL BOOL
STDCALL STDCALL
NtGdiCombineTransform ( NtGdiCombineTransform (

View file

@ -2,11 +2,6 @@
#ifndef __WIN32K_DC_H #ifndef __WIN32K_DC_H
#define __WIN32K_DC_H #define __WIN32K_DC_H
#include <windows.h>
#include <win32k/driver.h>
#include <win32k/gdiobj.h>
#include <win32k/path.h>
typedef struct _WIN_DC_INFO typedef struct _WIN_DC_INFO
{ {
int flags; int flags;
@ -135,7 +130,11 @@ typedef struct
GDIINFO GDIInfo; GDIINFO GDIInfo;
DEVINFO DevInfo; DEVINFO DevInfo;
DRIVER_FUNCTIONS DriverFunctions; DRIVER_FUNCTIONS DriverFunctions;
#ifdef NTOS_MODE_USER
PVOID VideoFileObject;
#else
PFILE_OBJECT VideoFileObject; PFILE_OBJECT VideoFileObject;
#endif
BOOLEAN PreparedDriver; BOOLEAN PreparedDriver;
ULONG DisplayNumber; ULONG DisplayNumber;
@ -149,6 +148,8 @@ typedef struct
/* Internal functions */ /* Internal functions */
#ifndef NTOS_MODE_USER
#define DC_LockDc(hDC) \ #define DC_LockDc(hDC) \
((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC)) ((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
#define DC_UnlockDc(pDC) \ #define DC_UnlockDc(pDC) \
@ -167,6 +168,8 @@ VOID FASTCALL DC_SetOwnership(HDC DC, PEPROCESS Owner);
VOID FASTCALL DC_UpdateXforms(PDC dc); VOID FASTCALL DC_UpdateXforms(PDC dc);
BOOL FASTCALL DC_InvertXform(const XFORM *xformSrc, XFORM *xformDest); BOOL FASTCALL DC_InvertXform(const XFORM *xformSrc, XFORM *xformDest);
#endif
/* User entry points */ /* User entry points */
BOOL STDCALL NtGdiCancelDC(HDC hDC); BOOL STDCALL NtGdiCancelDC(HDC hDC);

View file

@ -2,7 +2,6 @@
#ifndef __WIN32K_DRIVER_H #ifndef __WIN32K_DRIVER_H
#define __WIN32K_DRIVER_H #define __WIN32K_DRIVER_H
#include <ddk/ntddk.h>
#include <ddk/winddi.h> #include <ddk/winddi.h>
typedef BOOL (STDCALL *PGD_ENABLEDRIVER)(ULONG, ULONG, PDRVENABLEDATA); typedef BOOL (STDCALL *PGD_ENABLEDRIVER)(ULONG, ULONG, PDRVENABLEDATA);
@ -176,6 +175,8 @@ typedef struct _DRIVER_FUNCTIONS
PGD_ALPHABLEND AlphaBlend; PGD_ALPHABLEND AlphaBlend;
} DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS; } DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
#ifndef NTOS_MODE_USER
BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver); BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver);
PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name); PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name);
PFILE_OBJECT DRIVER_FindMPDriver(ULONG DisplayNumber); PFILE_OBJECT DRIVER_FindMPDriver(ULONG DisplayNumber);
@ -187,3 +188,5 @@ INT DRIVER_UnreferenceDriver (LPCWSTR Name);
#endif #endif
#endif

View file

@ -6,8 +6,6 @@
#ifndef __WIN32K_GDIOBJ_H #ifndef __WIN32K_GDIOBJ_H
#define __WIN32K_GDIOBJ_H #define __WIN32K_GDIOBJ_H
#include <ddk/ntddk.h>
/* base address where the handle table is mapped to */ /* base address where the handle table is mapped to */
#define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000) #define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000)
@ -67,7 +65,11 @@ typedef BOOL (INTERNAL_CALL *GDICLEANUPPROC)(PVOID ObjectBody);
*/ */
typedef struct _GDIOBJHDR typedef struct _GDIOBJHDR
{ {
#ifdef NTOS_MODE_USER
PVOID LockingThread;
#else
PETHREAD LockingThread; /* only assigned if a thread is holding the lock! */ PETHREAD LockingThread; /* only assigned if a thread is holding the lock! */
#endif
ULONG Locks; ULONG Locks;
#ifdef GDI_DEBUG #ifdef GDI_DEBUG
const char* createdfile; const char* createdfile;
@ -77,6 +79,8 @@ typedef struct _GDIOBJHDR
#endif #endif
} GDIOBJHDR, *PGDIOBJHDR; } GDIOBJHDR, *PGDIOBJHDR;
#ifndef NTOS_MODE_USER
BOOL INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle); BOOL INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
void INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner); void INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
void INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo); void INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
@ -108,10 +112,12 @@ PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj (HGDIOBJ hObj, DWORD ObjectType);
#endif /* GDI_DEBUG */ #endif /* GDI_DEBUG */
PVOID INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);
#endif
#define GDIOBJFLAG_DEFAULT (0x0) #define GDIOBJFLAG_DEFAULT (0x0)
#define GDIOBJFLAG_IGNOREPID (0x1) #define GDIOBJFLAG_IGNOREPID (0x1)
#define GDIOBJFLAG_IGNORELOCK (0x2) #define GDIOBJFLAG_IGNORELOCK (0x2)
PVOID INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);
#endif #endif

View file

@ -5,13 +5,15 @@
#define INTERNAL_CALL STDCALL #define INTERNAL_CALL STDCALL
#endif #endif
#include <win32k/bitmaps.h>
#include <win32k/brush.h> #include <win32k/brush.h>
#include <win32k/cliprgn.h> #include <win32k/cliprgn.h>
#include <win32k/color.h> #include <win32k/color.h>
#include <win32k/coord.h>
#include <win32k/cursoricon.h> #include <win32k/cursoricon.h>
#include <win32k/path.h>
#include <win32k/driver.h>
#include <win32k/dc.h> #include <win32k/dc.h>
#include <win32k/coord.h>
#include <win32k/bitmaps.h>
#include <win32k/debug.h> #include <win32k/debug.h>
#include <win32k/fillshap.h> #include <win32k/fillshap.h>
#include <win32k/font.h> #include <win32k/font.h>
@ -22,7 +24,6 @@
#include <win32k/misc.h> #include <win32k/misc.h>
#include <win32k/ntuser.h> #include <win32k/ntuser.h>
#include <win32k/paint.h> #include <win32k/paint.h>
#include <win32k/path.h>
#include <win32k/pen.h> #include <win32k/pen.h>
#include <win32k/print.h> #include <win32k/print.h>
#include <win32k/region.h> #include <win32k/region.h>

View file

@ -1,16 +1,13 @@
#include <wine/windef.h>
#include <windows.h> #include <windows.h>
#include <ddraw.h> #define NTOS_MODE_USER
#include <string.h> #include <ndk/ntndk.h>
#include <ddk/ntddk.h>
#include <ddentry.h> #include <ddentry.h>
#include <win32k/kapi.h> #include <ddraw.h>
#include <ddk/prntfont.h> #include <ddk/prntfont.h>
#include <string.h>
#include <win32k/kapi.h>
#include <rosrtl/logfont.h> #include <rosrtl/logfont.h>
#include <rosrtl/devmode.h> #include <rosrtl/devmode.h>
#include <wine/unicode.h>
#define NTOS_MODE_USER
#include <ntos.h>
#define NtUserGetDCBrushColor(hbr) \ #define NtUserGetDCBrushColor(hbr) \
(COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_BRUSH, TWOPARAM_ROUTINE_GETDCCOLOR) (COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_BRUSH, TWOPARAM_ROUTINE_GETDCCOLOR)

View file

@ -404,10 +404,10 @@ GetCharacterPlacementW(
/* Treat the case where no special handling was requested in a fastpath way */ /* Treat the case where no special handling was requested in a fastpath way */
/* copy will do if the GCP_REORDER flag is not set */ /* copy will do if the GCP_REORDER flag is not set */
if(lpResults->lpOutString) if(lpResults->lpOutString)
strncpyW( lpResults->lpOutString, lpString, nSet ); lstrcpynW( lpResults->lpOutString, lpString, nSet );
if(lpResults->lpGlyphs) if(lpResults->lpGlyphs)
strncpyW( lpResults->lpGlyphs, lpString, nSet ); lstrcpynW( lpResults->lpGlyphs, lpString, nSet );
if(lpResults->lpOrder) if(lpResults->lpOrder)
{ {

View file

@ -45,6 +45,7 @@
#define NTOS_MODE_KERNEL #define NTOS_MODE_KERNEL
#include <ntos.h> #include <ntos.h>
#include <win32k/ntddraw.h> #include <win32k/ntddraw.h>
#include <ddk/winddi.h>
#include <win32k/win32k.h> #include <win32k/win32k.h>
/* /*

View file

@ -11,6 +11,7 @@
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
#include <win32k/ntddraw.h> #include <win32k/ntddraw.h>
#include <ddk/winddi.h>
#include <win32k/win32k.h> #include <win32k/win32k.h>
#include <include/intddraw.h> #include <include/intddraw.h>
#include <win32k/gdiobj.h> #include <win32k/gdiobj.h>

View file

@ -10,6 +10,7 @@
*/ */
#include <ddk/ntddk.h> #include <ddk/ntddk.h>
#include <win32k/ntddraw.h> #include <win32k/ntddraw.h>
#include <ddk/winddi.h>
#include <win32k/win32k.h> #include <win32k/win32k.h>
#define NDEBUG #define NDEBUG