Changeset 04e7bd8471c3470615f8a42fbe9d51aa857b1073

Show
Ignore:
Timestamp:
04/11/08 17:02:57 (3 months ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1207926177 +0200
git-parent:

[d5ec802741e96f90002d46288ca1da86fb279d86]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1207925797 +0200
Message:

Files belonging to patch from, thannoy: Allow future control toolbar to be hidden (default) or shown.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • projects/activex/README.TXT

    r2e888fd r04e7bd8  
    2929export MIDL="midl" 
    3030 
    31 if you are cross-compiling on Linux, you may be able to use 'widl' which is part of 
    32 the WINE project (http://www.winehq.com), however I have not tested it. 
     31If you are cross-compiling on Linux, you can use 'widl' which is part of 
     32the WINE project (http://www.winehq.com). At leat wine-dev-0.9.57 works, 
     33the comand line to compile IDL should looks like the following : 
     34 
     35widl -I/usr/include/wine/windows/ \ 
     36     -h -H axvlc_idl.h -t -T axvlc.tlb -u -U axvlc_idl.c \ 
     37     axvlc.idl 
     38NOTE: widl breaks compatibility with Visual Basic. If that is important to you then use midl. 
    3339 
    3440II. Debugging 
     
    6571REGSVR32 C:\WINDOWS\AXVLC.DLL 
    6672 
    67 if the control needs to use external VLC plugins (i.e other than built-in ones), 
     73If the control needs to use external VLC plugins (i.e other than built-in ones), 
    6874make sure that the plugin path is set in the registry as per following example: 
    6975 
     
    96102 
    97103the following public properties can be used to control the plugin from HTML, 
    98 the property panel of Visual Basic and most ActiveX aware applications  
    99  
    100 +==========+=========+================================+===============+ 
    101 | Name:    | Type:   |   Description:                 | Alias:        | 
    102 +==========+=========+================================+===============+ 
    103 | autoplay | boolean | play when control is activated | autostart     | 
    104 +----------+---------+--------------------------------+---------------+ 
    105 | autoloop | boolean | loop the playlist              | loop          | 
    106 +----------+---------+--------------------------------+---------------+ 
    107 | mrl      | string  | initial MRL in playlist        | src, filename | 
    108 +----------+---------+--------------------------------+---------------+ 
    109 | mute     | boolean | mute audio volume              |               | 
    110 +----------+---------+--------------------------------+---------------+ 
    111 | visible  | boolean | show/hide control viewport     | showdisplay   | 
    112 +----------+---------+--------------------------------+---------------+ 
    113 | volume   | integer | set/get audio volume           |               | 
    114 +----------+---------+--------------------------------+---------------+ 
     104the property panel of Visual Basic and most ActiveX aware applications. 
     105 
     106+==========+=========+===================================+===============+ 
     107| Name:    | Type:   |   Description:                    | Alias:        | 
     108+==========+=========+===================================+===============+ 
     109| autoplay | boolean | play when control is activated    | autostart     | 
     110+----------+---------+-----------------------------------+---------------+ 
     111| autoloop | boolean | loop the playlist                 | loop          | 
     112+----------+---------+-----------------------------------+---------------+ 
     113| mrl      | string  | initial MRL in playlist           | src, filename | 
     114+----------+---------+-----------------------------------+---------------+ 
     115| mute     | boolean | mute audio volume                 |               | 
     116+----------+---------+-----------------------------------+---------------+ 
     117| visible  | boolean | show/hide control viewport        | showdisplay   | 
     118+----------+---------+-----------------------------------+---------------+ 
     119| volume   | integer | set/get audio volume              |               | 
     120+----------+---------+-----------------------------------+---------------+ 
     121| toolbar  | boolean | set/get visibility of the toolbar |               | 
     122+----------+---------+-----------------------------------+---------------+ 
    115123 
    116124the alias column allows to specify an alternative <PARAM name> for the 
     
    150158Methods: 
    151159 
     160  *** current interface (0.8.6+) *** 
     161UUID : 9BE31822-FDAD-461B-AD51-BE1D1C159921 
     162defined in axvlc.idl as "coclass VLCPlugin2", "interface IVLCControl2" 
     163 
     164This interface organize API with several object (like .audio.mute) 
     165It is currently documented on videolan wiki (may change) at 
     166http://wiki.videolan.org/Documentation:Play_HowTo/Advanced_Use_of_VLC 
     167 
     168 
     169  ***  old interface (deprecated)  *** 
     170UUID : E23FE9C6-778E-49D4-B537-38FCDE4887D8 
     171defined in axvlc.idl as "coclass VLCPlugin", "interface IVLCControl" 
     172 
    152173play() 
    153174    Play current item the playlist 
     
    155176pause() 
    156177    Pause current item in the playlist 
    157      
     178 
    158179stop() 
    159180    Stop playing current item in playlist 
  • projects/activex/persistpropbag.cpp

    r2e888fd r04e7bd8  
    102102    } 
    103103 
     104    V_VT(&value) = VT_BOOL; 
     105    if( S_OK == pPropBag->Read(OLESTR("toolbar"), &value, pErrorLog) ) 
     106    { 
     107        _p_instance->setShowToolbar(V_BOOL(&value) != VARIANT_FALSE); 
     108        VariantClear(&value); 
     109    } 
     110 
    104111    SIZEL size = _p_instance->getExtent(); 
    105112    V_VT(&value) = VT_I4; 
     
    228235    VariantClear(&value); 
    229236 
     237    V_VT(&value) = VT_BOOL; 
     238    V_BOOL(&value) = _p_instance->getShowToolbar()? VARIANT_TRUE : VARIANT_FALSE; 
     239    pPropBag->Write(OLESTR("Toolbar"), &value); 
     240    VariantClear(&value); 
     241 
    230242    SIZEL size = _p_instance->getExtent(); 
    231243    V_VT(&value) = VT_I4; 
  • projects/activex/plugin.cpp

    rbf1292e r04e7bd8  
    350350    { 
    351351        // initialize persistable properties 
    352         _b_autoplay = TRUE; 
    353         _b_autoloop = FALSE; 
     352        _b_autoplay   = TRUE; 
     353        _b_autoloop   = FALSE; 
     354        _b_toolbar    = FALSE; 
    354355        _bstr_baseurl = NULL; 
    355         _bstr_mrl = NULL; 
    356         _b_visible = TRUE; 
    357         _b_mute = FALSE; 
    358         _i_volume = 50; 
    359         _i_time   = 0; 
    360         _i_backcolor = 0; 
     356        _bstr_mrl     = NULL; 
     357        _b_visible    = TRUE; 
     358        _b_mute       = FALSE; 
     359        _i_volume     = 50; 
     360        _i_time       = 0; 
     361        _i_backcolor = 0; 
    361362        // set default/preferred size (320x240) pixels in HIMETRIC 
    362363        HDC hDC = CreateDevDC(NULL); 
  • projects/activex/plugin.h

    r2e888fd r04e7bd8  
    111111    }; 
    112112    inline BOOL getAutoLoop(void) { return _b_autoloop;}; 
     113 
     114    inline void setShowToolbar(BOOL showtoolbar) 
     115    { 
     116        _b_toolbar = showtoolbar; 
     117        setDirty(TRUE); 
     118    }; 
     119    inline BOOL getShowToolbar(void) { return _b_toolbar;}; 
    113120 
    114121    void setVolume(int volume); 
     
    262269    BOOL _b_autoplay; 
    263270    BOOL _b_autoloop; 
     271    BOOL _b_toolbar; 
    264272    BOOL _b_visible; 
    265273    BOOL _b_mute; 
  • projects/activex/vlccontrol2.cpp

    rbf1292e r04e7bd8  
    27292729}; 
    27302730 
     2731 
     2732STDMETHODIMP VLCControl2::get_Toolbar(VARIANT_BOOL *visible) 
     2733{ 
     2734    if( NULL == visible ) 
     2735        return E_POINTER; 
     2736 
     2737    /* 
     2738     * Note to developpers 
     2739     * 
     2740     * Returning the _b_toolbar is closer to the method specification. 
     2741     * But returning True when toolbar is not implemented so not displayed 
     2742     * could be bad for ActiveX users which rely on this value to show their 
     2743     * own toolbar if not provided by the ActiveX. 
     2744     * 
     2745     * This is the reason why FALSE is returned, until toolbar get implemented. 
     2746     */ 
     2747 
     2748    /* DISABLED for now */ 
     2749    //  *visible = _p_instance->getShowToolbar() ? VARIANT_TRUE: VARIANT_FALSE; 
     2750 
     2751    *visible = VARIANT_FALSE; 
     2752 
     2753    return S_OK; 
     2754}; 
     2755 
     2756STDMETHODIMP VLCControl2::put_Toolbar(VARIANT_BOOL visible) 
     2757{ 
     2758    _p_instance->setShowToolbar((VARIANT_FALSE != visible) ? TRUE: FALSE); 
     2759    return S_OK; 
     2760}; 
     2761 
     2762 
    27312763STDMETHODIMP VLCControl2::get_StartTime(long *seconds) 
    27322764{ 
  • projects/activex/vlccontrol2.h

    r2e888fd r04e7bd8  
    583583    STDMETHODIMP get_MRL(BSTR *mrl); 
    584584    STDMETHODIMP put_MRL(BSTR mrl); 
     585    STDMETHODIMP get_Toolbar(VARIANT_BOOL *visible); 
     586    STDMETHODIMP put_Toolbar(VARIANT_BOOL visible); 
    585587    STDMETHODIMP get_StartTime(long *seconds); 
    586588    STDMETHODIMP put_StartTime(long seconds);