added stubs and build spec for win32k.sys
authorRex Jolliff <rex@lvcablemodem.com>
Sat, 22 May 1999 23:55:56 +0000 (23:55 +0000)
committerRex Jolliff <rex@lvcablemodem.com>
Sat, 22 May 1999 23:55:56 +0000 (23:55 +0000)
svn path=/trunk/; revision=507

reactos/subsys/win32k/main/dllmain.c
reactos/subsys/win32k/makefile [new file with mode: 0644]
reactos/subsys/win32k/stubs/stubs.c [new file with mode: 0644]
reactos/subsys/win32k/win32k.def
reactos/subsys/win32k/win32k.rc [new file with mode: 0644]

index 9eb66b4..df74248 100644 (file)
@@ -1,13 +1,26 @@
+/*
+ *  Entry Point for win32k.sys
+ */
 
-DllMain()
+#include <windows.h>
+#include <ddk/ntddk.h>
+
+WINBOOL STDCALL DllMain(HANDLE hInst, 
+                       ULONG ul_reason_for_call,
+                       LPVOID lpReserved)
 {
-  /* %%% handle GDI initialization here  */
+  DbgPrint("win32k:DllMain(hInst %x, ul_reason_for_call %d)\n",
+           hInst, 
+           ul_reason_for_call);
+
+  return TRUE;  
 }
 
+#if 0
 HDC GDICreateDC(LPCWSTR Driver,
                 LPCWSTR Device,
                 CONST PDEVMODE InitData)
 {
   /* %%% initialize device driver here on first call for display DC.  */
 }
-
+#endif
diff --git a/reactos/subsys/win32k/makefile b/reactos/subsys/win32k/makefile
new file mode 100644 (file)
index 0000000..2413bcc
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# WIN32K.SYS build spec
+#
+
+MAIN_OBJECTS = main/dllmain.o
+STUBS_OBJECTS = stubs/stubs.o
+RESOURCE_OBJECT = win32k.coff
+OBJECTS = $(MAIN_OBJECTS) $(STUBS_OBJECTS) $(RESOURCE_OBJECT)
+
+all: win32k.sys
+
+win32k.coff: win32k.rc ../../include/reactos/resource.h
+       windres win32k.rc win32k.coff
+
+ifeq ($(DOSCLI),yes)
+CLEAN_FILES = main\*.o stubs\*.o win32k.coff win32k.o win32k.a junk.tmp base.tmp  \
+              temp.exp win32k.sys win32k.sym
+else
+CLEAN_FILES = main/*.o stubs/*.o win32k.coff win32k.o win32k.a junk.tmp base.tmp  \
+              temp.exp win32k.sys win32k.sym
+endif
+
+win32k.sys: $(OBJECTS) win32k.def
+       $(LD) -r $(OBJECTS) -o win32k.o
+       $(DLLTOOL) --dllname win32k.sys --def win32k.def \
+                  --output-lib win32k.a
+       $(CC) --subsystem=windows -mdll --dll -e _DllMain@12 -o junk.tmp \
+             -Wl,--image-base,0x0 \
+             -Wl,--file-alignment,0x1000 \
+             -Wl,--section-alignment,0x1000 \
+             -Wl,--defsym,_end=end \
+             -Wl,--defsym,_edata=__data_end__ \
+             -Wl,--defsym,_etext=etext -Wl,--base-file,base.tmp win32k.o \
+              ../../ntoskrnl/ntoskrnl.a
+       - $(RM) junk.tmp
+       $(DLLTOOL) --dllname win32k.sys --base-file base.tmp \
+                  --output-exp temp.exp --def win32k.def
+       - $(RM) base.tmp
+       $(CC) --subsystem=windows -mdll --dll -e _DllMain@12 \
+              -o win32k.sys win32k.o ../../ntoskrnl/ntoskrnl.a \
+             -Wl,--image-base,0x0 \
+             -Wl,--file-alignment,0x1000 \
+             -Wl,--section-alignment,0x1000 \
+             -Wl,--defsym,_end=end \
+             -Wl,--defsym,_edata=__data_end__ \
+             -Wl,--defsym,_etext=etext -Wl,temp.exp
+              
+       - $(RM) temp.exp
+       $(NM) --numeric-sort win32k.sys > win32k.sym
+
+clean: $(CLEAN_FILES:%=%_clean)
+
+$(CLEAN_FILES:%=%_clean): %_clean:
+       - $(RM) $*
+
+.PHONY: clean $(CLEAN_FILES:%=%_clean)
+
+#WITH_DEBUGGING = yes
+WIN32_LEAN_AND_MEAN = yes
+#WARNINGS_ARE_ERRORS = yes
+include ../../rules.mak
+
diff --git a/reactos/subsys/win32k/stubs/stubs.c b/reactos/subsys/win32k/stubs/stubs.c
new file mode 100644 (file)
index 0000000..41a45e2
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * Stubs for unimplemented WIN32K.SYS exports
+ */
+
+#include <windows.h>
+#include <ddk/ntddk.h>
+
+#define STUB(x) void x(void) { DbgPrint("WIN32K: Stub for %s\n", #x); }
+
+STUB(BRUSHOBJ_pvAllocRbrush)
+STUB(BRUSHOBJ_pvGetRbrush)
+STUB(BRUSHOBJ_ulGetBrushColor)
+STUB(CLIPOBJ_bEnum)
+STUB(CLIPOBJ_cEnumStart)
+STUB(CLIPOBJ_ppoGetPath)
+STUB(EngAcquireSemaphore)
+STUB(EngAllocMem)
+STUB(EngAllocUserMem)
+STUB(EngAssociateSurface)
+STUB(EngBitBlt)
+STUB(EngCheckAbort)
+STUB(EngComputeGlyphSet)
+STUB(EngCopyBits)
+STUB(EngCreateBitmap)
+STUB(EngCreateClip)
+STUB(EngCreateDeviceBitmap)
+STUB(EngCreateDeviceSurface)
+STUB(EngCreateDriverObj)
+STUB(EngCreateEvent)
+STUB(EngCreatePalette)
+STUB(EngCreatePath)
+STUB(EngCreateSemaphore)
+STUB(EngCreateWnd)
+STUB(EngDebugBreak)
+STUB(EngDebugPrint)
+STUB(EngDeleteClip)
+STUB(EngDeleteDriverObj)
+STUB(EngDeleteEvent)
+STUB(EngDeletePalette)
+STUB(EngDeletePath)
+STUB(EngDeleteSemaphore)
+STUB(EngDeleteSurface)
+STUB(EngDeleteWnd)
+STUB(EngDeviceIoControl)
+STUB(EngEnumForms)
+STUB(EngEraseSurface)
+STUB(EngFillPath)
+STUB(EngFindImageProcAddress)
+STUB(EngFindResource)
+STUB(EngFreeMem)
+STUB(EngFreeModule)
+STUB(EngFreeUserMem)
+STUB(EngGetCurrentCodePage)
+STUB(EngGetDriverName)
+STUB(EngGetFileChangeTime)
+STUB(EngGetFilePath)
+STUB(EngGetForm)
+STUB(EngGetLastError)
+STUB(EngGetPrinter)
+STUB(EngGetPrinterData)
+STUB(EngGetPrinterDataFileName)
+STUB(EngGetProcessHandle)
+STUB(EngGetType1FontList)
+STUB(EngLineTo)
+STUB(EngLoadImage)
+STUB(EngLoadModule)
+STUB(EngLoadModuleForWrite)
+STUB(EngLockDriverObj)
+STUB(EngLockSurface)
+STUB(EngMapEvent)
+STUB(EngMapFontFile)
+STUB(EngMapModule)
+STUB(EngMarkBandingSurface)
+STUB(EngMovePointer)
+STUB(EngMulDiv)
+STUB(EngMultiByteToUnicodeN)
+STUB(EngMultiByteToWideChar)
+STUB(EngPaint)
+STUB(EngProbeForRead)
+STUB(EngProbeForReadAndWrite)
+STUB(EngQueryLocalTime)
+STUB(EngQueryPalette)
+STUB(EngQueryPerformanceCounter)
+STUB(EngQueryPerformanceFrequency)
+STUB(EngReleaseSemaphore)
+STUB(EngRestoreFloatingPointState)
+STUB(EngSaveFloatingPointState)
+STUB(EngSecureMem)
+STUB(EngSetEvent)
+STUB(EngSetLastError)
+STUB(EngSetPointerShape)
+STUB(EngSetPointerTag)
+STUB(EngSetPrinterData)
+STUB(EngSort)
+STUB(EngStretchBlt)
+STUB(EngStrokeAndFillPath)
+STUB(EngStrokePath)
+STUB(EngTextOut)
+STUB(EngUnicodeToMultiByteN)
+STUB(EngUnloadImage)
+STUB(EngUnlockDriverObj)
+STUB(EngUnlockSurface)
+STUB(EngUnmapEvent)
+STUB(EngUnmapFontFile)
+STUB(EngUnsecureMem)
+STUB(EngWaitForSingleObject)
+STUB(EngWideCharToMultiByte)
+STUB(EngWritePrinter)
+STUB(FLOATOBJ_Add)
+STUB(FLOATOBJ_AddFloat)
+STUB(FLOATOBJ_AddFloatObj)
+STUB(FLOATOBJ_AddLong)
+STUB(FLOATOBJ_Div)
+STUB(FLOATOBJ_DivFloat)
+STUB(FLOATOBJ_DivFloatObj)
+STUB(FLOATOBJ_DivLong)
+STUB(FLOATOBJ_Equal)
+STUB(FLOATOBJ_EqualLong)
+STUB(FLOATOBJ_GetFloat)
+STUB(FLOATOBJ_GetLong)
+STUB(FLOATOBJ_GreaterThan)
+STUB(FLOATOBJ_GreaterThanLong)
+STUB(FLOATOBJ_LessThan)
+STUB(FLOATOBJ_LessThanLong)
+STUB(FLOATOBJ_Mul)
+STUB(FLOATOBJ_MulFloat)
+STUB(FLOATOBJ_MulFloatObj)
+STUB(FLOATOBJ_MulLong)
+STUB(FLOATOBJ_Neg)
+STUB(FLOATOBJ_SetFloat)
+STUB(FLOATOBJ_SetLong)
+STUB(FLOATOBJ_Sub)
+STUB(FLOATOBJ_SubFloat)
+STUB(FLOATOBJ_SubFloatObj)
+STUB(FLOATOBJ_SubLong)
+STUB(FONTOBJ_cGetAllGlyphHandles)
+STUB(FONTOBJ_cGetGlyphs)
+STUB(FONTOBJ_pifi)
+STUB(FONTOBJ_pvTrueTypeFontFile)
+STUB(FONTOBJ_pxoGetXform)
+STUB(FONTOBJ_vGetInfo)
+STUB(HT_ComputeRGBGammaTable)
+STUB(HT_Get8BPPFormatPalette)
+STUB(PALOBJ_cGetColors)
+STUB(PATHOBJ_bCloseFigure)
+STUB(PATHOBJ_bEnum)
+STUB(PATHOBJ_bEnumClipLines)
+STUB(PATHOBJ_bMoveTo)
+STUB(PATHOBJ_bPolyBezierTo)
+STUB(PATHOBJ_bPolyLineTo)
+STUB(PATHOBJ_vEnumStart)
+STUB(PATHOBJ_vEnumStartClipLines)
+STUB(PATHOBJ_vGetBounds)
+STUB(RtlAnsiCharToUnicodeChar)
+STUB(RtlMultiByteToUnicodeN)
+STUB(RtlRaiseException)
+STUB(RtlUnicodeToMultiByteN)
+STUB(RtlUnicodeToMultiByteSize)
+STUB(RtlUnwind)
+STUB(RtlUpcaseUnicodeChar)
+STUB(RtlUpcaseUnicodeToMultiByteN)
+STUB(STROBJ_bEnum)
+STUB(STROBJ_dwGetCodePage)
+STUB(STROBJ_vEnumStart)
+STUB(WNDOBJ_bEnum)
+STUB(WNDOBJ_cEnumStart)
+STUB(WNDOBJ_vSetConsumer)
+STUB(XFORMOBJ_bApplyXform)
+STUB(XFORMOBJ_iGetFloatObjXform)
+STUB(XFORMOBJ_iGetXform)
+STUB(XLATEOBJ_cGetPalette)
+STUB(XLATEOBJ_iXlate)
+STUB(XLATEOBJ_piVector)
+STUB(_abnormal_termination)
+STUB(_except_handler2)
+STUB(_global_unwind2)
+STUB(_local_unwind2)
+
index ddf9bcb..70c26fa 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: win32k.def,v 1.1 1999/05/20 17:26:02 ea Exp $
+; $Id: win32k.def,v 1.2 1999/05/22 23:55:56 rex Exp $
 ;
 ; win32k.def
 ;
@@ -30,7 +30,8 @@ EngCreatePalette
 EngCreatePath
 EngCreateSemaphore
 EngCreateWnd
-EngDebugBreak = NTOSKRNL.DbgBreakPoint
+; EngDebugBreak = NTOSKRNL.DbgBreakPoint
+EngDebugBreak
 EngDebugPrint
 EngDeleteClip
 EngDeleteDriverObj
@@ -76,7 +77,8 @@ EngMultiByteToUnicodeN
 EngMultiByteToWideChar
 EngPaint
 EngProbeForRead
-EngProbeForReadAndWrite = NTOSKRNL.ProbeForWrite
+; EngProbeForReadAndWrite = NTOSKRNL.ProbeForWrite
+EngProbeForReadAndWrite
 EngQueryLocalTime
 EngQueryPalette
 EngQueryPerformanceCounter
@@ -101,7 +103,8 @@ EngUnlockDriverObj
 EngUnlockSurface
 EngUnmapEvent
 EngUnmapFontFile
-EngUnsecureMem = NTOSKRNL.MmUnsecureVirtualMemory
+; EngUnsecureMem = NTOSKRNL.MmUnsecureVirtualMemory
+EngUnsecureMem
 EngWaitForSingleObject
 EngWideCharToMultiByte
 EngWritePrinter
@@ -150,14 +153,22 @@ PATHOBJ_bPolyLineTo
 PATHOBJ_vEnumStart
 PATHOBJ_vEnumStartClipLines
 PATHOBJ_vGetBounds
-RtlAnsiCharToUnicodeChar = NTOSKRNL.RtlAnsiCharToUnicodeChar
-RtlMultiByteToUnicodeN = NTOSKRNL.RtlMultiByteToUnicodeN
-RtlRaiseException = NTOSKRNL.RtlRaiseException
-RtlUnicodeToMultiByteN = NTOSKRNL.RtlUnicodeToMultiByteN
-RtlUnicodeToMultiByteSize = NTOSKRNL.RtlUnicodeToMultiByteSize
-RtlUnwind = NTOSKRNL.RtlUnwind
-RtlUpcaseUnicodeChar = NTOSKRNL.RtlUpcaseUnicodeChar
-RtlUpcaseUnicodeToMultiByteN = NTOSKRNL.RtlUpcaseUnicodeToMultiByteN
+; RtlAnsiCharToUnicodeChar = NTOSKRNL.RtlAnsiCharToUnicodeChar
+RtlAnsiCharToUnicodeChar
+; RtlMultiByteToUnicodeN = NTOSKRNL.RtlMultiByteToUnicodeN
+RtlMultiByteToUnicodeN
+; RtlRaiseException = NTOSKRNL.RtlRaiseException
+RtlRaiseException
+; RtlUnicodeToMultiByteN = NTOSKRNL.RtlUnicodeToMultiByteN
+RtlUnicodeToMultiByteN
+; RtlUnicodeToMultiByteSize = NTOSKRNL.RtlUnicodeToMultiByteSize
+RtlUnicodeToMultiByteSize
+; RtlUnwind = NTOSKRNL.RtlUnwind
+RtlUnwind
+; RtlUpcaseUnicodeChar = NTOSKRNL.RtlUpcaseUnicodeChar
+RtlUpcaseUnicodeChar
+; RtlUpcaseUnicodeToMultiByteN = NTOSKRNL.RtlUpcaseUnicodeToMultiByteN
+RtlUpcaseUnicodeToMultiByteN
 STROBJ_bEnum
 STROBJ_dwGetCodePage
 STROBJ_vEnumStart
@@ -170,8 +181,12 @@ XFORMOBJ_iGetXform
 XLATEOBJ_cGetPalette
 XLATEOBJ_iXlate
 XLATEOBJ_piVector
-_abnormal_termination = NTOSKRNL._abnormal_termination
-_except_handler2 = NTOSKRNL._except_handler2
-_global_unwind2 = NTOSKRNL._global_unwind2
-_local_unwind2 = NTOSKRNL._local_unwind2
+; _abnormal_termination = NTOSKRNL._abnormal_termination
+_abnormal_termination
+; _except_handler2 = NTOSKRNL._except_handler2
+_except_handler2
+; _global_unwind2 = NTOSKRNL._global_unwind2
+_global_unwind2
+; _local_unwind2 = NTOSKRNL._local_unwind2
+_local_unwind2
 
diff --git a/reactos/subsys/win32k/win32k.rc b/reactos/subsys/win32k/win32k.rc
new file mode 100644 (file)
index 0000000..1659de9
--- /dev/null
@@ -0,0 +1,39 @@
+
+#include "../../include/defines.h"
+#include "../../include/reactos/resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+VS_VERSION_INFO VERSIONINFO
+       FILEVERSION     0,0,1,RES_UINT_FILE_VERSION
+       PRODUCTVERSION  0,0,1,0
+       FILEFLAGSMASK   0x3fL
+#ifdef _DEBUG
+       FILEFLAGS       0x1L
+#else
+       FILEFLAGS       0x0L
+#endif
+       FILEOS          0x40004L
+       FILETYPE        0x2L
+       FILESUBTYPE     0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName",       RES_STR_COMPANY_NAME
+            VALUE "FileDescription",   "W32 GDI KM subsystem\0"
+            VALUE "FileVersion",       "post 0.0.1\0"
+            VALUE "InternalName",      "win32k\0"
+            VALUE "LegalCopyright",    RES_STR_LEGAL_COPYRIGHT
+            VALUE "OriginalFilename",  "win32k.sys\0"
+            VALUE "ProductName",       RES_STR_PRODUCT_NAME
+            VALUE "ProductVersion",    RES_STR_PRODUCT_VERSION
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+