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