]> git.sesse.net Git - vlc/blob - activex/axvlc.idl
Unbreak a bit windows
[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       hidden,\r
83       oleautomation\r
84     ]\r
85     interface IVLCControl : IDispatch\r
86     {\r
87         [id(DISPID_Visible), propget, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
88         HRESULT Visible([out, retval] VARIANT_BOOL* visible);\r
89         [id(DISPID_Visible), propput, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
90         HRESULT Visible([in] VARIANT_BOOL visible);\r
91         [helpstring("Play current target in playlist.")]\r
92         HRESULT play();\r
93         [helpstring("Pause playback.")]\r
94         HRESULT pause();\r
95         [helpstring("Stop playback.")]\r
96         HRESULT stop();\r
97         [id(DISPID_Playing), hidden, propget, helpstring("Returns a value that determines whether VLC is currently playing.")]\r
98         HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);\r
99         [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
100         HRESULT Position([out, retval] float* position);\r
101         [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
102         HRESULT Position([in] float position);\r
103         [id(DISPID_Time), propget, helpstring("Returns/sets playback time relative to the start of the current item.")]\r
104         HRESULT Time([out, retval] int* seconds);\r
105         [id(DISPID_Time), propput, helpstring("Returns/sets playback time relative to the start of the current item.")]\r
106         HRESULT Time([in] int seconds);\r
107         [helpstring("Advance or backtrack playback time, relative to current time.")]  //possibly find a better word to replace 'backtrack' [t]\r
108         HRESULT shuttle([in] int seconds);\r
109         [helpstring("Switch video between normal and fullscreen view modes.")]\r
110         HRESULT fullscreen();\r
111         [id(DISPID_Length), propget, hidden, helpstring("Returns the total length, in seconds, of the current item, may be unknown.")]\r
112         HRESULT Length([out, retval] int* seconds);\r
113         [helpstring("Increases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]\r
114         HRESULT playFaster();\r
115         [helpstring("Decreases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]\r
116         HRESULT playSlower();\r
117         [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
118         HRESULT Volume([out, retval] int* volume);\r
119         [id(DISPID_Volume), propput, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]\r
120         HRESULT Volume([in] int volume);\r
121         [helpstring("Mute/unmute playback audio.")]\r
122         HRESULT toggleMute();\r
123         [helpstring("Sets the value of a VLC variable.")]\r
124         HRESULT setVariable([in] BSTR name, [in] VARIANT value);\r
125         [helpstring("Returns the value of a VLC variable.")]\r
126         HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);\r
127         [helpstring("Add an item to the playlist.")]\r
128 \r
129 /*\r
130 ** use VARIANT rather than a SAFEARRAY as argument type\r
131 ** for compatibility with some scripting language (JScript)\r
132 */\r
133 \r
134         HRESULT addTarget([in] BSTR uri, [in] VARIANT options, [in] enum VLCPlaylistMode mode, [in] int position);\r
135         [propget, helpstring("Returns index of current item in playlist.")]\r
136         HRESULT PlaylistIndex([out, retval] int* index);\r
137         [propget, helpstring("Returns number of items in playlist.")]\r
138         HRESULT PlaylistCount([out, retval] int* index);\r
139         [helpstring("Advance to next item in playlist.")]\r
140         HRESULT playlistNext();\r
141         [helpstring("Advance to previous item in playlist.")]\r
142         HRESULT playlistPrev();\r
143         [helpstring("Remove all items from playlist.")]\r
144         HRESULT playlistClear();\r
145         [propget, hidden, helpstring("Returns VLC Version.")]\r
146         HRESULT VersionInfo([out, retval] BSTR* version);\r
147         [id(DISPID_MRL), propget, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]\r
148         HRESULT MRL([out, retval] BSTR* mrl);\r
149         [id(DISPID_MRL), propput, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]\r
150         HRESULT MRL([in] BSTR mrl);\r
151         [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]\r
152         HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);\r
153         [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]\r
154         HRESULT AutoPlay([in] VARIANT_BOOL autoplay);\r
155         [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
156         HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);\r
157         [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
158         HRESULT AutoLoop([in] VARIANT_BOOL autoloop);\r
159     };\r
160 \r
161     const int DISPID_PlayEvent  = 100;\r
162     const int DISPID_PauseEvent = 101;\r
163     const int DISPID_StopEvent  = 102;\r
164 \r
165     [\r
166       uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),\r
167       helpstring("Event interface for VLC control"),\r
168       hidden\r
169     ]\r
170     dispinterface DVLCEvents\r
171     {\r
172         properties:\r
173         methods:\r
174             [id(DISPID_PlayEvent), helpstring("Playing")]\r
175             void play();\r
176             [id(DISPID_PauseEvent), helpstring("Paused")]\r
177             void pause();\r
178             [id(DISPID_StopEvent), helpstring("Stopped")]\r
179             void stop();\r
180     };\r
181 \r
182     [\r
183       odl,\r
184       uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),\r
185       helpstring("VLC Audio APIs"),\r
186       hidden,\r
187       dual,\r
188       nonextensible,\r
189       oleautomation\r
190     ]\r
191     interface IVLCAudio : IDispatch\r
192     {\r
193         [propget, helpstring("Returns/sets the audio mute state.")]\r
194         HRESULT mute([out, retval] VARIANT_BOOL* muted);\r
195         [propput, helpstring("Returns/sets the audio mute state.")]\r
196         HRESULT mute([in] VARIANT_BOOL muted);\r
197 \r
198         [propget, helpstring("Returns/sets audio volume as a percent value.")]\r
199         HRESULT volume([out, retval] long* volume);\r
200         [propput, helpstring("Returns/sets audio volume as a percent value.")]\r
201         HRESULT volume([in] long volume);\r
202 \r
203         [helpstring("Mute/unmute audio playback.")]\r
204         HRESULT toggleMute();\r
205     };\r
206 \r
207     [\r
208       odl,\r
209       uuid(49E0DBD1-9440-466C-9C97-95C67190C603),\r
210       helpstring("VLC Input APIs"),\r
211       hidden,\r
212       dual,\r
213       nonextensible,\r
214       oleautomation\r
215     ]\r
216     interface IVLCInput : IDispatch\r
217     {\r
218         [propget, helpstring("Returns the clip length, in milliseconds.")]\r
219         HRESULT length([out, retval] double* length);\r
220 \r
221         [propget, helpstring("Returns/sets playback position in current clip.  Position is ranging from 0.0 to 1.0.")]\r
222         HRESULT position([out, retval] double* position);\r
223         [propput, helpstring("Returns/sets playback position in the current clip.  Position ranging from 0.0 to 1.0.")]\r
224         HRESULT position([in] double position);\r
225 \r
226         [propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]\r
227         HRESULT time([out, retval] double* time);\r
228         [propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]\r
229         HRESULT time([in] double time);\r
230 \r
231         [propget, helpstring("Returns current playback state.")]\r
232         HRESULT state([out, retval] long* state);\r
233 \r
234         [propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]\r
235         HRESULT rate([out, retval] double* rate);\r
236         [propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]\r
237         HRESULT rate([in] double rate);\r
238 \r
239         [propget, helpstring("Returns current playback frames per seconds if available.")]\r
240         HRESULT fps([out, retval] double* fps);\r
241 \r
242         [propget, helpstring("Returns whether current playback displays video.")]\r
243         HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);\r
244     };\r
245 \r
246     [\r
247       odl,\r
248       uuid(9ED00AFA-7BCD-4FFF-8D48-7DD4DB2C800D),\r
249       helpstring("VLC Log Message"),\r
250       hidden,\r
251       dual,\r
252       nonextensible,\r
253       oleautomation\r
254     ]\r
255     interface IVLCMessage: IDispatch\r
256     {\r
257         [id(DISPID_VALUE), propget]\r
258         HRESULT _Value([out, retval] VARIANT* message);\r
259 \r
260         [propget, helpstring("Returns message severity.")]\r
261         HRESULT severity([out, retval] long* level);\r
262 \r
263         [propget, helpstring("Returns message issuer type.")]\r
264         HRESULT type([out, retval] BSTR* type);\r
265 \r
266         [propget, helpstring("Returns message issuer name.")]\r
267         HRESULT name([out, retval] BSTR* name);\r
268 \r
269         [propget, helpstring("Returns message header.")]\r
270         HRESULT header([out, retval] BSTR* header);\r
271 \r
272         [propget, helpstring("Returns message content.")]\r
273         HRESULT message([out, retval] BSTR* message);\r
274     };\r
275 \r
276     [\r
277       odl,\r
278       uuid(15179CD8-CC12-4242-A58E-E412217FF343),\r
279       helpstring("VLC Log iterator"),\r
280       hidden,\r
281       dual,\r
282       nonextensible,\r
283       oleautomation\r
284     ]\r
285     interface IVLCMessageIterator : IDispatch\r
286     {\r
287         [propget, helpstring("Returns whether a message is available.")]\r
288         HRESULT hasNext([out, retval] VARIANT_BOOL* hasNext);\r
289 \r
290         [helpstring("Returns next message.")]\r
291         HRESULT next([out, retval] IVLCMessage** msg);\r
292     };\r
293 \r
294     [\r
295       odl,\r
296       uuid(6C5CE55D-2D6C-4AAD-8299-C62D2371F106),\r
297       helpstring("VLC Log APIs"),\r
298       hidden,\r
299       dual,\r
300       nonextensible,\r
301       oleautomation\r
302     ]\r
303     interface IVLCMessages : IDispatch\r
304     {\r
305         [id(DISPID_NEWENUM), propget]\r
306         HRESULT _NewEnum([out, retval] IUnknown** _NewEnum);\r
307 \r
308         [helpstring("Clear all messages from log.")]\r
309         HRESULT clear();\r
310 \r
311         [propget, helpstring("Returns the number of messages.")]\r
312         HRESULT count([out, retval] long* count);\r
313 \r
314         [helpstring("Returns an iterator for messages in log")]\r
315         HRESULT iterator([out, retval] IVLCMessageIterator** iter);\r
316     };\r
317 \r
318     [\r
319       odl,\r
320       uuid(8E3BC3D9-62E9-48FB-8A6D-993F9ABC4A0A),\r
321       helpstring("VLC Log APIs"),\r
322       hidden,\r
323       dual,\r
324       nonextensible,\r
325       oleautomation\r
326     ]\r
327     interface IVLCLog : IDispatch\r
328     {\r
329         [propget, helpstring("Returns messages in log")]\r
330         HRESULT messages([out, retval] IVLCMessages** iter);\r
331 \r
332         [propget, helpstring("Returns/Sets the log versbosity level.")]\r
333         HRESULT verbosity([out, retval] long* level);\r
334         [propput, helpstring("Returns/Sets the log versbosity level.")]\r
335         HRESULT verbosity([in] long level);\r
336     };\r
337 \r
338     [\r
339       odl,\r
340       uuid(54613049-40BF-4035-9E70-0A9312C0188D),\r
341       helpstring("VLC Playlist APIs"),\r
342       hidden,\r
343       dual,\r
344       nonextensible,\r
345       oleautomation\r
346     ]\r
347     interface IVLCPlaylist : IDispatch\r
348     {\r
349         [propget, helpstring("Returns number of items in playlist.")]\r
350         HRESULT itemCount([out, retval] long* count);\r
351 \r
352         [propget, helpstring("Returns whether playback displays video.")]\r
353         HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);\r
354 \r
355         [helpstring("Add a playlist item.")]\r
356         HRESULT add([in] BSTR uri, [in, optional] VARIANT name, [in, optional] VARIANT options, [out, retval] long* item);\r
357 \r
358         [helpstring("Play/Resume the playlist.")]\r
359         HRESULT play();\r
360 \r
361         [helpstring("Play item in playlist.")]\r
362         HRESULT playItem([in] long item);\r
363 \r
364         [helpstring("Play/Pause current clip.")]\r
365         HRESULT togglePause();\r
366 \r
367         [helpstring("Stop current clip.")]\r
368         HRESULT stop();\r
369 \r
370         [helpstring("Advance to next item in playlist.")]\r
371         HRESULT next();\r
372 \r
373         [helpstring("Advance to previous item in playlist.")]\r
374         HRESULT prev();\r
375 \r
376         [helpstring("Remove all items from playlist.")]\r
377         HRESULT clear();\r
378 \r
379         [helpstring("remove item from playlist.")]\r
380         HRESULT removeItem([in] long item);\r
381     };\r
382 \r
383     [\r
384       odl,\r
385       uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),\r
386       helpstring("VLC Video APIs"),\r
387       hidden,\r
388       dual,\r
389       nonextensible,\r
390       oleautomation\r
391     ]\r
392     interface IVLCVideo : IDispatch\r
393     {\r
394         [propget, helpstring("Returns/sets the fullscreen state.")]\r
395         HRESULT fullscreen([out, retval] VARIANT_BOOL* fullscreen);\r
396         [propput, helpstring("Returns/sets the fullscreen state.")]\r
397         HRESULT fullscreen([in] VARIANT_BOOL fullscreen);\r
398 \r
399         [propget, helpstring("Returns video original width.")]\r
400         HRESULT width([out, retval] long* width);\r
401 \r
402         [propget, helpstring("Returns video original height.")]\r
403         HRESULT height([out, retval] long* height);\r
404 \r
405         [propget, helpstring("Returns video aspect ratio.")]\r
406         HRESULT aspectRatio([out, retval] BSTR aspect);\r
407         [propput, helpstring("Sets video aspect ratio.")]\r
408         HRESULT aspectRatio([in] BSTR aspect);\r
409 \r
410         [helpstring("toggle fullscreen/windowed state.")]\r
411         HRESULT toggleFullscreen();\r
412     };\r
413 \r
414     [\r
415       odl,\r
416       uuid(2D719729-5333-406C-BF12-8DE787FD65E3),\r
417       helpstring("VLC Control"),\r
418       hidden,\r
419       dual,\r
420       oleautomation\r
421     ]\r
422     interface IVLCControl2 : IDispatch\r
423     {\r
424         [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
425         HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);\r
426         [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
427         HRESULT AutoLoop([in] VARIANT_BOOL autoloop);\r
428 \r
429         [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]\r
430         HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);\r
431         [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]\r
432         HRESULT AutoPlay([in] VARIANT_BOOL autoplay);\r
433 \r
434         [id(DISPID_BaseURL), propget, helpstring("Returns/sets the base URL for relative paths")]\r
435         HRESULT BaseURL([out, retval] BSTR* url);\r
436         [id(DISPID_BaseURL), propput, helpstring("Returns/sets the base URL for relative paths")]\r
437         HRESULT BaseURL([in] BSTR url);\r
438 \r
439         [id(DISPID_StartTime), propget, helpstring("Returns/sets playback start time of URL.")]\r
440         HRESULT StartTime([out, retval] long* seconds);\r
441         [id(DISPID_StartTime), propput, helpstring("Returns/sets playback start time of URL.")]\r
442         HRESULT StartTime([in] long seconds);\r
443 \r
444         [id(DISPID_MRL), propget, helpstring("Returns/sets the default MRL in playlist")]\r
445         HRESULT MRL([out, retval] BSTR* mrl);\r
446         [id(DISPID_MRL), propput, helpstring("Returns/sets the default MRL in playlist")]\r
447         HRESULT MRL([in] BSTR mrl);\r
448 \r
449         [propget, helpstring("Returns VLC Version.")]\r
450         HRESULT VersionInfo([out, retval] BSTR* version);\r
451 \r
452         [id(DISPID_Visible), propget, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
453         HRESULT Visible([out, retval] VARIANT_BOOL* visible);\r
454         [id(DISPID_Visible), propput, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
455         HRESULT Visible([in] VARIANT_BOOL visible);\r
456 \r
457         [id(DISPID_Volume), propget, helpstring("Returns/sets default audio volume.")]\r
458         HRESULT Volume([out, retval] long* volume);\r
459         [id(DISPID_Volume), propput, helpstring("Returns/sets default audio volume.")]\r
460         HRESULT Volume([in] long volume);\r
461 \r
462         [propget, helpstring("Returns the audio object.")]\r
463         HRESULT audio([out, retval] IVLCAudio** obj);\r
464 \r
465         [propget, helpstring("Returns the audio object.")]\r
466         HRESULT input([out, retval] IVLCInput** obj);\r
467 \r
468         [propget, helpstring("Returns the log object.")]\r
469         HRESULT log([out, retval] IVLCLog** obj);\r
470 \r
471         [propget, helpstring("Returns the playlist object.")]\r
472         HRESULT playlist([out, retval] IVLCPlaylist** obj);\r
473 \r
474         [propget, helpstring("Returns the audio object.")]\r
475         HRESULT video([out, retval] IVLCVideo** obj);\r
476     };\r
477 \r
478     [\r
479       uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),\r
480       helpstring("VLC control (deprecated)"),\r
481       control\r
482     ]\r
483     coclass VLCPlugin\r
484     {\r
485         [default] interface IVLCControl;\r
486         interface IVLCControl2;\r
487         [default, source] dispinterface DVLCEvents;\r
488     };\r
489 \r
490     [\r
491       uuid(9BE31822-FDAD-461B-AD51-BE1D1C159921),\r
492       helpstring("VLC control"),\r
493       control\r
494     ]\r
495     coclass VLCPlugin2\r
496     {\r
497         [default] interface IVLCControl2;\r
498         interface IVLCControl;\r
499         [default, source] dispinterface DVLCEvents;\r
500     };\r
501 };\r