mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Fix for bug 206321 (Share event listeners between XBL event handlers). r=jkeiser, sr=bryner.
This commit is contained in:
parent
9b06265469
commit
bde589ba46
@ -1,96 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsXBLContextMenuHandler.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptObjectOwner.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIJSEventListener.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLContextMenuHandler::nsXBLContextMenuHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLContextMenuHandler::~nsXBLContextMenuHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLContextMenuHandler, nsXBLEventHandler, nsIDOMContextMenuListener)
|
||||
|
||||
nsresult nsXBLContextMenuHandler::ContextMenu(nsIDOMEvent* aContextMenuEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::contextmenu, aContextMenuEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLContextMenuHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLContextMenuHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLContextMenuHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLContextMenuHandler_h__
|
||||
#define nsXBLContextMenuHandler_h__
|
||||
|
||||
#include "nsIDOMContextMenuListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIDOMContextMenuEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLContextMenuHandler : public nsIDOMContextMenuListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLContextMenuHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLContextMenuHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD ContextMenu(nsIDOMEvent* aContextMenuEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLContextMenuHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLContextMenuHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,70 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Brian Ryner <bryner@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsXBLCustomHandler.h"
|
||||
|
||||
nsXBLCustomHandler::nsXBLCustomHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLCustomHandler::~nsXBLCustomHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLCustomHandler, nsXBLEventHandler, nsIDOMEventListener)
|
||||
|
||||
nsresult nsXBLCustomHandler::HandleEvent(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsnull, aEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLCustomHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLCustomHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLCustomHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: Brian Ryner <bryner@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLCustomHandler_h__
|
||||
#define nsXBLCustomHandler_h__
|
||||
|
||||
#include "nsIDOMMouseListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLCustomHandler : public nsIDOMEventListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLCustomHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLCustomHandler();
|
||||
|
||||
NS_DECL_NSIDOMEVENTLISTENER
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLCustomHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLCustomHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,115 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLDragHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIJSEventListener.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLDragHandler::nsXBLDragHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLDragHandler::~nsXBLDragHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLDragHandler, nsXBLEventHandler, nsIDOMDragListener)
|
||||
|
||||
nsresult nsXBLDragHandler::DragEnter(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::dragenter, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLDragHandler::DragOver(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::dragover, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLDragHandler::DragDrop(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::dragdrop, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLDragHandler::DragExit(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::dragexit, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLDragHandler::DragGesture(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::draggesture, aMouseEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLDragHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLDragHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLDragHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLDragHandler_h__
|
||||
#define nsXBLDragHandler_h__
|
||||
|
||||
#include "nsIDOMDragListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLDragHandler : public nsIDOMDragListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLDragHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLDragHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD DragEnter(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD DragOver(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD DragExit(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD DragDrop(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD DragGesture(nsIDOMEvent* aMouseEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLDragHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLDragHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,100 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLFocusHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIJSEventListener.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLFocusHandler::nsXBLFocusHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLFocusHandler::~nsXBLFocusHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLFocusHandler, nsXBLEventHandler, nsIDOMFocusListener)
|
||||
|
||||
nsresult nsXBLFocusHandler::Focus(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::focus, aEvent);
|
||||
}
|
||||
|
||||
|
||||
nsresult nsXBLFocusHandler::Blur(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::blur, aEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLFocusHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLFocusHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLFocusHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLFocusHandler_h__
|
||||
#define nsXBLFocusHandler_h__
|
||||
|
||||
#include "nsIDOMFocusListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLFocusHandler : public nsIDOMFocusListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLFocusHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLFocusHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD Focus(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD Blur(nsIDOMEvent* aMouseEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLFocusHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLFocusHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,107 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLFormHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLFormHandler::nsXBLFormHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLFormHandler::~nsXBLFormHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLFormHandler, nsXBLEventHandler, nsIDOMFormListener)
|
||||
|
||||
nsresult nsXBLFormHandler::Submit(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::submit, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLFormHandler::Reset(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::reset, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLFormHandler::Select(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::select, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLFormHandler::Change(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::change, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLFormHandler::Input(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::input, aEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLFormHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLFormHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLFormHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLFormHandler_h__
|
||||
#define nsXBLFormHandler_h__
|
||||
|
||||
#include "nsIDOMFormListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLFormHandler : public nsIDOMFormListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLFormHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLFormHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD Submit(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Reset(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Change(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Select(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Input(nsIDOMEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLFormHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLFormHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,104 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLKeyHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIJSEventListener.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLKeyHandler::nsXBLKeyHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLKeyHandler::~nsXBLKeyHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLKeyHandler, nsXBLEventHandler, nsIDOMKeyListener)
|
||||
|
||||
nsresult nsXBLKeyHandler::KeyUp(nsIDOMEvent* aKeyEvent)
|
||||
{
|
||||
return DoKey(nsXBLAtoms::keyup, aKeyEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLKeyHandler::KeyDown(nsIDOMEvent* aKeyEvent)
|
||||
{
|
||||
return DoKey(nsXBLAtoms::keydown, aKeyEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLKeyHandler::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
{
|
||||
return DoKey(nsXBLAtoms::keypress, aKeyEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLKeyHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLKeyHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLKeyHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLKeyHandler_h__
|
||||
#define nsXBLKeyHandler_h__
|
||||
|
||||
#include "nsIDOMKeyListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIDOMKeyEvent;
|
||||
class nsIDOMMouseEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLKeyHandler : public nsIDOMKeyListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLKeyHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
|
||||
virtual ~nsXBLKeyHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD KeyUp(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD KeyDown(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD KeyPress(nsIDOMEvent* aMouseEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLKeyHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLKeyHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,102 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLLoadHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLLoadHandler::nsXBLLoadHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLLoadHandler::~nsXBLLoadHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLLoadHandler, nsXBLEventHandler, nsIDOMLoadListener)
|
||||
|
||||
nsresult nsXBLLoadHandler::Load(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::load, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLLoadHandler::Unload(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::unload, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLLoadHandler::Error(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::error, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLLoadHandler::Abort(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::abort, aEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLLoadHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLLoadHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLLoadHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLLoadHandler_h__
|
||||
#define nsXBLLoadHandler_h__
|
||||
|
||||
#include "nsIDOMLoadListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLLoadHandler : public nsIDOMLoadListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLLoadHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLLoadHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD Load(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Unload(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Abort(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Error(nsIDOMEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLLoadHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLLoadHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,120 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLMouseHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIJSEventListener.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLMouseHandler::nsXBLMouseHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLMouseHandler::~nsXBLMouseHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLMouseHandler, nsXBLEventHandler, nsIDOMMouseListener)
|
||||
|
||||
nsresult nsXBLMouseHandler::MouseDown(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::mousedown, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMouseHandler::MouseUp(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::mouseup, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMouseHandler::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::click, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMouseHandler::MouseDblClick(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::dblclick, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMouseHandler::MouseOver(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::mouseover, aMouseEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMouseHandler::MouseOut(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::mouseout, aMouseEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLMouseHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLMouseHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLMouseHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLMouseHandler_h__
|
||||
#define nsXBLMouseHandler_h__
|
||||
|
||||
#include "nsIDOMMouseListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIDOMMouseEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLMouseHandler : public nsIDOMMouseListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLMouseHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLMouseHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD MouseDown(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD MouseUp(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD MouseClick(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD MouseDblClick(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD MouseOver(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD MouseOut(nsIDOMEvent* aMouseEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLMouseHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLMouseHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,96 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLMouseMotionHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIJSEventListener.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLMouseMotionHandler::nsXBLMouseMotionHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLMouseMotionHandler::~nsXBLMouseMotionHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLMouseMotionHandler, nsXBLEventHandler, nsIDOMMouseMotionListener)
|
||||
|
||||
nsresult nsXBLMouseMotionHandler::MouseMove(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
return DoMouse(nsXBLAtoms::mousemove, aMouseEvent);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLMouseMotionHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLMouseMotionHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLMouseMotionHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLMouseMotionHandler_h__
|
||||
#define nsXBLMouseMotionHandler_h__
|
||||
|
||||
#include "nsIDOMMouseMotionListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIDOMMouseEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLMouseMotionHandler : public nsIDOMMouseMotionListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLMouseMotionHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLMouseMotionHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD MouseMove(nsIDOMEvent* aMouseEvent);
|
||||
NS_IMETHOD DragMove(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
// XXX Dead event?
|
||||
return NS_OK;
|
||||
};
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLMouseMotionHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLMouseMotionHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,117 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLMutationHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLMutationHandler::nsXBLMutationHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLMutationHandler::~nsXBLMutationHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLMutationHandler, nsXBLEventHandler, nsIDOMMutationListener)
|
||||
|
||||
nsresult nsXBLMutationHandler::SubtreeModified(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::DOMSubtreeModified, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMutationHandler::AttrModified(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::DOMAttrModified, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMutationHandler::CharacterDataModified(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::DOMCharacterDataModified, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMutationHandler::NodeInserted(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::DOMNodeInserted, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMutationHandler::NodeRemoved(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::DOMNodeRemoved, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMutationHandler::NodeInsertedIntoDocument(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::DOMNodeInsertedIntoDocument, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLMutationHandler::NodeRemovedFromDocument(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::DOMNodeRemovedFromDocument, aEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLMutationHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLMutationHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLMutationHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLMutationHandler_h__
|
||||
#define nsXBLMutationHandler_h__
|
||||
|
||||
#include "nsIDOMMutationListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLMutationHandler : public nsIDOMMutationListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLMutationHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLMutationHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD SubtreeModified(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD AttrModified(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD CharacterDataModified(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD NodeInserted(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD NodeRemoved(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD NodeInsertedIntoDocument(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD NodeRemovedFromDocument(nsIDOMEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLMutationHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLMutationHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,98 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLScrollHandler.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
nsXBLScrollHandler::nsXBLScrollHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLScrollHandler::~nsXBLScrollHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLScrollHandler, nsXBLEventHandler, nsIDOMScrollListener)
|
||||
|
||||
nsresult nsXBLScrollHandler::Overflow(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::overflow, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLScrollHandler::Underflow(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::underflow, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLScrollHandler::OverflowChanged(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::overflowchanged, aEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLScrollHandler(nsIDOMEventReceiver* aRec,
|
||||
nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLScrollHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLScrollHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLScrollHandler_h__
|
||||
#define nsXBLScrollHandler_h__
|
||||
|
||||
#include "nsIDOMScrollListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLScrollHandler : public nsIDOMScrollListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLScrollHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLScrollHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD Overflow(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Underflow(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD OverflowChanged(nsIDOMEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLScrollHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLScrollHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
@ -1,129 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsXBLPrototypeHandler.h"
|
||||
#include "nsXBLXULHandler.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIJSEventListener.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIDOMNSHTMLTextAreaElement.h"
|
||||
#include "nsIDOMNSHTMLInputElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsXBLBinding.h"
|
||||
#include "nsIPrivateDOMEvent.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsXBLAtoms.h"
|
||||
|
||||
nsXBLXULHandler::nsXBLXULHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler)
|
||||
: nsXBLEventHandler(aReceiver, aHandler)
|
||||
{
|
||||
}
|
||||
|
||||
nsXBLXULHandler::~nsXBLXULHandler()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsXBLXULHandler, nsXBLEventHandler, nsIDOMXULListener)
|
||||
|
||||
nsresult nsXBLXULHandler::Command(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::command, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLXULHandler::PopupShowing(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::popupshowing, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLXULHandler::PopupShown(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::popupshown, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLXULHandler::PopupHiding(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::popuphiding, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLXULHandler::PopupHidden(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::popuphidden, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLXULHandler::Close(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::close, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLXULHandler::Broadcast(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::broadcast, aEvent);
|
||||
}
|
||||
|
||||
nsresult nsXBLXULHandler::CommandUpdate(nsIDOMEvent* aEvent)
|
||||
{
|
||||
return DoGeneric(nsXBLAtoms::commandupdate, aEvent);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
NS_NewXBLXULHandler(nsIDOMEventReceiver* aRec, nsXBLPrototypeHandler* aHandler,
|
||||
nsXBLXULHandler** aResult)
|
||||
{
|
||||
*aResult = new nsXBLXULHandler(aRec, aHandler);
|
||||
if (!*aResult)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsXBLXULHandler_h__
|
||||
#define nsXBLXULHandler_h__
|
||||
|
||||
#include "nsIDOMXULListener.h"
|
||||
#include "nsXBLEventHandler.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsIDOMUIEvent;
|
||||
class nsIAtom;
|
||||
class nsIController;
|
||||
class nsXBLPrototypeHandler;
|
||||
|
||||
class nsXBLXULHandler : public nsIDOMXULListener,
|
||||
public nsXBLEventHandler
|
||||
{
|
||||
public:
|
||||
nsXBLXULHandler(nsIDOMEventReceiver* aReceiver,
|
||||
nsXBLPrototypeHandler* aHandler);
|
||||
virtual ~nsXBLXULHandler();
|
||||
|
||||
// nsIDOMetc.
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; };
|
||||
|
||||
NS_IMETHOD PopupShowing(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD PopupShown(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD PopupHiding(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD PopupHidden(nsIDOMEvent* aEvent);
|
||||
|
||||
NS_IMETHOD Close(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Command(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD Broadcast(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD CommandUpdate(nsIDOMEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
protected:
|
||||
// Members
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLXULHandler(nsIDOMEventReceiver* aEventReceiver,
|
||||
nsXBLPrototypeHandler* aHandlerElement,
|
||||
nsXBLXULHandler** aResult);
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user