control.idl 10.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 * Copyright (C) 2002 Lionel Ulmer
 * Copyright (C) 2004 Alexandre Julliard
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 19
 */

20
import "oaidl.idl";
21

22
[
23 24
    version(1.0),
    uuid(56a868b0-0ad4-11ce-b03a-0020af0ba770)
25
]
26
library QuartzTypeLib
27
{
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    importlib("stdole2.tlb");

    typedef LONG OAFilterState;
    typedef LONG_PTR OAHWND;
    typedef LONG_PTR OAEVENT;

    cpp_quote("#ifndef REFTIME_DEFINED")
    cpp_quote("#define REFTIME_DEFINED")
    typedef DOUBLE REFTIME;
    cpp_quote("#endif")

    /***************************************************************************
     * IMediaControl interface
     */
    [
        object,
        uuid(56a868b1-0ad4-11ce-b03a-0020af0ba770),
45 46
        oleautomation,
        dual,
47 48 49 50 51 52 53 54 55
    ]
    interface IMediaControl : IDispatch
    {
        HRESULT Run();
        HRESULT Pause();
        HRESULT Stop();
        HRESULT GetState( [in] LONG msTimeout, [out] OAFilterState *pfs );
        HRESULT RenderFile( [in] BSTR strFilename );
        HRESULT AddSourceFilter( [in] BSTR strFilename, [out] IDispatch **ppUnk );
56 57
        [propget] HRESULT FilterCollection( [out, retval] IDispatch **ppUnk );
        [propget] HRESULT RegFilterCollection( [out, retval] IDispatch **ppUnk );
58 59 60 61 62 63 64 65 66 67
        HRESULT StopWhenReady();
    }


    /***************************************************************************
     * IBasicAudio interface
     */
    [
        object,
        uuid(56a868b3-0ad4-11ce-b03a-0020af0ba770),
68 69
        oleautomation,
        dual,
70 71 72 73
    ]
    interface IBasicAudio : IDispatch
    {
        [propput] HRESULT Volume( [in] LONG lVolume );
74
        [propget] HRESULT Volume( [out, retval] LONG *plVolume );
75
        [propput] HRESULT Balance( [in] LONG lBalance );
76
        [propget] HRESULT Balance( [out, retval] LONG *plBalance );
77 78 79 80 81 82 83 84 85
    }


    /***************************************************************************
     * IVideoWindow interface
     */
    [
        object,
        uuid(56a868b4-0ad4-11ce-b03a-0020af0ba770),
86 87
        oleautomation,
        dual,
88 89 90 91
    ]
    interface IVideoWindow : IDispatch
    {
        [propput] HRESULT Caption( [in] BSTR strCaption );
92
        [propget] HRESULT Caption( [out, retval] BSTR *strCaption );
93
        [propput] HRESULT WindowStyle( [in] LONG WindowStyle );
94
        [propget] HRESULT WindowStyle( [out, retval] LONG *WindowStyle );
95
        [propput] HRESULT WindowStyleEx( [in] LONG WindowStyleEx );
96
        [propget] HRESULT WindowStyleEx( [out, retval] LONG *WindowStyleEx );
97
        [propput] HRESULT AutoShow( [in] LONG AutoShow );
98
        [propget] HRESULT AutoShow( [out, retval] LONG *AutoShow );
99
        [propput] HRESULT WindowState( [in] LONG WindowState );
100
        [propget] HRESULT WindowState( [out, retval] LONG *WindowState );
101
        [propput] HRESULT BackgroundPalette( [in] LONG BackgroundPalette );
102
        [propget] HRESULT BackgroundPalette( [out, retval] LONG *pBackgroundPalette );
103
        [propput] HRESULT Visible( [in] LONG Visible );
104
        [propget] HRESULT Visible( [out, retval] LONG *pVisible );
105
        [propput] HRESULT Left( [in] LONG Left );
106
        [propget] HRESULT Left( [out, retval] LONG *pLeft );
107
        [propput] HRESULT Width( [in] LONG Width );
108
        [propget] HRESULT Width( [out, retval] LONG *pWidth );
109
        [propput] HRESULT Top( [in] LONG Top );
110
        [propget] HRESULT Top( [out, retval] LONG *pTop );
111
        [propput] HRESULT Height( [in] LONG Height );
112
        [propget] HRESULT Height( [out, retval] LONG *pHeight );
113
        [propput] HRESULT Owner( [in] OAHWND Owner );
114
        [propget] HRESULT Owner( [out, retval] OAHWND *Owner );
115
        [propput] HRESULT MessageDrain( [in] OAHWND Drain );
116 117
        [propget] HRESULT MessageDrain( [out, retval] OAHWND *Drain );
        [propget] HRESULT BorderColor( [out, retval] LONG *Color );
118
        [propput] HRESULT BorderColor( [in] LONG Color );
119
        [propget] HRESULT FullScreenMode( [out, retval] LONG *FullScreenMode );
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
        [propput] HRESULT FullScreenMode( [in] LONG FullScreenMode );
        HRESULT SetWindowForeground( [in] LONG Focus );
        HRESULT NotifyOwnerMessage( [in] OAHWND hwnd, [in] LONG uMsg, [in] LONG_PTR wParam, [in] LONG_PTR lParam );
        HRESULT SetWindowPosition( [in] LONG Left, [in] LONG Top, [in] LONG Width, [in] LONG Height );
        HRESULT GetWindowPosition( [out] LONG *pLeft, [out] LONG *pTop, [out] LONG *pWidth, [out] LONG *pHeight );
        HRESULT GetMinIdealImageSize( [out] LONG *pWidth, [out] LONG *pHeight );
        HRESULT GetMaxIdealImageSize( [out] LONG *pWidth, [out] LONG *pHeight );
        HRESULT GetRestorePosition( [out] LONG *pLeft, [out] LONG *pTop, [out] LONG *pWidth, [out] LONG *pHeight );
        HRESULT HideCursor( [in] LONG HideCursor );
        HRESULT IsCursorHidden( [out] LONG *CursorHidden );
    }


    /***************************************************************************
     * IBasicVideo interface
     */
    [
        object,
        uuid(56a868b5-0ad4-11ce-b03a-0020af0ba770),
139 140
        oleautomation,
        dual,
141 142 143
    ]
    interface IBasicVideo : IDispatch
    {
144 145 146 147 148
        [propget] HRESULT AvgTimePerFrame( [out, retval] REFTIME *pAvgTimePerFrame );
        [propget] HRESULT BitRate( [out, retval] LONG *pBitRate );
        [propget] HRESULT BitErrorRate( [out, retval] LONG *pBitErrorRate );
        [propget] HRESULT VideoWidth( [out, retval] LONG *pVideoWidth );
        [propget] HRESULT VideoHeight( [out, retval] LONG *pVideoHeight );
149
        [propput] HRESULT SourceLeft( [in] LONG SourceLeft );
150
        [propget] HRESULT SourceLeft( [out, retval] LONG *pSourceLeft );
151
        [propput] HRESULT SourceWidth( [in] LONG SourceWidth );
152
        [propget] HRESULT SourceWidth( [out, retval] LONG *pSourceWidth );
153
        [propput] HRESULT SourceTop( [in] LONG SourceTop );
154
        [propget] HRESULT SourceTop( [out, retval] LONG *pSourceTop );
155
        [propput] HRESULT SourceHeight( [in] LONG SourceHeight );
156
        [propget] HRESULT SourceHeight( [out, retval] LONG *pSourceHeight );
157
        [propput] HRESULT DestinationLeft( [in] LONG DestinationLeft );
158
        [propget] HRESULT DestinationLeft( [out, retval] LONG *pDestinationLeft );
159
        [propput] HRESULT DestinationWidth( [in] LONG DestinationWidth );
160
        [propget] HRESULT DestinationWidth( [out, retval] LONG *pDestinationWidth );
161
        [propput] HRESULT DestinationTop( [in] LONG DestinationTop );
162
        [propget] HRESULT DestinationTop( [out, retval] LONG *pDestinationTop );
163
        [propput] HRESULT DestinationHeight( [in] LONG DestinationHeight );
164
        [propget] HRESULT DestinationHeight( [out, retval] LONG *pDestinationHeight );
165 166 167 168 169 170 171 172 173 174
        HRESULT SetSourcePosition( [in] LONG Left, [in] LONG Top, [in] LONG Width, [in] LONG Height );
        HRESULT GetSourcePosition( [out] LONG *pLeft, [out] LONG *pTop, [out] LONG *pWidth, [out] LONG *pHeight );
        HRESULT SetDefaultSourcePosition();
        HRESULT SetDestinationPosition( [in] LONG Left, [in] LONG Top, [in] LONG Width, [in] LONG Height );
        HRESULT GetDestinationPosition( [out] LONG *pLeft, [out] LONG *pTop, [out] LONG *pWidth, [out] LONG *pHeight );
        HRESULT SetDefaultDestinationPosition();
        HRESULT GetVideoSize( [out] LONG *pWidth, [out] LONG *pHeight );
        HRESULT GetVideoPaletteEntries( [in] LONG StartIndex,
                                        [in] LONG Entries,
                                        [out] LONG *pRetrieved,
175
                                        [out] LONG *pPalette );
176
        HRESULT GetCurrentImage( [in, out] LONG *pBufferSize,
177
                                 [out] LONG *pDIBImage );
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
        HRESULT IsUsingDefaultSource();
        HRESULT IsUsingDefaultDestination();
    }

    [
        uuid(329bb360-f6ea-11d1-9038-00a0c9697298),
        helpstring("IBasicVideo2"),
        odl
    ]

    interface IBasicVideo2 : IBasicVideo
    {
        HRESULT GetPreferredAspectRatio([out] LONG *plAspectX, [out] LONG *plAspectY);
    }


    /***************************************************************************
     * IMediaEvent interface
     */
    [
        object,
        uuid(56a868b6-0ad4-11ce-b03a-0020af0ba770),
200 201
        oleautomation,
        dual,
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
    ]
    interface IMediaEvent : IDispatch
    {
        HRESULT GetEventHandle( [out] OAEVENT *hEvent );
        HRESULT GetEvent( [out] LONG *lEventCode, [out] LONG_PTR *lParam1, [out] LONG_PTR *lParam2, [in] LONG msTimeout );
        HRESULT WaitForCompletion( [in] LONG msTimeout, [out] LONG *pEvCode );
        HRESULT CancelDefaultHandling( [in] LONG lEvCode );
        HRESULT RestoreDefaultHandling( [in] LONG lEvCode );
        HRESULT FreeEventParams( [in] LONG lEvCode, [in] LONG_PTR lParam1, [in] LONG_PTR lParam2 );
    }


    /***************************************************************************
     * IMediaEventEx interface
     */
    [
        object,
        uuid(56a868c0-0ad4-11ce-b03a-0020af0ba770),
    ]
    interface IMediaEventEx : IMediaEvent
    {
        HRESULT SetNotifyWindow( [in] OAHWND hwnd, [in] LONG lMsg, [in] LONG_PTR lInstanceData );
        HRESULT SetNotifyFlags( [in] LONG lNoNotifyFlags );
        HRESULT GetNotifyFlags( [out] LONG *lplNoNotifyFlags );
    }


    /***************************************************************************
     * IMediaPosition interface
     */
    [
        object,
        uuid(56a868b2-0ad4-11ce-b03a-0020af0ba770),
235 236
        oleautomation,
        dual,
237 238 239
    ]
    interface IMediaPosition : IDispatch
    {
240 241 242 243 244 245 246 247 248 249 250
        [propget] HRESULT Duration( [out, retval] REFTIME *plength );
        [propput] HRESULT CurrentPosition( [in] REFTIME llTime );
        [propget] HRESULT CurrentPosition( [out, retval] REFTIME *pllTime );
        [propget] HRESULT StopTime( [out, retval] REFTIME *pllTime );
        [propput] HRESULT StopTime( [in] REFTIME llTime );
        [propget] HRESULT PrerollTime( [out, retval] REFTIME *pllTime );
        [propput] HRESULT PrerollTime( [in] REFTIME llTime );
        [propput] HRESULT Rate( [in] double dRate );
        [propget] HRESULT Rate( [out, retval] double *pdRate );
        HRESULT CanSeekForward( [out, retval] LONG *pCanSeekForward );
        HRESULT CanSeekBackward( [out, retval] LONG *pCanSeekBackward );
251 252 253
    }

} /* library QuartzTypeLib */