Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_MouseScrollEvent_h_
7 #define mozilla_dom_MouseScrollEvent_h_
9 #include "nsIDOMMouseScrollEvent.h"
10 #include "mozilla/dom/MouseEvent.h"
11 #include "mozilla/dom/MouseScrollEventBinding.h"
13 namespace mozilla {
14 namespace dom {
16 class MouseScrollEvent : public MouseEvent,
17 public nsIDOMMouseScrollEvent
18 {
19 public:
20 MouseScrollEvent(EventTarget* aOwner,
21 nsPresContext* aPresContext,
22 WidgetMouseScrollEvent* aEvent);
24 NS_DECL_ISUPPORTS_INHERITED
26 // nsIDOMMouseScrollEvent Interface
27 NS_DECL_NSIDOMMOUSESCROLLEVENT
29 // Forward to base class
30 NS_FORWARD_TO_MOUSEEVENT
32 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
33 {
34 return MouseScrollEventBinding::Wrap(aCx, this);
35 }
37 int32_t Axis();
39 void InitMouseScrollEvent(const nsAString& aType, bool aCanBubble,
40 bool aCancelable, nsIDOMWindow* aView,
41 int32_t aDetail, int32_t aScreenX, int32_t aScreenY,
42 int32_t aClientX, int32_t aClientY,
43 bool aCtrlKey, bool aAltKey, bool aShiftKey,
44 bool aMetaKey, uint16_t aButton,
45 nsIDOMEventTarget* aRelatedTarget, int32_t aAxis,
46 ErrorResult& aRv)
47 {
48 aRv = InitMouseScrollEvent(aType, aCanBubble, aCancelable, aView,
49 aDetail, aScreenX, aScreenY, aClientX, aClientY,
50 aCtrlKey, aAltKey, aShiftKey, aMetaKey, aButton,
51 aRelatedTarget, aAxis);
52 }
53 };
55 } // namespace dom
56 } // namespace mozilla
58 #endif // mozilla_dom_MouseScrollEvent_h_