[gnome-games/wip/abhinavsingh/gamepad-config: 14/22] gamepad: Add GamepadMappingsManager vapi



commit 020145aacbab86d5d194d33bab371bc338b56ab0
Author: theawless <theawless gmail com>
Date:   Wed Jun 21 05:27:08 2017 +0530

    gamepad: Add GamepadMappingsManager vapi
    
    This will be used to save the sdl_string through UI code.

 src/Makefile.am                           |    2 ++
 src/gamepad/gamepad-mappings-manager.vapi |   11 +++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index fcdb3a3..7c8aa4a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,6 +37,7 @@ EXTRA_DIST = \
        gamepad/gamepad-mapping.vapi \
        gamepad/gamepad-mapping-error.h \
        gamepad/gamepad-mappings-manager.h \
+       gamepad/gamepad-mappings-manager.vapi \
        gamepad/gamepad-monitor.h \
        gamepad/gamepad-monitor.vapi \
        gamepad/linux/linux-raw-gamepad.h \
@@ -223,6 +224,7 @@ gnome_games_VALAFLAGS = \
        --pkg gamepad-dpad \
        --pkg gamepad-input \
        --pkg gamepad-mapping \
+       --pkg gamepad-mappings-manager \
        --pkg gamepad-monitor \
        --pkg raw-gamepad \
        --gresources $(gresource_file) \
diff --git a/src/gamepad/gamepad-mappings-manager.vapi b/src/gamepad/gamepad-mappings-manager.vapi
new file mode 100644
index 0000000..1f18624
--- /dev/null
+++ b/src/gamepad/gamepad-mappings-manager.vapi
@@ -0,0 +1,11 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+[CCode (cheader_filename = "gamepad-mappings-manager.h")]
+private class Games.GamepadMappingsManager : GLib.Object {
+       public static GamepadMappingsManager get_instance ();
+       public string? get_mapping (string guid);
+       public string? get_default_mapping (string guid);
+       public string? get_user_mapping (string guid);
+       public void save_mapping (string guid, string name, string mapping_string);
+       public void delete_mapping (string guid);
+}
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]