OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // and don't indicate explicit depressed state. | 114 // and don't indicate explicit depressed state. |
115 KeyModifiers = SymbolKey | FnKey | OSKey | AltGrKey | MetaKey | AltKey |
CtrlKey | ShiftKey, | 115 KeyModifiers = SymbolKey | FnKey | OSKey | AltGrKey | MetaKey | AltKey |
CtrlKey | ShiftKey, |
116 }; | 116 }; |
117 | 117 |
118 enum RailsMode { | 118 enum RailsMode { |
119 RailsModeFree = 0, | 119 RailsModeFree = 0, |
120 RailsModeHorizontal = 1, | 120 RailsModeHorizontal = 1, |
121 RailsModeVertical = 2, | 121 RailsModeVertical = 2, |
122 }; | 122 }; |
123 | 123 |
| 124 enum DispatchType { |
| 125 Blocking, |
| 126 EventNonBlocking, |
| 127 // All listeners are passive. |
| 128 ListenersNonBlockingPassive, |
| 129 // This value represents a state which would have normally blocking |
| 130 // but was forced to be non-blocking. |
| 131 ListenersForcedNonBlockingPassive, |
| 132 }; |
| 133 |
124 EventType type() const { return static_cast<EventType>(m_type); } | 134 EventType type() const { return static_cast<EventType>(m_type); } |
125 | 135 |
126 bool shiftKey() const { return m_modifiers & ShiftKey; } | 136 bool shiftKey() const { return m_modifiers & ShiftKey; } |
127 bool ctrlKey() const { return m_modifiers & CtrlKey; } | 137 bool ctrlKey() const { return m_modifiers & CtrlKey; } |
128 bool altKey() const { return m_modifiers & AltKey; } | 138 bool altKey() const { return m_modifiers & AltKey; } |
129 bool metaKey() const { return m_modifiers & MetaKey; } | 139 bool metaKey() const { return m_modifiers & MetaKey; } |
130 | 140 |
131 Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers);
} | 141 Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers);
} |
132 | 142 |
133 double timestamp() const { return m_timestamp; } | 143 double timestamp() const { return m_timestamp; } |
(...skipping 27 matching lines...) Expand all Loading... |
161 } | 171 } |
162 | 172 |
163 unsigned m_type; | 173 unsigned m_type; |
164 unsigned m_modifiers; | 174 unsigned m_modifiers; |
165 double m_timestamp; | 175 double m_timestamp; |
166 }; | 176 }; |
167 | 177 |
168 } // namespace blink | 178 } // namespace blink |
169 | 179 |
170 #endif // PlatformEvent_h | 180 #endif // PlatformEvent_h |
OLD | NEW |