mirror of
https://github.com/reactos/reactos.git
synced 2025-01-07 06:45:24 +00:00
cleanup from old interface and move new info to right header.
it still can not be build. for not all api have been redirect yet svn path=/branches/reactx/; revision=29576
This commit is contained in:
parent
a83c927ea6
commit
399dd8f6e5
8 changed files with 116 additions and 318 deletions
|
@ -3,119 +3,105 @@
|
|||
|
||||
#include <ddrawint.h>
|
||||
#include <ddkernel.h>
|
||||
#include <reactos/drivers/directx/dxg.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* for the driver */
|
||||
PDD_SURFACE_LOCAL lcllist[2];
|
||||
/* From ddraw.c */
|
||||
extern PDRVFN gpDxFuncs;
|
||||
|
||||
DDRAWI_DDRAWSURFACE_LCL lcl;
|
||||
typedef DWORD (NTAPI *PGD_DXGENERICTRUNK)(ULONG_PTR, ULONG_PTR, SIZE_T*, PVOID, SIZE_T*, PVOID);
|
||||
typedef DWORD (NTAPI *PGD_DXDDREENABLEDIRECTDRAWOBJECT)(HANDLE, BOOL);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETDRIVERINFO)(HANDLE, PDD_GETDRIVERINFODATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETAVAILDRIVERMEMORY(HANDLE, PDD_GETAVAILDRIVERMEMORYDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDSETEXCLUSIVEMODE)(HANDLE, PDD_SETEXCLUSIVEMODEDATA);
|
||||
typedef NTSTATUS (NTAPI *PGD_DXDDSTARTUPDXGRAPHICS) (ULONG, PDRVENABLEDATA, ULONG, PDRVENABLEDATA, PULONG, PEPROCESS);
|
||||
typedef NTSTATUS (NTAPI *PGD_DXDDCLEANUPDXGRAPHICS) (VOID);
|
||||
typedef HANDLE (NTAPI *PGD_DDCREATEDIRECTDRAWOBJECT) (HDC hdc);
|
||||
typedef DWORD (NTAPI *PGD_DDGETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DDCOLORCONTROL)(HANDLE hSurface,PDD_COLORCONTROLDATA puColorControlData);
|
||||
typedef HANDLE (NTAPI *PGD_DXDDCREATESURFACEOBJECT)(HANDLE, HANDLE, PDD_SURFACE_LOCAL, PDD_SURFACE_MORE, PDD_SURFACE_GLOBAL, BOOL);
|
||||
typedef BOOL (NTAPI *PGD_DXDDDELETEDIRECTDRAWOBJECT)(HANDLE);
|
||||
typedef BOOL (NTAPI *PGD_DXDDDELETESURFACEOBJECT)(HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DXDDFLIPTOGDISURFACE)(HANDLE, PDD_FLIPTOGDISURFACEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETAVAILDRIVERMEMORY)(HANDLE , PDD_GETAVAILDRIVERMEMORYDATA);
|
||||
typedef BOOL (NTAPI *PGD_DXDDQUERYDIRECTDRAWOBJECT)(HANDLE, DD_HALINFO*, DWORD*, LPD3DNTHAL_CALLBACKS, LPD3DNTHAL_GLOBALDRIVERDATA,
|
||||
PDD_D3DBUFCALLBACKS, LPDDSURFACEDESC, DWORD *, VIDEOMEMORY *, DWORD *, DWORD *);
|
||||
|
||||
DDRAWI_DDRAWSURFACE_GBL gpl;
|
||||
DDRAWI_DDRAWSURFACE_MORE more;
|
||||
|
||||
/* DD_CREATESURFACEDATA CreateSurfaceData */
|
||||
DD_CREATESURFACEDATA CreateSurfaceData;
|
||||
/* From d3d.c */
|
||||
typedef DWORD (NTAPI *PGD_DXDDDESTROYD3DBUFFER)(HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DDCANCREATED3DBUFFER)(HANDLE, PDD_CANCREATESURFACEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDUNLOCKD3D)(HANDLE, PDD_UNLOCKDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDLOCKD3D)(HANDLE, PDD_LOCKDATA);
|
||||
typedef DWORD (NTAPI *PGD_D3DVALIDATETEXTURESTAGESTATE)(LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA);
|
||||
typedef DWORD (NTAPI *PGD_D3DDRAWPRIMITIVES2)(HANDLE, HANDLE, LPD3DNTHAL_DRAWPRIMITIVES2DATA, FLATPTR *, DWORD *, FLATPTR *, DWORD *);
|
||||
typedef DWORD (NTAPI *PGD_DDCREATED3DBUFFER)(HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA , HANDLE *);
|
||||
typedef BOOL (NTAPI *PGD_D3DCONTEXTCREATE)(HANDLE, HANDLE, HANDLE, LPD3DNTHAL_CONTEXTCREATEDATA);
|
||||
typedef DWORD (NTAPI *PGD_D3DCONTEXTDESTROY)(LPD3DNTHAL_CONTEXTDESTROYDATA);
|
||||
typedef DWORD (NTAPI *PGD_D3DCONTEXTDESTROYALL)(LPD3DNTHAL_CONTEXTDESTROYALLDATA);
|
||||
|
||||
/* for win32k stuff */
|
||||
DD_SURFACE_LOCAL Local;
|
||||
DD_SURFACE_MORE More;
|
||||
DD_SURFACE_GLOBAL Global;
|
||||
DDSURFACEDESC desc;
|
||||
/* From dvp.c */
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTFLIPSTATUS)(hDirectDraw, puGetVPortFlipStatusData);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTINPUTFORMATS)(HANDLE, PDD_GETVPORTINPUTFORMATDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTLINE)(HANDLE, PDD_GETVPORTLINEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTOUTPUTFORMATS)(HANDLE, PDD_GETVPORTOUTPUTFORMATDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTCONNECTINFO)(HANDLE, PDD_GETVPORTCONNECTDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOSIGNALSTATUS)(HANDLE, PDD_GETVPORTSIGNALDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPUPDATEVIDEOPORT)(HANDLE, HANDLE*, HANDLE*, PDD_UPDATEVPORTDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPWAITFORVIDEOPORTSYNC)(hVideoPort, puWaitForVPortSyncData);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPACQUIRENOTIFICATION)(HANDLE, HANDLE*, LPDDVIDEOPORTNOTIFY);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPRELEASENOTIFICATION)(HANDLE, HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTFIELD)(HANDLE, PDD_GETVPORTFIELDDATA);
|
||||
|
||||
DD_ATTACHLIST AttachList;
|
||||
DD_ATTACHLIST AttachListFrom;
|
||||
BOOL bComplete;
|
||||
/* From mocomp.c */
|
||||
typedef DWORD (NTAPI *PGD_DDBEGINMOCOMPFRAME)(HANDLE, PDD_BEGINMOCOMPFRAMEDATA);
|
||||
typedef HANDLE (NTAPI *PGD_DXDDCREATEMOCOMP)(HANDLE, PDD_CREATEMOCOMPDATA );
|
||||
typedef DWORD (NTAPI *PGD_DXDDDESTROYMOCOMP)(HANDLE, BOOL);
|
||||
typedef DWORD (NTAPI *PGD_DXDDENDMOCOMPFRAME)(HANDLE, PDD_ENDMOCOMPFRAMEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETINTERNALMOCOMPINFO)(HANDLE, PDD_GETINTERNALMOCOMPDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPBUFFINFO)(HANDLE, PDD_GETMOCOMPCOMPBUFFDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPGUIDS)(HANDLE, PDD_GETMOCOMPGUIDSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPFORMATS)(HANDLE, PDD_GETMOCOMPFORMATSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDQUERYMOCOMPSTATUS)(HANDLE, PDD_QUERYMOCOMPSTATUSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDRENDERMOCOMP)(HANDLE, PDD_RENDERMOCOMPDATA);
|
||||
|
||||
HANDLE hDirectDrawLocal;
|
||||
/* From dd.c */
|
||||
typedef DWORD (NTAPI *PGD_DDCREATESURFACE)(HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA , HANDLE *);
|
||||
typedef DWORD (NTAPI *PGD_DXDDWAITFORVERTICALBLANK)(HANDLE, PDD_WAITFORVERTICALBLANKDATA);
|
||||
typedef DWORD (NTAPI *PGD_DDCANCREATESURFACE)(HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETSCANLINE)(HANDLE, PDD_GETSCANLINEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDCREATESURFACEEX)(HANDLE,HANDLE,DWORD);
|
||||
|
||||
} DD_SURFACE, *PDD_SURFACE;
|
||||
/* From ddsurf.c */
|
||||
typedef DWORD (NTAPI *PGD_DDALPHABLT)(HANDLE, HANDLE, PDD_BLTDATA);
|
||||
typedef BOOL (NTAPI *PGD_DDATTACHSURFACE)(HANDLE, HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DXDDUNATTACHSURFACE)(HANDLE, HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DXDDDESTROYSURFACE)(HANDLE, BOOL);
|
||||
typedef DWORD (NTAPI *PGD_DXDDFLIP)(HANDLE, HANDLE, HANDLE, HANDLE, PDD_FLIPDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDLOCK)(HANDLE, PDD_LOCKDATA, HDC);
|
||||
typedef DWORD (NTAPI *PGD_DXDDUNLOCK(HANDLE, PDD_UNLOCKDATA );
|
||||
typedef DWORD (NTAPI *PGD_DDBLT)(HANDLE, HANDLE, PDD_BLTDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDSETCOLORKEY)(HANDLE, PDD_SETCOLORKEYDATA);
|
||||
typedef DWORD (NTAPI *PGD_DDADDATTACHEDSURFACE)(HANDLE, HANDLE,PDD_ADDATTACHEDSURFACEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETBLTSTATUS)(HANDLE, PDD_GETBLTSTATUSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETFLIPSTATUS)(HANDLE, PDD_GETFLIPSTATUSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDUPDATEOVERLAY)(HANDLE, HANDLE, PDD_UPDATEOVERLAYDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDSETOVERLAYPOSITION)(HANDLE, HANDLE, PDD_SETOVERLAYPOSITIONDATA);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DD_DIRECTDRAW_LOCAL Local;
|
||||
DD_DIRECTDRAW_GLOBAL Global;
|
||||
|
||||
/* Drv callbacks */
|
||||
PGD_GETDIRECTDRAWINFO DrvGetDirectDrawInfo;
|
||||
PGD_DISABLEDIRECTDRAW DrvDisableDirectDraw;
|
||||
PGD_ENABLEDIRECTDRAW EnableDirectDraw;
|
||||
/* Standard macro */
|
||||
#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
|
||||
if (gpDxFuncs) \
|
||||
{ \
|
||||
for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
|
||||
{ \
|
||||
if (gpDxFuncs[i].iFunc == INDEX) \
|
||||
{ \
|
||||
FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/* DD callbacks */
|
||||
DD_CALLBACKS DD;
|
||||
|
||||
/* Surface callbacks */
|
||||
DD_SURFACECALLBACKS Surf;
|
||||
|
||||
/* Palette callbacks */
|
||||
DD_PALETTECALLBACKS Pal;
|
||||
|
||||
/* HAL */
|
||||
DD_HALINFO Hal;
|
||||
|
||||
/* Color Control Callback */
|
||||
DD_COLORCONTROLCALLBACKS Color;
|
||||
|
||||
/* D3DHAL_CALLBACKS */
|
||||
//D3DHAL_CALLBACKS D3dHal;
|
||||
// D3DHAL_CALLBACKS3 D3dHal3;
|
||||
// D3DHAL_D3DEXTENDEDCAPS D3dHal3Ext;
|
||||
|
||||
/* Heap Callback */
|
||||
PDD_GETHEAPALIGNMENTDATA HeapData;
|
||||
|
||||
/* Kernel Callback */
|
||||
DD_KERNELCALLBACKS Kernel;
|
||||
DDKERNELCAPS KernelCaps;
|
||||
|
||||
/* Miscellaneous Callback */
|
||||
DD_MISCELLANEOUSCALLBACKS Misc;
|
||||
|
||||
/* NT-based Callback */
|
||||
PDD_FLIPTOGDISURFACE DdFlipToGDISurface;
|
||||
PDD_FREEDRIVERMEMORY DdFreeDriverMemory;
|
||||
PDD_SETEXCLUSIVEMODE DdSetExclusiveMode;
|
||||
|
||||
/*.Motion Compensation .*/
|
||||
PDD_MOCOMPCB_BEGINFRAME DdMoCompBeginFrame;
|
||||
PDD_MOCOMPCB_CREATE DdMoCompCreate;
|
||||
PDD_MOCOMPCB_DESTROY DdMoCompDestroy;
|
||||
PDD_MOCOMPCB_ENDFRAME DdMoCompEndFrame;
|
||||
PDD_MOCOMPCB_GETCOMPBUFFINFO DdMoCompGetBuffInfo;
|
||||
PDD_MOCOMPCB_GETFORMATS DdMoCompGetFormats;
|
||||
PDD_MOCOMPCB_GETGUIDS DdMoCompGetGuids;
|
||||
PDD_MOCOMPCB_GETINTERNALINFO DdMoCompGetInternalInfo;
|
||||
PDD_MOCOMPCB_QUERYSTATUS DdMoCompQueryStatus;
|
||||
PDD_MOCOMPCB_RENDER DdMoCompRender;
|
||||
|
||||
/* Video Port Callback */
|
||||
PDD_VPORTCB_CANCREATEVIDEOPORT DdVideoPortCanCreate;
|
||||
PDD_VPORTCB_COLORCONTROL DdVideoPortColorControl;
|
||||
PDD_VPORTCB_CREATEVIDEOPORT DdVideoPortCreate;
|
||||
PDD_VPORTCB_DESTROYVPORT DdVideoPortDestroy;
|
||||
PDD_VPORTCB_FLIP DdVideoPortFlip;
|
||||
PDD_VPORTCB_GETBANDWIDTH DdVideoPortGetBandwidth;
|
||||
PDD_VPORTCB_GETVPORTCONNECT DdVideoPortGetConnectInfo;
|
||||
PDD_VPORTCB_GETFIELD DdVideoPortGetField;
|
||||
PDD_VPORTCB_GETFLIPSTATUS DdVideoPortGetFlipStatus;
|
||||
PDD_VPORTCB_GETINPUTFORMATS DdVideoPortGetInputFormats;
|
||||
PDD_VPORTCB_GETLINE DdVideoPortGetLine;
|
||||
PDD_VPORTCB_GETOUTPUTFORMATS DdVideoPortGetOutputFormats;
|
||||
PDD_VPORTCB_GETSIGNALSTATUS DdVideoPortGetSignalStatus;
|
||||
PDD_VPORTCB_UPDATE DdVideoPortUpdate;
|
||||
PDD_VPORTCB_WAITFORSYNC DdVideoPortWaitForSync;
|
||||
/* Notify Callback */
|
||||
//LPDD_NOTIFYCALLBACK NotifyCallback
|
||||
|
||||
/* memory stuff */
|
||||
DWORD dwNumHeaps;
|
||||
PVIDEOMEMORY pvmList;
|
||||
|
||||
DWORD dwNumFourCC;
|
||||
LPDWORD pdwFourCC;
|
||||
|
||||
|
||||
} DD_DIRECTDRAW, *PDD_DIRECTDRAW;
|
||||
|
||||
BOOL INTERNAL_CALL DD_Cleanup(PVOID pDD);
|
||||
BOOL INTERNAL_CALL DDSURF_Cleanup(PVOID pDDSurf);
|
||||
|
|
|
@ -14,43 +14,8 @@
|
|||
*/
|
||||
|
||||
#include <w32k.h>
|
||||
#include <reactos/drivers/directx/dxg.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/********************************************************************************/
|
||||
/* D3D interface from DXG.SYS */
|
||||
/********************************************************************************/
|
||||
|
||||
extern PDRVFN gpDxFuncs;
|
||||
|
||||
typedef DWORD (NTAPI *PGD_DXDDDESTROYD3DBUFFER)(HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DDCANCREATED3DBUFFER)(HANDLE, PDD_CANCREATESURFACEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDUNLOCKD3D)(HANDLE, PDD_UNLOCKDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDLOCKD3D)(HANDLE, PDD_LOCKDATA);
|
||||
typedef DWORD (NTAPI *PGD_D3DVALIDATETEXTURESTAGESTATE)(LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA);
|
||||
typedef DWORD (NTAPI *PGD_D3DDRAWPRIMITIVES2)(HANDLE, HANDLE, LPD3DNTHAL_DRAWPRIMITIVES2DATA, FLATPTR *, DWORD *, FLATPTR *, DWORD *);
|
||||
typedef DWORD (NTAPI *PGD_DDCREATED3DBUFFER)(HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA , HANDLE *);
|
||||
typedef BOOL (NTAPI *PGD_D3DCONTEXTCREATE)(HANDLE, HANDLE, HANDLE, LPD3DNTHAL_CONTEXTCREATEDATA);
|
||||
typedef DWORD (NTAPI *PGD_D3DCONTEXTDESTROY)(LPD3DNTHAL_CONTEXTDESTROYDATA);
|
||||
typedef DWORD (NTAPI *PGD_D3DCONTEXTDESTROYALL)(LPD3DNTHAL_CONTEXTDESTROYALLDATA);
|
||||
|
||||
#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
|
||||
if (gpDxFuncs) \
|
||||
{ \
|
||||
for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
|
||||
{ \
|
||||
if (gpDxFuncs[i].iFunc == INDEX) \
|
||||
{ \
|
||||
FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* NtGdiDdCanCreateD3DBuffer */
|
||||
/************************************************************************/
|
||||
|
|
|
@ -9,34 +9,7 @@
|
|||
*/
|
||||
|
||||
#include <w32k.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <reactos/drivers/directx/dxg.h>
|
||||
|
||||
|
||||
|
||||
extern PDRVFN gpDxFuncs;
|
||||
|
||||
typedef DWORD (NTAPI *PGD_DDCREATESURFACE)(HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA , HANDLE *);
|
||||
typedef DWORD (NTAPI *PGD_DXDDWAITFORVERTICALBLANK)(HANDLE, PDD_WAITFORVERTICALBLANKDATA);
|
||||
typedef DWORD (NTAPI *PGD_DDCANCREATESURFACE)(HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETSCANLINE)(HANDLE, PDD_GETSCANLINEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDCREATESURFACEEX)(HANDLE,HANDLE,DWORD);
|
||||
|
||||
#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
|
||||
if (gpDxFuncs) \
|
||||
{ \
|
||||
for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
|
||||
{ \
|
||||
if (gpDxFuncs[i].iFunc == INDEX) \
|
||||
{ \
|
||||
FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* NtGdiDdCreateSurface */
|
||||
|
@ -168,4 +141,3 @@ NtGdiDdCreateSurfaceEx(HANDLE hDirectDraw,
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,41 +5,12 @@
|
|||
* FILE: subsys/win32k/ntddraw/ddraw.c
|
||||
* PROGRAMER: Magnus olsen (magnus@greatlord.com)
|
||||
* REVISION HISTORY:
|
||||
from 2003 to year 2007
|
||||
* rewrote almost all code Peter did.
|
||||
* only few line are left from him
|
||||
* 19/1-2006 Magnus Olsen
|
||||
*/
|
||||
|
||||
#include <w32k.h>
|
||||
#include <reactos/drivers/directx/dxg.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* swtich this off to get rid of all dx debug msg */
|
||||
#define DX_DEBUG
|
||||
|
||||
|
||||
|
||||
|
||||
typedef DWORD (NTAPI *PGD_DXDDREENABLEDIRECTDRAWOBJECT)(HANDLE, BOOL);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETDRIVERINFO)(HANDLE, PDD_GETDRIVERINFODATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETAVAILDRIVERMEMORY(HANDLE, PDD_GETAVAILDRIVERMEMORYDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDSETEXCLUSIVEMODE)(HANDLE, PDD_SETEXCLUSIVEMODEDATA);
|
||||
typedef NTSTATUS (NTAPI *PGD_DXDDSTARTUPDXGRAPHICS) (ULONG, PDRVENABLEDATA, ULONG, PDRVENABLEDATA, PULONG, PEPROCESS);
|
||||
typedef NTSTATUS (NTAPI *PGD_DXDDCLEANUPDXGRAPHICS) (VOID);
|
||||
typedef HANDLE (NTAPI *PGD_DDCREATEDIRECTDRAWOBJECT) (HDC hdc);
|
||||
typedef DWORD (NTAPI *PGD_DDGETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DDCOLORCONTROL)(HANDLE hSurface,PDD_COLORCONTROLDATA puColorControlData);
|
||||
typedef HANDLE (NTAPI *PGD_DXDDCREATESURFACEOBJECT)(HANDLE, HANDLE, PDD_SURFACE_LOCAL, PDD_SURFACE_MORE, PDD_SURFACE_GLOBAL, BOOL);
|
||||
typedef BOOL (NTAPI *PGD_DXDDDELETEDIRECTDRAWOBJECT)(HANDLE);
|
||||
typedef BOOL (NTAPI *PGD_DXDDDELETESURFACEOBJECT)(HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DXDDFLIPTOGDISURFACE)(HANDLE, PDD_FLIPTOGDISURFACEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETAVAILDRIVERMEMORY)(HANDLE , PDD_GETAVAILDRIVERMEMORYDATA);
|
||||
typedef BOOL (NTAPI *PGD_DXDDQUERYDIRECTDRAWOBJECT)(HANDLE, DD_HALINFO*, DWORD*, LPD3DNTHAL_CALLBACKS, LPD3DNTHAL_GLOBALDRIVERDATA,
|
||||
PDD_D3DBUFCALLBACKS, LPDDSURFACEDESC, DWORD *, VIDEOMEMORY *, DWORD *, DWORD *);
|
||||
|
||||
|
||||
PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics = NULL;
|
||||
PGD_DXDDCLEANUPDXGRAPHICS gpfnCleanupDxGraphics = NULL;
|
||||
|
||||
|
@ -49,21 +20,6 @@ HANDLE ghDxGraphics;
|
|||
ULONG gdwDirectDrawContext;
|
||||
ULONG gcEngFuncs;
|
||||
|
||||
#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
|
||||
if (gpDxFuncs) \
|
||||
{ \
|
||||
for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
|
||||
{ \
|
||||
if (gpDxFuncs[i].iFunc == INDEX) \
|
||||
{ \
|
||||
FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* DirectX graphic/video driver loading and cleanup start here */
|
||||
/************************************************************************/
|
||||
|
@ -204,6 +160,33 @@ NtGdiDdCreateDirectDrawObject(HDC hdc)
|
|||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* NtGdiDxgGenericThunk */
|
||||
/************************************************************************/
|
||||
DWORD
|
||||
STDCALL
|
||||
NtGdiDxgGenericThunk(ULONG_PTR ulIndex,
|
||||
ULONG_PTR ulHandle,
|
||||
SIZE_T *pdwSizeOfPtr1,
|
||||
PVOID pvPtr1,
|
||||
SIZE_T *pdwSizeOfPtr2,
|
||||
PVOID pvPtr2)
|
||||
{
|
||||
PGD_DXGENERICTRUNK pfnDxgGenericThunk = NULL;
|
||||
INT i;
|
||||
|
||||
DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdGetDriverState, pfnDxgGenericThunk);
|
||||
|
||||
if (pfnDdGetDriverState == NULL)
|
||||
{
|
||||
DPRINT1("Warring no pfnDxgGenericThunk");
|
||||
return DDHAL_DRIVER_NOTHANDLED;
|
||||
}
|
||||
|
||||
DPRINT1("Calling on dxg.sys pfnDxgGenericThunk");
|
||||
return pfnDxgGenericThunk(ulIndex, ulHandle, pdwSizeOfPtr1, pvPtr1, pdwSizeOfPtr2, pvPtr2);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* NtGdiDdGetDriverState */
|
||||
/************************************************************************/
|
||||
|
|
|
@ -9,44 +9,8 @@
|
|||
*/
|
||||
|
||||
#include <w32k.h>
|
||||
#include <reactos/drivers/directx/dxg.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
extern PDRVFN gpDxFuncs;
|
||||
|
||||
typedef DWORD (NTAPI *PGD_DDALPHABLT)(HANDLE, HANDLE, PDD_BLTDATA);
|
||||
typedef BOOL (NTAPI *PGD_DDATTACHSURFACE)(HANDLE, HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DXDDUNATTACHSURFACE)(HANDLE, HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DXDDDESTROYSURFACE)(HANDLE, BOOL);
|
||||
typedef DWORD (NTAPI *PGD_DXDDFLIP)(HANDLE, HANDLE, HANDLE, HANDLE, PDD_FLIPDATA);
|
||||
/* Does not exists in win32k or dxg.sys PDD_SURFCB_SETCLIPLIST SetClipList; */
|
||||
typedef DWORD (NTAPI *PGD_DXDDLOCK)(HANDLE, PDD_LOCKDATA, HDC);
|
||||
typedef DWORD (NTAPI *PGD_DXDDUNLOCK(HANDLE, PDD_UNLOCKDATA );
|
||||
typedef DWORD (NTAPI *PGD_DDBLT)(HANDLE, HANDLE, PDD_BLTDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDSETCOLORKEY)(HANDLE, PDD_SETCOLORKEYDATA);
|
||||
typedef DWORD (NTAPI *PGD_DDADDATTACHEDSURFACE)(HANDLE, HANDLE,PDD_ADDATTACHEDSURFACEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETBLTSTATUS)(HANDLE, PDD_GETBLTSTATUSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETFLIPSTATUS)(HANDLE, PDD_GETFLIPSTATUSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDUPDATEOVERLAY)(HANDLE, HANDLE, PDD_UPDATEOVERLAYDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDSETOVERLAYPOSITION)(HANDLE, HANDLE, PDD_SETOVERLAYPOSITIONDATA);
|
||||
/* from MSDN LPVOID reserved4; are not inuse */
|
||||
/* Does not exists in win32k or dxg.sys PDD_SURFCB_SETPALETTE SetPalette */
|
||||
|
||||
#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
|
||||
if (gpDxFuncs) \
|
||||
{ \
|
||||
for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
|
||||
{ \
|
||||
if (gpDxFuncs[i].iFunc == INDEX) \
|
||||
{ \
|
||||
FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* NtGdiDdDestroySurface */
|
||||
/************************************************************************/
|
||||
|
|
|
@ -11,31 +11,12 @@
|
|||
|
||||
|
||||
#include <w32k.h>
|
||||
#include <reactos/drivers/directx/dxg.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/********************************************************************************/
|
||||
/* DVP interface from DXG.SYS */
|
||||
/********************************************************************************/
|
||||
|
||||
extern PDRVFN gpDxFuncs;
|
||||
|
||||
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTFLIPSTATUS)(hDirectDraw, puGetVPortFlipStatusData);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTINPUTFORMATS)(HANDLE, PDD_GETVPORTINPUTFORMATDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTLINE)(HANDLE, PDD_GETVPORTLINEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTOUTPUTFORMATS)(HANDLE, PDD_GETVPORTOUTPUTFORMATDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTCONNECTINFO)(HANDLE, PDD_GETVPORTCONNECTDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOSIGNALSTATUS)(HANDLE, PDD_GETVPORTSIGNALDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPUPDATEVIDEOPORT)(HANDLE, HANDLE*, HANDLE*, PDD_UPDATEVPORTDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPWAITFORVIDEOPORTSYNC)(hVideoPort, puWaitForVPortSyncData);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPACQUIRENOTIFICATION)(HANDLE, HANDLE*, LPDDVIDEOPORTNOTIFY);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPRELEASENOTIFICATION)(HANDLE, HANDLE);
|
||||
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTFIELD)(HANDLE, PDD_GETVPORTFIELDDATA);
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* NtGdiDvpCanCreateVideoPort */
|
||||
|
|
|
@ -10,38 +10,8 @@
|
|||
|
||||
|
||||
#include <w32k.h>
|
||||
#include <reactos/drivers/directx/dxg.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
extern PDRVFN gpDxFuncs;
|
||||
|
||||
#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
|
||||
if (gpDxFuncs) \
|
||||
{ \
|
||||
for (i = 0; i <= DXG_INDEX_DxDdIoctl; i++) \
|
||||
{ \
|
||||
if (gpDxFuncs[i].iFunc == INDEX) \
|
||||
{ \
|
||||
FUNCTION = (VOID *)gpDxFuncs[i].pfn; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
typedef DWORD (NTAPI *PGD_DDBEGINMOCOMPFRAME)(HANDLE, PDD_BEGINMOCOMPFRAMEDATA);
|
||||
typedef HANDLE (NTAPI *PGD_DXDDCREATEMOCOMP)(HANDLE, PDD_CREATEMOCOMPDATA );
|
||||
typedef DWORD (NTAPI *PGD_DXDDDESTROYMOCOMP)(HANDLE, BOOL);
|
||||
typedef DWORD (NTAPI *PGD_DXDDENDMOCOMPFRAME)(HANDLE, PDD_ENDMOCOMPFRAMEDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETINTERNALMOCOMPINFO)(HANDLE, PDD_GETINTERNALMOCOMPDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPBUFFINFO)(HANDLE, PDD_GETMOCOMPCOMPBUFFDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPGUIDS)(HANDLE, PDD_GETMOCOMPGUIDSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDGETMOCOMPFORMATS)(HANDLE, PDD_GETMOCOMPFORMATSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDQUERYMOCOMPSTATUS)(HANDLE, PDD_QUERYMOCOMPSTATUSDATA);
|
||||
typedef DWORD (NTAPI *PGD_DXDDRENDERMOCOMP)(HANDLE, PDD_RENDERMOCOMPDATA);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* NtGdiDdBeginMoCompFrame */
|
||||
/************************************************************************/
|
||||
|
|
|
@ -2059,29 +2059,6 @@ NtGdiConvertMetafileRect(
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
DWORD
|
||||
STDCALL
|
||||
NtGdiDxgGenericThunk(
|
||||
IN ULONG_PTR ulIndex,
|
||||
IN ULONG_PTR ulHandle,
|
||||
IN OUT SIZE_T *pdwSizeOfPtr1,
|
||||
IN OUT PVOID pvPtr1,
|
||||
IN OUT SIZE_T *pdwSizeOfPtr2,
|
||||
IN OUT PVOID pvPtr2)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue