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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 AltKey = 1 << 0, | 76 AltKey = 1 << 0, |
77 CtrlKey = 1 << 1, | 77 CtrlKey = 1 << 1, |
78 MetaKey = 1 << 2, | 78 MetaKey = 1 << 2, |
79 ShiftKey = 1 << 3, | 79 ShiftKey = 1 << 3, |
80 | 80 |
81 LeftButtonDown = 1 << 6, | 81 LeftButtonDown = 1 << 6, |
82 MiddleButtonDown = 1 << 7, | 82 MiddleButtonDown = 1 << 7, |
83 RightButtonDown = 1 << 8, | 83 RightButtonDown = 1 << 8, |
84 }; | 84 }; |
85 | 85 |
| 86 enum RailsMode { |
| 87 RailsModeFree = 0, |
| 88 RailsModeHorizontal = 1, |
| 89 RailsModeVertical = 2, |
| 90 }; |
| 91 |
86 Type type() const { return static_cast<Type>(m_type); } | 92 Type type() const { return static_cast<Type>(m_type); } |
87 | 93 |
88 bool shiftKey() const { return m_modifiers & ShiftKey; } | 94 bool shiftKey() const { return m_modifiers & ShiftKey; } |
89 bool ctrlKey() const { return m_modifiers & CtrlKey; } | 95 bool ctrlKey() const { return m_modifiers & CtrlKey; } |
90 bool altKey() const { return m_modifiers & AltKey; } | 96 bool altKey() const { return m_modifiers & AltKey; } |
91 bool metaKey() const { return m_modifiers & MetaKey; } | 97 bool metaKey() const { return m_modifiers & MetaKey; } |
92 | 98 |
93 unsigned modifiers() const { return m_modifiers; } | 99 unsigned modifiers() const { return m_modifiers; } |
94 | 100 |
95 double timestamp() const { return m_timestamp; } | 101 double timestamp() const { return m_timestamp; } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 } | 144 } |
139 | 145 |
140 unsigned m_type; | 146 unsigned m_type; |
141 unsigned m_modifiers; | 147 unsigned m_modifiers; |
142 double m_timestamp; | 148 double m_timestamp; |
143 }; | 149 }; |
144 | 150 |
145 } // namespace blink | 151 } // namespace blink |
146 | 152 |
147 #endif // PlatformEvent_h | 153 #endif // PlatformEvent_h |
OLD | NEW |