[gnome-games/wip/abhinavsingh/gamepad-config: 25/35] gamepad: Add GamepadMapping vapi
- From: Abhinav Singh <abhinavsingh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/abhinavsingh/gamepad-config: 25/35] gamepad: Add GamepadMapping vapi
- Date: Tue, 18 Jul 2017 11:35:57 +0000 (UTC)
commit d9588ac0e30251cbaf487e845635eb105d8f2670
Author: theawless <theawless gmail com>
Date: Wed Jun 21 01:57:16 2017 +0530
gamepad: Add GamepadMapping vapi
This will be used to add set_mapping() in Gamepad.
https://bugzilla.gnome.org/show_bug.cgi?id=780754
src/Makefile.am | 2 ++
src/gamepad/gamepad-mapping.vapi | 9 +++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 7a56aec..d2c6029 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,6 +28,7 @@ EXTRA_DIST = \
gamepad/gamepad.vapi \
gamepad/gamepad-dpad.vapi \
gamepad/gamepad-input.vapi \
+ gamepad/gamepad-mapping.vapi \
gamepad/gamepad-monitor.vapi \
gamepad/raw-gamepad.vapi \
$(NULL)
@@ -208,6 +209,7 @@ gnome_games_VALAFLAGS = \
--pkg gamepad \
--pkg gamepad-dpad \
--pkg gamepad-input \
+ --pkg gamepad-mapping \
--pkg gamepad-monitor \
--pkg raw-gamepad \
--gresources $(gresource_file) \
diff --git a/src/gamepad/gamepad-mapping.vapi b/src/gamepad/gamepad-mapping.vapi
new file mode 100644
index 0000000..4bcf883
--- /dev/null
+++ b/src/gamepad/gamepad-mapping.vapi
@@ -0,0 +1,9 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+[CCode (cheader_filename = "gamepad-mapping.h")]
+private class Games.GamepadMapping : GLib.Object {
+ public GamepadMapping.from_sdl_string (string? mapping_string) throws GLib.Error;
+ public void get_dpad_mapping (int dpad_index, int dpad_axis, int dpad_value, ref GamepadInput
destination);
+ public void get_axis_mapping (int axis_number, ref GamepadInput destination);
+ public void get_button_mapping (int button_number, ref GamepadInput destination);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]