Load X11 dynamically

The loaders have been generated through hpvb's dynload-wrapper, although
they had to be heavily handpatched to workaround some already reported
issues with it. I added a note to each generated file to account for
that.

As GLAD uses X11 stuff directly, I had to define the GLAD_GLX_NO_X11
macro to not let do it that, and handle myself the display loading and
screen handling part myself, which wasn't that hard but it's still
something worth saying.

I plan to improve greatly the X11 backend (including this aspect) but,
as the release isn't that far and I'm also working on the Wayland
backend, this will do for now, I hope.
This commit is contained in:
Riteo 2022-11-29 12:03:06 +01:00
parent daf168f4c8
commit 2dd5a792bb
21 changed files with 12818 additions and 28 deletions

View File

@ -184,13 +184,14 @@ def configure(env: "Environment"):
## Dependencies
if env["x11"]:
env.ParseConfig("pkg-config x11 --cflags --libs")
env.ParseConfig("pkg-config xcursor --cflags --libs")
env.ParseConfig("pkg-config xinerama --cflags --libs")
env.ParseConfig("pkg-config xext --cflags --libs")
env.ParseConfig("pkg-config xrandr --cflags --libs")
env.ParseConfig("pkg-config xrender --cflags --libs")
env.ParseConfig("pkg-config xi --cflags --libs")
# Only cflags, we dlopen the libraries.
env.ParseConfig("pkg-config x11 --cflags")
env.ParseConfig("pkg-config xcursor --cflags")
env.ParseConfig("pkg-config xinerama --cflags")
env.ParseConfig("pkg-config xext --cflags")
env.ParseConfig("pkg-config xrandr --cflags")
env.ParseConfig("pkg-config xrender --cflags")
env.ParseConfig("pkg-config xi --cflags")
if env["touch"]:
env.Append(CPPDEFINES=["TOUCH_ENABLED"])

View File

@ -5,12 +5,20 @@ Import("env")
source_files = [
"display_server_x11.cpp",
"key_mapping_x11.cpp",
"dynwrappers/xlib-so_wrap.c",
"dynwrappers/xcursor-so_wrap.c",
"dynwrappers/xinerama-so_wrap.c",
"dynwrappers/xinput2-so_wrap.c",
"dynwrappers/xrandr-so_wrap.c",
"dynwrappers/xrender-so_wrap.c",
"dynwrappers/xext-so_wrap.c",
]
if env["vulkan"]:
source_files.append("vulkan_context_x11.cpp")
if env["opengl3"]:
env.Append(CPPDEFINES=["GLAD_GLX_NO_X11"])
source_files.append(["gl_manager_x11.cpp", "detect_prime_x11.cpp", "#thirdparty/glad/glx.c"])
objects = []

View File

@ -41,8 +41,7 @@
#include "thirdparty/glad/glad/gl.h"
#include "thirdparty/glad/glad/glx.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "dynwrappers/xlib-so_wrap.h"
#include <cstring>
@ -89,6 +88,10 @@ void create_context() {
None
};
if (gladLoaderLoadGLX(x11_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(x11_display))) == 0) {
print_verbose("Unable to load GLX, GPU detection skipped.");
quick_exit(1);
}
int fbcount;
GLXFBConfig fbconfig = nullptr;
XVisualInfo *vi = nullptr;
@ -189,11 +192,6 @@ int detect_prime() {
setenv("DRI_PRIME", "1", 1);
}
if (gladLoaderLoadGLX(NULL, 0) == 0) {
print_verbose("Unable to load GLX, GPU detection skipped.");
quick_exit(1);
}
create_context();
PFNGLGETSTRINGPROC glGetString = (PFNGLGETSTRINGPROC)glXGetProcAddressARB((GLubyte *)"glGetString");

View File

@ -58,11 +58,6 @@
#include <sys/types.h>
#include <unistd.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xinerama.h>
#include <X11/extensions/shape.h>
// ICCCM
#define WM_NormalState 1L // window normal state
#define WM_IconicState 3L // window minimized
@ -4710,6 +4705,46 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V
}
DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
#ifdef DEBUG_ENABLED
int dylibloader_verbose = 1;
#else
int dylibloader_verbose = 0;
#endif
if (initialize_xlib(dylibloader_verbose) != 0) {
r_error = ERR_UNAVAILABLE;
ERR_FAIL_MSG("Can't load Xlib dynamically.");
}
if (initialize_xcursor(dylibloader_verbose) != 0) {
r_error = ERR_UNAVAILABLE;
ERR_FAIL_MSG("Can't load XCursor dynamically.");
}
if (initialize_xext(dylibloader_verbose) != 0) {
r_error = ERR_UNAVAILABLE;
ERR_FAIL_MSG("Can't load Xext dynamically.");
}
if (initialize_xinerama(dylibloader_verbose) != 0) {
r_error = ERR_UNAVAILABLE;
ERR_FAIL_MSG("Can't load Xinerama dynamically.");
}
if (initialize_xrandr(dylibloader_verbose) != 0) {
r_error = ERR_UNAVAILABLE;
ERR_FAIL_MSG("Can't load Xrandr dynamically.");
}
if (initialize_xrender(dylibloader_verbose) != 0) {
r_error = ERR_UNAVAILABLE;
ERR_FAIL_MSG("Can't load Xrender dynamically.");
}
if (initialize_xinput2(dylibloader_verbose) != 0) {
r_error = ERR_UNAVAILABLE;
ERR_FAIL_MSG("Can't load Xinput2 dynamically.");
}
Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events);
r_error = OK;
@ -4910,7 +4945,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
gl_manager = memnew(GLManager_X11(p_resolution, opengl_api_type));
if (gl_manager->initialize() != OK) {
if (gl_manager->initialize(x11_display) != OK) {
memdelete(gl_manager);
gl_manager = nullptr;
r_error = ERR_UNAVAILABLE;

View File

@ -64,12 +64,20 @@
#include "../freedesktop_screensaver.h"
#endif
#include <X11/Xcursor/Xcursor.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/extensions/XInput2.h>
#include <X11/extensions/Xrandr.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include "dynwrappers/xlib-so_wrap.h"
#include "dynwrappers/xcursor-so_wrap.h"
#include "dynwrappers/xext-so_wrap.h"
#include "dynwrappers/xinerama-so_wrap.h"
#include "dynwrappers/xinput2-so_wrap.h"
#include "dynwrappers/xrandr-so_wrap.h"
#include "dynwrappers/xrender-so_wrap.h"
typedef struct _xrr_monitor_info {
Atom name;
Bool primary = false;

View File

@ -0,0 +1,676 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:48:06
// flags: ./generate-wrapper.py --include /usr/include/X11/Xcursor/Xcursor.h --sys-include <X11/Xcursor/Xcursor.h> --soname libXcursor.so.1 --init-name xcursor --output-header xcursor-so_wrap.h --output-implementation xcursor-so_wrap.c
//
// NOTE: Generated from Xcursor 1.2.0.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, but absent in libXcursor.so.1, were removed.
#include <stdint.h>
#define XcursorImageCreate XcursorImageCreate_dylibloader_orig_xcursor
#define XcursorImageDestroy XcursorImageDestroy_dylibloader_orig_xcursor
#define XcursorImagesCreate XcursorImagesCreate_dylibloader_orig_xcursor
#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_orig_xcursor
#define XcursorImagesSetName XcursorImagesSetName_dylibloader_orig_xcursor
#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_orig_xcursor
#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_orig_xcursor
#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_orig_xcursor
#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_orig_xcursor
#define XcursorAnimateNext XcursorAnimateNext_dylibloader_orig_xcursor
#define XcursorCommentCreate XcursorCommentCreate_dylibloader_orig_xcursor
#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_orig_xcursor
#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_orig_xcursor
#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_orig_xcursor
#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_orig_xcursor
#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_orig_xcursor
#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_orig_xcursor
#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_orig_xcursor
#define XcursorXcFileSave XcursorXcFileSave_dylibloader_orig_xcursor
#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_orig_xcursor
#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_orig_xcursor
#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_orig_xcursor
#define XcursorFileLoad XcursorFileLoad_dylibloader_orig_xcursor
#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_orig_xcursor
#define XcursorFileSave XcursorFileSave_dylibloader_orig_xcursor
#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_orig_xcursor
#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_orig_xcursor
#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_orig_xcursor
#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_orig_xcursor
#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_orig_xcursor
#define XcursorFilenameSave XcursorFilenameSave_dylibloader_orig_xcursor
#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_orig_xcursor
#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_orig_xcursor
#define XcursorLibraryPath XcursorLibraryPath_dylibloader_orig_xcursor
#define XcursorLibraryShape XcursorLibraryShape_dylibloader_orig_xcursor
#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_orig_xcursor
#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_orig_xcursor
#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_orig_xcursor
#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_orig_xcursor
#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_orig_xcursor
#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_orig_xcursor
#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_orig_xcursor
#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_orig_xcursor
#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_orig_xcursor
#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_orig_xcursor
#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_orig_xcursor
#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_orig_xcursor
#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_orig_xcursor
#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_orig_xcursor
#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_orig_xcursor
#define XcursorImageHash XcursorImageHash_dylibloader_orig_xcursor
#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_orig_xcursor
#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_orig_xcursor
#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_orig_xcursor
#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_orig_xcursor
#define XcursorSetTheme XcursorSetTheme_dylibloader_orig_xcursor
#define XcursorGetTheme XcursorGetTheme_dylibloader_orig_xcursor
#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_orig_xcursor
#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_orig_xcursor
#include <X11/Xcursor/Xcursor.h>
#undef XcursorImageCreate
#undef XcursorImageDestroy
#undef XcursorImagesCreate
#undef XcursorImagesDestroy
#undef XcursorImagesSetName
#undef XcursorCursorsCreate
#undef XcursorCursorsDestroy
#undef XcursorAnimateCreate
#undef XcursorAnimateDestroy
#undef XcursorAnimateNext
#undef XcursorCommentCreate
#undef XcursorCommentDestroy
#undef XcursorCommentsCreate
#undef XcursorCommentsDestroy
#undef XcursorXcFileLoadImage
#undef XcursorXcFileLoadImages
#undef XcursorXcFileLoadAllImages
#undef XcursorXcFileLoad
#undef XcursorXcFileSave
#undef XcursorFileLoadImage
#undef XcursorFileLoadImages
#undef XcursorFileLoadAllImages
#undef XcursorFileLoad
#undef XcursorFileSaveImages
#undef XcursorFileSave
#undef XcursorFilenameLoadImage
#undef XcursorFilenameLoadImages
#undef XcursorFilenameLoadAllImages
#undef XcursorFilenameLoad
#undef XcursorFilenameSaveImages
#undef XcursorFilenameSave
#undef XcursorLibraryLoadImage
#undef XcursorLibraryLoadImages
#undef XcursorLibraryPath
#undef XcursorLibraryShape
#undef XcursorImageLoadCursor
#undef XcursorImagesLoadCursors
#undef XcursorImagesLoadCursor
#undef XcursorFilenameLoadCursor
#undef XcursorFilenameLoadCursors
#undef XcursorLibraryLoadCursor
#undef XcursorLibraryLoadCursors
#undef XcursorShapeLoadImage
#undef XcursorShapeLoadImages
#undef XcursorShapeLoadCursor
#undef XcursorShapeLoadCursors
#undef XcursorTryShapeCursor
#undef XcursorNoticeCreateBitmap
#undef XcursorNoticePutBitmap
#undef XcursorTryShapeBitmapCursor
#undef XcursorImageHash
#undef XcursorSupportsARGB
#undef XcursorSupportsAnim
#undef XcursorSetDefaultSize
#undef XcursorGetDefaultSize
#undef XcursorSetTheme
#undef XcursorGetTheme
#undef XcursorGetThemeCore
#undef XcursorSetThemeCore
#include <dlfcn.h>
#include <stdio.h>
XcursorImage* (*XcursorImageCreate_dylibloader_wrapper_xcursor)( int, int);
void (*XcursorImageDestroy_dylibloader_wrapper_xcursor)( XcursorImage*);
XcursorImages* (*XcursorImagesCreate_dylibloader_wrapper_xcursor)( int);
void (*XcursorImagesDestroy_dylibloader_wrapper_xcursor)( XcursorImages*);
void (*XcursorImagesSetName_dylibloader_wrapper_xcursor)( XcursorImages*,const char*);
XcursorCursors* (*XcursorCursorsCreate_dylibloader_wrapper_xcursor)( Display*, int);
void (*XcursorCursorsDestroy_dylibloader_wrapper_xcursor)( XcursorCursors*);
XcursorAnimate* (*XcursorAnimateCreate_dylibloader_wrapper_xcursor)( XcursorCursors*);
void (*XcursorAnimateDestroy_dylibloader_wrapper_xcursor)( XcursorAnimate*);
Cursor (*XcursorAnimateNext_dylibloader_wrapper_xcursor)( XcursorAnimate*);
XcursorComment* (*XcursorCommentCreate_dylibloader_wrapper_xcursor)( XcursorUInt, int);
void (*XcursorCommentDestroy_dylibloader_wrapper_xcursor)( XcursorComment*);
XcursorComments* (*XcursorCommentsCreate_dylibloader_wrapper_xcursor)( int);
void (*XcursorCommentsDestroy_dylibloader_wrapper_xcursor)( XcursorComments*);
XcursorImage* (*XcursorXcFileLoadImage_dylibloader_wrapper_xcursor)( XcursorFile*, int);
XcursorImages* (*XcursorXcFileLoadImages_dylibloader_wrapper_xcursor)( XcursorFile*, int);
XcursorImages* (*XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor)( XcursorFile*);
XcursorBool (*XcursorXcFileLoad_dylibloader_wrapper_xcursor)( XcursorFile*, XcursorComments**, XcursorImages**);
XcursorBool (*XcursorXcFileSave_dylibloader_wrapper_xcursor)( XcursorFile*,const XcursorComments*,const XcursorImages*);
XcursorImage* (*XcursorFileLoadImage_dylibloader_wrapper_xcursor)( FILE*, int);
XcursorImages* (*XcursorFileLoadImages_dylibloader_wrapper_xcursor)( FILE*, int);
XcursorImages* (*XcursorFileLoadAllImages_dylibloader_wrapper_xcursor)( FILE*);
XcursorBool (*XcursorFileLoad_dylibloader_wrapper_xcursor)( FILE*, XcursorComments**, XcursorImages**);
XcursorBool (*XcursorFileSaveImages_dylibloader_wrapper_xcursor)( FILE*,const XcursorImages*);
XcursorBool (*XcursorFileSave_dylibloader_wrapper_xcursor)( FILE*,const XcursorComments*,const XcursorImages*);
XcursorImage* (*XcursorFilenameLoadImage_dylibloader_wrapper_xcursor)(const char*, int);
XcursorImages* (*XcursorFilenameLoadImages_dylibloader_wrapper_xcursor)(const char*, int);
XcursorImages* (*XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor)(const char*);
XcursorBool (*XcursorFilenameLoad_dylibloader_wrapper_xcursor)(const char*, XcursorComments**, XcursorImages**);
XcursorBool (*XcursorFilenameSaveImages_dylibloader_wrapper_xcursor)(const char*,const XcursorImages*);
XcursorBool (*XcursorFilenameSave_dylibloader_wrapper_xcursor)(const char*,const XcursorComments*,const XcursorImages*);
XcursorImage* (*XcursorLibraryLoadImage_dylibloader_wrapper_xcursor)(const char*,const char*, int);
XcursorImages* (*XcursorLibraryLoadImages_dylibloader_wrapper_xcursor)(const char*,const char*, int);
const char* (*XcursorLibraryPath_dylibloader_wrapper_xcursor)( void);
int (*XcursorLibraryShape_dylibloader_wrapper_xcursor)(const char*);
Cursor (*XcursorImageLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImage*);
XcursorCursors* (*XcursorImagesLoadCursors_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
Cursor (*XcursorImagesLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
Cursor (*XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
XcursorCursors* (*XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
Cursor (*XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
XcursorCursors* (*XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
XcursorImage* (*XcursorShapeLoadImage_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
XcursorImages* (*XcursorShapeLoadImages_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
Cursor (*XcursorShapeLoadCursor_dylibloader_wrapper_xcursor)( Display*, unsigned int);
XcursorCursors* (*XcursorShapeLoadCursors_dylibloader_wrapper_xcursor)( Display*, unsigned int);
Cursor (*XcursorTryShapeCursor_dylibloader_wrapper_xcursor)( Display*, Font, Font, unsigned int, unsigned int,const XColor*,const XColor*);
void (*XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor)( Display*, Pixmap, unsigned int, unsigned int);
void (*XcursorNoticePutBitmap_dylibloader_wrapper_xcursor)( Display*, Drawable, XImage*);
Cursor (*XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor)( Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
void (*XcursorImageHash_dylibloader_wrapper_xcursor)( XImage*, unsigned char [16]);
XcursorBool (*XcursorSupportsARGB_dylibloader_wrapper_xcursor)( Display*);
XcursorBool (*XcursorSupportsAnim_dylibloader_wrapper_xcursor)( Display*);
XcursorBool (*XcursorSetDefaultSize_dylibloader_wrapper_xcursor)( Display*, int);
int (*XcursorGetDefaultSize_dylibloader_wrapper_xcursor)( Display*);
XcursorBool (*XcursorSetTheme_dylibloader_wrapper_xcursor)( Display*,const char*);
char* (*XcursorGetTheme_dylibloader_wrapper_xcursor)( Display*);
XcursorBool (*XcursorGetThemeCore_dylibloader_wrapper_xcursor)( Display*);
XcursorBool (*XcursorSetThemeCore_dylibloader_wrapper_xcursor)( Display*, XcursorBool);
int initialize_xcursor(int verbose) {
void *handle;
char *error;
handle = dlopen("libXcursor.so.1", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XcursorImageCreate
*(void **) (&XcursorImageCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageCreate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorImageDestroy
*(void **) (&XcursorImageDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageDestroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorImagesCreate
*(void **) (&XcursorImagesCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesCreate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorImagesDestroy
*(void **) (&XcursorImagesDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesDestroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorImagesSetName
*(void **) (&XcursorImagesSetName_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesSetName");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorCursorsCreate
*(void **) (&XcursorCursorsCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCursorsCreate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorCursorsDestroy
*(void **) (&XcursorCursorsDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCursorsDestroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorAnimateCreate
*(void **) (&XcursorAnimateCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateCreate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorAnimateDestroy
*(void **) (&XcursorAnimateDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateDestroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorAnimateNext
*(void **) (&XcursorAnimateNext_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateNext");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorCommentCreate
*(void **) (&XcursorCommentCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentCreate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorCommentDestroy
*(void **) (&XcursorCommentDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentDestroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorCommentsCreate
*(void **) (&XcursorCommentsCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentsCreate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorCommentsDestroy
*(void **) (&XcursorCommentsDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentsDestroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorXcFileLoadImage
*(void **) (&XcursorXcFileLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadImage");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorXcFileLoadImages
*(void **) (&XcursorXcFileLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorXcFileLoadAllImages
*(void **) (&XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadAllImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorXcFileLoad
*(void **) (&XcursorXcFileLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoad");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorXcFileSave
*(void **) (&XcursorXcFileSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileSave");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFileLoadImage
*(void **) (&XcursorFileLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadImage");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFileLoadImages
*(void **) (&XcursorFileLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFileLoadAllImages
*(void **) (&XcursorFileLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadAllImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFileLoad
*(void **) (&XcursorFileLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoad");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFileSaveImages
*(void **) (&XcursorFileSaveImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileSaveImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFileSave
*(void **) (&XcursorFileSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileSave");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFilenameLoadImage
*(void **) (&XcursorFilenameLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadImage");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFilenameLoadImages
*(void **) (&XcursorFilenameLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFilenameLoadAllImages
*(void **) (&XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadAllImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFilenameLoad
*(void **) (&XcursorFilenameLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoad");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFilenameSaveImages
*(void **) (&XcursorFilenameSaveImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameSaveImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFilenameSave
*(void **) (&XcursorFilenameSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameSave");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorLibraryLoadImage
*(void **) (&XcursorLibraryLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadImage");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorLibraryLoadImages
*(void **) (&XcursorLibraryLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorLibraryPath
*(void **) (&XcursorLibraryPath_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryPath");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorLibraryShape
*(void **) (&XcursorLibraryShape_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryShape");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorImageLoadCursor
*(void **) (&XcursorImageLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageLoadCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorImagesLoadCursors
*(void **) (&XcursorImagesLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesLoadCursors");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorImagesLoadCursor
*(void **) (&XcursorImagesLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesLoadCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFilenameLoadCursor
*(void **) (&XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorFilenameLoadCursors
*(void **) (&XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadCursors");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorLibraryLoadCursor
*(void **) (&XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorLibraryLoadCursors
*(void **) (&XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadCursors");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorShapeLoadImage
*(void **) (&XcursorShapeLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadImage");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorShapeLoadImages
*(void **) (&XcursorShapeLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadImages");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorShapeLoadCursor
*(void **) (&XcursorShapeLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorShapeLoadCursors
*(void **) (&XcursorShapeLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadCursors");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorTryShapeCursor
*(void **) (&XcursorTryShapeCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorTryShapeCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorNoticeCreateBitmap
*(void **) (&XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorNoticeCreateBitmap");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorNoticePutBitmap
*(void **) (&XcursorNoticePutBitmap_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorNoticePutBitmap");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorTryShapeBitmapCursor
*(void **) (&XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorTryShapeBitmapCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorImageHash
*(void **) (&XcursorImageHash_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageHash");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorSupportsARGB
*(void **) (&XcursorSupportsARGB_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSupportsARGB");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorSupportsAnim
*(void **) (&XcursorSupportsAnim_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSupportsAnim");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorSetDefaultSize
*(void **) (&XcursorSetDefaultSize_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetDefaultSize");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorGetDefaultSize
*(void **) (&XcursorGetDefaultSize_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetDefaultSize");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorSetTheme
*(void **) (&XcursorSetTheme_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetTheme");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorGetTheme
*(void **) (&XcursorGetTheme_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetTheme");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorGetThemeCore
*(void **) (&XcursorGetThemeCore_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetThemeCore");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XcursorSetThemeCore
*(void **) (&XcursorSetThemeCore_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetThemeCore");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@ -0,0 +1,258 @@
#ifndef DYLIBLOAD_WRAPPER_XCURSOR
#define DYLIBLOAD_WRAPPER_XCURSOR
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:48:06
// flags: ./generate-wrapper.py --include /usr/include/X11/Xcursor/Xcursor.h --sys-include <X11/Xcursor/Xcursor.h> --soname libXcursor.so.1 --init-name xcursor --output-header xcursor-so_wrap.h --output-implementation xcursor-so_wrap.c
//
// NOTE: Generated from Xcursor 1.2.0.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, but absent in libXcursor.so.1, were removed.
#include <stdint.h>
#define XcursorImageCreate XcursorImageCreate_dylibloader_orig_xcursor
#define XcursorImageDestroy XcursorImageDestroy_dylibloader_orig_xcursor
#define XcursorImagesCreate XcursorImagesCreate_dylibloader_orig_xcursor
#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_orig_xcursor
#define XcursorImagesSetName XcursorImagesSetName_dylibloader_orig_xcursor
#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_orig_xcursor
#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_orig_xcursor
#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_orig_xcursor
#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_orig_xcursor
#define XcursorAnimateNext XcursorAnimateNext_dylibloader_orig_xcursor
#define XcursorCommentCreate XcursorCommentCreate_dylibloader_orig_xcursor
#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_orig_xcursor
#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_orig_xcursor
#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_orig_xcursor
#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_orig_xcursor
#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_orig_xcursor
#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_orig_xcursor
#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_orig_xcursor
#define XcursorXcFileSave XcursorXcFileSave_dylibloader_orig_xcursor
#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_orig_xcursor
#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_orig_xcursor
#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_orig_xcursor
#define XcursorFileLoad XcursorFileLoad_dylibloader_orig_xcursor
#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_orig_xcursor
#define XcursorFileSave XcursorFileSave_dylibloader_orig_xcursor
#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_orig_xcursor
#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_orig_xcursor
#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_orig_xcursor
#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_orig_xcursor
#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_orig_xcursor
#define XcursorFilenameSave XcursorFilenameSave_dylibloader_orig_xcursor
#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_orig_xcursor
#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_orig_xcursor
#define XcursorLibraryPath XcursorLibraryPath_dylibloader_orig_xcursor
#define XcursorLibraryShape XcursorLibraryShape_dylibloader_orig_xcursor
#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_orig_xcursor
#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_orig_xcursor
#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_orig_xcursor
#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_orig_xcursor
#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_orig_xcursor
#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_orig_xcursor
#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_orig_xcursor
#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_orig_xcursor
#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_orig_xcursor
#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_orig_xcursor
#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_orig_xcursor
#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_orig_xcursor
#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_orig_xcursor
#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_orig_xcursor
#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_orig_xcursor
#define XcursorImageHash XcursorImageHash_dylibloader_orig_xcursor
#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_orig_xcursor
#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_orig_xcursor
#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_orig_xcursor
#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_orig_xcursor
#define XcursorSetTheme XcursorSetTheme_dylibloader_orig_xcursor
#define XcursorGetTheme XcursorGetTheme_dylibloader_orig_xcursor
#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_orig_xcursor
#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_orig_xcursor
#include <X11/Xcursor/Xcursor.h>
#undef XcursorImageCreate
#undef XcursorImageDestroy
#undef XcursorImagesCreate
#undef XcursorImagesDestroy
#undef XcursorImagesSetName
#undef XcursorCursorsCreate
#undef XcursorCursorsDestroy
#undef XcursorAnimateCreate
#undef XcursorAnimateDestroy
#undef XcursorAnimateNext
#undef XcursorCommentCreate
#undef XcursorCommentDestroy
#undef XcursorCommentsCreate
#undef XcursorCommentsDestroy
#undef XcursorXcFileLoadImage
#undef XcursorXcFileLoadImages
#undef XcursorXcFileLoadAllImages
#undef XcursorXcFileLoad
#undef XcursorXcFileSave
#undef XcursorFileLoadImage
#undef XcursorFileLoadImages
#undef XcursorFileLoadAllImages
#undef XcursorFileLoad
#undef XcursorFileSaveImages
#undef XcursorFileSave
#undef XcursorFilenameLoadImage
#undef XcursorFilenameLoadImages
#undef XcursorFilenameLoadAllImages
#undef XcursorFilenameLoad
#undef XcursorFilenameSaveImages
#undef XcursorFilenameSave
#undef XcursorLibraryLoadImage
#undef XcursorLibraryLoadImages
#undef XcursorLibraryPath
#undef XcursorLibraryShape
#undef XcursorImageLoadCursor
#undef XcursorImagesLoadCursors
#undef XcursorImagesLoadCursor
#undef XcursorFilenameLoadCursor
#undef XcursorFilenameLoadCursors
#undef XcursorLibraryLoadCursor
#undef XcursorLibraryLoadCursors
#undef XcursorShapeLoadImage
#undef XcursorShapeLoadImages
#undef XcursorShapeLoadCursor
#undef XcursorShapeLoadCursors
#undef XcursorTryShapeCursor
#undef XcursorNoticeCreateBitmap
#undef XcursorNoticePutBitmap
#undef XcursorTryShapeBitmapCursor
#undef XcursorImageHash
#undef XcursorSupportsARGB
#undef XcursorSupportsAnim
#undef XcursorSetDefaultSize
#undef XcursorGetDefaultSize
#undef XcursorSetTheme
#undef XcursorGetTheme
#undef XcursorGetThemeCore
#undef XcursorSetThemeCore
#ifdef __cplusplus
extern "C" {
#endif
#define XcursorImageCreate XcursorImageCreate_dylibloader_wrapper_xcursor
#define XcursorImageDestroy XcursorImageDestroy_dylibloader_wrapper_xcursor
#define XcursorImagesCreate XcursorImagesCreate_dylibloader_wrapper_xcursor
#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_wrapper_xcursor
#define XcursorImagesSetName XcursorImagesSetName_dylibloader_wrapper_xcursor
#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_wrapper_xcursor
#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_wrapper_xcursor
#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_wrapper_xcursor
#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_wrapper_xcursor
#define XcursorAnimateNext XcursorAnimateNext_dylibloader_wrapper_xcursor
#define XcursorCommentCreate XcursorCommentCreate_dylibloader_wrapper_xcursor
#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_wrapper_xcursor
#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_wrapper_xcursor
#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_wrapper_xcursor
#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_wrapper_xcursor
#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_wrapper_xcursor
#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor
#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_wrapper_xcursor
#define XcursorXcFileSave XcursorXcFileSave_dylibloader_wrapper_xcursor
#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_wrapper_xcursor
#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_wrapper_xcursor
#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_wrapper_xcursor
#define XcursorFileLoad XcursorFileLoad_dylibloader_wrapper_xcursor
#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_wrapper_xcursor
#define XcursorFileSave XcursorFileSave_dylibloader_wrapper_xcursor
#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_wrapper_xcursor
#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_wrapper_xcursor
#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor
#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_wrapper_xcursor
#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_wrapper_xcursor
#define XcursorFilenameSave XcursorFilenameSave_dylibloader_wrapper_xcursor
#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_wrapper_xcursor
#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_wrapper_xcursor
#define XcursorLibraryPath XcursorLibraryPath_dylibloader_wrapper_xcursor
#define XcursorLibraryShape XcursorLibraryShape_dylibloader_wrapper_xcursor
#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_wrapper_xcursor
#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_wrapper_xcursor
#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_wrapper_xcursor
#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor
#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor
#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor
#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor
#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_wrapper_xcursor
#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_wrapper_xcursor
#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_wrapper_xcursor
#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_wrapper_xcursor
#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_wrapper_xcursor
#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor
#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_wrapper_xcursor
#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor
#define XcursorImageHash XcursorImageHash_dylibloader_wrapper_xcursor
#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_wrapper_xcursor
#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_wrapper_xcursor
#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_wrapper_xcursor
#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_wrapper_xcursor
#define XcursorSetTheme XcursorSetTheme_dylibloader_wrapper_xcursor
#define XcursorGetTheme XcursorGetTheme_dylibloader_wrapper_xcursor
#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_wrapper_xcursor
#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_wrapper_xcursor
extern XcursorImage* (*XcursorImageCreate_dylibloader_wrapper_xcursor)( int, int);
extern void (*XcursorImageDestroy_dylibloader_wrapper_xcursor)( XcursorImage*);
extern XcursorImages* (*XcursorImagesCreate_dylibloader_wrapper_xcursor)( int);
extern void (*XcursorImagesDestroy_dylibloader_wrapper_xcursor)( XcursorImages*);
extern void (*XcursorImagesSetName_dylibloader_wrapper_xcursor)( XcursorImages*,const char*);
extern XcursorCursors* (*XcursorCursorsCreate_dylibloader_wrapper_xcursor)( Display*, int);
extern void (*XcursorCursorsDestroy_dylibloader_wrapper_xcursor)( XcursorCursors*);
extern XcursorAnimate* (*XcursorAnimateCreate_dylibloader_wrapper_xcursor)( XcursorCursors*);
extern void (*XcursorAnimateDestroy_dylibloader_wrapper_xcursor)( XcursorAnimate*);
extern Cursor (*XcursorAnimateNext_dylibloader_wrapper_xcursor)( XcursorAnimate*);
extern XcursorComment* (*XcursorCommentCreate_dylibloader_wrapper_xcursor)( XcursorUInt, int);
extern void (*XcursorCommentDestroy_dylibloader_wrapper_xcursor)( XcursorComment*);
extern XcursorComments* (*XcursorCommentsCreate_dylibloader_wrapper_xcursor)( int);
extern void (*XcursorCommentsDestroy_dylibloader_wrapper_xcursor)( XcursorComments*);
extern XcursorImage* (*XcursorXcFileLoadImage_dylibloader_wrapper_xcursor)( XcursorFile*, int);
extern XcursorImages* (*XcursorXcFileLoadImages_dylibloader_wrapper_xcursor)( XcursorFile*, int);
extern XcursorImages* (*XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor)( XcursorFile*);
extern XcursorBool (*XcursorXcFileLoad_dylibloader_wrapper_xcursor)( XcursorFile*, XcursorComments**, XcursorImages**);
extern XcursorBool (*XcursorXcFileSave_dylibloader_wrapper_xcursor)( XcursorFile*,const XcursorComments*,const XcursorImages*);
extern XcursorImage* (*XcursorFileLoadImage_dylibloader_wrapper_xcursor)( FILE*, int);
extern XcursorImages* (*XcursorFileLoadImages_dylibloader_wrapper_xcursor)( FILE*, int);
extern XcursorImages* (*XcursorFileLoadAllImages_dylibloader_wrapper_xcursor)( FILE*);
extern XcursorBool (*XcursorFileLoad_dylibloader_wrapper_xcursor)( FILE*, XcursorComments**, XcursorImages**);
extern XcursorBool (*XcursorFileSaveImages_dylibloader_wrapper_xcursor)( FILE*,const XcursorImages*);
extern XcursorBool (*XcursorFileSave_dylibloader_wrapper_xcursor)( FILE*,const XcursorComments*,const XcursorImages*);
extern XcursorImage* (*XcursorFilenameLoadImage_dylibloader_wrapper_xcursor)(const char*, int);
extern XcursorImages* (*XcursorFilenameLoadImages_dylibloader_wrapper_xcursor)(const char*, int);
extern XcursorImages* (*XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor)(const char*);
extern XcursorBool (*XcursorFilenameLoad_dylibloader_wrapper_xcursor)(const char*, XcursorComments**, XcursorImages**);
extern XcursorBool (*XcursorFilenameSaveImages_dylibloader_wrapper_xcursor)(const char*,const XcursorImages*);
extern XcursorBool (*XcursorFilenameSave_dylibloader_wrapper_xcursor)(const char*,const XcursorComments*,const XcursorImages*);
extern XcursorImage* (*XcursorLibraryLoadImage_dylibloader_wrapper_xcursor)(const char*,const char*, int);
extern XcursorImages* (*XcursorLibraryLoadImages_dylibloader_wrapper_xcursor)(const char*,const char*, int);
extern const char* (*XcursorLibraryPath_dylibloader_wrapper_xcursor)( void);
extern int (*XcursorLibraryShape_dylibloader_wrapper_xcursor)(const char*);
extern Cursor (*XcursorImageLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImage*);
extern XcursorCursors* (*XcursorImagesLoadCursors_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
extern Cursor (*XcursorImagesLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
extern Cursor (*XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
extern XcursorCursors* (*XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
extern Cursor (*XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
extern XcursorCursors* (*XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
extern XcursorImage* (*XcursorShapeLoadImage_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
extern XcursorImages* (*XcursorShapeLoadImages_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
extern Cursor (*XcursorShapeLoadCursor_dylibloader_wrapper_xcursor)( Display*, unsigned int);
extern XcursorCursors* (*XcursorShapeLoadCursors_dylibloader_wrapper_xcursor)( Display*, unsigned int);
extern Cursor (*XcursorTryShapeCursor_dylibloader_wrapper_xcursor)( Display*, Font, Font, unsigned int, unsigned int,const XColor*,const XColor*);
extern void (*XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor)( Display*, Pixmap, unsigned int, unsigned int);
extern void (*XcursorNoticePutBitmap_dylibloader_wrapper_xcursor)( Display*, Drawable, XImage*);
extern Cursor (*XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor)( Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
extern void (*XcursorImageHash_dylibloader_wrapper_xcursor)( XImage*, unsigned char [16]);
extern XcursorBool (*XcursorSupportsARGB_dylibloader_wrapper_xcursor)( Display*);
extern XcursorBool (*XcursorSupportsAnim_dylibloader_wrapper_xcursor)( Display*);
extern XcursorBool (*XcursorSetDefaultSize_dylibloader_wrapper_xcursor)( Display*, int);
extern int (*XcursorGetDefaultSize_dylibloader_wrapper_xcursor)( Display*);
extern XcursorBool (*XcursorSetTheme_dylibloader_wrapper_xcursor)( Display*,const char*);
extern char* (*XcursorGetTheme_dylibloader_wrapper_xcursor)( Display*);
extern XcursorBool (*XcursorGetThemeCore_dylibloader_wrapper_xcursor)( Display*);
extern XcursorBool (*XcursorSetThemeCore_dylibloader_wrapper_xcursor)( Display*, XcursorBool);
int initialize_xcursor(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,154 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:51:55
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xext.h --sys-include <X11/extensions/Xext.h> --include /usr/include/X11/extensions/shape.h --sys-include <X11/extensions/shape.h> --soname libXext.so.6 --init-name xext --output-header xext-so_wrap.h --output-implementation xext-so_wrap.c
//
// NOTE: Generated from Xext 1.3.5.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, but absent in libXext.so.6, were removed and an include needed for
// proper parsing was added (this had also to be temporarily added to the
// original header, as dynload-wrapper would complain otherwsise)
#include <stdint.h>
// HANDPATCH: Needed for a successful compilation.
#include <X11/Xlib.h>
#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
#include <X11/extensions/Xext.h>
#include <X11/extensions/shape.h>
#undef XShapeQueryExtension
#undef XShapeQueryVersion
#undef XShapeCombineRegion
#undef XShapeCombineRectangles
#undef XShapeCombineMask
#undef XShapeCombineShape
#undef XShapeOffsetShape
#undef XShapeQueryExtents
#undef XShapeSelectInput
#undef XShapeInputSelected
#undef XShapeGetRectangles
#include <dlfcn.h>
#include <stdio.h>
int (*XShapeQueryExtension_dylibloader_wrapper_xext)( Display*, int*, int*);
int (*XShapeQueryVersion_dylibloader_wrapper_xext)( Display*, int*, int*);
void (*XShapeCombineRegion_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Region, int);
void (*XShapeCombineRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int, int, XRectangle*, int, int, int);
void (*XShapeCombineMask_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Pixmap, int);
void (*XShapeCombineShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Window, int, int);
void (*XShapeOffsetShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int);
int (*XShapeQueryExtents_dylibloader_wrapper_xext)( Display*, Window, int*, int*, int*, unsigned int*, unsigned int*, int*, int*, int*, unsigned int*, unsigned int*);
void (*XShapeSelectInput_dylibloader_wrapper_xext)( Display*, Window, unsigned long);
unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)( Display*, Window);
XRectangle* (*XShapeGetRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int*, int*);
int initialize_xext(int verbose) {
void *handle;
char *error;
handle = dlopen("libXext.so.6", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XShapeQueryExtension
*(void **) (&XShapeQueryExtension_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtension");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeQueryVersion
*(void **) (&XShapeQueryVersion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryVersion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeCombineRegion
*(void **) (&XShapeCombineRegion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRegion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeCombineRectangles
*(void **) (&XShapeCombineRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRectangles");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeCombineMask
*(void **) (&XShapeCombineMask_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineMask");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeCombineShape
*(void **) (&XShapeCombineShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineShape");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeOffsetShape
*(void **) (&XShapeOffsetShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeOffsetShape");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeQueryExtents
*(void **) (&XShapeQueryExtents_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeSelectInput
*(void **) (&XShapeSelectInput_dylibloader_wrapper_xext) = dlsym(handle, "XShapeSelectInput");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeInputSelected
*(void **) (&XShapeInputSelected_dylibloader_wrapper_xext) = dlsym(handle, "XShapeInputSelected");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeGetRectangles
*(void **) (&XShapeGetRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeGetRectangles");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@ -0,0 +1,72 @@
#ifndef DYLIBLOAD_WRAPPER_XEXT
#define DYLIBLOAD_WRAPPER_XEXT
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:51:55
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xext.h --sys-include <X11/extensions/Xext.h> --include /usr/include/X11/extensions/shape.h --sys-include <X11/extensions/shape.h> --soname libXext.so.6 --init-name xext --output-header xext-so_wrap.h --output-implementation xext-so_wrap.c
//
// NOTE: Generated from Xext 1.3.5.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, but absent in libXext.so.6, were removed and an include needed for
// proper parsing was added (this had also to be temporarily added to the
// original header, as dynload-wrapper would complain otherwsise)
#include <stdint.h>
// HANDPATCH: Needed for a successful compilation.
#include <X11/Xlib.h>
#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
#include <X11/extensions/Xext.h>
#include <X11/extensions/shape.h>
#undef XShapeQueryExtension
#undef XShapeQueryVersion
#undef XShapeCombineRegion
#undef XShapeCombineRectangles
#undef XShapeCombineMask
#undef XShapeCombineShape
#undef XShapeOffsetShape
#undef XShapeQueryExtents
#undef XShapeSelectInput
#undef XShapeInputSelected
#undef XShapeGetRectangles
#ifdef __cplusplus
extern "C" {
#endif
#define XShapeQueryExtension XShapeQueryExtension_dylibloader_wrapper_xext
#define XShapeQueryVersion XShapeQueryVersion_dylibloader_wrapper_xext
#define XShapeCombineRegion XShapeCombineRegion_dylibloader_wrapper_xext
#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_wrapper_xext
#define XShapeCombineMask XShapeCombineMask_dylibloader_wrapper_xext
#define XShapeCombineShape XShapeCombineShape_dylibloader_wrapper_xext
#define XShapeOffsetShape XShapeOffsetShape_dylibloader_wrapper_xext
#define XShapeQueryExtents XShapeQueryExtents_dylibloader_wrapper_xext
#define XShapeSelectInput XShapeSelectInput_dylibloader_wrapper_xext
#define XShapeInputSelected XShapeInputSelected_dylibloader_wrapper_xext
#define XShapeGetRectangles XShapeGetRectangles_dylibloader_wrapper_xext
extern int (*XShapeQueryExtension_dylibloader_wrapper_xext)( Display*, int*, int*);
extern int (*XShapeQueryVersion_dylibloader_wrapper_xext)( Display*, int*, int*);
extern void (*XShapeCombineRegion_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Region, int);
extern void (*XShapeCombineRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int, int, XRectangle*, int, int, int);
extern void (*XShapeCombineMask_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Pixmap, int);
extern void (*XShapeCombineShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Window, int, int);
extern void (*XShapeOffsetShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int);
extern int (*XShapeQueryExtents_dylibloader_wrapper_xext)( Display*, Window, int*, int*, int*, unsigned int*, unsigned int*, int*, int*, int*, unsigned int*, unsigned int*);
extern void (*XShapeSelectInput_dylibloader_wrapper_xext)( Display*, Window, unsigned long);
extern unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)( Display*, Window);
extern XRectangle* (*XShapeGetRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int*, int*);
int initialize_xext(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,71 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:53:11
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xinerama.h --sys-include <X11/extensions/Xinerama.h> --soname libXinerama.so.1 --init-name xinerama --output-header xinerama-so_wrap.h --output-implementation xinerama-so_wrap.c
//
// NOTE: Generated from Xinerama 1.1.4.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, but absent in libXinerama.so.1, were removed.
#include <stdint.h>
#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
#include <X11/extensions/Xinerama.h>
#undef XineramaQueryExtension
#undef XineramaQueryVersion
#undef XineramaIsActive
#undef XineramaQueryScreens
#include <dlfcn.h>
#include <stdio.h>
int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)( Display*, int*, int*);
int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)( Display*, int*, int*);
int (*XineramaIsActive_dylibloader_wrapper_xinerama)( Display*);
XineramaScreenInfo* (*XineramaQueryScreens_dylibloader_wrapper_xinerama)( Display*, int*);
int initialize_xinerama(int verbose) {
void *handle;
char *error;
handle = dlopen("libXinerama.so.1", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XineramaQueryExtension
*(void **) (&XineramaQueryExtension_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryExtension");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XineramaQueryVersion
*(void **) (&XineramaQueryVersion_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryVersion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XineramaIsActive
*(void **) (&XineramaIsActive_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaIsActive");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XineramaQueryScreens
*(void **) (&XineramaQueryScreens_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryScreens");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@ -0,0 +1,38 @@
#ifndef DYLIBLOAD_WRAPPER_XINERAMA
#define DYLIBLOAD_WRAPPER_XINERAMA
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:53:11
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xinerama.h --sys-include <X11/extensions/Xinerama.h> --soname libXinerama.so.1 --init-name xinerama --output-header xinerama-so_wrap.h --output-implementation xinerama-so_wrap.c
//
// NOTE: Generated from Xinerama 1.1.4.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, but absent in libXinerama.so.1, were removed.
#include <stdint.h>
#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
#include <X11/extensions/Xinerama.h>
#undef XineramaQueryExtension
#undef XineramaQueryVersion
#undef XineramaIsActive
#undef XineramaQueryScreens
#ifdef __cplusplus
extern "C" {
#endif
#define XineramaQueryExtension XineramaQueryExtension_dylibloader_wrapper_xinerama
#define XineramaQueryVersion XineramaQueryVersion_dylibloader_wrapper_xinerama
#define XineramaIsActive XineramaIsActive_dylibloader_wrapper_xinerama
#define XineramaQueryScreens XineramaQueryScreens_dylibloader_wrapper_xinerama
extern int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)( Display*, int*, int*);
extern int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)( Display*, int*, int*);
extern int (*XineramaIsActive_dylibloader_wrapper_xinerama)( Display*);
extern XineramaScreenInfo* (*XineramaQueryScreens_dylibloader_wrapper_xinerama)( Display*, int*);
int initialize_xinerama(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,401 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:54:10
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/XInput2.h --sys-include <X11/extensions/XInput2.h> --soname libXi.so.6 --init-name xinput2 --output-header xinput2-so_wrap.h --output-implementation xinput2-so_wrap.c
//
// NOTE: Generated from Xi 1.7.10.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, liXext and libXfixes, but absent in libXi.so.6, were removed.
#include <stdint.h>
#define XIQueryPointer XIQueryPointer_dylibloader_orig_xinput2
#define XIWarpPointer XIWarpPointer_dylibloader_orig_xinput2
#define XIDefineCursor XIDefineCursor_dylibloader_orig_xinput2
#define XIUndefineCursor XIUndefineCursor_dylibloader_orig_xinput2
#define XIChangeHierarchy XIChangeHierarchy_dylibloader_orig_xinput2
#define XISetClientPointer XISetClientPointer_dylibloader_orig_xinput2
#define XIGetClientPointer XIGetClientPointer_dylibloader_orig_xinput2
#define XISelectEvents XISelectEvents_dylibloader_orig_xinput2
#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_orig_xinput2
#define XIQueryVersion XIQueryVersion_dylibloader_orig_xinput2
#define XIQueryDevice XIQueryDevice_dylibloader_orig_xinput2
#define XISetFocus XISetFocus_dylibloader_orig_xinput2
#define XIGetFocus XIGetFocus_dylibloader_orig_xinput2
#define XIGrabDevice XIGrabDevice_dylibloader_orig_xinput2
#define XIUngrabDevice XIUngrabDevice_dylibloader_orig_xinput2
#define XIAllowEvents XIAllowEvents_dylibloader_orig_xinput2
#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_orig_xinput2
#define XIGrabButton XIGrabButton_dylibloader_orig_xinput2
#define XIGrabKeycode XIGrabKeycode_dylibloader_orig_xinput2
#define XIGrabEnter XIGrabEnter_dylibloader_orig_xinput2
#define XIGrabFocusIn XIGrabFocusIn_dylibloader_orig_xinput2
#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_orig_xinput2
#define XIUngrabButton XIUngrabButton_dylibloader_orig_xinput2
#define XIUngrabKeycode XIUngrabKeycode_dylibloader_orig_xinput2
#define XIUngrabEnter XIUngrabEnter_dylibloader_orig_xinput2
#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_orig_xinput2
#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_orig_xinput2
#define XIListProperties XIListProperties_dylibloader_orig_xinput2
#define XIChangeProperty XIChangeProperty_dylibloader_orig_xinput2
#define XIDeleteProperty XIDeleteProperty_dylibloader_orig_xinput2
#define XIGetProperty XIGetProperty_dylibloader_orig_xinput2
#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_orig_xinput2
#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_orig_xinput2
#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_orig_xinput2
#include <X11/extensions/XInput2.h>
#undef XIQueryPointer
#undef XIWarpPointer
#undef XIDefineCursor
#undef XIUndefineCursor
#undef XIChangeHierarchy
#undef XISetClientPointer
#undef XIGetClientPointer
#undef XISelectEvents
#undef XIGetSelectedEvents
#undef XIQueryVersion
#undef XIQueryDevice
#undef XISetFocus
#undef XIGetFocus
#undef XIGrabDevice
#undef XIUngrabDevice
#undef XIAllowEvents
#undef XIAllowTouchEvents
#undef XIGrabButton
#undef XIGrabKeycode
#undef XIGrabEnter
#undef XIGrabFocusIn
#undef XIGrabTouchBegin
#undef XIUngrabButton
#undef XIUngrabKeycode
#undef XIUngrabEnter
#undef XIUngrabFocusIn
#undef XIUngrabTouchBegin
#undef XIListProperties
#undef XIChangeProperty
#undef XIDeleteProperty
#undef XIGetProperty
#undef XIBarrierReleasePointers
#undef XIBarrierReleasePointer
#undef XIFreeDeviceInfo
#include <dlfcn.h>
#include <stdio.h>
int (*XIQueryPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window*, Window*, double*, double*, double*, double*, XIButtonState*, XIModifierState*, XIGroupState*);
int (*XIWarpPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window, double, double, unsigned int, unsigned int, double, double);
int (*XIDefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor);
int (*XIUndefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window);
int (*XIChangeHierarchy_dylibloader_wrapper_xinput2)( Display*, XIAnyHierarchyChangeInfo*, int);
int (*XISetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int);
int (*XIGetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int*);
int (*XISelectEvents_dylibloader_wrapper_xinput2)( Display*, Window, XIEventMask*, int);
XIEventMask* (*XIGetSelectedEvents_dylibloader_wrapper_xinput2)( Display*, Window, int*);
int (*XIQueryVersion_dylibloader_wrapper_xinput2)( Display*, int*, int*);
XIDeviceInfo* (*XIQueryDevice_dylibloader_wrapper_xinput2)( Display*, int, int*);
int (*XISetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window, Time);
int (*XIGetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window*);
int (*XIGrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Window, Time, Cursor, int, int, int, XIEventMask*);
int (*XIUngrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Time);
int (*XIAllowEvents_dylibloader_wrapper_xinput2)( Display*, int, int, Time);
int (*XIAllowTouchEvents_dylibloader_wrapper_xinput2)( Display*, int, unsigned int, Window, int);
int (*XIGrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
int (*XIGrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
int (*XIGrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
int (*XIGrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
int (*XIGrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIEventMask*, int, XIGrabModifiers*);
int (*XIUngrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
int (*XIUngrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
int (*XIUngrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
int (*XIUngrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
int (*XIUngrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
Atom* (*XIListProperties_dylibloader_wrapper_xinput2)( Display*, int, int*);
void (*XIChangeProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, Atom, int, int, unsigned char*, int);
void (*XIDeleteProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom);
int (*XIGetProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
void (*XIBarrierReleasePointers_dylibloader_wrapper_xinput2)( Display*, XIBarrierReleasePointerInfo*, int);
void (*XIBarrierReleasePointer_dylibloader_wrapper_xinput2)( Display*, int, PointerBarrier, BarrierEventID);
void (*XIFreeDeviceInfo_dylibloader_wrapper_xinput2)( XIDeviceInfo*);
int initialize_xinput2(int verbose) {
void *handle;
char *error;
handle = dlopen("libXi.so.6", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XIQueryPointer
*(void **) (&XIQueryPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryPointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIWarpPointer
*(void **) (&XIWarpPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIWarpPointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIDefineCursor
*(void **) (&XIDefineCursor_dylibloader_wrapper_xinput2) = dlsym(handle, "XIDefineCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUndefineCursor
*(void **) (&XIUndefineCursor_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUndefineCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIChangeHierarchy
*(void **) (&XIChangeHierarchy_dylibloader_wrapper_xinput2) = dlsym(handle, "XIChangeHierarchy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XISetClientPointer
*(void **) (&XISetClientPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XISetClientPointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGetClientPointer
*(void **) (&XIGetClientPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetClientPointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XISelectEvents
*(void **) (&XISelectEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XISelectEvents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGetSelectedEvents
*(void **) (&XIGetSelectedEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetSelectedEvents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIQueryVersion
*(void **) (&XIQueryVersion_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryVersion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIQueryDevice
*(void **) (&XIQueryDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryDevice");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XISetFocus
*(void **) (&XISetFocus_dylibloader_wrapper_xinput2) = dlsym(handle, "XISetFocus");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGetFocus
*(void **) (&XIGetFocus_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetFocus");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabDevice
*(void **) (&XIGrabDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabDevice");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabDevice
*(void **) (&XIUngrabDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabDevice");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIAllowEvents
*(void **) (&XIAllowEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIAllowEvents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIAllowTouchEvents
*(void **) (&XIAllowTouchEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIAllowTouchEvents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabButton
*(void **) (&XIGrabButton_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabButton");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabKeycode
*(void **) (&XIGrabKeycode_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabKeycode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabEnter
*(void **) (&XIGrabEnter_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabEnter");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabFocusIn
*(void **) (&XIGrabFocusIn_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabFocusIn");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabTouchBegin
*(void **) (&XIGrabTouchBegin_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabTouchBegin");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabButton
*(void **) (&XIUngrabButton_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabButton");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabKeycode
*(void **) (&XIUngrabKeycode_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabKeycode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabEnter
*(void **) (&XIUngrabEnter_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabEnter");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabFocusIn
*(void **) (&XIUngrabFocusIn_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabFocusIn");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabTouchBegin
*(void **) (&XIUngrabTouchBegin_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabTouchBegin");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIListProperties
*(void **) (&XIListProperties_dylibloader_wrapper_xinput2) = dlsym(handle, "XIListProperties");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIChangeProperty
*(void **) (&XIChangeProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIChangeProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIDeleteProperty
*(void **) (&XIDeleteProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIDeleteProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGetProperty
*(void **) (&XIGetProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIBarrierReleasePointers
*(void **) (&XIBarrierReleasePointers_dylibloader_wrapper_xinput2) = dlsym(handle, "XIBarrierReleasePointers");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIBarrierReleasePointer
*(void **) (&XIBarrierReleasePointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIBarrierReleasePointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIFreeDeviceInfo
*(void **) (&XIFreeDeviceInfo_dylibloader_wrapper_xinput2) = dlsym(handle, "XIFreeDeviceInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@ -0,0 +1,158 @@
#ifndef DYLIBLOAD_WRAPPER_XINPUT2
#define DYLIBLOAD_WRAPPER_XINPUT2
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:54:10
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/XInput2.h --sys-include <X11/extensions/XInput2.h> --soname libXi.so.6 --init-name xinput2 --output-header xinput2-so_wrap.h --output-implementation xinput2-so_wrap.c
//
// NOTE: Generated from Xi 1.7.10.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, liXext and libXfixes, but absent in libXi.so.6, were removed.
#include <stdint.h>
#define XIQueryPointer XIQueryPointer_dylibloader_orig_xinput2
#define XIWarpPointer XIWarpPointer_dylibloader_orig_xinput2
#define XIDefineCursor XIDefineCursor_dylibloader_orig_xinput2
#define XIUndefineCursor XIUndefineCursor_dylibloader_orig_xinput2
#define XIChangeHierarchy XIChangeHierarchy_dylibloader_orig_xinput2
#define XISetClientPointer XISetClientPointer_dylibloader_orig_xinput2
#define XIGetClientPointer XIGetClientPointer_dylibloader_orig_xinput2
#define XISelectEvents XISelectEvents_dylibloader_orig_xinput2
#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_orig_xinput2
#define XIQueryVersion XIQueryVersion_dylibloader_orig_xinput2
#define XIQueryDevice XIQueryDevice_dylibloader_orig_xinput2
#define XISetFocus XISetFocus_dylibloader_orig_xinput2
#define XIGetFocus XIGetFocus_dylibloader_orig_xinput2
#define XIGrabDevice XIGrabDevice_dylibloader_orig_xinput2
#define XIUngrabDevice XIUngrabDevice_dylibloader_orig_xinput2
#define XIAllowEvents XIAllowEvents_dylibloader_orig_xinput2
#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_orig_xinput2
#define XIGrabButton XIGrabButton_dylibloader_orig_xinput2
#define XIGrabKeycode XIGrabKeycode_dylibloader_orig_xinput2
#define XIGrabEnter XIGrabEnter_dylibloader_orig_xinput2
#define XIGrabFocusIn XIGrabFocusIn_dylibloader_orig_xinput2
#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_orig_xinput2
#define XIUngrabButton XIUngrabButton_dylibloader_orig_xinput2
#define XIUngrabKeycode XIUngrabKeycode_dylibloader_orig_xinput2
#define XIUngrabEnter XIUngrabEnter_dylibloader_orig_xinput2
#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_orig_xinput2
#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_orig_xinput2
#define XIListProperties XIListProperties_dylibloader_orig_xinput2
#define XIChangeProperty XIChangeProperty_dylibloader_orig_xinput2
#define XIDeleteProperty XIDeleteProperty_dylibloader_orig_xinput2
#define XIGetProperty XIGetProperty_dylibloader_orig_xinput2
#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_orig_xinput2
#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_orig_xinput2
#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_orig_xinput2
#include <X11/extensions/XInput2.h>
#undef XIQueryPointer
#undef XIWarpPointer
#undef XIDefineCursor
#undef XIUndefineCursor
#undef XIChangeHierarchy
#undef XISetClientPointer
#undef XIGetClientPointer
#undef XISelectEvents
#undef XIGetSelectedEvents
#undef XIQueryVersion
#undef XIQueryDevice
#undef XISetFocus
#undef XIGetFocus
#undef XIGrabDevice
#undef XIUngrabDevice
#undef XIAllowEvents
#undef XIAllowTouchEvents
#undef XIGrabButton
#undef XIGrabKeycode
#undef XIGrabEnter
#undef XIGrabFocusIn
#undef XIGrabTouchBegin
#undef XIUngrabButton
#undef XIUngrabKeycode
#undef XIUngrabEnter
#undef XIUngrabFocusIn
#undef XIUngrabTouchBegin
#undef XIListProperties
#undef XIChangeProperty
#undef XIDeleteProperty
#undef XIGetProperty
#undef XIBarrierReleasePointers
#undef XIBarrierReleasePointer
#undef XIFreeDeviceInfo
#ifdef __cplusplus
extern "C" {
#endif
#define XIQueryPointer XIQueryPointer_dylibloader_wrapper_xinput2
#define XIWarpPointer XIWarpPointer_dylibloader_wrapper_xinput2
#define XIDefineCursor XIDefineCursor_dylibloader_wrapper_xinput2
#define XIUndefineCursor XIUndefineCursor_dylibloader_wrapper_xinput2
#define XIChangeHierarchy XIChangeHierarchy_dylibloader_wrapper_xinput2
#define XISetClientPointer XISetClientPointer_dylibloader_wrapper_xinput2
#define XIGetClientPointer XIGetClientPointer_dylibloader_wrapper_xinput2
#define XISelectEvents XISelectEvents_dylibloader_wrapper_xinput2
#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_wrapper_xinput2
#define XIQueryVersion XIQueryVersion_dylibloader_wrapper_xinput2
#define XIQueryDevice XIQueryDevice_dylibloader_wrapper_xinput2
#define XISetFocus XISetFocus_dylibloader_wrapper_xinput2
#define XIGetFocus XIGetFocus_dylibloader_wrapper_xinput2
#define XIGrabDevice XIGrabDevice_dylibloader_wrapper_xinput2
#define XIUngrabDevice XIUngrabDevice_dylibloader_wrapper_xinput2
#define XIAllowEvents XIAllowEvents_dylibloader_wrapper_xinput2
#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_wrapper_xinput2
#define XIGrabButton XIGrabButton_dylibloader_wrapper_xinput2
#define XIGrabKeycode XIGrabKeycode_dylibloader_wrapper_xinput2
#define XIGrabEnter XIGrabEnter_dylibloader_wrapper_xinput2
#define XIGrabFocusIn XIGrabFocusIn_dylibloader_wrapper_xinput2
#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_wrapper_xinput2
#define XIUngrabButton XIUngrabButton_dylibloader_wrapper_xinput2
#define XIUngrabKeycode XIUngrabKeycode_dylibloader_wrapper_xinput2
#define XIUngrabEnter XIUngrabEnter_dylibloader_wrapper_xinput2
#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_wrapper_xinput2
#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_wrapper_xinput2
#define XIListProperties XIListProperties_dylibloader_wrapper_xinput2
#define XIChangeProperty XIChangeProperty_dylibloader_wrapper_xinput2
#define XIDeleteProperty XIDeleteProperty_dylibloader_wrapper_xinput2
#define XIGetProperty XIGetProperty_dylibloader_wrapper_xinput2
#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_wrapper_xinput2
#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_wrapper_xinput2
#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_wrapper_xinput2
extern int (*XIQueryPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window*, Window*, double*, double*, double*, double*, XIButtonState*, XIModifierState*, XIGroupState*);
extern int (*XIWarpPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window, double, double, unsigned int, unsigned int, double, double);
extern int (*XIDefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor);
extern int (*XIUndefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window);
extern int (*XIChangeHierarchy_dylibloader_wrapper_xinput2)( Display*, XIAnyHierarchyChangeInfo*, int);
extern int (*XISetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int);
extern int (*XIGetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int*);
extern int (*XISelectEvents_dylibloader_wrapper_xinput2)( Display*, Window, XIEventMask*, int);
extern XIEventMask* (*XIGetSelectedEvents_dylibloader_wrapper_xinput2)( Display*, Window, int*);
extern int (*XIQueryVersion_dylibloader_wrapper_xinput2)( Display*, int*, int*);
extern XIDeviceInfo* (*XIQueryDevice_dylibloader_wrapper_xinput2)( Display*, int, int*);
extern int (*XISetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window, Time);
extern int (*XIGetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window*);
extern int (*XIGrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Window, Time, Cursor, int, int, int, XIEventMask*);
extern int (*XIUngrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Time);
extern int (*XIAllowEvents_dylibloader_wrapper_xinput2)( Display*, int, int, Time);
extern int (*XIAllowTouchEvents_dylibloader_wrapper_xinput2)( Display*, int, unsigned int, Window, int);
extern int (*XIGrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
extern int (*XIGrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
extern int (*XIGrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
extern int (*XIGrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
extern int (*XIGrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIEventMask*, int, XIGrabModifiers*);
extern int (*XIUngrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
extern int (*XIUngrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
extern int (*XIUngrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
extern int (*XIUngrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
extern int (*XIUngrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
extern Atom* (*XIListProperties_dylibloader_wrapper_xinput2)( Display*, int, int*);
extern void (*XIChangeProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, Atom, int, int, unsigned char*, int);
extern void (*XIDeleteProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom);
extern int (*XIGetProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
extern void (*XIBarrierReleasePointers_dylibloader_wrapper_xinput2)( Display*, XIBarrierReleasePointerInfo*, int);
extern void (*XIBarrierReleasePointer_dylibloader_wrapper_xinput2)( Display*, int, PointerBarrier, BarrierEventID);
extern void (*XIFreeDeviceInfo_dylibloader_wrapper_xinput2)( XIDeviceInfo*);
int initialize_xinput2(int verbose);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,797 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:55:12
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xrandr.h --sys-include <X11/extensions/Xrandr.h> --soname libXrandr.so.2 --init-name xrandr --output-header xrandr-so_wrap.h --output-implementation xrandr-so_wrap.c
//
// NOTE: Generated from Xrandr 1.5.2.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11 and libXrender, but absent in libXrandr.so.2, were removed.
#include <stdint.h>
#define XRRQueryExtension XRRQueryExtension_dylibloader_orig_xrandr
#define XRRQueryVersion XRRQueryVersion_dylibloader_orig_xrandr
#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_orig_xrandr
#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_orig_xrandr
#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_orig_xrandr
#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_orig_xrandr
#define XRRConfigRotations XRRConfigRotations_dylibloader_orig_xrandr
#define XRRConfigTimes XRRConfigTimes_dylibloader_orig_xrandr
#define XRRConfigSizes XRRConfigSizes_dylibloader_orig_xrandr
#define XRRConfigRates XRRConfigRates_dylibloader_orig_xrandr
#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_orig_xrandr
#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_orig_xrandr
#define XRRRootToScreen XRRRootToScreen_dylibloader_orig_xrandr
#define XRRSelectInput XRRSelectInput_dylibloader_orig_xrandr
#define XRRRotations XRRRotations_dylibloader_orig_xrandr
#define XRRSizes XRRSizes_dylibloader_orig_xrandr
#define XRRRates XRRRates_dylibloader_orig_xrandr
#define XRRTimes XRRTimes_dylibloader_orig_xrandr
#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_orig_xrandr
#define XRRSetScreenSize XRRSetScreenSize_dylibloader_orig_xrandr
#define XRRGetScreenResources XRRGetScreenResources_dylibloader_orig_xrandr
#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_orig_xrandr
#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_orig_xrandr
#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_orig_xrandr
#define XRRListOutputProperties XRRListOutputProperties_dylibloader_orig_xrandr
#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_orig_xrandr
#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_orig_xrandr
#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_orig_xrandr
#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_orig_xrandr
#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_orig_xrandr
#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_orig_xrandr
#define XRRCreateMode XRRCreateMode_dylibloader_orig_xrandr
#define XRRDestroyMode XRRDestroyMode_dylibloader_orig_xrandr
#define XRRAddOutputMode XRRAddOutputMode_dylibloader_orig_xrandr
#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_orig_xrandr
#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_orig_xrandr
#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_orig_xrandr
#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_orig_xrandr
#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_orig_xrandr
#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_orig_xrandr
#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_orig_xrandr
#define XRRAllocGamma XRRAllocGamma_dylibloader_orig_xrandr
#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_orig_xrandr
#define XRRFreeGamma XRRFreeGamma_dylibloader_orig_xrandr
#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_orig_xrandr
#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_orig_xrandr
#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_orig_xrandr
#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_orig_xrandr
#define XRRGetPanning XRRGetPanning_dylibloader_orig_xrandr
#define XRRFreePanning XRRFreePanning_dylibloader_orig_xrandr
#define XRRSetPanning XRRSetPanning_dylibloader_orig_xrandr
#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_orig_xrandr
#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_orig_xrandr
#define XRRGetProviderResources XRRGetProviderResources_dylibloader_orig_xrandr
#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_orig_xrandr
#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_orig_xrandr
#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_orig_xrandr
#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_orig_xrandr
#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_orig_xrandr
#define XRRListProviderProperties XRRListProviderProperties_dylibloader_orig_xrandr
#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_orig_xrandr
#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_orig_xrandr
#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_orig_xrandr
#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_orig_xrandr
#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_orig_xrandr
#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_orig_xrandr
#define XRRGetMonitors XRRGetMonitors_dylibloader_orig_xrandr
#define XRRSetMonitor XRRSetMonitor_dylibloader_orig_xrandr
#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_orig_xrandr
#define XRRFreeMonitors XRRFreeMonitors_dylibloader_orig_xrandr
#include <X11/extensions/Xrandr.h>
#undef XRRQueryExtension
#undef XRRQueryVersion
#undef XRRGetScreenInfo
#undef XRRFreeScreenConfigInfo
#undef XRRSetScreenConfig
#undef XRRSetScreenConfigAndRate
#undef XRRConfigRotations
#undef XRRConfigTimes
#undef XRRConfigSizes
#undef XRRConfigRates
#undef XRRConfigCurrentConfiguration
#undef XRRConfigCurrentRate
#undef XRRRootToScreen
#undef XRRSelectInput
#undef XRRRotations
#undef XRRSizes
#undef XRRRates
#undef XRRTimes
#undef XRRGetScreenSizeRange
#undef XRRSetScreenSize
#undef XRRGetScreenResources
#undef XRRFreeScreenResources
#undef XRRGetOutputInfo
#undef XRRFreeOutputInfo
#undef XRRListOutputProperties
#undef XRRQueryOutputProperty
#undef XRRConfigureOutputProperty
#undef XRRChangeOutputProperty
#undef XRRDeleteOutputProperty
#undef XRRGetOutputProperty
#undef XRRAllocModeInfo
#undef XRRCreateMode
#undef XRRDestroyMode
#undef XRRAddOutputMode
#undef XRRDeleteOutputMode
#undef XRRFreeModeInfo
#undef XRRGetCrtcInfo
#undef XRRFreeCrtcInfo
#undef XRRSetCrtcConfig
#undef XRRGetCrtcGammaSize
#undef XRRGetCrtcGamma
#undef XRRAllocGamma
#undef XRRSetCrtcGamma
#undef XRRFreeGamma
#undef XRRGetScreenResourcesCurrent
#undef XRRSetCrtcTransform
#undef XRRGetCrtcTransform
#undef XRRUpdateConfiguration
#undef XRRGetPanning
#undef XRRFreePanning
#undef XRRSetPanning
#undef XRRSetOutputPrimary
#undef XRRGetOutputPrimary
#undef XRRGetProviderResources
#undef XRRFreeProviderResources
#undef XRRGetProviderInfo
#undef XRRFreeProviderInfo
#undef XRRSetProviderOutputSource
#undef XRRSetProviderOffloadSink
#undef XRRListProviderProperties
#undef XRRQueryProviderProperty
#undef XRRConfigureProviderProperty
#undef XRRChangeProviderProperty
#undef XRRDeleteProviderProperty
#undef XRRGetProviderProperty
#undef XRRAllocateMonitor
#undef XRRGetMonitors
#undef XRRSetMonitor
#undef XRRDeleteMonitor
#undef XRRFreeMonitors
#include <dlfcn.h>
#include <stdio.h>
int (*XRRQueryExtension_dylibloader_wrapper_xrandr)( Display*, int*, int*);
int (*XRRQueryVersion_dylibloader_wrapper_xrandr)( Display*, int*, int*);
XRRScreenConfiguration* (*XRRGetScreenInfo_dylibloader_wrapper_xrandr)( Display*, Window);
void (*XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
int (*XRRSetScreenConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, Time);
int (*XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, short, Time);
Rotation (*XRRConfigRotations_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
Time (*XRRConfigTimes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Time*);
XRRScreenSize* (*XRRConfigSizes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int*);
short* (*XRRConfigRates_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int, int*);
SizeID (*XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
short (*XRRConfigCurrentRate_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
int (*XRRRootToScreen_dylibloader_wrapper_xrandr)( Display*, Window);
void (*XRRSelectInput_dylibloader_wrapper_xrandr)( Display*, Window, int);
Rotation (*XRRRotations_dylibloader_wrapper_xrandr)( Display*, int, Rotation*);
XRRScreenSize* (*XRRSizes_dylibloader_wrapper_xrandr)( Display*, int, int*);
short* (*XRRRates_dylibloader_wrapper_xrandr)( Display*, int, int, int*);
Time (*XRRTimes_dylibloader_wrapper_xrandr)( Display*, int, Time*);
int (*XRRGetScreenSizeRange_dylibloader_wrapper_xrandr)( Display*, Window, int*, int*, int*, int*);
void (*XRRSetScreenSize_dylibloader_wrapper_xrandr)( Display*, Window, int, int, int, int);
XRRScreenResources* (*XRRGetScreenResources_dylibloader_wrapper_xrandr)( Display*, Window);
void (*XRRFreeScreenResources_dylibloader_wrapper_xrandr)( XRRScreenResources*);
XRROutputInfo* (*XRRGetOutputInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RROutput);
void (*XRRFreeOutputInfo_dylibloader_wrapper_xrandr)( XRROutputInfo*);
Atom* (*XRRListOutputProperties_dylibloader_wrapper_xrandr)( Display*, RROutput, int*);
XRRPropertyInfo* (*XRRQueryOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
void (*XRRConfigureOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, int, int, int, long*);
void (*XRRChangeOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, Atom, int, int,const unsigned char*, int);
void (*XRRDeleteOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
int (*XRRGetOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
XRRModeInfo* (*XRRAllocModeInfo_dylibloader_wrapper_xrandr)(const char*, int);
RRMode (*XRRCreateMode_dylibloader_wrapper_xrandr)( Display*, Window, XRRModeInfo*);
void (*XRRDestroyMode_dylibloader_wrapper_xrandr)( Display*, RRMode);
void (*XRRAddOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
void (*XRRDeleteOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
void (*XRRFreeModeInfo_dylibloader_wrapper_xrandr)( XRRModeInfo*);
XRRCrtcInfo* (*XRRGetCrtcInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
void (*XRRFreeCrtcInfo_dylibloader_wrapper_xrandr)( XRRCrtcInfo*);
int (*XRRSetCrtcConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, Time, int, int, RRMode, Rotation, RROutput*, int);
int (*XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
XRRCrtcGamma* (*XRRGetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
XRRCrtcGamma* (*XRRAllocGamma_dylibloader_wrapper_xrandr)( int);
void (*XRRSetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcGamma*);
void (*XRRFreeGamma_dylibloader_wrapper_xrandr)( XRRCrtcGamma*);
XRRScreenResources* (*XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr)( Display*, Window);
void (*XRRSetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XTransform*,const char*, XFixed*, int);
int (*XRRGetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcTransformAttributes**);
int (*XRRUpdateConfiguration_dylibloader_wrapper_xrandr)( XEvent*);
XRRPanning* (*XRRGetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
void (*XRRFreePanning_dylibloader_wrapper_xrandr)( XRRPanning*);
int (*XRRSetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, XRRPanning*);
void (*XRRSetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window, RROutput);
RROutput (*XRRGetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window);
XRRProviderResources* (*XRRGetProviderResources_dylibloader_wrapper_xrandr)( Display*, Window);
void (*XRRFreeProviderResources_dylibloader_wrapper_xrandr)( XRRProviderResources*);
XRRProviderInfo* (*XRRGetProviderInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRProvider);
void (*XRRFreeProviderInfo_dylibloader_wrapper_xrandr)( XRRProviderInfo*);
int (*XRRSetProviderOutputSource_dylibloader_wrapper_xrandr)( Display*, XID, XID);
int (*XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr)( Display*, XID, XID);
Atom* (*XRRListProviderProperties_dylibloader_wrapper_xrandr)( Display*, RRProvider, int*);
XRRPropertyInfo* (*XRRQueryProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
void (*XRRConfigureProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, int, int, int, long*);
void (*XRRChangeProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, Atom, int, int,const unsigned char*, int);
void (*XRRDeleteProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
int (*XRRGetProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
XRRMonitorInfo* (*XRRAllocateMonitor_dylibloader_wrapper_xrandr)( Display*, int);
XRRMonitorInfo* (*XRRGetMonitors_dylibloader_wrapper_xrandr)( Display*, Window, int, int*);
void (*XRRSetMonitor_dylibloader_wrapper_xrandr)( Display*, Window, XRRMonitorInfo*);
void (*XRRDeleteMonitor_dylibloader_wrapper_xrandr)( Display*, Window, Atom);
void (*XRRFreeMonitors_dylibloader_wrapper_xrandr)( XRRMonitorInfo*);
int initialize_xrandr(int verbose) {
void *handle;
char *error;
handle = dlopen("libXrandr.so.2", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XRRQueryExtension
*(void **) (&XRRQueryExtension_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryExtension");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRQueryVersion
*(void **) (&XRRQueryVersion_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryVersion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetScreenInfo
*(void **) (&XRRGetScreenInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeScreenConfigInfo
*(void **) (&XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeScreenConfigInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetScreenConfig
*(void **) (&XRRSetScreenConfig_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenConfig");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetScreenConfigAndRate
*(void **) (&XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenConfigAndRate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRConfigRotations
*(void **) (&XRRConfigRotations_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigRotations");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRConfigTimes
*(void **) (&XRRConfigTimes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigTimes");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRConfigSizes
*(void **) (&XRRConfigSizes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigSizes");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRConfigRates
*(void **) (&XRRConfigRates_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigRates");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRConfigCurrentConfiguration
*(void **) (&XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigCurrentConfiguration");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRConfigCurrentRate
*(void **) (&XRRConfigCurrentRate_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigCurrentRate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRRootToScreen
*(void **) (&XRRRootToScreen_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRootToScreen");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSelectInput
*(void **) (&XRRSelectInput_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSelectInput");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRRotations
*(void **) (&XRRRotations_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRotations");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSizes
*(void **) (&XRRSizes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSizes");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRRates
*(void **) (&XRRRates_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRates");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRTimes
*(void **) (&XRRTimes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRTimes");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetScreenSizeRange
*(void **) (&XRRGetScreenSizeRange_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenSizeRange");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetScreenSize
*(void **) (&XRRSetScreenSize_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenSize");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetScreenResources
*(void **) (&XRRGetScreenResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenResources");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeScreenResources
*(void **) (&XRRFreeScreenResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeScreenResources");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetOutputInfo
*(void **) (&XRRGetOutputInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeOutputInfo
*(void **) (&XRRFreeOutputInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeOutputInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRListOutputProperties
*(void **) (&XRRListOutputProperties_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRListOutputProperties");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRQueryOutputProperty
*(void **) (&XRRQueryOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryOutputProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRConfigureOutputProperty
*(void **) (&XRRConfigureOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigureOutputProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRChangeOutputProperty
*(void **) (&XRRChangeOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRChangeOutputProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRDeleteOutputProperty
*(void **) (&XRRDeleteOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteOutputProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetOutputProperty
*(void **) (&XRRGetOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRAllocModeInfo
*(void **) (&XRRAllocModeInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocModeInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRCreateMode
*(void **) (&XRRCreateMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRCreateMode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRDestroyMode
*(void **) (&XRRDestroyMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDestroyMode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRAddOutputMode
*(void **) (&XRRAddOutputMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAddOutputMode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRDeleteOutputMode
*(void **) (&XRRDeleteOutputMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteOutputMode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeModeInfo
*(void **) (&XRRFreeModeInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeModeInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetCrtcInfo
*(void **) (&XRRGetCrtcInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeCrtcInfo
*(void **) (&XRRFreeCrtcInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeCrtcInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetCrtcConfig
*(void **) (&XRRSetCrtcConfig_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcConfig");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetCrtcGammaSize
*(void **) (&XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcGammaSize");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetCrtcGamma
*(void **) (&XRRGetCrtcGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcGamma");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRAllocGamma
*(void **) (&XRRAllocGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocGamma");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetCrtcGamma
*(void **) (&XRRSetCrtcGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcGamma");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeGamma
*(void **) (&XRRFreeGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeGamma");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetScreenResourcesCurrent
*(void **) (&XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenResourcesCurrent");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetCrtcTransform
*(void **) (&XRRSetCrtcTransform_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcTransform");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetCrtcTransform
*(void **) (&XRRGetCrtcTransform_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcTransform");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRUpdateConfiguration
*(void **) (&XRRUpdateConfiguration_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRUpdateConfiguration");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetPanning
*(void **) (&XRRGetPanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetPanning");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreePanning
*(void **) (&XRRFreePanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreePanning");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetPanning
*(void **) (&XRRSetPanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetPanning");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetOutputPrimary
*(void **) (&XRRSetOutputPrimary_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetOutputPrimary");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetOutputPrimary
*(void **) (&XRRGetOutputPrimary_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputPrimary");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetProviderResources
*(void **) (&XRRGetProviderResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderResources");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeProviderResources
*(void **) (&XRRFreeProviderResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeProviderResources");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetProviderInfo
*(void **) (&XRRGetProviderInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeProviderInfo
*(void **) (&XRRFreeProviderInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeProviderInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetProviderOutputSource
*(void **) (&XRRSetProviderOutputSource_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetProviderOutputSource");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetProviderOffloadSink
*(void **) (&XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetProviderOffloadSink");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRListProviderProperties
*(void **) (&XRRListProviderProperties_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRListProviderProperties");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRQueryProviderProperty
*(void **) (&XRRQueryProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryProviderProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRConfigureProviderProperty
*(void **) (&XRRConfigureProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigureProviderProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRChangeProviderProperty
*(void **) (&XRRChangeProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRChangeProviderProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRDeleteProviderProperty
*(void **) (&XRRDeleteProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteProviderProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetProviderProperty
*(void **) (&XRRGetProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRAllocateMonitor
*(void **) (&XRRAllocateMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocateMonitor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRGetMonitors
*(void **) (&XRRGetMonitors_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetMonitors");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRSetMonitor
*(void **) (&XRRSetMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetMonitor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRDeleteMonitor
*(void **) (&XRRDeleteMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteMonitor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRRFreeMonitors
*(void **) (&XRRFreeMonitors_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeMonitors");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@ -0,0 +1,302 @@
#ifndef DYLIBLOAD_WRAPPER_XRANDR
#define DYLIBLOAD_WRAPPER_XRANDR
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:55:12
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xrandr.h --sys-include <X11/extensions/Xrandr.h> --soname libXrandr.so.2 --init-name xrandr --output-header xrandr-so_wrap.h --output-implementation xrandr-so_wrap.c
//
// NOTE: Generated from Xrandr 1.5.2.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11 and libXrender, but absent in libXrandr.so.2, were removed.
#include <stdint.h>
#define XRRQueryExtension XRRQueryExtension_dylibloader_orig_xrandr
#define XRRQueryVersion XRRQueryVersion_dylibloader_orig_xrandr
#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_orig_xrandr
#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_orig_xrandr
#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_orig_xrandr
#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_orig_xrandr
#define XRRConfigRotations XRRConfigRotations_dylibloader_orig_xrandr
#define XRRConfigTimes XRRConfigTimes_dylibloader_orig_xrandr
#define XRRConfigSizes XRRConfigSizes_dylibloader_orig_xrandr
#define XRRConfigRates XRRConfigRates_dylibloader_orig_xrandr
#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_orig_xrandr
#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_orig_xrandr
#define XRRRootToScreen XRRRootToScreen_dylibloader_orig_xrandr
#define XRRSelectInput XRRSelectInput_dylibloader_orig_xrandr
#define XRRRotations XRRRotations_dylibloader_orig_xrandr
#define XRRSizes XRRSizes_dylibloader_orig_xrandr
#define XRRRates XRRRates_dylibloader_orig_xrandr
#define XRRTimes XRRTimes_dylibloader_orig_xrandr
#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_orig_xrandr
#define XRRSetScreenSize XRRSetScreenSize_dylibloader_orig_xrandr
#define XRRGetScreenResources XRRGetScreenResources_dylibloader_orig_xrandr
#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_orig_xrandr
#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_orig_xrandr
#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_orig_xrandr
#define XRRListOutputProperties XRRListOutputProperties_dylibloader_orig_xrandr
#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_orig_xrandr
#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_orig_xrandr
#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_orig_xrandr
#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_orig_xrandr
#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_orig_xrandr
#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_orig_xrandr
#define XRRCreateMode XRRCreateMode_dylibloader_orig_xrandr
#define XRRDestroyMode XRRDestroyMode_dylibloader_orig_xrandr
#define XRRAddOutputMode XRRAddOutputMode_dylibloader_orig_xrandr
#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_orig_xrandr
#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_orig_xrandr
#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_orig_xrandr
#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_orig_xrandr
#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_orig_xrandr
#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_orig_xrandr
#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_orig_xrandr
#define XRRAllocGamma XRRAllocGamma_dylibloader_orig_xrandr
#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_orig_xrandr
#define XRRFreeGamma XRRFreeGamma_dylibloader_orig_xrandr
#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_orig_xrandr
#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_orig_xrandr
#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_orig_xrandr
#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_orig_xrandr
#define XRRGetPanning XRRGetPanning_dylibloader_orig_xrandr
#define XRRFreePanning XRRFreePanning_dylibloader_orig_xrandr
#define XRRSetPanning XRRSetPanning_dylibloader_orig_xrandr
#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_orig_xrandr
#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_orig_xrandr
#define XRRGetProviderResources XRRGetProviderResources_dylibloader_orig_xrandr
#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_orig_xrandr
#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_orig_xrandr
#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_orig_xrandr
#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_orig_xrandr
#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_orig_xrandr
#define XRRListProviderProperties XRRListProviderProperties_dylibloader_orig_xrandr
#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_orig_xrandr
#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_orig_xrandr
#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_orig_xrandr
#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_orig_xrandr
#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_orig_xrandr
#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_orig_xrandr
#define XRRGetMonitors XRRGetMonitors_dylibloader_orig_xrandr
#define XRRSetMonitor XRRSetMonitor_dylibloader_orig_xrandr
#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_orig_xrandr
#define XRRFreeMonitors XRRFreeMonitors_dylibloader_orig_xrandr
#include <X11/extensions/Xrandr.h>
#undef XRRQueryExtension
#undef XRRQueryVersion
#undef XRRGetScreenInfo
#undef XRRFreeScreenConfigInfo
#undef XRRSetScreenConfig
#undef XRRSetScreenConfigAndRate
#undef XRRConfigRotations
#undef XRRConfigTimes
#undef XRRConfigSizes
#undef XRRConfigRates
#undef XRRConfigCurrentConfiguration
#undef XRRConfigCurrentRate
#undef XRRRootToScreen
#undef XRRSelectInput
#undef XRRRotations
#undef XRRSizes
#undef XRRRates
#undef XRRTimes
#undef XRRGetScreenSizeRange
#undef XRRSetScreenSize
#undef XRRGetScreenResources
#undef XRRFreeScreenResources
#undef XRRGetOutputInfo
#undef XRRFreeOutputInfo
#undef XRRListOutputProperties
#undef XRRQueryOutputProperty
#undef XRRConfigureOutputProperty
#undef XRRChangeOutputProperty
#undef XRRDeleteOutputProperty
#undef XRRGetOutputProperty
#undef XRRAllocModeInfo
#undef XRRCreateMode
#undef XRRDestroyMode
#undef XRRAddOutputMode
#undef XRRDeleteOutputMode
#undef XRRFreeModeInfo
#undef XRRGetCrtcInfo
#undef XRRFreeCrtcInfo
#undef XRRSetCrtcConfig
#undef XRRGetCrtcGammaSize
#undef XRRGetCrtcGamma
#undef XRRAllocGamma
#undef XRRSetCrtcGamma
#undef XRRFreeGamma
#undef XRRGetScreenResourcesCurrent
#undef XRRSetCrtcTransform
#undef XRRGetCrtcTransform
#undef XRRUpdateConfiguration
#undef XRRGetPanning
#undef XRRFreePanning
#undef XRRSetPanning
#undef XRRSetOutputPrimary
#undef XRRGetOutputPrimary
#undef XRRGetProviderResources
#undef XRRFreeProviderResources
#undef XRRGetProviderInfo
#undef XRRFreeProviderInfo
#undef XRRSetProviderOutputSource
#undef XRRSetProviderOffloadSink
#undef XRRListProviderProperties
#undef XRRQueryProviderProperty
#undef XRRConfigureProviderProperty
#undef XRRChangeProviderProperty
#undef XRRDeleteProviderProperty
#undef XRRGetProviderProperty
#undef XRRAllocateMonitor
#undef XRRGetMonitors
#undef XRRSetMonitor
#undef XRRDeleteMonitor
#undef XRRFreeMonitors
#ifdef __cplusplus
extern "C" {
#endif
#define XRRQueryExtension XRRQueryExtension_dylibloader_wrapper_xrandr
#define XRRQueryVersion XRRQueryVersion_dylibloader_wrapper_xrandr
#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_wrapper_xrandr
#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr
#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_wrapper_xrandr
#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr
#define XRRConfigRotations XRRConfigRotations_dylibloader_wrapper_xrandr
#define XRRConfigTimes XRRConfigTimes_dylibloader_wrapper_xrandr
#define XRRConfigSizes XRRConfigSizes_dylibloader_wrapper_xrandr
#define XRRConfigRates XRRConfigRates_dylibloader_wrapper_xrandr
#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr
#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_wrapper_xrandr
#define XRRRootToScreen XRRRootToScreen_dylibloader_wrapper_xrandr
#define XRRSelectInput XRRSelectInput_dylibloader_wrapper_xrandr
#define XRRRotations XRRRotations_dylibloader_wrapper_xrandr
#define XRRSizes XRRSizes_dylibloader_wrapper_xrandr
#define XRRRates XRRRates_dylibloader_wrapper_xrandr
#define XRRTimes XRRTimes_dylibloader_wrapper_xrandr
#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_wrapper_xrandr
#define XRRSetScreenSize XRRSetScreenSize_dylibloader_wrapper_xrandr
#define XRRGetScreenResources XRRGetScreenResources_dylibloader_wrapper_xrandr
#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_wrapper_xrandr
#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_wrapper_xrandr
#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_wrapper_xrandr
#define XRRListOutputProperties XRRListOutputProperties_dylibloader_wrapper_xrandr
#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_wrapper_xrandr
#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_wrapper_xrandr
#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_wrapper_xrandr
#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_wrapper_xrandr
#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_wrapper_xrandr
#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_wrapper_xrandr
#define XRRCreateMode XRRCreateMode_dylibloader_wrapper_xrandr
#define XRRDestroyMode XRRDestroyMode_dylibloader_wrapper_xrandr
#define XRRAddOutputMode XRRAddOutputMode_dylibloader_wrapper_xrandr
#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_wrapper_xrandr
#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_wrapper_xrandr
#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_wrapper_xrandr
#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_wrapper_xrandr
#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_wrapper_xrandr
#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr
#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_wrapper_xrandr
#define XRRAllocGamma XRRAllocGamma_dylibloader_wrapper_xrandr
#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_wrapper_xrandr
#define XRRFreeGamma XRRFreeGamma_dylibloader_wrapper_xrandr
#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr
#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_wrapper_xrandr
#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_wrapper_xrandr
#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_wrapper_xrandr
#define XRRGetPanning XRRGetPanning_dylibloader_wrapper_xrandr
#define XRRFreePanning XRRFreePanning_dylibloader_wrapper_xrandr
#define XRRSetPanning XRRSetPanning_dylibloader_wrapper_xrandr
#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_wrapper_xrandr
#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_wrapper_xrandr
#define XRRGetProviderResources XRRGetProviderResources_dylibloader_wrapper_xrandr
#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_wrapper_xrandr
#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_wrapper_xrandr
#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_wrapper_xrandr
#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_wrapper_xrandr
#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr
#define XRRListProviderProperties XRRListProviderProperties_dylibloader_wrapper_xrandr
#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_wrapper_xrandr
#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_wrapper_xrandr
#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_wrapper_xrandr
#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_wrapper_xrandr
#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_wrapper_xrandr
#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_wrapper_xrandr
#define XRRGetMonitors XRRGetMonitors_dylibloader_wrapper_xrandr
#define XRRSetMonitor XRRSetMonitor_dylibloader_wrapper_xrandr
#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_wrapper_xrandr
#define XRRFreeMonitors XRRFreeMonitors_dylibloader_wrapper_xrandr
extern int (*XRRQueryExtension_dylibloader_wrapper_xrandr)( Display*, int*, int*);
extern int (*XRRQueryVersion_dylibloader_wrapper_xrandr)( Display*, int*, int*);
extern XRRScreenConfiguration* (*XRRGetScreenInfo_dylibloader_wrapper_xrandr)( Display*, Window);
extern void (*XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
extern int (*XRRSetScreenConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, Time);
extern int (*XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, short, Time);
extern Rotation (*XRRConfigRotations_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
extern Time (*XRRConfigTimes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Time*);
extern XRRScreenSize* (*XRRConfigSizes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int*);
extern short* (*XRRConfigRates_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int, int*);
extern SizeID (*XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
extern short (*XRRConfigCurrentRate_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
extern int (*XRRRootToScreen_dylibloader_wrapper_xrandr)( Display*, Window);
extern void (*XRRSelectInput_dylibloader_wrapper_xrandr)( Display*, Window, int);
extern Rotation (*XRRRotations_dylibloader_wrapper_xrandr)( Display*, int, Rotation*);
extern XRRScreenSize* (*XRRSizes_dylibloader_wrapper_xrandr)( Display*, int, int*);
extern short* (*XRRRates_dylibloader_wrapper_xrandr)( Display*, int, int, int*);
extern Time (*XRRTimes_dylibloader_wrapper_xrandr)( Display*, int, Time*);
extern int (*XRRGetScreenSizeRange_dylibloader_wrapper_xrandr)( Display*, Window, int*, int*, int*, int*);
extern void (*XRRSetScreenSize_dylibloader_wrapper_xrandr)( Display*, Window, int, int, int, int);
extern XRRScreenResources* (*XRRGetScreenResources_dylibloader_wrapper_xrandr)( Display*, Window);
extern void (*XRRFreeScreenResources_dylibloader_wrapper_xrandr)( XRRScreenResources*);
extern XRROutputInfo* (*XRRGetOutputInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RROutput);
extern void (*XRRFreeOutputInfo_dylibloader_wrapper_xrandr)( XRROutputInfo*);
extern Atom* (*XRRListOutputProperties_dylibloader_wrapper_xrandr)( Display*, RROutput, int*);
extern XRRPropertyInfo* (*XRRQueryOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
extern void (*XRRConfigureOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, int, int, int, long*);
extern void (*XRRChangeOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, Atom, int, int,const unsigned char*, int);
extern void (*XRRDeleteOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
extern int (*XRRGetOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
extern XRRModeInfo* (*XRRAllocModeInfo_dylibloader_wrapper_xrandr)(const char*, int);
extern RRMode (*XRRCreateMode_dylibloader_wrapper_xrandr)( Display*, Window, XRRModeInfo*);
extern void (*XRRDestroyMode_dylibloader_wrapper_xrandr)( Display*, RRMode);
extern void (*XRRAddOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
extern void (*XRRDeleteOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
extern void (*XRRFreeModeInfo_dylibloader_wrapper_xrandr)( XRRModeInfo*);
extern XRRCrtcInfo* (*XRRGetCrtcInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
extern void (*XRRFreeCrtcInfo_dylibloader_wrapper_xrandr)( XRRCrtcInfo*);
extern int (*XRRSetCrtcConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, Time, int, int, RRMode, Rotation, RROutput*, int);
extern int (*XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
extern XRRCrtcGamma* (*XRRGetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
extern XRRCrtcGamma* (*XRRAllocGamma_dylibloader_wrapper_xrandr)( int);
extern void (*XRRSetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcGamma*);
extern void (*XRRFreeGamma_dylibloader_wrapper_xrandr)( XRRCrtcGamma*);
extern XRRScreenResources* (*XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr)( Display*, Window);
extern void (*XRRSetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XTransform*,const char*, XFixed*, int);
extern int (*XRRGetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcTransformAttributes**);
extern int (*XRRUpdateConfiguration_dylibloader_wrapper_xrandr)( XEvent*);
extern XRRPanning* (*XRRGetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
extern void (*XRRFreePanning_dylibloader_wrapper_xrandr)( XRRPanning*);
extern int (*XRRSetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, XRRPanning*);
extern void (*XRRSetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window, RROutput);
extern RROutput (*XRRGetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window);
extern XRRProviderResources* (*XRRGetProviderResources_dylibloader_wrapper_xrandr)( Display*, Window);
extern void (*XRRFreeProviderResources_dylibloader_wrapper_xrandr)( XRRProviderResources*);
extern XRRProviderInfo* (*XRRGetProviderInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRProvider);
extern void (*XRRFreeProviderInfo_dylibloader_wrapper_xrandr)( XRRProviderInfo*);
extern int (*XRRSetProviderOutputSource_dylibloader_wrapper_xrandr)( Display*, XID, XID);
extern int (*XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr)( Display*, XID, XID);
extern Atom* (*XRRListProviderProperties_dylibloader_wrapper_xrandr)( Display*, RRProvider, int*);
extern XRRPropertyInfo* (*XRRQueryProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
extern void (*XRRConfigureProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, int, int, int, long*);
extern void (*XRRChangeProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, Atom, int, int,const unsigned char*, int);
extern void (*XRRDeleteProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
extern int (*XRRGetProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
extern XRRMonitorInfo* (*XRRAllocateMonitor_dylibloader_wrapper_xrandr)( Display*, int);
extern XRRMonitorInfo* (*XRRGetMonitors_dylibloader_wrapper_xrandr)( Display*, Window, int, int*);
extern void (*XRRSetMonitor_dylibloader_wrapper_xrandr)( Display*, Window, XRRMonitorInfo*);
extern void (*XRRDeleteMonitor_dylibloader_wrapper_xrandr)( Display*, Window, Atom);
extern void (*XRRFreeMonitors_dylibloader_wrapper_xrandr)( XRRMonitorInfo*);
int initialize_xrandr(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,511 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:55:28
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xrender.h --sys-include <X11/extensions/Xrender.h> --soname libXrender.so.1 --init-name xrender --output-header xrender-so_wrap.h --output-implementation xrender-so_wrap.c
//
// NOTE: Generated from Xrender 0.9.10.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, but absent in libXrender.so.1, were removed.
#include <stdint.h>
#define XRenderQueryExtension XRenderQueryExtension_dylibloader_orig_xrender
#define XRenderQueryVersion XRenderQueryVersion_dylibloader_orig_xrender
#define XRenderQueryFormats XRenderQueryFormats_dylibloader_orig_xrender
#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_orig_xrender
#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_orig_xrender
#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_orig_xrender
#define XRenderFindFormat XRenderFindFormat_dylibloader_orig_xrender
#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_orig_xrender
#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_orig_xrender
#define XRenderCreatePicture XRenderCreatePicture_dylibloader_orig_xrender
#define XRenderChangePicture XRenderChangePicture_dylibloader_orig_xrender
#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_orig_xrender
#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_orig_xrender
#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_orig_xrender
#define XRenderFreePicture XRenderFreePicture_dylibloader_orig_xrender
#define XRenderComposite XRenderComposite_dylibloader_orig_xrender
#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_orig_xrender
#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_orig_xrender
#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_orig_xrender
#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_orig_xrender
#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_orig_xrender
#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_orig_xrender
#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_orig_xrender
#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_orig_xrender
#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_orig_xrender
#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_orig_xrender
#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_orig_xrender
#define XRenderFillRectangle XRenderFillRectangle_dylibloader_orig_xrender
#define XRenderFillRectangles XRenderFillRectangles_dylibloader_orig_xrender
#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_orig_xrender
#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_orig_xrender
#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_orig_xrender
#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_orig_xrender
#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_orig_xrender
#define XRenderParseColor XRenderParseColor_dylibloader_orig_xrender
#define XRenderCreateCursor XRenderCreateCursor_dylibloader_orig_xrender
#define XRenderQueryFilters XRenderQueryFilters_dylibloader_orig_xrender
#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_orig_xrender
#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_orig_xrender
#define XRenderAddTraps XRenderAddTraps_dylibloader_orig_xrender
#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_orig_xrender
#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_orig_xrender
#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_orig_xrender
#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_orig_xrender
#include <X11/extensions/Xrender.h>
#undef XRenderQueryExtension
#undef XRenderQueryVersion
#undef XRenderQueryFormats
#undef XRenderQuerySubpixelOrder
#undef XRenderSetSubpixelOrder
#undef XRenderFindVisualFormat
#undef XRenderFindFormat
#undef XRenderFindStandardFormat
#undef XRenderQueryPictIndexValues
#undef XRenderCreatePicture
#undef XRenderChangePicture
#undef XRenderSetPictureClipRectangles
#undef XRenderSetPictureClipRegion
#undef XRenderSetPictureTransform
#undef XRenderFreePicture
#undef XRenderComposite
#undef XRenderCreateGlyphSet
#undef XRenderReferenceGlyphSet
#undef XRenderFreeGlyphSet
#undef XRenderAddGlyphs
#undef XRenderFreeGlyphs
#undef XRenderCompositeString8
#undef XRenderCompositeString16
#undef XRenderCompositeString32
#undef XRenderCompositeText8
#undef XRenderCompositeText16
#undef XRenderCompositeText32
#undef XRenderFillRectangle
#undef XRenderFillRectangles
#undef XRenderCompositeTrapezoids
#undef XRenderCompositeTriangles
#undef XRenderCompositeTriStrip
#undef XRenderCompositeTriFan
#undef XRenderCompositeDoublePoly
#undef XRenderParseColor
#undef XRenderCreateCursor
#undef XRenderQueryFilters
#undef XRenderSetPictureFilter
#undef XRenderCreateAnimCursor
#undef XRenderAddTraps
#undef XRenderCreateSolidFill
#undef XRenderCreateLinearGradient
#undef XRenderCreateRadialGradient
#undef XRenderCreateConicalGradient
#include <dlfcn.h>
#include <stdio.h>
int (*XRenderQueryExtension_dylibloader_wrapper_xrender)( Display*, int*, int*);
int (*XRenderQueryVersion_dylibloader_wrapper_xrender)( Display*, int*, int*);
int (*XRenderQueryFormats_dylibloader_wrapper_xrender)( Display*);
int (*XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender)( Display*, int);
int (*XRenderSetSubpixelOrder_dylibloader_wrapper_xrender)( Display*, int, int);
XRenderPictFormat* (*XRenderFindVisualFormat_dylibloader_wrapper_xrender)( Display*,const Visual*);
XRenderPictFormat* (*XRenderFindFormat_dylibloader_wrapper_xrender)( Display*, unsigned long,const XRenderPictFormat*, int);
XRenderPictFormat* (*XRenderFindStandardFormat_dylibloader_wrapper_xrender)( Display*, int);
XIndexValue* (*XRenderQueryPictIndexValues_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*, int*);
Picture (*XRenderCreatePicture_dylibloader_wrapper_xrender)( Display*, Drawable,const XRenderPictFormat*, unsigned long,const XRenderPictureAttributes*);
void (*XRenderChangePicture_dylibloader_wrapper_xrender)( Display*, Picture, unsigned long,const XRenderPictureAttributes*);
void (*XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XRectangle*, int);
void (*XRenderSetPictureClipRegion_dylibloader_wrapper_xrender)( Display*, Picture, Region);
void (*XRenderSetPictureTransform_dylibloader_wrapper_xrender)( Display*, Picture, XTransform*);
void (*XRenderFreePicture_dylibloader_wrapper_xrender)( Display*, Picture);
void (*XRenderComposite_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture, Picture, int, int, int, int, int, int, unsigned int, unsigned int);
GlyphSet (*XRenderCreateGlyphSet_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*);
GlyphSet (*XRenderReferenceGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
void (*XRenderFreeGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
void (*XRenderAddGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*,const XGlyphInfo*, int,const char*, int);
void (*XRenderFreeGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*, int);
void (*XRenderCompositeString8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const char*, int);
void (*XRenderCompositeString16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned short*, int);
void (*XRenderCompositeString32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned int*, int);
void (*XRenderCompositeText8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt8*, int);
void (*XRenderCompositeText16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt16*, int);
void (*XRenderCompositeText32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt32*, int);
void (*XRenderFillRectangle_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*, int, int, unsigned int, unsigned int);
void (*XRenderFillRectangles_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*,const XRectangle*, int);
void (*XRenderCompositeTrapezoids_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTrapezoid*, int);
void (*XRenderCompositeTriangles_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTriangle*, int);
void (*XRenderCompositeTriStrip_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
void (*XRenderCompositeTriFan_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
void (*XRenderCompositeDoublePoly_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XPointDouble*, int, int);
int (*XRenderParseColor_dylibloader_wrapper_xrender)( Display*, char*, XRenderColor*);
Cursor (*XRenderCreateCursor_dylibloader_wrapper_xrender)( Display*, Picture, unsigned int, unsigned int);
XFilters* (*XRenderQueryFilters_dylibloader_wrapper_xrender)( Display*, Drawable);
void (*XRenderSetPictureFilter_dylibloader_wrapper_xrender)( Display*, Picture,const char*, XFixed*, int);
Cursor (*XRenderCreateAnimCursor_dylibloader_wrapper_xrender)( Display*, int, XAnimCursor*);
void (*XRenderAddTraps_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XTrap*, int);
Picture (*XRenderCreateSolidFill_dylibloader_wrapper_xrender)( Display*,const XRenderColor*);
Picture (*XRenderCreateLinearGradient_dylibloader_wrapper_xrender)( Display*,const XLinearGradient*,const XFixed*,const XRenderColor*, int);
Picture (*XRenderCreateRadialGradient_dylibloader_wrapper_xrender)( Display*,const XRadialGradient*,const XFixed*,const XRenderColor*, int);
Picture (*XRenderCreateConicalGradient_dylibloader_wrapper_xrender)( Display*,const XConicalGradient*,const XFixed*,const XRenderColor*, int);
int initialize_xrender(int verbose) {
void *handle;
char *error;
handle = dlopen("libXrender.so.1", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XRenderQueryExtension
*(void **) (&XRenderQueryExtension_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryExtension");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderQueryVersion
*(void **) (&XRenderQueryVersion_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryVersion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderQueryFormats
*(void **) (&XRenderQueryFormats_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryFormats");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderQuerySubpixelOrder
*(void **) (&XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQuerySubpixelOrder");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderSetSubpixelOrder
*(void **) (&XRenderSetSubpixelOrder_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetSubpixelOrder");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderFindVisualFormat
*(void **) (&XRenderFindVisualFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindVisualFormat");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderFindFormat
*(void **) (&XRenderFindFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindFormat");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderFindStandardFormat
*(void **) (&XRenderFindStandardFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindStandardFormat");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderQueryPictIndexValues
*(void **) (&XRenderQueryPictIndexValues_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryPictIndexValues");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCreatePicture
*(void **) (&XRenderCreatePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreatePicture");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderChangePicture
*(void **) (&XRenderChangePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderChangePicture");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderSetPictureClipRectangles
*(void **) (&XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureClipRectangles");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderSetPictureClipRegion
*(void **) (&XRenderSetPictureClipRegion_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureClipRegion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderSetPictureTransform
*(void **) (&XRenderSetPictureTransform_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureTransform");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderFreePicture
*(void **) (&XRenderFreePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreePicture");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderComposite
*(void **) (&XRenderComposite_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderComposite");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCreateGlyphSet
*(void **) (&XRenderCreateGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateGlyphSet");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderReferenceGlyphSet
*(void **) (&XRenderReferenceGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderReferenceGlyphSet");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderFreeGlyphSet
*(void **) (&XRenderFreeGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreeGlyphSet");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderAddGlyphs
*(void **) (&XRenderAddGlyphs_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderAddGlyphs");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderFreeGlyphs
*(void **) (&XRenderFreeGlyphs_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreeGlyphs");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeString8
*(void **) (&XRenderCompositeString8_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString8");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeString16
*(void **) (&XRenderCompositeString16_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString16");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeString32
*(void **) (&XRenderCompositeString32_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString32");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeText8
*(void **) (&XRenderCompositeText8_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText8");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeText16
*(void **) (&XRenderCompositeText16_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText16");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeText32
*(void **) (&XRenderCompositeText32_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText32");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderFillRectangle
*(void **) (&XRenderFillRectangle_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFillRectangle");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderFillRectangles
*(void **) (&XRenderFillRectangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFillRectangles");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeTrapezoids
*(void **) (&XRenderCompositeTrapezoids_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTrapezoids");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeTriangles
*(void **) (&XRenderCompositeTriangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriangles");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeTriStrip
*(void **) (&XRenderCompositeTriStrip_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriStrip");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeTriFan
*(void **) (&XRenderCompositeTriFan_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriFan");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCompositeDoublePoly
*(void **) (&XRenderCompositeDoublePoly_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeDoublePoly");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderParseColor
*(void **) (&XRenderParseColor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderParseColor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCreateCursor
*(void **) (&XRenderCreateCursor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderQueryFilters
*(void **) (&XRenderQueryFilters_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryFilters");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderSetPictureFilter
*(void **) (&XRenderSetPictureFilter_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureFilter");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCreateAnimCursor
*(void **) (&XRenderCreateAnimCursor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateAnimCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderAddTraps
*(void **) (&XRenderAddTraps_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderAddTraps");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCreateSolidFill
*(void **) (&XRenderCreateSolidFill_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateSolidFill");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCreateLinearGradient
*(void **) (&XRenderCreateLinearGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateLinearGradient");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCreateRadialGradient
*(void **) (&XRenderCreateRadialGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateRadialGradient");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XRenderCreateConicalGradient
*(void **) (&XRenderCreateConicalGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateConicalGradient");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@ -0,0 +1,198 @@
#ifndef DYLIBLOAD_WRAPPER_XRENDER
#define DYLIBLOAD_WRAPPER_XRENDER
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:55:28
// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xrender.h --sys-include <X11/extensions/Xrender.h> --soname libXrender.so.1 --init-name xrender --output-header xrender-so_wrap.h --output-implementation xrender-so_wrap.c
//
// NOTE: Generated from Xrender 0.9.10.
// This has been handpatched to workaround some issues with the generator that
// will be eventually fixed. In this case, non-existant symbols inherited from
// libX11, but absent in libXrender.so.1, were removed.
#include <stdint.h>
#define XRenderQueryExtension XRenderQueryExtension_dylibloader_orig_xrender
#define XRenderQueryVersion XRenderQueryVersion_dylibloader_orig_xrender
#define XRenderQueryFormats XRenderQueryFormats_dylibloader_orig_xrender
#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_orig_xrender
#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_orig_xrender
#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_orig_xrender
#define XRenderFindFormat XRenderFindFormat_dylibloader_orig_xrender
#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_orig_xrender
#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_orig_xrender
#define XRenderCreatePicture XRenderCreatePicture_dylibloader_orig_xrender
#define XRenderChangePicture XRenderChangePicture_dylibloader_orig_xrender
#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_orig_xrender
#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_orig_xrender
#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_orig_xrender
#define XRenderFreePicture XRenderFreePicture_dylibloader_orig_xrender
#define XRenderComposite XRenderComposite_dylibloader_orig_xrender
#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_orig_xrender
#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_orig_xrender
#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_orig_xrender
#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_orig_xrender
#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_orig_xrender
#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_orig_xrender
#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_orig_xrender
#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_orig_xrender
#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_orig_xrender
#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_orig_xrender
#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_orig_xrender
#define XRenderFillRectangle XRenderFillRectangle_dylibloader_orig_xrender
#define XRenderFillRectangles XRenderFillRectangles_dylibloader_orig_xrender
#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_orig_xrender
#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_orig_xrender
#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_orig_xrender
#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_orig_xrender
#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_orig_xrender
#define XRenderParseColor XRenderParseColor_dylibloader_orig_xrender
#define XRenderCreateCursor XRenderCreateCursor_dylibloader_orig_xrender
#define XRenderQueryFilters XRenderQueryFilters_dylibloader_orig_xrender
#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_orig_xrender
#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_orig_xrender
#define XRenderAddTraps XRenderAddTraps_dylibloader_orig_xrender
#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_orig_xrender
#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_orig_xrender
#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_orig_xrender
#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_orig_xrender
#include <X11/extensions/Xrender.h>
#undef XRenderQueryExtension
#undef XRenderQueryVersion
#undef XRenderQueryFormats
#undef XRenderQuerySubpixelOrder
#undef XRenderSetSubpixelOrder
#undef XRenderFindVisualFormat
#undef XRenderFindFormat
#undef XRenderFindStandardFormat
#undef XRenderQueryPictIndexValues
#undef XRenderCreatePicture
#undef XRenderChangePicture
#undef XRenderSetPictureClipRectangles
#undef XRenderSetPictureClipRegion
#undef XRenderSetPictureTransform
#undef XRenderFreePicture
#undef XRenderComposite
#undef XRenderCreateGlyphSet
#undef XRenderReferenceGlyphSet
#undef XRenderFreeGlyphSet
#undef XRenderAddGlyphs
#undef XRenderFreeGlyphs
#undef XRenderCompositeString8
#undef XRenderCompositeString16
#undef XRenderCompositeString32
#undef XRenderCompositeText8
#undef XRenderCompositeText16
#undef XRenderCompositeText32
#undef XRenderFillRectangle
#undef XRenderFillRectangles
#undef XRenderCompositeTrapezoids
#undef XRenderCompositeTriangles
#undef XRenderCompositeTriStrip
#undef XRenderCompositeTriFan
#undef XRenderCompositeDoublePoly
#undef XRenderParseColor
#undef XRenderCreateCursor
#undef XRenderQueryFilters
#undef XRenderSetPictureFilter
#undef XRenderCreateAnimCursor
#undef XRenderAddTraps
#undef XRenderCreateSolidFill
#undef XRenderCreateLinearGradient
#undef XRenderCreateRadialGradient
#undef XRenderCreateConicalGradient
#ifdef __cplusplus
extern "C" {
#endif
#define XRenderQueryExtension XRenderQueryExtension_dylibloader_wrapper_xrender
#define XRenderQueryVersion XRenderQueryVersion_dylibloader_wrapper_xrender
#define XRenderQueryFormats XRenderQueryFormats_dylibloader_wrapper_xrender
#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender
#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_wrapper_xrender
#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_wrapper_xrender
#define XRenderFindFormat XRenderFindFormat_dylibloader_wrapper_xrender
#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_wrapper_xrender
#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_wrapper_xrender
#define XRenderCreatePicture XRenderCreatePicture_dylibloader_wrapper_xrender
#define XRenderChangePicture XRenderChangePicture_dylibloader_wrapper_xrender
#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender
#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_wrapper_xrender
#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_wrapper_xrender
#define XRenderFreePicture XRenderFreePicture_dylibloader_wrapper_xrender
#define XRenderComposite XRenderComposite_dylibloader_wrapper_xrender
#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_wrapper_xrender
#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_wrapper_xrender
#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_wrapper_xrender
#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_wrapper_xrender
#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_wrapper_xrender
#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_wrapper_xrender
#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_wrapper_xrender
#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_wrapper_xrender
#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_wrapper_xrender
#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_wrapper_xrender
#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_wrapper_xrender
#define XRenderFillRectangle XRenderFillRectangle_dylibloader_wrapper_xrender
#define XRenderFillRectangles XRenderFillRectangles_dylibloader_wrapper_xrender
#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_wrapper_xrender
#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_wrapper_xrender
#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_wrapper_xrender
#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_wrapper_xrender
#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_wrapper_xrender
#define XRenderParseColor XRenderParseColor_dylibloader_wrapper_xrender
#define XRenderCreateCursor XRenderCreateCursor_dylibloader_wrapper_xrender
#define XRenderQueryFilters XRenderQueryFilters_dylibloader_wrapper_xrender
#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_wrapper_xrender
#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_wrapper_xrender
#define XRenderAddTraps XRenderAddTraps_dylibloader_wrapper_xrender
#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_wrapper_xrender
#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_wrapper_xrender
#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_wrapper_xrender
#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_wrapper_xrender
extern int (*XRenderQueryExtension_dylibloader_wrapper_xrender)( Display*, int*, int*);
extern int (*XRenderQueryVersion_dylibloader_wrapper_xrender)( Display*, int*, int*);
extern int (*XRenderQueryFormats_dylibloader_wrapper_xrender)( Display*);
extern int (*XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender)( Display*, int);
extern int (*XRenderSetSubpixelOrder_dylibloader_wrapper_xrender)( Display*, int, int);
extern XRenderPictFormat* (*XRenderFindVisualFormat_dylibloader_wrapper_xrender)( Display*,const Visual*);
extern XRenderPictFormat* (*XRenderFindFormat_dylibloader_wrapper_xrender)( Display*, unsigned long,const XRenderPictFormat*, int);
extern XRenderPictFormat* (*XRenderFindStandardFormat_dylibloader_wrapper_xrender)( Display*, int);
extern XIndexValue* (*XRenderQueryPictIndexValues_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*, int*);
extern Picture (*XRenderCreatePicture_dylibloader_wrapper_xrender)( Display*, Drawable,const XRenderPictFormat*, unsigned long,const XRenderPictureAttributes*);
extern void (*XRenderChangePicture_dylibloader_wrapper_xrender)( Display*, Picture, unsigned long,const XRenderPictureAttributes*);
extern void (*XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XRectangle*, int);
extern void (*XRenderSetPictureClipRegion_dylibloader_wrapper_xrender)( Display*, Picture, Region);
extern void (*XRenderSetPictureTransform_dylibloader_wrapper_xrender)( Display*, Picture, XTransform*);
extern void (*XRenderFreePicture_dylibloader_wrapper_xrender)( Display*, Picture);
extern void (*XRenderComposite_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture, Picture, int, int, int, int, int, int, unsigned int, unsigned int);
extern GlyphSet (*XRenderCreateGlyphSet_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*);
extern GlyphSet (*XRenderReferenceGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
extern void (*XRenderFreeGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
extern void (*XRenderAddGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*,const XGlyphInfo*, int,const char*, int);
extern void (*XRenderFreeGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*, int);
extern void (*XRenderCompositeString8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const char*, int);
extern void (*XRenderCompositeString16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned short*, int);
extern void (*XRenderCompositeString32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned int*, int);
extern void (*XRenderCompositeText8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt8*, int);
extern void (*XRenderCompositeText16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt16*, int);
extern void (*XRenderCompositeText32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt32*, int);
extern void (*XRenderFillRectangle_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*, int, int, unsigned int, unsigned int);
extern void (*XRenderFillRectangles_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*,const XRectangle*, int);
extern void (*XRenderCompositeTrapezoids_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTrapezoid*, int);
extern void (*XRenderCompositeTriangles_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTriangle*, int);
extern void (*XRenderCompositeTriStrip_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
extern void (*XRenderCompositeTriFan_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
extern void (*XRenderCompositeDoublePoly_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XPointDouble*, int, int);
extern int (*XRenderParseColor_dylibloader_wrapper_xrender)( Display*, char*, XRenderColor*);
extern Cursor (*XRenderCreateCursor_dylibloader_wrapper_xrender)( Display*, Picture, unsigned int, unsigned int);
extern XFilters* (*XRenderQueryFilters_dylibloader_wrapper_xrender)( Display*, Drawable);
extern void (*XRenderSetPictureFilter_dylibloader_wrapper_xrender)( Display*, Picture,const char*, XFixed*, int);
extern Cursor (*XRenderCreateAnimCursor_dylibloader_wrapper_xrender)( Display*, int, XAnimCursor*);
extern void (*XRenderAddTraps_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XTrap*, int);
extern Picture (*XRenderCreateSolidFill_dylibloader_wrapper_xrender)( Display*,const XRenderColor*);
extern Picture (*XRenderCreateLinearGradient_dylibloader_wrapper_xrender)( Display*,const XLinearGradient*,const XFixed*,const XRenderColor*, int);
extern Picture (*XRenderCreateRadialGradient_dylibloader_wrapper_xrender)( Display*,const XRadialGradient*,const XFixed*,const XRenderColor*, int);
extern Picture (*XRenderCreateConicalGradient_dylibloader_wrapper_xrender)( Display*,const XConicalGradient*,const XFixed*,const XRenderColor*, int);
int initialize_xrender(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -321,8 +321,8 @@ void GLManager_X11::swap_buffers() {
glXSwapBuffers(_x_windisp.x11_display, _x_windisp.x11_window);
}
Error GLManager_X11::initialize() {
if (!gladLoaderLoadGLX(nullptr, 0)) {
Error GLManager_X11::initialize(Display *p_display) {
if (!gladLoaderLoadGLX(p_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(p_display)))) {
return ERR_CANT_CREATE;
}

View File

@ -37,9 +37,10 @@
#include "core/os/os.h"
#include "core/templates/local_vector.h"
#include "dynwrappers/xext-so_wrap.h"
#include "dynwrappers/xlib-so_wrap.h"
#include "dynwrappers/xrender-so_wrap.h"
#include "servers/display_server.h"
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
struct GLManager_X11_Private;
@ -111,7 +112,7 @@ public:
void window_make_current(DisplayServer::WindowID p_window_id);
Error initialize();
Error initialize(Display *p_display);
void set_use_vsync(bool p_use);
bool is_using_vsync() const;