about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-07-14 12:41:58 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-07-14 12:41:58 +0200
commit15bda0af2709b956d9b92fa90c0c47b0b19aa0e2 (patch)
tree54edae9b30c5d77358318e2103878a37a0393a4d /src
parenta076e9b0a84a1e039f074d479677800bebc2f751 (diff)
downloadbox64-15bda0af2709b956d9b92fa90c0c47b0b19aa0e2.tar.gz
box64-15bda0af2709b956d9b92fa90c0c47b0b19aa0e2.zip
A few more fontconfig and freetype wrapped functions
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt4
-rw-r--r--src/wrapped/generated/wrappedfontconfigtypes.h6
-rwxr-xr-xsrc/wrapped/wrappedfontconfig.c29
-rwxr-xr-xsrc/wrapped/wrappedfontconfig_private.h4
-rwxr-xr-xsrc/wrapped/wrappedfreetype_private.h2
5 files changed, 41 insertions, 4 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index daaed18c..f12ab88d 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -2218,6 +2218,10 @@ wrappedflac:
 - iFppppppppp:
   - FLAC__stream_decoder_init_stream
 wrappedfontconfig:
+- pFpV:
+  - FcObjectSetBuild
+- pFpA:
+  - FcObjectSetVaBuild
 wrappedfreetype:
 - iFpplp:
   - FT_Open_Face
diff --git a/src/wrapped/generated/wrappedfontconfigtypes.h b/src/wrapped/generated/wrappedfontconfigtypes.h
index 9d73a9bb..f6a69c6e 100644
--- a/src/wrapped/generated/wrappedfontconfigtypes.h
+++ b/src/wrapped/generated/wrappedfontconfigtypes.h
@@ -11,7 +11,11 @@
 #define ADDED_FUNCTIONS() 
 #endif
 
+typedef void* (*pFpV_t)(void*, ...);
+typedef void* (*pFpA_t)(void*, va_list);
 
-#define SUPER() ADDED_FUNCTIONS()
+#define SUPER() ADDED_FUNCTIONS() \
+	GO(FcObjectSetBuild, pFpV_t) \
+	GO(FcObjectSetVaBuild, pFpA_t)
 
 #endif // __wrappedfontconfigTYPES_H_
diff --git a/src/wrapped/wrappedfontconfig.c b/src/wrapped/wrappedfontconfig.c
index 7a7a66bd..b56e41cd 100755
--- a/src/wrapped/wrappedfontconfig.c
+++ b/src/wrapped/wrappedfontconfig.c
@@ -21,4 +21,33 @@
 const char* fontconfigName = "libfontconfig.so.1";
 #define LIBNAME fontconfig
 
+#define ADDED_FUNCTIONS()                   \
+
+#include "generated/wrappedfontconfigtypes.h"
+
+#include "wrappercallback.h"
+
+EXPORT void* my_FcObjectSetVaBuild(x64emu_t* emu, void* first, x64_va_list_t V)
+{
+    #ifdef CONVERT_VALIST
+    CONVERT_VALIST(V);
+    #else
+    CREATE_VALIST_FROM_VALIST(V, emu->scratch);
+    #endif
+    return my->FcObjectSetVaBuild(first, VARARGS);
+}
+EXPORT void* my_FcObjectSetBuild(x64emu_t* emu, void* first, uint64_t* b)
+{
+    if(!first)    
+        return my->FcObjectSetBuild(first, NULL);
+    CREATE_VALIST_FROM_VAARG(b, emu->scratch, 1);
+    return my->FcObjectSetVaBuild(first, VARARGS);
+}
+
+#define CUSTOM_INIT \
+    getMy(lib);
+
+#define CUSTOM_FINI \
+    freeMy();
+
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedfontconfig_private.h b/src/wrapped/wrappedfontconfig_private.h
index dd2964d0..28830ff9 100755
--- a/src/wrapped/wrappedfontconfig_private.h
+++ b/src/wrapped/wrappedfontconfig_private.h
@@ -128,10 +128,10 @@ GO(FcNameConstant, iFpp)
 //GO(FcNameUnregisterConstants, 
 //GO(FcNameUnregisterObjectTypes, 
 GO(FcObjectSetAdd, iFpp)
-//GO2(FcObjectSetBuild, pFpV, FcObjectSetVaBuild)
+GOM(FcObjectSetBuild, pFEpV)
 GO(FcObjectSetCreate, pFv)
 GO(FcObjectSetDestroy, vFp)
-GO(FcObjectSetVaBuild, pFpp)
+GOM(FcObjectSetVaBuild, pFEpA)
 GO(FcPatternAdd, iFppiLi)  // FcValue is a typedef with int+union, with biggest part is a double => so 1 int and 1"L"
 GO(FcPatternAddBool, iFppi)
 GO(FcPatternAddCharSet, iFppp)
diff --git a/src/wrapped/wrappedfreetype_private.h b/src/wrapped/wrappedfreetype_private.h
index da67bab1..9e55b824 100755
--- a/src/wrapped/wrappedfreetype_private.h
+++ b/src/wrapped/wrappedfreetype_private.h
@@ -107,7 +107,7 @@ GO(FT_Matrix_Multiply, vFpp)
 GO(FT_MulDiv, lFlll)
 GO(FT_MulFix, lFll)
 GO(FT_New_Face, iFpplp)
-//GO(FT_New_Library, 
+GO(FT_New_Library, iFpp)
 GO(FT_New_Memory_Face, iFppllp)
 GO(FT_New_Size, iFpp)
 GOM(FT_Open_Face, iFEpplp)