Line data Source code
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 "js/RootingAPI.h"
8 : #include "jspubtd.h"
9 : #include "mozilla/ErrorResult.h"
10 : #include "mozilla/dom/BindingDeclarations.h"
11 : #include "mozilla/dom/Gamepad.h"
12 : #include "mozilla/dom/Nullable.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : class Gamepad;
18 : class GamepadAxisMoveEvent;
19 : struct GamepadAxisMoveEventAtoms;
20 : struct GamepadAxisMoveEventInitAtoms;
21 : struct NativePropertyHooks;
22 : class ProtoAndIfaceCache;
23 :
24 : } // namespace dom
25 : } // namespace mozilla
26 :
27 : namespace mozilla {
28 : namespace dom {
29 :
30 0 : struct GamepadAxisMoveEventInit : public GamepadEventInit
31 : {
32 : MOZ_INIT_OUTSIDE_CTOR uint32_t mAxis;
33 : MOZ_INIT_OUTSIDE_CTOR double mValue;
34 :
35 : GamepadAxisMoveEventInit();
36 :
37 0 : explicit inline GamepadAxisMoveEventInit(const FastDictionaryInitializer& )
38 0 : : GamepadEventInit(FastDictionaryInitializer())
39 : {
40 : // Do nothing here; this is used by our "Fast" subclass
41 0 : }
42 :
43 : explicit inline GamepadAxisMoveEventInit(const GamepadAxisMoveEventInit& aOther)
44 : {
45 : *this = aOther;
46 : }
47 :
48 : bool
49 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
50 :
51 : bool
52 : Init(const nsAString& aJSON);
53 :
54 : bool
55 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
56 :
57 : bool
58 : ToJSON(nsAString& aJSON) const;
59 :
60 : void
61 : TraceDictionary(JSTracer* trc);
62 :
63 : GamepadAxisMoveEventInit&
64 : operator=(const GamepadAxisMoveEventInit& aOther);
65 :
66 : private:
67 : static bool
68 : InitIds(JSContext* cx, GamepadAxisMoveEventInitAtoms* atomsCache);
69 : };
70 :
71 : namespace binding_detail {
72 0 : struct FastGamepadAxisMoveEventInit : public GamepadAxisMoveEventInit
73 : {
74 0 : inline FastGamepadAxisMoveEventInit()
75 0 : : GamepadAxisMoveEventInit(FastDictionaryInitializer())
76 : {
77 : // Doesn't matter what int we pass to the parent constructor
78 0 : }
79 : };
80 : } // namespace binding_detail
81 :
82 :
83 : namespace GamepadAxisMoveEventBinding {
84 :
85 : typedef mozilla::dom::GamepadAxisMoveEvent NativeType;
86 :
87 : bool
88 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
89 :
90 : JSObject*
91 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
92 :
93 : const JSClass*
94 : GetJSClass();
95 :
96 : bool
97 : Wrap(JSContext* aCx, mozilla::dom::GamepadAxisMoveEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
98 :
99 : template <class T>
100 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
101 : {
102 0 : JS::Rooted<JSObject*> reflector(aCx);
103 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
104 : }
105 :
106 : // We declare this as an array so that retrieving a pointer to this
107 : // binding's property hooks only requires compile/link-time resolvable
108 : // address arithmetic. Declaring it as a pointer instead would require
109 : // doing a run-time load to fetch a pointer to this binding's property
110 : // hooks. And then structures which embedded a pointer to this structure
111 : // would require a run-time load for proper initialization, which would
112 : // then induce static constructors. Lots of static constructors.
113 : extern const NativePropertyHooks sNativePropertyHooks[];
114 :
115 : void
116 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
117 :
118 : JS::Handle<JSObject*>
119 : GetProtoObjectHandle(JSContext* aCx);
120 :
121 : JS::Handle<JSObject*>
122 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
123 :
124 : JSObject*
125 : GetConstructorObject(JSContext* aCx);
126 :
127 : } // namespace GamepadAxisMoveEventBinding
128 :
129 :
130 :
131 : } // namespace dom
132 : } // namespace mozilla
133 :
134 : #endif // mozilla_dom_GamepadAxisMoveEventBinding_h
|