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/. */
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
57 # error "Don't define EVENT"
59 # ifdef WINDOW_ONLY_EVENT
60 # error "Don't define WINDOW_ONLY_EVENT"
61 # endif /* WINDOW_ONLY_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 */
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 */
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 */
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 */
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(bounce
, eMarqueeBounce
, EventNameType_HTMLMarqueeOnly
, eBasicEventClass
)
153 EVENT(canplay
, eCanPlay
, EventNameType_HTML
, eBasicEventClass
)
154 EVENT(canplaythrough
, eCanPlayThrough
, EventNameType_HTML
, eBasicEventClass
)
155 EVENT(change
, eFormChange
, EventNameType_HTMLXUL
, eBasicEventClass
)
156 EVENT(CheckboxStateChange
, eFormCheckboxStateChange
, EventNameType_None
,
158 EVENT(RadioStateChange
, eFormRadioStateChange
, EventNameType_None
,
160 EVENT(auxclick
, eMouseAuxClick
, EventNameType_All
, eMouseEventClass
)
161 EVENT(click
, eMouseClick
, EventNameType_All
, eMouseEventClass
)
162 EVENT(close
, eClose
, EventNameType_HTMLXUL
, eBasicEventClass
)
163 EVENT(contextmenu
, eContextMenu
, EventNameType_HTMLXUL
, eMouseEventClass
)
164 NON_IDL_EVENT(mouselongtap
, eMouseLongTap
, EventNameType_HTMLXUL
,
166 EVENT(cuechange
, eCueChange
, EventNameType_All
, eBasicEventClass
)
167 EVENT(dblclick
, eMouseDoubleClick
, EventNameType_HTMLXUL
, eMouseEventClass
)
168 EVENT(drag
, eDrag
, EventNameType_HTMLXUL
, eDragEventClass
)
169 EVENT(dragend
, eDragEnd
, EventNameType_HTMLXUL
, eDragEventClass
)
170 EVENT(dragenter
, eDragEnter
, EventNameType_HTMLXUL
, eDragEventClass
)
171 EVENT(dragexit
, eDragExit
, EventNameType_HTMLXUL
, eDragEventClass
)
172 EVENT(dragleave
, eDragLeave
, EventNameType_HTMLXUL
, eDragEventClass
)
173 EVENT(dragover
, eDragOver
, EventNameType_HTMLXUL
, eDragEventClass
)
174 EVENT(dragstart
, eDragStart
, EventNameType_HTMLXUL
, eDragEventClass
)
175 EVENT(drop
, eDrop
, EventNameType_HTMLXUL
, eDragEventClass
)
176 EVENT(durationchange
, eDurationChange
, EventNameType_HTML
, eBasicEventClass
)
177 EVENT(emptied
, eEmptied
, EventNameType_HTML
, eBasicEventClass
)
178 EVENT(ended
, eEnded
, EventNameType_HTML
, eBasicEventClass
)
179 EVENT(finish
, eMarqueeFinish
, EventNameType_HTMLMarqueeOnly
, eBasicEventClass
)
180 EVENT(formdata
, eFormData
, EventNameType_HTML
, eBasicEventClass
)
181 EVENT(fullscreenchange
, eFullscreenChange
, EventNameType_HTML
, eBasicEventClass
)
182 EVENT(fullscreenerror
, eFullscreenError
, EventNameType_HTML
, eBasicEventClass
)
183 EVENT(beforeinput
, eEditorBeforeInput
, EventNameType_HTMLXUL
,
184 eEditorInputEventClass
)
185 EVENT(input
, eEditorInput
, EventNameType_HTMLXUL
, eEditorInputEventClass
)
186 EVENT(invalid
, eFormInvalid
, EventNameType_HTMLXUL
, eBasicEventClass
)
187 EVENT(keydown
, eKeyDown
, EventNameType_HTMLXUL
, eKeyboardEventClass
)
188 EVENT(keypress
, eKeyPress
, EventNameType_HTMLXUL
, eKeyboardEventClass
)
189 EVENT(keyup
, eKeyUp
, EventNameType_HTMLXUL
, eKeyboardEventClass
)
190 NON_IDL_EVENT(mozaccesskeynotfound
, eAccessKeyNotFound
, EventNameType_None
,
192 EVENT(loadeddata
, eLoadedData
, EventNameType_HTML
, eBasicEventClass
)
193 EVENT(loadedmetadata
, eLoadedMetaData
, EventNameType_HTML
, eBasicEventClass
)
194 EVENT(loadend
, eLoadEnd
, EventNameType_HTML
, eBasicEventClass
)
195 EVENT(loadstart
, eLoadStart
, EventNameType_HTML
, eBasicEventClass
)
196 EVENT(mousedown
, eMouseDown
, EventNameType_All
, eMouseEventClass
)
197 EVENT(mouseenter
, eMouseEnter
, EventNameType_All
, eMouseEventClass
)
198 EVENT(mouseleave
, eMouseLeave
, EventNameType_All
, eMouseEventClass
)
199 EVENT(mousemove
, eMouseMove
, EventNameType_All
, eMouseEventClass
)
200 EVENT(mouseout
, eMouseOut
, EventNameType_All
, eMouseEventClass
)
201 EVENT(mouseover
, eMouseOver
, EventNameType_All
, eMouseEventClass
)
202 EVENT(mouseup
, eMouseUp
, EventNameType_All
, eMouseEventClass
)
203 EVENT(mozfullscreenchange
, eMozFullscreenChange
, EventNameType_HTML
,
205 EVENT(mozfullscreenerror
, eMozFullscreenError
, EventNameType_HTML
,
207 EVENT(mozpointerlockchange
, eMozPointerLockChange
, EventNameType_HTML
,
209 EVENT(mozpointerlockerror
, eMozPointerLockError
, EventNameType_HTML
,
211 EVENT(pointerlockchange
, ePointerLockChange
, EventNameType_HTML
,
213 EVENT(pointerlockerror
, ePointerLockError
, EventNameType_HTML
, eBasicEventClass
)
214 EVENT(pointerdown
, ePointerDown
, EventNameType_All
, ePointerEventClass
)
215 EVENT(pointermove
, ePointerMove
, EventNameType_All
, ePointerEventClass
)
216 EVENT(pointerup
, ePointerUp
, EventNameType_All
, ePointerEventClass
)
217 EVENT(pointercancel
, ePointerCancel
, EventNameType_All
, ePointerEventClass
)
218 EVENT(pointerover
, ePointerOver
, EventNameType_All
, ePointerEventClass
)
219 EVENT(pointerout
, ePointerOut
, EventNameType_All
, ePointerEventClass
)
220 EVENT(pointerenter
, ePointerEnter
, EventNameType_All
, ePointerEventClass
)
221 EVENT(pointerleave
, ePointerLeave
, EventNameType_All
, ePointerEventClass
)
222 EVENT(gotpointercapture
, ePointerGotCapture
, EventNameType_All
,
224 EVENT(lostpointercapture
, ePointerLostCapture
, EventNameType_All
,
226 EVENT(selectstart
, eSelectStart
, EventNameType_HTMLXUL
, eBasicEventClass
)
228 // Not supported yet; probably never because "wheel" is a better idea.
230 EVENT(pause
, ePause
, EventNameType_HTML
, eBasicEventClass
)
231 EVENT(play
, ePlay
, EventNameType_HTML
, eBasicEventClass
)
232 EVENT(playing
, ePlaying
, EventNameType_HTML
, eBasicEventClass
)
233 EVENT(progress
, eProgress
, EventNameType_HTML
, eBasicEventClass
)
234 EVENT(ratechange
, eRateChange
, EventNameType_HTML
, eBasicEventClass
)
235 EVENT(reset
, eFormReset
, EventNameType_HTMLXUL
, eBasicEventClass
)
236 EVENT(securitypolicyviolation
, eSecurityPolicyViolation
, EventNameType_All
,
238 EVENT(seeked
, eSeeked
, EventNameType_HTML
, eBasicEventClass
)
239 EVENT(seeking
, eSeeking
, EventNameType_HTML
, eBasicEventClass
)
240 EVENT(select
, eFormSelect
, EventNameType_HTMLXUL
, eBasicEventClass
)
241 EVENT(slotchange
, eSlotChange
, EventNameType_All
, eBasicEventClass
)
242 EVENT(stalled
, eStalled
, EventNameType_HTML
, eBasicEventClass
)
243 EVENT(start
, eMarqueeStart
, EventNameType_HTMLMarqueeOnly
, eBasicEventClass
)
244 EVENT(submit
, eFormSubmit
, EventNameType_HTMLXUL
, eBasicEventClass
)
245 EVENT(suspend
, eSuspend
, EventNameType_HTML
, eBasicEventClass
)
246 EVENT(timeupdate
, eTimeUpdate
, EventNameType_HTML
, eBasicEventClass
)
247 EVENT(toggle
, eToggle
, EventNameType_HTML
, eBasicEventClass
)
248 EVENT(volumechange
, eVolumeChange
, EventNameType_HTML
, eBasicEventClass
)
249 EVENT(waiting
, eWaiting
, EventNameType_HTML
, eBasicEventClass
)
250 EVENT(wheel
, eWheel
, EventNameType_All
, eWheelEventClass
)
251 EVENT(copy
, eCopy
, EventNameType_HTMLXUL
| EventNameType_SVGGraphic
,
252 eClipboardEventClass
)
253 EVENT(cut
, eCut
, EventNameType_HTMLXUL
| EventNameType_SVGGraphic
,
254 eClipboardEventClass
)
255 EVENT(paste
, ePaste
, EventNameType_HTMLXUL
| EventNameType_SVGGraphic
,
256 eClipboardEventClass
)
257 // Gecko-specific extensions that apply to elements
258 EVENT(beforescriptexecute
, eBeforeScriptExecute
, EventNameType_HTMLXUL
,
260 EVENT(afterscriptexecute
, eAfterScriptExecute
, EventNameType_HTMLXUL
,
263 FORWARDED_EVENT(blur
, eBlur
, EventNameType_HTMLXUL
, eFocusEventClass
)
264 ERROR_EVENT(error
, eLoadError
, EventNameType_All
, eBasicEventClass
)
265 FORWARDED_EVENT(focus
, eFocus
, EventNameType_HTMLXUL
, eFocusEventClass
)
266 FORWARDED_EVENT(focusin
, eFocusIn
, EventNameType_HTMLXUL
, eFocusEventClass
)
267 FORWARDED_EVENT(focusout
, eFocusOut
, EventNameType_HTMLXUL
, eFocusEventClass
)
268 FORWARDED_EVENT(load
, eLoad
, EventNameType_All
, eBasicEventClass
)
269 FORWARDED_EVENT(resize
, eResize
, EventNameType_All
, eBasicEventClass
)
270 FORWARDED_EVENT(scroll
, eScroll
, (EventNameType_HTMLXUL
| EventNameType_SVGSVG
),
272 NON_IDL_EVENT(mozvisualresize
, eMozVisualResize
, EventNameType_None
,
274 NON_IDL_EVENT(mozvisualscroll
, eMozVisualScroll
, EventNameType_None
,
277 WINDOW_EVENT(afterprint
, eAfterPrint
,
278 EventNameType_XUL
| EventNameType_HTMLBodyOrFramesetOnly
,
280 WINDOW_EVENT(beforeprint
, eBeforePrint
,
281 EventNameType_XUL
| EventNameType_HTMLBodyOrFramesetOnly
,
283 BEFOREUNLOAD_EVENT(beforeunload
, eBeforeUnload
,
284 EventNameType_XUL
| EventNameType_HTMLBodyOrFramesetOnly
,
286 WINDOW_EVENT(hashchange
, eHashChange
,
287 EventNameType_XUL
| EventNameType_HTMLBodyOrFramesetOnly
,
289 WINDOW_EVENT(languagechange
, eLanguageChange
,
290 EventNameType_HTMLBodyOrFramesetOnly
, eBasicEventClass
)
291 // XXXbz Should the onmessage attribute on <body> really not work? If so, do we
292 // need a different macro to flag things like that (IDL, but not content
293 // attributes on body/frameset), or is just using EventNameType_None enough?
294 WINDOW_EVENT(message
, eMessage
, EventNameType_None
, eBasicEventClass
)
295 WINDOW_EVENT(messageerror
, eMessageError
, EventNameType_HTMLBodyOrFramesetOnly
,
297 WINDOW_EVENT(offline
, eOffline
,
298 EventNameType_XUL
| EventNameType_HTMLBodyOrFramesetOnly
,
300 WINDOW_EVENT(online
, eOnline
,
301 EventNameType_XUL
| EventNameType_HTMLBodyOrFramesetOnly
,
303 #if defined(MOZ_WIDGET_ANDROID)
304 WINDOW_EVENT(orientationchange
, eOrientationChange
,
305 EventNameType_HTMLBodyOrFramesetOnly
, eBasicEventClass
)
307 WINDOW_EVENT(pagehide
, ePageHide
, EventNameType_HTMLBodyOrFramesetOnly
,
309 WINDOW_EVENT(pageshow
, ePageShow
, EventNameType_HTMLBodyOrFramesetOnly
,
311 WINDOW_EVENT(popstate
, ePopState
,
312 EventNameType_XUL
| EventNameType_HTMLBodyOrFramesetOnly
,
314 WINDOW_EVENT(rejectionhandled
, eRejectionHandled
,
315 EventNameType_HTMLBodyOrFramesetOnly
, eBasicEventClass
)
316 WINDOW_EVENT(storage
, eStorage
, EventNameType_HTMLBodyOrFramesetOnly
,
318 WINDOW_EVENT(unhandledrejection
, eUnhandledRejection
,
319 EventNameType_HTMLBodyOrFramesetOnly
, eBasicEventClass
)
320 WINDOW_EVENT(unload
, eUnload
,
321 (EventNameType_XUL
| EventNameType_SVGSVG
|
322 EventNameType_HTMLBodyOrFramesetOnly
),
325 WINDOW_ONLY_EVENT(devicemotion
, eDeviceMotion
, EventNameType_None
,
327 WINDOW_ONLY_EVENT(deviceorientation
, eDeviceOrientation
, EventNameType_None
,
329 WINDOW_ONLY_EVENT(absolutedeviceorientation
, eAbsoluteDeviceOrientation
,
330 EventNameType_None
, eBasicEventClass
)
331 WINDOW_ONLY_EVENT(userproximity
, eUserProximity
, EventNameType_None
,
333 WINDOW_ONLY_EVENT(devicelight
, eDeviceLight
, EventNameType_None
,
335 WINDOW_ONLY_EVENT(vrdisplayactivate
, eVRDisplayActivate
, EventNameType_None
,
337 WINDOW_ONLY_EVENT(vrdisplaydeactivate
, eVRDisplayDeactivate
, EventNameType_None
,
339 WINDOW_ONLY_EVENT(vrdisplayconnect
, eVRDisplayConnect
, EventNameType_None
,
341 WINDOW_ONLY_EVENT(vrdisplaydisconnect
, eVRDisplayDisconnect
, EventNameType_None
,
343 WINDOW_ONLY_EVENT(vrdisplaypresentchange
, eVRDisplayPresentChange
,
344 EventNameType_None
, eBasicEventClass
)
346 TOUCH_EVENT(touchstart
, eTouchStart
, EventNameType_All
, eTouchEventClass
)
347 TOUCH_EVENT(touchend
, eTouchEnd
, EventNameType_All
, eTouchEventClass
)
348 TOUCH_EVENT(touchmove
, eTouchMove
, EventNameType_All
, eTouchEventClass
)
349 TOUCH_EVENT(touchcancel
, eTouchCancel
, EventNameType_All
, eTouchEventClass
)
351 DOCUMENT_ONLY_EVENT(readystatechange
, eReadyStateChange
, EventNameType_HTMLXUL
,
353 EVENT(selectionchange
, eSelectionChange
, EventNameType_HTMLXUL
,
355 DOCUMENT_ONLY_EVENT(visibilitychange
, eVisibilityChange
, EventNameType_HTMLXUL
,
358 NON_IDL_EVENT(MozMouseHittest
, eMouseHitTest
, EventNameType_None
,
361 NON_IDL_EVENT(MozMouseExploreByTouch
, eMouseExploreByTouch
, EventNameType_None
,
364 NON_IDL_EVENT(DOMAttrModified
, eLegacyAttrModified
, EventNameType_HTMLXUL
,
366 NON_IDL_EVENT(DOMCharacterDataModified
, eLegacyCharacterDataModified
,
367 EventNameType_HTMLXUL
, eMutationEventClass
)
368 NON_IDL_EVENT(DOMNodeInserted
, eLegacyNodeInserted
, EventNameType_HTMLXUL
,
370 NON_IDL_EVENT(DOMNodeRemoved
, eLegacyNodeRemoved
, EventNameType_HTMLXUL
,
372 NON_IDL_EVENT(DOMNodeInsertedIntoDocument
, eLegacyNodeInsertedIntoDocument
,
373 EventNameType_HTMLXUL
, eMutationEventClass
)
374 NON_IDL_EVENT(DOMNodeRemovedFromDocument
, eLegacyNodeRemovedFromDocument
,
375 EventNameType_HTMLXUL
, eMutationEventClass
)
376 NON_IDL_EVENT(DOMSubtreeModified
, eLegacySubtreeModified
, EventNameType_HTMLXUL
,
379 NON_IDL_EVENT(DOMActivate
, eLegacyDOMActivate
, EventNameType_HTMLXUL
,
381 NON_IDL_EVENT(DOMFocusIn
, eLegacyDOMFocusIn
, EventNameType_HTMLXUL
,
383 NON_IDL_EVENT(DOMFocusOut
, eLegacyDOMFocusOut
, EventNameType_HTMLXUL
,
386 NON_IDL_EVENT(DOMMouseScroll
, eLegacyMouseLineOrPageScroll
,
387 EventNameType_HTMLXUL
, eMouseScrollEventClass
)
388 NON_IDL_EVENT(MozMousePixelScroll
, eLegacyMousePixelScroll
,
389 EventNameType_HTMLXUL
, eMouseScrollEventClass
)
391 NON_IDL_EVENT(open
, eOpen
, EventNameType_None
, eBasicEventClass
)
393 NON_IDL_EVENT(dataavailable
, eMediaRecorderDataAvailable
, EventNameType_None
,
396 NON_IDL_EVENT(stop
, eMediaRecorderStop
, EventNameType_None
, eBasicEventClass
)
398 NON_IDL_EVENT(warning
, eMediaRecorderWarning
, EventNameType_None
,
401 // Events that only have on* attributes on XUL elements
403 // "text" event is legacy event for modifying composition string in EditorBase.
404 // This shouldn't be used by web/xul apps. "compositionupdate" should be
406 NON_IDL_EVENT(text
, eCompositionChange
, EventNameType_XUL
,
407 eCompositionEventClass
)
408 NON_IDL_EVENT(compositionstart
, eCompositionStart
, EventNameType_XUL
,
409 eCompositionEventClass
)
410 NON_IDL_EVENT(compositionupdate
, eCompositionUpdate
, EventNameType_XUL
,
411 eCompositionEventClass
)
412 NON_IDL_EVENT(compositionend
, eCompositionEnd
, EventNameType_XUL
,
413 eCompositionEventClass
)
414 NON_IDL_EVENT(command
, eXULCommand
, EventNameType_XUL
, eInputEventClass
)
415 NON_IDL_EVENT(popupshowing
, eXULPopupShowing
, EventNameType_XUL
,
417 NON_IDL_EVENT(popupshown
, eXULPopupShown
, EventNameType_XUL
, eBasicEventClass
)
418 NON_IDL_EVENT(popuphiding
, eXULPopupHiding
, EventNameType_XUL
, eBasicEventClass
)
419 NON_IDL_EVENT(popuphidden
, eXULPopupHidden
, EventNameType_XUL
, eBasicEventClass
)
420 NON_IDL_EVENT(broadcast
, eXULBroadcast
, EventNameType_XUL
, eBasicEventClass
)
421 NON_IDL_EVENT(commandupdate
, eXULCommandUpdate
, EventNameType_XUL
,
423 NON_IDL_EVENT(overflow
, eScrollPortOverflow
, EventNameType_XUL
,
425 NON_IDL_EVENT(underflow
, eScrollPortUnderflow
, EventNameType_XUL
,
427 NON_IDL_EVENT(systemstatusbarclick
, eXULSystemStatusBarClick
, EventNameType_XUL
,
430 // Various SVG events
431 NON_IDL_EVENT(SVGLoad
, eSVGLoad
, EventNameType_None
, eBasicEventClass
)
432 NON_IDL_EVENT(SVGScroll
, eSVGScroll
, EventNameType_None
, eBasicEventClass
)
434 // Only map the ID to the real event name when MESSAGE_TO_EVENT is defined.
435 #ifndef MESSAGE_TO_EVENT
436 EVENT(begin
, eSMILBeginEvent
, EventNameType_SMIL
, eBasicEventClass
)
438 NON_IDL_EVENT(beginEvent
, eSMILBeginEvent
, EventNameType_None
,
440 // Only map the ID to the real event name when MESSAGE_TO_EVENT is defined.
441 #ifndef MESSAGE_TO_EVENT
442 EVENT(end
, eSMILEndEvent
, EventNameType_SMIL
, eBasicEventClass
)
444 NON_IDL_EVENT(endEvent
, eSMILEndEvent
, EventNameType_None
, eSMILTimeEventClass
)
445 // Only map the ID to the real event name when MESSAGE_TO_EVENT is defined.
446 #ifndef MESSAGE_TO_EVENT
447 EVENT(repeat
, eSMILRepeatEvent
, EventNameType_SMIL
, eBasicEventClass
)
449 NON_IDL_EVENT(repeatEvent
, eSMILRepeatEvent
, EventNameType_None
,
452 NON_IDL_EVENT(MozAfterPaint
, eAfterPaint
, EventNameType_None
, eBasicEventClass
)
454 NON_IDL_EVENT(MozScrolledAreaChanged
, eScrolledAreaChanged
, EventNameType_None
,
455 eScrollAreaEventClass
)
457 NON_IDL_EVENT(gamepadbuttondown
, eGamepadButtonDown
, EventNameType_None
,
459 NON_IDL_EVENT(gamepadbuttonup
, eGamepadButtonUp
, EventNameType_None
,
461 NON_IDL_EVENT(gamepadaxismove
, eGamepadAxisMove
, EventNameType_None
,
463 WINDOW_EVENT(gamepadconnected
, eGamepadConnected
, EventNameType_None
,
465 WINDOW_EVENT(gamepaddisconnected
, eGamepadDisconnected
, EventNameType_None
,
468 // Simple gesture events
469 NON_IDL_EVENT(MozSwipeGestureMayStart
, eSwipeGestureMayStart
,
470 EventNameType_None
, eSimpleGestureEventClass
)
471 NON_IDL_EVENT(MozSwipeGestureStart
, eSwipeGestureStart
, EventNameType_None
,
472 eSimpleGestureEventClass
)
473 NON_IDL_EVENT(MozSwipeGestureUpdate
, eSwipeGestureUpdate
, EventNameType_None
,
474 eSimpleGestureEventClass
)
475 NON_IDL_EVENT(MozSwipeGestureEnd
, eSwipeGestureEnd
, EventNameType_None
,
476 eSimpleGestureEventClass
)
477 NON_IDL_EVENT(MozSwipeGesture
, eSwipeGesture
, EventNameType_None
,
478 eSimpleGestureEventClass
)
479 NON_IDL_EVENT(MozMagnifyGestureStart
, eMagnifyGestureStart
, EventNameType_None
,
480 eSimpleGestureEventClass
)
481 NON_IDL_EVENT(MozMagnifyGestureUpdate
, eMagnifyGestureUpdate
,
482 EventNameType_None
, eSimpleGestureEventClass
)
483 NON_IDL_EVENT(MozMagnifyGesture
, eMagnifyGesture
, EventNameType_None
,
484 eSimpleGestureEventClass
)
485 NON_IDL_EVENT(MozRotateGestureStart
, eRotateGestureStart
, EventNameType_None
,
486 eSimpleGestureEventClass
)
487 NON_IDL_EVENT(MozRotateGestureUpdate
, eRotateGestureUpdate
, EventNameType_None
,
488 eSimpleGestureEventClass
)
489 NON_IDL_EVENT(MozRotateGesture
, eRotateGesture
, EventNameType_None
,
490 eSimpleGestureEventClass
)
491 NON_IDL_EVENT(MozTapGesture
, eTapGesture
, EventNameType_None
,
492 eSimpleGestureEventClass
)
493 NON_IDL_EVENT(MozPressTapGesture
, ePressTapGesture
, EventNameType_None
,
494 eSimpleGestureEventClass
)
495 NON_IDL_EVENT(MozEdgeUIStarted
, eEdgeUIStarted
, EventNameType_None
,
496 eSimpleGestureEventClass
)
497 NON_IDL_EVENT(MozEdgeUICanceled
, eEdgeUICanceled
, EventNameType_None
,
498 eSimpleGestureEventClass
)
499 NON_IDL_EVENT(MozEdgeUICompleted
, eEdgeUICompleted
, EventNameType_None
,
500 eSimpleGestureEventClass
)
502 // CSS Transition & Animation events:
503 EVENT(transitionstart
, eTransitionStart
, EventNameType_All
,
504 eTransitionEventClass
)
505 EVENT(transitionrun
, eTransitionRun
, EventNameType_All
, eTransitionEventClass
)
506 EVENT(transitionend
, eTransitionEnd
, EventNameType_All
, eTransitionEventClass
)
507 EVENT(transitioncancel
, eTransitionCancel
, EventNameType_All
,
508 eTransitionEventClass
)
509 EVENT(animationstart
, eAnimationStart
, EventNameType_All
, eAnimationEventClass
)
510 EVENT(animationend
, eAnimationEnd
, EventNameType_All
, eAnimationEventClass
)
511 EVENT(animationiteration
, eAnimationIteration
, EventNameType_All
,
512 eAnimationEventClass
)
513 EVENT(animationcancel
, eAnimationCancel
, EventNameType_All
,
514 eAnimationEventClass
)
516 // Webkit-prefixed versions of Transition & Animation events, for web compat:
517 EVENT(webkitAnimationEnd
, eWebkitAnimationEnd
, EventNameType_All
,
518 eAnimationEventClass
)
519 EVENT(webkitAnimationIteration
, eWebkitAnimationIteration
, EventNameType_All
,
520 eAnimationEventClass
)
521 EVENT(webkitAnimationStart
, eWebkitAnimationStart
, EventNameType_All
,
522 eAnimationEventClass
)
523 EVENT(webkitTransitionEnd
, eWebkitTransitionEnd
, EventNameType_All
,
524 eTransitionEventClass
)
525 #ifndef MESSAGE_TO_EVENT
526 // These are only here so that IsEventAttributeName() will return the right
527 // thing for these events. We could probably remove them if we used
528 // Element::GetEventNameForAttr on the input to IsEventAttributeName before
529 // looking it up in the hashtable...
530 EVENT(webkitanimationend
, eUnidentifiedEvent
, EventNameType_All
,
531 eAnimationEventClass
)
532 EVENT(webkitanimationiteration
, eUnidentifiedEvent
, EventNameType_All
,
533 eAnimationEventClass
)
534 EVENT(webkitanimationstart
, eUnidentifiedEvent
, EventNameType_All
,
535 eAnimationEventClass
)
536 EVENT(webkittransitionend
, eUnidentifiedEvent
, EventNameType_All
,
537 eTransitionEventClass
)
540 NON_IDL_EVENT(audioprocess
, eAudioProcess
, EventNameType_None
, eBasicEventClass
)
542 NON_IDL_EVENT(complete
, eAudioComplete
, EventNameType_None
, eBasicEventClass
)
544 #ifdef DEFINED_FORWARDED_EVENT
545 # undef DEFINED_FORWARDED_EVENT
546 # undef FORWARDED_EVENT
547 #endif /* DEFINED_FORWARDED_EVENT */
549 #ifdef DEFINED_WINDOW_EVENT
550 # undef DEFINED_WINDOW_EVENT
552 #endif /* DEFINED_WINDOW_EVENT */
554 #ifdef DEFINED_WINDOW_ONLY_EVENT
555 # undef DEFINED_WINDOW_ONLY_EVENT
556 # undef WINDOW_ONLY_EVENT
557 #endif /* DEFINED_WINDOW_ONLY_EVENT */
559 #ifdef DEFINED_TOUCH_EVENT
560 # undef DEFINED_TOUCH_EVENT
562 #endif /* DEFINED_TOUCH_EVENT */
564 #ifdef DEFINED_DOCUMENT_ONLY_EVENT
565 # undef DEFINED_DOCUMENT_ONLY_EVENT
566 # undef DOCUMENT_ONLY_EVENT
567 #endif /* DEFINED_DOCUMENT_ONLY_EVENT */
569 #ifdef DEFINED_NON_IDL_EVENT
570 # undef DEFINED_NON_IDL_EVENT
571 # undef NON_IDL_EVENT
572 #endif /* DEFINED_NON_IDL_EVENT */
574 #ifdef DEFINED_ERROR_EVENT
575 # undef DEFINED_ERROR_EVENT
577 #endif /* DEFINED_ERROR_EVENT */
579 #ifdef DEFINED_BEFOREUNLOAD_EVENT
580 # undef DEFINED_BEFOREUNLOAD_EVENT
581 # undef BEFOREUNLOAD_EVENT
582 #endif /* BEFOREUNLOAD_EVENT */
584 #ifdef MESSAGE_TO_EVENT
586 # undef WINDOW_ONLY_EVENT
588 # undef DOCUMENT_ONLY_EVENT
589 # undef NON_IDL_EVENT
590 #endif /* MESSAGE_TO_EVENT */