1 /*****************************************************************************
2 * axvlc.idl: ActiveX control for VLC
3 *****************************************************************************
4 * Copyright (C) 2006 the VideoLAN team
6 * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
7 * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 //comments terminated by [t] are by tonsofpcs, regarding the string review. April 02, 2006. [t]
25 //Possibly change all instances of "the current playlist" to "the playlist" and "current playlist" to "the playlist" [t]
30 uuid(DF2BBE39
-40A8
-433b
-A279
-073F48DA94B6
),
32 helpstring("VideoLAN VLC ActiveX Plugin")
36 // Forward declare all types defined in this typelib
37 interface IVLCControl
;
41 interface IVLCMessage
;
42 interface IVLCMessageIterator
;
43 interface IVLCMessages
;
44 interface IVLCPlaylist
;
46 interface IVLCControl2
;
47 dispinterface DVLCEvents
;
49 importlib
("stdole2.tlb");
51 typedef [public] enum VLCPlaylistMode
53 VLCPlayListInsert
= 1,
54 VLCPlayListInsertAndGo
= 9,
55 VLCPlayListReplace
= 2,
56 VLCPlayListReplaceAndGo
= 10,
57 VLCPlayListAppend
= 4,
58 VLCPlayListAppendAndGo
= 12,
59 VLCPlayListCheckInsert
= 16
62 // playlist target position
63 const int VLCPlayListEnd
= -666;
66 const int DISPID_BackColor
= -501;
68 const int DISPID_Visible
= 100;
69 const int DISPID_Playing
= 101;
70 const int DISPID_Position
= 102;
71 const int DISPID_Time
= 103;
72 const int DISPID_Length
= 104;
73 const int DISPID_Volume
= 105;
74 const int DISPID_MRL
= 106;
75 const int DISPID_AutoPlay
= 107;
76 const int DISPID_AutoLoop
= 108;
77 const int DISPID_StartTime
= 109;
78 const int DISPID_BaseURL
= 110;
82 uuid(C2FA41D0
-B113
-476e
-AC8C
-9BD14999C1C1
),
83 helpstring("VLC Control (deprecated)"),
87 interface IVLCControl
: IDispatch
89 [id(DISPID_Visible
), propget, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
90 HRESULT Visible
([out, retval] VARIANT_BOOL* visible
);
91 [id(DISPID_Visible
), propput, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
92 HRESULT Visible
([in] VARIANT_BOOL visible
);
93 [helpstring("Play current target in playlist.")]
95 [helpstring("Pause playback.")]
97 [helpstring("Stop playback.")]
99 [id(DISPID_Playing
), hidden, propget, helpstring("Returns a value that determines whether VLC is currently playing.")]
100 HRESULT Playing
([out, retval] VARIANT_BOOL* isPlaying
);
101 [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.")]
102 HRESULT Position
([out, retval] float* position
);
103 [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.")]
104 HRESULT Position
([in] float position
);
105 [id(DISPID_Time
), propget, helpstring("Returns/sets playback time relative to the start of the current item.")]
106 HRESULT Time
([out, retval] int* seconds
);
107 [id(DISPID_Time
), propput, helpstring("Returns/sets playback time relative to the start of the current item.")]
108 HRESULT Time
([in] int seconds
);
109 [helpstring("Advance or backtrack playback time, relative to current time.")] //possibly find a better word to replace 'backtrack' [t]
110 HRESULT shuttle
([in] int seconds
);
111 [helpstring("Switch video between normal and fullscreen view modes.")]
112 HRESULT fullscreen
();
113 [id(DISPID_Length
), propget, hidden, helpstring("Returns the total length, in seconds, of the current item, may be unknown.")]
114 HRESULT Length
([out, retval] int* seconds
);
115 [helpstring("Increases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
116 HRESULT playFaster
();
117 [helpstring("Decreases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
118 HRESULT playSlower
();
119 [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]
120 HRESULT Volume
([out, retval] int* volume
);
121 [id(DISPID_Volume
), propput, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]
122 HRESULT Volume
([in] int volume
);
123 [helpstring("Mute/unmute playback audio.")]
124 HRESULT toggleMute
();
125 [helpstring("Sets the value of a VLC variable.")]
126 HRESULT setVariable
([in] BSTR name
, [in] VARIANT value
);
127 [helpstring("Returns the value of a VLC variable.")]
128 HRESULT getVariable
([in] BSTR name
, [out, retval] VARIANT *value
);
129 [helpstring("Add an item to the playlist.")]
132 ** use VARIANT rather than a SAFEARRAY as argument type
133 ** for compatibility with some scripting language (JScript)
136 HRESULT addTarget
([in] BSTR uri
, [in] VARIANT options
, [in] enum VLCPlaylistMode mode
, [in] int position
);
137 [propget, helpstring("Returns index of current item in playlist.")]
138 HRESULT PlaylistIndex
([out, retval] int* index
);
139 [propget, helpstring("Returns number of items in playlist.")]
140 HRESULT PlaylistCount
([out, retval] int* index
);
141 [helpstring("Advance to next item in playlist.")]
142 HRESULT playlistNext
();
143 [helpstring("Advance to previous item in playlist.")]
144 HRESULT playlistPrev
();
145 [helpstring("Remove all items from playlist.")]
146 HRESULT playlistClear
();
147 [propget, hidden, helpstring("Returns VLC Version.")]
148 HRESULT VersionInfo
([out, retval] BSTR* version);
149 [id(DISPID_MRL
), propget, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
150 HRESULT MRL
([out, retval] BSTR* mrl
);
151 [id(DISPID_MRL
), propput, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
152 HRESULT MRL
([in] BSTR mrl
);
153 [id(DISPID_AutoPlay
), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
154 HRESULT AutoPlay
([out, retval] VARIANT_BOOL* autoplay
);
155 [id(DISPID_AutoPlay
), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
156 HRESULT AutoPlay
([in] VARIANT_BOOL autoplay
);
157 [id(DISPID_AutoLoop
), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
158 HRESULT AutoLoop
([out, retval] VARIANT_BOOL* autoloop
);
159 [id(DISPID_AutoLoop
), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
160 HRESULT AutoLoop
([in] VARIANT_BOOL autoloop
);
163 const int DISPID_PlayEvent
= 100;
164 const int DISPID_PauseEvent
= 101;
165 const int DISPID_StopEvent
= 102;
168 uuid(DF48072F
-5EF8
-434e-9B40
-E2F3AE759B5F
),
169 helpstring("Event interface for VLC control"),
171 dispinterface DVLCEvents
175 [id(DISPID_PlayEvent
), helpstring("Playing")]
177 [id(DISPID_PauseEvent
), helpstring("Paused")]
179 [id(DISPID_StopEvent
), helpstring("Stopped")]
185 uuid(9E0BD17B
-2D3C
-4656-B94D
-03084F3FD9D4
),
186 helpstring("VLC Audio APIs"),
190 interface IVLCAudio
: IDispatch
192 [propget, helpstring("Returns/sets the audio mute state.")]
193 HRESULT mute
([out, retval] VARIANT_BOOL* muted
);
194 [propput, helpstring("Returns/sets the audio mute state.")]
195 HRESULT mute
([in] VARIANT_BOOL muted
);
197 [propget, helpstring("Returns/sets audio volume as a percent value.")]
198 HRESULT volume
([out, retval] long* volume
);
199 [propput, helpstring("Returns/sets audio volume as a percent value.")]
200 HRESULT volume
([in] long volume
);
202 [helpstring("Mute/unmute audio playback.")]
203 HRESULT toggleMute
();
205 [propget, helpstring("Returns/sets audio track used/to use.")]
206 HRESULT track
([out, retval] long* track
);
207 [propput, helpstring("Returns/sets audio track used/to use.")]
208 HRESULT track
([in] long track
);
210 [propget, helpstring("Returns audio channel [1-5] indicating; stereo, reverse stereo, left, right, dolby.")]
211 HRESULT channel
([out, retval] long* channel
);
212 [propput, helpstring("Sets audio channel to [1-5] indicating; stereo, reverse stereo, left, right, dolby.")]
213 HRESULT channel
([in] long channel
);
218 uuid(49E0DBD1
-9440-466C
-9C97
-95C67190C603
),
219 helpstring("VLC Input APIs"),
223 interface IVLCInput
: IDispatch
225 [propget, helpstring("Returns the clip length, in milliseconds.")]
226 HRESULT length
([out, retval] double* length
);
228 [propget, helpstring("Returns/sets playback position in current clip. Position is ranging from 0.0 to 1.0.")]
229 HRESULT position
([out, retval] double* position
);
230 [propput, helpstring("Returns/sets playback position in the current clip. Position ranging from 0.0 to 1.0.")]
231 HRESULT position
([in] double position
);
233 [propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]
234 HRESULT time
([out, retval] double* time
);
235 [propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]
236 HRESULT time
([in] double time
);
238 [propget, helpstring("Returns current playback state.")]
239 HRESULT state
([out, retval] long* state
);
241 [propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]
242 HRESULT rate
([out, retval] double* rate
);
243 [propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]
244 HRESULT rate
([in] double rate
);
246 [propget, helpstring("Returns current playback frames per seconds if available.")]
247 HRESULT fps
([out, retval] double* fps
);
249 [propget, helpstring("Returns whether current playback displays video.")]
250 HRESULT hasVout
([out, retval] VARIANT_BOOL* hasVout
);
255 uuid(9ED00AFA
-7BCD
-4FFF
-8D48
-7DD4DB2C800D
),
256 helpstring("VLC Log Message"),
260 interface IVLCMessage
: IDispatch
262 [id(DISPID_VALUE
), propget]
263 HRESULT _Value
([out, retval] VARIANT* message);
265 [propget, helpstring("Returns message severity.")]
266 HRESULT severity
([out, retval] long* level
);
268 [propget, helpstring("Returns message issuer type.")]
269 HRESULT type
([out, retval] BSTR* type
);
271 [propget, helpstring("Returns message issuer name.")]
272 HRESULT name
([out, retval] BSTR* name
);
274 [propget, helpstring("Returns message header.")]
275 HRESULT header
([out, retval] BSTR* header
);
277 [propget, helpstring("Returns message content.")]
278 HRESULT message([out, retval] BSTR* message);
283 uuid(15179CD8
-CC12
-4242-A58E
-E412217FF343
),
284 helpstring("VLC Log iterator"),
288 interface IVLCMessageIterator
: IDispatch
290 [propget, helpstring("Returns whether a message is available.")]
291 HRESULT hasNext
([out, retval] VARIANT_BOOL* hasNext
);
293 [helpstring("Returns next message.")]
294 HRESULT next
([out, retval] IVLCMessage
** msg
);
299 uuid(6C5CE55D
-2D6C
-4AAD
-8299-C62D2371F106
),
300 helpstring("VLC Log Messages Collection."),
304 interface IVLCMessages
: IDispatch
306 [id(DISPID_NEWENUM
), propget]
307 HRESULT _NewEnum
([out, retval] IUnknown
** _NewEnum
);
309 [helpstring("Clear all messages from log.")]
312 [propget, helpstring("Returns the number of messages.")]
313 HRESULT count
([out, retval] long* count
);
315 [helpstring("Returns an iterator for messages in log")]
316 HRESULT iterator
([out, retval] IVLCMessageIterator
** iter
);
321 uuid(8E3BC3D9
-62E9
-48FB
-8A6D
-993F9ABC4A0A
),
322 helpstring("VLC Log APIs"),
326 interface IVLCLog
: IDispatch
328 [propget, helpstring("Returns messages in log")]
329 HRESULT messages
([out, retval] IVLCMessages
** iter
);
331 [propget, helpstring("Returns/Sets the log versbosity level.")]
332 HRESULT verbosity
([out, retval] long* level
);
333 [propput, helpstring("Returns/Sets the log versbosity level.")]
334 HRESULT verbosity
([in] long level
);
339 uuid(FD37FE32
-82BC
-4A25
-B056
-315F4DBB194D
),
340 helpstring("VLC Playlist Items collection"),
344 interface IVLCPlaylistItems
: IDispatch
346 [propget, helpstring("Returns number of items in playlist.")]
347 HRESULT count
([out, retval] long* count
);
349 [helpstring("Remove all items from playlist.")]
352 [helpstring("remove item from playlist.")]
353 HRESULT remove
([in] long itemId
);
358 uuid(54613049-40BF
-4035-9E70
-0A9312C0188D
),
359 helpstring("VLC Playlist APIs"),
363 interface IVLCPlaylist
: IDispatch
365 [hidden, propget, helpstring("Returns number of items in playlist. (deprecated)")]
366 HRESULT itemCount
([out, retval] long* count
);
368 [propget, helpstring("Returns whether playback displays video.")]
369 HRESULT isPlaying
([out, retval] VARIANT_BOOL* playing
);
371 [helpstring("Add a playlist item.")]
372 HRESULT add
([in] BSTR uri
, [in, optional] VARIANT name
, [in, optional] VARIANT options
, [out, retval] long* itemId
);
374 [helpstring("Play/Resume the playlist.")]
377 [helpstring("Play item in playlist.")]
378 HRESULT playItem
([in] long itemId
);
380 [helpstring("Play/Pause current clip.")]
381 HRESULT togglePause
();
383 [helpstring("Stop current clip.")]
386 [helpstring("Advance to next item in playlist.")]
389 [helpstring("Advance to previous item in playlist.")]
392 [hidden, helpstring("Remove all items from playlist. (deprecated)")]
395 [hidden, helpstring("Remove item from playlist. (deprecated)")]
396 HRESULT removeItem
([in] long item
);
398 [propget, helpstring("Returns the playlist items collection object.")]
399 HRESULT items
([out, retval] IVLCPlaylistItems
** obj
);
404 uuid(0AAEDF0B
-D333
-4B27
-A0C6
-BBF31413A42E
),
405 helpstring("VLC Video APIs"),
409 interface IVLCVideo
: IDispatch
411 [propget, helpstring("Returns/sets the fullscreen state.")]
412 HRESULT fullscreen
([out, retval] VARIANT_BOOL* fullscreen
);
413 [propput, helpstring("Returns/sets the fullscreen state.")]
414 HRESULT fullscreen
([in] VARIANT_BOOL fullscreen
);
416 [propget, helpstring("Returns video original width.")]
417 HRESULT width
([out, retval] long* width
);
419 [propget, helpstring("Returns video original height.")]
420 HRESULT height
([out, retval] long* height
);
422 [propget, helpstring("Returns video aspect ratio.")]
423 HRESULT aspectRatio
([out, retval] BSTR* aspect
);
424 [propput, helpstring("Sets video aspect ratio.")]
425 HRESULT aspectRatio
([in] BSTR aspect
);
427 [propget, helpstring("Returns video subtitle used.")]
428 HRESULT subtitle
([out, retval] long* spu
);
429 [propput, helpstring("Sets video subtitle to use.")]
430 HRESULT subtitle
([in] long spu
);
432 [propget, helpstring("Returns crop filter geometry.")]
433 HRESULT crop
([out, retval] BSTR* geometry
);
434 [propput, helpstring("Sets crop filter geometry.")]
435 HRESULT crop
([in] BSTR geometry
);
437 [propget, helpstring("Returns teletext page used.")]
438 HRESULT subtitle
([out, retval] long* page
);
439 [propput, helpstring("Sets teletext page to use.")]
440 HRESULT subtitle
([in] long page
);
442 [helpstring("toggle fullscreen/windowed state.")]
443 HRESULT toggleFullscreen
();
445 [helpstring("take video snapshot and save it into picture object.")]
446 HRESULT takeSnapshot
([out, retval] IPictureDisp
** picture
);
448 [helpstring("toggle teletext transparent state.")]
449 HRESULT toggleTeletext
();
454 uuid(2D719729
-5333-406C
-BF12
-8DE787FD65E3
),
455 helpstring("VLC Control"),
459 interface IVLCControl2
: IDispatch
461 [id(DISPID_AutoLoop
), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
462 HRESULT AutoLoop
([out, retval] VARIANT_BOOL* autoloop
);
463 [id(DISPID_AutoLoop
), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
464 HRESULT AutoLoop
([in] VARIANT_BOOL autoloop
);
466 [id(DISPID_AutoPlay
), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
467 HRESULT AutoPlay
([out, retval] VARIANT_BOOL* autoplay
);
468 [id(DISPID_AutoPlay
), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
469 HRESULT AutoPlay
([in] VARIANT_BOOL autoplay
);
471 [id(DISPID_BaseURL
), propget, helpstring("Returns/sets the base URL for relative paths")]
472 HRESULT BaseURL
([out, retval] BSTR* url
);
473 [id(DISPID_BaseURL
), propput, helpstring("Returns/sets the base URL for relative paths")]
474 HRESULT BaseURL
([in] BSTR url
);
476 [id(DISPID_StartTime
), propget, helpstring("Returns/sets playback start time of URL.")]
477 HRESULT StartTime
([out, retval] long* seconds
);
478 [id(DISPID_StartTime
), propput, helpstring("Returns/sets playback start time of URL.")]
479 HRESULT StartTime
([in] long seconds
);
481 [id(DISPID_MRL
), propget, helpstring("Returns/sets the default MRL in playlist")]
482 HRESULT MRL
([out, retval] BSTR* mrl
);
483 [id(DISPID_MRL
), propput, helpstring("Returns/sets the default MRL in playlist")]
484 HRESULT MRL
([in] BSTR mrl
);
486 [propget, helpstring("Returns VLC Version.")]
487 HRESULT VersionInfo
([out, retval] BSTR* version);
489 [id(DISPID_Visible
), propget, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
490 HRESULT Visible
([out, retval] VARIANT_BOOL* visible
);
491 [id(DISPID_Visible
), propput, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
492 HRESULT Visible
([in] VARIANT_BOOL visible
);
494 [id(DISPID_Volume
), propget, helpstring("Returns/sets default audio volume.")]
495 HRESULT Volume
([out, retval] long* volume
);
496 [id(DISPID_Volume
), propput, helpstring("Returns/sets default audio volume.")]
497 HRESULT Volume
([in] long volume
);
499 [id(DISPID_BackColor
), propget, helpstring("Returns/sets background color.")]
500 HRESULT BackColor
([out, retval] OLE_COLOR
* backcolor
);
501 [id(DISPID_BackColor
), propput, helpstring("Returns/sets background color.")]
502 HRESULT BackColor
([in] OLE_COLOR backcolor
);
504 [propget, helpstring("Returns the audio object.")]
505 HRESULT audio
([out, retval] IVLCAudio
** obj
);
507 [propget, helpstring("Returns the audio object.")]
508 HRESULT input
([out, retval] IVLCInput
** obj
);
510 [propget, helpstring("Returns the log object.")]
511 HRESULT log
([out, retval] IVLCLog
** obj
);
513 [propget, helpstring("Returns the playlist object.")]
514 HRESULT playlist
([out, retval] IVLCPlaylist
** obj
);
516 [propget, helpstring("Returns the audio object.")]
517 HRESULT video
([out, retval] IVLCVideo
** obj
);
521 uuid(E23FE9C6
-778E-49D4
-B537
-38FCDE4887D8
),
522 helpstring("VLC control (deprecated)"),
527 [default] interface IVLCControl
;
528 interface IVLCControl2
;
529 [default, source] dispinterface DVLCEvents
;
533 uuid(9BE31822
-FDAD
-461B
-AD51
-BE1D1C159921
),
534 helpstring("VLC control"),
539 [default] interface IVLCControl2
;
540 interface IVLCControl
;