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