dom/events/MouseScrollEvent.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:2a08fa7a1e6c
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/. */
5
6 #ifndef mozilla_dom_MouseScrollEvent_h_
7 #define mozilla_dom_MouseScrollEvent_h_
8
9 #include "nsIDOMMouseScrollEvent.h"
10 #include "mozilla/dom/MouseEvent.h"
11 #include "mozilla/dom/MouseScrollEventBinding.h"
12
13 namespace mozilla {
14 namespace dom {
15
16 class MouseScrollEvent : public MouseEvent,
17 public nsIDOMMouseScrollEvent
18 {
19 public:
20 MouseScrollEvent(EventTarget* aOwner,
21 nsPresContext* aPresContext,
22 WidgetMouseScrollEvent* aEvent);
23
24 NS_DECL_ISUPPORTS_INHERITED
25
26 // nsIDOMMouseScrollEvent Interface
27 NS_DECL_NSIDOMMOUSESCROLLEVENT
28
29 // Forward to base class
30 NS_FORWARD_TO_MOUSEEVENT
31
32 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
33 {
34 return MouseScrollEventBinding::Wrap(aCx, this);
35 }
36
37 int32_t Axis();
38
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 };
54
55 } // namespace dom
56 } // namespace mozilla
57
58 #endif // mozilla_dom_MouseScrollEvent_h_

mercurial