]> git.sesse.net Git - vlc/blob - activex/axvlc.idl
92f82a65b61f7664b5acaed71ffd12915af38c80
[vlc] / activex / axvlc.idl
1 /*****************************************************************************\r
2  * axvlc.idl: ActiveX control for VLC\r
3  *****************************************************************************\r
4  * Copyright (C) 2005 VideoLAN\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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.\r
21  *****************************************************************************/\r
22 \r
23 [\r
24   uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),\r
25   version(1.0),\r
26   helpstring("VideoLAN VLC ActiveX Plugin"),\r
27 ]\r
28 library AXVLC\r
29 {\r
30     importlib("stdole2.tlb");\r
31 \r
32     // Forward declare all types defined in this typelib\r
33     interface IVLCControl;\r
34     dispinterface DVLCEvents;\r
35 \r
36     enum VLCPlaylistMode {\r
37         VLCPlayListInsert      =  1,\r
38         VLCPlayListReplace     =  2,\r
39         VLCPlayListAppend      =  4,\r
40         VLCPlayListGo          =  8,\r
41         VLCPlayListCheckInsert = 16\r
42     };\r
43 \r
44     // playlist target position\r
45     const int VLCPlayListEnd = -666;\r
46 \r
47     [\r
48       odl,\r
49       uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),\r
50       helpstring("VLC Control"),\r
51       dual,\r
52       hidden,\r
53       oleautomation\r
54     ]\r
55     interface IVLCControl : IDispatch {\r
56         [id(0), bindable, defaultbind, propget, helpstring("Specifies current target in playlist")]\r
57         HRESULT Value([out, retval] VARIANT* pvarValue);\r
58         [id(0), bindable, defaultbind, propput, helpstring("Specifies current target in playlist")]\r
59         HRESULT Value([in] VARIANT pvarValue);\r
60         [propget, bindable, helpstring("Shows or hides plugin.")]\r
61         HRESULT Visible([out, retval] VARIANT_BOOL* visible);\r
62         [propput, bindable, helpstring("Shows or hides plugin.")]\r
63         HRESULT Visible([in] VARIANT_BOOL visible);\r
64         [helpstring("Play current target in playlist.")]\r
65         HRESULT play();\r
66         [helpstring("Pause playback.")]\r
67         HRESULT pause();\r
68         [helpstring("Stop playback.")]\r
69         HRESULT stop();\r
70         [propget, helpstring("Specifies whether VLC is playing.")]\r
71         HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);\r
72         [propput, helpstring("Specifies whether VLC is playing.")]\r
73         HRESULT Playing([in] VARIANT_BOOL isPlaying);\r
74         [propget, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]\r
75         HRESULT Position([out, retval] float* position);\r
76         [propput, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]\r
77         HRESULT Position([in] float position);\r
78         [propget, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
79         HRESULT Time([out, retval] int* seconds);\r
80         [propput, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
81         HRESULT Time([in] int seconds);\r
82         [helpstring("Advance or backtrack playback time, relative to current time.")]\r
83         HRESULT shuttle([in] int seconds);\r
84         [helpstring("Switch between normal and fullscreen video.")]\r
85         HRESULT fullscreen();\r
86         [propget, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]\r
87         HRESULT Length([out, retval] int* seconds);\r
88         [helpstring("Increases playback speed, one of 1x, 2x, 4x, 8x.")]\r
89         HRESULT playFaster();\r
90         [helpstring("Decreases playback speed, one of 1x, 2x, 4x, 8x.")]\r
91         HRESULT playSlower();\r
92         [propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
93         HRESULT Volume([out, retval] int* volume);\r
94         [propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
95         HRESULT Volume([in] int volume);\r
96         [helpstring("Mute/unmute playback sound volume.")]\r
97         HRESULT toggleMute();\r
98         [helpstring("Add a target to the current playlist.")]\r
99 \r
100 /*\r
101 ** use VARIANT rather than a SAFEARRAY as argument type\r
102 ** for compatibility with some scripting language (JScript)\r
103 */\r
104 \r
105         HRESULT addTarget([in] BSTR uri, [in] VARIANT options, [in] enum VLCPlaylistMode mode, [in] int position);\r
106         [propget, helpstring("Returns index of current target in playlist.")]\r
107         HRESULT PlaylistIndex([out, retval] int* index);\r
108         [propget, helpstring("Returns number of items in playlist.")]\r
109         HRESULT PlaylistCount([out, retval] int* index);\r
110         [helpstring("Advance to next item in playlist.")]\r
111         HRESULT playlistNext();\r
112         [helpstring("Advance to previous item in playlist.")]\r
113         HRESULT playlistPrev();\r
114         [helpstring("Remove all items from playlist.")]\r
115         HRESULT playlistClear();\r
116         [propget, helpstring("Returns VLC Version.")]\r
117         HRESULT VersionInfo([out, retval] BSTR* version);\r
118     };\r
119 \r
120     [\r
121       uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),\r
122       helpstring("Event interface for VLC control"),\r
123       hidden\r
124     ]\r
125     dispinterface DVLCEvents {\r
126         properties:\r
127         methods:\r
128             [id(1), helpstring("Playback in progress")]\r
129             void Play();\r
130             [id(2), helpstring("Playback has paused")]\r
131             void Pause();\r
132             [id(3), helpstring("Playback has stopped")]\r
133             void Stop();\r
134     };\r
135 \r
136     [\r
137       uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),\r
138       helpstring("VLC control"),\r
139       control\r
140     ]\r
141     coclass VLCPlugin {\r
142         [default] interface IVLCControl;\r
143         [default, source] dispinterface DVLCEvents;\r
144     };\r
145 };\r