1 /*****************************************************************************
\r
2 * axvlc.idl: ActiveX control for VLC
\r
3 *****************************************************************************
\r
4 * Copyright (C) 2006 the VideoLAN team
\r
6 * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
\r
8 * This program is free software; you can redistribute it and/or modify
\r
9 * it under the terms of the GNU General Public License as published by
\r
10 * the Free Software Foundation; either version 2 of the License, or
\r
11 * (at your option) any later version.
\r
13 * This program is distributed in the hope that it will be useful,
\r
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 * GNU General Public License for more details.
\r
18 * You should have received a copy of the GNU General Public License
\r
19 * along with this program; if not, write to the Free Software
\r
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
\r
21 *****************************************************************************/
\r
23 //comments terminated by [t] are by tonsofpcs, regarding the string review. April 02, 2006. [t]
\r
24 //Possibly change all instances of "the current playlist" to "the playlist" and "current playlist" to "the playlist" [t]
\r
29 uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),
\r
31 helpstring("VideoLAN VLC ActiveX Plugin")
\r
35 // Forward declare all types defined in this typelib
\r
36 interface IVLCControl;
\r
37 interface IVLCAudio;
\r
38 interface IVLCInput;
\r
40 interface IVLCMessage;
\r
41 interface IVLCMessageIterator;
\r
42 interface IVLCMessages;
\r
43 interface IVLCPlaylist;
\r
44 interface IVLCVideo;
\r
45 interface IVLCControl2;
\r
46 dispinterface DVLCEvents;
\r
48 importlib("stdole2.tlb");
\r
50 typedef [public] enum VLCPlaylistMode
\r
52 VLCPlayListInsert = 1,
\r
53 VLCPlayListInsertAndGo = 9,
\r
54 VLCPlayListReplace = 2,
\r
55 VLCPlayListReplaceAndGo = 10,
\r
56 VLCPlayListAppend = 4,
\r
57 VLCPlayListAppendAndGo = 12,
\r
58 VLCPlayListCheckInsert = 16
\r
61 // playlist target position
\r
62 const int VLCPlayListEnd = -666;
\r
64 // DISPID definitions
\r
65 const int DISPID_Visible = 100;
\r
66 const int DISPID_Playing = 101;
\r
67 const int DISPID_Position = 102;
\r
68 const int DISPID_Time = 103;
\r
69 const int DISPID_Length = 104;
\r
70 const int DISPID_Volume = 105;
\r
71 const int DISPID_MRL = 106;
\r
72 const int DISPID_AutoPlay = 107;
\r
73 const int DISPID_AutoLoop = 108;
\r
74 const int DISPID_StartTime = 109;
\r
75 const int DISPID_BaseURL = 110;
\r
79 uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),
\r
80 helpstring("VLC Control (deprecated)"),
\r
84 interface IVLCControl : IDispatch
\r
86 [id(DISPID_Visible), propget, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
\r
87 HRESULT Visible([out, retval] VARIANT_BOOL* visible);
\r
88 [id(DISPID_Visible), propput, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
\r
89 HRESULT Visible([in] VARIANT_BOOL visible);
\r
90 [helpstring("Play current target in playlist.")]
\r
92 [helpstring("Pause playback.")]
\r
94 [helpstring("Stop playback.")]
\r
96 [id(DISPID_Playing), hidden, propget, helpstring("Returns a value that determines whether VLC is currently playing.")]
\r
97 HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);
\r
98 [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.")]
\r
99 HRESULT Position([out, retval] float* position);
\r
100 [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.")]
\r
101 HRESULT Position([in] float position);
\r
102 [id(DISPID_Time), propget, helpstring("Returns/sets playback time relative to the start of the current item.")]
\r
103 HRESULT Time([out, retval] int* seconds);
\r
104 [id(DISPID_Time), propput, helpstring("Returns/sets playback time relative to the start of the current item.")]
\r
105 HRESULT Time([in] int seconds);
\r
106 [helpstring("Advance or backtrack playback time, relative to current time.")] //possibly find a better word to replace 'backtrack' [t]
\r
107 HRESULT shuttle([in] int seconds);
\r
108 [helpstring("Switch video between normal and fullscreen view modes.")]
\r
109 HRESULT fullscreen();
\r
110 [id(DISPID_Length), propget, hidden, helpstring("Returns the total length, in seconds, of the current item, may be unknown.")]
\r
111 HRESULT Length([out, retval] int* seconds);
\r
112 [helpstring("Increases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
\r
113 HRESULT playFaster();
\r
114 [helpstring("Decreases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
\r
115 HRESULT playSlower();
\r
116 [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]
\r
117 HRESULT Volume([out, retval] int* volume);
\r
118 [id(DISPID_Volume), propput, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]
\r
119 HRESULT Volume([in] int volume);
\r
120 [helpstring("Mute/unmute playback audio.")]
\r
121 HRESULT toggleMute();
\r
122 [helpstring("Sets the value of a VLC variable.")]
\r
123 HRESULT setVariable([in] BSTR name, [in] VARIANT value);
\r
124 [helpstring("Returns the value of a VLC variable.")]
\r
125 HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);
\r
126 [helpstring("Add an item to the playlist.")]
\r
129 ** use VARIANT rather than a SAFEARRAY as argument type
\r
130 ** for compatibility with some scripting language (JScript)
\r
133 HRESULT addTarget([in] BSTR uri, [in] VARIANT options, [in] enum VLCPlaylistMode mode, [in] int position);
\r
134 [propget, helpstring("Returns index of current item in playlist.")]
\r
135 HRESULT PlaylistIndex([out, retval] int* index);
\r
136 [propget, helpstring("Returns number of items in playlist.")]
\r
137 HRESULT PlaylistCount([out, retval] int* index);
\r
138 [helpstring("Advance to next item in playlist.")]
\r
139 HRESULT playlistNext();
\r
140 [helpstring("Advance to previous item in playlist.")]
\r
141 HRESULT playlistPrev();
\r
142 [helpstring("Remove all items from playlist.")]
\r
143 HRESULT playlistClear();
\r
144 [propget, hidden, helpstring("Returns VLC Version.")]
\r
145 HRESULT VersionInfo([out, retval] BSTR* version);
\r
146 [id(DISPID_MRL), propget, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
\r
147 HRESULT MRL([out, retval] BSTR* mrl);
\r
148 [id(DISPID_MRL), propput, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
\r
149 HRESULT MRL([in] BSTR mrl);
\r
150 [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
\r
151 HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
\r
152 [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
\r
153 HRESULT AutoPlay([in] VARIANT_BOOL autoplay);
\r
154 [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
\r
155 HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
\r
156 [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
\r
157 HRESULT AutoLoop([in] VARIANT_BOOL autoloop);
\r
160 const int DISPID_PlayEvent = 100;
\r
161 const int DISPID_PauseEvent = 101;
\r
162 const int DISPID_StopEvent = 102;
\r
165 uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),
\r
166 helpstring("Event interface for VLC control"),
\r
168 dispinterface DVLCEvents
\r
172 [id(DISPID_PlayEvent), helpstring("Playing")]
\r
174 [id(DISPID_PauseEvent), helpstring("Paused")]
\r
176 [id(DISPID_StopEvent), helpstring("Stopped")]
\r
182 uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),
\r
183 helpstring("VLC Audio APIs"),
\r
187 interface IVLCAudio : IDispatch
\r
189 [propget, helpstring("Returns/sets the audio mute state.")]
\r
190 HRESULT mute([out, retval] VARIANT_BOOL* muted);
\r
191 [propput, helpstring("Returns/sets the audio mute state.")]
\r
192 HRESULT mute([in] VARIANT_BOOL muted);
\r
194 [propget, helpstring("Returns/sets audio volume as a percent value.")]
\r
195 HRESULT volume([out, retval] long* volume);
\r
196 [propput, helpstring("Returns/sets audio volume as a percent value.")]
\r
197 HRESULT volume([in] long volume);
\r
199 [helpstring("Mute/unmute audio playback.")]
\r
200 HRESULT toggleMute();
\r
205 uuid(49E0DBD1-9440-466C-9C97-95C67190C603),
\r
206 helpstring("VLC Input APIs"),
\r
210 interface IVLCInput : IDispatch
\r
212 [propget, helpstring("Returns the clip length, in milliseconds.")]
\r
213 HRESULT length([out, retval] double* length);
\r
215 [propget, helpstring("Returns/sets playback position in current clip. Position is ranging from 0.0 to 1.0.")]
\r
216 HRESULT position([out, retval] double* position);
\r
217 [propput, helpstring("Returns/sets playback position in the current clip. Position ranging from 0.0 to 1.0.")]
\r
218 HRESULT position([in] double position);
\r
220 [propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]
\r
221 HRESULT time([out, retval] double* time);
\r
222 [propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]
\r
223 HRESULT time([in] double time);
\r
225 [propget, helpstring("Returns current playback state.")]
\r
226 HRESULT state([out, retval] long* state);
\r
228 [propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]
\r
229 HRESULT rate([out, retval] double* rate);
\r
230 [propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]
\r
231 HRESULT rate([in] double rate);
\r
233 [propget, helpstring("Returns current playback frames per seconds if available.")]
\r
234 HRESULT fps([out, retval] double* fps);
\r
236 [propget, helpstring("Returns whether current playback displays video.")]
\r
237 HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);
\r
242 uuid(9ED00AFA-7BCD-4FFF-8D48-7DD4DB2C800D),
\r
243 helpstring("VLC Log Message"),
\r
247 interface IVLCMessage: IDispatch
\r
249 [id(DISPID_VALUE), propget]
\r
250 HRESULT _Value([out, retval] VARIANT* message);
\r
252 [propget, helpstring("Returns message severity.")]
\r
253 HRESULT severity([out, retval] long* level);
\r
255 [propget, helpstring("Returns message issuer type.")]
\r
256 HRESULT type([out, retval] BSTR* type);
\r
258 [propget, helpstring("Returns message issuer name.")]
\r
259 HRESULT name([out, retval] BSTR* name);
\r
261 [propget, helpstring("Returns message header.")]
\r
262 HRESULT header([out, retval] BSTR* header);
\r
264 [propget, helpstring("Returns message content.")]
\r
265 HRESULT message([out, retval] BSTR* message);
\r
270 uuid(15179CD8-CC12-4242-A58E-E412217FF343),
\r
271 helpstring("VLC Log iterator"),
\r
275 interface IVLCMessageIterator : IDispatch
\r
277 [propget, helpstring("Returns whether a message is available.")]
\r
278 HRESULT hasNext([out, retval] VARIANT_BOOL* hasNext);
\r
280 [helpstring("Returns next message.")]
\r
281 HRESULT next([out, retval] IVLCMessage** msg);
\r
286 uuid(6C5CE55D-2D6C-4AAD-8299-C62D2371F106),
\r
287 helpstring("VLC Log Messages Collection."),
\r
291 interface IVLCMessages : IDispatch
\r
293 [id(DISPID_NEWENUM), propget]
\r
294 HRESULT _NewEnum([out, retval] IUnknown** _NewEnum);
\r
296 [helpstring("Clear all messages from log.")]
\r
299 [propget, helpstring("Returns the number of messages.")]
\r
300 HRESULT count([out, retval] long* count);
\r
302 [helpstring("Returns an iterator for messages in log")]
\r
303 HRESULT iterator([out, retval] IVLCMessageIterator** iter);
\r
308 uuid(8E3BC3D9-62E9-48FB-8A6D-993F9ABC4A0A),
\r
309 helpstring("VLC Log APIs"),
\r
313 interface IVLCLog : IDispatch
\r
315 [propget, helpstring("Returns messages in log")]
\r
316 HRESULT messages([out, retval] IVLCMessages** iter);
\r
318 [propget, helpstring("Returns/Sets the log versbosity level.")]
\r
319 HRESULT verbosity([out, retval] long* level);
\r
320 [propput, helpstring("Returns/Sets the log versbosity level.")]
\r
321 HRESULT verbosity([in] long level);
\r
326 uuid(FD37FE32-82BC-4A25-B056-315F4DBB194D),
\r
327 helpstring("VLC Playlist Items collection"),
\r
331 interface IVLCPlaylistItems : IDispatch
\r
333 [propget, helpstring("Returns number of items in playlist.")]
\r
334 HRESULT count([out, retval] long* count);
\r
336 [helpstring("Remove all items from playlist.")]
\r
339 [helpstring("remove item from playlist.")]
\r
340 HRESULT remove([in] long itemId);
\r
345 uuid(54613049-40BF-4035-9E70-0A9312C0188D),
\r
346 helpstring("VLC Playlist APIs"),
\r
350 interface IVLCPlaylist : IDispatch
\r
352 [hidden, propget, helpstring("Returns number of items in playlist. (deprecated)")]
\r
353 HRESULT itemCount([out, retval] long* count);
\r
355 [propget, helpstring("Returns whether playback displays video.")]
\r
356 HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);
\r
358 [helpstring("Add a playlist item.")]
\r
359 HRESULT add([in] BSTR uri, [in, optional] VARIANT name, [in, optional] VARIANT options, [out, retval] long* itemId);
\r
361 [helpstring("Play/Resume the playlist.")]
\r
364 [helpstring("Play item in playlist.")]
\r
365 HRESULT playItem([in] long itemId);
\r
367 [helpstring("Play/Pause current clip.")]
\r
368 HRESULT togglePause();
\r
370 [helpstring("Stop current clip.")]
\r
373 [helpstring("Advance to next item in playlist.")]
\r
376 [helpstring("Advance to previous item in playlist.")]
\r
379 [hidden, helpstring("Remove all items from playlist. (deprecated)")]
\r
382 [hidden, helpstring("Remove item from playlist. (deprecated)")]
\r
383 HRESULT removeItem([in] long item);
\r
385 [propget, helpstring("Returns the playlist items collection object.")]
\r
386 HRESULT items([out, retval] IVLCPlaylistItems** obj);
\r
391 uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),
\r
392 helpstring("VLC Video APIs"),
\r
396 interface IVLCVideo : IDispatch
\r
398 [propget, helpstring("Returns/sets the fullscreen state.")]
\r
399 HRESULT fullscreen([out, retval] VARIANT_BOOL* fullscreen);
\r
400 [propput, helpstring("Returns/sets the fullscreen state.")]
\r
401 HRESULT fullscreen([in] VARIANT_BOOL fullscreen);
\r
403 [propget, helpstring("Returns video original width.")]
\r
404 HRESULT width([out, retval] long* width);
\r
406 [propget, helpstring("Returns video original height.")]
\r
407 HRESULT height([out, retval] long* height);
\r
409 [propget, helpstring("Returns video aspect ratio.")]
\r
410 HRESULT aspectRatio([out, retval] BSTR* aspect);
\r
411 [propput, helpstring("Sets video aspect ratio.")]
\r
412 HRESULT aspectRatio([in] BSTR aspect);
\r
414 [helpstring("toggle fullscreen/windowed state.")]
\r
415 HRESULT toggleFullscreen();
\r
420 uuid(2D719729-5333-406C-BF12-8DE787FD65E3),
\r
421 helpstring("VLC Control"),
\r
425 interface IVLCControl2 : IDispatch
\r
427 [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
\r
428 HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
\r
429 [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
\r
430 HRESULT AutoLoop([in] VARIANT_BOOL autoloop);
\r
432 [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
\r
433 HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
\r
434 [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
\r
435 HRESULT AutoPlay([in] VARIANT_BOOL autoplay);
\r
437 [id(DISPID_BaseURL), propget, helpstring("Returns/sets the base URL for relative paths")]
\r
438 HRESULT BaseURL([out, retval] BSTR* url);
\r
439 [id(DISPID_BaseURL), propput, helpstring("Returns/sets the base URL for relative paths")]
\r
440 HRESULT BaseURL([in] BSTR url);
\r
442 [id(DISPID_StartTime), propget, helpstring("Returns/sets playback start time of URL.")]
\r
443 HRESULT StartTime([out, retval] long* seconds);
\r
444 [id(DISPID_StartTime), propput, helpstring("Returns/sets playback start time of URL.")]
\r
445 HRESULT StartTime([in] long seconds);
\r
447 [id(DISPID_MRL), propget, helpstring("Returns/sets the default MRL in playlist")]
\r
448 HRESULT MRL([out, retval] BSTR* mrl);
\r
449 [id(DISPID_MRL), propput, helpstring("Returns/sets the default MRL in playlist")]
\r
450 HRESULT MRL([in] BSTR mrl);
\r
452 [propget, helpstring("Returns VLC Version.")]
\r
453 HRESULT VersionInfo([out, retval] BSTR* version);
\r
455 [id(DISPID_Visible), propget, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
\r
456 HRESULT Visible([out, retval] VARIANT_BOOL* visible);
\r
457 [id(DISPID_Visible), propput, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
\r
458 HRESULT Visible([in] VARIANT_BOOL visible);
\r
460 [id(DISPID_Volume), propget, helpstring("Returns/sets default audio volume.")]
\r
461 HRESULT Volume([out, retval] long* volume);
\r
462 [id(DISPID_Volume), propput, helpstring("Returns/sets default audio volume.")]
\r
463 HRESULT Volume([in] long volume);
\r
465 [propget, helpstring("Returns the audio object.")]
\r
466 HRESULT audio([out, retval] IVLCAudio** obj);
\r
468 [propget, helpstring("Returns the audio object.")]
\r
469 HRESULT input([out, retval] IVLCInput** obj);
\r
471 [propget, helpstring("Returns the log object.")]
\r
472 HRESULT log([out, retval] IVLCLog** obj);
\r
474 [propget, helpstring("Returns the playlist object.")]
\r
475 HRESULT playlist([out, retval] IVLCPlaylist** obj);
\r
477 [propget, helpstring("Returns the audio object.")]
\r
478 HRESULT video([out, retval] IVLCVideo** obj);
\r
482 uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),
\r
483 helpstring("VLC control (deprecated)"),
\r
488 [default] interface IVLCControl;
\r
489 interface IVLCControl2;
\r
490 [default, source] dispinterface DVLCEvents;
\r
494 uuid(9BE31822-FDAD-461B-AD51-BE1D1C159921),
\r
495 helpstring("VLC control"),
\r
500 [default] interface IVLCControl2;
\r
501 interface IVLCControl;
\r