00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __VIEWOBJECT_H__
00024 #define __VIEWOBJECT_H__
00025
00026 #include <oleidl.h>
00027
00028 class VLCViewObject : public IViewObject2
00029 {
00030
00031 public:
00032
00033 VLCViewObject(VLCPlugin *p_instance) : _p_instance(p_instance),
00034 _dwAspect(0), _advf(0), _pAdvSink(NULL) {};
00035 virtual ~VLCViewObject() {};
00036
00037
00038 STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
00039 {
00040 if( (NULL != ppv)
00041 && (IID_IUnknown == riid)
00042 && (IID_IPersist == riid)
00043 && (IID_IViewObject == riid)
00044 && (IID_IViewObject2 == riid) ) {
00045 AddRef();
00046 *ppv = reinterpret_cast<LPVOID>(this);
00047 return NOERROR;
00048 }
00049 return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
00050 };
00051
00052 STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
00053 STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
00054
00055
00056 STDMETHODIMP Draw(DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,HDC,LPCRECTL,LPCRECTL,BOOL(CALLBACK *)(DWORD),DWORD);
00057 STDMETHODIMP Freeze(DWORD,LONG,PVOID,LPDWORD);
00058 STDMETHODIMP GetAdvise(LPDWORD,LPDWORD,LPADVISESINK *);
00059 STDMETHODIMP GetColorSet(DWORD,LONG,PVOID,DVTARGETDEVICE *,HDC,LPLOGPALETTE *);
00060 STDMETHODIMP SetAdvise(DWORD,DWORD,LPADVISESINK);
00061 STDMETHODIMP Unfreeze(DWORD);
00062
00063
00064 STDMETHODIMP GetExtent(DWORD,LONG,DVTARGETDEVICE *,LPSIZEL);
00065
00066 private:
00067
00068 VLCPlugin *_p_instance;
00069
00070
00071 DWORD _dwAspect;
00072 DWORD _advf;
00073 LPADVISESINK _pAdvSink;
00074 };
00075
00076 #endif
00077