[retro-gtk/c-port: 14/39] Port PointerId to C
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/c-port: 14/39] Port PointerId to C
- Date: Tue, 26 Sep 2017 09:24:33 +0000 (UTC)
commit 4857187e99807b902d7841fa042254d39a843ec3
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 | 27 +++++++++++++++++++++++++++
5 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index a6cdb95..769469f 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -116,6 +116,7 @@ retro_gtkinclude_HEADERS = \
retro-mouse-id.h \
retro-option.h \
retro-options.h \
+ retro-pointer-id.h \
retro-variable.h \
$(NULL)
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 73a86bd..73dd98d 100644
--- a/retro-gtk/retro-gtk.h
+++ b/retro-gtk/retro-gtk.h
@@ -14,5 +14,6 @@
#include "retro-joypad-id.h"
#include "retro-lightgun-id.h"
#include "retro-mouse-id.h"
+#include "retro-pointer-id.h"
#endif
diff --git a/retro-gtk/retro-pointer-id.h b/retro-gtk/retro-pointer-id.h
new file mode 100644
index 0000000..b039ec3
--- /dev/null
+++ b/retro-gtk/retro-pointer-id.h
@@ -0,0 +1,27 @@
+// This file is part of retro-gtk. License: GPL-3.0+.
+
+#ifndef RETRO_POINTER_ID_H
+#define RETRO_POINTER_ID_H
+
+#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]