]> git.sesse.net Git - vlc/blob - activex/axvlc.idl
* modules/demux/mkv.cpp: remove useless printf()s
[vlc] / activex / axvlc.idl
1 /*****************************************************************************\r
2  * axvlc.idl: ActiveX control for VLC\r
3  *****************************************************************************\r
4  * Copyright (C) 2005 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 [\r
27   uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),\r
28   version(1.0),\r
29   helpstring("VideoLAN VLC ActiveX Plugin"),\r
30 ]\r
31 library AXVLC\r
32 {\r
33     importlib("stdole2.tlb");\r
34 \r
35     // Forward declare all types defined in this typelib\r
36     interface IVLCControl;\r
37     dispinterface DVLCEvents;\r
38 \r
39     enum VLCPlaylistMode\r
40     {\r
41         VLCPlayListInsert       =  1,\r
42         VLCPlayListInsertAndGo  =  9,\r
43         VLCPlayListReplace      =  2,\r
44         VLCPlayListReplaceAndGo = 10,\r
45         VLCPlayListAppend       =  4,\r
46         VLCPlayListAppendAndGo  = 12,\r
47         VLCPlayListCheckInsert  = 16\r
48     };\r
49 \r
50     // playlist target position\r
51     const int VLCPlayListEnd    = -666;\r
52 \r
53     // DISPID definitions\r
54     const int DISPID_Visible    = 100;\r
55     const int DISPID_Playing    = 101;\r
56     const int DISPID_Position   = 102;\r
57     const int DISPID_Time       = 103;\r
58     const int DISPID_Length     = 104;\r
59     const int DISPID_Volume     = 105;\r
60     const int DISPID_MRL        = 106;\r
61     const int DISPID_AutoPlay   = 107;\r
62     const int DISPID_AutoLoop   = 108;\r
63 \r
64     [\r
65       odl,\r
66       uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),\r
67       helpstring("VLC Control"),\r
68       dual,\r
69       hidden,\r
70       oleautomation\r
71     ]\r
72     interface IVLCControl : IDispatch\r
73     {\r
74         [id(DISPID_Visible), propget, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
75         HRESULT Visible([out, retval] VARIANT_BOOL* visible);\r
76         [id(DISPID_Visible), propput, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]\r
77         HRESULT Visible([in] VARIANT_BOOL visible);\r
78         [helpstring("Play current target in playlist.")]\r
79         HRESULT play();\r
80         [helpstring("Pause playback.")]\r
81         HRESULT pause();\r
82         [helpstring("Stop playback.")]\r
83         HRESULT stop();\r
84         [id(DISPID_Playing), hidden, propget, helpstring("Returns a value that determines whether VLC is currently playing.")]\r
85         HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);\r
86         [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
87         HRESULT Position([out, retval] float* position);\r
88         [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
89         HRESULT Position([in] float position);\r
90         [id(DISPID_Time), propget, helpstring("Returns/sets playback time relative to the start of the current item.")]\r
91         HRESULT Time([out, retval] int* seconds);\r
92         [id(DISPID_Time), propput, helpstring("Returns/sets playback time relative to the start of the current item.")]\r
93         HRESULT Time([in] int seconds);\r
94         [helpstring("Advance or backtrack playback time, relative to current time.")]  //possibly find a better word to replace 'backtrack' [t]\r
95         HRESULT shuttle([in] int seconds);\r
96         [helpstring("Switch video between normal and fullscreen view modes.")]\r
97         HRESULT fullscreen();\r
98         [id(DISPID_Length), propget, hidden, helpstring("Returns the total length, in seconds, of the current item, may be unknown.")]\r
99         HRESULT Length([out, retval] int* seconds);\r
100         [helpstring("Increases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]\r
101         HRESULT playFaster();\r
102         [helpstring("Decreases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]\r
103         HRESULT playSlower();\r
104         [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
105         HRESULT Volume([out, retval] int* volume);\r
106         [id(DISPID_Volume), propput, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]\r
107         HRESULT Volume([in] int volume);\r
108         [helpstring("Mute/unmute playback audio.")]\r
109         HRESULT toggleMute();\r
110         [helpstring("Sets the value of a VLC variable.")]\r
111         HRESULT setVariable([in] BSTR name, [in] VARIANT value);\r
112         [helpstring("Returns the value of a VLC variable.")]\r
113         HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);\r
114         [helpstring("Add an item to the playlist.")]\r
115 \r
116 /*\r
117 ** use VARIANT rather than a SAFEARRAY as argument type\r
118 ** for compatibility with some scripting language (JScript)\r
119 */\r
120 \r
121         HRESULT addTarget([in] BSTR uri, [in] VARIANT options, [in] enum VLCPlaylistMode mode, [in] int position);\r
122         [propget, helpstring("Returns index of current item in playlist.")]\r
123         HRESULT PlaylistIndex([out, retval] int* index);\r
124         [propget, helpstring("Returns number of items in playlist.")]\r
125         HRESULT PlaylistCount([out, retval] int* index);\r
126         [helpstring("Advance to next item in playlist.")]\r
127         HRESULT playlistNext();\r
128         [helpstring("Advance to previous item in playlist.")]\r
129         HRESULT playlistPrev();\r
130         [helpstring("Remove all items from playlist.")]\r
131         HRESULT playlistClear();\r
132         [propget, hidden, helpstring("Returns VLC Version.")]\r
133         HRESULT VersionInfo([out, retval] BSTR* version);\r
134         [id(DISPID_MRL), propget, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]\r
135         HRESULT MRL([out, retval] BSTR* mrl);\r
136         [id(DISPID_MRL), propput, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]\r
137         HRESULT MRL([in] BSTR mrl);\r
138         [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]\r
139         HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);\r
140         [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]\r
141         HRESULT AutoPlay([in] VARIANT_BOOL autoplay);\r
142         [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
143         HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);\r
144         [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]\r
145         HRESULT AutoLoop([in] VARIANT_BOOL autoloop);\r
146     };\r
147 \r
148     const int DISPID_PlayEvent  = 100;\r
149     const int DISPID_PauseEvent = 101;\r
150     const int DISPID_StopEvent  = 102;\r
151 \r
152     [\r
153       uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),\r
154       helpstring("Event interface for VLC control"),\r
155       hidden\r
156     ]\r
157     dispinterface DVLCEvents\r
158     {\r
159         properties:\r
160         methods:\r
161             [id(DISPID_PlayEvent), helpstring("Playing")]\r
162             void play();\r
163             [id(DISPID_PauseEvent), helpstring("Paused")]\r
164             void pause();\r
165             [id(DISPID_StopEvent), helpstring("Stopped")]\r
166             void stop();\r
167     };\r
168 \r
169     [\r
170       uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),\r
171       helpstring("VLC control"),\r
172       control\r
173     ]\r
174     coclass VLCPlugin\r
175     {\r
176         [default] interface IVLCControl;\r
177         [default, source] dispinterface DVLCEvents;\r
178     };\r
179 };\r