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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef SKY_ENGINE_PLATFORM_PLATFORMEVENT_H_ | 26 #ifndef SKY_ENGINE_PLATFORM_PLATFORMEVENT_H_ |
27 #define SKY_ENGINE_PLATFORM_PLATFORMEVENT_H_ | 27 #define SKY_ENGINE_PLATFORM_PLATFORMEVENT_H_ |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 class PlatformEvent { | 31 class PlatformEvent { |
32 public: | 32 public: |
33 enum Type { | 33 enum Type { |
34 NoType = 0, | 34 NoType = 0, |
35 | |
36 // PlatformKeyboardEvent | |
37 KeyDown, | |
38 KeyUp, | |
39 RawKeyDown, | |
40 Char, | |
41 }; | 35 }; |
42 | 36 |
43 enum Modifiers { | 37 enum Modifiers { |
44 AltKey = 1 << 0, | 38 AltKey = 1 << 0, |
45 CtrlKey = 1 << 1, | 39 CtrlKey = 1 << 1, |
46 MetaKey = 1 << 2, | 40 MetaKey = 1 << 2, |
47 ShiftKey = 1 << 3, | 41 ShiftKey = 1 << 3, |
48 }; | 42 }; |
49 | 43 |
50 Type type() const { return static_cast<Type>(m_type); } | 44 Type type() const { return static_cast<Type>(m_type); } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 96 } |
103 | 97 |
104 unsigned m_type; | 98 unsigned m_type; |
105 unsigned m_modifiers; | 99 unsigned m_modifiers; |
106 double m_timestamp; | 100 double m_timestamp; |
107 }; | 101 }; |
108 | 102 |
109 } // namespace blink | 103 } // namespace blink |
110 | 104 |
111 #endif // SKY_ENGINE_PLATFORM_PLATFORMEVENT_H_ | 105 #endif // SKY_ENGINE_PLATFORM_PLATFORMEVENT_H_ |
OLD | NEW |