1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_WheelEvent_h_
8 #define mozilla_dom_WheelEvent_h_
10 #include "nsIDOMWheelEvent.h"
11 #include "mozilla/dom/MouseEvent.h"
12 #include "mozilla/dom/WheelEventBinding.h"
13 #include "mozilla/EventForwards.h"
18 class WheelEvent
: public MouseEvent
,
19 public nsIDOMWheelEvent
22 WheelEvent(EventTarget
* aOwner
,
23 nsPresContext
* aPresContext
,
24 WidgetWheelEvent
* aWheelEvent
);
26 NS_DECL_ISUPPORTS_INHERITED
28 // nsIDOMWheelEvent Interface
29 NS_DECL_NSIDOMWHEELEVENT
31 // Forward to base class
32 NS_FORWARD_TO_MOUSEEVENT
35 already_AddRefed
<WheelEvent
> Constructor(const GlobalObject
& aGlobal
,
36 const nsAString
& aType
,
37 const WheelEventInit
& aParam
,
40 virtual JSObject
* WrapObject(JSContext
* aCx
) MOZ_OVERRIDE
42 return WheelEventBinding::Wrap(aCx
, this);
45 // NOTE: DeltaX(), DeltaY() and DeltaZ() return CSS pixels when deltaMode is
46 // DOM_DELTA_PIXEL. (The internal event's delta values are device pixels
47 // if it's dispatched by widget)
57 int32_t mAppUnitsPerDevPixel
;
61 } // namespace mozilla
63 #endif // mozilla_dom_WheelEvent_h_