- Add defines for the NMTBHOTITEM flag word.
[wine] / include / amvideo.h
1 /*
2  * Copyright (C) 2001 Hidenori Takeshima
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_AMVIDEO_H_
20 #define __WINE_AMVIDEO_H_
21
22 #include "ddraw.h"
23
24
25 typedef struct IBaseVideoMixer IBaseVideoMixer;
26 typedef struct IDirectDrawVideo IDirectDrawVideo;
27 typedef struct IFullScreenVideo IFullScreenVideo;
28 typedef struct IFullScreenVideoEx IFullScreenVideoEx;
29 typedef struct IQualProp IQualProp;
30
31
32 #define iEGA_COLORS     16
33 #define iPALETTE_COLORS 256
34 #define iMASK_COLORS    3
35 #define iRED    0
36 #define iGREEN  1
37 #define iBLUE   2
38
39 #define WIDTHBYTES(bits)        ((DWORD)((((DWORD)(bits)+31U)&(~31U))>>3))
40 #define DIBWIDTHBYTES(bi)       ((DWORD)WIDTHBYTES((bi).biWidth*(bi).biBitCount))
41 #define DIBSIZE(bi)     (DIBWIDTHBYTES(bi)*(DWORD)abs((bi).biHeight))
42
43
44 typedef struct
45 {
46         DWORD   dwBitMasks[iMASK_COLORS];
47         RGBQUAD bmiColors[iPALETTE_COLORS];
48 } TRUECOLORINFO;
49
50 typedef struct
51 {
52         RECT    rcSource;
53         RECT    rcTarget;
54         DWORD   dwBitRate;
55         DWORD   dwBitErrorRate;
56         REFERENCE_TIME  AvgTimePerFrame;
57         BITMAPINFOHEADER        bmiHeader;
58 } VIDEOINFOHEADER;
59
60 typedef struct
61 {
62         RECT    rcSource;
63         RECT    rcTarget;
64         DWORD   dwBitRate;
65         DWORD   dwBitErrorRate;
66         REFERENCE_TIME  AvgTimePerFrame;
67         BITMAPINFOHEADER        bmiHeader;
68
69     union {
70                 RGBQUAD bmiColors[iPALETTE_COLORS];
71                 DWORD   dwBitMasks[iMASK_COLORS];
72                 TRUECOLORINFO   TrueColorInfo;
73     } DUMMYUNIONNAME;
74 } VIDEOINFO;
75
76 typedef struct
77 {
78         VIDEOINFOHEADER hdr;
79         DWORD   dwStartTimeCode;
80         DWORD   cbSequenceHeader;
81         BYTE    bSequenceHeader[1];
82 } MPEG1VIDEOINFO;
83
84 typedef struct
85 {
86         RECT    rcSource;
87         RECT    rcTarget;
88         DWORD   dwActiveWidth;
89         DWORD   dwActiveHeight;
90         REFERENCE_TIME  AvgTimePerFrame;
91 } ANALOGVIDEOINFO;
92
93
94 /**************************************************************************
95  *
96  * IBaseVideoMixer interface
97  *
98  */
99
100 #define ICOM_INTERFACE IBaseVideoMixer
101 #define IBaseVideoMixer_METHODS \
102     ICOM_METHOD1(HRESULT,SetLeadPin,int,a1) \
103     ICOM_METHOD1(HRESULT,GetLeadPin,int*,a1) \
104     ICOM_METHOD1(HRESULT,GetInputPinCount,int*,a1) \
105     ICOM_METHOD1(HRESULT,IsUsingClock,int*,a1) \
106     ICOM_METHOD1(HRESULT,SetUsingClock,int,a1) \
107     ICOM_METHOD1(HRESULT,GetClockPeriod,int*,a1) \
108     ICOM_METHOD1(HRESULT,SetClockPeriod,int,a1)
109
110 #define IBaseVideoMixer_IMETHODS \
111     IUnknown_IMETHODS \
112     IBaseVideoMixer_METHODS
113
114 ICOM_DEFINE(IBaseVideoMixer,IUnknown)
115 #undef ICOM_INTERFACE
116
117     /*** IUnknown methods ***/
118 #define IBaseVideoMixer_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
119 #define IBaseVideoMixer_AddRef(p) ICOM_CALL (AddRef,p)
120 #define IBaseVideoMixer_Release(p) ICOM_CALL (Release,p)
121     /*** IBaseVideoMixer methods ***/
122 #define IBaseVideoMixer_SetLeadPin(p,a1) ICOM_CALL1(SetLeadPin,p,a1)
123 #define IBaseVideoMixer_GetLeadPin(p,a1) ICOM_CALL1(GetLeadPin,p,a1)
124 #define IBaseVideoMixer_GetInputPinCount(p,a1) ICOM_CALL1(GetInputPinCount,p,a1)
125 #define IBaseVideoMixer_IsUsingClock(p,a1) ICOM_CALL1(IsUsingClock,p,a1)
126 #define IBaseVideoMixer_SetUsingClock(p,a1) ICOM_CALL1(SetUsingClock,p,a1)
127 #define IBaseVideoMixer_GetClockPeriod(p,a1) ICOM_CALL1(GetClockPeriod,p,a1)
128 #define IBaseVideoMixer_SetClockPeriod(p,a1) ICOM_CALL1(SetClockPeriod,p,a1)
129
130 /**************************************************************************
131  *
132  * IDirectDrawVideo interface
133  *
134  */
135
136 #define ICOM_INTERFACE IDirectDrawVideo
137 #define IDirectDrawVideo_METHODS \
138     ICOM_METHOD1(HRESULT,GetSwitches,DWORD*,a1) \
139     ICOM_METHOD1(HRESULT,SetSwitches,DWORD,a1) \
140     ICOM_METHOD1(HRESULT,GetCaps,DDCAPS*,a1) \
141     ICOM_METHOD1(HRESULT,GetEmulatedCaps,DDCAPS*,a1) \
142     ICOM_METHOD1(HRESULT,GetSurfaceDesc,DDSURFACEDESC*,a1) \
143     ICOM_METHOD2(HRESULT,GetFourCCCodes,DWORD*,a1,DWORD*,a2) \
144     ICOM_METHOD1(HRESULT,SetDirectDraw,LPDIRECTDRAW,a1) \
145     ICOM_METHOD1(HRESULT,GetDirectDraw,LPDIRECTDRAW*,a1) \
146     ICOM_METHOD1(HRESULT,GetSurfaceType,DWORD*,a1) \
147     ICOM_METHOD(HRESULT,SetDefault) \
148     ICOM_METHOD1(HRESULT,UseScanLine,long,a1) \
149     ICOM_METHOD1(HRESULT,CanUseScanLine,long*,a1) \
150     ICOM_METHOD1(HRESULT,UseOverlayStretch,long,a1) \
151     ICOM_METHOD1(HRESULT,CanUseOverlayStretch,long*,a1) \
152     ICOM_METHOD1(HRESULT,UseWhenFullScreen,long,a1) \
153     ICOM_METHOD1(HRESULT,WillUseFullScreen,long*,a1)
154
155 #define IDirectDrawVideo_IMETHODS \
156     IUnknown_IMETHODS \
157     IDirectDrawVideo_METHODS
158
159 ICOM_DEFINE(IDirectDrawVideo,IUnknown)
160 #undef ICOM_INTERFACE
161
162     /*** IUnknown methods ***/
163 #define IDirectDrawVideo_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
164 #define IDirectDrawVideo_AddRef(p) ICOM_CALL (AddRef,p)
165 #define IDirectDrawVideo_Release(p) ICOM_CALL (Release,p)
166     /*** IDirectDrawVideo methods ***/
167 #define IDirectDrawVideo_GetSwitches(p,a1) ICOM_CALL1(GetSwitches,p,a1)
168 #define IDirectDrawVideo_SetSwitches(p,a1) ICOM_CALL1(SetSwitches,p,a1)
169 #define IDirectDrawVideo_GetCaps(p,a1) ICOM_CALL1(GetCaps,p,a1)
170 #define IDirectDrawVideo_GetEmulatedCaps(p,a1) ICOM_CALL1(GetEmulatedCaps,p,a1)
171 #define IDirectDrawVideo_GetSurfaceDesc(p,a1) ICOM_CALL1(GetSurfaceDesc,p,a1)
172 #define IDirectDrawVideo_GetFourCCCodes(p,a1,a2) ICOM_CALL2(GetFourCCCodes,p,a1,a2)
173 #define IDirectDrawVideo_SetDirectDraw(p,a1) ICOM_CALL1(SetDirectDraw,p,a1)
174 #define IDirectDrawVideo_GetDirectDraw(p,a1) ICOM_CALL1(GetDirectDraw,p,a1)
175 #define IDirectDrawVideo_GetSurfaceType(p,a1) ICOM_CALL1(GetSurfaceType,p,a1)
176 #define IDirectDrawVideo_SetDefault(p) ICOM_CALL (SetDefault,p)
177 #define IDirectDrawVideo_UseScanLine(p,a1) ICOM_CALL1(UseScanLine,p,a1)
178 #define IDirectDrawVideo_CanUseScanLine(p,a1) ICOM_CALL1(CanUseScanLine,p,a1)
179 #define IDirectDrawVideo_UseOverlayStretch(p,a1) ICOM_CALL1(UseOverlayStretch,p,a1)
180 #define IDirectDrawVideo_CanUseOverlayStretch(p,a1) ICOM_CALL1(CanUseOverlayStretch,p,a1)
181 #define IDirectDrawVideo_UseWhenFullScreen(p,a1) ICOM_CALL1(UseWhenFullScreen,p,a1)
182 #define IDirectDrawVideo_WillUseFullScreen(p,a1) ICOM_CALL1(WillUseFullScreen,p,a1)
183
184 /**************************************************************************
185  *
186  * IFullScreenVideo interface
187  *
188  */
189
190 #define ICOM_INTERFACE IFullScreenVideo
191 #define IFullScreenVideo_METHODS \
192     ICOM_METHOD1(HRESULT,CountModes,long*,a1) \
193     ICOM_METHOD4(HRESULT,GetModeInfo,long,a1,long*,a2,long*,a3,long*,a4) \
194     ICOM_METHOD1(HRESULT,GetCurrentMode,long*,a1) \
195     ICOM_METHOD1(HRESULT,IsModeAvailable,long,a1) \
196     ICOM_METHOD1(HRESULT,IsModeEnabled,long,a1) \
197     ICOM_METHOD2(HRESULT,SetEnabled,long,a1,long,a2) \
198     ICOM_METHOD1(HRESULT,GetClipFactor,long*,a1) \
199     ICOM_METHOD1(HRESULT,SetClipFactor,long,a1) \
200     ICOM_METHOD1(HRESULT,SetMessageDrain,HWND,a1) \
201     ICOM_METHOD1(HRESULT,GetMessageDrain,HWND*,a1) \
202     ICOM_METHOD1(HRESULT,SetMonitor,long,a1) \
203     ICOM_METHOD1(HRESULT,GetMonitor,long*,a1) \
204     ICOM_METHOD1(HRESULT,HideOnDeactivate,long,a1) \
205     ICOM_METHOD(HRESULT,IsHideOnDeactivate) \
206     ICOM_METHOD1(HRESULT,SetCaption,BSTR,a1) \
207     ICOM_METHOD1(HRESULT,GetCaption,BSTR*,a1) \
208     ICOM_METHOD(HRESULT,SetDefault)
209
210 #define IFullScreenVideo_IMETHODS \
211     IUnknown_IMETHODS \
212     IFullScreenVideo_METHODS
213
214 ICOM_DEFINE(IFullScreenVideo,IUnknown)
215 #undef ICOM_INTERFACE
216
217     /*** IUnknown methods ***/
218 #define IFullScreenVideo_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
219 #define IFullScreenVideo_AddRef(p) ICOM_CALL (AddRef,p)
220 #define IFullScreenVideo_Release(p) ICOM_CALL (Release,p)
221     /*** IFullScreenVideo methods ***/
222 #define IFullScreenVideo_CountModes(p,a1) ICOM_CALL1(CountModes,p,a1)
223 #define IFullScreenVideo_GetModeInfo(p,a1,a2,a3,a4) ICOM_CALL4(GetModeInfo,p,a1,a2,a3,a4)
224 #define IFullScreenVideo_GetCurrentMode(p,a1) ICOM_CALL1(GetCurrentMode,p,a1)
225 #define IFullScreenVideo_IsModeAvailable(p,a1) ICOM_CALL1(IsModeAvailable,p,a1)
226 #define IFullScreenVideo_IsModeEnabled(p,a1) ICOM_CALL1(IsModeEnabled,p,a1)
227 #define IFullScreenVideo_SetEnabled(p,a1,a2) ICOM_CALL2(SetEnabled,p,a1,a2)
228 #define IFullScreenVideo_GetClipFactor(p,a1) ICOM_CALL1(GetClipFactor,p,a1)
229 #define IFullScreenVideo_SetClipFactor(p,a1) ICOM_CALL1(SetClipFactor,p,a1)
230 #define IFullScreenVideo_SetMessageDrain(p,a1) ICOM_CALL1(SetMessageDrain,p,a1)
231 #define IFullScreenVideo_GetMessageDrain(p,a1) ICOM_CALL1(GetMessageDrain,p,a1)
232 #define IFullScreenVideo_SetMonitor(p,a1) ICOM_CALL1(SetMonitor,p,a1)
233 #define IFullScreenVideo_GetMonitor(p,a1) ICOM_CALL1(GetMonitor,p,a1)
234 #define IFullScreenVideo_HideOnDeactivate(p,a1) ICOM_CALL1(HideOnDeactivate,p,a1)
235 #define IFullScreenVideo_IsHideOnDeactivate(p) ICOM_CALL (IsHideOnDeactivate,p)
236 #define IFullScreenVideo_SetCaption(p,a1) ICOM_CALL1(SetCaption,p,a1)
237 #define IFullScreenVideo_GetCaption(p,a1) ICOM_CALL1(GetCaption,p,a1)
238 #define IFullScreenVideo_SetDefault(p) ICOM_CALL (SetDefault,p)
239
240 /**************************************************************************
241  *
242  * IFullScreenVideoEx interface
243  *
244  */
245
246 #define ICOM_INTERFACE IFullScreenVideoEx
247 #define IFullScreenVideoEx_METHODS \
248     ICOM_METHOD2(HRESULT,SetAcceleratorTable,HWND,a1,HACCEL,a2) \
249     ICOM_METHOD2(HRESULT,GetAcceleratorTable,HWND*,a1,HACCEL*,a2) \
250     ICOM_METHOD1(HRESULT,KeepPixelAspectRatio,long,a1) \
251     ICOM_METHOD1(HRESULT,IsKeepPixelAspectRatio,long*,a1)
252
253 #define IFullScreenVideoEx_IMETHODS \
254     IFullScreenVideo_IMETHODS \
255     IFullScreenVideoEx_METHODS
256
257 ICOM_DEFINE(IFullScreenVideoEx,IFullScreenVideo)
258 #undef ICOM_INTERFACE
259
260     /*** IUnknown methods ***/
261 #define IFullScreenVideoEx_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
262 #define IFullScreenVideoEx_AddRef(p) ICOM_CALL (AddRef,p)
263 #define IFullScreenVideoEx_Release(p) ICOM_CALL (Release,p)
264     /*** IFullScreenVideo methods ***/
265 #define IFullScreenVideoEx_CountModes(p,a1) ICOM_CALL1(CountModes,p,a1)
266 #define IFullScreenVideoEx_GetModeInfo(p,a1,a2,a3,a4) ICOM_CALL4(GetModeInfo,p,a1,a2,a3,a4)
267 #define IFullScreenVideoEx_GetCurrentMode(p,a1) ICOM_CALL1(GetCurrentMode,p,a1)
268 #define IFullScreenVideoEx_IsModeAvailable(p,a1) ICOM_CALL1(IsModeAvailable,p,a1)
269 #define IFullScreenVideoEx_IsModeEnabled(p,a1) ICOM_CALL1(IsModeEnabled,p,a1)
270 #define IFullScreenVideoEx_SetEnabled(p,a1,a2) ICOM_CALL2(SetEnabled,p,a1,a2)
271 #define IFullScreenVideoEx_GetClipFactor(p,a1) ICOM_CALL1(GetClipFactor,p,a1)
272 #define IFullScreenVideoEx_SetClipFactor(p,a1) ICOM_CALL1(SetClipFactor,p,a1)
273 #define IFullScreenVideoEx_SetMessageDrain(p,a1) ICOM_CALL1(SetMessageDrain,p,a1)
274 #define IFullScreenVideoEx_GetMessageDrain(p,a1) ICOM_CALL1(GetMessageDrain,p,a1)
275 #define IFullScreenVideoEx_SetMonitor(p,a1) ICOM_CALL1(SetMonitor,p,a1)
276 #define IFullScreenVideoEx_GetMonitor(p,a1) ICOM_CALL1(GetMonitor,p,a1)
277 #define IFullScreenVideoEx_HideOnDeactivate(p,a1) ICOM_CALL1(HideOnDeactivate,p,a1)
278 #define IFullScreenVideoEx_IsHideOnDeactivate(p) ICOM_CALL (IsHideOnDeactivate,p)
279 #define IFullScreenVideoEx_SetCaption(p,a1) ICOM_CALL1(SetCaption,p,a1)
280 #define IFullScreenVideoEx_GetCaption(p,a1) ICOM_CALL1(GetCaption,p,a1)
281 #define IFullScreenVideoEx_SetDefault(p) ICOM_CALL (SetDefault,p)
282     /*** IFullScreenVideoEx methods ***/
283 #define IFullScreenVideoEx_SetAcceleratorTable(p,a1,a2) ICOM_CALL2(SetAcceleratorTable,p,a1,a2)
284 #define IFullScreenVideoEx_GetAcceleratorTable(p,a1,a2) ICOM_CALL2(GetAcceleratorTable,p,a1,a2)
285 #define IFullScreenVideoEx_KeepPixelAspectRatio(p,a1) ICOM_CALL1(KeepPixelAspectRatio,p,a1)
286 #define IFullScreenVideoEx_IsKeepPixelAspectRatio(p,a1) ICOM_CALL1(IsKeepPixelAspectRatio,p,a1)
287
288 /**************************************************************************
289  *
290  * IQualProp interface
291  *
292  */
293
294 #define ICOM_INTERFACE IQualProp
295 #define IQualProp_METHODS \
296     ICOM_METHOD1(HRESULT,get_FramesDroppedInRenderer,int*,a1) \
297     ICOM_METHOD1(HRESULT,get_FramesDrawn,int*,a1) \
298     ICOM_METHOD1(HRESULT,get_AvgFrameRate,int*,a1) \
299     ICOM_METHOD1(HRESULT,get_Jitter,int*,a1) \
300     ICOM_METHOD1(HRESULT,get_AvgSyncOffset,int*,a1) \
301     ICOM_METHOD1(HRESULT,get_DevSyncOffset,int*,a1)
302
303 #define IQualProp_IMETHODS \
304     IUnknown_IMETHODS \
305     IQualProp_METHODS
306
307 ICOM_DEFINE(IQualProp,IUnknown)
308 #undef ICOM_INTERFACE
309
310     /*** IUnknown methods ***/
311 #define IQualProp_QueryInterface(p,a1,a2) ICOM_CALL2(QueryInterface,p,a1,a2)
312 #define IQualProp_AddRef(p) ICOM_CALL (AddRef,p)
313 #define IQualProp_Release(p) ICOM_CALL (Release,p)
314     /*** IQualProp methods ***/
315 #define IQualProp_get_FramesDroppedInRenderer(p,a1) ICOM_CALL1(get_FramesDroppedInRenderer,p,a1)
316 #define IQualProp_get_FramesDrawn(p,a1) ICOM_CALL1(get_FramesDrawn,p,a1)
317 #define IQualProp_get_AvgFrameRate(p,a1) ICOM_CALL1(get_AvgFrameRate,p,a1)
318 #define IQualProp_get_Jitter(p,a1) ICOM_CALL1(get_Jitter,p,a1)
319 #define IQualProp_get_AvgSyncOffset(p,a1) ICOM_CALL1(get_AvgSyncOffset,p,a1)
320 #define IQualProp_get_DevSyncOffset(p,a1) ICOM_CALL1(get_DevSyncOffset,p,a1)
321
322
323 #endif  /* __WINE_AMVIDEO_H_ */