]> git.sesse.net Git - vlc/blob - activex/axvlc.idl
remove excess whitespace
[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 IVLCPlaylist;\r
40     interface IVLCVideo;\r
41     interface IVLCControl2;\r
42     dispinterface DVLCEvents;\r
43 \r
44     importlib("stdole2.tlb");\r
45 \r
46     typedef [public] enum VLCPlaylistMode\r
47     {\r
48         VLCPlayListInsert       =  1,\r
49         VLCPlayListInsertAndGo  =  9,\r
50         VLCPlayListReplace      =  2,\r
51         VLCPlayListReplaceAndGo = 10,\r
52         VLCPlayListAppend       =  4,\r
53         VLCPlayListAppendAndGo  = 12,\r
54         VLCPlayListCheckInsert  = 16\r
55     } eVLCPlaylistMode;\r
56 \r
57     // playlist target position\r
58     const int VLCPlayListEnd    = -666;\r
59 \r
60     // DISPID definitions\r
61     const int DISPID_Visible    = 100;\r
62     const int DISPID_Playing    = 101;\r
63     const int DISPID_Position   = 102;\r
64     const int DISPID_Time       = 103;\r
65     const int DISPID_Length     = 104;\r
66     const int DISPID_Volume     = 105;\r
67     const int DISPID_MRL        = 106;\r
68     const int DISPID_AutoPlay   = 107;\r
69     const int DISPID_AutoLoop   = 108;\r
70     const int DISPID_StartTime  = 109;\r
71     const int DISPID_BaseURL    = 110;\r
72 \r
73     [\r
74       odl,\r
75       uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),\r
76       helpstring("VLC Control (deprecated)"),\r
77       dual,\r
78       hidden,\r
79       oleautomation\r
80     ]\r
81     interface IVLCControl : IDispatch\r
82     {\r
83         [id(DISPID_Visible), propget, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
84         HRESULT Visible([out, retval] VARIANT_BOOL* visible);\r
85         [id(DISPID_Visible), propput, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
86         HRESULT Visible([in] VARIANT_BOOL visible);\r
87         [helpstring("Play current target in playlist.")]\r
88         HRESULT play();\r
89         [helpstring("Pause playback.")]\r
90         HRESULT pause();\r
91         [helpstring("Stop playback.")]\r
92         HRESULT stop();\r
93         [id(DISPID_Playing), hidden, propget, helpstring("Returns a value that determines whether VLC is currently playing.")]\r
94         HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);\r
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.")]\r
96         HRESULT Position([out, retval] float* position);\r
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.")]\r
98         HRESULT Position([in] float position);\r
99         [id(DISPID_Time), propget, helpstring("Returns/sets playback time relative to the start of the current item.")]\r
100         HRESULT Time([out, retval] int* seconds);\r
101         [id(DISPID_Time), propput, helpstring("Returns/sets playback time relative to the start of the current item.")]\r
102         HRESULT Time([in] int seconds);\r
103         [helpstring("Advance or backtrack playback time, relative to current time.")]  //possibly find a better word to replace 'backtrack' [t]\r
104         HRESULT shuttle([in] int seconds);\r
105         [helpstring("Switch video between normal and fullscreen view modes.")]\r
106         HRESULT fullscreen();\r
107         [id(DISPID_Length), propget, hidden, helpstring("Returns the total length, in seconds, of the current item, may be unknown.")]\r
108         HRESULT Length([out, retval] int* seconds);\r
109         [helpstring("Increases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]\r
110         HRESULT playFaster();\r
111         [helpstring("Decreases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]\r
112         HRESULT playSlower();\r
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]\r
114         HRESULT Volume([out, retval] int* volume);\r
115         [id(DISPID_Volume), propput, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]\r
116         HRESULT Volume([in] int volume);\r
117         [helpstring("Mute/unmute playback audio.")]\r
118         HRESULT toggleMute();\r
119         [helpstring("Sets the value of a VLC variable.")]\r
120         HRESULT setVariable([in] BSTR name, [in] VARIANT value);\r
121         [helpstring("Returns the value of a VLC variable.")]\r
122         HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);\r
123         [helpstring("Add an item to the playlist.")]\r
124 \r
125 /*\r
126 ** use VARIANT rather than a SAFEARRAY as argument type\r
127 ** for compatibility with some scripting language (JScript)\r
128 */\r
129 \r
130         HRESULT addTarget([in] BSTR uri, [in] VARIANT options, [in] enum VLCPlaylistMode mode, [in] int position);\r
131         [propget, helpstring("Returns index of current item in playlist.")]\r
132         HRESULT PlaylistIndex([out, retval] int* index);\r
133         [propget, helpstring("Returns number of items in playlist.")]\r
134         HRESULT PlaylistCount([out, retval] int* index);\r
135         [helpstring("Advance to next item in playlist.")]\r
136         HRESULT playlistNext();\r
137         [helpstring("Advance to previous item in playlist.")]\r
138         HRESULT playlistPrev();\r
139         [helpstring("Remove all items from playlist.")]\r
140         HRESULT playlistClear();\r
141         [propget, hidden, helpstring("Returns VLC Version.")]\r
142         HRESULT VersionInfo([out, retval] BSTR* version);\r
143         [id(DISPID_MRL), propget, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]\r
144         HRESULT MRL([out, retval] BSTR* mrl);\r
145         [id(DISPID_MRL), propput, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]\r
146         HRESULT MRL([in] BSTR mrl);\r
147         [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]\r
148         HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);\r
149         [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]\r
150         HRESULT AutoPlay([in] VARIANT_BOOL autoplay);\r
151         [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
152         HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);\r
153         [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
154         HRESULT AutoLoop([in] VARIANT_BOOL autoloop);\r
155     };\r
156 \r
157     const int DISPID_PlayEvent  = 100;\r
158     const int DISPID_PauseEvent = 101;\r
159     const int DISPID_StopEvent  = 102;\r
160 \r
161     [\r
162       uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),\r
163       helpstring("Event interface for VLC control"),\r
164       hidden\r
165     ]\r
166     dispinterface DVLCEvents\r
167     {\r
168         properties:\r
169         methods:\r
170             [id(DISPID_PlayEvent), helpstring("Playing")]\r
171             void play();\r
172             [id(DISPID_PauseEvent), helpstring("Paused")]\r
173             void pause();\r
174             [id(DISPID_StopEvent), helpstring("Stopped")]\r
175             void stop();\r
176     };\r
177 \r
178     [\r
179       odl,\r
180       uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),\r
181       helpstring("VLC Audio APIs"),\r
182       dual,\r
183       oleautomation\r
184     ]\r
185     interface IVLCAudio : IDispatch\r
186     {\r
187         [propget, helpstring("Returns/sets the audio mute state.")]\r
188         HRESULT mute([out, retval] VARIANT_BOOL* muted);\r
189         [propput, helpstring("Returns/sets the audio mute state.")]\r
190         HRESULT mute([in] VARIANT_BOOL muted);\r
191 \r
192         [propget, helpstring("Returns/sets audio volume as a percent value.")]\r
193         HRESULT volume([out, retval] int* volume);\r
194         [propput, helpstring("Returns/sets audio volume as a percent value.")]\r
195         HRESULT volume([in] int volume);\r
196 \r
197         [helpstring("Mute/unmute audio playback.")]\r
198         HRESULT toggleMute();\r
199     };\r
200 \r
201     [\r
202       odl,\r
203       uuid(49E0DBD1-9440-466C-9C97-95C67190C603),\r
204       helpstring("VLC Input APIs"),\r
205       dual,\r
206       oleautomation\r
207     ]\r
208     interface IVLCInput : IDispatch\r
209     {\r
210         [propget, helpstring("Returns the clip length, in milliseconds.")]\r
211         HRESULT length([out, retval] __int64* length);\r
212 \r
213         [propget, helpstring("Returns/sets playback position in current clip.  Position is ranging from 0.0 to 1.0.")]\r
214         HRESULT position([out, retval] float* position);\r
215         [propput, helpstring("Returns/sets playback position in the current clip.  Position ranging from 0.0 to 1.0.")]\r
216         HRESULT position([in] float position);\r
217 \r
218         [propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]\r
219         HRESULT time([out, retval] __int64* time);\r
220         [propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]\r
221         HRESULT time([in] __int64 time);\r
222 \r
223         [propget, helpstring("Returns current playback state.")]\r
224         HRESULT state([out, retval] int* state);\r
225 \r
226         [propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]\r
227         HRESULT rate([out, retval] float* rate);\r
228         [propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]\r
229         HRESULT rate([in] float rate);\r
230 \r
231         [propget, helpstring("Returns current playback frames per seconds if available.")]\r
232         HRESULT fps([out, retval] float* fps);\r
233 \r
234         [propget, helpstring("Returns whether current playback displays video.")]\r
235         HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);\r
236     };\r
237 \r
238     [\r
239       odl,\r
240       uuid(54613049-40BF-4035-9E70-0A9312C0188D),\r
241       helpstring("VLC Playlist APIs"),\r
242       dual,\r
243       oleautomation\r
244     ]\r
245     interface IVLCPlaylist : IDispatch\r
246     {\r
247         [propget, helpstring("Returns number of items in playlist.")]\r
248         HRESULT itemCount([out, retval] int* count);\r
249 \r
250         [propget, helpstring("Returns whether playback displays video.")]\r
251         HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);\r
252 \r
253         [helpstring("Add a playlist item.")]\r
254         HRESULT add([in] BSTR uri, [in, optional] VARIANT name, [in, optional] VARIANT options, [out, retval] int* item);\r
255 \r
256         [helpstring("Play/Resume the playlist.")]\r
257         HRESULT play();\r
258 \r
259         [helpstring("Play item in playlist.")]\r
260         HRESULT playItem([in] int item);\r
261 \r
262         [helpstring("Play/Pause current clip.")]\r
263         HRESULT togglePause();\r
264 \r
265         [helpstring("Stop current clip.")]\r
266         HRESULT stop();\r
267 \r
268         [helpstring("Advance to next item in playlist.")]\r
269         HRESULT next();\r
270 \r
271         [helpstring("Advance to previous item in playlist.")]\r
272         HRESULT prev();\r
273 \r
274         [helpstring("Remove all items from playlist.")]\r
275         HRESULT clear();\r
276 \r
277         [helpstring("remove item from playlist.")]\r
278         HRESULT removeItem([in] int item);\r
279     };\r
280 \r
281     [\r
282       odl,\r
283       uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),\r
284       helpstring("VLC Video APIs"),\r
285       dual,\r
286       oleautomation\r
287     ]\r
288     interface IVLCVideo : IDispatch\r
289     {\r
290         [propget, helpstring("Returns/sets the fullscreen state.")]\r
291         HRESULT fullscreen([out, retval] VARIANT_BOOL* fullscreen);\r
292         [propput, helpstring("Returns/sets the fullscreen state.")]\r
293         HRESULT fullscreen([in] VARIANT_BOOL fullscreen);\r
294 \r
295         [propget, helpstring("Returns video original width.")]\r
296         HRESULT width([out, retval] int* width);\r
297 \r
298         [propget, helpstring("Returns video original height.")]\r
299         HRESULT height([out, retval] int* height);\r
300     };\r
301 \r
302     [\r
303       odl,\r
304       uuid(15179CD8-CC12-4242-A58E-E412217FF343),\r
305       helpstring("VLC Configuration options"),\r
306       dual,\r
307       oleautomation\r
308     ]\r
309     interface IVLCConfiguration : IDispatch\r
310     {\r
311         [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
312         HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);\r
313         [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
314         HRESULT AutoLoop([in] VARIANT_BOOL autoloop);\r
315 \r
316         [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]\r
317         HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);\r
318         [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]\r
319         HRESULT AutoPlay([in] VARIANT_BOOL autoplay);\r
320 \r
321         [id(DISPID_BaseURL), propget, helpstring("Returns/sets the base URL for relative paths")]\r
322         HRESULT BaseURL([out, retval] BSTR* url);\r
323         [id(DISPID_BaseURL), propput, helpstring("Returns/sets the base URL for relative paths")]\r
324         HRESULT BaseURL([in] BSTR url);\r
325 \r
326         [id(DISPID_StartTime), propget, helpstring("Returns/sets playback start time of URL.")]\r
327         HRESULT StartTime([out, retval] int* seconds);\r
328         [id(DISPID_StartTime), propput, helpstring("Returns/sets playback start time of URL.")]\r
329         HRESULT StartTime([in] int seconds);\r
330 \r
331         [id(DISPID_MRL), propget, helpstring("Returns/sets the default MRL in playlist")]\r
332         HRESULT MRL([out, retval] BSTR* mrl);\r
333         [id(DISPID_MRL), propput, helpstring("Returns/sets the default MRL in playlist")]\r
334         HRESULT MRL([in] BSTR mrl);\r
335 \r
336         [propget, helpstring("Returns VLC Version.")]\r
337         HRESULT VersionInfo([out, retval] BSTR* version);\r
338 \r
339         [id(DISPID_Visible), propget, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
340         HRESULT Visible([out, retval] VARIANT_BOOL* visible);\r
341         [id(DISPID_Visible), propput, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
342         HRESULT Visible([in] VARIANT_BOOL visible);\r
343 \r
344         [id(DISPID_Volume), propget, helpstring("Returns/sets default audio volume.")]\r
345         HRESULT Volume([out, retval] int* volume);\r
346         [id(DISPID_Volume), propput, helpstring("Returns/sets default audio volume.")]\r
347         HRESULT Volume([in] int volume);\r
348     };\r
349 \r
350     [\r
351       odl,\r
352       uuid(2D719729-5333-406C-BF12-8DE787FD65E3),\r
353       helpstring("VLC Control"),\r
354       dual,\r
355       oleautomation\r
356     ]\r
357     interface IVLCControl2 : IVLCConfiguration\r
358     {\r
359         [propget, helpstring("Returns the audio object.")]\r
360         HRESULT audio([out, retval] IVLCAudio** obj);\r
361 \r
362         [propget, helpstring("Returns the audio object.")]\r
363         HRESULT input([out, retval] IVLCInput** obj);\r
364 \r
365         [propget, helpstring("Returns the playlist object.")]\r
366         HRESULT playlist([out, retval] IVLCPlaylist** obj);\r
367 \r
368         [propget, helpstring("Returns the audio object.")]\r
369         HRESULT video([out, retval] IVLCVideo** obj);\r
370     };\r
371 \r
372     [\r
373       uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),\r
374       helpstring("VLC control (deprecated)"),\r
375       control\r
376     ]\r
377     coclass VLCPlugin\r
378     {\r
379         [default] interface IVLCControl;\r
380         interface IVLCControl2;\r
381         [default, source] dispinterface DVLCEvents;\r
382     };\r
383 \r
384     [\r
385       uuid(9BE31822-FDAD-461B-AD51-BE1D1C159921),\r
386       helpstring("VLC control"),\r
387       control\r
388     ]\r
389     coclass VLCPlugin2\r
390     {\r
391         [default] interface IVLCControl2;\r
392         interface IVLCControl;\r
393         [default, source] dispinterface DVLCEvents;\r
394     };\r
395 };\r