Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/GamepadAxisMoveEventBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM GamepadAxisMoveEvent.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_GamepadAxisMoveEventBinding_h
4
#define mozilla_dom_GamepadAxisMoveEventBinding_h
5
6
#include "GamepadEventBinding.h"
7
#include "GeckoProfiler.h"
8
#include "js/RootingAPI.h"
9
#include "jspubtd.h"
10
#include "mozilla/ErrorResult.h"
11
#include "mozilla/dom/BindingDeclarations.h"
12
#include "mozilla/dom/Gamepad.h"
13
#include "mozilla/dom/Nullable.h"
14
#include "mozilla/dom/PrototypeList.h"
15
16
namespace mozilla {
17
namespace dom {
18
19
class Gamepad;
20
class GamepadAxisMoveEvent;
21
struct GamepadAxisMoveEventAtoms;
22
struct GamepadAxisMoveEventInitAtoms;
23
struct NativePropertyHooks;
24
class ProtoAndIfaceCache;
25
26
} // namespace dom
27
} // namespace mozilla
28
29
namespace mozilla {
30
namespace dom {
31
32
struct GamepadAxisMoveEventInit : public GamepadEventInit
33
{
34
  MOZ_INIT_OUTSIDE_CTOR uint32_t mAxis;
35
  MOZ_INIT_OUTSIDE_CTOR double mValue;
36
37
  GamepadAxisMoveEventInit();
38
39
  explicit inline GamepadAxisMoveEventInit(const FastDictionaryInitializer& )
40
    : GamepadEventInit(FastDictionaryInitializer())
41
0
  {
42
0
    // Do nothing here; this is used by our "Fast" subclass
43
0
  }
44
45
  explicit inline GamepadAxisMoveEventInit(const GamepadAxisMoveEventInit& aOther)
46
0
  {
47
0
    *this = aOther;
48
0
  }
49
50
  bool
51
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
52
53
  bool
54
  Init(const nsAString& aJSON);
55
56
  bool
57
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
58
59
  bool
60
  ToJSON(nsAString& aJSON) const;
61
62
  void
63
  TraceDictionary(JSTracer* trc);
64
65
  inline void
66
  TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags)
67
0
  {
68
0
    GamepadEventInit::TraverseForCC(aCallback, aFlags);
69
0
  }
70
71
  inline void
72
  UnlinkForCC()
73
0
  {
74
0
    GamepadEventInit::UnlinkForCC();
75
0
  }
76
77
  GamepadAxisMoveEventInit&
78
  operator=(const GamepadAxisMoveEventInit& aOther);
79
80
private:
81
  static bool
82
  InitIds(JSContext* cx, GamepadAxisMoveEventInitAtoms* atomsCache);
83
};
84
85
namespace binding_detail {
86
struct FastGamepadAxisMoveEventInit : public GamepadAxisMoveEventInit
87
{
88
  inline FastGamepadAxisMoveEventInit()
89
    : GamepadAxisMoveEventInit(FastDictionaryInitializer())
90
0
  {
91
0
    // Doesn't matter what int we pass to the parent constructor
92
0
  }
93
};
94
} // namespace binding_detail
95
96
97
namespace GamepadAxisMoveEvent_Binding {
98
99
  typedef mozilla::dom::GamepadAxisMoveEvent NativeType;
100
101
  bool
102
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
103
104
  const JSClass*
105
  GetJSClass();
106
107
  bool
108
  Wrap(JSContext* aCx, mozilla::dom::GamepadAxisMoveEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
109
110
  template <class T>
111
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
112
0
  {
113
0
    JS::Rooted<JSObject*> reflector(aCx);
114
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
115
0
  }
116
117
  // We declare this as an array so that retrieving a pointer to this
118
  // binding's property hooks only requires compile/link-time resolvable
119
  // address arithmetic.  Declaring it as a pointer instead would require
120
  // doing a run-time load to fetch a pointer to this binding's property
121
  // hooks.  And then structures which embedded a pointer to this structure
122
  // would require a run-time load for proper initialization, which would
123
  // then induce static constructors.  Lots of static constructors.
124
  extern const NativePropertyHooks sNativePropertyHooks[];
125
126
  void
127
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
128
129
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
130
0
  {
131
0
    /* Get the interface prototype object for this class.  This will create the
132
0
       object as needed. */
133
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::GamepadAxisMoveEvent,
134
0
                                       &CreateInterfaceObjects,
135
0
                                       /* aDefineOnGlobal = */ true);
136
0
137
0
  }
138
139
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
140
0
  {
141
0
    /* Get the interface object for this class.  This will create the object as
142
0
       needed. */
143
0
144
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::GamepadAxisMoveEvent,
145
0
                                       &CreateInterfaceObjects,
146
0
                                       aDefineOnGlobal);
147
0
  }
148
149
  JSObject*
150
  GetConstructorObject(JSContext* aCx);
151
152
} // namespace GamepadAxisMoveEvent_Binding
153
154
155
156
} // namespace dom
157
} // namespace mozilla
158
159
#endif // mozilla_dom_GamepadAxisMoveEventBinding_h