2005-04-06 13:23:52 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* persiststorage.h: ActiveX control for VLC
|
|
|
|
*****************************************************************************
|
2005-07-09 08:17:09 +02:00
|
|
|
* Copyright (C) 2005 the VideoLAN team
|
2005-04-06 13:23:52 +02:00
|
|
|
*
|
|
|
|
* 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
|
2006-01-13 00:10:04 +01:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
2005-04-06 13:23:52 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __VIEWOBJECT_H__
|
|
|
|
#define __VIEWOBJECT_H__
|
|
|
|
|
|
|
|
#include <oleidl.h>
|
|
|
|
|
2005-04-18 13:35:18 +02:00
|
|
|
class VLCViewObject : public IViewObject2
|
2005-04-06 13:23:52 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
src/libvlc.c,include/vlc/vlc.h, include/variables.h: added a new a API to libvlc called VLC_VariableType, this API allows to retrieve the type of a VLC variable. this API is very useful for binding with highlevel languages, such as javascript, VBScript, etc... which allow for weakly typed variables such as Javascript. in order to support the VLC_VariableType API, i've had to move the variable type definitions from variables.h to vlc/vlc.h
vlccontrol.cpp, axvlc.idl, axvlc.tlb, axvlc_idl.h: added a getVariable and setVariable to provide support for VLC_GetVariable and VLC_SetVariable respectively,and requires the new VLC_VariableType API.
main.cpp, viewobject.h, viewobject.cpp: support for advise on viewobject
2005-05-11 18:56:46 +02:00
|
|
|
VLCViewObject(VLCPlugin *p_instance) : _p_instance(p_instance),
|
|
|
|
_dwAspect(0), _advf(0), _pAdvSink(NULL) {};
|
2005-04-06 13:23:52 +02:00
|
|
|
virtual ~VLCViewObject() {};
|
|
|
|
|
|
|
|
// IUnknown methods
|
|
|
|
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
|
|
|
|
{
|
2006-07-18 11:10:24 +02:00
|
|
|
if( NULL == ppv )
|
|
|
|
return E_POINTER;
|
|
|
|
if( (IID_IUnknown == riid)
|
2007-09-10 20:56:52 +02:00
|
|
|
|| (IID_IViewObject == riid)
|
2006-07-18 11:10:24 +02:00
|
|
|
|| (IID_IViewObject2 == riid) )
|
|
|
|
{
|
2005-04-06 13:23:52 +02:00
|
|
|
AddRef();
|
|
|
|
*ppv = reinterpret_cast<LPVOID>(this);
|
|
|
|
return NOERROR;
|
|
|
|
}
|
2005-07-19 19:41:16 +02:00
|
|
|
return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
|
2005-04-06 13:23:52 +02:00
|
|
|
};
|
|
|
|
|
2005-07-19 19:41:16 +02:00
|
|
|
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
|
|
|
|
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
|
2005-04-06 13:23:52 +02:00
|
|
|
|
|
|
|
// IViewObject methods
|
|
|
|
STDMETHODIMP Draw(DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,HDC,LPCRECTL,LPCRECTL,BOOL(CALLBACK *)(DWORD),DWORD);
|
|
|
|
STDMETHODIMP Freeze(DWORD,LONG,PVOID,LPDWORD);
|
|
|
|
STDMETHODIMP GetAdvise(LPDWORD,LPDWORD,LPADVISESINK *);
|
|
|
|
STDMETHODIMP GetColorSet(DWORD,LONG,PVOID,DVTARGETDEVICE *,HDC,LPLOGPALETTE *);
|
|
|
|
STDMETHODIMP SetAdvise(DWORD,DWORD,LPADVISESINK);
|
|
|
|
STDMETHODIMP Unfreeze(DWORD);
|
|
|
|
|
2005-04-18 13:35:18 +02:00
|
|
|
// IViewObject2 methods
|
|
|
|
STDMETHODIMP GetExtent(DWORD,LONG,DVTARGETDEVICE *,LPSIZEL);
|
|
|
|
|
2005-04-06 13:23:52 +02:00
|
|
|
private:
|
|
|
|
|
|
|
|
VLCPlugin *_p_instance;
|
src/libvlc.c,include/vlc/vlc.h, include/variables.h: added a new a API to libvlc called VLC_VariableType, this API allows to retrieve the type of a VLC variable. this API is very useful for binding with highlevel languages, such as javascript, VBScript, etc... which allow for weakly typed variables such as Javascript. in order to support the VLC_VariableType API, i've had to move the variable type definitions from variables.h to vlc/vlc.h
vlccontrol.cpp, axvlc.idl, axvlc.tlb, axvlc_idl.h: added a getVariable and setVariable to provide support for VLC_GetVariable and VLC_SetVariable respectively,and requires the new VLC_VariableType API.
main.cpp, viewobject.h, viewobject.cpp: support for advise on viewobject
2005-05-11 18:56:46 +02:00
|
|
|
|
|
|
|
// Advise Sink support
|
|
|
|
DWORD _dwAspect;
|
|
|
|
DWORD _advf;
|
|
|
|
LPADVISESINK _pAdvSink;
|
2005-04-06 13:23:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|