| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CUSTOM_EVENTS_H | 5 #ifndef CUSTOM_EVENTS_H |
| 6 #define CUSTOM_EVENTS_H | 6 #define CUSTOM_EVENTS_H |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 namespace event_queue { | |
| 13 | |
| 14 // These functions and classes are used to define a non-Pepper set of | 12 // These functions and classes are used to define a non-Pepper set of |
| 15 // events. This is typical of what many developers might do, since it | 13 // events. This is typical of what many developers might do, since it |
| 16 // would be common to convert a Pepper event into some other more | 14 // would be common to convert a Pepper event into some other more |
| 17 // application-specific type of event (SDL, Qt, etc.). | 15 // application-specific type of event (SDL, Qt, etc.). |
| 18 | 16 |
| 19 // Constants used for Event::event_modifers_ (which is an int) | 17 // Constants used for Event::event_modifers_ (which is an int) |
| 20 // are given below. Use powers of 2 so we can use bitwise AND/OR operators. | 18 // are given below. Use powers of 2 so we can use bitwise AND/OR operators. |
| 21 const uint32_t kShiftKeyModifier = 1 << 0; | 19 const uint32_t kShiftKeyModifier = 1 << 0; |
| 22 const uint32_t kControlKeyModifier = 1 << 1; | 20 const uint32_t kControlKeyModifier = 1 << 1; |
| 23 const uint32_t kAltKeyModifier = 1 << 2; | 21 const uint32_t kAltKeyModifier = 1 << 2; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 float radii_y; | 178 float radii_y; |
| 181 float angle; | 179 float angle; |
| 182 float pressure; | 180 float pressure; |
| 183 }; | 181 }; |
| 184 | 182 |
| 185 Kind kind_; | 183 Kind kind_; |
| 186 std::vector<Touch> touches; | 184 std::vector<Touch> touches; |
| 187 double timestamp_; | 185 double timestamp_; |
| 188 }; | 186 }; |
| 189 | 187 |
| 190 } // end namespace | |
| 191 | |
| 192 #endif // CUSTOM_EVENTS_H | 188 #endif // CUSTOM_EVENTS_H |
| OLD | NEW |