Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=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
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef mozilla_dom_MouseScrollEvent_h_
8 : #define mozilla_dom_MouseScrollEvent_h_
9 :
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 : {
18 : public:
19 : MouseScrollEvent(EventTarget* aOwner,
20 : nsPresContext* aPresContext,
21 : WidgetMouseScrollEvent* aEvent);
22 :
23 : NS_DECL_ISUPPORTS_INHERITED
24 :
25 : // Forward to base class
26 0 : NS_FORWARD_TO_MOUSEEVENT
27 :
28 0 : virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
29 : {
30 0 : return MouseScrollEventBinding::Wrap(aCx, this, aGivenProto);
31 : }
32 :
33 : int32_t Axis();
34 :
35 : void InitMouseScrollEvent(const nsAString& aType, bool aCanBubble,
36 : bool aCancelable, nsGlobalWindow* aView,
37 : int32_t aDetail, int32_t aScreenX, int32_t aScreenY,
38 : int32_t aClientX, int32_t aClientY,
39 : bool aCtrlKey, bool aAltKey, bool aShiftKey,
40 : bool aMetaKey, uint16_t aButton,
41 : EventTarget* aRelatedTarget,
42 : int32_t aAxis);
43 :
44 : protected:
45 0 : ~MouseScrollEvent() {}
46 : };
47 :
48 : } // namespace dom
49 : } // namespace mozilla
50 :
51 : already_AddRefed<mozilla::dom::MouseScrollEvent>
52 : NS_NewDOMMouseScrollEvent(mozilla::dom::EventTarget* aOwner,
53 : nsPresContext* aPresContext,
54 : mozilla::WidgetMouseScrollEvent* aEvent);
55 :
56 : #endif // mozilla_dom_MouseScrollEvent_h_
|