Skip to content

Commit

Permalink
[BOX32][WRAPPER] Added some more 32bits wrapped function, and fixed a…
Browse files Browse the repository at this point in the history
… few more
  • Loading branch information
ptitSeb committed Sep 25, 2024
1 parent 24a5917 commit 144830b
Show file tree
Hide file tree
Showing 14 changed files with 325 additions and 85 deletions.
3 changes: 2 additions & 1 deletion rebuild_wrappers_32.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ def generate_files(root: str, files: Iterable[str], ver: str, gbls: SortedGlobal
"\n#error Invalid return type: wo structure declaration\n", # B
"\n#error Invalid return type: end of structure declaration\n", # _
"R_EAX = to_cstring(fn({0}));", # t
"\n#error Invalid return type: Display* declaration\n", # X
"R_EAX = to_ptrv(FindDisplay(fn({0})));", # X
]
asargs = [
"emu, ", # E
Expand Down Expand Up @@ -1296,6 +1296,7 @@ def generate_files(root: str, files: Iterable[str], ver: str, gbls: SortedGlobal
int of_convert32(int);
void* getDisplay(void*);
void* FindDisplay(void*);
""",
"wrapper32.h": """
Expand Down
38 changes: 37 additions & 1 deletion src/wrapped32/generated/functions_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
#() tFi -> tFi
#() tFu -> tFu
#() tFp -> tFp
#() XFv -> XFv
#() iFBp_ -> iFB
#() LFrL_ -> LFB
#() pFrL_ -> pFB
Expand Down Expand Up @@ -272,6 +273,7 @@
#() vFlip -> vFlip
#() vFllp -> vFllp
#() vFlpp -> vFlpp
#() vFpii -> vFpii
#() vFpip -> vFpip
#() vFpuU -> vFpuU
#() vFpuf -> vFpuf
Expand Down Expand Up @@ -319,6 +321,7 @@
#() iFpuu -> iFpuu
#() iFpuU -> iFpuU
#() iFpLi -> iFpLi
#() iFpLp -> iFpLp
#() iFppi -> iFppi
#() iFppu -> iFppu
#() iFppL -> iFppL
Expand All @@ -332,6 +335,7 @@
#() iFSli -> iFSli
#() iFXip -> iFXip
#() iFXuu -> iFXuu
#() iFXLl -> iFXLl
#() iFXLL -> iFXLL
#() iFXLp -> iFXLp
#() iFXpu -> iFXpu
Expand All @@ -350,7 +354,6 @@
#() fFuii -> fFuii
#() fFfff -> fFfff
#() fFffp -> fFffp
#() fFppa -> fFppa
#() dFddd -> dFddd
#() dFddp -> dFddp
#() lFipL -> lFipL
Expand All @@ -369,6 +372,7 @@
#() pFEXL -> pFEXL
#() pFEXp -> pFEXp
#() pFipi -> pFipi
#() pFipL -> pFipL
#() pFulu -> pFulu
#() pFpii -> pFpii
#() pFpiL -> pFpiL
Expand All @@ -391,6 +395,7 @@
#() iFBp_pi -> iFBpi
#() IFpBp_i -> IFpBi
#() UFpBp_i -> UFpBi
#() fFpBp_a -> fFpBa
#() dFpBp_i -> dFpBi
#() dFpBp_a -> dFpBa
#() lFpBp_i -> lFpBi
Expand Down Expand Up @@ -538,11 +543,13 @@
#() lFEipi -> lFEipi
#() lFiipL -> lFiipL
#() lFipLi -> lFipLi
#() lFipLl -> lFipLl
#() lFpuip -> lFpuip
#() LFEXii -> LFEXii
#() LFpLLS -> LFpLLS
#() LFppLp -> LFppLp
#() LFppLa -> LFppLa
#() LFXCii -> LFXCii
#() LFXLpi -> LFXLpi
#() pFEupp -> pFEupp
#() pFEppi -> pFEppi
Expand Down Expand Up @@ -571,6 +578,7 @@
#() LFpbp_Lp -> LFpBLp
#() iFEpprLL_ -> iFEppB
#() vFXLrpLiL_L -> vFXLBL
#() iFuirLL_BLL_ -> iFuiBB
#() iFXLpBLWWWcc_ -> iFXLpB
#() LFpLpriiiiiiiiilt_ -> LFpLpB
#() vFEuipp -> vFEuipp
Expand Down Expand Up @@ -676,6 +684,8 @@
#() iFEpppi -> iFEpppi
#() iFEpppp -> iFEpppp
#() iFEXLpi -> iFEXLpi
#() iFEXpLp -> iFEXpLp
#() iFEXppp -> iFEXppp
#() iFiiipu -> iFiiipu
#() iFiiipp -> iFiiipp
#() iFiLLLL -> iFiLLLL
Expand All @@ -700,6 +710,7 @@
#() pFpippp -> pFpippp
#() pFppuup -> pFppuup
#() pFppupp -> pFppupp
#() pFXpipi -> pFXpipi
#() iFEBh_ppp -> iFEBppp
#() LFpbp_LLp -> LFpBLLp
#() LFpBp_LLp -> LFpBLLp
Expand Down Expand Up @@ -773,16 +784,19 @@
#() vFpdddii -> vFpdddii
#() vFppupii -> vFppupii
#() vFpppppp -> vFpppppp
#() vFXLiiii -> vFXLiiii
#() iFEuppup -> iFEuppup
#() iFEuppLp -> iFEuppLp
#() iFEpiLpp -> iFEpiLpp
#() iFEpppup -> iFEpppup
#() iFEXLilp -> iFEXLilp
#() iFEXpiup -> iFEXpiup
#() iFEXpppp -> iFEXpppp
#() iFuiiuup -> iFuiiuup
#() iFpiippp -> iFpiippp
#() iFppiiii -> iFppiiii
#() iFXLiiiL -> iFXLiiiL
#() iFXLpppp -> iFXLpppp
#() iFXpIppp -> iFXpIppp
#() uFupuufp -> uFupuufp
#() lFipLipu -> lFipLipu
Expand Down Expand Up @@ -843,6 +857,7 @@
#() vFpipipiu -> vFpipipiu
#() vFpddiidd -> vFpddiidd
#() iFEpLiipV -> iFEpLiipV
#() iFEXLpppp -> iFEXLpppp
#() iFuiiiuup -> iFuiiiuup
#() iFpWCiWCi -> iFpWCiWCi
#() iFpupLpLi -> iFpupLpLi
Expand Down Expand Up @@ -886,6 +901,7 @@
#() uFuupuuiuf -> uFuupuuiuf
#() uFulpppppp -> uFulpppppp
#() LFXLpuuLLu -> LFXLpuuLLu
#() iFXLLiippBL_ -> iFXLLiippB
#() vFiiiiiiiii -> vFiiiiiiiii
#() vFiiiiiiill -> vFiiiiiiill
#() vFiiiiillli -> vFiiiiillli
Expand Down Expand Up @@ -939,6 +955,7 @@
#() vFffffffffff -> vFffffffffff
#() iFuiiiuuiiip -> iFuiiiuuiiip
#() iFXuuLiuiiLL -> iFXuuLiuiiLL
#() pFpppppppppp -> pFpppppppppp
#() pFXpuiipuuii -> pFXpuiipuuii
#() vFiiiiillliip -> vFiiiiillliip
#() vFiiiiilllilp -> vFiiiiilllilp
Expand All @@ -956,6 +973,7 @@
#() vFUufffffffff -> vFUufffffffff
#() vFpipipiipiiu -> vFpipipiipiiu
#() iFEXLppiiiiuu -> iFEXLppiiiiuu
#() iFEXpLLiiLWpi -> iFEXpLLiiLWpi
#() iFuiiiiuuiiip -> iFuiiiiuuiiip
#() pFEXpuiipuuii -> pFEXpuiipuuii
#() vFuiiiiiiiiuUC -> vFuiiiiiiiiuUC
Expand All @@ -966,6 +984,7 @@
#() vFuuuuuuuuuuuu -> vFuuuuuuuuuuuu
#() vFffffffffffff -> vFffffffffffff
#() pFEXLiiuuLipii -> pFEXLiiuuLipii
#() iFXLLlliLBL_pBL_BL_Bp_ -> iFXLLlliLBpBBB
#() vFuiiiiiiiiiuup -> vFuiiiiiiiiiuup
#() vFuuuuuuuuuuuuu -> vFuuuuuuuuuuuuu
#() vFuUuuuuuuuuuuu -> vFuUuuuuuuuuuuu
Expand Down Expand Up @@ -1380,17 +1399,22 @@ wrappedlibrt:
wrappedlibx11:
- iFp:
- XDestroyImage
- XFreeExtensionList
- XInitImage
- _XInitImageFuncPtrs
- iFX:
- XCloseDisplay
- pFp:
- XOpenDisplay
- XSetErrorHandler
- iFpL:
- XFilterEvent
- iFXp:
- XNextEvent
- pFpV:
- XCreateIC
- pFXp:
- XListExtensions
- vFXLp:
- XSetWMNormalHints
- iFpip:
Expand All @@ -1404,18 +1428,25 @@ wrappedlibx11:
- XGetPixel
- iFXLpi:
- XSetWMProtocols
- iFXppp:
- XIfEvent
- iFXLilp:
- XSendEvent
- iFXpiup:
- Xutf8TextListToTextProperty
- iFXpppp:
- XQueryExtension
- pFpiiuu:
- XSubImage
- iFXLpppp:
- XQueryTree
- iFXLLLiipi:
- XChangeProperty
- pFXLiiuuLi:
- XGetImage
- vFXLpppippp:
- XSetWMProperties
- Xutf8SetWMProperties
- iFXLppiiiiuu:
- XPutImage
- pFXpuiipuuii:
Expand All @@ -1432,6 +1463,11 @@ wrappedlibxrandr:
- pFXpL:
- XRRGetCrtcInfo
- XRRGetOutputInfo
- XRRGetPanning
- iFXpLp:
- XRRSetPanning
- iFXpLLiiLWpi:
- XRRSetCrtcConfig
wrappedlibxrender:
wrappedopenal:
- vFv:
Expand Down
12 changes: 12 additions & 0 deletions src/wrapped32/generated/wrappedlibx11types32.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,22 @@
typedef int32_t (*iFp_t)(void*);
typedef int32_t (*iFX_t)(void*);
typedef void* (*pFp_t)(void*);
typedef int32_t (*iFpL_t)(void*, uintptr_t);
typedef int32_t (*iFXp_t)(void*, void*);
typedef void* (*pFpV_t)(void*, ...);
typedef void* (*pFXp_t)(void*, void*);
typedef void (*vFXLp_t)(void*, uintptr_t, void*);
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 (*iFXLpi_t)(void*, uintptr_t, void*, int32_t);
typedef int32_t (*iFXppp_t)(void*, void*, void*, void*);
typedef int32_t (*iFXLilp_t)(void*, uintptr_t, int32_t, intptr_t, void*);
typedef int32_t (*iFXpiup_t)(void*, void*, int32_t, uint32_t, void*);
typedef int32_t (*iFXpppp_t)(void*, void*, void*, void*, void*);
typedef void* (*pFpiiuu_t)(void*, int32_t, int32_t, uint32_t, uint32_t);
typedef int32_t (*iFXLpppp_t)(void*, uintptr_t, void*, void*, void*, void*);
typedef int32_t (*iFXLLLiipi_t)(void*, uintptr_t, uintptr_t, uintptr_t, int32_t, int32_t, void*, int32_t);
typedef void* (*pFXLiiuuLi_t)(void*, uintptr_t, int32_t, int32_t, uint32_t, uint32_t, uintptr_t, int32_t);
typedef void (*vFXLpppippp_t)(void*, uintptr_t, void*, void*, void*, int32_t, void*, void*, void*);
Expand All @@ -35,26 +40,33 @@ typedef uintptr_t (*LFXLiiuuuiupLp_t)(void*, uintptr_t, int32_t, int32_t, uint32

#define SUPER() ADDED_FUNCTIONS() \
GO(XDestroyImage, iFp_t) \
GO(XFreeExtensionList, iFp_t) \
GO(XInitImage, iFp_t) \
GO(_XInitImageFuncPtrs, iFp_t) \
GO(XCloseDisplay, iFX_t) \
GO(XOpenDisplay, pFp_t) \
GO(XSetErrorHandler, pFp_t) \
GO(XFilterEvent, iFpL_t) \
GO(XNextEvent, iFXp_t) \
GO(XCreateIC, pFpV_t) \
GO(XListExtensions, pFXp_t) \
GO(XSetWMNormalHints, vFXLp_t) \
GO(XStringListToTextProperty, iFpip_t) \
GO(XCheckTypedEvent, iFXip_t) \
GO(XGetWindowAttributes, iFXLp_t) \
GO(XSetWMHints, iFXLp_t) \
GO(XGetPixel, LFXii_t) \
GO(XSetWMProtocols, iFXLpi_t) \
GO(XIfEvent, iFXppp_t) \
GO(XSendEvent, iFXLilp_t) \
GO(Xutf8TextListToTextProperty, iFXpiup_t) \
GO(XQueryExtension, iFXpppp_t) \
GO(XSubImage, pFpiiuu_t) \
GO(XQueryTree, iFXLpppp_t) \
GO(XChangeProperty, iFXLLLiipi_t) \
GO(XGetImage, pFXLiiuuLi_t) \
GO(XSetWMProperties, vFXLpppippp_t) \
GO(Xutf8SetWMProperties, vFXLpppippp_t) \
GO(XPutImage, iFXLppiiiiuu_t) \
GO(XCreateImage, pFXpuiipuuii_t) \
GO(XGetSubImage, pFXLiiuuLipii_t) \
Expand Down
7 changes: 6 additions & 1 deletion src/wrapped32/generated/wrappedlibxrandrtypes32.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@

typedef void* (*pFXL_t)(void*, uintptr_t);
typedef void* (*pFXpL_t)(void*, void*, uintptr_t);
typedef int32_t (*iFXpLp_t)(void*, void*, uintptr_t, void*);
typedef int32_t (*iFXpLLiiLWpi_t)(void*, void*, uintptr_t, uintptr_t, int32_t, int32_t, uintptr_t, uint16_t, void*, int32_t);

#define SUPER() ADDED_FUNCTIONS() \
GO(XRRGetScreenResources, pFXL_t) \
GO(XRRGetCrtcInfo, pFXpL_t) \
GO(XRRGetOutputInfo, pFXpL_t)
GO(XRRGetOutputInfo, pFXpL_t) \
GO(XRRGetPanning, pFXpL_t) \
GO(XRRSetPanning, iFXpLp_t) \
GO(XRRSetCrtcConfig, iFXpLLiiLWpi_t)

#endif // __wrappedlibxrandrTYPES32_H_
Loading

0 comments on commit 144830b

Please sign in to comment.