widl: Generate helper macros for WinRT implementation.
[wine/zf.git] / include / amvideo.idl
blobf3dc45fb29e20a4d748e09914dc9f635156bce09
1 /*
2 * Copyright (C) 2003 Robert Shearman
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "objidl.idl";
21 /* trick widl into thinking that it knows the DirectDraw types
22 * as there is no IDL file for them (yet) */
23 cpp_quote("#if 0")
24 interface IDirectDraw;
25 typedef void DDSURFACEDESC,DDCAPS;
26 typedef DWORD RGBQUAD;
27 typedef LONGLONG REFERENCE_TIME;
28 typedef struct
30 DWORD biSize;
31 LONG biWidth;
32 LONG biHeight;
33 WORD biPlanes;
34 WORD biBitCount;
35 DWORD biCompression;
36 DWORD biSizeImage;
37 LONG biXPelsPerMeter;
38 LONG biYPelsPerMeter;
39 DWORD biClrUsed;
40 DWORD biClrImportant;
41 } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
42 cpp_quote("#endif")
44 cpp_quote("#include <ddraw.h>")
46 cpp_quote("#define AMDDS_NONE 0x00")
47 cpp_quote("#define AMDDS_DCIPS 0x01")
48 cpp_quote("#define AMDDS_PS 0x02")
49 cpp_quote("#define AMDDS_RGBOVR 0x04")
50 cpp_quote("#define AMDDS_YUVOVR 0x08")
51 cpp_quote("#define AMDDS_RGBOFF 0x10")
52 cpp_quote("#define AMDDS_YUVOFF 0x20")
53 cpp_quote("#define AMDDS_RGBFLP 0x40")
54 cpp_quote("#define AMDDS_YUVFLP 0x80")
55 cpp_quote("#define AMDDS_ALL 0xFF")
56 cpp_quote("#define AMDDS_DEFAULT AMDDS_ALL")
58 cpp_quote("#define AMDDS_YUV (AMDDS_YUVOFF | AMDDS_YUVOVR | AMDDS_YUVFLP)")
59 cpp_quote("#define AMDDS_RGB (AMDDS_RGBOFF | AMDDS_RGBOVR | AMDDS_RGBFLP)")
60 cpp_quote("#define AMDSS_PRIMARY (AMDDS_DCIPS | AMDDS_PS)")
63 object,
64 /* uuid(36d39eb0-dd75-11ce-bf0e-00aa0055595a) conflicts with uuids.h */
65 pointer_default(unique),
66 local
68 interface IDirectDrawVideo : IUnknown
70 HRESULT GetSwitches([out] DWORD * pSwitches);
71 HRESULT SetSwitches([in] DWORD Switches);
72 HRESULT GetCaps([out] DDCAPS * pCaps);
73 HRESULT GetEmulatedCaps([out] DDCAPS *pCaps);
74 HRESULT GetSurfaceDesc([out] DDSURFACEDESC * pSurfaceDesc);
75 HRESULT GetFourCCCodes([out] DWORD * pCount, [out] DWORD * pCodes);
76 HRESULT SetDirectDraw([in] IDirectDraw *ddraw);
77 HRESULT GetDirectDraw([out] IDirectDraw **ddraw);
78 HRESULT GetSurfaceType([out] DWORD * pSurfaceType);
79 HRESULT SetDefault();
80 HRESULT UseScanLine([in] long UseScanLine);
81 HRESULT CanUseScanLine([out] long * UseScanLine);
82 HRESULT UseOverlayStretch([in] long UseOverlayStretch);
83 HRESULT CanUseOverlayStretch([out] long * UseOverlayStretch);
84 HRESULT UseWhenFullScreen([in] long UseWhenFullScreen);
85 HRESULT WillUseFullScreen([out] long * UseWhenFullScreen);
89 object,
90 /* uuid(1bd0ecb0-f8e2-11ce-aac6-0020af0b99a3) conflicts with uuids.h */
91 pointer_default(unique),
92 local
94 interface IQualProp : IUnknown
96 [propget] HRESULT FramesDroppedInRenderer([out] int * pcFrames);
97 [propget] HRESULT FramesDrawn([out] int * pcFramesDrawn);
98 [propget] HRESULT AvgFrameRate([out] int * piAvgFrameRate);
99 [propget] HRESULT Jitter([out] int * iJitter);
100 [propget] HRESULT AvgSyncOffset([out] int * piAvg);
101 [propget] HRESULT DevSyncOffset([out] int * piDev);
105 object,
106 /* uuid(dd1d7110-7836-11cf-bf47-00aa0055595a) conflicts with uuids.h */
107 pointer_default(unique)
109 interface IFullScreenVideo : IUnknown
111 HRESULT CountModes([out] long * pModes);
112 HRESULT GetModeInfo([in] long Mode, [out] long * pWidth, [out] long * pHeight, [out] long * pDepth);
113 HRESULT GetCurrentMode([out] long * pMode);
114 HRESULT IsModeAvailable([in] long Mode);
115 HRESULT IsModeEnabled([in] long Mode);
116 HRESULT SetEnabled([in] long Mode, [in] long bEnabled);
117 HRESULT GetClipFactor([out] long * pClipFactor);
118 HRESULT SetClipFactor([in] long ClipFactor);
119 HRESULT SetMessageDrain([in] HWND hwnd);
120 HRESULT GetMessageDrain([out] HWND * hwnd);
121 HRESULT SetMonitor([in] long Monitor);
122 HRESULT GetMonitor([out] long * Monitor);
123 HRESULT HideOnDeactivate([in] long Hide);
124 HRESULT IsHideOnDeactivate();
125 HRESULT SetCaption([in] BSTR strCaption);
126 HRESULT GetCaption([out] BSTR * pstrCaption);
127 HRESULT SetDefault();
131 object,
132 /* uuid(53479470-f1dd-11cf-bc42-00aa00ac74f6) conflicts with uuids.h */
133 pointer_default(unique),
134 local
136 interface IFullScreenVideoEx : IFullScreenVideo
138 HRESULT SetAcceleratorTable([in] HWND hwnd, [in] HACCEL hAccel);
139 HRESULT GetAcceleratorTable([out] HWND * phwnd, [out] HACCEL * phAccel);
140 HRESULT KeepPixelAspectRatio([in] long KeepAspect);
141 /* FIXME: not sure is this next method is an [out] */
142 HRESULT IsKeepPixelAspectRatio([out] long * pKeepAspect);
146 object,
147 /* uuid(61ded640-e912-11ce-a099-00aa00479a58) conflicts with uuids.h */
148 pointer_default(unique),
149 local
151 interface IBaseVideoMixer : IUnknown
153 HRESULT SetLeadPin([in] int iPin);
154 HRESULT GetLeadPin([out] int * piPin);
155 HRESULT GetInputPinCount([out] int * piPinCount);
156 HRESULT IsUsingClock([out] int * pbValue);
157 HRESULT SetUsingClock([in] int bValue);
158 HRESULT GetClockPeriod([out] int * pbValue);
159 HRESULT SetClockPeriod([in] int bValue);
162 #define iPALETTE_COLORS 256
163 #define iMASK_COLORS 3
165 cpp_quote("#define iPALETTE_COLORS 256")
166 cpp_quote("#define iEGA_COLORS 16")
167 cpp_quote("#define iMASK_COLORS 3")
168 cpp_quote("#define iTRUECOLOR 16")
169 cpp_quote("#define iRED 0")
170 cpp_quote("#define iGREEN 1")
171 cpp_quote("#define iBLUE 2")
172 cpp_quote("#define iPALETTE 8")
173 cpp_quote("#define iMAXBITS 8")
175 typedef struct tag_TRUECOLORINFO
177 DWORD dwBitMasks[iMASK_COLORS];
178 RGBQUAD bmiColors[iPALETTE_COLORS];
179 } TRUECOLORINFO;
181 typedef struct tagVIDEOINFOHEADER
183 RECT rcSource;
184 RECT rcTarget;
185 DWORD dwBitRate;
186 DWORD dwBitErrorRate;
187 REFERENCE_TIME AvgTimePerFrame;
189 BITMAPINFOHEADER bmiHeader;
190 } VIDEOINFOHEADER;
192 typedef struct tagVIDEOINFO
194 RECT rcSource;
195 RECT rcTarget;
196 DWORD dwBitRate;
197 DWORD dwBitErrorRate;
198 REFERENCE_TIME AvgTimePerFrame;
200 BITMAPINFOHEADER bmiHeader;
202 union
204 RGBQUAD bmiColors[iPALETTE_COLORS];
205 DWORD dwBitMasks[iMASK_COLORS];
206 TRUECOLORINFO TrueColorInfo;
208 } VIDEOINFO;
210 typedef struct tagMPEG1VIDEOINFO
212 VIDEOINFOHEADER hdr;
213 DWORD dwStartTimeCode;
214 DWORD cbSequenceHeader;
215 BYTE bSequenceHeader[1];
216 } MPEG1VIDEOINFO;
218 cpp_quote("#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140")
219 cpp_quote("#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)")
221 typedef struct tagAnalogVideoInfo
223 RECT rcSource;
224 RECT rcTarget;
225 DWORD dwActiveWidth;
226 DWORD dwActiveHeight;
227 REFERENCE_TIME AvgTimePerFrame;
228 } ANALOGVIDEOINFO;
230 typedef enum
232 AM_PROPERTY_FRAMESTEP_STEP = 0x01,
233 AM_PROPERTY_FRAMESTEP_CANCEL = 0x02,
234 AM_PROPERTY_FRAMESTEP_CANSTEP = 0x03,
235 AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x04
236 } AM_PROPERTY_FRAMESTEP;
238 typedef struct _AM_FRAMESTEP_STEP
240 DWORD dwFramesToStep;
241 } AM_FRAMESTEP_STEP;