Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM ScrollViewChangeEvent.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_ScrollViewChangeEventBinding_h
4 : #define mozilla_dom_ScrollViewChangeEventBinding_h
5 :
6 : #include "EventBinding.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 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : struct NativePropertyHooks;
17 : class ProtoAndIfaceCache;
18 : class ScrollViewChangeEvent;
19 : struct ScrollViewChangeEventAtoms;
20 : struct ScrollViewChangeEventInitAtoms;
21 :
22 : } // namespace dom
23 : } // namespace mozilla
24 :
25 : namespace mozilla {
26 : namespace dom {
27 :
28 : enum class ScrollState : uint8_t {
29 : Started,
30 : Stopped,
31 : EndGuard_
32 : };
33 :
34 : namespace ScrollStateValues {
35 : extern const EnumEntry strings[3];
36 : } // namespace ScrollStateValues
37 :
38 : bool
39 : ToJSValue(JSContext* aCx, ScrollState aArgument, JS::MutableHandle<JS::Value> aValue);
40 :
41 :
42 : struct ScrollViewChangeEventInit : public EventInit
43 : {
44 : MOZ_INIT_OUTSIDE_CTOR ScrollState mState;
45 :
46 : ScrollViewChangeEventInit();
47 :
48 0 : explicit inline ScrollViewChangeEventInit(const FastDictionaryInitializer& )
49 0 : : EventInit(FastDictionaryInitializer())
50 : {
51 : // Do nothing here; this is used by our "Fast" subclass
52 0 : }
53 :
54 : explicit inline ScrollViewChangeEventInit(const ScrollViewChangeEventInit& aOther)
55 : {
56 : *this = aOther;
57 : }
58 :
59 : bool
60 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
61 :
62 : bool
63 : Init(const nsAString& aJSON);
64 :
65 : bool
66 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
67 :
68 : bool
69 : ToJSON(nsAString& aJSON) const;
70 :
71 : void
72 : TraceDictionary(JSTracer* trc);
73 :
74 : ScrollViewChangeEventInit&
75 : operator=(const ScrollViewChangeEventInit& aOther);
76 :
77 : private:
78 : static bool
79 : InitIds(JSContext* cx, ScrollViewChangeEventInitAtoms* atomsCache);
80 : };
81 :
82 : namespace binding_detail {
83 : struct FastScrollViewChangeEventInit : public ScrollViewChangeEventInit
84 : {
85 0 : inline FastScrollViewChangeEventInit()
86 0 : : ScrollViewChangeEventInit(FastDictionaryInitializer())
87 : {
88 : // Doesn't matter what int we pass to the parent constructor
89 0 : }
90 : };
91 : } // namespace binding_detail
92 :
93 :
94 : namespace ScrollViewChangeEventBinding {
95 :
96 : typedef mozilla::dom::ScrollViewChangeEvent NativeType;
97 :
98 : bool
99 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
100 :
101 : JSObject*
102 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
103 :
104 : const JSClass*
105 : GetJSClass();
106 :
107 : bool
108 : Wrap(JSContext* aCx, mozilla::dom::ScrollViewChangeEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
109 :
110 : template <class T>
111 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
112 : {
113 0 : JS::Rooted<JSObject*> reflector(aCx);
114 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
115 : }
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 : JS::Handle<JSObject*>
130 : GetProtoObjectHandle(JSContext* aCx);
131 :
132 : JS::Handle<JSObject*>
133 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
134 :
135 : JSObject*
136 : GetConstructorObject(JSContext* aCx);
137 :
138 : } // namespace ScrollViewChangeEventBinding
139 :
140 :
141 :
142 : } // namespace dom
143 : } // namespace mozilla
144 :
145 : #endif // mozilla_dom_ScrollViewChangeEventBinding_h
|