Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: device/gamepad/public/interfaces/gamepad.mojom

Issue 2492183002: Add struct_traits and typemap for blink::WebGamepad (Closed)
Patch Set: code rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 };
OLDNEW
« no previous file with comments | « device/gamepad/public/interfaces/OWNERS ('k') | device/gamepad/public/interfaces/gamepad.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698