diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-22 17:11:07 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-22 17:11:07 +0200 |
| commit | 5e49e3cfaa3a9cc83c7d3642f0bdeafb89c35d75 (patch) | |
| tree | 1c34affa4f84f46cd095a4502a608c2b05be1917 /src | |
| parent | 8574c575f58cde8c10a49d3628dffce43c17c495 (diff) | |
| download | box64-5e49e3cfaa3a9cc83c7d3642f0bdeafb89c35d75.tar.gz box64-5e49e3cfaa3a9cc83c7d3642f0bdeafb89c35d75.zip | |
[BOX32][WRAPPER] Added some more libX11 and libc 32bits wrapped function, and empty 32bits wrapped libXfixes, libXcursor, libXrender and libXrandr
Diffstat (limited to 'src')
29 files changed, 537 insertions, 40 deletions
diff --git a/src/library_list_32.h b/src/library_list_32.h index 1a52430e..d6046166 100644 --- a/src/library_list_32.h +++ b/src/library_list_32.h @@ -16,5 +16,10 @@ GO("libSDL-1.2.so.0", sdl1) GO("libasound.so.2", libasound) GO("libasound.so", libasound) GO("libX11.so.6", libx11) +GO("libXfixes.so.3", libxfixes) +GO("libXrender.so.1", libxrender) +GO("libXcursor.so.1", libxcursor) +GO("libXrandr.so.2", libxrandr) +GO("libxrandr.so.2", libxrandr) GO("crashhandler.so", crashhandler) diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index 7456d7a9..d93a3c92 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -346,6 +346,7 @@ #() pFEip -> pFEip #() pFEpi -> pFEpi #() pFEpp -> pFEpp +#() pFEpV -> pFEpV #() pFipi -> pFipi #() pFulu -> pFulu #() pFpii -> pFpii @@ -519,6 +520,7 @@ #() pFXiii -> pFXiii #() pFXLLp -> pFXLLp #() pFXppi -> pFXppi +#() pFXppp -> pFXppp #() iFppbp_p -> iFppBp #() iFBp_pui -> iFBpui #() IFpBp_ii -> IFpBii @@ -1299,6 +1301,8 @@ wrappedlibx11: - XOpenDisplay - iFXp: - XNextEvent +- pFpV: + - XCreateIC - LFXii: - XGetPixel - pFpiiuu: @@ -1313,6 +1317,10 @@ wrappedlibx11: - XGetSubImage - LFXLiiuuuiupLp: - XCreateWindow +wrappedlibxcursor: +wrappedlibxfixes: +wrappedlibxrandr: +wrappedlibxrender: wrappedsdl1: - vFv: - SDL_Quit diff --git a/src/wrapped32/generated/wrappedlibx11types32.h b/src/wrapped32/generated/wrappedlibx11types32.h index 1312148b..cc67f8e7 100644 --- a/src/wrapped32/generated/wrappedlibx11types32.h +++ b/src/wrapped32/generated/wrappedlibx11types32.h @@ -14,6 +14,7 @@ typedef int32_t (*iFp_t)(void*); typedef void* (*pFp_t)(void*); typedef int32_t (*iFXp_t)(void*, void*); +typedef void* (*pFpV_t)(void*, ...); typedef uintptr_t (*LFXii_t)(void*, int32_t, int32_t); typedef void* (*pFpiiuu_t)(void*, int32_t, int32_t, uint32_t, uint32_t); typedef void* (*pFXLiiuuLi_t)(void*, uintptr_t, int32_t, int32_t, uint32_t, uint32_t, uintptr_t, int32_t); @@ -28,6 +29,7 @@ typedef uintptr_t (*LFXLiiuuuiupLp_t)(void*, uintptr_t, int32_t, int32_t, uint32 GO(_XInitImageFuncPtrs, iFp_t) \ GO(XOpenDisplay, pFp_t) \ GO(XNextEvent, iFXp_t) \ + GO(XCreateIC, pFpV_t) \ GO(XGetPixel, LFXii_t) \ GO(XSubImage, pFpiiuu_t) \ GO(XGetImage, pFXLiiuuLi_t) \ diff --git a/src/wrapped32/generated/wrappedlibxcursordefs32.h b/src/wrapped32/generated/wrappedlibxcursordefs32.h new file mode 100644 index 00000000..afd46d1a --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxcursordefs32.h @@ -0,0 +1,8 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxcursorDEFS32_H_ +#define __wrappedlibxcursorDEFS32_H_ + + +#endif // __wrappedlibxcursorDEFS32_H_ diff --git a/src/wrapped32/generated/wrappedlibxcursortypes32.h b/src/wrapped32/generated/wrappedlibxcursortypes32.h new file mode 100644 index 00000000..c9179e88 --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxcursortypes32.h @@ -0,0 +1,17 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxcursorTYPES32_H_ +#define __wrappedlibxcursorTYPES32_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + + +#define SUPER() ADDED_FUNCTIONS() + +#endif // __wrappedlibxcursorTYPES32_H_ diff --git a/src/wrapped32/generated/wrappedlibxcursorundefs32.h b/src/wrapped32/generated/wrappedlibxcursorundefs32.h new file mode 100644 index 00000000..8bd65e03 --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxcursorundefs32.h @@ -0,0 +1,8 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxcursorUNDEFS32_H_ +#define __wrappedlibxcursorUNDEFS32_H_ + + +#endif // __wrappedlibxcursorUNDEFS32_H_ diff --git a/src/wrapped32/generated/wrappedlibxfixesdefs32.h b/src/wrapped32/generated/wrappedlibxfixesdefs32.h new file mode 100644 index 00000000..e7ece16b --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxfixesdefs32.h @@ -0,0 +1,8 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxfixesDEFS32_H_ +#define __wrappedlibxfixesDEFS32_H_ + + +#endif // __wrappedlibxfixesDEFS32_H_ diff --git a/src/wrapped32/generated/wrappedlibxfixestypes32.h b/src/wrapped32/generated/wrappedlibxfixestypes32.h new file mode 100644 index 00000000..a2b4dd25 --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxfixestypes32.h @@ -0,0 +1,17 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxfixesTYPES32_H_ +#define __wrappedlibxfixesTYPES32_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + + +#define SUPER() ADDED_FUNCTIONS() + +#endif // __wrappedlibxfixesTYPES32_H_ diff --git a/src/wrapped32/generated/wrappedlibxfixesundefs32.h b/src/wrapped32/generated/wrappedlibxfixesundefs32.h new file mode 100644 index 00000000..b9613b90 --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxfixesundefs32.h @@ -0,0 +1,8 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxfixesUNDEFS32_H_ +#define __wrappedlibxfixesUNDEFS32_H_ + + +#endif // __wrappedlibxfixesUNDEFS32_H_ diff --git a/src/wrapped32/generated/wrappedlibxrandrdefs32.h b/src/wrapped32/generated/wrappedlibxrandrdefs32.h new file mode 100644 index 00000000..a51005b5 --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxrandrdefs32.h @@ -0,0 +1,8 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxrandrDEFS32_H_ +#define __wrappedlibxrandrDEFS32_H_ + + +#endif // __wrappedlibxrandrDEFS32_H_ diff --git a/src/wrapped32/generated/wrappedlibxrandrtypes32.h b/src/wrapped32/generated/wrappedlibxrandrtypes32.h new file mode 100644 index 00000000..afced4f1 --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxrandrtypes32.h @@ -0,0 +1,17 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxrandrTYPES32_H_ +#define __wrappedlibxrandrTYPES32_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + + +#define SUPER() ADDED_FUNCTIONS() + +#endif // __wrappedlibxrandrTYPES32_H_ diff --git a/src/wrapped32/generated/wrappedlibxrandrundefs32.h b/src/wrapped32/generated/wrappedlibxrandrundefs32.h new file mode 100644 index 00000000..66d2c7fe --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxrandrundefs32.h @@ -0,0 +1,8 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxrandrUNDEFS32_H_ +#define __wrappedlibxrandrUNDEFS32_H_ + + +#endif // __wrappedlibxrandrUNDEFS32_H_ diff --git a/src/wrapped32/generated/wrappedlibxrenderdefs32.h b/src/wrapped32/generated/wrappedlibxrenderdefs32.h new file mode 100644 index 00000000..38dd55ec --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxrenderdefs32.h @@ -0,0 +1,8 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxrenderDEFS32_H_ +#define __wrappedlibxrenderDEFS32_H_ + + +#endif // __wrappedlibxrenderDEFS32_H_ diff --git a/src/wrapped32/generated/wrappedlibxrendertypes32.h b/src/wrapped32/generated/wrappedlibxrendertypes32.h new file mode 100644 index 00000000..29429b11 --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxrendertypes32.h @@ -0,0 +1,17 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxrenderTYPES32_H_ +#define __wrappedlibxrenderTYPES32_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + + +#define SUPER() ADDED_FUNCTIONS() + +#endif // __wrappedlibxrenderTYPES32_H_ diff --git a/src/wrapped32/generated/wrappedlibxrenderundefs32.h b/src/wrapped32/generated/wrappedlibxrenderundefs32.h new file mode 100644 index 00000000..fb47f598 --- /dev/null +++ b/src/wrapped32/generated/wrappedlibxrenderundefs32.h @@ -0,0 +1,8 @@ +/****************************************************************** + * File automatically generated by rebuild_wrappers_32.py (v0.0.1.1) * + ******************************************************************/ +#ifndef __wrappedlibxrenderUNDEFS32_H_ +#define __wrappedlibxrenderUNDEFS32_H_ + + +#endif // __wrappedlibxrenderUNDEFS32_H_ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index d42e8b51..a272598e 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -435,6 +435,7 @@ typedef uintptr_t (*LFXCi_t)(void*, uint8_t, int32_t); typedef void* (*pFEip_t)(x64emu_t*, int32_t, void*); typedef void* (*pFEpi_t)(x64emu_t*, void*, int32_t); typedef void* (*pFEpp_t)(x64emu_t*, void*, void*); +typedef void* (*pFEpV_t)(x64emu_t*, void*, void*); typedef void* (*pFipi_t)(int32_t, void*, int32_t); typedef void* (*pFulu_t)(uint32_t, intptr_t, uint32_t); typedef void* (*pFpii_t)(void*, int32_t, int32_t); @@ -608,6 +609,7 @@ typedef void* (*pFpppp_t)(void*, void*, void*, void*); typedef void* (*pFXiii_t)(void*, int32_t, int32_t, int32_t); typedef void* (*pFXLLp_t)(void*, uintptr_t, uintptr_t, void*); typedef void* (*pFXppi_t)(void*, void*, void*, int32_t); +typedef void* (*pFXppp_t)(void*, void*, void*, void*); typedef int32_t (*iFppbp_p_t)(void*, void*, struct_p_t*, void*); typedef int32_t (*iFBp_pui_t)(struct_p_t*, void*, uint32_t, int32_t); typedef int64_t (*IFpBp_ii_t)(void*, struct_p_t*, int32_t, int32_t); @@ -1370,6 +1372,7 @@ void LFXCi_32(x64emu_t *emu, uintptr_t fcn) { LFXCi_t fn = (LFXCi_t)fcn; R_EAX = void pFEip_32(x64emu_t *emu, uintptr_t fcn) { pFEip_t fn = (pFEip_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8))); } void pFEpi_32(x64emu_t *emu, uintptr_t fcn) { pFEpi_t fn = (pFEpi_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8))); } void pFEpp_32(x64emu_t *emu, uintptr_t fcn) { pFEpp_t fn = (pFEpp_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8))); } +void pFEpV_32(x64emu_t *emu, uintptr_t fcn) { pFEpV_t fn = (pFEpV_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptrv(R_ESP + 8))); } void pFipi_32(x64emu_t *emu, uintptr_t fcn) { pFipi_t fn = (pFipi_t)fcn; R_EAX = to_ptrv(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); } void pFulu_32(x64emu_t *emu, uintptr_t fcn) { pFulu_t fn = (pFulu_t)fcn; R_EAX = to_ptrv(fn(from_ptri(uint32_t, R_ESP + 4), to_long(from_ptri(long_t, R_ESP + 8)), from_ptri(uint32_t, R_ESP + 12))); } void pFpii_32(x64emu_t *emu, uintptr_t fcn) { pFpii_t fn = (pFpii_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); } @@ -1543,6 +1546,7 @@ void pFpppp_32(x64emu_t *emu, uintptr_t fcn) { pFpppp_t fn = (pFpppp_t)fcn; R_EA void pFXiii_32(x64emu_t *emu, uintptr_t fcn) { pFXiii_t fn = (pFXiii_t)fcn; R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16))); } void pFXLLp_32(x64emu_t *emu, uintptr_t fcn) { pFXLLp_t fn = (pFXLLp_t)fcn; R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16))); } void pFXppi_32(x64emu_t *emu, uintptr_t fcn) { pFXppi_t fn = (pFXppi_t)fcn; R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16))); } +void pFXppp_32(x64emu_t *emu, uintptr_t fcn) { pFXppp_t fn = (pFXppp_t)fcn; R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16))); } void iFppbp_p_32(x64emu_t *emu, uintptr_t fcn) { iFppbp_p_t fn = (iFppbp_p_t)fcn; struct_p_t arg_12; from_struct_p(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL, from_ptriv(R_ESP + 16)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void iFBp_pui_32(x64emu_t *emu, uintptr_t fcn) { iFBp_pui_t fn = (iFBp_pui_t)fcn; struct_p_t arg_4; R_EAX = fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); } void IFpBp_ii_32(x64emu_t *emu, uintptr_t fcn) { IFpBp_ii_t fn = (IFpBp_ii_t)fcn; struct_p_t arg_8; ui64_t r; r.i = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); R_EAX = r.d[0]; R_EDX = r.d[1]; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index 6b5ee7bb..28d3260d 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -387,6 +387,7 @@ void LFXCi_32(x64emu_t *emu, uintptr_t fnc); void pFEip_32(x64emu_t *emu, uintptr_t fnc); void pFEpi_32(x64emu_t *emu, uintptr_t fnc); void pFEpp_32(x64emu_t *emu, uintptr_t fnc); +void pFEpV_32(x64emu_t *emu, uintptr_t fnc); void pFipi_32(x64emu_t *emu, uintptr_t fnc); void pFulu_32(x64emu_t *emu, uintptr_t fnc); void pFpii_32(x64emu_t *emu, uintptr_t fnc); @@ -560,6 +561,7 @@ void pFpppp_32(x64emu_t *emu, uintptr_t fnc); void pFXiii_32(x64emu_t *emu, uintptr_t fnc); void pFXLLp_32(x64emu_t *emu, uintptr_t fnc); void pFXppi_32(x64emu_t *emu, uintptr_t fnc); +void pFXppp_32(x64emu_t *emu, uintptr_t fnc); void iFppbp_p_32(x64emu_t *emu, uintptr_t fnc); void iFBp_pui_32(x64emu_t *emu, uintptr_t fnc); void IFpBp_ii_32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c index e3c74200..babe5a85 100755 --- a/src/wrapped32/wrappedlibc.c +++ b/src/wrapped32/wrappedlibc.c @@ -688,23 +688,14 @@ EXPORT int my32_printf(x64emu_t *emu, void* fmt, void* b) { return vprintf((const char*)fmt, VARARGS_32); } EXPORT int my32___printf_chk(x64emu_t *emu, void* fmt, void* b) __attribute__((alias("my32_printf"))); -#if 0 EXPORT int my32_vprintf(x64emu_t *emu, void* fmt, void* b) { - #ifndef NOALIGN - // need to align on arm myStackAlign32((const char*)fmt, b, emu->scratch); PREPARE_VALIST_32; - void* f = vprintf; - return ((iFpp_t)f)(fmt, VARARGS_32); - #else - // other platform don't need that - return vprintf(fmt, b); - #endif + return vprintf(fmt, VARARGS_32); } EXPORT int my32___vprintf_chk(x64emu_t *emu, void* fmt, void* b) __attribute__((alias("my32_vprintf"))); -#endif EXPORT int my32_vfprintf(x64emu_t *emu, void* F, void* fmt, void* b) { // need to align on arm myStackAlign32((const char*)fmt, b, emu->scratch); diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h index f9d29f93..7de0ec08 100755 --- a/src/wrapped32/wrappedlibc_private.h +++ b/src/wrapped32/wrappedlibc_private.h @@ -248,8 +248,8 @@ GO(endspent, vFv) // endusershell GOW(endutent, vFv) // endutxent -//DATAM(environ, 4) -//DATAM(_environ, 4) +DATAM(environ, 4) +DATAM(_environ, 4) DATAM(__environ, 4) // type B // envz_add // envz_entry @@ -1082,7 +1082,7 @@ GO(mbstowcs, LFppL) // _mcleanup //GOWM(mcount, vFpp) //%%,noE // _mcount -//GOW(memalign, pFLL) +GOW(memalign, pFLL) //DATAV(__memalign_hook, 4) //GOW(memccpy, pFppiL) GO(memchr, pFpiL) @@ -1893,7 +1893,7 @@ GOM(__vfprintf_chk, iFESvpp) //%% // vhangup // vlimit // vmsplice -//GOM(vprintf, iFEpp) //%% +GOM(vprintf, iFEpp) //%% //GOM(__vprintf_chk, iFEvpp) //%% // vscanf // Weak GOWM(vsnprintf, iFEpLpp) //%% diff --git a/src/wrapped32/wrappedlibx11.c b/src/wrapped32/wrappedlibx11.c index 36b79d39..1a4774fc 100644 --- a/src/wrapped32/wrappedlibx11.c +++ b/src/wrapped32/wrappedlibx11.c @@ -832,10 +832,6 @@ void* my32_XGetSubImage(x64emu_t* emu, void* disp, size_t drawable , void* image, int32_t dst_x, int32_t dst_y); void my32_XDestroyImage(x64emu_t* emu, void* image); -#if 0 -#ifdef PANDORA -void* my32_XLoadQueryFont(x64emu_t* emu, void* d, void* name); -#endif typedef void (*XIMProc)(void*, void*, void*); typedef int (*XICProc)(void*, void*, void*); @@ -1162,34 +1158,34 @@ GO(XNStringConversionCallback) switch (VAARGSZ) \ { \ case 2: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], NULL); \ break; \ case 4: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], NULL); \ break; \ case 6: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), getVArgs(emu, N, va, 4), getVArgs(emu, N, va, 5), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], va[4], va[5], NULL); \ break; \ case 8: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), getVArgs(emu, N, va, 4), getVArgs(emu, N, va, 5), getVArgs(emu, N, va, 6), getVArgs(emu, N, va, 7), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], va[4], va[5], va[6], va[7], NULL); \ break; \ case 10: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), getVArgs(emu, N, va, 4), getVArgs(emu, N, va, 5), getVArgs(emu, N, va, 6), getVArgs(emu, N, va, 7), getVArgs(emu, N, va, 8), getVArgs(emu, N, va, 9), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], va[4], va[5], va[6], va[7], va[8], va[9], NULL); \ break; \ case 12: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), getVArgs(emu, N, va, 4), getVArgs(emu, N, va, 5), getVArgs(emu, N, va, 6), getVArgs(emu, N, va, 7), getVArgs(emu, N, va, 8), getVArgs(emu, N, va, 9), getVArgs(emu, N, va, 10), getVArgs(emu, N, va, 11), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], va[4], va[5], va[6], va[7], va[8], va[9], va[10], va[11], NULL); \ break; \ case 14: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), getVArgs(emu, N, va, 4), getVArgs(emu, N, va, 5), getVArgs(emu, N, va, 6), getVArgs(emu, N, va, 7), getVArgs(emu, N, va, 8), getVArgs(emu, N, va, 9), getVArgs(emu, N, va, 10), getVArgs(emu, N, va, 11), getVArgs(emu, N, va, 12), getVArgs(emu, N, va, 13), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], va[4], va[5], va[6], va[7], va[8], va[9], va[10], va[11], va[12], va[13], NULL); \ break; \ case 16: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), getVArgs(emu, N, va, 4), getVArgs(emu, N, va, 5), getVArgs(emu, N, va, 6), getVArgs(emu, N, va, 7), getVArgs(emu, N, va, 8), getVArgs(emu, N, va, 9), getVArgs(emu, N, va, 10), getVArgs(emu, N, va, 11), getVArgs(emu, N, va, 12), getVArgs(emu, N, va, 13), getVArgs(emu, N, va, 14), getVArgs(emu, N, va, 15), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], va[4], va[5], va[6], va[7], va[8], va[9], va[10], va[11], va[12], va[13], va[14], va[15], NULL); \ break; \ case 18: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), getVArgs(emu, N, va, 4), getVArgs(emu, N, va, 5), getVArgs(emu, N, va, 6), getVArgs(emu, N, va, 7), getVArgs(emu, N, va, 8), getVArgs(emu, N, va, 9), getVArgs(emu, N, va, 10), getVArgs(emu, N, va, 11), getVArgs(emu, N, va, 12), getVArgs(emu, N, va, 13), getVArgs(emu, N, va, 14), getVArgs(emu, N, va, 15), getVArgs(emu, N, va, 16), getVArgs(emu, N, va, 17), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], va[4], va[5], va[6], va[7], va[8], va[9], va[10], va[11], va[12], va[13], va[14], va[15], va[16], va[17], NULL); \ break; \ case 20: \ - RESULT = FUNC(FIRST_ARG, getVArgs(emu, N, va, 0), getVArgs(emu, N, va, 1), getVArgs(emu, N, va, 2), getVArgs(emu, N, va, 3), getVArgs(emu, N, va, 4), getVArgs(emu, N, va, 5), getVArgs(emu, N, va, 6), getVArgs(emu, N, va, 7), getVArgs(emu, N, va, 8), getVArgs(emu, N, va, 9), getVArgs(emu, N, va, 10), getVArgs(emu, N, va, 11), getVArgs(emu, N, va, 12), getVArgs(emu, N, va, 13), getVArgs(emu, N, va, 14), getVArgs(emu, N, va, 15), getVArgs(emu, N, va, 16), getVArgs(emu, N, va, 17), getVArgs(emu, N, va, 18), getVArgs(emu, N, va, 19), NULL); \ + RESULT = FUNC(FIRST_ARG, va[0], va[1], va[2], va[3], va[4], va[5], va[6], va[7], va[8], va[9], va[10], va[11], va[12], va[13], va[14], va[15], va[16], va[17], va[18], va[19], NULL); \ break; \ default: \ printf_log(LOG_NONE, "warning: %s's vasize (%d) is too large, need create new call case!\n", __func__, VAARGSZ); \ @@ -1197,34 +1193,35 @@ default: } #define GO(A) \ -if (getVArgs(emu, 1, va, i) && strcmp((char*)getVArgs(emu, 1, va, i), A) == 0) { \ - XICCallback* origin = (XICCallback*)getVArgs(emu, 1, va, i+1); \ - setVArgs(emu, 1, va, i+1, (uintptr_t)find##A##Fct(origin)); \ +if (va[i] && strcmp((char*)from_ptrv(va[i]), A) == 0) { \ + XICCallback* origin = (XICCallback*)from_ptrv(va[i+1]); \ + va[i+1] = to_ptrv(find##A##Fct(origin)); \ } -EXPORT void* my32_XVaCreateNestedList(x64emu_t* emu, int unused, uintptr_t* va) { +EXPORT void* my32_XCreateIC(x64emu_t* emu, void* xim, ptr_t* va) { int n = 0; - while (getVArgs(emu, 1, va, n)) n+=2 ; + while (va[n]) n+=2; for (int i = 0; i < n; i += 2) { SUPER() } void* res = NULL; - VA_CALL(my->XVaCreateNestedList, unused, 1, n, res); + VA_CALL(my->XCreateIC, xim, 1, n, res); return res; } -EXPORT void* my32_XCreateIC(x64emu_t* emu, void* xim, uintptr_t* va) { +#if 0 +EXPORT void* my32_XVaCreateNestedList(x64emu_t* emu, int unused, uintptr_t* va) { int n = 0; - while (getVArgs(emu, 1, va, n)) n+=2; + while (getVArgs(emu, 1, va, n)) n+=2 ; for (int i = 0; i < n; i += 2) { SUPER() } void* res = NULL; - VA_CALL(my->XCreateIC, xim, 1, n, res); + VA_CALL(my->XVaCreateNestedList, unused, 1, n, res); return res; } @@ -1240,7 +1237,9 @@ EXPORT void* my32_XSetICValues(x64emu_t* emu, void* xic, uintptr_t* va) { VA_CALL(my->XSetICValues, xic, 1, n, res); return res; } +#endif #undef GO +#if 0 EXPORT void* my32_XSetIMValues(x64emu_t* emu, void* xim, uintptr_t* va) { int n = 0; @@ -1260,9 +1259,10 @@ EXPORT void* my32_XSetIMValues(x64emu_t* emu, void* xim, uintptr_t* va) { VA_CALL(my->XSetIMValues, xim, 1, n, res) return res; } +#endif #undef VA_CALL #undef SUPER - +#if 0 EXPORT void* my32_XSetErrorHandler(x64emu_t* emu, XErrorHandler handler) { void* ret = my->XSetErrorHandler(finderror_handlerFct(handler)); diff --git a/src/wrapped32/wrappedlibx11_private.h b/src/wrapped32/wrappedlibx11_private.h index 200c4bb1..25a8855f 100644 --- a/src/wrapped32/wrappedlibx11_private.h +++ b/src/wrapped32/wrappedlibx11_private.h @@ -213,7 +213,7 @@ GO(XCreateColormap, LFXLpi) //GO(XCreateFontSet, pFppppp) GO(XCreateGC, pFXLLp) //GO(XCreateGlyphCursor, LFpLLuupp) -//GOM(XCreateIC, pFEpV) // use vararg +GOM(XCreateIC, pFEpV) // use vararg GOM(XCreateImage, pFEXpuiipuuii) GO(dummy_XCreateImage, pFXpuiipuuii) // to have the wrapper //DATAB(_XCreateMutex_fn, 4) @@ -935,7 +935,7 @@ GOM(XNextEvent, iFEXp) //GO(_XomInitConverter, //GO(XOMOfOC, pFp) GOM(XOpenDisplay, pFEp) -//GO(XOpenIM, pFpppp) +GO(XOpenIM, pFXppp) //GO(_XOpenLC, //GO(XOpenOM, pFpppp) //GO(_XParseBaseFontNameList, diff --git a/src/wrapped32/wrappedlibxcursor.c b/src/wrapped32/wrappedlibxcursor.c new file mode 100644 index 00000000..58186502 --- /dev/null +++ b/src/wrapped32/wrappedlibxcursor.c @@ -0,0 +1,29 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <dlfcn.h> + +#include "wrappedlibs.h" + +#include "wrapper32.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" + +#ifdef ANDROID + static const char* libxcursorName = "libXcursor.so"; +#else + static const char* libxcursorName = "libXcursor.so.1"; +#endif + +#define LIBNAME libxcursor + +#ifdef ANDROID +#define NEEDED_LIBS "libX11.so", "libXfixes.so", "libXrender.so" +#else +#define NEEDED_LIBS "libX11.so.6", "libXfixes.so.3", "libXrender.so.1" +#endif + +#include "wrappedlib_init32.h" + diff --git a/src/wrapped32/wrappedlibxcursor_private.h b/src/wrapped32/wrappedlibxcursor_private.h new file mode 100644 index 00000000..af22fe9e --- /dev/null +++ b/src/wrapped32/wrappedlibxcursor_private.h @@ -0,0 +1,66 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error Meh... +#endif + +//GO(XcursorAnimateCreate, pFp) +//GO(XcursorAnimateDestroy, vFp) +//GO(XcursorAnimateNext, LFp) +//GO(XcursorCommentCreate, pFui) +//GO(XcursorCommentDestroy, vFp) +//GO(XcursorCommentsCreate, pFi) +//GO(XcursorCommentsDestroy, vFp) +//GO(_XcursorCreateFontCursor, +//GO(_XcursorCreateGlyphCursor, +//GO(XcursorCursorsCreate, pFpi) +//GO(XcursorCursorsDestroy, vFp) +//GO(XcursorFileLoad, iFSpp) +//GO(XcursorFileLoadAllImages, pFS) +//GO(XcursorFileLoadImage, pFSi) +//GO(XcursorFileLoadImages, pFSi) +//GO(XcursorFilenameLoad, iFppp) +//GO(XcursorFilenameLoadAllImages, pFp) +//GO(XcursorFilenameLoadCursor, LFpp) +//GO(XcursorFilenameLoadCursors, pFpp) +//GO(XcursorFilenameLoadImage, pFpi) +//GO(XcursorFilenameLoadImages, pFpi) +//GO(XcursorFilenameSave, iFppp) +//GO(XcursorFilenameSaveImages, iFpp) +//GO(XcursorFileSave, iFSpp) +//GO(XcursorFileSaveImages, iFSp) +//GO(XcursorGetDefaultSize, iFp) +//GO(_XcursorGetDisplayInfo, +//GO(XcursorGetTheme, pFp) +//GO(XcursorGetThemeCore, iFp) +//GO(XcursorImageCreate, pFii) +//GO(XcursorImageDestroy, vFp) +//GOM(XcursorImageHash, vFEpp) // needs unbridge XImage (first p) +//GO(XcursorImageLoadCursor, LFpp) +//GO(XcursorImagesCreate, pFi) +//GO(XcursorImagesDestroy, vFp) +//GO(XcursorImagesLoadCursor, LFpp) +//GO(XcursorImagesLoadCursors, pFpp) +//GO(XcursorImagesSetName, vFpp) +//GO(XcursorLibraryLoadCursor, LFpp) +//GO(XcursorLibraryLoadCursors, pFpp) +//GO(XcursorLibraryLoadImage, pFppi) +//GO(XcursorLibraryLoadImages, pFppi) +//GO(XcursorLibraryPath, pFv) +//GO(XcursorLibraryShape, iFp) +//GO(XcursorNoticeCreateBitmap, vFpLuu) +//GOM(XcursorNoticePutBitmap, vFEpLp) //needs unbridge XImage (last p) +//GO(XcursorSetDefaultSize, iFpi) +//GO(XcursorSetTheme, iFpp) +//GO(XcursorSetThemeCore, iFpi) +//GO(XcursorShapeLoadCursor, LFpu) +//GO(XcursorShapeLoadCursors, pFpu) +//GO(XcursorShapeLoadImage, pFupi) +//GO(XcursorShapeLoadImages, pFupi) +//GO(XcursorSupportsAnim, iFp) +//GO(XcursorSupportsARGB, iFp) +//GO(XcursorTryShapeBitmapCursor, LFpLLppuu) +//GO(XcursorTryShapeCursor, LFpLLuupp) +//GO(XcursorXcFileLoad, iFppp) +//GO(XcursorXcFileLoadAllImages, pFp) +//GO(XcursorXcFileLoadImage, pFpi) +//GO(XcursorXcFileLoadImages, pFpi) +//GO(XcursorXcFileSave, iFppp) diff --git a/src/wrapped32/wrappedlibxfixes.c b/src/wrapped32/wrappedlibxfixes.c new file mode 100644 index 00000000..16352a7c --- /dev/null +++ b/src/wrapped32/wrappedlibxfixes.c @@ -0,0 +1,30 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <dlfcn.h> + +#include "wrappedlibs.h" + +#include "wrapper32.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" + +#ifdef ANDROID + static const char* libxfixesName = "libXfixes.so"; +#else + static const char* libxfixesName = "libXfixes.so.3"; +#endif + +#define LIBNAME libxfixes + +#if 0 +#ifdef ANDROID +#define NEEDED_LIBS "libX11.so", "libxcb.so", "libXau.so", "libXdmcp.so" +#else +#define NEEDED_LIBS "libX11.so.6", "libxcb.so.1", "libXau.so.6", "libXdmcp.so.6" +#endif +#endif + +#include "wrappedlib_init32.h" diff --git a/src/wrapped32/wrappedlibxfixes_private.h b/src/wrapped32/wrappedlibxfixes_private.h new file mode 100644 index 00000000..0a16f7ce --- /dev/null +++ b/src/wrapped32/wrappedlibxfixes_private.h @@ -0,0 +1,42 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error Meh... +#endif + +//GO(XFixesChangeCursor, vFpLL) +//GO(XFixesChangeCursorByName, vFpLp) +//GO(XFixesChangeSaveSet, vFpLiii) +//GO(XFixesCopyRegion, vFpLL) +//GO(XFixesCreatePointerBarrier, LFpLiiiiiip) +//GO(XFixesCreateRegion, LFppi) +//GO(XFixesCreateRegionFromBitmap, LFpL) +//GO(XFixesCreateRegionFromGC, LFpp) +//GO(XFixesCreateRegionFromPicture, LFpL) +//GO(XFixesCreateRegionFromWindow, LFpLi) +//GO(XFixesDestroyPointerBarrier, vFpL) +//GO(XFixesDestroyRegion, vFpL) +//GO(XFixesExpandRegion, vFpLLuuuu) +//DATA(XFixesExtensionInfo, sizeof(ptr_t)) //B +//DATA(XFixesExtensionName, sizeof(ptr_t)) //D +//GO(XFixesFetchRegion, pFpLp) +//GO(XFixesFetchRegionAndBounds, pFpLpp) +//GO(XFixesFindDisplay, pFp) // Warning: failed to confirm +//GO(XFixesGetCursorImage, pFp) +//GO(XFixesGetCursorName, pFpLp) +//GO(XFixesHideCursor, vFpL) +//GO(XFixesIntersectRegion, vFpLLL) +//GO(XFixesInvertRegion, vFpLpL) +//GO(XFixesQueryExtension, iFppp) +//GO(XFixesQueryVersion, iFppp) +//GO(XFixesRegionExtents, vFpLL) +//GO(XFixesSelectCursorInput, vFpLL) +//GO(XFixesSelectSelectionInput, vFpLLL) +//GO(XFixesSetCursorName, vFpLp) +//GO(XFixesSetGCClipRegion, vFppiiL) +//GO(XFixesSetPictureClipRegion, vFpLiiL) +//GO(XFixesSetRegion, vFpLpi) +//GO(XFixesSetWindowShapeRegion, vFpLiiiL) +//GO(XFixesShowCursor, vFpL) +//GO(XFixesSubtractRegion, vFpLLL) +//GO(XFixesTranslateRegion, vFpLii) +//GO(XFixesUnionRegion, vFpLLL) +//GO(XFixesVersion, iFv) diff --git a/src/wrapped32/wrappedlibxrandr.c b/src/wrapped32/wrappedlibxrandr.c new file mode 100644 index 00000000..496ee650 --- /dev/null +++ b/src/wrapped32/wrappedlibxrandr.c @@ -0,0 +1,34 @@ +#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 "wrapper32.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" +#include "emu/x64emu_private.h" +#include "callback.h" +#include "librarian.h" +#include "box32context.h" +#include "emu/x64emu_private.h" + +#ifdef ANDROID + static const char* libxrandrName = "libXrandr.so"; +#else + static const char* libxrandrName = "libXrandr.so.2"; +#endif + +#define LIBNAME libxrandr +#if 0 +#ifdef ANDROID +#define NEEDED_LIBS "libX11.so", "libXext.so", "libXrender.so" +#else +#define NEEDED_LIBS "libX11.so.6", "libXext.so.6", "libXrender.so.1" +#endif +#endif +#include "wrappedlib_init32.h" diff --git a/src/wrapped32/wrappedlibxrandr_private.h b/src/wrapped32/wrappedlibxrandr_private.h new file mode 100644 index 00000000..5d005bc7 --- /dev/null +++ b/src/wrapped32/wrappedlibxrandr_private.h @@ -0,0 +1,73 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error Meh... +#endif + +//GO(XRRQueryVersion, iFppp) +//GO(XRRFreeScreenConfigInfo, vFp) +//GO(XRRGetCrtcInfo, pFppL) +//GO(XRRListOutputProperties, pFpLp) +//GO(XRRQueryExtension, iFppp) +//GO(XRRAllocModeInfo, pFpi) +//GO(XRRGetProviderProperty, iFpLLlliiLppppp) +//GO(XRRListProviderProperties, pFpLp) +//GO(XRRRotations, WFpip) +//GO(XRRSetCrtcTransform, vFpLpppi) +//GO(XRRGetCrtcGammaSize, iFpL) +//GO(XRRConfigRotations, WFpp) +//GO(XRRGetProviderInfo, pFppL) +//GO(XRRConfigureOutputProperty, vFpLLiiip) +//GO(XRRSetOutputPrimary, vFpLL) +//GO(XRRFreeOutputInfo, vFp) +//GO(XRRUpdateConfiguration, iFp) +//GO(XRRGetScreenResources, pFpL) +//GO(XRRConfigSizes, pFpp) +//GO(XRRQueryProviderProperty, pFpLL) +//GO(XRRDeleteOutputProperty, vFpLL) +//GO(XRRDeleteProviderProperty, vFpLL) +//GO(XRRSetScreenConfig, iFppLiWL) +//GO(XRRAllocGamma, pFi) +//GO(XRRSetScreenSize, vFpLiiii) +//GO(XRRSetScreenConfigAndRate, iFppLiWwL) +//GO(XRRFreeScreenResources, vFp) +//GO(XRRGetOutputPrimary, LFpL) +//GO(XRRCreateMode, LFpLp) +//GO(XRRConfigCurrentRate, wFp) +//GO(XRRDestroyMode, vFpL) +//GO(XRRSetCrtcConfig, iFppLLiiLWpi) +//GO(XRRConfigCurrentConfiguration, WFpp) +//GO(XRRSizes, pFpip) +//GO(XRRAddOutputMode, vFpLL) +//GO(XRRFreePanning, vFp) +//GO(XRRFreeProviderResources, vFp) +//GO(XRRChangeProviderProperty, vFpLLLiipi) +//GO(XRRGetPanning, pFppL) +//GO(XRRSetProviderOffloadSink, iFpLL) +//GO(XRRGetScreenResourcesCurrent, pFpL) +//GO(XRRConfigTimes, LFpp) +//GO(XRRSetCrtcGamma, vFpLp) +//GO(XRRSetProviderOutputSource, iFpLL) +//GO(XRRGetScreenSizeRange, iFpLpppp) +//GO(XRRRates, pFpiip) +//GO(XRRFreeProviderInfo, vFp) +//GO(XRRConfigRates, pFpip) +//GO(XRRQueryOutputProperty, pFpLL) +//GO(XRRGetOutputProperty, iFpLLlliiLppppp) +//GO(XRRFreeGamma, vFp) +//GO(XRRRootToScreen, iFpL) +//GO(XRRGetScreenInfo, pFpL) +//GO(XRRFreeCrtcInfo, vFp) +//GO(XRRGetProviderResources, pFpL) +//GO(XRRFreeModeInfo, vFp) +//GO(XRRChangeOutputProperty, vFpLLLiipi) +//GO(XRRGetCrtcGamma, pFpL) +//GO(XRRSetPanning, iFppLp) +//GO(XRRSelectInput, vFpLi) +//GO(XRRGetCrtcTransform, iFpLp) +//GO(XRRTimes, LFpip) +//GO(XRRDeleteOutputMode, vFpLL) +//GO(XRRGetOutputInfo, pFppL) +//GO(XRRConfigureProviderProperty, vFpLLiiip) +//GO(XRRAllocateMonitor, pFpi) +//GO(XRRGetMonitors, pFpLip) +//GO(XRRSetMonitor, vFpLp) +//GO(XRRFreeMonitors, vFp) diff --git a/src/wrapped32/wrappedlibxrender.c b/src/wrapped32/wrappedlibxrender.c new file mode 100644 index 00000000..970aebc2 --- /dev/null +++ b/src/wrapped32/wrappedlibxrender.c @@ -0,0 +1,28 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <dlfcn.h> + +#include "wrappedlibs.h" + +#include "wrapper32.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" + +#ifdef ANDROID + static const char* libxrenderName = "libXrender.so"; +#else + static const char* libxrenderName = "libXrender.so.1"; +#endif + +#define LIBNAME libxrender + +#ifdef ANDROID +#define NEEDED_LIBS "libX11.so" +#else +#define NEEDED_LIBS "libX11.so.6" +#endif + +#include "wrappedlib_init32.h" diff --git a/src/wrapped32/wrappedlibxrender_private.h b/src/wrapped32/wrappedlibxrender_private.h new file mode 100644 index 00000000..a1e8cf05 --- /dev/null +++ b/src/wrapped32/wrappedlibxrender_private.h @@ -0,0 +1,51 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error Meh... +#endif + +//GO(XRenderAddGlyphs, vFpLppipi) +//GO(XRenderAddTraps, vFpLiipi) +//GO(XRenderChangePicture, vFpLLp) +//GO(XRenderComposite, vFpiLLLiiiiiiuu) +//GO(XRenderCompositeDoublePoly, vFpiLLpiiiipii) +//GO(XRenderCompositeString16, vFpiLLpLiiiipi) +//GO(XRenderCompositeString32, vFpiLLpLiiiipi) +//GO(XRenderCompositeString8, vFpiLLpLiiiipi) +//GO(XRenderCompositeText16, vFpiLLpiiiipi) +//GO(XRenderCompositeText32, vFpiLLpiiiipi) +//GO(XRenderCompositeText8, vFpiLLpiiiipi) +//GO(XRenderCompositeTrapezoids, vFpiLLpiipi) +//GO(XRenderCompositeTriangles, vFpiLLpiipi) +//GO(XRenderCompositeTriFan, vFpiLLpiipi) +//GO(XRenderCompositeTriStrip, vFpiLLpiipi) +//GO(XRenderCreateAnimCursor, LFpip) +//GO(XRenderCreateConicalGradient, LFppppi) +//GO(XRenderCreateCursor, LFpLuu) +//GO(XRenderCreateGlyphSet, LFpp) +//GO(XRenderCreateLinearGradient, LFppppi) +//GO(XRenderCreatePicture, LFpLpLp) +//GO(XRenderCreateRadialGradient, LFppppi) +//GO(XRenderCreateSolidFill, LFpp) +//DATAB(XRenderExtensionInfo, sizeof(ptr_t)) +//DATA(XRenderExtensionName, sizeof(ptr_t)) //D +//GO(XRenderFillRectangle, vFpiLpiiuu) +//GO(XRenderFillRectangles, vFpiLppi) +//GO(XRenderFindDisplay, pFp) +//GO(XRenderFindFormat, pFpLpi) +//GO(XRenderFindStandardFormat, pFpi) +//GO(XRenderFindVisualFormat, pFpp) +//GO(XRenderFreeGlyphs, vFpLpi) +//GO(XRenderFreeGlyphSet, vFpL) +//GO(XRenderFreePicture, vFpL) +//GO(XRenderParseColor, iFppp) +//GO(XRenderQueryExtension, iFppp) +//GO(XRenderQueryFilters, pFpL) +//GO(XRenderQueryFormats, iFp) +//GO(XRenderQueryPictIndexValues, pFppp) +//GO(XRenderQuerySubpixelOrder, iFpi) +//GO(XRenderQueryVersion, iFppp) +//GO(XRenderReferenceGlyphSet, LFpL) +//GO(XRenderSetPictureClipRectangles, vFpLiipi) +//GO(XRenderSetPictureClipRegion, vFpLp) +//GO(XRenderSetPictureFilter, vFpLppi) +//GO(XRenderSetPictureTransform, vFpLp) +//GO(XRenderSetSubpixelOrder, iFpii) |