Commit 3d831e04 authored by Steve Lhomme's avatar Steve Lhomme

Avoid \r\n problems between platforms

parent cb1f0667
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Thu Feb 17 09:25:54 2005
*/
/* Compiler settings for axvlc.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
const IID LIBID_AXVLC = {0xDF2BBE39,0x40A8,0x433b,{0xA2,0x79,0x07,0x3F,0x48,0xDA,0x94,0xB6}};
const IID IID_IVLCControl = {0xC2FA41D0,0xB113,0x476e,{0xAC,0x8C,0x9B,0xD1,0x49,0x99,0xC1,0xC1}};
const IID DIID_DVLCEvents = {0xDF48072F,0x5EF8,0x434e,{0x9B,0x40,0xE2,0xF3,0xAE,0x75,0x9B,0x5F}};
const CLSID CLSID_VLCPlugin = {0xE23FE9C6,0x778E,0x49D4,{0xB5,0x37,0x38,0xFC,0xDE,0x48,0x87,0xD8}};
#ifdef __cplusplus
}
#endif
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Thu Feb 17 09:25:54 2005
*/
/* Compiler settings for axvlc.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
const IID LIBID_AXVLC = {0xDF2BBE39,0x40A8,0x433b,{0xA2,0x79,0x07,0x3F,0x48,0xDA,0x94,0xB6}};
const IID IID_IVLCControl = {0xC2FA41D0,0xB113,0x476e,{0xAC,0x8C,0x9B,0xD1,0x49,0x99,0xC1,0xC1}};
const IID DIID_DVLCEvents = {0xDF48072F,0x5EF8,0x434e,{0x9B,0x40,0xE2,0xF3,0xAE,0x75,0x9B,0x5F}};
const CLSID CLSID_VLCPlugin = {0xE23FE9C6,0x778E,0x49D4,{0xB5,0x37,0x38,0xFC,0xDE,0x48,0x87,0xD8}};
#ifdef __cplusplus
}
#endif
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* connectioncontainer.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __CONNECTIONCONTAINER_H__
#define __CONNECTIONCONTAINER_H__
#include <ocidl.h>
#include <vector>
using namespace std;
class VLCConnectionPoint : public IConnectionPoint
{
public:
VLCConnectionPoint(IConnectionPointContainer *p_cpc, REFIID iid) :
_iid(iid), _p_cpc(p_cpc) {};
virtual ~VLCConnectionPoint() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( NULL == ppv ) return E_POINTER;
if( (IID_IUnknown == riid)
&& (IID_IConnectionPoint == riid) ) {
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
// must be a standalone object
return E_NOINTERFACE;
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_cpc->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_cpc->Release(); };
// IConnectionPoint methods
STDMETHODIMP GetConnectionInterface(IID *);
STDMETHODIMP GetConnectionPointContainer(LPCONNECTIONPOINTCONTAINER *);
STDMETHODIMP Advise(IUnknown *, DWORD *);
STDMETHODIMP Unadvise(DWORD);
STDMETHODIMP EnumConnections(LPENUMCONNECTIONS *);
void fireEvent(DISPID dispIdMember, DISPPARAMS* pDispParams);
void firePropChangedEvent(DISPID dispId);
private:
REFIID _iid;
IConnectionPointContainer *_p_cpc;
vector<CONNECTDATA> _connections;
};
//////////////////////////////////////////////////////////////////////////
class VLCConnectionPointContainer : public IConnectionPointContainer
{
public:
VLCConnectionPointContainer(VLCPlugin *p_instance);
virtual ~VLCConnectionPointContainer();
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( (NULL != ppv)
&& (IID_IUnknown == riid)
&& (IID_IConnectionPointContainer == riid) ) {
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
return _p_instance->QueryInterface(riid, ppv);
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IConnectionPointContainer methods
STDMETHODIMP EnumConnectionPoints(LPENUMCONNECTIONPOINTS *);
STDMETHODIMP FindConnectionPoint(REFIID, LPCONNECTIONPOINT *);
void fireEvent(DISPID, DISPPARAMS*);
void firePropChangedEvent(DISPID dispId);
private:
VLCPlugin *_p_instance;
VLCConnectionPoint *_p_events;
VLCConnectionPoint *_p_props;
vector<LPCONNECTIONPOINT> _v_cps;
};
#endif
/*****************************************************************************
* connectioncontainer.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __CONNECTIONCONTAINER_H__
#define __CONNECTIONCONTAINER_H__
#include <ocidl.h>
#include <vector>
using namespace std;
class VLCConnectionPoint : public IConnectionPoint
{
public:
VLCConnectionPoint(IConnectionPointContainer *p_cpc, REFIID iid) :
_iid(iid), _p_cpc(p_cpc) {};
virtual ~VLCConnectionPoint() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( NULL == ppv ) return E_POINTER;
if( (IID_IUnknown == riid)
&& (IID_IConnectionPoint == riid) ) {
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
// must be a standalone object
return E_NOINTERFACE;
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_cpc->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_cpc->Release(); };
// IConnectionPoint methods
STDMETHODIMP GetConnectionInterface(IID *);
STDMETHODIMP GetConnectionPointContainer(LPCONNECTIONPOINTCONTAINER *);
STDMETHODIMP Advise(IUnknown *, DWORD *);
STDMETHODIMP Unadvise(DWORD);
STDMETHODIMP EnumConnections(LPENUMCONNECTIONS *);
void fireEvent(DISPID dispIdMember, DISPPARAMS* pDispParams);
void firePropChangedEvent(DISPID dispId);
private:
REFIID _iid;
IConnectionPointContainer *_p_cpc;
vector<CONNECTDATA> _connections;
};
//////////////////////////////////////////////////////////////////////////
class VLCConnectionPointContainer : public IConnectionPointContainer
{
public:
VLCConnectionPointContainer(VLCPlugin *p_instance);
virtual ~VLCConnectionPointContainer();
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( (NULL != ppv)
&& (IID_IUnknown == riid)
&& (IID_IConnectionPointContainer == riid) ) {
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
return _p_instance->QueryInterface(riid, ppv);
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IConnectionPointContainer methods
STDMETHODIMP EnumConnectionPoints(LPENUMCONNECTIONPOINTS *);
STDMETHODIMP FindConnectionPoint(REFIID, LPCONNECTIONPOINT *);
void fireEvent(DISPID, DISPPARAMS*);
void firePropChangedEvent(DISPID dispId);
private:
VLCPlugin *_p_instance;
VLCConnectionPoint *_p_events;
VLCConnectionPoint *_p_props;
vector<LPCONNECTIONPOINT> _v_cps;
};
#endif
This diff is collapsed.
/*****************************************************************************
* objectsafety.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "plugin.h"
#include "objectsafety.h"
#include "axvlc_idl.h"
#if 0
const GUID IID_IObjectSafety =
{0xCB5BDC81,0x93C1,0x11cf,{0x8F,0x20,0x00,0x80,0x5F,0x2C,0xD0,0x64}};
#endif
STDMETHODIMP VLCObjectSafety::GetInterfaceSafetyOptions(
REFIID riid,
DWORD *pdwSupportedOptions,
DWORD *pdwEnabledOptions
)
{
if( (NULL == pdwSupportedOptions) || (NULL == pdwEnabledOptions) )
return E_POINTER;
*pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACESAFE_FOR_UNTRUSTED_CALLER;
if( (IID_IDispatch == riid)
|| (IID_IVLCControl == riid) )
{
*pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER;
return NOERROR;
}
else if( (IID_IPersist == riid)
|| (IID_IPersistStreamInit == riid)
|| (IID_IPersistStorage == riid)
|| (IID_IPersistPropertyBag == riid) )
{
*pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA;
return NOERROR;
}
*pdwEnabledOptions = 0;
return E_NOINTERFACE;
};
STDMETHODIMP VLCObjectSafety::SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwOptionSetMask,
DWORD dwEnabledOptions
)
{
if( (IID_IDispatch == riid)
|| (IID_IVLCControl == riid) )
{
if( (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwOptionSetMask)
&& (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwEnabledOptions) )
{
return NOERROR;
}
return E_FAIL;
}
else if( (IID_IPersist == riid)
|| (IID_IPersistStreamInit == riid)
|| (IID_IPersistStorage == riid)
|| (IID_IPersistPropertyBag == riid) )
{
if( (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwOptionSetMask)
&& (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwEnabledOptions) )
{
return NOERROR;
}
return E_FAIL;
}
return E_FAIL;
};
/*****************************************************************************
* objectsafety.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "plugin.h"
#include "objectsafety.h"
#include "axvlc_idl.h"
#if 0
const GUID IID_IObjectSafety =
{0xCB5BDC81,0x93C1,0x11cf,{0x8F,0x20,0x00,0x80,0x5F,0x2C,0xD0,0x64}};
#endif
STDMETHODIMP VLCObjectSafety::GetInterfaceSafetyOptions(
REFIID riid,
DWORD *pdwSupportedOptions,
DWORD *pdwEnabledOptions
)
{
if( (NULL == pdwSupportedOptions) || (NULL == pdwEnabledOptions) )
return E_POINTER;
*pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACESAFE_FOR_UNTRUSTED_CALLER;
if( (IID_IDispatch == riid)
|| (IID_IVLCControl == riid) )
{
*pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER;
return NOERROR;
}
else if( (IID_IPersist == riid)
|| (IID_IPersistStreamInit == riid)
|| (IID_IPersistStorage == riid)
|| (IID_IPersistPropertyBag == riid) )
{
*pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA;
return NOERROR;
}
*pdwEnabledOptions = 0;
return E_NOINTERFACE;
};
STDMETHODIMP VLCObjectSafety::SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwOptionSetMask,
DWORD dwEnabledOptions
)
{
if( (IID_IDispatch == riid)
|| (IID_IVLCControl == riid) )
{
if( (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwOptionSetMask)
&& (INTERFACESAFE_FOR_UNTRUSTED_CALLER == dwEnabledOptions) )
{
return NOERROR;
}
return E_FAIL;
}
else if( (IID_IPersist == riid)
|| (IID_IPersistStreamInit == riid)
|| (IID_IPersistStorage == riid)
|| (IID_IPersistPropertyBag == riid) )
{
if( (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwOptionSetMask)
&& (INTERFACESAFE_FOR_UNTRUSTED_DATA == dwEnabledOptions) )
{
return NOERROR;
}
return E_FAIL;
}
return E_FAIL;
};
/*****************************************************************************
* objectsafety.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __OBJECTSAFETY_H__
#define __OBJECTSAFETY_H__
#if HAVE_OBJSAFE_HEADER
/*
** at last, a version of mingw that supports this header
*/
#include <objsafe.h>
#else
// {CB5BDC81-93C1-11cf-8F20-00805F2CD064}
extern "C" const IID IID_IObjectSafety;
#define INTERFACESAFE_FOR_UNTRUSTED_CALLER 1L
#define INTERFACESAFE_FOR_UNTRUSTED_DATA 2L
struct IObjectSafety : public IUnknown
{
virtual STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid,
DWORD __RPC_FAR *pdwSupportedOptions,
DWORD __RPC_FAR *pdwEnabledOptions
) = 0;
virtual STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwSupportedOptions,
DWORD dwOptionSetMask
) = 0;
};
#endif
class VLCObjectSafety : public IObjectSafety
{
public:
VLCObjectSafety(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCObjectSafety() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( (NULL != ppv)
&& (IID_IUnknown == riid)
&& (IID_IObjectSafety == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
return _p_instance->QueryInterface(riid, ppv);
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IUnknown methods
STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid,
DWORD *pdwSupportedOptions,
DWORD *pdwEnabledOptions
);
STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwOptionSetMask,
DWORD dwEnabledOptions
);
private:
VLCPlugin *_p_instance;
};
#endif
/*****************************************************************************
* objectsafety.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __OBJECTSAFETY_H__
#define __OBJECTSAFETY_H__
#if HAVE_OBJSAFE_HEADER
/*
** at last, a version of mingw that supports this header
*/
#include <objsafe.h>
#else
// {CB5BDC81-93C1-11cf-8F20-00805F2CD064}
extern "C" const IID IID_IObjectSafety;
#define INTERFACESAFE_FOR_UNTRUSTED_CALLER 1L
#define INTERFACESAFE_FOR_UNTRUSTED_DATA 2L
struct IObjectSafety : public IUnknown
{
virtual STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid,
DWORD __RPC_FAR *pdwSupportedOptions,
DWORD __RPC_FAR *pdwEnabledOptions
) = 0;
virtual STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwSupportedOptions,
DWORD dwOptionSetMask
) = 0;
};
#endif
class VLCObjectSafety : public IObjectSafety
{
public:
VLCObjectSafety(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCObjectSafety() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( (NULL != ppv)
&& (IID_IUnknown == riid)
&& (IID_IObjectSafety == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
return _p_instance->QueryInterface(riid, ppv);
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IUnknown methods
STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid,
DWORD *pdwSupportedOptions,
DWORD *pdwEnabledOptions
);
STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwOptionSetMask,
DWORD dwEnabledOptions
);
private:
VLCPlugin *_p_instance;
};
#endif
/*****************************************************************************
* olecontrol.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "plugin.h"
#include "olecontrol.h"
#include "utils.h"
using namespace std;
STDMETHODIMP VLCOleControl::GetControlInfo(CONTROLINFO *pCI)
{
if( NULL == pCI )
return E_POINTER;
pCI->cb = sizeof(CONTROLINFO);
pCI->hAccel = NULL;
pCI->cAccel = 0;
pCI->dwFlags = 0;
return S_OK;
};
STDMETHODIMP VLCOleControl::OnMnemonic(LPMSG pMsg)
{
return E_NOTIMPL;
};
static HRESULT getAmbientProperty(VLCPlugin& instance, DISPID dispID, VARIANT& v)
{
HRESULT hr;
IOleObject *oleObj;
hr = instance.QueryInterface(IID_IOleObject, (LPVOID *)&oleObj);
if( SUCCEEDED(hr) )
{
IOleClientSite *clientSite;
hr = oleObj->GetClientSite(&clientSite);
if( SUCCEEDED(hr) && (NULL != clientSite) )
{
hr = GetObjectProperty(clientSite, dispID, v);
clientSite->Release();
}
oleObj->Release();
}
return hr;
};
STDMETHODIMP VLCOleControl::OnAmbientPropertyChange(DISPID dispID)
{
switch( dispID )
{
case DISPID_AMBIENT_BACKCOLOR:
break;
case DISPID_AMBIENT_DISPLAYNAME:
break;
case DISPID_AMBIENT_FONT:
break;
case DISPID_AMBIENT_FORECOLOR:
break;
case DISPID_AMBIENT_LOCALEID:
break;
case DISPID_AMBIENT_MESSAGEREFLECT:
break;
case DISPID_AMBIENT_SCALEUNITS:
break;
case DISPID_AMBIENT_TEXTALIGN:
break;
case DISPID_AMBIENT_USERMODE:
break;
case DISPID_AMBIENT_UIDEAD:
break;
case DISPID_AMBIENT_SHOWGRABHANDLES:
break;
case DISPID_AMBIENT_SHOWHATCHING:
break;
case DISPID_AMBIENT_DISPLAYASDEFAULT:
break;
case DISPID_AMBIENT_SUPPORTSMNEMONICS:
break;
case DISPID_AMBIENT_AUTOCLIP:
break;
case DISPID_AMBIENT_APPEARANCE:
break;
case DISPID_AMBIENT_CODEPAGE:
VARIANT v;
VariantInit(&v);
V_VT(&v) = VT_I4;
if( SUCCEEDED(getAmbientProperty(*_p_instance, dispID, v)) )
{
_p_instance->setCodePage(V_I4(&v));
}
break;
case DISPID_AMBIENT_PALETTE:
break;
case DISPID_AMBIENT_CHARSET:
break;
case DISPID_AMBIENT_RIGHTTOLEFT:
break;
case DISPID_AMBIENT_TOPTOBOTTOM:
break;
default:
break;
}
return S_OK;
};
STDMETHODIMP VLCOleControl::FreezeEvents(BOOL bFreeze)
{
_p_instance->setSendEvents(! bFreeze);
return S_OK;
};
/*****************************************************************************
* olecontrol.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "plugin.h"
#include "olecontrol.h"
#include "utils.h"
using namespace std;
STDMETHODIMP VLCOleControl::GetControlInfo(CONTROLINFO *pCI)
{
if( NULL == pCI )
return E_POINTER;
pCI->cb = sizeof(CONTROLINFO);
pCI->hAccel = NULL;
pCI->cAccel = 0;
pCI->dwFlags = 0;
return S_OK;
};
STDMETHODIMP VLCOleControl::OnMnemonic(LPMSG pMsg)
{
return E_NOTIMPL;
};
static HRESULT getAmbientProperty(VLCPlugin& instance, DISPID dispID, VARIANT& v)
{
HRESULT hr;
IOleObject *oleObj;
hr = instance.QueryInterface(IID_IOleObject, (LPVOID *)&oleObj);
if( SUCCEEDED(hr) )
{
IOleClientSite *clientSite;
hr = oleObj->GetClientSite(&clientSite);
if( SUCCEEDED(hr) && (NULL != clientSite) )
{
hr = GetObjectProperty(clientSite, dispID, v);
clientSite->Release();
}
oleObj->Release();
}
return hr;
};
STDMETHODIMP VLCOleControl::OnAmbientPropertyChange(DISPID dispID)
{
switch( dispID )
{
case DISPID_AMBIENT_BACKCOLOR:
break;
case DISPID_AMBIENT_DISPLAYNAME:
break;
case DISPID_AMBIENT_FONT:
break;
case DISPID_AMBIENT_FORECOLOR:
break;
case DISPID_AMBIENT_LOCALEID:
break;
case DISPID_AMBIENT_MESSAGEREFLECT:
break;
case DISPID_AMBIENT_SCALEUNITS:
break;
case DISPID_AMBIENT_TEXTALIGN:
break;
case DISPID_AMBIENT_USERMODE:
break;
case DISPID_AMBIENT_UIDEAD:
break;
case DISPID_AMBIENT_SHOWGRABHANDLES:
break;
case DISPID_AMBIENT_SHOWHATCHING:
break;
case DISPID_AMBIENT_DISPLAYASDEFAULT:
break;
case DISPID_AMBIENT_SUPPORTSMNEMONICS:
break;
case DISPID_AMBIENT_AUTOCLIP:
break;
case DISPID_AMBIENT_APPEARANCE:
break;
case DISPID_AMBIENT_CODEPAGE:
VARIANT v;
VariantInit(&v);
V_VT(&v) = VT_I4;
if( SUCCEEDED(getAmbientProperty(*_p_instance, dispID, v)) )
{
_p_instance->setCodePage(V_I4(&v));
}
break;
case DISPID_AMBIENT_PALETTE:
break;
case DISPID_AMBIENT_CHARSET:
break;
case DISPID_AMBIENT_RIGHTTOLEFT:
break;
case DISPID_AMBIENT_TOPTOBOTTOM:
break;
default:
break;
}
return S_OK;
};
STDMETHODIMP VLCOleControl::FreezeEvents(BOOL bFreeze)
{
_p_instance->setSendEvents(! bFreeze);
return S_OK;
};
/*****************************************************************************
* olecontrol.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __OLECONTROL_H__
#define __OLECONTROL_H__
#include <olectl.h>
class VLCOleControl : public IOleControl
{
public:
VLCOleControl(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCOleControl() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( (NULL != ppv)
&& (IID_IUnknown == riid)
&& (IID_IOleControl == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
return _p_instance->QueryInterface(riid, ppv);
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IOleControl methods
STDMETHODIMP GetControlInfo(CONTROLINFO *pCI);
STDMETHODIMP OnMnemonic(LPMSG pMsg);
STDMETHODIMP OnAmbientPropertyChange(DISPID dispID);
STDMETHODIMP FreezeEvents(BOOL bFreeze);
private:
VLCPlugin *_p_instance;
};
#endif
/*****************************************************************************
* olecontrol.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __OLECONTROL_H__
#define __OLECONTROL_H__
#include <olectl.h>
class VLCOleControl : public IOleControl
{
public:
VLCOleControl(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCOleControl() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( (NULL != ppv)
&& (IID_IUnknown == riid)
&& (IID_IOleControl == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
return _p_instance->QueryInterface(riid, ppv);
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IOleControl methods
STDMETHODIMP GetControlInfo(CONTROLINFO *pCI);
STDMETHODIMP OnMnemonic(LPMSG pMsg);
STDMETHODIMP OnAmbientPropertyChange(DISPID dispID);
STDMETHODIMP FreezeEvents(BOOL bFreeze);
private:
VLCPlugin *_p_instance;
};
#endif
/*****************************************************************************
* oleinplaceactiveobject.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "plugin.h"
#include "oleinplaceactiveobject.h"
using namespace std;
STDMETHODIMP VLCOleInPlaceActiveObject::GetWindow(HWND *pHwnd)
{
if( NULL == pHwnd )
return E_INVALIDARG;
if( _p_instance->isInPlaceActive() )
{
if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) )
return S_OK;
return E_FAIL;
}
*pHwnd = NULL;
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceActiveObject::EnableModeless(BOOL fEnable)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::ContextSensitiveHelp(BOOL fEnterMode)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::TranslateAccelerator(LPMSG lpmsg)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::OnFrameWindowActivate(BOOL fActivate)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::OnDocWindowActivate(BOOL fActivate)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::ResizeBorder(LPCRECT prcBorder, LPOLEINPLACEUIWINDOW pUIWindow, BOOL fFrameWindow)
{
return E_NOTIMPL;
};
/*****************************************************************************
* oleinplaceactiveobject.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "plugin.h"
#include "oleinplaceactiveobject.h"
using namespace std;
STDMETHODIMP VLCOleInPlaceActiveObject::GetWindow(HWND *pHwnd)
{
if( NULL == pHwnd )
return E_INVALIDARG;
if( _p_instance->isInPlaceActive() )
{
if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) )
return S_OK;
return E_FAIL;
}
*pHwnd = NULL;
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceActiveObject::EnableModeless(BOOL fEnable)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::ContextSensitiveHelp(BOOL fEnterMode)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::TranslateAccelerator(LPMSG lpmsg)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::OnFrameWindowActivate(BOOL fActivate)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::OnDocWindowActivate(BOOL fActivate)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceActiveObject::ResizeBorder(LPCRECT prcBorder, LPOLEINPLACEUIWINDOW pUIWindow, BOOL fFrameWindow)
{
return E_NOTIMPL;
};
/*****************************************************************************
* oleinplaceactiveobject.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __OLEINPLACEACTIVEOBJECT_H__
#define __OLEINPLACEACTIVEOBJECT_H__
#include "oleidl.h"
class VLCOleInPlaceActiveObject : public IOleInPlaceActiveObject
{
public:
VLCOleInPlaceActiveObject(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCOleInPlaceActiveObject() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( (NULL != ppv)
&& (IID_IUnknown == riid)
&& (IID_IOleWindow == riid)
&& (IID_IOleInPlaceActiveObject == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
return _p_instance->QueryInterface(riid, ppv);
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IOleWindow methods
STDMETHODIMP GetWindow(HWND *);
STDMETHODIMP ContextSensitiveHelp(BOOL);
// IOleInPlaceActiveObject methods
STDMETHODIMP EnableModeless(BOOL);
STDMETHODIMP TranslateAccelerator(LPMSG);
STDMETHODIMP OnFrameWindowActivate(BOOL);
STDMETHODIMP OnDocWindowActivate(BOOL);
STDMETHODIMP ResizeBorder(LPCRECT, LPOLEINPLACEUIWINDOW, BOOL);
private:
VLCPlugin *_p_instance;
};
#endif
/*****************************************************************************
* oleinplaceactiveobject.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __OLEINPLACEACTIVEOBJECT_H__
#define __OLEINPLACEACTIVEOBJECT_H__
#include "oleidl.h"
class VLCOleInPlaceActiveObject : public IOleInPlaceActiveObject
{
public:
VLCOleInPlaceActiveObject(VLCPlugin *p_instance) : _p_instance(p_instance) {};
virtual ~VLCOleInPlaceActiveObject() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( (NULL != ppv)
&& (IID_IUnknown == riid)
&& (IID_IOleWindow == riid)
&& (IID_IOleInPlaceActiveObject == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
return NOERROR;
}
return _p_instance->QueryInterface(riid, ppv);
};
STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
// IOleWindow methods
STDMETHODIMP GetWindow(HWND *);
STDMETHODIMP ContextSensitiveHelp(BOOL);
// IOleInPlaceActiveObject methods
STDMETHODIMP EnableModeless(BOOL);
STDMETHODIMP TranslateAccelerator(LPMSG);
STDMETHODIMP OnFrameWindowActivate(BOOL);
STDMETHODIMP OnDocWindowActivate(BOOL);
STDMETHODIMP ResizeBorder(LPCRECT, LPOLEINPLACEUIWINDOW, BOOL);
private:
VLCPlugin *_p_instance;
};
#endif
/*****************************************************************************
* oleinplaceobject.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "plugin.h"
#include "oleinplaceobject.h"
#include <docobj.h>
using namespace std;
STDMETHODIMP VLCOleInPlaceObject::GetWindow(HWND *pHwnd)
{
if( NULL == pHwnd )
return E_INVALIDARG;
if( _p_instance->isInPlaceActive() )
{
if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) )
return S_OK;
return E_FAIL;
}
*pHwnd = NULL;
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceObject::ContextSensitiveHelp(BOOL fEnterMode)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceObject::InPlaceDeactivate(void)
{
if( _p_instance->isInPlaceActive() )
{
UIDeactivate();
_p_instance->onInPlaceDeactivate();
LPOLEOBJECT p_oleObject;
if( SUCCEEDED(QueryInterface(IID_IOleObject, (void**)&p_oleObject)) )
{
LPOLECLIENTSITE p_clientSite;
if( SUCCEEDED(p_oleObject->GetClientSite(&p_clientSite)) )
{
LPOLEINPLACESITE p_inPlaceSite;
if( SUCCEEDED(p_clientSite->QueryInterface(IID_IOleInPlaceSite, (void**)&p_inPlaceSite)) )
{
p_inPlaceSite->OnInPlaceDeactivate();
p_inPlaceSite->Release();
}
p_clientSite->Release();
}
p_oleObject->Release();
}
return S_OK;
}
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceObject::UIDeactivate(void)
{
if( _p_instance->isInPlaceActive() )
{
if( _p_instance->hasFocus() )
{
_p_instance->setFocus(FALSE);
LPOLEOBJECT p_oleObject;
if( SUCCEEDED(QueryInterface(IID_IOleObject, (void**)&p_oleObject)) )
{
LPOLECLIENTSITE p_clientSite;
if( SUCCEEDED(p_oleObject->GetClientSite(&p_clientSite)) )
{
LPOLEINPLACESITE p_inPlaceSite;
if( SUCCEEDED(p_clientSite->QueryInterface(IID_IOleInPlaceSite, (void**)&p_inPlaceSite)) )
{
p_inPlaceSite->OnUIDeactivate(FALSE);
p_inPlaceSite->Release();
}
p_clientSite->Release();
}
p_oleObject->Release();
}
return S_OK;
}
}
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceObject::SetObjectRects(LPCRECT lprcPosRect, LPCRECT lprcClipRect)
{
if( _p_instance->isInPlaceActive() )
{
_p_instance->onPositionChange(lprcPosRect, lprcClipRect);
return S_OK;
}
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceObject::ReactivateAndUndo(void)
{
return INPLACE_E_NOTUNDOABLE;
};
/*****************************************************************************
* oleinplaceobject.cpp: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2005 VideoLAN
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "plugin.h"
#include "oleinplaceobject.h"
#include <docobj.h>
using namespace std;
STDMETHODIMP VLCOleInPlaceObject::GetWindow(HWND *pHwnd)
{
if( NULL == pHwnd )
return E_INVALIDARG;
if( _p_instance->isInPlaceActive() )
{
if( NULL != (*pHwnd = _p_instance->getInPlaceWindow()) )
return S_OK;
return E_FAIL;
}
*pHwnd = NULL;
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceObject::ContextSensitiveHelp(BOOL fEnterMode)
{
return E_NOTIMPL;
};
STDMETHODIMP VLCOleInPlaceObject::InPlaceDeactivate(void)
{
if( _p_instance->isInPlaceActive() )
{
UIDeactivate();
_p_instance->onInPlaceDeactivate();
LPOLEOBJECT p_oleObject;
if( SUCCEEDED(QueryInterface(IID_IOleObject, (void**)&p_oleObject)) )
{
LPOLECLIENTSITE p_clientSite;
if( SUCCEEDED(p_oleObject->GetClientSite(&p_clientSite)) )
{
LPOLEINPLACESITE p_inPlaceSite;
if( SUCCEEDED(p_clientSite->QueryInterface(IID_IOleInPlaceSite, (void**)&p_inPlaceSite)) )
{
p_inPlaceSite->OnInPlaceDeactivate();
p_inPlaceSite->Release();
}
p_clientSite->Release();
}
p_oleObject->Release();
}
return S_OK;
}
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceObject::UIDeactivate(void)
{
if( _p_instance->isInPlaceActive() )
{
if( _p_instance->hasFocus() )
{
_p_instance->setFocus(FALSE);
LPOLEOBJECT p_oleObject;
if( SUCCEEDED(QueryInterface(IID_IOleObject, (void**)&p_oleObject)) )
{
LPOLECLIENTSITE p_clientSite;
if( SUCCEEDED(p_oleObject->GetClientSite(&p_clientSite)) )
{
LPOLEINPLACESITE p_inPlaceSite;
if( SUCCEEDED(p_clientSite->QueryInterface(IID_IOleInPlaceSite, (void**)&p_inPlaceSite)) )
{
p_inPlaceSite->OnUIDeactivate(FALSE);
p_inPlaceSite->Release();
}
p_clientSite->Release();
}
p_oleObject->Release();
}
return S_OK;
}
}
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceObject::SetObjectRects(LPCRECT lprcPosRect, LPCRECT lprcClipRect)
{
if( _p_instance->isInPlaceActive() )
{
_p_instance->onPositionChange(lprcPosRect, lprcClipRect);
return S_OK;
}
return E_UNEXPECTED;
};
STDMETHODIMP VLCOleInPlaceObject::ReactivateAndUndo(void)
{
return INPLACE_E_NOTUNDOABLE;
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* beos_specific.h: BeOS specific features
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: beos_specific.h,v 1.9 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
*
......
......@@ -2,7 +2,7 @@
* charset.h: Determine a canonical name for the current locale's character encoding.
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: charset.h,v 1.3 2004/02/21 23:15:52 gbazin Exp $
* $Id$
*
* Author: Derk-Jan Hartman <thedj at users.sourceforge.net>
*
......
......@@ -2,7 +2,7 @@
* intf_eject.h: CD/DVD-ROM ejection handling functions
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: intf_eject.h,v 1.6 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* Author: Julien Blache <jb@technologeek.org>
*
......
......@@ -2,7 +2,7 @@
* iso_lang.h: function to decode language code (in dvd or a52 for instance).
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: iso_lang.h,v 1.9 2003/10/24 17:41:58 sam Exp $
* $Id$
*
* Author: Stphane Borel <stef@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......
......@@ -2,7 +2,7 @@
* os_specific.h: OS specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: os_specific.h,v 1.13 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
......
......@@ -2,7 +2,7 @@
* aout.h: audio output header for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout.h,v 1.2 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* 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
......
......@@ -2,7 +2,7 @@
* sout.h: video output header for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: sout.h,v 1.4 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* 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
......
......@@ -2,7 +2,7 @@
* bits.h :
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlc_bits.h,v 1.1 2003/11/18 20:15:38 fenrir Exp $
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......
......@@ -2,7 +2,7 @@
* cpu.h: CPU type detection
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: vlc_cpu.h,v 1.6 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......
......@@ -2,7 +2,7 @@
* vlc_error.h: error handling routine
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: vlc_error.h,v 1.1 2003/07/01 12:56:47 sam Exp $
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......
......@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: vlc_messages.h,v 1.11 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......
......@@ -2,7 +2,7 @@
* win32_specific.h: Win32 specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: win32_specific.h,v 1.5 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
......
......@@ -2,7 +2,7 @@
* beos.cpp: Screen capture module.
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id: screen.c 8284 2004-07-26 10:27:55Z gbazin $
* $Id$
*
* Authors: Eric Petit <titer@m0k.org>
*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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