Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: gecko-sdk/include/nsIDOMEvent.h

Issue 20346: Version 1.8 of gecko-sdk. Downloaded from here:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gecko-sdk/include/nsIDOMEntityReference.h ('k') | gecko-sdk/include/nsIDOMEventGroup.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0 -Release/WINNT_5.2_Depend/mozilla/dom/public/idl/events/nsIDOMEvent.idl
3 */
4
5 #ifndef __gen_nsIDOMEvent_h__
6 #define __gen_nsIDOMEvent_h__
7
8
9 #ifndef __gen_domstubs_h__
10 #include "domstubs.h"
11 #endif
12
13 /* For IDL files that don't want to include root IDL files. */
14 #ifndef NS_NO_VTABLE
15 #define NS_NO_VTABLE
16 #endif
17 class nsIDOMEventTarget; /* forward declaration */
18
19
20 /* starting interface: nsIDOMEvent */
21 #define NS_IDOMEVENT_IID_STR "a66b7b80-ff46-bd97-0080-5f8ae38add32"
22
23 #define NS_IDOMEVENT_IID \
24 {0xa66b7b80, 0xff46, 0xbd97, \
25 { 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0x8a, 0xdd, 0x32 }}
26
27 class NS_NO_VTABLE nsIDOMEvent : public nsISupports {
28 public:
29
30 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMEVENT_IID)
31
32 /**
33 * The nsIDOMEvent interface is the primary datatype for all events in
34 * the Document Object Model.
35 *
36 * For more information on this interface please see
37 * http://www.w3.org/TR/DOM-Level-2-Events/
38 *
39 * @status FROZEN
40 */
41 /**
42 * The current event phase is the capturing phase.
43 */
44 enum { CAPTURING_PHASE = 1U };
45
46 /**
47 * The event is currently being evaluated at the target EventTarget.
48 */
49 enum { AT_TARGET = 2U };
50
51 /**
52 * The current event phase is the bubbling phase.
53 */
54 enum { BUBBLING_PHASE = 3U };
55
56 /**
57 * The name of the event (case-insensitive). The name must be an XML
58 * name.
59 */
60 /* readonly attribute DOMString type; */
61 NS_IMETHOD GetType(nsAString & aType) = 0;
62
63 /**
64 * Used to indicate the EventTarget to which the event was originally
65 * dispatched.
66 */
67 /* readonly attribute nsIDOMEventTarget target; */
68 NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) = 0;
69
70 /**
71 * Used to indicate the EventTarget whose EventListeners are currently
72 * being processed. This is particularly useful during capturing and
73 * bubbling.
74 */
75 /* readonly attribute nsIDOMEventTarget currentTarget; */
76 NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) = 0;
77
78 /**
79 * Used to indicate which phase of event flow is currently being
80 * evaluated.
81 */
82 /* readonly attribute unsigned short eventPhase; */
83 NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) = 0;
84
85 /**
86 * Used to indicate whether or not an event is a bubbling event. If the
87 * event can bubble the value is true, else the value is false.
88 */
89 /* readonly attribute boolean bubbles; */
90 NS_IMETHOD GetBubbles(PRBool *aBubbles) = 0;
91
92 /**
93 * Used to indicate whether or not an event can have its default action
94 * prevented. If the default action can be prevented the value is true,
95 * else the value is false.
96 */
97 /* readonly attribute boolean cancelable; */
98 NS_IMETHOD GetCancelable(PRBool *aCancelable) = 0;
99
100 /**
101 * Used to specify the time (in milliseconds relative to the epoch) at
102 * which the event was created. Due to the fact that some systems may
103 * not provide this information the value of timeStamp may be not
104 * available for all events. When not available, a value of 0 will be
105 * returned. Examples of epoch time are the time of the system start or
106 * 0:0:0 UTC 1st January 1970.
107 */
108 /* readonly attribute DOMTimeStamp timeStamp; */
109 NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) = 0;
110
111 /**
112 * The stopPropagation method is used prevent further propagation of an
113 * event during event flow. If this method is called by any
114 * EventListener the event will cease propagating through the tree. The
115 * event will complete dispatch to all listeners on the current
116 * EventTarget before event flow stops. This method may be used during
117 * any stage of event flow.
118 */
119 /* void stopPropagation (); */
120 NS_IMETHOD StopPropagation(void) = 0;
121
122 /**
123 * If an event is cancelable, the preventDefault method is used to
124 * signify that the event is to be canceled, meaning any default action
125 * normally taken by the implementation as a result of the event will
126 * not occur. If, during any stage of event flow, the preventDefault
127 * method is called the event is canceled. Any default action associated
128 * with the event will not occur. Calling this method for a
129 * non-cancelable event has no effect. Once preventDefault has been
130 * called it will remain in effect throughout the remainder of the
131 * event's propagation. This method may be used during any stage of
132 * event flow.
133 */
134 /* void preventDefault (); */
135 NS_IMETHOD PreventDefault(void) = 0;
136
137 /**
138 * The initEvent method is used to initialize the value of an Event
139 * created through the DocumentEvent interface. This method may only be
140 * called before the Event has been dispatched via the dispatchEvent
141 * method, though it may be called multiple times during that phase if
142 * necessary. If called multiple times the final invocation takes
143 * precedence. If called from a subclass of Event interface only the
144 * values specified in the initEvent method are modified, all other
145 * attributes are left unchanged.
146 *
147 * @param eventTypeArg Specifies the event type. This type may be
148 * any event type currently defined in this
149 * specification or a new event type.. The string
150 * must be an XML name.
151 * Any new event type must not begin with any
152 * upper, lower, or mixed case version of the
153 * string "DOM". This prefix is reserved for
154 * future DOM event sets. It is also strongly
155 * recommended that third parties adding their
156 * own events use their own prefix to avoid
157 * confusion and lessen the probability of
158 * conflicts with other new events.
159 * @param canBubbleArg Specifies whether or not the event can bubble.
160 * @param cancelableArg Specifies whether or not the event's default
161 * action can be prevented.
162 */
163 /* void initEvent (in DOMString eventTypeArg, in boolean canBubbleArg, in bool ean cancelableArg); */
164 NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBo ol cancelableArg) = 0;
165
166 };
167
168 /* Use this macro when declaring classes that implement this interface. */
169 #define NS_DECL_NSIDOMEVENT \
170 NS_IMETHOD GetType(nsAString & aType); \
171 NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget); \
172 NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget); \
173 NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase); \
174 NS_IMETHOD GetBubbles(PRBool *aBubbles); \
175 NS_IMETHOD GetCancelable(PRBool *aCancelable); \
176 NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp); \
177 NS_IMETHOD StopPropagation(void); \
178 NS_IMETHOD PreventDefault(void); \
179 NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBo ol cancelableArg);
180
181 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
182 #define NS_FORWARD_NSIDOMEVENT(_to) \
183 NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \
184 NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) { return _to GetTarget(aTar get); } \
185 NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) { return _to GetCurrentTarget(aCurrentTarget); } \
186 NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) { return _to GetEventPhase(aEv entPhase); } \
187 NS_IMETHOD GetBubbles(PRBool *aBubbles) { return _to GetBubbles(aBubbles); } \
188 NS_IMETHOD GetCancelable(PRBool *aCancelable) { return _to GetCancelable(aCanc elable); } \
189 NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) { return _to GetTimeStamp(aT imeStamp); } \
190 NS_IMETHOD StopPropagation(void) { return _to StopPropagation(); } \
191 NS_IMETHOD PreventDefault(void) { return _to PreventDefault(); } \
192 NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBo ol cancelableArg) { return _to InitEvent(eventTypeArg, canBubbleArg, cancelableA rg); }
193
194 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
195 #define NS_FORWARD_SAFE_NSIDOMEVENT(_to) \
196 NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
197 NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) { return !_to ? NS_ERROR_NU LL_POINTER : _to->GetTarget(aTarget); } \
198 NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentTarget(aCurrentTarget); } \
199 NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) { return !_to ? NS_ERROR_NULL_ POINTER : _to->GetEventPhase(aEventPhase); } \
200 NS_IMETHOD GetBubbles(PRBool *aBubbles) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBubbles(aBubbles); } \
201 NS_IMETHOD GetCancelable(PRBool *aCancelable) { return !_to ? NS_ERROR_NULL_PO INTER : _to->GetCancelable(aCancelable); } \
202 NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) { return !_to ? NS_ERROR_NUL L_POINTER : _to->GetTimeStamp(aTimeStamp); } \
203 NS_IMETHOD StopPropagation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to-> StopPropagation(); } \
204 NS_IMETHOD PreventDefault(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->P reventDefault(); } \
205 NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBo ol cancelableArg) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitEvent(eventTy peArg, canBubbleArg, cancelableArg); }
206
207 #if 0
208 /* Use the code below as a template for the implementation class for this interf ace. */
209
210 /* Header file */
211 class nsDOMEvent : public nsIDOMEvent
212 {
213 public:
214 NS_DECL_ISUPPORTS
215 NS_DECL_NSIDOMEVENT
216
217 nsDOMEvent();
218
219 private:
220 ~nsDOMEvent();
221
222 protected:
223 /* additional members */
224 };
225
226 /* Implementation file */
227 NS_IMPL_ISUPPORTS1(nsDOMEvent, nsIDOMEvent)
228
229 nsDOMEvent::nsDOMEvent()
230 {
231 /* member initializers and constructor code */
232 }
233
234 nsDOMEvent::~nsDOMEvent()
235 {
236 /* destructor code */
237 }
238
239 /* readonly attribute DOMString type; */
240 NS_IMETHODIMP nsDOMEvent::GetType(nsAString & aType)
241 {
242 return NS_ERROR_NOT_IMPLEMENTED;
243 }
244
245 /* readonly attribute nsIDOMEventTarget target; */
246 NS_IMETHODIMP nsDOMEvent::GetTarget(nsIDOMEventTarget * *aTarget)
247 {
248 return NS_ERROR_NOT_IMPLEMENTED;
249 }
250
251 /* readonly attribute nsIDOMEventTarget currentTarget; */
252 NS_IMETHODIMP nsDOMEvent::GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget)
253 {
254 return NS_ERROR_NOT_IMPLEMENTED;
255 }
256
257 /* readonly attribute unsigned short eventPhase; */
258 NS_IMETHODIMP nsDOMEvent::GetEventPhase(PRUint16 *aEventPhase)
259 {
260 return NS_ERROR_NOT_IMPLEMENTED;
261 }
262
263 /* readonly attribute boolean bubbles; */
264 NS_IMETHODIMP nsDOMEvent::GetBubbles(PRBool *aBubbles)
265 {
266 return NS_ERROR_NOT_IMPLEMENTED;
267 }
268
269 /* readonly attribute boolean cancelable; */
270 NS_IMETHODIMP nsDOMEvent::GetCancelable(PRBool *aCancelable)
271 {
272 return NS_ERROR_NOT_IMPLEMENTED;
273 }
274
275 /* readonly attribute DOMTimeStamp timeStamp; */
276 NS_IMETHODIMP nsDOMEvent::GetTimeStamp(DOMTimeStamp *aTimeStamp)
277 {
278 return NS_ERROR_NOT_IMPLEMENTED;
279 }
280
281 /* void stopPropagation (); */
282 NS_IMETHODIMP nsDOMEvent::StopPropagation()
283 {
284 return NS_ERROR_NOT_IMPLEMENTED;
285 }
286
287 /* void preventDefault (); */
288 NS_IMETHODIMP nsDOMEvent::PreventDefault()
289 {
290 return NS_ERROR_NOT_IMPLEMENTED;
291 }
292
293 /* void initEvent (in DOMString eventTypeArg, in boolean canBubbleArg, in boolea n cancelableArg); */
294 NS_IMETHODIMP nsDOMEvent::InitEvent(const nsAString & eventTypeArg, PRBool canBu bbleArg, PRBool cancelableArg)
295 {
296 return NS_ERROR_NOT_IMPLEMENTED;
297 }
298
299 /* End of implementation class template. */
300 #endif
301
302
303 #endif /* __gen_nsIDOMEvent_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsIDOMEntityReference.h ('k') | gecko-sdk/include/nsIDOMEventGroup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698