4 * Copyright (C) 2001 Ove Kaaven
5 * Copyright (C) 2008 Magnus Olsen, Aleksey Bragin
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 /* DCI Command Escape */
30 #define DCICOMMAND 3075
31 #define DCI_VERSION 0x0100
33 #define DCICREATEPRIMARYSURFACE 1
34 #define DCICREATEOFFSCREENSURFACE 2
35 #define DCICREATEOVERLAYSURFACE 3
36 #define DCIENUMSURFACE 4
39 typedef int DCIRVAL
; /* DCI callback return type */
41 /* DCI Errors and success codes*/
42 #define DCI_SUCCESS(error) (((DCIRVAL)error) >= 0)
44 #define DCI_STATUS_POINTERCHANGED 1
45 #define DCI_STATUS_STRIDECHANGED 2
46 #define DCI_STATUS_FORMATCHANGED 4
47 #define DCI_STATUS_SURFACEINFOCHANGED 8
48 #define DCI_STATUS_CHROMAKEYCHANGED 16
49 #define DCI_STATUS_WASSTILLDRAWING 32
52 #define DCI_FAIL_GENERIC -1
53 #define DCI_FAIL_UNSUPPORTEDVERSION -2
54 #define DCI_FAIL_INVALIDSURFACE -3
55 #define DCI_FAIL_UNSUPPORTED -4
57 #define DCI_ERR_CURRENTLYNOTAVAIL -5
58 #define DCI_ERR_INVALIDRECT -6
59 #define DCI_ERR_UNSUPPORTEDFORMAT -7
60 #define DCI_ERR_UNSUPPORTEDMASK -8
61 #define DCI_ERR_TOOBIGHEIGHT -9
62 #define DCI_ERR_TOOBIGWIDTH -10
63 #define DCI_ERR_TOOBIGSIZE -11
64 #define DCI_ERR_OUTOFMEMORY -12
65 #define DCI_ERR_INVALIDPOSITION -13
66 #define DCI_ERR_INVALIDSTRETCH -14
67 #define DCI_ERR_INVALIDCLIPLIST -15
68 #define DCI_ERR_SURFACEISOBSCURED -16
69 #define DCI_ERR_XALIGN -17
70 #define DCI_ERR_YALIGN -18
71 #define DCI_ERR_XYALIGN -19
72 #define DCI_ERR_WIDTHALIGN -20
73 #define DCI_ERR_HEIGHTALIGN -21
76 #define DCI_SURFACE_TYPE 0x0000000F
77 #define DCI_PRIMARY 0x00000000
78 #define DCI_OFFSCREEN 0x00000001
79 #define DCI_OVERLAY 0x00000002
80 #define DCI_VISIBLE 0x00000010
81 #define DCI_CHROMAKEY 0x00000020
82 #define DCI_1632_ACCESS 0x00000040
83 #define DCI_DWORDSIZE 0x00000080
84 #define DCI_DWORDALIGN 0x00000100
85 #define DCI_WRITEONLY 0x00000200
86 #define DCI_ASYNC 0x00000400
87 #define DCI_CAN_STRETCHX 0x00001000
88 #define DCI_CAN_STRETCHY 0x00002000
89 #define DCI_CAN_STRETCHXY (DCI_CAN_STRETCHX | DCI_CAN_STRETCHY)
90 #define DCI_CAN_STRETCHXN 0x00004000
91 #define DCI_CAN_STRETCHYN 0x00008000
92 #define DCI_CAN_STRETCHXYN (DCI_CAN_STRETCHXN | DCI_CAN_STRETCHYN)
93 #define DCI_CANOVERLAY 0x00010000
97 #define YVU9 mmioFOURCC('Y','V','U','9')
100 #define Y411 mmioFOURCC('Y','4','1','1')
103 #define YUY2 mmioFOURCC('Y','U','Y','2')
106 #define YVYU mmioFOURCC('Y','V','Y','U')
109 #define UYVY mmioFOURCC('U','Y','V','Y')
112 #define Y211 mmioFOURCC('Y','2','1','1')
115 /*****************************************************************************
116 * Escape command structures
118 typedef struct _DCICMD
{
126 typedef struct _DCICREATEINPUT
{
135 } DCICREATEINPUT
, *LPDCICREATEINPUT
;
137 typedef struct _DCISURFACEINFO
{
146 ULONG_PTR dwOffSurface
;
152 DCIRVAL (CALLBACK
*BeginAccess
)(LPVOID
, LPRECT
);
153 void (CALLBACK
*EndAccess
)(LPVOID
);
154 void (CALLBACK
*DestroySurface
)(LPVOID
);
155 } DCISURFACEINFO
, *LPDCISURFACEINFO
, DCIPRIMARY
, *LPDCIPRIMARY
;
157 typedef void (*ENUM_CALLBACK
)(LPDCISURFACEINFO lpSurfaceInfo
,
160 typedef struct _DCIENUMINPUT
{
164 void (CALLBACK
*EnumCallback
)(LPDCISURFACEINFO
, LPVOID
);
166 } DCIENUMINPUT
, *LPDCIENUMINPUT
;
168 typedef struct _DCIOFFSCREEN
{
169 DCISURFACEINFO dciInfo
;
170 DCIRVAL (CALLBACK
*Draw
) (LPVOID
);
171 DCIRVAL (CALLBACK
*SetClipList
) (LPVOID
, LPRGNDATA
);
172 DCIRVAL (CALLBACK
*SetDestination
) (LPVOID
, LPRECT
, LPRECT
);
173 } DCIOFFSCREEN
, *LPDCIOFFSCREEN
;
175 typedef struct _DCIOVERLAY
{
176 DCISURFACEINFO dciInfo
;
177 DWORD dwChromakeyValue
;
178 DWORD dwChromakeyMask
;
179 } DCIOVERLAY
, *LPDCIOVERLAY
;
185 #endif /* __INC_DCIDDI */