diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 5c77e4ffd..1cceb891c 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -2543,6 +2543,7 @@ wrappedexpat: - vFpp: - XML_SetCharacterDataHandler - vFppp: + - XML_SetDoctypeDeclHandler - XML_SetElementHandler wrappedfaudio: - vFpp: diff --git a/src/wrapped/generated/wrappedexpattypes.h b/src/wrapped/generated/wrappedexpattypes.h index c912b1d83..1a04e2574 100644 --- a/src/wrapped/generated/wrappedexpattypes.h +++ b/src/wrapped/generated/wrappedexpattypes.h @@ -16,6 +16,7 @@ typedef void (*vFppp_t)(void*, void*, void*); #define SUPER() ADDED_FUNCTIONS() \ GO(XML_SetCharacterDataHandler, vFpp_t) \ + GO(XML_SetDoctypeDeclHandler, vFppp_t) \ GO(XML_SetElementHandler, vFppp_t) #endif // __wrappedexpatTYPES_H_ diff --git a/src/wrapped/wrappedexpat.c b/src/wrapped/wrappedexpat.c index a853a9568..9e8f08cba 100755 --- a/src/wrapped/wrappedexpat.c +++ b/src/wrapped/wrappedexpat.c @@ -98,6 +98,50 @@ static void* find_CharData_Fct(void* fct) printf_log(LOG_NONE, "Warning, no more slot for expat CharData callback\n"); return NULL; } +// StartDoctypeDeclHandler +#define GO(A) \ +static uintptr_t my_StartDoctypeDeclHandler_fct_##A = 0; \ +static void* my_StartDoctypeDeclHandler_##A(void* data, void* name, void* sysid, void* pubid, int has_internal_subset) \ +{ \ + return (void*)RunFunctionFmt(my_StartDoctypeDeclHandler_fct_##A, "ppppi", data, name, sysid, pubid, has_internal_subset);\ +} +SUPER() +#undef GO +static void* find_StartDoctypeDeclHandler_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_StartDoctypeDeclHandler_fct_##A == (uintptr_t)fct) return my_StartDoctypeDeclHandler_##A; + SUPER() + #undef GO + #define GO(A) if(my_StartDoctypeDeclHandler_fct_##A == 0) {my_StartDoctypeDeclHandler_fct_##A = (uintptr_t)fct; return my_StartDoctypeDeclHandler_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for expat StartDoctypeDeclHandler callback\n"); + return NULL; +} +// EndDoctypeDeclHandler +#define GO(A) \ +static uintptr_t my_EndDoctypeDeclHandler_fct_##A = 0; \ +static void* my_EndDoctypeDeclHandler_##A(void* data) \ +{ \ + return (void*)RunFunctionFmt(my_EndDoctypeDeclHandler_fct_##A, "p", data);\ +} +SUPER() +#undef GO +static void* find_EndDoctypeDeclHandler_Fct(void* fct) +{ + if(!fct) return fct; + if(GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if(my_EndDoctypeDeclHandler_fct_##A == (uintptr_t)fct) return my_EndDoctypeDeclHandler_##A; + SUPER() + #undef GO + #define GO(A) if(my_EndDoctypeDeclHandler_fct_##A == 0) {my_EndDoctypeDeclHandler_fct_##A = (uintptr_t)fct; return my_EndDoctypeDeclHandler_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for expat EndDoctypeDeclHandler callback\n"); + return NULL; +} #undef SUPER EXPORT void my_XML_SetElementHandler(x86emu_t* emu, void* p, void* start, void* end) @@ -106,6 +150,12 @@ EXPORT void my_XML_SetElementHandler(x86emu_t* emu, void* p, void* start, void* my->XML_SetElementHandler(p, find_Start_Fct(start), find_End_Fct(end)); } +EXPORT void my_XML_SetDoctypeDeclHandler(x86emu_t* emu, void* p, void* start, void* end) +{ + (void)emu; + my->XML_SetDoctypeDeclHandler(p, find_StartDoctypeDeclHandler_Fct(start), find_EndDoctypeDeclHandler_Fct(end)); +} + EXPORT void my_XML_SetCharacterDataHandler(x86emu_t* emu, void* p, void* h) { (void)emu; diff --git a/src/wrapped/wrappedexpat_private.h b/src/wrapped/wrappedexpat_private.h index e46f15d4b..66108c242 100755 --- a/src/wrapped/wrappedexpat_private.h +++ b/src/wrapped/wrappedexpat_private.h @@ -39,7 +39,7 @@ GOM(XML_SetCharacterDataHandler, vFEpp) //GO(XML_SetCommentHandler, //GO(XML_SetDefaultHandler, //GO(XML_SetDefaultHandlerExpand, -//GO(XML_SetDoctypeDeclHandler, +GOM(XML_SetDoctypeDeclHandler, vFEppp) //GO(XML_SetElementDeclHandler, GOM(XML_SetElementHandler, vFEppp) //GO(XML_SetEncoding, diff --git a/src/wrapped/wrappedfontconfig_private.h b/src/wrapped/wrappedfontconfig_private.h index 3355b3e6f..bf4e08ee5 100755 --- a/src/wrapped/wrappedfontconfig_private.h +++ b/src/wrapped/wrappedfontconfig_private.h @@ -42,7 +42,7 @@ GO(FcConfigAppFontAddFile, iFpp) //GO(FcConfigAppFontClear, //GO(FcConfigBuildFonts, //GO(FcConfigCreate, -//GO(FcConfigDestroy, +GO(FcConfigDestroy, vFp) //GO(FcConfigEnableHome, //GO(FcConfigFilename, GO(FcConfigGetBlanks, pFp) @@ -98,7 +98,7 @@ GO(FcGetVersion, iFv) GO(FcInit, iFv) GO(FcInitBringUptoDate, iFv) //GO(FcInitLoadConfig, -//GO(FcInitLoadConfigAndFonts, +GO(FcInitLoadConfigAndFonts, pFv) GO(FcInitReinitialize, iFv) //GO(FcLangGetCharSet, GO(FcLangSetAdd, iFpp) diff --git a/src/wrapped/wrappedfreetype_private.h b/src/wrapped/wrappedfreetype_private.h index 9323126d9..824f2c98a 100755 --- a/src/wrapped/wrappedfreetype_private.h +++ b/src/wrapped/wrappedfreetype_private.h @@ -43,7 +43,7 @@ GO(FT_Get_Charmap_Index, iFp) //GO(FT_Get_CID_From_Glyph_Index, //GO(FT_Get_CID_Is_Internally_CID_Keyed, //GO(FT_Get_CID_Registry_Ordering_Supplement, -//GO(FT_Get_CMap_Format, +GO(FT_Get_CMap_Format, LFp) //GO(FT_Get_CMap_Language_ID, GO(FT_Get_First_Char, LFpp) //GO(FT_Get_Font_Format, @@ -200,3 +200,6 @@ GO(FTC_SBitCache_New, iFpp) //GO(TT_New_Context, //GO(TT_RunIns, + +GO(FT_Set_MM_WeightVector, iFpUp) +GO(FT_Get_MM_WeightVector, iFppp) diff --git a/src/wrapped/wrappedpng16_private.h b/src/wrapped/wrappedpng16_private.h index 33c68ea28..a8129ea78 100755 --- a/src/wrapped/wrappedpng16_private.h +++ b/src/wrapped/wrappedpng16_private.h @@ -104,3 +104,6 @@ GO(png_image_begin_read_from_memory, iFppL) GO(png_image_finish_read, iFpppip) GO(png_image_free, vFp) GO(png_set_flush, vFpi) +GO(png_set_invert_alpha, vFp) +GO(png_set_invert_mono, vFp) +GO(png_get_mem_ptr, pFp)