[retro-gtk/wip/aplazas/0.13: 6/14] Port MouseId to C
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/wip/aplazas/0.13: 6/14] Port MouseId to C
- Date: Wed, 6 Sep 2017 07:02:48 +0000 (UTC)
commit 8dc889a84a9b37d2aeabb90f95c3a43734ec7202
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Sep 5 14:52:10 2017 +0200
Port MouseId to C
retro-gtk/Makefile.am | 3 ++
retro-gtk/input/device.vala | 15 -------------
retro-gtk/retro-core-view-extern.c | 1 +
retro-gtk/retro-mouse-id.h | 39 ++++++++++++++++++++++++++++++++++++
4 files changed, 43 insertions(+), 15 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index 141d3e7..b6816bb 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -111,6 +111,7 @@ retro_gtkinclude_HEADERS = \
retro-device-type.h \
retro-gtk.h \
retro-joypad-id.h \
+ retro-mouse-id.h \
$(NULL)
# Add unstable API guard
@@ -144,6 +145,7 @@ Retro_0_12_gir_SCANNERFLAGS = \
--c-include=retro-analog-index.h \
--c-include=retro-device-type.h \
--c-include=retro-joypad-id.h \
+ --c-include=retro-mouse-id.h \
--pkg-export=retro-gtk-0.12 \
$(NULL)
Retro_0_12_gir_CFLAGS = -DRETRO_GTK_USE_UNSTABLE_API $(retro_gtk_CFLAGS)
@@ -181,6 +183,7 @@ EXTRA_DIST = \
retro-disk-control-callback.h \
retro-game-info.h \
retro-module.h \
+ retro-mouse-id.h \
retro-rotation.h \
retro-system-av-info.h \
retro-system-info.h \
diff --git a/retro-gtk/input/device.vala b/retro-gtk/input/device.vala
index bc98db7..a8165eb 100644
--- a/retro-gtk/input/device.vala
+++ b/retro-gtk/input/device.vala
@@ -3,21 +3,6 @@
namespace Retro {
/**
- * The input types of a mouse.
- */
-private enum MouseId {
- X,
- Y,
- LEFT,
- RIGHT,
- WHEELUP,
- WHEELDOWN,
- MIDDLE,
- HORIZ_WHEELUP,
- HORIZ_WHEELDOWN,
-}
-
-/**
* The input types of a lightgun.
*/
private enum LightgunId {
diff --git a/retro-gtk/retro-core-view-extern.c b/retro-gtk/retro-core-view-extern.c
index 231c4b7..ce877e7 100644
--- a/retro-gtk/retro-core-view-extern.c
+++ b/retro-gtk/retro-core-view-extern.c
@@ -4,6 +4,7 @@
#include "retro-gtk-internal.h"
#include "retro-core-view-input-device.h"
#include "retro-joypad-id.h"
+#include "retro-mouse-id.h"
static guint16 DEFAULT_KEY_JOYPAD_BUTTON_MAPPING[RETRO_JOYPAD_ID_COUNT] = {
KEY_S,
diff --git a/retro-gtk/retro-mouse-id.h b/retro-gtk/retro-mouse-id.h
new file mode 100644
index 0000000..a78b582
--- /dev/null
+++ b/retro-gtk/retro-mouse-id.h
@@ -0,0 +1,39 @@
+// This file is part of retro-gtk. License: GPL-3.0+.
+
+#ifndef RETRO_MOUSE_ID_H
+#define RETRO_MOUSE_ID_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * RetroMouseId:
+ * @RETRO_MOUSE_ID_X: The X axis of a mouse.
+ * @RETRO_MOUSE_ID_Y: The Y axis of a mouse.
+ * @RETRO_MOUSE_ID_LEFT: The left button of a mouse.
+ * @RETRO_MOUSE_ID_RIGHT: The right button of a mouse.
+ * @RETRO_MOUSE_ID_WHEELUP: The up direction of a mouse wheel.
+ * @RETRO_MOUSE_ID_WHEELDOWN: The down direction of a mouse wheel.
+ * @RETRO_MOUSE_ID_MIDDLE: The middle button of a mouse.
+ * @RETRO_MOUSE_ID_HORIZ_WHEELUP: The horizontal up direction of a mouse wheel.
+ * @RETRO_MOUSE_ID_HORIZ_WHEELDOWN: The horizontal down direction of a mouse wheel.
+ *
+ * Represents the inputs for the Libretro mouse.
+ */
+typedef enum
+{
+ RETRO_MOUSE_ID_X,
+ RETRO_MOUSE_ID_Y,
+ RETRO_MOUSE_ID_LEFT,
+ RETRO_MOUSE_ID_RIGHT,
+ RETRO_MOUSE_ID_WHEELUP,
+ RETRO_MOUSE_ID_WHEELDOWN,
+ RETRO_MOUSE_ID_MIDDLE,
+ RETRO_MOUSE_ID_HORIZ_WHEELUP,
+ RETRO_MOUSE_ID_HORIZ_WHEELDOWN,
+} RetroMouseId;
+
+G_END_DECLS
+
+#endif /* RETRO_MOUSE_ID_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]