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
3 // found in the LICENSE file.
5 // This file intentionally does not have header guards, it's included
6 // inside a macro to generate enum values.
7 // This defines the canonical button mapping order for gamepad-like devices.
9 // TODO(SaurabhK): Consolidate with CanonicalButtonIndex enum in
10 // gamepad_standard_mappings.h, crbug.com/351558.
11 CANONICAL_BUTTON_INDEX(BUTTON_PRIMARY
, 0)
12 CANONICAL_BUTTON_INDEX(BUTTON_SECONDARY
, 1)
13 CANONICAL_BUTTON_INDEX(BUTTON_TERTIARY
, 2)
14 CANONICAL_BUTTON_INDEX(BUTTON_QUATERNARY
, 3)
15 CANONICAL_BUTTON_INDEX(BUTTON_LEFT_SHOULDER
, 4)
16 CANONICAL_BUTTON_INDEX(BUTTON_RIGHT_SHOULDER
, 5)
17 CANONICAL_BUTTON_INDEX(BUTTON_LEFT_TRIGGER
, 6)
18 CANONICAL_BUTTON_INDEX(BUTTON_RIGHT_TRIGGER
, 7)
19 CANONICAL_BUTTON_INDEX(BUTTON_BACK_SELECT
, 8)
20 CANONICAL_BUTTON_INDEX(BUTTON_START
, 9)
21 CANONICAL_BUTTON_INDEX(BUTTON_LEFT_THUMBSTICK
, 10)
22 CANONICAL_BUTTON_INDEX(BUTTON_RIGHT_THUMBSTICK
, 11)
23 CANONICAL_BUTTON_INDEX(BUTTON_DPAD_UP
, 12)
24 CANONICAL_BUTTON_INDEX(BUTTON_DPAD_DOWN
, 13)
25 CANONICAL_BUTTON_INDEX(BUTTON_DPAD_LEFT
, 14)
26 CANONICAL_BUTTON_INDEX(BUTTON_DPAD_RIGHT
, 15)
27 CANONICAL_BUTTON_INDEX(BUTTON_META
, 16)
28 CANONICAL_BUTTON_INDEX(NUM_CANONICAL_BUTTONS
, 17)