lsteamclient: Fix ISteamHTMLSurface vtable

This commit is contained in:
Andrew Eikum 2018-01-29 13:58:39 -06:00
parent 3daa85b407
commit b8292666fe
2 changed files with 22 additions and 0 deletions

View File

@ -146,6 +146,11 @@ print_sizes = []
class_versions = {}
def handle_destructor(cfile, classname, winclassname, method):
cfile.write("DEFINE_THISCALL_WRAPPER(%s_destructor, 4)\n" % winclassname)
cfile.write("void __thiscall %s_destructor(%s *_this)\n{/* never called */}\n\n" % (winclassname, winclassname))
return "destructor"
def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, existing_methods):
used_name = method.spelling
idx = '2'
@ -334,6 +339,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(steamclient);
for child in children:
if child.kind == clang.cindex.CursorKind.CXX_METHOD:
methods.append(handle_method(cfile, classnode.spelling, winclassname, cppname, child, cpp, cpp_h, methods))
elif child.kind == clang.cindex.CursorKind.DESTRUCTOR:
methods.append(handle_destructor(cfile, classnode.spelling, winclassname, child))
cfile.write("extern vtable_ptr %s_vtable;\n\n" % winclassname)
cfile.write("#ifndef __GNUC__\n")

View File

@ -20,6 +20,10 @@ typedef struct __winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004 {
void *linux_side;
} winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004;
DEFINE_THISCALL_WRAPPER(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_destructor, 4)
void __thiscall winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_destructor(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004 *_this)
{/* never called */}
DEFINE_THISCALL_WRAPPER(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_Init, 4)
bool __thiscall winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_Init(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004 *_this)
{
@ -278,6 +282,7 @@ extern vtable_ptr winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_vt
void __asm_dummy_vtables(void) {
#endif
__ASM_VTABLE(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004,
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_destructor)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_Init)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_Shutdown)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_004_CreateBrowser)
@ -335,6 +340,10 @@ typedef struct __winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003 {
void *linux_side;
} winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003;
DEFINE_THISCALL_WRAPPER(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_destructor, 4)
void __thiscall winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_destructor(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003 *_this)
{/* never called */}
DEFINE_THISCALL_WRAPPER(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_Init, 4)
bool __thiscall winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_Init(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003 *_this)
{
@ -586,6 +595,7 @@ extern vtable_ptr winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_vt
void __asm_dummy_vtables(void) {
#endif
__ASM_VTABLE(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003,
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_destructor)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_Init)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_Shutdown)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_003_CreateBrowser)
@ -642,6 +652,10 @@ typedef struct __winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002 {
void *linux_side;
} winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002;
DEFINE_THISCALL_WRAPPER(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_destructor, 4)
void __thiscall winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_destructor(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002 *_this)
{/* never called */}
DEFINE_THISCALL_WRAPPER(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_Init, 4)
bool __thiscall winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_Init(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002 *_this)
{
@ -886,6 +900,7 @@ extern vtable_ptr winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_vt
void __asm_dummy_vtables(void) {
#endif
__ASM_VTABLE(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002,
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_destructor)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_Init)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_Shutdown)
VTABLE_ADD_FUNC(winISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_002_CreateBrowser)