Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

olecontrol.cpp

00001 /*****************************************************************************
00002  * olecontrol.cpp: ActiveX control for VLC
00003  *****************************************************************************
00004  * Copyright (C) 2005 the VideoLAN team
00005  *
00006  * Authors: Damien Fouilleul <[email protected]>
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00021  *****************************************************************************/
00022 
00023 #include "plugin.h"
00024 #include "olecontrol.h"
00025 
00026 using namespace std;
00027 
00028 STDMETHODIMP VLCOleControl::GetControlInfo(CONTROLINFO *pCI)
00029 {
00030     if( NULL == pCI )
00031         return E_POINTER;
00032 
00033     pCI->cb      = sizeof(CONTROLINFO);
00034     pCI->hAccel  = NULL;
00035     pCI->cAccel  = 0;
00036     pCI->dwFlags = 0;
00037 
00038     return S_OK;
00039 };
00040 
00041 STDMETHODIMP VLCOleControl::OnMnemonic(LPMSG pMsg)
00042 {
00043     return E_NOTIMPL;
00044 };
00045 
00046 STDMETHODIMP VLCOleControl::OnAmbientPropertyChange(DISPID dispID)
00047 {
00048     HRESULT hr;
00049     IOleObject *oleObj;
00050 
00051     hr = QueryInterface(IID_IOleObject, (LPVOID *)&oleObj);
00052     if( SUCCEEDED(hr) )
00053     {
00054         IOleClientSite *clientSite;
00055 
00056         hr = oleObj->GetClientSite(&clientSite);
00057         if( SUCCEEDED(hr) && (NULL != clientSite) )
00058         {
00059             _p_instance->onAmbientChanged(clientSite, dispID);
00060             clientSite->Release();
00061         }
00062         oleObj->Release();
00063     }
00064     return S_OK;
00065 };
00066 
00067 STDMETHODIMP VLCOleControl::FreezeEvents(BOOL bFreeze)
00068 {
00069     _p_instance->freezeEvents(bFreeze);
00070     return S_OK;
00071 };
00072 

Generated on Tue Dec 20 10:14:18 2005 for vlc-0.8.4a by  doxygen 1.4.2