diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-10-03 11:36:36 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-10-03 11:36:36 +0200 |
| commit | 8b8e6501bc4304f9cec7b581a39b8f6738a5fb5e (patch) | |
| tree | e105bd9d97255a22796caf335d1e9a93d404aff5 /src | |
| parent | c4184ef7333c08a3bab6f96eb6807232b3e4cdb6 (diff) | |
| download | box64-8b8e6501bc4304f9cec7b581a39b8f6738a5fb5e.tar.gz box64-8b8e6501bc4304f9cec7b581a39b8f6738a5fb5e.zip | |
[BOX32][WRAPPER] Added a few more libX11 32bits wrapped functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 6 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibx11types32.h | 4 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 4 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 2 | ||||
| -rw-r--r-- | src/wrapped32/wrappedlibx11.c | 20 | ||||
| -rw-r--r-- | src/wrapped32/wrappedlibx11_private.h | 8 |
6 files changed, 40 insertions, 4 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index 26eda5fb..5ded8f65 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -747,6 +747,8 @@ #() iFEpplp -> iFEpplp #() iFEpppi -> iFEpppi #() iFEpppp -> iFEpppp +#() iFEXLip -> iFEXLip +#() iFEXLlp -> iFEXLlp #() iFEXLpi -> iFEXLpi #() iFEXpLp -> iFEXpLp #() iFEXppp -> iFEXppp @@ -1586,6 +1588,10 @@ wrappedlibx11: - XSetWMHints - LFXii: - XGetPixel +- iFXLip: + - XCheckTypedWindowEvent +- iFXLlp: + - XCheckWindowEvent - iFXLpi: - XSetWMProtocols - iFXppp: diff --git a/src/wrapped32/generated/wrappedlibx11types32.h b/src/wrapped32/generated/wrappedlibx11types32.h index 7c5676ca..0556fc68 100644 --- a/src/wrapped32/generated/wrappedlibx11types32.h +++ b/src/wrapped32/generated/wrappedlibx11types32.h @@ -24,6 +24,8 @@ typedef int32_t (*iFpip_t)(void*, int32_t, void*); typedef int32_t (*iFXip_t)(void*, int32_t, void*); typedef int32_t (*iFXLp_t)(void*, uintptr_t, void*); typedef uintptr_t (*LFXii_t)(void*, int32_t, int32_t); +typedef int32_t (*iFXLip_t)(void*, uintptr_t, int32_t, void*); +typedef int32_t (*iFXLlp_t)(void*, uintptr_t, intptr_t, void*); typedef int32_t (*iFXLpi_t)(void*, uintptr_t, void*, int32_t); typedef int32_t (*iFXppp_t)(void*, void*, void*, void*); typedef int32_t (*iFppipp_t)(void*, void*, int32_t, void*, void*); @@ -60,6 +62,8 @@ typedef uintptr_t (*LFXLiiuuuiupLp_t)(void*, uintptr_t, int32_t, int32_t, uint32 GO(XGetWindowAttributes, iFXLp_t) \ GO(XSetWMHints, iFXLp_t) \ GO(XGetPixel, LFXii_t) \ + GO(XCheckTypedWindowEvent, iFXLip_t) \ + GO(XCheckWindowEvent, iFXLlp_t) \ GO(XSetWMProtocols, iFXLpi_t) \ GO(XIfEvent, iFXppp_t) \ GO(XLookupString, iFppipp_t) \ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index ea72c2d4..462c6319 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -837,6 +837,8 @@ typedef int32_t (*iFEpLpV_t)(x64emu_t*, void*, uintptr_t, void*, void*); typedef int32_t (*iFEpplp_t)(x64emu_t*, void*, void*, intptr_t, void*); typedef int32_t (*iFEpppi_t)(x64emu_t*, void*, void*, void*, int32_t); typedef int32_t (*iFEpppp_t)(x64emu_t*, void*, void*, void*, void*); +typedef int32_t (*iFEXLip_t)(x64emu_t*, void*, uintptr_t, int32_t, void*); +typedef int32_t (*iFEXLlp_t)(x64emu_t*, void*, uintptr_t, intptr_t, void*); typedef int32_t (*iFEXLpi_t)(x64emu_t*, void*, uintptr_t, void*, int32_t); typedef int32_t (*iFEXpLp_t)(x64emu_t*, void*, void*, uintptr_t, void*); typedef int32_t (*iFEXppp_t)(x64emu_t*, void*, void*, void*, void*); @@ -1941,6 +1943,8 @@ void iFEpLpV_32(x64emu_t *emu, uintptr_t fcn) { iFEpLpV_t fn = (iFEpLpV_t)fcn; R void iFEpplp_32(x64emu_t *emu, uintptr_t fcn) { iFEpplp_t fn = (iFEpplp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), to_long(from_ptri(long_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); } void iFEpppi_32(x64emu_t *emu, uintptr_t fcn) { iFEpppi_t fn = (iFEpppi_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFEpppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpppp_t fn = (iFEpppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } +void iFEXLip_32(x64emu_t *emu, uintptr_t fcn) { iFEXLip_t fn = (iFEXLip_t)fcn; R_EAX = fn(emu, getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } +void iFEXLlp_32(x64emu_t *emu, uintptr_t fcn) { iFEXLlp_t fn = (iFEXLlp_t)fcn; R_EAX = fn(emu, getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_long(from_ptri(long_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); } void iFEXLpi_32(x64emu_t *emu, uintptr_t fcn) { iFEXLpi_t fn = (iFEXLpi_t)fcn; R_EAX = fn(emu, getDisplay(from_ptriv(R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFEXpLp_32(x64emu_t *emu, uintptr_t fcn) { iFEXpLp_t fn = (iFEXpLp_t)fcn; R_EAX = fn(emu, getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); } void iFEXppp_32(x64emu_t *emu, uintptr_t fcn) { iFEXppp_t fn = (iFEXppp_t)fcn; R_EAX = fn(emu, getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index d9c16ddb..a74460da 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -788,6 +788,8 @@ void iFEpLpV_32(x64emu_t *emu, uintptr_t fnc); void iFEpplp_32(x64emu_t *emu, uintptr_t fnc); void iFEpppi_32(x64emu_t *emu, uintptr_t fnc); void iFEpppp_32(x64emu_t *emu, uintptr_t fnc); +void iFEXLip_32(x64emu_t *emu, uintptr_t fnc); +void iFEXLlp_32(x64emu_t *emu, uintptr_t fnc); void iFEXLpi_32(x64emu_t *emu, uintptr_t fnc); void iFEXpLp_32(x64emu_t *emu, uintptr_t fnc); void iFEXppp_32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedlibx11.c b/src/wrapped32/wrappedlibx11.c index b1078903..139d19c5 100644 --- a/src/wrapped32/wrappedlibx11.c +++ b/src/wrapped32/wrappedlibx11.c @@ -2207,9 +2207,29 @@ EXPORT int my32_XCheckTypedEvent(x64emu_t* emu, void* dpy, int type, my_XEvent_3 return ret; } +EXPORT int my32_XCheckTypedWindowEvent(x64emu_t* emu, void* dpy, XID window, int type, my_XEvent_32_t* evt) +{ + my_XEvent_t event = {0}; + int ret = my->XCheckTypedWindowEvent(dpy, window, type, &event); + if(ret) convertXEvent(evt, &event); + return ret; +} + +EXPORT int my32_XCheckWindowEvent(x64emu_t* emu, void* dpy, XID window, long mask, my_XEvent_32_t* evt) +{ + my_XEvent_t event = {0}; + int ret = my->XCheckWindowEvent(dpy, window, mask, &event); + if(ret) convertXEvent(evt, &event); + return ret; +} + + EXPORT int my32_XSendEvent(x64emu_t* emu, void* dpy, XID window, int propagate, long mask, my_XEvent_32_t* evt) { my_XEvent_t event = {0}; + if(evt->type==XEVT_ClientMessage && evt->xclient.send_event) { + evt->xany.display = to_ptrv(dpy); // some program don't setup this data because the server will + } if(evt) unconvertXEvent(&event, evt); return my->XSendEvent(dpy, window, propagate, mask, evt?(&event):NULL); } diff --git a/src/wrapped32/wrappedlibx11_private.h b/src/wrapped32/wrappedlibx11_private.h index 3476bd14..93700d46 100644 --- a/src/wrapped32/wrappedlibx11_private.h +++ b/src/wrapped32/wrappedlibx11_private.h @@ -52,8 +52,8 @@ GOM(XChangeProperty, iFEXLLLiipi) //GOM(XCheckIfEvent, iFEpppp) //GO(XCheckMaskEvent, iFplp) GOM(XCheckTypedEvent, iFEXip) -//GO(XCheckTypedWindowEvent, iFpLip) -//GO(XCheckWindowEvent, iFpLlp) +GOM(XCheckTypedWindowEvent, iFEXLip) +GOM(XCheckWindowEvent, iFEXLlp) //GO(XCirculateSubwindows, iFpLi) //GO(XCirculateSubwindowsDown, iFpL) //GO(XCirculateSubwindowsUp, iFpL) @@ -339,7 +339,7 @@ GO(XFlush, iFX) //GO(XFlushGC, vFpp) //GO(_XFlushGCCache, vFpp) //GO(XFontsOfFontSet, iFppp) -//GO(XForceScreenSaver, iFpi) +GO(XForceScreenSaver, iFXi) GO(XFree, iFp) //GO(_XFreeAtomTable, GO(XFreeColormap, iFXL) @@ -975,7 +975,7 @@ GOM(XQueryExtension, iFEXpppp) //GO(XQueryTextExtents, iFpLpipppp) //GO(XQueryTextExtents16, iFpLpipppp) GOM(XQueryTree, iFEXLpppp) -//GO(XRaiseWindow, iFpL) +GO(XRaiseWindow, iFXL) //GO(_XRead, iFppl) //GO(XReadBitmapFile, iFpLpppppp) //GO(XReadBitmapFileData, iFpppppp) |