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