From 6246902fcdc12349caad8a920e65ec6a2001e0b7 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Tue, 23 Oct 2007 19:06:11 +0000 Subject: [PATCH] adding driver export list for dxg.sys, thuse api that being export as driver adding private include file for dxg.sys svn path=/branches/reactx/; revision=29832 --- reactos/drivers/directx/dxg/dxg_driver.h | 97 ++++++++++++++++++++++++ reactos/drivers/directx/dxg/dxg_int.h | 41 ++++++++++ reactos/drivers/directx/dxg/main.c | 8 +- 3 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 reactos/drivers/directx/dxg/dxg_driver.h create mode 100644 reactos/drivers/directx/dxg/dxg_int.h diff --git a/reactos/drivers/directx/dxg/dxg_driver.h b/reactos/drivers/directx/dxg/dxg_driver.h new file mode 100644 index 00000000000..5f523efbce4 --- /dev/null +++ b/reactos/drivers/directx/dxg/dxg_driver.h @@ -0,0 +1,97 @@ + + +DRVFN gaDxgFuncs [] = +{ + {DXG_INDEX_DxDxgGenericThunk, (PFN)DxDxgGenericThunk}, + {DXG_INDEX_DxD3dContextCreate, (PFN)DxD3dContextCreate}, + {DXG_INDEX_DxD3dContextDestroy, (PFN)DxD3dContextDestroy}, + {DXG_INDEX_DxD3dContextDestroyAll, (PFN)DxD3dContextDestroyAll}, + {DXG_INDEX_DxD3dValidateTextureStageState, (PFN)DxD3dValidateTextureStageState}, + {DXG_INDEX_DxD3dDrawPrimitives2, (PFN)DxD3dDrawPrimitives2}, + {DXG_INDEX_DxDdGetDriverState, (PFN)DxDdGetDriverState}, + {DXG_INDEX_DxDdAddAttachedSurface, (PFN)DxDdAddAttachedSurface}, + {DXG_INDEX_DxDdAlphaBlt, (PFN)DxDdAlphaBlt}, + {DXG_INDEX_DxDdAttachSurface, (PFN)DxDdAttachSurface}, + {DXG_INDEX_DxDdBeginMoCompFrame, (PFN)DxDdBeginMoCompFrame}, + {DXG_INDEX_DxDdBlt, (PFN)DxDdBlt}, + {DXG_INDEX_DxDdCanCreateSurface, (PFN)DxDdCanCreateSurface}, + {DXG_INDEX_DxDdCanCreateD3DBuffer, (PFN)DxDdCanCreateD3DBuffer}, + {DXG_INDEX_DxDdColorControl, (PFN)DxDdColorControl}, + {DXG_INDEX_DxDdCreateDirectDrawObject, (PFN)DxDdCreateDirectDrawObject}, + {DXG_INDEX_DxDdCreateD3DBuffer, (PFN)DxDdCreateD3DBuffer}, + {DXG_INDEX_DxDdCreateD3DBuffer2, (PFN)DxDdCreateD3DBuffer}, + {DXG_INDEX_DxDdCreateMoComp, (PFN)DxDdCreateMoComp}, + {DXG_INDEX_DxDdCreateSurfaceObject, (PFN)DxDdCreateSurfaceObject}, + {DXG_INDEX_DxDdDeleteDirectDrawObject, (PFN)DxDdDeleteDirectDrawObject}, + {DXG_INDEX_DxDdDeleteSurfaceObject, (PFN)DxDdDeleteSurfaceObject}, + {DXG_INDEX_DxDdDestroyMoComp, (PFN)DxDdDestroyMoComp}, + {DXG_INDEX_DxDdDestroySurface, (PFN)DxDdDestroySurface}, + {DXG_INDEX_DxDdDestroyD3DBuffer, (PFN)DxDdDestroyD3DBuffer}, + {DXG_INDEX_DxDdEndMoCompFrame, (PFN)DxDdEndMoCompFrame}, + {DXG_INDEX_DxDdFlip, (PFN)DxDdFlip}, + {DXG_INDEX_DxDdFlipToGDISurface, (PFN)DxDdFlipToGDISurface}, + {DXG_INDEX_DxDdGetAvailDriverMemory, (PFN)DxDdGetAvailDriverMemory}, + {DXG_INDEX_DxDdGetBltStatus, (PFN)DxDdGetBltStatus}, + {DXG_INDEX_DxDdGetDC, (PFN)DxDdGetDC}, + {DXG_INDEX_DxDdGetDriverInfo, (PFN)DxDdGetDriverInfo}, + {DXG_INDEX_DxDdGetDxHandle, (PFN)DxDdGetDxHandle}, + {DXG_INDEX_DxDdGetFlipStatus, (PFN)}, + {DXG_INDEX_DxDdGetInternalMoCompInfo, (PFN)}, + {DXG_INDEX_DxDdGetMoCompBuffInfo, (PFN)}, + {DXG_INDEX_DxDdGetMoCompGuids, (PFN)}, + {DXG_INDEX_DxDdGetMoCompFormats, (PFN)}, + {DXG_INDEX_DxDdGetScanLine, (PFN)}, + {DXG_INDEX_DxDdLock, (PFN)}, + {DXG_INDEX_DxDdLockD3D, (PFN)}, + {DXG_INDEX_DxDdQueryDirectDrawObject, (PFN)}, + {DXG_INDEX_DxDdQueryMoCompStatus, (PFN)}, + {DXG_INDEX_DxDdReenableDirectDrawObject, (PFN)}, + {DXG_INDEX_DxDdReleaseDC, (PFN)}, + {DXG_INDEX_DxDdRenderMoComp, (PFN)}, + {DXG_INDEX_DxDdResetVisrgn, (PFN)}, + {DXG_INDEX_DxDdSetColorKey, (PFN)}, + {DXG_INDEX_DxDdSetExclusiveMode, (PFN)}, + {DXG_INDEX_DxDdSetGammaRamp, (PFN)}, + {DXG_INDEX_DxDdCreateSurfaceEx, (PFN)}, + {DXG_INDEX_DxDdSetOverlayPosition, (PFN)}, + {DXG_INDEX_DxDdUnattachSurface, (PFN)}, + {DXG_INDEX_DxDdUnlockD3D, (PFN)DxDdUnlockD3D}, + {DXG_INDEX_DxDdUnlockD3D2, (PFN)DxDdUnlockD3D}, + {DXG_INDEX_DxDdUpdateOverlay, (PFN)DxDdUpdateOverlay}, + {DXG_INDEX_DxDdWaitForVerticalBlank, (PFN)DxDdWaitForVerticalBlank}, + {DXG_INDEX_DxDvpCanCreateVideoPort, (PFN)DxDvpCanCreateVideoPort}, + {DXG_INDEX_DxDvpColorControl, (PFN)DxDvpColorControl}, + {DXG_INDEX_DxDvpCreateVideoPort, (PFN)DxDvpCreateVideoPort}, + {DXG_INDEX_DxDvpDestroyVideoPort, (PFN)DxDvpDestroyVideoPort}, + {DXG_INDEX_DxDvpFlipVideoPort, (PFN)DxDvpFlipVideoPort}, + {DXG_INDEX_DxDvpGetVideoPortBandwidth, (PFN)DxDvpGetVideoPortBandwidth}, + {DXG_INDEX_DxDvpGetVideoPortField, (PFN)DxDvpGetVideoPortField}, + {DXG_INDEX_DxDvpGetVideoPortFlipStatus, (PFN)DxDvpGetVideoPortFlipStatus}, + {DXG_INDEX_DxDvpGetVideoPortInputFormats, (PFN)DxDvpGetVideoPortInputFormats}, + {DXG_INDEX_DxDvpGetVideoPortLine, (PFN)DxDvpGetVideoPortLine}, + {DXG_INDEX_DxDvpGetVideoPortOutputFormats, (PFN)DxDvpGetVideoPortOutputFormats}, + {DXG_INDEX_DxDvpGetVideoPortConnectInfo, (PFN)DxDvpGetVideoPortConnectInfo}, + {DXG_INDEX_DxDvpGetVideoSignalStatus, (PFN)DxDvpGetVideoSignalStatus}, + {DXG_INDEX_DxDvpUpdateVideoPort, (PFN)DxDvpUpdateVideoPort}, + {DXG_INDEX_DxDvpWaitForVideoPortSync, (PFN)DxDvpWaitForVideoPortSync}, + {DXG_INDEX_DxDvpAcquireNotification, (PFN)DxDvpAcquireNotification}, + {DXG_INDEX_DxDvpReleaseNotification, (PFN)DxDvpReleaseNotification}, + {DXG_INDEX_DxDdHeapVidMemAllocAligned, (PFN)DxDdHeapVidMemAllocAligned}, + {DXG_INDEX_DxDdHeapVidMemFree, (PFN)DxDdHeapVidMemFree}, + {DXG_INDEX_DxDdEnableDirectDraw, (PFN)DxDdEnableDirectDraw}, + {DXG_INDEX_DxDdDisableDirectDraw, (PFN)DxDdDisableDirectDraw}, + {DXG_INDEX_DxDdSuspendDirectDraw, (PFN)DxDdSuspendDirectDraw}, + {DXG_INDEX_DxDdResumeDirectDraw, (PFN)DxDdResumeDirectDraw}, + {DXG_INDEX_DxDdDynamicModeChange, (PFN)DxDdDynamicModeChange}, + {DXG_INDEX_DxDdCloseProcess, (PFN)DxDdCloseProcess}, + {DXG_INDEX_DxDdGetDirectDrawBound, (PFN)DxDdGetDirectDrawBound}, + {DXG_INDEX_DxDdEnableDirectDrawRedirection, (PFN)DxDdEnableDirectDrawRedirection}, + {DXG_INDEX_DxDdAllocPrivateUserMem, (PFN)DxDdAllocPrivateUserMem}, + {DXG_INDEX_DxDdFreePrivateUserMem, (PFN)DxDdFreePrivateUserMem}, + {DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface}, + {DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface}, + {DXG_INDEX_DxDdSetAccelLevel, (PFN)DxDdSetAccelLevel}, + {DXG_INDEX_DxDdGetSurfaceLock, (PFN)DxDdGetSurfaceLock}, + {DXG_INDEX_DxDdEnumLockedSurfaceRect, (PFN)DxDdEnumLockedSurfaceRect}, + {DXG_INDEX_DxDdIoctl, (PFN)DxDdIoctl} +}; diff --git a/reactos/drivers/directx/dxg/dxg_int.h b/reactos/drivers/directx/dxg/dxg_int.h new file mode 100644 index 00000000000..a5a0d1fb427 --- /dev/null +++ b/reactos/drivers/directx/dxg/dxg_int.h @@ -0,0 +1,41 @@ + +/* DDK/NDK/SDK Headers */ +#include +#include +#include +#include +#include + +#define WINBASEAPI +#define STARTF_USESIZE 2 +#define STARTF_USEPOSITION 4 +#define INTERNAL_CALL NTAPI + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + + +/* exported functions */ +NTSTATUS DriverEntry(IN PVOID Context1, IN PVOID Context2); +NTSTATUS GsDriverEntry(IN PVOID Context1, IN PVOID Context2); +NTSTATUS DxDdCleanupDxGraphics(); + + +/* Driver list export functions */ + +/* Internel functions */ +BOOL DdHmgDestroy(); + diff --git a/reactos/drivers/directx/dxg/main.c b/reactos/drivers/directx/dxg/main.c index 0a5ba1f0cd3..98756498971 100644 --- a/reactos/drivers/directx/dxg/main.c +++ b/reactos/drivers/directx/dxg/main.c @@ -11,7 +11,7 @@ #include - +#include "dxg_driver.h" ULONG gcMaxDdHmgr = 0; ULONG gcSizeDdHmgr = 0; @@ -22,13 +22,7 @@ VOID *gpDummyPage = NULL; PEPROCESS gpepSession = NULL; PDRVFN gpEngFuncs; - const ULONG gcDxgFuncs = DXG_INDEX_DxDdIoctl + 1; -DRVFN gaDxgFuncs [] = -{ - {0, (PFN) NULL} -}; -