| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module mojo; | 5 module mojo; |
| 6 | 6 |
| 7 import "geometry/public/interfaces/geometry.mojom"; | 7 import "geometry/public/interfaces/geometry.mojom"; |
| 8 import "input_events/public/interfaces/input_event_constants.mojom"; | 8 import "input_events/public/interfaces/input_event_constants.mojom"; |
| 9 import "input_events/public/interfaces/input_key_codes.mojom"; | 9 import "input_events/public/interfaces/input_key_codes.mojom"; |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 uint16 text; | 43 uint16 text; |
| 44 | 44 |
| 45 // Like |text|, but unmodified by concurrently held modifier keys (except | 45 // Like |text|, but unmodified by concurrently held modifier keys (except |
| 46 // shift). Corresponds to blink::WebKeyboardEvent::unmodifiedText. | 46 // shift). Corresponds to blink::WebKeyboardEvent::unmodifiedText. |
| 47 uint16 unmodified_text; | 47 uint16 unmodified_text; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 struct PointerData { | 50 struct PointerData { |
| 51 int32 pointer_id; | 51 int32 pointer_id; |
| 52 PointerKind kind; | 52 PointerKind kind; |
| 53 // |x| and |y| are in the coordinate system of the View. |
| 53 float x; | 54 float x; |
| 54 float y; | 55 float y; |
| 56 // |screen_x| and |screen_y| are in screen coordinates. |
| 57 float screen_x; |
| 58 float screen_y; |
| 55 float pressure; | 59 float pressure; |
| 56 float radius_major; | 60 float radius_major; |
| 57 float radius_minor; | 61 float radius_minor; |
| 58 float orientation; | 62 float orientation; |
| 59 // Used for devices that support wheels. Ranges from -1 to 1. | 63 // Used for devices that support wheels. Ranges from -1 to 1. |
| 60 float horizontal_wheel; | 64 float horizontal_wheel; |
| 61 float vertical_wheel; | 65 float vertical_wheel; |
| 62 }; | 66 }; |
| 63 | 67 |
| 64 struct Event { | 68 struct Event { |
| 65 // TODO(sky): rename to type. | 69 // TODO(sky): rename to type. |
| 66 EventType action; | 70 EventType action; |
| 67 // TODO(sky): parts of this should move to PointerData. | 71 // TODO(sky): parts of this should move to PointerData. |
| 68 EventFlags flags; | 72 EventFlags flags; |
| 69 int64 time_stamp; | 73 int64 time_stamp; |
| 70 KeyData? key_data; | 74 KeyData? key_data; |
| 71 PointerData? pointer_data; | 75 PointerData? pointer_data; |
| 72 }; | 76 }; |
| OLD | NEW |