ReactOS  0.4.15-dev-1397-g19779b3
intddraw.h File Reference
Include dependency graph for intddraw.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef BOOL(APIENTRYPGD_DDSETGAMMARAMP) (HANDLE, HDC, LPVOID)
 
typedef BOOL(APIENTRYPGD_DDRELEASEDC) (HANDLE)
 
typedef BOOL(APIENTRYPGD_DDRESTVISRGN) (HANDLE, HWND)
 
typedef HANDLE(APIENTRYPGD_DDGETDXHANDLE) (HANDLE, HANDLE, BOOL)
 
typedef HDC(APIENTRYPGD_DDGETDC) (HANDLE, PALETTEENTRY *)
 
typedef DWORD(APIENTRYPGD_DXDDREENABLEDIRECTDRAWOBJECT) (HANDLE, BOOL *)
 
typedef DWORD(APIENTRYPGD_DXDDGETDRIVERINFO) (HANDLE, PDD_GETDRIVERINFODATA)
 
typedef DWORD(APIENTRYPGD_DXDDSETEXCLUSIVEMODE) (HANDLE, PDD_SETEXCLUSIVEMODEDATA)
 
typedef NTSTATUS(APIENTRYPGD_DXDDSTARTUPDXGRAPHICS) (ULONG, PDRVENABLEDATA, ULONG, PDRVENABLEDATA, PULONG, PEPROCESS)
 
typedef NTSTATUS(APIENTRYPGD_DXDDCLEANUPDXGRAPHICS) (VOID)
 
typedef HANDLE(APIENTRYPGD_DDCREATEDIRECTDRAWOBJECT) (HDC hdc)
 
typedef DWORD(APIENTRYPGD_DDGETDRIVERSTATE) (PDD_GETDRIVERSTATEDATA)
 
typedef DWORD(APIENTRYPGD_DDCOLORCONTROL) (HANDLE hSurface, PDD_COLORCONTROLDATA puColorControlData)
 
typedef HANDLE(APIENTRYPGD_DXDDCREATESURFACEOBJECT) (HANDLE, HANDLE, PDD_SURFACE_LOCAL, PDD_SURFACE_MORE, PDD_SURFACE_GLOBAL, BOOL)
 
typedef BOOL(APIENTRYPGD_DXDDDELETEDIRECTDRAWOBJECT) (HANDLE)
 
typedef BOOL(APIENTRYPGD_DXDDDELETESURFACEOBJECT) (HANDLE)
 
typedef DWORD(APIENTRYPGD_DXDDFLIPTOGDISURFACE) (HANDLE, PDD_FLIPTOGDISURFACEDATA)
 
typedef DWORD(APIENTRYPGD_DXDDGETAVAILDRIVERMEMORY) (HANDLE, PDD_GETAVAILDRIVERMEMORYDATA)
 
typedef BOOL(APIENTRYPGD_DXDDQUERYDIRECTDRAWOBJECT) (HANDLE, DD_HALINFO *, DWORD *, LPD3DNTHAL_CALLBACKS, LPD3DNTHAL_GLOBALDRIVERDATA, PDD_D3DBUFCALLBACKS, LPDDSURFACEDESC, DWORD *, VIDEOMEMORY *, DWORD *, DWORD *)
 
typedef DWORD(APIENTRYPGD_DXDDDESTROYD3DBUFFER) (HANDLE)
 
typedef DWORD(APIENTRYPGD_DDCANCREATED3DBUFFER) (HANDLE, PDD_CANCREATESURFACEDATA)
 
typedef DWORD(APIENTRYPGD_DXDDUNLOCKD3D) (HANDLE, PDD_UNLOCKDATA)
 
typedef DWORD(APIENTRYPGD_DXDDLOCKD3D) (HANDLE, PDD_LOCKDATA)
 
typedef DWORD(APIENTRYPGD_D3DVALIDATETEXTURESTAGESTATE) (LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA)
 
typedef DWORD(APIENTRYPGD_D3DDRAWPRIMITIVES2) (HANDLE, HANDLE, LPD3DNTHAL_DRAWPRIMITIVES2DATA, FLATPTR *, DWORD *, FLATPTR *, DWORD *)
 
typedef DWORD(APIENTRYPGD_DDCREATED3DBUFFER) (HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA, HANDLE *)
 
typedef BOOL(APIENTRYPGD_D3DCONTEXTCREATE) (HANDLE, HANDLE, HANDLE, LPD3DNTHAL_CONTEXTCREATEDATA)
 
typedef DWORD(APIENTRYPGD_D3DCONTEXTDESTROY) (LPD3DNTHAL_CONTEXTDESTROYDATA)
 
typedef DWORD(APIENTRYPGD_D3DCONTEXTDESTROYALL) (LPD3DNTHAL_CONTEXTDESTROYALLDATA)
 
typedef DWORD(APIENTRYPGD_DVPCANCREATEVIDEOPORT) (HANDLE, PDD_CANCREATEVPORTDATA)
 
typedef DWORD(APIENTRYPGD_DVPCOLORCONTROL) (HANDLE, PDD_VPORTCOLORDATA)
 
typedef HANDLE(APIENTRYPGD_DVPCREATEVIDEOPORT) (HANDLE, PDD_CREATEVPORTDATA)
 
typedef DWORD(APIENTRYPGD_DVPDESTROYVIDEOPORT) (HANDLE, PDD_DESTROYVPORTDATA)
 
typedef DWORD(APIENTRYPGD_DVPFLIPVIDEOPORT) (HANDLE, HANDLE, HANDLE, PDD_FLIPVPORTDATA)
 
typedef DWORD(APIENTRYPGD_DVPGETVIDEOPORTBANDWITH) (HANDLE, PDD_GETVPORTBANDWIDTHDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPGETVIDEOPORTFLIPSTATUS) (HANDLE, PDD_GETVPORTFLIPSTATUSDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPGETVIDEOPORTINPUTFORMATS) (HANDLE, PDD_GETVPORTINPUTFORMATDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPGETVIDEOPORTLINE) (HANDLE, PDD_GETVPORTLINEDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPGETVIDEOPORTOUTPUTFORMATS) (HANDLE, PDD_GETVPORTOUTPUTFORMATDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPGETVIDEOPORTCONNECTINFO) (HANDLE, PDD_GETVPORTCONNECTDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPGETVIDEOSIGNALSTATUS) (HANDLE, PDD_GETVPORTSIGNALDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPUPDATEVIDEOPORT) (HANDLE, HANDLE *, HANDLE *, PDD_UPDATEVPORTDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPWAITFORVIDEOPORTSYNC) (HANDLE, PDD_WAITFORVPORTSYNCDATA)
 
typedef DWORD(APIENTRYPGD_DXDVPACQUIRENOTIFICATION) (HANDLE, HANDLE *, LPDDVIDEOPORTNOTIFY)
 
typedef DWORD(APIENTRYPGD_DXDVPRELEASENOTIFICATION) (HANDLE, HANDLE)
 
typedef DWORD(APIENTRYPGD_DXDVPGETVIDEOPORTFIELD) (HANDLE, PDD_GETVPORTFIELDDATA)
 
typedef DWORD(APIENTRYPGD_DDBEGINMOCOMPFRAME) (HANDLE, PDD_BEGINMOCOMPFRAMEDATA)
 
typedef HANDLE(APIENTRYPGD_DXDDCREATEMOCOMP) (HANDLE, PDD_CREATEMOCOMPDATA)
 
typedef DWORD(APIENTRYPGD_DXDDDESTROYMOCOMP) (HANDLE, PDD_DESTROYMOCOMPDATA)
 
typedef DWORD(APIENTRYPGD_DXDDENDMOCOMPFRAME) (HANDLE, PDD_ENDMOCOMPFRAMEDATA)
 
typedef DWORD(APIENTRYPGD_DXDDGETINTERNALMOCOMPINFO) (HANDLE, PDD_GETINTERNALMOCOMPDATA)
 
typedef DWORD(APIENTRYPGD_DXDDGETMOCOMPBUFFINFO) (HANDLE, PDD_GETMOCOMPCOMPBUFFDATA)
 
typedef DWORD(APIENTRYPGD_DXDDGETMOCOMPGUIDS) (HANDLE, PDD_GETMOCOMPGUIDSDATA)
 
typedef DWORD(APIENTRYPGD_DXDDGETMOCOMPFORMATS) (HANDLE, PDD_GETMOCOMPFORMATSDATA)
 
typedef DWORD(APIENTRYPGD_DXDDQUERYMOCOMPSTATUS) (HANDLE, PDD_QUERYMOCOMPSTATUSDATA)
 
typedef DWORD(APIENTRYPGD_DXDDRENDERMOCOMP) (HANDLE, PDD_RENDERMOCOMPDATA)
 
typedef DWORD(APIENTRYPGD_DDCREATESURFACE) (HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA, HANDLE *)
 
typedef DWORD(APIENTRYPGD_DXDDWAITFORVERTICALBLANK) (HANDLE, PDD_WAITFORVERTICALBLANKDATA)
 
typedef DWORD(APIENTRYPGD_DDCANCREATESURFACE) (HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
 
typedef DWORD(APIENTRYPGD_DXDDGETSCANLINE) (HANDLE, PDD_GETSCANLINEDATA)
 
typedef DWORD(APIENTRYPGD_DXDDCREATESURFACEEX) (HANDLE, HANDLE, DWORD)
 
typedef DWORD(APIENTRYPGD_DDALPHABLT) (HANDLE, HANDLE, PDD_BLTDATA)
 
typedef BOOL(APIENTRYPGD_DDATTACHSURFACE) (HANDLE, HANDLE)
 
typedef DWORD(APIENTRYPGD_DXDDUNATTACHSURFACE) (HANDLE, HANDLE)
 
typedef DWORD(APIENTRYPGD_DXDDDESTROYSURFACE) (HANDLE, BOOL)
 
typedef DWORD(APIENTRYPGD_DXDDFLIP) (HANDLE, HANDLE, HANDLE, HANDLE, PDD_FLIPDATA)
 
typedef DWORD(APIENTRYPGD_DXDDLOCK) (HANDLE, PDD_LOCKDATA, HDC)
 
typedef DWORD(APIENTRYPGD_DXDDUNLOCK) (HANDLE, PDD_UNLOCKDATA)
 
typedef DWORD(APIENTRYPGD_DDBLT) (HANDLE, HANDLE, PDD_BLTDATA)
 
typedef DWORD(APIENTRYPGD_DXDDSETCOLORKEY) (HANDLE, PDD_SETCOLORKEYDATA)
 
typedef DWORD(APIENTRYPGD_DDADDATTACHEDSURFACE) (HANDLE, HANDLE, PDD_ADDATTACHEDSURFACEDATA)
 
typedef DWORD(APIENTRYPGD_DXDDGETBLTSTATUS) (HANDLE, PDD_GETBLTSTATUSDATA)
 
typedef DWORD(APIENTRYPGD_DXDDGETFLIPSTATUS) (HANDLE, PDD_GETFLIPSTATUSDATA)
 
typedef DWORD(APIENTRYPGD_DXDDUPDATEOVERLAY) (HANDLE, HANDLE, PDD_UPDATEOVERLAYDATA)
 
typedef DWORD(APIENTRYPGD_DXDDSETOVERLAYPOSITION) (HANDLE, HANDLE, PDD_SETOVERLAYPOSITIONDATA)
 
typedef FLATPTR(APIENTRYPGD_HEAPVIDMEMALLOCALIGNED) (LPVIDMEM, DWORD, DWORD, LPSURFACEALIGNMENT, LPLONG)
 
typedef VOID(APIENTRYPGD_VIDMEMFREE) (LPVMEMHEAP, FLATPTR)
 
typedef PVOID(APIENTRYPGD_ENGALLOCPRIVATEUSERMEM) (PDD_SURFACE_LOCAL, SIZE_T, ULONG)
 
typedef VOID(APIENTRYPGD_ENGFREEPRIVATEUSERMEM) (PDD_SURFACE_LOCAL, PVOID)
 
typedef PDD_SURFACE_LOCAL(APIENTRYPGD_ENGLOCKDIRECTDRAWSURFACE) (HANDLE)
 
typedef BOOL(APIENTRYPGD_ENGUNLOCKDIRECTDRAWSURFACE) (PDD_SURFACE_LOCAL)
 

Functions

BOOL intEnableReactXDriver (HDC)
 
NTSTATUS APIENTRY DxDdStartupDxGraphics (ULONG, PDRVENABLEDATA, ULONG, PDRVENABLEDATA, PULONG, PEPROCESS)
 
BOOL FASTCALL IntGetDeviceGammaRamp (HDEV hPDev, PGAMMARAMP Ramp)
 
BOOL FASTCALL IntSetDeviceGammaRamp (HDEV hPDev, PGAMMARAMP Ramp, BOOL)
 

Variables

DRVFN gpDxFuncs []
 

Typedef Documentation

◆ PGD_D3DCONTEXTCREATE

typedef BOOL(APIENTRY * PGD_D3DCONTEXTCREATE) (HANDLE, HANDLE, HANDLE, LPD3DNTHAL_CONTEXTCREATEDATA)

Definition at line 45 of file intddraw.h.

◆ PGD_D3DCONTEXTDESTROY

typedef DWORD(APIENTRY * PGD_D3DCONTEXTDESTROY) (LPD3DNTHAL_CONTEXTDESTROYDATA)

Definition at line 46 of file intddraw.h.

◆ PGD_D3DCONTEXTDESTROYALL

typedef DWORD(APIENTRY * PGD_D3DCONTEXTDESTROYALL) (LPD3DNTHAL_CONTEXTDESTROYALLDATA)

Definition at line 47 of file intddraw.h.

◆ PGD_D3DDRAWPRIMITIVES2

typedef DWORD(APIENTRY * PGD_D3DDRAWPRIMITIVES2) (HANDLE, HANDLE, LPD3DNTHAL_DRAWPRIMITIVES2DATA, FLATPTR *, DWORD *, FLATPTR *, DWORD *)

Definition at line 43 of file intddraw.h.

◆ PGD_D3DVALIDATETEXTURESTAGESTATE

typedef DWORD(APIENTRY * PGD_D3DVALIDATETEXTURESTAGESTATE) (LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA)

Definition at line 42 of file intddraw.h.

◆ PGD_DDADDATTACHEDSURFACE

typedef DWORD(APIENTRY * PGD_DDADDATTACHEDSURFACE) (HANDLE, HANDLE, PDD_ADDATTACHEDSURFACEDATA)

Definition at line 97 of file intddraw.h.

◆ PGD_DDALPHABLT

typedef DWORD(APIENTRY * PGD_DDALPHABLT) (HANDLE, HANDLE, PDD_BLTDATA)

Definition at line 88 of file intddraw.h.

◆ PGD_DDATTACHSURFACE

typedef BOOL(APIENTRY * PGD_DDATTACHSURFACE) (HANDLE, HANDLE)

Definition at line 89 of file intddraw.h.

◆ PGD_DDBEGINMOCOMPFRAME

typedef DWORD(APIENTRY * PGD_DDBEGINMOCOMPFRAME) (HANDLE, PDD_BEGINMOCOMPFRAMEDATA)

Definition at line 69 of file intddraw.h.

◆ PGD_DDBLT

typedef DWORD(APIENTRY * PGD_DDBLT) (HANDLE, HANDLE, PDD_BLTDATA)

Definition at line 95 of file intddraw.h.

◆ PGD_DDCANCREATED3DBUFFER

typedef DWORD(APIENTRY * PGD_DDCANCREATED3DBUFFER) (HANDLE, PDD_CANCREATESURFACEDATA)

Definition at line 39 of file intddraw.h.

◆ PGD_DDCANCREATESURFACE

typedef DWORD(APIENTRY * PGD_DDCANCREATESURFACE) (HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)

Definition at line 83 of file intddraw.h.

◆ PGD_DDCOLORCONTROL

typedef DWORD(APIENTRY * PGD_DDCOLORCONTROL) (HANDLE hSurface, PDD_COLORCONTROLDATA puColorControlData)

Definition at line 27 of file intddraw.h.

◆ PGD_DDCREATED3DBUFFER

Definition at line 44 of file intddraw.h.

◆ PGD_DDCREATEDIRECTDRAWOBJECT

typedef HANDLE(APIENTRY * PGD_DDCREATEDIRECTDRAWOBJECT) (HDC hdc)

Definition at line 25 of file intddraw.h.

◆ PGD_DDCREATESURFACE

Definition at line 81 of file intddraw.h.

◆ PGD_DDGETDC

typedef HDC(APIENTRY * PGD_DDGETDC) (HANDLE, PALETTEENTRY *)

Definition at line 19 of file intddraw.h.

◆ PGD_DDGETDRIVERSTATE

typedef DWORD(APIENTRY * PGD_DDGETDRIVERSTATE) (PDD_GETDRIVERSTATEDATA)

Definition at line 26 of file intddraw.h.

◆ PGD_DDGETDXHANDLE

typedef HANDLE(APIENTRY* PGD_DDGETDXHANDLE) (HANDLE, HANDLE, BOOL)

Definition at line 18 of file intddraw.h.

◆ PGD_DDRELEASEDC

typedef BOOL(APIENTRY* PGD_DDRELEASEDC) (HANDLE)

Definition at line 16 of file intddraw.h.

◆ PGD_DDRESTVISRGN

typedef BOOL(APIENTRY* PGD_DDRESTVISRGN) (HANDLE, HWND)

Definition at line 17 of file intddraw.h.

◆ PGD_DDSETGAMMARAMP

typedef BOOL(APIENTRY* PGD_DDSETGAMMARAMP) (HANDLE, HDC, LPVOID)

Definition at line 15 of file intddraw.h.

◆ PGD_DVPCANCREATEVIDEOPORT

typedef DWORD(APIENTRY* PGD_DVPCANCREATEVIDEOPORT) (HANDLE, PDD_CANCREATEVPORTDATA)

Definition at line 50 of file intddraw.h.

◆ PGD_DVPCOLORCONTROL

typedef DWORD(APIENTRY* PGD_DVPCOLORCONTROL) (HANDLE, PDD_VPORTCOLORDATA)

Definition at line 51 of file intddraw.h.

◆ PGD_DVPCREATEVIDEOPORT

typedef HANDLE(APIENTRY* PGD_DVPCREATEVIDEOPORT) (HANDLE, PDD_CREATEVPORTDATA)

Definition at line 52 of file intddraw.h.

◆ PGD_DVPDESTROYVIDEOPORT

typedef DWORD(APIENTRY* PGD_DVPDESTROYVIDEOPORT) (HANDLE, PDD_DESTROYVPORTDATA)

Definition at line 53 of file intddraw.h.

◆ PGD_DVPFLIPVIDEOPORT

typedef DWORD(APIENTRY* PGD_DVPFLIPVIDEOPORT) (HANDLE, HANDLE, HANDLE, PDD_FLIPVPORTDATA)

Definition at line 54 of file intddraw.h.

◆ PGD_DVPGETVIDEOPORTBANDWITH

typedef DWORD(APIENTRY* PGD_DVPGETVIDEOPORTBANDWITH) (HANDLE, PDD_GETVPORTBANDWIDTHDATA)

Definition at line 55 of file intddraw.h.

◆ PGD_DXDDCLEANUPDXGRAPHICS

typedef NTSTATUS(APIENTRY * PGD_DXDDCLEANUPDXGRAPHICS) (VOID)

Definition at line 24 of file intddraw.h.

◆ PGD_DXDDCREATEMOCOMP

typedef HANDLE(APIENTRY * PGD_DXDDCREATEMOCOMP) (HANDLE, PDD_CREATEMOCOMPDATA)

Definition at line 70 of file intddraw.h.

◆ PGD_DXDDCREATESURFACEEX

typedef DWORD(APIENTRY * PGD_DXDDCREATESURFACEEX) (HANDLE, HANDLE, DWORD)

Definition at line 85 of file intddraw.h.

◆ PGD_DXDDCREATESURFACEOBJECT

typedef HANDLE(APIENTRY * PGD_DXDDCREATESURFACEOBJECT) (HANDLE, HANDLE, PDD_SURFACE_LOCAL, PDD_SURFACE_MORE, PDD_SURFACE_GLOBAL, BOOL)

Definition at line 28 of file intddraw.h.

◆ PGD_DXDDDELETEDIRECTDRAWOBJECT

typedef BOOL(APIENTRY * PGD_DXDDDELETEDIRECTDRAWOBJECT) (HANDLE)

Definition at line 29 of file intddraw.h.

◆ PGD_DXDDDELETESURFACEOBJECT

typedef BOOL(APIENTRY * PGD_DXDDDELETESURFACEOBJECT) (HANDLE)

Definition at line 30 of file intddraw.h.

◆ PGD_DXDDDESTROYD3DBUFFER

typedef DWORD(APIENTRY * PGD_DXDDDESTROYD3DBUFFER) (HANDLE)

Definition at line 38 of file intddraw.h.

◆ PGD_DXDDDESTROYMOCOMP

typedef DWORD(APIENTRY * PGD_DXDDDESTROYMOCOMP) (HANDLE, PDD_DESTROYMOCOMPDATA)

Definition at line 71 of file intddraw.h.

◆ PGD_DXDDDESTROYSURFACE

typedef DWORD(APIENTRY * PGD_DXDDDESTROYSURFACE) (HANDLE, BOOL)

Definition at line 91 of file intddraw.h.

◆ PGD_DXDDENDMOCOMPFRAME

typedef DWORD(APIENTRY * PGD_DXDDENDMOCOMPFRAME) (HANDLE, PDD_ENDMOCOMPFRAMEDATA)

Definition at line 72 of file intddraw.h.

◆ PGD_DXDDFLIP

typedef DWORD(APIENTRY * PGD_DXDDFLIP) (HANDLE, HANDLE, HANDLE, HANDLE, PDD_FLIPDATA)

Definition at line 92 of file intddraw.h.

◆ PGD_DXDDFLIPTOGDISURFACE

typedef DWORD(APIENTRY * PGD_DXDDFLIPTOGDISURFACE) (HANDLE, PDD_FLIPTOGDISURFACEDATA)

Definition at line 31 of file intddraw.h.

◆ PGD_DXDDGETAVAILDRIVERMEMORY

typedef DWORD(APIENTRY * PGD_DXDDGETAVAILDRIVERMEMORY) (HANDLE, PDD_GETAVAILDRIVERMEMORYDATA)

Definition at line 32 of file intddraw.h.

◆ PGD_DXDDGETBLTSTATUS

typedef DWORD(APIENTRY * PGD_DXDDGETBLTSTATUS) (HANDLE, PDD_GETBLTSTATUSDATA)

Definition at line 98 of file intddraw.h.

◆ PGD_DXDDGETDRIVERINFO

typedef DWORD(APIENTRY * PGD_DXDDGETDRIVERINFO) (HANDLE, PDD_GETDRIVERINFODATA)

Definition at line 21 of file intddraw.h.

◆ PGD_DXDDGETFLIPSTATUS

typedef DWORD(APIENTRY * PGD_DXDDGETFLIPSTATUS) (HANDLE, PDD_GETFLIPSTATUSDATA)

Definition at line 99 of file intddraw.h.

◆ PGD_DXDDGETINTERNALMOCOMPINFO

typedef DWORD(APIENTRY * PGD_DXDDGETINTERNALMOCOMPINFO) (HANDLE, PDD_GETINTERNALMOCOMPDATA)

Definition at line 73 of file intddraw.h.

◆ PGD_DXDDGETMOCOMPBUFFINFO

typedef DWORD(APIENTRY * PGD_DXDDGETMOCOMPBUFFINFO) (HANDLE, PDD_GETMOCOMPCOMPBUFFDATA)

Definition at line 74 of file intddraw.h.

◆ PGD_DXDDGETMOCOMPFORMATS

typedef DWORD(APIENTRY * PGD_DXDDGETMOCOMPFORMATS) (HANDLE, PDD_GETMOCOMPFORMATSDATA)

Definition at line 76 of file intddraw.h.

◆ PGD_DXDDGETMOCOMPGUIDS

typedef DWORD(APIENTRY * PGD_DXDDGETMOCOMPGUIDS) (HANDLE, PDD_GETMOCOMPGUIDSDATA)

Definition at line 75 of file intddraw.h.

◆ PGD_DXDDGETSCANLINE

typedef DWORD(APIENTRY * PGD_DXDDGETSCANLINE) (HANDLE, PDD_GETSCANLINEDATA)

Definition at line 84 of file intddraw.h.

◆ PGD_DXDDLOCK

typedef DWORD(APIENTRY * PGD_DXDDLOCK) (HANDLE, PDD_LOCKDATA, HDC)

Definition at line 93 of file intddraw.h.

◆ PGD_DXDDLOCKD3D

typedef DWORD(APIENTRY * PGD_DXDDLOCKD3D) (HANDLE, PDD_LOCKDATA)

Definition at line 41 of file intddraw.h.

◆ PGD_DXDDQUERYDIRECTDRAWOBJECT

Definition at line 33 of file intddraw.h.

◆ PGD_DXDDQUERYMOCOMPSTATUS

typedef DWORD(APIENTRY * PGD_DXDDQUERYMOCOMPSTATUS) (HANDLE, PDD_QUERYMOCOMPSTATUSDATA)

Definition at line 77 of file intddraw.h.

◆ PGD_DXDDREENABLEDIRECTDRAWOBJECT

typedef DWORD(APIENTRY * PGD_DXDDREENABLEDIRECTDRAWOBJECT) (HANDLE, BOOL *)

Definition at line 20 of file intddraw.h.

◆ PGD_DXDDRENDERMOCOMP

typedef DWORD(APIENTRY * PGD_DXDDRENDERMOCOMP) (HANDLE, PDD_RENDERMOCOMPDATA)

Definition at line 78 of file intddraw.h.

◆ PGD_DXDDSETCOLORKEY

typedef DWORD(APIENTRY * PGD_DXDDSETCOLORKEY) (HANDLE, PDD_SETCOLORKEYDATA)

Definition at line 96 of file intddraw.h.

◆ PGD_DXDDSETEXCLUSIVEMODE

typedef DWORD(APIENTRY * PGD_DXDDSETEXCLUSIVEMODE) (HANDLE, PDD_SETEXCLUSIVEMODEDATA)

Definition at line 22 of file intddraw.h.

◆ PGD_DXDDSETOVERLAYPOSITION

typedef DWORD(APIENTRY * PGD_DXDDSETOVERLAYPOSITION) (HANDLE, HANDLE, PDD_SETOVERLAYPOSITIONDATA)

Definition at line 101 of file intddraw.h.

◆ PGD_DXDDSTARTUPDXGRAPHICS

typedef NTSTATUS(APIENTRY * PGD_DXDDSTARTUPDXGRAPHICS) (ULONG, PDRVENABLEDATA, ULONG, PDRVENABLEDATA, PULONG, PEPROCESS)

Definition at line 23 of file intddraw.h.

◆ PGD_DXDDUNATTACHSURFACE

typedef DWORD(APIENTRY * PGD_DXDDUNATTACHSURFACE) (HANDLE, HANDLE)

Definition at line 90 of file intddraw.h.

◆ PGD_DXDDUNLOCK

typedef DWORD(APIENTRY * PGD_DXDDUNLOCK) (HANDLE, PDD_UNLOCKDATA)

Definition at line 94 of file intddraw.h.

◆ PGD_DXDDUNLOCKD3D

typedef DWORD(APIENTRY * PGD_DXDDUNLOCKD3D) (HANDLE, PDD_UNLOCKDATA)

Definition at line 40 of file intddraw.h.

◆ PGD_DXDDUPDATEOVERLAY

typedef DWORD(APIENTRY * PGD_DXDDUPDATEOVERLAY) (HANDLE, HANDLE, PDD_UPDATEOVERLAYDATA)

Definition at line 100 of file intddraw.h.

◆ PGD_DXDDWAITFORVERTICALBLANK

typedef DWORD(APIENTRY * PGD_DXDDWAITFORVERTICALBLANK) (HANDLE, PDD_WAITFORVERTICALBLANKDATA)

Definition at line 82 of file intddraw.h.

◆ PGD_DXDVPACQUIRENOTIFICATION

typedef DWORD(APIENTRY * PGD_DXDVPACQUIRENOTIFICATION) (HANDLE, HANDLE *, LPDDVIDEOPORTNOTIFY)

Definition at line 64 of file intddraw.h.

◆ PGD_DXDVPGETVIDEOPORTCONNECTINFO

typedef DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTCONNECTINFO) (HANDLE, PDD_GETVPORTCONNECTDATA)

Definition at line 60 of file intddraw.h.

◆ PGD_DXDVPGETVIDEOPORTFIELD

typedef DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTFIELD) (HANDLE, PDD_GETVPORTFIELDDATA)

Definition at line 66 of file intddraw.h.

◆ PGD_DXDVPGETVIDEOPORTFLIPSTATUS

typedef DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTFLIPSTATUS) (HANDLE, PDD_GETVPORTFLIPSTATUSDATA)

Definition at line 56 of file intddraw.h.

◆ PGD_DXDVPGETVIDEOPORTINPUTFORMATS

typedef DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTINPUTFORMATS) (HANDLE, PDD_GETVPORTINPUTFORMATDATA)

Definition at line 57 of file intddraw.h.

◆ PGD_DXDVPGETVIDEOPORTLINE

typedef DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTLINE) (HANDLE, PDD_GETVPORTLINEDATA)

Definition at line 58 of file intddraw.h.

◆ PGD_DXDVPGETVIDEOPORTOUTPUTFORMATS

typedef DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTOUTPUTFORMATS) (HANDLE, PDD_GETVPORTOUTPUTFORMATDATA)

Definition at line 59 of file intddraw.h.

◆ PGD_DXDVPGETVIDEOSIGNALSTATUS

typedef DWORD(APIENTRY * PGD_DXDVPGETVIDEOSIGNALSTATUS) (HANDLE, PDD_GETVPORTSIGNALDATA)

Definition at line 61 of file intddraw.h.

◆ PGD_DXDVPRELEASENOTIFICATION

typedef DWORD(APIENTRY * PGD_DXDVPRELEASENOTIFICATION) (HANDLE, HANDLE)

Definition at line 65 of file intddraw.h.

◆ PGD_DXDVPUPDATEVIDEOPORT

typedef DWORD(APIENTRY * PGD_DXDVPUPDATEVIDEOPORT) (HANDLE, HANDLE *, HANDLE *, PDD_UPDATEVPORTDATA)

Definition at line 62 of file intddraw.h.

◆ PGD_DXDVPWAITFORVIDEOPORTSYNC

typedef DWORD(APIENTRY * PGD_DXDVPWAITFORVIDEOPORTSYNC) (HANDLE, PDD_WAITFORVPORTSYNCDATA)

Definition at line 63 of file intddraw.h.

◆ PGD_ENGALLOCPRIVATEUSERMEM

typedef PVOID(APIENTRY * PGD_ENGALLOCPRIVATEUSERMEM) (PDD_SURFACE_LOCAL, SIZE_T, ULONG)

Definition at line 106 of file intddraw.h.

◆ PGD_ENGFREEPRIVATEUSERMEM

typedef VOID(APIENTRY * PGD_ENGFREEPRIVATEUSERMEM) (PDD_SURFACE_LOCAL, PVOID)

Definition at line 107 of file intddraw.h.

◆ PGD_ENGLOCKDIRECTDRAWSURFACE

typedef PDD_SURFACE_LOCAL(APIENTRY * PGD_ENGLOCKDIRECTDRAWSURFACE) (HANDLE)

Definition at line 108 of file intddraw.h.

◆ PGD_ENGUNLOCKDIRECTDRAWSURFACE

typedef BOOL(APIENTRY * PGD_ENGUNLOCKDIRECTDRAWSURFACE) (PDD_SURFACE_LOCAL)

Definition at line 109 of file intddraw.h.

◆ PGD_HEAPVIDMEMALLOCALIGNED

typedef FLATPTR(APIENTRY * PGD_HEAPVIDMEMALLOCALIGNED) (LPVIDMEM, DWORD, DWORD, LPSURFACEALIGNMENT, LPLONG)

Definition at line 104 of file intddraw.h.

◆ PGD_VIDMEMFREE

typedef VOID(APIENTRY * PGD_VIDMEMFREE) (LPVMEMHEAP, FLATPTR)

Definition at line 105 of file intddraw.h.

Function Documentation

◆ DxDdStartupDxGraphics()

NTSTATUS APIENTRY DxDdStartupDxGraphics ( ULONG  ,
PDRVENABLEDATA  ,
ULONG  ,
PDRVENABLEDATA  ,
PULONG  ,
PEPROCESS   
)

Definition at line 34 of file main.c.

40 {
41 
42  PDRVFN drv_func;
43  PFN *peng_funcs;
44  UINT i;
45 
46  /* Test see if the data is vaild we got from win32k.sys */
47  if ((SizeEngDrv != sizeof(DRVENABLEDATA)) ||
48  (SizeDxgDrv != sizeof(DRVENABLEDATA)))
49  {
51  }
52 
53  /* rest static value */
54  gpDummyPage = NULL;
57 
58  /*
59  * Setup internal driver functions list we got from dxg driver functions list
60  */
61  pDxgDrv->iDriverVersion = 0x80000; /* Note 12/1-2004 : DirectX 8 ? */
62  pDxgDrv->c = gcDxgFuncs;
63  pDxgDrv->pdrvfn = gaDxgFuncs;
64 
65  /* check how many driver functions and fail if the value does not match */
66  if (pDxEngDrv->c != DXENG_INDEX_DxEngLoadImage + 1)
67  {
68  return STATUS_INTERNAL_ERROR;
69  }
70 
71  /*
72  * Check if all drv functions are sorted right
73  * and if it really are exported
74  */
75 
76  peng_funcs = (PFN*)&gpEngFuncs;
77 
78  for (i = 1; i < DXENG_INDEX_DxEngLoadImage + 1; i++)
79  {
80  drv_func = &pDxEngDrv->pdrvfn[i];
81 
82  if ((drv_func->iFunc != i) ||
83  (drv_func->pfn == NULL))
84  {
85  return STATUS_INTERNAL_ERROR;
86  }
87 
88  peng_funcs[i] = drv_func->pfn;
89  }
90 
91  /* Note 12/1-2004 : Why is this set to 0x618 */
92  *DirectDrawContext = 0x618;
93 
94  if (DdHmgCreate())
95  {
97 
98  if (ghsemDummyPage)
99  {
100  gpepSession = Proc;
101  return STATUS_SUCCESS;
102  }
103  }
104 
105  DdHmgDestroy();
106 
107  if (ghsemDummyPage)
108  {
110  ghsemDummyPage = 0;
111  }
112 
113  return STATUS_NO_MEMORY;
114 }
ULONG iFunc
Definition: winddi.h:530
const ULONG gcDxgFuncs
Definition: main.c:22
DRVFN gaDxgFuncs[]
Definition: dxg_driver.h:778
HSEMAPHORE ghsemDummyPage
Definition: main.c:15
LONG gcDummyPageRefCnt
Definition: main.c:14
BOOL FASTCALL DdHmgDestroy(VOID)
Definition: ddhmg.c:95
_Requires_lock_not_held_ hsem ENGAPI VOID APIENTRY EngDeleteSemaphore(_Inout_ __drv_freesMem(Mem) HSEMAPHORE hsem)
Definition: semaphor.c:106
#define DXENG_INDEX_DxEngLoadImage
Definition: dxeng.h:48
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
PFN pfn
Definition: winddi.h:531
#define STATUS_INTERNAL_ERROR
Definition: ntstatus.h:465
BOOL FASTCALL DdHmgCreate(VOID)
Definition: ddhmg.c:49
VOID * gpDummyPage
Definition: main.c:16
PEPROCESS gpepSession
Definition: main.c:17
BOOLEAN(* PFN)(PARGS)
Definition: parse.h:47
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
HSEMAPHORE WINAPI EngCreateSemaphore(VOID)
Definition: eng.c:75
#define STATUS_SUCCESS
Definition: shellext.h:65
DXENG_FUNCTIONS gpEngFuncs
Definition: main.c:20
Definition: winddi.h:529

Referenced by intEnableReactXDriver().

◆ intEnableReactXDriver()

BOOL intEnableReactXDriver ( HDC  )

Definition at line 33 of file ddraw.c.

34 {
36  PEPROCESS Proc = NULL;
37  PDC pDC = NULL;
38  PPDEVOBJ pDev = NULL;
39  PGD_DXDDENABLEDIRECTDRAW pfnDdEnableDirectDraw = NULL;
40  BOOL success = FALSE;
41 
42  /* FIXME: Get the process data */
43 
44  /* Do not try load dxg.sys when it have already been load once */
46  {
48  if (!NT_SUCCESS(Status))
49  {
50  DPRINT1("Warning: Failed to create the directx interface\n");
51  return FALSE;
52  }
53  }
54 
55  pDC = DC_LockDc(hdc);
56  if (pDC == NULL)
57  {
58  DPRINT1("Warning: Failed to lock hdc\n");
59  return FALSE;
60  }
61 
62  pDev = pDC->ppdev;
63 
64  /* Test and see if drv got a DX interface or not */
65  if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) ||
67  {
68  DPRINT1("Warning : DisableDirectDraw and EnableDirectDraw are NULL, no dx driver \n");
69  }
70  else
71  {
72 
73  /* Check and see if DX has been enabled or not */
74  if ( pDev->pEDDgpl->pvmList == NULL)
75  {
76  pDev->pEDDgpl->ddCallbacks.dwSize = sizeof(DD_CALLBACKS);
77  pDev->pEDDgpl->ddSurfaceCallbacks.dwSize = sizeof(DD_SURFACECALLBACKS);
78  pDev->pEDDgpl->ddPaletteCallbacks.dwSize = sizeof(DD_PALETTECALLBACKS);
79 
81  if (pfnDdEnableDirectDraw == NULL)
82  {
83  DPRINT1("Warning: no pfnDdEnableDirectDraw\n");
84  }
85  else
86  {
87  DPRINT1(" call to pfnDdEnableDirectDraw \n ");
88 
89  /* Note: it is the hdev struct it wants, not the drv hPDev aka pdc->PDev */
90  success = pfnDdEnableDirectDraw(pDC->ppdev, TRUE);
91  }
92  }
93  else
94  {
95  DPRINT1(" The dxg.sys and graphic card driver interface is enabled \n ");
96  success = TRUE;
97  }
98  }
99 
100 
101  DPRINT1("Return value : 0x%08x\n",success);
102  DC_UnlockDc(pDC);
103  DPRINT1(" end call to pfnDdEnableDirectDraw \n ");
104  return success;
105 }
#define DXG_INDEX_DxDdEnableDirectDraw
Definition: dxg.h:107
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN(NTAPI * PGD_DXDDENABLEDIRECTDRAW)(PVOID, BOOLEAN)
Definition: dxg.h:199
struct DD_CALLBACKS DD_CALLBACKS
DRIVER_FUNCTIONS DriverFunctions
Definition: pdevobj.h:138
#define FALSE
Definition: types.h:117
struct DD_PALETTECALLBACKS DD_PALETTECALLBACKS
unsigned int BOOL
Definition: ntddk_ex.h:94
PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics
Definition: ddraw.c:14
Status
Definition: gdiplustypes.h:24
NTSTATUS APIENTRY DxDdStartupDxGraphics(ULONG ulc1, PDRVENABLEDATA DxEngDrvOld, ULONG ulc2, PDRVENABLEDATA DxgDrvOld, PULONG DirectDrawContext, PEPROCESS Proc)
Definition: ddraw.c:116
Definition: polytest.cpp:40
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define success(from, fromstr, to, tostr)
HDC hdc
Definition: main.c:9
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23
PFN_DrvDisableDirectDraw DisableDirectDraw
Definition: ntgdityp.h:630
struct DD_SURFACECALLBACKS DD_SURFACECALLBACKS
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl
Definition: pdevobj.h:150
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
PFN_DrvEnableDirectDraw EnableDirectDraw
Definition: ntgdityp.h:629

Referenced by NtGdiDdCreateDirectDrawObject().

◆ IntGetDeviceGammaRamp()

BOOL FASTCALL IntGetDeviceGammaRamp ( HDEV  hPDev,
PGAMMARAMP  Ramp 
)

Definition at line 92 of file icm.c.

93 {
94  PPDEVOBJ pGDev = (PPDEVOBJ) hPDev;
95  int i;
96 
97  if (!(pGDev->flFlags & PDEV_DISPLAY)) return FALSE;
98 
99  if ((pGDev->devinfo.iDitherFormat == BMF_8BPP) ||
100  (pGDev->devinfo.iDitherFormat == BMF_16BPP) ||
101  (pGDev->devinfo.iDitherFormat == BMF_24BPP) ||
102  (pGDev->devinfo.iDitherFormat == BMF_32BPP))
103  {
104  if (pGDev->flFlags & PDEV_GAMMARAMP_TABLE)
105  {
106  RtlCopyMemory(Ramp, pGDev->pvGammaRamp, sizeof(GAMMARAMP));
107  }
108  else
109  {
110  // Generate the 256-colors array
111  for (i = 0; i < 256; i++ )
112  {
113  int NewValue = i * 256;
114 
115  Ramp->Red[i] = Ramp->Green[i] = Ramp->Blue[i] = ((WORD)NewValue);
116  }
117  }
118  return TRUE;
119  }
120 
121  return FALSE;
122 }
#define BMF_24BPP
Definition: winddi.h:359
#define BMF_32BPP
Definition: winddi.h:360
WORD Green[256]
Definition: winddi.h:776
#define TRUE
Definition: types.h:120
WORD Red[256]
Definition: winddi.h:775
PVOID pvGammaRamp
Definition: pdevobj.h:108
struct _PDEVOBJ * PPDEVOBJ
FLONG flFlags
Definition: pdevobj.h:89
#define FALSE
Definition: types.h:117
ULONG iDitherFormat
Definition: winddi.h:395
#define BMF_16BPP
Definition: winddi.h:358
DEVINFO devinfo
Definition: pdevobj.h:123
unsigned short WORD
Definition: ntddk_ex.h:93
Definition: xlate.c:10
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
WORD Blue[256]
Definition: winddi.h:777
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263

Referenced by DxEngGetDeviceGammaRamp(), and NtGdiGetDeviceGammaRamp().

◆ IntSetDeviceGammaRamp()

BOOL FASTCALL IntSetDeviceGammaRamp ( HDEV  hPDev,
PGAMMARAMP  Ramp,
BOOL   
)

Definition at line 284 of file icm.c.

285 {
286  WORD IcmGR, i, R, G, B;
287  BOOL Ret = FALSE, TstPeak;
288  PPDEVOBJ pGDev = (PPDEVOBJ) hPDev;
289 
290  if (!hPDev) return FALSE;
291 
292  if (!(pGDev->flFlags & PDEV_DISPLAY )) return FALSE;
293 
294  if ((pGDev->devinfo.iDitherFormat == BMF_8BPP) ||
295  (pGDev->devinfo.iDitherFormat == BMF_16BPP) ||
296  (pGDev->devinfo.iDitherFormat == BMF_24BPP) ||
297  (pGDev->devinfo.iDitherFormat == BMF_32BPP))
298  {
300  {
301  // No driver support
303  {
304  // Driver does not support Gamma Ramp, so test to see we
305  // have BMF_8BPP only and palette operation support.
306  if ((pGDev->devinfo.iDitherFormat != BMF_8BPP) ||
307  !(pGDev->gdiinfo.flRaster & RC_PALETTE)) return FALSE;
308  }
309  }
310 
311  if (pGDev->flFlags & PDEV_GAMMARAMP_TABLE)
312  {
313  if (RtlCompareMemory(pGDev->pvGammaRamp, Ramp, sizeof(GAMMARAMP)) ==
314  sizeof(GAMMARAMP)) return TRUE;
315  }
316 
317  // Verify Ramp is inside range.
318  IcmGR = -IcmGammaRangeSet;
319  TstPeak = (Test == FALSE);
320  for (i = 0; i < 256; i++)
321  {
322  R = Ramp->Red[i] / 256;
323  G = Ramp->Green[i] / 256;
324  B = Ramp->Blue[i] / 256;
325 
326  if (R >= IcmGR)
327  {
328  if (R <= IcmGammaRangeSet + i)
329  {
330  if ((G >= IcmGR) &&
331  (G <= IcmGammaRangeSet + i) &&
332  (B >= IcmGR) &&
333  (B <= IcmGammaRangeSet + i) ) continue;
334  }
335  }
336 
337  if (Test) return Ret; // Don't set and return.
338 
339  // No test override, check max range
340  if (TstPeak)
341  {
342  if ((R != (IcmGR * 256)) ||
343  (G != (IcmGR * 256)) ||
344  (B != (IcmGR * 256)) ) TstPeak = FALSE; // W/i range.
345  }
346  }
347  // ReactOS allocates a ramp even if it is 8BPP and Palette only.
348  // This way we have a record of the change in memory.
349  if (!pGDev->pvGammaRamp && !(pGDev->flFlags & PDEV_GAMMARAMP_TABLE))
350  {
351  // If the above is true and we have nothing allocated, create it.
353  pGDev->flFlags |= PDEV_GAMMARAMP_TABLE;
354  }
355 
356  if (pGDev->pvGammaRamp)
357  RtlCopyMemory(pGDev->pvGammaRamp, Ramp, sizeof(GAMMARAMP));
358 
359  Ret = UpdateDeviceGammaRamp(hPDev);
360  }
361 
362  return Ret;
363 }
#define BMF_24BPP
Definition: winddi.h:359
#define R(b, x)
Definition: sha2.c:134
Definition: ehthrow.cxx:53
#define BMF_32BPP
Definition: winddi.h:360
WORD Green[256]
Definition: winddi.h:776
#define TRUE
Definition: types.h:120
GDIINFO gdiinfo
Definition: pdevobj.h:124
WORD Red[256]
Definition: winddi.h:775
INT IcmGammaRangeSet
Definition: icm.c:280
ULONG G
Definition: xcpt4u.c:549
PVOID pvGammaRamp
Definition: pdevobj.h:108
BOOL FASTCALL UpdateDeviceGammaRamp(HDEV hPDev)
Definition: icm.c:227
struct _PDEVOBJ * PPDEVOBJ
DRIVER_FUNCTIONS DriverFunctions
Definition: pdevobj.h:138
FLONG flFlags
Definition: pdevobj.h:89
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
ULONG iDitherFormat
Definition: winddi.h:395
#define BMF_16BPP
Definition: winddi.h:358
#define GCAPS2_CHANGEGAMMARAMP
Definition: winddi.h:370
PFN_DrvIcmSetDeviceGammaRamp IcmSetDeviceGammaRamp
Definition: ntgdityp.h:636
DEVINFO devinfo
Definition: pdevobj.h:123
#define RC_PALETTE
Definition: wingdi.h:789
unsigned short WORD
Definition: ntddk_ex.h:93
Definition: xlate.c:10
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
ULONG flRaster
Definition: winddi.h:887
#define GDITAG_ICM
Definition: tags.h:125
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
WORD Blue[256]
Definition: winddi.h:777
#define B(row, col)
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
FLONG flGraphicsCaps2
Definition: winddi.h:399
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465

Referenced by DxEngSetDeviceGammaRamp(), and NtGdiSetDeviceGammaRamp().

Variable Documentation

◆ gpDxFuncs

DRVFN gpDxFuncs[]

Definition at line 23 of file ddraw.c.

Referenced by _Ret_opt_bytecount_(), DxDdStartupDxGraphics(), EngDxIoctl(), EngFreePrivateUserMem(), EngLockDirectDrawSurface(), EngUnlockDirectDrawSurface(), HeapVidMemAllocAligned(), intEnableReactXDriver(), NtGdiD3dContextCreate(), NtGdiD3dContextDestroy(), NtGdiD3dContextDestroyAll(), NtGdiD3dDrawPrimitives2(), NtGdiD3dValidateTextureStageState(), NtGdiDdAddAttachedSurface(), NtGdiDdAlphaBlt(), NtGdiDdAttachSurface(), NtGdiDdBeginMoCompFrame(), NtGdiDdBlt(), NtGdiDdCanCreateD3DBuffer(), NtGdiDdCanCreateSurface(), NtGdiDdColorControl(), NtGdiDdCreateD3DBuffer(), NtGdiDdCreateDirectDrawObject(), NtGdiDdCreateMoComp(), NtGdiDdCreateSurface(), NtGdiDdCreateSurfaceEx(), NtGdiDdCreateSurfaceObject(), NtGdiDdDeleteDirectDrawObject(), NtGdiDdDeleteSurfaceObject(), NtGdiDdDestroyD3DBuffer(), NtGdiDdDestroyMoComp(), NtGdiDdDestroySurface(), NtGdiDdEndMoCompFrame(), NtGdiDdFlip(), NtGdiDdFlipToGDISurface(), NtGdiDdGetAvailDriverMemory(), NtGdiDdGetBltStatus(), NtGdiDdGetDC(), NtGdiDdGetDriverInfo(), NtGdiDdGetDriverState(), NtGdiDdGetDxHandle(), NtGdiDdGetFlipStatus(), NtGdiDdGetInternalMoCompInfo(), NtGdiDdGetMoCompBuffInfo(), NtGdiDdGetMoCompFormats(), NtGdiDdGetMoCompGuids(), NtGdiDdGetScanLine(), NtGdiDdLock(), NtGdiDdLockD3D(), NtGdiDdQueryDirectDrawObject(), NtGdiDdQueryMoCompStatus(), NtGdiDdReenableDirectDrawObject(), NtGdiDdReleaseDC(), NtGdiDdRenderMoComp(), NtGdiDdResetVisrgn(), NtGdiDdSetColorKey(), NtGdiDdSetExclusiveMode(), NtGdiDdSetGammaRamp(), NtGdiDdSetOverlayPosition(), NtGdiDdUnattachSurface(), NtGdiDdUnlock(), NtGdiDdUnlockD3D(), NtGdiDdUpdateOverlay(), NtGdiDdWaitForVerticalBlank(), NtGdiDvpAcquireNotification(), NtGdiDvpCanCreateVideoPort(), NtGdiDvpColorControl(), NtGdiDvpCreateVideoPort(), NtGdiDvpDestroyVideoPort(), NtGdiDvpFlipVideoPort(), NtGdiDvpGetVideoPortBandwidth(), NtGdiDvpGetVideoPortConnectInfo(), NtGdiDvpGetVideoPortField(), NtGdiDvpGetVideoPortFlipStatus(), NtGdiDvpGetVideoPortInputFormats(), NtGdiDvpGetVideoPortLine(), NtGdiDvpGetVideoPortOutputFormats(), NtGdiDvpGetVideoSignalStatus(), NtGdiDvpReleaseNotification(), NtGdiDvpUpdateVideoPort(), NtGdiDvpWaitForVideoPortSync(), NtGdiDxgGenericThunk(), and VidMemFree().