mshtml: Added IConnectionPointContainer stub implementation.

This commit is contained in:
Jacek Caban 2006-04-28 19:59:58 +02:00 committed by Alexandre Julliard
parent 77bb544c51
commit 570a1c4eea
4 changed files with 101 additions and 0 deletions

View file

@ -9,6 +9,7 @@ EXTRALIBS = $(LIBUNICODE) -lstrmiids -luuid
EXTRADEFS = -DCOM_NO_WINDOWS_H
C_SRCS = \
conpoint.c \
hlink.c \
htmlbody.c \
htmldoc.c \

93
dlls/mshtml/conpoint.c Normal file
View file

@ -0,0 +1,93 @@
/*
* Copyright 2006 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "wine/debug.h"
#include "mshtml_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define CONPOINT(x) ((IConnectionPoint*) &(x)->lpConnectionPointVtbl);
struct ConnectionPoint {
const IConnectionPointVtbl *lpConnectionPointVtbl;
};
#define CONPTCONT_THIS(iface) DEFINE_THIS(HTMLDocument, ConnectionPointContainer, iface)
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface,
REFIID riid, void **ppv)
{
HTMLDocument *This = CONPTCONT_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
}
static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
{
HTMLDocument *This = CONPTCONT_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This));
}
static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface)
{
HTMLDocument *This = CONPTCONT_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This));
}
static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface,
IEnumConnectionPoints **ppEnum)
{
HTMLDocument *This = CONPTCONT_THIS(iface);
FIXME("(%p)->(%p)\n", This, ppEnum);
return E_NOTIMPL;
}
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface,
REFIID riid, IConnectionPoint **ppCP)
{
HTMLDocument *This = CONPTCONT_THIS(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppCP);
return E_NOTIMPL;
}
static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = {
ConnectionPointContainer_QueryInterface,
ConnectionPointContainer_AddRef,
ConnectionPointContainer_Release,
ConnectionPointContainer_EnumConnectionPoints,
ConnectionPointContainer_FindConnectionPoint
};
#undef CONPTCONT_THIS
void HTMLDocument_ConnectionPoints_Init(HTMLDocument *This)
{
This->lpConnectionPointContainerVtbl = &ConnectionPointContainerVtbl;
}

View file

@ -107,6 +107,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
}else if(IsEqualGUID(&IID_IHlinkTarget, riid)) {
TRACE("(%p)->(IID_IHlinkTarget, %p)\n", This, ppvObject);
*ppvObject = HLNKTARGET(This);
}else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppvObject);
*ppvObject = CONPTCONT(This);
}
if(*ppvObject) {
@ -1043,6 +1046,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
HTMLDocument_Window_Init(ret);
HTMLDocument_Service_Init(ret);
HTMLDocument_Hlink_Init(ret);
HTMLDocument_ConnectionPoints_Init(ret);
ret->nscontainer = NSContainer_Create(ret, NULL);

View file

@ -62,6 +62,7 @@ typedef struct {
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
const IOleControlVtbl *lpOleControlVtbl;
const IHlinkTargetVtbl *lpHlinkTargetVtbl;
const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
LONG ref;
@ -171,6 +172,7 @@ typedef struct {
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl)
#define HLNKTARGET(x) ((IHlinkTarget*) &(x)->lpHlinkTargetVtbl)
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
#define NSWBCHROME(x) ((nsIWebBrowserChrome*) &(x)->lpWebBrowserChromeVtbl)
#define NSCML(x) ((nsIContextMenuListener*) &(x)->lpContextMenuListenerVtbl)
@ -198,6 +200,7 @@ void HTMLDocument_View_Init(HTMLDocument*);
void HTMLDocument_Window_Init(HTMLDocument*);
void HTMLDocument_Service_Init(HTMLDocument*);
void HTMLDocument_Hlink_Init(HTMLDocument*);
void HTMLDocument_ConnectionPoints_Init(HTMLDocument*);
NSContainer *NSContainer_Create(HTMLDocument*,NSContainer*);
void NSContainer_Release(NSContainer*);