[gnome-games] gamepad: Add StandardGamepadButton
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] gamepad: Add StandardGamepadButton
- Date: Mon, 18 Jul 2016 18:53:20 +0000 (UTC)
commit a23eabfbd38a4a043254790acf15b97fb99d6346
Author: Megh Parikh <meghprkh gmail com>
Date: Mon Jul 18 21:55:26 2016 +0530
gamepad: Add StandardGamepadButton
This is an enum representing the buttons of a standard gamepad.
This is part of a series of commits to add gamepad support.
src/Makefile.am | 1 +
src/gamepad/standard-gamepad-button.vala | 75 ++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 0c3f331..ed98cb2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -61,6 +61,7 @@ gnome_games_SOURCES = \
gamepad/raw-gamepad.vala \
gamepad/raw-gamepad-monitor.vala \
gamepad/standard-gamepad-axis.vala \
+ gamepad/standard-gamepad-button.vala \
\
grilo/grilo-cover.vala \
grilo/grilo-media.vala \
diff --git a/src/gamepad/standard-gamepad-button.vala b/src/gamepad/standard-gamepad-button.vala
new file mode 100644
index 0000000..0eb0004
--- /dev/null
+++ b/src/gamepad/standard-gamepad-button.vala
@@ -0,0 +1,75 @@
+// This file is part of GNOME Games. License: GPLv3
+
+private enum Games.StandardGamepadButton {
+ UNKNOWN,
+
+ /**
+ * The button at the bottom of the action pad.
+ */
+ A,
+
+ /**
+ * The button at the right of the action pad.
+ */
+ B,
+
+ /**
+ * The button at the left of the action pad.
+ */
+ X,
+
+ /**
+ * The button at the top of the action pad.
+ */
+ Y,
+
+ /**
+ * The button at the left of the top of the gamepad.
+ */
+ SHOULDER_L,
+
+ /**
+ * The button at the right of the top of the gamepad.
+ */
+ SHOULDER_R,
+
+ /**
+ * The trigger at the left of the top of the gamepad.
+ */
+ TRIGGER_L,
+
+ /**
+ * The trigger at the right of the top of the gamepad.
+ */
+ TRIGGER_R,
+
+ /**
+ * The button at the left of the menu pad.
+ */
+ SELECT,
+
+ /**
+ * The button at the right of the menu pad.
+ */
+ START,
+
+ /**
+ * The button under the left stick.
+ */
+ STICK_L,
+
+ /**
+ * The button under the right stick.
+ */
+ STICK_R,
+
+ DPAD_UP,
+ DPAD_DOWN,
+ DPAD_LEFT,
+ DPAD_RIGHT,
+
+ /**
+ * The button at the center of the menu pad.
+ */
+ HOME,
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]