Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM DragEvent.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_DragEventBinding_h
4 : #define mozilla_dom_DragEventBinding_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/DataTransfer.h"
12 : #include "mozilla/dom/EventTarget.h"
13 : #include "mozilla/dom/Nullable.h"
14 : #include "nsGlobalWindow.h"
15 :
16 : class nsGlobalWindow;
17 :
18 : namespace mozilla {
19 : namespace dom {
20 :
21 : class DataTransfer;
22 : class DragEvent;
23 : struct DragEventAtoms;
24 : struct DragEventInitAtoms;
25 : class EventTarget;
26 : struct NativePropertyHooks;
27 : class ProtoAndIfaceCache;
28 :
29 : } // namespace dom
30 : } // namespace mozilla
31 :
32 : namespace mozilla {
33 : namespace dom {
34 :
35 0 : struct DragEventInit : public MouseEventInit
36 : {
37 : MOZ_INIT_OUTSIDE_CTOR RefPtr<mozilla::dom::DataTransfer> mDataTransfer;
38 :
39 : DragEventInit();
40 :
41 0 : explicit inline DragEventInit(const FastDictionaryInitializer& )
42 0 : : MouseEventInit(FastDictionaryInitializer())
43 : {
44 : // Do nothing here; this is used by our "Fast" subclass
45 0 : }
46 :
47 : explicit inline DragEventInit(const DragEventInit& 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 : DragEventInit&
62 : operator=(const DragEventInit& aOther);
63 :
64 : private:
65 : static bool
66 : InitIds(JSContext* cx, DragEventInitAtoms* atomsCache);
67 : };
68 :
69 : namespace binding_detail {
70 0 : struct FastDragEventInit : public DragEventInit
71 : {
72 0 : inline FastDragEventInit()
73 0 : : DragEventInit(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 DragEventBinding {
82 :
83 : typedef mozilla::dom::DragEvent NativeType;
84 :
85 : JSObject*
86 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
87 :
88 : const JSClass*
89 : GetJSClass();
90 :
91 : bool
92 : Wrap(JSContext* aCx, mozilla::dom::DragEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
93 :
94 : template <class T>
95 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
96 : {
97 0 : JS::Rooted<JSObject*> reflector(aCx);
98 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
99 : }
100 :
101 : // We declare this as an array so that retrieving a pointer to this
102 : // binding's property hooks only requires compile/link-time resolvable
103 : // address arithmetic. Declaring it as a pointer instead would require
104 : // doing a run-time load to fetch a pointer to this binding's property
105 : // hooks. And then structures which embedded a pointer to this structure
106 : // would require a run-time load for proper initialization, which would
107 : // then induce static constructors. Lots of static constructors.
108 : extern const NativePropertyHooks sNativePropertyHooks[];
109 :
110 : void
111 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
112 :
113 : JS::Handle<JSObject*>
114 : GetProtoObjectHandle(JSContext* aCx);
115 :
116 : JS::Handle<JSObject*>
117 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
118 :
119 : JSObject*
120 : GetConstructorObject(JSContext* aCx);
121 :
122 : } // namespace DragEventBinding
123 :
124 :
125 :
126 : } // namespace dom
127 : } // namespace mozilla
128 :
129 : #endif // mozilla_dom_DragEventBinding_h
|