Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/WheelEvent.h
Line
Count
Source (jump to first uncovered line)
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 file,
5
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef mozilla_dom_WheelEvent_h_
8
#define mozilla_dom_WheelEvent_h_
9
10
#include "mozilla/dom/MouseEvent.h"
11
#include "mozilla/dom/WheelEventBinding.h"
12
#include "mozilla/EventForwards.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
class WheelEvent : public MouseEvent
18
{
19
public:
20
  WheelEvent(EventTarget* aOwner,
21
             nsPresContext* aPresContext,
22
             WidgetWheelEvent* aWheelEvent);
23
24
  NS_INLINE_DECL_REFCOUNTING_INHERITED(WheelEvent, MouseEvent)
25
26
  static
27
  already_AddRefed<WheelEvent> Constructor(const GlobalObject& aGlobal,
28
                                           const nsAString& aType,
29
                                           const WheelEventInit& aParam,
30
                                           ErrorResult& aRv);
31
32
  virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
33
0
  {
34
0
    return WheelEvent_Binding::Wrap(aCx, this, aGivenProto);
35
0
  }
36
37
  // NOTE: DeltaX(), DeltaY() and DeltaZ() return CSS pixels when deltaMode is
38
  //       DOM_DELTA_PIXEL. (The internal event's delta values are device pixels
39
  //       if it's dispatched by widget)
40
  double DeltaX();
41
  double DeltaY();
42
  double DeltaZ();
43
  uint32_t DeltaMode();
44
45
  void
46
  InitWheelEvent(const nsAString& aType, bool aCanBubble, bool aCancelable,
47
                 nsGlobalWindowInner* aView, int32_t aDetail,
48
                 int32_t aScreenX, int32_t aScreenY,
49
                 int32_t aClientX, int32_t aClientY, uint16_t aButton,
50
                 EventTarget* aRelatedTarget, const nsAString& aModifiersList,
51
                 double aDeltaX, double aDeltaY, double aDeltaZ,
52
                 uint32_t aDeltaMode);
53
54
protected:
55
0
  ~WheelEvent() {}
56
57
private:
58
  int32_t mAppUnitsPerDevPixel;
59
};
60
61
} // namespace dom
62
} // namespace mozilla
63
64
already_AddRefed<mozilla::dom::WheelEvent>
65
NS_NewDOMWheelEvent(mozilla::dom::EventTarget* aOwner,
66
                    nsPresContext* aPresContext,
67
                    mozilla::WidgetWheelEvent* aEvent);
68
69
#endif // mozilla_dom_WheelEvent_h_