[retro-gtk/wip/aplazas/c-port: 18/36] Port g_log() to C



commit e9f9be782ac811e79b5f7c95cf8873958a55576a
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu Sep 7 11:37:06 2017 +0200

    Port g_log() to C

 retro-gtk/Makefile.am |    1 +
 retro-gtk/retro-gtk.h |    1 +
 retro-gtk/retro-log.h |   24 ++++++++++++++++++++++++
 retro-gtk/retro.vala  |    2 --
 4 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index b727aa6..41d3384 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -41,6 +41,7 @@ retro_gtk_public_h_sources = \
        retro-input-device.h \
        retro-joypad-id.h \
        retro-lightgun-id.h \
+       retro-log.h \
        retro-memory-type.h \
        retro-mouse-id.h \
        retro-pa-player.h \
diff --git a/retro-gtk/retro-gtk.h b/retro-gtk/retro-gtk.h
index 5766d0b..ef59b63 100644
--- a/retro-gtk/retro-gtk.h
+++ b/retro-gtk/retro-gtk.h
@@ -18,6 +18,7 @@
 #include "retro-input-device.h"
 #include "retro-joypad-id.h"
 #include "retro-lightgun-id.h"
+#include "retro-log.h"
 #include "retro-memory-type.h"
 #include "retro-mouse-id.h"
 #include "retro-pixel-format.h"
diff --git a/retro-gtk/retro-log.h b/retro-gtk/retro-log.h
new file mode 100644
index 0000000..69b2377
--- /dev/null
+++ b/retro-gtk/retro-log.h
@@ -0,0 +1,24 @@
+// This file is part of retro-gtk. License: GPL-3.0+.
+
+#ifndef RETRO_LOG_H
+#define RETRO_LOG_H
+
+#if !defined(__RETRO_GTK_INSIDE__) && !defined(RETRO_GTK_COMPILATION)
+# error "Only <retro-gtk.h> can be included directly."
+#endif
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+// FIXME Remove as soon as possible.
+typedef struct _RetroCore RetroCore;
+
+void retro_g_log (RetroCore      *self,
+                  const gchar    *log_domain,
+                  GLogLevelFlags  log_level,
+                  const gchar    *message);
+
+G_END_DECLS
+
+#endif /* RETRO_LOG_H */
diff --git a/retro-gtk/retro.vala b/retro-gtk/retro.vala
index 05dbe7b..2d77e8e 100644
--- a/retro-gtk/retro.vala
+++ b/retro-gtk/retro.vala
@@ -19,7 +19,5 @@ private errordomain CbError {
        NO_CALLBACK
 }
 
-public extern void g_log (Core core, string log_domain, LogLevelFlags log_level, string message);
-
 }
 


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