about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedgmodule2.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-09-18 21:01:13 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-09-18 21:01:13 +0200
commit9414ece323bc6a9d024b6b969eb9f9c8bb9e20d3 (patch)
treef59b535fe2c6a3273a9e7ff73e411fbb0c38aa51 /src/wrapped/wrappedgmodule2.c
parentc64cb5b92b610adbc9c6bf73f8330bdd746611fd (diff)
downloadbox64-9414ece323bc6a9d024b6b969eb9f9c8bb9e20d3.tar.gz
box64-9414ece323bc6a9d024b6b969eb9f9c8bb9e20d3.zip
Added wrapped gtk2 (enough to launch Dwarf Fortress and some simple gtk2 samples)
Diffstat (limited to 'src/wrapped/wrappedgmodule2.c')
-rwxr-xr-xsrc/wrapped/wrappedgmodule2.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/wrapped/wrappedgmodule2.c b/src/wrapped/wrappedgmodule2.c
new file mode 100755
index 00000000..fb68612e
--- /dev/null
+++ b/src/wrapped/wrappedgmodule2.c
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define _GNU_SOURCE         /* See feature_test_macros(7) */
+#include <dlfcn.h>
+
+#include "wrappedlibs.h"
+
+#include "debug.h"
+#include "wrapper.h"
+#include "bridge.h"
+#include "librarian/library_private.h"
+#include "x64emu.h"
+
+const char* gmodule2Name = "libgmodule-2.0.so.0";
+#define LIBNAME gmodule2
+
+#define PRE_INIT    \
+    if(box64_nogtk) \
+        return -1;
+
+#define CUSTOM_INIT \
+    lib->priv.w.needed = 1; \
+    lib->priv.w.neededlibs = (char**)calloc(lib->priv.w.needed, sizeof(char*)); \
+    lib->priv.w.neededlibs[0] = strdup("libglib-2.0.so.0");
+
+#include "wrappedlib_init.h"