2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsDOMMouseEvent_h__
|
|
|
|
#define nsDOMMouseEvent_h__
|
|
|
|
|
|
|
|
#include "nsIDOMMouseEvent.h"
|
|
|
|
#include "nsDOMUIEvent.h"
|
|
|
|
|
|
|
|
class nsEvent;
|
|
|
|
|
2008-12-11 15:55:15 -08:00
|
|
|
class nsDOMMouseEvent : public nsDOMUIEvent,
|
2011-08-26 00:43:56 -07:00
|
|
|
public nsIDOMMouseEvent
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsDOMMouseEvent(nsPresContext* aPresContext, nsInputEvent* aEvent);
|
|
|
|
virtual ~nsDOMMouseEvent();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// nsIDOMMouseEvent Interface
|
|
|
|
NS_DECL_NSIDOMMOUSEEVENT
|
2008-12-11 15:55:15 -08:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
// Forward to base class
|
|
|
|
NS_FORWARD_TO_NSDOMUIEVENT
|
|
|
|
|
2011-12-23 14:13:46 -08:00
|
|
|
virtual nsresult InitFromCtor(const nsAString& aType,
|
|
|
|
JSContext* aCx, jsval* aVal);
|
2011-08-26 00:43:49 -07:00
|
|
|
protected:
|
2007-03-22 10:30:00 -07:00
|
|
|
// Specific implementation for a mouse event.
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual nsresult Which(uint32_t* aWhich);
|
2012-04-24 20:00:01 -07:00
|
|
|
|
|
|
|
nsresult InitMouseEvent(const nsAString& aType,
|
|
|
|
bool aCanBubble,
|
|
|
|
bool aCancelable,
|
|
|
|
nsIDOMWindow* aView,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t aDetail,
|
|
|
|
int32_t aScreenX,
|
|
|
|
int32_t aScreenY,
|
|
|
|
int32_t aClientX,
|
|
|
|
int32_t aClientY,
|
|
|
|
uint16_t aButton,
|
2012-04-24 20:00:01 -07:00
|
|
|
nsIDOMEventTarget *aRelatedTarget,
|
|
|
|
const nsAString& aModifiersList);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2008-08-27 05:07:27 -07:00
|
|
|
#define NS_FORWARD_TO_NSDOMMOUSEEVENT \
|
2008-08-12 20:08:59 -07:00
|
|
|
NS_FORWARD_NSIDOMMOUSEEVENT(nsDOMMouseEvent::) \
|
|
|
|
NS_FORWARD_TO_NSDOMUIEVENT
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif // nsDOMMouseEvent_h__
|