Compile fix + handle case with no xml:base
[vlc.git] / activex / axvlc.idl
blobb29ee0777d78fb541c159c35e07d906a6ee547dd
1 /*****************************************************************************
2 * axvlc.idl: ActiveX control for VLC
3 *****************************************************************************
4 * Copyright (C) 2006 the VideoLAN team
6 * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
23 //comments terminated by [t] are by tonsofpcs, regarding the string review. April 02, 2006. [t]
24 //Possibly change all instances of "the current playlist" to "the playlist" and "current playlist" to "the playlist" [t]
26 import "oaidl.idl";
29 uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),
30 version(1.0),
31 helpstring("VideoLAN VLC ActiveX Plugin")
33 library AXVLC
35 // Forward declare all types defined in this typelib
36 interface IVLCControl;
37 interface IVLCAudio;
38 interface IVLCInput;
39 interface IVLCPlaylist;
40 interface IVLCVideo;
41 interface IVLCControl2;
42 dispinterface DVLCEvents;
44 importlib("stdole2.tlb");
46 typedef [public] enum VLCPlaylistMode
48 VLCPlayListInsert = 1,
49 VLCPlayListInsertAndGo = 9,
50 VLCPlayListReplace = 2,
51 VLCPlayListReplaceAndGo = 10,
52 VLCPlayListAppend = 4,
53 VLCPlayListAppendAndGo = 12,
54 VLCPlayListCheckInsert = 16
55 } eVLCPlaylistMode;
57 // playlist target position
58 const int VLCPlayListEnd = -666;
60 // DISPID definitions
61 const int DISPID_Visible = 100;
62 const int DISPID_Playing = 101;
63 const int DISPID_Position = 102;
64 const int DISPID_Time = 103;
65 const int DISPID_Length = 104;
66 const int DISPID_Volume = 105;
67 const int DISPID_MRL = 106;
68 const int DISPID_AutoPlay = 107;
69 const int DISPID_AutoLoop = 108;
70 const int DISPID_StartTime = 109;
71 const int DISPID_BaseURL = 110;
74 odl,
75 uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),
76 helpstring("VLC Control (deprecated)"),
77 dual,
78 hidden,
79 oleautomation
81 interface IVLCControl : IDispatch
83 [id(DISPID_Visible), propget, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
84 HRESULT Visible([out, retval] VARIANT_BOOL* visible);
85 [id(DISPID_Visible), propput, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
86 HRESULT Visible([in] VARIANT_BOOL visible);
87 [helpstring("Play current target in playlist.")]
88 HRESULT play();
89 [helpstring("Pause playback.")]
90 HRESULT pause();
91 [helpstring("Stop playback.")]
92 HRESULT stop();
93 [id(DISPID_Playing), hidden, propget, helpstring("Returns a value that determines whether VLC is currently playing.")]
94 HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);
95 [id(DISPID_Position), propget, helpstring("Returns/sets playback position within the current item. Position is a relative value ranging from 0.0 to 1.0.")]
96 HRESULT Position([out, retval] float* position);
97 [id(DISPID_Position), propput, helpstring("Returns/sets playback position within the current item. Position is a relative value ranging from 0.0 to 1.0.")]
98 HRESULT Position([in] float position);
99 [id(DISPID_Time), propget, helpstring("Returns/sets playback time relative to the start of the current item.")]
100 HRESULT Time([out, retval] int* seconds);
101 [id(DISPID_Time), propput, helpstring("Returns/sets playback time relative to the start of the current item.")]
102 HRESULT Time([in] int seconds);
103 [helpstring("Advance or backtrack playback time, relative to current time.")] //possibly find a better word to replace 'backtrack' [t]
104 HRESULT shuttle([in] int seconds);
105 [helpstring("Switch video between normal and fullscreen view modes.")]
106 HRESULT fullscreen();
107 [id(DISPID_Length), propget, hidden, helpstring("Returns the total length, in seconds, of the current item, may be unknown.")]
108 HRESULT Length([out, retval] int* seconds);
109 [helpstring("Increases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
110 HRESULT playFaster();
111 [helpstring("Decreases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
112 HRESULT playSlower();
113 [id(DISPID_Volume), propget, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")] //possibly remove % from 'ranges', change to 'values', and specify that 200 is equivilant to 200% (remember, 200% == 2.0, but this gets an int not a float) [t]
114 HRESULT Volume([out, retval] int* volume);
115 [id(DISPID_Volume), propput, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]
116 HRESULT Volume([in] int volume);
117 [helpstring("Mute/unmute playback audio.")]
118 HRESULT toggleMute();
119 [helpstring("Sets the value of a VLC variable.")]
120 HRESULT setVariable([in] BSTR name, [in] VARIANT value);
121 [helpstring("Returns the value of a VLC variable.")]
122 HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);
123 [helpstring("Add an item to the playlist.")]
126 ** use VARIANT rather than a SAFEARRAY as argument type
127 ** for compatibility with some scripting language (JScript)
130 HRESULT addTarget([in] BSTR uri, [in] VARIANT options, [in] enum VLCPlaylistMode mode, [in] int position);
131 [propget, helpstring("Returns index of current item in playlist.")]
132 HRESULT PlaylistIndex([out, retval] int* index);
133 [propget, helpstring("Returns number of items in playlist.")]
134 HRESULT PlaylistCount([out, retval] int* index);
135 [helpstring("Advance to next item in playlist.")]
136 HRESULT playlistNext();
137 [helpstring("Advance to previous item in playlist.")]
138 HRESULT playlistPrev();
139 [helpstring("Remove all items from playlist.")]
140 HRESULT playlistClear();
141 [propget, hidden, helpstring("Returns VLC Version.")]
142 HRESULT VersionInfo([out, retval] BSTR* version);
143 [id(DISPID_MRL), propget, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
144 HRESULT MRL([out, retval] BSTR* mrl);
145 [id(DISPID_MRL), propput, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
146 HRESULT MRL([in] BSTR mrl);
147 [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
148 HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
149 [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
150 HRESULT AutoPlay([in] VARIANT_BOOL autoplay);
151 [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
152 HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
153 [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
154 HRESULT AutoLoop([in] VARIANT_BOOL autoloop);
157 const int DISPID_PlayEvent = 100;
158 const int DISPID_PauseEvent = 101;
159 const int DISPID_StopEvent = 102;
162 uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),
163 helpstring("Event interface for VLC control"),
164 hidden
166 dispinterface DVLCEvents
168 properties:
169 methods:
170 [id(DISPID_PlayEvent), helpstring("Playing")]
171 void play();
172 [id(DISPID_PauseEvent), helpstring("Paused")]
173 void pause();
174 [id(DISPID_StopEvent), helpstring("Stopped")]
175 void stop();
179 odl,
180 uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),
181 helpstring("VLC Audio APIs"),
182 hidden,
183 dual,
184 nonextensible,
185 oleautomation
187 interface IVLCAudio : IDispatch
189 [propget, helpstring("Returns/sets the audio mute state.")]
190 HRESULT mute([out, retval] VARIANT_BOOL* muted);
191 [propput, helpstring("Returns/sets the audio mute state.")]
192 HRESULT mute([in] VARIANT_BOOL muted);
194 [propget, helpstring("Returns/sets audio volume as a percent value.")]
195 HRESULT volume([out, retval] int* volume);
196 [propput, helpstring("Returns/sets audio volume as a percent value.")]
197 HRESULT volume([in] int volume);
199 [helpstring("Mute/unmute audio playback.")]
200 HRESULT toggleMute();
204 odl,
205 uuid(49E0DBD1-9440-466C-9C97-95C67190C603),
206 helpstring("VLC Input APIs"),
207 hidden,
208 dual,
209 nonextensible,
210 oleautomation
212 interface IVLCInput : IDispatch
214 [propget, helpstring("Returns the clip length, in milliseconds.")]
215 HRESULT length([out, retval] double* length);
217 [propget, helpstring("Returns/sets playback position in current clip. Position is ranging from 0.0 to 1.0.")]
218 HRESULT position([out, retval] float* position);
219 [propput, helpstring("Returns/sets playback position in the current clip. Position ranging from 0.0 to 1.0.")]
220 HRESULT position([in] float position);
222 [propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]
223 HRESULT time([out, retval] double* time);
224 [propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]
225 HRESULT time([in] double time);
227 [propget, helpstring("Returns current playback state.")]
228 HRESULT state([out, retval] int* state);
230 [propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]
231 HRESULT rate([out, retval] float* rate);
232 [propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]
233 HRESULT rate([in] float rate);
235 [propget, helpstring("Returns current playback frames per seconds if available.")]
236 HRESULT fps([out, retval] float* fps);
238 [propget, helpstring("Returns whether current playback displays video.")]
239 HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);
243 odl,
244 uuid(54613049-40BF-4035-9E70-0A9312C0188D),
245 helpstring("VLC Playlist APIs"),
246 hidden,
247 dual,
248 nonextensible,
249 oleautomation
251 interface IVLCPlaylist : IDispatch
253 [propget, helpstring("Returns number of items in playlist.")]
254 HRESULT itemCount([out, retval] int* count);
256 [propget, helpstring("Returns whether playback displays video.")]
257 HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);
259 [helpstring("Add a playlist item.")]
260 HRESULT add([in] BSTR uri, [in, optional] VARIANT name, [in, optional] VARIANT options, [out, retval] int* item);
262 [helpstring("Play/Resume the playlist.")]
263 HRESULT play();
265 [helpstring("Play item in playlist.")]
266 HRESULT playItem([in] int item);
268 [helpstring("Play/Pause current clip.")]
269 HRESULT togglePause();
271 [helpstring("Stop current clip.")]
272 HRESULT stop();
274 [helpstring("Advance to next item in playlist.")]
275 HRESULT next();
277 [helpstring("Advance to previous item in playlist.")]
278 HRESULT prev();
280 [helpstring("Remove all items from playlist.")]
281 HRESULT clear();
283 [helpstring("remove item from playlist.")]
284 HRESULT removeItem([in] int item);
288 odl,
289 uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),
290 helpstring("VLC Video APIs"),
291 hidden,
292 dual,
293 nonextensible,
294 oleautomation
296 interface IVLCVideo : IDispatch
298 [propget, helpstring("Returns/sets the fullscreen state.")]
299 HRESULT fullscreen([out, retval] VARIANT_BOOL* fullscreen);
300 [propput, helpstring("Returns/sets the fullscreen state.")]
301 HRESULT fullscreen([in] VARIANT_BOOL fullscreen);
303 [propget, helpstring("Returns video original width.")]
304 HRESULT width([out, retval] int* width);
306 [propget, helpstring("Returns video original height.")]
307 HRESULT height([out, retval] int* height);
309 [helpstring("toggle fullscreen/windowed state.")]
310 HRESULT toggleFullscreen();
314 odl,
315 uuid(2D719729-5333-406C-BF12-8DE787FD65E3),
316 helpstring("VLC Control"),
317 hidden,
318 dual,
319 oleautomation
321 interface IVLCControl2 : IDispatch
323 [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
324 HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
325 [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
326 HRESULT AutoLoop([in] VARIANT_BOOL autoloop);
328 [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
329 HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
330 [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
331 HRESULT AutoPlay([in] VARIANT_BOOL autoplay);
333 [id(DISPID_BaseURL), propget, helpstring("Returns/sets the base URL for relative paths")]
334 HRESULT BaseURL([out, retval] BSTR* url);
335 [id(DISPID_BaseURL), propput, helpstring("Returns/sets the base URL for relative paths")]
336 HRESULT BaseURL([in] BSTR url);
338 [id(DISPID_StartTime), propget, helpstring("Returns/sets playback start time of URL.")]
339 HRESULT StartTime([out, retval] int* seconds);
340 [id(DISPID_StartTime), propput, helpstring("Returns/sets playback start time of URL.")]
341 HRESULT StartTime([in] int seconds);
343 [id(DISPID_MRL), propget, helpstring("Returns/sets the default MRL in playlist")]
344 HRESULT MRL([out, retval] BSTR* mrl);
345 [id(DISPID_MRL), propput, helpstring("Returns/sets the default MRL in playlist")]
346 HRESULT MRL([in] BSTR mrl);
348 [propget, helpstring("Returns VLC Version.")]
349 HRESULT VersionInfo([out, retval] BSTR* version);
351 [id(DISPID_Visible), propget, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
352 HRESULT Visible([out, retval] VARIANT_BOOL* visible);
353 [id(DISPID_Visible), propput, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
354 HRESULT Visible([in] VARIANT_BOOL visible);
356 [id(DISPID_Volume), propget, helpstring("Returns/sets default audio volume.")]
357 HRESULT Volume([out, retval] int* volume);
358 [id(DISPID_Volume), propput, helpstring("Returns/sets default audio volume.")]
359 HRESULT Volume([in] int volume);
361 [propget, helpstring("Returns the audio object.")]
362 HRESULT audio([out, retval] IVLCAudio** obj);
364 [propget, helpstring("Returns the audio object.")]
365 HRESULT input([out, retval] IVLCInput** obj);
367 [propget, helpstring("Returns the playlist object.")]
368 HRESULT playlist([out, retval] IVLCPlaylist** obj);
370 [propget, helpstring("Returns the audio object.")]
371 HRESULT video([out, retval] IVLCVideo** obj);
375 uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),
376 helpstring("VLC control (deprecated)"),
377 control
379 coclass VLCPlugin
381 [default] interface IVLCControl;
382 interface IVLCControl2;
383 [default, source] dispinterface DVLCEvents;
387 uuid(9BE31822-FDAD-461B-AD51-BE1D1C159921),
388 helpstring("VLC control"),
389 control
391 coclass VLCPlugin2
393 [default] interface IVLCControl2;
394 interface IVLCControl;
395 [default, source] dispinterface DVLCEvents;