Changed a few calls to GetIID to use the NS_GET_IID macro.

Put in a mouse listener on the web shell container (non functional at present)


git-svn-id: svn://10.0.0.236/trunk@70113 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
locka%iol.ie 2000-05-16 22:07:09 +00:00
parent 0abbbc12f0
commit 9f4460e53c
2 changed files with 65 additions and 3 deletions

View File

@ -62,6 +62,8 @@ NS_INTERFACE_MAP_BEGIN(CWebBrowserContainer)
NS_INTERFACE_MAP_ENTRY(nsIDocumentLoaderObserver)
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
NS_INTERFACE_MAP_ENTRY(nsIPrompt)
NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMMouseListener)
NS_INTERFACE_MAP_END
@ -70,7 +72,8 @@ NS_INTERFACE_MAP_END
NS_IMETHODIMP CWebBrowserContainer::GetInterface(const nsIID & uuid, void * *result)
{
if (memcmp(&uuid, &nsIPrompt::GetIID(), sizeof(nsIID)) == 0)
const nsIID &iid = NS_GET_IID(nsIPrompt);
if (memcmp(&uuid, &iid, sizeof(nsIID)) == 0)
{
*result = (nsIPrompt *) this;
AddRef();
@ -461,7 +464,7 @@ NS_IMETHODIMP CWebBrowserContainer::GetNewWindow(PRInt32 aChromeFlags,
nsIDocShell *docShell;
pBrowser->mWebBrowser->GetDocShell(&docShell);
docShell->QueryInterface(nsIDocShellTreeItem::GetIID(), (void **) aDocShellTreeItem);
docShell->QueryInterface(NS_GET_IID(nsIDocShellTreeItem), (void **) aDocShellTreeItem);
docShell->Release();
pDispNew->Release();
return NS_OK;
@ -833,3 +836,50 @@ CWebBrowserContainer::OnEndURLLoad(nsIDocumentLoader* loader, nsIChannel* channe
return NS_OK;
}
nsresult
CWebBrowserContainer::HandleEvent(nsIDOMEvent* aEvent)
{
return NS_OK;
}
nsresult
CWebBrowserContainer::MouseDown(nsIDOMEvent* aMouseEvent)
{
return NS_OK;
}
nsresult
CWebBrowserContainer::MouseUp(nsIDOMEvent* aMouseEvent)
{
return NS_OK;
}
nsresult
CWebBrowserContainer::MouseClick(nsIDOMEvent* aMouseEvent)
{
return NS_OK;
}
nsresult
CWebBrowserContainer::MouseDblClick(nsIDOMEvent* aMouseEvent)
{
return NS_OK;
}
nsresult
CWebBrowserContainer::MouseOver(nsIDOMEvent* aMouseEvent)
{
return NS_OK;
}
nsresult
CWebBrowserContainer::MouseOut(nsIDOMEvent* aMouseEvent)
{
return NS_OK;
}

View File

@ -25,6 +25,8 @@
#ifndef WEBBROWSERCONTAINER_H
#define WEBBROWSERCONTAINER_H
#include "nsIDOMMouseListener.h"
// This is the class that handles the XPCOM side of things, callback
// interfaces into the web shell and so forth.
@ -37,7 +39,8 @@ class CWebBrowserContainer :
public nsIDocumentLoaderObserver,
public nsIDocShellTreeOwner,
public nsIInterfaceRequestor,
public nsIPrompt
public nsIPrompt,
public nsIDOMMouseListener
{
public:
CWebBrowserContainer(CMozillaBrowser *pOwner);
@ -68,6 +71,15 @@ public:
// "Services" accessed through nsIInterfaceRequestor
NS_DECL_NSIPROMPT
// nsIDOMMouseListener
virtual nsresult HandleEvent(nsIDOMEvent* aEvent);
virtual nsresult MouseDown(nsIDOMEvent* aMouseEvent);
virtual nsresult MouseUp(nsIDOMEvent* aMouseEvent);
virtual nsresult MouseClick(nsIDOMEvent* aMouseEvent);
virtual nsresult MouseDblClick(nsIDOMEvent* aMouseEvent);
virtual nsresult MouseOver(nsIDOMEvent* aMouseEvent);
virtual nsresult MouseOut(nsIDOMEvent* aMouseEvent);
};
#endif