/work/obj-fuzz/dist/include/mozilla/dom/CaretStateChangedEventBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM CaretStateChangedEvent.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_CaretStateChangedEventBinding_h |
4 | | #define mozilla_dom_CaretStateChangedEventBinding_h |
5 | | |
6 | | #include "EventBinding.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/DOMRect.h" |
13 | | #include "mozilla/dom/Nullable.h" |
14 | | #include "mozilla/dom/PrototypeList.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | class CaretStateChangedEvent; |
20 | | struct CaretStateChangedEventAtoms; |
21 | | struct CaretStateChangedEventInitAtoms; |
22 | | class DOMRectReadOnly; |
23 | | struct NativePropertyHooks; |
24 | | class ProtoAndIfaceCache; |
25 | | |
26 | | } // namespace dom |
27 | | } // namespace mozilla |
28 | | |
29 | | namespace mozilla { |
30 | | namespace dom { |
31 | | |
32 | | enum class CaretChangedReason : uint8_t { |
33 | | Visibilitychange, |
34 | | Updateposition, |
35 | | Longpressonemptycontent, |
36 | | Taponcaret, |
37 | | Presscaret, |
38 | | Releasecaret, |
39 | | Scroll, |
40 | | EndGuard_ |
41 | | }; |
42 | | |
43 | | namespace CaretChangedReasonValues { |
44 | | extern const EnumEntry strings[8]; |
45 | | } // namespace CaretChangedReasonValues |
46 | | |
47 | | bool |
48 | | ToJSValue(JSContext* aCx, CaretChangedReason aArgument, JS::MutableHandle<JS::Value> aValue); |
49 | | |
50 | | |
51 | | struct CaretStateChangedEventInit : public EventInit |
52 | | { |
53 | | MOZ_INIT_OUTSIDE_CTOR RefPtr<mozilla::dom::DOMRectReadOnly> mBoundingClientRect; |
54 | | MOZ_INIT_OUTSIDE_CTOR bool mCaretVisible; |
55 | | MOZ_INIT_OUTSIDE_CTOR bool mCaretVisuallyVisible; |
56 | | MOZ_INIT_OUTSIDE_CTOR bool mCollapsed; |
57 | | MOZ_INIT_OUTSIDE_CTOR CaretChangedReason mReason; |
58 | | MOZ_INIT_OUTSIDE_CTOR nsString mSelectedTextContent; |
59 | | MOZ_INIT_OUTSIDE_CTOR bool mSelectionEditable; |
60 | | MOZ_INIT_OUTSIDE_CTOR bool mSelectionVisible; |
61 | | |
62 | | CaretStateChangedEventInit(); |
63 | | |
64 | | explicit inline CaretStateChangedEventInit(const FastDictionaryInitializer& ) |
65 | | : EventInit(FastDictionaryInitializer()) |
66 | 0 | { |
67 | 0 | // Do nothing here; this is used by our "Fast" subclass |
68 | 0 | } |
69 | | |
70 | | explicit inline CaretStateChangedEventInit(const CaretStateChangedEventInit& aOther) |
71 | 0 | { |
72 | 0 | *this = aOther; |
73 | 0 | } |
74 | | |
75 | | bool |
76 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
77 | | |
78 | | bool |
79 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
80 | | |
81 | | void |
82 | | TraceDictionary(JSTracer* trc); |
83 | | |
84 | | inline void |
85 | | TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags) |
86 | 0 | { |
87 | 0 | ImplCycleCollectionTraverse(aCallback, mBoundingClientRect, "mBoundingClientRect", aFlags); |
88 | 0 | } |
89 | | |
90 | | inline void |
91 | | UnlinkForCC() |
92 | 0 | { |
93 | 0 | ImplCycleCollectionUnlink(mBoundingClientRect); |
94 | 0 | } |
95 | | |
96 | | CaretStateChangedEventInit& |
97 | | operator=(const CaretStateChangedEventInit& aOther); |
98 | | |
99 | | private: |
100 | | static bool |
101 | | InitIds(JSContext* cx, CaretStateChangedEventInitAtoms* atomsCache); |
102 | | }; |
103 | | |
104 | | namespace binding_detail { |
105 | | struct FastCaretStateChangedEventInit : public CaretStateChangedEventInit |
106 | | { |
107 | | inline FastCaretStateChangedEventInit() |
108 | | : CaretStateChangedEventInit(FastDictionaryInitializer()) |
109 | 0 | { |
110 | 0 | // Doesn't matter what int we pass to the parent constructor |
111 | 0 | } |
112 | | }; |
113 | | } // namespace binding_detail |
114 | | |
115 | | |
116 | | namespace CaretStateChangedEvent_Binding { |
117 | | |
118 | | typedef mozilla::dom::CaretStateChangedEvent NativeType; |
119 | | |
120 | | bool |
121 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
122 | | |
123 | | const JSClass* |
124 | | GetJSClass(); |
125 | | |
126 | | bool |
127 | | Wrap(JSContext* aCx, mozilla::dom::CaretStateChangedEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
128 | | |
129 | | template <class T> |
130 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
131 | 0 | { |
132 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
133 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
134 | 0 | } |
135 | | |
136 | | // We declare this as an array so that retrieving a pointer to this |
137 | | // binding's property hooks only requires compile/link-time resolvable |
138 | | // address arithmetic. Declaring it as a pointer instead would require |
139 | | // doing a run-time load to fetch a pointer to this binding's property |
140 | | // hooks. And then structures which embedded a pointer to this structure |
141 | | // would require a run-time load for proper initialization, which would |
142 | | // then induce static constructors. Lots of static constructors. |
143 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
144 | | |
145 | | void |
146 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
147 | | |
148 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
149 | 0 | { |
150 | 0 | /* Get the interface prototype object for this class. This will create the |
151 | 0 | object as needed. */ |
152 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::CaretStateChangedEvent, |
153 | 0 | &CreateInterfaceObjects, |
154 | 0 | /* aDefineOnGlobal = */ true); |
155 | 0 |
|
156 | 0 | } |
157 | | |
158 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
159 | 0 | { |
160 | 0 | /* Get the interface object for this class. This will create the object as |
161 | 0 | needed. */ |
162 | 0 |
|
163 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::CaretStateChangedEvent, |
164 | 0 | &CreateInterfaceObjects, |
165 | 0 | aDefineOnGlobal); |
166 | 0 | } |
167 | | |
168 | | JSObject* |
169 | | GetConstructorObject(JSContext* aCx); |
170 | | |
171 | | } // namespace CaretStateChangedEvent_Binding |
172 | | |
173 | | |
174 | | |
175 | | } // namespace dom |
176 | | } // namespace mozilla |
177 | | |
178 | | #endif // mozilla_dom_CaretStateChangedEventBinding_h |