📄 axvlc.idl
字号:
/*****************************************************************************
* axvlc.idl: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2006 the VideoLAN team
*
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
* Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
//comments terminated by [t] are by tonsofpcs, regarding the string review. April 02, 2006. [t]
//Possibly change all instances of "the current playlist" to "the playlist" and "current playlist" to "the playlist" [t]
import "ocidl.idl";
[
uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),
version(1.0),
helpstring("VideoLAN VLC ActiveX Plugin")
]
library AXVLC
{
// Forward declare all types defined in this typelib
interface IVLCControl;
interface IVLCAudio;
interface IVLCInput;
interface IVLCLog;
interface IVLCMessage;
interface IVLCMessageIterator;
interface IVLCMessages;
interface IVLCPlaylist;
interface IVLCVideo;
interface IVLCControl2;
dispinterface DVLCEvents;
importlib("stdole2.tlb");
typedef [public] enum VLCPlaylistMode
{
VLCPlayListInsert = 1,
VLCPlayListInsertAndGo = 9,
VLCPlayListReplace = 2,
VLCPlayListReplaceAndGo = 10,
VLCPlayListAppend = 4,
VLCPlayListAppendAndGo = 12,
VLCPlayListCheckInsert = 16
} eVLCPlaylistMode;
// playlist target position
const int VLCPlayListEnd = -666;
// DISPID definitions
const int DISPID_BackColor = -501;
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;
const int DISPID_StartTime = 109;
const int DISPID_BaseURL = 110;
const int DISPID_Toolbar = 111;
[
odl,
uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),
helpstring("VLC Control (deprecated)"),
dual,
oleautomation
]
interface IVLCControl : IDispatch
{
[id(DISPID_Visible), propget, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
HRESULT Visible([out, retval] VARIANT_BOOL* visible);
[id(DISPID_Visible), propput, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
HRESULT Visible([in] VARIANT_BOOL visible);
[helpstring("Play current target in playlist.")]
HRESULT play();
[helpstring("Pause playback.")]
HRESULT pause();
[helpstring("Stop playback.")]
HRESULT stop();
[id(DISPID_Playing), hidden, propget, helpstring("Returns a value that determines whether VLC is currently playing.")]
HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);
[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.")]
HRESULT Position([out, retval] float* position);
[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.")]
HRESULT Position([in] float position);
[id(DISPID_Time), propget, helpstring("Returns/sets playback time relative to the start of the current item.")]
HRESULT Time([out, retval] int* seconds);
[id(DISPID_Time), propput, helpstring("Returns/sets playback time relative to the start of the current item.")]
HRESULT Time([in] int seconds);
[helpstring("Advance or backtrack playback time, relative to current time.")] //possibly find a better word to replace 'backtrack' [t]
HRESULT shuttle([in] int seconds);
[helpstring("Switch video between normal and fullscreen view modes.")]
HRESULT fullscreen();
[id(DISPID_Length), propget, hidden, helpstring("Returns the total length, in seconds, of the current item, may be unknown.")]
HRESULT Length([out, retval] int* seconds);
[helpstring("Increases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
HRESULT playFaster();
[helpstring("Decreases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
HRESULT playSlower();
[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]
HRESULT Volume([out, retval] int* volume);
[id(DISPID_Volume), propput, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]
HRESULT Volume([in] int volume);
[helpstring("Mute/unmute playback audio.")]
HRESULT toggleMute();
[helpstring("Sets the value of a VLC variable.")]
HRESULT setVariable([in] BSTR name, [in] VARIANT value);
[helpstring("Returns the value of a VLC variable.")]
HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);
[helpstring("Add an item to the 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 item 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();
[propget, hidden, helpstring("Returns VLC Version.")]
HRESULT VersionInfo([out, retval] BSTR* version);
[id(DISPID_MRL), propget, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
HRESULT MRL([out, retval] BSTR* mrl);
[id(DISPID_MRL), propput, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
HRESULT MRL([in] BSTR mrl);
[id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
[id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
HRESULT AutoPlay([in] VARIANT_BOOL autoplay);
[id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
[id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
HRESULT AutoLoop([in] VARIANT_BOOL autoloop);
};
const int DISPID_PlayEvent = 100;
const int DISPID_PauseEvent = 101;
const int DISPID_StopEvent = 102;
[
uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),
helpstring("Event interface for VLC control"),
]
dispinterface DVLCEvents
{
properties:
methods:
[id(DISPID_PlayEvent), helpstring("Playing")]
void play();
[id(DISPID_PauseEvent), helpstring("Paused")]
void pause();
[id(DISPID_StopEvent), helpstring("Stopped")]
void stop();
};
[
odl,
uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),
helpstring("VLC Audio APIs"),
dual,
oleautomation
]
interface IVLCAudio : IDispatch
{
[propget, helpstring("Returns/sets the audio mute state.")]
HRESULT mute([out, retval] VARIANT_BOOL* muted);
[propput, helpstring("Returns/sets the audio mute state.")]
HRESULT mute([in] VARIANT_BOOL muted);
[propget, helpstring("Returns/sets audio volume as a percent value.")]
HRESULT volume([out, retval] long* volume);
[propput, helpstring("Returns/sets audio volume as a percent value.")]
HRESULT volume([in] long volume);
[helpstring("Mute/unmute audio playback.")]
HRESULT toggleMute();
[propget, helpstring("Returns/sets audio track used/to use.")]
HRESULT track([out, retval] long* track);
[propput, helpstring("Returns/sets audio track used/to use.")]
HRESULT track([in] long track);
[propget, helpstring("Returns audio channel [1-5] indicating; stereo, reverse stereo, left, right, dolby.")]
HRESULT channel([out, retval] long* channel);
[propput, helpstring("Sets audio channel to [1-5] indicating; stereo, reverse stereo, left, right, dolby.")]
HRESULT channel([in] long channel);
};
[
odl,
uuid(49E0DBD1-9440-466C-9C97-95C67190C603),
helpstring("VLC Input APIs"),
dual,
oleautomation
]
interface IVLCInput : IDispatch
{
[propget, helpstring("Returns the clip length, in milliseconds.")]
HRESULT length([out, retval] double* length);
[propget, helpstring("Returns/sets playback position in current clip. Position is ranging from 0.0 to 1.0.")]
HRESULT position([out, retval] double* position);
[propput, helpstring("Returns/sets playback position in the current clip. Position ranging from 0.0 to 1.0.")]
HRESULT position([in] double position);
[propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]
HRESULT time([out, retval] double* time);
[propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]
HRESULT time([in] double time);
[propget, helpstring("Returns current playback state.")]
HRESULT state([out, retval] long* state);
[propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]
HRESULT rate([out, retval] double* rate);
[propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]
HRESULT rate([in] double rate);
[propget, helpstring("Returns current playback frames per seconds if available.")]
HRESULT fps([out, retval] double* fps);
[propget, helpstring("Returns whether current playback displays video.")]
HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);
};
[
odl,
uuid(9ED00AFA-7BCD-4FFF-8D48-7DD4DB2C800D),
helpstring("VLC Log Message"),
dual,
oleautomation
]
interface IVLCMessage: IDispatch
{
[id(DISPID_VALUE), propget]
HRESULT _Value([out, retval] VARIANT* message);
[propget, helpstring("Returns message severity.")]
HRESULT severity([out, retval] long* level);
[propget, helpstring("Returns message issuer type.")]
HRESULT type([out, retval] BSTR* type);
[propget, helpstring("Returns message issuer name.")]
HRESULT name([out, retval] BSTR* name);
[propget, helpstring("Returns message header.")]
HRESULT header([out, retval] BSTR* header);
[propget, helpstring("Returns message content.")]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -