axvlc.idl 6.16 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
/*****************************************************************************
 * axvlc.idl: ActiveX control for VLC
 *****************************************************************************
 * Copyright (C) 2005 VideoLAN
 *
 * 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
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 *****************************************************************************/

[
  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;

    enum VLCPlaylistMode {
        VLCPlayListInsert      =  1,
        VLCPlayListReplace     =  2,
        VLCPlayListAppend      =  4,
        VLCPlayListGo          =  8,
        VLCPlayListCheckInsert = 16
    };

    // playlist target position
    const int VLCPlayListEnd = -666;

    [
      odl,
      uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),
      helpstring("VLC Control"),
      dual,
      hidden,
      oleautomation
    ]
    interface IVLCControl : IDispatch {
        [id(0), bindable, defaultbind, propget, helpstring("Specifies current target in playlist")]
        HRESULT Value([out, retval] VARIANT* pvarValue);
        [id(0), bindable, defaultbind, propput, helpstring("Specifies current target in playlist")]
        HRESULT Value([in] VARIANT pvarValue);
        [propget, bindable, helpstring("Shows or hides plugin.")]
        HRESULT Visible([out, retval] VARIANT_BOOL* visible);
        [propput, bindable, helpstring("Shows or hides plugin.")]
        HRESULT Visible([in] VARIANT_BOOL visible);
        [helpstring("Play current target in playlist.")]
        HRESULT play();
        [helpstring("Pause playback.")]
        HRESULT pause();
        [helpstring("Stop playback.")]
        HRESULT stop();
        [propget, helpstring("Specifies whether VLC is playing.")]
        HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);
        [propput, helpstring("Specifies whether VLC is playing.")]
        HRESULT Playing([in] VARIANT_BOOL isPlaying);
        [propget, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]
        HRESULT Position([out, retval] float* position);
        [propput, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]
        HRESULT Position([in] float position);
        [propget, helpstring("Specifies playback time relative to the start of current target in playlist.")]
        HRESULT Time([out, retval] int* seconds);
        [propput, helpstring("Specifies playback time relative to the start of current target in playlist.")]
        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();
        [propget, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]
        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();
        [propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]
        HRESULT Volume([out, retval] int* volume);
        [propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]
        HRESULT Volume([in] int volume);
        [helpstring("Mute/unmute playback sound volume.")]
        HRESULT toggleMute();
        [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();
        [propget, helpstring("Returns VLC Version.")]
        HRESULT VersionInfo([out, retval] BSTR* version);
    };

    [
      uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),
      helpstring("Event interface for VLC control"),
      hidden
    ]
    dispinterface DVLCEvents {
        properties:
        methods:
            [id(1), helpstring("Playback in progress")]
            void OnPlay();
            [id(2), helpstring("Playback has paused")]
            void OnPause();
            [id(3), helpstring("Playback has stopped")]
            void OnStop();
    };

    [
      uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),
      helpstring("VLC control"),
      control
    ]
    coclass VLCPlugin {
        [default] interface IVLCControl;
        [default, source] dispinterface DVLCEvents;
    };
};