diff --git a/ThunkLibs/GuestLibs/CMakeLists.txt b/ThunkLibs/GuestLibs/CMakeLists.txt index 1649912521..f6d6e01c1f 100644 --- a/ThunkLibs/GuestLibs/CMakeLists.txt +++ b/ThunkLibs/GuestLibs/CMakeLists.txt @@ -195,72 +195,10 @@ if (BITNESS EQUAL 64) # target_link_libraries(SDL2-guest PRIVATE GL) # target_link_libraries(SDL2-guest PRIVATE dl) - find_package(PkgConfig) - pkg_search_module(X11 REQUIRED x11) - version_to_variables(${X11_VERSION} X11) - - generate(libX11 ${CMAKE_CURRENT_SOURCE_DIR}/../libX11/libX11_interface.cpp) - add_guest_lib(X11 "libX11.so.6") - - target_compile_definitions(libX11-guest-deps INTERFACE -DX11_VERSION_MAJOR=${X11_VERSION_MAJOR}) - target_compile_definitions(libX11-guest-deps INTERFACE -DX11_VERSION_MINOR=${X11_VERSION_MINOR}) - target_compile_definitions(libX11-guest-deps INTERFACE -DX11_VERSION_PATCH=${X11_VERSION_PATCH}) - - generate(libXext ${CMAKE_CURRENT_SOURCE_DIR}/../libXext/libXext_interface.cpp) - add_guest_lib(Xext "libXext.so.6") - - target_compile_definitions(libXext-guest-deps INTERFACE -DX11_VERSION_MAJOR=${X11_VERSION_MAJOR}) - target_compile_definitions(libXext-guest-deps INTERFACE -DX11_VERSION_MINOR=${X11_VERSION_MINOR}) - target_compile_definitions(libXext-guest-deps INTERFACE -DX11_VERSION_PATCH=${X11_VERSION_PATCH}) - - generate(libXrender ${CMAKE_CURRENT_SOURCE_DIR}/../libXrender/libXrender_interface.cpp) - add_guest_lib(Xrender "libXrender.so.1") - - generate(libXfixes ${CMAKE_CURRENT_SOURCE_DIR}/../libXfixes/libXfixes_interface.cpp) - add_guest_lib(Xfixes "libXfixes.so.3") - generate(libvulkan ${CMAKE_CURRENT_SOURCE_DIR}/../libvulkan/libvulkan_interface.cpp) target_include_directories(libvulkan-guest-deps INTERFACE ${FEX_PROJECT_SOURCE_DIR}/External/Vulkan-Headers/include/) add_guest_lib(vulkan "libvulkan.so.1") - find_package(PkgConfig) - pkg_search_module(XCB REQUIRED xcb) - version_to_variables(${XCB_VERSION} XCB) - - generate(libxcb ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb/libxcb_interface.cpp) - add_guest_lib(xcb "libxcb.so.1") - - target_compile_definitions(libxcb-guest-deps INTERFACE -DXCB_VERSION_MAJOR=${XCB_VERSION_MAJOR}) - target_compile_definitions(libxcb-guest-deps INTERFACE -DXCB_VERSION_MINOR=${XCB_VERSION_MINOR}) - target_compile_definitions(libxcb-guest-deps INTERFACE -DXCB_VERSION_PATCH=${XCB_VERSION_PATCH}) - - generate(libxcb-dri2 ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-dri2/libxcb-dri2_interface.cpp) - add_guest_lib(xcb-dri2 "libxcb-dri2.so.0") - - generate(libxcb-dri3 ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-dri3/libxcb-dri3_interface.cpp) - add_guest_lib(xcb-dri3 "libxcb-dri3.so.0") - - generate(libxcb-xfixes ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-xfixes/libxcb-xfixes_interface.cpp) - add_guest_lib(xcb-xfixes "libxcb-xfixes.so.0") - - generate(libxcb-shm ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-shm/libxcb-shm_interface.cpp) - add_guest_lib(xcb-shm "libxcb-shm.so.0") - - generate(libxcb-sync ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-sync/libxcb-sync_interface.cpp) - add_guest_lib(xcb-sync "libxcb-sync.so.1") - - generate(libxcb-present ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-present/libxcb-present_interface.cpp) - add_guest_lib(xcb-present "libxcb-present.so.0") - - generate(libxcb-randr ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-randr/libxcb-randr_interface.cpp) - add_guest_lib(xcb-randr "libxcb-randr.so.0") - - generate(libxcb-glx ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-glx/libxcb-glx_interface.cpp) - add_guest_lib(xcb-glx "libxcb-glx.so.0") - - generate(libxshmfence ${CMAKE_CURRENT_SOURCE_DIR}/../libxshmfence/libxshmfence_interface.cpp) - add_guest_lib(xshmfence "libxshmfence.so.1") - generate(libdrm ${CMAKE_CURRENT_SOURCE_DIR}/../libdrm/libdrm_interface.cpp) target_include_directories(libdrm-guest-deps INTERFACE /usr/include/drm/) target_include_directories(libdrm-guest-deps INTERFACE /usr/include/libdrm/) diff --git a/ThunkLibs/HostLibs/CMakeLists.txt b/ThunkLibs/HostLibs/CMakeLists.txt index edc3e16587..812366e118 100644 --- a/ThunkLibs/HostLibs/CMakeLists.txt +++ b/ThunkLibs/HostLibs/CMakeLists.txt @@ -124,72 +124,10 @@ foreach(GUEST_BITNESS IN LISTS BITNESS_LIST) # add_host_lib(SDL2 ${GUEST_BITNESS}) # target_include_directories(SDL2-host PRIVATE ${SDL2_INCLUDE_DIRS}) - find_package(PkgConfig) - pkg_search_module(X11 REQUIRED x11) - version_to_variables(${X11_VERSION} X11) - - generate(libX11 ${CMAKE_CURRENT_SOURCE_DIR}/../libX11/libX11_interface.cpp ${GUEST_BITNESS}) - add_host_lib(X11 ${GUEST_BITNESS}) - - target_compile_definitions(libX11-${GUEST_BITNESS}-deps INTERFACE -DX11_VERSION_MAJOR=${X11_VERSION_MAJOR}) - target_compile_definitions(libX11-${GUEST_BITNESS}-deps INTERFACE -DX11_VERSION_MINOR=${X11_VERSION_MINOR}) - target_compile_definitions(libX11-${GUEST_BITNESS}-deps INTERFACE -DX11_VERSION_PATCH=${X11_VERSION_PATCH}) - - generate(libXext ${CMAKE_CURRENT_SOURCE_DIR}/../libXext/libXext_interface.cpp ${GUEST_BITNESS}) - add_host_lib(Xext ${GUEST_BITNESS}) - - target_compile_definitions(libXext-${GUEST_BITNESS}-deps INTERFACE -DX11_VERSION_MAJOR=${X11_VERSION_MAJOR}) - target_compile_definitions(libXext-${GUEST_BITNESS}-deps INTERFACE -DX11_VERSION_MINOR=${X11_VERSION_MINOR}) - target_compile_definitions(libXext-${GUEST_BITNESS}-deps INTERFACE -DX11_VERSION_PATCH=${X11_VERSION_PATCH}) - - generate(libXrender ${CMAKE_CURRENT_SOURCE_DIR}/../libXrender/libXrender_interface.cpp ${GUEST_BITNESS}) - add_host_lib(Xrender ${GUEST_BITNESS}) - - generate(libXfixes ${CMAKE_CURRENT_SOURCE_DIR}/../libXfixes/libXfixes_interface.cpp ${GUEST_BITNESS}) - add_host_lib(Xfixes ${GUEST_BITNESS}) - generate(libvulkan ${CMAKE_CURRENT_SOURCE_DIR}/../libvulkan/libvulkan_interface.cpp ${GUEST_BITNESS}) target_include_directories(libvulkan-${GUEST_BITNESS}-deps INTERFACE ${FEX_PROJECT_SOURCE_DIR}/External/Vulkan-Headers/include/) add_host_lib(vulkan ${GUEST_BITNESS}) - find_package(PkgConfig) - pkg_search_module(XCB REQUIRED xcb) - version_to_variables(${XCB_VERSION} XCB) - - generate(libxcb ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb/libxcb_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb ${GUEST_BITNESS}) - - target_compile_definitions(libxcb-${GUEST_BITNESS}-deps INTERFACE -DXCB_VERSION_MAJOR=${XCB_VERSION_MAJOR}) - target_compile_definitions(libxcb-${GUEST_BITNESS}-deps INTERFACE -DXCB_VERSION_MINOR=${XCB_VERSION_MINOR}) - target_compile_definitions(libxcb-${GUEST_BITNESS}-deps INTERFACE -DXCB_VERSION_PATCH=${XCB_VERSION_PATCH}) - - generate(libxcb-dri2 ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-dri2/libxcb-dri2_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb-dri2 ${GUEST_BITNESS}) - - generate(libxcb-dri3 ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-dri3/libxcb-dri3_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb-dri3 ${GUEST_BITNESS}) - - generate(libxcb-xfixes ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-xfixes/libxcb-xfixes_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb-xfixes ${GUEST_BITNESS}) - - generate(libxcb-shm ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-shm/libxcb-shm_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb-shm ${GUEST_BITNESS}) - - generate(libxcb-sync ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-sync/libxcb-sync_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb-sync ${GUEST_BITNESS}) - - generate(libxcb-present ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-present/libxcb-present_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb-present ${GUEST_BITNESS}) - - generate(libxcb-randr ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-randr/libxcb-randr_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb-randr ${GUEST_BITNESS}) - - generate(libxcb-glx ${CMAKE_CURRENT_SOURCE_DIR}/../libxcb-glx/libxcb-glx_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xcb-glx ${GUEST_BITNESS}) - - generate(libxshmfence ${CMAKE_CURRENT_SOURCE_DIR}/../libxshmfence/libxshmfence_interface.cpp ${GUEST_BITNESS}) - add_host_lib(xshmfence ${GUEST_BITNESS}) - generate(libdrm ${CMAKE_CURRENT_SOURCE_DIR}/../libdrm/libdrm_interface.cpp ${GUEST_BITNESS}) target_include_directories(libdrm-${GUEST_BITNESS}-deps INTERFACE /usr/include/drm/) target_include_directories(libdrm-${GUEST_BITNESS}-deps INTERFACE /usr/include/libdrm/) diff --git a/ThunkLibs/libX11/X11Common.h b/ThunkLibs/libX11/X11Common.h deleted file mode 100644 index fb350a869e..0000000000 --- a/ThunkLibs/libX11/X11Common.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include -#include -extern "C" { -#include -} - -namespace X11 { -constexpr static std::array CallbackKeys = {{ - XNGeometryCallback, - XNDestroyCallback, - XNPreeditStartCallback, - XNPreeditDoneCallback, - XNPreeditDrawCallback, - XNPreeditCaretCallback, - XNPreeditStateNotifyCallback, - XNStatusStartCallback, - XNStatusDoneCallback, - XNStatusDrawCallback, - XNR6PreeditCallback, - XNStringConversionCallback, -}}; - -} diff --git a/ThunkLibs/libX11/libX11_Guest.cpp b/ThunkLibs/libX11/libX11_Guest.cpp deleted file mode 100644 index 999dc02db5..0000000000 --- a/ThunkLibs/libX11/libX11_Guest.cpp +++ /dev/null @@ -1,359 +0,0 @@ -/* -$info$ -tags: thunklibs|X11 -desc: Handles callbacks and varargs -$end_info$ -*/ - -extern "C" { -#define XUTIL_DEFINE_FUNCTIONS -#include -#include -#include - -#include -#include - -#include - -// Include Xlibint.h and undefine some of its macros that clash with the standard library -#include -#undef min -#undef max -} - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libX11.inl" -#include "X11Common.h" - -// Custom implementations // - -#include - -namespace { -// The various X11 variadic functions take a flattened sequence of key:value pairs as arguments. -// The key element is a pointer to a string. -// The value element is a pointer to the data of that key type. -// -// Some keys describe function callbacks for various events that the server interface can call. -// FEX needs to walk these keys and ensure any callback function has a trampoline so the native -// X11 library can call it. -template -static std::list ConvertCallbackArguments(std::vector& IncomingArguments) { - assert(IncomingArguments.size() % 2 == 0 && "Incoming arguments needs to be in pairs"); - - std::list Callbacks; - // Walk the arguments and convert any callbacks. - const size_t ArgumentPairs = IncomingArguments.size() / 2; - for (size_t i = 0; i < ArgumentPairs; ++i) { - const char* Key = static_cast(IncomingArguments[i * 2]); - void** Data = &IncomingArguments[i * 2 + 1]; - if (!*Data) { - continue; - } - - // Check if the key is a callback and needs to be modified. - auto KeyIt = std::find(X11::CallbackKeys.begin(), X11::CallbackKeys.end(), Key); - if (KeyIt == X11::CallbackKeys.end()) { - continue; - } - - // Key matches a callback, we need to wrap this. - CallbackType* IncomingCallback = reinterpret_cast(*Data); - CallbackType* ConvertedCallback = &Callbacks.emplace_back(CallbackType { - // Client data stays the same. - .client_data = IncomingCallback->client_data, - - // Callback needs a trampoline. - .callback = AllocateHostTrampolineForGuestFunction(IncomingCallback->callback), - }); - - // Add this converted back in. - *Data = ConvertedCallback; - } - - return Callbacks; -} -} // namespace - -extern "C" { -char* XGetICValues(XIC ic, ...) { - fprintf(stderr, "XGetICValues\n"); - va_list ap; - std::vector args; - va_start(ap, ic); - for (;;) { - auto arg = va_arg(ap, void*); - if (arg == 0) { - break; - } - args.push_back(arg); - fprintf(stderr, "%p\n", arg); - } - - va_end(ap); - - auto rv = fexfn_pack_XGetICValues_internal(ic, args.size(), &args[0]); - fprintf(stderr, "RV: %p\n", rv); - return rv; -} - -char* XSetICValues(XIC ic, ...) { - fprintf(stderr, "XSetICValues\n"); - va_list ap; - std::vector IncomingArguments; - va_start(ap, ic); - for (;;) { - auto Key = va_arg(ap, void*); - if (Key == 0) { - break; - } - - auto Value = va_arg(ap, void*); - IncomingArguments.emplace_back(Key); - IncomingArguments.emplace_back(Value); - } - - va_end(ap); - - // Callback memory needs to live beyond internal function call. - std::list Callbacks = ConvertCallbackArguments(IncomingArguments); - - auto rv = fexfn_pack_XSetICValues_internal(ic, IncomingArguments.size(), &IncomingArguments[0]); - fprintf(stderr, "RV: %p\n", rv); - return rv; -} - -char* XGetIMValues(XIM ic, ...) { - fprintf(stderr, "XGetIMValues\n"); - va_list ap; - std::vector args; - va_start(ap, ic); - for (;;) { - auto arg = va_arg(ap, void*); - if (arg == 0) { - break; - } - args.push_back(arg); - fprintf(stderr, "%p\n", arg); - } - - va_end(ap); - auto rv = fexfn_pack_XGetIMValues_internal(ic, args.size(), &args[0]); - fprintf(stderr, "RV: %p\n", rv); - return rv; -} - -char* XSetIMValues(XIM ic, ...) { - fprintf(stderr, "XSetIMValues\n"); - va_list ap; - std::vector IncomingArguments; - va_start(ap, ic); - for (;;) { - auto Key = va_arg(ap, void*); - if (Key == 0) { - break; - } - - auto Value = va_arg(ap, void*); - IncomingArguments.emplace_back(Key); - IncomingArguments.emplace_back(Value); - fprintf(stderr, "%s\n", (char*)Key); - } - - va_end(ap); - - // Callback memory needs to live beyond internal function call. - std::list Callbacks = ConvertCallbackArguments(IncomingArguments); - - // Send a count (not including nullptr); - auto rv = fexfn_pack_XSetIMValues_internal(ic, IncomingArguments.size(), &IncomingArguments[0]); - fprintf(stderr, "RV: %p\n", rv); - return rv; -} - -_XIC* XCreateIC(XIM im, ...) { - fprintf(stderr, "XCreateIC\n"); - va_list ap; - std::vector IncomingArguments; - - va_start(ap, im); - for (;;) { - auto Key = va_arg(ap, void*); - if (Key == 0) { - break; - } - - auto Value = va_arg(ap, void*); - IncomingArguments.emplace_back(Key); - IncomingArguments.emplace_back(Value); - } - - va_end(ap); - - // Callback memory needs to live beyond internal function call. - std::list Callbacks = ConvertCallbackArguments(IncomingArguments); - - auto rv = fexfn_pack_XCreateIC_internal(im, IncomingArguments.size(), &IncomingArguments[0]); - return rv; -} - -XVaNestedList XVaCreateNestedList(int unused_arg, ...) { - fprintf(stderr, "XVaCreateNestedList\n"); - va_list ap; - std::vector IncomingArguments; - - va_start(ap, unused_arg); - for (;;) { - auto Key = va_arg(ap, void*); - if (Key == 0) { - break; - } - - auto Value = va_arg(ap, void*); - IncomingArguments.emplace_back(Key); - IncomingArguments.emplace_back(Value); - } - - va_end(ap); - - // Callback memory needs to live beyond internal function call. - std::list Callbacks = ConvertCallbackArguments(IncomingArguments); - - auto rv = fexfn_pack_XVaCreateNestedList_internal(unused_arg, IncomingArguments.size(), &IncomingArguments[0]); - fprintf(stderr, "RV: %p\n", rv); - return rv; -} - -int XFree(void* ptr) { - // This function must be able to handle both guest heap pointers *and* host heap pointers, - // so it only forwards to the native host library for the latter. - // - // This is because Xlibint users allocate memory using internal macros aliasing to libc's - // malloc but then they free using the function XFree. For libX11, this is not a problem since - // the allocation happens in a thunked API function (and hence on the host heap), but if a - // function from an unthunked library accesses Xlibint, it will allocate on the guest heap. - // - // One notable example where this was encountered is XF86VidModeGetAllModeLines. - - if (!ptr || IsHostHeapAllocation(ptr)) { - return fexfn_pack_XFree(ptr); - } else { - free(ptr); - return 1; - } -} - -void XFreeEventData(Display* display, XGenericEventCookie* cookie) { - // Has the same heap-mismatch issue as XFree, so we have to reimplement it manually - if (_XIsEventCookie(display, (XEvent*)cookie) && cookie->data) { - XFree(cookie->data); - cookie->data = nullptr; - cookie->cookie = 0; - } -} - -Display* XOpenDisplay(const char* name) { - auto ret = fexfn_pack_XOpenDisplay(name); - - for (auto& funcptr : ret->event_vec) { - if (!funcptr) { - continue; - } - MakeHostFunctionGuestCallable(funcptr); - } - - for (auto& funcptr : ret->wire_vec) { - if (!funcptr) { - continue; - } - MakeHostFunctionGuestCallable(funcptr); - } - - MakeHostFunctionGuestCallable(ret->resource_alloc); - MakeHostFunctionGuestCallable(ret->idlist_alloc); -#if (X11_VERSION_MAJOR >= 1 && X11_VERSION_MINOR >= 7 && X11_VERSION_PATCH >= 0) - // Doesn't exist on older X11 - MakeHostFunctionGuestCallable(ret->exit_handler); -#endif - - return ret; -} - -Status _XReply(Display* display, xReply* reply, int extra, Bool discard) { - for (auto handler = display->async_handlers; handler; handler = handler->next) { - // Make host-callable and overwrite in-place - // NOTE: This data seems to be stack-allocated specifically for XReply usually, so it's *probably* safe to overwrite - handler->handler = AllocateHostTrampolineForGuestFunction(handler->handler); - } - return fexfn_pack__XReply(display, reply, extra, discard); -} - -static int _XInitDisplayLock(Display* display) { - MakeHostFunctionGuestCallable(display->lock_fns->lock_display); - MakeHostFunctionGuestCallable(display->lock_fns->unlock_display); - return 0; -} - -Status XInitThreads() { - return fexfn_pack_XInitThreadsInternal((uintptr_t)_XInitDisplayLock, (uintptr_t)CallbackUnpack::Unpack); -} - -// Register the host function pointers written by _XInitImageFuncPtrs (and -// its callers) to be guest-callable -static void FixupImageFuncPtrs(XImage* image) { - image->f.create_image = XCreateImage; - MakeHostFunctionGuestCallable(image->f.destroy_image); - MakeHostFunctionGuestCallable(image->f.get_pixel); - MakeHostFunctionGuestCallable(image->f.put_pixel); - // TODO: image->f.sub_image - MakeHostFunctionGuestCallable(image->f.add_pixel); -} - -void _XInitImageFuncPtrs(XImage* image) { - fexfn_pack__XInitImageFuncPtrs(image); - FixupImageFuncPtrs(image); -} - -XImage* XCreateImage(Display* display, Visual* visual, unsigned int depth, int format, int offset, char* data, unsigned int width, - unsigned int height, int pad, int bpp) { - auto ret = fexfn_pack_XCreateImage(display, visual, depth, format, offset, data, width, height, pad, bpp); - FixupImageFuncPtrs(ret); - return ret; -} - -Status XInitImage(XImage* image) { - auto ret = fexfn_pack_XInitImage(image); - FixupImageFuncPtrs(image); - return ret; -} - -Bool XRegisterIMInstantiateCallback(Display* dpy, struct _XrmHashBucketRec* rdb, char* res_name, char* res_class, XIDProc callback, - XPointer client_data) { - return fexfn_pack_XRegisterIMInstantiateCallback(dpy, rdb, res_name, res_class, AllocateHostTrampolineForGuestFunction(callback), client_data); -} - -Bool XUnregisterIMInstantiateCallback(Display* dpy, struct _XrmHashBucketRec* rdb, char* res_name, char* res_class, XIDProc callback, - XPointer client_data) { - return fexfn_pack_XUnregisterIMInstantiateCallback(dpy, rdb, res_name, res_class, AllocateHostTrampolineForGuestFunction(callback), client_data); -} - -void (*_XLockMutex_fn)(LockInfoPtr) = nullptr; -void (*_XUnlockMutex_fn)(LockInfoPtr) = nullptr; -LockInfoPtr _Xglobal_lock = (LockInfoPtr)0x4142434445464748ULL; -} - -LOAD_LIB(libX11) diff --git a/ThunkLibs/libX11/libX11_Host.cpp b/ThunkLibs/libX11/libX11_Host.cpp deleted file mode 100644 index 8c1a35da0e..0000000000 --- a/ThunkLibs/libX11/libX11_Host.cpp +++ /dev/null @@ -1,2186 +0,0 @@ -/* -$info$ -tags: thunklibs|X11 -desc: Handles callbacks and varargs -$end_info$ -*/ - -#include -#include -#include -#include -#include - -extern "C" { -#define XUTIL_DEFINE_FUNCTIONS -#include -#include -#include -#include -#undef min -#undef max - -#define XTRANS_SEND_FDS 1 -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -} - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libX11.inl" -#include "X11Common.h" - -// Walks the array of key:value pairs provided from the guest code side. -// Finalizing any callback functions that the guest side prepared for us. -template -void FinalizeIncomingCallbacks(size_t Count, void** list) { - assert(Count % 2 == 0 && "Incoming arguments needs to be in pairs"); - for (size_t i = 0; i < (Count / 2); ++i) { - const char* Key = static_cast(list[i * 2]); - void** Data = &list[i * 2 + 1]; - if (!*Data) { - continue; - } - - // Check if the key is a callback and needs to be modified. - auto KeyIt = std::find(X11::CallbackKeys.begin(), X11::CallbackKeys.end(), Key); - if (KeyIt == X11::CallbackKeys.end()) { - continue; - } - - CallbackType* IncomingCallback = reinterpret_cast(*Data); - FinalizeHostTrampolineForGuestFunction(IncomingCallback->callback); - } -} - -_XIC* fexfn_impl_libX11_XCreateIC_internal(XIM a_0, size_t count, void** list) { - FinalizeIncomingCallbacks(count, list); - - switch (count) { - case 0: return fexldr_ptr_libX11_XCreateIC(a_0, nullptr); break; - case 1: return fexldr_ptr_libX11_XCreateIC(a_0, list[0], nullptr); break; - case 2: return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], nullptr); break; - case 3: return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], nullptr); break; - case 4: return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], nullptr); break; - case 5: return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], nullptr); break; - case 6: return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], nullptr); break; - case 7: return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], nullptr); break; - case 8: return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], nullptr); break; - case 9: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], nullptr); - break; - case 10: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], nullptr); - break; - case 11: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], nullptr); - break; - case 12: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], nullptr); - break; - case 13: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], nullptr); - break; - case 14: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], nullptr); - break; - case 15: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], nullptr); - break; - case 16: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], nullptr); - break; - case 17: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], nullptr); - break; - case 18: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], nullptr); - break; - case 19: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], nullptr); - break; - case 20: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], nullptr); - break; - case 21: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], nullptr); - break; - case 22: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], nullptr); - break; - case 23: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], nullptr); - break; - case 24: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], nullptr); - break; - case 25: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], nullptr); - break; - case 26: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], nullptr); - break; - case 27: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], nullptr); - break; - case 28: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], nullptr); - break; - case 29: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], nullptr); - break; - case 30: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], - list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], nullptr); - break; - case 31: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], nullptr); - break; - case 32: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], nullptr); - break; - case 33: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], nullptr); - break; - case 34: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], nullptr); - break; - case 35: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], nullptr); - break; - case 36: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], nullptr); - break; - case 37: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], nullptr); - break; - case 38: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], nullptr); - break; - case 39: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], nullptr); - break; - case 40: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], - list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], list[30], - list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], nullptr); - break; - case 41: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], nullptr); - break; - case 42: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], nullptr); - break; - case 43: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], nullptr); - break; - case 44: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], nullptr); - break; - case 45: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], nullptr); - break; - case 46: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], nullptr); - break; - case 47: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], nullptr); - break; - case 48: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], nullptr); - break; - case 49: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], nullptr); - break; - case 50: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], - list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], list[30], - list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], list[40], - list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], nullptr); - break; - case 51: - return fexldr_ptr_libX11_XCreateIC( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], nullptr); - break; - case 52: - return fexldr_ptr_libX11_XCreateIC( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], nullptr); - break; - case 53: - return fexldr_ptr_libX11_XCreateIC( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], nullptr); - break; - case 54: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], nullptr); - break; - case 55: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], nullptr); - break; - case 56: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], list[55], nullptr); - break; - case 57: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], list[55], list[56], nullptr); - break; - case 58: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], nullptr); - break; - case 59: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], list[58], nullptr); - break; - case 60: - return fexldr_ptr_libX11_XCreateIC(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], - list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], list[30], - list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], list[40], - list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], - list[51], list[52], list[53], list[54], list[55], list[56], list[57], list[58], list[59], nullptr); - break; - case 61: - return fexldr_ptr_libX11_XCreateIC( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], nullptr); - break; - case 62: - return fexldr_ptr_libX11_XCreateIC( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], nullptr); - break; - case 63: - return fexldr_ptr_libX11_XCreateIC( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], list[62], nullptr); - break; - default: fprintf(stderr, "XCreateIC_internal FAILURE\n"); return nullptr; - } -} - -char* fexfn_impl_libX11_XGetICValues_internal(XIC a_0, size_t count, void** list) { - switch (count) { - case 0: return fexldr_ptr_libX11_XGetICValues(a_0, nullptr); break; - case 1: return fexldr_ptr_libX11_XGetICValues(a_0, list[0], nullptr); break; - case 2: return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], nullptr); break; - case 3: return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], nullptr); break; - case 4: return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], nullptr); break; - case 5: return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], nullptr); break; - case 6: return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], nullptr); break; - case 7: return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], nullptr); break; - case 8: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], nullptr); - break; - case 9: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], nullptr); - break; - case 10: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], nullptr); - break; - case 11: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], nullptr); - break; - case 12: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], nullptr); - break; - case 13: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], nullptr); - break; - case 14: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], nullptr); - break; - case 15: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], nullptr); - break; - case 16: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], nullptr); - break; - case 17: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], nullptr); - break; - case 18: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], nullptr); - break; - case 19: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], nullptr); - break; - case 20: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], nullptr); - break; - case 21: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], nullptr); - break; - case 22: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], nullptr); - break; - case 23: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], nullptr); - break; - case 24: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], nullptr); - break; - case 25: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], nullptr); - break; - case 26: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], nullptr); - break; - case 27: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], nullptr); - break; - case 28: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], nullptr); - break; - case 29: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], nullptr); - break; - case 30: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], - list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], nullptr); - break; - case 31: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], nullptr); - break; - case 32: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], nullptr); - break; - case 33: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], nullptr); - break; - case 34: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], nullptr); - break; - case 35: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], nullptr); - break; - case 36: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], nullptr); - break; - case 37: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], nullptr); - break; - case 38: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], nullptr); - break; - case 39: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], nullptr); - break; - case 40: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], nullptr); - break; - case 41: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], nullptr); - break; - case 42: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], nullptr); - break; - case 43: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], nullptr); - break; - case 44: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], nullptr); - break; - case 45: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], nullptr); - break; - case 46: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], nullptr); - break; - case 47: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], - list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], nullptr); - break; - case 48: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], nullptr); - break; - case 49: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], nullptr); - break; - case 50: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], nullptr); - break; - case 51: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], nullptr); - break; - case 52: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], nullptr); - break; - case 53: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], nullptr); - break; - case 54: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], - list[46], list[47], list[48], list[49], list[50], list[51], list[52], list[53], nullptr); - break; - case 55: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], - list[46], list[47], list[48], list[49], list[50], list[51], list[52], list[53], list[54], nullptr); - break; - case 56: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], - list[47], list[48], list[49], list[50], list[51], list[52], list[53], list[54], list[55], nullptr); - break; - case 57: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], - list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], - list[48], list[49], list[50], list[51], list[52], list[53], list[54], list[55], list[56], nullptr); - break; - case 58: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], - list[49], list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], nullptr); - break; - case 59: - return fexldr_ptr_libX11_XGetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], list[58], nullptr); - break; - case 60: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], nullptr); - break; - case 61: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], nullptr); - break; - case 62: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], nullptr); - break; - case 63: - return fexldr_ptr_libX11_XGetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], list[62], nullptr); - break; - default: fprintf(stderr, "XGetICValues_internal FAILURE\n"); abort(); - } -} - -char* fexfn_impl_libX11_XSetICValues_internal(XIC a_0, size_t count, void** list) { - FinalizeIncomingCallbacks(count, list); - - switch (count) { - case 0: return fexldr_ptr_libX11_XSetICValues(a_0, nullptr); break; - case 1: return fexldr_ptr_libX11_XSetICValues(a_0, list[0], nullptr); break; - case 2: return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], nullptr); break; - case 3: return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], nullptr); break; - case 4: return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], nullptr); break; - case 5: return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], nullptr); break; - case 6: return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], nullptr); break; - case 7: return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], nullptr); break; - case 8: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], nullptr); - break; - case 9: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], nullptr); - break; - case 10: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], nullptr); - break; - case 11: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], nullptr); - break; - case 12: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], nullptr); - break; - case 13: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], nullptr); - break; - case 14: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], nullptr); - break; - case 15: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], nullptr); - break; - case 16: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], nullptr); - break; - case 17: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], nullptr); - break; - case 18: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], nullptr); - break; - case 19: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], nullptr); - break; - case 20: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], nullptr); - break; - case 21: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], nullptr); - break; - case 22: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], nullptr); - break; - case 23: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], nullptr); - break; - case 24: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], nullptr); - break; - case 25: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], nullptr); - break; - case 26: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], nullptr); - break; - case 27: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], nullptr); - break; - case 28: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], nullptr); - break; - case 29: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], nullptr); - break; - case 30: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], - list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], nullptr); - break; - case 31: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], nullptr); - break; - case 32: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], nullptr); - break; - case 33: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], nullptr); - break; - case 34: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], nullptr); - break; - case 35: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], nullptr); - break; - case 36: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], nullptr); - break; - case 37: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], nullptr); - break; - case 38: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], nullptr); - break; - case 39: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], nullptr); - break; - case 40: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], nullptr); - break; - case 41: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], nullptr); - break; - case 42: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], nullptr); - break; - case 43: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], nullptr); - break; - case 44: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], nullptr); - break; - case 45: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], nullptr); - break; - case 46: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], nullptr); - break; - case 47: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], - list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], nullptr); - break; - case 48: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], nullptr); - break; - case 49: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], nullptr); - break; - case 50: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], nullptr); - break; - case 51: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], nullptr); - break; - case 52: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], nullptr); - break; - case 53: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], nullptr); - break; - case 54: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], - list[46], list[47], list[48], list[49], list[50], list[51], list[52], list[53], nullptr); - break; - case 55: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], - list[46], list[47], list[48], list[49], list[50], list[51], list[52], list[53], list[54], nullptr); - break; - case 56: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], - list[47], list[48], list[49], list[50], list[51], list[52], list[53], list[54], list[55], nullptr); - break; - case 57: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], - list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], - list[48], list[49], list[50], list[51], list[52], list[53], list[54], list[55], list[56], nullptr); - break; - case 58: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], - list[49], list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], nullptr); - break; - case 59: - return fexldr_ptr_libX11_XSetICValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], list[58], nullptr); - break; - case 60: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], nullptr); - break; - case 61: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], nullptr); - break; - case 62: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], nullptr); - break; - case 63: - return fexldr_ptr_libX11_XSetICValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], list[62], nullptr); - break; - default: fprintf(stderr, "XSetICValues_internal FAILURE\n"); abort(); - } -} - -char* fexfn_impl_libX11_XGetIMValues_internal(XIM a_0, size_t count, void** list) { - switch (count) { - case 0: return fexldr_ptr_libX11_XGetIMValues(a_0, nullptr); break; - case 1: return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], nullptr); break; - case 2: return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], nullptr); break; - case 3: return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], nullptr); break; - case 4: return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], nullptr); break; - case 5: return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], nullptr); break; - case 6: return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], nullptr); break; - case 7: return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], nullptr); break; - case 8: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], nullptr); - break; - case 9: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], nullptr); - break; - case 10: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], nullptr); - break; - case 11: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], nullptr); - break; - case 12: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], nullptr); - break; - case 13: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], nullptr); - break; - case 14: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], nullptr); - break; - case 15: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], nullptr); - break; - case 16: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], nullptr); - break; - case 17: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], nullptr); - break; - case 18: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], nullptr); - break; - case 19: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], nullptr); - break; - case 20: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], nullptr); - break; - case 21: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], nullptr); - break; - case 22: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], nullptr); - break; - case 23: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], nullptr); - break; - case 24: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], nullptr); - break; - case 25: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], nullptr); - break; - case 26: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], nullptr); - break; - case 27: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], nullptr); - break; - case 28: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], nullptr); - break; - case 29: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], nullptr); - break; - case 30: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], - list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], nullptr); - break; - case 31: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], nullptr); - break; - case 32: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], nullptr); - break; - case 33: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], nullptr); - break; - case 34: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], nullptr); - break; - case 35: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], nullptr); - break; - case 36: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], nullptr); - break; - case 37: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], nullptr); - break; - case 38: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], nullptr); - break; - case 39: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], nullptr); - break; - case 40: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], nullptr); - break; - case 41: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], nullptr); - break; - case 42: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], nullptr); - break; - case 43: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], nullptr); - break; - case 44: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], nullptr); - break; - case 45: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], nullptr); - break; - case 46: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], nullptr); - break; - case 47: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], - list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], nullptr); - break; - case 48: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], nullptr); - break; - case 49: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], nullptr); - break; - case 50: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], nullptr); - break; - case 51: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], nullptr); - break; - case 52: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], nullptr); - break; - case 53: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], nullptr); - break; - case 54: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], - list[46], list[47], list[48], list[49], list[50], list[51], list[52], list[53], nullptr); - break; - case 55: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], - list[46], list[47], list[48], list[49], list[50], list[51], list[52], list[53], list[54], nullptr); - break; - case 56: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], - list[47], list[48], list[49], list[50], list[51], list[52], list[53], list[54], list[55], nullptr); - break; - case 57: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], - list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], - list[48], list[49], list[50], list[51], list[52], list[53], list[54], list[55], list[56], nullptr); - break; - case 58: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], - list[49], list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], nullptr); - break; - case 59: - return fexldr_ptr_libX11_XGetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], list[58], nullptr); - break; - case 60: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], nullptr); - break; - case 61: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], nullptr); - break; - case 62: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], nullptr); - break; - case 63: - return fexldr_ptr_libX11_XGetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], list[62], nullptr); - break; - default: fprintf(stderr, "XGetIMValues_internal FAILURE\n"); abort(); - } -} - -char* fexfn_impl_libX11_XSetIMValues_internal(XIM a_0, size_t count, void** list) { - FinalizeIncomingCallbacks(count, list); - - switch (count) { - case 0: return fexldr_ptr_libX11_XSetIMValues(a_0, nullptr); break; - case 1: return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], nullptr); break; - case 2: return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], nullptr); break; - case 3: return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], nullptr); break; - case 4: return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], nullptr); break; - case 5: return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], nullptr); break; - case 6: return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], nullptr); break; - case 7: return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], nullptr); break; - case 8: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], nullptr); - break; - case 9: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], nullptr); - break; - case 10: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], nullptr); - break; - case 11: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], nullptr); - break; - case 12: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], nullptr); - break; - case 13: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], nullptr); - break; - case 14: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], nullptr); - break; - case 15: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], nullptr); - break; - case 16: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], nullptr); - break; - case 17: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], nullptr); - break; - case 18: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], nullptr); - break; - case 19: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], nullptr); - break; - case 20: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], nullptr); - break; - case 21: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], nullptr); - break; - case 22: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], nullptr); - break; - case 23: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], nullptr); - break; - case 24: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], nullptr); - break; - case 25: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], nullptr); - break; - case 26: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], nullptr); - break; - case 27: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], nullptr); - break; - case 28: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], nullptr); - break; - case 29: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], nullptr); - break; - case 30: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], - list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], - list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], nullptr); - break; - case 31: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], nullptr); - break; - case 32: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], nullptr); - break; - case 33: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], nullptr); - break; - case 34: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], nullptr); - break; - case 35: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], nullptr); - break; - case 36: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], nullptr); - break; - case 37: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], nullptr); - break; - case 38: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], nullptr); - break; - case 39: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], nullptr); - break; - case 40: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], nullptr); - break; - case 41: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], nullptr); - break; - case 42: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], nullptr); - break; - case 43: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], nullptr); - break; - case 44: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], nullptr); - break; - case 45: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], nullptr); - break; - case 46: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], nullptr); - break; - case 47: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], - list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], nullptr); - break; - case 48: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], nullptr); - break; - case 49: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], nullptr); - break; - case 50: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], nullptr); - break; - case 51: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], nullptr); - break; - case 52: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], nullptr); - break; - case 53: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], nullptr); - break; - case 54: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], - list[46], list[47], list[48], list[49], list[50], list[51], list[52], list[53], nullptr); - break; - case 55: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], - list[46], list[47], list[48], list[49], list[50], list[51], list[52], list[53], list[54], nullptr); - break; - case 56: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], - list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], - list[47], list[48], list[49], list[50], list[51], list[52], list[53], list[54], list[55], nullptr); - break; - case 57: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], - list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], - list[38], list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], - list[48], list[49], list[50], list[51], list[52], list[53], list[54], list[55], list[56], nullptr); - break; - case 58: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], - list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], - list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], - list[49], list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], nullptr); - break; - case 59: - return fexldr_ptr_libX11_XSetIMValues(a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], - list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], list[18], list[19], - list[20], list[21], list[22], list[23], list[24], list[25], list[26], list[27], list[28], list[29], - list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], - list[50], list[51], list[52], list[53], list[54], list[55], list[56], list[57], list[58], nullptr); - break; - case 60: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], nullptr); - break; - case 61: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], nullptr); - break; - case 62: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], nullptr); - break; - case 63: - return fexldr_ptr_libX11_XSetIMValues( - a_0, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], list[13], - list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], list[39], - list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], - list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], list[62], nullptr); - break; - default: fprintf(stderr, "XSetIMValues_internal FAILURE\n"); abort(); - } -} - -XVaNestedList fexfn_impl_libX11_XVaCreateNestedList_internal(int unused_arg, size_t count, void** list) { - FinalizeIncomingCallbacks(count, list); - - switch (count) { - case 0: return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, nullptr); break; - case 1: return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], nullptr); break; - case 2: return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], nullptr); break; - case 3: return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], nullptr); break; - case 4: return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], nullptr); break; - case 5: return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], nullptr); break; - case 6: return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], nullptr); break; - case 7: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], nullptr); - break; - case 8: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], nullptr); - break; - case 9: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], nullptr); - break; - case 10: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], nullptr); - break; - case 11: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], nullptr); - break; - case 12: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], nullptr); - break; - case 13: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], nullptr); - break; - case 14: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], nullptr); - break; - case 15: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], nullptr); - break; - case 16: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], nullptr); - break; - case 17: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], - list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], nullptr); - break; - case 18: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], - list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], nullptr); - break; - case 19: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], nullptr); - break; - case 20: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], nullptr); - break; - case 21: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], nullptr); - break; - case 22: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], nullptr); - break; - case 23: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], nullptr); - break; - case 24: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], nullptr); - break; - case 25: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], nullptr); - break; - case 26: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], - list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], - list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], nullptr); - break; - case 27: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], nullptr); - break; - case 28: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], nullptr); - break; - case 29: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], nullptr); - break; - case 30: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], nullptr); - break; - case 31: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], nullptr); - break; - case 32: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], nullptr); - break; - case 33: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], nullptr); - break; - case 34: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], nullptr); - break; - case 35: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], - list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], - list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], nullptr); - break; - case 36: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], nullptr); - break; - case 37: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], nullptr); - break; - case 38: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], nullptr); - break; - case 39: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], nullptr); - break; - case 40: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], - list[35], list[36], list[37], list[38], list[39], nullptr); - break; - case 41: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], - list[35], list[36], list[37], list[38], list[39], list[40], nullptr); - break; - case 42: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], - list[35], list[36], list[37], list[38], list[39], list[40], list[41], nullptr); - break; - case 43: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], - list[8], list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], - list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], - list[35], list[36], list[37], list[38], list[39], list[40], list[41], list[42], nullptr); - break; - case 44: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], - list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], - list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], - list[36], list[37], list[38], list[39], list[40], list[41], list[42], list[43], nullptr); - break; - case 45: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], nullptr); - break; - case 46: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], nullptr); - break; - case 47: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], nullptr); - break; - case 48: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], nullptr); - break; - case 49: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], nullptr); - break; - case 50: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], nullptr); - break; - case 51: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], nullptr); - break; - case 52: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], nullptr); - break; - case 53: - return fexldr_ptr_libX11_XVaCreateNestedList(unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], - list[9], list[10], list[11], list[12], list[13], list[14], list[15], list[16], list[17], - list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], list[26], - list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], - list[36], list[37], list[38], list[39], list[40], list[41], list[42], list[43], list[44], - list[45], list[46], list[47], list[48], list[49], list[50], list[51], list[52], nullptr); - break; - case 54: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], nullptr); - break; - case 55: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], nullptr); - break; - case 56: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], list[55], nullptr); - break; - case 57: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], list[55], list[56], nullptr); - break; - case 58: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], list[55], list[56], list[57], nullptr); - break; - case 59: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], list[55], list[56], list[57], list[58], nullptr); - break; - case 60: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], list[55], list[56], list[57], list[58], list[59], nullptr); - break; - case 61: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], nullptr); - break; - case 62: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], nullptr); - break; - case 63: - return fexldr_ptr_libX11_XVaCreateNestedList( - unused_arg, list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7], list[8], list[9], list[10], list[11], list[12], - list[13], list[14], list[15], list[16], list[17], list[18], list[19], list[20], list[21], list[22], list[23], list[24], list[25], - list[26], list[27], list[28], list[29], list[30], list[31], list[32], list[33], list[34], list[35], list[36], list[37], list[38], - list[39], list[40], list[41], list[42], list[43], list[44], list[45], list[46], list[47], list[48], list[49], list[50], list[51], - list[52], list[53], list[54], list[55], list[56], list[57], list[58], list[59], list[60], list[61], list[62], nullptr); - break; - default: fprintf(stderr, "XVaCreateNestedList_internal FAILURE\n"); abort(); - } -} - -Status fexfn_impl_libX11_XInitThreadsInternal(uintptr_t, uintptr_t); - -Status fexfn_impl_libX11__XReply(Display*, xReply*, int, Bool); - -static int (*ACTUAL_XInitDisplayLock_fn)(Display*) = nullptr; -static int (*INTERNAL_XInitDisplayLock_fn)(Display*) = nullptr; - -static std::atomic Initialized {}; - -static int _XInitDisplayLock(Display* display) { - auto ret = ACTUAL_XInitDisplayLock_fn(display); - INTERNAL_XInitDisplayLock_fn(display); - return ret; -} - -Status fexfn_impl_libX11_XInitThreadsInternal(uintptr_t GuestTarget, uintptr_t GuestUnpacker) { - bool Expected = false; - if (!Initialized.compare_exchange_strong(Expected, true)) { - // If already initialized then this is a no-op. - return 1; - } - auto ret = fexldr_ptr_libX11_XInitThreads(); - auto _XInitDisplayLock_fn = (int (**)(Display*))dlsym(fexldr_ptr_libX11_so, "_XInitDisplayLock_fn"); - ACTUAL_XInitDisplayLock_fn = std::exchange(*_XInitDisplayLock_fn, _XInitDisplayLock); - MakeHostTrampolineForGuestFunctionAt(GuestTarget, GuestUnpacker, &INTERNAL_XInitDisplayLock_fn); - return ret; -} - -Status fexfn_impl_libX11__XReply(Display* display, xReply* reply, int extra, Bool discard) { - for (auto handler = display->async_handlers; handler; handler = handler->next) { - FinalizeHostTrampolineForGuestFunction(handler->handler); - } - return fexldr_ptr_libX11__XReply(display, reply, extra, discard); -} - -EXPORTS(libX11) diff --git a/ThunkLibs/libX11/libX11_interface.cpp b/ThunkLibs/libX11/libX11_interface.cpp deleted file mode 100644 index 3079e72ee6..0000000000 --- a/ThunkLibs/libX11/libX11_interface.cpp +++ /dev/null @@ -1,1634 +0,0 @@ -#include - -extern "C" { -#define XUTIL_DEFINE_FUNCTIONS -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - -#include - -#include -} - -#include - -template -struct fex_gen_config { - unsigned version = 6; -}; - -template -struct fex_gen_type {}; - -// Function, parameter index, parameter type [optional] -template -struct fex_gen_param {}; - -template<> -struct fex_gen_type {}; // XDisplay::resource_alloc - -// NOTE: only indirect calls to this are allowed -// NOTE: The char* and int arguments are only present in some configurations, but always enabling them interfers with our internal ABI... -template<> -struct fex_gen_type {}; // XDisplay::lock_fns->lock_display - -template<> -struct fex_gen_type {}; // XDisplay::idlist_alloc - -#if !(X11_VERSION_MAJOR >= 1 && X11_VERSION_MINOR >= 7 && X11_VERSION_PATCH >= 0) -// Doesn't exist on older X11 -typedef void (*XIOErrorExitHandler)(Display*, void*); -#endif - -template<> -struct fex_gen_type> {}; // XDisplay::exit_handler - -template<> -struct fex_gen_type {}; // XDisplay::async_handlers->handler - -template<> -struct fex_gen_type {}; // XIMProc -template<> -struct fex_gen_type {}; // XICProc -template<> -struct fex_gen_type {}; // XIDProc - -template<> -struct fex_gen_type {}; // XImage::f.destroy_image -template<> -struct fex_gen_type {}; // XImage::f.get_pixel -template<> -struct fex_gen_type {}; // XImage::f.put_pixel -template<> -struct fex_gen_type {}; // XImage::f.add_pixel - -template<> -struct fex_gen_type> : fexgen::opaque_type {}; -template<> -struct fex_gen_type> : fexgen::opaque_type {}; -template<> -struct fex_gen_type> : fexgen::opaque_type {}; -template<> -struct fex_gen_type> : fexgen::opaque_type {}; -template<> -struct fex_gen_type<_XrmHashBucketRec> : fexgen::opaque_type {}; -template<> -struct fex_gen_type<_XkbInfoRec> : fexgen::opaque_type {}; -template<> -struct fex_gen_type<_XContextDB> : fexgen::opaque_type {}; -template<> -struct fex_gen_type<_XDisplayAtoms> : fexgen::opaque_type {}; -template<> -struct fex_gen_type<_XLockInfo> : fexgen::opaque_type {}; -template<> -struct fex_gen_type<_XIMFilter> : fexgen::opaque_type {}; -template<> -struct fex_gen_type<_XKeytrans> : fexgen::opaque_type {}; -template<> -struct fex_gen_type<_X11XCBPrivate> : fexgen::opaque_type {}; - - -#ifndef IS_32BIT_THUNK -// This has a public definition but is used as an opaque type in most APIs -template<> -struct fex_gen_type> : fexgen::assume_compatible_data_layout {}; - -// Union types -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; - -// Union type of all sorts of different X objects... Further, XEHeadOfExtensionList casts this to XExtData**. -// This is likely highly unsafe to assume compatible. -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; - -// Linked-list types -template<> -struct fex_gen_type<_XtransConnFd> : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type<_XkbDeviceLedChanges> : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type<_XQEvent> : fexgen::assume_compatible_data_layout {}; - -// Contains nontrivial circular pointer relationships -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; - -// TODO: These are largely compatible, *but* contain function pointer members that need adjustment! -template<> -struct fex_gen_type<_XConnWatchInfo> : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type<_XLockPtrs> : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type<_XFreeFuncRec> : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type<_XExtension> : fexgen::assume_compatible_data_layout {}; // Also contains linked-list pointers -template<> -struct fex_gen_type<_XConnectionInfo> : fexgen::assume_compatible_data_layout {}; // Also contains linked-list pointers -template<> -struct fex_gen_type<_XInternalAsync> : fexgen::assume_compatible_data_layout {}; // Also contains linked-list pointers -template<> -struct fex_gen_type<_XDisplay> : fexgen::assume_compatible_data_layout {}; - -// TODO: This contains a nested struct type of function pointer members -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; -#endif - -// Union type (each member is defined in terms of char members) -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; - -// Xlibint -template<> -struct fex_gen_config<_XGetRequest> {}; -template<> -struct fex_gen_config<_XFlushGCCache> {}; -#if __SIZEOF_POINTER__ == 8 -template<> -struct fex_gen_config<_XData32> {}; -template<> -struct fex_gen_config<_XRead32> {}; -#endif -template<> -struct fex_gen_config<_XDeqAsyncHandler> {}; -template<> -struct fex_gen_config<_XError> {}; -template<> -struct fex_gen_config<_XIOError> {}; -template<> -struct fex_gen_config<_XEatData> {}; -template<> -struct fex_gen_config<_XEatDataWords> {}; -template<> -struct fex_gen_config<_XAllocScratch> {}; -template<> -struct fex_gen_config<_XAllocTemp> {}; -template<> -struct fex_gen_config<_XFreeTemp> {}; -template<> -struct fex_gen_config<_XVIDtoVisual> {}; -template<> -struct fex_gen_config<_XSetLastRequestRead> {}; -template<> -struct fex_gen_config<_XGetHostname> {}; -template<> -struct fex_gen_config<_XScreenOfWindow> {}; -template<> -struct fex_gen_config<_XAsyncErrorHandler> {}; -template<> -struct fex_gen_config<_XGetAsyncReply> {}; -template<> -struct fex_gen_config<_XGetAsyncData> {}; -template<> -struct fex_gen_config<_XFlush> {}; -template<> -struct fex_gen_config<_XEventsQueued> {}; -template<> -struct fex_gen_config<_XReadEvents> {}; -template<> -struct fex_gen_config<_XRead> {}; -template<> -struct fex_gen_config<_XReadPad> {}; -template<> -struct fex_gen_config<_XSend> {}; -template<> -struct fex_gen_config<_XReply> : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config<_XEnq> {}; -template<> -struct fex_gen_config<_XDeq> {}; -template<> -struct fex_gen_config<_XUnknownWireEvent> {}; -template<> -struct fex_gen_config<_XUnknownWireEventCookie> {}; -template<> -struct fex_gen_config<_XUnknownCopyEventCookie> {}; -template<> -struct fex_gen_config<_XUnknownNativeEvent> {}; -template<> -struct fex_gen_config<_XWireToEvent> {}; -template<> -struct fex_gen_config<_XDefaultWireError> {}; -template<> -struct fex_gen_config<_XPollfdCacheInit> {}; -template<> -struct fex_gen_config<_XPollfdCacheAdd> {}; -template<> -struct fex_gen_config<_XPollfdCacheDel> {}; -template<> -struct fex_gen_config<_XAllocID> {}; -template<> -struct fex_gen_config<_XAllocIDs> {}; -template<> -struct fex_gen_config<_XFreeExtData> {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; - -// TODO: Should probably catch these with a custom handler -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; - -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -template<> -struct fex_gen_config<_XRegisterInternalConnection> {}; -template<> -struct fex_gen_config<_XUnregisterInternalConnection> {}; -template<> -struct fex_gen_config<_XProcessInternalConnection> {}; -template<> -struct fex_gen_config<_XTextHeight> {}; -template<> -struct fex_gen_config<_XTextHeight16> {}; -template<> -struct fex_gen_config<_XEventToWire> {}; -template<> -struct fex_gen_config<_XF86LoadQueryLocaleFont> {}; -template<> -struct fex_gen_config<_XProcessWindowAttributes> {}; -template<> -struct fex_gen_config<_XDefaultError> {}; -template<> -struct fex_gen_config<_XDefaultIOError> {}; - -#if !(X11_VERSION_MAJOR >= 1 && X11_VERSION_MINOR >= 7 && X11_VERSION_PATCH >= 0) -// Doesn't exist on older X11 -extern void _XDefaultIOErrorExit(Display* dpy, void* user_data); -#endif - -template<> -struct fex_gen_config<_XSetClipRectangles> {}; -template<> -struct fex_gen_config<_XGetWindowAttributes> {}; -template<> -struct fex_gen_config<_XPutBackEvent> {}; -template<> -struct fex_gen_config<_XIsEventCookie> {}; -template<> -struct fex_gen_config<_XFreeEventCookies> {}; -template<> -struct fex_gen_config<_XStoreEventCookie> {}; -template<> -struct fex_gen_config<_XFetchEventCookie> {}; -template<> -struct fex_gen_config<_XCopyEventCookie> {}; -template<> -struct fex_gen_config {}; - -// XKB -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -// TODO: template<> struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -// Xlib.h -// TODO: template<> struct fex_gen_config<_Xmblen> {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -// TODO: template<> struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -// Sets up vtables for various objects -Status XInitThreadsInternal(uintptr_t OnXInitDisplayLock, uintptr_t OnXInitDisplayLockPacker); -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -// TODO: Make returned function pointer guest-callable. For now, just pretend it already is. -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; - -template<> -struct fex_gen_config : fexgen::returns_guest_pointer {}; -// TODO: template<> struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -// TODO: template<> struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -// TODO: template<> struct fex_gen_config {}; -// TODO: template<> struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -// TODO: template<> struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -// TODO: template<> struct fex_gen_config {}; -// TODO: template<> struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config { - using uniform_va_type = void*; -}; -template<> -struct fex_gen_config { - using uniform_va_type = void*; -}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config { - using uniform_va_type = void*; -}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config { - using uniform_va_type = void*; -}; - -template<> -struct fex_gen_config { - using uniform_va_type = void*; -}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config { - using uniform_va_type = void*; -}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config<_Xmbtowc> {}; -template<> -struct fex_gen_config<_Xwctomb> {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; - -// Xresource.h -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -// Xutil.h -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -// ImUtil.h -template<> -struct fex_gen_config<_XGetScanlinePad> {}; -template<> -struct fex_gen_config<_XGetBitsPerPixel> {}; -template<> -struct fex_gen_config<_XSetImage> {}; -template<> -struct fex_gen_config<_XReverse_Bytes> {}; -template<> -struct fex_gen_config<_XInitImageFuncPtrs> : fexgen::custom_guest_entrypoint {}; diff --git a/ThunkLibs/libxcb-dri2/libxcb-dri2_Guest.cpp b/ThunkLibs/libxcb-dri2/libxcb-dri2_Guest.cpp deleted file mode 100644 index a999ef5dea..0000000000 --- a/ThunkLibs/libxcb-dri2/libxcb-dri2_Guest.cpp +++ /dev/null @@ -1,349 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-dri2 -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libxcb-dri2.inl" - - -extern "C" { -xcb_extension_t xcb_dri2_id = { - .name = "DRI2", - .global_id = 0, -}; - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_dri2_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_dri2_FEX_usable_size(&args); - return args.rv; -} - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_dri2_init_extension(c, &xcb_dri2_id); -} - -xcb_dri2_connect_cookie_t xcb_dri2_connect(xcb_connection_t* a_0, xcb_window_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_dri2_connect(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_dri2_connect_cookie_t xcb_dri2_connect_unchecked(xcb_connection_t* a_0, xcb_window_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_dri2_connect_unchecked(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_dri2_query_version_reply_t* xcb_dri2_query_version_reply(xcb_connection_t* a_0, xcb_dri2_query_version_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_query_version_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_connect_reply_t* xcb_dri2_connect_reply(xcb_connection_t* a_0, xcb_dri2_connect_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_connect_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_authenticate_reply_t* xcb_dri2_authenticate_reply(xcb_connection_t* a_0, xcb_dri2_authenticate_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_authenticate_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_get_buffers_reply_t* xcb_dri2_get_buffers_reply(xcb_connection_t* a_0, xcb_dri2_get_buffers_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_get_buffers_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_copy_region_reply_t* xcb_dri2_copy_region_reply(xcb_connection_t* a_0, xcb_dri2_copy_region_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_copy_region_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_get_buffers_with_format_reply_t* -xcb_dri2_get_buffers_with_format_reply(xcb_connection_t* a_0, xcb_dri2_get_buffers_with_format_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_get_buffers_with_format_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_swap_buffers_reply_t* xcb_dri2_swap_buffers_reply(xcb_connection_t* a_0, xcb_dri2_swap_buffers_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_swap_buffers_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_get_msc_reply_t* xcb_dri2_get_msc_reply(xcb_connection_t* a_0, xcb_dri2_get_msc_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_get_msc_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_wait_msc_reply_t* xcb_dri2_wait_msc_reply(xcb_connection_t* a_0, xcb_dri2_wait_msc_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_wait_msc_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_wait_sbc_reply_t* xcb_dri2_wait_sbc_reply(xcb_connection_t* a_0, xcb_dri2_wait_sbc_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_wait_sbc_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri2_get_param_reply_t* xcb_dri2_get_param_reply(xcb_connection_t* a_0, xcb_dri2_get_param_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri2_get_param_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -} - -LOAD_LIB(libxcb_dri2) diff --git a/ThunkLibs/libxcb-dri2/libxcb-dri2_Host.cpp b/ThunkLibs/libxcb-dri2/libxcb-dri2_Host.cpp deleted file mode 100644 index 9eb1afc185..0000000000 --- a/ThunkLibs/libxcb-dri2/libxcb-dri2_Host.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-dri2 -$end_info$ -*/ - -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb-dri2.inl" - -static void fexfn_impl_libxcb_dri2_FEX_xcb_dri2_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1); - -static size_t fexfn_impl_libxcb_dri2_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_dri2_FEX_free_on_host(void* a_0) { - free(a_0); -} - -static void fexfn_impl_libxcb_dri2_FEX_xcb_dri2_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - if (strcmp(a_1->name, "DRI2") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_dri2_so, "xcb_dri2_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - typedef const struct xcb_query_extension_reply_t* fexldr_type_libxcb_xcb_get_extension_data(xcb_connection_t * a_0, xcb_extension_t * a_1); - fexldr_type_libxcb_xcb_get_extension_data* fexldr_ptr_libxcb_xcb_get_extension_data; - - fexldr_ptr_libxcb_xcb_get_extension_data = (fexldr_type_libxcb_xcb_get_extension_data*)dlsym(RTLD_DEFAULT, "xcb_get_extension_data"); - - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb_dri2) diff --git a/ThunkLibs/libxcb-dri2/libxcb-dri2_interface.cpp b/ThunkLibs/libxcb-dri2/libxcb-dri2_interface.cpp deleted file mode 100644 index b69cfd54aa..0000000000 --- a/ThunkLibs/libxcb-dri2/libxcb-dri2_interface.cpp +++ /dev/null @@ -1,151 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 0; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -void FEX_xcb_dri2_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; diff --git a/ThunkLibs/libxcb-dri3/libxcb-dri3_Guest.cpp b/ThunkLibs/libxcb-dri3/libxcb-dri3_Guest.cpp deleted file mode 100644 index d0eb93ab3f..0000000000 --- a/ThunkLibs/libxcb-dri3/libxcb-dri3_Guest.cpp +++ /dev/null @@ -1,220 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-dri3 -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libxcb-dri3.inl" - -extern "C" { -xcb_extension_t xcb_dri3_id = { - .name = "DRI3", - .global_id = 0, -}; - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_dri3_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_dri3_FEX_usable_size(&args); - return args.rv; -} - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_dri3_init_extension(c, &xcb_dri3_id); -} - -xcb_dri3_query_version_cookie_t xcb_dri3_query_version(xcb_connection_t* a_0, uint32_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_dri3_query_version(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_dri3_query_version_cookie_t xcb_dri3_query_version_unchecked(xcb_connection_t* a_0, uint32_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_dri3_query_version_unchecked(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_dri3_query_version_reply_t* xcb_dri3_query_version_reply(xcb_connection_t* a_0, xcb_dri3_query_version_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri3_query_version_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri3_open_reply_t* xcb_dri3_open_reply(xcb_connection_t* a_0, xcb_dri3_open_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri3_open_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri3_buffer_from_pixmap_reply_t* -xcb_dri3_buffer_from_pixmap_reply(xcb_connection_t* a_0, xcb_dri3_buffer_from_pixmap_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri3_buffer_from_pixmap_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri3_fd_from_fence_reply_t* xcb_dri3_fd_from_fence_reply(xcb_connection_t* a_0, xcb_dri3_fd_from_fence_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri3_fd_from_fence_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri3_get_supported_modifiers_reply_t* -xcb_dri3_get_supported_modifiers_reply(xcb_connection_t* a_0, xcb_dri3_get_supported_modifiers_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri3_get_supported_modifiers_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_dri3_buffers_from_pixmap_reply_t* -xcb_dri3_buffers_from_pixmap_reply(xcb_connection_t* a_0, xcb_dri3_buffers_from_pixmap_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_dri3_buffers_from_pixmap_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -} - -LOAD_LIB(libxcb_dri3) diff --git a/ThunkLibs/libxcb-dri3/libxcb-dri3_Host.cpp b/ThunkLibs/libxcb-dri3/libxcb-dri3_Host.cpp deleted file mode 100644 index a197232132..0000000000 --- a/ThunkLibs/libxcb-dri3/libxcb-dri3_Host.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-dri3 -$end_info$ -*/ - -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb-dri3.inl" - -static void fexfn_impl_libxcb_dri3_FEX_xcb_dri3_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1); - -static size_t fexfn_impl_libxcb_dri3_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_dri3_FEX_free_on_host(void* a_0) { - free(a_0); -} - -static void fexfn_impl_libxcb_dri3_FEX_xcb_dri3_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - if (strcmp(a_1->name, "DRI3") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_dri3_so, "xcb_dri3_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - typedef const struct xcb_query_extension_reply_t* fexldr_type_libxcb_xcb_get_extension_data(xcb_connection_t * a_0, xcb_extension_t * a_1); - fexldr_type_libxcb_xcb_get_extension_data* fexldr_ptr_libxcb_xcb_get_extension_data; - - fexldr_ptr_libxcb_xcb_get_extension_data = (fexldr_type_libxcb_xcb_get_extension_data*)dlsym(RTLD_DEFAULT, "xcb_get_extension_data"); - - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb_dri3) diff --git a/ThunkLibs/libxcb-dri3/libxcb-dri3_interface.cpp b/ThunkLibs/libxcb-dri3/libxcb-dri3_interface.cpp deleted file mode 100644 index bec19ab58c..0000000000 --- a/ThunkLibs/libxcb-dri3/libxcb-dri3_interface.cpp +++ /dev/null @@ -1,119 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 0; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -void FEX_xcb_dri3_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; diff --git a/ThunkLibs/libxcb-glx/Guest.cpp b/ThunkLibs/libxcb-glx/Guest.cpp deleted file mode 100644 index 81c05177f8..0000000000 --- a/ThunkLibs/libxcb-glx/Guest.cpp +++ /dev/null @@ -1,1835 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-glx -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libxcb-glx.inl" - -extern "C" { -xcb_extension_t xcb_glx_id = { - .name = "GLX", - .global_id = 0, -}; - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_glx_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_glx_FEX_usable_size(&args); - return args.rv; -} - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_glx_init_extension(c, &xcb_glx_id); -} - -xcb_void_cookie_t xcb_glx_create_context_checked(xcb_connection_t* a_0, xcb_glx_context_t a_1, xcb_visualid_t a_2, uint32_t a_3, - xcb_glx_context_t a_4, uint8_t a_5) { - auto ret = fexfn_pack_xcb_glx_create_context_checked(a_0, a_1, a_2, a_3, a_4, a_5); - InitializeExtensions(a_0); - return ret; -} - -xcb_void_cookie_t -xcb_glx_create_context(xcb_connection_t* a_0, xcb_glx_context_t a_1, xcb_visualid_t a_2, uint32_t a_3, xcb_glx_context_t a_4, uint8_t a_5) { - auto ret = fexfn_pack_xcb_glx_create_context(a_0, a_1, a_2, a_3, a_4, a_5); - InitializeExtensions(a_0); - return ret; -} - -xcb_glx_make_current_reply_t* xcb_glx_make_current_reply(xcb_connection_t* a_0, xcb_glx_make_current_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_make_current_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_is_direct_reply_t* xcb_glx_is_direct_reply(xcb_connection_t* a_0, xcb_glx_is_direct_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_is_direct_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_query_version_reply_t* xcb_glx_query_version_reply(xcb_connection_t* a_0, xcb_glx_query_version_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_query_version_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -xcb_glx_get_visual_configs_reply_t* -xcb_glx_get_visual_configs_reply(xcb_connection_t* a_0, xcb_glx_get_visual_configs_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_visual_configs_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_vendor_private_with_reply_reply_t* -xcb_glx_vendor_private_with_reply_reply(xcb_connection_t* a_0, xcb_glx_vendor_private_with_reply_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_vendor_private_with_reply_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_query_extensions_string_reply_t* -xcb_glx_query_extensions_string_reply(xcb_connection_t* a_0, xcb_glx_query_extensions_string_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_query_extensions_string_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_query_server_string_reply_t* -xcb_glx_query_server_string_reply(xcb_connection_t* a_0, xcb_glx_query_server_string_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_query_server_string_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_fb_configs_reply_t* xcb_glx_get_fb_configs_reply(xcb_connection_t* a_0, xcb_glx_get_fb_configs_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_fb_configs_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_query_context_reply_t* xcb_glx_query_context_reply(xcb_connection_t* a_0, xcb_glx_query_context_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_query_context_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_make_context_current_reply_t* -xcb_glx_make_context_current_reply(xcb_connection_t* a_0, xcb_glx_make_context_current_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_make_context_current_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_drawable_attributes_reply_t* -xcb_glx_get_drawable_attributes_reply(xcb_connection_t* a_0, xcb_glx_get_drawable_attributes_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_drawable_attributes_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_gen_lists_reply_t* xcb_glx_gen_lists_reply(xcb_connection_t* a_0, xcb_glx_gen_lists_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_gen_lists_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_render_mode_reply_t* xcb_glx_render_mode_reply(xcb_connection_t* a_0, xcb_glx_render_mode_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_render_mode_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_finish_reply_t* xcb_glx_finish_reply(xcb_connection_t* a_0, xcb_glx_finish_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_finish_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_read_pixels_reply_t* xcb_glx_read_pixels_reply(xcb_connection_t* a_0, xcb_glx_read_pixels_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_read_pixels_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_booleanv_reply_t* xcb_glx_get_booleanv_reply(xcb_connection_t* a_0, xcb_glx_get_booleanv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_booleanv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_clip_plane_reply_t* xcb_glx_get_clip_plane_reply(xcb_connection_t* a_0, xcb_glx_get_clip_plane_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_clip_plane_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_doublev_reply_t* xcb_glx_get_doublev_reply(xcb_connection_t* a_0, xcb_glx_get_doublev_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_doublev_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_error_reply_t* xcb_glx_get_error_reply(xcb_connection_t* a_0, xcb_glx_get_error_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_error_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_floatv_reply_t* xcb_glx_get_floatv_reply(xcb_connection_t* a_0, xcb_glx_get_floatv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_floatv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_integerv_reply_t* xcb_glx_get_integerv_reply(xcb_connection_t* a_0, xcb_glx_get_integerv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_integerv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_lightfv_reply_t* xcb_glx_get_lightfv_reply(xcb_connection_t* a_0, xcb_glx_get_lightfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_lightfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_lightiv_reply_t* xcb_glx_get_lightiv_reply(xcb_connection_t* a_0, xcb_glx_get_lightiv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_lightiv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_mapdv_reply_t* xcb_glx_get_mapdv_reply(xcb_connection_t* a_0, xcb_glx_get_mapdv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_mapdv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_mapfv_reply_t* xcb_glx_get_mapfv_reply(xcb_connection_t* a_0, xcb_glx_get_mapfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_mapfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_mapiv_reply_t* xcb_glx_get_mapiv_reply(xcb_connection_t* a_0, xcb_glx_get_mapiv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_mapiv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_materialfv_reply_t* xcb_glx_get_materialfv_reply(xcb_connection_t* a_0, xcb_glx_get_materialfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_materialfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_materialiv_reply_t* xcb_glx_get_materialiv_reply(xcb_connection_t* a_0, xcb_glx_get_materialiv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_materialiv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_pixel_mapfv_reply_t* -xcb_glx_get_pixel_mapfv_reply(xcb_connection_t* a_0, xcb_glx_get_pixel_mapfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_pixel_mapfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_pixel_mapuiv_reply_t* -xcb_glx_get_pixel_mapuiv_reply(xcb_connection_t* a_0, xcb_glx_get_pixel_mapuiv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_pixel_mapuiv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_pixel_mapusv_reply_t* -xcb_glx_get_pixel_mapusv_reply(xcb_connection_t* a_0, xcb_glx_get_pixel_mapusv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_pixel_mapusv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_polygon_stipple_reply_t* -xcb_glx_get_polygon_stipple_reply(xcb_connection_t* a_0, xcb_glx_get_polygon_stipple_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_polygon_stipple_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_string_reply_t* xcb_glx_get_string_reply(xcb_connection_t* a_0, xcb_glx_get_string_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_string_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_envfv_reply_t* xcb_glx_get_tex_envfv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_envfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_envfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_enviv_reply_t* xcb_glx_get_tex_enviv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_enviv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_enviv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_gendv_reply_t* xcb_glx_get_tex_gendv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_gendv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_gendv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_genfv_reply_t* xcb_glx_get_tex_genfv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_genfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_genfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_geniv_reply_t* xcb_glx_get_tex_geniv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_geniv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_geniv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_image_reply_t* xcb_glx_get_tex_image_reply(xcb_connection_t* a_0, xcb_glx_get_tex_image_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_image_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_parameterfv_reply_t* -xcb_glx_get_tex_parameterfv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_parameterfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_parameterfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_parameteriv_reply_t* -xcb_glx_get_tex_parameteriv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_parameteriv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_parameteriv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_level_parameterfv_reply_t* -xcb_glx_get_tex_level_parameterfv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_level_parameterfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_level_parameterfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_tex_level_parameteriv_reply_t* -xcb_glx_get_tex_level_parameteriv_reply(xcb_connection_t* a_0, xcb_glx_get_tex_level_parameteriv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_tex_level_parameteriv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_is_enabled_reply_t* xcb_glx_is_enabled_reply(xcb_connection_t* a_0, xcb_glx_is_enabled_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_is_enabled_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_is_list_reply_t* xcb_glx_is_list_reply(xcb_connection_t* a_0, xcb_glx_is_list_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_is_list_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_are_textures_resident_reply_t* -xcb_glx_are_textures_resident_reply(xcb_connection_t* a_0, xcb_glx_are_textures_resident_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_are_textures_resident_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_gen_textures_reply_t* xcb_glx_gen_textures_reply(xcb_connection_t* a_0, xcb_glx_gen_textures_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_gen_textures_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_is_texture_reply_t* xcb_glx_is_texture_reply(xcb_connection_t* a_0, xcb_glx_is_texture_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_is_texture_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_color_table_reply_t* -xcb_glx_get_color_table_reply(xcb_connection_t* a_0, xcb_glx_get_color_table_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_color_table_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_color_table_parameterfv_reply_t* xcb_glx_get_color_table_parameterfv_reply( - xcb_connection_t* a_0, xcb_glx_get_color_table_parameterfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_color_table_parameterfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_color_table_parameteriv_reply_t* xcb_glx_get_color_table_parameteriv_reply( - xcb_connection_t* a_0, xcb_glx_get_color_table_parameteriv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_color_table_parameteriv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_convolution_filter_reply_t* -xcb_glx_get_convolution_filter_reply(xcb_connection_t* a_0, xcb_glx_get_convolution_filter_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_convolution_filter_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_convolution_parameterfv_reply_t* xcb_glx_get_convolution_parameterfv_reply( - xcb_connection_t* a_0, xcb_glx_get_convolution_parameterfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_convolution_parameterfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_convolution_parameteriv_reply_t* xcb_glx_get_convolution_parameteriv_reply( - xcb_connection_t* a_0, xcb_glx_get_convolution_parameteriv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_convolution_parameteriv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_separable_filter_reply_t* -xcb_glx_get_separable_filter_reply(xcb_connection_t* a_0, xcb_glx_get_separable_filter_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_separable_filter_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_histogram_reply_t* xcb_glx_get_histogram_reply(xcb_connection_t* a_0, xcb_glx_get_histogram_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_histogram_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_histogram_parameterfv_reply_t* -xcb_glx_get_histogram_parameterfv_reply(xcb_connection_t* a_0, xcb_glx_get_histogram_parameterfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_histogram_parameterfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_histogram_parameteriv_reply_t* -xcb_glx_get_histogram_parameteriv_reply(xcb_connection_t* a_0, xcb_glx_get_histogram_parameteriv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_histogram_parameteriv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_minmax_reply_t* xcb_glx_get_minmax_reply(xcb_connection_t* a_0, xcb_glx_get_minmax_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_minmax_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_minmax_parameterfv_reply_t* -xcb_glx_get_minmax_parameterfv_reply(xcb_connection_t* a_0, xcb_glx_get_minmax_parameterfv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_minmax_parameterfv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_minmax_parameteriv_reply_t* -xcb_glx_get_minmax_parameteriv_reply(xcb_connection_t* a_0, xcb_glx_get_minmax_parameteriv_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_minmax_parameteriv_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_compressed_tex_image_arb_reply_t* xcb_glx_get_compressed_tex_image_arb_reply( - xcb_connection_t* a_0, xcb_glx_get_compressed_tex_image_arb_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_compressed_tex_image_arb_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_gen_queries_arb_reply_t* -xcb_glx_gen_queries_arb_reply(xcb_connection_t* a_0, xcb_glx_gen_queries_arb_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_gen_queries_arb_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_is_query_arb_reply_t* xcb_glx_is_query_arb_reply(xcb_connection_t* a_0, xcb_glx_is_query_arb_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_is_query_arb_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_queryiv_arb_reply_t* -xcb_glx_get_queryiv_arb_reply(xcb_connection_t* a_0, xcb_glx_get_queryiv_arb_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_queryiv_arb_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_query_objectiv_arb_reply_t* -xcb_glx_get_query_objectiv_arb_reply(xcb_connection_t* a_0, xcb_glx_get_query_objectiv_arb_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_query_objectiv_arb_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_glx_get_query_objectuiv_arb_reply_t* -xcb_glx_get_query_objectuiv_arb_reply(xcb_connection_t* a_0, xcb_glx_get_query_objectuiv_arb_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_glx_get_query_objectuiv_arb_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -} - -LOAD_LIB(libxcb_glx) diff --git a/ThunkLibs/libxcb-glx/Host.cpp b/ThunkLibs/libxcb-glx/Host.cpp deleted file mode 100644 index 620ded5ef6..0000000000 --- a/ThunkLibs/libxcb-glx/Host.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-glx -$end_info$ -*/ - -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb-glx.inl" - -static void fexfn_impl_libxcb_glx_FEX_xcb_glx_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1); - -static size_t fexfn_impl_libxcb_glx_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_glx_FEX_free_on_host(void* a_0) { - free(a_0); -} - -void fexfn_impl_libxcb_glx_FEX_xcb_glx_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - if (strcmp(a_1->name, "GLX") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_glx_so, "xcb_glx_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - typedef const struct xcb_query_extension_reply_t* fexldr_type_libxcb_xcb_get_extension_data(xcb_connection_t * a_0, xcb_extension_t * a_1); - fexldr_type_libxcb_xcb_get_extension_data* fexldr_ptr_libxcb_xcb_get_extension_data; - - fexldr_ptr_libxcb_xcb_get_extension_data = (fexldr_type_libxcb_xcb_get_extension_data*)dlsym(RTLD_DEFAULT, "xcb_get_extension_data"); - - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb_glx) diff --git a/ThunkLibs/libxcb-glx/libxcb-glx_interface.cpp b/ThunkLibs/libxcb-glx/libxcb-glx_interface.cpp deleted file mode 100644 index 584e6e075c..0000000000 --- a/ThunkLibs/libxcb-glx/libxcb-glx_interface.cpp +++ /dev/null @@ -1,1243 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 0; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -void FEX_xcb_glx_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; diff --git a/ThunkLibs/libxcb-present/Guest.cpp b/ThunkLibs/libxcb-present/Guest.cpp deleted file mode 100644 index 4c7bbdc155..0000000000 --- a/ThunkLibs/libxcb-present/Guest.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-present -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libxcb-present.inl" - -extern "C" { -xcb_extension_t xcb_present_id = { - .name = "Present", - .global_id = 0, -}; - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_present_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_present_FEX_usable_size(&args); - return args.rv; -} - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_present_init_extension(c, &xcb_present_id); -} - -xcb_present_query_version_cookie_t xcb_present_query_version(xcb_connection_t* a_0, uint32_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_present_query_version(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_present_query_version_cookie_t xcb_present_query_version_unchecked(xcb_connection_t* a_0, uint32_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_present_query_version_unchecked(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_present_query_version_reply_t* -xcb_present_query_version_reply(xcb_connection_t* a_0, xcb_present_query_version_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_present_query_version_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_present_query_capabilities_reply_t* -xcb_present_query_capabilities_reply(xcb_connection_t* a_0, xcb_present_query_capabilities_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_present_query_capabilities_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -} - -LOAD_LIB(libxcb_present) diff --git a/ThunkLibs/libxcb-present/Host.cpp b/ThunkLibs/libxcb-present/Host.cpp deleted file mode 100644 index 86283c332d..0000000000 --- a/ThunkLibs/libxcb-present/Host.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-present -$end_info$ -*/ - -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb-present.inl" - -static void fexfn_impl_libxcb_present_FEX_xcb_present_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1); - -static size_t fexfn_impl_libxcb_present_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_present_FEX_free_on_host(void* a_0) { - free(a_0); -} - -static void fexfn_impl_libxcb_present_FEX_xcb_present_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - if (strcmp(a_1->name, "Present") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_present_so, "xcb_present_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - typedef const struct xcb_query_extension_reply_t* fexldr_type_libxcb_xcb_get_extension_data(xcb_connection_t * a_0, xcb_extension_t * a_1); - fexldr_type_libxcb_xcb_get_extension_data* fexldr_ptr_libxcb_xcb_get_extension_data; - - fexldr_ptr_libxcb_xcb_get_extension_data = (fexldr_type_libxcb_xcb_get_extension_data*)dlsym(RTLD_DEFAULT, "xcb_get_extension_data"); - - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb_present) diff --git a/ThunkLibs/libxcb-present/libxcb-present_interface.cpp b/ThunkLibs/libxcb-present/libxcb-present_interface.cpp deleted file mode 100644 index edd935ac14..0000000000 --- a/ThunkLibs/libxcb-present/libxcb-present_interface.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 0; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -void FEX_xcb_present_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; diff --git a/ThunkLibs/libxcb-randr/Guest.cpp b/ThunkLibs/libxcb-randr/Guest.cpp deleted file mode 100644 index 2d2236ef6d..0000000000 --- a/ThunkLibs/libxcb-randr/Guest.cpp +++ /dev/null @@ -1,806 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-randr -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libxcb-randr.inl" - -extern "C" { -xcb_extension_t xcb_randr_id = { - .name = "RANDR", - .global_id = 0, -}; - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_randr_init_extension(c, &xcb_randr_id); -} - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_randr_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_randr_FEX_usable_size(&args); - return args.rv; -} - -xcb_randr_query_version_cookie_t xcb_randr_query_version(xcb_connection_t* a_0, uint32_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_randr_query_version(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_randr_query_version_cookie_t xcb_randr_query_version_unchecked(xcb_connection_t* a_0, uint32_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_randr_query_version_unchecked(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_randr_query_version_reply_t* -xcb_randr_query_version_reply(xcb_connection_t* a_0, xcb_randr_query_version_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_query_version_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_set_screen_config_reply_t* -xcb_randr_set_screen_config_reply(xcb_connection_t* a_0, xcb_randr_set_screen_config_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_set_screen_config_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_screen_size_range_reply_t* -xcb_randr_get_screen_size_range_reply(xcb_connection_t* a_0, xcb_randr_get_screen_size_range_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_screen_size_range_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_screen_resources_reply_t* -xcb_randr_get_screen_resources_reply(xcb_connection_t* a_0, xcb_randr_get_screen_resources_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_screen_resources_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_output_info_reply_t* -xcb_randr_get_output_info_reply(xcb_connection_t* a_0, xcb_randr_get_output_info_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_output_info_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_list_output_properties_reply_t* -xcb_randr_list_output_properties_reply(xcb_connection_t* a_0, xcb_randr_list_output_properties_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_list_output_properties_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_query_output_property_reply_t* -xcb_randr_query_output_property_reply(xcb_connection_t* a_0, xcb_randr_query_output_property_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_query_output_property_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_output_property_reply_t* -xcb_randr_get_output_property_reply(xcb_connection_t* a_0, xcb_randr_get_output_property_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_output_property_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_create_mode_reply_t* xcb_randr_create_mode_reply(xcb_connection_t* a_0, xcb_randr_create_mode_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_create_mode_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_crtc_info_reply_t* -xcb_randr_get_crtc_info_reply(xcb_connection_t* a_0, xcb_randr_get_crtc_info_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_crtc_info_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_set_crtc_config_reply_t* -xcb_randr_set_crtc_config_reply(xcb_connection_t* a_0, xcb_randr_set_crtc_config_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_set_crtc_config_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_crtc_gamma_size_reply_t* -xcb_randr_get_crtc_gamma_size_reply(xcb_connection_t* a_0, xcb_randr_get_crtc_gamma_size_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_crtc_gamma_size_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_crtc_gamma_reply_t* -xcb_randr_get_crtc_gamma_reply(xcb_connection_t* a_0, xcb_randr_get_crtc_gamma_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_crtc_gamma_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_screen_resources_current_reply_t* xcb_randr_get_screen_resources_current_reply( - xcb_connection_t* a_0, xcb_randr_get_screen_resources_current_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_screen_resources_current_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_crtc_transform_reply_t* -xcb_randr_get_crtc_transform_reply(xcb_connection_t* a_0, xcb_randr_get_crtc_transform_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_crtc_transform_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_panning_reply_t* xcb_randr_get_panning_reply(xcb_connection_t* a_0, xcb_randr_get_panning_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_panning_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_set_panning_reply_t* xcb_randr_set_panning_reply(xcb_connection_t* a_0, xcb_randr_set_panning_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_set_panning_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_output_primary_reply_t* -xcb_randr_get_output_primary_reply(xcb_connection_t* a_0, xcb_randr_get_output_primary_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_output_primary_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_providers_reply_t* -xcb_randr_get_providers_reply(xcb_connection_t* a_0, xcb_randr_get_providers_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_providers_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_provider_info_reply_t* -xcb_randr_get_provider_info_reply(xcb_connection_t* a_0, xcb_randr_get_provider_info_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_provider_info_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_list_provider_properties_reply_t* -xcb_randr_list_provider_properties_reply(xcb_connection_t* a_0, xcb_randr_list_provider_properties_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_list_provider_properties_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_query_provider_property_reply_t* -xcb_randr_query_provider_property_reply(xcb_connection_t* a_0, xcb_randr_query_provider_property_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_query_provider_property_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_provider_property_reply_t* -xcb_randr_get_provider_property_reply(xcb_connection_t* a_0, xcb_randr_get_provider_property_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_provider_property_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_get_monitors_reply_t* xcb_randr_get_monitors_reply(xcb_connection_t* a_0, xcb_randr_get_monitors_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_get_monitors_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_randr_create_lease_reply_t* xcb_randr_create_lease_reply(xcb_connection_t* a_0, xcb_randr_create_lease_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_randr_create_lease_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -} - -LOAD_LIB(libxcb_randr) diff --git a/ThunkLibs/libxcb-randr/Host.cpp b/ThunkLibs/libxcb-randr/Host.cpp deleted file mode 100644 index 56c9f74c32..0000000000 --- a/ThunkLibs/libxcb-randr/Host.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-randr -$end_info$ -*/ - -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb-randr.inl" - -static void fexfn_impl_libxcb_randr_FEX_xcb_randr_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1); - -static size_t fexfn_impl_libxcb_randr_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_randr_FEX_free_on_host(void* a_0) { - free(a_0); -} - -static void fexfn_impl_libxcb_randr_FEX_xcb_randr_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - if (strcmp(a_1->name, "RANDR") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_randr_so, "xcb_randr_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - typedef const struct xcb_query_extension_reply_t* fexldr_type_libxcb_xcb_get_extension_data(xcb_connection_t * a_0, xcb_extension_t * a_1); - fexldr_type_libxcb_xcb_get_extension_data* fexldr_ptr_libxcb_xcb_get_extension_data; - - fexldr_ptr_libxcb_xcb_get_extension_data = (fexldr_type_libxcb_xcb_get_extension_data*)dlsym(RTLD_DEFAULT, "xcb_get_extension_data"); - - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb_randr) diff --git a/ThunkLibs/libxcb-randr/libxcb-randr_interface.cpp b/ThunkLibs/libxcb-randr/libxcb-randr_interface.cpp deleted file mode 100644 index d3af3d6e5c..0000000000 --- a/ThunkLibs/libxcb-randr/libxcb-randr_interface.cpp +++ /dev/null @@ -1,694 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 0; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -// Union type (includes pointers, so only compatible across 64-bit architectures) -#ifndef IS_32BIT_THUNK -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; -#endif - -void FEX_xcb_randr_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; diff --git a/ThunkLibs/libxcb-shm/libxcb-shm_Guest.cpp b/ThunkLibs/libxcb-shm/libxcb-shm_Guest.cpp deleted file mode 100644 index 372fc97409..0000000000 --- a/ThunkLibs/libxcb-shm/libxcb-shm_Guest.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-shm -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libxcb-shm.inl" - -extern "C" { -xcb_extension_t xcb_shm_id = { - .name = "MIT-SHM", - .global_id = 0, -}; - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_shm_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_shm_FEX_usable_size(&args); - return args.rv; -} - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_shm_init_extension(c, &xcb_shm_id); -} - -xcb_shm_query_version_cookie_t xcb_shm_query_version(xcb_connection_t* a_0) { - auto ret = fexfn_pack_xcb_shm_query_version(a_0); - InitializeExtensions(a_0); - return ret; -} - -xcb_shm_query_version_cookie_t xcb_shm_query_version_unchecked(xcb_connection_t* a_0) { - auto ret = fexfn_pack_xcb_shm_query_version_unchecked(a_0); - InitializeExtensions(a_0); - return ret; -} - -xcb_shm_query_version_reply_t* xcb_shm_query_version_reply(xcb_connection_t* a_0, xcb_shm_query_version_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_shm_query_version_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_shm_get_image_reply_t* xcb_shm_get_image_reply(xcb_connection_t* a_0, xcb_shm_get_image_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_shm_get_image_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_shm_create_segment_reply_t* xcb_shm_create_segment_reply(xcb_connection_t* a_0, xcb_shm_create_segment_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_shm_create_segment_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -} - - -LOAD_LIB(libxcb_shm) diff --git a/ThunkLibs/libxcb-shm/libxcb-shm_Host.cpp b/ThunkLibs/libxcb-shm/libxcb-shm_Host.cpp deleted file mode 100644 index 4f97e34393..0000000000 --- a/ThunkLibs/libxcb-shm/libxcb-shm_Host.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-shm -$end_info$ -*/ - -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb-shm.inl" - -static void fexfn_impl_libxcb_shm_FEX_xcb_shm_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1); - -static size_t fexfn_impl_libxcb_shm_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_shm_FEX_free_on_host(void* a_0) { - free(a_0); -} - -static void fexfn_impl_libxcb_shm_FEX_xcb_shm_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - if (strcmp(a_1->name, "MIT-SHM") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_shm_so, "xcb_shm_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - typedef const struct xcb_query_extension_reply_t* fexldr_type_libxcb_xcb_get_extension_data(xcb_connection_t * a_0, xcb_extension_t * a_1); - fexldr_type_libxcb_xcb_get_extension_data* fexldr_ptr_libxcb_xcb_get_extension_data; - - fexldr_ptr_libxcb_xcb_get_extension_data = (fexldr_type_libxcb_xcb_get_extension_data*)dlsym(RTLD_DEFAULT, "xcb_get_extension_data"); - - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb_shm) diff --git a/ThunkLibs/libxcb-shm/libxcb-shm_interface.cpp b/ThunkLibs/libxcb-shm/libxcb-shm_interface.cpp deleted file mode 100644 index 220c6b5a4e..0000000000 --- a/ThunkLibs/libxcb-shm/libxcb-shm_interface.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 0; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -void FEX_xcb_shm_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; diff --git a/ThunkLibs/libxcb-sync/Guest.cpp b/ThunkLibs/libxcb-sync/Guest.cpp deleted file mode 100644 index 3364626139..0000000000 --- a/ThunkLibs/libxcb-sync/Guest.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-sync -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libxcb-sync.inl" - -extern "C" { -xcb_extension_t xcb_sync_id = { - .name = "SYNC", - .global_id = 0, -}; - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_sync_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_sync_FEX_usable_size(&args); - return args.rv; -} - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_sync_init_extension(c, &xcb_sync_id); -} - -xcb_sync_initialize_cookie_t xcb_sync_initialize(xcb_connection_t* a_0, uint8_t a_1, uint8_t a_2) { - auto ret = fexfn_pack_xcb_sync_initialize(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_sync_initialize_cookie_t xcb_sync_initialize_unchecked(xcb_connection_t* a_0, uint8_t a_1, uint8_t a_2) { - auto ret = fexfn_pack_xcb_sync_initialize_unchecked(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_sync_initialize_reply_t* xcb_sync_initialize_reply(xcb_connection_t* a_0, xcb_sync_initialize_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_sync_initialize_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_sync_list_system_counters_reply_t* -xcb_sync_list_system_counters_reply(xcb_connection_t* a_0, xcb_sync_list_system_counters_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_sync_list_system_counters_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_sync_query_counter_reply_t* xcb_sync_query_counter_reply(xcb_connection_t* a_0, xcb_sync_query_counter_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_sync_query_counter_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_sync_query_alarm_reply_t* xcb_sync_query_alarm_reply(xcb_connection_t* a_0, xcb_sync_query_alarm_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_sync_query_alarm_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_sync_get_priority_reply_t* xcb_sync_get_priority_reply(xcb_connection_t* a_0, xcb_sync_get_priority_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_sync_get_priority_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_sync_query_fence_reply_t* xcb_sync_query_fence_reply(xcb_connection_t* a_0, xcb_sync_query_fence_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_sync_query_fence_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - return ret; -} -} - -LOAD_LIB(libxcb_sync) diff --git a/ThunkLibs/libxcb-sync/Host.cpp b/ThunkLibs/libxcb-sync/Host.cpp deleted file mode 100644 index 472753cd0b..0000000000 --- a/ThunkLibs/libxcb-sync/Host.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-sync -$end_info$ -*/ - -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb-sync.inl" - -static void fexfn_impl_libxcb_sync_FEX_xcb_sync_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1); - -static size_t fexfn_impl_libxcb_sync_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_sync_FEX_free_on_host(void* a_0) { - free(a_0); -} - -static void fexfn_impl_libxcb_sync_FEX_xcb_sync_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - if (strcmp(a_1->name, "SYNC") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_sync_so, "xcb_sync_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - typedef const struct xcb_query_extension_reply_t* fexldr_type_libxcb_xcb_get_extension_data(xcb_connection_t * a_0, xcb_extension_t * a_1); - fexldr_type_libxcb_xcb_get_extension_data* fexldr_ptr_libxcb_xcb_get_extension_data; - - fexldr_ptr_libxcb_xcb_get_extension_data = (fexldr_type_libxcb_xcb_get_extension_data*)dlsym(RTLD_DEFAULT, "xcb_get_extension_data"); - - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb_sync) diff --git a/ThunkLibs/libxcb-sync/libxcb-sync_interface.cpp b/ThunkLibs/libxcb-sync/libxcb-sync_interface.cpp deleted file mode 100644 index 0738987e7d..0000000000 --- a/ThunkLibs/libxcb-sync/libxcb-sync_interface.cpp +++ /dev/null @@ -1,206 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 1; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -void FEX_xcb_sync_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; diff --git a/ThunkLibs/libxcb-xfixes/libxcb-xfixes_Guest.cpp b/ThunkLibs/libxcb-xfixes/libxcb-xfixes_Guest.cpp deleted file mode 100644 index 75e088db67..0000000000 --- a/ThunkLibs/libxcb-xfixes/libxcb-xfixes_Guest.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-xfixes -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include - -#include "common/Guest.h" -#include - -#include "thunkgen_guest_libxcb-xfixes.inl" - -extern "C" { -xcb_extension_t xcb_xfixes_id = { - .name = "XFIXES", - .global_id = 0, -}; - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_xfixes_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_xfixes_FEX_usable_size(&args); - return args.rv; -} - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_xfixes_init_extension(c, &xcb_xfixes_id); -} - -xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version(xcb_connection_t* a_0, uint32_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_xfixes_query_version(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version_unchecked(xcb_connection_t* a_0, uint32_t a_1, uint32_t a_2) { - auto ret = fexfn_pack_xcb_xfixes_query_version_unchecked(a_0, a_1, a_2); - InitializeExtensions(a_0); - return ret; -} - -xcb_xfixes_query_version_reply_t* -xcb_xfixes_query_version_reply(xcb_connection_t* a_0, xcb_xfixes_query_version_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_xfixes_query_version_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_xfixes_get_cursor_image_reply_t* -xcb_xfixes_get_cursor_image_reply(xcb_connection_t* a_0, xcb_xfixes_get_cursor_image_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_xfixes_get_cursor_image_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_xfixes_fetch_region_reply_t* -xcb_xfixes_fetch_region_reply(xcb_connection_t* a_0, xcb_xfixes_fetch_region_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_xfixes_fetch_region_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_xfixes_get_cursor_name_reply_t* -xcb_xfixes_get_cursor_name_reply(xcb_connection_t* a_0, xcb_xfixes_get_cursor_name_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_xfixes_get_cursor_name_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_xfixes_get_cursor_image_and_name_reply_t* xcb_xfixes_get_cursor_image_and_name_reply( - xcb_connection_t* a_0, xcb_xfixes_get_cursor_image_and_name_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_xfixes_get_cursor_image_and_name_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -} - -LOAD_LIB(libxcb_xfixes) diff --git a/ThunkLibs/libxcb-xfixes/libxcb-xfixes_Host.cpp b/ThunkLibs/libxcb-xfixes/libxcb-xfixes_Host.cpp deleted file mode 100644 index 7e5a92744e..0000000000 --- a/ThunkLibs/libxcb-xfixes/libxcb-xfixes_Host.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb-xfixes -$end_info$ -*/ - -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb-xfixes.inl" - -static void fexfn_impl_libxcb_xfixes_FEX_xcb_xfixes_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1); - -static size_t fexfn_impl_libxcb_xfixes_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_xfixes_FEX_free_on_host(void* a_0) { - free(a_0); -} - -static void fexfn_impl_libxcb_xfixes_FEX_xcb_xfixes_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - if (strcmp(a_1->name, "XFIXES") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_xfixes_so, "xcb_xfixes_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - typedef const struct xcb_query_extension_reply_t* fexldr_type_libxcb_xcb_get_extension_data(xcb_connection_t * a_0, xcb_extension_t * a_1); - fexldr_type_libxcb_xcb_get_extension_data* fexldr_ptr_libxcb_xcb_get_extension_data; - - fexldr_ptr_libxcb_xcb_get_extension_data = (fexldr_type_libxcb_xcb_get_extension_data*)dlsym(RTLD_DEFAULT, "xcb_get_extension_data"); - - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb_xfixes) diff --git a/ThunkLibs/libxcb-xfixes/libxcb-xfixes_interface.cpp b/ThunkLibs/libxcb-xfixes/libxcb-xfixes_interface.cpp deleted file mode 100644 index 88d0500a99..0000000000 --- a/ThunkLibs/libxcb-xfixes/libxcb-xfixes_interface.cpp +++ /dev/null @@ -1,265 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 0; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -void FEX_xcb_xfixes_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; diff --git a/ThunkLibs/libxcb/libxcb_Guest.cpp b/ThunkLibs/libxcb/libxcb_Guest.cpp deleted file mode 100644 index 3b70d0582e..0000000000 --- a/ThunkLibs/libxcb/libxcb_Guest.cpp +++ /dev/null @@ -1,1373 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb -$end_info$ -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common/Guest.h" - -#include - -#include "thunkgen_guest_libxcb.inl" - -extern "C" { -xcb_extension_t xcb_big_requests_id = { - .name = "BIG-REQUESTS", - .global_id = 0, -}; - -xcb_extension_t xcb_xc_misc_id = { - .name = "XC-MISC", - .global_id = 0, -}; - -static void InitializeExtensions(xcb_connection_t* c) { - FEX_xcb_init_extension(c, &xcb_big_requests_id); - FEX_xcb_init_extension(c, &xcb_xc_misc_id); -} - -void FEX_malloc_free_on_host(void* Ptr) { - struct { - void* p; - } args; - args.p = Ptr; - fexthunks_libxcb_FEX_free_on_host(&args); -} - -size_t FEX_malloc_usable_size(void* Ptr) { - struct { - void* p; - size_t rv; - } args; - args.p = Ptr; - fexthunks_libxcb_FEX_usable_size(&args); - return args.rv; -} - -xcb_connection_t* xcb_connect_to_fd(int a_0, xcb_auth_info_t* a_1) { - auto ret = fexfn_pack_xcb_connect_to_fd(a_0, a_1); - InitializeExtensions(ret); - return ret; -} - -xcb_connection_t* xcb_connect(const char* a_0, int* a_1) { - auto ret = fexfn_pack_xcb_connect(a_0, a_1); - InitializeExtensions(ret); - return ret; -} - -xcb_connection_t* xcb_connect_to_display_with_auth_info(const char* a_0, xcb_auth_info_t* a_1, int* a_2) { - auto ret = fexfn_pack_xcb_connect_to_display_with_auth_info(a_0, a_1, a_2); - InitializeExtensions(ret); - return ret; -} - -void xcb_disconnect(xcb_connection_t* a_0) { - fexfn_pack_xcb_disconnect(a_0); -} - -int xcb_parse_display(const char* a_0, char** a_1, int* a_2, int* a_3) { - auto ret = fexfn_pack_xcb_parse_display(a_0, a_1, a_2, a_3); - if (a_1 && *a_1) { - // Usable size - size_t Usable = FEX_malloc_usable_size(*a_1); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, *a_1, Usable); - - FEX_malloc_free_on_host(*a_1); - *a_1 = (char*)NewPtr; - } - - return ret; -} - -xcb_generic_event_t* xcb_wait_for_event(xcb_connection_t* a_0) { - auto ret = fexfn_pack_xcb_wait_for_event(a_0); - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_generic_event_t* xcb_poll_for_event(xcb_connection_t* a_0) { - auto ret = fexfn_pack_xcb_poll_for_event(a_0); - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_generic_event_t* xcb_poll_for_queued_event(xcb_connection_t* a_0) { - auto ret = fexfn_pack_xcb_poll_for_queued_event(a_0); - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_generic_event_t* xcb_poll_for_special_event(xcb_connection_t* a_0, xcb_special_event_t* a_1) { - auto ret = fexfn_pack_xcb_poll_for_special_event(a_0, a_1); - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_generic_event_t* xcb_wait_for_special_event(xcb_connection_t* a_0, xcb_special_event_t* a_1) { - auto ret = fexfn_pack_xcb_wait_for_special_event(a_0, a_1); - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_generic_error_t* xcb_request_check(xcb_connection_t* a_0, xcb_void_cookie_t a_1) { - auto ret = fexfn_pack_xcb_request_check(a_0, a_1); - if (ret) { - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(sizeof(xcb_generic_error_t)); - memcpy(NewPtr, ret, sizeof(xcb_generic_error_t)); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - return ret; -} - -void* xcb_wait_for_reply(xcb_connection_t* a_0, uint32_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_wait_for_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -void* xcb_wait_for_reply64(xcb_connection_t* a_0, uint64_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_wait_for_reply64(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = NewPtr; - } - - return ret; -} - -int xcb_poll_for_reply(xcb_connection_t* a_0, unsigned int a_1, void** a_2, xcb_generic_error_t** a_3) { - auto ret = fexfn_pack_xcb_poll_for_reply(a_0, a_1, a_2, a_3); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // Usable size - size_t Usable = FEX_malloc_usable_size(*a_2); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, *a_2, Usable); - - FEX_malloc_free_on_host(*a_2); - *a_2 = NewPtr; - } - - if (a_3 && *a_3) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_3, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_3); - - // User is expected to free this - *a_3 = NewError; - } - - return ret; -} - -int xcb_poll_for_reply64(xcb_connection_t* a_0, uint64_t a_1, void** a_2, xcb_generic_error_t** a_3) { - auto ret = fexfn_pack_xcb_poll_for_reply64(a_0, a_1, a_2, a_3); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // Usable size - size_t Usable = FEX_malloc_usable_size(*a_2); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, *a_2, Usable); - - FEX_malloc_free_on_host(*a_2); - *a_2 = NewPtr; - } - - if (a_3 && *a_3) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_3, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_3); - - // User is expected to free this - *a_3 = NewError; - } - - return ret; -} - -xcb_query_extension_reply_t* xcb_query_extension_reply(xcb_connection_t* a_0, xcb_query_extension_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_query_extension_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - - return ret; -} - -xcb_get_window_attributes_reply_t* -xcb_get_window_attributes_reply(xcb_connection_t* a_0, xcb_get_window_attributes_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_window_attributes_reply(a_0, a_1, a_2); - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - void* NewPtr = malloc(sizeof(xcb_get_window_attributes_reply_t)); - memcpy(NewPtr, ret, sizeof(xcb_get_window_attributes_reply_t)); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_geometry_reply_t* xcb_get_geometry_reply(xcb_connection_t* a_0, xcb_get_geometry_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_geometry_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - void* NewPtr = malloc(sizeof(xcb_get_geometry_reply_t)); - memcpy(NewPtr, ret, sizeof(xcb_get_geometry_reply_t)); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_intern_atom_reply_t* xcb_intern_atom_reply(xcb_connection_t* a_0, xcb_intern_atom_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_intern_atom_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - // Usable size - size_t Usable = FEX_malloc_usable_size(ret); - - // This will be a bit wasteful but this is an unsized pointer - void* NewPtr = malloc(Usable); - memcpy(NewPtr, ret, Usable); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_property_reply_t* xcb_get_property_reply(xcb_connection_t* a_0, xcb_get_property_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_property_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - void* NewPtr = malloc(sizeof(xcb_get_property_reply_t)); - memcpy(NewPtr, ret, sizeof(xcb_get_property_reply_t)); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_query_tree_reply_t* xcb_query_tree_reply(xcb_connection_t* a_0, xcb_query_tree_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_query_tree_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_atom_name_reply_t* xcb_get_atom_name_reply(xcb_connection_t* a_0, xcb_get_atom_name_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_atom_name_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_list_properties_reply_t* xcb_list_properties_reply(xcb_connection_t* a_0, xcb_list_properties_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_list_properties_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_selection_owner_reply_t* -xcb_get_selection_owner_reply(xcb_connection_t* a_0, xcb_get_selection_owner_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_selection_owner_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_grab_pointer_reply_t* xcb_grab_pointer_reply(xcb_connection_t* a_0, xcb_grab_pointer_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_grab_pointer_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_grab_keyboard_reply_t* xcb_grab_keyboard_reply(xcb_connection_t* a_0, xcb_grab_keyboard_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_grab_keyboard_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_query_pointer_reply_t* xcb_query_pointer_reply(xcb_connection_t* a_0, xcb_query_pointer_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_query_pointer_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_motion_events_reply_t* xcb_get_motion_events_reply(xcb_connection_t* a_0, xcb_get_motion_events_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_motion_events_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_translate_coordinates_reply_t* -xcb_translate_coordinates_reply(xcb_connection_t* a_0, xcb_translate_coordinates_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_translate_coordinates_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_input_focus_reply_t* xcb_get_input_focus_reply(xcb_connection_t* a_0, xcb_get_input_focus_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_input_focus_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_query_keymap_reply_t* xcb_query_keymap_reply(xcb_connection_t* a_0, xcb_query_keymap_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_query_keymap_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_query_font_reply_t* xcb_query_font_reply(xcb_connection_t* a_0, xcb_query_font_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_query_font_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_query_text_extents_reply_t* xcb_query_text_extents_reply(xcb_connection_t* a_0, xcb_query_text_extents_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_query_text_extents_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_list_fonts_reply_t* xcb_list_fonts_reply(xcb_connection_t* a_0, xcb_list_fonts_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_list_fonts_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_list_fonts_with_info_reply_t* -xcb_list_fonts_with_info_reply(xcb_connection_t* a_0, xcb_list_fonts_with_info_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_list_fonts_with_info_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_font_path_reply_t* xcb_get_font_path_reply(xcb_connection_t* a_0, xcb_get_font_path_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_font_path_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_image_reply_t* xcb_get_image_reply(xcb_connection_t* a_0, xcb_get_image_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_image_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_list_installed_colormaps_reply_t* -xcb_list_installed_colormaps_reply(xcb_connection_t* a_0, xcb_list_installed_colormaps_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_list_installed_colormaps_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_alloc_color_reply_t* xcb_alloc_color_reply(xcb_connection_t* a_0, xcb_alloc_color_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_alloc_color_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_alloc_named_color_reply_t* xcb_alloc_named_color_reply(xcb_connection_t* a_0, xcb_alloc_named_color_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_alloc_named_color_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_alloc_color_cells_reply_t* xcb_alloc_color_cells_reply(xcb_connection_t* a_0, xcb_alloc_color_cells_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_alloc_color_cells_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_alloc_color_planes_reply_t* xcb_alloc_color_planes_reply(xcb_connection_t* a_0, xcb_alloc_color_planes_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_alloc_color_planes_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_query_colors_reply_t* xcb_query_colors_reply(xcb_connection_t* a_0, xcb_query_colors_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_query_colors_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_lookup_color_reply_t* xcb_lookup_color_reply(xcb_connection_t* a_0, xcb_lookup_color_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_lookup_color_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_query_best_size_reply_t* xcb_query_best_size_reply(xcb_connection_t* a_0, xcb_query_best_size_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_query_best_size_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_list_extensions_reply_t* xcb_list_extensions_reply(xcb_connection_t* a_0, xcb_list_extensions_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_list_extensions_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_keyboard_mapping_reply_t* -xcb_get_keyboard_mapping_reply(xcb_connection_t* a_0, xcb_get_keyboard_mapping_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_keyboard_mapping_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_keyboard_control_reply_t* -xcb_get_keyboard_control_reply(xcb_connection_t* a_0, xcb_get_keyboard_control_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_keyboard_control_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_pointer_control_reply_t* -xcb_get_pointer_control_reply(xcb_connection_t* a_0, xcb_get_pointer_control_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_pointer_control_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_screen_saver_reply_t* xcb_get_screen_saver_reply(xcb_connection_t* a_0, xcb_get_screen_saver_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_screen_saver_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_list_hosts_reply_t* xcb_list_hosts_reply(xcb_connection_t* a_0, xcb_list_hosts_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_list_hosts_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_set_pointer_mapping_reply_t* -xcb_set_pointer_mapping_reply(xcb_connection_t* a_0, xcb_set_pointer_mapping_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_set_pointer_mapping_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_pointer_mapping_reply_t* -xcb_get_pointer_mapping_reply(xcb_connection_t* a_0, xcb_get_pointer_mapping_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_pointer_mapping_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_set_modifier_mapping_reply_t* -xcb_set_modifier_mapping_reply(xcb_connection_t* a_0, xcb_set_modifier_mapping_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_set_modifier_mapping_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} - -xcb_get_modifier_mapping_reply_t* -xcb_get_modifier_mapping_reply(xcb_connection_t* a_0, xcb_get_modifier_mapping_cookie_t a_1, xcb_generic_error_t** a_2) { - auto ret = fexfn_pack_xcb_get_modifier_mapping_reply(a_0, a_1, a_2); - - // We now need to do some fixups here - if (a_2 && *a_2) { - // If the error code pointer exists then we need to copy the contents and free the host facing pointer - xcb_generic_error_t* NewError = (xcb_generic_error_t*)malloc(sizeof(xcb_generic_error_t)); - memcpy(NewError, *a_2, sizeof(xcb_generic_error_t)); - FEX_malloc_free_on_host(*a_2); - - // User is expected to free this - *a_2 = NewError; - } - - if (ret) { - constexpr size_t ResultSize = sizeof(std::remove_pointer::type); - void* NewPtr = malloc(ResultSize); - memcpy(NewPtr, ret, ResultSize); - - FEX_malloc_free_on_host(ret); - ret = (decltype(ret))NewPtr; - } - - return ret; -} -} - -LOAD_LIB(libxcb) diff --git a/ThunkLibs/libxcb/libxcb_Host.cpp b/ThunkLibs/libxcb/libxcb_Host.cpp deleted file mode 100644 index 73984f16b5..0000000000 --- a/ThunkLibs/libxcb/libxcb_Host.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* -$info$ -tags: thunklibs|xcb -$end_info$ -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "common/Host.h" -#include -#include - -#include "thunkgen_host_libxcb.inl" - -static void fexfn_impl_libxcb_FEX_xcb_init_extension(xcb_connection_t*, xcb_extension_t*); -static size_t fexfn_impl_libxcb_FEX_usable_size(void*); -static void fexfn_impl_libxcb_FEX_free_on_host(void*); - -static size_t fexfn_impl_libxcb_FEX_usable_size(void* a_0) { - return malloc_usable_size(a_0); -} - -static void fexfn_impl_libxcb_FEX_free_on_host(void* a_0) { - free(a_0); -} - -static void fexfn_impl_libxcb_FEX_xcb_init_extension(xcb_connection_t* a_0, xcb_extension_t* a_1) { - xcb_extension_t* ext {}; - - if (strcmp(a_1->name, "BIG-REQUESTS") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_so, "xcb_big_requests_id"); - } else if (strcmp(a_1->name, "XC-MISC") == 0) { - ext = (xcb_extension_t*)dlsym(fexldr_ptr_libxcb_so, "xcb_xc_misc_id"); - } else { - fprintf(stderr, "Unknown xcb extension '%s'\n", a_1->name); - __builtin_trap(); - return; - } - - if (!ext) { - fprintf(stderr, "Couldn't find extension symbol: '%s'\n", a_1->name); - __builtin_trap(); - return; - } - [[maybe_unused]] auto res = fexldr_ptr_libxcb_xcb_get_extension_data(a_0, ext); - - // Copy over the global id - a_1->global_id = ext->global_id; -} - -EXPORTS(libxcb) diff --git a/ThunkLibs/libxcb/libxcb_interface.cpp b/ThunkLibs/libxcb/libxcb_interface.cpp deleted file mode 100644 index 93a31fc432..0000000000 --- a/ThunkLibs/libxcb/libxcb_interface.cpp +++ /dev/null @@ -1,1415 +0,0 @@ -#include - -#include -#include - -template -struct fex_gen_config { - unsigned version = 1; -}; - -template -struct fex_gen_type {}; - -template<> -struct fex_gen_type : fexgen::opaque_type {}; -template<> -struct fex_gen_type : fexgen::opaque_type {}; - -// Union type with consistent data layout across host/x86/x86-64 -template<> -struct fex_gen_type : fexgen::assume_compatible_data_layout {}; - -void FEX_xcb_init_extension(xcb_connection_t*, xcb_extension_t*); -size_t FEX_usable_size(void*); -void FEX_free_on_host(void*); - -template<> -struct fex_gen_config : fexgen::custom_host_impl {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; - -#if XCB_VERSION_MAJOR >= 1 && XCB_VERSION_MINOR >= 14 && XCB_VERSION_PATCH >= 0 -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -#endif - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {}; - -template<> -struct fex_gen_config : fexgen::custom_guest_entrypoint {}; -template<> -struct fex_gen_config {}; -template<> -struct fex_gen_config {};