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