Commit 8ac6231f authored by Sergey Radionov's avatar Sergey Radionov Committed by Jean-Baptiste Kempf

ActiveX: Add "FullscreenEnabled" property

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 65da750d
......@@ -79,7 +79,8 @@ library AXVLC
const int DISPID_AutoLoop = 108;
const int DISPID_StartTime = 109;
const int DISPID_BaseURL = 110;
const int DISPID_Toolbar = 111;
const int DISPID_Toolbar = 111;
const int DISPID_FSEnabled = 112;
[
odl,
......@@ -642,6 +643,11 @@ library AXVLC
[propget, helpstring("Returns the audio object.")]
HRESULT subtitle([out, retval] IVLCSubtitle** obj);
[id(DISPID_FSEnabled), propget, helpstring("Returns/sets availability of fullscreen mode.")]
HRESULT FullscreenEnabled([out, retval] VARIANT_BOOL* enabled);
[id(DISPID_FSEnabled), propput, helpstring("Returns/sets availability of fullscreen mode.")]
HRESULT FullscreenEnabled([in] VARIANT_BOOL enabled);
[propget, helpstring("Returns the audio object.")]
HRESULT video([out, retval] IVLCVideo** obj);
};
......
......@@ -212,6 +212,13 @@ STDMETHODIMP VLCPersistPropertyBag::Load(LPPROPERTYBAG pPropBag, LPERRORLOG pErr
}
}
V_VT(&value) = VT_BOOL;
if( S_OK == pPropBag->Read(OLESTR("FullscreenEnabled"), &value, pErrorLog) )
{
_p_instance->set_enable_fs(V_BOOL(&value) != VARIANT_FALSE);
VariantClear(&value);
}
return _p_instance->onLoad();
};
......@@ -278,6 +285,11 @@ STDMETHODIMP VLCPersistPropertyBag::Save(LPPROPERTYBAG pPropBag, BOOL fClearDirt
pPropBag->Write(OLESTR("BackColor"), &value);
VariantClear(&value);
V_VT(&value) = VT_BOOL;
V_BOOL(&value) = _p_instance->get_enable_fs()? VARIANT_TRUE : VARIANT_FALSE;
pPropBag->Write(OLESTR("FullscreenEnabled"), &value);
VariantClear(&value);
if( fClearDirty )
_p_instance->setDirty(FALSE);
......
......@@ -1380,6 +1380,21 @@ STDMETHODIMP VLCControl2::put_Toolbar(VARIANT_BOOL visible)
return S_OK;
};
STDMETHODIMP VLCControl2::get_FullscreenEnabled(VARIANT_BOOL* enabled)
{
if( NULL == enabled )
return E_POINTER;
*enabled = varbool( _p_instance->get_enable_fs() );
return S_OK;
}
STDMETHODIMP VLCControl2::put_FullscreenEnabled(VARIANT_BOOL enabled)
{
_p_instance->set_enable_fs( VARIANT_FALSE != enabled );
return S_OK;
}
STDMETHODIMP VLCControl2::get_StartTime(long *seconds)
{
......
......@@ -381,6 +381,8 @@ public:
STDMETHODIMP put_Volume(long volume);
STDMETHODIMP get_BackColor(OLE_COLOR *backcolor);
STDMETHODIMP put_BackColor(OLE_COLOR backcolor);
STDMETHODIMP get_FullscreenEnabled(VARIANT_BOOL* enabled);
STDMETHODIMP put_FullscreenEnabled(VARIANT_BOOL enabled);
STDMETHODIMP get_audio(IVLCAudio**);
STDMETHODIMP get_input(IVLCInput**);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment