initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
38
platform/linuxbsd/x11/SCsub
Normal file
38
platform/linuxbsd/x11/SCsub
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python
|
||||
from misc.utility.scons_hints import *
|
||||
|
||||
Import("env")
|
||||
|
||||
source_files = [
|
||||
"display_server_x11.cpp",
|
||||
"key_mapping_x11.cpp",
|
||||
]
|
||||
|
||||
if env["use_sowrap"]:
|
||||
source_files.append(
|
||||
[
|
||||
"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("rendering_context_driver_vulkan_x11.cpp")
|
||||
|
||||
if env["opengl3"]:
|
||||
env.Append(CPPDEFINES=["GLAD_GLX_NO_X11"])
|
||||
source_files.append(
|
||||
["gl_manager_x11_egl.cpp", "gl_manager_x11.cpp", "detect_prime_x11.cpp", "#thirdparty/glad/glx.c"]
|
||||
)
|
||||
|
||||
objects = []
|
||||
|
||||
for source_file in source_files:
|
||||
objects.append(env.Object(source_file))
|
||||
|
||||
Return("objects")
|
||||
262
platform/linuxbsd/x11/detect_prime_x11.cpp
Normal file
262
platform/linuxbsd/x11/detect_prime_x11.cpp
Normal file
@@ -0,0 +1,262 @@
|
||||
/**************************************************************************/
|
||||
/* detect_prime_x11.cpp */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
|
||||
|
||||
#include "detect_prime_x11.h"
|
||||
|
||||
#include "core/string/print_string.h"
|
||||
#include "core/string/ustring.h"
|
||||
|
||||
#include "thirdparty/glad/glad/gl.h"
|
||||
#include "thirdparty/glad/glad/glx.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "x11/dynwrappers/xlib-so_wrap.h"
|
||||
#else
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
|
||||
typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
|
||||
|
||||
// To prevent shadowing warnings
|
||||
#undef glGetString
|
||||
|
||||
int silent_error_handler(Display *display, XErrorEvent *error) {
|
||||
static char message[1024];
|
||||
XGetErrorText(display, error->error_code, message, sizeof(message));
|
||||
print_verbose(vformat("XServer error: %s"
|
||||
"\n Major opcode of failed request: %d"
|
||||
"\n Serial number of failed request: %d"
|
||||
"\n Current serial number in output stream: %d",
|
||||
String::utf8(message), (uint64_t)error->request_code, (uint64_t)error->minor_code, (uint64_t)error->serial));
|
||||
|
||||
quick_exit(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Runs inside a child. Exiting will not quit the engine.
|
||||
void DetectPrimeX11::create_context() {
|
||||
XSetErrorHandler(&silent_error_handler);
|
||||
|
||||
Display *x11_display = XOpenDisplay(nullptr);
|
||||
Window x11_window;
|
||||
GLXContext glx_context;
|
||||
|
||||
static int visual_attribs[] = {
|
||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
|
||||
GLX_DOUBLEBUFFER, true,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_DEPTH_SIZE, 24,
|
||||
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;
|
||||
|
||||
XSetWindowAttributes swa;
|
||||
swa.event_mask = StructureNotifyMask;
|
||||
swa.border_pixel = 0;
|
||||
unsigned long valuemask = CWBorderPixel | CWColormap | CWEventMask;
|
||||
|
||||
GLXFBConfig *fbc = glXChooseFBConfig(x11_display, DefaultScreen(x11_display), visual_attribs, &fbcount);
|
||||
if (!fbc) {
|
||||
quick_exit(1);
|
||||
}
|
||||
|
||||
vi = glXGetVisualFromFBConfig(x11_display, fbc[0]);
|
||||
|
||||
fbconfig = fbc[0];
|
||||
|
||||
static int context_attribs[] = {
|
||||
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
|
||||
GLX_CONTEXT_MINOR_VERSION_ARB, 3,
|
||||
GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
|
||||
None
|
||||
};
|
||||
|
||||
glx_context = glXCreateContextAttribsARB(x11_display, fbconfig, nullptr, true, context_attribs);
|
||||
|
||||
swa.colormap = XCreateColormap(x11_display, RootWindow(x11_display, vi->screen), vi->visual, AllocNone);
|
||||
x11_window = XCreateWindow(x11_display, RootWindow(x11_display, vi->screen), 0, 0, 10, 10, 0, vi->depth, InputOutput, vi->visual, valuemask, &swa);
|
||||
|
||||
if (!x11_window) {
|
||||
quick_exit(1);
|
||||
}
|
||||
|
||||
glXMakeCurrent(x11_display, x11_window, glx_context);
|
||||
XFree(vi);
|
||||
}
|
||||
|
||||
int DetectPrimeX11::detect_prime() {
|
||||
pid_t p;
|
||||
int priorities[2] = {};
|
||||
String vendors[2];
|
||||
String renderers[2];
|
||||
|
||||
vendors[0] = "Unknown";
|
||||
vendors[1] = "Unknown";
|
||||
renderers[0] = "Unknown";
|
||||
renderers[1] = "Unknown";
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
int fdset[2];
|
||||
|
||||
if (pipe(fdset) == -1) {
|
||||
print_verbose("Failed to pipe(), using default GPU");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Fork so the driver initialization can crash without taking down the engine.
|
||||
p = fork();
|
||||
|
||||
if (p > 0) {
|
||||
// Main thread
|
||||
|
||||
int stat_loc = 0;
|
||||
char string[201];
|
||||
string[200] = '\0';
|
||||
|
||||
close(fdset[1]);
|
||||
|
||||
waitpid(p, &stat_loc, 0);
|
||||
|
||||
if (!stat_loc) {
|
||||
// No need to do anything complicated here. Anything less than
|
||||
// PIPE_BUF will be delivered in one read() call.
|
||||
// Leave it 'Unknown' otherwise.
|
||||
if (read(fdset[0], string, sizeof(string) - 1) > 0) {
|
||||
vendors[i] = string;
|
||||
renderers[i] = string + strlen(string) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
close(fdset[0]);
|
||||
|
||||
} else {
|
||||
// In child, exit() here will not quit the engine.
|
||||
|
||||
// Prevent false leak reports as we will not be properly
|
||||
// cleaning up these processes, and fork() makes a copy
|
||||
// of all globals.
|
||||
CoreGlobals::leak_reporting_enabled = false;
|
||||
|
||||
char string[201];
|
||||
|
||||
close(fdset[0]);
|
||||
|
||||
if (i) {
|
||||
setenv("DRI_PRIME", "1", 1);
|
||||
}
|
||||
|
||||
create_context();
|
||||
|
||||
PFNGLGETSTRINGPROC glGetString = (PFNGLGETSTRINGPROC)glXGetProcAddressARB((GLubyte *)"glGetString");
|
||||
if (!glGetString) {
|
||||
print_verbose("Unable to get glGetString, GPU detection skipped.");
|
||||
quick_exit(1);
|
||||
}
|
||||
|
||||
const char *vendor = (const char *)glGetString(GL_VENDOR);
|
||||
const char *renderer = (const char *)glGetString(GL_RENDERER);
|
||||
|
||||
unsigned int vendor_len = strlen(vendor) + 1;
|
||||
unsigned int renderer_len = strlen(renderer) + 1;
|
||||
|
||||
if (vendor_len + renderer_len >= sizeof(string)) {
|
||||
renderer_len = 200 - vendor_len;
|
||||
}
|
||||
|
||||
memcpy(&string, vendor, vendor_len);
|
||||
memcpy(&string[vendor_len], renderer, renderer_len);
|
||||
|
||||
if (write(fdset[1], string, vendor_len + renderer_len) == -1) {
|
||||
print_verbose("Couldn't write vendor/renderer string.");
|
||||
}
|
||||
close(fdset[1]);
|
||||
|
||||
// The function quick_exit() is used because exit() will call destructors on static objects copied by fork().
|
||||
// These objects will be freed anyway when the process finishes execution.
|
||||
quick_exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
int preferred = 0;
|
||||
int priority = 0;
|
||||
|
||||
if (vendors[0] == vendors[1]) {
|
||||
print_verbose("Only one GPU found, using default.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (int i = 1; i >= 0; --i) {
|
||||
const Vendor *v = vendor_map;
|
||||
while (v->glxvendor) {
|
||||
if (v->glxvendor == vendors[i]) {
|
||||
priorities[i] = v->priority;
|
||||
|
||||
if (v->priority >= priority) {
|
||||
priority = v->priority;
|
||||
preferred = i;
|
||||
}
|
||||
}
|
||||
++v;
|
||||
}
|
||||
}
|
||||
|
||||
print_verbose("Found renderers:");
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
print_verbose("Renderer " + itos(i) + ": " + renderers[i] + " with priority: " + itos(priorities[i]));
|
||||
}
|
||||
|
||||
print_verbose("Using renderer: " + renderers[preferred]);
|
||||
return preferred;
|
||||
}
|
||||
|
||||
#endif // X11_ENABLED && GLES3_ENABLED
|
||||
60
platform/linuxbsd/x11/detect_prime_x11.h
Normal file
60
platform/linuxbsd/x11/detect_prime_x11.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/**************************************************************************/
|
||||
/* detect_prime_x11.h */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
|
||||
|
||||
class DetectPrimeX11 {
|
||||
private:
|
||||
struct Vendor {
|
||||
const char *glxvendor = nullptr;
|
||||
int priority = 0;
|
||||
};
|
||||
|
||||
static constexpr Vendor vendor_map[] = {
|
||||
{ "Advanced Micro Devices, Inc.", 30 },
|
||||
{ "AMD", 30 },
|
||||
{ "NVIDIA Corporation", 30 },
|
||||
{ "X.Org", 30 },
|
||||
{ "Intel Open Source Technology Center", 20 },
|
||||
{ "Intel", 20 },
|
||||
{ "nouveau", 10 },
|
||||
{ "Mesa Project", 0 },
|
||||
{ nullptr, 0 }
|
||||
};
|
||||
|
||||
public:
|
||||
static void create_context();
|
||||
|
||||
static int detect_prime();
|
||||
};
|
||||
|
||||
#endif // X11_ENABLED && GLES3_ENABLED
|
||||
7548
platform/linuxbsd/x11/display_server_x11.cpp
Normal file
7548
platform/linuxbsd/x11/display_server_x11.cpp
Normal file
File diff suppressed because it is too large
Load Diff
593
platform/linuxbsd/x11/display_server_x11.h
Normal file
593
platform/linuxbsd/x11/display_server_x11.h
Normal file
@@ -0,0 +1,593 @@
|
||||
/**************************************************************************/
|
||||
/* display_server_x11.h */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef X11_ENABLED
|
||||
|
||||
#include "core/input/input.h"
|
||||
#include "core/os/mutex.h"
|
||||
#include "core/os/thread.h"
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "drivers/alsa/audio_driver_alsa.h"
|
||||
#include "drivers/alsamidi/midi_driver_alsamidi.h"
|
||||
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
|
||||
#include "drivers/unix/os_unix.h"
|
||||
#include "servers/audio_server.h"
|
||||
#include "servers/display_server.h"
|
||||
#include "servers/rendering/renderer_compositor.h"
|
||||
#include "servers/rendering_server.h"
|
||||
|
||||
#if defined(SPEECHD_ENABLED)
|
||||
#include "tts_linux.h"
|
||||
#endif
|
||||
|
||||
#if defined(GLES3_ENABLED)
|
||||
#include "x11/gl_manager_x11.h"
|
||||
#include "x11/gl_manager_x11_egl.h"
|
||||
#endif
|
||||
|
||||
#if defined(RD_ENABLED)
|
||||
#include "servers/rendering/rendering_device.h"
|
||||
|
||||
#if defined(VULKAN_ENABLED)
|
||||
#include "x11/rendering_context_driver_vulkan_x11.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(DBUS_ENABLED)
|
||||
#include "freedesktop_at_spi_monitor.h"
|
||||
#include "freedesktop_portal_desktop.h"
|
||||
#include "freedesktop_screensaver.h"
|
||||
#endif
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "x11/dynwrappers/xlib-so_wrap.h"
|
||||
|
||||
#include "x11/dynwrappers/xcursor-so_wrap.h"
|
||||
#include "x11/dynwrappers/xext-so_wrap.h"
|
||||
#include "x11/dynwrappers/xinerama-so_wrap.h"
|
||||
#include "x11/dynwrappers/xinput2-so_wrap.h"
|
||||
#include "x11/dynwrappers/xrandr-so_wrap.h"
|
||||
#include "x11/dynwrappers/xrender-so_wrap.h"
|
||||
|
||||
#include "xkbcommon-so_wrap.h"
|
||||
#else
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include <X11/Xcursor/Xcursor.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
|
||||
#ifdef XKB_ENABLED
|
||||
#include <xkbcommon/xkbcommon-compose.h>
|
||||
#include <xkbcommon/xkbcommon-keysyms.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct _xrr_monitor_info {
|
||||
Atom name;
|
||||
Bool primary = false;
|
||||
Bool automatic = false;
|
||||
int noutput = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
int mwidth = 0;
|
||||
int mheight = 0;
|
||||
RROutput *outputs = nullptr;
|
||||
} xrr_monitor_info;
|
||||
|
||||
#undef CursorShape
|
||||
|
||||
class DisplayServerX11 : public DisplayServer {
|
||||
GDSOFTCLASS(DisplayServerX11, DisplayServer);
|
||||
|
||||
_THREAD_SAFE_CLASS_
|
||||
|
||||
Atom wm_delete;
|
||||
Atom xdnd_enter;
|
||||
Atom xdnd_position;
|
||||
Atom xdnd_status;
|
||||
Atom xdnd_action_copy;
|
||||
Atom xdnd_drop;
|
||||
Atom xdnd_finished;
|
||||
Atom xdnd_selection;
|
||||
Atom xdnd_aware;
|
||||
Atom requested = None;
|
||||
int xdnd_version = 5;
|
||||
|
||||
#if defined(GLES3_ENABLED)
|
||||
GLManager_X11 *gl_manager = nullptr;
|
||||
GLManagerEGL_X11 *gl_manager_egl = nullptr;
|
||||
#endif
|
||||
#if defined(RD_ENABLED)
|
||||
RenderingContextDriver *rendering_context = nullptr;
|
||||
RenderingDevice *rendering_device = nullptr;
|
||||
#endif
|
||||
|
||||
#if defined(DBUS_ENABLED)
|
||||
FreeDesktopScreenSaver *screensaver = nullptr;
|
||||
bool keep_screen_on = false;
|
||||
#endif
|
||||
|
||||
#ifdef SPEECHD_ENABLED
|
||||
TTS_Linux *tts = nullptr;
|
||||
#endif
|
||||
NativeMenu *native_menu = nullptr;
|
||||
|
||||
#if defined(DBUS_ENABLED)
|
||||
FreeDesktopPortalDesktop *portal_desktop = nullptr;
|
||||
FreeDesktopAtSPIMonitor *atspi_monitor = nullptr;
|
||||
#endif
|
||||
|
||||
struct WindowData {
|
||||
Window x11_window;
|
||||
Window x11_xim_window;
|
||||
Window parent;
|
||||
::XIC xic;
|
||||
bool ime_active = false;
|
||||
bool ime_in_progress = false;
|
||||
bool ime_suppress_next_keyup = false;
|
||||
#ifdef XKB_ENABLED
|
||||
xkb_compose_state *xkb_state = nullptr;
|
||||
#endif
|
||||
|
||||
Size2i min_size;
|
||||
Size2i max_size;
|
||||
Point2i position;
|
||||
Size2i size;
|
||||
Callable rect_changed_callback;
|
||||
Callable event_callback;
|
||||
Callable input_event_callback;
|
||||
Callable input_text_callback;
|
||||
Callable drop_files_callback;
|
||||
|
||||
Vector<Vector2> mpath;
|
||||
|
||||
WindowID transient_parent = INVALID_WINDOW_ID;
|
||||
HashSet<WindowID> transient_children;
|
||||
|
||||
ObjectID instance_id;
|
||||
|
||||
bool no_focus = false;
|
||||
|
||||
//better to guess on the fly, given WM can change it
|
||||
//WindowMode mode;
|
||||
bool fullscreen = false; //OS can't exit from this mode
|
||||
bool exclusive_fullscreen = false;
|
||||
bool on_top = false;
|
||||
bool borderless = false;
|
||||
bool resize_disabled = false;
|
||||
bool no_min_btn = false;
|
||||
bool no_max_btn = false;
|
||||
Vector2i last_position_before_fs;
|
||||
bool focused = true;
|
||||
bool minimized = false;
|
||||
bool maximized = false;
|
||||
bool is_popup = false;
|
||||
bool layered_window = false;
|
||||
bool mpass = false;
|
||||
|
||||
Window embed_parent = 0;
|
||||
|
||||
Rect2i parent_safe_rect;
|
||||
|
||||
unsigned int focus_order = 0;
|
||||
};
|
||||
|
||||
Point2i im_selection;
|
||||
String im_text;
|
||||
|
||||
#ifdef XKB_ENABLED
|
||||
bool xkb_loaded_v05p = false;
|
||||
bool xkb_loaded_v08p = false;
|
||||
xkb_context *xkb_ctx = nullptr;
|
||||
xkb_compose_table *dead_tbl = nullptr;
|
||||
#endif
|
||||
|
||||
HashMap<WindowID, WindowData> windows;
|
||||
|
||||
unsigned int last_mouse_monitor_mask = 0;
|
||||
uint64_t time_since_popup = 0;
|
||||
|
||||
List<WindowID> popup_list;
|
||||
|
||||
WindowID window_mouseover_id = INVALID_WINDOW_ID;
|
||||
WindowID last_focused_window = INVALID_WINDOW_ID;
|
||||
|
||||
WindowID window_id_counter = MAIN_WINDOW_ID;
|
||||
WindowID _create_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect, Window p_parent_window);
|
||||
|
||||
String internal_clipboard;
|
||||
String internal_clipboard_primary;
|
||||
Window xdnd_source_window = 0;
|
||||
::Display *x11_display;
|
||||
char *xmbstring = nullptr;
|
||||
int xmblen = 0;
|
||||
unsigned long last_timestamp = 0;
|
||||
::Time last_keyrelease_time = 0;
|
||||
::XIM xim;
|
||||
::XIMStyle xim_style;
|
||||
|
||||
static int _xim_preedit_start_callback(::XIM xim, ::XPointer client_data,
|
||||
::XPointer call_data);
|
||||
static void _xim_preedit_done_callback(::XIM xim, ::XPointer client_data,
|
||||
::XPointer call_data);
|
||||
static void _xim_preedit_draw_callback(::XIM xim, ::XPointer client_data,
|
||||
::XIMPreeditDrawCallbackStruct *call_data);
|
||||
static void _xim_preedit_caret_callback(::XIM xim, ::XPointer client_data,
|
||||
::XIMPreeditCaretCallbackStruct *call_data);
|
||||
static void _xim_destroy_callback(::XIM im, ::XPointer client_data,
|
||||
::XPointer call_data);
|
||||
|
||||
Point2i last_mouse_pos;
|
||||
bool last_mouse_pos_valid = false;
|
||||
Point2i last_click_pos = Point2i(-100, -100);
|
||||
uint64_t last_click_ms = 0;
|
||||
MouseButton last_click_button_index = MouseButton::NONE;
|
||||
bool app_focused = false;
|
||||
uint64_t time_since_no_focus = 0;
|
||||
|
||||
struct {
|
||||
int opcode;
|
||||
Vector<int> touch_devices;
|
||||
HashMap<int, Vector2> absolute_devices;
|
||||
HashMap<int, Vector2> pen_pressure_range;
|
||||
HashMap<int, Vector2> pen_tilt_x_range;
|
||||
HashMap<int, Vector2> pen_tilt_y_range;
|
||||
HashMap<int, bool> pen_inverted_devices;
|
||||
XIEventMask all_event_mask;
|
||||
HashMap<int, Vector2> state;
|
||||
double pressure;
|
||||
bool pressure_supported;
|
||||
bool pen_inverted;
|
||||
Vector2 tilt;
|
||||
Vector2 mouse_pos_to_filter;
|
||||
Vector2 relative_motion;
|
||||
Vector2 raw_pos;
|
||||
Vector2 old_raw_pos;
|
||||
::Time last_relative_time;
|
||||
} xi;
|
||||
|
||||
bool _refresh_device_info();
|
||||
|
||||
Rect2i _screen_get_rect(int p_screen) const;
|
||||
|
||||
void _get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state);
|
||||
void _flush_mouse_motion();
|
||||
|
||||
MouseMode mouse_mode = MOUSE_MODE_VISIBLE;
|
||||
MouseMode mouse_mode_base = MOUSE_MODE_VISIBLE;
|
||||
MouseMode mouse_mode_override = MOUSE_MODE_VISIBLE;
|
||||
bool mouse_mode_override_enabled = false;
|
||||
void _mouse_update_mode();
|
||||
|
||||
Point2i center;
|
||||
|
||||
void _handle_key_event(WindowID p_window, XKeyEvent *p_event, LocalVector<XEvent> &p_events, uint32_t &p_event_index, bool p_echo = false);
|
||||
|
||||
Atom _process_selection_request_target(Atom p_target, Window p_requestor, Atom p_property, Atom p_selection) const;
|
||||
void _handle_selection_request_event(XSelectionRequestEvent *p_event) const;
|
||||
void _update_window_mouse_passthrough(WindowID p_window);
|
||||
|
||||
String _clipboard_get_impl(Atom p_source, Window x11_window, Atom target) const;
|
||||
String _clipboard_get(Atom p_source, Window x11_window) const;
|
||||
Atom _clipboard_get_image_target(Atom p_source, Window x11_window) const;
|
||||
void _clipboard_transfer_ownership(Atom p_source, Window x11_window) const;
|
||||
|
||||
bool do_mouse_warp = false;
|
||||
|
||||
const char *cursor_theme = nullptr;
|
||||
int cursor_size = 0;
|
||||
XcursorImage *cursor_img[CURSOR_MAX];
|
||||
Cursor cursors[CURSOR_MAX];
|
||||
Cursor null_cursor;
|
||||
CursorShape current_cursor = CURSOR_ARROW;
|
||||
HashMap<CursorShape, Vector<Variant>> cursors_cache;
|
||||
|
||||
String rendering_driver;
|
||||
void set_wm_fullscreen(bool p_enabled);
|
||||
void set_wm_above(bool p_enabled);
|
||||
|
||||
typedef xrr_monitor_info *(*xrr_get_monitors_t)(Display *dpy, Window window, Bool get_active, int *nmonitors);
|
||||
typedef void (*xrr_free_monitors_t)(xrr_monitor_info *monitors);
|
||||
xrr_get_monitors_t xrr_get_monitors = nullptr;
|
||||
xrr_free_monitors_t xrr_free_monitors = nullptr;
|
||||
void *xrandr_handle = nullptr;
|
||||
bool xrandr_ext_ok = true;
|
||||
bool xinerama_ext_ok = true;
|
||||
bool xshaped_ext_ok = true;
|
||||
bool xwayland = false;
|
||||
bool kde5_embed_workaround = false; // Workaround embedded game visibility on KDE 5 (GH-102043).
|
||||
|
||||
struct Property {
|
||||
unsigned char *data;
|
||||
int format, nitems;
|
||||
Atom type;
|
||||
};
|
||||
static Property _read_property(Display *p_display, Window p_window, Atom p_property);
|
||||
|
||||
void _update_real_mouse_position(const WindowData &wd);
|
||||
bool _window_maximize_check(WindowID p_window, const char *p_atom_name) const;
|
||||
bool _window_fullscreen_check(WindowID p_window) const;
|
||||
bool _window_minimize_check(WindowID p_window) const;
|
||||
void _validate_mode_on_map(WindowID p_window);
|
||||
void _update_size_hints(WindowID p_window);
|
||||
void _update_actions_hints(WindowID p_window);
|
||||
void _set_wm_fullscreen(WindowID p_window, bool p_enabled, bool p_exclusive);
|
||||
void _set_wm_maximized(WindowID p_window, bool p_enabled);
|
||||
void _set_wm_minimized(WindowID p_window, bool p_enabled);
|
||||
|
||||
void _update_context(WindowData &wd);
|
||||
|
||||
Context context = CONTEXT_ENGINE;
|
||||
bool swap_cancel_ok = false;
|
||||
|
||||
WindowID _get_focused_window_or_popup() const;
|
||||
bool _window_focus_check();
|
||||
|
||||
void _send_window_event(const WindowData &wd, WindowEvent p_event);
|
||||
static void _dispatch_input_events(const Ref<InputEvent> &p_event);
|
||||
void _dispatch_input_event(const Ref<InputEvent> &p_event);
|
||||
void _set_input_focus(Window p_window, int p_revert_to);
|
||||
|
||||
mutable Mutex events_mutex;
|
||||
Thread events_thread;
|
||||
SafeFlag events_thread_done;
|
||||
LocalVector<XEvent> polled_events;
|
||||
static void _poll_events_thread(void *ud);
|
||||
bool _wait_for_events() const;
|
||||
void _poll_events();
|
||||
void _check_pending_events(LocalVector<XEvent> &r_events);
|
||||
|
||||
static Bool _predicate_all_events(Display *display, XEvent *event, XPointer arg);
|
||||
static Bool _predicate_clipboard_selection(Display *display, XEvent *event, XPointer arg);
|
||||
static Bool _predicate_clipboard_incr(Display *display, XEvent *event, XPointer arg);
|
||||
static Bool _predicate_clipboard_save_targets(Display *display, XEvent *event, XPointer arg);
|
||||
|
||||
struct EmbeddedProcessData {
|
||||
Window process_window = 0;
|
||||
bool visible = true;
|
||||
};
|
||||
HashMap<OS::ProcessID, EmbeddedProcessData *> embedded_processes;
|
||||
|
||||
Point2i _get_window_position(Window p_window) const;
|
||||
Rect2i _get_window_rect(Window p_window) const;
|
||||
void _set_external_window_settings(Window p_window, Window p_parent_transient, WindowMode p_mode, uint32_t p_flags, const Rect2i &p_rect);
|
||||
void _set_window_taskbar_pager_enabled(Window p_window, bool p_enabled);
|
||||
Rect2i _screens_get_full_rect() const;
|
||||
|
||||
void initialize_tts() const;
|
||||
|
||||
protected:
|
||||
void _window_changed(XEvent *event);
|
||||
|
||||
public:
|
||||
bool mouse_process_popups();
|
||||
void popup_open(WindowID p_window);
|
||||
void popup_close(WindowID p_window);
|
||||
|
||||
virtual bool has_feature(Feature p_feature) const override;
|
||||
virtual String get_name() const override;
|
||||
|
||||
#ifdef SPEECHD_ENABLED
|
||||
virtual bool tts_is_speaking() const override;
|
||||
virtual bool tts_is_paused() const override;
|
||||
virtual TypedArray<Dictionary> tts_get_voices() const override;
|
||||
|
||||
virtual void tts_speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.f, float p_rate = 1.f, int p_utterance_id = 0, bool p_interrupt = false) override;
|
||||
virtual void tts_pause() override;
|
||||
virtual void tts_resume() override;
|
||||
virtual void tts_stop() override;
|
||||
#endif
|
||||
|
||||
#if defined(DBUS_ENABLED)
|
||||
virtual bool is_dark_mode_supported() const override;
|
||||
virtual bool is_dark_mode() const override;
|
||||
virtual Color get_accent_color() const override;
|
||||
virtual void set_system_theme_change_callback(const Callable &p_callable) override;
|
||||
|
||||
virtual Error file_dialog_show(const String &p_title, const String &p_current_directory, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const Callable &p_callback, WindowID p_window_id) override;
|
||||
virtual Error file_dialog_with_options_show(const String &p_title, const String &p_current_directory, const String &p_root, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const TypedArray<Dictionary> &p_options, const Callable &p_callback, WindowID p_window_id) override;
|
||||
#endif
|
||||
|
||||
virtual void beep() const override;
|
||||
|
||||
virtual void mouse_set_mode(MouseMode p_mode) override;
|
||||
virtual MouseMode mouse_get_mode() const override;
|
||||
virtual void mouse_set_mode_override(MouseMode p_mode) override;
|
||||
virtual MouseMode mouse_get_mode_override() const override;
|
||||
virtual void mouse_set_mode_override_enabled(bool p_override_enabled) override;
|
||||
virtual bool mouse_is_mode_override_enabled() const override;
|
||||
|
||||
virtual void warp_mouse(const Point2i &p_position) override;
|
||||
virtual Point2i mouse_get_position() const override;
|
||||
virtual BitField<MouseButtonMask> mouse_get_button_state() const override;
|
||||
|
||||
virtual void clipboard_set(const String &p_text) override;
|
||||
virtual String clipboard_get() const override;
|
||||
virtual Ref<Image> clipboard_get_image() const override;
|
||||
virtual bool clipboard_has_image() const override;
|
||||
virtual void clipboard_set_primary(const String &p_text) override;
|
||||
virtual String clipboard_get_primary() const override;
|
||||
|
||||
virtual int get_screen_count() const override;
|
||||
virtual int get_primary_screen() const override;
|
||||
virtual int get_keyboard_focus_screen() const override;
|
||||
virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||
virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||
virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||
virtual Color screen_get_pixel(const Point2i &p_position) const override;
|
||||
virtual Ref<Image> screen_get_image(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
|
||||
|
||||
#if defined(DBUS_ENABLED)
|
||||
virtual void screen_set_keep_on(bool p_enable) override;
|
||||
virtual bool screen_is_kept_on() const override;
|
||||
#endif
|
||||
|
||||
virtual Vector<DisplayServer::WindowID> get_window_list() const override;
|
||||
|
||||
virtual WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i(), bool p_exclusive = false, WindowID p_transient_parent = INVALID_WINDOW_ID) override;
|
||||
virtual void show_window(WindowID p_id) override;
|
||||
virtual void delete_sub_window(WindowID p_id) override;
|
||||
|
||||
virtual WindowID window_get_active_popup() const override;
|
||||
virtual void window_set_popup_safe_rect(WindowID p_window, const Rect2i &p_rect) override;
|
||||
virtual Rect2i window_get_popup_safe_rect(WindowID p_window) const override;
|
||||
|
||||
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const override;
|
||||
|
||||
virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
|
||||
virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual void window_set_window_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual void window_set_input_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual void window_set_input_text_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual void window_set_drop_files_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
|
||||
virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
virtual void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
|
||||
virtual Point2i window_get_position(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
virtual Point2i window_get_position_with_decorations(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
virtual void window_set_position(const Point2i &p_position, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
|
||||
virtual void window_set_max_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual Size2i window_get_max_size(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
virtual void gl_window_make_current(DisplayServer::WindowID p_window_id) override;
|
||||
|
||||
virtual void window_set_transient(WindowID p_window, WindowID p_parent) override;
|
||||
|
||||
virtual void window_set_min_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual Size2i window_get_min_size(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual void window_set_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual Size2i window_get_size(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
virtual Size2i window_get_size_with_decorations(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual void window_set_mode(WindowMode p_mode, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual WindowMode window_get_mode(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual bool window_is_maximize_allowed(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual void window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual bool window_get_flag(WindowFlags p_flag, WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual void window_request_attention(WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
|
||||
virtual void window_move_to_foreground(WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual bool window_is_focused(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual WindowID get_focused_window() const override;
|
||||
|
||||
virtual bool window_can_draw(WindowID p_window = MAIN_WINDOW_ID) const override;
|
||||
|
||||
virtual bool can_any_window_draw() const override;
|
||||
|
||||
virtual void window_set_ime_active(const bool p_active, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual void window_set_ime_position(const Point2i &p_pos, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
|
||||
virtual int accessibility_should_increase_contrast() const override;
|
||||
virtual int accessibility_screen_reader_active() const override;
|
||||
|
||||
virtual Point2i ime_get_selection() const override;
|
||||
virtual String ime_get_text() const override;
|
||||
|
||||
virtual void window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual DisplayServer::VSyncMode window_get_vsync_mode(WindowID p_vsync_mode) const override;
|
||||
|
||||
virtual void window_start_drag(WindowID p_window = MAIN_WINDOW_ID) override;
|
||||
virtual void window_start_resize(WindowResizeEdge p_edge, WindowID p_window) override;
|
||||
|
||||
virtual Error embed_process(WindowID p_window, OS::ProcessID p_pid, const Rect2i &p_rect, bool p_visible, bool p_grab_focus) override;
|
||||
virtual Error request_close_embedded_process(OS::ProcessID p_pid) override;
|
||||
virtual Error remove_embedded_process(OS::ProcessID p_pid) override;
|
||||
virtual OS::ProcessID get_focused_process_id() override;
|
||||
|
||||
virtual void cursor_set_shape(CursorShape p_shape) override;
|
||||
virtual CursorShape cursor_get_shape() const override;
|
||||
virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) override;
|
||||
|
||||
virtual bool get_swap_cancel_ok() override;
|
||||
|
||||
virtual int keyboard_get_layout_count() const override;
|
||||
virtual int keyboard_get_current_layout() const override;
|
||||
virtual void keyboard_set_current_layout(int p_index) override;
|
||||
virtual String keyboard_get_layout_language(int p_index) const override;
|
||||
virtual String keyboard_get_layout_name(int p_index) const override;
|
||||
virtual Key keyboard_get_keycode_from_physical(Key p_keycode) const override;
|
||||
virtual Key keyboard_get_label_from_physical(Key p_keycode) const override;
|
||||
|
||||
virtual bool color_picker(const Callable &p_callback) override;
|
||||
|
||||
virtual void process_events() override;
|
||||
|
||||
virtual void release_rendering_thread() override;
|
||||
virtual void swap_buffers() override;
|
||||
|
||||
virtual void set_context(Context p_context) override;
|
||||
|
||||
virtual bool is_window_transparency_available() const override;
|
||||
|
||||
virtual void set_native_icon(const String &p_filename) override;
|
||||
virtual void set_icon(const Ref<Image> &p_icon) override;
|
||||
|
||||
static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Context p_context, int64_t p_parent_window, Error &r_error);
|
||||
static Vector<String> get_rendering_drivers_func();
|
||||
|
||||
static void register_x11_driver();
|
||||
|
||||
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, int p_screen, Context p_context, int64_t p_parent_window, Error &r_error);
|
||||
~DisplayServerX11();
|
||||
};
|
||||
|
||||
#endif // X11_ENABLED
|
||||
672
platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c
Normal file
672
platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c
Normal file
@@ -0,0 +1,672 @@
|
||||
// This file is generated. Do not edit!
|
||||
// see https://github.com/hpvb/dynload-wrapper for details
|
||||
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:50:26
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/Xcursor/Xcursor.h --sys-include thirdparty/linuxbsd_headers/X11/Xcursor/Xcursor.h --soname libXcursor.so.1 --init-name xcursor --output-header ./platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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;
|
||||
}
|
||||
254
platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h
Normal file
254
platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h
Normal file
@@ -0,0 +1,254 @@
|
||||
#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.7 on 2024-12-12 14:50:26
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/Xcursor/Xcursor.h --sys-include thirdparty/linuxbsd_headers/X11/Xcursor/Xcursor.h --soname libXcursor.so.1 --init-name xcursor --output-header ./platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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
|
||||
146
platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c
Normal file
146
platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c
Normal file
@@ -0,0 +1,146 @@
|
||||
// This file is generated. Do not edit!
|
||||
// see https://github.com/hpvb/dynload-wrapper for details
|
||||
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:50:47
|
||||
// flags: generate-wrapper.py --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xext.h --include ./thirdparty/linuxbsd_headers/X11/extensions/shape.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/shape.h --soname libXext.so.6 --init-name xext --output-header ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c --ignore-other --implementation-header thirdparty/linuxbsd_headers/X11/Xlib.h
|
||||
//
|
||||
#include <stdint.h>
|
||||
|
||||
#include "thirdparty/linuxbsd_headers/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 "thirdparty/linuxbsd_headers/X11/extensions/Xext.h"
|
||||
#include "thirdparty/linuxbsd_headers/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;
|
||||
}
|
||||
63
platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h
Normal file
63
platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#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.7 on 2024-12-12 14:50:47
|
||||
// flags: generate-wrapper.py --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xext.h --include ./thirdparty/linuxbsd_headers/X11/extensions/shape.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/shape.h --soname libXext.so.6 --init-name xext --output-header ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c --ignore-other --implementation-header thirdparty/linuxbsd_headers/X11/Xlib.h
|
||||
//
|
||||
#include <stdint.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 "thirdparty/linuxbsd_headers/X11/extensions/Xext.h"
|
||||
#include "thirdparty/linuxbsd_headers/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
|
||||
67
platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c
Normal file
67
platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c
Normal file
@@ -0,0 +1,67 @@
|
||||
// This file is generated. Do not edit!
|
||||
// see https://github.com/hpvb/dynload-wrapper for details
|
||||
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:51:18
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --soname libXinerama.so.1 --init-name xinerama --output-header ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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;
|
||||
}
|
||||
34
platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h
Normal file
34
platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#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.7 on 2024-12-12 14:51:18
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --soname libXinerama.so.1 --init-name xinerama --output-header ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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
|
||||
397
platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c
Normal file
397
platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c
Normal file
@@ -0,0 +1,397 @@
|
||||
// This file is generated. Do not edit!
|
||||
// see https://github.com/hpvb/dynload-wrapper for details
|
||||
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:51:34
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/XInput2.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/XInput2.h --soname libXi.so.6 --init-name xinput2 --output-header ./platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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;
|
||||
}
|
||||
154
platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h
Normal file
154
platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h
Normal file
@@ -0,0 +1,154 @@
|
||||
#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.7 on 2024-12-12 14:51:34
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/XInput2.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/XInput2.h --soname libXi.so.6 --init-name xinput2 --output-header ./platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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
|
||||
6669
platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c
Normal file
6669
platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c
Normal file
File diff suppressed because it is too large
Load Diff
2436
platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h
Normal file
2436
platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h
Normal file
File diff suppressed because it is too large
Load Diff
793
platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c
Normal file
793
platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c
Normal file
@@ -0,0 +1,793 @@
|
||||
// This file is generated. Do not edit!
|
||||
// see https://github.com/hpvb/dynload-wrapper for details
|
||||
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:51:53
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xrandr.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xrandr.h --soname libXrandr.so.2 --init-name xrandr --output-header ./platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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;
|
||||
}
|
||||
298
platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h
Normal file
298
platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h
Normal file
@@ -0,0 +1,298 @@
|
||||
#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.7 on 2024-12-12 14:51:53
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xrandr.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xrandr.h --soname libXrandr.so.2 --init-name xrandr --output-header ./platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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
|
||||
507
platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c
Normal file
507
platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c
Normal file
@@ -0,0 +1,507 @@
|
||||
// This file is generated. Do not edit!
|
||||
// see https://github.com/hpvb/dynload-wrapper for details
|
||||
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:52:10
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xrender.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xrender.h --soname libXrender.so.1 --init-name xrender --output-header ./platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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;
|
||||
}
|
||||
194
platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h
Normal file
194
platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h
Normal file
@@ -0,0 +1,194 @@
|
||||
#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.7 on 2024-12-12 14:52:10
|
||||
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xrender.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xrender.h --soname libXrender.so.1 --init-name xrender --output-header ./platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c --ignore-other
|
||||
//
|
||||
#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 "thirdparty/linuxbsd_headers/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
|
||||
399
platform/linuxbsd/x11/gl_manager_x11.cpp
Normal file
399
platform/linuxbsd/x11/gl_manager_x11.cpp
Normal file
@@ -0,0 +1,399 @@
|
||||
/**************************************************************************/
|
||||
/* gl_manager_x11.cpp */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#include "gl_manager_x11.h"
|
||||
|
||||
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
|
||||
|
||||
#include "thirdparty/glad/glad/glx.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
|
||||
typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
|
||||
|
||||
// To prevent shadowing warnings
|
||||
#undef glXCreateContextAttribsARB
|
||||
|
||||
struct GLManager_X11_Private {
|
||||
::GLXContext glx_context;
|
||||
};
|
||||
|
||||
GLManager_X11::GLDisplay::~GLDisplay() {
|
||||
if (context) {
|
||||
//release_current();
|
||||
glXDestroyContext(x11_display, context->glx_context);
|
||||
memdelete(context);
|
||||
context = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
static bool ctxErrorOccurred = false;
|
||||
static int ctxErrorHandler(Display *dpy, XErrorEvent *ev) {
|
||||
ctxErrorOccurred = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GLManager_X11::_find_or_create_display(Display *p_x11_display) {
|
||||
for (unsigned int n = 0; n < _displays.size(); n++) {
|
||||
const GLDisplay &d = _displays[n];
|
||||
if (d.x11_display == p_x11_display) {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
// create
|
||||
GLDisplay d_temp;
|
||||
d_temp.x11_display = p_x11_display;
|
||||
_displays.push_back(d_temp);
|
||||
int new_display_id = _displays.size() - 1;
|
||||
|
||||
// create context
|
||||
GLDisplay &d = _displays[new_display_id];
|
||||
|
||||
d.context = memnew(GLManager_X11_Private);
|
||||
d.context->glx_context = nullptr;
|
||||
|
||||
Error err = _create_context(d);
|
||||
|
||||
if (err != OK) {
|
||||
_displays.remove_at(new_display_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return new_display_id;
|
||||
}
|
||||
|
||||
Error GLManager_X11::_create_context(GLDisplay &gl_display) {
|
||||
// some aliases
|
||||
::Display *x11_display = gl_display.x11_display;
|
||||
|
||||
//const char *extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display));
|
||||
|
||||
GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte *)"glXCreateContextAttribsARB");
|
||||
|
||||
ERR_FAIL_NULL_V(glXCreateContextAttribsARB, ERR_UNCONFIGURED);
|
||||
|
||||
static int visual_attribs[] = {
|
||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
|
||||
GLX_DOUBLEBUFFER, true,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_DEPTH_SIZE, 24,
|
||||
None
|
||||
};
|
||||
|
||||
static int visual_attribs_layered[] = {
|
||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
|
||||
GLX_DOUBLEBUFFER, true,
|
||||
GLX_RED_SIZE, 8,
|
||||
GLX_GREEN_SIZE, 8,
|
||||
GLX_BLUE_SIZE, 8,
|
||||
GLX_ALPHA_SIZE, 8,
|
||||
GLX_DEPTH_SIZE, 24,
|
||||
None
|
||||
};
|
||||
|
||||
int fbcount;
|
||||
GLXFBConfig fbconfig = nullptr;
|
||||
XVisualInfo *vi = nullptr;
|
||||
|
||||
if (OS::get_singleton()->is_layered_allowed()) {
|
||||
GLXFBConfig *fbc = glXChooseFBConfig(x11_display, DefaultScreen(x11_display), visual_attribs_layered, &fbcount);
|
||||
ERR_FAIL_NULL_V(fbc, ERR_UNCONFIGURED);
|
||||
|
||||
for (int i = 0; i < fbcount; i++) {
|
||||
if (vi) {
|
||||
XFree(vi);
|
||||
vi = nullptr;
|
||||
}
|
||||
vi = (XVisualInfo *)glXGetVisualFromFBConfig(x11_display, fbc[i]);
|
||||
if (!vi) {
|
||||
continue;
|
||||
}
|
||||
|
||||
XRenderPictFormat *pict_format = XRenderFindVisualFormat(x11_display, vi->visual);
|
||||
if (!pict_format) {
|
||||
XFree(vi);
|
||||
vi = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
fbconfig = fbc[i];
|
||||
if (pict_format->direct.alphaMask > 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
XFree(fbc);
|
||||
|
||||
ERR_FAIL_NULL_V(fbconfig, ERR_UNCONFIGURED);
|
||||
} else {
|
||||
GLXFBConfig *fbc = glXChooseFBConfig(x11_display, DefaultScreen(x11_display), visual_attribs, &fbcount);
|
||||
ERR_FAIL_NULL_V(fbc, ERR_UNCONFIGURED);
|
||||
|
||||
vi = glXGetVisualFromFBConfig(x11_display, fbc[0]);
|
||||
|
||||
fbconfig = fbc[0];
|
||||
XFree(fbc);
|
||||
}
|
||||
|
||||
int (*oldHandler)(Display *, XErrorEvent *) = XSetErrorHandler(&ctxErrorHandler);
|
||||
|
||||
switch (context_type) {
|
||||
case GLES_3_0_COMPATIBLE: {
|
||||
static int context_attribs[] = {
|
||||
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
|
||||
GLX_CONTEXT_MINOR_VERSION_ARB, 3,
|
||||
GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB /*|GLX_CONTEXT_DEBUG_BIT_ARB*/,
|
||||
None
|
||||
};
|
||||
|
||||
gl_display.context->glx_context = glXCreateContextAttribsARB(x11_display, fbconfig, nullptr, true, context_attribs);
|
||||
ERR_FAIL_COND_V(ctxErrorOccurred || !gl_display.context->glx_context, ERR_UNCONFIGURED);
|
||||
} break;
|
||||
}
|
||||
|
||||
XSync(x11_display, False);
|
||||
XSetErrorHandler(oldHandler);
|
||||
|
||||
// make our own copy of the vi data
|
||||
// for later creating windows using this display
|
||||
if (vi) {
|
||||
gl_display.x_vi = *vi;
|
||||
}
|
||||
|
||||
XFree(vi);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
XVisualInfo GLManager_X11::get_vi(Display *p_display, Error &r_error) {
|
||||
int display_id = _find_or_create_display(p_display);
|
||||
if (display_id < 0) {
|
||||
r_error = FAILED;
|
||||
return XVisualInfo();
|
||||
}
|
||||
r_error = OK;
|
||||
return _displays[display_id].x_vi;
|
||||
}
|
||||
|
||||
Error GLManager_X11::open_display(Display *p_display) {
|
||||
int gldisplay_id = _find_or_create_display(p_display);
|
||||
if (gldisplay_id < 0) {
|
||||
return ERR_CANT_CREATE;
|
||||
} else {
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
Error GLManager_X11::window_create(DisplayServer::WindowID p_window_id, ::Window p_window, Display *p_display, int p_width, int p_height) {
|
||||
// make sure vector is big enough...
|
||||
// we can mirror the external vector, it is simpler
|
||||
// to keep the IDs identical for fast lookup
|
||||
if (p_window_id >= (int)_windows.size()) {
|
||||
_windows.resize(p_window_id + 1);
|
||||
}
|
||||
|
||||
GLWindow &win = _windows[p_window_id];
|
||||
win.in_use = true;
|
||||
win.window_id = p_window_id;
|
||||
win.width = p_width;
|
||||
win.height = p_height;
|
||||
win.x11_window = p_window;
|
||||
win.gldisplay_id = _find_or_create_display(p_display);
|
||||
|
||||
if (win.gldisplay_id == -1) {
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
// the display could be invalid .. check NYI
|
||||
GLDisplay &gl_display = _displays[win.gldisplay_id];
|
||||
::Display *x11_display = gl_display.x11_display;
|
||||
::Window &x11_window = win.x11_window;
|
||||
|
||||
if (!glXMakeCurrent(x11_display, x11_window, gl_display.context->glx_context)) {
|
||||
ERR_PRINT("glXMakeCurrent failed");
|
||||
}
|
||||
|
||||
_internal_set_current_window(&win);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
void GLManager_X11::_internal_set_current_window(GLWindow *p_win) {
|
||||
_current_window = p_win;
|
||||
|
||||
// quick access to x info
|
||||
_x_windisp.x11_window = _current_window->x11_window;
|
||||
const GLDisplay &disp = get_current_display();
|
||||
_x_windisp.x11_display = disp.x11_display;
|
||||
}
|
||||
|
||||
void GLManager_X11::window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) {
|
||||
get_window(p_window_id).width = p_width;
|
||||
get_window(p_window_id).height = p_height;
|
||||
}
|
||||
|
||||
void GLManager_X11::window_destroy(DisplayServer::WindowID p_window_id) {
|
||||
GLWindow &win = get_window(p_window_id);
|
||||
win.in_use = false;
|
||||
|
||||
if (_current_window == &win) {
|
||||
_current_window = nullptr;
|
||||
_x_windisp.x11_display = nullptr;
|
||||
_x_windisp.x11_window = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void GLManager_X11::release_current() {
|
||||
if (!_current_window) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!glXMakeCurrent(_x_windisp.x11_display, None, nullptr)) {
|
||||
ERR_PRINT("glXMakeCurrent failed");
|
||||
}
|
||||
_current_window = nullptr;
|
||||
}
|
||||
|
||||
void GLManager_X11::window_make_current(DisplayServer::WindowID p_window_id) {
|
||||
if (p_window_id == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
GLWindow &win = _windows[p_window_id];
|
||||
if (!win.in_use) {
|
||||
return;
|
||||
}
|
||||
|
||||
// noop
|
||||
if (&win == _current_window) {
|
||||
return;
|
||||
}
|
||||
|
||||
const GLDisplay &disp = get_display(win.gldisplay_id);
|
||||
|
||||
if (!glXMakeCurrent(disp.x11_display, win.x11_window, disp.context->glx_context)) {
|
||||
ERR_PRINT("glXMakeCurrent failed");
|
||||
}
|
||||
|
||||
_internal_set_current_window(&win);
|
||||
}
|
||||
|
||||
void GLManager_X11::swap_buffers() {
|
||||
if (!_current_window) {
|
||||
return;
|
||||
}
|
||||
if (!_current_window->in_use) {
|
||||
WARN_PRINT("current window not in use!");
|
||||
return;
|
||||
}
|
||||
|
||||
// On X11, when enabled, transparency is always active, so clear alpha manually.
|
||||
if (OS::get_singleton()->is_layered_allowed()) {
|
||||
if (!DisplayServer::get_singleton()->window_get_flag(DisplayServer::WINDOW_FLAG_TRANSPARENT, _current_window->window_id)) {
|
||||
glColorMask(false, false, false, true);
|
||||
glClearColor(0, 0, 0, 1);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glColorMask(true, true, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
glXSwapBuffers(_x_windisp.x11_display, _x_windisp.x11_window);
|
||||
}
|
||||
|
||||
Error GLManager_X11::initialize(Display *p_display) {
|
||||
if (!gladLoaderLoadGLX(p_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(p_display)))) {
|
||||
return ERR_CANT_CREATE;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
void GLManager_X11::set_use_vsync(bool p_use) {
|
||||
// we need an active window to get a display to set the vsync
|
||||
if (!_current_window) {
|
||||
return;
|
||||
}
|
||||
const GLDisplay &disp = get_current_display();
|
||||
|
||||
int val = p_use ? 1 : 0;
|
||||
if (GLAD_GLX_MESA_swap_control) {
|
||||
glXSwapIntervalMESA(val);
|
||||
} else if (GLAD_GLX_SGI_swap_control) {
|
||||
glXSwapIntervalSGI(val);
|
||||
} else if (GLAD_GLX_EXT_swap_control) {
|
||||
GLXDrawable drawable = glXGetCurrentDrawable();
|
||||
glXSwapIntervalEXT(disp.x11_display, drawable, val);
|
||||
} else {
|
||||
WARN_PRINT_ONCE("Could not set V-Sync mode, as changing V-Sync mode is not supported by the graphics driver.");
|
||||
return;
|
||||
}
|
||||
use_vsync = p_use;
|
||||
}
|
||||
|
||||
bool GLManager_X11::is_using_vsync() const {
|
||||
return use_vsync;
|
||||
}
|
||||
|
||||
void *GLManager_X11::get_glx_context(DisplayServer::WindowID p_window_id) {
|
||||
if (p_window_id == -1) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const GLWindow &win = _windows[p_window_id];
|
||||
const GLDisplay &disp = get_display(win.gldisplay_id);
|
||||
|
||||
return (void *)disp.context->glx_context;
|
||||
}
|
||||
|
||||
GLManager_X11::GLManager_X11(const Vector2i &p_size, ContextType p_context_type) {
|
||||
context_type = p_context_type;
|
||||
|
||||
double_buffer = false;
|
||||
direct_render = false;
|
||||
glx_minor = glx_major = 0;
|
||||
use_vsync = false;
|
||||
_current_window = nullptr;
|
||||
}
|
||||
|
||||
GLManager_X11::~GLManager_X11() {
|
||||
release_current();
|
||||
}
|
||||
|
||||
#endif // X11_ENABLED && GLES3_ENABLED
|
||||
135
platform/linuxbsd/x11/gl_manager_x11.h
Normal file
135
platform/linuxbsd/x11/gl_manager_x11.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/**************************************************************************/
|
||||
/* gl_manager_x11.h */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
|
||||
|
||||
#include "core/os/os.h"
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "servers/display_server.h"
|
||||
|
||||
#ifdef SOWRAP_ENABLED
|
||||
#include "dynwrappers/xlib-so_wrap.h"
|
||||
|
||||
#include "dynwrappers/xext-so_wrap.h"
|
||||
#include "dynwrappers/xrender-so_wrap.h"
|
||||
#else
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
#endif
|
||||
|
||||
struct GLManager_X11_Private;
|
||||
|
||||
class GLManager_X11 {
|
||||
public:
|
||||
enum ContextType {
|
||||
GLES_3_0_COMPATIBLE,
|
||||
};
|
||||
|
||||
private:
|
||||
// any data specific to the window
|
||||
struct GLWindow {
|
||||
bool in_use = false;
|
||||
|
||||
// the external ID .. should match the GL window number .. unused I think
|
||||
DisplayServer::WindowID window_id = DisplayServer::INVALID_WINDOW_ID;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
::Window x11_window;
|
||||
int gldisplay_id = 0;
|
||||
};
|
||||
|
||||
struct GLDisplay {
|
||||
GLDisplay() {}
|
||||
~GLDisplay();
|
||||
GLManager_X11_Private *context = nullptr;
|
||||
::Display *x11_display = nullptr;
|
||||
XVisualInfo x_vi = {};
|
||||
};
|
||||
|
||||
// just for convenience, window and display struct
|
||||
struct XWinDisp {
|
||||
::Window x11_window;
|
||||
::Display *x11_display = nullptr;
|
||||
} _x_windisp;
|
||||
|
||||
LocalVector<GLWindow> _windows;
|
||||
LocalVector<GLDisplay> _displays;
|
||||
|
||||
GLWindow *_current_window = nullptr;
|
||||
|
||||
void _internal_set_current_window(GLWindow *p_win);
|
||||
|
||||
GLWindow &get_window(unsigned int id) { return _windows[id]; }
|
||||
const GLWindow &get_window(unsigned int id) const { return _windows[id]; }
|
||||
|
||||
const GLDisplay &get_current_display() const { return _displays[_current_window->gldisplay_id]; }
|
||||
const GLDisplay &get_display(unsigned int id) { return _displays[id]; }
|
||||
|
||||
bool double_buffer;
|
||||
bool direct_render;
|
||||
int glx_minor, glx_major;
|
||||
bool use_vsync;
|
||||
ContextType context_type;
|
||||
|
||||
private:
|
||||
int _find_or_create_display(Display *p_x11_display);
|
||||
Error _create_context(GLDisplay &gl_display);
|
||||
|
||||
public:
|
||||
XVisualInfo get_vi(Display *p_display, Error &r_error);
|
||||
Error window_create(DisplayServer::WindowID p_window_id, ::Window p_window, Display *p_display, int p_width, int p_height);
|
||||
void window_destroy(DisplayServer::WindowID p_window_id);
|
||||
void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height);
|
||||
|
||||
void release_current();
|
||||
void swap_buffers();
|
||||
|
||||
void window_make_current(DisplayServer::WindowID p_window_id);
|
||||
|
||||
Error initialize(Display *p_display);
|
||||
|
||||
void set_use_vsync(bool p_use);
|
||||
bool is_using_vsync() const;
|
||||
|
||||
void *get_glx_context(DisplayServer::WindowID p_window_id);
|
||||
|
||||
Error open_display(Display *p_display);
|
||||
GLManager_X11(const Vector2i &p_size, ContextType p_context_type);
|
||||
~GLManager_X11();
|
||||
};
|
||||
|
||||
#endif // X11_ENABLED && GLES3_ENABLED
|
||||
63
platform/linuxbsd/x11/gl_manager_x11_egl.cpp
Normal file
63
platform/linuxbsd/x11/gl_manager_x11_egl.cpp
Normal file
@@ -0,0 +1,63 @@
|
||||
/**************************************************************************/
|
||||
/* gl_manager_x11_egl.cpp */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#include "gl_manager_x11_egl.h"
|
||||
|
||||
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
const char *GLManagerEGL_X11::_get_platform_extension_name() const {
|
||||
return "EGL_KHR_platform_x11";
|
||||
}
|
||||
|
||||
EGLenum GLManagerEGL_X11::_get_platform_extension_enum() const {
|
||||
return EGL_PLATFORM_X11_KHR;
|
||||
}
|
||||
|
||||
Vector<EGLAttrib> GLManagerEGL_X11::_get_platform_display_attributes() const {
|
||||
return Vector<EGLAttrib>();
|
||||
}
|
||||
|
||||
EGLenum GLManagerEGL_X11::_get_platform_api_enum() const {
|
||||
return EGL_OPENGL_ES_API;
|
||||
}
|
||||
|
||||
Vector<EGLint> GLManagerEGL_X11::_get_platform_context_attribs() const {
|
||||
Vector<EGLint> ret;
|
||||
ret.push_back(EGL_CONTEXT_CLIENT_VERSION);
|
||||
ret.push_back(3);
|
||||
ret.push_back(EGL_NONE);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif // WINDOWS_ENABLED && GLES3_ENABLED
|
||||
57
platform/linuxbsd/x11/gl_manager_x11_egl.h
Normal file
57
platform/linuxbsd/x11/gl_manager_x11_egl.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/**************************************************************************/
|
||||
/* gl_manager_x11_egl.h */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
|
||||
|
||||
#include "core/os/os.h"
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "drivers/egl/egl_manager.h"
|
||||
#include "servers/display_server.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
class GLManagerEGL_X11 : public EGLManager {
|
||||
private:
|
||||
virtual const char *_get_platform_extension_name() const override;
|
||||
virtual EGLenum _get_platform_extension_enum() const override;
|
||||
virtual EGLenum _get_platform_api_enum() const override;
|
||||
virtual Vector<EGLAttrib> _get_platform_display_attributes() const override;
|
||||
virtual Vector<EGLint> _get_platform_context_attribs() const override;
|
||||
|
||||
public:
|
||||
void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) {}
|
||||
|
||||
GLManagerEGL_X11() {}
|
||||
~GLManagerEGL_X11() {}
|
||||
};
|
||||
|
||||
#endif // X11_ENABLED && GLES3_ENABLED
|
||||
1246
platform/linuxbsd/x11/key_mapping_x11.cpp
Normal file
1246
platform/linuxbsd/x11/key_mapping_x11.cpp
Normal file
File diff suppressed because it is too large
Load Diff
69
platform/linuxbsd/x11/key_mapping_x11.h
Normal file
69
platform/linuxbsd/x11/key_mapping_x11.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/**************************************************************************/
|
||||
/* key_mapping_x11.h */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/templates/hash_map.h"
|
||||
|
||||
#include <X11/XF86keysym.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#define XK_MISCELLANY
|
||||
#define XK_LATIN1
|
||||
#define XK_XKB_KEYS
|
||||
#include <X11/keysymdef.h>
|
||||
|
||||
class KeyMappingX11 {
|
||||
struct HashMapHasherKeys {
|
||||
static _FORCE_INLINE_ uint32_t hash(const Key p_key) { return hash_fmix32(static_cast<uint32_t>(p_key)); }
|
||||
static _FORCE_INLINE_ uint32_t hash(const char32_t p_uchar) { return hash_fmix32(p_uchar); }
|
||||
static _FORCE_INLINE_ uint32_t hash(const unsigned p_key) { return hash_fmix32(p_key); }
|
||||
static _FORCE_INLINE_ uint32_t hash(const KeySym p_key) { return hash_fmix32(p_key); }
|
||||
};
|
||||
|
||||
static inline HashMap<KeySym, Key, HashMapHasherKeys> xkeysym_map;
|
||||
static inline HashMap<unsigned int, Key, HashMapHasherKeys> scancode_map;
|
||||
static inline HashMap<Key, unsigned int, HashMapHasherKeys> scancode_map_inv;
|
||||
static inline HashMap<KeySym, char32_t, HashMapHasherKeys> xkeysym_unicode_map;
|
||||
static inline HashMap<unsigned int, KeyLocation, HashMapHasherKeys> location_map;
|
||||
|
||||
KeyMappingX11() {}
|
||||
|
||||
public:
|
||||
static void initialize();
|
||||
|
||||
static bool is_sym_numpad(KeySym p_keysym);
|
||||
static Key get_keycode(KeySym p_keysym);
|
||||
static unsigned int get_xlibcode(Key p_keysym);
|
||||
static Key get_scancode(unsigned int p_code);
|
||||
static char32_t get_unicode_from_keysym(KeySym p_keysym);
|
||||
static KeyLocation get_location(unsigned int p_code);
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
/**************************************************************************/
|
||||
/* rendering_context_driver_vulkan_x11.cpp */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifdef VULKAN_ENABLED
|
||||
|
||||
#include "rendering_context_driver_vulkan_x11.h"
|
||||
|
||||
#include "drivers/vulkan/godot_vulkan.h"
|
||||
|
||||
const char *RenderingContextDriverVulkanX11::_get_platform_surface_extension() const {
|
||||
return VK_KHR_XLIB_SURFACE_EXTENSION_NAME;
|
||||
}
|
||||
|
||||
RenderingContextDriver::SurfaceID RenderingContextDriverVulkanX11::surface_create(const void *p_platform_data) {
|
||||
const WindowPlatformData *wpd = (const WindowPlatformData *)(p_platform_data);
|
||||
|
||||
VkXlibSurfaceCreateInfoKHR create_info = {};
|
||||
create_info.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;
|
||||
create_info.dpy = wpd->display;
|
||||
create_info.window = wpd->window;
|
||||
|
||||
VkSurfaceKHR vk_surface = VK_NULL_HANDLE;
|
||||
VkResult err = vkCreateXlibSurfaceKHR(instance_get(), &create_info, get_allocation_callbacks(VK_OBJECT_TYPE_SURFACE_KHR), &vk_surface);
|
||||
ERR_FAIL_COND_V(err != VK_SUCCESS, SurfaceID());
|
||||
|
||||
Surface *surface = memnew(Surface);
|
||||
surface->vk_surface = vk_surface;
|
||||
return SurfaceID(surface);
|
||||
}
|
||||
|
||||
RenderingContextDriverVulkanX11::RenderingContextDriverVulkanX11() {
|
||||
// Does nothing.
|
||||
}
|
||||
|
||||
RenderingContextDriverVulkanX11::~RenderingContextDriverVulkanX11() {
|
||||
// Does nothing.
|
||||
}
|
||||
|
||||
#endif // VULKAN_ENABLED
|
||||
56
platform/linuxbsd/x11/rendering_context_driver_vulkan_x11.h
Normal file
56
platform/linuxbsd/x11/rendering_context_driver_vulkan_x11.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/**************************************************************************/
|
||||
/* rendering_context_driver_vulkan_x11.h */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef VULKAN_ENABLED
|
||||
|
||||
#include "drivers/vulkan/rendering_context_driver_vulkan.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
class RenderingContextDriverVulkanX11 : public RenderingContextDriverVulkan {
|
||||
private:
|
||||
virtual const char *_get_platform_surface_extension() const override final;
|
||||
|
||||
protected:
|
||||
SurfaceID surface_create(const void *p_platform_data) override final;
|
||||
|
||||
public:
|
||||
struct WindowPlatformData {
|
||||
::Window window;
|
||||
Display *display;
|
||||
};
|
||||
|
||||
RenderingContextDriverVulkanX11();
|
||||
~RenderingContextDriverVulkanX11();
|
||||
};
|
||||
|
||||
#endif // VULKAN_ENABLED
|
||||
Reference in New Issue
Block a user