ReactOS  0.4.15-dev-3175-g222acf5
ddkmapi.h
Go to the documentation of this file.
1 /*
2  * ddkmapi.h
3  *
4  * DirectDraw support for DxApi function
5  *
6  * Contributors:
7  * Created by Magnus Olsen
8  *
9  * THIS SOFTWARE IS NOT COPYRIGHTED
10  *
11  * This source code is offered for use in the public domain. You may
12  * use, modify or distribute it freely.
13  *
14  * This code is distributed in the hope that it will be useful but
15  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
16  * DISCLAIMED. This includes but is not limited to warranties of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18  *
19  */
20 
21 #ifndef __DDKMAPI_INCLUDED__
22 #define __DDKMAPI_INCLUDED__
23 
24 #if defined(_DXAPI_)
25 #define DXAPI
26 #else
27 #define DXAPI DECLSPEC_IMPORT
28 #endif
29 
30 #define DXAPI_MAJORVERSION 1
31 #define DXAPI_MINORVERSION 0
32 
33 #define DD_FIRST_DXAPI 0x500
34 #define DD_DXAPI_GETVERSIONNUMBER (DD_FIRST_DXAPI)
35 #define DD_DXAPI_CLOSEHANDLE (DD_FIRST_DXAPI+1)
36 #define DD_DXAPI_OPENDIRECTDRAW (DD_FIRST_DXAPI+2)
37 #define DD_DXAPI_OPENSURFACE (DD_FIRST_DXAPI+3)
38 #define DD_DXAPI_OPENVIDEOPORT (DD_FIRST_DXAPI+4)
39 #define DD_DXAPI_GETKERNELCAPS (DD_FIRST_DXAPI+5)
40 #define DD_DXAPI_GET_VP_FIELD_NUMBER (DD_FIRST_DXAPI+6)
41 #define DD_DXAPI_SET_VP_FIELD_NUMBER (DD_FIRST_DXAPI+7)
42 #define DD_DXAPI_SET_VP_SKIP_FIELD (DD_FIRST_DXAPI+8)
43 #define DD_DXAPI_GET_SURFACE_STATE (DD_FIRST_DXAPI+9)
44 #define DD_DXAPI_SET_SURFACE_STATE (DD_FIRST_DXAPI+10)
45 #define DD_DXAPI_LOCK (DD_FIRST_DXAPI+11)
46 #define DD_DXAPI_FLIP_OVERLAY (DD_FIRST_DXAPI+12)
47 #define DD_DXAPI_FLIP_VP (DD_FIRST_DXAPI+13)
48 #define DD_DXAPI_GET_CURRENT_VP_AUTOFLIP_SURFACE (DD_FIRST_DXAPI+14)
49 #define DD_DXAPI_GET_LAST_VP_AUTOFLIP_SURFACE (DD_FIRST_DXAPI+15)
50 #define DD_DXAPI_REGISTER_CALLBACK (DD_FIRST_DXAPI+16)
51 #define DD_DXAPI_UNREGISTER_CALLBACK (DD_FIRST_DXAPI+17)
52 #define DD_DXAPI_GET_POLARITY (DD_FIRST_DXAPI+18)
53 #define DD_DXAPI_OPENVPCAPTUREDEVICE (DD_FIRST_DXAPI+19)
54 #define DD_DXAPI_ADDVPCAPTUREBUFFER (DD_FIRST_DXAPI+20)
55 #define DD_DXAPI_FLUSHVPCAPTUREBUFFERS (DD_FIRST_DXAPI+21)
56 
57 /* DDOPENVPCAPTUREDEVICEIN.dwFlags constants */
58 #define DDOPENCAPTURE_VIDEO 0x0001
59 #define DDOPENCAPTURE_VBI 0x0002
60 
61 /* DDADDVPCAPTUREBUFF.dwFlags constants */
62 #define DDADDBUFF_SYSTEMMEMORY 0x0001
63 #define DDADDBUFF_NONLOCALVIDMEM 0x0002
64 #define DDADDBUFF_INVERT 0x0004
65 
66 /* DDGETSURFACESTATEOUT.dwStateCaps/dwStateStatus constants */
67 #define DDSTATE_BOB 0x0001
68 #define DDSTATE_WEAVE 0x0002
69 #define DDSTATE_EXPLICITLY_SET 0x0004
70 #define DDSTATE_SOFTWARE_AUTOFLIP 0x0008
71 #define DDSTATE_SKIPEVENFIELDS 0x0010
72 
73 /* DDREGISTERCALLBACK.dwEvents constants */
74 #define DDEVENT_DISPLAY_VSYNC 0x0001
75 #define DDEVENT_VP_VSYNC 0x0002
76 #define DDEVENT_VP_LINE 0x0004
77 #define DDEVENT_PRERESCHANGE 0x0008
78 #define DDEVENT_POSTRESCHANGE 0x0010
79 #define DDEVENT_PREDOSBOX 0x0020
80 #define DDEVENT_POSTDOSBOX 0x0040
81 
82 /* LPDD_NOTIFYCALLBACK.dwFlags constants */
83 #define DDNOTIFY_DISPLAY_VSYNC 0x0001
84 #define DDNOTIFY_VP_VSYNC 0x0002
85 #define DDNOTIFY_VP_LINE 0x0004
86 #define DDNOTIFY_PRERESCHANGE 0x0008
87 #define DDNOTIFY_POSTRESCHANGE 0x0010
88 #define DDNOTIFY_PREDOSBOX 0x0020
89 #define DDNOTIFY_POSTDOSBOX 0x0040
90 #define DDNOTIFY_CLOSEDIRECTDRAW 0x0080
91 #define DDNOTIFY_CLOSESURFACE 0x0100
92 #define DDNOTIFY_CLOSEVIDEOPORT 0x0200
93 #define DDNOTIFY_CLOSECAPTURE 0x0400
94 
95 typedef DWORD (PASCAL *LPDXAPI)(DWORD dwFunctionNum, LPVOID lpvInBuffer, DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer);
96 typedef ULONG (PASCAL *LPDD_NOTIFYCALLBACK) (DWORD dwFlags, PVOID pContext, DWORD dwParam1, DWORD dwParam2);
97 
98 typedef struct _DDCAPBUFFINFO {
104 
105 typedef struct _DDADDVPCAPTUREBUFF {
112 
113 typedef struct _DDCLOSEHANDLE {
116 
117 typedef struct _DDFLIPOVERLAY {
123 
124 typedef struct _DDFLIPVIDEOPORT {
131 
132 typedef struct _DDGETAUTOFLIPIN {
136 
137 typedef struct _DDGETAUTOFLIPOUT {
143 
144 typedef struct _DDGETPOLARITYIN {
148 
149 typedef struct _DDGETPOLARITYOUT {
153 
154 typedef struct _DDGETSURFACESTATEIN {
158 
159 typedef struct _DDGETSURFACESTATEOUT {
164 
165 typedef struct _DDGETFIELDNUMIN {
169 
170 typedef struct _DDGETFIELDNUMOUT {
174 
175 typedef struct _DDGETKERNELCAPSOUT {
180 
181 typedef struct _DDGETVERSIONNUMBER {
186 
187 typedef struct _DDLOCKIN {
190 } DDLOCKIN, *LPDDLOCKIN;
191 
192 typedef struct _DDLOCKOUT {
202  __GNU_EXTENSION union {
205  };
206  __GNU_EXTENSION union {
209  };
210  __GNU_EXTENSION union {
213  };
215 
216 
217 typedef struct _DDOPENDIRECTDRAWIN {
222 
223 typedef struct _DDOPENDIRECTDRAWOUT {
227 
228 typedef struct _DDOPENSURFACEIN {
234 
235 typedef struct _DDOPENSURFACEOUT {
239 
240 typedef struct _DDOPENVIDEOPORTIN {
246 
247 typedef struct _DDOPENVIDEOPORTOUT {
251 
252 typedef struct _DDOPENVPCAPTUREDEVICEIN {
262 
267 
268 typedef struct _DDREGISTERCALLBACK {
276 
277 typedef struct _DDSETSURFACETATE {
283 
284 typedef struct _DDSETFIELDNUM {
289 
290 typedef struct _DDSETSKIPFIELD {
295 
296 
297 DXAPI
299 DxApi(IN DWORD dwFunctionNum,
300  IN LPVOID lpvInBuffer,
301  IN DWORD cbInBuffer,
302  OUT LPVOID lpvOutBuffer,
303  OUT DWORD cbOutBuffer);
304 
305 
306 #endif /* __DDKMAPI_INCLUDED__ */
307 
#define __GNU_EXTENSION
Definition: _mingw_mac.h:135
DWORD dwStartField
Definition: ddkmapi.h:293
struct _DDSETFIELDNUM * LPDDSETFIELDNUM
struct _DDGETSURFACESTATEIN DDGETSURFACESTATEIN
ULONG dwVideoPortHandle
Definition: ddkmapi.h:242
struct _DDGETFIELDNUMOUT DDGETFIELDNUMOUT
HANDLE hTargetSurface
Definition: ddkmapi.h:128
struct _DDSETFIELDNUM DDSETFIELDNUM
struct _DDADDVPCAPTUREBUFF DDADDVPCAPTUREBUFF
#define IN
Definition: typedefs.h:39
LPDD_NOTIFYCALLBACK pfnVideoPortClose
Definition: ddkmapi.h:243
HANDLE hDirectDraw
Definition: ddkmapi.h:125
HANDLE hDirectDraw
Definition: ddkmapi.h:188
struct _DDGETSURFACESTATEOUT * LPDDGETSURFACESTATEOUT
DWORD dwYBitMask
Definition: ddkmapi.h:204
HANDLE hDirectDraw
Definition: ddkmapi.h:291
struct _DDOPENDIRECTDRAWIN * LPDDOPENDIRECTDRAWIN
struct _DDGETVERSIONNUMBER DDGETVERSIONNUMBER
PVOID lpSurface
Definition: ddkmapi.h:197
HANDLE hDirectDraw
Definition: ddkmapi.h:229
HANDLE hVideoPort
Definition: ddkmapi.h:134
LPDD_NOTIFYCALLBACK pfnCallback
Definition: ddkmapi.h:271
struct _DDREGISTERCALLBACK * LPDDREGISTERCALLBACK
struct _DDOPENSURFACEIN * LPDDOPENSURFACEIN
struct _DDOPENVIDEOPORTOUT * LPDDOPENVIDEOPORTOUT
struct _DDGETAUTOFLIPOUT DDGETAUTOFLIPOUT
struct _DDADDVPCAPTUREBUFF * LPDDADDVPCAPTUREBUFF
DWORD dwFormatFlags
Definition: ddkmapi.h:199
struct _DDSETSKIPFIELD * LPDDSETSKIPFIELD
HANDLE hVideoPort
Definition: ddkmapi.h:292
DWORD(PASCAL * LPDXAPI)(DWORD dwFunctionNum, LPVOID lpvInBuffer, DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer)
Definition: ddkmapi.h:95
struct _DDGETKERNELCAPSOUT * LPDDGETKERNELCAPSOUT
DWORD dwFlags
Definition: ddkmapi.h:121
struct _DDGETPOLARITYOUT DDGETPOLARITYOUT
ULONG_PTR dwParam1
Definition: ddkmapi.h:272
struct _DDLOCKOUT DDLOCKOUT
HANDLE hSurface
Definition: ddkmapi.h:189
struct _DDOPENVIDEOPORTIN DDOPENVIDEOPORTIN
#define DWORD
Definition: nt_native.h:44
struct _DDSETSURFACETATE * LPDDSETSURFACESTATE
struct _DDOPENVIDEOPORTIN * LPDDOPENVIDEOPORTIN
struct _DDGETFIELDNUMOUT * LPDDGETFIELDNUMOUT
struct _DDCLOSEHANDLE * LPDDCLOSEHANDLE
uint32_t ULONG_PTR
Definition: typedefs.h:65
struct _DDOPENDIRECTDRAWOUT * LPDDOPENDIRECTDRAWOUT
struct _DDLOCKIN DDLOCKIN
struct _DDOPENSURFACEIN DDOPENSURFACEIN
ULONG(PASCAL * LPDD_NOTIFYCALLBACK)(DWORD dwFlags, PVOID pContext, DWORD dwParam1, DWORD dwParam2)
Definition: ddkmapi.h:96
struct _DDCAPBUFFINFO * LPDDCAPBUFFINFO
HANDLE hVideoSurface
Definition: ddkmapi.h:139
HANDLE hSurface
Definition: ddkmapi.h:237
struct _DDGETPOLARITYOUT * LPDDGETPOLARITYOUT
DWORD dwMinorVersion
Definition: ddkmapi.h:184
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
struct _DDOPENDIRECTDRAWIN DDOPENDIRECTDRAWIN
struct _DDGETFIELDNUMIN DDGETFIELDNUMIN
struct _DDOPENSURFACEOUT * LPDDOPENSURFACEOUT
ULONG_PTR dwSurfaceHandle
Definition: ddkmapi.h:230
struct _DDCLOSEHANDLE DDCLOSEHANDLE
struct _DDGETVERSIONNUMBER * LPDDGETVERSIONNUMBER
LPDD_NOTIFYCALLBACK pfnDirectDrawClose
Definition: ddkmapi.h:219
struct _DDGETAUTOFLIPIN * LPDDGETAUTOFLIPIN
struct _DDGETAUTOFLIPOUT * LPDDGETAUTOFLIPOUT
HANDLE hDirectDraw
Definition: ddkmapi.h:241
struct _DDGETFIELDNUMIN * LPDDGETFIELDNUMIN
HANDLE hDirectDraw
Definition: ddkmapi.h:269
struct _DDREGISTERCALLBACK DDREGISTERCALLBACK
struct _DDGETSURFACESTATEOUT DDGETSURFACESTATEOUT
struct _DDFLIPVIDEOPORT * LPDDFLIPVIDEOPORT
struct _DDOPENVIDEOPORTOUT DDOPENVIDEOPORTOUT
HANDLE hVBISurface
Definition: ddkmapi.h:140
DWORD dwStartField
Definition: ddkmapi.h:281
DWORD ddRVal
Definition: ddkmapi.h:102
DWORD dwUBitMask
Definition: ddkmapi.h:208
DWORD dwRBitMask
Definition: ddkmapi.h:203
HANDLE hSurface
Definition: ddkmapi.h:279
HANDLE hTargetSurface
Definition: ddkmapi.h:120
struct _DDFLIPOVERLAY * LPDDFLIPOVERLAY
struct _DDOPENVPCAPTUREDEVICEOUT DDOPENVPCAPTUREDEVICEOUT
HANDLE hVideoPort
Definition: ddkmapi.h:167
struct _DDOPENSURFACEOUT DDOPENSURFACEOUT
struct _DDSETSURFACETATE DDSETSURFACESTATE
LONG lSurfPitch
Definition: ddkmapi.h:196
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG_PTR dwDirectDrawHandle
Definition: ddkmapi.h:218
struct _DDOPENVPCAPTUREDEVICEOUT * LPDDOPENVPCAPTUREDEVICEOUT
DWORD dwMajorVersion
Definition: ddkmapi.h:183
HANDLE hDirectDraw
Definition: ddkmapi.h:118
DWORD dwFieldNumber
Definition: ddkmapi.h:99
HANDLE hHandle
Definition: ddkmapi.h:114
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HANDLE hDirectDraw
Definition: ddkmapi.h:285
struct _DDGETPOLARITYIN DDGETPOLARITYIN
LARGE_INTEGER liTimeStamp
Definition: ddkmapi.h:101
struct _DDSETSKIPFIELD DDSETSKIPFIELD
#define PASCAL
Definition: windef.h:133
DWORD dwFieldNum
Definition: ddkmapi.h:287
HANDLE hVideoPort
Definition: ddkmapi.h:126
HANDLE hDirectDraw
Definition: ddkmapi.h:145
DWORD dwGBitMask
Definition: ddkmapi.h:207
HANDLE hDirectDraw
Definition: ddkmapi.h:133
LPDDCAPBUFFINFO lpBuffInfo
Definition: ddkmapi.h:110
DWORD ddRVal
Definition: ddkmapi.h:193
DWORD dwVBitMask
Definition: ddkmapi.h:212
struct _DDOPENVPCAPTUREDEVICEIN DDOPENVPCAPTUREDEVICEIN
PVOID pContext
Definition: ddkmapi.h:232
struct _DDLOCKIN * LPDDLOCKIN
struct _DDGETSURFACESTATEIN * LPDDGETSURFACESTATEIN
HANDLE hDirectDraw
Definition: ddkmapi.h:278
DWORD dwFieldNum
Definition: ddkmapi.h:172
ULONG_PTR dwParam2
Definition: ddkmapi.h:273
DWORD dwFormatFourCC
Definition: ddkmapi.h:200
HANDLE hVideoPort
Definition: ddkmapi.h:286
DXAPI DWORD PASCAL DxApi(IN DWORD dwFunctionNum, IN LPVOID lpvInBuffer, IN DWORD cbInBuffer, OUT LPVOID lpvOutBuffer, OUT DWORD cbOutBuffer)
Definition: main.c:97
DWORD SurfaceCaps
Definition: ddkmapi.h:198
struct _DDCAPBUFFINFO DDCAPBUFFINFO
#define OUT
Definition: typedefs.h:40
struct _DDOPENDIRECTDRAWOUT DDOPENDIRECTDRAWOUT
DWORD dwSurfHeight
Definition: ddkmapi.h:194
LPDD_NOTIFYCALLBACK pfnSurfaceClose
Definition: ddkmapi.h:231
LPDD_NOTIFYCALLBACK pfnCaptureClose
Definition: ddkmapi.h:258
unsigned int ULONG
Definition: retypes.h:1
DWORD dwBBitMask
Definition: ddkmapi.h:211
DWORD dwFormatBitCount
Definition: ddkmapi.h:201
struct _DDGETPOLARITYIN * LPDDGETPOLARITYIN
struct _DDFLIPOVERLAY DDFLIPOVERLAY
struct _DDFLIPVIDEOPORT DDFLIPVIDEOPORT
HANDLE hCurrentSurface
Definition: ddkmapi.h:127
struct _DDLOCKOUT * LPDDLOCKOUT
DWORD dwSurfWidth
Definition: ddkmapi.h:195
struct _DDOPENVPCAPTUREDEVICEIN * LPDDOPENVPCAPTUREDEVICEIN
#define DXAPI
Definition: ddkmapi.h:27
HANDLE hCurrentSurface
Definition: ddkmapi.h:119
HANDLE hDirectDraw
Definition: ddkmapi.h:166
struct _DDGETKERNELCAPSOUT DDGETKERNELCAPSOUT
struct _DDGETAUTOFLIPIN DDGETAUTOFLIPIN
DWORD bPolarity
Definition: ddkmapi.h:100
HANDLE hVideoPort
Definition: ddkmapi.h:146