mshtml: Added nsIEmbeddingSiteWindow implementation.
This commit is contained in:
parent
7c482cb9a1
commit
37b1a456d7
|
@ -80,6 +80,7 @@ struct NSContainer {
|
|||
const nsIWebBrowserChromeVtbl *lpWebBrowserChromeVtbl;
|
||||
const nsIContextMenuListenerVtbl *lpContextMenuListenerVtbl;
|
||||
const nsIURIContentListenerVtbl *lpURIContentListenerVtbl;
|
||||
const nsIEmbeddingSiteWindowVtbl *lpEmbeddingSiteWindowVtbl;
|
||||
|
||||
nsIWebBrowser *webbrowser;
|
||||
nsIWebNavigation *navigation;
|
||||
|
@ -117,6 +118,7 @@ struct NSContainer {
|
|||
#define NSWBCHROME(x) ((nsIWebBrowserChrome*) &(x)->lpWebBrowserChromeVtbl)
|
||||
#define NSCML(x) ((nsIContextMenuListener*) &(x)->lpContextMenuListenerVtbl)
|
||||
#define NSURICL(x) ((nsIURIContentListener*) &(x)->lpURIContentListenerVtbl)
|
||||
#define NSEMBWNDS(x) ((nsIEmbeddingSiteWindow*) &(x)->lpEmbeddingSiteWindowVtbl)
|
||||
|
||||
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
|
||||
|
||||
|
|
|
@ -395,6 +395,9 @@ static nsresult NSAPI nsWebBrowserChrome_QueryInterface(nsIWebBrowserChrome *ifa
|
|||
}else if(IsEqualGUID(&IID_nsIContextMenuListener, riid)) {
|
||||
TRACE("(%p)->(IID_nsIContextMenuListener, %p)\n", This, result);
|
||||
*result = NSCML(This);
|
||||
}else if(IsEqualGUID(&IID_nsIEmbeddingSiteWindow, riid)) {
|
||||
TRACE("(%p)->(IIS_nsIEmbeddingSiteWindow %p)\n", This, result);
|
||||
*result = NSEMBWNDS(This);
|
||||
}
|
||||
|
||||
if(*result)
|
||||
|
@ -749,6 +752,111 @@ static const nsIURIContentListenerVtbl nsURIContentListenerVtbl = {
|
|||
nsURIContentListener_SetParentContentListener
|
||||
};
|
||||
|
||||
/**********************************************************
|
||||
* nsIEmbeddinSiteWindow interface
|
||||
*/
|
||||
|
||||
#define NSEMBWNDS_THIS(iface) DEFINE_THIS(NSContainer, EmbeddingSiteWindow, iface)
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_QueryInterface(nsIEmbeddingSiteWindow *iface,
|
||||
nsIIDRef riid, nsQIResult result)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
return nsIWebBrowserChrome_QueryInterface(NSWBCHROME(This), riid, result);
|
||||
}
|
||||
|
||||
static nsrefcnt NSAPI nsEmbeddingSiteWindow_AddRef(nsIEmbeddingSiteWindow *iface)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
return nsIWebBrowserChrome_AddRef(NSWBCHROME(This));
|
||||
}
|
||||
|
||||
static nsrefcnt NSAPI nsEmbeddingSiteWindow_Release(nsIEmbeddingSiteWindow *iface)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
return nsIWebBrowserChrome_Release(NSWBCHROME(This));
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_SetDimensions(nsIEmbeddingSiteWindow *iface,
|
||||
PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
WARN("(%p)->(%08lx %ld %ld %ld %ld)\n", This, flags, x, y, cx, cy);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_GetDimensions(nsIEmbeddingSiteWindow *iface,
|
||||
PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
WARN("(%p)->(%08lx %p %p %p %p)\n", This, flags, x, y, cx, cy);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_SetFocus(nsIEmbeddingSiteWindow *iface)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
WARN("(%p)\n", This);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_GetVisibility(nsIEmbeddingSiteWindow *iface,
|
||||
PRBool *aVisibility)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
WARN("(%p)->(%p)\n", This, aVisibility);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_SetVisibility(nsIEmbeddingSiteWindow *iface,
|
||||
PRBool aVisibility)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
WARN("(%p)->(%x)\n", This, aVisibility);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_GetTitle(nsIEmbeddingSiteWindow *iface,
|
||||
PRUnichar **aTitle)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
WARN("(%p)->(%p)\n", This, aTitle);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_SetTitle(nsIEmbeddingSiteWindow *iface,
|
||||
const PRUnichar *aTitle)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
WARN("(%p)->(%s)\n", This, debugstr_w(aTitle));
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static nsresult NSAPI nsEmbeddingSiteWindow_GetSiteWindow(nsIEmbeddingSiteWindow *iface,
|
||||
void **aSiteWindow)
|
||||
{
|
||||
NSContainer *This = NSEMBWNDS_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, aSiteWindow);
|
||||
|
||||
*aSiteWindow = This->hwnd;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static const nsIEmbeddingSiteWindowVtbl nsEmbeddingSiteWindowVtbl = {
|
||||
nsEmbeddingSiteWindow_QueryInterface,
|
||||
nsEmbeddingSiteWindow_AddRef,
|
||||
nsEmbeddingSiteWindow_Release,
|
||||
nsEmbeddingSiteWindow_SetDimensions,
|
||||
nsEmbeddingSiteWindow_GetDimensions,
|
||||
nsEmbeddingSiteWindow_SetFocus,
|
||||
nsEmbeddingSiteWindow_GetVisibility,
|
||||
nsEmbeddingSiteWindow_SetVisibility,
|
||||
nsEmbeddingSiteWindow_GetTitle,
|
||||
nsEmbeddingSiteWindow_SetTitle,
|
||||
nsEmbeddingSiteWindow_GetSiteWindow
|
||||
};
|
||||
|
||||
void HTMLDocument_NSContainer_Init(HTMLDocument *This)
|
||||
{
|
||||
nsIWebBrowserSetup *wbsetup;
|
||||
|
@ -764,6 +872,7 @@ void HTMLDocument_NSContainer_Init(HTMLDocument *This)
|
|||
This->nscontainer->lpWebBrowserChromeVtbl = &nsWebBrowserChromeVtbl;
|
||||
This->nscontainer->lpContextMenuListenerVtbl = &nsContextMenuListenerVtbl;
|
||||
This->nscontainer->lpURIContentListenerVtbl = &nsURIContentListenerVtbl;
|
||||
This->nscontainer->lpEmbeddingSiteWindowVtbl = &nsEmbeddingSiteWindowVtbl;
|
||||
|
||||
This->nscontainer->doc = This;
|
||||
|
||||
|
|
|
@ -433,3 +433,19 @@ interface nsIDOMMouseEvent : nsIDOMUIEvent
|
|||
PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg,
|
||||
nsIDOMEventTarget *relatedTargetArg);
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(3e5432cd-9568-4bd1-8cbe-d50aba110743)
|
||||
]
|
||||
interface nsIEmbeddingSiteWindow : nsISupports
|
||||
{
|
||||
nsresult SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy);
|
||||
nsresult GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
|
||||
nsresult SetFocus();
|
||||
nsresult GetVisibility(PRBool *aVisibility);
|
||||
nsresult SetVisibility(PRBool aVisibility);
|
||||
nsresult GetTitle(PRUnichar **aTitle);
|
||||
nsresult SetTitle(const PRUnichar *aTitle);
|
||||
nsresult GetSiteWindow(void **aSiteWindow);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue