Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM MozTimeManager.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_MozTimeManagerBinding_h
4 : #define mozilla_dom_MozTimeManagerBinding_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 : struct NativePropertyHooks;
16 : class ProtoAndIfaceCache;
17 :
18 : namespace time {
19 :
20 : class TimeManager;
21 : struct TimeManagerAtoms;
22 :
23 : } // namespace time
24 :
25 : } // namespace dom
26 : } // namespace mozilla
27 :
28 : namespace mozilla {
29 : namespace dom {
30 :
31 : namespace MozTimeManagerBinding {
32 :
33 : typedef mozilla::dom::time::TimeManager NativeType;
34 :
35 : bool
36 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
37 :
38 : JSObject*
39 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
40 :
41 : const JSClass*
42 : GetJSClass();
43 :
44 : bool
45 : Wrap(JSContext* aCx, mozilla::dom::time::TimeManager* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
46 :
47 : template <class T>
48 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
49 : {
50 0 : JS::Rooted<JSObject*> reflector(aCx);
51 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
52 : }
53 :
54 : // We declare this as an array so that retrieving a pointer to this
55 : // binding's property hooks only requires compile/link-time resolvable
56 : // address arithmetic. Declaring it as a pointer instead would require
57 : // doing a run-time load to fetch a pointer to this binding's property
58 : // hooks. And then structures which embedded a pointer to this structure
59 : // would require a run-time load for proper initialization, which would
60 : // then induce static constructors. Lots of static constructors.
61 : extern const NativePropertyHooks sNativePropertyHooks[];
62 :
63 : void
64 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
65 :
66 : JS::Handle<JSObject*>
67 : GetProtoObjectHandle(JSContext* aCx);
68 :
69 : JS::Handle<JSObject*>
70 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
71 :
72 : JSObject*
73 : GetConstructorObject(JSContext* aCx);
74 :
75 : } // namespace MozTimeManagerBinding
76 :
77 :
78 :
79 : } // namespace dom
80 : } // namespace mozilla
81 :
82 : #endif // mozilla_dom_MozTimeManagerBinding_h
|