]> git.sesse.net Git - vlc/blobdiff - activex/axvlc.idl
Don't invalidate selection on item change (Refs:#477)
[vlc] / activex / axvlc.idl
index 92f82a65b61f7664b5acaed71ffd12915af38c80..aa936f3d5e344cf764ba6a637333d2ec5713ffd9 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************\r
  * axvlc.idl: ActiveX control for VLC\r
  *****************************************************************************\r
- * Copyright (C) 2005 VideoLAN\r
+ * Copyright (C) 2005 the VideoLAN team\r
  *\r
  * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>\r
  *\r
@@ -17,7 +17,7 @@
  *\r
  * You should have received a copy of the GNU General Public License\r
  * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.\r
  *****************************************************************************/\r
 \r
 [\r
@@ -33,16 +33,30 @@ library AXVLC
     interface IVLCControl;\r
     dispinterface DVLCEvents;\r
 \r
-    enum VLCPlaylistMode {\r
-        VLCPlayListInsert      =  1,\r
-        VLCPlayListReplace     =  2,\r
-        VLCPlayListAppend      =  4,\r
-        VLCPlayListGo          =  8,\r
-        VLCPlayListCheckInsert = 16\r
+    enum VLCPlaylistMode\r
+    {\r
+        VLCPlayListInsert       =  1,\r
+        VLCPlayListInsertAndGo  =  9,\r
+        VLCPlayListReplace      =  2,\r
+        VLCPlayListReplaceAndGo = 10,\r
+        VLCPlayListAppend       =  4,\r
+        VLCPlayListAppendAndGo  = 12,\r
+        VLCPlayListCheckInsert  = 16\r
     };\r
 \r
     // playlist target position\r
-    const int VLCPlayListEnd = -666;\r
+    const int VLCPlayListEnd    = -666;\r
+\r
+    // DISPID definitions\r
+    const int DISPID_Visible    = 100;\r
+    const int DISPID_Playing    = 101;\r
+    const int DISPID_Position   = 102;\r
+    const int DISPID_Time       = 103;\r
+    const int DISPID_Length     = 104;\r
+    const int DISPID_Volume     = 105;\r
+    const int DISPID_MRL        = 106;\r
+    const int DISPID_AutoPlay   = 107;\r
+    const int DISPID_AutoLoop   = 108;\r
 \r
     [\r
       odl,\r
@@ -52,14 +66,11 @@ library AXVLC
       hidden,\r
       oleautomation\r
     ]\r
-    interface IVLCControl : IDispatch {\r
-        [id(0), bindable, defaultbind, propget, helpstring("Specifies current target in playlist")]\r
-        HRESULT Value([out, retval] VARIANT* pvarValue);\r
-        [id(0), bindable, defaultbind, propput, helpstring("Specifies current target in playlist")]\r
-        HRESULT Value([in] VARIANT pvarValue);\r
-        [propget, bindable, helpstring("Shows or hides plugin.")]\r
+    interface IVLCControl : IDispatch\r
+    {\r
+        [id(DISPID_Visible), propget, bindable, helpstring("Shows or hides plugin.")]\r
         HRESULT Visible([out, retval] VARIANT_BOOL* visible);\r
-        [propput, bindable, helpstring("Shows or hides plugin.")]\r
+        [id(DISPID_Visible), propput, bindable, helpstring("Shows or hides plugin.")]\r
         HRESULT Visible([in] VARIANT_BOOL visible);\r
         [helpstring("Play current target in playlist.")]\r
         HRESULT play();\r
@@ -67,34 +78,36 @@ library AXVLC
         HRESULT pause();\r
         [helpstring("Stop playback.")]\r
         HRESULT stop();\r
-        [propget, helpstring("Specifies whether VLC is playing.")]\r
+        [id(DISPID_Playing), hidden, propget, helpstring("Returns whether VLC is playing.")]\r
         HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);\r
-        [propput, helpstring("Specifies whether VLC is playing.")]\r
-        HRESULT Playing([in] VARIANT_BOOL isPlaying);\r
-        [propget, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]\r
+        [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.")]\r
         HRESULT Position([out, retval] float* position);\r
-        [propput, helpstring("Specifies playback position within current target in playlist, position is a relative value ranging from 0.0 to 1.0.")]\r
+        [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.")]\r
         HRESULT Position([in] float position);\r
-        [propget, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
+        [id(DISPID_Time), propget, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
         HRESULT Time([out, retval] int* seconds);\r
-        [propput, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
+        [id(DISPID_Time), propput, helpstring("Specifies playback time relative to the start of current target in playlist.")]\r
         HRESULT Time([in] int seconds);\r
         [helpstring("Advance or backtrack playback time, relative to current time.")]\r
         HRESULT shuttle([in] int seconds);\r
         [helpstring("Switch between normal and fullscreen video.")]\r
         HRESULT fullscreen();\r
-        [propget, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]\r
+        [id(DISPID_Length), propget, hidden, helpstring("Returns total length in seconds of current target in playlist, may be unknown.")]\r
         HRESULT Length([out, retval] int* seconds);\r
         [helpstring("Increases playback speed, one of 1x, 2x, 4x, 8x.")]\r
         HRESULT playFaster();\r
         [helpstring("Decreases playback speed, one of 1x, 2x, 4x, 8x.")]\r
         HRESULT playSlower();\r
-        [propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
+        [id(DISPID_Volume), propget, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
         HRESULT Volume([out, retval] int* volume);\r
-        [propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
+        [id(DISPID_Volume), propput, helpstring("Specifies playback sound volume, ranges from 0 to 200%.")]\r
         HRESULT Volume([in] int volume);\r
         [helpstring("Mute/unmute playback sound volume.")]\r
         HRESULT toggleMute();\r
+        [helpstring("Set a value to a VLC variable.")]\r
+        HRESULT setVariable([in] BSTR name, [in] VARIANT value);\r
+        [helpstring("Retrieve the value of a VLC variable.")]\r
+        HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);\r
         [helpstring("Add a target to the current playlist.")]\r
 \r
 /*\r
@@ -113,24 +126,41 @@ library AXVLC
         HRESULT playlistPrev();\r
         [helpstring("Remove all items from playlist.")]\r
         HRESULT playlistClear();\r
-        [propget, helpstring("Returns VLC Version.")]\r
+        [propget, hidden, helpstring("Returns VLC Version.")]\r
         HRESULT VersionInfo([out, retval] BSTR* version);\r
+        [id(DISPID_MRL), propget, helpstring("Returns initial MRL in default playlist")]\r
+        HRESULT MRL([out, retval] BSTR* mrl);\r
+        [id(DISPID_MRL), propput, helpstring("Specifies initial MRL in default playlist")]\r
+        HRESULT MRL([in] BSTR mrl);\r
+        [id(DISPID_AutoPlay), propget, helpstring("Specifies whether default playlist is played on startup")]\r
+        HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);\r
+        [id(DISPID_AutoPlay), propput, helpstring("Returns whether default playlist is played on startup")]\r
+        HRESULT AutoPlay([in] VARIANT_BOOL autoplay);\r
+        [id(DISPID_AutoLoop), propget, helpstring("Specifies whether default playlist is looped")]\r
+        HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);\r
+        [id(DISPID_AutoLoop), propput, helpstring("Returns whether default playlist is looped")]\r
+        HRESULT AutoLoop([in] VARIANT_BOOL autoloop);\r
     };\r
 \r
+    const int DISPID_PlayEvent  = 100;\r
+    const int DISPID_PauseEvent = 101;\r
+    const int DISPID_StopEvent  = 102;\r
+\r
     [\r
       uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),\r
       helpstring("Event interface for VLC control"),\r
       hidden\r
     ]\r
-    dispinterface DVLCEvents {\r
+    dispinterface DVLCEvents\r
+    {\r
         properties:\r
         methods:\r
-            [id(1), helpstring("Playback in progress")]\r
-            void Play();\r
-            [id(2), helpstring("Playback has paused")]\r
-            void Pause();\r
-            [id(3), helpstring("Playback has stopped")]\r
-            void Stop();\r
+            [id(DISPID_PlayEvent), helpstring("Playback in progress")]\r
+            void play();\r
+            [id(DISPID_PauseEvent), helpstring("Playback has paused")]\r
+            void pause();\r
+            [id(DISPID_StopEvent), helpstring("Playback has stopped")]\r
+            void stop();\r
     };\r
 \r
     [\r
@@ -138,7 +168,8 @@ library AXVLC
       helpstring("VLC control"),\r
       control\r
     ]\r
-    coclass VLCPlugin {\r
+    coclass VLCPlugin\r
+    {\r
         [default] interface IVLCControl;\r
         [default, source] dispinterface DVLCEvents;\r
     };\r