Author: tkreuzer Date: Mon Aug 10 22:19:33 2009 New Revision: 42601
URL: http://svn.reactos.org/svn/reactos?rev=42601&view=rev Log: - Move some functions from stubs.c to new file eng/mapping.c - Move EngSetPointerTag to mouse.c - Move EngQuerySystemAttribute and EngGetTickCount to engmisc.c - Unimplement EngLoadModule as it was wrong - FLOATOBJ_XxxFloatObj are duplicated from FLOATOBJ_Xxx, remove the stubs and redirect in the pspec. - Redirect EngGetCurrentProcessId and EngGetcurrentThreadId to ntoskrnl
Added: trunk/reactos/subsystems/win32/win32k/eng/mapping.c (with props) Modified: trunk/reactos/subsystems/win32/win32k/eng/engmisc.c trunk/reactos/subsystems/win32/win32k/eng/mouse.c trunk/reactos/subsystems/win32/win32k/ldr/loader.c trunk/reactos/subsystems/win32/win32k/objects/device.c trunk/reactos/subsystems/win32/win32k/objects/dibobj.c trunk/reactos/subsystems/win32/win32k/stubs/stubs.c trunk/reactos/subsystems/win32/win32k/win32k.pspec trunk/reactos/subsystems/win32/win32k/win32k.rbuild
Modified: trunk/reactos/subsystems/win32/win32k/eng/engmisc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/engmisc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/engmisc.c [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -222,20 +222,6 @@ }
HANDLE APIENTRY -EngGetCurrentProcessId(VOID) -{ - /* http://www.osr.com/ddk/graphics/gdifncs_5ovb.htm */ - return PsGetCurrentProcessId(); -} - -HANDLE APIENTRY -EngGetCurrentThreadId(VOID) -{ - /* http://www.osr.com/ddk/graphics/gdifncs_25rb.htm */ - return PsGetCurrentThreadId(); -} - -HANDLE APIENTRY EngGetProcessHandle(VOID) { /* http://www.osr.com/ddk/graphics/gdifncs_3tif.htm @@ -253,4 +239,57 @@ RtlGetDefaultCodePage(AnsiCodePage, OemCodePage); }
+BOOL +APIENTRY +EngQuerySystemAttribute( + IN ENG_SYSTEM_ATTRIBUTE CapNum, + OUT PDWORD pCapability) +{ + SYSTEM_BASIC_INFORMATION sbi; + SYSTEM_PROCESSOR_INFORMATION spi; + + switch (CapNum) + { + case EngNumberOfProcessors: + NtQuerySystemInformation(SystemBasicInformation, + &sbi, + sizeof(SYSTEM_BASIC_INFORMATION), + NULL); + *pCapability = sbi.NumberOfProcessors; + return TRUE; + + case EngProcessorFeature: + NtQuerySystemInformation(SystemProcessorInformation, + &spi, + sizeof(SYSTEM_PROCESSOR_INFORMATION), + NULL); + *pCapability = spi.ProcessorFeatureBits; + return TRUE; + + default: + break; + } + + return FALSE; +} + +ULONGLONG +APIENTRY +EngGetTickCount(VOID) +{ + ULONG Multiplier; + LARGE_INTEGER TickCount; + + /* Get the multiplier and current tick count */ + KeQueryTickCount(&TickCount); + Multiplier = SharedUserData->TickCountMultiplier; + + /* Convert to milliseconds and return */ + return (Int64ShrlMod32(UInt32x32To64(Multiplier, TickCount.LowPart), 24) + + (Multiplier * (TickCount.HighPart << 8))); +} + + + + /* EOF */
Added: trunk/reactos/subsystems/win32/win32k/eng/mapping.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/mapping.c (added) +++ trunk/reactos/subsystems/win32/win32k/eng/mapping.c [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -1,0 +1,145 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * PURPOSE: Functions for mapping files and sections + * FILE: subsys/win32k/eng/device.c + * PROGRAMER: + */ + +#include <w32k.h> + +#define NDEBUG +#include <debug.h> + +HANDLE +APIENTRY +EngLoadModule(LPWSTR pwsz) +{ + UNIMPLEMENTED; + return NULL; +} + +HANDLE +APIENTRY +EngLoadModuleForWrite( + IN LPWSTR pwsz, + IN ULONG cjSizeOfModule) +{ + // www.osr.com/ddk/graphics/gdifncs_98rr.htm + UNIMPLEMENTED; + return NULL; +} + +PVOID +APIENTRY +EngMapModule( + IN HANDLE h, + OUT PULONG pulSize) +{ + // www.osr.com/ddk/graphics/gdifncs_9b1j.htm + UNIMPLEMENTED; + return NULL; +} + +VOID +APIENTRY +EngFreeModule (IN HANDLE h) +{ + // www.osr.com/ddk/graphics/gdifncs_9fzb.htm + UNIMPLEMENTED; +} + +PVOID +APIENTRY +EngMapFile( + IN LPWSTR pwsz, + IN ULONG cjSize, + OUT ULONG_PTR *piFile) +{ + UNIMPLEMENTED; + return NULL; +} + +BOOL +APIENTRY +EngUnmapFile( + IN ULONG_PTR iFile) +{ + UNIMPLEMENTED; + return FALSE; +} + + +BOOL +APIENTRY +EngMapFontFileFD( + IN ULONG_PTR iFile, + OUT PULONG *ppjBuf, + OUT ULONG *pcjBuf) +{ + // www.osr.com/ddk/graphics/gdifncs_0co7.htm + UNIMPLEMENTED; + return FALSE; +} + +VOID +APIENTRY +EngUnmapFontFileFD( + IN ULONG_PTR iFile) +{ + // http://www.osr.com/ddk/graphics/gdifncs_6wbr.htm + UNIMPLEMENTED; +} + +BOOL +APIENTRY +EngMapFontFile( + ULONG_PTR iFile, + PULONG *ppjBuf, + ULONG *pcjBuf) +{ + // www.osr.com/ddk/graphics/gdifncs_3up3.htm + return EngMapFontFileFD(iFile, ppjBuf, pcjBuf); +} + +VOID +APIENTRY +EngUnmapFontFile( + IN ULONG_PTR iFile) +{ + // www.osr.com/ddk/graphics/gdifncs_09wn.htm + EngUnmapFontFileFD(iFile); +} + + +BOOLEAN +APIENTRY +EngMapSection(IN PVOID Section, + IN BOOLEAN Map, + IN HANDLE Process, + IN PVOID* BaseAddress) +{ + UNIMPLEMENTED; + return FALSE; +} + +PVOID +APIENTRY +EngAllocSectionMem(IN PVOID SectionObject, + IN ULONG Flags, + IN SIZE_T MemSize, + IN ULONG Tag) +{ + UNIMPLEMENTED; + return NULL; +} + + +BOOLEAN +APIENTRY +EngFreeSectionMem(IN PVOID SectionObject OPTIONAL, + IN PVOID MappedBase) +{ + UNIMPLEMENTED; + return FALSE; +}
Propchange: trunk/reactos/subsystems/win32/win32k/eng/mapping.c ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/subsystems/win32/win32k/eng/mouse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -15,6 +15,21 @@ #include <debug.h>
/* FUNCTIONS *****************************************************************/ + +BOOL +APIENTRY +EngSetPointerTag( + IN HDEV hdev, + IN SURFOBJ *psoMask, + IN SURFOBJ *psoColor, + IN XLATEOBJ *pxlo, + IN FLONG fl) +{ + // This function is obsolete for Windows 2000 and later. + // This function is still supported, but always returns FALSE. + // www.osr.com/ddk/graphics/gdifncs_4yav.htm + return FALSE; +}
/* * FUNCTION: Notify the mouse driver that drawing is about to begin in
Modified: trunk/reactos/subsystems/win32/win32k/ldr/loader.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ldr... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ldr/loader.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ldr/loader.c [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -243,27 +243,6 @@ return hImageHandle; }
- -/* - * @unimplemented - */ -HANDLE -APIENTRY -EngLoadModule(LPWSTR ModuleName) -{ - SYSTEM_GDI_DRIVER_INFORMATION GdiDriverInfo; - NTSTATUS Status; - - // FIXME: should load as readonly - - RtlInitUnicodeString (&GdiDriverInfo.DriverName, ModuleName); - Status = ZwSetSystemInformation (SystemLoadGdiDriverInformation, - &GdiDriverInfo, sizeof(SYSTEM_GDI_DRIVER_INFORMATION)); - if (!NT_SUCCESS(Status)) return NULL; - - return (HANDLE)GdiDriverInfo.ImageAddress; -} - VOID APIENTRY EngUnloadImage ( IN HANDLE hModule )
Modified: trunk/reactos/subsystems/win32/win32k/objects/device.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -8,7 +8,7 @@
#include <w32k.h>
-#define NDEBUG +#define YDEBUG #include <debug.h>
// TODO: proper implementation of LDEVOBJ and PDEVOBJ interface @@ -213,6 +213,9 @@ ULONG DisplayNumber; LARGE_INTEGER Zero; BOOLEAN ret = FALSE; + + DPRINT("IntPrepareDriver()\n"); +ASSERT(FALSE);
Zero.QuadPart = 0; if (STATUS_SUCCESS != KeWaitForSingleObject(&VideoDriverNeedsPreparation, Executive, KernelMode, TRUE, &Zero)) @@ -450,7 +453,7 @@ IO_STATUS_BLOCK Iosb; BOOL Prepare = TRUE; ULONG Length = sizeof(BOOL); - PIO_STACK_LOCATION StackPtr; +// PIO_STACK_LOCATION StackPtr; LARGE_INTEGER StartOffset; PFILE_OBJECT FileObject = PrimarySurface.VideoFileObject; PDEVICE_OBJECT DeviceObject = FileObject->DeviceObject; @@ -475,16 +478,16 @@ }
/* Set up IRP Data */ - Irp->Tail.Overlay.OriginalFileObject = FileObject; - Irp->RequestorMode = KernelMode; - Irp->Overlay.AsynchronousParameters.UserApcRoutine = NULL; - Irp->Overlay.AsynchronousParameters.UserApcContext = NULL; - Irp->Flags |= IRP_WRITE_OPERATION; +// Irp->Tail.Overlay.OriginalFileObject = FileObject; +// Irp->RequestorMode = KernelMode; +// Irp->Overlay.AsynchronousParameters.UserApcRoutine = NULL; +// Irp->Overlay.AsynchronousParameters.UserApcContext = NULL; +// Irp->Flags |= IRP_WRITE_OPERATION;
/* Setup Stack Data */ - StackPtr = IoGetNextIrpStackLocation(Irp); - StackPtr->FileObject = PrimarySurface.VideoFileObject; - StackPtr->Parameters.Write.Key = 0; +// StackPtr = IoGetNextIrpStackLocation(Irp); +// StackPtr->FileObject = PrimarySurface.VideoFileObject; +// StackPtr->Parameters.Write.Key = 0;
Status = IoCallDriver(DeviceObject, Irp);
@@ -505,6 +508,8 @@ RECTL SurfaceRect; SURFOBJ *SurfObj; BOOL calledFromUser; + + DPRINT("IntCreatePrimarySurface()\n");
if (! IntPrepareDriverIfNeeded()) {
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+#if 0 +#include "dibbmp.c" +#else #include <w32k.h>
#define NDEBUG @@ -1735,4 +1738,6 @@ return hPal; }
+#endif + /* EOF */
Modified: trunk/reactos/subsystems/win32/win32k/stubs/stubs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/stu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/stubs/stubs.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/stubs/stubs.c [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -6,58 +6,7 @@
#define UNIMPLEMENTED DbgPrint("(%s:%i) WIN32K: %s UNIMPLEMENTED\n", __FILE__, __LINE__, __FUNCTION__ )
-/* - * @unimplemented - */ -BOOL -APIENTRY -EngMapFontFileFD ( - IN ULONG_PTR iFile, - OUT PULONG *ppjBuf, - OUT ULONG *pcjBuf - ) -{ - // www.osr.com/ddk/graphics/gdifncs_0co7.htm - UNIMPLEMENTED; - return FALSE; -} - -/* - * @unimplemented - */ -VOID -APIENTRY -EngUnmapFontFileFD ( IN ULONG_PTR iFile ) -{ - // http://www.osr.com/ddk/graphics/gdifncs_6wbr.htm - UNIMPLEMENTED; -} - -/* - * @implemented - */ -BOOL -APIENTRY -EngMapFontFile ( - ULONG_PTR iFile, - PULONG *ppjBuf, - ULONG *pcjBuf - ) -{ - // www.osr.com/ddk/graphics/gdifncs_3up3.htm - return EngMapFontFileFD ( iFile, ppjBuf, pcjBuf ); -} - -/* - * @implemented - */ -VOID -APIENTRY -EngUnmapFontFile ( ULONG_PTR iFile ) -{ - // www.osr.com/ddk/graphics/gdifncs_09wn.htm - EngUnmapFontFileFD ( iFile ); -} +
/* * @unimplemented @@ -204,18 +153,6 @@ /* * @unimplemented */ -VOID -APIENTRY -EngFreeModule ( IN HANDLE h ) -{ - // www.osr.com/ddk/graphics/gdifncs_9fzb.htm - UNIMPLEMENTED; -} - - -/* - * @unimplemented - */ LPWSTR APIENTRY EngGetDriverName ( IN HDEV hdev ) @@ -345,36 +282,6 @@ /* * @unimplemented */ -HANDLE -APIENTRY -EngLoadModuleForWrite( - IN LPWSTR pwsz, - IN ULONG cjSizeOfModule - ) -{ - // www.osr.com/ddk/graphics/gdifncs_98rr.htm - UNIMPLEMENTED; - return NULL; -} - -/* - * @unimplemented - */ -PVOID -APIENTRY -EngMapModule( - IN HANDLE h, - OUT PULONG pSize - ) -{ - // www.osr.com/ddk/graphics/gdifncs_9b1j.htm - UNIMPLEMENTED; - return NULL; -} - -/* - * @unimplemented - */ BOOL APIENTRY EngMarkBandingSurface ( IN HSURF hsurf ) @@ -421,21 +328,6 @@ return 0; }
-BOOL -APIENTRY -EngSetPointerTag( - IN HDEV hdev, - IN SURFOBJ *psoMask, - IN SURFOBJ *psoColor, - IN XLATEOBJ *pxlo, - IN FLONG fl - ) -{ - // This function is obsolete for Windows 2000 and later. - // This function is still supported, but always returns FALSE. - // www.osr.com/ddk/graphics/gdifncs_4yav.htm - return FALSE; -}
DWORD APIENTRY @@ -747,45 +639,6 @@ }
/* - * @implemented - */ -BOOL APIENTRY -EngQuerySystemAttribute( - IN ENG_SYSTEM_ATTRIBUTE CapNum, - OUT PDWORD pCapability) -{ - SYSTEM_BASIC_INFORMATION sbi; - SYSTEM_PROCESSOR_INFORMATION spi; - - switch (CapNum) - { - case EngNumberOfProcessors: - NtQuerySystemInformation( - SystemBasicInformation, - &sbi, - sizeof(SYSTEM_BASIC_INFORMATION), - NULL); - *pCapability = sbi.NumberOfProcessors; - return TRUE; - - case EngProcessorFeature: - NtQuerySystemInformation( - SystemProcessorInformation, - &spi, - sizeof(SYSTEM_PROCESSOR_INFORMATION), - NULL); - *pCapability = spi.ProcessorFeatureBits; - return TRUE; - - default: - break; - } - - return FALSE; -} - - -/* * @unimplemented */ HANDLE APIENTRY @@ -848,19 +701,6 @@ { UNIMPLEMENTED; return FALSE; -} - -/* - * @unimplemented - */ -PVOID APIENTRY -EngMapFile( - IN LPWSTR Filename, - IN ULONG Size, - OUT ULONG_PTR *File) -{ - UNIMPLEMENTED; - return NULL; }
/* @@ -913,16 +753,6 @@ return FileTime; }
-/* - * @unimplemented - */ -BOOL APIENTRY -EngUnmapFile( - IN ULONG_PTR File) -{ - UNIMPLEMENTED; - return FALSE; -}
/* * @unimplemented @@ -2753,86 +2583,6 @@ return NULL; }
-VOID -APIENTRY -FLOATOBJ_AddFloatObj(PFLOATOBJ pFloatObj1, - PFLOATOBJ pFloatObj2) -{ - UNIMPLEMENTED; -} - -VOID -APIENTRY -FLOATOBJ_DivFloatObj(PFLOATOBJ pFloatObj1, - PFLOATOBJ pFloatObj2) -{ - UNIMPLEMENTED; -} - -VOID -APIENTRY -FLOATOBJ_MulFloatObj(PFLOATOBJ pFloatObj1, - PFLOATOBJ pFloatObj2) -{ - UNIMPLEMENTED; -} - -VOID -APIENTRY -FLOATOBJ_SubFloatObj(PFLOATOBJ pFloatObj1, - PFLOATOBJ pFloatObj2) -{ - UNIMPLEMENTED; -} - -PVOID -APIENTRY -EngAllocSectionMem(IN PVOID SectionObject, - IN ULONG Flags, - IN SIZE_T MemSize, - IN ULONG Tag) -{ - UNIMPLEMENTED; - return NULL; -} - - -BOOLEAN -APIENTRY -EngFreeSectionMem(IN PVOID SectionObject OPTIONAL, - IN PVOID MappedBase) -{ - UNIMPLEMENTED; - return FALSE; -} - -ULONGLONG -APIENTRY -EngGetTickCount(VOID) -{ - ULONG Multiplier; - LARGE_INTEGER TickCount; - - /* Get the multiplier and current tick count */ - KeQueryTickCount(&TickCount); - Multiplier = SharedUserData->TickCountMultiplier; - - /* Convert to milliseconds and return */ - return (Int64ShrlMod32(UInt32x32To64(Multiplier, TickCount.LowPart), 24) + - (Multiplier * (TickCount.HighPart << 8))); -} - -BOOLEAN -APIENTRY -EngMapSection(IN PVOID Section, - IN BOOLEAN Map, - IN HANDLE Process, - IN PVOID* BaseAddress) -{ - UNIMPLEMENTED; - return FALSE; -} - BOOLEAN APIENTRY EngNineGrid(IN SURFOBJ* pDestSurfaceObj,
Modified: trunk/reactos/subsystems/win32/win32k/win32k.pspec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/win... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/win32k.pspec [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/win32k.pspec [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -1,9 +1,9 @@ #include "include/reactos/msvctarget.h"
-@ stdcall FLOATOBJ_AddFloatObj(ptr ptr) -@ stdcall FLOATOBJ_DivFloatObj(ptr ptr) -@ stdcall FLOATOBJ_MulFloatObj(ptr ptr) -@ stdcall FLOATOBJ_SubFloatObj(ptr ptr) +@ stdcall FLOATOBJ_AddFloatObj(ptr ptr) FLOATOBJ_Add +@ stdcall FLOATOBJ_DivFloatObj(ptr ptr) FLOATOBJ_Div +@ stdcall FLOATOBJ_MulFloatObj(ptr ptr) FLOATOBJ_Mul +@ stdcall FLOATOBJ_SubFloatObj(ptr ptr) FLOATOBJ_Sub @ stdcall BRUSHOBJ_hGetColorTransform(ptr) @ stdcall BRUSHOBJ_pvAllocRbrush(ptr long) @ stdcall BRUSHOBJ_pvGetRbrush(ptr) @@ -66,8 +66,8 @@ @ stdcall EngFreeSectionMem(ptr ptr) @ stdcall EngFreeUserMem(ptr) @ stdcall EngGetCurrentCodePage(ptr ptr) -@ stdcall EngGetCurrentProcessId() -@ stdcall EngGetCurrentThreadId() +@ stdcall EngGetCurrentProcessId() NTOSKRNL.PsGetCurrentProcessId +@ stdcall EngGetCurrentThreadId() NTOSKRNL.PsGetCurrentThreadId @ stdcall EngGetDriverName(ptr) @ stdcall EngGetFileChangeTime(ptr ptr) @ stdcall EngGetFilePath(ptr ptr)
Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/win... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] Mon Aug 10 22:19:33 2009 @@ -65,6 +65,7 @@ </if> <file>gradient.c</file> <file>lineto.c</file> + <file>mapping.c</file> <file>mem.c</file> <file>engmisc.c</file> <file>mouse.c</file>