Fix RtlIpv4StringToAddressW prototype and its caller in ws2_32.
[reactos.git] / include / psdk / dciddi.h
1 /*
2 * DCI driver interface
3 *
4 * Copyright (C) 2001 Ove Kaaven
5 * Copyright (C) 2008 Magnus Olsen, Aleksey Bragin
6 *
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.
11 *
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.
16 *
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
20 */
21
22 #ifndef __INC_DCIDDI
23 #define __INC_DCIDDI
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* DCI Command Escape */
30 #define DCICOMMAND 3075
31 #define DCI_VERSION 0x0100
32
33 #define DCICREATEPRIMARYSURFACE 1
34 #define DCICREATEOFFSCREENSURFACE 2
35 #define DCICREATEOVERLAYSURFACE 3
36 #define DCIENUMSURFACE 4
37 #define DCIESCAPE 5
38
39 typedef int DCIRVAL; /* DCI callback return type */
40
41 /* DCI Errors and success codes*/
42 #define DCI_SUCCESS(error) (((DCIRVAL)error) >= 0)
43
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
50
51 #define DCI_OK 0
52 #define DCI_FAIL_GENERIC -1
53 #define DCI_FAIL_UNSUPPORTEDVERSION -2
54 #define DCI_FAIL_INVALIDSURFACE -3
55 #define DCI_FAIL_UNSUPPORTED -4
56
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
74
75 /* Capabilities */
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
94
95 /* FOURCC codes */
96 #ifndef YVU9
97 #define YVU9 mmioFOURCC('Y','V','U','9')
98 #endif
99 #ifndef Y411
100 #define Y411 mmioFOURCC('Y','4','1','1')
101 #endif
102 #ifndef YUY2
103 #define YUY2 mmioFOURCC('Y','U','Y','2')
104 #endif
105 #ifndef YVYU
106 #define YVYU mmioFOURCC('Y','V','Y','U')
107 #endif
108 #ifndef UYVY
109 #define UYVY mmioFOURCC('U','Y','V','Y')
110 #endif
111 #ifndef Y211
112 #define Y211 mmioFOURCC('Y','2','1','1')
113 #endif
114
115 /*****************************************************************************
116 * Escape command structures
117 */
118 typedef struct _DCICMD {
119 DWORD dwCommand;
120 DWORD dwParam1;
121 DWORD dwParam2;
122 DWORD dwVersion;
123 DWORD dwReserved;
124 } DCICMD;
125
126 typedef struct _DCICREATEINPUT {
127 DCICMD cmd;
128 DWORD dwCompression;
129 DWORD dwMask[3];
130 DWORD dwWidth;
131 DWORD dwHeight;
132 DWORD dwDCICaps;
133 DWORD dwBitCount;
134 LPVOID lpSurface;
135 } DCICREATEINPUT, *LPDCICREATEINPUT;
136
137 typedef struct _DCISURFACEINFO {
138 DWORD dwSize;
139 DWORD dwDCICaps;
140 DWORD dwCompression;
141 DWORD dwMask[3];
142 DWORD dwWidth;
143 DWORD dwHeight;
144 LONG lStride;
145 DWORD dwBitCount;
146 ULONG_PTR dwOffSurface;
147 WORD wSelSurface;
148 WORD wReserved;
149 DWORD dwReserved1;
150 DWORD dwReserved2;
151 DWORD dwReserved3;
152 DCIRVAL (CALLBACK *BeginAccess)(LPVOID, LPRECT);
153 void (CALLBACK *EndAccess)(LPVOID);
154 void (CALLBACK *DestroySurface)(LPVOID);
155 } DCISURFACEINFO, *LPDCISURFACEINFO, DCIPRIMARY, *LPDCIPRIMARY;
156
157 typedef void (*ENUM_CALLBACK)(LPDCISURFACEINFO lpSurfaceInfo,
158 LPVOID lpContext);
159
160 typedef struct _DCIENUMINPUT {
161 DCICMD cmd;
162 RECT rSrc;
163 RECT rDst;
164 void (CALLBACK *EnumCallback)(LPDCISURFACEINFO, LPVOID);
165 LPVOID lpContext;
166 } DCIENUMINPUT, *LPDCIENUMINPUT;
167
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;
174
175 typedef struct _DCIOVERLAY {
176 DCISURFACEINFO dciInfo;
177 DWORD dwChromakeyValue;
178 DWORD dwChromakeyMask;
179 } DCIOVERLAY, *LPDCIOVERLAY;
180
181 #ifdef __cplusplus
182 } /* extern "C" */
183 #endif
184
185 #endif /* __INC_DCIDDI */