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

Side by Side Diff: ui/events/ozone/gamepad/gamepad_mapping.h

Issue 2805793002: ozone: evdev: Add gamepad support (Closed)
Patch Set: Support Gamepad in Ozone. Created 3 years, 7 months 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 (c) 2017 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 #ifndef UI_EVENTS_OZONE_GAMEPAD_GAMEPAD_MAPPING_H_
6 #define UI_EVENTS_OZONE_GAMEPAD_GAMEPAD_MAPPING_H_
7
8 #include "ui/events/ozone/gamepad/webgamepad_constants.h"
9
10 namespace ui {
11
12 // The following HATX and HATY is not part of web gamepad definition, but we
13 // need to specially treat them cause HAT_Y can be mapped to DPAD_UP or
14 // DPAD_DOWN, and HAT_X can be mapped to DAPD_LEFT or DPAD_RIGHT.
15 constexpr int kHAT_X = 4;
16 constexpr int kHAT_Y = 5;
17
18 typedef bool (*GamepadMapper)(uint16_t key,
19 uint16_t code,
20 GamepadEventType* mapped_type,
21 uint16_t* mapped_code);
22
23 // This function get the best mapper for the gamepad vendor_id and product_id.
scottmg 2017/05/01 18:20:53 get -> gets
jkwang 2017/05/01 22:21:57 Done.
24 GamepadMapper GetGamepadMapper(uint16_t vendor_id, uint16_t product_id);
25
26 }; // namespace ui
scottmg 2017/05/01 18:20:53 No ;.
jkwang 2017/05/01 22:21:57 Done.
27
28 #endif // UI_EVENTS_OZONE_GAMEPAD_GAMEPAD_MAPPING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698