4 * DirectDraw support for DxApi function
6 * This file is part of the w32api package.
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 #pragma GCC system_header
37 #define DXAPI DECLSPEC_EXPORT
39 #define DXAPI DECLSPEC_IMPORT
46 /*IN*/ DWORD dwFunctionNum
,
47 /*IN*/ LPVOID lpvInBuffer
,
48 /*IN*/ DWORD cbInBuffer
,
49 /*OUT*/ LPVOID lpvOutBuffer
,
50 /*OUT*/ DWORD cbOutBuffer
);
52 typedef DWORD (FAR PASCAL
*LPDXAPI
)(
60 #define DXAPI_MAJORVERSION 1
61 #define DXAPI_MINORVERSION 0
63 #define DD_FIRST_DXAPI 0x500
65 #define DD_DXAPI_GETVERSIONNUMBER (DD_FIRST_DXAPI)
66 #define DD_DXAPI_CLOSEHANDLE (DD_FIRST_DXAPI+1)
67 #define DD_DXAPI_OPENDIRECTDRAW (DD_FIRST_DXAPI+2)
68 #define DD_DXAPI_OPENSURFACE (DD_FIRST_DXAPI+3)
69 #define DD_DXAPI_OPENVIDEOPORT (DD_FIRST_DXAPI+4)
70 #define DD_DXAPI_GETKERNELCAPS (DD_FIRST_DXAPI+5)
71 #define DD_DXAPI_GET_VP_FIELD_NUMBER (DD_FIRST_DXAPI+6)
72 #define DD_DXAPI_SET_VP_FIELD_NUMBER (DD_FIRST_DXAPI+7)
73 #define DD_DXAPI_SET_VP_SKIP_FIELD (DD_FIRST_DXAPI+8)
74 #define DD_DXAPI_GET_SURFACE_STATE (DD_FIRST_DXAPI+9)
75 #define DD_DXAPI_SET_SURFACE_STATE (DD_FIRST_DXAPI+10)
76 #define DD_DXAPI_LOCK (DD_FIRST_DXAPI+11)
77 #define DD_DXAPI_FLIP_OVERLAY (DD_FIRST_DXAPI+12)
78 #define DD_DXAPI_FLIP_VP (DD_FIRST_DXAPI+13)
79 #define DD_DXAPI_GET_CURRENT_VP_AUTOFLIP_SURFACE (DD_FIRST_DXAPI+14)
80 #define DD_DXAPI_GET_LAST_VP_AUTOFLIP_SURFACE (DD_FIRST_DXAPI+15)
81 #define DD_DXAPI_REGISTER_CALLBACK (DD_FIRST_DXAPI+16)
82 #define DD_DXAPI_UNREGISTER_CALLBACK (DD_FIRST_DXAPI+17)
83 #define DD_DXAPI_GET_POLARITY (DD_FIRST_DXAPI+18)
84 #define DD_DXAPI_OPENVPCAPTUREDEVICE (DD_FIRST_DXAPI+19)
85 #define DD_DXAPI_ADDVPCAPTUREBUFFER (DD_FIRST_DXAPI+20)
86 #define DD_DXAPI_FLUSHVPCAPTUREBUFFERS (DD_FIRST_DXAPI+21)
89 typedef struct _DDCAPBUFFINFO
{
92 LARGE_INTEGER liTimeStamp
;
94 } DDCAPBUFFINFO
, FAR
* LPDDCAPBUFFINFO
;
96 /* DDADDVPCAPTUREBUFF.dwFlags constants */
97 #define DDADDBUFF_SYSTEMMEMORY 0x0001
98 #define DDADDBUFF_NONLOCALVIDMEM 0x0002
99 #define DDADDBUFF_INVERT 0x0004
101 typedef struct _DDADDVPCAPTUREBUFF
{
106 LPDDCAPBUFFINFO lpBuffInfo
;
107 } DDADDVPCAPTUREBUFF
, FAR
* LPDDADDVPCAPTUREBUFF
;
109 typedef struct _DDCLOSEHANDLE
{
111 } DDCLOSEHANDLE
, FAR
*LPDDCLOSEHANDLE
;
113 typedef struct _DDFLIPOVERLAY
{
115 HANDLE hCurrentSurface
;
116 HANDLE hTargetSurface
;
118 } DDFLIPOVERLAY
, FAR
*LPDDFLIPOVERLAY
;
120 typedef struct _DDFLIPVIDEOPORT
{
123 HANDLE hCurrentSurface
;
124 HANDLE hTargetSurface
;
126 } DDFLIPVIDEOPORT
, FAR
*LPDDFLIPVIDEOPORT
;
128 typedef struct _DDGETAUTOFLIPIN
{
131 } DDGETAUTOFLIPIN
, FAR
*LPDDGETAUTOFLIPIN
;
133 typedef struct _DDGETAUTOFLIPOUT
{
135 HANDLE hVideoSurface
;
138 } DDGETAUTOFLIPOUT
, FAR
*LPDDGETAUTOFLIPOUT
;
140 typedef struct _DDGETPOLARITYIN
{
143 } DDGETPOLARITYIN
, FAR
*LPDDGETPOLARITYIN
;
145 typedef struct _DDGETPOLARITYOUT
{
148 } DDGETPOLARITYOUT
, FAR
*LPDDGETPOLARITYOUT
;
150 typedef struct _DDGETSURFACESTATEIN
{
153 } DDGETSURFACESTATEIN
, FAR
*LPDDGETSURFACESTATEIN
;
155 /* DDGETSURFACESTATEOUT.dwStateCaps/dwStateStatus constants */
156 #define DDSTATE_BOB 0x0001
157 #define DDSTATE_WEAVE 0x0002
158 #define DDSTATE_EXPLICITLY_SET 0x0004
159 #define DDSTATE_SOFTWARE_AUTOFLIP 0x0008
160 #define DDSTATE_SKIPEVENFIELDS 0x0010
162 typedef struct _DDGETSURFACESTATEOUT
{
166 } DDGETSURFACESTATEOUT
, FAR
*LPDDGETSURFACESTATEOUT
;
168 typedef struct _DDGETFIELDNUMIN
{
171 } DDGETFIELDNUMIN
, FAR
*LPDDGETFIELDNUMIN
;
173 typedef struct _DDGETFIELDNUMOUT
{
176 } DDGETFIELDNUMOUT
, FAR
*LPDDGETFIELDNUMOUT
;
178 typedef struct _DDGETKERNELCAPSOUT
{
182 } DDGETKERNELCAPSOUT
, FAR
*LPDDGETKERNELCAPSOUT
;
184 typedef struct _DDGETVERSIONNUMBER
{
186 DWORD dwMajorVersion
;
187 DWORD dwMinorVersion
;
188 } DDGETVERSIONNUMBER
, FAR
*LPDDGETVERSIONNUMBER
;
190 typedef struct _DDLOCKIN
{
193 } DDLOCKIN
, FAR
*LPDDLOCKIN
;
195 typedef struct _DDLOCKOUT
{
203 DWORD dwFormatFourCC
;
204 DWORD dwFormatBitCount
;
205 _ANONYMOUS_UNION
union {
209 _ANONYMOUS_UNION
union {
213 _ANONYMOUS_UNION
union {
217 } DDLOCKOUT
, FAR
*LPDDLOCKOUT
;
219 /* LPDD_NOTIFYCALLBACK.dwFlags constants */
220 #define DDNOTIFY_DISPLAY_VSYNC 0x0001
221 #define DDNOTIFY_VP_VSYNC 0x0002
222 #define DDNOTIFY_VP_LINE 0x0004
223 #define DDNOTIFY_PRERESCHANGE 0x0008
224 #define DDNOTIFY_POSTRESCHANGE 0x0010
225 #define DDNOTIFY_PREDOSBOX 0x0020
226 #define DDNOTIFY_POSTDOSBOX 0x0040
227 #define DDNOTIFY_CLOSEDIRECTDRAW 0x0080
228 #define DDNOTIFY_CLOSESURFACE 0x0100
229 #define DDNOTIFY_CLOSEVIDEOPORT 0x0200
230 #define DDNOTIFY_CLOSECAPTURE 0x0400
232 typedef ULONG (FAR PASCAL
*LPDD_NOTIFYCALLBACK
)(
238 typedef struct _DDOPENDIRECTDRAWIN
{
239 ULONG_PTR dwDirectDrawHandle
;
240 LPDD_NOTIFYCALLBACK pfnDirectDrawClose
;
242 } DDOPENDIRECTDRAWIN
, FAR
*LPDDOPENDIRECTDRAWIN
;
244 typedef struct _DDOPENDIRECTDRAWOUT
{
247 } DDOPENDIRECTDRAWOUT
, FAR
*LPDDOPENDIRECTDRAWOUT
;
249 typedef struct _DDOPENSURFACEIN
{
251 ULONG_PTR dwSurfaceHandle
;
252 LPDD_NOTIFYCALLBACK pfnSurfaceClose
;
254 } DDOPENSURFACEIN
, FAR
*LPDDOPENSURFACEIN
;
256 typedef struct _DDOPENSURFACEOUT
{
259 } DDOPENSURFACEOUT
, FAR
*LPDDOPENSURFACEOUT
;
261 typedef struct _DDOPENVIDEOPORTIN
{
263 ULONG dwVideoPortHandle
;
264 LPDD_NOTIFYCALLBACK pfnVideoPortClose
;
266 } DDOPENVIDEOPORTIN
, FAR
*LPDDOPENVIDEOPORTIN
;
268 typedef struct _DDOPENVIDEOPORTOUT
{
271 } DDOPENVIDEOPORTOUT
, FAR
*LPDDOPENVIDEOPORTOUT
;
273 /* DDOPENVPCAPTUREDEVICEIN.dwFlags constants */
274 #define DDOPENCAPTURE_VIDEO 0x0001
275 #define DDOPENCAPTURE_VBI 0x0002
277 typedef struct _DDOPENVPCAPTUREDEVICEIN
{
282 DWORD dwCaptureEveryNFields
;
283 LPDD_NOTIFYCALLBACK pfnCaptureClose
;
286 } DDOPENVPCAPTUREDEVICEIN
, FAR
* LPDDOPENVPCAPTUREDEVICEIN
;
288 typedef struct _DDOPENVPCAPTUREDEVICEOUT
{
291 } DDOPENVPCAPTUREDEVICEOUT
, FAR
* LPDDOPENVPCAPTUREDEVICEOUT
;
293 /* DDREGISTERCALLBACK.dwEvents constants */
294 #define DDEVENT_DISPLAY_VSYNC 0x0001
295 #define DDEVENT_VP_VSYNC 0x0002
296 #define DDEVENT_VP_LINE 0x0004
297 #define DDEVENT_PRERESCHANGE 0x0008
298 #define DDEVENT_POSTRESCHANGE 0x0010
299 #define DDEVENT_PREDOSBOX 0x0020
300 #define DDEVENT_POSTDOSBOX 0x0040
302 typedef struct _DDREGISTERCALLBACK
{
305 LPDD_NOTIFYCALLBACK pfnCallback
;
309 } DDREGISTERCALLBACK
, FAR
*LPDDREGISTERCALLBACK
;
311 typedef struct _DDSETSURFACETATE
{
316 } DDSETSURFACESTATE
, FAR
*LPDDSETSURFACESTATE
;
318 typedef struct _DDSETFIELDNUM
{
322 } DDSETFIELDNUM
, FAR
*LPDDSETFIELDNUM
;
324 typedef struct _DDSETSKIPFIELD
{
328 } DDSETSKIPFIELD
, FAR
*LPDDSETSKIPFIELD
;
334 #endif /* __DDKMAPI_H */