Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM Touch.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_TouchBinding_h
4 : #define mozilla_dom_TouchBinding_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/EventTarget.h"
11 : #include "mozilla/dom/Nullable.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class EventTarget;
17 : struct NativePropertyHooks;
18 : class ProtoAndIfaceCache;
19 : class Touch;
20 : struct TouchAtoms;
21 : struct TouchInitAtoms;
22 :
23 : } // namespace dom
24 : } // namespace mozilla
25 :
26 : namespace mozilla {
27 : namespace dom {
28 :
29 0 : struct TouchInit : public DictionaryBase
30 : {
31 : MOZ_INIT_OUTSIDE_CTOR int32_t mClientX;
32 : MOZ_INIT_OUTSIDE_CTOR int32_t mClientY;
33 : MOZ_INIT_OUTSIDE_CTOR float mForce;
34 : MOZ_INIT_OUTSIDE_CTOR int32_t mIdentifier;
35 : MOZ_INIT_OUTSIDE_CTOR int32_t mPageX;
36 : MOZ_INIT_OUTSIDE_CTOR int32_t mPageY;
37 : MOZ_INIT_OUTSIDE_CTOR float mRadiusX;
38 : MOZ_INIT_OUTSIDE_CTOR float mRadiusY;
39 : MOZ_INIT_OUTSIDE_CTOR float mRotationAngle;
40 : MOZ_INIT_OUTSIDE_CTOR int32_t mScreenX;
41 : MOZ_INIT_OUTSIDE_CTOR int32_t mScreenY;
42 : MOZ_INIT_OUTSIDE_CTOR OwningNonNull<mozilla::dom::EventTarget> mTarget;
43 :
44 : TouchInit();
45 :
46 0 : explicit inline TouchInit(const FastDictionaryInitializer& )
47 0 : {
48 : // Do nothing here; this is used by our "Fast" subclass
49 0 : }
50 :
51 : explicit inline TouchInit(const TouchInit& aOther)
52 : {
53 : *this = aOther;
54 : }
55 :
56 : bool
57 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
58 :
59 : bool
60 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
61 :
62 : void
63 : TraceDictionary(JSTracer* trc);
64 :
65 : TouchInit&
66 : operator=(const TouchInit& aOther);
67 :
68 : private:
69 : static bool
70 : InitIds(JSContext* cx, TouchInitAtoms* atomsCache);
71 : };
72 :
73 : namespace binding_detail {
74 0 : struct FastTouchInit : public TouchInit
75 : {
76 0 : inline FastTouchInit()
77 0 : : TouchInit(FastDictionaryInitializer())
78 : {
79 : // Doesn't matter what int we pass to the parent constructor
80 0 : }
81 : };
82 : } // namespace binding_detail
83 :
84 :
85 : namespace TouchBinding {
86 :
87 : typedef mozilla::dom::Touch NativeType;
88 :
89 : bool
90 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
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::Touch* 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 TouchBinding
130 :
131 :
132 :
133 : } // namespace dom
134 : } // namespace mozilla
135 :
136 : #endif // mozilla_dom_TouchBinding_h
|