| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module device.mojom; |
| 6 |
| 7 struct GamepadQuaternion { |
| 8 float x; |
| 9 float y; |
| 10 float z; |
| 11 float w; |
| 12 }; |
| 13 |
| 14 struct GamepadVector { |
| 15 float x; |
| 16 float y; |
| 17 float z; |
| 18 }; |
| 19 |
| 20 struct GamepadButton { |
| 21 bool pressed; |
| 22 bool touched; |
| 23 double value; |
| 24 }; |
| 25 |
| 26 struct GamepadPose { |
| 27 GamepadQuaternion? orientation; |
| 28 GamepadVector? position; |
| 29 GamepadVector? angular_velocity; |
| 30 GamepadVector? linear_velocity; |
| 31 GamepadVector? angular_acceleration; |
| 32 GamepadVector? linear_acceleration; |
| 33 }; |
| 34 |
| 35 enum GamepadHand { |
| 36 GamepadHandNone = 0, |
| 37 GamepadHandLeft = 1, |
| 38 GamepadHandRight = 2 |
| 39 }; |
| 40 |
| 41 struct Gamepad { |
| 42 bool connected; |
| 43 array<uint16> id; |
| 44 uint64 timestamp; |
| 45 array<double> axes; |
| 46 array<GamepadButton> buttons; |
| 47 array<uint16> mapping; |
| 48 GamepadPose? pose; |
| 49 GamepadHand hand; |
| 50 uint32 display_id; |
| 51 }; |
| OLD | NEW |