mshtml: Added nsIInterfaceRequestor implementation.
This commit is contained in:
parent
a611b20c26
commit
91369e20e7
|
@ -84,6 +84,7 @@ struct NSContainer {
|
|||
const nsIContextMenuListenerVtbl *lpContextMenuListenerVtbl;
|
||||
const nsIURIContentListenerVtbl *lpURIContentListenerVtbl;
|
||||
const nsIEmbeddingSiteWindowVtbl *lpEmbeddingSiteWindowVtbl;
|
||||
const nsIInterfaceRequestorVtbl *lpInterfaceRequestorVtbl;
|
||||
|
||||
nsIWebBrowser *webbrowser;
|
||||
nsIWebNavigation *navigation;
|
||||
|
@ -125,6 +126,7 @@ struct NSContainer {
|
|||
#define NSCML(x) ((nsIContextMenuListener*) &(x)->lpContextMenuListenerVtbl)
|
||||
#define NSURICL(x) ((nsIURIContentListener*) &(x)->lpURIContentListenerVtbl)
|
||||
#define NSEMBWNDS(x) ((nsIEmbeddingSiteWindow*) &(x)->lpEmbeddingSiteWindowVtbl)
|
||||
#define NSIFACEREQ(x) ((nsIInterfaceRequestor*) &(x)->lpInterfaceRequestorVtbl)
|
||||
|
||||
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2005 Jacek Caban
|
||||
* Copyright 2005-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
|
||||
|
@ -457,6 +457,9 @@ static nsresult NSAPI nsWebBrowserChrome_QueryInterface(nsIWebBrowserChrome *ifa
|
|||
}else if(IsEqualGUID(&IID_nsIEmbeddingSiteWindow, riid)) {
|
||||
TRACE("(%p)->(IID_nsIEmbeddingSiteWindow %p)\n", This, result);
|
||||
*result = NSEMBWNDS(This);
|
||||
}else if(IsEqualGUID(&IID_nsIInterfaceRequestor, riid)) {
|
||||
TRACE("(%p)->(IID_nsIInterfaceRequestor %p)\n", This, result);
|
||||
*result = NSIFACEREQ(This);
|
||||
}
|
||||
|
||||
if(*result) {
|
||||
|
@ -916,6 +919,49 @@ static const nsIEmbeddingSiteWindowVtbl nsEmbeddingSiteWindowVtbl = {
|
|||
nsEmbeddingSiteWindow_GetSiteWindow
|
||||
};
|
||||
|
||||
#define NSIFACEREQ_THIS(iface) DEFINE_THIS(NSContainer, InterfaceRequestor, iface)
|
||||
|
||||
static nsresult NSAPI nsInterfaceRequestor_QueryInterface(nsIInterfaceRequestor *iface,
|
||||
nsIIDRef riid, nsQIResult result)
|
||||
{
|
||||
NSContainer *This = NSIFACEREQ_THIS(iface);
|
||||
return nsIWebBrowserChrome_QueryInterface(NSWBCHROME(This), riid, result);
|
||||
}
|
||||
|
||||
static nsrefcnt NSAPI nsInterfaceRequestor_AddRef(nsIInterfaceRequestor *iface)
|
||||
{
|
||||
NSContainer *This = NSIFACEREQ_THIS(iface);
|
||||
return nsIWebBrowserChrome_AddRef(NSWBCHROME(This));
|
||||
}
|
||||
|
||||
static nsrefcnt NSAPI nsInterfaceRequestor_Release(nsIInterfaceRequestor *iface)
|
||||
{
|
||||
NSContainer *This = NSIFACEREQ_THIS(iface);
|
||||
return nsIWebBrowserChrome_Release(NSWBCHROME(This));
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsInterfaceRequestor_GetInterface(nsIInterfaceRequestor *iface,
|
||||
nsIIDRef riid, nsQIResult result)
|
||||
{
|
||||
NSContainer *This = NSIFACEREQ_THIS(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_nsIDOMWindow, riid)) {
|
||||
FIXME("(%p)->(IID_nsIDOMWindow %p)\n", This, result);
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
return nsIWebBrowserChrome_QueryInterface(NSWBCHROME(This), riid, result);
|
||||
}
|
||||
|
||||
#undef NSIFACEREQ_THIS
|
||||
|
||||
static const nsIInterfaceRequestorVtbl nsInterfaceRequestorVtbl = {
|
||||
nsInterfaceRequestor_QueryInterface,
|
||||
nsInterfaceRequestor_AddRef,
|
||||
nsInterfaceRequestor_Release,
|
||||
nsInterfaceRequestor_GetInterface
|
||||
};
|
||||
|
||||
void NSContainer_Create(HTMLDocument *doc)
|
||||
{
|
||||
nsIWebBrowserSetup *wbsetup;
|
||||
|
@ -931,6 +977,7 @@ void NSContainer_Create(HTMLDocument *doc)
|
|||
ret->lpContextMenuListenerVtbl = &nsContextMenuListenerVtbl;
|
||||
ret->lpURIContentListenerVtbl = &nsURIContentListenerVtbl;
|
||||
ret->lpEmbeddingSiteWindowVtbl = &nsEmbeddingSiteWindowVtbl;
|
||||
ret->lpInterfaceRequestorVtbl = &nsInterfaceRequestorVtbl;
|
||||
|
||||
ret->doc = doc;
|
||||
ret->ref = 1;
|
||||
|
|
|
@ -68,7 +68,6 @@ interface nsISupports
|
|||
|
||||
/* Currently we don't need a full declaration of these interfaces */
|
||||
typedef nsISupports nsIWeakReference;
|
||||
typedef nsISupports nsIDOMWindow;
|
||||
typedef nsISupports nsIDOMDocument;
|
||||
typedef nsISupports nsISHistory;
|
||||
typedef nsISupports nsISimpleEnumerator;
|
||||
|
@ -81,6 +80,9 @@ typedef nsISupports nsIDOMAbstractView;
|
|||
typedef nsISupports nsIStreamListener;
|
||||
typedef nsISupports nsIHttpHeaderVisitor;
|
||||
typedef nsISupports nsIRequestObserver;
|
||||
typedef nsISupports nsIDOMBarProp;
|
||||
typedef nsISupports nsIDOMWindowCollection;
|
||||
typedef nsISupports nsISelection;
|
||||
|
||||
[
|
||||
object,
|
||||
|
@ -295,6 +297,31 @@ interface nsIUploadChannel : nsISupports
|
|||
nsresult GetUploadStream(nsIInputStream **aUploadStream);
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(a6cf906b-15b3-11d2-932e-00805f8add32)
|
||||
]
|
||||
interface nsIDOMWindow : nsISupports
|
||||
{
|
||||
nsresult GetDocument(nsIDOMDocument **aDocument);
|
||||
nsresult GetParent(nsIDOMWindow **aParent);
|
||||
nsresult GetTop(nsIDOMWindow **aTop);
|
||||
nsresult GetScrollbars(nsIDOMBarProp **aScrollbars);
|
||||
nsresult GetFrames(nsIDOMWindowCollection **aFrames);
|
||||
nsresult GetName(nsAString *aName);
|
||||
nsresult SetName(const nsAString *aName);
|
||||
nsresult GetTextZoom(float *aTextZoom);
|
||||
nsresult SetTextZoom(float aTextZoom);
|
||||
nsresult GetScrollX(PRInt32 *aScrollX);
|
||||
nsresult GetScrollY(PRInt32 *aScrollY);
|
||||
nsresult ScrollTo(PRInt32 xScroll, PRInt32 yScroll);
|
||||
nsresult ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif);
|
||||
nsresult GetSelection(nsISelection **_retval);
|
||||
nsresult ScrollByLines(PRInt32 numLines);
|
||||
nsresult ScrollByPages(PRInt32 numPages);
|
||||
nsresult SizeToContent();
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(94928ab3-8b63-11d3-989d-001083010e9b)
|
||||
|
|
Loading…
Reference in New Issue