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