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/. */
7 #ifndef mozilla_dom_MouseScrollEvent_h_
8 #define mozilla_dom_MouseScrollEvent_h_
10 #include "mozilla/dom/MouseEvent.h"
11 #include "mozilla/dom/MouseScrollEventBinding.h"
13 namespace mozilla::dom
{
15 class MouseScrollEvent
: public MouseEvent
{
17 MouseScrollEvent(EventTarget
* aOwner
, nsPresContext
* aPresContext
,
18 WidgetMouseScrollEvent
* aEvent
);
20 NS_INLINE_DECL_REFCOUNTING_INHERITED(MouseScrollEvent
, MouseEvent
)
22 virtual JSObject
* WrapObjectInternal(
23 JSContext
* aCx
, JS::Handle
<JSObject
*> aGivenProto
) override
{
24 return MouseScrollEvent_Binding::Wrap(aCx
, this, aGivenProto
);
29 void InitMouseScrollEvent(const nsAString
& aType
, bool aCanBubble
,
30 bool aCancelable
, nsGlobalWindowInner
* aView
,
31 int32_t aDetail
, int32_t aScreenX
, int32_t aScreenY
,
32 int32_t aClientX
, int32_t aClientY
, bool aCtrlKey
,
33 bool aAltKey
, bool aShiftKey
, bool aMetaKey
,
34 uint16_t aButton
, EventTarget
* aRelatedTarget
,
38 ~MouseScrollEvent() = default;
41 } // namespace mozilla::dom
43 already_AddRefed
<mozilla::dom::MouseScrollEvent
> NS_NewDOMMouseScrollEvent(
44 mozilla::dom::EventTarget
* aOwner
, nsPresContext
* aPresContext
,
45 mozilla::WidgetMouseScrollEvent
* aEvent
);
47 #endif // mozilla_dom_MouseScrollEvent_h_