Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM HTMLElement.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_HTMLElementBinding_h
4 : #define mozilla_dom_HTMLElementBinding_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 : class nsGenericHTMLElement;
13 : struct nsGenericHTMLElementAtoms;
14 :
15 : namespace mozilla {
16 : namespace dom {
17 :
18 : class HTMLUnknownElement;
19 : struct HTMLUnknownElementAtoms;
20 : struct NativePropertyHooks;
21 : class ProtoAndIfaceCache;
22 :
23 : } // namespace dom
24 : } // namespace mozilla
25 :
26 : namespace mozilla {
27 : namespace dom {
28 :
29 : namespace HTMLElementBinding {
30 :
31 : typedef nsGenericHTMLElement NativeType;
32 :
33 : JSObject*
34 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
35 :
36 : const JSClass*
37 : GetJSClass();
38 :
39 : bool
40 : Wrap(JSContext* aCx, nsGenericHTMLElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
41 :
42 : template <class T>
43 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
44 : {
45 0 : JS::Rooted<JSObject*> reflector(aCx);
46 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
47 : }
48 :
49 : // We declare this as an array so that retrieving a pointer to this
50 : // binding's property hooks only requires compile/link-time resolvable
51 : // address arithmetic. Declaring it as a pointer instead would require
52 : // doing a run-time load to fetch a pointer to this binding's property
53 : // hooks. And then structures which embedded a pointer to this structure
54 : // would require a run-time load for proper initialization, which would
55 : // then induce static constructors. Lots of static constructors.
56 : extern const NativePropertyHooks sNativePropertyHooks[];
57 :
58 : void
59 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
60 :
61 : JS::Handle<JSObject*>
62 : GetProtoObjectHandle(JSContext* aCx);
63 :
64 : JSObject*
65 : GetProtoObject(JSContext* aCx);
66 :
67 : JS::Handle<JSObject*>
68 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
69 :
70 : JSObject*
71 : GetConstructorObject(JSContext* aCx);
72 :
73 : } // namespace HTMLElementBinding
74 :
75 :
76 :
77 : namespace HTMLUnknownElementBinding {
78 :
79 : typedef mozilla::dom::HTMLUnknownElement NativeType;
80 :
81 : JSObject*
82 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
83 :
84 : const JSClass*
85 : GetJSClass();
86 :
87 : bool
88 : Wrap(JSContext* aCx, mozilla::dom::HTMLUnknownElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
89 :
90 : template <class T>
91 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
92 : {
93 0 : JS::Rooted<JSObject*> reflector(aCx);
94 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
95 : }
96 :
97 : // We declare this as an array so that retrieving a pointer to this
98 : // binding's property hooks only requires compile/link-time resolvable
99 : // address arithmetic. Declaring it as a pointer instead would require
100 : // doing a run-time load to fetch a pointer to this binding's property
101 : // hooks. And then structures which embedded a pointer to this structure
102 : // would require a run-time load for proper initialization, which would
103 : // then induce static constructors. Lots of static constructors.
104 : extern const NativePropertyHooks sNativePropertyHooks[];
105 :
106 : void
107 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
108 :
109 : JS::Handle<JSObject*>
110 : GetProtoObjectHandle(JSContext* aCx);
111 :
112 : JS::Handle<JSObject*>
113 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
114 :
115 : JSObject*
116 : GetConstructorObject(JSContext* aCx);
117 :
118 : } // namespace HTMLUnknownElementBinding
119 :
120 :
121 :
122 : } // namespace dom
123 : } // namespace mozilla
124 :
125 : #endif // mozilla_dom_HTMLElementBinding_h
|