Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/SimpleGestureEvent.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
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef mozilla_dom_SimpleGestureEvent_h_
8
#define mozilla_dom_SimpleGestureEvent_h_
9
10
#include "mozilla/dom/MouseEvent.h"
11
#include "mozilla/dom/SimpleGestureEventBinding.h"
12
#include "mozilla/EventForwards.h"
13
14
class nsPresContext;
15
16
namespace mozilla {
17
namespace dom {
18
19
class SimpleGestureEvent : public MouseEvent
20
{
21
public:
22
  SimpleGestureEvent(EventTarget* aOwner,
23
                     nsPresContext* aPresContext,
24
                     WidgetSimpleGestureEvent* aEvent);
25
26
  NS_INLINE_DECL_REFCOUNTING_INHERITED(SimpleGestureEvent, MouseEvent)
27
28
  virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
29
0
  {
30
0
    return SimpleGestureEvent_Binding::Wrap(aCx, this, aGivenProto);
31
0
  }
32
33
  uint32_t AllowedDirections() const;
34
  void SetAllowedDirections(uint32_t aAllowedDirections);
35
  uint32_t Direction() const;
36
  double Delta() const;
37
  uint32_t ClickCount() const;
38
39
  void InitSimpleGestureEvent(const nsAString& aType,
40
                              bool aCanBubble,
41
                              bool aCancelable,
42
                              nsGlobalWindowInner* aView,
43
                              int32_t aDetail,
44
                              int32_t aScreenX,
45
                              int32_t aScreenY,
46
                              int32_t aClientX,
47
                              int32_t aClientY,
48
                              bool aCtrlKey,
49
                              bool aAltKey,
50
                              bool aShiftKey,
51
                              bool aMetaKey,
52
                              uint16_t aButton,
53
                              EventTarget* aRelatedTarget,
54
                              uint32_t aAllowedDirections,
55
                              uint32_t aDirection,
56
                              double aDelta,
57
                              uint32_t aClickCount);
58
59
protected:
60
0
  ~SimpleGestureEvent() {}
61
};
62
63
} // namespace dom
64
} // namespace mozilla
65
66
already_AddRefed<mozilla::dom::SimpleGestureEvent>
67
NS_NewDOMSimpleGestureEvent(mozilla::dom::EventTarget* aOwner,
68
                            nsPresContext* aPresContext,
69
                            mozilla::WidgetSimpleGestureEvent* aEvent);
70
71
#endif // mozilla_dom_SimpleGestureEvent_h_