[gnome-games/wip/abhinavsingh/gamepad-config: 9/22] gamepad: Add GamepadMapping vapi
- From: Abhinav Singh <abhinavsingh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/abhinavsingh/gamepad-config: 9/22] gamepad: Add GamepadMapping vapi
- Date: Fri, 21 Jul 2017 13:16:58 +0000 (UTC)
commit 6e61c9b11d0c0714f1a48b73c7f025ff5873132f
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.
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 e3ffc01..fcdb3a3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,6 +34,7 @@ EXTRA_DIST = \
gamepad/gamepad-input.h \
gamepad/gamepad-input.vapi \
gamepad/gamepad-mapping.h \
+ gamepad/gamepad-mapping.vapi \
gamepad/gamepad-mapping-error.h \
gamepad/gamepad-mappings-manager.h \
gamepad/gamepad-monitor.h \
@@ -221,6 +222,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]