2005-01-19 18:14:16 +01:00
/*****************************************************************************
* axvlc.idl: ActiveX control for VLC
*****************************************************************************
2005-07-09 08:17:09 +02:00
* Copyright (C) 2005 the VideoLAN team
2005-01-19 18:14:16 +01:00
*
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
2006-01-13 00:10:04 +01:00
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
2005-01-19 18:14:16 +01:00
*****************************************************************************/
[
uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),
version(1.0),
helpstring("VideoLAN VLC ActiveX Plugin"),
]
library AXVLC
{
importlib("stdole2.tlb");
// Forward declare all types defined in this typelib
interface IVLCControl;
dispinterface DVLCEvents;
2005-08-21 19:40:32 +02:00
enum VLCPlaylistMode
{
2005-02-17 13:06:01 +01:00
VLCPlayListInsert = 1,
2005-08-21 19:40:32 +02:00
VLCPlayListInsertAndGo = 9,
2005-02-17 13:06:01 +01:00
VLCPlayListReplace = 2,
2005-08-21 19:40:32 +02:00
VLCPlayListReplaceAndGo = 10,
2005-02-17 13:06:01 +01:00
VLCPlayListAppend = 4,
2005-08-21 19:40:32 +02:00
VLCPlayListAppendAndGo = 12,
2005-02-17 13:06:01 +01:00
VLCPlayListCheckInsert = 16
2005-01-19 18:14:16 +01:00
};
// playlist target position
2005-02-17 13:06:01 +01:00
const int VLCPlayListEnd = -666;
// DISPID definitions
2005-08-21 19:40:32 +02:00
const int DISPID_Visible = 100;
const int DISPID_Playing = 101;
const int DISPID_Position = 102;
const int DISPID_Time = 103;
const int DISPID_Length = 104;
const int DISPID_Volume = 105;
const int DISPID_MRL = 106;
const int DISPID_AutoPlay = 107;
const int DISPID_AutoLoop = 108;
2005-01-19 18:14:16 +01:00
[
odl,
uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),
helpstring("VLC Control"),
dual,
hidden,
oleautomation
]
2005-08-21 19:40:32 +02:00
interface IVLCControl : IDispatch
{
2005-02-17 13:06:01 +01:00
[id(DISPID_Visible), propget, bindable, helpstring("Shows or hides plugin.")]
2005-01-19 18:14:16 +01:00
HRESULT Visible([out, retval] VARIANT_BOOL* visible);
2005-02-17 13:06:01 +01:00
[id(DISPID_Visible), propput, bindable, helpstring("Shows or hides plugin.")]
2005-01-19 18:14:16 +01:00
HRESULT Visible([in] VARIANT_BOOL visible);
[helpstring("Play current target in playlist.")]
HRESULT play();
[helpstring("Pause playback.")]
HRESULT pause();
[helpstring("Stop playback.")]
HRESULT stop();
2005-08-21 19:40:32 +02:00
[id(DISPID_Playing), hidden, propget, helpstring("Returns whether VLC is playing.")]
2005-01-19 18:14:16 +01:00
HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);
2005-08-21 19:40:32 +02:00
[id(DISPID_Position), propget, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]
2005-01-19 18:14:16 +01:00
HRESULT Position([out, retval] float* position);
2005-08-21 19:40:32 +02:00
[id(DISPID_Position), propput, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]
2005-01-19 18:14:16 +01:00
HRESULT Position([in] float position);
src/libvlc.c,include/vlc/vlc.h, include/variables.h: added a new a API to libvlc called VLC_VariableType, this API allows to retrieve the type of a VLC variable. this API is very useful for binding with highlevel languages, such as javascript, VBScript, etc... which allow for weakly typed variables such as Javascript. in order to support the VLC_VariableType API, i've had to move the variable type definitions from variables.h to vlc/vlc.h
vlccontrol.cpp, axvlc.idl, axvlc.tlb, axvlc_idl.h: added a getVariable and setVariable to provide support for VLC_GetVariable and VLC_SetVariable respectively,and requires the new VLC_VariableType API.
main.cpp, viewobject.h, viewobject.cpp: support for advise on viewobject
2005-05-11 18:56:46 +02:00
[id(DISPID_Time), propget, helpstring("Specifies playback time relative to the start of current target in playlist.")]
2005-01-19 18:14:16 +01:00
HRESULT Time([out, retval] int* seconds);
src/libvlc.c,include/vlc/vlc.h, include/variables.h: added a new a API to libvlc called VLC_VariableType, this API allows to retrieve the type of a VLC variable. this API is very useful for binding with highlevel languages, such as javascript, VBScript, etc... which allow for weakly typed variables such as Javascript. in order to support the VLC_VariableType API, i've had to move the variable type definitions from variables.h to vlc/vlc.h
vlccontrol.cpp, axvlc.idl, axvlc.tlb, axvlc_idl.h: added a getVariable and setVariable to provide support for VLC_GetVariable and VLC_SetVariable respectively,and requires the new VLC_VariableType API.
main.cpp, viewobject.h, viewobject.cpp: support for advise on viewobject
2005-05-11 18:56:46 +02:00
[id(DISPID_Time), propput, helpstring("Specifies playback time relative to the start of current target in playlist.")]
2005-01-19 18:14:16 +01:00
HRESULT Time([in] int seconds);
[helpstring("Advance or backtrack playback time, relative to current time.")]
HRESULT shuttle([in] int seconds);
[helpstring("Switch between normal and fullscreen video.")]
HRESULT fullscreen();
2005-08-21 19:40:32 +02:00
[id(DISPID_Length), propget, hidden, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]
2005-01-19 18:14:16 +01:00
HRESULT Length([out, retval] int* seconds);
[helpstring("Increases playback speed, one of 1x, 2x, 4x, 8x.")]
HRESULT playFaster();
[helpstring("Decreases playback speed, one of 1x, 2x, 4x, 8x.")]
HRESULT playSlower();
2005-08-21 19:40:32 +02:00
[id(DISPID_Volume), propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]
2005-01-19 18:14:16 +01:00
HRESULT Volume([out, retval] int* volume);
2005-08-21 19:40:32 +02:00
[id(DISPID_Volume), propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]
2005-01-19 18:14:16 +01:00
HRESULT Volume([in] int volume);
[helpstring("Mute/unmute playback sound volume.")]
HRESULT toggleMute();
src/libvlc.c,include/vlc/vlc.h, include/variables.h: added a new a API to libvlc called VLC_VariableType, this API allows to retrieve the type of a VLC variable. this API is very useful for binding with highlevel languages, such as javascript, VBScript, etc... which allow for weakly typed variables such as Javascript. in order to support the VLC_VariableType API, i've had to move the variable type definitions from variables.h to vlc/vlc.h
vlccontrol.cpp, axvlc.idl, axvlc.tlb, axvlc_idl.h: added a getVariable and setVariable to provide support for VLC_GetVariable and VLC_SetVariable respectively,and requires the new VLC_VariableType API.
main.cpp, viewobject.h, viewobject.cpp: support for advise on viewobject
2005-05-11 18:56:46 +02:00
[helpstring("Set a value to a VLC variable.")]
HRESULT setVariable([in] BSTR name, [in] VARIANT value);
[helpstring("Retrieve the value of a VLC variable.")]
HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);
2005-01-19 18:14:16 +01:00
[helpstring("Add a target to the current playlist.")]
/*
** use VARIANT rather than a SAFEARRAY as argument type
** for compatibility with some scripting language (JScript)
*/
HRESULT addTarget([in] BSTR uri, [in] VARIANT options, [in] enum VLCPlaylistMode mode, [in] int position);
[propget, helpstring("Returns index of current target in playlist.")]
HRESULT PlaylistIndex([out, retval] int* index);
[propget, helpstring("Returns number of items in playlist.")]
HRESULT PlaylistCount([out, retval] int* index);
[helpstring("Advance to next item in playlist.")]
HRESULT playlistNext();
[helpstring("Advance to previous item in playlist.")]
HRESULT playlistPrev();
[helpstring("Remove all items from playlist.")]
HRESULT playlistClear();
2005-08-21 19:40:32 +02:00
[propget, hidden, helpstring("Returns VLC Version.")]
2005-01-19 18:14:16 +01:00
HRESULT VersionInfo([out, retval] BSTR* version);
2005-08-21 19:40:32 +02:00
[id(DISPID_MRL), propget, helpstring("Returns initial MRL in default playlist")]
HRESULT MRL([out, retval] BSTR* mrl);
[id(DISPID_MRL), propput, helpstring("Specifies initial MRL in default playlist")]
HRESULT MRL([in] BSTR mrl);
[id(DISPID_AutoPlay), propget, helpstring("Specifies whether default playlist is played on startup")]
HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
[id(DISPID_AutoPlay), propput, helpstring("Returns whether default playlist is played on startup")]
HRESULT AutoPlay([in] VARIANT_BOOL autoplay);
[id(DISPID_AutoLoop), propget, helpstring("Specifies whether default playlist is looped")]
HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
[id(DISPID_AutoLoop), propput, helpstring("Returns whether default playlist is looped")]
HRESULT AutoLoop([in] VARIANT_BOOL autoloop);
2005-01-19 18:14:16 +01:00
};
2005-08-21 19:40:32 +02:00
const int DISPID_PlayEvent = 100;
const int DISPID_PauseEvent = 101;
const int DISPID_StopEvent = 102;
2005-01-19 18:14:16 +01:00
[
uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),
helpstring("Event interface for VLC control"),
hidden
]
2005-08-21 19:40:32 +02:00
dispinterface DVLCEvents
{
2005-01-19 18:14:16 +01:00
properties:
methods:
2005-02-17 13:06:01 +01:00
[id(DISPID_PlayEvent), helpstring("Playback in progress")]
2005-08-21 19:40:32 +02:00
void play();
2005-02-17 13:06:01 +01:00
[id(DISPID_PauseEvent), helpstring("Playback has paused")]
2005-08-21 19:40:32 +02:00
void pause();
2005-02-17 13:06:01 +01:00
[id(DISPID_StopEvent), helpstring("Playback has stopped")]
2005-08-21 19:40:32 +02:00
void stop();
2005-01-19 18:14:16 +01:00
};
[
uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),
helpstring("VLC control"),
control
]
2005-08-21 19:40:32 +02:00
coclass VLCPlugin
{
2005-01-19 18:14:16 +01:00
[default] interface IVLCControl;
[default, source] dispinterface DVLCEvents;
};
};