[retro-gtk/wip/aplazas/0.13: 5/14] Port AnalogId to C
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/wip/aplazas/0.13: 5/14] Port AnalogId to C
- Date: Wed, 6 Sep 2017 07:02:43 +0000 (UTC)
commit 94f3a27f470f7ae3e789828258bacf0794e5d7aa
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Sep 5 14:40:23 2017 +0200
Port AnalogId to C
retro-gtk/Makefile.am | 3 +++
retro-gtk/input/device.vala | 8 --------
retro-gtk/retro-analog-id.h | 25 +++++++++++++++++++++++++
3 files changed, 28 insertions(+), 8 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index 352c5c5..141d3e7 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -106,6 +106,7 @@ libretro_gtk_la_LIBADD = $(RETRO_GTK_LIBS)
retro_gtkincludedir = $(includedir)/retro-gtk-0.12
retro_gtkinclude_HEADERS = \
+ retro-analog-id.h \
retro-analog-index.h \
retro-device-type.h \
retro-gtk.h \
@@ -139,6 +140,7 @@ Retro-0.12.gir: $(INTROSPECTION_SCANNER) libretro-gtk.la
Retro_0_12_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0 Gtk-3.0 cairo-1.0
Retro_0_12_gir_SCANNERFLAGS = \
--c-include=retro-gtk.h \
+ --c-include=retro-analog-id.h \
--c-include=retro-analog-index.h \
--c-include=retro-device-type.h \
--c-include=retro-joypad-id.h \
@@ -170,6 +172,7 @@ pkgconfig_DATA = retro-gtk-0.12.pc
EXTRA_DIST = \
input/retro-keyboard-key.h \
+ retro-analog-id.h \
retro-analog-index.h \
retro-core.h \
retro-core-view-input-device.h \
diff --git a/retro-gtk/input/device.vala b/retro-gtk/input/device.vala
index c94dac8..bc98db7 100644
--- a/retro-gtk/input/device.vala
+++ b/retro-gtk/input/device.vala
@@ -3,14 +3,6 @@
namespace Retro {
/**
- * The axes of an analog stick.
- */
-public enum AnalogId {
- X,
- Y
-}
-
-/**
* The input types of a mouse.
*/
private enum MouseId {
diff --git a/retro-gtk/retro-analog-id.h b/retro-gtk/retro-analog-id.h
new file mode 100644
index 0000000..9ff1a00
--- /dev/null
+++ b/retro-gtk/retro-analog-id.h
@@ -0,0 +1,25 @@
+// This file is part of retro-gtk. License: GPL-3.0+.
+
+#ifndef RETRO_ANALOG_ID_H
+#define RETRO_ANALOG_ID_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * RetroAnalogId:
+ * @RETRO_ANALOG_ID_X: The X axis of an analog stick.
+ * @RETRO_ANALOG_ID_Y: The Y axis of an analog stick.
+ *
+ * Represents the axes of the analog sticks for the Libretro gamepad.
+ */
+typedef enum
+{
+ RETRO_ANALOG_ID_X,
+ RETRO_ANALOG_ID_Y,
+} RetroAnalogId;
+
+G_END_DECLS
+
+#endif /* RETRO_ANALOG_ID_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]