Backed out changeset 2fc34d798e24 (bug 1917771) for causing failures at baseline...
[gecko.git] / dom / events / EventNameList.h
blob7b5cbf8a18a137df3059c7d4110cba55c1058a84
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /*
8 * This file contains the list of event names that are exposed via IDL
9 * on various objects. It is designed to be used as inline input to
10 * various consumers through the magic of C preprocessing.
12 * Each entry consists of 4 pieces of information:
13 * 1) The name of the event
14 * 2) The event message
15 * 3) The event type (see the EventNameType enum in nsContentUtils.h)
16 * 4) The event struct type for this event.
17 * Items 2-4 might be empty strings for events for which they don't make sense.
19 * Event names that are exposed as content attributes on HTML elements
20 * and as IDL attributes on Elements, Documents and Windows and have
21 * no forwarding behavior should be enclosed in the EVENT macro.
23 * Event names that are exposed as content attributes on HTML elements
24 * and as IDL attributes on Elements, Documents and Windows and are
25 * forwarded from <body> and <frameset> to the Window should be
26 * enclosed in the FORWARDED_EVENT macro. If this macro is not
27 * defined, it will be defined to be equivalent to EVENT.
29 * Event names that are exposed as IDL attributes on Windows only
30 * should be enclosed in the WINDOW_ONLY_EVENT macro. If this macro
31 * is not defined, it will be defined to the empty string.
33 * Event names that are exposed as content and IDL attributes on
34 * <body> and <frameset>, which forward them to the Window, and are
35 * exposed as IDL attributes on the Window should be enclosed in the
36 * WINDOW_EVENT macro. If this macro is not defined, it will be
37 * defined to be equivalent to WINDOW_ONLY_EVENT.
39 * Touch-specific event names should be enclosed in TOUCH_EVENT. They
40 * are otherwise equivalent to those enclosed in EVENT. If
41 * TOUCH_EVENT is not defined, it will be defined to the empty string.
43 * Event names that are only exposed as IDL attributes on Documents
44 * should be enclosed in the DOCUMENT_ONLY_EVENT macro. If this macro is
45 * not defined, it will be defined to the empty string.
47 * Event names that are not exposed as IDL attributes at all should be
48 * enclosed in NON_IDL_EVENT. If NON_IDL_EVENT is not defined, it
49 * will be defined to the empty string.
51 * If you change which macros event names are enclosed in, please
52 * update the tests for bug 689564 and bug 659350 as needed.
55 #ifdef MESSAGE_TO_EVENT
56 # ifdef EVENT
57 # error "Don't define EVENT"
58 # endif /* EVENT */
59 # ifdef WINDOW_ONLY_EVENT
60 # error "Don't define WINDOW_ONLY_EVENT"
61 # endif /* WINDOW_ONLY_EVENT */
62 # ifdef TOUCH_EVENT
63 # error "Don't define TOUCH_EVENT"
64 # endif /* TOUCH_EVENT */
65 # ifdef DOCUMENT_ONLY_EVENT
66 # error "Don't define DOCUMENT_ONLY_EVENT"
67 # endif /* DOCUMENT_ONLY_EVENT */
68 # ifdef NON_IDL_EVENT
69 # error "Don't define NON_IDL_EVENT"
70 # endif /* NON_IDL_EVENT */
72 # define EVENT MESSAGE_TO_EVENT
73 # define WINDOW_ONLY_EVENT MESSAGE_TO_EVENT
74 # define TOUCH_EVENT MESSAGE_TO_EVENT
75 # define DOCUMENT_ONLY_EVENT MESSAGE_TO_EVENT
76 # define NON_IDL_EVENT MESSAGE_TO_EVENT
77 #endif /* MESSAGE_TO_EVENT */
79 #ifdef DEFINED_FORWARDED_EVENT
80 # error "Don't define DEFINED_FORWARDED_EVENT"
81 #endif /* DEFINED_FORWARDED_EVENT */
83 #ifndef FORWARDED_EVENT
84 # define FORWARDED_EVENT EVENT
85 # define DEFINED_FORWARDED_EVENT
86 #endif /* FORWARDED_EVENT */
88 #ifdef DEFINED_WINDOW_ONLY_EVENT
89 # error "Don't define DEFINED_WINDOW_ONLY_EVENT"
90 #endif /* DEFINED_WINDOW_ONLY_EVENT */
92 #ifndef WINDOW_ONLY_EVENT
93 # define WINDOW_ONLY_EVENT(_name, _message, _type, _struct)
94 # define DEFINED_WINDOW_ONLY_EVENT
95 #endif /* WINDOW_ONLY_EVENT */
97 #ifdef DEFINED_WINDOW_EVENT
98 # error "Don't define DEFINED_WINDOW_EVENT"
99 #endif /* DEFINED_WINDOW_EVENT */
101 #ifndef WINDOW_EVENT
102 # define WINDOW_EVENT WINDOW_ONLY_EVENT
103 # define DEFINED_WINDOW_EVENT
104 #endif /* WINDOW_EVENT */
106 #ifdef DEFINED_TOUCH_EVENT
107 # error "Don't define DEFINED_TOUCH_EVENT"
108 #endif /* DEFINED_TOUCH_EVENT */
110 #ifndef TOUCH_EVENT
111 # define TOUCH_EVENT(_name, _message, _type, _struct)
112 # define DEFINED_TOUCH_EVENT
113 #endif /* TOUCH_EVENT */
115 #ifdef DEFINED_DOCUMENT_ONLY_EVENT
116 # error "Don't define DEFINED_DOCUMENT_ONLY_EVENT"
117 #endif /* DEFINED_DOCUMENT_ONLY_EVENT */
119 #ifndef DOCUMENT_ONLY_EVENT
120 # define DOCUMENT_ONLY_EVENT(_name, _message, _type, _struct)
121 # define DEFINED_DOCUMENT_ONLY_EVENT
122 #endif /* DOCUMENT_ONLY_EVENT */
124 #ifdef DEFINED_NON_IDL_EVENT
125 # error "Don't define DEFINED_NON_IDL_EVENT"
126 #endif /* DEFINED_NON_IDL_EVENT */
128 #ifndef NON_IDL_EVENT
129 # define NON_IDL_EVENT(_name, _message, _type, _struct)
130 # define DEFINED_NON_IDL_EVENT
131 #endif /* NON_IDL_EVENT */
133 #ifdef DEFINED_ERROR_EVENT
134 # error "Don't define DEFINED_ERROR_EVENT"
135 #endif /* DEFINED_ERROR_EVENT */
137 #ifndef ERROR_EVENT
138 # define ERROR_EVENT FORWARDED_EVENT
139 # define DEFINED_ERROR_EVENT
140 #endif /* ERROR_EVENT */
142 #ifdef DEFINED_BEFOREUNLOAD_EVENT
143 # error "Don't define DEFINED_BEFOREUNLOAD_EVENT"
144 #endif /* DEFINED_BEFOREUNLOAD_EVENT */
146 #ifndef BEFOREUNLOAD_EVENT
147 # define BEFOREUNLOAD_EVENT WINDOW_EVENT
148 # define DEFINED_BEFOREUNLOAD_EVENT
149 #endif /* BEFOREUNLOAD_EVENT */
151 EVENT(abort, eImageAbort, EventNameType_All, eBasicEventClass)
152 EVENT(beforetoggle, eBeforeToggle, EventNameType_HTMLXUL, eBasicEventClass)
153 EVENT(cancel, eCancel, EventNameType_HTMLXUL, eBasicEventClass)
154 EVENT(canplay, eCanPlay, EventNameType_HTML, eBasicEventClass)
155 EVENT(canplaythrough, eCanPlayThrough, EventNameType_HTML, eBasicEventClass)
156 EVENT(change, eFormChange, EventNameType_HTMLXUL, eBasicEventClass)
157 EVENT(CheckboxStateChange, eFormCheckboxStateChange, EventNameType_None,
158 eBasicEventClass)
159 EVENT(RadioStateChange, eFormRadioStateChange, EventNameType_None,
160 eBasicEventClass)
161 EVENT(auxclick, ePointerAuxClick, EventNameType_All, ePointerEventClass)
162 EVENT(click, ePointerClick, EventNameType_All, ePointerEventClass)
163 EVENT(close, eClose, EventNameType_HTMLXUL, eBasicEventClass)
164 EVENT(contentvisibilityautostatechange, eContentVisibilityAutoStateChange,
165 EventNameType_All, eBasicEventClass)
166 EVENT(contextmenu, eContextMenu,
167 EventNameType_HTMLXUL | EventNameType_SVGGraphic, ePointerEventClass)
168 NON_IDL_EVENT(mouselongtap, eMouseLongTap, EventNameType_HTMLXUL,
169 eMouseEventClass)
170 EVENT(cuechange, eCueChange, EventNameType_All, eBasicEventClass)
171 EVENT(dblclick, eMouseDoubleClick, EventNameType_HTMLXUL, eMouseEventClass)
172 EVENT(drag, eDrag, EventNameType_HTMLXUL, eDragEventClass)
173 EVENT(dragend, eDragEnd, EventNameType_HTMLXUL, eDragEventClass)
174 EVENT(dragenter, eDragEnter, EventNameType_HTMLXUL, eDragEventClass)
175 EVENT(dragexit, eDragExit, EventNameType_HTMLXUL, eDragEventClass)
176 EVENT(dragleave, eDragLeave, EventNameType_HTMLXUL, eDragEventClass)
177 EVENT(dragover, eDragOver, EventNameType_HTMLXUL, eDragEventClass)
178 EVENT(dragstart, eDragStart, EventNameType_HTMLXUL, eDragEventClass)
179 EVENT(drop, eDrop, EventNameType_HTMLXUL, eDragEventClass)
180 EVENT(durationchange, eDurationChange, EventNameType_HTML, eBasicEventClass)
181 EVENT(emptied, eEmptied, EventNameType_HTML, eBasicEventClass)
182 EVENT(ended, eEnded, EventNameType_HTML, eBasicEventClass)
183 EVENT(formdata, eFormData, EventNameType_HTML, eBasicEventClass)
184 EVENT(fullscreenchange, eFullscreenChange, EventNameType_HTML, eBasicEventClass)
185 EVENT(fullscreenerror, eFullscreenError, EventNameType_HTML, eBasicEventClass)
186 EVENT(beforeinput, eEditorBeforeInput, EventNameType_HTMLXUL,
187 eEditorInputEventClass)
188 EVENT(input, eEditorInput, EventNameType_HTMLXUL, eEditorInputEventClass)
189 EVENT(invalid, eFormInvalid, EventNameType_HTMLXUL, eBasicEventClass)
190 EVENT(keydown, eKeyDown, EventNameType_HTMLXUL, eKeyboardEventClass)
191 EVENT(keypress, eKeyPress, EventNameType_HTMLXUL, eKeyboardEventClass)
192 EVENT(keyup, eKeyUp, EventNameType_HTMLXUL, eKeyboardEventClass)
193 NON_IDL_EVENT(mozaccesskeynotfound, eAccessKeyNotFound, EventNameType_None,
194 eKeyboardEventClass)
195 EVENT(loadeddata, eLoadedData, EventNameType_HTML, eBasicEventClass)
196 EVENT(loadedmetadata, eLoadedMetaData, EventNameType_HTML, eBasicEventClass)
197 EVENT(loadend, eLoadEnd, EventNameType_HTML, eBasicEventClass)
198 EVENT(loadstart, eLoadStart, EventNameType_HTML, eBasicEventClass)
199 EVENT(mousedown, eMouseDown, EventNameType_All, eMouseEventClass)
200 EVENT(mouseenter, eMouseEnter, EventNameType_All, eMouseEventClass)
201 EVENT(mouseleave, eMouseLeave, EventNameType_All, eMouseEventClass)
202 EVENT(mousemove, eMouseMove, EventNameType_All, eMouseEventClass)
203 EVENT(mouseout, eMouseOut, EventNameType_All, eMouseEventClass)
204 EVENT(mouseover, eMouseOver, EventNameType_All, eMouseEventClass)
205 EVENT(mouseup, eMouseUp, EventNameType_All, eMouseEventClass)
206 EVENT(mozfullscreenchange, eMozFullscreenChange, EventNameType_HTML,
207 eBasicEventClass)
208 EVENT(mozfullscreenerror, eMozFullscreenError, EventNameType_HTML,
209 eBasicEventClass)
210 EVENT(mozpointerlockchange, eMozPointerLockChange, EventNameType_HTML,
211 eBasicEventClass)
212 EVENT(mozpointerlockerror, eMozPointerLockError, EventNameType_HTML,
213 eBasicEventClass)
214 EVENT(pointerlockchange, ePointerLockChange, EventNameType_HTML,
215 eBasicEventClass)
216 EVENT(pointerlockerror, ePointerLockError, EventNameType_HTML, eBasicEventClass)
217 EVENT(pointerdown, ePointerDown, EventNameType_All, ePointerEventClass)
218 EVENT(pointermove, ePointerMove, EventNameType_All, ePointerEventClass)
219 EVENT(pointerup, ePointerUp, EventNameType_All, ePointerEventClass)
220 EVENT(pointercancel, ePointerCancel, EventNameType_All, ePointerEventClass)
221 EVENT(pointerover, ePointerOver, EventNameType_All, ePointerEventClass)
222 EVENT(pointerout, ePointerOut, EventNameType_All, ePointerEventClass)
223 EVENT(pointerenter, ePointerEnter, EventNameType_All, ePointerEventClass)
224 EVENT(pointerleave, ePointerLeave, EventNameType_All, ePointerEventClass)
225 EVENT(gotpointercapture, ePointerGotCapture, EventNameType_All,
226 ePointerEventClass)
227 EVENT(lostpointercapture, ePointerLostCapture, EventNameType_All,
228 ePointerEventClass)
229 EVENT(selectstart, eSelectStart, EventNameType_HTMLXUL, eBasicEventClass)
230 NON_IDL_EVENT(textInput, eLegacyTextInput, EventNameType_None,
231 eLegacyTextEventClass)
233 EVENT(contextlost, eContextLost, EventNameType_HTML, eBasicEventClass)
234 EVENT(contextrestored, eContextRestored, EventNameType_HTML, eBasicEventClass)
236 // Not supported yet; probably never because "wheel" is a better idea.
237 // EVENT(mousewheel)
238 EVENT(pause, ePause, EventNameType_HTML, eBasicEventClass)
239 EVENT(play, ePlay, EventNameType_HTML, eBasicEventClass)
240 EVENT(playing, ePlaying, EventNameType_HTML, eBasicEventClass)
241 EVENT(progress, eProgress, EventNameType_HTML, eBasicEventClass)
242 EVENT(ratechange, eRateChange, EventNameType_HTML, eBasicEventClass)
243 EVENT(reset, eFormReset, EventNameType_HTMLXUL, eBasicEventClass)
244 EVENT(securitypolicyviolation, eSecurityPolicyViolation, EventNameType_All,
245 eBasicEventClass)
246 EVENT(seeked, eSeeked, EventNameType_HTML, eBasicEventClass)
247 EVENT(seeking, eSeeking, EventNameType_HTML, eBasicEventClass)
248 EVENT(select, eFormSelect, EventNameType_HTMLXUL, eBasicEventClass)
249 EVENT(slotchange, eSlotChange, EventNameType_All, eBasicEventClass)
250 EVENT(stalled, eStalled, EventNameType_HTML, eBasicEventClass)
251 EVENT(submit, eFormSubmit, EventNameType_HTMLXUL, eBasicEventClass)
252 EVENT(suspend, eSuspend, EventNameType_HTML, eBasicEventClass)
253 EVENT(timeupdate, eTimeUpdate, EventNameType_HTML, eBasicEventClass)
254 EVENT(toggle, eToggle, EventNameType_HTML, eBasicEventClass)
255 EVENT(volumechange, eVolumeChange, EventNameType_HTML, eBasicEventClass)
256 EVENT(waiting, eWaiting, EventNameType_HTML, eBasicEventClass)
257 EVENT(wheel, eWheel, EventNameType_All, eWheelEventClass)
258 EVENT(copy, eCopy, EventNameType_HTMLXUL | EventNameType_SVGGraphic,
259 eClipboardEventClass)
260 EVENT(cut, eCut, EventNameType_HTMLXUL | EventNameType_SVGGraphic,
261 eClipboardEventClass)
262 EVENT(paste, ePaste, EventNameType_HTMLXUL | EventNameType_SVGGraphic,
263 eClipboardEventClass)
264 // Gecko-specific extensions that apply to elements
265 EVENT(beforescriptexecute, eBeforeScriptExecute, EventNameType_HTMLXUL,
266 eBasicEventClass)
267 EVENT(afterscriptexecute, eAfterScriptExecute, EventNameType_HTMLXUL,
268 eBasicEventClass)
270 FORWARDED_EVENT(blur, eBlur, EventNameType_HTMLXUL, eFocusEventClass)
271 ERROR_EVENT(error, eLoadError, EventNameType_All, eBasicEventClass)
272 FORWARDED_EVENT(focus, eFocus, EventNameType_HTMLXUL, eFocusEventClass)
273 FORWARDED_EVENT(focusin, eFocusIn, EventNameType_HTMLXUL, eFocusEventClass)
274 FORWARDED_EVENT(focusout, eFocusOut, EventNameType_HTMLXUL, eFocusEventClass)
275 FORWARDED_EVENT(load, eLoad, EventNameType_All, eBasicEventClass)
276 FORWARDED_EVENT(resize, eResize, EventNameType_All, eBasicEventClass)
277 FORWARDED_EVENT(scroll, eScroll, (EventNameType_HTMLXUL | EventNameType_SVGSVG),
278 eBasicEventClass)
279 NON_IDL_EVENT(mozvisualresize, eMozVisualResize, EventNameType_None,
280 eBasicEventClass)
281 NON_IDL_EVENT(mozvisualscroll, eMozVisualScroll, EventNameType_None,
282 eBasicEventClass)
284 WINDOW_EVENT(afterprint, eAfterPrint,
285 EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
286 eBasicEventClass)
287 WINDOW_EVENT(beforeprint, eBeforePrint,
288 EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
289 eBasicEventClass)
290 BEFOREUNLOAD_EVENT(beforeunload, eBeforeUnload,
291 EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
292 eBasicEventClass)
293 WINDOW_EVENT(hashchange, eHashChange,
294 EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
295 eBasicEventClass)
296 WINDOW_EVENT(languagechange, eLanguageChange,
297 EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass)
298 // XXXbz Should the onmessage attribute on <body> really not work? If so, do we
299 // need a different macro to flag things like that (IDL, but not content
300 // attributes on body/frameset), or is just using EventNameType_None enough?
301 WINDOW_EVENT(message, eMessage, EventNameType_None, eBasicEventClass)
302 WINDOW_EVENT(rtctransform, eRTCTransform, EventNameType_None, eBasicEventClass)
303 WINDOW_EVENT(messageerror, eMessageError, EventNameType_HTMLBodyOrFramesetOnly,
304 eBasicEventClass)
305 WINDOW_EVENT(offline, eOffline,
306 EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
307 eBasicEventClass)
308 WINDOW_EVENT(online, eOnline,
309 EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
310 eBasicEventClass)
311 #if defined(MOZ_WIDGET_ANDROID)
312 WINDOW_EVENT(orientationchange, eOrientationChange,
313 EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass)
314 #endif
315 WINDOW_EVENT(pagehide, ePageHide, EventNameType_HTMLBodyOrFramesetOnly,
316 eBasicEventClass)
317 WINDOW_EVENT(pageshow, ePageShow, EventNameType_HTMLBodyOrFramesetOnly,
318 eBasicEventClass)
319 WINDOW_EVENT(popstate, ePopState,
320 EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly,
321 eBasicEventClass)
322 WINDOW_EVENT(rejectionhandled, eRejectionHandled,
323 EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass)
324 WINDOW_EVENT(storage, eStorage, EventNameType_HTMLBodyOrFramesetOnly,
325 eBasicEventClass)
326 WINDOW_EVENT(unhandledrejection, eUnhandledRejection,
327 EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass)
328 WINDOW_EVENT(unload, eUnload,
329 (EventNameType_XUL | EventNameType_SVGSVG |
330 EventNameType_HTMLBodyOrFramesetOnly),
331 eBasicEventClass)
333 WINDOW_ONLY_EVENT(devicemotion, eDeviceMotion, EventNameType_None,
334 eBasicEventClass)
335 WINDOW_ONLY_EVENT(deviceorientation, eDeviceOrientation, EventNameType_None,
336 eBasicEventClass)
337 WINDOW_ONLY_EVENT(deviceorientationabsolute, eDeviceOrientationAbsolute,
338 EventNameType_None, eBasicEventClass)
339 WINDOW_ONLY_EVENT(userproximity, eUserProximity, EventNameType_None,
340 eBasicEventClass)
341 WINDOW_ONLY_EVENT(devicelight, eDeviceLight, EventNameType_None,
342 eBasicEventClass)
343 WINDOW_ONLY_EVENT(vrdisplayactivate, eVRDisplayActivate, EventNameType_None,
344 eBasicEventClass)
345 WINDOW_ONLY_EVENT(vrdisplaydeactivate, eVRDisplayDeactivate, EventNameType_None,
346 eBasicEventClass)
347 WINDOW_ONLY_EVENT(vrdisplayconnect, eVRDisplayConnect, EventNameType_None,
348 eBasicEventClass)
349 WINDOW_ONLY_EVENT(vrdisplaydisconnect, eVRDisplayDisconnect, EventNameType_None,
350 eBasicEventClass)
351 WINDOW_ONLY_EVENT(vrdisplaypresentchange, eVRDisplayPresentChange,
352 EventNameType_None, eBasicEventClass)
354 TOUCH_EVENT(touchstart, eTouchStart, EventNameType_All, eTouchEventClass)
355 TOUCH_EVENT(touchend, eTouchEnd, EventNameType_All, eTouchEventClass)
356 TOUCH_EVENT(touchmove, eTouchMove, EventNameType_All, eTouchEventClass)
357 TOUCH_EVENT(touchcancel, eTouchCancel, EventNameType_All, eTouchEventClass)
359 DOCUMENT_ONLY_EVENT(readystatechange, eReadyStateChange, EventNameType_HTMLXUL,
360 eBasicEventClass)
361 EVENT(selectionchange, eSelectionChange, EventNameType_HTMLXUL,
362 eBasicEventClass)
363 DOCUMENT_ONLY_EVENT(visibilitychange, eVisibilityChange, EventNameType_HTMLXUL,
364 eBasicEventClass)
366 NON_IDL_EVENT(MozMouseHittest, eMouseHitTest, EventNameType_None,
367 eMouseEventClass)
369 NON_IDL_EVENT(MozMouseExploreByTouch, eMouseExploreByTouch, EventNameType_None,
370 eMouseEventClass)
372 NON_IDL_EVENT(DOMAttrModified, eLegacyAttrModified, EventNameType_HTMLXUL,
373 eMutationEventClass)
374 NON_IDL_EVENT(DOMCharacterDataModified, eLegacyCharacterDataModified,
375 EventNameType_HTMLXUL, eMutationEventClass)
376 NON_IDL_EVENT(DOMNodeInserted, eLegacyNodeInserted, EventNameType_HTMLXUL,
377 eMutationEventClass)
378 NON_IDL_EVENT(DOMNodeRemoved, eLegacyNodeRemoved, EventNameType_HTMLXUL,
379 eMutationEventClass)
380 NON_IDL_EVENT(DOMNodeInsertedIntoDocument, eLegacyNodeInsertedIntoDocument,
381 EventNameType_HTMLXUL, eMutationEventClass)
382 NON_IDL_EVENT(DOMNodeRemovedFromDocument, eLegacyNodeRemovedFromDocument,
383 EventNameType_HTMLXUL, eMutationEventClass)
384 NON_IDL_EVENT(DOMSubtreeModified, eLegacySubtreeModified, EventNameType_HTMLXUL,
385 eMutationEventClass)
387 NON_IDL_EVENT(DOMActivate, eLegacyDOMActivate, EventNameType_HTMLXUL,
388 eUIEventClass)
389 NON_IDL_EVENT(DOMFocusIn, eLegacyDOMFocusIn, EventNameType_HTMLXUL,
390 eUIEventClass)
391 NON_IDL_EVENT(DOMFocusOut, eLegacyDOMFocusOut, EventNameType_HTMLXUL,
392 eUIEventClass)
394 NON_IDL_EVENT(DOMMouseScroll, eLegacyMouseLineOrPageScroll,
395 EventNameType_HTMLXUL, eMouseScrollEventClass)
396 NON_IDL_EVENT(MozMousePixelScroll, eLegacyMousePixelScroll,
397 EventNameType_HTMLXUL, eMouseScrollEventClass)
399 NON_IDL_EVENT(open, eOpen, EventNameType_None, eBasicEventClass)
401 NON_IDL_EVENT(dataavailable, eMediaRecorderDataAvailable, EventNameType_None,
402 eBasicEventClass)
404 NON_IDL_EVENT(stop, eMediaRecorderStop, EventNameType_None, eBasicEventClass)
406 NON_IDL_EVENT(warning, eMediaRecorderWarning, EventNameType_None,
407 eBasicEventClass)
409 // Events that only have on* attributes on XUL elements
411 // "text" event is legacy event for modifying composition string in EditorBase.
412 // This shouldn't be used by web/xul apps. "compositionupdate" should be
413 // used instead.
414 NON_IDL_EVENT(text, eCompositionChange, EventNameType_XUL,
415 eCompositionEventClass)
416 NON_IDL_EVENT(compositionstart, eCompositionStart, EventNameType_XUL,
417 eCompositionEventClass)
418 NON_IDL_EVENT(compositionupdate, eCompositionUpdate, EventNameType_XUL,
419 eCompositionEventClass)
420 NON_IDL_EVENT(compositionend, eCompositionEnd, EventNameType_XUL,
421 eCompositionEventClass)
422 NON_IDL_EVENT(command, eXULCommand, EventNameType_XUL, eInputEventClass)
423 NON_IDL_EVENT(popupshowing, eXULPopupShowing, EventNameType_XUL,
424 eBasicEventClass)
425 NON_IDL_EVENT(popupshown, eXULPopupShown, EventNameType_XUL, eBasicEventClass)
426 NON_IDL_EVENT(popuphiding, eXULPopupHiding, EventNameType_XUL, eBasicEventClass)
427 NON_IDL_EVENT(popuphidden, eXULPopupHidden, EventNameType_XUL, eBasicEventClass)
428 NON_IDL_EVENT(broadcast, eXULBroadcast, EventNameType_XUL, eBasicEventClass)
429 NON_IDL_EVENT(commandupdate, eXULCommandUpdate, EventNameType_XUL,
430 eBasicEventClass)
431 NON_IDL_EVENT(overflow, eScrollPortOverflow, EventNameType_XUL,
432 eBasicEventClass)
433 NON_IDL_EVENT(underflow, eScrollPortUnderflow, EventNameType_XUL,
434 eBasicEventClass)
435 NON_IDL_EVENT(systemstatusbarclick, eXULSystemStatusBarClick, EventNameType_XUL,
436 eBasicEventClass)
438 // Various SVG events
439 NON_IDL_EVENT(SVGLoad, eSVGLoad, EventNameType_None, eBasicEventClass)
440 NON_IDL_EVENT(SVGScroll, eSVGScroll, EventNameType_None, eBasicEventClass)
442 // The three SMIL animation events. We mark these as NON_IDL_EVENT even though
443 // there exist IDL properties for them, because the IDL properties have
444 // different names (onbegin/onend/onrepeat rather than
445 // onbeginEvent/onendEvent/onrepeatEvent).
446 // And we use EventNameType_None because we don't want IsEventAttributeName to
447 // return true for onbeginEvent etc.
448 NON_IDL_EVENT(beginEvent, eSMILBeginEvent, EventNameType_None,
449 eSMILTimeEventClass)
450 NON_IDL_EVENT(endEvent, eSMILEndEvent, EventNameType_None, eSMILTimeEventClass)
451 NON_IDL_EVENT(repeatEvent, eSMILRepeatEvent, EventNameType_None,
452 eSMILTimeEventClass)
454 #ifndef MESSAGE_TO_EVENT
455 // Repeat the SMIL animation events once more without the Event suffix,
456 // so that IsEventAttributeName() will return the right thing for these events.
457 // We use eUnidentifiedEvent here so that we don't accidentally treat these
458 // as alternate event names for the actual events.
459 // See bug 1845422 for cleaning this up.
460 NON_IDL_EVENT(begin, eUnidentifiedEvent, EventNameType_SMIL,
461 eSMILTimeEventClass)
462 NON_IDL_EVENT(end, eUnidentifiedEvent, EventNameType_SMIL, eSMILTimeEventClass)
463 NON_IDL_EVENT(repeat, eUnidentifiedEvent, EventNameType_SMIL,
464 eSMILTimeEventClass)
465 #endif
467 NON_IDL_EVENT(MozAfterPaint, eAfterPaint, EventNameType_None, eBasicEventClass)
469 NON_IDL_EVENT(MozScrolledAreaChanged, eScrolledAreaChanged, EventNameType_None,
470 eScrollAreaEventClass)
472 NON_IDL_EVENT(gamepadbuttondown, eGamepadButtonDown, EventNameType_None,
473 eBasicEventClass)
474 NON_IDL_EVENT(gamepadbuttonup, eGamepadButtonUp, EventNameType_None,
475 eBasicEventClass)
476 NON_IDL_EVENT(gamepadaxismove, eGamepadAxisMove, EventNameType_None,
477 eBasicEventClass)
478 WINDOW_EVENT(gamepadconnected, eGamepadConnected, EventNameType_None,
479 eBasicEventClass)
480 WINDOW_EVENT(gamepaddisconnected, eGamepadDisconnected, EventNameType_None,
481 eBasicEventClass)
483 // Simple gesture events
484 NON_IDL_EVENT(MozSwipeGestureMayStart, eSwipeGestureMayStart,
485 EventNameType_None, eSimpleGestureEventClass)
486 NON_IDL_EVENT(MozSwipeGestureStart, eSwipeGestureStart, EventNameType_None,
487 eSimpleGestureEventClass)
488 NON_IDL_EVENT(MozSwipeGestureUpdate, eSwipeGestureUpdate, EventNameType_None,
489 eSimpleGestureEventClass)
490 NON_IDL_EVENT(MozSwipeGestureEnd, eSwipeGestureEnd, EventNameType_None,
491 eSimpleGestureEventClass)
492 NON_IDL_EVENT(MozSwipeGesture, eSwipeGesture, EventNameType_None,
493 eSimpleGestureEventClass)
494 NON_IDL_EVENT(MozMagnifyGestureStart, eMagnifyGestureStart, EventNameType_None,
495 eSimpleGestureEventClass)
496 NON_IDL_EVENT(MozMagnifyGestureUpdate, eMagnifyGestureUpdate,
497 EventNameType_None, eSimpleGestureEventClass)
498 NON_IDL_EVENT(MozMagnifyGesture, eMagnifyGesture, EventNameType_None,
499 eSimpleGestureEventClass)
500 NON_IDL_EVENT(MozRotateGestureStart, eRotateGestureStart, EventNameType_None,
501 eSimpleGestureEventClass)
502 NON_IDL_EVENT(MozRotateGestureUpdate, eRotateGestureUpdate, EventNameType_None,
503 eSimpleGestureEventClass)
504 NON_IDL_EVENT(MozRotateGesture, eRotateGesture, EventNameType_None,
505 eSimpleGestureEventClass)
506 NON_IDL_EVENT(MozTapGesture, eTapGesture, EventNameType_None,
507 eSimpleGestureEventClass)
508 NON_IDL_EVENT(MozPressTapGesture, ePressTapGesture, EventNameType_None,
509 eSimpleGestureEventClass)
510 NON_IDL_EVENT(MozEdgeUIStarted, eEdgeUIStarted, EventNameType_None,
511 eSimpleGestureEventClass)
512 NON_IDL_EVENT(MozEdgeUICanceled, eEdgeUICanceled, EventNameType_None,
513 eSimpleGestureEventClass)
514 NON_IDL_EVENT(MozEdgeUICompleted, eEdgeUICompleted, EventNameType_None,
515 eSimpleGestureEventClass)
517 // CSS Transition & Animation events:
518 EVENT(transitionstart, eTransitionStart, EventNameType_All,
519 eTransitionEventClass)
520 EVENT(transitionrun, eTransitionRun, EventNameType_All, eTransitionEventClass)
521 EVENT(transitionend, eTransitionEnd, EventNameType_All, eTransitionEventClass)
522 EVENT(transitioncancel, eTransitionCancel, EventNameType_All,
523 eTransitionEventClass)
524 EVENT(animationstart, eAnimationStart, EventNameType_All, eAnimationEventClass)
525 EVENT(animationend, eAnimationEnd, EventNameType_All, eAnimationEventClass)
526 EVENT(animationiteration, eAnimationIteration, EventNameType_All,
527 eAnimationEventClass)
528 EVENT(animationcancel, eAnimationCancel, EventNameType_All,
529 eAnimationEventClass)
531 // Webkit-prefixed versions of Transition & Animation events, for web compat:
532 EVENT(webkitAnimationEnd, eWebkitAnimationEnd, EventNameType_All,
533 eAnimationEventClass)
534 EVENT(webkitAnimationIteration, eWebkitAnimationIteration, EventNameType_All,
535 eAnimationEventClass)
536 EVENT(webkitAnimationStart, eWebkitAnimationStart, EventNameType_All,
537 eAnimationEventClass)
538 EVENT(webkitTransitionEnd, eWebkitTransitionEnd, EventNameType_All,
539 eTransitionEventClass)
540 #ifndef MESSAGE_TO_EVENT
541 // These are only here so that IsEventAttributeName() will return the right
542 // thing for these events. We could probably remove them if we used
543 // Element::GetEventNameForAttr on the input to IsEventAttributeName before
544 // looking it up in the hashtable... see bug 1845422.
545 EVENT(webkitanimationend, eUnidentifiedEvent, EventNameType_All,
546 eAnimationEventClass)
547 EVENT(webkitanimationiteration, eUnidentifiedEvent, EventNameType_All,
548 eAnimationEventClass)
549 EVENT(webkitanimationstart, eUnidentifiedEvent, EventNameType_All,
550 eAnimationEventClass)
551 EVENT(webkittransitionend, eUnidentifiedEvent, EventNameType_All,
552 eTransitionEventClass)
553 #endif
555 NON_IDL_EVENT(audioprocess, eAudioProcess, EventNameType_None, eBasicEventClass)
557 NON_IDL_EVENT(complete, eAudioComplete, EventNameType_None, eBasicEventClass)
559 EVENT(scrollend, eScrollend, EventNameType_All, eBasicEventClass)
561 #ifdef DEFINED_FORWARDED_EVENT
562 # undef DEFINED_FORWARDED_EVENT
563 # undef FORWARDED_EVENT
564 #endif /* DEFINED_FORWARDED_EVENT */
566 #ifdef DEFINED_WINDOW_EVENT
567 # undef DEFINED_WINDOW_EVENT
568 # undef WINDOW_EVENT
569 #endif /* DEFINED_WINDOW_EVENT */
571 #ifdef DEFINED_WINDOW_ONLY_EVENT
572 # undef DEFINED_WINDOW_ONLY_EVENT
573 # undef WINDOW_ONLY_EVENT
574 #endif /* DEFINED_WINDOW_ONLY_EVENT */
576 #ifdef DEFINED_TOUCH_EVENT
577 # undef DEFINED_TOUCH_EVENT
578 # undef TOUCH_EVENT
579 #endif /* DEFINED_TOUCH_EVENT */
581 #ifdef DEFINED_DOCUMENT_ONLY_EVENT
582 # undef DEFINED_DOCUMENT_ONLY_EVENT
583 # undef DOCUMENT_ONLY_EVENT
584 #endif /* DEFINED_DOCUMENT_ONLY_EVENT */
586 #ifdef DEFINED_NON_IDL_EVENT
587 # undef DEFINED_NON_IDL_EVENT
588 # undef NON_IDL_EVENT
589 #endif /* DEFINED_NON_IDL_EVENT */
591 #ifdef DEFINED_ERROR_EVENT
592 # undef DEFINED_ERROR_EVENT
593 # undef ERROR_EVENT
594 #endif /* DEFINED_ERROR_EVENT */
596 #ifdef DEFINED_BEFOREUNLOAD_EVENT
597 # undef DEFINED_BEFOREUNLOAD_EVENT
598 # undef BEFOREUNLOAD_EVENT
599 #endif /* BEFOREUNLOAD_EVENT */
601 #ifdef MESSAGE_TO_EVENT
602 # undef EVENT
603 # undef WINDOW_ONLY_EVENT
604 # undef TOUCH_EVENT
605 # undef DOCUMENT_ONLY_EVENT
606 # undef NON_IDL_EVENT
607 #endif /* MESSAGE_TO_EVENT */