Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/SimpleGestureEventBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM SimpleGestureEvent.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_SimpleGestureEventBinding_h
4
#define mozilla_dom_SimpleGestureEventBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "js/RootingAPI.h"
8
#include "jspubtd.h"
9
#include "mozilla/ErrorResult.h"
10
#include "mozilla/dom/BindingDeclarations.h"
11
#include "mozilla/dom/Nullable.h"
12
#include "mozilla/dom/PrototypeList.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
struct NativePropertyHooks;
18
class ProtoAndIfaceCache;
19
class SimpleGestureEvent;
20
struct SimpleGestureEventAtoms;
21
22
} // namespace dom
23
} // namespace mozilla
24
25
namespace mozilla {
26
namespace dom {
27
28
namespace SimpleGestureEvent_Binding {
29
30
  typedef mozilla::dom::SimpleGestureEvent NativeType;
31
32
  static const uint32_t DIRECTION_UP = 1;
33
  static const uint32_t DIRECTION_DOWN = 2;
34
  static const uint32_t DIRECTION_LEFT = 4;
35
  static const uint32_t DIRECTION_RIGHT = 8;
36
  static const uint32_t ROTATION_COUNTERCLOCKWISE = 1;
37
  static const uint32_t ROTATION_CLOCKWISE = 2;
38
  bool
39
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
40
41
  const JSClass*
42
  GetJSClass();
43
44
  bool
45
  Wrap(JSContext* aCx, mozilla::dom::SimpleGestureEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
46
47
  template <class T>
48
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
49
0
  {
50
0
    JS::Rooted<JSObject*> reflector(aCx);
51
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
52
0
  }
53
54
  // We declare this as an array so that retrieving a pointer to this
55
  // binding's property hooks only requires compile/link-time resolvable
56
  // address arithmetic.  Declaring it as a pointer instead would require
57
  // doing a run-time load to fetch a pointer to this binding's property
58
  // hooks.  And then structures which embedded a pointer to this structure
59
  // would require a run-time load for proper initialization, which would
60
  // then induce static constructors.  Lots of static constructors.
61
  extern const NativePropertyHooks sNativePropertyHooks[];
62
63
  void
64
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
65
66
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
67
0
  {
68
0
    /* Get the interface prototype object for this class.  This will create the
69
0
       object as needed. */
70
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::SimpleGestureEvent,
71
0
                                       &CreateInterfaceObjects,
72
0
                                       /* aDefineOnGlobal = */ true);
73
0
74
0
  }
75
76
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
77
0
  {
78
0
    /* Get the interface object for this class.  This will create the object as
79
0
       needed. */
80
0
81
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::SimpleGestureEvent,
82
0
                                       &CreateInterfaceObjects,
83
0
                                       aDefineOnGlobal);
84
0
  }
85
86
  JSObject*
87
  GetConstructorObject(JSContext* aCx);
88
89
} // namespace SimpleGestureEvent_Binding
90
91
92
93
} // namespace dom
94
} // namespace mozilla
95
96
#endif // mozilla_dom_SimpleGestureEventBinding_h