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 12 matching lines...) Expand all Loading... | |
23 * THE POSSIBILITY OF SUCH DAMAGE. | 23 * THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef PlatformEvent_h | 26 #ifndef PlatformEvent_h |
27 #define PlatformEvent_h | 27 #define PlatformEvent_h |
28 | 28 |
29 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.h" |
30 | 30 |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 class PlatformEvent { | 33 class PLATFORM_EXPORT PlatformEvent { |
34 public: | 34 public: |
35 enum Type { | 35 enum Type { |
36 NoType = 0, | 36 NoType = 0, |
37 | 37 |
38 // PlatformKeyboardEvent | 38 // PlatformKeyboardEvent |
39 KeyDown, | 39 KeyDown, |
40 KeyUp, | 40 KeyUp, |
41 RawKeyDown, | 41 RawKeyDown, |
42 Char, | 42 Char, |
43 | 43 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 if (ctrlKey) | 123 if (ctrlKey) |
124 m_modifiers |= CtrlKey; | 124 m_modifiers |= CtrlKey; |
125 if (altKey) | 125 if (altKey) |
126 m_modifiers |= AltKey; | 126 m_modifiers |= AltKey; |
127 if (metaKey) | 127 if (metaKey) |
128 m_modifiers |= MetaKey; | 128 m_modifiers |= MetaKey; |
129 } | 129 } |
130 | 130 |
131 // Explicit protected destructor so that people don't accidentally | 131 // Explicit protected destructor so that people don't accidentally |
132 // delete a PlatformEvent. | 132 // delete a PlatformEvent. |
133 ~PlatformEvent() | 133 ~PlatformEvent(); |
jamesr
2013/10/08 22:05:06
why do you need to make the destructor out-of-line
| |
134 { | |
135 } | |
136 | 134 |
137 unsigned m_type; | 135 unsigned m_type; |
138 unsigned m_modifiers; | 136 unsigned m_modifiers; |
139 double m_timestamp; | 137 double m_timestamp; |
140 }; | 138 }; |
141 | 139 |
142 } // namespace WebCore | 140 } // namespace WebCore |
143 | 141 |
144 #endif // PlatformEvent_h | 142 #endif // PlatformEvent_h |
OLD | NEW |