Bug 567077 - Fix an assertion failure when the decoder is cloned. r=cpearce
[gecko.git] / widget / nsEvent.h
blob606a645b517194f0af178244211625cadddb2885
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 #ifndef nsEvent_h__
7 #define nsEvent_h__
9 #include "mozilla/StandardInteger.h"
12 * This is in a separate header file because it needs to be included
13 * in many places where including nsGUIEvent.h would bring in many
14 * header files that are totally unnecessary.
17 enum UIStateChangeType {
18 UIStateChangeType_NoChange,
19 UIStateChangeType_Set,
20 UIStateChangeType_Clear
23 /**
24 * Return status for event processors.
27 enum nsEventStatus {
28 /// The event is ignored, do default processing
29 nsEventStatus_eIgnore,
30 /// The event is consumed, don't do default processing
31 nsEventStatus_eConsumeNoDefault,
32 /// The event is consumed, but do default processing
33 nsEventStatus_eConsumeDoDefault
36 /**
37 * sizemode is an adjunct to widget size
39 enum nsSizeMode {
40 nsSizeMode_Normal = 0,
41 nsSizeMode_Minimized,
42 nsSizeMode_Maximized,
43 nsSizeMode_Fullscreen
46 struct nsAlternativeCharCode;
47 struct nsTextRangeStyle;
48 struct nsTextRange;
50 class nsEvent;
51 class nsGUIEvent;
52 class nsScriptErrorEvent;
53 class nsScrollbarEvent;
54 class nsScrollPortEvent;
55 class nsScrollAreaEvent;
56 class nsInputEvent;
57 class nsMouseEvent_base;
58 class nsMouseEvent;
59 class nsDragEvent;
60 class nsKeyEvent;
61 class nsTextEvent;
62 class nsCompositionEvent;
63 class nsMouseScrollEvent;
64 class nsGestureNotifyEvent;
65 class nsQueryContentEvent;
66 class nsFocusEvent;
67 class nsSelectionEvent;
68 class nsContentCommandEvent;
69 class nsMozTouchEvent;
70 class nsTouchEvent;
71 class nsFormEvent;
72 class nsCommandEvent;
73 class nsUIEvent;
74 class nsSimpleGestureEvent;
75 class nsTransitionEvent;
76 class nsAnimationEvent;
77 class nsPluginEvent;
79 namespace mozilla {
80 namespace widget {
82 class WheelEvent;
84 // All modifier keys should be defined here. This is used for managing
85 // modifier states for DOM Level 3 or later.
86 enum Modifier {
87 MODIFIER_ALT = 0x0001,
88 MODIFIER_ALTGRAPH = 0x0002,
89 MODIFIER_CAPSLOCK = 0x0004,
90 MODIFIER_CONTROL = 0x0008,
91 MODIFIER_FN = 0x0010,
92 MODIFIER_META = 0x0020,
93 MODIFIER_NUMLOCK = 0x0040,
94 MODIFIER_SCROLLLOCK = 0x0080,
95 MODIFIER_SHIFT = 0x0100,
96 MODIFIER_SYMBOLLOCK = 0x0200,
97 MODIFIER_OS = 0x0400
100 typedef uint16_t Modifiers;
102 } // namespace widget
103 } // namespace mozilla
105 #define NS_DOM_KEYNAME_ALT "Alt"
106 #define NS_DOM_KEYNAME_ALTGRAPH "AltGraph"
107 #define NS_DOM_KEYNAME_CAPSLOCK "CapsLock"
108 #define NS_DOM_KEYNAME_CONTROL "Control"
109 #define NS_DOM_KEYNAME_FN "Fn"
110 #define NS_DOM_KEYNAME_META "Meta"
111 #define NS_DOM_KEYNAME_NUMLOCK "NumLock"
112 #define NS_DOM_KEYNAME_SCROLLLOCK "ScrollLock"
113 #define NS_DOM_KEYNAME_SHIFT "Shift"
114 #define NS_DOM_KEYNAME_SYMBOLLOCK "SymbolLock"
115 #define NS_DOM_KEYNAME_OS "OS"
117 #endif // nsEvent_h__