[retro-gtk/c-port: 15/42] Port PointerId to C
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/c-port: 15/42] Port PointerId to C
- Date: Wed, 4 Oct 2017 05:23:39 +0000 (UTC)
commit 537335913aa319ca86ec4a87c816719fac8abb2d
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Sep 5 14:59:50 2017 +0200
Port PointerId to C
retro-gtk/Makefile.am | 1 +
retro-gtk/input/device.vala | 9 ---------
retro-gtk/retro-core-view-extern.c | 1 +
retro-gtk/retro-gtk.h | 1 +
retro-gtk/retro-pointer-id.h | 31 +++++++++++++++++++++++++++++++
5 files changed, 34 insertions(+), 9 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index 98734f0..81f87cf 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -38,6 +38,7 @@ retro_gtk_public_h_sources = \
retro-joypad-id.h \
retro-lightgun-id.h \
retro-mouse-id.h \
+ retro-pointer-id.h \
$(NULL)
retro_gtk_private_h_sources = \
diff --git a/retro-gtk/input/device.vala b/retro-gtk/input/device.vala
index 04f6f3a..9bcf1bf 100644
--- a/retro-gtk/input/device.vala
+++ b/retro-gtk/input/device.vala
@@ -3,15 +3,6 @@
namespace Retro {
/**
- * The input types of a pointer.
- */
-private enum PointerId {
- X,
- Y,
- PRESSED
-}
-
-/**
* Describes an input source.
*/
public struct InputDescriptor {
diff --git a/retro-gtk/retro-core-view-extern.c b/retro-gtk/retro-core-view-extern.c
index a7c6843..571f835 100644
--- a/retro-gtk/retro-core-view-extern.c
+++ b/retro-gtk/retro-core-view-extern.c
@@ -5,6 +5,7 @@
#include "retro-core-view-input-device.h"
#include "retro-joypad-id.h"
#include "retro-mouse-id.h"
+#include "retro-pointer-id.h"
static guint16 DEFAULT_KEY_JOYPAD_BUTTON_MAPPING[RETRO_JOYPAD_ID_COUNT] = {
KEY_S,
diff --git a/retro-gtk/retro-gtk.h b/retro-gtk/retro-gtk.h
index 78b13d2..dfb51db 100644
--- a/retro-gtk/retro-gtk.h
+++ b/retro-gtk/retro-gtk.h
@@ -16,6 +16,7 @@
#include "retro-joypad-id.h"
#include "retro-lightgun-id.h"
#include "retro-mouse-id.h"
+#include "retro-pointer-id.h"
#undef __RETRO_GTK_INSIDE__
diff --git a/retro-gtk/retro-pointer-id.h b/retro-gtk/retro-pointer-id.h
new file mode 100644
index 0000000..c70629d
--- /dev/null
+++ b/retro-gtk/retro-pointer-id.h
@@ -0,0 +1,31 @@
+// This file is part of retro-gtk. License: GPL-3.0+.
+
+#ifndef RETRO_POINTER_ID_H
+#define RETRO_POINTER_ID_H
+
+#if !defined(__RETRO_GTK_INSIDE__) && !defined(RETRO_GTK_COMPILATION)
+# error "Only <retro-gtk.h> can be included directly."
+#endif
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * RetroPointerId:
+ * @RETRO_POINTER_ID_X: The X axis of a pointer.
+ * @RETRO_POINTER_ID_Y: The Y axis of a pointer.
+ * @RETRO_POINTER_ID_PRESSED: The pression of a pointer.
+ *
+ * Represents the inputs for the Libretro pointer.
+ */
+typedef enum
+{
+ RETRO_POINTER_ID_X,
+ RETRO_POINTER_ID_Y,
+ RETRO_POINTER_ID_PRESSED,
+} RetroPointerId;
+
+G_END_DECLS
+
+#endif /* RETRO_POINTER_ID_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]