[retro-gtk/wip/aplazas/0.13: 2/7] Port MemoryType to C



commit ab987aef289264fb4f7a9a386da5c020a9d7fdbc
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu Sep 7 11:33:01 2017 +0200

    Port MemoryType to C

 retro-gtk/Makefile.am           |    2 +-
 retro-gtk/memory.vala           |   16 ----------------
 retro-gtk/retro-gtk.h           |    1 +
 retro-gtk/retro-memory-type.h   |   29 +++++++++++++++++++++++++++++
 retro-gtk/vapi/retro-gtk-c.vapi |    8 ++++++++
 5 files changed, 39 insertions(+), 17 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index 6d4b6b0..ef50e9e 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -41,7 +41,6 @@ libretro_gtk_la_SOURCES = \
        \
        core.vala \
        core-error.vala \
-       memory.vala \
        retro.vala \
        retro-cairo-display.c \
        retro-core-descriptor.vala \
@@ -116,6 +115,7 @@ retro_gtkinclude_HEADERS = \
        retro-input-device.h \
        retro-joypad-id.h \
        retro-lightgun-id.h \
+       retro-memory-type.h \
        retro-mouse-id.h \
        retro-pixel-format.h \
        retro-pointer-id.h \
diff --git a/retro-gtk/retro-gtk.h b/retro-gtk/retro-gtk.h
index 8769435..8e94dad 100644
--- a/retro-gtk/retro-gtk.h
+++ b/retro-gtk/retro-gtk.h
@@ -12,6 +12,7 @@
 #include "retro-input-device.h"
 #include "retro-joypad-id.h"
 #include "retro-lightgun-id.h"
+#include "retro-memory-type.h"
 #include "retro-mouse-id.h"
 #include "retro-pixel-format.h"
 #include "retro-pointer-id.h"
diff --git a/retro-gtk/retro-memory-type.h b/retro-gtk/retro-memory-type.h
new file mode 100644
index 0000000..ce38842
--- /dev/null
+++ b/retro-gtk/retro-memory-type.h
@@ -0,0 +1,29 @@
+// This file is part of retro-gtk. License: GPL-3.0+.
+
+#ifndef RETRO_MEMORY_TYPE_H
+#define RETRO_MEMORY_TYPE_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * RetroMemoryType:
+ * @RETRO_MEMORY_TYPE_SAVE_RAM: The save RAM.
+ * @RETRO_MEMORY_TYPE_RTC: The real time clock.
+ * @RETRO_MEMORY_TYPE_SYSTEM_RAM: The system RAM.
+ * @RETRO_MEMORY_TYPE_VIDEO_RAM: The video RAM.
+ *
+ * Represents the memory types for the Libretro core.
+ */
+typedef enum
+{
+  RETRO_MEMORY_TYPE_SAVE_RAM,
+  RETRO_MEMORY_TYPE_RTC,
+  RETRO_MEMORY_TYPE_SYSTEM_RAM,
+  RETRO_MEMORY_TYPE_VIDEO_RAM,
+} RetroMemoryType;
+
+G_END_DECLS
+
+#endif /* RETRO_MEMORY_TYPE_H */
diff --git a/retro-gtk/vapi/retro-gtk-c.vapi b/retro-gtk/vapi/retro-gtk-c.vapi
index 1d548e2..bf0ea78 100644
--- a/retro-gtk/vapi/retro-gtk-c.vapi
+++ b/retro-gtk/vapi/retro-gtk-c.vapi
@@ -12,6 +12,14 @@ public enum Retro.DeviceType {
        POINTER = 6,
 }
 
+[CCode (cheader_filename = "retro-memory-type.h")]
+public enum Retro.MemoryType {
+       SAVE_RAM,
+       RTC,
+       SYSTEM_RAM,
+       VIDEO_RAM,
+}
+
 [CCode (cheader_filename = "retro-pixel-format.h")]
 public enum Retro.PixelFormat {
        XRGB1555,


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