]> git.sesse.net Git - vlc/blob - activex/axvlc.idl
Remove redumdant function call
[vlc] / activex / axvlc.idl
1 /*****************************************************************************\r
2  * axvlc.idl: ActiveX control for VLC\r
3  *****************************************************************************\r
4  * Copyright (C) 2006 the VideoLAN team\r
5  *\r
6  * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>\r
7  *\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
12  *\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
17  *\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
22 \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
25 \r
26 import "oaidl.idl";\r
27 \r
28 [\r
29   uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),\r
30   version(1.0),\r
31   helpstring("VideoLAN VLC ActiveX Plugin")\r
32 ]\r
33 library AXVLC\r
34 {\r
35     // Forward declare all types defined in this typelib\r
36     interface IVLCControl;\r
37     interface IVLCAudio;\r
38     interface IVLCInput;\r
39     interface IVLCLog;\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
47 \r
48     importlib("stdole2.tlb");\r
49 \r
50     typedef [public] enum VLCPlaylistMode\r
51     {\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
59     } eVLCPlaylistMode;\r
60 \r
61     // playlist target position\r
62     const int VLCPlayListEnd    = -666;\r
63 \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
76 \r
77     [\r
78       odl,\r
79       uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),\r
80       helpstring("VLC Control (deprecated)"),\r
81       dual,\r
82       oleautomation\r
83     ]\r
84     interface IVLCControl : IDispatch\r
85     {\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
91         HRESULT play();\r
92         [helpstring("Pause playback.")]\r
93         HRESULT pause();\r
94         [helpstring("Stop playback.")]\r
95         HRESULT stop();\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
127 \r
128 /*\r
129 ** use VARIANT rather than a SAFEARRAY as argument type\r
130 ** for compatibility with some scripting language (JScript)\r
131 */\r
132 \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
158     };\r
159 \r
160     const int DISPID_PlayEvent  = 100;\r
161     const int DISPID_PauseEvent = 101;\r
162     const int DISPID_StopEvent  = 102;\r
163 \r
164     [\r
165       uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),\r
166       helpstring("Event interface for VLC control"),\r
167     ]\r
168     dispinterface DVLCEvents\r
169     {\r
170         properties:\r
171         methods:\r
172             [id(DISPID_PlayEvent), helpstring("Playing")]\r
173             void play();\r
174             [id(DISPID_PauseEvent), helpstring("Paused")]\r
175             void pause();\r
176             [id(DISPID_StopEvent), helpstring("Stopped")]\r
177             void stop();\r
178     };\r
179 \r
180     [\r
181       odl,\r
182       uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),\r
183       helpstring("VLC Audio APIs"),\r
184       dual,\r
185       oleautomation\r
186     ]\r
187     interface IVLCAudio : IDispatch\r
188     {\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
193 \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
198 \r
199         [helpstring("Mute/unmute audio playback.")]\r
200         HRESULT toggleMute();\r
201     };\r
202 \r
203     [\r
204       odl,\r
205       uuid(49E0DBD1-9440-466C-9C97-95C67190C603),\r
206       helpstring("VLC Input APIs"),\r
207       dual,\r
208       oleautomation\r
209     ]\r
210     interface IVLCInput : IDispatch\r
211     {\r
212         [propget, helpstring("Returns the clip length, in milliseconds.")]\r
213         HRESULT length([out, retval] double* length);\r
214 \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
219 \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
224 \r
225         [propget, helpstring("Returns current playback state.")]\r
226         HRESULT state([out, retval] long* state);\r
227 \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
232 \r
233         [propget, helpstring("Returns current playback frames per seconds if available.")]\r
234         HRESULT fps([out, retval] double* fps);\r
235 \r
236         [propget, helpstring("Returns whether current playback displays video.")]\r
237         HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);\r
238     };\r
239 \r
240     [\r
241       odl,\r
242       uuid(9ED00AFA-7BCD-4FFF-8D48-7DD4DB2C800D),\r
243       helpstring("VLC Log Message"),\r
244       dual,\r
245       oleautomation\r
246     ]\r
247     interface IVLCMessage: IDispatch\r
248     {\r
249         [id(DISPID_VALUE), propget]\r
250         HRESULT _Value([out, retval] VARIANT* message);\r
251 \r
252         [propget, helpstring("Returns message severity.")]\r
253         HRESULT severity([out, retval] long* level);\r
254 \r
255         [propget, helpstring("Returns message issuer type.")]\r
256         HRESULT type([out, retval] BSTR* type);\r
257 \r
258         [propget, helpstring("Returns message issuer name.")]\r
259         HRESULT name([out, retval] BSTR* name);\r
260 \r
261         [propget, helpstring("Returns message header.")]\r
262         HRESULT header([out, retval] BSTR* header);\r
263 \r
264         [propget, helpstring("Returns message content.")]\r
265         HRESULT message([out, retval] BSTR* message);\r
266     };\r
267 \r
268     [\r
269       odl,\r
270       uuid(15179CD8-CC12-4242-A58E-E412217FF343),\r
271       helpstring("VLC Log iterator"),\r
272       dual,\r
273       oleautomation\r
274     ]\r
275     interface IVLCMessageIterator : IDispatch\r
276     {\r
277         [propget, helpstring("Returns whether a message is available.")]\r
278         HRESULT hasNext([out, retval] VARIANT_BOOL* hasNext);\r
279 \r
280         [helpstring("Returns next message.")]\r
281         HRESULT next([out, retval] IVLCMessage** msg);\r
282     };\r
283 \r
284     [\r
285       odl,\r
286       uuid(6C5CE55D-2D6C-4AAD-8299-C62D2371F106),\r
287       helpstring("VLC Log Messages Collection."),\r
288       dual,\r
289       oleautomation\r
290     ]\r
291     interface IVLCMessages : IDispatch\r
292     {\r
293         [id(DISPID_NEWENUM), propget]\r
294         HRESULT _NewEnum([out, retval] IUnknown** _NewEnum);\r
295 \r
296         [helpstring("Clear all messages from log.")]\r
297         HRESULT clear();\r
298 \r
299         [propget, helpstring("Returns the number of messages.")]\r
300         HRESULT count([out, retval] long* count);\r
301 \r
302         [helpstring("Returns an iterator for messages in log")]\r
303         HRESULT iterator([out, retval] IVLCMessageIterator** iter);\r
304     };\r
305 \r
306     [\r
307       odl,\r
308       uuid(8E3BC3D9-62E9-48FB-8A6D-993F9ABC4A0A),\r
309       helpstring("VLC Log APIs"),\r
310       dual,\r
311       oleautomation\r
312     ]\r
313     interface IVLCLog : IDispatch\r
314     {\r
315         [propget, helpstring("Returns messages in log")]\r
316         HRESULT messages([out, retval] IVLCMessages** iter);\r
317 \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
322     };\r
323 \r
324     [\r
325       odl,\r
326       uuid(FD37FE32-82BC-4A25-B056-315F4DBB194D),\r
327       helpstring("VLC Playlist Items collection"),\r
328       dual,\r
329       oleautomation\r
330     ]\r
331     interface IVLCPlaylistItems : IDispatch\r
332     {\r
333         [propget, helpstring("Returns number of items in playlist.")]\r
334         HRESULT count([out, retval] long* count);\r
335 \r
336         [helpstring("Remove all items from playlist.")]\r
337         HRESULT clear();\r
338 \r
339         [helpstring("remove item from playlist.")]\r
340         HRESULT remove([in] long itemId);\r
341     };\r
342 \r
343     [\r
344       odl,\r
345       uuid(54613049-40BF-4035-9E70-0A9312C0188D),\r
346       helpstring("VLC Playlist APIs"),\r
347       dual,\r
348       oleautomation\r
349     ]\r
350     interface IVLCPlaylist : IDispatch\r
351     {\r
352         [hidden, propget, helpstring("Returns number of items in playlist. (deprecated)")]\r
353         HRESULT itemCount([out, retval] long* count);\r
354 \r
355         [propget, helpstring("Returns whether playback displays video.")]\r
356         HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);\r
357 \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
360 \r
361         [helpstring("Play/Resume the playlist.")]\r
362         HRESULT play();\r
363 \r
364         [helpstring("Play item in playlist.")]\r
365         HRESULT playItem([in] long itemId);\r
366 \r
367         [helpstring("Play/Pause current clip.")]\r
368         HRESULT togglePause();\r
369 \r
370         [helpstring("Stop current clip.")]\r
371         HRESULT stop();\r
372 \r
373         [helpstring("Advance to next item in playlist.")]\r
374         HRESULT next();\r
375 \r
376         [helpstring("Advance to previous item in playlist.")]\r
377         HRESULT prev();\r
378 \r
379         [hidden, helpstring("Remove all items from playlist. (deprecated)")]\r
380         HRESULT clear();\r
381 \r
382         [hidden, helpstring("Remove item from playlist. (deprecated)")]\r
383         HRESULT removeItem([in] long item);\r
384 \r
385         [propget, helpstring("Returns the playlist items collection object.")]\r
386         HRESULT items([out, retval] IVLCPlaylistItems** obj);\r
387     };\r
388 \r
389     [\r
390       odl,\r
391       uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),\r
392       helpstring("VLC Video APIs"),\r
393       dual,\r
394       oleautomation\r
395     ]\r
396     interface IVLCVideo : IDispatch\r
397     {\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
402 \r
403         [propget, helpstring("Returns video original width.")]\r
404         HRESULT width([out, retval] long* width);\r
405 \r
406         [propget, helpstring("Returns video original height.")]\r
407         HRESULT height([out, retval] long* height);\r
408 \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
413 \r
414         [helpstring("toggle fullscreen/windowed state.")]\r
415         HRESULT toggleFullscreen();\r
416     };\r
417 \r
418     [\r
419       odl,\r
420       uuid(2D719729-5333-406C-BF12-8DE787FD65E3),\r
421       helpstring("VLC Control"),\r
422       dual,\r
423       oleautomation\r
424     ]\r
425     interface IVLCControl2 : IDispatch\r
426     {\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
431 \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
436 \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
441 \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
446 \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
451 \r
452         [propget, helpstring("Returns VLC Version.")]\r
453         HRESULT VersionInfo([out, retval] BSTR* version);\r
454 \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
459 \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
464 \r
465         [propget, helpstring("Returns the audio object.")]\r
466         HRESULT audio([out, retval] IVLCAudio** obj);\r
467 \r
468         [propget, helpstring("Returns the audio object.")]\r
469         HRESULT input([out, retval] IVLCInput** obj);\r
470 \r
471         [propget, helpstring("Returns the log object.")]\r
472         HRESULT log([out, retval] IVLCLog** obj);\r
473 \r
474         [propget, helpstring("Returns the playlist object.")]\r
475         HRESULT playlist([out, retval] IVLCPlaylist** obj);\r
476 \r
477         [propget, helpstring("Returns the audio object.")]\r
478         HRESULT video([out, retval] IVLCVideo** obj);\r
479     };\r
480 \r
481     [\r
482       uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),\r
483       helpstring("VLC control (deprecated)"),\r
484       control\r
485     ]\r
486     coclass VLCPlugin\r
487     {\r
488         [default] interface IVLCControl;\r
489         interface IVLCControl2;\r
490         [default, source] dispinterface DVLCEvents;\r
491     };\r
492 \r
493     [\r
494       uuid(9BE31822-FDAD-461B-AD51-BE1D1C159921),\r
495       helpstring("VLC control"),\r
496       control\r
497     ]\r
498     coclass VLCPlugin2\r
499     {\r
500         [default] interface IVLCControl2;\r
501         interface IVLCControl;\r
502     };\r
503 };\r