Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM DOMPoint.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_DOMPointBinding_h
4 : #define mozilla_dom_DOMPointBinding_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/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : class DOMPoint;
16 : struct DOMPointAtoms;
17 : struct DOMPointInitAtoms;
18 : class DOMPointReadOnly;
19 : struct DOMPointReadOnlyAtoms;
20 : struct NativePropertyHooks;
21 : class ProtoAndIfaceCache;
22 :
23 : } // namespace dom
24 : } // namespace mozilla
25 :
26 : namespace mozilla {
27 : namespace dom {
28 :
29 : struct DOMPointInit : public DictionaryBase
30 : {
31 : MOZ_INIT_OUTSIDE_CTOR double mW;
32 : MOZ_INIT_OUTSIDE_CTOR double mX;
33 : MOZ_INIT_OUTSIDE_CTOR double mY;
34 : MOZ_INIT_OUTSIDE_CTOR double mZ;
35 :
36 : DOMPointInit();
37 :
38 0 : explicit inline DOMPointInit(const FastDictionaryInitializer& )
39 0 : {
40 : // Do nothing here; this is used by our "Fast" subclass
41 0 : }
42 :
43 : explicit inline DOMPointInit(const DOMPointInit& 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 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
53 :
54 : void
55 : TraceDictionary(JSTracer* trc);
56 :
57 : DOMPointInit&
58 : operator=(const DOMPointInit& aOther);
59 :
60 : private:
61 : static bool
62 : InitIds(JSContext* cx, DOMPointInitAtoms* atomsCache);
63 : };
64 :
65 : namespace binding_detail {
66 : struct FastDOMPointInit : public DOMPointInit
67 : {
68 0 : inline FastDOMPointInit()
69 0 : : DOMPointInit(FastDictionaryInitializer())
70 : {
71 : // Doesn't matter what int we pass to the parent constructor
72 0 : }
73 : };
74 : } // namespace binding_detail
75 :
76 :
77 : namespace DOMPointBinding {
78 :
79 : typedef mozilla::dom::DOMPoint NativeType;
80 :
81 : bool
82 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
83 :
84 : JSObject*
85 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
86 :
87 : const JSClass*
88 : GetJSClass();
89 :
90 : bool
91 : Wrap(JSContext* aCx, mozilla::dom::DOMPoint* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
92 :
93 : template <class T>
94 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
95 : {
96 0 : JS::Rooted<JSObject*> reflector(aCx);
97 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
98 : }
99 :
100 : // We declare this as an array so that retrieving a pointer to this
101 : // binding's property hooks only requires compile/link-time resolvable
102 : // address arithmetic. Declaring it as a pointer instead would require
103 : // doing a run-time load to fetch a pointer to this binding's property
104 : // hooks. And then structures which embedded a pointer to this structure
105 : // would require a run-time load for proper initialization, which would
106 : // then induce static constructors. Lots of static constructors.
107 : extern const NativePropertyHooks sNativePropertyHooks[];
108 :
109 : void
110 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
111 :
112 : JS::Handle<JSObject*>
113 : GetProtoObjectHandle(JSContext* aCx);
114 :
115 : JS::Handle<JSObject*>
116 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
117 :
118 : JSObject*
119 : GetConstructorObject(JSContext* aCx);
120 :
121 : } // namespace DOMPointBinding
122 :
123 :
124 :
125 : namespace DOMPointReadOnlyBinding {
126 :
127 : typedef mozilla::dom::DOMPointReadOnly NativeType;
128 :
129 : bool
130 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
131 :
132 : JSObject*
133 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
134 :
135 : // We declare this as an array so that retrieving a pointer to this
136 : // binding's property hooks only requires compile/link-time resolvable
137 : // address arithmetic. Declaring it as a pointer instead would require
138 : // doing a run-time load to fetch a pointer to this binding's property
139 : // hooks. And then structures which embedded a pointer to this structure
140 : // would require a run-time load for proper initialization, which would
141 : // then induce static constructors. Lots of static constructors.
142 : extern const NativePropertyHooks sNativePropertyHooks[];
143 :
144 : void
145 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
146 :
147 : JS::Handle<JSObject*>
148 : GetProtoObjectHandle(JSContext* aCx);
149 :
150 : JSObject*
151 : GetProtoObject(JSContext* aCx);
152 :
153 : JS::Handle<JSObject*>
154 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
155 :
156 : JSObject*
157 : GetConstructorObject(JSContext* aCx);
158 :
159 : } // namespace DOMPointReadOnlyBinding
160 :
161 :
162 :
163 : } // namespace dom
164 : } // namespace mozilla
165 :
166 : #endif // mozilla_dom_DOMPointBinding_h
|