Bug 1517200 [wpt PR 14691] - Less restrictive internal column count limit., a=testonly
[gecko.git] / widget / EventMessageList.h
blob96fef1ed9b09fc82a5076e98631861b19c13f9ee
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /**
7 * This header file lists up all event messages.
8 * Before including this header file, you should define:
9 * NS_EVENT_MESSAGE(aMessage)
11 * Additionally, you can specify following macro for e*First and e*Last.
12 * NS_EVENT_MESSAGE_FIRST_LAST(aMessage, aFirst, aLast)
13 * This is optional, if you need only actual event messages, you don't need
14 * to define this macro.
16 * Naming rules of the event messages:
17 * 0. Starting with "e" prefix and use camelcase.
18 * 1. Basically, use same name as the DOM name which is fired at dispatching
19 * the event.
20 * 2. If the event message name becomes too generic, e.g., "eInvalid", that may
21 * conflict with another enum's item name, append something after the "e"
22 * prefix, e.g., "eFormInvalid".
25 #ifndef NS_EVENT_MESSAGE_FIRST_LAST
26 # define UNDEF_NS_EVENT_MESSAGE_FIRST_LAST 1
27 # define NS_EVENT_MESSAGE_FIRST_LAST(aMessage, aFirst, aLast)
28 #endif
30 NS_EVENT_MESSAGE(eVoidEvent)
32 // This is a dummy event message for all event listener implementation in
33 // EventListenerManager.
34 NS_EVENT_MESSAGE(eAllEvents)
36 // Widget may be destroyed
37 NS_EVENT_MESSAGE(eWindowClose)
39 NS_EVENT_MESSAGE(eKeyPress)
40 NS_EVENT_MESSAGE(eKeyUp)
41 NS_EVENT_MESSAGE(eKeyDown)
43 // These messages are dispatched when PluginInstaceChild receives native
44 // keyboard events directly and it posts the information to the widget.
45 // These messages shouldn't be handled by content and non-reserved chrome
46 // event handlers.
47 NS_EVENT_MESSAGE(eKeyDownOnPlugin)
48 NS_EVENT_MESSAGE(eKeyUpOnPlugin)
50 // This message is sent after a content process handles a key event or accesskey
51 // to indicate that an potential accesskey was not found. The parent process may
52 // then respond by, for example, opening menus and processing other shortcuts.
53 // It inherits its properties from a keypress event.
54 NS_EVENT_MESSAGE(eAccessKeyNotFound)
56 NS_EVENT_MESSAGE(eResize)
57 NS_EVENT_MESSAGE(eScroll)
58 NS_EVENT_MESSAGE(eMozVisualResize)
59 NS_EVENT_MESSAGE(eMozVisualScroll)
61 // Application installation
62 NS_EVENT_MESSAGE(eInstall)
63 NS_EVENT_MESSAGE(eAppInstalled)
65 // A plugin was clicked or otherwise focused. ePluginActivate should be
66 // used when the window is not active. ePluginFocus should be used when
67 // the window is active. In the latter case, the dispatcher of the event
68 // is expected to ensure that the plugin's widget is focused beforehand.
69 NS_EVENT_MESSAGE(ePluginActivate)
70 NS_EVENT_MESSAGE(ePluginFocus)
72 NS_EVENT_MESSAGE(eOffline)
73 NS_EVENT_MESSAGE(eOnline)
75 NS_EVENT_MESSAGE(eLanguageChange)
77 NS_EVENT_MESSAGE(eMouseMove)
78 NS_EVENT_MESSAGE(eMouseUp)
79 NS_EVENT_MESSAGE(eMouseDown)
80 NS_EVENT_MESSAGE(eMouseEnterIntoWidget)
81 NS_EVENT_MESSAGE(eMouseExitFromWidget)
82 NS_EVENT_MESSAGE(eMouseDoubleClick)
83 NS_EVENT_MESSAGE(eMouseClick)
84 NS_EVENT_MESSAGE(eMouseAuxClick)
85 // eMouseActivate is fired when the widget is activated by a click.
86 NS_EVENT_MESSAGE(eMouseActivate)
87 NS_EVENT_MESSAGE(eMouseOver)
88 NS_EVENT_MESSAGE(eMouseOut)
89 NS_EVENT_MESSAGE(eMouseHitTest)
90 NS_EVENT_MESSAGE(eMouseEnter)
91 NS_EVENT_MESSAGE(eMouseLeave)
92 NS_EVENT_MESSAGE(eMouseTouchDrag)
93 NS_EVENT_MESSAGE(eMouseLongTap)
94 NS_EVENT_MESSAGE_FIRST_LAST(eMouseEvent, eMouseMove, eMouseLongTap)
96 // Pointer spec events
97 NS_EVENT_MESSAGE(ePointerMove)
98 NS_EVENT_MESSAGE(ePointerUp)
99 NS_EVENT_MESSAGE(ePointerDown)
100 NS_EVENT_MESSAGE(ePointerOver)
101 NS_EVENT_MESSAGE(ePointerOut)
102 NS_EVENT_MESSAGE(ePointerEnter)
103 NS_EVENT_MESSAGE(ePointerLeave)
104 NS_EVENT_MESSAGE(ePointerCancel)
105 NS_EVENT_MESSAGE(ePointerGotCapture)
106 NS_EVENT_MESSAGE(ePointerLostCapture)
107 NS_EVENT_MESSAGE_FIRST_LAST(ePointerEvent, ePointerMove, ePointerLostCapture)
109 NS_EVENT_MESSAGE(eContextMenu)
111 NS_EVENT_MESSAGE(eLoad)
112 NS_EVENT_MESSAGE(eUnload)
113 NS_EVENT_MESSAGE(eHashChange)
114 NS_EVENT_MESSAGE(eImageAbort)
115 NS_EVENT_MESSAGE(eLoadError)
116 NS_EVENT_MESSAGE(eLoadEnd)
117 NS_EVENT_MESSAGE(ePopState)
118 NS_EVENT_MESSAGE(eStorage)
119 NS_EVENT_MESSAGE(eBeforeUnload)
120 NS_EVENT_MESSAGE(eReadyStateChange)
122 NS_EVENT_MESSAGE(eFormSubmit)
123 NS_EVENT_MESSAGE(eFormReset)
124 NS_EVENT_MESSAGE(eFormChange)
125 NS_EVENT_MESSAGE(eFormSelect)
126 NS_EVENT_MESSAGE(eFormInvalid)
127 NS_EVENT_MESSAGE(eFormCheckboxStateChange)
128 NS_EVENT_MESSAGE(eFormRadioStateChange)
130 // Need separate focus/blur notifications for non-native widgets
131 NS_EVENT_MESSAGE(eFocus)
132 NS_EVENT_MESSAGE(eBlur)
133 NS_EVENT_MESSAGE(eFocusIn)
134 NS_EVENT_MESSAGE(eFocusOut)
136 NS_EVENT_MESSAGE(eDragEnter)
137 NS_EVENT_MESSAGE(eDragOver)
138 NS_EVENT_MESSAGE(eDragExit)
139 NS_EVENT_MESSAGE(eDrag)
140 NS_EVENT_MESSAGE(eDragEnd)
141 NS_EVENT_MESSAGE(eDragStart)
142 NS_EVENT_MESSAGE(eDrop)
143 NS_EVENT_MESSAGE(eDragLeave)
144 NS_EVENT_MESSAGE_FIRST_LAST(eDragDropEvent, eDragEnter, eDragLeave)
146 // XUL specific events
147 NS_EVENT_MESSAGE(eXULPopupShowing)
148 NS_EVENT_MESSAGE(eXULPopupShown)
149 NS_EVENT_MESSAGE(eXULPopupPositioned)
150 NS_EVENT_MESSAGE(eXULPopupHiding)
151 NS_EVENT_MESSAGE(eXULPopupHidden)
152 NS_EVENT_MESSAGE(eXULBroadcast)
153 NS_EVENT_MESSAGE(eXULCommandUpdate)
155 // Legacy mouse scroll (wheel) events
156 NS_EVENT_MESSAGE(eLegacyMouseLineOrPageScroll)
157 NS_EVENT_MESSAGE(eLegacyMousePixelScroll)
159 NS_EVENT_MESSAGE(eScrollPortUnderflow)
160 NS_EVENT_MESSAGE(eScrollPortOverflow)
162 NS_EVENT_MESSAGE(eLegacySubtreeModified)
163 NS_EVENT_MESSAGE(eLegacyNodeInserted)
164 NS_EVENT_MESSAGE(eLegacyNodeRemoved)
165 NS_EVENT_MESSAGE(eLegacyNodeRemovedFromDocument)
166 NS_EVENT_MESSAGE(eLegacyNodeInsertedIntoDocument)
167 NS_EVENT_MESSAGE(eLegacyAttrModified)
168 NS_EVENT_MESSAGE(eLegacyCharacterDataModified)
169 NS_EVENT_MESSAGE_FIRST_LAST(eLegacyMutationEvent, eLegacySubtreeModified,
170 eLegacyCharacterDataModified)
172 NS_EVENT_MESSAGE(eUnidentifiedEvent)
174 // composition events
175 NS_EVENT_MESSAGE(eCompositionStart)
176 // eCompositionEnd is the message for DOM compositionend event.
177 // This event should NOT be dispatched from widget if eCompositionCommit
178 // is available.
179 NS_EVENT_MESSAGE(eCompositionEnd)
180 // eCompositionUpdate is the message for DOM compositionupdate event.
181 // This event should NOT be dispatched from widget since it will be dispatched
182 // by mozilla::TextComposition automatically if eCompositionChange event
183 // will change composition string.
184 NS_EVENT_MESSAGE(eCompositionUpdate)
185 // eCompositionChange is the message for representing a change of
186 // composition string. This should be dispatched from widget even if
187 // composition string isn't changed but the ranges are changed. This causes
188 // a DOM "text" event which is a non-standard DOM event.
189 NS_EVENT_MESSAGE(eCompositionChange)
190 // eCompositionCommitAsIs is the message for representing a commit of
191 // composition string. TextComposition will commit composition with the
192 // last data. TextComposition will dispatch this event to the DOM tree as
193 // eCompositionChange without clause information. After that,
194 // eCompositionEnd will be dispatched automatically.
195 // Its mData and mRanges should be empty and nullptr.
196 NS_EVENT_MESSAGE(eCompositionCommitAsIs)
197 // eCompositionCommit is the message for representing a commit of
198 // composition string with its mData value. TextComposition will dispatch this
199 // event to the DOM tree as eCompositionChange without clause information.
200 // After that, eCompositionEnd will be dispatched automatically.
201 // Its mRanges should be nullptr.
202 NS_EVENT_MESSAGE(eCompositionCommit)
203 // eCompositionCommitRequestHandled is NOT used with any Widget*Event.
204 // This is used only by PBrowser.OnEventNeedingAckHandled(). If active IME
205 // commits composition synchronously, TabParent returns the commit string
206 // to the remote process synchronously. Then, TabChild dispatches
207 // eCompositionCommit in the remote process. Finally, this message is sent
208 // to TabParent. (If IME commits composition asynchronously, this message is
209 // not used.)
210 NS_EVENT_MESSAGE(eCompositionCommitRequestHandled)
212 // Following events are defined for deprecated DOM events which are using
213 // InternalUIEvent class.
214 // DOMActivate (mapped with the DOM event and used internally)
215 NS_EVENT_MESSAGE(eLegacyDOMActivate)
216 // DOMFocusIn (only mapped with the DOM event)
217 NS_EVENT_MESSAGE(eLegacyDOMFocusIn)
218 // DOMFocusOut (only mapped with the DOM event)
219 NS_EVENT_MESSAGE(eLegacyDOMFocusOut)
221 // pagetransition events
222 NS_EVENT_MESSAGE(ePageShow)
223 NS_EVENT_MESSAGE(ePageHide)
225 // SVG events
226 NS_EVENT_MESSAGE(eSVGLoad)
227 NS_EVENT_MESSAGE(eSVGUnload)
228 NS_EVENT_MESSAGE(eSVGResize)
229 NS_EVENT_MESSAGE(eSVGScroll)
231 // SVG Zoom events
232 NS_EVENT_MESSAGE(eSVGZoom)
234 // XUL command events
235 NS_EVENT_MESSAGE(eXULCommand)
237 // Cut, copy, paste events
238 NS_EVENT_MESSAGE(eCopy)
239 NS_EVENT_MESSAGE(eCut)
240 NS_EVENT_MESSAGE(ePaste)
241 NS_EVENT_MESSAGE(ePasteNoFormatting)
243 // Query for the selected text information, it return the selection offset,
244 // selection length and selected text.
245 NS_EVENT_MESSAGE(eQuerySelectedText)
246 // Query for the text content of specified range, it returns actual lengh (if
247 // the specified range is too long) and the text of the specified range.
248 // Returns the entire text if requested length > actual length.
249 NS_EVENT_MESSAGE(eQueryTextContent)
250 // Query for the caret rect of nth insertion point. The offset of the result is
251 // relative position from the top level widget.
252 NS_EVENT_MESSAGE(eQueryCaretRect)
253 // Query for the bounding rect of a range of characters. This works on any
254 // valid character range given offset and length. Result is relative to top
255 // level widget coordinates
256 NS_EVENT_MESSAGE(eQueryTextRect)
257 // Query for the bounding rect array of a range of characters.
258 // Thiis similar event of eQueryTextRect.
259 NS_EVENT_MESSAGE(eQueryTextRectArray)
260 // Query for the bounding rect of the current focused frame. Result is relative
261 // to top level widget coordinates
262 NS_EVENT_MESSAGE(eQueryEditorRect)
263 // Query for the current state of the content. The particular members of
264 // mReply that are set for each query content event will be valid on success.
265 NS_EVENT_MESSAGE(eQueryContentState)
266 // Query for the selection in the form of a nsITransferable.
267 NS_EVENT_MESSAGE(eQuerySelectionAsTransferable)
268 // Query for character at a point. This returns the character offset, its
269 // rect and also tentative caret point if the point is clicked. The point is
270 // specified by Event::mRefPoint.
271 NS_EVENT_MESSAGE(eQueryCharacterAtPoint)
272 // Query if the DOM element under Event::mRefPoint belongs to our widget
273 // or not.
274 NS_EVENT_MESSAGE(eQueryDOMWidgetHittest)
276 // Video events
277 NS_EVENT_MESSAGE(eLoadStart)
278 NS_EVENT_MESSAGE(eProgress)
279 NS_EVENT_MESSAGE(eSuspend)
280 NS_EVENT_MESSAGE(eEmptied)
281 NS_EVENT_MESSAGE(eStalled)
282 NS_EVENT_MESSAGE(ePlay)
283 NS_EVENT_MESSAGE(ePause)
284 NS_EVENT_MESSAGE(eLoadedMetaData)
285 NS_EVENT_MESSAGE(eLoadedData)
286 NS_EVENT_MESSAGE(eWaiting)
287 NS_EVENT_MESSAGE(ePlaying)
288 NS_EVENT_MESSAGE(eCanPlay)
289 NS_EVENT_MESSAGE(eCanPlayThrough)
290 NS_EVENT_MESSAGE(eSeeking)
291 NS_EVENT_MESSAGE(eSeeked)
292 NS_EVENT_MESSAGE(eTimeUpdate)
293 NS_EVENT_MESSAGE(eEnded)
294 NS_EVENT_MESSAGE(eRateChange)
295 NS_EVENT_MESSAGE(eDurationChange)
296 NS_EVENT_MESSAGE(eVolumeChange)
298 // paint notification events
299 NS_EVENT_MESSAGE(eAfterPaint)
301 // Simple gesture events
302 NS_EVENT_MESSAGE(eSwipeGestureMayStart)
303 NS_EVENT_MESSAGE(eSwipeGestureStart)
304 NS_EVENT_MESSAGE(eSwipeGestureUpdate)
305 NS_EVENT_MESSAGE(eSwipeGestureEnd)
306 NS_EVENT_MESSAGE(eSwipeGesture)
307 NS_EVENT_MESSAGE(eMagnifyGestureStart)
308 NS_EVENT_MESSAGE(eMagnifyGestureUpdate)
309 NS_EVENT_MESSAGE(eMagnifyGesture)
310 NS_EVENT_MESSAGE(eRotateGestureStart)
311 NS_EVENT_MESSAGE(eRotateGestureUpdate)
312 NS_EVENT_MESSAGE(eRotateGesture)
313 NS_EVENT_MESSAGE(eTapGesture)
314 NS_EVENT_MESSAGE(ePressTapGesture)
315 NS_EVENT_MESSAGE(eEdgeUIStarted)
316 NS_EVENT_MESSAGE(eEdgeUICanceled)
317 NS_EVENT_MESSAGE(eEdgeUICompleted)
319 // These are used to send native events to plugins.
320 NS_EVENT_MESSAGE(ePluginInputEvent)
322 // Events to manipulate selection (WidgetSelectionEvent)
323 // Clear any previous selection and set the given range as the selection
324 NS_EVENT_MESSAGE(eSetSelection)
326 // Events of commands for the contents
327 NS_EVENT_MESSAGE(eContentCommandCut)
328 NS_EVENT_MESSAGE(eContentCommandCopy)
329 NS_EVENT_MESSAGE(eContentCommandPaste)
330 NS_EVENT_MESSAGE(eContentCommandDelete)
331 NS_EVENT_MESSAGE(eContentCommandUndo)
332 NS_EVENT_MESSAGE(eContentCommandRedo)
333 NS_EVENT_MESSAGE(eContentCommandPasteTransferable)
334 NS_EVENT_MESSAGE(eContentCommandLookUpDictionary)
335 // eContentCommandScroll scrolls the nearest scrollable element to the
336 // currently focused content or latest DOM selection. This would normally be
337 // the same element scrolled by keyboard scroll commands, except that this event
338 // will scroll an element scrollable in either direction. I.e., if the nearest
339 // scrollable ancestor element can only be scrolled vertically, and horizontal
340 // scrolling is requested using this event, no scrolling will occur.
341 NS_EVENT_MESSAGE(eContentCommandScroll)
343 // Event to gesture notification
344 NS_EVENT_MESSAGE(eGestureNotify)
346 NS_EVENT_MESSAGE(eScrolledAreaChanged)
348 // CSS Transition & Animation events:
349 NS_EVENT_MESSAGE(eTransitionStart)
350 NS_EVENT_MESSAGE(eTransitionRun)
351 NS_EVENT_MESSAGE(eTransitionEnd)
352 NS_EVENT_MESSAGE(eTransitionCancel)
353 NS_EVENT_MESSAGE(eAnimationStart)
354 NS_EVENT_MESSAGE(eAnimationEnd)
355 NS_EVENT_MESSAGE(eAnimationIteration)
356 NS_EVENT_MESSAGE(eAnimationCancel)
358 // Webkit-prefixed versions of Transition & Animation events, for web compat:
359 NS_EVENT_MESSAGE(eWebkitTransitionEnd)
360 NS_EVENT_MESSAGE(eWebkitAnimationStart)
361 NS_EVENT_MESSAGE(eWebkitAnimationEnd)
362 NS_EVENT_MESSAGE(eWebkitAnimationIteration)
364 NS_EVENT_MESSAGE(eSMILBeginEvent)
365 NS_EVENT_MESSAGE(eSMILEndEvent)
366 NS_EVENT_MESSAGE(eSMILRepeatEvent)
368 NS_EVENT_MESSAGE(eAudioProcess)
369 NS_EVENT_MESSAGE(eAudioComplete)
371 // script notification events
372 NS_EVENT_MESSAGE(eBeforeScriptExecute)
373 NS_EVENT_MESSAGE(eAfterScriptExecute)
375 NS_EVENT_MESSAGE(eBeforePrint)
376 NS_EVENT_MESSAGE(eAfterPrint)
378 NS_EVENT_MESSAGE(eMessage)
379 NS_EVENT_MESSAGE(eMessageError)
381 // Menu open event
382 NS_EVENT_MESSAGE(eOpen)
384 // Device motion and orientation
385 NS_EVENT_MESSAGE(eDeviceOrientation)
386 NS_EVENT_MESSAGE(eAbsoluteDeviceOrientation)
387 NS_EVENT_MESSAGE(eDeviceMotion)
388 NS_EVENT_MESSAGE(eDeviceProximity)
389 NS_EVENT_MESSAGE(eUserProximity)
390 NS_EVENT_MESSAGE(eDeviceLight)
391 #if defined(MOZ_WIDGET_ANDROID)
392 NS_EVENT_MESSAGE(eOrientationChange)
393 #endif
395 // WebVR events
396 NS_EVENT_MESSAGE(eVRDisplayActivate)
397 NS_EVENT_MESSAGE(eVRDisplayDeactivate)
398 NS_EVENT_MESSAGE(eVRDisplayConnect)
399 NS_EVENT_MESSAGE(eVRDisplayDisconnect)
400 NS_EVENT_MESSAGE(eVRDisplayPresentChange)
402 NS_EVENT_MESSAGE(eShow)
404 // Fullscreen DOM API
405 NS_EVENT_MESSAGE(eFullscreenChange)
406 NS_EVENT_MESSAGE(eFullscreenError)
407 NS_EVENT_MESSAGE(eMozFullscreenChange)
408 NS_EVENT_MESSAGE(eMozFullscreenError)
410 NS_EVENT_MESSAGE(eTouchStart)
411 NS_EVENT_MESSAGE(eTouchMove)
412 NS_EVENT_MESSAGE(eTouchEnd)
413 NS_EVENT_MESSAGE(eTouchCancel)
414 NS_EVENT_MESSAGE(eTouchPointerCancel)
416 // Pointerlock DOM API
417 NS_EVENT_MESSAGE(ePointerLockChange)
418 NS_EVENT_MESSAGE(ePointerLockError)
419 NS_EVENT_MESSAGE(eMozPointerLockChange)
420 NS_EVENT_MESSAGE(eMozPointerLockError)
422 // eWheel is the event message of DOM wheel event.
423 NS_EVENT_MESSAGE(eWheel)
424 // eWheelOperationStart may be dispatched when user starts to operate mouse
425 // wheel. This won't be fired on some platforms which don't have corresponding
426 // native event.
427 NS_EVENT_MESSAGE(eWheelOperationStart)
428 // eWheelOperationEnd may be dispatched when user ends or cancels operating
429 // mouse wheel. This won't be fired on some platforms which don't have
430 // corresponding native event.
431 NS_EVENT_MESSAGE(eWheelOperationEnd)
433 // System time is changed
434 NS_EVENT_MESSAGE(eTimeChange)
436 // Network packet events.
437 NS_EVENT_MESSAGE(eNetworkUpload)
438 NS_EVENT_MESSAGE(eNetworkDownload)
440 // MediaRecorder events.
441 NS_EVENT_MESSAGE(eMediaRecorderDataAvailable)
442 NS_EVENT_MESSAGE(eMediaRecorderWarning)
443 NS_EVENT_MESSAGE(eMediaRecorderStop)
445 // Gamepad input events
446 NS_EVENT_MESSAGE(eGamepadButtonDown)
447 NS_EVENT_MESSAGE(eGamepadButtonUp)
448 NS_EVENT_MESSAGE(eGamepadAxisMove)
449 NS_EVENT_MESSAGE(eGamepadConnected)
450 NS_EVENT_MESSAGE(eGamepadDisconnected)
451 NS_EVENT_MESSAGE_FIRST_LAST(eGamepadEvent, eGamepadButtonDown,
452 eGamepadDisconnected)
454 // input and beforeinput events.
455 NS_EVENT_MESSAGE(eEditorInput)
457 // selection events
458 NS_EVENT_MESSAGE(eSelectStart)
459 NS_EVENT_MESSAGE(eSelectionChange)
461 // visibility change
462 NS_EVENT_MESSAGE(eVisibilityChange)
464 // Details element events.
465 NS_EVENT_MESSAGE(eToggle)
467 // Dialog element events.
468 NS_EVENT_MESSAGE(eClose)
470 // Marquee element events.
471 NS_EVENT_MESSAGE(eMarqueeBounce)
472 NS_EVENT_MESSAGE(eMarqueeStart)
473 NS_EVENT_MESSAGE(eMarqueeFinish)
475 #ifdef UNDEF_NS_EVENT_MESSAGE_FIRST_LAST
476 # undef UNDEF_NS_EVENT_MESSAGE_FIRST_LAST
477 # undef NS_EVENT_MESSAGE_FIRST_LAST
478 #endif