summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/android_input_handler.cpp9
-rw-r--r--platform/android/android_input_handler.h4
-rw-r--r--platform/android/android_keys_utils.h6
-rw-r--r--platform/android/api/jni_singleton.h23
-rw-r--r--platform/android/detect.py36
-rw-r--r--platform/android/display_server_android.cpp99
-rw-r--r--platform/android/display_server_android.h19
-rw-r--r--platform/android/export/export_plugin.cpp168
-rw-r--r--platform/android/export/export_plugin.h22
-rw-r--r--platform/android/export/gradle_export_util.cpp2
-rw-r--r--platform/android/java/app/AndroidManifest.xml2
-rw-r--r--platform/android/java/app/config.gradle13
-rw-r--r--platform/android/java/editor/src/main/AndroidManifest.xml10
-rw-r--r--platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt19
-rw-r--r--platform/android/java/editor/src/main/res/values/themes.xml5
-rw-r--r--platform/android/java/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--platform/android/java/lib/AndroidManifest.xml3
-rw-r--r--platform/android/java/lib/build.gradle13
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/Godot.java5
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java49
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotLib.java2
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java2
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java47
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt84
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java33
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt5
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/io/directory/DirectoryAccessHandler.kt3
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java30
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java6
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java14
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java11
-rw-r--r--platform/android/java/nativeSrcsConfigs/CMakeLists.txt2
-rw-r--r--platform/android/java_godot_lib_jni.cpp63
-rw-r--r--platform/android/java_godot_lib_jni.h2
-rw-r--r--platform/android/java_godot_view_wrapper.cpp15
-rw-r--r--platform/android/java_godot_view_wrapper.h5
-rw-r--r--platform/android/jni_utils.cpp51
-rw-r--r--platform/android/os_android.cpp242
-rw-r--r--platform/android/os_android.h21
-rw-r--r--platform/android/plugin/godot_plugin_jni.cpp20
-rw-r--r--platform/android/plugin/godot_plugin_jni.h2
-rw-r--r--platform/android/vulkan/vulkan_context_android.cpp4
-rw-r--r--platform/android/vulkan/vulkan_context_android.h4
-rw-r--r--platform/ios/app_delegate.mm9
-rw-r--r--platform/ios/display_server_ios.h15
-rw-r--r--platform/ios/display_server_ios.mm66
-rw-r--r--platform/ios/export/export_plugin.cpp176
-rw-r--r--platform/ios/godot_ios.mm8
-rw-r--r--platform/ios/godot_view.mm15
-rw-r--r--platform/ios/keyboard_input_view.mm36
-rw-r--r--platform/ios/os_ios.h15
-rw-r--r--platform/ios/os_ios.mm227
-rw-r--r--platform/ios/vulkan_context_ios.h4
-rw-r--r--platform/ios/vulkan_context_ios.mm4
-rw-r--r--platform/linuxbsd/SCsub10
-rw-r--r--platform/linuxbsd/dbus-so_wrap.c4
-rw-r--r--platform/linuxbsd/detect.py16
-rw-r--r--platform/linuxbsd/export/export_plugin.cpp4
-rw-r--r--platform/linuxbsd/fontconfig-so_wrap.c382
-rw-r--r--platform/linuxbsd/fontconfig-so_wrap.h142
-rw-r--r--platform/linuxbsd/freedesktop_screensaver.cpp2
-rw-r--r--platform/linuxbsd/godot_linuxbsd.cpp1
-rw-r--r--platform/linuxbsd/joypad_linux.cpp2
-rw-r--r--platform/linuxbsd/os_linuxbsd.cpp191
-rw-r--r--platform/linuxbsd/os_linuxbsd.h15
-rw-r--r--platform/linuxbsd/platform_config.h2
-rw-r--r--platform/linuxbsd/tts_linux.cpp11
-rw-r--r--platform/linuxbsd/x11/SCsub29
-rw-r--r--platform/linuxbsd/x11/detect_prime_x11.cpp (renamed from platform/linuxbsd/detect_prime_x11.cpp)30
-rw-r--r--platform/linuxbsd/x11/detect_prime_x11.h (renamed from platform/linuxbsd/detect_prime_x11.h)0
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp (renamed from platform/linuxbsd/display_server_x11.cpp)222
-rw-r--r--platform/linuxbsd/x11/display_server_x11.h (renamed from platform/linuxbsd/display_server_x11.h)33
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c676
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h258
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c154
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h72
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c71
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h38
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c401
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h158
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c6664
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h2439
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c797
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h302
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c511
-rw-r--r--platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h198
-rw-r--r--platform/linuxbsd/x11/gl_manager_x11.cpp (renamed from platform/linuxbsd/gl_manager_x11.cpp)45
-rw-r--r--platform/linuxbsd/x11/gl_manager_x11.h (renamed from platform/linuxbsd/gl_manager_x11.h)9
-rw-r--r--platform/linuxbsd/x11/key_mapping_x11.cpp (renamed from platform/linuxbsd/key_mapping_x11.cpp)0
-rw-r--r--platform/linuxbsd/x11/key_mapping_x11.h (renamed from platform/linuxbsd/key_mapping_x11.h)0
-rw-r--r--platform/linuxbsd/x11/vulkan_context_x11.cpp (renamed from platform/linuxbsd/vulkan_context_x11.cpp)4
-rw-r--r--platform/linuxbsd/x11/vulkan_context_x11.h (renamed from platform/linuxbsd/vulkan_context_x11.h)4
-rw-r--r--platform/macos/detect.py24
-rw-r--r--platform/macos/display_server_macos.h9
-rw-r--r--platform/macos/display_server_macos.mm184
-rw-r--r--platform/macos/export/export_plugin.cpp171
-rw-r--r--platform/macos/export/export_plugin.h2
-rw-r--r--platform/macos/export/plist.cpp292
-rw-r--r--platform/macos/export/plist.h25
-rw-r--r--platform/macos/gl_manager_macos_legacy.h2
-rw-r--r--platform/macos/gl_manager_macos_legacy.mm9
-rw-r--r--platform/macos/godot_application_delegate.mm4
-rw-r--r--platform/macos/godot_window_delegate.mm14
-rw-r--r--platform/macos/os_macos.h7
-rw-r--r--platform/macos/os_macos.mm205
-rw-r--r--platform/macos/platform_config.h2
-rw-r--r--platform/macos/vulkan_context_macos.h4
-rw-r--r--platform/macos/vulkan_context_macos.mm3
-rw-r--r--platform/uwp/export/export_plugin.cpp8
-rw-r--r--platform/uwp/export/export_plugin.h2
-rw-r--r--platform/web/SCsub10
-rw-r--r--platform/web/display_server_web.cpp54
-rw-r--r--platform/web/display_server_web.h10
-rw-r--r--platform/web/export/export_plugin.cpp2
-rw-r--r--platform/web/godot_webgl2.h17
-rw-r--r--platform/web/js/engine/config.js6
-rw-r--r--platform/web/js/engine/engine.js4
-rw-r--r--platform/web/js/engine/features.js10
-rw-r--r--platform/web/js/libs/library_godot_webgl2.externs.js36
-rw-r--r--platform/web/js/libs/library_godot_webgl2.js53
-rw-r--r--platform/web/package-lock.json12
-rw-r--r--platform/web/web_main.cpp36
-rw-r--r--platform/windows/SCsub25
-rw-r--r--platform/windows/console_wrapper_windows.cpp181
-rw-r--r--platform/windows/crash_handler_windows.cpp2
-rw-r--r--platform/windows/detect.py23
-rw-r--r--platform/windows/display_server_windows.cpp137
-rw-r--r--platform/windows/display_server_windows.h10
-rw-r--r--platform/windows/export/export_plugin.cpp195
-rw-r--r--platform/windows/export/export_plugin.h4
-rw-r--r--platform/windows/gl_manager_windows.cpp69
-rw-r--r--platform/windows/gl_manager_windows.h13
-rw-r--r--platform/windows/godot.icobin359559 -> 142638 bytes
-rw-r--r--platform/windows/godot_console.icobin0 -> 140380 bytes
-rw-r--r--platform/windows/godot_res_wrap.rc33
-rw-r--r--platform/windows/joypad_windows.cpp2
-rw-r--r--platform/windows/os_windows.cpp373
-rw-r--r--platform/windows/os_windows.h24
-rw-r--r--platform/windows/platform_config.h2
-rw-r--r--platform/windows/platform_windows_builders.py13
-rw-r--r--platform/windows/vulkan_context_win.h4
142 files changed, 16932 insertions, 1048 deletions
diff --git a/platform/android/android_input_handler.cpp b/platform/android/android_input_handler.cpp
index 454bcd2eda..c0b098cd7f 100644
--- a/platform/android/android_input_handler.cpp
+++ b/platform/android/android_input_handler.cpp
@@ -118,7 +118,7 @@ void AndroidInputHandler::process_key_event(int p_keycode, int p_physical_keycod
Input::get_singleton()->parse_input_event(ev);
}
-void AndroidInputHandler::_parse_all_touch(bool p_pressed) {
+void AndroidInputHandler::_parse_all_touch(bool p_pressed, bool p_double_tap) {
if (touch.size()) {
//end all if exist
for (int i = 0; i < touch.size(); i++) {
@@ -127,17 +127,18 @@ void AndroidInputHandler::_parse_all_touch(bool p_pressed) {
ev->set_index(touch[i].id);
ev->set_pressed(p_pressed);
ev->set_position(touch[i].pos);
+ ev->set_double_tap(p_double_tap);
Input::get_singleton()->parse_input_event(ev);
}
}
}
void AndroidInputHandler::_release_all_touch() {
- _parse_all_touch(false);
+ _parse_all_touch(false, false);
touch.clear();
}
-void AndroidInputHandler::process_touch_event(int p_event, int p_pointer, const Vector<TouchPos> &p_points) {
+void AndroidInputHandler::process_touch_event(int p_event, int p_pointer, const Vector<TouchPos> &p_points, bool p_double_tap) {
switch (p_event) {
case AMOTION_EVENT_ACTION_DOWN: { //gesture begin
// Release any remaining touches or mouse event
@@ -151,7 +152,7 @@ void AndroidInputHandler::process_touch_event(int p_event, int p_pointer, const
}
//send touch
- _parse_all_touch(true);
+ _parse_all_touch(true, p_double_tap);
} break;
case AMOTION_EVENT_ACTION_MOVE: { //motion
diff --git a/platform/android/android_input_handler.h b/platform/android/android_input_handler.h
index 88490f0407..4da8a910c0 100644
--- a/platform/android/android_input_handler.h
+++ b/platform/android/android_input_handler.h
@@ -87,13 +87,13 @@ private:
void _release_mouse_event_info(bool p_source_mouse_relative = false);
- void _parse_all_touch(bool p_pressed);
+ void _parse_all_touch(bool p_pressed, bool p_double_tap);
void _release_all_touch();
public:
void process_mouse_event(int p_event_action, int p_event_android_buttons_mask, Point2 p_event_pos, Vector2 p_delta, bool p_double_click, bool p_source_mouse_relative);
- void process_touch_event(int p_event, int p_pointer, const Vector<TouchPos> &p_points);
+ void process_touch_event(int p_event, int p_pointer, const Vector<TouchPos> &p_points, bool p_double_tap);
void process_magnify(Point2 p_pos, float p_factor);
void process_pan(Point2 p_pos, Vector2 p_delta);
void process_joy_event(JoypadEvent p_event);
diff --git a/platform/android/android_keys_utils.h b/platform/android/android_keys_utils.h
index 5ec3ee17aa..bc633aeade 100644
--- a/platform/android/android_keys_utils.h
+++ b/platform/android/android_keys_utils.h
@@ -43,7 +43,6 @@ struct AndroidGodotCodePair {
static AndroidGodotCodePair android_godot_code_pairs[] = {
{ AKEYCODE_UNKNOWN, Key::UNKNOWN }, // (0) Unknown key code.
- { AKEYCODE_HOME, Key::HOME }, // (3) Home key.
{ AKEYCODE_BACK, Key::BACK }, // (4) Back key.
{ AKEYCODE_0, Key::KEY_0 }, // (7) '0' key.
{ AKEYCODE_1, Key::KEY_1 }, // (8) '1' key.
@@ -63,6 +62,7 @@ static AndroidGodotCodePair android_godot_code_pairs[] = {
{ AKEYCODE_DPAD_RIGHT, Key::RIGHT }, // (22) Directional Pad Right key.
{ AKEYCODE_VOLUME_UP, Key::VOLUMEUP }, // (24) Volume Up key.
{ AKEYCODE_VOLUME_DOWN, Key::VOLUMEDOWN }, // (25) Volume Down key.
+ { AKEYCODE_POWER, Key::STANDBY }, // (26) Power key.
{ AKEYCODE_CLEAR, Key::CLEAR }, // (28) Clear key.
{ AKEYCODE_A, Key::A }, // (29) 'A' key.
{ AKEYCODE_B, Key::B }, // (30) 'B' key.
@@ -98,6 +98,7 @@ static AndroidGodotCodePair android_godot_code_pairs[] = {
{ AKEYCODE_SHIFT_RIGHT, Key::SHIFT }, // (60) Right Shift modifier key.
{ AKEYCODE_TAB, Key::TAB }, // (61) Tab key.
{ AKEYCODE_SPACE, Key::SPACE }, // (62) Space key.
+ { AKEYCODE_ENVELOPE, Key::LAUNCHMAIL }, // (65) Envelope special function key.
{ AKEYCODE_ENTER, Key::ENTER }, // (66) Enter key.
{ AKEYCODE_DEL, Key::BACKSPACE }, // (67) Backspace key.
{ AKEYCODE_GRAVE, Key::QUOTELEFT }, // (68) '`' (backtick) key.
@@ -114,6 +115,7 @@ static AndroidGodotCodePair android_godot_code_pairs[] = {
{ AKEYCODE_MENU, Key::MENU }, // (82) Menu key.
{ AKEYCODE_SEARCH, Key::SEARCH }, // (84) Search key.
{ AKEYCODE_MEDIA_STOP, Key::MEDIASTOP }, // (86) Stop media key.
+ { AKEYCODE_MEDIA_NEXT, Key::MEDIANEXT }, // (87) Play Next media key.
{ AKEYCODE_MEDIA_PREVIOUS, Key::MEDIAPREVIOUS }, // (88) Play Previous media key.
{ AKEYCODE_PAGE_UP, Key::PAGEUP }, // (92) Page Up key.
{ AKEYCODE_PAGE_DOWN, Key::PAGEDOWN }, // (93) Page Down key.
@@ -127,6 +129,8 @@ static AndroidGodotCodePair android_godot_code_pairs[] = {
{ AKEYCODE_META_RIGHT, Key::META }, // (118) Right Meta modifier key.
{ AKEYCODE_SYSRQ, Key::PRINT }, // (120) System Request / Print Screen key.
{ AKEYCODE_BREAK, Key::PAUSE }, // (121) Break / Pause key.
+ { AKEYCODE_MOVE_HOME, Key::HOME }, // (122) Home Movement key.
+ { AKEYCODE_MOVE_END, Key::END }, // (123) End Movement key.
{ AKEYCODE_INSERT, Key::INSERT }, // (124) Insert key.
{ AKEYCODE_FORWARD, Key::FORWARD }, // (125) Forward key.
{ AKEYCODE_MEDIA_PLAY, Key::MEDIAPLAY }, // (126) Play media key.
diff --git a/platform/android/api/jni_singleton.h b/platform/android/api/jni_singleton.h
index 895bc70103..afe7dcaeff 100644
--- a/platform/android/api/jni_singleton.h
+++ b/platform/android/api/jni_singleton.h
@@ -137,6 +137,18 @@ public:
ret = sarr;
env->DeleteLocalRef(arr);
} break;
+ case Variant::PACKED_INT64_ARRAY: {
+ jlongArray arr = (jlongArray)env->CallObjectMethodA(instance, E->get().method, v);
+
+ int fCount = env->GetArrayLength(arr);
+ Vector<int64_t> sarr;
+ sarr.resize(fCount);
+
+ int64_t *w = sarr.ptrw();
+ env->GetLongArrayRegion(arr, 0, fCount, w);
+ ret = sarr;
+ env->DeleteLocalRef(arr);
+ } break;
case Variant::PACKED_FLOAT32_ARRAY: {
jfloatArray arr = (jfloatArray)env->CallObjectMethodA(instance, E->get().method, v);
@@ -149,9 +161,18 @@ public:
ret = sarr;
env->DeleteLocalRef(arr);
} break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
+ jdoubleArray arr = (jdoubleArray)env->CallObjectMethodA(instance, E->get().method, v);
- // TODO: This is missing 64 bits arrays, I have no idea how to do it in JNI.
+ int fCount = env->GetArrayLength(arr);
+ Vector<double> sarr;
+ sarr.resize(fCount);
+ double *w = sarr.ptrw();
+ env->GetDoubleArrayRegion(arr, 0, fCount, w);
+ ret = sarr;
+ env->DeleteLocalRef(arr);
+ } break;
case Variant::DICTIONARY: {
jobject obj = env->CallObjectMethodA(instance, E->get().method, v);
ret = _jobject_to_variant(env, obj);
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 6eb8ba34ed..ec36a40941 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -24,7 +24,11 @@ def can_build():
def get_opts():
return [
("ANDROID_SDK_ROOT", "Path to the Android SDK", get_env_android_sdk_root()),
- ("ndk_platform", 'Target platform (android-<api>, e.g. "android-24")', "android-24"),
+ (
+ "ndk_platform",
+ 'Target platform (android-<api>, e.g. "android-' + str(get_min_target_api()) + '")',
+ "android-" + str(get_min_target_api()),
+ ),
]
@@ -46,6 +50,11 @@ def get_ndk_version():
return "23.2.8568313"
+# This is kept in sync with the value in 'platform/android/java/app/config.gradle'.
+def get_min_target_api():
+ return 21
+
+
def get_flags():
return [
("arch", "arm64"), # Default for convenience.
@@ -87,30 +96,26 @@ def configure(env: "Environment"):
)
sys.exit()
+ if get_min_sdk_version(env["ndk_platform"]) < get_min_target_api():
+ print(
+ "WARNING: minimum supported Android target api is %d. Forcing target api %d."
+ % (get_min_target_api(), get_min_target_api())
+ )
+ env["ndk_platform"] = "android-" + str(get_min_target_api())
+
install_ndk_if_needed(env)
ndk_root = env["ANDROID_NDK_ROOT"]
# Architecture
- if get_min_sdk_version(env["ndk_platform"]) < 21 and env["arch"] in ["x86_64", "arm64"]:
- print(
- 'WARNING: arch="%s" is not supported with "ndk_platform" lower than "android-21". Forcing platform 21.'
- % env["arch"]
- )
- env["ndk_platform"] = "android-21"
-
if env["arch"] == "arm32":
target_triple = "armv7a-linux-androideabi"
- env.extra_suffix = ".armv7" + env.extra_suffix
elif env["arch"] == "arm64":
target_triple = "aarch64-linux-android"
- env.extra_suffix = ".armv8" + env.extra_suffix
elif env["arch"] == "x86_32":
target_triple = "i686-linux-android"
- env.extra_suffix = ".x86" + env.extra_suffix
elif env["arch"] == "x86_64":
target_triple = "x86_64-linux-android"
- env.extra_suffix = ".x86_64" + env.extra_suffix
target_option = ["-target", target_triple + str(get_min_sdk_version(env["ndk_platform"]))]
env.Append(ASFLAGS=[target_option, "-c"])
@@ -165,7 +170,6 @@ def configure(env: "Environment"):
"-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing".split()
)
)
- env.Append(CPPDEFINES=["GLES_ENABLED"])
if get_min_sdk_version(env["ndk_platform"]) >= 24:
env.Append(CPPDEFINES=[("_FILE_OFFSET_BITS", 64)])
@@ -188,9 +192,13 @@ def configure(env: "Environment"):
env.Prepend(CPPPATH=["#platform/android"])
env.Append(CPPDEFINES=["ANDROID_ENABLED", "UNIX_ENABLED"])
- env.Append(LIBS=["OpenSLES", "EGL", "GLESv2", "android", "log", "z", "dl"])
+ env.Append(LIBS=["OpenSLES", "EGL", "android", "log", "z", "dl"])
if env["vulkan"]:
env.Append(CPPDEFINES=["VULKAN_ENABLED"])
if not env["use_volk"]:
env.Append(LIBS=["vulkan"])
+
+ if env["opengl3"]:
+ env.Append(CPPDEFINES=["GLES3_ENABLED"])
+ env.Append(LIBS=["GLESv3"])
diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp
index 6f8efbf069..9c796a8c07 100644
--- a/platform/android/display_server_android.cpp
+++ b/platform/android/display_server_android.cpp
@@ -41,6 +41,10 @@
#include "platform/android/vulkan/vulkan_context_android.h"
#include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
#endif
+#ifdef GLES3_ENABLED
+#include "drivers/gles3/rasterizer_gles3.h"
+#include <EGL/egl.h>
+#endif
DisplayServerAndroid *DisplayServerAndroid::get_singleton() {
return static_cast<DisplayServerAndroid *>(DisplayServer::get_singleton());
@@ -217,7 +221,7 @@ float DisplayServerAndroid::screen_get_refresh_rate(int p_screen) const {
return godot_io_java->get_screen_refresh_rate(SCREEN_REFRESH_RATE_FALLBACK);
}
-bool DisplayServerAndroid::screen_is_touchscreen(int p_screen) const {
+bool DisplayServerAndroid::is_touchscreen_available() const {
return true;
}
@@ -312,15 +316,26 @@ DisplayServer::WindowID DisplayServerAndroid::get_window_at_screen_position(cons
int64_t DisplayServerAndroid::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
ERR_FAIL_COND_V(p_window != MAIN_WINDOW_ID, 0);
switch (p_handle_type) {
- case DISPLAY_HANDLE: {
- return 0; // Not supported.
- }
case WINDOW_HANDLE: {
return reinterpret_cast<int64_t>(static_cast<OS_Android *>(OS::get_singleton())->get_godot_java()->get_activity());
}
case WINDOW_VIEW: {
return 0; // Not supported.
}
+#ifdef GLES3_ENABLED
+ case DISPLAY_HANDLE: {
+ if (rendering_driver == "opengl3") {
+ return reinterpret_cast<int64_t>(eglGetCurrentDisplay());
+ }
+ return 0;
+ }
+ case OPENGL_CONTEXT: {
+ if (rendering_driver == "opengl3") {
+ return reinterpret_cast<int64_t>(eglGetCurrentContext());
+ }
+ return 0;
+ }
+#endif
default: {
return 0;
}
@@ -351,6 +366,10 @@ Point2i DisplayServerAndroid::window_get_position(DisplayServer::WindowID p_wind
return Point2i();
}
+Point2i DisplayServerAndroid::window_get_position_with_decorations(DisplayServer::WindowID p_window) const {
+ return Point2i();
+}
+
void DisplayServerAndroid::window_set_position(const Point2i &p_position, DisplayServer::WindowID p_window) {
// Not supported on Android.
}
@@ -383,7 +402,7 @@ Size2i DisplayServerAndroid::window_get_size(DisplayServer::WindowID p_window) c
return OS_Android::get_singleton()->get_display_size();
}
-Size2i DisplayServerAndroid::window_get_real_size(DisplayServer::WindowID p_window) const {
+Size2i DisplayServerAndroid::window_get_size_with_decorations(DisplayServer::WindowID p_window) const {
return OS_Android::get_singleton()->get_display_size();
}
@@ -440,10 +459,18 @@ Vector<String> DisplayServerAndroid::get_rendering_drivers_func() {
return drivers;
}
-DisplayServer *DisplayServerAndroid::create_func(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
- DisplayServer *ds = memnew(DisplayServerAndroid(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
+DisplayServer *DisplayServerAndroid::create_func(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
+ DisplayServer *ds = memnew(DisplayServerAndroid(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, r_error));
if (r_error != OK) {
OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan versions.", "Unable to initialize Video driver");
+ if (p_rendering_driver == "vulkan") {
+ OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n"
+ "Please try exporting your game using the gl_compatibility renderer.",
+ "Unable to initialize Video driver");
+ } else {
+ OS::get_singleton()->alert("Your video card driver does not support OpenGL ES 3.0.",
+ "Unable to initialize Video driver");
+ }
}
return ds;
}
@@ -485,31 +512,14 @@ void DisplayServerAndroid::notify_surface_changed(int p_width, int p_height) {
rect_changed_callback.callp(reinterpret_cast<const Variant **>(&sizep), 1, ret, ce);
}
-DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
rendering_driver = p_rendering_driver;
- // TODO: rendering_driver is broken, change when different drivers are supported again
- rendering_driver = "vulkan";
-
keep_screen_on = GLOBAL_GET("display/window/energy_saving/keep_screen_on");
#if defined(GLES3_ENABLED)
if (rendering_driver == "opengl3") {
- bool gl_initialization_error = false;
-
- if (RasterizerGLES3::is_viable() == OK) {
- RasterizerGLES3::register_config();
- RasterizerGLES3::make_current();
- } else {
- gl_initialization_error = true;
- }
-
- if (gl_initialization_error) {
- OS::get_singleton()->alert("Your device does not support any of the supported OpenGL versions.\n"
- "Please try updating your Android version.",
- "Unable to initialize video driver");
- return;
- }
+ RasterizerGLES3::make_current();
}
#endif
@@ -614,11 +624,11 @@ MouseButton DisplayServerAndroid::mouse_get_button_state() const {
return (MouseButton)Input::get_singleton()->get_mouse_button_mask();
}
-void DisplayServerAndroid::cursor_set_shape(DisplayServer::CursorShape p_shape) {
+void DisplayServerAndroid::_cursor_set_shape_helper(CursorShape p_shape, bool force) {
if (!OS_Android::get_singleton()->get_godot_java()->get_godot_view()->can_update_pointer_icon()) {
return;
}
- if (cursor_shape == p_shape) {
+ if (cursor_shape == p_shape && !force) {
return;
}
@@ -629,10 +639,23 @@ void DisplayServerAndroid::cursor_set_shape(DisplayServer::CursorShape p_shape)
}
}
+void DisplayServerAndroid::cursor_set_shape(DisplayServer::CursorShape p_shape) {
+ _cursor_set_shape_helper(p_shape);
+}
+
DisplayServer::CursorShape DisplayServerAndroid::cursor_get_shape() const {
return cursor_shape;
}
+void DisplayServerAndroid::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
+ String cursor_path = p_cursor.is_valid() ? p_cursor->get_path() : "";
+ if (!cursor_path.is_empty()) {
+ cursor_path = ProjectSettings::get_singleton()->globalize_path(cursor_path);
+ }
+ OS_Android::get_singleton()->get_godot_java()->get_godot_view()->configure_pointer_icon(android_cursors[cursor_shape], cursor_path, p_hotspot);
+ _cursor_set_shape_helper(p_shape, true);
+}
+
void DisplayServerAndroid::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
#if defined(VULKAN_ENABLED)
context_vulkan->set_vsync_mode(p_window, p_vsync_mode);
@@ -646,3 +669,23 @@ DisplayServer::VSyncMode DisplayServerAndroid::window_get_vsync_mode(WindowID p_
return DisplayServer::VSYNC_ENABLED;
#endif
}
+
+void DisplayServerAndroid::reset_swap_buffers_flag() {
+ swap_buffers_flag = false;
+}
+
+bool DisplayServerAndroid::should_swap_buffers() const {
+ return swap_buffers_flag;
+}
+
+void DisplayServerAndroid::swap_buffers() {
+ swap_buffers_flag = true;
+}
+
+void DisplayServerAndroid::set_native_icon(const String &p_filename) {
+ // NOT SUPPORTED
+}
+
+void DisplayServerAndroid::set_icon(const Ref<Image> &p_icon) {
+ // NOT SUPPORTED
+}
diff --git a/platform/android/display_server_android.h b/platform/android/display_server_android.h
index 6e14ba3e23..9ed07ca971 100644
--- a/platform/android/display_server_android.h
+++ b/platform/android/display_server_android.h
@@ -66,6 +66,7 @@ class DisplayServerAndroid : public DisplayServer {
MouseMode mouse_mode = MouseMode::MOUSE_MODE_VISIBLE;
bool keep_screen_on;
+ bool swap_buffers_flag;
CursorShape cursor_shape = CursorShape::CURSOR_ARROW;
@@ -120,7 +121,7 @@ public:
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual float screen_get_scale(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 bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
+ virtual bool is_touchscreen_available() const override;
virtual void virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2(), VirtualKeyboardType p_type = KEYBOARD_TYPE_DEFAULT, int p_max_length = -1, int p_cursor_start = -1, int p_cursor_end = -1) override;
virtual void virtual_keyboard_hide() override;
@@ -149,6 +150,7 @@ public:
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_transient(WindowID p_window, WindowID p_parent) override;
@@ -161,7 +163,7 @@ public:
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_real_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;
@@ -188,13 +190,15 @@ public:
void process_magnetometer(const Vector3 &p_magnetometer);
void process_gyroscope(const Vector3 &p_gyroscope);
+ void _cursor_set_shape_helper(CursorShape p_shape, bool force = false);
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 = CURSOR_ARROW, const Vector2 &p_hotspot = Vector2()) override;
virtual void mouse_set_mode(MouseMode p_mode) override;
virtual MouseMode mouse_get_mode() const override;
- static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
static Vector<String> get_rendering_drivers_func();
static void register_android_driver();
@@ -204,7 +208,14 @@ public:
virtual Point2i mouse_get_position() const override;
virtual MouseButton mouse_get_button_state() const override;
- DisplayServerAndroid(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ void reset_swap_buffers_flag();
+ bool should_swap_buffers() const;
+ virtual void swap_buffers() override;
+
+ virtual void set_native_icon(const String &p_filename) override;
+ virtual void set_icon(const Ref<Image> &p_icon) override;
+
+ DisplayServerAndroid(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
~DisplayServerAndroid();
};
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 31dee0ab4e..77cfa99aee 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -205,7 +205,7 @@ static const char *LEGACY_BUILD_SPLASH_IMAGE_EXPORT_PATH = "res/drawable-nodpi-v
static const char *SPLASH_BG_COLOR_PATH = "res/drawable-nodpi/splash_bg_color.png";
static const char *LEGACY_BUILD_SPLASH_BG_COLOR_PATH = "res/drawable-nodpi-v4/splash_bg_color.png";
static const char *SPLASH_CONFIG_PATH = "res://android/build/res/drawable/splash_drawable.xml";
-static const char *GDNATIVE_LIBS_PATH = "res://android/build/libs/gdnativelibs.json";
+static const char *GDEXTENSION_LIBS_PATH = "res://android/build/libs/gdextensionlibs.json";
static const int icon_densities_count = 6;
static const char *launcher_icon_option = PNAME("launcher_icons/main_192x192");
@@ -245,7 +245,7 @@ static const int EXPORT_FORMAT_AAB = 1;
static const char *APK_ASSETS_DIRECTORY = "res://android/build/assets";
static const char *AAB_ASSETS_DIRECTORY = "res://android/build/assetPacks/installTime/src/main/assets";
-static const int DEFAULT_MIN_SDK_VERSION = 19; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
+static const int DEFAULT_MIN_SDK_VERSION = 21; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
static const int DEFAULT_TARGET_SDK_VERSION = 32; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
#ifndef ANDROID_ENABLED
@@ -401,7 +401,7 @@ void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) {
}
}
- if (EditorSettings::get_singleton()->get("export/android/shutdown_adb_on_exit")) {
+ if (EDITOR_GET("export/android/shutdown_adb_on_exit")) {
String adb = get_adb_path();
if (!FileAccess::exists(adb)) {
return; //adb not configured
@@ -419,7 +419,7 @@ String EditorExportPlatformAndroid::get_project_name(const String &p_name) const
if (!p_name.is_empty()) {
aname = p_name;
} else {
- aname = ProjectSettings::get_singleton()->get("application/config/name");
+ aname = GLOBAL_GET("application/config/name");
}
if (aname.is_empty()) {
@@ -431,7 +431,7 @@ String EditorExportPlatformAndroid::get_project_name(const String &p_name) const
String EditorExportPlatformAndroid::get_package_name(const String &p_package) const {
String pname = p_package;
- String basename = ProjectSettings::get_singleton()->get("application/config/name");
+ String basename = GLOBAL_GET("application/config/name");
basename = basename.to_lower();
String name;
@@ -585,12 +585,13 @@ zip_fileinfo EditorExportPlatformAndroid::get_zip_fileinfo() {
return zipfi;
}
-Vector<String> EditorExportPlatformAndroid::get_abis() {
- Vector<String> abis;
- abis.push_back("armeabi-v7a");
- abis.push_back("arm64-v8a");
- abis.push_back("x86");
- abis.push_back("x86_64");
+Vector<EditorExportPlatformAndroid::ABI> EditorExportPlatformAndroid::get_abis() {
+ // Should have the same order and size as get_archs.
+ Vector<ABI> abis;
+ abis.push_back(ABI("armeabi-v7a", "arm32"));
+ abis.push_back(ABI("arm64-v8a", "arm64"));
+ abis.push_back(ABI("x86", "x86_32"));
+ abis.push_back(ABI("x86_64", "x86_64"));
return abis;
}
@@ -687,24 +688,28 @@ Error EditorExportPlatformAndroid::save_apk_so(void *p_userdata, const SharedObj
return FAILED;
}
APKExportData *ed = static_cast<APKExportData *>(p_userdata);
- Vector<String> abis = get_abis();
+ Vector<ABI> abis = get_abis();
bool exported = false;
for (int i = 0; i < p_so.tags.size(); ++i) {
// shared objects can be fat (compatible with multiple ABIs)
- int abi_index = abis.find(p_so.tags[i]);
+ int abi_index = -1;
+ for (int j = 0; j < abis.size(); ++j) {
+ if (abis[j].abi == p_so.tags[i] || abis[j].arch == p_so.tags[i]) {
+ abi_index = j;
+ break;
+ }
+ }
if (abi_index != -1) {
exported = true;
- String abi = abis[abi_index];
+ String abi = abis[abi_index].abi;
String dst_path = String("lib").path_join(abi).path_join(p_so.path.get_file());
- Vector<uint8_t> array = FileAccess::get_file_as_array(p_so.path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(p_so.path);
Error store_err = store_in_apk(ed, dst_path, array);
ERR_FAIL_COND_V_MSG(store_err, store_err, "Cannot store in apk file '" + dst_path + "'.");
}
}
if (!exported) {
- String abis_string = String(" ").join(abis);
- String err = "Cannot determine ABI for library \"" + p_so.path + "\". One of the supported ABIs must be used as a tag: " + abis_string;
- ERR_PRINT(err);
+ ERR_PRINT("Cannot determine architecture for library \"" + p_so.path + "\". One of the supported architectures must be used as a tag: " + join_abis(abis, " ", true));
return FAILED;
}
return OK;
@@ -725,19 +730,25 @@ Error EditorExportPlatformAndroid::ignore_apk_file(void *p_userdata, const Strin
Error EditorExportPlatformAndroid::copy_gradle_so(void *p_userdata, const SharedObject &p_so) {
ERR_FAIL_COND_V_MSG(!p_so.path.get_file().begins_with("lib"), FAILED,
"Android .so file names must start with \"lib\", but got: " + p_so.path);
- Vector<String> abis = get_abis();
+ Vector<ABI> abis = get_abis();
CustomExportData *export_data = static_cast<CustomExportData *>(p_userdata);
bool exported = false;
for (int i = 0; i < p_so.tags.size(); ++i) {
- int abi_index = abis.find(p_so.tags[i]);
+ int abi_index = -1;
+ for (int j = 0; j < abis.size(); ++j) {
+ if (abis[j].abi == p_so.tags[i] || abis[j].arch == p_so.tags[i]) {
+ abi_index = j;
+ break;
+ }
+ }
if (abi_index != -1) {
exported = true;
String base = "res://android/build/libs";
String type = export_data->debug ? "debug" : "release";
- String abi = abis[abi_index];
+ String abi = abis[abi_index].abi;
String filename = p_so.path.get_file();
String dst_path = base.path_join(type).path_join(abi).path_join(filename);
- Vector<uint8_t> data = FileAccess::get_file_as_array(p_so.path);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(p_so.path);
print_verbose("Copying .so file from " + p_so.path + " to " + dst_path);
Error err = store_file_at_path(dst_path, data);
ERR_FAIL_COND_V_MSG(err, err, "Failed to copy .so file from " + p_so.path + " to " + dst_path);
@@ -745,7 +756,7 @@ Error EditorExportPlatformAndroid::copy_gradle_so(void *p_userdata, const Shared
}
}
ERR_FAIL_COND_V_MSG(!exported, FAILED,
- "Cannot determine ABI for library \"" + p_so.path + "\". One of the supported ABIs must be used as a tag: " + String(" ").join(abis));
+ "Cannot determine architecture for library \"" + p_so.path + "\". One of the supported architectures must be used as a tag:" + join_abis(abis, " ", true));
return OK;
}
@@ -791,7 +802,7 @@ void EditorExportPlatformAndroid::_get_permissions(const Ref<EditorExportPreset>
}
void EditorExportPlatformAndroid::_write_tmp_manifest(const Ref<EditorExportPreset> &p_preset, bool p_give_internet, bool p_debug) {
- print_verbose("Building temporary manifest..");
+ print_verbose("Building temporary manifest...");
String manifest_text =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n"
@@ -1395,7 +1406,7 @@ void EditorExportPlatformAndroid::_fix_resources(const Ref<EditorExportPreset> &
Vector<String> string_table;
String package_name = p_preset->get("package/name");
- Dictionary appnames = ProjectSettings::get_singleton()->get("application/config/name_localized");
+ Dictionary appnames = GLOBAL_GET("application/config/name_localized");
for (uint32_t i = 0; i < string_count; i++) {
uint32_t offset = decode_uint32(&r_manifest[string_table_begins + i * 4]);
@@ -1505,9 +1516,9 @@ void EditorExportPlatformAndroid::_process_launcher_icons(const String &p_file_n
}
String EditorExportPlatformAndroid::load_splash_refs(Ref<Image> &splash_image, Ref<Image> &splash_bg_color_image) {
- bool scale_splash = ProjectSettings::get_singleton()->get("application/boot_splash/fullsize");
- bool apply_filter = ProjectSettings::get_singleton()->get("application/boot_splash/use_filter");
- String project_splash_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
+ bool scale_splash = GLOBAL_GET("application/boot_splash/fullsize");
+ bool apply_filter = GLOBAL_GET("application/boot_splash/use_filter");
+ String project_splash_path = GLOBAL_GET("application/boot_splash/image");
if (!project_splash_path.is_empty()) {
splash_image.instantiate();
@@ -1528,7 +1539,7 @@ String EditorExportPlatformAndroid::load_splash_refs(Ref<Image> &splash_image, R
}
if (scale_splash) {
- Size2 screen_size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height"));
+ Size2 screen_size = Size2(GLOBAL_GET("display/window/size/viewport_width"), GLOBAL_GET("display/window/size/viewport_height"));
int width, height;
if (screen_size.width > screen_size.height) {
// scale horizontally
@@ -1559,7 +1570,7 @@ String EditorExportPlatformAndroid::load_splash_refs(Ref<Image> &splash_image, R
}
void EditorExportPlatformAndroid::load_icon_refs(const Ref<EditorExportPreset> &p_preset, Ref<Image> &icon, Ref<Image> &foreground, Ref<Image> &background) {
- String project_icon_path = ProjectSettings::get_singleton()->get("application/config/icon");
+ String project_icon_path = GLOBAL_GET("application/config/icon");
icon.instantiate();
foreground.instantiate();
@@ -1656,11 +1667,11 @@ void EditorExportPlatformAndroid::_copy_icons_to_gradle_project(const Ref<Editor
}
}
-Vector<String> EditorExportPlatformAndroid::get_enabled_abis(const Ref<EditorExportPreset> &p_preset) {
- Vector<String> abis = get_abis();
- Vector<String> enabled_abis;
+Vector<EditorExportPlatformAndroid::ABI> EditorExportPlatformAndroid::get_enabled_abis(const Ref<EditorExportPreset> &p_preset) {
+ Vector<ABI> abis = get_abis();
+ Vector<ABI> enabled_abis;
for (int i = 0; i < abis.size(); ++i) {
- bool is_enabled = p_preset->get("architectures/" + abis[i]);
+ bool is_enabled = p_preset->get("architectures/" + abis[i].abi);
if (is_enabled) {
enabled_abis.push_back(abis[i]);
}
@@ -1671,9 +1682,10 @@ Vector<String> EditorExportPlatformAndroid::get_enabled_abis(const Ref<EditorExp
void EditorExportPlatformAndroid::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
r_features->push_back("etc2");
- Vector<String> abis = get_enabled_abis(p_preset);
+ Vector<ABI> abis = get_enabled_abis(p_preset);
for (int i = 0; i < abis.size(); ++i) {
- r_features->push_back(abis[i]);
+ r_features->push_back(abis[i].arch);
+ r_features->push_back(abis[i].abi);
}
}
@@ -1697,9 +1709,9 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
// Android supports multiple architectures in an app bundle, so
// we expose each option as a checkbox in the export dialog.
- const Vector<String> abis = get_abis();
+ const Vector<ABI> abis = get_abis();
for (int i = 0; i < abis.size(); ++i) {
- const String abi = abis[i];
+ const String abi = abis[i].abi;
// All Android devices supporting Vulkan run 64-bit Android,
// so there is usually no point in exporting for 32-bit Android.
const bool is_default = abi == "arm64-v8a";
@@ -1920,7 +1932,7 @@ Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset,
print_verbose(output);
if (p_debug_flags & DEBUG_FLAG_REMOTE_DEBUG) {
- int dbg_port = EditorSettings::get_singleton()->get("network/debug/remote_port");
+ int dbg_port = EDITOR_GET("network/debug/remote_port");
args.clear();
args.push_back("-s");
args.push_back(devices[p_device].id);
@@ -1935,7 +1947,7 @@ Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset,
}
if (p_debug_flags & DEBUG_FLAG_DUMB_CLIENT) {
- int fs_port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
+ int fs_port = EDITOR_GET("filesystem/file_server/port");
args.clear();
args.push_back("-s");
@@ -1965,7 +1977,7 @@ Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset,
args.push_back("shell");
args.push_back("am");
args.push_back("start");
- if ((bool)EditorSettings::get_singleton()->get("export/android/force_system_user") && devices[p_device].api_level >= 17) { // Multi-user introduced in Android 17
+ if ((bool)EDITOR_GET("export/android/force_system_user") && devices[p_device].api_level >= 17) { // Multi-user introduced in Android 17
args.push_back("--user");
args.push_back("0");
}
@@ -1995,7 +2007,7 @@ String EditorExportPlatformAndroid::get_adb_path() {
if (OS::get_singleton()->get_name() == "Windows") {
exe_ext = ".exe";
}
- String sdk_path = EditorSettings::get_singleton()->get("export/android/android_sdk_path");
+ String sdk_path = EDITOR_GET("export/android/android_sdk_path");
return sdk_path.path_join("platform-tools/adb" + exe_ext);
}
@@ -2008,7 +2020,7 @@ String EditorExportPlatformAndroid::get_apksigner_path(int p_target_sdk, bool p_
exe_ext = ".bat";
}
String apksigner_command_name = "apksigner" + exe_ext;
- String sdk_path = EditorSettings::get_singleton()->get("export/android/android_sdk_path");
+ String sdk_path = EDITOR_GET("export/android/android_sdk_path");
String apksigner_path = "";
Error errn;
@@ -2168,7 +2180,7 @@ bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref<Edito
}
if (!FileAccess::exists(dk)) {
- dk = EditorSettings::get_singleton()->get("export/android/debug_keystore");
+ dk = EDITOR_GET("export/android/debug_keystore");
if (!FileAccess::exists(dk)) {
valid = false;
err += TTR("Debug keystore not configured in the Editor Settings nor in the preset.") + "\n";
@@ -2189,7 +2201,7 @@ bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref<Edito
err += TTR("Release keystore incorrectly configured in the export preset.") + "\n";
}
- String sdk_path = EditorSettings::get_singleton()->get("export/android/android_sdk_path");
+ String sdk_path = EDITOR_GET("export/android/android_sdk_path");
if (sdk_path.is_empty()) {
err += TTR("A valid Android SDK path is required in Editor Settings.") + "\n";
valid = false;
@@ -2474,9 +2486,9 @@ Error EditorExportPlatformAndroid::sign_apk(const Ref<EditorExportPreset> &p_pre
user = p_preset->get("keystore/debug_user");
if (keystore.is_empty()) {
- keystore = EditorSettings::get_singleton()->get("export/android/debug_keystore");
- password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass");
- user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user");
+ keystore = EDITOR_GET("export/android/debug_keystore");
+ password = EDITOR_GET("export/android/debug_keystore_pass");
+ user = EDITOR_GET("export/android/debug_keystore_user");
}
if (ep.step(vformat(TTR("Signing debug %s..."), export_label), 104)) {
@@ -2567,7 +2579,7 @@ void EditorExportPlatformAndroid::_clear_assets_directory() {
// Clear the APK assets directory
if (da_res->dir_exists(APK_ASSETS_DIRECTORY)) {
- print_verbose("Clearing APK assets directory..");
+ print_verbose("Clearing APK assets directory...");
Ref<DirAccess> da_assets = DirAccess::open(APK_ASSETS_DIRECTORY);
da_assets->erase_contents_recursive();
da_res->remove(APK_ASSETS_DIRECTORY);
@@ -2575,7 +2587,7 @@ void EditorExportPlatformAndroid::_clear_assets_directory() {
// Clear the AAB assets directory
if (da_res->dir_exists(AAB_ASSETS_DIRECTORY)) {
- print_verbose("Clearing AAB assets directory..");
+ print_verbose("Clearing AAB assets directory...");
Ref<DirAccess> da_assets = DirAccess::open(AAB_ASSETS_DIRECTORY);
da_assets->erase_contents_recursive();
da_res->remove(AAB_ASSETS_DIRECTORY);
@@ -2585,7 +2597,7 @@ void EditorExportPlatformAndroid::_clear_assets_directory() {
void EditorExportPlatformAndroid::_remove_copied_libs() {
print_verbose("Removing previously installed libraries...");
Error error;
- String libs_json = FileAccess::get_file_as_string(GDNATIVE_LIBS_PATH, &error);
+ String libs_json = FileAccess::get_file_as_string(GDEXTENSION_LIBS_PATH, &error);
if (error || libs_json.is_empty()) {
print_verbose("No previously installed libraries found");
return;
@@ -2601,16 +2613,27 @@ void EditorExportPlatformAndroid::_remove_copied_libs() {
print_verbose("Removing previously installed library " + libs[i]);
da->remove(libs[i]);
}
- da->remove(GDNATIVE_LIBS_PATH);
+ da->remove(GDEXTENSION_LIBS_PATH);
+}
+
+String EditorExportPlatformAndroid::join_list(const List<String> &p_parts, const String &p_separator) {
+ String ret;
+ for (int i = 0; i < p_parts.size(); ++i) {
+ if (i > 0) {
+ ret += p_separator;
+ }
+ ret += p_parts[i];
+ }
+ return ret;
}
-String EditorExportPlatformAndroid::join_list(List<String> parts, const String &separator) const {
+String EditorExportPlatformAndroid::join_abis(const Vector<EditorExportPlatformAndroid::ABI> &p_parts, const String &p_separator, bool p_use_arch) {
String ret;
- for (int i = 0; i < parts.size(); ++i) {
+ for (int i = 0; i < p_parts.size(); ++i) {
if (i > 0) {
- ret += separator;
+ ret += p_separator;
}
- ret += parts[i];
+ ret += (p_use_arch) ? p_parts[i].arch : p_parts[i].abi;
}
return ret;
}
@@ -2632,7 +2655,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
bool use_custom_build = bool(p_preset->get("custom_build/use_custom_build"));
bool p_give_internet = p_flags & (DEBUG_FLAG_DUMB_CLIENT | DEBUG_FLAG_REMOTE_DEBUG);
bool apk_expansion = p_preset->get("apk_expansion/enable");
- Vector<String> enabled_abis = get_enabled_abis(p_preset);
+ Vector<ABI> enabled_abis = get_enabled_abis(p_preset);
print_verbose("Exporting for Android...");
print_verbose("- debug build: " + bool_to_string(p_debug));
@@ -2641,7 +2664,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
print_verbose("- sign build: " + bool_to_string(should_sign));
print_verbose("- custom build enabled: " + bool_to_string(use_custom_build));
print_verbose("- apk expansion enabled: " + bool_to_string(apk_expansion));
- print_verbose("- enabled abis: " + String(",").join(enabled_abis));
+ print_verbose("- enabled abis: " + join_abis(enabled_abis, ",", false));
print_verbose("- export filter: " + itos(p_preset->get_export_filter()));
print_verbose("- include filter: " + p_preset->get_include_filter());
print_verbose("- exclude filter: " + p_preset->get_exclude_filter());
@@ -2680,10 +2703,10 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
}
if (use_custom_build) {
- print_verbose("Starting custom build..");
+ print_verbose("Starting custom build...");
//test that installed build version is alright
{
- print_verbose("Checking build version..");
+ print_verbose("Checking build version...");
Ref<FileAccess> f = FileAccess::open("res://android/.build_version", FileAccess::READ);
if (f.is_null()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), TTR("Trying to build from a custom built template, but no version info for it exists. Please reinstall from the 'Project' menu."));
@@ -2716,7 +2739,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
_clear_assets_directory();
_remove_copied_libs();
if (!apk_expansion) {
- print_verbose("Exporting project files..");
+ print_verbose("Exporting project files...");
CustomExportData user_data;
user_data.assets_directory = assets_directory;
user_data.debug = p_debug;
@@ -2726,18 +2749,18 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
return err;
}
if (user_data.libs.size() > 0) {
- Ref<FileAccess> fa = FileAccess::open(GDNATIVE_LIBS_PATH, FileAccess::WRITE);
+ Ref<FileAccess> fa = FileAccess::open(GDEXTENSION_LIBS_PATH, FileAccess::WRITE);
fa->store_string(JSON::stringify(user_data.libs, "\t"));
}
} else {
- print_verbose("Saving apk expansion file..");
+ print_verbose("Saving apk expansion file...");
err = save_apk_expansion_file(p_preset, p_debug, p_path);
if (err != OK) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), TTR("Could not write expansion package file!"));
return err;
}
}
- print_verbose("Storing command line flags..");
+ print_verbose("Storing command line flags...");
store_file_at_path(assets_directory + "/_cl_", command_line_flags);
print_verbose("Updating ANDROID_HOME environment to " + sdk_path);
@@ -2764,7 +2787,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
if (!target_sdk_version.is_valid_int()) {
target_sdk_version = itos(DEFAULT_TARGET_SDK_VERSION);
}
- String enabled_abi_string = String("|").join(enabled_abis);
+ String enabled_abi_string = join_abis(enabled_abis, "|", false);
String sign_flag = should_sign ? "true" : "false";
String zipalign_flag = "true";
@@ -2816,9 +2839,9 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
String debug_user = p_preset->get("keystore/debug_user");
if (debug_keystore.is_empty()) {
- debug_keystore = EditorSettings::get_singleton()->get("export/android/debug_keystore");
- debug_password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass");
- debug_user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user");
+ debug_keystore = EDITOR_GET("export/android/debug_keystore");
+ debug_password = EDITOR_GET("export/android/debug_keystore_pass");
+ debug_user = EDITOR_GET("export/android/debug_keystore_user");
}
if (debug_keystore.is_relative_path()) {
debug_keystore = OS::get_singleton()->get_resource_dir().path_join(debug_keystore).simplify_path();
@@ -2890,7 +2913,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
return OK;
}
// This is the start of the Legacy build system
- print_verbose("Starting legacy build system..");
+ print_verbose("Starting legacy build system...");
if (p_debug) {
src_apk = p_preset->get("custom_template/debug");
} else {
@@ -2949,7 +2972,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
String apk_expansion_pkey = p_preset->get("apk_expansion/public_key");
- Vector<String> invalid_abis(enabled_abis);
+ Vector<ABI> invalid_abis(enabled_abis);
while (ret == UNZ_OK) {
//get filename
unz_file_info info;
@@ -3012,7 +3035,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
if (file.ends_with(".so")) {
bool enabled = false;
for (int i = 0; i < enabled_abis.size(); ++i) {
- if (file.begins_with("lib/" + enabled_abis[i] + "/")) {
+ if (file.begins_with("lib/" + enabled_abis[i].abi + "/")) {
invalid_abis.erase(enabled_abis[i]);
enabled = true;
break;
@@ -3054,8 +3077,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
}
if (!invalid_abis.is_empty()) {
- String unsupported_arch = String(", ").join(invalid_abis);
- add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), vformat(TTR("Missing libraries in the export template for the selected architectures: %s. Please build a template with all required libraries, or uncheck the missing architectures in the export preset."), unsupported_arch));
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), vformat(TTR("Missing libraries in the export template for the selected architectures: %s. Please build a template with all required libraries, or uncheck the missing architectures in the export preset."), join_abis(invalid_abis, ", ", false)));
CLEANUP_AND_RETURN(ERR_FILE_NOT_FOUND);
}
diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h
index 24ffd2a80f..b9630858d3 100644
--- a/platform/android/export/export_plugin.h
+++ b/platform/android/export/export_plugin.h
@@ -99,7 +99,22 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
static zip_fileinfo get_zip_fileinfo();
- static Vector<String> get_abis();
+ struct ABI {
+ String abi;
+ String arch;
+
+ bool operator==(const ABI &p_a) const {
+ return p_a.abi == abi;
+ }
+
+ ABI(const String &p_abi, const String &p_arch) {
+ abi = p_abi;
+ arch = p_arch;
+ }
+ ABI() {}
+ };
+
+ static Vector<ABI> get_abis();
/// List the gdap files in the directory specified by the p_path parameter.
static Vector<String> list_gdap_files(const String &p_path);
@@ -152,7 +167,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
const Ref<Image> &foreground,
const Ref<Image> &background);
- static Vector<String> get_enabled_abis(const Ref<EditorExportPreset> &p_preset);
+ static Vector<ABI> get_enabled_abis(const Ref<EditorExportPreset> &p_preset);
public:
typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
@@ -228,7 +243,8 @@ public:
void _remove_copied_libs();
- String join_list(List<String> parts, const String &separator) const;
+ static String join_list(const List<String> &p_parts, const String &p_separator);
+ static String join_abis(const Vector<ABI> &p_parts, const String &p_separator, bool p_use_arch);
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
diff --git a/platform/android/export/gradle_export_util.cpp b/platform/android/export/gradle_export_util.cpp
index 2f53942f76..8d016d3fac 100644
--- a/platform/android/export/gradle_export_util.cpp
+++ b/platform/android/export/gradle_export_util.cpp
@@ -158,7 +158,7 @@ Error _create_project_name_strings_files(const Ref<EditorExportPreset> &p_preset
return ERR_CANT_OPEN;
}
da->list_dir_begin();
- Dictionary appnames = ProjectSettings::get_singleton()->get("application/config/name_localized");
+ Dictionary appnames = GLOBAL_GET("application/config/name_localized");
while (true) {
String file = da->get_next();
if (file.is_empty()) {
diff --git a/platform/android/java/app/AndroidManifest.xml b/platform/android/java/app/AndroidManifest.xml
index 2d4c4763a2..1db135826a 100644
--- a/platform/android/java/app/AndroidManifest.xml
+++ b/platform/android/java/app/AndroidManifest.xml
@@ -13,7 +13,7 @@
android:xlargeScreens="true" />
<uses-feature
- android:glEsVersion="0x00020000"
+ android:glEsVersion="0x00030000"
android:required="true" />
<application
diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle
index 0346625e4b..f1b4bfd534 100644
--- a/platform/android/java/app/config.gradle
+++ b/platform/android/java/app/config.gradle
@@ -1,14 +1,17 @@
ext.versions = [
- androidGradlePlugin: '7.0.3',
+ androidGradlePlugin: '7.2.1',
compileSdk : 32,
- minSdk : 19, // Also update 'platform/android/java/lib/AndroidManifest.xml#minSdkVersion' & 'platform/android/export/export_plugin.cpp#DEFAULT_MIN_SDK_VERSION'
- targetSdk : 32, // Also update 'platform/android/java/lib/AndroidManifest.xml#targetSdkVersion' & 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION'
+ // Also update 'platform/android/export/export_plugin.cpp#DEFAULT_MIN_SDK_VERSION'
+ minSdk : 21,
+ // Also update 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION'
+ targetSdk : 32,
buildTools : '32.0.0',
- kotlinVersion : '1.6.21',
+ kotlinVersion : '1.7.0',
fragmentVersion : '1.3.6',
nexusPublishVersion: '1.1.0',
javaVersion : 11,
- ndkVersion : '23.2.8568313' // Also update 'platform/android/detect.py#get_ndk_version()' when this is updated.
+ // Also update 'platform/android/detect.py#get_ndk_version()' when this is updated.
+ ndkVersion : '23.2.8568313'
]
diff --git a/platform/android/java/editor/src/main/AndroidManifest.xml b/platform/android/java/editor/src/main/AndroidManifest.xml
index 6aa5f06f31..80ef10b6a4 100644
--- a/platform/android/java/editor/src/main/AndroidManifest.xml
+++ b/platform/android/java/editor/src/main/AndroidManifest.xml
@@ -11,7 +11,7 @@
android:xlargeScreens="true" />
<uses-feature
- android:glEsVersion="0x00020000"
+ android:glEsVersion="0x00030000"
android:required="true" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
@@ -27,6 +27,7 @@
android:icon="@mipmap/icon"
android:label="@string/godot_editor_name_string"
tools:ignore="GoogleAppIndexingWarning"
+ android:theme="@style/GodotEditorTheme"
android:requestLegacyExternalStorage="true">
<activity
@@ -35,7 +36,6 @@
android:launchMode="singleTask"
android:screenOrientation="userLandscape"
android:exported="true"
- android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:process=":GodotProjectManager">
<layout android:defaultHeight="@dimen/editor_default_window_height"
@@ -53,8 +53,7 @@
android:process=":GodotEditor"
android:launchMode="singleTask"
android:screenOrientation="userLandscape"
- android:exported="false"
- android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
+ android:exported="false">
<layout android:defaultHeight="@dimen/editor_default_window_height"
android:defaultWidth="@dimen/editor_default_window_width" />
</activity>
@@ -66,8 +65,7 @@
android:process=":GodotGame"
android:launchMode="singleTask"
android:exported="false"
- android:screenOrientation="userLandscape"
- android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
+ android:screenOrientation="userLandscape">
<layout android:defaultHeight="@dimen/editor_default_window_height"
android:defaultWidth="@dimen/editor_default_window_width" />
</activity>
diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt
index 489a81fc1a..46a334ef38 100644
--- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt
+++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt
@@ -37,10 +37,12 @@ import android.os.Build
import android.os.Bundle
import android.os.Debug
import android.os.Environment
+import android.util.Log
import android.widget.Toast
import androidx.window.layout.WindowMetricsCalculator
import org.godotengine.godot.FullScreenGodotApp
import org.godotengine.godot.utils.PermissionsUtil
+import org.godotengine.godot.utils.ProcessPhoenix
import java.util.*
import kotlin.math.min
@@ -56,12 +58,17 @@ import kotlin.math.min
open class GodotEditor : FullScreenGodotApp() {
companion object {
+ private val TAG = GodotEditor::class.java.simpleName
+
private const val WAIT_FOR_DEBUGGER = false
private const val COMMAND_LINE_PARAMS = "command_line_params"
private const val EDITOR_ARG = "--editor"
+ private const val EDITOR_ARG_SHORT = "-e"
+
private const val PROJECT_MANAGER_ARG = "--project-manager"
+ private const val PROJECT_MANAGER_ARG_SHORT = "-p"
}
private val commandLineParams = ArrayList<String>()
@@ -105,13 +112,13 @@ open class GodotEditor : FullScreenGodotApp() {
Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && (isInMultiWindowMode || isLargeScreen)
for (arg in args) {
- if (EDITOR_ARG == arg) {
+ if (EDITOR_ARG == arg || EDITOR_ARG_SHORT == arg) {
targetClass = GodotEditor::class.java
launchAdjacent = false
break
}
- if (PROJECT_MANAGER_ARG == arg) {
+ if (PROJECT_MANAGER_ARG == arg || PROJECT_MANAGER_ARG_SHORT == arg) {
targetClass = GodotProjectManager::class.java
launchAdjacent = false
break
@@ -125,7 +132,13 @@ open class GodotEditor : FullScreenGodotApp() {
if (launchAdjacent) {
newInstance.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT)
}
- startActivity(newInstance)
+ if (targetClass == javaClass) {
+ Log.d(TAG, "Restarting $targetClass")
+ ProcessPhoenix.triggerRebirth(this, newInstance)
+ } else {
+ Log.d(TAG, "Starting $targetClass")
+ startActivity(newInstance)
+ }
}
// Get the screen's density scale
diff --git a/platform/android/java/editor/src/main/res/values/themes.xml b/platform/android/java/editor/src/main/res/values/themes.xml
new file mode 100644
index 0000000000..fda04d6dc7
--- /dev/null
+++ b/platform/android/java/editor/src/main/res/values/themes.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="GodotEditorTheme" parent="@android:style/Theme.Black.NoTitleBar.Fullscreen">
+ </style>
+</resources>
diff --git a/platform/android/java/gradle/wrapper/gradle-wrapper.properties b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
index ffed3a254e..41dfb87909 100644
--- a/platform/android/java/gradle/wrapper/gradle-wrapper.properties
+++ b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/platform/android/java/lib/AndroidManifest.xml b/platform/android/java/lib/AndroidManifest.xml
index 79b5aadf2a..1f77e2fc34 100644
--- a/platform/android/java/lib/AndroidManifest.xml
+++ b/platform/android/java/lib/AndroidManifest.xml
@@ -4,9 +4,6 @@
android:versionCode="1"
android:versionName="1.0">
- <!-- Should match the mindSdk and targetSdk values in platform/android/java/app/config.gradle -->
- <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="32" />
-
<application>
<!-- Records the version of the Godot library -->
diff --git a/platform/android/java/lib/build.gradle b/platform/android/java/lib/build.gradle
index c9e2a5d7d2..841656a240 100644
--- a/platform/android/java/lib/build.gradle
+++ b/platform/android/java/lib/build.gradle
@@ -176,11 +176,10 @@ android {
}
}
- // TODO: Enable when issues with AGP 7.1+ are resolved (https://github.com/GodotVR/godot_openxr/issues/187).
-// publishing {
-// singleVariant("templateRelease") {
-// withSourcesJar()
-// withJavadocJar()
-// }
-// }
+ publishing {
+ singleVariant("templateRelease") {
+ withSourcesJar()
+ withJavadocJar()
+ }
+ }
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
index 92e5e59496..3487e5019c 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
@@ -175,6 +175,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
public GodotIO io;
public GodotNetUtils netUtils;
public GodotTTS tts;
+ DirectoryAccessHandler directoryAccessHandler;
public interface ResultCallback {
void callback(int requestCode, int resultCode, Intent data);
@@ -299,7 +300,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
plugin.onRegisterPluginWithGodotNative();
}
- setKeepScreenOn("True".equals(GodotLib.getGlobal("display/window/energy_saving/keep_screen_on")));
+ setKeepScreenOn(Boolean.parseBoolean(GodotLib.getGlobal("display/window/energy_saving/keep_screen_on")));
});
// Include the returned non-null views in the Godot view hierarchy.
@@ -488,7 +489,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
netUtils = new GodotNetUtils(activity);
tts = new GodotTTS(activity);
Context context = getContext();
- DirectoryAccessHandler directoryAccessHandler = new DirectoryAccessHandler(context);
+ directoryAccessHandler = new DirectoryAccessHandler(context);
FileAccessHandler fileAccessHandler = new FileAccessHandler(context);
mSensorManager = (SensorManager)activity.getSystemService(Context.SENSOR_SERVICE);
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java b/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java
index 3dfc37f6b0..f8d937521b 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotGLRenderView.java
@@ -43,8 +43,13 @@ import org.godotengine.godot.xr.regular.RegularFallbackConfigChooser;
import android.annotation.SuppressLint;
import android.content.Context;
+import android.content.res.AssetManager;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.graphics.PixelFormat;
import android.os.Build;
+import android.text.TextUtils;
+import android.util.SparseArray;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.PointerIcon;
@@ -52,6 +57,8 @@ import android.view.SurfaceView;
import androidx.annotation.Keep;
+import java.io.InputStream;
+
/**
* A simple GLSurfaceView sub-class that demonstrate how to perform
* OpenGL ES 2.0 rendering into a GL Surface. Note the following important
@@ -61,7 +68,7 @@ import androidx.annotation.Keep;
* See ContextFactory class definition below.
*
* - The class must use a custom EGLConfigChooser to be able to select
- * an EGLConfig that supports 2.0. This is done by providing a config
+ * an EGLConfig that supports 3.0. This is done by providing a config
* specification to eglChooseConfig() that has the attribute
* EGL10.ELG_RENDERABLE_TYPE containing the EGL_OPENGL_ES2_BIT flag
* set. See ConfigChooser class definition below.
@@ -74,6 +81,7 @@ public class GodotGLRenderView extends GLSurfaceView implements GodotRenderView
private final Godot godot;
private final GodotInputHandler inputHandler;
private final GodotRenderer godotRenderer;
+ private final SparseArray<PointerIcon> customPointerIcons = new SparseArray<>();
public GodotGLRenderView(Context context, Godot godot, XRMode xrMode, boolean p_use_debug_opengl) {
super(context);
@@ -169,12 +177,49 @@ public class GodotGLRenderView extends GLSurfaceView implements GodotRenderView
}
/**
+ * Used to configure the PointerIcon for the given type.
+ *
+ * Called from JNI
+ */
+ @Keep
+ @Override
+ public void configurePointerIcon(int pointerType, String imagePath, float hotSpotX, float hotSpotY) {
+ if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
+ try {
+ Bitmap bitmap = null;
+ if (!TextUtils.isEmpty(imagePath)) {
+ if (godot.directoryAccessHandler.filesystemFileExists(imagePath)) {
+ // Try to load the bitmap from the file system
+ bitmap = BitmapFactory.decodeFile(imagePath);
+ } else if (godot.directoryAccessHandler.assetsFileExists(imagePath)) {
+ // Try to load the bitmap from the assets directory
+ AssetManager am = getContext().getAssets();
+ InputStream imageInputStream = am.open(imagePath);
+ bitmap = BitmapFactory.decodeStream(imageInputStream);
+ }
+ }
+
+ PointerIcon customPointerIcon = PointerIcon.create(bitmap, hotSpotX, hotSpotY);
+ customPointerIcons.put(pointerType, customPointerIcon);
+ } catch (Exception e) {
+ // Reset the custom pointer icon
+ customPointerIcons.delete(pointerType);
+ }
+ }
+ }
+
+ /**
* called from JNI to change pointer icon
*/
@Keep
+ @Override
public void setPointerIcon(int pointerType) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- setPointerIcon(PointerIcon.getSystemIcon(getContext(), pointerType));
+ PointerIcon pointerIcon = customPointerIcons.get(pointerType);
+ if (pointerIcon == null) {
+ pointerIcon = PointerIcon.getSystemIcon(getContext(), pointerType);
+ }
+ setPointerIcon(pointerIcon);
}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java b/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
index 26aad867b1..33896ecb95 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
@@ -110,7 +110,7 @@ public class GodotLib {
/**
* Forward touch events.
*/
- public static native void dispatchTouchEvent(int event, int pointer, int pointerCount, float[] positions);
+ public static native void dispatchTouchEvent(int event, int pointer, int pointerCount, float[] positions, boolean doubleTap);
/**
* Dispatch mouse events
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java b/platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java
index cb63fd885f..ab74ba037d 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotRenderView.java
@@ -48,5 +48,7 @@ public interface GodotRenderView {
GodotInputHandler getInputHandler();
+ void configurePointerIcon(int pointerType, String imagePath, float hotSpotX, float hotSpotY);
+
void setPointerIcon(int pointerType);
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java b/platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java
index 0becf00d93..56bc7f9e76 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotVulkanRenderView.java
@@ -36,7 +36,12 @@ import org.godotengine.godot.vulkan.VkSurfaceView;
import android.annotation.SuppressLint;
import android.content.Context;
+import android.content.res.AssetManager;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.os.Build;
+import android.text.TextUtils;
+import android.util.SparseArray;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.PointerIcon;
@@ -44,10 +49,13 @@ import android.view.SurfaceView;
import androidx.annotation.Keep;
+import java.io.InputStream;
+
public class GodotVulkanRenderView extends VkSurfaceView implements GodotRenderView {
private final Godot godot;
private final GodotInputHandler mInputHandler;
private final VkRenderer mRenderer;
+ private final SparseArray<PointerIcon> customPointerIcons = new SparseArray<>();
public GodotVulkanRenderView(Context context, Godot godot) {
super(context);
@@ -143,12 +151,49 @@ public class GodotVulkanRenderView extends VkSurfaceView implements GodotRenderV
}
/**
+ * Used to configure the PointerIcon for the given type.
+ *
+ * Called from JNI
+ */
+ @Keep
+ @Override
+ public void configurePointerIcon(int pointerType, String imagePath, float hotSpotX, float hotSpotY) {
+ if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
+ try {
+ Bitmap bitmap = null;
+ if (!TextUtils.isEmpty(imagePath)) {
+ if (godot.directoryAccessHandler.filesystemFileExists(imagePath)) {
+ // Try to load the bitmap from the file system
+ bitmap = BitmapFactory.decodeFile(imagePath);
+ } else if (godot.directoryAccessHandler.assetsFileExists(imagePath)) {
+ // Try to load the bitmap from the assets directory
+ AssetManager am = getContext().getAssets();
+ InputStream imageInputStream = am.open(imagePath);
+ bitmap = BitmapFactory.decodeStream(imageInputStream);
+ }
+ }
+
+ PointerIcon customPointerIcon = PointerIcon.create(bitmap, hotSpotX, hotSpotY);
+ customPointerIcons.put(pointerType, customPointerIcon);
+ } catch (Exception e) {
+ // Reset the custom pointer icon
+ customPointerIcons.delete(pointerType);
+ }
+ }
+ }
+
+ /**
* called from JNI to change pointer icon
*/
@Keep
+ @Override
public void setPointerIcon(int pointerType) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- setPointerIcon(PointerIcon.getSystemIcon(getContext(), pointerType));
+ PointerIcon pointerIcon = customPointerIcons.get(pointerType);
+ if (pointerIcon == null) {
+ pointerIcon = PointerIcon.getSystemIcon(getContext(), pointerType);
+ }
+ setPointerIcon(pointerIcon);
}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
index 7925b54fc4..804dbaf165 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotEditText.java
@@ -127,7 +127,9 @@ public class GodotEditText extends EditText {
edit.setText("");
edit.append(text);
if (msg.arg2 != -1) {
- edit.setSelection(msg.arg1, msg.arg2);
+ int selectionStart = Math.min(msg.arg1, edit.length());
+ int selectionEnd = Math.min(msg.arg2, edit.length());
+ edit.setSelection(selectionStart, selectionEnd);
edit.mInputWrapper.setSelection(true);
} else {
edit.mInputWrapper.setSelection(false);
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt b/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt
index 9715c31fc1..cde8d7cdae 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt
@@ -55,18 +55,15 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
*/
var panningAndScalingEnabled = false
- private var doubleTapInProgress = false
+ private var nextDownIsDoubleTap = false
private var dragInProgress = false
private var scaleInProgress = false
private var contextClickInProgress = false
private var pointerCaptureInProgress = false
override fun onDown(event: MotionEvent): Boolean {
- // Don't send / register a down event while we're in the middle of a double-tap
- if (!doubleTapInProgress) {
- // Send the down event
- GodotInputHandler.handleMotionEvent(event)
- }
+ GodotInputHandler.handleMotionEvent(event.source, MotionEvent.ACTION_DOWN, event.buttonState, event.x, event.y, nextDownIsDoubleTap)
+ nextDownIsDoubleTap = false
return true
}
@@ -80,7 +77,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
}
private fun contextClickRouter(event: MotionEvent) {
- if (scaleInProgress) {
+ if (scaleInProgress || nextDownIsDoubleTap) {
return
}
@@ -137,40 +134,24 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
}
private fun onActionUp(event: MotionEvent): Boolean {
+ if (event.actionMasked == MotionEvent.ACTION_CANCEL && pointerCaptureInProgress) {
+ // Don't dispatch the ACTION_CANCEL while a capture is in progress
+ return true
+ }
+
val sourceMouseRelative = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
event.isFromSource(InputDevice.SOURCE_MOUSE_RELATIVE)
} else {
false
}
- when {
- pointerCaptureInProgress -> {
- return if (event.actionMasked == MotionEvent.ACTION_CANCEL) {
- // Don't dispatch the ACTION_CANCEL while a capture is in progress
- true
- } else {
- GodotInputHandler.handleMouseEvent(
- MotionEvent.ACTION_UP,
- event.buttonState,
- event.x,
- event.y,
- 0f,
- 0f,
- false,
- sourceMouseRelative
- )
- pointerCaptureInProgress = false
- true
- }
- }
- dragInProgress -> {
- GodotInputHandler.handleMotionEvent(event)
- dragInProgress = false
- return true
- }
- contextClickInProgress -> {
+
+ if (pointerCaptureInProgress || dragInProgress || contextClickInProgress) {
+ if (contextClickInProgress || GodotInputHandler.isMouseEvent(event)) {
+ // This may be an ACTION_BUTTON_RELEASE event which we don't handle,
+ // so we convert it to an ACTION_UP event.
GodotInputHandler.handleMouseEvent(
- event.actionMasked,
- 0,
+ MotionEvent.ACTION_UP,
+ event.buttonState,
event.x,
event.y,
0f,
@@ -178,11 +159,16 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
false,
sourceMouseRelative
)
- contextClickInProgress = false
- return true
+ } else {
+ GodotInputHandler.handleTouchEvent(event)
}
- else -> return false
+ pointerCaptureInProgress = false
+ dragInProgress = false
+ contextClickInProgress = false
+ return true
}
+
+ return false
}
private fun onActionMove(event: MotionEvent): Boolean {
@@ -209,24 +195,14 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
override fun onDoubleTapEvent(event: MotionEvent): Boolean {
if (event.actionMasked == MotionEvent.ACTION_UP) {
- doubleTapInProgress = false
+ nextDownIsDoubleTap = false
+ GodotInputHandler.handleMotionEvent(event)
}
return true
}
override fun onDoubleTap(event: MotionEvent): Boolean {
- doubleTapInProgress = true
- val x = event.x
- val y = event.y
- val buttonMask =
- if (GodotInputHandler.isMouseEvent(event)) {
- event.buttonState
- } else {
- MotionEvent.BUTTON_PRIMARY
- }
- GodotInputHandler.handleMouseEvent(MotionEvent.ACTION_DOWN, buttonMask, x, y, true)
- GodotInputHandler.handleMouseEvent(MotionEvent.ACTION_UP, 0, x, y, false)
-
+ nextDownIsDoubleTap = true
return true
}
@@ -255,7 +231,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
val x = terminusEvent.x
val y = terminusEvent.y
- if (terminusEvent.pointerCount >= 2 && panningAndScalingEnabled) {
+ if (terminusEvent.pointerCount >= 2 && panningAndScalingEnabled && !pointerCaptureInProgress) {
GodotLib.pan(x, y, distanceX / 5f, distanceY / 5f)
} else {
GodotInputHandler.handleMotionEvent(terminusEvent)
@@ -264,7 +240,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
}
override fun onScale(detector: ScaleGestureDetector?): Boolean {
- if (detector == null || !panningAndScalingEnabled) {
+ if (detector == null || !panningAndScalingEnabled || pointerCaptureInProgress) {
return false
}
GodotLib.magnify(
@@ -276,7 +252,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
}
override fun onScaleBegin(detector: ScaleGestureDetector?): Boolean {
- if (detector == null || !panningAndScalingEnabled) {
+ if (detector == null || !panningAndScalingEnabled || pointerCaptureInProgress) {
return false
}
scaleInProgress = true
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
index 03cb8034fa..0ba86e4316 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
@@ -245,7 +245,7 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
}
return true;
}
- } else if (isMouseEvent(event)) {
+ } else {
return handleMouseEvent(event);
}
@@ -422,7 +422,7 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
}
private static boolean isMouseEvent(int eventSource) {
- boolean mouseSource = ((eventSource & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) || ((eventSource & InputDevice.SOURCE_STYLUS) == InputDevice.SOURCE_STYLUS);
+ boolean mouseSource = ((eventSource & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) || ((eventSource & (InputDevice.SOURCE_TOUCHSCREEN | InputDevice.SOURCE_STYLUS)) == InputDevice.SOURCE_STYLUS);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mouseSource = mouseSource || ((eventSource & InputDevice.SOURCE_MOUSE_RELATIVE) == InputDevice.SOURCE_MOUSE_RELATIVE);
}
@@ -438,15 +438,19 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
}
static boolean handleMotionEvent(int eventSource, int eventAction, int buttonsMask, float x, float y) {
- return handleMotionEvent(eventSource, eventAction, buttonsMask, x, y, 0, 0);
+ return handleMotionEvent(eventSource, eventAction, buttonsMask, x, y, false);
+ }
+
+ static boolean handleMotionEvent(int eventSource, int eventAction, int buttonsMask, float x, float y, boolean doubleTap) {
+ return handleMotionEvent(eventSource, eventAction, buttonsMask, x, y, 0, 0, doubleTap);
}
- static boolean handleMotionEvent(int eventSource, int eventAction, int buttonsMask, float x, float y, float deltaX, float deltaY) {
+ static boolean handleMotionEvent(int eventSource, int eventAction, int buttonsMask, float x, float y, float deltaX, float deltaY, boolean doubleTap) {
if (isMouseEvent(eventSource)) {
- return handleMouseEvent(eventAction, buttonsMask, x, y, deltaX, deltaY, false, false);
+ return handleMouseEvent(eventAction, buttonsMask, x, y, deltaX, deltaY, doubleTap, false);
}
- return handleTouchEvent(eventAction, x, y);
+ return handleTouchEvent(eventAction, x, y, doubleTap);
}
static boolean handleMouseEvent(final MotionEvent event) {
@@ -468,11 +472,10 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
return handleMouseEvent(eventAction, buttonsMask, x, y, 0, 0, false, false);
}
- static boolean handleMouseEvent(int eventAction, int buttonsMask, float x, float y, boolean doubleClick) {
- return handleMouseEvent(eventAction, buttonsMask, x, y, 0, 0, doubleClick, false);
- }
-
static boolean handleMouseEvent(int eventAction, int buttonsMask, float x, float y, float deltaX, float deltaY, boolean doubleClick, boolean sourceMouseRelative) {
+ // We don't handle ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE events as they typically
+ // follow ACTION_DOWN and ACTION_UP events. As such, handling them would result in duplicate
+ // stream of events to the engine.
switch (eventAction) {
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
@@ -508,14 +511,14 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
final int action = event.getActionMasked();
final int actionPointerId = event.getPointerId(event.getActionIndex());
- return handleTouchEvent(action, actionPointerId, pointerCount, positions);
+ return handleTouchEvent(action, actionPointerId, pointerCount, positions, false);
}
- static boolean handleTouchEvent(int eventAction, float x, float y) {
- return handleTouchEvent(eventAction, 0, 1, new float[] { 0, x, y });
+ static boolean handleTouchEvent(int eventAction, float x, float y, boolean doubleTap) {
+ return handleTouchEvent(eventAction, 0, 1, new float[] { 0, x, y }, doubleTap);
}
- static boolean handleTouchEvent(int eventAction, int actionPointerId, int pointerCount, float[] positions) {
+ static boolean handleTouchEvent(int eventAction, int actionPointerId, int pointerCount, float[] positions, boolean doubleTap) {
switch (eventAction) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_CANCEL:
@@ -523,7 +526,7 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
case MotionEvent.ACTION_MOVE:
case MotionEvent.ACTION_POINTER_UP:
case MotionEvent.ACTION_POINTER_DOWN: {
- GodotLib.dispatchTouchEvent(eventAction, actionPointerId, pointerCount, positions);
+ GodotLib.dispatchTouchEvent(eventAction, actionPointerId, pointerCount, positions, doubleTap);
return true;
}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt b/platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt
index c9282dd247..1a3576a6a9 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt
+++ b/platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt
@@ -90,6 +90,11 @@ internal enum class StorageScope {
return APP
}
+ var rootDir: String? = System.getenv("ANDROID_ROOT")
+ if (rootDir != null && canonicalPathFile.startsWith(rootDir)) {
+ return APP
+ }
+
if (sharedDir != null && canonicalPathFile.startsWith(sharedDir)) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
// Before R, apps had access to shared storage so long as they have the right
diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/directory/DirectoryAccessHandler.kt b/platform/android/java/lib/src/org/godotengine/godot/io/directory/DirectoryAccessHandler.kt
index fedcf4843f..6bc317415f 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/io/directory/DirectoryAccessHandler.kt
+++ b/platform/android/java/lib/src/org/godotengine/godot/io/directory/DirectoryAccessHandler.kt
@@ -79,6 +79,9 @@ class DirectoryAccessHandler(context: Context) {
private val assetsDirAccess = AssetsDirectoryAccess(context)
private val fileSystemDirAccess = FilesystemDirectoryAccess(context)
+ fun assetsFileExists(assetsPath: String) = assetsDirAccess.fileExists(assetsPath)
+ fun filesystemFileExists(path: String) = fileSystemDirAccess.fileExists(path)
+
private fun hasDirId(accessType: AccessType, dirId: Int): Boolean {
return when (accessType) {
ACCESS_RESOURCES -> assetsDirAccess.hasDirId(dirId)
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
index bb5042fa09..8ca5bcaa6e 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
@@ -71,11 +71,11 @@ import javax.microedition.khronos.opengles.GL10;
* - 'plugin.init.ClassFullName' is the full name (package + class name) of the plugin class
* extending {@link GodotPlugin}.
*
- * A plugin can also define and provide c/c++ gdnative libraries and nativescripts for the target
+ * A plugin can also define and provide c/c++ gdextension libraries and nativescripts for the target
* app/game to leverage.
- * The shared library for the gdnative library will be automatically bundled by the aar build
+ * The shared library for the gdextension library will be automatically bundled by the aar build
* system.
- * Godot '*.gdnlib' and '*.gdns' resource files must however be manually defined in the project
+ * Godot '*.gdextension' resource files must however be manually defined in the project
* 'assets' directory. The recommended path for these resources in the 'assets' directory should be:
* 'godot/plugin/v1/[PluginName]/'
*/
@@ -112,7 +112,7 @@ public abstract class GodotPlugin {
public final void onRegisterPluginWithGodotNative() {
registeredSignals.putAll(
registerPluginWithGodotNative(this, getPluginName(), getPluginMethods(), getPluginSignals(),
- getPluginGDNativeLibrariesPaths()));
+ getPluginGDExtensionLibrariesPaths()));
}
/**
@@ -124,7 +124,7 @@ public abstract class GodotPlugin {
GodotPluginInfoProvider pluginInfoProvider) {
registerPluginWithGodotNative(pluginObject, pluginInfoProvider.getPluginName(),
Collections.emptyList(), pluginInfoProvider.getPluginSignals(),
- pluginInfoProvider.getPluginGDNativeLibrariesPaths());
+ pluginInfoProvider.getPluginGDExtensionLibrariesPaths());
// Notify that registration is complete.
pluginInfoProvider.onPluginRegistered();
@@ -132,7 +132,7 @@ public abstract class GodotPlugin {
private static Map<String, SignalInfo> registerPluginWithGodotNative(Object pluginObject,
String pluginName, List<String> pluginMethods, Set<SignalInfo> pluginSignals,
- Set<String> pluginGDNativeLibrariesPaths) {
+ Set<String> pluginGDExtensionLibrariesPaths) {
nativeRegisterSingleton(pluginName, pluginObject);
Set<Method> filteredMethods = new HashSet<>();
@@ -176,9 +176,9 @@ public abstract class GodotPlugin {
registeredSignals.put(signalName, signalInfo);
}
- // Get the list of gdnative libraries to register.
- if (!pluginGDNativeLibrariesPaths.isEmpty()) {
- nativeRegisterGDNativeLibraries(pluginGDNativeLibrariesPaths.toArray(new String[0]));
+ // Get the list of gdextension libraries to register.
+ if (!pluginGDExtensionLibrariesPaths.isEmpty()) {
+ nativeRegisterGDExtensionLibraries(pluginGDExtensionLibrariesPaths.toArray(new String[0]));
}
return registeredSignals;
@@ -304,12 +304,12 @@ public abstract class GodotPlugin {
}
/**
- * Returns the paths for the plugin's gdnative libraries.
+ * Returns the paths for the plugin's gdextension libraries.
*
- * The paths must be relative to the 'assets' directory and point to a '*.gdnlib' file.
+ * The paths must be relative to the 'assets' directory and point to a '*.gdextension' file.
*/
@NonNull
- protected Set<String> getPluginGDNativeLibrariesPaths() {
+ protected Set<String> getPluginGDExtensionLibrariesPaths() {
return Collections.emptySet();
}
@@ -420,10 +420,10 @@ public abstract class GodotPlugin {
private static native void nativeRegisterMethod(String p_sname, String p_name, String p_ret, String[] p_params);
/**
- * Used to register gdnative libraries bundled by the plugin.
- * @param gdnlibPaths Paths to the libraries relative to the 'assets' directory.
+ * Used to register gdextension libraries bundled by the plugin.
+ * @param gdextensionPaths Paths to the libraries relative to the 'assets' directory.
*/
- private static native void nativeRegisterGDNativeLibraries(String[] gdnlibPaths);
+ private static native void nativeRegisterGDExtensionLibraries(String[] gdextensionPaths);
/**
* Used to complete registration of the {@link GodotPlugin} instance's methods.
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java
index cfb84c3931..53b78aebfb 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java
@@ -54,12 +54,12 @@ public interface GodotPluginInfoProvider {
}
/**
- * Returns the paths for the plugin's gdnative libraries (if any).
+ * Returns the paths for the plugin's gdextension libraries (if any).
*
- * The paths must be relative to the 'assets' directory and point to a '*.gdnlib' file.
+ * The paths must be relative to the 'assets' directory and point to a '*.gdextension' file.
*/
@NonNull
- default Set<String> getPluginGDNativeLibrariesPaths() {
+ default Set<String> getPluginGDExtensionLibrariesPaths() {
return Collections.emptySet();
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java
index 445238b1c2..9834fdfb88 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularConfigChooser.java
@@ -45,20 +45,18 @@ public class RegularConfigChooser implements GLSurfaceView.EGLConfigChooser {
private int[] mValue = new int[1];
- // FIXME: Add support for Vulkan.
-
- /* This EGL config specification is used to specify 2.0 rendering.
+ /* This EGL config specification is used to specify 3.0 rendering.
* We use a minimum size of 4 bits for red/green/blue, but will
* perform actual matching in chooseConfig() below.
*/
private static int EGL_OPENGL_ES2_BIT = 4;
- private static int[] s_configAttribs2 = {
+ private static int[] s_configAttribs = {
EGL10.EGL_RED_SIZE, 4,
EGL10.EGL_GREEN_SIZE, 4,
EGL10.EGL_BLUE_SIZE, 4,
- // EGL10.EGL_DEPTH_SIZE, 16,
+ // EGL10.EGL_DEPTH_SIZE, 16,
// EGL10.EGL_STENCIL_SIZE, EGL10.EGL_DONT_CARE,
- EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, //apparently there is no EGL_OPENGL_ES3_BIT
EGL10.EGL_NONE
};
@@ -75,7 +73,7 @@ public class RegularConfigChooser implements GLSurfaceView.EGLConfigChooser {
/* Get the number of minimally matching EGL configurations
*/
int[] num_config = new int[1];
- egl.eglChooseConfig(display, s_configAttribs2, null, 0, num_config);
+ egl.eglChooseConfig(display, s_configAttribs, null, 0, num_config);
int numConfigs = num_config[0];
@@ -86,7 +84,7 @@ public class RegularConfigChooser implements GLSurfaceView.EGLConfigChooser {
/* Allocate then read the array of minimally matching EGL configs
*/
EGLConfig[] configs = new EGLConfig[numConfigs];
- egl.eglChooseConfig(display, s_configAttribs2, configs, numConfigs, num_config);
+ egl.eglChooseConfig(display, s_configAttribs, configs, numConfigs, num_config);
if (GLUtils.DEBUG) {
GLUtils.printConfigs(egl, display, configs);
diff --git a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java
index 5d62723170..8fb86bf6d0 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/xr/regular/RegularContextFactory.java
@@ -52,17 +52,16 @@ public class RegularContextFactory implements GLSurfaceView.EGLContextFactory {
private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
- // FIXME: Add support for Vulkan.
- Log.w(TAG, "creating OpenGL ES 2.0 context :");
+ Log.w(TAG, "creating OpenGL ES 3.0 context :");
GLUtils.checkEglError(TAG, "Before eglCreateContext", egl);
EGLContext context;
if (GLUtils.use_debug_opengl) {
- int[] attrib_list2 = { EGL_CONTEXT_CLIENT_VERSION, 2, _EGL_CONTEXT_FLAGS_KHR, _EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR, EGL10.EGL_NONE };
- context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list2);
+ int[] attrib_list = { EGL_CONTEXT_CLIENT_VERSION, 3, _EGL_CONTEXT_FLAGS_KHR, _EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR, EGL10.EGL_NONE };
+ context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
} else {
- int[] attrib_list2 = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
- context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list2);
+ int[] attrib_list = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL10.EGL_NONE };
+ context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
}
GLUtils.checkEglError(TAG, "After eglCreateContext", egl);
return context;
diff --git a/platform/android/java/nativeSrcsConfigs/CMakeLists.txt b/platform/android/java/nativeSrcsConfigs/CMakeLists.txt
index 711f7cd502..e1534c7685 100644
--- a/platform/android/java/nativeSrcsConfigs/CMakeLists.txt
+++ b/platform/android/java/nativeSrcsConfigs/CMakeLists.txt
@@ -17,4 +17,4 @@ target_include_directories(${PROJECT_NAME}
SYSTEM PUBLIC
${GODOT_ROOT_DIR})
-add_definitions(-DUNIX_ENABLED -DVULKAN_ENABLED -DANDROID_ENABLED)
+add_definitions(-DUNIX_ENABLED -DVULKAN_ENABLED -DANDROID_ENABLED -DGLES3_ENABLED -DTOOLS_ENABLED)
diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp
index 04b69d5b86..c2c25601d7 100644
--- a/platform/android/java_godot_lib_jni.cpp
+++ b/platform/android/java_godot_lib_jni.cpp
@@ -71,6 +71,39 @@ static Vector3 gravity;
static Vector3 magnetometer;
static Vector3 gyroscope;
+static void _terminate(JNIEnv *env, bool p_restart = false) {
+ step.set(-1); // Ensure no further steps are attempted and no further events are sent
+
+ // lets cleanup
+ if (java_class_wrapper) {
+ memdelete(java_class_wrapper);
+ }
+ if (input_handler) {
+ delete input_handler;
+ }
+ // Whether restarting is handled by 'Main::cleanup()'
+ bool restart_on_cleanup = false;
+ if (os_android) {
+ restart_on_cleanup = os_android->is_restart_on_exit_set();
+ os_android->main_loop_end();
+ Main::cleanup();
+ delete os_android;
+ }
+ if (godot_io_java) {
+ delete godot_io_java;
+ }
+ if (godot_java) {
+ if (!restart_on_cleanup) {
+ if (p_restart) {
+ godot_java->restart(env);
+ } else {
+ godot_java->force_quit(env);
+ }
+ }
+ delete godot_java;
+ }
+}
+
extern "C" {
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight(JNIEnv *env, jclass clazz, jint p_height) {
@@ -104,23 +137,7 @@ JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ondestroy(JNIEnv *env, jclass clazz) {
- // lets cleanup
- if (java_class_wrapper) {
- memdelete(java_class_wrapper);
- }
- if (godot_io_java) {
- delete godot_io_java;
- }
- if (godot_java) {
- delete godot_java;
- }
- if (input_handler) {
- delete input_handler;
- }
- if (os_android) {
- os_android->main_loop_end();
- delete os_android;
- }
+ _terminate(env, false);
}
JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jclass clazz, jobjectArray p_cmdline) {
@@ -196,9 +213,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *en
}
} else {
// Rendering context recreated because it was lost; restart app to let it reload everything
- step.set(-1); // Ensure no further steps are attempted and no further events are sent
- os_android->main_loop_end();
- godot_java->restart(env);
+ _terminate(env, true);
}
}
}
@@ -249,7 +264,7 @@ JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env,
bool should_swap_buffers = false;
if (os_android->main_loop_iterate(&should_swap_buffers)) {
- godot_java->force_quit(env);
+ _terminate(env, false);
}
return should_swap_buffers;
@@ -265,7 +280,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_dispatchMouseEvent(JN
}
// Called on the UI thread
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_dispatchTouchEvent(JNIEnv *env, jclass clazz, jint ev, jint pointer, jint pointer_count, jfloatArray position) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_dispatchTouchEvent(JNIEnv *env, jclass clazz, jint ev, jint pointer, jint pointer_count, jfloatArray position, jboolean p_double_tap) {
if (step.get() <= 0) {
return;
}
@@ -280,7 +295,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_dispatchTouchEvent(JN
points.push_back(tp);
}
- input_handler->process_touch_event(ev, pointer, points);
+ input_handler->process_touch_event(ev, pointer, points, p_double_tap);
}
// Called on the UI thread
@@ -409,7 +424,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env,
JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jclass clazz, jstring path) {
String js = jstring_to_string(path, env);
- return env->NewStringUTF(ProjectSettings::get_singleton()->get(js).operator String().utf8().get_data());
+ return env->NewStringUTF(GLOBAL_GET(js).operator String().utf8().get_data());
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jclass clazz, jlong ID, jstring method, jobjectArray params) {
diff --git a/platform/android/java_godot_lib_jni.h b/platform/android/java_godot_lib_jni.h
index 09fed15690..f3f2646bfb 100644
--- a/platform/android/java_godot_lib_jni.h
+++ b/platform/android/java_godot_lib_jni.h
@@ -46,7 +46,7 @@ JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env,
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ttsCallback(JNIEnv *env, jclass clazz, jint event, jint id, jint pos);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jclass clazz);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_dispatchMouseEvent(JNIEnv *env, jclass clazz, jint p_event_type, jint p_button_mask, jfloat p_x, jfloat p_y, jfloat p_delta_x, jfloat p_delta_y, jboolean p_double_click, jboolean p_source_mouse_relative);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_dispatchTouchEvent(JNIEnv *env, jclass clazz, jint ev, jint pointer, jint pointer_count, jfloatArray positions);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_dispatchTouchEvent(JNIEnv *env, jclass clazz, jint ev, jint pointer, jint pointer_count, jfloatArray positions, jboolean p_double_tap);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_magnify(JNIEnv *env, jclass clazz, jfloat p_x, jfloat p_y, jfloat p_factor);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_pan(JNIEnv *env, jclass clazz, jfloat p_x, jfloat p_y, jfloat p_delta_x, jfloat p_delta_y);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jclass clazz, jint p_keycode, jint p_physical_keycode, jint p_unicode, jboolean p_pressed);
diff --git a/platform/android/java_godot_view_wrapper.cpp b/platform/android/java_godot_view_wrapper.cpp
index 762840a4b1..23cfc5f2e6 100644
--- a/platform/android/java_godot_view_wrapper.cpp
+++ b/platform/android/java_godot_view_wrapper.cpp
@@ -42,6 +42,7 @@ GodotJavaViewWrapper::GodotJavaViewWrapper(jobject godot_view) {
int android_device_api_level = android_get_device_api_level();
if (android_device_api_level >= __ANDROID_API_N__) {
+ _configure_pointer_icon = env->GetMethodID(_cls, "configurePointerIcon", "(ILjava/lang/String;FF)V");
_set_pointer_icon = env->GetMethodID(_cls, "setPointerIcon", "(I)V");
}
if (android_device_api_level >= __ANDROID_API_O__) {
@@ -51,7 +52,7 @@ GodotJavaViewWrapper::GodotJavaViewWrapper(jobject godot_view) {
}
bool GodotJavaViewWrapper::can_update_pointer_icon() const {
- return _set_pointer_icon != nullptr;
+ return _configure_pointer_icon != nullptr && _set_pointer_icon != nullptr;
}
bool GodotJavaViewWrapper::can_capture_pointer() const {
@@ -68,7 +69,7 @@ void GodotJavaViewWrapper::request_pointer_capture() {
}
void GodotJavaViewWrapper::release_pointer_capture() {
- if (_request_pointer_capture != nullptr) {
+ if (_release_pointer_capture != nullptr) {
JNIEnv *env = get_jni_env();
ERR_FAIL_NULL(env);
@@ -76,6 +77,16 @@ void GodotJavaViewWrapper::release_pointer_capture() {
}
}
+void GodotJavaViewWrapper::configure_pointer_icon(int pointer_type, const String &image_path, const Vector2 &p_hotspot) {
+ if (_configure_pointer_icon != nullptr) {
+ JNIEnv *env = get_jni_env();
+ ERR_FAIL_NULL(env);
+
+ jstring jImagePath = env->NewStringUTF(image_path.utf8().get_data());
+ env->CallVoidMethod(_godot_view, _configure_pointer_icon, pointer_type, jImagePath, p_hotspot.x, p_hotspot.y);
+ }
+}
+
void GodotJavaViewWrapper::set_pointer_icon(int pointer_type) {
if (_set_pointer_icon != nullptr) {
JNIEnv *env = get_jni_env();
diff --git a/platform/android/java_godot_view_wrapper.h b/platform/android/java_godot_view_wrapper.h
index b398c73cac..b58a6607ce 100644
--- a/platform/android/java_godot_view_wrapper.h
+++ b/platform/android/java_godot_view_wrapper.h
@@ -31,6 +31,7 @@
#ifndef JAVA_GODOT_VIEW_WRAPPER_H
#define JAVA_GODOT_VIEW_WRAPPER_H
+#include "core/math/vector2.h"
#include <android/log.h>
#include <jni.h>
@@ -45,6 +46,8 @@ private:
jmethodID _request_pointer_capture = 0;
jmethodID _release_pointer_capture = 0;
+
+ jmethodID _configure_pointer_icon = 0;
jmethodID _set_pointer_icon = 0;
public:
@@ -55,6 +58,8 @@ public:
void request_pointer_capture();
void release_pointer_capture();
+
+ void configure_pointer_icon(int pointer_type, const String &image_path, const Vector2 &p_hotspot);
void set_pointer_icon(int pointer_type);
~GodotJavaViewWrapper();
diff --git a/platform/android/jni_utils.cpp b/platform/android/jni_utils.cpp
index d46b4f39de..8b29670542 100644
--- a/platform/android/jni_utils.cpp
+++ b/platform/android/jni_utils.cpp
@@ -149,6 +149,15 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a
v.obj = arr;
} break;
+ case Variant::PACKED_INT64_ARRAY: {
+ Vector<int64_t> array = *p_arg;
+ jlongArray arr = env->NewLongArray(array.size());
+ const int64_t *r = array.ptr();
+ env->SetLongArrayRegion(arr, 0, array.size(), r);
+ v.val.l = arr;
+ v.obj = arr;
+
+ } break;
case Variant::PACKED_BYTE_ARRAY: {
Vector<uint8_t> array = *p_arg;
jbyteArray arr = env->NewByteArray(array.size());
@@ -167,8 +176,15 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a
v.obj = arr;
} break;
+ case Variant::PACKED_FLOAT64_ARRAY: {
+ Vector<double> array = *p_arg;
+ jdoubleArray arr = env->NewDoubleArray(array.size());
+ const double *r = array.ptr();
+ env->SetDoubleArrayRegion(arr, 0, array.size(), r);
+ v.val.l = arr;
+ v.obj = arr;
- // TODO: This is missing 64 bits arrays, I have no idea how to do it in JNI.
+ } break;
default: {
v.val.i = 0;
@@ -244,6 +260,17 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
return sarr;
}
+ if (name == "[J") {
+ jlongArray arr = (jlongArray)obj;
+ int fCount = env->GetArrayLength(arr);
+ Vector<int64_t> sarr;
+ sarr.resize(fCount);
+
+ int64_t *w = sarr.ptrw();
+ env->GetLongArrayRegion(arr, 0, fCount, w);
+ return sarr;
+ }
+
if (name == "[B") {
jbyteArray arr = (jbyteArray)obj;
int fCount = env->GetArrayLength(arr);
@@ -265,33 +292,33 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
if (name == "[D") {
jdoubleArray arr = (jdoubleArray)obj;
int fCount = env->GetArrayLength(arr);
- PackedFloat32Array sarr;
- sarr.resize(fCount);
+ PackedFloat64Array packed_array;
+ packed_array.resize(fCount);
- real_t *w = sarr.ptrw();
+ double *w = packed_array.ptrw();
for (int i = 0; i < fCount; i++) {
double n;
env->GetDoubleArrayRegion(arr, i, 1, &n);
w[i] = n;
}
- return sarr;
+ return packed_array;
}
if (name == "[F") {
jfloatArray arr = (jfloatArray)obj;
int fCount = env->GetArrayLength(arr);
- PackedFloat32Array sarr;
- sarr.resize(fCount);
+ PackedFloat32Array packed_array;
+ packed_array.resize(fCount);
- real_t *w = sarr.ptrw();
+ float *w = packed_array.ptrw();
for (int i = 0; i < fCount; i++) {
float n;
env->GetFloatArrayRegion(arr, i, 1, &n);
w[i] = n;
}
- return sarr;
+ return packed_array;
}
if (name == "[Ljava.lang.Object;") {
@@ -344,12 +371,15 @@ Variant::Type get_jni_type(const String &p_type) {
{ "void", Variant::NIL },
{ "boolean", Variant::BOOL },
{ "int", Variant::INT },
+ { "long", Variant::INT },
{ "float", Variant::FLOAT },
{ "double", Variant::FLOAT },
{ "java.lang.String", Variant::STRING },
{ "[I", Variant::PACKED_INT32_ARRAY },
+ { "[J", Variant::PACKED_INT64_ARRAY },
{ "[B", Variant::PACKED_BYTE_ARRAY },
{ "[F", Variant::PACKED_FLOAT32_ARRAY },
+ { "[D", Variant::PACKED_FLOAT64_ARRAY },
{ "[Ljava.lang.String;", Variant::PACKED_STRING_ARRAY },
{ "org.godotengine.godot.Dictionary", Variant::DICTIONARY },
{ nullptr, Variant::NIL }
@@ -376,13 +406,16 @@ const char *get_jni_sig(const String &p_type) {
{ "void", "V" },
{ "boolean", "Z" },
{ "int", "I" },
+ { "long", "J" },
{ "float", "F" },
{ "double", "D" },
{ "java.lang.String", "Ljava/lang/String;" },
{ "org.godotengine.godot.Dictionary", "Lorg/godotengine/godot/Dictionary;" },
{ "[I", "[I" },
+ { "[J", "[J" },
{ "[B", "[B" },
{ "[F", "[F" },
+ { "[D", "[D" },
{ "[Ljava.lang.String;", "[Ljava/lang/String;" },
{ nullptr, "V" }
};
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 4469c7a0f7..317a63f21f 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -162,11 +162,16 @@ Vector<String> OS_Android::get_granted_permissions() const {
}
Error OS_Android::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
- p_library_handle = dlopen(p_path.utf8().get_data(), RTLD_NOW);
+ String path = p_path;
+ if (!FileAccess::exists(path)) {
+ path = p_path.get_file();
+ }
+
+ p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW);
ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + p_path + ", error: " + dlerror() + ".");
if (r_resolved_path != nullptr) {
- *r_resolved_path = p_path;
+ *r_resolved_path = path;
}
return OK;
@@ -263,12 +268,16 @@ bool OS_Android::main_loop_iterate(bool *r_should_swap_buffers) {
if (!main_loop) {
return false;
}
+ DisplayServerAndroid::get_singleton()->reset_swap_buffers_flag();
DisplayServerAndroid::get_singleton()->process_events();
uint64_t current_frames_drawn = Engine::get_singleton()->get_frames_drawn();
bool exit = Main::iteration();
if (r_should_swap_buffers) {
- *r_should_swap_buffers = !is_in_low_processor_usage_mode() || RenderingServer::get_singleton()->has_changed() || current_frames_drawn != Engine::get_singleton()->get_frames_drawn();
+ *r_should_swap_buffers = !is_in_low_processor_usage_mode() ||
+ DisplayServerAndroid::get_singleton()->should_swap_buffers() ||
+ RenderingServer::get_singleton()->has_changed() ||
+ current_frames_drawn != Engine::get_singleton()->get_frames_drawn();
}
return exit;
@@ -328,6 +337,229 @@ String OS_Android::get_data_path() const {
return get_user_data_dir();
}
+void OS_Android::_load_system_font_config() {
+ font_aliases.clear();
+ fonts.clear();
+ font_names.clear();
+
+ Ref<XMLParser> parser;
+ parser.instantiate();
+
+ Error err = parser->open(String(getenv("ANDROID_ROOT")).path_join("/etc/fonts.xml"));
+ if (err == OK) {
+ bool in_font_node = false;
+ String fb, fn;
+ FontInfo fi;
+
+ while (parser->read() == OK) {
+ if (parser->get_node_type() == XMLParser::NODE_ELEMENT) {
+ in_font_node = false;
+ if (parser->get_node_name() == "familyset") {
+ int ver = parser->has_attribute("version") ? parser->get_attribute_value("version").to_int() : 0;
+ if (ver < 21) {
+ ERR_PRINT(vformat("Unsupported font config version %s", ver));
+ break;
+ }
+ } else if (parser->get_node_name() == "alias") {
+ String name = parser->has_attribute("name") ? parser->get_attribute_value("name").strip_edges() : String();
+ String to = parser->has_attribute("to") ? parser->get_attribute_value("to").strip_edges() : String();
+ if (!name.is_empty() && !to.is_empty()) {
+ font_aliases[name] = to;
+ }
+ } else if (parser->get_node_name() == "family") {
+ fn = parser->has_attribute("name") ? parser->get_attribute_value("name").strip_edges() : String();
+ String lang_code = parser->has_attribute("lang") ? parser->get_attribute_value("lang").strip_edges() : String();
+ Vector<String> lang_codes = lang_code.split(",");
+ for (int i = 0; i < lang_codes.size(); i++) {
+ Vector<String> lang_code_elements = lang_codes[i].split("-");
+ if (lang_code_elements.size() >= 1 && lang_code_elements[0] != "und") {
+ // Add missing script codes.
+ if (lang_code_elements[0] == "ko") {
+ fi.script.insert("Hani");
+ fi.script.insert("Hang");
+ }
+ if (lang_code_elements[0] == "ja") {
+ fi.script.insert("Hani");
+ fi.script.insert("Kana");
+ fi.script.insert("Hira");
+ }
+ if (!lang_code_elements[0].is_empty()) {
+ fi.lang.insert(lang_code_elements[0]);
+ }
+ }
+ if (lang_code_elements.size() >= 2) {
+ // Add common codes for variants and remove variants not supported by HarfBuzz/ICU.
+ if (lang_code_elements[1] == "Aran") {
+ fi.script.insert("Arab");
+ }
+ if (lang_code_elements[1] == "Cyrs") {
+ fi.script.insert("Cyrl");
+ }
+ if (lang_code_elements[1] == "Hanb") {
+ fi.script.insert("Hani");
+ fi.script.insert("Bopo");
+ }
+ if (lang_code_elements[1] == "Hans" || lang_code_elements[1] == "Hant") {
+ fi.script.insert("Hani");
+ }
+ if (lang_code_elements[1] == "Syrj" || lang_code_elements[1] == "Syre" || lang_code_elements[1] == "Syrn") {
+ fi.script.insert("Syrc");
+ }
+ if (!lang_code_elements[1].is_empty() && lang_code_elements[1] != "Zsym" && lang_code_elements[1] != "Zsye" && lang_code_elements[1] != "Zmth") {
+ fi.script.insert(lang_code_elements[1]);
+ }
+ }
+ }
+ } else if (parser->get_node_name() == "font") {
+ in_font_node = true;
+ fb = parser->has_attribute("fallbackFor") ? parser->get_attribute_value("fallbackFor").strip_edges() : String();
+ fi.weight = parser->has_attribute("weight") ? parser->get_attribute_value("weight").to_int() : 400;
+ fi.italic = parser->has_attribute("style") && parser->get_attribute_value("style").strip_edges() == "italic";
+ }
+ }
+ if (parser->get_node_type() == XMLParser::NODE_TEXT) {
+ if (in_font_node) {
+ fi.filename = parser->get_node_data().strip_edges();
+ fi.font_name = fn;
+ if (!fb.is_empty() && fn.is_empty()) {
+ fi.font_name = fb;
+ fi.priority = 2;
+ }
+ if (fi.font_name.is_empty()) {
+ fi.font_name = "sans-serif";
+ fi.priority = 5;
+ }
+ if (fi.font_name.ends_with("-condensed")) {
+ fi.stretch = 75;
+ fi.font_name = fi.font_name.trim_suffix("-condensed");
+ }
+ fonts.push_back(fi);
+ font_names.insert(fi.font_name);
+ }
+ }
+ if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END) {
+ in_font_node = false;
+ if (parser->get_node_name() == "font") {
+ fb = String();
+ fi.font_name = String();
+ fi.priority = 0;
+ fi.weight = 400;
+ fi.stretch = 100;
+ fi.italic = false;
+ } else if (parser->get_node_name() == "family") {
+ fi = FontInfo();
+ fn = String();
+ }
+ }
+ }
+ parser->close();
+ } else {
+ ERR_PRINT("Unable to load font config");
+ }
+
+ font_config_loaded = true;
+}
+
+Vector<String> OS_Android::get_system_fonts() const {
+ if (!font_config_loaded) {
+ const_cast<OS_Android *>(this)->_load_system_font_config();
+ }
+ Vector<String> ret;
+ for (const String &E : font_names) {
+ ret.push_back(E);
+ }
+ return ret;
+}
+
+Vector<String> OS_Android::get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale, const String &p_script, int p_weight, int p_stretch, bool p_italic) const {
+ if (!font_config_loaded) {
+ const_cast<OS_Android *>(this)->_load_system_font_config();
+ }
+ String font_name = p_font_name.to_lower();
+ if (font_aliases.has(font_name)) {
+ font_name = font_aliases[font_name];
+ }
+ String root = String(getenv("ANDROID_ROOT")).path_join("fonts");
+ String lang_prefix = p_locale.split("_")[0];
+ Vector<String> ret;
+ int best_score = 0;
+ for (const List<FontInfo>::Element *E = fonts.front(); E; E = E->next()) {
+ int score = 0;
+ if (!E->get().script.is_empty() && !p_script.is_empty() && !E->get().script.has(p_script)) {
+ continue;
+ }
+ float sim = E->get().font_name.similarity(font_name);
+ if (sim > 0.0) {
+ score += (60 * sim + 5 - E->get().priority);
+ }
+ if (E->get().lang.has(p_locale)) {
+ score += 120;
+ } else if (E->get().lang.has(lang_prefix)) {
+ score += 115;
+ }
+ if (E->get().script.has(p_script)) {
+ score += 240;
+ }
+ score += (20 - Math::abs(E->get().weight - p_weight) / 50);
+ score += (20 - Math::abs(E->get().stretch - p_stretch) / 10);
+ if (E->get().italic == p_italic) {
+ score += 30;
+ }
+ if (score > best_score) {
+ best_score = score;
+ if (ret.find(root.path_join(E->get().filename)) < 0) {
+ ret.insert(0, root.path_join(E->get().filename));
+ }
+ } else if (score == best_score || E->get().script.is_empty()) {
+ if (ret.find(root.path_join(E->get().filename)) < 0) {
+ ret.push_back(root.path_join(E->get().filename));
+ }
+ }
+ if (score >= 490) {
+ break; // Perfect match.
+ }
+ }
+
+ return ret;
+}
+
+String OS_Android::get_system_font_path(const String &p_font_name, int p_weight, int p_stretch, bool p_italic) const {
+ if (!font_config_loaded) {
+ const_cast<OS_Android *>(this)->_load_system_font_config();
+ }
+ String font_name = p_font_name.to_lower();
+ if (font_aliases.has(font_name)) {
+ font_name = font_aliases[font_name];
+ }
+ String root = String(getenv("ANDROID_ROOT")).path_join("fonts");
+
+ int best_score = 0;
+ const List<FontInfo>::Element *best_match = nullptr;
+
+ for (const List<FontInfo>::Element *E = fonts.front(); E; E = E->next()) {
+ int score = 0;
+ if (E->get().font_name == font_name) {
+ score += (65 - E->get().priority);
+ }
+ score += (20 - Math::abs(E->get().weight - p_weight) / 50);
+ score += (20 - Math::abs(E->get().stretch - p_stretch) / 10);
+ if (E->get().italic == p_italic) {
+ score += 30;
+ }
+ if (score >= 60 && score > best_score) {
+ best_score = score;
+ best_match = E;
+ }
+ if (score >= 140) {
+ break; // Perfect match.
+ }
+ }
+ if (best_match) {
+ return root.path_join(best_match->get().filename);
+ }
+ return String();
+}
+
String OS_Android::get_executable_path() const {
// Since unix process creation is restricted on Android, we bypass
// OS_Unix::get_executable_path() so we can return ANDROID_EXEC_PATH.
@@ -440,6 +672,9 @@ String OS_Android::get_config_path() const {
}
bool OS_Android::_check_internal_feature_support(const String &p_feature) {
+ if (p_feature == "system_fonts") {
+ return true;
+ }
if (p_feature == "mobile") {
return true;
}
@@ -469,7 +704,6 @@ OS_Android::OS_Android(GodotJavaWrapper *p_godot_java, GodotIOJavaWrapper *p_god
#if defined(GLES3_ENABLED)
gl_extensions = nullptr;
- use_gl2 = false;
#endif
#if defined(VULKAN_ENABLED)
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index d6546a3507..9034615fc4 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -62,9 +62,26 @@ private:
MainLoop *main_loop = nullptr;
+ struct FontInfo {
+ String font_name;
+ HashSet<String> lang;
+ HashSet<String> script;
+ int weight = 400;
+ int stretch = 100;
+ bool italic = false;
+ int priority = 0;
+ String filename;
+ };
+
+ HashMap<String, String> font_aliases;
+ List<FontInfo> fonts;
+ HashSet<String> font_names;
+ bool font_config_loaded = false;
+
GodotJavaWrapper *godot_java = nullptr;
GodotIOJavaWrapper *godot_io_java = nullptr;
+ void _load_system_font_config();
String get_system_property(const char *key) const;
public:
@@ -114,6 +131,10 @@ public:
ANativeWindow *get_native_window() const;
virtual Error shell_open(String p_uri) override;
+
+ virtual Vector<String> get_system_fonts() const override;
+ virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
+ virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
virtual String get_executable_path() const override;
virtual String get_user_data_dir() const override;
virtual String get_data_path() const override;
diff --git a/platform/android/plugin/godot_plugin_jni.cpp b/platform/android/plugin/godot_plugin_jni.cpp
index 7a39e2003d..fe35babba6 100644
--- a/platform/android/plugin/godot_plugin_jni.cpp
+++ b/platform/android/plugin/godot_plugin_jni.cpp
@@ -128,21 +128,21 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitS
singleton->emit_signalp(StringName(signal_name), args, count);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jclass clazz, jobjectArray gdnlib_paths) {
- int gdnlib_count = env->GetArrayLength(gdnlib_paths);
- if (gdnlib_count == 0) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDExtensionLibraries(JNIEnv *env, jclass clazz, jobjectArray gdextension_paths) {
+ int gdextension_count = env->GetArrayLength(gdextension_paths);
+ if (gdextension_count == 0) {
return;
}
- // Retrieve the current list of gdnative libraries.
- Array singletons = Array();
- if (ProjectSettings::get_singleton()->has_setting("gdnative/singletons")) {
- singletons = ProjectSettings::get_singleton()->get("gdnative/singletons");
+ // Retrieve the current list of gdextension libraries.
+ Array singletons;
+ if (ProjectSettings::get_singleton()->has_setting("gdextension/singletons")) {
+ singletons = GLOBAL_GET("gdextension/singletons");
}
// Insert the libraries provided by the plugin
- for (int i = 0; i < gdnlib_count; i++) {
- jstring relative_path = (jstring)env->GetObjectArrayElement(gdnlib_paths, i);
+ for (int i = 0; i < gdextension_count; i++) {
+ jstring relative_path = (jstring)env->GetObjectArrayElement(gdextension_paths, i);
String path = "res://" + jstring_to_string(relative_path, env);
if (!singletons.has(path)) {
@@ -152,6 +152,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
}
// Insert the updated list back into project settings.
- ProjectSettings::get_singleton()->set("gdnative/singletons", singletons);
+ ProjectSettings::get_singleton()->set("gdextension/singletons", singletons);
}
}
diff --git a/platform/android/plugin/godot_plugin_jni.h b/platform/android/plugin/godot_plugin_jni.h
index 35f9d5b513..e36cc8b0e3 100644
--- a/platform/android/plugin/godot_plugin_jni.h
+++ b/platform/android/plugin/godot_plugin_jni.h
@@ -39,7 +39,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jclass clazz, jstring sname, jstring name, jstring ret, jobjectArray args);
JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSignal(JNIEnv *env, jclass clazz, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_param_types);
JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitSignal(JNIEnv *env, jclass clazz, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_params);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jclass clazz, jobjectArray gdnlib_paths);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDExtensionLibraries(JNIEnv *env, jclass clazz, jobjectArray gdextension_paths);
}
#endif // GODOT_PLUGIN_JNI_H
diff --git a/platform/android/vulkan/vulkan_context_android.cpp b/platform/android/vulkan/vulkan_context_android.cpp
index c802c9840b..948292c3af 100644
--- a/platform/android/vulkan/vulkan_context_android.cpp
+++ b/platform/android/vulkan/vulkan_context_android.cpp
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifdef VULKAN_ENABLED
+
#include "vulkan_context_android.h"
#ifdef USE_VOLK
@@ -63,3 +65,5 @@ bool VulkanContextAndroid::_use_validation_layers() {
// On Android, we use validation layers automatically if they were explicitly linked with the app.
return count > 0;
}
+
+#endif // VULKAN_ENABLED
diff --git a/platform/android/vulkan/vulkan_context_android.h b/platform/android/vulkan/vulkan_context_android.h
index ca8182e9cd..fe9a033e1c 100644
--- a/platform/android/vulkan/vulkan_context_android.h
+++ b/platform/android/vulkan/vulkan_context_android.h
@@ -31,6 +31,8 @@
#ifndef VULKAN_CONTEXT_ANDROID_H
#define VULKAN_CONTEXT_ANDROID_H
+#ifdef VULKAN_ENABLED
+
#include "drivers/vulkan/vulkan_context.h"
struct ANativeWindow;
@@ -48,4 +50,6 @@ protected:
bool _use_validation_layers() override;
};
+#endif // VULKAN_ENABLED
+
#endif // VULKAN_CONTEXT_ANDROID_H
diff --git a/platform/ios/app_delegate.mm b/platform/ios/app_delegate.mm
index fb183d52d4..3ebd530585 100644
--- a/platform/ios/app_delegate.mm
+++ b/platform/ios/app_delegate.mm
@@ -45,7 +45,7 @@
extern int gargc;
extern char **gargv;
-extern int ios_main(int, char **, String, String);
+extern int ios_main(int, char **);
extern void ios_finish();
@implementation AppDelegate
@@ -66,12 +66,7 @@ static ViewController *mainViewController = nil;
// Create a full-screen window
self.window = [[UIWindow alloc] initWithFrame:windowBounds];
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSString *documentsDirectory = [paths objectAtIndex:0];
- paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
- NSString *cacheDirectory = [paths objectAtIndex:0];
-
- int err = ios_main(gargc, gargv, String::utf8([documentsDirectory UTF8String]), String::utf8([cacheDirectory UTF8String]));
+ int err = ios_main(gargc, gargv);
if (err != 0) {
// bail, things did not go very well for us, should probably output a message on screen with our error code...
diff --git a/platform/ios/display_server_ios.h b/platform/ios/display_server_ios.h
index f3624f24ab..0ca0d3d1fe 100644
--- a/platform/ios/display_server_ios.h
+++ b/platform/ios/display_server_ios.h
@@ -40,7 +40,6 @@
#include "vulkan_context_ios.h"
-#import <QuartzCore/CAMetalLayer.h>
#ifdef USE_VOLK
#include <volk.h>
#else
@@ -48,6 +47,9 @@
#endif
#endif
+#import <Foundation/Foundation.h>
+#import <QuartzCore/CAMetalLayer.h>
+
class DisplayServerIOS : public DisplayServer {
GDCLASS(DisplayServerIOS, DisplayServer)
@@ -73,7 +75,7 @@ class DisplayServerIOS : public DisplayServer {
void perform_event(const Ref<InputEvent> &p_event);
- DisplayServerIOS(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ DisplayServerIOS(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
~DisplayServerIOS();
public:
@@ -82,7 +84,7 @@ public:
static DisplayServerIOS *get_singleton();
static void register_ios_driver();
- static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
static Vector<String> get_rendering_drivers_func();
// MARK: - Events
@@ -111,7 +113,7 @@ public:
// MARK: Keyboard
- void key(Key p_key, bool p_pressed);
+ void key(Key p_key, char32_t p_char, bool p_pressed);
// MARK: Motion
@@ -160,6 +162,7 @@ public:
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_transient(WindowID p_window, WindowID p_parent) override;
@@ -172,7 +175,7 @@ public:
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_real_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;
@@ -197,7 +200,7 @@ public:
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 bool screen_is_touchscreen(int p_screen) const override;
+ virtual bool is_touchscreen_available() const override;
virtual void virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect, VirtualKeyboardType p_type, int p_max_length, int p_cursor_start, int p_cursor_end) override;
virtual void virtual_keyboard_hide() override;
diff --git a/platform/ios/display_server_ios.mm b/platform/ios/display_server_ios.mm
index d3a0f38463..ce78b8d20f 100644
--- a/platform/ios/display_server_ios.mm
+++ b/platform/ios/display_server_ios.mm
@@ -41,7 +41,6 @@
#include "tts_ios.h"
#import "view_controller.h"
-#import <Foundation/Foundation.h>
#import <sys/utsname.h>
static const float kDisplayServerIOSAcceleration = 1.f;
@@ -50,7 +49,7 @@ DisplayServerIOS *DisplayServerIOS::get_singleton() {
return (DisplayServerIOS *)DisplayServer::get_singleton();
}
-DisplayServerIOS::DisplayServerIOS(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+DisplayServerIOS::DisplayServerIOS(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
rendering_driver = p_rendering_driver;
// Init TTS
@@ -152,8 +151,8 @@ DisplayServerIOS::~DisplayServerIOS() {
#endif
}
-DisplayServer *DisplayServerIOS::create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
- return memnew(DisplayServerIOS(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
+DisplayServer *DisplayServerIOS::create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
+ return memnew(DisplayServerIOS(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, r_error));
}
Vector<String> DisplayServerIOS::get_rendering_drivers_func() {
@@ -228,26 +227,23 @@ void DisplayServerIOS::_window_callback(const Callable &p_callable, const Varian
// MARK: Touches
void DisplayServerIOS::touch_press(int p_idx, int p_x, int p_y, bool p_pressed, bool p_double_click) {
- if (!GLOBAL_DEF("debug/disable_touch", false)) {
- Ref<InputEventScreenTouch> ev;
- ev.instantiate();
-
- ev->set_index(p_idx);
- ev->set_pressed(p_pressed);
- ev->set_position(Vector2(p_x, p_y));
- perform_event(ev);
- }
+ Ref<InputEventScreenTouch> ev;
+ ev.instantiate();
+
+ ev->set_index(p_idx);
+ ev->set_pressed(p_pressed);
+ ev->set_position(Vector2(p_x, p_y));
+ ev->set_double_tap(p_double_click);
+ perform_event(ev);
}
void DisplayServerIOS::touch_drag(int p_idx, int p_prev_x, int p_prev_y, int p_x, int p_y) {
- if (!GLOBAL_DEF("debug/disable_touch", false)) {
- Ref<InputEventScreenDrag> ev;
- ev.instantiate();
- ev->set_index(p_idx);
- ev->set_position(Vector2(p_x, p_y));
- ev->set_relative(Vector2(p_x - p_prev_x, p_y - p_prev_y));
- perform_event(ev);
- }
+ Ref<InputEventScreenDrag> ev;
+ ev.instantiate();
+ ev->set_index(p_idx);
+ ev->set_position(Vector2(p_x, p_y));
+ ev->set_relative(Vector2(p_x - p_prev_x, p_y - p_prev_y));
+ perform_event(ev);
}
void DisplayServerIOS::perform_event(const Ref<InputEvent> &p_event) {
@@ -260,14 +256,14 @@ void DisplayServerIOS::touches_cancelled(int p_idx) {
// MARK: Keyboard
-void DisplayServerIOS::key(Key p_key, bool p_pressed) {
+void DisplayServerIOS::key(Key p_key, char32_t p_char, bool p_pressed) {
Ref<InputEventKey> ev;
ev.instantiate();
ev->set_echo(false);
ev->set_pressed(p_pressed);
ev->set_keycode(p_key);
ev->set_physical_keycode(p_key);
- ev->set_unicode((char32_t)p_key);
+ ev->set_unicode(p_char);
perform_event(ev);
}
@@ -441,7 +437,7 @@ float DisplayServerIOS::screen_get_refresh_rate(int p_screen) const {
}
float DisplayServerIOS::screen_get_scale(int p_screen) const {
- return [UIScreen mainScreen].nativeScale;
+ return [UIScreen mainScreen].scale;
}
Vector<DisplayServer::WindowID> DisplayServerIOS::get_window_list() const {
@@ -496,6 +492,10 @@ Point2i DisplayServerIOS::window_get_position(WindowID p_window) const {
return Point2i();
}
+Point2i DisplayServerIOS::window_get_position_with_decorations(WindowID p_window) const {
+ return Point2i();
+}
+
void DisplayServerIOS::window_set_position(const Point2i &p_position, WindowID p_window) {
// Probably not supported for single window iOS app
}
@@ -529,7 +529,7 @@ Size2i DisplayServerIOS::window_get_size(WindowID p_window) const {
return Size2i(screenBounds.size.width, screenBounds.size.height) * screen_get_max_scale();
}
-Size2i DisplayServerIOS::window_get_real_size(WindowID p_window) const {
+Size2i DisplayServerIOS::window_get_size_with_decorations(WindowID p_window) const {
return window_get_size(p_window);
}
@@ -581,10 +581,20 @@ bool DisplayServerIOS::can_any_window_draw() const {
return true;
}
-bool DisplayServerIOS::screen_is_touchscreen(int p_screen) const {
+bool DisplayServerIOS::is_touchscreen_available() const {
return true;
}
+_FORCE_INLINE_ int _convert_utf32_offset_to_utf16(const String &p_existing_text, int p_pos) {
+ int limit = p_pos;
+ for (int i = 0; i < MIN(p_existing_text.length(), p_pos); i++) {
+ if (p_existing_text[i] > 0xffff) {
+ limit++;
+ }
+ }
+ return limit;
+}
+
void DisplayServerIOS::virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect, VirtualKeyboardType p_type, int p_max_length, int p_cursor_start, int p_cursor_end) {
NSString *existingString = [[NSString alloc] initWithUTF8String:p_existing_text.utf8().get_data()];
@@ -623,8 +633,8 @@ void DisplayServerIOS::virtual_keyboard_show(const String &p_existing_text, cons
[AppDelegate.viewController.keyboardView
becomeFirstResponderWithString:existingString
- cursorStart:p_cursor_start
- cursorEnd:p_cursor_end];
+ cursorStart:_convert_utf32_offset_to_utf16(p_existing_text, p_cursor_start)
+ cursorEnd:_convert_utf32_offset_to_utf16(p_existing_text, p_cursor_end)];
}
void DisplayServerIOS::virtual_keyboard_hide() {
diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp
index 83b2012d3e..ea37278309 100644
--- a/platform/ios/export/export_plugin.cpp
+++ b/platform/ios/export/export_plugin.cpp
@@ -49,6 +49,46 @@ Vector<EditorExportPlatformIOS::ExportArchitecture> EditorExportPlatformIOS::_ge
return archs;
}
+struct IconInfo {
+ const char *preset_key;
+ const char *idiom;
+ const char *export_name;
+ const char *actual_size_side;
+ const char *scale;
+ const char *unscaled_size;
+ const bool force_opaque;
+};
+
+static const IconInfo icon_infos[] = {
+ // Home screen on iPhone
+ { PNAME("icons/iphone_120x120"), "iphone", "Icon-120.png", "120", "2x", "60x60", false },
+ { PNAME("icons/iphone_120x120"), "iphone", "Icon-120.png", "120", "3x", "40x40", false },
+ { PNAME("icons/iphone_180x180"), "iphone", "Icon-180.png", "180", "3x", "60x60", false },
+
+ // Home screen on iPad
+ { PNAME("icons/ipad_76x76"), "ipad", "Icon-76.png", "76", "1x", "76x76", false },
+ { PNAME("icons/ipad_152x152"), "ipad", "Icon-152.png", "152", "2x", "76x76", false },
+ { PNAME("icons/ipad_167x167"), "ipad", "Icon-167.png", "167", "2x", "83.5x83.5", false },
+
+ // App Store
+ { PNAME("icons/app_store_1024x1024"), "ios-marketing", "Icon-1024.png", "1024", "1x", "1024x1024", true },
+
+ // Spotlight
+ { PNAME("icons/spotlight_40x40"), "ipad", "Icon-40.png", "40", "1x", "40x40", false },
+ { PNAME("icons/spotlight_80x80"), "iphone", "Icon-80.png", "80", "2x", "40x40", false },
+ { PNAME("icons/spotlight_80x80"), "ipad", "Icon-80.png", "80", "2x", "40x40", false },
+
+ // Settings
+ { PNAME("icons/settings_58x58"), "iphone", "Icon-58.png", "58", "2x", "29x29", false },
+ { PNAME("icons/settings_58x58"), "ipad", "Icon-58.png", "58", "2x", "29x29", false },
+ { PNAME("icons/settings_87x87"), "iphone", "Icon-87.png", "87", "3x", "29x29", false },
+
+ // Notification
+ { PNAME("icons/notification_40x40"), "iphone", "Icon-40.png", "40", "2x", "20x20", false },
+ { PNAME("icons/notification_40x40"), "ipad", "Icon-40.png", "40", "2x", "20x20", false },
+ { PNAME("icons/notification_60x60"), "iphone", "Icon-60.png", "60", "3x", "20x20", false }
+};
+
struct LoadingScreenInfo {
const char *preset_key;
const char *export_name;
@@ -97,6 +137,9 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/short_version"), "1.0"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/version"), "1.0"));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/icon_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/launch_screens_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4));
+
Vector<PluginConfigIOS> found_plugins = get_plugins();
for (int i = 0; i < found_plugins.size(); i++) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("plugins"), found_plugins[i].name)), false));
@@ -139,18 +182,13 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/photolibrary_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need access to the photo library"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::DICTIONARY, "privacy/photolibrary_usage_description_localized", PROPERTY_HINT_LOCALIZABLE_STRING), Dictionary()));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/iphone_120x120", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), "")); // Home screen on iPhone/iPod Touch with Retina display
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/iphone_180x180", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), "")); // Home screen on iPhone with Retina HD display
-
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_76x76", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), "")); // Home screen on iPad
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_152x152", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), "")); // Home screen on iPad with Retina display
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/ipad_167x167", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), "")); // Home screen on iPad Pro
-
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/app_store_1024x1024", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), "")); // App Store
-
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/spotlight_40x40", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), "")); // Spotlight
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "icons/spotlight_80x80", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), "")); // Spotlight on devices with Retina display
-
+ HashSet<String> used_names;
+ for (uint64_t i = 0; i < sizeof(icon_infos) / sizeof(icon_infos[0]); ++i) {
+ if (!used_names.has(icon_infos[i].preset_key)) {
+ used_names.insert(icon_infos[i].preset_key);
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, icon_infos[i].preset_key, PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), ""));
+ }
+ }
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "storyboard/use_launch_screen_storyboard"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "storyboard/image_scale_mode", PROPERTY_HINT_ENUM, "Same as Logo,Center,Scale to Fit,Scale to Fill,Scale"), 0));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "storyboard/custom_image@2x", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), ""));
@@ -358,8 +396,8 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref<EditorExportPreset> &p_
switch (image_scale_mode) {
case 0: {
- String logo_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
- bool is_on = ProjectSettings::get_singleton()->get("application/boot_splash/fullsize");
+ String logo_path = GLOBAL_GET("application/boot_splash/image");
+ bool is_on = GLOBAL_GET("application/boot_splash/fullsize");
// If custom logo is not specified, Godot does not scale default one, so we should do the same.
value = (is_on && logo_path.length() > 0) ? "scaleAspectFit" : "center";
} break;
@@ -371,7 +409,7 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref<EditorExportPreset> &p_
strnew += lines[i].replace("$launch_screen_image_mode", value) + "\n";
} else if (lines[i].find("$launch_screen_background_color") != -1) {
bool use_custom = p_preset->get("storyboard/use_custom_bg_color");
- Color color = use_custom ? p_preset->get("storyboard/custom_bg_color") : ProjectSettings::get_singleton()->get("application/boot_splash/bg_color");
+ Color color = use_custom ? p_preset->get("storyboard/custom_bg_color") : GLOBAL_GET("application/boot_splash/bg_color");
const String value_format = "red=\"$red\" green=\"$green\" blue=\"$blue\" alpha=\"$alpha\"";
Dictionary value_dictionary;
@@ -384,7 +422,7 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref<EditorExportPreset> &p_
strnew += lines[i].replace("$launch_screen_background_color", value) + "\n";
} else if (lines[i].find("$pbx_locale_file_reference") != -1) {
String locale_files;
- Vector<String> translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
+ Vector<String> translations = GLOBAL_GET("internationalization/locale/translations");
if (translations.size() > 0) {
HashSet<String> languages;
for (const String &E : translations) {
@@ -403,7 +441,7 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref<EditorExportPreset> &p_
strnew += lines[i].replace("$pbx_locale_file_reference", locale_files);
} else if (lines[i].find("$pbx_locale_build_reference") != -1) {
String locale_files;
- Vector<String> translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
+ Vector<String> translations = GLOBAL_GET("internationalization/locale/translations");
if (translations.size() > 0) {
HashSet<String> languages;
for (const String &E : translations) {
@@ -531,36 +569,6 @@ void EditorExportPlatformIOS::_blend_and_rotate(Ref<Image> &p_dst, Ref<Image> &p
}
}
-struct IconInfo {
- const char *preset_key;
- const char *idiom;
- const char *export_name;
- const char *actual_size_side;
- const char *scale;
- const char *unscaled_size;
- const bool force_opaque;
-};
-
-static const IconInfo icon_infos[] = {
- // Home screen on iPhone
- { "icons/iphone_120x120", "iphone", "Icon-120.png", "120", "2x", "60x60", false },
- { "icons/iphone_120x120", "iphone", "Icon-120.png", "120", "3x", "40x40", false },
- { "icons/iphone_180x180", "iphone", "Icon-180.png", "180", "3x", "60x60", false },
-
- // Home screen on iPad
- { "icons/ipad_76x76", "ipad", "Icon-76.png", "76", "1x", "76x76", false },
- { "icons/ipad_152x152", "ipad", "Icon-152.png", "152", "2x", "76x76", false },
- { "icons/ipad_167x167", "ipad", "Icon-167.png", "167", "2x", "83.5x83.5", false },
-
- // App Store
- { "icons/app_store_1024x1024", "ios-marketing", "Icon-1024.png", "1024", "1x", "1024x1024", true },
-
- // Spotlight
- { "icons/spotlight_40x40", "ipad", "Icon-40.png", "40", "1x", "40x40", false },
- { "icons/spotlight_80x80", "iphone", "Icon-80.png", "80", "2x", "40x40", false },
- { "icons/spotlight_80x80", "ipad", "Icon-80.png", "80", "2x", "40x40", false }
-};
-
Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_preset, const String &p_iconset_dir) {
String json_description = "{\"images\":[";
String sizes;
@@ -568,25 +576,31 @@ Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_pr
Ref<DirAccess> da = DirAccess::open(p_iconset_dir);
ERR_FAIL_COND_V_MSG(da.is_null(), ERR_CANT_OPEN, "Cannot open directory '" + p_iconset_dir + "'.");
+ Color boot_bg_color = GLOBAL_GET("application/boot_splash/bg_color");
+
for (uint64_t i = 0; i < (sizeof(icon_infos) / sizeof(icon_infos[0])); ++i) {
IconInfo info = icon_infos[i];
int side_size = String(info.actual_size_side).to_int();
String icon_path = p_preset->get(info.preset_key);
if (icon_path.length() == 0) {
// Resize main app icon
- icon_path = ProjectSettings::get_singleton()->get("application/config/icon");
+ icon_path = GLOBAL_GET("application/config/icon");
Ref<Image> img = memnew(Image);
Error err = ImageLoader::load_image(icon_path, img);
if (err != OK) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Export Icons"), vformat("Invalid icon (%s): '%s'.", info.preset_key, icon_path));
return ERR_UNCONFIGURED;
+ } else if (info.force_opaque && img->detect_alpha() != Image::ALPHA_NONE) {
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Export Icons"), vformat("Icon (%s) must be opaque.", info.preset_key));
+ img->resize(side_size, side_size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
+ Ref<Image> new_img = Image::create_empty(side_size, side_size, false, Image::FORMAT_RGBA8);
+ new_img->fill(boot_bg_color);
+ _blend_and_rotate(new_img, img, false);
+ err = new_img->save_png(p_iconset_dir + info.export_name);
+ } else {
+ img->resize(side_size, side_size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
+ err = img->save_png(p_iconset_dir + info.export_name);
}
- if (info.force_opaque && img->detect_alpha() != Image::ALPHA_NONE) {
- add_message(EXPORT_MESSAGE_ERROR, TTR("Export Icons"), vformat("Icon (%s) must be opaque.", info.preset_key));
- return ERR_UNCONFIGURED;
- }
- img->resize(side_size, side_size);
- err = img->save_png(p_iconset_dir + info.export_name);
if (err) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Export Icons"), vformat("Failed to export icon (%s): '%s'.", info.preset_key, icon_path));
return err;
@@ -598,14 +612,16 @@ Error EditorExportPlatformIOS::_export_icons(const Ref<EditorExportPreset> &p_pr
if (err != OK) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Export Icons"), vformat("Invalid icon (%s): '%s'.", info.preset_key, icon_path));
return ERR_UNCONFIGURED;
- }
- if (info.force_opaque && img->detect_alpha() != Image::ALPHA_NONE) {
- add_message(EXPORT_MESSAGE_ERROR, TTR("Export Icons"), vformat("Icon (%s) must be opaque.", info.preset_key));
- return ERR_UNCONFIGURED;
- }
- if (img->get_width() != side_size || img->get_height() != side_size) {
+ } else if (info.force_opaque && img->detect_alpha() != Image::ALPHA_NONE) {
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Export Icons"), vformat("Icon (%s) must be opaque.", info.preset_key));
+ img->resize(side_size, side_size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
+ Ref<Image> new_img = Image::create_empty(side_size, side_size, false, Image::FORMAT_RGBA8);
+ new_img->fill(boot_bg_color);
+ _blend_and_rotate(new_img, img, false);
+ err = new_img->save_png(p_iconset_dir + info.export_name);
+ } else if (img->get_width() != side_size || img->get_height() != side_size) {
add_message(EXPORT_MESSAGE_WARNING, TTR("Export Icons"), vformat("Icon (%s): '%s' has incorrect size %s and was automatically resized to %s.", info.preset_key, icon_path, img->get_size(), Vector2i(side_size, side_size)));
- img->resize(side_size, side_size);
+ img->resize(side_size, side_size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
err = img->save_png(p_iconset_dir + info.export_name);
} else {
err = da->copy(icon_path, p_iconset_dir + info.export_name);
@@ -650,7 +666,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_file(const Ref<EditorExpor
Ref<Image> image;
String image_path = p_dest_dir.path_join("splash@2x.png");
image.instantiate();
- Error err = image->load(custom_launch_image_2x);
+ Error err = ImageLoader::load_image(custom_launch_image_2x, image);
if (err) {
image.unref();
@@ -664,7 +680,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_file(const Ref<EditorExpor
image.unref();
image_path = p_dest_dir.path_join("splash@3x.png");
image.instantiate();
- err = image->load(custom_launch_image_3x);
+ err = ImageLoader::load_image(custom_launch_image_3x, image);
if (err) {
image.unref();
@@ -677,11 +693,11 @@ Error EditorExportPlatformIOS::_export_loading_screen_file(const Ref<EditorExpor
} else {
Ref<Image> splash;
- const String splash_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
+ const String splash_path = GLOBAL_GET("application/boot_splash/image");
if (!splash_path.is_empty()) {
splash.instantiate();
- const Error err = splash->load(splash_path);
+ const Error err = ImageLoader::load_image(splash_path, splash);
if (err) {
splash.unref();
}
@@ -718,9 +734,9 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
LoadingScreenInfo info = loading_screen_infos[i];
String loading_screen_file = p_preset->get(info.preset_key);
- Color boot_bg_color = ProjectSettings::get_singleton()->get("application/boot_splash/bg_color");
- String boot_logo_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
- bool boot_logo_scale = ProjectSettings::get_singleton()->get("application/boot_splash/fullsize");
+ Color boot_bg_color = GLOBAL_GET("application/boot_splash/bg_color");
+ String boot_logo_path = GLOBAL_GET("application/boot_splash/image");
+ bool boot_logo_scale = GLOBAL_GET("application/boot_splash/fullsize");
if (loading_screen_file.size() > 0) {
// Load custom loading screens, and resize if required.
@@ -735,9 +751,9 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
float aspect_ratio = (float)img->get_width() / (float)img->get_height();
if (boot_logo_scale) {
if (info.height * aspect_ratio <= info.width) {
- img->resize(info.height * aspect_ratio, info.height);
+ img->resize(info.height * aspect_ratio, info.height, (Image::Interpolation)(p_preset->get("application/launch_screens_interpolation").operator int()));
} else {
- img->resize(info.width, info.width / aspect_ratio);
+ img->resize(info.width, info.width / aspect_ratio, (Image::Interpolation)(p_preset->get("application/launch_screens_interpolation").operator int()));
}
}
Ref<Image> new_img = Image::create_empty(info.width, info.height, false, Image::FORMAT_RGBA8);
@@ -771,17 +787,17 @@ Error EditorExportPlatformIOS::_export_loading_screen_images(const Ref<EditorExp
if (info.rotate) {
if (boot_logo_scale) {
if (info.width * aspect_ratio <= info.height) {
- img_bs->resize(info.width * aspect_ratio, info.width);
+ img_bs->resize(info.width * aspect_ratio, info.width, (Image::Interpolation)(p_preset->get("application/launch_screens_interpolation").operator int()));
} else {
- img_bs->resize(info.height, info.height / aspect_ratio);
+ img_bs->resize(info.height, info.height / aspect_ratio, (Image::Interpolation)(p_preset->get("application/launch_screens_interpolation").operator int()));
}
}
} else {
if (boot_logo_scale) {
if (info.height * aspect_ratio <= info.width) {
- img_bs->resize(info.height * aspect_ratio, info.height);
+ img_bs->resize(info.height * aspect_ratio, info.height, (Image::Interpolation)(p_preset->get("application/launch_screens_interpolation").operator int()));
} else {
- img_bs->resize(info.width, info.width / aspect_ratio);
+ img_bs->resize(info.width, info.width / aspect_ratio, (Image::Interpolation)(p_preset->get("application/launch_screens_interpolation").operator int()));
}
}
}
@@ -1118,7 +1134,7 @@ Error EditorExportPlatformIOS::_copy_asset(const String &p_out_dir, const String
"<key>CFBundleShortVersionString</key>\n"
"<string>1.0</string>\n"
"<key>CFBundleIdentifier</key>\n"
- "<string>com.gdnative.framework.$name</string>\n"
+ "<string>com.gdextension.framework.$name</string>\n"
"<key>CFBundleName</key>\n"
"<string>$name</string>\n"
"<key>CFBundleExecutable</key>\n"
@@ -1494,8 +1510,8 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
print_line("Static framework: " + library_to_use);
String pkg_name;
- if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
- pkg_name = String(ProjectSettings::get_singleton()->get("application/config/name"));
+ if (String(GLOBAL_GET("application/config/name")) != "") {
+ pkg_name = String(GLOBAL_GET("application/config/name"));
} else {
pkg_name = "Unnamed";
}
@@ -1644,12 +1660,12 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
return ERR_FILE_NOT_FOUND;
}
- Dictionary appnames = ProjectSettings::get_singleton()->get("application/config/name_localized");
+ Dictionary appnames = GLOBAL_GET("application/config/name_localized");
Dictionary camera_usage_descriptions = p_preset->get("privacy/camera_usage_description_localized");
Dictionary microphone_usage_descriptions = p_preset->get("privacy/microphone_usage_description_localized");
Dictionary photolibrary_usage_descriptions = p_preset->get("privacy/photolibrary_usage_description_localized");
- Vector<String> translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
+ Vector<String> translations = GLOBAL_GET("internationalization/locale/translations");
if (translations.size() > 0) {
{
String fname = dest_dir + binary_name + "/en.lproj";
@@ -1657,7 +1673,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
Ref<FileAccess> f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
f->store_line("/* Localized versions of Info.plist keys */");
f->store_line("");
- f->store_line("CFBundleDisplayName = \"" + ProjectSettings::get_singleton()->get("application/config/name").operator String() + "\";");
+ f->store_line("CFBundleDisplayName = \"" + GLOBAL_GET("application/config/name").operator String() + "\";");
f->store_line("NSCameraUsageDescription = \"" + p_preset->get("privacy/camera_usage_description").operator String() + "\";");
f->store_line("NSMicrophoneUsageDescription = \"" + p_preset->get("privacy/microphone_usage_description").operator String() + "\";");
f->store_line("NSPhotoLibraryUsageDescription = \"" + p_preset->get("privacy/photolibrary_usage_description").operator String() + "\";");
diff --git a/platform/ios/godot_ios.mm b/platform/ios/godot_ios.mm
index 5f3e786b8a..abe7c59ce2 100644
--- a/platform/ios/godot_ios.mm
+++ b/platform/ios/godot_ios.mm
@@ -38,10 +38,6 @@
static OS_IOS *os = nullptr;
-int add_path(int, char **);
-int add_cmdline(int, char **);
-int ios_main(int, char **, String);
-
int add_path(int p_argc, char **p_args) {
NSString *str = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"godot_path"];
if (!str) {
@@ -74,7 +70,7 @@ int add_cmdline(int p_argc, char **p_args) {
return p_argc;
}
-int ios_main(int argc, char **argv, String data_dir, String cache_dir) {
+int ios_main(int argc, char **argv) {
size_t len = strlen(argv[0]);
while (len--) {
@@ -95,7 +91,7 @@ int ios_main(int argc, char **argv, String data_dir, String cache_dir) {
char cwd[512];
getcwd(cwd, sizeof(cwd));
printf("cwd %s\n", cwd);
- os = new OS_IOS(data_dir, cache_dir);
+ os = new OS_IOS();
// We must override main when testing is enabled
TEST_MAIN_OVERRIDE
diff --git a/platform/ios/godot_view.mm b/platform/ios/godot_view.mm
index ff90c05b1d..19cb914521 100644
--- a/platform/ios/godot_view.mm
+++ b/platform/ios/godot_view.mm
@@ -30,6 +30,7 @@
#import "godot_view.h"
+#include "core/config/project_settings.h"
#include "core/os/keyboard.h"
#include "core/string/ustring.h"
#import "display_layer.h"
@@ -150,7 +151,7 @@ static const float earth_gravity = 9.80665;
}
- (void)godot_commonInit {
- self.contentScaleFactor = [UIScreen mainScreen].nativeScale;
+ self.contentScaleFactor = [UIScreen mainScreen].scale;
[self initTouches];
@@ -205,16 +206,16 @@ static const float earth_gravity = 9.80665;
if (self.useCADisplayLink) {
self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawView)];
- // Approximate frame rate
- // assumes device refreshes at 60 fps
- int displayFPS = (NSInteger)(1.0 / self.renderingInterval);
-
- self.displayLink.preferredFramesPerSecond = displayFPS;
+ if (GLOBAL_GET("display/window/ios/allow_high_refresh_rate")) {
+ self.displayLink.preferredFramesPerSecond = 120;
+ } else {
+ self.displayLink.preferredFramesPerSecond = 60;
+ }
// Setup DisplayLink in main thread
[self.displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
} else {
- self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:self.renderingInterval target:self selector:@selector(drawView) userInfo:nil repeats:YES];
+ self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / 60) target:self selector:@selector(drawView) userInfo:nil repeats:YES];
}
}
diff --git a/platform/ios/keyboard_input_view.mm b/platform/ios/keyboard_input_view.mm
index f031a1de22..8fb5656c24 100644
--- a/platform/ios/keyboard_input_view.mm
+++ b/platform/ios/keyboard_input_view.mm
@@ -115,8 +115,8 @@
- (void)deleteText:(NSInteger)charactersToDelete {
for (int i = 0; i < charactersToDelete; i++) {
- DisplayServerIOS::get_singleton()->key(Key::BACKSPACE, true);
- DisplayServerIOS::get_singleton()->key(Key::BACKSPACE, false);
+ DisplayServerIOS::get_singleton()->key(Key::BACKSPACE, 0, true);
+ DisplayServerIOS::get_singleton()->key(Key::BACKSPACE, 0, false);
}
}
@@ -126,20 +126,28 @@
for (int i = 0; i < characters.size(); i++) {
int character = characters[i];
-
- switch (character) {
- case 10:
- character = (int)Key::ENTER;
- break;
- case 8198:
- character = (int)Key::SPACE;
- break;
- default:
- break;
+ Key key = Key::NONE;
+
+ if (character == '\t') { // 0x09
+ key = Key::TAB;
+ } else if (character == '\n') { // 0x0A
+ key = Key::ENTER;
+ } else if (character == 0x2006) {
+ key = Key::SPACE;
+ } else if (character == U'Â¥') {
+ key = Key::YEN;
+ } else if (character == U'§') {
+ key = Key::SECTION;
+ } else if (character >= 0x20 && character <= 0x7E) { // ASCII.
+ if (character > 0x60 && character < 0x7B) { // Lowercase ASCII.
+ key = (Key)(character - 32);
+ } else {
+ key = (Key)character;
+ }
}
- DisplayServerIOS::get_singleton()->key((Key)character, true);
- DisplayServerIOS::get_singleton()->key((Key)character, false);
+ DisplayServerIOS::get_singleton()->key(key, character, true);
+ DisplayServerIOS::get_singleton()->key(key, character, false);
}
}
diff --git a/platform/ios/os_ios.h b/platform/ios/os_ios.h
index 400040875f..3589dd17c9 100644
--- a/platform/ios/os_ios.h
+++ b/platform/ios/os_ios.h
@@ -71,17 +71,20 @@ private:
virtual void finalize() override;
- String user_data_dir;
- String cache_dir;
-
bool is_focused = false;
+ CGFloat _weight_to_ct(int p_weight) const;
+ CGFloat _stretch_to_ct(int p_stretch) const;
+ String _get_default_fontname(const String &p_font_name) const;
+
+ static _FORCE_INLINE_ String get_framework_executable(const String &p_path);
+
void deinitialize_modules();
public:
static OS_IOS *get_singleton();
- OS_IOS(String p_data_dir, String p_cache_dir);
+ OS_IOS();
~OS_IOS();
void initialize_modules();
@@ -93,7 +96,8 @@ public:
virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override;
virtual Vector<String> get_system_fonts() const override;
- virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const override;
+ virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
+ virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override;
virtual Error close_dynamic_library(void *p_library_handle) override;
@@ -106,7 +110,6 @@ public:
virtual Error shell_open(String p_uri) override;
- void set_user_data_dir(String p_dir);
virtual String get_user_data_dir() const override;
virtual String get_cache_path() const override;
diff --git a/platform/ios/os_ios.mm b/platform/ios/os_ios.mm
index a674498620..d0c367cc45 100644
--- a/platform/ios/os_ios.mm
+++ b/platform/ios/os_ios.mm
@@ -90,7 +90,7 @@ OS_IOS *OS_IOS::get_singleton() {
return (OS_IOS *)OS::get_singleton();
}
-OS_IOS::OS_IOS(String p_data_dir, String p_cache_dir) {
+OS_IOS::OS_IOS() {
for (int i = 0; i < ios_init_callbacks_count; ++i) {
ios_init_callbacks[i]();
}
@@ -101,11 +101,6 @@ OS_IOS::OS_IOS(String p_data_dir, String p_cache_dir) {
main_loop = nullptr;
- // can't call set_data_dir from here, since it requires DirAccess
- // which is initialized in initialize_core
- user_data_dir = p_data_dir;
- cache_dir = p_cache_dir;
-
Vector<Logger *> loggers;
loggers.push_back(memnew(SyslogLogger));
#ifdef DEBUG_ENABLED
@@ -130,8 +125,6 @@ void OS_IOS::alert(const String &p_alert, const String &p_title) {
void OS_IOS::initialize_core() {
OS_Unix::initialize_core();
-
- set_user_data_dir(user_data_dir);
}
void OS_IOS::initialize() {
@@ -205,8 +198,31 @@ void OS_IOS::finalize() {
// MARK: Dynamic Libraries
+_FORCE_INLINE_ String OS_IOS::get_framework_executable(const String &p_path) {
+ Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+
+ // Read framework bundle to get executable name.
+ NSURL *url = [NSURL fileURLWithPath:@(p_path.utf8().get_data())];
+ NSBundle *bundle = [NSBundle bundleWithURL:url];
+ if (bundle) {
+ String exe_path = String::utf8([[bundle executablePath] UTF8String]);
+ if (da->file_exists(exe_path)) {
+ return exe_path;
+ }
+ }
+
+ // Try default executable name (invalid framework).
+ if (da->dir_exists(p_path) && da->file_exists(p_path.path_join(p_path.get_file().get_basename()))) {
+ return p_path.path_join(p_path.get_file().get_basename());
+ }
+
+ // Not a framework, try loading as .dylib.
+ return p_path;
+}
+
Error OS_IOS::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
if (p_path.length() == 0) {
+ // Static xcframework.
p_library_handle = RTLD_SELF;
if (r_resolved_path != nullptr) {
@@ -215,7 +231,27 @@ Error OS_IOS::open_dynamic_library(const String p_path, void *&p_library_handle,
return OK;
}
- return OS_Unix::open_dynamic_library(p_path, p_library_handle, p_also_set_library_path, r_resolved_path);
+
+ String path = get_framework_executable(p_path);
+
+ if (!FileAccess::exists(path)) {
+ // Load .dylib or framework from within the executable path.
+ path = get_framework_executable(get_executable_path().get_base_dir().path_join(p_path.get_file()));
+ }
+
+ if (!FileAccess::exists(path)) {
+ // Load .dylib or framework from a standard iOS location.
+ path = get_framework_executable(get_executable_path().get_base_dir().path_join("Frameworks").path_join(p_path.get_file()));
+ }
+
+ p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW);
+ ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + p_path + ", error: " + dlerror() + ".");
+
+ if (r_resolved_path != nullptr) {
+ *r_resolved_path = path;
+ }
+
+ return OK;
}
Error OS_IOS::close_dynamic_library(void *p_library_handle) {
@@ -273,18 +309,26 @@ Error OS_IOS::shell_open(String p_uri) {
return OK;
}
-void OS_IOS::set_user_data_dir(String p_dir) {
- Ref<DirAccess> da = DirAccess::open(p_dir);
- user_data_dir = da->get_current_dir();
- printf("setting data dir to %s from %s\n", user_data_dir.utf8().get_data(), p_dir.utf8().get_data());
-}
-
String OS_IOS::get_user_data_dir() const {
- return user_data_dir;
+ static String ret;
+ if (ret.is_empty()) {
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ if (paths && [paths count] >= 1) {
+ ret.parse_utf8([[paths firstObject] UTF8String]);
+ }
+ }
+ return ret;
}
String OS_IOS::get_cache_path() const {
- return cache_dir;
+ static String ret;
+ if (ret.is_empty()) {
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
+ if (paths && [paths count] >= 1) {
+ ret.parse_utf8([[paths firstObject] UTF8String]);
+ }
+ }
+ return ret;
}
String OS_IOS::get_locale() const {
@@ -333,9 +377,7 @@ Vector<String> OS_IOS::get_system_fonts() const {
return ret;
}
-String OS_IOS::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
- String ret;
-
+String OS_IOS::_get_default_fontname(const String &p_font_name) const {
String font_name = p_font_name;
if (font_name.to_lower() == "sans-serif") {
font_name = "Helvetica";
@@ -348,21 +390,153 @@ String OS_IOS::get_system_font_path(const String &p_font_name, bool p_bold, bool
} else if (font_name.to_lower() == "cursive") {
font_name = "Apple Chancery";
};
+ return font_name;
+}
+
+CGFloat OS_IOS::_weight_to_ct(int p_weight) const {
+ if (p_weight < 150) {
+ return -0.80;
+ } else if (p_weight < 250) {
+ return -0.60;
+ } else if (p_weight < 350) {
+ return -0.40;
+ } else if (p_weight < 450) {
+ return 0.0;
+ } else if (p_weight < 550) {
+ return 0.23;
+ } else if (p_weight < 650) {
+ return 0.30;
+ } else if (p_weight < 750) {
+ return 0.40;
+ } else if (p_weight < 850) {
+ return 0.56;
+ } else if (p_weight < 925) {
+ return 0.62;
+ } else {
+ return 1.00;
+ }
+}
+
+CGFloat OS_IOS::_stretch_to_ct(int p_stretch) const {
+ if (p_stretch < 56) {
+ return -0.5;
+ } else if (p_stretch < 69) {
+ return -0.37;
+ } else if (p_stretch < 81) {
+ return -0.25;
+ } else if (p_stretch < 93) {
+ return -0.13;
+ } else if (p_stretch < 106) {
+ return 0.0;
+ } else if (p_stretch < 137) {
+ return 0.13;
+ } else if (p_stretch < 144) {
+ return 0.25;
+ } else if (p_stretch < 162) {
+ return 0.37;
+ } else {
+ return 0.5;
+ }
+}
+
+Vector<String> OS_IOS::get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale, const String &p_script, int p_weight, int p_stretch, bool p_italic) const {
+ Vector<String> ret;
+ String font_name = _get_default_fontname(p_font_name);
+
+ CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name.utf8().get_data(), kCFStringEncodingUTF8);
+ CTFontSymbolicTraits traits = 0;
+ if (p_weight >= 700) {
+ traits |= kCTFontBoldTrait;
+ }
+ if (p_italic) {
+ traits |= kCTFontItalicTrait;
+ }
+ if (p_stretch < 100) {
+ traits |= kCTFontCondensedTrait;
+ } else if (p_stretch > 100) {
+ traits |= kCTFontExpandedTrait;
+ }
+
+ CFNumberRef sym_traits = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &traits);
+ CFMutableDictionaryRef traits_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
+ CFDictionaryAddValue(traits_dict, kCTFontSymbolicTrait, sym_traits);
+
+ CGFloat weight = _weight_to_ct(p_weight);
+ CFNumberRef font_weight = CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &weight);
+ CFDictionaryAddValue(traits_dict, kCTFontWeightTrait, font_weight);
+
+ CGFloat stretch = _stretch_to_ct(p_stretch);
+ CFNumberRef font_stretch = CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &stretch);
+ CFDictionaryAddValue(traits_dict, kCTFontWidthTrait, font_stretch);
+
+ CFMutableDictionaryRef attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
+ CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, name);
+ CFDictionaryAddValue(attributes, kCTFontTraitsAttribute, traits_dict);
+
+ CTFontDescriptorRef font = CTFontDescriptorCreateWithAttributes(attributes);
+ if (font) {
+ CTFontRef family = CTFontCreateWithFontDescriptor(font, 0, nullptr);
+ CFStringRef string = CFStringCreateWithCString(kCFAllocatorDefault, p_text.utf8().get_data(), kCFStringEncodingUTF8);
+ CFRange range = CFRangeMake(0, CFStringGetLength(string));
+ CTFontRef fallback_family = CTFontCreateForString(family, string, range);
+ if (fallback_family) {
+ CTFontDescriptorRef fallback_font = CTFontCopyFontDescriptor(fallback_family);
+ if (fallback_font) {
+ CFURLRef url = (CFURLRef)CTFontDescriptorCopyAttribute(fallback_font, kCTFontURLAttribute);
+ if (url) {
+ NSString *font_path = [NSString stringWithString:[(__bridge NSURL *)url path]];
+ ret.push_back(String::utf8([font_path UTF8String]));
+ CFRelease(url);
+ }
+ CFRelease(fallback_font);
+ }
+ CFRelease(fallback_family);
+ }
+ CFRelease(string);
+ CFRelease(font);
+ }
+
+ CFRelease(attributes);
+ CFRelease(traits_dict);
+ CFRelease(sym_traits);
+ CFRelease(font_stretch);
+ CFRelease(font_weight);
+ CFRelease(name);
+
+ return ret;
+}
+
+String OS_IOS::get_system_font_path(const String &p_font_name, int p_weight, int p_stretch, bool p_italic) const {
+ String ret;
+ String font_name = _get_default_fontname(p_font_name);
CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name.utf8().get_data(), kCFStringEncodingUTF8);
CTFontSymbolicTraits traits = 0;
- if (p_bold) {
+ if (p_weight >= 700) {
traits |= kCTFontBoldTrait;
}
if (p_italic) {
traits |= kCTFontItalicTrait;
}
+ if (p_stretch < 100) {
+ traits |= kCTFontCondensedTrait;
+ } else if (p_stretch > 100) {
+ traits |= kCTFontExpandedTrait;
+ }
CFNumberRef sym_traits = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &traits);
CFMutableDictionaryRef traits_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
CFDictionaryAddValue(traits_dict, kCTFontSymbolicTrait, sym_traits);
+ CGFloat weight = _weight_to_ct(p_weight);
+ CFNumberRef font_weight = CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &weight);
+ CFDictionaryAddValue(traits_dict, kCTFontWeightTrait, font_weight);
+
+ CGFloat stretch = _stretch_to_ct(p_stretch);
+ CFNumberRef font_stretch = CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &stretch);
+ CFDictionaryAddValue(traits_dict, kCTFontWidthTrait, font_stretch);
+
CFMutableDictionaryRef attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, name);
CFDictionaryAddValue(attributes, kCTFontTraitsAttribute, traits_dict);
@@ -381,6 +555,8 @@ String OS_IOS::get_system_font_path(const String &p_font_name, bool p_bold, bool
CFRelease(attributes);
CFRelease(traits_dict);
CFRelease(sym_traits);
+ CFRelease(font_stretch);
+ CFRelease(font_weight);
CFRelease(name);
return ret;
@@ -396,7 +572,14 @@ void OS_IOS::vibrate_handheld(int p_duration_ms) {
}
bool OS_IOS::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "mobile";
+ if (p_feature == "system_fonts") {
+ return true;
+ }
+ if (p_feature == "mobile") {
+ return true;
+ }
+
+ return false;
}
void OS_IOS::on_focus_out() {
diff --git a/platform/ios/vulkan_context_ios.h b/platform/ios/vulkan_context_ios.h
index e9c09e087a..3849c8ba8a 100644
--- a/platform/ios/vulkan_context_ios.h
+++ b/platform/ios/vulkan_context_ios.h
@@ -31,6 +31,8 @@
#ifndef VULKAN_CONTEXT_IOS_H
#define VULKAN_CONTEXT_IOS_H
+#ifdef VULKAN_ENABLED
+
#include "drivers/vulkan/vulkan_context.h"
#import <UIKit/UIKit.h>
@@ -45,4 +47,6 @@ public:
~VulkanContextIOS();
};
+#endif // VULKAN_ENABLED
+
#endif // VULKAN_CONTEXT_IOS_H
diff --git a/platform/ios/vulkan_context_ios.mm b/platform/ios/vulkan_context_ios.mm
index 09cd369aa5..81b021e758 100644
--- a/platform/ios/vulkan_context_ios.mm
+++ b/platform/ios/vulkan_context_ios.mm
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifdef VULKAN_ENABLED
+
#include "vulkan_context_ios.h"
#ifdef USE_VOLK
#include <volk.h>
@@ -57,3 +59,5 @@ Error VulkanContextIOS::window_create(DisplayServer::WindowID p_window_id, Displ
VulkanContextIOS::VulkanContextIOS() {}
VulkanContextIOS::~VulkanContextIOS() {}
+
+#endif // VULKAN_ENABLED
diff --git a/platform/linuxbsd/SCsub b/platform/linuxbsd/SCsub
index 91d45627b9..fcd739cdc9 100644
--- a/platform/linuxbsd/SCsub
+++ b/platform/linuxbsd/SCsub
@@ -14,15 +14,7 @@ common_linuxbsd = [
]
if env["x11"]:
- common_linuxbsd += [
- "gl_manager_x11.cpp",
- "detect_prime_x11.cpp",
- "display_server_x11.cpp",
- "key_mapping_x11.cpp",
- ]
-
- if env["vulkan"]:
- common_linuxbsd.append("vulkan_context_x11.cpp")
+ common_linuxbsd += SConscript("x11/SCsub")
if env["speechd"]:
common_linuxbsd.append(["speechd-so_wrap.c", "tts_linux.cpp"])
diff --git a/platform/linuxbsd/dbus-so_wrap.c b/platform/linuxbsd/dbus-so_wrap.c
index 0876bc88b0..48d0d9b907 100644
--- a/platform/linuxbsd/dbus-so_wrap.c
+++ b/platform/linuxbsd/dbus-so_wrap.c
@@ -1,7 +1,7 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ./generate-wrapper.py 0.3 on 2022-07-29 07:23:21
-// flags: ./generate-wrapper.py --include /usr/include/dbus-1.0/dbus/dbus.h --sys-include <dbus/dbus.h> --soname libdbus-1.so --init-name dbus --output-header dbus-so_wrap.h --output-implementation dbus-so_wrap.c
+// flags: ./generate-wrapper.py --include /usr/include/dbus-1.0/dbus/dbus.h --sys-include <dbus/dbus.h> --soname libdbus-1.so.3 --init-name dbus --output-header dbus-so_wrap.h --output-implementation dbus-so_wrap.c
//
#include <stdint.h>
@@ -725,7 +725,7 @@ dbus_bool_t (*dbus_threads_init_default_dylibloader_wrapper_dbus)( void);
int initialize_dbus(int verbose) {
void *handle;
char *error;
- handle = dlopen("libdbus-1.so", RTLD_LAZY);
+ handle = dlopen("libdbus-1.so.3", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index ac69f3806b..844b15e9fb 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -184,13 +184,14 @@ def configure(env: "Environment"):
## Dependencies
if env["x11"]:
- env.ParseConfig("pkg-config x11 --cflags --libs")
- env.ParseConfig("pkg-config xcursor --cflags --libs")
- env.ParseConfig("pkg-config xinerama --cflags --libs")
- env.ParseConfig("pkg-config xext --cflags --libs")
- env.ParseConfig("pkg-config xrandr --cflags --libs")
- env.ParseConfig("pkg-config xrender --cflags --libs")
- env.ParseConfig("pkg-config xi --cflags --libs")
+ # Only cflags, we dlopen the libraries.
+ env.ParseConfig("pkg-config x11 --cflags")
+ env.ParseConfig("pkg-config xcursor --cflags")
+ env.ParseConfig("pkg-config xinerama --cflags")
+ env.ParseConfig("pkg-config xext --cflags")
+ env.ParseConfig("pkg-config xrandr --cflags")
+ env.ParseConfig("pkg-config xrender --cflags")
+ env.ParseConfig("pkg-config xi --cflags")
if env["touch"]:
env.Append(CPPDEFINES=["TOUCH_ENABLED"])
@@ -356,7 +357,6 @@ def configure(env: "Environment"):
if env["opengl3"]:
env.Append(CPPDEFINES=["GLES3_ENABLED"])
- env.ParseConfig("pkg-config gl --cflags --libs")
env.Append(LIBS=["pthread"])
diff --git a/platform/linuxbsd/export/export_plugin.cpp b/platform/linuxbsd/export/export_plugin.cpp
index 4d45d3ba12..8277bb1505 100644
--- a/platform/linuxbsd/export/export_plugin.cpp
+++ b/platform/linuxbsd/export/export_plugin.cpp
@@ -56,8 +56,8 @@ Error EditorExportPlatformLinuxBSD::export_project(const Ref<EditorExportPreset>
}
String app_name;
- if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
- app_name = String(ProjectSettings::get_singleton()->get("application/config/name"));
+ if (String(GLOBAL_GET("application/config/name")) != "") {
+ app_name = String(GLOBAL_GET("application/config/name"));
} else {
app_name = "Unnamed";
}
diff --git a/platform/linuxbsd/fontconfig-so_wrap.c b/platform/linuxbsd/fontconfig-so_wrap.c
index 1a915faf98..62901b14a9 100644
--- a/platform/linuxbsd/fontconfig-so_wrap.c
+++ b/platform/linuxbsd/fontconfig-so_wrap.c
@@ -1,7 +1,7 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
-// generated by ./generate-wrapper.py 0.3 on 2022-07-29 05:40:07
-// flags: ./generate-wrapper.py --include /usr/include/fontconfig/fontconfig.h --sys-include <fontconfig/fontconfig.h> --soname libfontconfig.so --init-name fontconfig --output-header fontconfig-so_wrap.h --output-implementation fontconfig-so_wrap.c --omit-prefix FcCharSet
+// generated by ./generate-wrapper.py 0.3 on 2022-11-22 10:28:00
+// flags: ./generate-wrapper.py --include /usr/include/fontconfig/fontconfig.h --sys-include <fontconfig/fontconfig.h> --soname libfontconfig.so.1 --init-name fontconfig --output-header fontconfig-so_wrap.h --output-implementation fontconfig-so_wrap.c --omit-prefix FcCharSetFirst --omit-prefix FcCharSetNext
//
#include <stdint.h>
@@ -18,6 +18,8 @@
#define FcDirCacheValid FcDirCacheValid_dylibloader_orig_fontconfig
#define FcDirCacheClean FcDirCacheClean_dylibloader_orig_fontconfig
#define FcCacheCreateTagFile FcCacheCreateTagFile_dylibloader_orig_fontconfig
+#define FcDirCacheCreateUUID FcDirCacheCreateUUID_dylibloader_orig_fontconfig
+#define FcDirCacheDeleteUUID FcDirCacheDeleteUUID_dylibloader_orig_fontconfig
#define FcConfigHome FcConfigHome_dylibloader_orig_fontconfig
#define FcConfigEnableHome FcConfigEnableHome_dylibloader_orig_fontconfig
#define FcConfigFilename FcConfigFilename_dylibloader_orig_fontconfig
@@ -44,6 +46,26 @@
#define FcConfigSubstitute FcConfigSubstitute_dylibloader_orig_fontconfig
#define FcConfigGetSysRoot FcConfigGetSysRoot_dylibloader_orig_fontconfig
#define FcConfigSetSysRoot FcConfigSetSysRoot_dylibloader_orig_fontconfig
+#define FcConfigFileInfoIterInit FcConfigFileInfoIterInit_dylibloader_orig_fontconfig
+#define FcConfigFileInfoIterNext FcConfigFileInfoIterNext_dylibloader_orig_fontconfig
+#define FcConfigFileInfoIterGet FcConfigFileInfoIterGet_dylibloader_orig_fontconfig
+#define FcCharSetCreate FcCharSetCreate_dylibloader_orig_fontconfig
+#define FcCharSetNew FcCharSetNew_dylibloader_orig_fontconfig
+#define FcCharSetDestroy FcCharSetDestroy_dylibloader_orig_fontconfig
+#define FcCharSetAddChar FcCharSetAddChar_dylibloader_orig_fontconfig
+#define FcCharSetDelChar FcCharSetDelChar_dylibloader_orig_fontconfig
+#define FcCharSetCopy FcCharSetCopy_dylibloader_orig_fontconfig
+#define FcCharSetEqual FcCharSetEqual_dylibloader_orig_fontconfig
+#define FcCharSetIntersect FcCharSetIntersect_dylibloader_orig_fontconfig
+#define FcCharSetUnion FcCharSetUnion_dylibloader_orig_fontconfig
+#define FcCharSetSubtract FcCharSetSubtract_dylibloader_orig_fontconfig
+#define FcCharSetMerge FcCharSetMerge_dylibloader_orig_fontconfig
+#define FcCharSetHasChar FcCharSetHasChar_dylibloader_orig_fontconfig
+#define FcCharSetCount FcCharSetCount_dylibloader_orig_fontconfig
+#define FcCharSetIntersectCount FcCharSetIntersectCount_dylibloader_orig_fontconfig
+#define FcCharSetSubtractCount FcCharSetSubtractCount_dylibloader_orig_fontconfig
+#define FcCharSetIsSubset FcCharSetIsSubset_dylibloader_orig_fontconfig
+#define FcCharSetCoverage FcCharSetCoverage_dylibloader_orig_fontconfig
#define FcValuePrint FcValuePrint_dylibloader_orig_fontconfig
#define FcPatternPrint FcPatternPrint_dylibloader_orig_fontconfig
#define FcFontSetPrint FcFontSetPrint_dylibloader_orig_fontconfig
@@ -59,6 +81,7 @@
#define FcDirCacheLoadFile FcDirCacheLoadFile_dylibloader_orig_fontconfig
#define FcDirCacheUnload FcDirCacheUnload_dylibloader_orig_fontconfig
#define FcFreeTypeQuery FcFreeTypeQuery_dylibloader_orig_fontconfig
+#define FcFreeTypeQueryAll FcFreeTypeQueryAll_dylibloader_orig_fontconfig
#define FcFontSetCreate FcFontSetCreate_dylibloader_orig_fontconfig
#define FcFontSetDestroy FcFontSetDestroy_dylibloader_orig_fontconfig
#define FcFontSetAdd FcFontSetAdd_dylibloader_orig_fontconfig
@@ -129,6 +152,7 @@
#define FcValueEqual FcValueEqual_dylibloader_orig_fontconfig
#define FcValueSave FcValueSave_dylibloader_orig_fontconfig
#define FcPatternDestroy FcPatternDestroy_dylibloader_orig_fontconfig
+#define FcPatternObjectCount FcPatternObjectCount_dylibloader_orig_fontconfig
#define FcPatternEqual FcPatternEqual_dylibloader_orig_fontconfig
#define FcPatternEqualSubset FcPatternEqualSubset_dylibloader_orig_fontconfig
#define FcPatternHash FcPatternHash_dylibloader_orig_fontconfig
@@ -162,8 +186,18 @@
#define FcRangeDestroy FcRangeDestroy_dylibloader_orig_fontconfig
#define FcRangeCopy FcRangeCopy_dylibloader_orig_fontconfig
#define FcRangeGetDouble FcRangeGetDouble_dylibloader_orig_fontconfig
+#define FcPatternIterStart FcPatternIterStart_dylibloader_orig_fontconfig
+#define FcPatternIterNext FcPatternIterNext_dylibloader_orig_fontconfig
+#define FcPatternIterEqual FcPatternIterEqual_dylibloader_orig_fontconfig
+#define FcPatternFindIter FcPatternFindIter_dylibloader_orig_fontconfig
+#define FcPatternIterIsValid FcPatternIterIsValid_dylibloader_orig_fontconfig
+#define FcPatternIterGetObject FcPatternIterGetObject_dylibloader_orig_fontconfig
+#define FcPatternIterValueCount FcPatternIterValueCount_dylibloader_orig_fontconfig
+#define FcPatternIterGetValue FcPatternIterGetValue_dylibloader_orig_fontconfig
#define FcWeightFromOpenType FcWeightFromOpenType_dylibloader_orig_fontconfig
+#define FcWeightFromOpenTypeDouble FcWeightFromOpenTypeDouble_dylibloader_orig_fontconfig
#define FcWeightToOpenType FcWeightToOpenType_dylibloader_orig_fontconfig
+#define FcWeightToOpenTypeDouble FcWeightToOpenTypeDouble_dylibloader_orig_fontconfig
#define FcStrCopy FcStrCopy_dylibloader_orig_fontconfig
#define FcStrCopyFilename FcStrCopyFilename_dylibloader_orig_fontconfig
#define FcStrPlus FcStrPlus_dylibloader_orig_fontconfig
@@ -207,6 +241,8 @@
#undef FcDirCacheValid
#undef FcDirCacheClean
#undef FcCacheCreateTagFile
+#undef FcDirCacheCreateUUID
+#undef FcDirCacheDeleteUUID
#undef FcConfigHome
#undef FcConfigEnableHome
#undef FcConfigFilename
@@ -233,6 +269,26 @@
#undef FcConfigSubstitute
#undef FcConfigGetSysRoot
#undef FcConfigSetSysRoot
+#undef FcConfigFileInfoIterInit
+#undef FcConfigFileInfoIterNext
+#undef FcConfigFileInfoIterGet
+#undef FcCharSetCreate
+#undef FcCharSetNew
+#undef FcCharSetDestroy
+#undef FcCharSetAddChar
+#undef FcCharSetDelChar
+#undef FcCharSetCopy
+#undef FcCharSetEqual
+#undef FcCharSetIntersect
+#undef FcCharSetUnion
+#undef FcCharSetSubtract
+#undef FcCharSetMerge
+#undef FcCharSetHasChar
+#undef FcCharSetCount
+#undef FcCharSetIntersectCount
+#undef FcCharSetSubtractCount
+#undef FcCharSetIsSubset
+#undef FcCharSetCoverage
#undef FcValuePrint
#undef FcPatternPrint
#undef FcFontSetPrint
@@ -248,6 +304,7 @@
#undef FcDirCacheLoadFile
#undef FcDirCacheUnload
#undef FcFreeTypeQuery
+#undef FcFreeTypeQueryAll
#undef FcFontSetCreate
#undef FcFontSetDestroy
#undef FcFontSetAdd
@@ -318,6 +375,7 @@
#undef FcValueEqual
#undef FcValueSave
#undef FcPatternDestroy
+#undef FcPatternObjectCount
#undef FcPatternEqual
#undef FcPatternEqualSubset
#undef FcPatternHash
@@ -351,8 +409,18 @@
#undef FcRangeDestroy
#undef FcRangeCopy
#undef FcRangeGetDouble
+#undef FcPatternIterStart
+#undef FcPatternIterNext
+#undef FcPatternIterEqual
+#undef FcPatternFindIter
+#undef FcPatternIterIsValid
+#undef FcPatternIterGetObject
+#undef FcPatternIterValueCount
+#undef FcPatternIterGetValue
#undef FcWeightFromOpenType
+#undef FcWeightFromOpenTypeDouble
#undef FcWeightToOpenType
+#undef FcWeightToOpenTypeDouble
#undef FcStrCopy
#undef FcStrCopyFilename
#undef FcStrPlus
@@ -397,6 +465,8 @@ FcBool (*FcDirCacheUnlink_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConf
FcBool (*FcDirCacheValid_dylibloader_wrapper_fontconfig)(const FcChar8*);
FcBool (*FcDirCacheClean_dylibloader_wrapper_fontconfig)(const FcChar8*, FcBool);
void (*FcCacheCreateTagFile_dylibloader_wrapper_fontconfig)(const FcConfig*);
+FcBool (*FcDirCacheCreateUUID_dylibloader_wrapper_fontconfig)( FcChar8*, FcBool, FcConfig*);
+FcBool (*FcDirCacheDeleteUUID_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*);
FcChar8* (*FcConfigHome_dylibloader_wrapper_fontconfig)( void);
FcBool (*FcConfigEnableHome_dylibloader_wrapper_fontconfig)( FcBool);
FcChar8* (*FcConfigFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
@@ -423,6 +493,26 @@ FcBool (*FcConfigSubstituteWithPat_dylibloader_wrapper_fontconfig)( FcConfig*, F
FcBool (*FcConfigSubstitute_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcMatchKind);
const FcChar8* (*FcConfigGetSysRoot_dylibloader_wrapper_fontconfig)(const FcConfig*);
void (*FcConfigSetSysRoot_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
+void (*FcConfigFileInfoIterInit_dylibloader_wrapper_fontconfig)( FcConfig*, FcConfigFileInfoIter*);
+FcBool (*FcConfigFileInfoIterNext_dylibloader_wrapper_fontconfig)( FcConfig*, FcConfigFileInfoIter*);
+FcBool (*FcConfigFileInfoIterGet_dylibloader_wrapper_fontconfig)( FcConfig*, FcConfigFileInfoIter*, FcChar8**, FcChar8**, FcBool*);
+FcCharSet* (*FcCharSetCreate_dylibloader_wrapper_fontconfig)( void);
+FcCharSet* (*FcCharSetNew_dylibloader_wrapper_fontconfig)( void);
+void (*FcCharSetDestroy_dylibloader_wrapper_fontconfig)( FcCharSet*);
+FcBool (*FcCharSetAddChar_dylibloader_wrapper_fontconfig)( FcCharSet*, FcChar32);
+FcBool (*FcCharSetDelChar_dylibloader_wrapper_fontconfig)( FcCharSet*, FcChar32);
+FcCharSet* (*FcCharSetCopy_dylibloader_wrapper_fontconfig)( FcCharSet*);
+FcBool (*FcCharSetEqual_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+FcCharSet* (*FcCharSetIntersect_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+FcCharSet* (*FcCharSetUnion_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+FcCharSet* (*FcCharSetSubtract_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+FcBool (*FcCharSetMerge_dylibloader_wrapper_fontconfig)( FcCharSet*,const FcCharSet*, FcBool*);
+FcBool (*FcCharSetHasChar_dylibloader_wrapper_fontconfig)(const FcCharSet*, FcChar32);
+FcChar32 (*FcCharSetCount_dylibloader_wrapper_fontconfig)(const FcCharSet*);
+FcChar32 (*FcCharSetIntersectCount_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+FcChar32 (*FcCharSetSubtractCount_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+FcBool (*FcCharSetIsSubset_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+FcChar32 (*FcCharSetCoverage_dylibloader_wrapper_fontconfig)(const FcCharSet*, FcChar32, FcChar32*);
void (*FcValuePrint_dylibloader_wrapper_fontconfig)(const FcValue);
void (*FcPatternPrint_dylibloader_wrapper_fontconfig)(const FcPattern*);
void (*FcFontSetPrint_dylibloader_wrapper_fontconfig)(const FcFontSet*);
@@ -437,7 +527,8 @@ FcCache* (*FcDirCacheRescan_dylibloader_wrapper_fontconfig)(const FcChar8*, FcCo
FcCache* (*FcDirCacheRead_dylibloader_wrapper_fontconfig)(const FcChar8*, FcBool, FcConfig*);
FcCache* (*FcDirCacheLoadFile_dylibloader_wrapper_fontconfig)(const FcChar8*,struct stat*);
void (*FcDirCacheUnload_dylibloader_wrapper_fontconfig)( FcCache*);
-FcPattern* (*FcFreeTypeQuery_dylibloader_wrapper_fontconfig)(const FcChar8*, int, FcBlanks*, int*);
+FcPattern* (*FcFreeTypeQuery_dylibloader_wrapper_fontconfig)(const FcChar8*, unsigned int, FcBlanks*, int*);
+unsigned int (*FcFreeTypeQueryAll_dylibloader_wrapper_fontconfig)(const FcChar8*, unsigned int, FcBlanks*, int*, FcFontSet*);
FcFontSet* (*FcFontSetCreate_dylibloader_wrapper_fontconfig)( void);
void (*FcFontSetDestroy_dylibloader_wrapper_fontconfig)( FcFontSet*);
FcBool (*FcFontSetAdd_dylibloader_wrapper_fontconfig)( FcFontSet*, FcPattern*);
@@ -508,6 +599,7 @@ void (*FcValueDestroy_dylibloader_wrapper_fontconfig)( FcValue);
FcBool (*FcValueEqual_dylibloader_wrapper_fontconfig)( FcValue, FcValue);
FcValue (*FcValueSave_dylibloader_wrapper_fontconfig)( FcValue);
void (*FcPatternDestroy_dylibloader_wrapper_fontconfig)( FcPattern*);
+int (*FcPatternObjectCount_dylibloader_wrapper_fontconfig)(const FcPattern*);
FcBool (*FcPatternEqual_dylibloader_wrapper_fontconfig)(const FcPattern*,const FcPattern*);
FcBool (*FcPatternEqualSubset_dylibloader_wrapper_fontconfig)(const FcPattern*,const FcPattern*,const FcObjectSet*);
FcChar32 (*FcPatternHash_dylibloader_wrapper_fontconfig)(const FcPattern*);
@@ -541,8 +633,18 @@ FcRange* (*FcRangeCreateInteger_dylibloader_wrapper_fontconfig)( FcChar32, FcCha
void (*FcRangeDestroy_dylibloader_wrapper_fontconfig)( FcRange*);
FcRange* (*FcRangeCopy_dylibloader_wrapper_fontconfig)(const FcRange*);
FcBool (*FcRangeGetDouble_dylibloader_wrapper_fontconfig)(const FcRange*, double*, double*);
+void (*FcPatternIterStart_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+FcBool (*FcPatternIterNext_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+FcBool (*FcPatternIterEqual_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*,const FcPattern*, FcPatternIter*);
+FcBool (*FcPatternFindIter_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*,const char*);
+FcBool (*FcPatternIterIsValid_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+const char* (*FcPatternIterGetObject_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+int (*FcPatternIterValueCount_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+FcResult (*FcPatternIterGetValue_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*, int, FcValue*, FcValueBinding*);
int (*FcWeightFromOpenType_dylibloader_wrapper_fontconfig)( int);
+double (*FcWeightFromOpenTypeDouble_dylibloader_wrapper_fontconfig)( double);
int (*FcWeightToOpenType_dylibloader_wrapper_fontconfig)( int);
+double (*FcWeightToOpenTypeDouble_dylibloader_wrapper_fontconfig)( double);
FcChar8* (*FcStrCopy_dylibloader_wrapper_fontconfig)(const FcChar8*);
FcChar8* (*FcStrCopyFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
FcChar8* (*FcStrPlus_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
@@ -575,7 +677,7 @@ FcBool (*FcConfigParseAndLoadFromMemory_dylibloader_wrapper_fontconfig)( FcConfi
int initialize_fontconfig(int verbose) {
void *handle;
char *error;
- handle = dlopen("libfontconfig.so", RTLD_LAZY);
+ handle = dlopen("libfontconfig.so.1", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
@@ -687,6 +789,22 @@ int initialize_fontconfig(int verbose) {
fprintf(stderr, "%s\n", error);
}
}
+// FcDirCacheCreateUUID
+ *(void **) (&FcDirCacheCreateUUID_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheCreateUUID");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcDirCacheDeleteUUID
+ *(void **) (&FcDirCacheDeleteUUID_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcDirCacheDeleteUUID");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
// FcConfigHome
*(void **) (&FcConfigHome_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigHome");
if (verbose) {
@@ -895,6 +1013,166 @@ int initialize_fontconfig(int verbose) {
fprintf(stderr, "%s\n", error);
}
}
+// FcConfigFileInfoIterInit
+ *(void **) (&FcConfigFileInfoIterInit_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigFileInfoIterInit");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigFileInfoIterNext
+ *(void **) (&FcConfigFileInfoIterNext_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigFileInfoIterNext");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcConfigFileInfoIterGet
+ *(void **) (&FcConfigFileInfoIterGet_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcConfigFileInfoIterGet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetCreate
+ *(void **) (&FcCharSetCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetNew
+ *(void **) (&FcCharSetNew_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetNew");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetDestroy
+ *(void **) (&FcCharSetDestroy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetAddChar
+ *(void **) (&FcCharSetAddChar_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetAddChar");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetDelChar
+ *(void **) (&FcCharSetDelChar_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetDelChar");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetCopy
+ *(void **) (&FcCharSetCopy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetCopy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetEqual
+ *(void **) (&FcCharSetEqual_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetEqual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetIntersect
+ *(void **) (&FcCharSetIntersect_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetIntersect");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetUnion
+ *(void **) (&FcCharSetUnion_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetUnion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetSubtract
+ *(void **) (&FcCharSetSubtract_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetSubtract");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetMerge
+ *(void **) (&FcCharSetMerge_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetMerge");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetHasChar
+ *(void **) (&FcCharSetHasChar_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetHasChar");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetCount
+ *(void **) (&FcCharSetCount_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetCount");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetIntersectCount
+ *(void **) (&FcCharSetIntersectCount_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetIntersectCount");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetSubtractCount
+ *(void **) (&FcCharSetSubtractCount_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetSubtractCount");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetIsSubset
+ *(void **) (&FcCharSetIsSubset_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetIsSubset");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcCharSetCoverage
+ *(void **) (&FcCharSetCoverage_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcCharSetCoverage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
// FcValuePrint
*(void **) (&FcValuePrint_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcValuePrint");
if (verbose) {
@@ -1015,6 +1293,14 @@ int initialize_fontconfig(int verbose) {
fprintf(stderr, "%s\n", error);
}
}
+// FcFreeTypeQueryAll
+ *(void **) (&FcFreeTypeQueryAll_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFreeTypeQueryAll");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
// FcFontSetCreate
*(void **) (&FcFontSetCreate_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcFontSetCreate");
if (verbose) {
@@ -1575,6 +1861,14 @@ int initialize_fontconfig(int verbose) {
fprintf(stderr, "%s\n", error);
}
}
+// FcPatternObjectCount
+ *(void **) (&FcPatternObjectCount_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternObjectCount");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
// FcPatternEqual
*(void **) (&FcPatternEqual_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternEqual");
if (verbose) {
@@ -1839,6 +2133,70 @@ int initialize_fontconfig(int verbose) {
fprintf(stderr, "%s\n", error);
}
}
+// FcPatternIterStart
+ *(void **) (&FcPatternIterStart_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternIterStart");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternIterNext
+ *(void **) (&FcPatternIterNext_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternIterNext");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternIterEqual
+ *(void **) (&FcPatternIterEqual_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternIterEqual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternFindIter
+ *(void **) (&FcPatternFindIter_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternFindIter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternIterIsValid
+ *(void **) (&FcPatternIterIsValid_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternIterIsValid");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternIterGetObject
+ *(void **) (&FcPatternIterGetObject_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternIterGetObject");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternIterValueCount
+ *(void **) (&FcPatternIterValueCount_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternIterValueCount");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// FcPatternIterGetValue
+ *(void **) (&FcPatternIterGetValue_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcPatternIterGetValue");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
// FcWeightFromOpenType
*(void **) (&FcWeightFromOpenType_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcWeightFromOpenType");
if (verbose) {
@@ -1847,6 +2205,14 @@ int initialize_fontconfig(int verbose) {
fprintf(stderr, "%s\n", error);
}
}
+// FcWeightFromOpenTypeDouble
+ *(void **) (&FcWeightFromOpenTypeDouble_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcWeightFromOpenTypeDouble");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
// FcWeightToOpenType
*(void **) (&FcWeightToOpenType_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcWeightToOpenType");
if (verbose) {
@@ -1855,6 +2221,14 @@ int initialize_fontconfig(int verbose) {
fprintf(stderr, "%s\n", error);
}
}
+// FcWeightToOpenTypeDouble
+ *(void **) (&FcWeightToOpenTypeDouble_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcWeightToOpenTypeDouble");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
// FcStrCopy
*(void **) (&FcStrCopy_dylibloader_wrapper_fontconfig) = dlsym(handle, "FcStrCopy");
if (verbose) {
diff --git a/platform/linuxbsd/fontconfig-so_wrap.h b/platform/linuxbsd/fontconfig-so_wrap.h
index f0794cce8b..0c8259deb7 100644
--- a/platform/linuxbsd/fontconfig-so_wrap.h
+++ b/platform/linuxbsd/fontconfig-so_wrap.h
@@ -2,8 +2,8 @@
#define DYLIBLOAD_WRAPPER_FONTCONFIG
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
-// generated by ./generate-wrapper.py 0.3 on 2022-07-29 05:40:07
-// flags: ./generate-wrapper.py --include /usr/include/fontconfig/fontconfig.h --sys-include <fontconfig/fontconfig.h> --soname libfontconfig.so --init-name fontconfig --output-header fontconfig-so_wrap.h --output-implementation fontconfig-so_wrap.c --omit-prefix FcCharSet
+// generated by ./generate-wrapper.py 0.3 on 2022-11-22 10:28:00
+// flags: ./generate-wrapper.py --include /usr/include/fontconfig/fontconfig.h --sys-include <fontconfig/fontconfig.h> --soname libfontconfig.so --init-name fontconfig --output-header fontconfig-so_wrap.h --output-implementation fontconfig-so_wrap.c --omit-prefix FcCharSetFirst --omit-prefix FcCharSetNext
//
#include <stdint.h>
@@ -20,6 +20,8 @@
#define FcDirCacheValid FcDirCacheValid_dylibloader_orig_fontconfig
#define FcDirCacheClean FcDirCacheClean_dylibloader_orig_fontconfig
#define FcCacheCreateTagFile FcCacheCreateTagFile_dylibloader_orig_fontconfig
+#define FcDirCacheCreateUUID FcDirCacheCreateUUID_dylibloader_orig_fontconfig
+#define FcDirCacheDeleteUUID FcDirCacheDeleteUUID_dylibloader_orig_fontconfig
#define FcConfigHome FcConfigHome_dylibloader_orig_fontconfig
#define FcConfigEnableHome FcConfigEnableHome_dylibloader_orig_fontconfig
#define FcConfigFilename FcConfigFilename_dylibloader_orig_fontconfig
@@ -46,6 +48,26 @@
#define FcConfigSubstitute FcConfigSubstitute_dylibloader_orig_fontconfig
#define FcConfigGetSysRoot FcConfigGetSysRoot_dylibloader_orig_fontconfig
#define FcConfigSetSysRoot FcConfigSetSysRoot_dylibloader_orig_fontconfig
+#define FcConfigFileInfoIterInit FcConfigFileInfoIterInit_dylibloader_orig_fontconfig
+#define FcConfigFileInfoIterNext FcConfigFileInfoIterNext_dylibloader_orig_fontconfig
+#define FcConfigFileInfoIterGet FcConfigFileInfoIterGet_dylibloader_orig_fontconfig
+#define FcCharSetCreate FcCharSetCreate_dylibloader_orig_fontconfig
+#define FcCharSetNew FcCharSetNew_dylibloader_orig_fontconfig
+#define FcCharSetDestroy FcCharSetDestroy_dylibloader_orig_fontconfig
+#define FcCharSetAddChar FcCharSetAddChar_dylibloader_orig_fontconfig
+#define FcCharSetDelChar FcCharSetDelChar_dylibloader_orig_fontconfig
+#define FcCharSetCopy FcCharSetCopy_dylibloader_orig_fontconfig
+#define FcCharSetEqual FcCharSetEqual_dylibloader_orig_fontconfig
+#define FcCharSetIntersect FcCharSetIntersect_dylibloader_orig_fontconfig
+#define FcCharSetUnion FcCharSetUnion_dylibloader_orig_fontconfig
+#define FcCharSetSubtract FcCharSetSubtract_dylibloader_orig_fontconfig
+#define FcCharSetMerge FcCharSetMerge_dylibloader_orig_fontconfig
+#define FcCharSetHasChar FcCharSetHasChar_dylibloader_orig_fontconfig
+#define FcCharSetCount FcCharSetCount_dylibloader_orig_fontconfig
+#define FcCharSetIntersectCount FcCharSetIntersectCount_dylibloader_orig_fontconfig
+#define FcCharSetSubtractCount FcCharSetSubtractCount_dylibloader_orig_fontconfig
+#define FcCharSetIsSubset FcCharSetIsSubset_dylibloader_orig_fontconfig
+#define FcCharSetCoverage FcCharSetCoverage_dylibloader_orig_fontconfig
#define FcValuePrint FcValuePrint_dylibloader_orig_fontconfig
#define FcPatternPrint FcPatternPrint_dylibloader_orig_fontconfig
#define FcFontSetPrint FcFontSetPrint_dylibloader_orig_fontconfig
@@ -61,6 +83,7 @@
#define FcDirCacheLoadFile FcDirCacheLoadFile_dylibloader_orig_fontconfig
#define FcDirCacheUnload FcDirCacheUnload_dylibloader_orig_fontconfig
#define FcFreeTypeQuery FcFreeTypeQuery_dylibloader_orig_fontconfig
+#define FcFreeTypeQueryAll FcFreeTypeQueryAll_dylibloader_orig_fontconfig
#define FcFontSetCreate FcFontSetCreate_dylibloader_orig_fontconfig
#define FcFontSetDestroy FcFontSetDestroy_dylibloader_orig_fontconfig
#define FcFontSetAdd FcFontSetAdd_dylibloader_orig_fontconfig
@@ -131,6 +154,7 @@
#define FcValueEqual FcValueEqual_dylibloader_orig_fontconfig
#define FcValueSave FcValueSave_dylibloader_orig_fontconfig
#define FcPatternDestroy FcPatternDestroy_dylibloader_orig_fontconfig
+#define FcPatternObjectCount FcPatternObjectCount_dylibloader_orig_fontconfig
#define FcPatternEqual FcPatternEqual_dylibloader_orig_fontconfig
#define FcPatternEqualSubset FcPatternEqualSubset_dylibloader_orig_fontconfig
#define FcPatternHash FcPatternHash_dylibloader_orig_fontconfig
@@ -164,8 +188,18 @@
#define FcRangeDestroy FcRangeDestroy_dylibloader_orig_fontconfig
#define FcRangeCopy FcRangeCopy_dylibloader_orig_fontconfig
#define FcRangeGetDouble FcRangeGetDouble_dylibloader_orig_fontconfig
+#define FcPatternIterStart FcPatternIterStart_dylibloader_orig_fontconfig
+#define FcPatternIterNext FcPatternIterNext_dylibloader_orig_fontconfig
+#define FcPatternIterEqual FcPatternIterEqual_dylibloader_orig_fontconfig
+#define FcPatternFindIter FcPatternFindIter_dylibloader_orig_fontconfig
+#define FcPatternIterIsValid FcPatternIterIsValid_dylibloader_orig_fontconfig
+#define FcPatternIterGetObject FcPatternIterGetObject_dylibloader_orig_fontconfig
+#define FcPatternIterValueCount FcPatternIterValueCount_dylibloader_orig_fontconfig
+#define FcPatternIterGetValue FcPatternIterGetValue_dylibloader_orig_fontconfig
#define FcWeightFromOpenType FcWeightFromOpenType_dylibloader_orig_fontconfig
+#define FcWeightFromOpenTypeDouble FcWeightFromOpenTypeDouble_dylibloader_orig_fontconfig
#define FcWeightToOpenType FcWeightToOpenType_dylibloader_orig_fontconfig
+#define FcWeightToOpenTypeDouble FcWeightToOpenTypeDouble_dylibloader_orig_fontconfig
#define FcStrCopy FcStrCopy_dylibloader_orig_fontconfig
#define FcStrCopyFilename FcStrCopyFilename_dylibloader_orig_fontconfig
#define FcStrPlus FcStrPlus_dylibloader_orig_fontconfig
@@ -209,6 +243,8 @@
#undef FcDirCacheValid
#undef FcDirCacheClean
#undef FcCacheCreateTagFile
+#undef FcDirCacheCreateUUID
+#undef FcDirCacheDeleteUUID
#undef FcConfigHome
#undef FcConfigEnableHome
#undef FcConfigFilename
@@ -235,6 +271,26 @@
#undef FcConfigSubstitute
#undef FcConfigGetSysRoot
#undef FcConfigSetSysRoot
+#undef FcConfigFileInfoIterInit
+#undef FcConfigFileInfoIterNext
+#undef FcConfigFileInfoIterGet
+#undef FcCharSetCreate
+#undef FcCharSetNew
+#undef FcCharSetDestroy
+#undef FcCharSetAddChar
+#undef FcCharSetDelChar
+#undef FcCharSetCopy
+#undef FcCharSetEqual
+#undef FcCharSetIntersect
+#undef FcCharSetUnion
+#undef FcCharSetSubtract
+#undef FcCharSetMerge
+#undef FcCharSetHasChar
+#undef FcCharSetCount
+#undef FcCharSetIntersectCount
+#undef FcCharSetSubtractCount
+#undef FcCharSetIsSubset
+#undef FcCharSetCoverage
#undef FcValuePrint
#undef FcPatternPrint
#undef FcFontSetPrint
@@ -250,6 +306,7 @@
#undef FcDirCacheLoadFile
#undef FcDirCacheUnload
#undef FcFreeTypeQuery
+#undef FcFreeTypeQueryAll
#undef FcFontSetCreate
#undef FcFontSetDestroy
#undef FcFontSetAdd
@@ -320,6 +377,7 @@
#undef FcValueEqual
#undef FcValueSave
#undef FcPatternDestroy
+#undef FcPatternObjectCount
#undef FcPatternEqual
#undef FcPatternEqualSubset
#undef FcPatternHash
@@ -353,8 +411,18 @@
#undef FcRangeDestroy
#undef FcRangeCopy
#undef FcRangeGetDouble
+#undef FcPatternIterStart
+#undef FcPatternIterNext
+#undef FcPatternIterEqual
+#undef FcPatternFindIter
+#undef FcPatternIterIsValid
+#undef FcPatternIterGetObject
+#undef FcPatternIterValueCount
+#undef FcPatternIterGetValue
#undef FcWeightFromOpenType
+#undef FcWeightFromOpenTypeDouble
#undef FcWeightToOpenType
+#undef FcWeightToOpenTypeDouble
#undef FcStrCopy
#undef FcStrCopyFilename
#undef FcStrPlus
@@ -400,6 +468,8 @@ extern "C" {
#define FcDirCacheValid FcDirCacheValid_dylibloader_wrapper_fontconfig
#define FcDirCacheClean FcDirCacheClean_dylibloader_wrapper_fontconfig
#define FcCacheCreateTagFile FcCacheCreateTagFile_dylibloader_wrapper_fontconfig
+#define FcDirCacheCreateUUID FcDirCacheCreateUUID_dylibloader_wrapper_fontconfig
+#define FcDirCacheDeleteUUID FcDirCacheDeleteUUID_dylibloader_wrapper_fontconfig
#define FcConfigHome FcConfigHome_dylibloader_wrapper_fontconfig
#define FcConfigEnableHome FcConfigEnableHome_dylibloader_wrapper_fontconfig
#define FcConfigFilename FcConfigFilename_dylibloader_wrapper_fontconfig
@@ -426,6 +496,26 @@ extern "C" {
#define FcConfigSubstitute FcConfigSubstitute_dylibloader_wrapper_fontconfig
#define FcConfigGetSysRoot FcConfigGetSysRoot_dylibloader_wrapper_fontconfig
#define FcConfigSetSysRoot FcConfigSetSysRoot_dylibloader_wrapper_fontconfig
+#define FcConfigFileInfoIterInit FcConfigFileInfoIterInit_dylibloader_wrapper_fontconfig
+#define FcConfigFileInfoIterNext FcConfigFileInfoIterNext_dylibloader_wrapper_fontconfig
+#define FcConfigFileInfoIterGet FcConfigFileInfoIterGet_dylibloader_wrapper_fontconfig
+#define FcCharSetCreate FcCharSetCreate_dylibloader_wrapper_fontconfig
+#define FcCharSetNew FcCharSetNew_dylibloader_wrapper_fontconfig
+#define FcCharSetDestroy FcCharSetDestroy_dylibloader_wrapper_fontconfig
+#define FcCharSetAddChar FcCharSetAddChar_dylibloader_wrapper_fontconfig
+#define FcCharSetDelChar FcCharSetDelChar_dylibloader_wrapper_fontconfig
+#define FcCharSetCopy FcCharSetCopy_dylibloader_wrapper_fontconfig
+#define FcCharSetEqual FcCharSetEqual_dylibloader_wrapper_fontconfig
+#define FcCharSetIntersect FcCharSetIntersect_dylibloader_wrapper_fontconfig
+#define FcCharSetUnion FcCharSetUnion_dylibloader_wrapper_fontconfig
+#define FcCharSetSubtract FcCharSetSubtract_dylibloader_wrapper_fontconfig
+#define FcCharSetMerge FcCharSetMerge_dylibloader_wrapper_fontconfig
+#define FcCharSetHasChar FcCharSetHasChar_dylibloader_wrapper_fontconfig
+#define FcCharSetCount FcCharSetCount_dylibloader_wrapper_fontconfig
+#define FcCharSetIntersectCount FcCharSetIntersectCount_dylibloader_wrapper_fontconfig
+#define FcCharSetSubtractCount FcCharSetSubtractCount_dylibloader_wrapper_fontconfig
+#define FcCharSetIsSubset FcCharSetIsSubset_dylibloader_wrapper_fontconfig
+#define FcCharSetCoverage FcCharSetCoverage_dylibloader_wrapper_fontconfig
#define FcValuePrint FcValuePrint_dylibloader_wrapper_fontconfig
#define FcPatternPrint FcPatternPrint_dylibloader_wrapper_fontconfig
#define FcFontSetPrint FcFontSetPrint_dylibloader_wrapper_fontconfig
@@ -441,6 +531,7 @@ extern "C" {
#define FcDirCacheLoadFile FcDirCacheLoadFile_dylibloader_wrapper_fontconfig
#define FcDirCacheUnload FcDirCacheUnload_dylibloader_wrapper_fontconfig
#define FcFreeTypeQuery FcFreeTypeQuery_dylibloader_wrapper_fontconfig
+#define FcFreeTypeQueryAll FcFreeTypeQueryAll_dylibloader_wrapper_fontconfig
#define FcFontSetCreate FcFontSetCreate_dylibloader_wrapper_fontconfig
#define FcFontSetDestroy FcFontSetDestroy_dylibloader_wrapper_fontconfig
#define FcFontSetAdd FcFontSetAdd_dylibloader_wrapper_fontconfig
@@ -511,6 +602,7 @@ extern "C" {
#define FcValueEqual FcValueEqual_dylibloader_wrapper_fontconfig
#define FcValueSave FcValueSave_dylibloader_wrapper_fontconfig
#define FcPatternDestroy FcPatternDestroy_dylibloader_wrapper_fontconfig
+#define FcPatternObjectCount FcPatternObjectCount_dylibloader_wrapper_fontconfig
#define FcPatternEqual FcPatternEqual_dylibloader_wrapper_fontconfig
#define FcPatternEqualSubset FcPatternEqualSubset_dylibloader_wrapper_fontconfig
#define FcPatternHash FcPatternHash_dylibloader_wrapper_fontconfig
@@ -544,8 +636,18 @@ extern "C" {
#define FcRangeDestroy FcRangeDestroy_dylibloader_wrapper_fontconfig
#define FcRangeCopy FcRangeCopy_dylibloader_wrapper_fontconfig
#define FcRangeGetDouble FcRangeGetDouble_dylibloader_wrapper_fontconfig
+#define FcPatternIterStart FcPatternIterStart_dylibloader_wrapper_fontconfig
+#define FcPatternIterNext FcPatternIterNext_dylibloader_wrapper_fontconfig
+#define FcPatternIterEqual FcPatternIterEqual_dylibloader_wrapper_fontconfig
+#define FcPatternFindIter FcPatternFindIter_dylibloader_wrapper_fontconfig
+#define FcPatternIterIsValid FcPatternIterIsValid_dylibloader_wrapper_fontconfig
+#define FcPatternIterGetObject FcPatternIterGetObject_dylibloader_wrapper_fontconfig
+#define FcPatternIterValueCount FcPatternIterValueCount_dylibloader_wrapper_fontconfig
+#define FcPatternIterGetValue FcPatternIterGetValue_dylibloader_wrapper_fontconfig
#define FcWeightFromOpenType FcWeightFromOpenType_dylibloader_wrapper_fontconfig
+#define FcWeightFromOpenTypeDouble FcWeightFromOpenTypeDouble_dylibloader_wrapper_fontconfig
#define FcWeightToOpenType FcWeightToOpenType_dylibloader_wrapper_fontconfig
+#define FcWeightToOpenTypeDouble FcWeightToOpenTypeDouble_dylibloader_wrapper_fontconfig
#define FcStrCopy FcStrCopy_dylibloader_wrapper_fontconfig
#define FcStrCopyFilename FcStrCopyFilename_dylibloader_wrapper_fontconfig
#define FcStrPlus FcStrPlus_dylibloader_wrapper_fontconfig
@@ -588,6 +690,8 @@ extern FcBool (*FcDirCacheUnlink_dylibloader_wrapper_fontconfig)(const FcChar8*,
extern FcBool (*FcDirCacheValid_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcBool (*FcDirCacheClean_dylibloader_wrapper_fontconfig)(const FcChar8*, FcBool);
extern void (*FcCacheCreateTagFile_dylibloader_wrapper_fontconfig)(const FcConfig*);
+extern FcBool (*FcDirCacheCreateUUID_dylibloader_wrapper_fontconfig)( FcChar8*, FcBool, FcConfig*);
+extern FcBool (*FcDirCacheDeleteUUID_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*);
extern FcChar8* (*FcConfigHome_dylibloader_wrapper_fontconfig)( void);
extern FcBool (*FcConfigEnableHome_dylibloader_wrapper_fontconfig)( FcBool);
extern FcChar8* (*FcConfigFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
@@ -614,6 +718,26 @@ extern FcBool (*FcConfigSubstituteWithPat_dylibloader_wrapper_fontconfig)( FcCon
extern FcBool (*FcConfigSubstitute_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcMatchKind);
extern const FcChar8* (*FcConfigGetSysRoot_dylibloader_wrapper_fontconfig)(const FcConfig*);
extern void (*FcConfigSetSysRoot_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
+extern void (*FcConfigFileInfoIterInit_dylibloader_wrapper_fontconfig)( FcConfig*, FcConfigFileInfoIter*);
+extern FcBool (*FcConfigFileInfoIterNext_dylibloader_wrapper_fontconfig)( FcConfig*, FcConfigFileInfoIter*);
+extern FcBool (*FcConfigFileInfoIterGet_dylibloader_wrapper_fontconfig)( FcConfig*, FcConfigFileInfoIter*, FcChar8**, FcChar8**, FcBool*);
+extern FcCharSet* (*FcCharSetCreate_dylibloader_wrapper_fontconfig)( void);
+extern FcCharSet* (*FcCharSetNew_dylibloader_wrapper_fontconfig)( void);
+extern void (*FcCharSetDestroy_dylibloader_wrapper_fontconfig)( FcCharSet*);
+extern FcBool (*FcCharSetAddChar_dylibloader_wrapper_fontconfig)( FcCharSet*, FcChar32);
+extern FcBool (*FcCharSetDelChar_dylibloader_wrapper_fontconfig)( FcCharSet*, FcChar32);
+extern FcCharSet* (*FcCharSetCopy_dylibloader_wrapper_fontconfig)( FcCharSet*);
+extern FcBool (*FcCharSetEqual_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+extern FcCharSet* (*FcCharSetIntersect_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+extern FcCharSet* (*FcCharSetUnion_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+extern FcCharSet* (*FcCharSetSubtract_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+extern FcBool (*FcCharSetMerge_dylibloader_wrapper_fontconfig)( FcCharSet*,const FcCharSet*, FcBool*);
+extern FcBool (*FcCharSetHasChar_dylibloader_wrapper_fontconfig)(const FcCharSet*, FcChar32);
+extern FcChar32 (*FcCharSetCount_dylibloader_wrapper_fontconfig)(const FcCharSet*);
+extern FcChar32 (*FcCharSetIntersectCount_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+extern FcChar32 (*FcCharSetSubtractCount_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+extern FcBool (*FcCharSetIsSubset_dylibloader_wrapper_fontconfig)(const FcCharSet*,const FcCharSet*);
+extern FcChar32 (*FcCharSetCoverage_dylibloader_wrapper_fontconfig)(const FcCharSet*, FcChar32, FcChar32*);
extern void (*FcValuePrint_dylibloader_wrapper_fontconfig)(const FcValue);
extern void (*FcPatternPrint_dylibloader_wrapper_fontconfig)(const FcPattern*);
extern void (*FcFontSetPrint_dylibloader_wrapper_fontconfig)(const FcFontSet*);
@@ -628,7 +752,8 @@ extern FcCache* (*FcDirCacheRescan_dylibloader_wrapper_fontconfig)(const FcChar8
extern FcCache* (*FcDirCacheRead_dylibloader_wrapper_fontconfig)(const FcChar8*, FcBool, FcConfig*);
extern FcCache* (*FcDirCacheLoadFile_dylibloader_wrapper_fontconfig)(const FcChar8*,struct stat*);
extern void (*FcDirCacheUnload_dylibloader_wrapper_fontconfig)( FcCache*);
-extern FcPattern* (*FcFreeTypeQuery_dylibloader_wrapper_fontconfig)(const FcChar8*, int, FcBlanks*, int*);
+extern FcPattern* (*FcFreeTypeQuery_dylibloader_wrapper_fontconfig)(const FcChar8*, unsigned int, FcBlanks*, int*);
+extern unsigned int (*FcFreeTypeQueryAll_dylibloader_wrapper_fontconfig)(const FcChar8*, unsigned int, FcBlanks*, int*, FcFontSet*);
extern FcFontSet* (*FcFontSetCreate_dylibloader_wrapper_fontconfig)( void);
extern void (*FcFontSetDestroy_dylibloader_wrapper_fontconfig)( FcFontSet*);
extern FcBool (*FcFontSetAdd_dylibloader_wrapper_fontconfig)( FcFontSet*, FcPattern*);
@@ -699,6 +824,7 @@ extern void (*FcValueDestroy_dylibloader_wrapper_fontconfig)( FcValue);
extern FcBool (*FcValueEqual_dylibloader_wrapper_fontconfig)( FcValue, FcValue);
extern FcValue (*FcValueSave_dylibloader_wrapper_fontconfig)( FcValue);
extern void (*FcPatternDestroy_dylibloader_wrapper_fontconfig)( FcPattern*);
+extern int (*FcPatternObjectCount_dylibloader_wrapper_fontconfig)(const FcPattern*);
extern FcBool (*FcPatternEqual_dylibloader_wrapper_fontconfig)(const FcPattern*,const FcPattern*);
extern FcBool (*FcPatternEqualSubset_dylibloader_wrapper_fontconfig)(const FcPattern*,const FcPattern*,const FcObjectSet*);
extern FcChar32 (*FcPatternHash_dylibloader_wrapper_fontconfig)(const FcPattern*);
@@ -732,8 +858,18 @@ extern FcRange* (*FcRangeCreateInteger_dylibloader_wrapper_fontconfig)( FcChar32
extern void (*FcRangeDestroy_dylibloader_wrapper_fontconfig)( FcRange*);
extern FcRange* (*FcRangeCopy_dylibloader_wrapper_fontconfig)(const FcRange*);
extern FcBool (*FcRangeGetDouble_dylibloader_wrapper_fontconfig)(const FcRange*, double*, double*);
+extern void (*FcPatternIterStart_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+extern FcBool (*FcPatternIterNext_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+extern FcBool (*FcPatternIterEqual_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*,const FcPattern*, FcPatternIter*);
+extern FcBool (*FcPatternFindIter_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*,const char*);
+extern FcBool (*FcPatternIterIsValid_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+extern const char* (*FcPatternIterGetObject_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+extern int (*FcPatternIterValueCount_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*);
+extern FcResult (*FcPatternIterGetValue_dylibloader_wrapper_fontconfig)(const FcPattern*, FcPatternIter*, int, FcValue*, FcValueBinding*);
extern int (*FcWeightFromOpenType_dylibloader_wrapper_fontconfig)( int);
+extern double (*FcWeightFromOpenTypeDouble_dylibloader_wrapper_fontconfig)( double);
extern int (*FcWeightToOpenType_dylibloader_wrapper_fontconfig)( int);
+extern double (*FcWeightToOpenTypeDouble_dylibloader_wrapper_fontconfig)( double);
extern FcChar8* (*FcStrCopy_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcChar8* (*FcStrCopyFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcChar8* (*FcStrPlus_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
diff --git a/platform/linuxbsd/freedesktop_screensaver.cpp b/platform/linuxbsd/freedesktop_screensaver.cpp
index fa3f7fbfea..88ec37c456 100644
--- a/platform/linuxbsd/freedesktop_screensaver.cpp
+++ b/platform/linuxbsd/freedesktop_screensaver.cpp
@@ -55,7 +55,7 @@ void FreeDesktopScreenSaver::inhibit() {
return;
}
- String app_name_string = ProjectSettings::get_singleton()->get("application/config/name");
+ String app_name_string = GLOBAL_GET("application/config/name");
CharString app_name_utf8 = app_name_string.utf8();
const char *app_name = app_name_string.is_empty() ? "Godot Engine" : app_name_utf8.get_data();
diff --git a/platform/linuxbsd/godot_linuxbsd.cpp b/platform/linuxbsd/godot_linuxbsd.cpp
index 91a260182e..fa5e20891c 100644
--- a/platform/linuxbsd/godot_linuxbsd.cpp
+++ b/platform/linuxbsd/godot_linuxbsd.cpp
@@ -69,6 +69,7 @@ int main(int argc, char *argv[]) {
}
if (Main::start()) {
+ os.set_exit_code(EXIT_SUCCESS);
os.run(); // it is actually the OS that decides how to run
}
Main::cleanup();
diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp
index bc018e366b..4eaf6965c9 100644
--- a/platform/linuxbsd/joypad_linux.cpp
+++ b/platform/linuxbsd/joypad_linux.cpp
@@ -218,8 +218,8 @@ void JoypadLinux::monitor_joypads() {
}
}
closedir(input_directory);
+ usleep(1000000); // 1s
}
- usleep(1000000); // 1s
}
void JoypadLinux::close_joypads() {
diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp
index 995a904398..d5a75edeea 100644
--- a/platform/linuxbsd/os_linuxbsd.cpp
+++ b/platform/linuxbsd/os_linuxbsd.cpp
@@ -40,7 +40,7 @@
#endif
#ifdef X11_ENABLED
-#include "display_server_x11.h"
+#include "x11/display_server_x11.h"
#endif
#ifdef HAVE_MNTENT
@@ -56,10 +56,6 @@
#include <sys/utsname.h>
#include <unistd.h>
-#ifdef FONTCONFIG_ENABLED
-#include "fontconfig-so_wrap.h"
-#endif
-
void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) {
const char *message_programs[] = { "zenity", "kdialog", "Xdialog", "xmessage" };
@@ -128,6 +124,8 @@ void OS_LinuxBSD::initialize() {
crash_handler.initialize();
OS_Unix::initialize_core();
+
+ system_dir_desktop_cache = get_system_dir(SYSTEM_DIR_DESKTOP);
}
void OS_LinuxBSD::initialize_joypads() {
@@ -246,6 +244,10 @@ String OS_LinuxBSD::get_version() const {
}
Vector<String> OS_LinuxBSD::get_video_adapter_driver_info() const {
+ if (RenderingServer::get_singleton()->get_rendering_device() == nullptr) {
+ return Vector<String>();
+ }
+
const String rendering_device_name = RenderingServer::get_singleton()->get_rendering_device()->get_device_name(); // e.g. `NVIDIA GeForce GTX 970`
const String rendering_device_vendor = RenderingServer::get_singleton()->get_rendering_device()->get_device_vendor_name(); // e.g. `NVIDIA`
const String card_name = rendering_device_name.trim_prefix(rendering_device_vendor).strip_edges(); // -> `GeForce GTX 970`
@@ -477,7 +479,16 @@ Error OS_LinuxBSD::shell_open(String p_uri) {
}
bool OS_LinuxBSD::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "pc";
+#ifdef FONTCONFIG_ENABLED
+ if (p_feature == "system_fonts") {
+ return font_config_initialized;
+ }
+#endif
+ if (p_feature == "pc") {
+ return true;
+ }
+
+ return false;
}
uint64_t OS_LinuxBSD::get_embedded_pck_offset() const {
@@ -570,15 +581,9 @@ Vector<String> OS_LinuxBSD::get_system_fonts() const {
if (!font_config_initialized) {
ERR_FAIL_V_MSG(Vector<String>(), "Unable to load fontconfig, system font support is disabled.");
}
+
HashSet<String> font_names;
Vector<String> ret;
-
- FcConfig *config = FcInitLoadConfigAndFonts();
- ERR_FAIL_COND_V(!config, ret);
-
- FcObjectSet *object_set = FcObjectSetBuild(FC_FAMILY, nullptr);
- ERR_FAIL_COND_V(!object_set, ret);
-
static const char *allowed_formats[] = { "TrueType", "CFF" };
for (size_t i = 0; i < sizeof(allowed_formats) / sizeof(const char *); i++) {
FcPattern *pattern = FcPatternCreate();
@@ -601,8 +606,6 @@ Vector<String> OS_LinuxBSD::get_system_fonts() const {
}
FcPatternDestroy(pattern);
}
- FcObjectSetDestroy(object_set);
- FcConfigDestroy(config);
for (const String &E : font_names) {
ret.push_back(E);
@@ -613,25 +616,122 @@ Vector<String> OS_LinuxBSD::get_system_fonts() const {
#endif
}
-String OS_LinuxBSD::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
+#ifdef FONTCONFIG_ENABLED
+int OS_LinuxBSD::_weight_to_fc(int p_weight) const {
+ if (p_weight < 150) {
+ return FC_WEIGHT_THIN;
+ } else if (p_weight < 250) {
+ return FC_WEIGHT_EXTRALIGHT;
+ } else if (p_weight < 325) {
+ return FC_WEIGHT_LIGHT;
+ } else if (p_weight < 375) {
+ return FC_WEIGHT_DEMILIGHT;
+ } else if (p_weight < 390) {
+ return FC_WEIGHT_BOOK;
+ } else if (p_weight < 450) {
+ return FC_WEIGHT_REGULAR;
+ } else if (p_weight < 550) {
+ return FC_WEIGHT_MEDIUM;
+ } else if (p_weight < 650) {
+ return FC_WEIGHT_DEMIBOLD;
+ } else if (p_weight < 750) {
+ return FC_WEIGHT_BOLD;
+ } else if (p_weight < 850) {
+ return FC_WEIGHT_EXTRABOLD;
+ } else if (p_weight < 925) {
+ return FC_WEIGHT_BLACK;
+ } else {
+ return FC_WEIGHT_EXTRABLACK;
+ }
+}
+
+int OS_LinuxBSD::_stretch_to_fc(int p_stretch) const {
+ if (p_stretch < 56) {
+ return FC_WIDTH_ULTRACONDENSED;
+ } else if (p_stretch < 69) {
+ return FC_WIDTH_EXTRACONDENSED;
+ } else if (p_stretch < 81) {
+ return FC_WIDTH_CONDENSED;
+ } else if (p_stretch < 93) {
+ return FC_WIDTH_SEMICONDENSED;
+ } else if (p_stretch < 106) {
+ return FC_WIDTH_NORMAL;
+ } else if (p_stretch < 137) {
+ return FC_WIDTH_SEMIEXPANDED;
+ } else if (p_stretch < 144) {
+ return FC_WIDTH_EXPANDED;
+ } else if (p_stretch < 162) {
+ return FC_WIDTH_EXTRAEXPANDED;
+ } else {
+ return FC_WIDTH_ULTRAEXPANDED;
+ }
+}
+#endif // FONTCONFIG_ENABLED
+
+Vector<String> OS_LinuxBSD::get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale, const String &p_script, int p_weight, int p_stretch, bool p_italic) const {
#ifdef FONTCONFIG_ENABLED
if (!font_config_initialized) {
- ERR_FAIL_V_MSG(String(), "Unable to load fontconfig, system font support is disabled.");
+ ERR_FAIL_V_MSG(Vector<String>(), "Unable to load fontconfig, system font support is disabled.");
}
- String ret;
+ Vector<String> ret;
+ FcPattern *pattern = FcPatternCreate();
+ if (pattern) {
+ FcPatternAddString(pattern, FC_FAMILY, reinterpret_cast<const FcChar8 *>(p_font_name.utf8().get_data()));
+ FcPatternAddInteger(pattern, FC_WEIGHT, _weight_to_fc(p_weight));
+ FcPatternAddInteger(pattern, FC_WIDTH, _stretch_to_fc(p_stretch));
+ FcPatternAddInteger(pattern, FC_SLANT, p_italic ? FC_SLANT_ITALIC : FC_SLANT_ROMAN);
+
+ FcCharSet *char_set = FcCharSetCreate();
+ for (int i = 0; i < p_text.size(); i++) {
+ FcCharSetAddChar(char_set, p_text[i]);
+ }
+ FcPatternAddCharSet(pattern, FC_CHARSET, char_set);
- FcConfig *config = FcInitLoadConfigAndFonts();
- ERR_FAIL_COND_V(!config, ret);
+ FcLangSet *lang_set = FcLangSetCreate();
+ FcLangSetAdd(lang_set, reinterpret_cast<const FcChar8 *>(p_locale.utf8().get_data()));
+ FcPatternAddLangSet(pattern, FC_LANG, lang_set);
- FcObjectSet *object_set = FcObjectSetBuild(FC_FAMILY, FC_FILE, nullptr);
- ERR_FAIL_COND_V(!object_set, ret);
+ FcConfigSubstitute(0, pattern, FcMatchPattern);
+ FcDefaultSubstitute(pattern);
+ FcResult result;
+ FcPattern *match = FcFontMatch(0, pattern, &result);
+ if (match) {
+ char *file_name = nullptr;
+ if (FcPatternGetString(match, FC_FILE, 0, reinterpret_cast<FcChar8 **>(&file_name)) == FcResultMatch) {
+ if (file_name) {
+ ret.push_back(String::utf8(file_name));
+ }
+ }
+ FcPatternDestroy(match);
+ }
+ FcPatternDestroy(pattern);
+ FcCharSetDestroy(char_set);
+ FcLangSetDestroy(lang_set);
+ }
+
+ return ret;
+#else
+ ERR_FAIL_V_MSG(Vector<String>(), "Godot was compiled without fontconfig, system font support is disabled.");
+#endif
+}
+
+String OS_LinuxBSD::get_system_font_path(const String &p_font_name, int p_weight, int p_stretch, bool p_italic) const {
+#ifdef FONTCONFIG_ENABLED
+ if (!font_config_initialized) {
+ ERR_FAIL_V_MSG(String(), "Unable to load fontconfig, system font support is disabled.");
+ }
+
+ String ret;
FcPattern *pattern = FcPatternCreate();
if (pattern) {
+ bool allow_substitutes = (p_font_name.to_lower() == "sans-serif") || (p_font_name.to_lower() == "serif") || (p_font_name.to_lower() == "monospace") || (p_font_name.to_lower() == "cursive") || (p_font_name.to_lower() == "fantasy");
+
FcPatternAddBool(pattern, FC_SCALABLE, FcTrue);
FcPatternAddString(pattern, FC_FAMILY, reinterpret_cast<const FcChar8 *>(p_font_name.utf8().get_data()));
- FcPatternAddInteger(pattern, FC_WEIGHT, p_bold ? FC_WEIGHT_BOLD : FC_WEIGHT_NORMAL);
+ FcPatternAddInteger(pattern, FC_WEIGHT, _weight_to_fc(p_weight));
+ FcPatternAddInteger(pattern, FC_WIDTH, _stretch_to_fc(p_stretch));
FcPatternAddInteger(pattern, FC_SLANT, p_italic ? FC_SLANT_ITALIC : FC_SLANT_ROMAN);
FcConfigSubstitute(0, pattern, FcMatchPattern);
@@ -640,6 +740,17 @@ String OS_LinuxBSD::get_system_font_path(const String &p_font_name, bool p_bold,
FcResult result;
FcPattern *match = FcFontMatch(0, pattern, &result);
if (match) {
+ if (!allow_substitutes) {
+ char *family_name = nullptr;
+ if (FcPatternGetString(match, FC_FAMILY, 0, reinterpret_cast<FcChar8 **>(&family_name)) == FcResultMatch) {
+ if (family_name && String::utf8(family_name).to_lower() != p_font_name.to_lower()) {
+ FcPatternDestroy(match);
+ FcPatternDestroy(pattern);
+
+ return String();
+ }
+ }
+ }
char *file_name = nullptr;
if (FcPatternGetString(match, FC_FILE, 0, reinterpret_cast<FcChar8 **>(&file_name)) == FcResultMatch) {
if (file_name) {
@@ -651,8 +762,6 @@ String OS_LinuxBSD::get_system_font_path(const String &p_font_name, bool p_bold,
}
FcPatternDestroy(pattern);
}
- FcObjectSetDestroy(object_set);
- FcConfigDestroy(config);
return ret;
#else
@@ -706,6 +815,10 @@ String OS_LinuxBSD::get_cache_path() const {
}
String OS_LinuxBSD::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
+ if (p_dir == SYSTEM_DIR_DESKTOP && !system_dir_desktop_cache.is_empty()) {
+ return system_dir_desktop_cache;
+ }
+
String xdgparam;
switch (p_dir) {
@@ -714,31 +827,24 @@ String OS_LinuxBSD::get_system_dir(SystemDir p_dir, bool p_shared_storage) const
} break;
case SYSTEM_DIR_DCIM: {
xdgparam = "PICTURES";
-
} break;
case SYSTEM_DIR_DOCUMENTS: {
xdgparam = "DOCUMENTS";
-
} break;
case SYSTEM_DIR_DOWNLOADS: {
xdgparam = "DOWNLOAD";
-
} break;
case SYSTEM_DIR_MOVIES: {
xdgparam = "VIDEOS";
-
} break;
case SYSTEM_DIR_MUSIC: {
xdgparam = "MUSIC";
-
} break;
case SYSTEM_DIR_PICTURES: {
xdgparam = "PICTURES";
-
} break;
case SYSTEM_DIR_RINGTONES: {
xdgparam = "MUSIC";
-
} break;
}
@@ -981,5 +1087,26 @@ OS_LinuxBSD::OS_LinuxBSD() {
int dylibloader_verbose = 0;
#endif
font_config_initialized = (initialize_fontconfig(dylibloader_verbose) == 0);
+ if (font_config_initialized) {
+ config = FcInitLoadConfigAndFonts();
+ if (!config) {
+ font_config_initialized = false;
+ }
+ object_set = FcObjectSetBuild(FC_FAMILY, FC_FILE, nullptr);
+ if (!object_set) {
+ font_config_initialized = false;
+ }
+ }
+#endif // FONTCONFIG_ENABLED
+}
+
+OS_LinuxBSD::~OS_LinuxBSD() {
+#ifdef FONTCONFIG_ENABLED
+ if (object_set) {
+ FcObjectSetDestroy(object_set);
+ }
+ if (config) {
+ FcConfigDestroy(config);
+ }
#endif // FONTCONFIG_ENABLED
}
diff --git a/platform/linuxbsd/os_linuxbsd.h b/platform/linuxbsd/os_linuxbsd.h
index aea04c1363..bf469af568 100644
--- a/platform/linuxbsd/os_linuxbsd.h
+++ b/platform/linuxbsd/os_linuxbsd.h
@@ -40,11 +40,20 @@
#include "joypad_linux.h"
#include "servers/audio_server.h"
+#ifdef FONTCONFIG_ENABLED
+#include "fontconfig-so_wrap.h"
+#endif
+
class OS_LinuxBSD : public OS_Unix {
virtual void delete_main_loop() override;
#ifdef FONTCONFIG_ENABLED
bool font_config_initialized = false;
+ FcConfig *config = nullptr;
+ FcObjectSet *object_set = nullptr;
+
+ int _weight_to_fc(int p_weight) const;
+ int _stretch_to_fc(int p_stretch) const;
#endif
#ifdef JOYDEV_ENABLED
@@ -72,6 +81,8 @@ class OS_LinuxBSD : public OS_Unix {
Vector<String> lspci_device_filter(Vector<String> vendor_device_id_mapping, String class_suffix, String check_column, String whitelist) const;
Vector<String> lspci_get_device_value(Vector<String> vendor_device_id_mapping, String check_column, String blacklist) const;
+ String system_dir_desktop_cache;
+
protected:
virtual void initialize() override;
virtual void finalize() override;
@@ -92,7 +103,8 @@ public:
virtual uint64_t get_embedded_pck_offset() const override;
virtual Vector<String> get_system_fonts() const override;
- virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const override;
+ virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
+ virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
virtual String get_config_path() const override;
virtual String get_data_path() const override;
@@ -117,6 +129,7 @@ public:
virtual Error move_to_trash(const String &p_path) override;
OS_LinuxBSD();
+ ~OS_LinuxBSD();
};
#endif // OS_LINUXBSD_H
diff --git a/platform/linuxbsd/platform_config.h b/platform/linuxbsd/platform_config.h
index 3c05c67444..79e15e2512 100644
--- a/platform/linuxbsd/platform_config.h
+++ b/platform/linuxbsd/platform_config.h
@@ -44,4 +44,4 @@
#endif
#endif
-#define OPENGL_INCLUDE_H "thirdparty/glad/glad/glad.h"
+#define OPENGL_INCLUDE_H "thirdparty/glad/glad/gl.h"
diff --git a/platform/linuxbsd/tts_linux.cpp b/platform/linuxbsd/tts_linux.cpp
index aea1183d3d..8fa708aad6 100644
--- a/platform/linuxbsd/tts_linux.cpp
+++ b/platform/linuxbsd/tts_linux.cpp
@@ -117,13 +117,12 @@ void TTS_Linux::speech_event_callback(size_t p_msg_id, size_t p_client_id, SPDNo
free_spd_voices(voices);
}
PackedInt32Array breaks = TS->string_get_word_breaks(message.text, language);
- int prev = 0;
- for (int i = 0; i < breaks.size(); i++) {
- text += message.text.substr(prev, breaks[i] - prev);
- text += "<mark name=\"" + String::num_int64(breaks[i], 10) + "\"/>";
- prev = breaks[i];
+ for (int i = 0; i < breaks.size(); i += 2) {
+ const int start = breaks[i];
+ const int end = breaks[i + 1];
+ text += message.text.substr(start, end - start + 1);
+ text += "<mark name=\"" + String::num_int64(end, 10) + "\"/>";
}
- text += message.text.substr(prev, -1);
spd_set_synthesis_voice(tts->synth, message.voice.utf8().get_data());
spd_set_volume(tts->synth, message.volume * 2 - 100);
diff --git a/platform/linuxbsd/x11/SCsub b/platform/linuxbsd/x11/SCsub
new file mode 100644
index 0000000000..8b2e2aabe4
--- /dev/null
+++ b/platform/linuxbsd/x11/SCsub
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+
+Import("env")
+
+source_files = [
+ "display_server_x11.cpp",
+ "key_mapping_x11.cpp",
+ "dynwrappers/xlib-so_wrap.c",
+ "dynwrappers/xcursor-so_wrap.c",
+ "dynwrappers/xinerama-so_wrap.c",
+ "dynwrappers/xinput2-so_wrap.c",
+ "dynwrappers/xrandr-so_wrap.c",
+ "dynwrappers/xrender-so_wrap.c",
+ "dynwrappers/xext-so_wrap.c",
+]
+
+if env["vulkan"]:
+ source_files.append("vulkan_context_x11.cpp")
+
+if env["opengl3"]:
+ env.Append(CPPDEFINES=["GLAD_GLX_NO_X11"])
+ source_files.append(["gl_manager_x11.cpp", "detect_prime_x11.cpp", "#thirdparty/glad/glx.c"])
+
+objects = []
+
+for source_file in source_files:
+ objects.append(env.Object(source_file))
+
+Return("objects")
diff --git a/platform/linuxbsd/detect_prime_x11.cpp b/platform/linuxbsd/x11/detect_prime_x11.cpp
index fb833ab5e6..0f756d10e2 100644
--- a/platform/linuxbsd/detect_prime_x11.cpp
+++ b/platform/linuxbsd/x11/detect_prime_x11.cpp
@@ -38,10 +38,10 @@
#include <stdlib.h>
-#include <GL/gl.h>
-#include <GL/glx.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
+#include "thirdparty/glad/glad/gl.h"
+#include "thirdparty/glad/glad/glx.h"
+
+#include "dynwrappers/xlib-so_wrap.h"
#include <cstring>
@@ -77,8 +77,6 @@ void create_context() {
Window x11_window;
GLXContext glx_context;
- GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte *)"glXCreateContextAttribsARB");
-
static int visual_attribs[] = {
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
@@ -90,6 +88,10 @@ void create_context() {
None
};
+ if (gladLoaderLoadGLX(x11_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(x11_display))) == 0) {
+ print_verbose("Unable to load GLX, GPU detection skipped.");
+ quick_exit(1);
+ }
int fbcount;
GLXFBConfig fbconfig = nullptr;
XVisualInfo *vi = nullptr;
@@ -101,7 +103,7 @@ void create_context() {
GLXFBConfig *fbc = glXChooseFBConfig(x11_display, DefaultScreen(x11_display), visual_attribs, &fbcount);
if (!fbc) {
- exit(1);
+ quick_exit(1);
}
vi = glXGetVisualFromFBConfig(x11_display, fbc[0]);
@@ -122,7 +124,7 @@ void create_context() {
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) {
- exit(1);
+ quick_exit(1);
}
glXMakeCurrent(x11_display, x11_window, glx_context);
@@ -189,8 +191,15 @@ int detect_prime() {
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);
@@ -208,7 +217,10 @@ int detect_prime() {
print_verbose("Couldn't write vendor/renderer string.");
}
close(fdset[1]);
- exit(0);
+
+ // 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);
}
}
diff --git a/platform/linuxbsd/detect_prime_x11.h b/platform/linuxbsd/x11/detect_prime_x11.h
index 7eb7064cc5..7eb7064cc5 100644
--- a/platform/linuxbsd/detect_prime_x11.h
+++ b/platform/linuxbsd/x11/detect_prime_x11.h
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index e78467beff..57f125a754 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -58,11 +58,6 @@
#include <sys/types.h>
#include <unistd.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-#include <X11/extensions/Xinerama.h>
-#include <X11/extensions/shape.h>
-
// ICCCM
#define WM_NormalState 1L // window normal state
#define WM_IconicState 3L // window minimized
@@ -126,7 +121,7 @@ bool DisplayServerX11::has_feature(Feature p_feature) const {
case FEATURE_WINDOW_TRANSPARENCY:
//case FEATURE_HIDPI:
case FEATURE_ICON:
- case FEATURE_NATIVE_ICON:
+ //case FEATURE_NATIVE_ICON:
case FEATURE_SWAP_BUFFERS:
#ifdef DBUS_ENABLED
case FEATURE_KEEP_SCREEN_ON:
@@ -376,10 +371,18 @@ void DisplayServerX11::mouse_set_mode(MouseMode p_mode) {
}
// The only modes that show a cursor are VISIBLE and CONFINED
- bool showCursor = (p_mode == MOUSE_MODE_VISIBLE || p_mode == MOUSE_MODE_CONFINED);
+ bool show_cursor = (p_mode == MOUSE_MODE_VISIBLE || p_mode == MOUSE_MODE_CONFINED);
+ bool previously_shown = (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED);
+
+ if (show_cursor && !previously_shown) {
+ WindowID window_id = get_window_at_screen_position(mouse_get_position());
+ if (window_id != INVALID_WINDOW_ID) {
+ _send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_ENTER);
+ }
+ }
for (const KeyValue<WindowID, WindowData> &E : windows) {
- if (showCursor) {
+ if (show_cursor) {
XDefineCursor(x11_display, E.value.x11_window, cursors[current_cursor]); // show cursor
} else {
XDefineCursor(x11_display, E.value.x11_window, null_cursor); // hide cursor
@@ -1309,6 +1312,14 @@ int64_t DisplayServerX11::window_get_native_handle(HandleType p_handle_type, Win
case WINDOW_VIEW: {
return 0; // Not supported.
}
+#ifdef GLES3_ENABLED
+ case OPENGL_CONTEXT: {
+ if (gl_manager) {
+ return (int64_t)gl_manager->get_glx_context(p_window);
+ }
+ return 0;
+ }
+#endif
default: {
return 0;
}
@@ -1386,8 +1397,8 @@ void DisplayServerX11::window_set_mouse_passthrough(const Vector<Vector2> &p_reg
XRectangle rect;
rect.x = 0;
rect.y = 0;
- rect.width = window_get_real_size(p_window).x;
- rect.height = window_get_real_size(p_window).y;
+ rect.width = window_get_size_with_decorations(p_window).x;
+ rect.height = window_get_size_with_decorations(p_window).y;
XUnionRectWithRegion(&rect, region, region);
} else {
XPoint *points = (XPoint *)memalloc(sizeof(XPoint) * p_region.size());
@@ -1571,7 +1582,7 @@ void DisplayServerX11::_update_size_hints(WindowID p_window) {
xsh->width = wd.size.width;
xsh->height = wd.size.height;
- if (window_mode == WINDOW_MODE_FULLSCREEN) {
+ if (window_mode == WINDOW_MODE_FULLSCREEN || window_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {
// Do not set any other hints to prevent the window manager from ignoring the fullscreen flags
} else if (window_get_flag(WINDOW_FLAG_RESIZE_DISABLED, p_window)) {
// If resizing is disabled, use the forced size
@@ -1607,6 +1618,40 @@ Point2i DisplayServerX11::window_get_position(WindowID p_window) const {
return wd.position;
}
+Point2i DisplayServerX11::window_get_position_with_decorations(WindowID p_window) const {
+ _THREAD_SAFE_METHOD_
+
+ ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
+ const WindowData &wd = windows[p_window];
+
+ if (wd.fullscreen) {
+ return wd.position;
+ }
+
+ XWindowAttributes xwa;
+ XSync(x11_display, False);
+ XGetWindowAttributes(x11_display, wd.x11_window, &xwa);
+ int x = wd.position.x;
+ int y = wd.position.y;
+ Atom prop = XInternAtom(x11_display, "_NET_FRAME_EXTENTS", True);
+ if (prop != None) {
+ Atom type;
+ int format;
+ unsigned long len;
+ unsigned long remaining;
+ unsigned char *data = nullptr;
+ if (XGetWindowProperty(x11_display, wd.x11_window, prop, 0, 4, False, AnyPropertyType, &type, &format, &len, &remaining, &data) == Success) {
+ if (format == 32 && len == 4 && data) {
+ long *extents = (long *)data;
+ x -= extents[0]; // left
+ y -= extents[2]; // top
+ }
+ XFree(data);
+ }
+ }
+ return Size2i(x, y);
+}
+
void DisplayServerX11::window_set_position(const Point2i &p_position, WindowID p_window) {
_THREAD_SAFE_METHOD_
@@ -1751,12 +1796,16 @@ Size2i DisplayServerX11::window_get_size(WindowID p_window) const {
return wd.size;
}
-Size2i DisplayServerX11::window_get_real_size(WindowID p_window) const {
+Size2i DisplayServerX11::window_get_size_with_decorations(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
const WindowData &wd = windows[p_window];
+ if (wd.fullscreen) {
+ return wd.size;
+ }
+
XWindowAttributes xwa;
XSync(x11_display, False);
XGetWindowAttributes(x11_display, wd.x11_window, &xwa);
@@ -1938,7 +1987,7 @@ void DisplayServerX11::_validate_mode_on_map(WindowID p_window) {
// Check if we applied any window modes that didn't take effect while unmapped
const WindowData &wd = windows[p_window];
if (wd.fullscreen && !_window_fullscreen_check(p_window)) {
- _set_wm_fullscreen(p_window, true);
+ _set_wm_fullscreen(p_window, true, wd.exclusive_fullscreen);
} else if (wd.maximized && !_window_maximize_check(p_window, "_NET_WM_STATE")) {
_set_wm_maximized(p_window, true);
} else if (wd.minimized && !_window_minimize_check(p_window)) {
@@ -2013,7 +2062,7 @@ void DisplayServerX11::_set_wm_minimized(WindowID p_window, bool p_enabled) {
wd.minimized = p_enabled;
}
-void DisplayServerX11::_set_wm_fullscreen(WindowID p_window, bool p_enabled) {
+void DisplayServerX11::_set_wm_fullscreen(WindowID p_window, bool p_enabled, bool p_exclusive) {
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
@@ -2052,7 +2101,14 @@ void DisplayServerX11::_set_wm_fullscreen(WindowID p_window, bool p_enabled) {
// set bypass compositor hint
Atom bypass_compositor = XInternAtom(x11_display, "_NET_WM_BYPASS_COMPOSITOR", False);
- unsigned long compositing_disable_on = p_enabled ? 1 : 0;
+ unsigned long compositing_disable_on = 0; // Use default.
+ if (p_enabled) {
+ if (p_exclusive) {
+ compositing_disable_on = 1; // Force composition OFF to reduce overhead.
+ } else {
+ compositing_disable_on = 2; // Force composition ON to allow popup windows.
+ }
+ }
if (bypass_compositor != None) {
XChangeProperty(x11_display, wd.x11_window, bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&compositing_disable_on, 1);
}
@@ -2098,8 +2154,9 @@ void DisplayServerX11::window_set_mode(WindowMode p_mode, WindowID p_window) {
case WINDOW_MODE_FULLSCREEN: {
//Remove full-screen
wd.fullscreen = false;
+ wd.exclusive_fullscreen = false;
- _set_wm_fullscreen(p_window, false);
+ _set_wm_fullscreen(p_window, false, false);
//un-maximize required for always on top
bool on_top = window_get_flag(WINDOW_FLAG_ALWAYS_ON_TOP, p_window);
@@ -2132,7 +2189,13 @@ void DisplayServerX11::window_set_mode(WindowMode p_mode, WindowID p_window) {
}
wd.fullscreen = true;
- _set_wm_fullscreen(p_window, true);
+ if (p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {
+ wd.exclusive_fullscreen = true;
+ _set_wm_fullscreen(p_window, true, true);
+ } else {
+ wd.exclusive_fullscreen = false;
+ _set_wm_fullscreen(p_window, true, false);
+ }
} break;
case WINDOW_MODE_MAXIMIZED: {
_set_wm_maximized(p_window, true);
@@ -2147,7 +2210,11 @@ DisplayServer::WindowMode DisplayServerX11::window_get_mode(WindowID p_window) c
const WindowData &wd = windows[p_window];
if (wd.fullscreen) { //if fullscreen, it's not in another mode
- return WINDOW_MODE_FULLSCREEN;
+ if (wd.exclusive_fullscreen) {
+ return WINDOW_MODE_EXCLUSIVE_FULLSCREEN;
+ } else {
+ return WINDOW_MODE_FULLSCREEN;
+ }
}
// Test maximized.
@@ -3414,7 +3481,7 @@ bool DisplayServerX11::mouse_process_popups() {
XWindowAttributes root_attrs;
XGetWindowAttributes(x11_display, root, &root_attrs);
Vector2i pos = Vector2i(root_attrs.x + root_x, root_attrs.y + root_y);
- if ((pos != last_mouse_monitor_pos) || (mask != last_mouse_monitor_mask)) {
+ if (mask != last_mouse_monitor_mask) {
if (((mask & Button1Mask) || (mask & Button2Mask) || (mask & Button3Mask) || (mask & Button4Mask) || (mask & Button5Mask))) {
List<WindowID>::Element *C = nullptr;
List<WindowID>::Element *E = popup_list.back();
@@ -3440,7 +3507,6 @@ bool DisplayServerX11::mouse_process_popups() {
}
}
last_mouse_monitor_mask = mask;
- last_mouse_monitor_pos = pos;
}
}
return closed;
@@ -3919,30 +3985,41 @@ void DisplayServerX11::process_events() {
} else {
DEBUG_LOG_X11("[%u] ButtonRelease window=%lu (%u), button_index=%u \n", frame, event.xbutton.window, window_id, mb->get_button_index());
- if (!wd.focused) {
+ WindowID window_id_other = INVALID_WINDOW_ID;
+ Window wd_other_x11_window;
+ if (wd.focused) {
+ // Handle cases where an unfocused popup is open that needs to receive button-up events.
+ WindowID popup_id = _get_focused_window_or_popup();
+ if (popup_id != INVALID_WINDOW_ID && popup_id != window_id) {
+ window_id_other = popup_id;
+ wd_other_x11_window = windows[popup_id].x11_window;
+ }
+ } else {
// Propagate the event to the focused window,
// because it's received only on the topmost window.
// Note: This is needed for drag & drop to work between windows,
// because the engine expects events to keep being processed
// on the same window dragging started.
for (const KeyValue<WindowID, WindowData> &E : windows) {
- const WindowData &wd_other = E.value;
- WindowID window_id_other = E.key;
- if (wd_other.focused) {
- if (window_id_other != window_id) {
- int x, y;
- Window child;
- XTranslateCoordinates(x11_display, wd.x11_window, wd_other.x11_window, event.xbutton.x, event.xbutton.y, &x, &y, &child);
-
- mb->set_window_id(window_id_other);
- mb->set_position(Vector2(x, y));
- mb->set_global_position(mb->get_position());
- Input::get_singleton()->parse_input_event(mb);
+ if (E.value.focused) {
+ if (E.key != window_id) {
+ window_id_other = E.key;
+ wd_other_x11_window = E.value.x11_window;
}
break;
}
}
}
+
+ if (window_id_other != INVALID_WINDOW_ID) {
+ int x, y;
+ Window child;
+ XTranslateCoordinates(x11_display, wd.x11_window, wd_other_x11_window, event.xbutton.x, event.xbutton.y, &x, &y, &child);
+
+ mb->set_window_id(window_id_other);
+ mb->set_position(Vector2(x, y));
+ mb->set_global_position(mb->get_position());
+ }
}
Input::get_singleton()->parse_input_event(mb);
@@ -4113,10 +4190,10 @@ void DisplayServerX11::process_events() {
if (event.xselection.target == requested) {
Property p = _read_property(x11_display, windows[window_id].x11_window, XInternAtom(x11_display, "PRIMARY", 0));
- Vector<String> files = String((char *)p.data).split("\n", false);
+ Vector<String> files = String((char *)p.data).split("\r\n", false);
XFree(p.data);
for (int i = 0; i < files.size(); i++) {
- files.write[i] = files[i].replace("file://", "").uri_decode().strip_edges();
+ files.write[i] = files[i].replace("file://", "").uri_decode();
}
if (!windows[window_id].drop_files_callback.is_null()) {
@@ -4399,7 +4476,7 @@ void DisplayServerX11::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mo
#if defined(GLES3_ENABLED)
if (gl_manager) {
- gl_manager->set_use_vsync(p_vsync_mode == DisplayServer::VSYNC_ENABLED);
+ gl_manager->set_use_vsync(p_vsync_mode != DisplayServer::VSYNC_DISABLED);
}
#endif
}
@@ -4432,13 +4509,24 @@ Vector<String> DisplayServerX11::get_rendering_drivers_func() {
return drivers;
}
-DisplayServer *DisplayServerX11::create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
- DisplayServer *ds = memnew(DisplayServerX11(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
+DisplayServer *DisplayServerX11::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, Error &r_error) {
+ DisplayServer *ds = memnew(DisplayServerX11(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, r_error));
if (r_error != OK) {
- OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan or OpenGL versions.\n"
- "Please update your drivers or if you have a very old or integrated GPU, upgrade it.\n"
- "If you have updated your graphics drivers recently, try rebooting.",
- "Unable to initialize Video driver");
+ if (p_rendering_driver == "vulkan") {
+ String executable_name = OS::get_singleton()->get_executable_path().get_file();
+ OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n"
+ "Please try updating your GPU driver or try using the OpenGL 3 driver.\n"
+ "You can enable the OpenGL 3 driver by starting the engine from the\n"
+ "command line with the command:\n'./" +
+ executable_name + " --rendering-driver opengl3'.\n "
+ "If you have updated your graphics drivers recently, try rebooting.",
+ "Unable to initialize Video driver");
+ } else {
+ OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n"
+ "Please try updating your GPU driver.\n"
+ "If you have updated your graphics drivers recently, try rebooting.",
+ "Unable to initialize Video driver");
+ }
}
return ds;
}
@@ -4649,6 +4737,7 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V
if (gl_manager) {
Error err = gl_manager->window_create(id, wd.x11_window, x11_display, p_rect.size.width, p_rect.size.height);
ERR_FAIL_COND_V_MSG(err != OK, INVALID_WINDOW_ID, "Can't create an OpenGL window");
+ window_set_vsync_mode(p_vsync_mode, id);
}
#endif
@@ -4682,7 +4771,47 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V
return id;
}
-DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
+#ifdef DEBUG_ENABLED
+ int dylibloader_verbose = 1;
+#else
+ int dylibloader_verbose = 0;
+#endif
+ if (initialize_xlib(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xlib dynamically.");
+ }
+
+ if (initialize_xcursor(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load XCursor dynamically.");
+ }
+
+ if (initialize_xext(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xext dynamically.");
+ }
+
+ if (initialize_xinerama(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xinerama dynamically.");
+ }
+
+ if (initialize_xrandr(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xrandr dynamically.");
+ }
+
+ if (initialize_xrender(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xrender dynamically.");
+ }
+
+ if (initialize_xinput2(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xinput2 dynamically.");
+ }
+
Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events);
r_error = OK;
@@ -4883,7 +5012,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
gl_manager = memnew(GLManager_X11(p_resolution, opengl_api_type));
- if (gl_manager->initialize() != OK) {
+ if (gl_manager->initialize(x11_display) != OK) {
memdelete(gl_manager);
gl_manager = nullptr;
r_error = ERR_UNAVAILABLE;
@@ -4909,6 +5038,11 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
Point2i window_position(
(screen_get_size(0).width - p_resolution.width) / 2,
(screen_get_size(0).height - p_resolution.height) / 2);
+
+ if (p_position != nullptr) {
+ window_position = *p_position;
+ }
+
WindowID main_window = _create_window(p_mode, p_vsync_mode, p_flags, Rect2i(window_position, p_resolution));
if (main_window == INVALID_WINDOW_ID) {
r_error = ERR_CANT_CREATE;
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/x11/display_server_x11.h
index 5723abc751..2578ca06fd 100644
--- a/platform/linuxbsd/display_server_x11.h
+++ b/platform/linuxbsd/x11/display_server_x11.h
@@ -47,7 +47,7 @@
#include "servers/rendering_server.h"
#if defined(SPEECHD_ENABLED)
-#include "tts_linux.h"
+#include "../tts_linux.h"
#endif
#if defined(GLES3_ENABLED)
@@ -56,20 +56,28 @@
#if defined(VULKAN_ENABLED)
#include "drivers/vulkan/rendering_device_vulkan.h"
-#include "platform/linuxbsd/vulkan_context_x11.h"
+#include "vulkan_context_x11.h"
#endif
#if defined(DBUS_ENABLED)
-#include "freedesktop_portal_desktop.h"
-#include "freedesktop_screensaver.h"
+#include "../freedesktop_portal_desktop.h"
+#include "../freedesktop_screensaver.h"
#endif
-#include <X11/Xcursor/Xcursor.h>
+#include <X11/Xatom.h>
#include <X11/Xlib.h>
-#include <X11/extensions/XInput2.h>
-#include <X11/extensions/Xrandr.h>
+#include <X11/Xutil.h>
#include <X11/keysym.h>
+#include "dynwrappers/xlib-so_wrap.h"
+
+#include "dynwrappers/xcursor-so_wrap.h"
+#include "dynwrappers/xext-so_wrap.h"
+#include "dynwrappers/xinerama-so_wrap.h"
+#include "dynwrappers/xinput2-so_wrap.h"
+#include "dynwrappers/xrandr-so_wrap.h"
+#include "dynwrappers/xrender-so_wrap.h"
+
typedef struct _xrr_monitor_info {
Atom name;
Bool primary = false;
@@ -151,6 +159,7 @@ class DisplayServerX11 : public DisplayServer {
//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;
@@ -169,7 +178,6 @@ class DisplayServerX11 : public DisplayServer {
HashMap<WindowID, WindowData> windows;
unsigned int last_mouse_monitor_mask = 0;
- Vector2i last_mouse_monitor_pos;
uint64_t time_since_popup = 0;
List<WindowID> popup_list;
@@ -276,7 +284,7 @@ class DisplayServerX11 : public DisplayServer {
bool _window_minimize_check(WindowID p_window) const;
void _validate_mode_on_map(WindowID p_window);
void _update_size_hints(WindowID p_window);
- void _set_wm_fullscreen(WindowID p_window, bool p_enabled);
+ 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);
@@ -385,6 +393,7 @@ public:
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;
@@ -398,7 +407,7 @@ public:
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_real_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;
@@ -444,12 +453,12 @@ public:
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_resolution, Error &r_error);
+ 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, 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_resolution, Error &r_error);
+ DisplayServerX11(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
~DisplayServerX11();
};
diff --git a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c
new file mode 100644
index 0000000000..7042a60d47
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c
@@ -0,0 +1,676 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:48:06
+// flags: ./generate-wrapper.py --include /usr/include/X11/Xcursor/Xcursor.h --sys-include <X11/Xcursor/Xcursor.h> --soname libXcursor.so.1 --init-name xcursor --output-header xcursor-so_wrap.h --output-implementation xcursor-so_wrap.c
+//
+// NOTE: Generated from Xcursor 1.2.0.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, but absent in libXcursor.so.1, were removed.
+#include <stdint.h>
+
+#define XcursorImageCreate XcursorImageCreate_dylibloader_orig_xcursor
+#define XcursorImageDestroy XcursorImageDestroy_dylibloader_orig_xcursor
+#define XcursorImagesCreate XcursorImagesCreate_dylibloader_orig_xcursor
+#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_orig_xcursor
+#define XcursorImagesSetName XcursorImagesSetName_dylibloader_orig_xcursor
+#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_orig_xcursor
+#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_orig_xcursor
+#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_orig_xcursor
+#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_orig_xcursor
+#define XcursorAnimateNext XcursorAnimateNext_dylibloader_orig_xcursor
+#define XcursorCommentCreate XcursorCommentCreate_dylibloader_orig_xcursor
+#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_orig_xcursor
+#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_orig_xcursor
+#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_orig_xcursor
+#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_orig_xcursor
+#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_orig_xcursor
+#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_orig_xcursor
+#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_orig_xcursor
+#define XcursorXcFileSave XcursorXcFileSave_dylibloader_orig_xcursor
+#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_orig_xcursor
+#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_orig_xcursor
+#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_orig_xcursor
+#define XcursorFileLoad XcursorFileLoad_dylibloader_orig_xcursor
+#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_orig_xcursor
+#define XcursorFileSave XcursorFileSave_dylibloader_orig_xcursor
+#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_orig_xcursor
+#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_orig_xcursor
+#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_orig_xcursor
+#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_orig_xcursor
+#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_orig_xcursor
+#define XcursorFilenameSave XcursorFilenameSave_dylibloader_orig_xcursor
+#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_orig_xcursor
+#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_orig_xcursor
+#define XcursorLibraryPath XcursorLibraryPath_dylibloader_orig_xcursor
+#define XcursorLibraryShape XcursorLibraryShape_dylibloader_orig_xcursor
+#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_orig_xcursor
+#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_orig_xcursor
+#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_orig_xcursor
+#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_orig_xcursor
+#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_orig_xcursor
+#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_orig_xcursor
+#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_orig_xcursor
+#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_orig_xcursor
+#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_orig_xcursor
+#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_orig_xcursor
+#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_orig_xcursor
+#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_orig_xcursor
+#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_orig_xcursor
+#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_orig_xcursor
+#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_orig_xcursor
+#define XcursorImageHash XcursorImageHash_dylibloader_orig_xcursor
+#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_orig_xcursor
+#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_orig_xcursor
+#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_orig_xcursor
+#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_orig_xcursor
+#define XcursorSetTheme XcursorSetTheme_dylibloader_orig_xcursor
+#define XcursorGetTheme XcursorGetTheme_dylibloader_orig_xcursor
+#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_orig_xcursor
+#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_orig_xcursor
+#include <X11/Xcursor/Xcursor.h>
+#undef XcursorImageCreate
+#undef XcursorImageDestroy
+#undef XcursorImagesCreate
+#undef XcursorImagesDestroy
+#undef XcursorImagesSetName
+#undef XcursorCursorsCreate
+#undef XcursorCursorsDestroy
+#undef XcursorAnimateCreate
+#undef XcursorAnimateDestroy
+#undef XcursorAnimateNext
+#undef XcursorCommentCreate
+#undef XcursorCommentDestroy
+#undef XcursorCommentsCreate
+#undef XcursorCommentsDestroy
+#undef XcursorXcFileLoadImage
+#undef XcursorXcFileLoadImages
+#undef XcursorXcFileLoadAllImages
+#undef XcursorXcFileLoad
+#undef XcursorXcFileSave
+#undef XcursorFileLoadImage
+#undef XcursorFileLoadImages
+#undef XcursorFileLoadAllImages
+#undef XcursorFileLoad
+#undef XcursorFileSaveImages
+#undef XcursorFileSave
+#undef XcursorFilenameLoadImage
+#undef XcursorFilenameLoadImages
+#undef XcursorFilenameLoadAllImages
+#undef XcursorFilenameLoad
+#undef XcursorFilenameSaveImages
+#undef XcursorFilenameSave
+#undef XcursorLibraryLoadImage
+#undef XcursorLibraryLoadImages
+#undef XcursorLibraryPath
+#undef XcursorLibraryShape
+#undef XcursorImageLoadCursor
+#undef XcursorImagesLoadCursors
+#undef XcursorImagesLoadCursor
+#undef XcursorFilenameLoadCursor
+#undef XcursorFilenameLoadCursors
+#undef XcursorLibraryLoadCursor
+#undef XcursorLibraryLoadCursors
+#undef XcursorShapeLoadImage
+#undef XcursorShapeLoadImages
+#undef XcursorShapeLoadCursor
+#undef XcursorShapeLoadCursors
+#undef XcursorTryShapeCursor
+#undef XcursorNoticeCreateBitmap
+#undef XcursorNoticePutBitmap
+#undef XcursorTryShapeBitmapCursor
+#undef XcursorImageHash
+#undef XcursorSupportsARGB
+#undef XcursorSupportsAnim
+#undef XcursorSetDefaultSize
+#undef XcursorGetDefaultSize
+#undef XcursorSetTheme
+#undef XcursorGetTheme
+#undef XcursorGetThemeCore
+#undef XcursorSetThemeCore
+#include <dlfcn.h>
+#include <stdio.h>
+XcursorImage* (*XcursorImageCreate_dylibloader_wrapper_xcursor)( int, int);
+void (*XcursorImageDestroy_dylibloader_wrapper_xcursor)( XcursorImage*);
+XcursorImages* (*XcursorImagesCreate_dylibloader_wrapper_xcursor)( int);
+void (*XcursorImagesDestroy_dylibloader_wrapper_xcursor)( XcursorImages*);
+void (*XcursorImagesSetName_dylibloader_wrapper_xcursor)( XcursorImages*,const char*);
+XcursorCursors* (*XcursorCursorsCreate_dylibloader_wrapper_xcursor)( Display*, int);
+void (*XcursorCursorsDestroy_dylibloader_wrapper_xcursor)( XcursorCursors*);
+XcursorAnimate* (*XcursorAnimateCreate_dylibloader_wrapper_xcursor)( XcursorCursors*);
+void (*XcursorAnimateDestroy_dylibloader_wrapper_xcursor)( XcursorAnimate*);
+Cursor (*XcursorAnimateNext_dylibloader_wrapper_xcursor)( XcursorAnimate*);
+XcursorComment* (*XcursorCommentCreate_dylibloader_wrapper_xcursor)( XcursorUInt, int);
+void (*XcursorCommentDestroy_dylibloader_wrapper_xcursor)( XcursorComment*);
+XcursorComments* (*XcursorCommentsCreate_dylibloader_wrapper_xcursor)( int);
+void (*XcursorCommentsDestroy_dylibloader_wrapper_xcursor)( XcursorComments*);
+XcursorImage* (*XcursorXcFileLoadImage_dylibloader_wrapper_xcursor)( XcursorFile*, int);
+XcursorImages* (*XcursorXcFileLoadImages_dylibloader_wrapper_xcursor)( XcursorFile*, int);
+XcursorImages* (*XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor)( XcursorFile*);
+XcursorBool (*XcursorXcFileLoad_dylibloader_wrapper_xcursor)( XcursorFile*, XcursorComments**, XcursorImages**);
+XcursorBool (*XcursorXcFileSave_dylibloader_wrapper_xcursor)( XcursorFile*,const XcursorComments*,const XcursorImages*);
+XcursorImage* (*XcursorFileLoadImage_dylibloader_wrapper_xcursor)( FILE*, int);
+XcursorImages* (*XcursorFileLoadImages_dylibloader_wrapper_xcursor)( FILE*, int);
+XcursorImages* (*XcursorFileLoadAllImages_dylibloader_wrapper_xcursor)( FILE*);
+XcursorBool (*XcursorFileLoad_dylibloader_wrapper_xcursor)( FILE*, XcursorComments**, XcursorImages**);
+XcursorBool (*XcursorFileSaveImages_dylibloader_wrapper_xcursor)( FILE*,const XcursorImages*);
+XcursorBool (*XcursorFileSave_dylibloader_wrapper_xcursor)( FILE*,const XcursorComments*,const XcursorImages*);
+XcursorImage* (*XcursorFilenameLoadImage_dylibloader_wrapper_xcursor)(const char*, int);
+XcursorImages* (*XcursorFilenameLoadImages_dylibloader_wrapper_xcursor)(const char*, int);
+XcursorImages* (*XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor)(const char*);
+XcursorBool (*XcursorFilenameLoad_dylibloader_wrapper_xcursor)(const char*, XcursorComments**, XcursorImages**);
+XcursorBool (*XcursorFilenameSaveImages_dylibloader_wrapper_xcursor)(const char*,const XcursorImages*);
+XcursorBool (*XcursorFilenameSave_dylibloader_wrapper_xcursor)(const char*,const XcursorComments*,const XcursorImages*);
+XcursorImage* (*XcursorLibraryLoadImage_dylibloader_wrapper_xcursor)(const char*,const char*, int);
+XcursorImages* (*XcursorLibraryLoadImages_dylibloader_wrapper_xcursor)(const char*,const char*, int);
+const char* (*XcursorLibraryPath_dylibloader_wrapper_xcursor)( void);
+int (*XcursorLibraryShape_dylibloader_wrapper_xcursor)(const char*);
+Cursor (*XcursorImageLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImage*);
+XcursorCursors* (*XcursorImagesLoadCursors_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
+Cursor (*XcursorImagesLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
+Cursor (*XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
+XcursorCursors* (*XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
+Cursor (*XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
+XcursorCursors* (*XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
+XcursorImage* (*XcursorShapeLoadImage_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
+XcursorImages* (*XcursorShapeLoadImages_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
+Cursor (*XcursorShapeLoadCursor_dylibloader_wrapper_xcursor)( Display*, unsigned int);
+XcursorCursors* (*XcursorShapeLoadCursors_dylibloader_wrapper_xcursor)( Display*, unsigned int);
+Cursor (*XcursorTryShapeCursor_dylibloader_wrapper_xcursor)( Display*, Font, Font, unsigned int, unsigned int,const XColor*,const XColor*);
+void (*XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor)( Display*, Pixmap, unsigned int, unsigned int);
+void (*XcursorNoticePutBitmap_dylibloader_wrapper_xcursor)( Display*, Drawable, XImage*);
+Cursor (*XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor)( Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
+void (*XcursorImageHash_dylibloader_wrapper_xcursor)( XImage*, unsigned char [16]);
+XcursorBool (*XcursorSupportsARGB_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorSupportsAnim_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorSetDefaultSize_dylibloader_wrapper_xcursor)( Display*, int);
+int (*XcursorGetDefaultSize_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorSetTheme_dylibloader_wrapper_xcursor)( Display*,const char*);
+char* (*XcursorGetTheme_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorGetThemeCore_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorSetThemeCore_dylibloader_wrapper_xcursor)( Display*, XcursorBool);
+int initialize_xcursor(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXcursor.so.1", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XcursorImageCreate
+ *(void **) (&XcursorImageCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImageDestroy
+ *(void **) (&XcursorImageDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesCreate
+ *(void **) (&XcursorImagesCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesDestroy
+ *(void **) (&XcursorImagesDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesSetName
+ *(void **) (&XcursorImagesSetName_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesSetName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCursorsCreate
+ *(void **) (&XcursorCursorsCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCursorsCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCursorsDestroy
+ *(void **) (&XcursorCursorsDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCursorsDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorAnimateCreate
+ *(void **) (&XcursorAnimateCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorAnimateDestroy
+ *(void **) (&XcursorAnimateDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorAnimateNext
+ *(void **) (&XcursorAnimateNext_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateNext");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCommentCreate
+ *(void **) (&XcursorCommentCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCommentDestroy
+ *(void **) (&XcursorCommentDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCommentsCreate
+ *(void **) (&XcursorCommentsCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentsCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCommentsDestroy
+ *(void **) (&XcursorCommentsDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentsDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileLoadImage
+ *(void **) (&XcursorXcFileLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileLoadImages
+ *(void **) (&XcursorXcFileLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileLoadAllImages
+ *(void **) (&XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadAllImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileLoad
+ *(void **) (&XcursorXcFileLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileSave
+ *(void **) (&XcursorXcFileSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileSave");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileLoadImage
+ *(void **) (&XcursorFileLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileLoadImages
+ *(void **) (&XcursorFileLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileLoadAllImages
+ *(void **) (&XcursorFileLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadAllImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileLoad
+ *(void **) (&XcursorFileLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileSaveImages
+ *(void **) (&XcursorFileSaveImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileSaveImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileSave
+ *(void **) (&XcursorFileSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileSave");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadImage
+ *(void **) (&XcursorFilenameLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadImages
+ *(void **) (&XcursorFilenameLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadAllImages
+ *(void **) (&XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadAllImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoad
+ *(void **) (&XcursorFilenameLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameSaveImages
+ *(void **) (&XcursorFilenameSaveImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameSaveImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameSave
+ *(void **) (&XcursorFilenameSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameSave");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryLoadImage
+ *(void **) (&XcursorLibraryLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryLoadImages
+ *(void **) (&XcursorLibraryLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryPath
+ *(void **) (&XcursorLibraryPath_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryPath");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryShape
+ *(void **) (&XcursorLibraryShape_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryShape");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImageLoadCursor
+ *(void **) (&XcursorImageLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesLoadCursors
+ *(void **) (&XcursorImagesLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesLoadCursors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesLoadCursor
+ *(void **) (&XcursorImagesLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadCursor
+ *(void **) (&XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadCursors
+ *(void **) (&XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadCursors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryLoadCursor
+ *(void **) (&XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryLoadCursors
+ *(void **) (&XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadCursors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorShapeLoadImage
+ *(void **) (&XcursorShapeLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorShapeLoadImages
+ *(void **) (&XcursorShapeLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorShapeLoadCursor
+ *(void **) (&XcursorShapeLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorShapeLoadCursors
+ *(void **) (&XcursorShapeLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadCursors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorTryShapeCursor
+ *(void **) (&XcursorTryShapeCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorTryShapeCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorNoticeCreateBitmap
+ *(void **) (&XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorNoticeCreateBitmap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorNoticePutBitmap
+ *(void **) (&XcursorNoticePutBitmap_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorNoticePutBitmap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorTryShapeBitmapCursor
+ *(void **) (&XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorTryShapeBitmapCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImageHash
+ *(void **) (&XcursorImageHash_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageHash");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSupportsARGB
+ *(void **) (&XcursorSupportsARGB_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSupportsARGB");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSupportsAnim
+ *(void **) (&XcursorSupportsAnim_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSupportsAnim");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSetDefaultSize
+ *(void **) (&XcursorSetDefaultSize_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetDefaultSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorGetDefaultSize
+ *(void **) (&XcursorGetDefaultSize_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetDefaultSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSetTheme
+ *(void **) (&XcursorSetTheme_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetTheme");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorGetTheme
+ *(void **) (&XcursorGetTheme_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetTheme");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorGetThemeCore
+ *(void **) (&XcursorGetThemeCore_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetThemeCore");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSetThemeCore
+ *(void **) (&XcursorSetThemeCore_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetThemeCore");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h
new file mode 100644
index 0000000000..d00fccffda
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h
@@ -0,0 +1,258 @@
+#ifndef DYLIBLOAD_WRAPPER_XCURSOR
+#define DYLIBLOAD_WRAPPER_XCURSOR
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:48:06
+// flags: ./generate-wrapper.py --include /usr/include/X11/Xcursor/Xcursor.h --sys-include <X11/Xcursor/Xcursor.h> --soname libXcursor.so.1 --init-name xcursor --output-header xcursor-so_wrap.h --output-implementation xcursor-so_wrap.c
+//
+// NOTE: Generated from Xcursor 1.2.0.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, but absent in libXcursor.so.1, were removed.
+#include <stdint.h>
+
+#define XcursorImageCreate XcursorImageCreate_dylibloader_orig_xcursor
+#define XcursorImageDestroy XcursorImageDestroy_dylibloader_orig_xcursor
+#define XcursorImagesCreate XcursorImagesCreate_dylibloader_orig_xcursor
+#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_orig_xcursor
+#define XcursorImagesSetName XcursorImagesSetName_dylibloader_orig_xcursor
+#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_orig_xcursor
+#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_orig_xcursor
+#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_orig_xcursor
+#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_orig_xcursor
+#define XcursorAnimateNext XcursorAnimateNext_dylibloader_orig_xcursor
+#define XcursorCommentCreate XcursorCommentCreate_dylibloader_orig_xcursor
+#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_orig_xcursor
+#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_orig_xcursor
+#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_orig_xcursor
+#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_orig_xcursor
+#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_orig_xcursor
+#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_orig_xcursor
+#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_orig_xcursor
+#define XcursorXcFileSave XcursorXcFileSave_dylibloader_orig_xcursor
+#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_orig_xcursor
+#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_orig_xcursor
+#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_orig_xcursor
+#define XcursorFileLoad XcursorFileLoad_dylibloader_orig_xcursor
+#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_orig_xcursor
+#define XcursorFileSave XcursorFileSave_dylibloader_orig_xcursor
+#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_orig_xcursor
+#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_orig_xcursor
+#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_orig_xcursor
+#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_orig_xcursor
+#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_orig_xcursor
+#define XcursorFilenameSave XcursorFilenameSave_dylibloader_orig_xcursor
+#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_orig_xcursor
+#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_orig_xcursor
+#define XcursorLibraryPath XcursorLibraryPath_dylibloader_orig_xcursor
+#define XcursorLibraryShape XcursorLibraryShape_dylibloader_orig_xcursor
+#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_orig_xcursor
+#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_orig_xcursor
+#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_orig_xcursor
+#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_orig_xcursor
+#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_orig_xcursor
+#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_orig_xcursor
+#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_orig_xcursor
+#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_orig_xcursor
+#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_orig_xcursor
+#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_orig_xcursor
+#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_orig_xcursor
+#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_orig_xcursor
+#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_orig_xcursor
+#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_orig_xcursor
+#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_orig_xcursor
+#define XcursorImageHash XcursorImageHash_dylibloader_orig_xcursor
+#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_orig_xcursor
+#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_orig_xcursor
+#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_orig_xcursor
+#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_orig_xcursor
+#define XcursorSetTheme XcursorSetTheme_dylibloader_orig_xcursor
+#define XcursorGetTheme XcursorGetTheme_dylibloader_orig_xcursor
+#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_orig_xcursor
+#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_orig_xcursor
+#include <X11/Xcursor/Xcursor.h>
+#undef XcursorImageCreate
+#undef XcursorImageDestroy
+#undef XcursorImagesCreate
+#undef XcursorImagesDestroy
+#undef XcursorImagesSetName
+#undef XcursorCursorsCreate
+#undef XcursorCursorsDestroy
+#undef XcursorAnimateCreate
+#undef XcursorAnimateDestroy
+#undef XcursorAnimateNext
+#undef XcursorCommentCreate
+#undef XcursorCommentDestroy
+#undef XcursorCommentsCreate
+#undef XcursorCommentsDestroy
+#undef XcursorXcFileLoadImage
+#undef XcursorXcFileLoadImages
+#undef XcursorXcFileLoadAllImages
+#undef XcursorXcFileLoad
+#undef XcursorXcFileSave
+#undef XcursorFileLoadImage
+#undef XcursorFileLoadImages
+#undef XcursorFileLoadAllImages
+#undef XcursorFileLoad
+#undef XcursorFileSaveImages
+#undef XcursorFileSave
+#undef XcursorFilenameLoadImage
+#undef XcursorFilenameLoadImages
+#undef XcursorFilenameLoadAllImages
+#undef XcursorFilenameLoad
+#undef XcursorFilenameSaveImages
+#undef XcursorFilenameSave
+#undef XcursorLibraryLoadImage
+#undef XcursorLibraryLoadImages
+#undef XcursorLibraryPath
+#undef XcursorLibraryShape
+#undef XcursorImageLoadCursor
+#undef XcursorImagesLoadCursors
+#undef XcursorImagesLoadCursor
+#undef XcursorFilenameLoadCursor
+#undef XcursorFilenameLoadCursors
+#undef XcursorLibraryLoadCursor
+#undef XcursorLibraryLoadCursors
+#undef XcursorShapeLoadImage
+#undef XcursorShapeLoadImages
+#undef XcursorShapeLoadCursor
+#undef XcursorShapeLoadCursors
+#undef XcursorTryShapeCursor
+#undef XcursorNoticeCreateBitmap
+#undef XcursorNoticePutBitmap
+#undef XcursorTryShapeBitmapCursor
+#undef XcursorImageHash
+#undef XcursorSupportsARGB
+#undef XcursorSupportsAnim
+#undef XcursorSetDefaultSize
+#undef XcursorGetDefaultSize
+#undef XcursorSetTheme
+#undef XcursorGetTheme
+#undef XcursorGetThemeCore
+#undef XcursorSetThemeCore
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XcursorImageCreate XcursorImageCreate_dylibloader_wrapper_xcursor
+#define XcursorImageDestroy XcursorImageDestroy_dylibloader_wrapper_xcursor
+#define XcursorImagesCreate XcursorImagesCreate_dylibloader_wrapper_xcursor
+#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_wrapper_xcursor
+#define XcursorImagesSetName XcursorImagesSetName_dylibloader_wrapper_xcursor
+#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_wrapper_xcursor
+#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_wrapper_xcursor
+#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_wrapper_xcursor
+#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_wrapper_xcursor
+#define XcursorAnimateNext XcursorAnimateNext_dylibloader_wrapper_xcursor
+#define XcursorCommentCreate XcursorCommentCreate_dylibloader_wrapper_xcursor
+#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_wrapper_xcursor
+#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_wrapper_xcursor
+#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_wrapper_xcursor
+#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_wrapper_xcursor
+#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_wrapper_xcursor
+#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor
+#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_wrapper_xcursor
+#define XcursorXcFileSave XcursorXcFileSave_dylibloader_wrapper_xcursor
+#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_wrapper_xcursor
+#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_wrapper_xcursor
+#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_wrapper_xcursor
+#define XcursorFileLoad XcursorFileLoad_dylibloader_wrapper_xcursor
+#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_wrapper_xcursor
+#define XcursorFileSave XcursorFileSave_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_wrapper_xcursor
+#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_wrapper_xcursor
+#define XcursorFilenameSave XcursorFilenameSave_dylibloader_wrapper_xcursor
+#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_wrapper_xcursor
+#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_wrapper_xcursor
+#define XcursorLibraryPath XcursorLibraryPath_dylibloader_wrapper_xcursor
+#define XcursorLibraryShape XcursorLibraryShape_dylibloader_wrapper_xcursor
+#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_wrapper_xcursor
+#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor
+#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor
+#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_wrapper_xcursor
+#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_wrapper_xcursor
+#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_wrapper_xcursor
+#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_wrapper_xcursor
+#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor
+#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_wrapper_xcursor
+#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor
+#define XcursorImageHash XcursorImageHash_dylibloader_wrapper_xcursor
+#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_wrapper_xcursor
+#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_wrapper_xcursor
+#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_wrapper_xcursor
+#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_wrapper_xcursor
+#define XcursorSetTheme XcursorSetTheme_dylibloader_wrapper_xcursor
+#define XcursorGetTheme XcursorGetTheme_dylibloader_wrapper_xcursor
+#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_wrapper_xcursor
+#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_wrapper_xcursor
+extern XcursorImage* (*XcursorImageCreate_dylibloader_wrapper_xcursor)( int, int);
+extern void (*XcursorImageDestroy_dylibloader_wrapper_xcursor)( XcursorImage*);
+extern XcursorImages* (*XcursorImagesCreate_dylibloader_wrapper_xcursor)( int);
+extern void (*XcursorImagesDestroy_dylibloader_wrapper_xcursor)( XcursorImages*);
+extern void (*XcursorImagesSetName_dylibloader_wrapper_xcursor)( XcursorImages*,const char*);
+extern XcursorCursors* (*XcursorCursorsCreate_dylibloader_wrapper_xcursor)( Display*, int);
+extern void (*XcursorCursorsDestroy_dylibloader_wrapper_xcursor)( XcursorCursors*);
+extern XcursorAnimate* (*XcursorAnimateCreate_dylibloader_wrapper_xcursor)( XcursorCursors*);
+extern void (*XcursorAnimateDestroy_dylibloader_wrapper_xcursor)( XcursorAnimate*);
+extern Cursor (*XcursorAnimateNext_dylibloader_wrapper_xcursor)( XcursorAnimate*);
+extern XcursorComment* (*XcursorCommentCreate_dylibloader_wrapper_xcursor)( XcursorUInt, int);
+extern void (*XcursorCommentDestroy_dylibloader_wrapper_xcursor)( XcursorComment*);
+extern XcursorComments* (*XcursorCommentsCreate_dylibloader_wrapper_xcursor)( int);
+extern void (*XcursorCommentsDestroy_dylibloader_wrapper_xcursor)( XcursorComments*);
+extern XcursorImage* (*XcursorXcFileLoadImage_dylibloader_wrapper_xcursor)( XcursorFile*, int);
+extern XcursorImages* (*XcursorXcFileLoadImages_dylibloader_wrapper_xcursor)( XcursorFile*, int);
+extern XcursorImages* (*XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor)( XcursorFile*);
+extern XcursorBool (*XcursorXcFileLoad_dylibloader_wrapper_xcursor)( XcursorFile*, XcursorComments**, XcursorImages**);
+extern XcursorBool (*XcursorXcFileSave_dylibloader_wrapper_xcursor)( XcursorFile*,const XcursorComments*,const XcursorImages*);
+extern XcursorImage* (*XcursorFileLoadImage_dylibloader_wrapper_xcursor)( FILE*, int);
+extern XcursorImages* (*XcursorFileLoadImages_dylibloader_wrapper_xcursor)( FILE*, int);
+extern XcursorImages* (*XcursorFileLoadAllImages_dylibloader_wrapper_xcursor)( FILE*);
+extern XcursorBool (*XcursorFileLoad_dylibloader_wrapper_xcursor)( FILE*, XcursorComments**, XcursorImages**);
+extern XcursorBool (*XcursorFileSaveImages_dylibloader_wrapper_xcursor)( FILE*,const XcursorImages*);
+extern XcursorBool (*XcursorFileSave_dylibloader_wrapper_xcursor)( FILE*,const XcursorComments*,const XcursorImages*);
+extern XcursorImage* (*XcursorFilenameLoadImage_dylibloader_wrapper_xcursor)(const char*, int);
+extern XcursorImages* (*XcursorFilenameLoadImages_dylibloader_wrapper_xcursor)(const char*, int);
+extern XcursorImages* (*XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor)(const char*);
+extern XcursorBool (*XcursorFilenameLoad_dylibloader_wrapper_xcursor)(const char*, XcursorComments**, XcursorImages**);
+extern XcursorBool (*XcursorFilenameSaveImages_dylibloader_wrapper_xcursor)(const char*,const XcursorImages*);
+extern XcursorBool (*XcursorFilenameSave_dylibloader_wrapper_xcursor)(const char*,const XcursorComments*,const XcursorImages*);
+extern XcursorImage* (*XcursorLibraryLoadImage_dylibloader_wrapper_xcursor)(const char*,const char*, int);
+extern XcursorImages* (*XcursorLibraryLoadImages_dylibloader_wrapper_xcursor)(const char*,const char*, int);
+extern const char* (*XcursorLibraryPath_dylibloader_wrapper_xcursor)( void);
+extern int (*XcursorLibraryShape_dylibloader_wrapper_xcursor)(const char*);
+extern Cursor (*XcursorImageLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImage*);
+extern XcursorCursors* (*XcursorImagesLoadCursors_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
+extern Cursor (*XcursorImagesLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
+extern Cursor (*XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern XcursorCursors* (*XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern Cursor (*XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern XcursorCursors* (*XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern XcursorImage* (*XcursorShapeLoadImage_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
+extern XcursorImages* (*XcursorShapeLoadImages_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
+extern Cursor (*XcursorShapeLoadCursor_dylibloader_wrapper_xcursor)( Display*, unsigned int);
+extern XcursorCursors* (*XcursorShapeLoadCursors_dylibloader_wrapper_xcursor)( Display*, unsigned int);
+extern Cursor (*XcursorTryShapeCursor_dylibloader_wrapper_xcursor)( Display*, Font, Font, unsigned int, unsigned int,const XColor*,const XColor*);
+extern void (*XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor)( Display*, Pixmap, unsigned int, unsigned int);
+extern void (*XcursorNoticePutBitmap_dylibloader_wrapper_xcursor)( Display*, Drawable, XImage*);
+extern Cursor (*XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor)( Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
+extern void (*XcursorImageHash_dylibloader_wrapper_xcursor)( XImage*, unsigned char [16]);
+extern XcursorBool (*XcursorSupportsARGB_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorSupportsAnim_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorSetDefaultSize_dylibloader_wrapper_xcursor)( Display*, int);
+extern int (*XcursorGetDefaultSize_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorSetTheme_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern char* (*XcursorGetTheme_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorGetThemeCore_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorSetThemeCore_dylibloader_wrapper_xcursor)( Display*, XcursorBool);
+int initialize_xcursor(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c
new file mode 100644
index 0000000000..c8e87a6b85
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c
@@ -0,0 +1,154 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:51:55
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xext.h --sys-include <X11/extensions/Xext.h> --include /usr/include/X11/extensions/shape.h --sys-include <X11/extensions/shape.h> --soname libXext.so.6 --init-name xext --output-header xext-so_wrap.h --output-implementation xext-so_wrap.c
+//
+// NOTE: Generated from Xext 1.3.5.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, but absent in libXext.so.6, were removed and an include needed for
+// proper parsing was added (this had also to be temporarily added to the
+// original header, as dynload-wrapper would complain otherwise)
+#include <stdint.h>
+
+// HANDPATCH: Needed for a successful compilation.
+#include <X11/Xlib.h>
+
+#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
+#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
+#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
+#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
+#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
+#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
+#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
+#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
+#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
+#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
+#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/shape.h>
+#undef XShapeQueryExtension
+#undef XShapeQueryVersion
+#undef XShapeCombineRegion
+#undef XShapeCombineRectangles
+#undef XShapeCombineMask
+#undef XShapeCombineShape
+#undef XShapeOffsetShape
+#undef XShapeQueryExtents
+#undef XShapeSelectInput
+#undef XShapeInputSelected
+#undef XShapeGetRectangles
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XShapeQueryExtension_dylibloader_wrapper_xext)( Display*, int*, int*);
+int (*XShapeQueryVersion_dylibloader_wrapper_xext)( Display*, int*, int*);
+void (*XShapeCombineRegion_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Region, int);
+void (*XShapeCombineRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int, int, XRectangle*, int, int, int);
+void (*XShapeCombineMask_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Pixmap, int);
+void (*XShapeCombineShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Window, int, int);
+void (*XShapeOffsetShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int);
+int (*XShapeQueryExtents_dylibloader_wrapper_xext)( Display*, Window, int*, int*, int*, unsigned int*, unsigned int*, int*, int*, int*, unsigned int*, unsigned int*);
+void (*XShapeSelectInput_dylibloader_wrapper_xext)( Display*, Window, unsigned long);
+unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)( Display*, Window);
+XRectangle* (*XShapeGetRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int*, int*);
+int initialize_xext(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXext.so.6", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XShapeQueryExtension
+ *(void **) (&XShapeQueryExtension_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeQueryVersion
+ *(void **) (&XShapeQueryVersion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeCombineRegion
+ *(void **) (&XShapeCombineRegion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeCombineRectangles
+ *(void **) (&XShapeCombineRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeCombineMask
+ *(void **) (&XShapeCombineMask_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineMask");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeCombineShape
+ *(void **) (&XShapeCombineShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineShape");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeOffsetShape
+ *(void **) (&XShapeOffsetShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeOffsetShape");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeQueryExtents
+ *(void **) (&XShapeQueryExtents_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeSelectInput
+ *(void **) (&XShapeSelectInput_dylibloader_wrapper_xext) = dlsym(handle, "XShapeSelectInput");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeInputSelected
+ *(void **) (&XShapeInputSelected_dylibloader_wrapper_xext) = dlsym(handle, "XShapeInputSelected");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeGetRectangles
+ *(void **) (&XShapeGetRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeGetRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h
new file mode 100644
index 0000000000..aee92b593e
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h
@@ -0,0 +1,72 @@
+#ifndef DYLIBLOAD_WRAPPER_XEXT
+#define DYLIBLOAD_WRAPPER_XEXT
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:51:55
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xext.h --sys-include <X11/extensions/Xext.h> --include /usr/include/X11/extensions/shape.h --sys-include <X11/extensions/shape.h> --soname libXext.so.6 --init-name xext --output-header xext-so_wrap.h --output-implementation xext-so_wrap.c
+//
+// NOTE: Generated from Xext 1.3.5.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, but absent in libXext.so.6, were removed and an include needed for
+// proper parsing was added (this had also to be temporarily added to the
+// original header, as dynload-wrapper would complain otherwise)
+#include <stdint.h>
+
+// HANDPATCH: Needed for a successful compilation.
+#include <X11/Xlib.h>
+
+#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
+#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
+#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
+#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
+#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
+#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
+#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
+#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
+#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
+#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
+#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/shape.h>
+#undef XShapeQueryExtension
+#undef XShapeQueryVersion
+#undef XShapeCombineRegion
+#undef XShapeCombineRectangles
+#undef XShapeCombineMask
+#undef XShapeCombineShape
+#undef XShapeOffsetShape
+#undef XShapeQueryExtents
+#undef XShapeSelectInput
+#undef XShapeInputSelected
+#undef XShapeGetRectangles
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XShapeQueryExtension XShapeQueryExtension_dylibloader_wrapper_xext
+#define XShapeQueryVersion XShapeQueryVersion_dylibloader_wrapper_xext
+#define XShapeCombineRegion XShapeCombineRegion_dylibloader_wrapper_xext
+#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_wrapper_xext
+#define XShapeCombineMask XShapeCombineMask_dylibloader_wrapper_xext
+#define XShapeCombineShape XShapeCombineShape_dylibloader_wrapper_xext
+#define XShapeOffsetShape XShapeOffsetShape_dylibloader_wrapper_xext
+#define XShapeQueryExtents XShapeQueryExtents_dylibloader_wrapper_xext
+#define XShapeSelectInput XShapeSelectInput_dylibloader_wrapper_xext
+#define XShapeInputSelected XShapeInputSelected_dylibloader_wrapper_xext
+#define XShapeGetRectangles XShapeGetRectangles_dylibloader_wrapper_xext
+extern int (*XShapeQueryExtension_dylibloader_wrapper_xext)( Display*, int*, int*);
+extern int (*XShapeQueryVersion_dylibloader_wrapper_xext)( Display*, int*, int*);
+extern void (*XShapeCombineRegion_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Region, int);
+extern void (*XShapeCombineRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int, int, XRectangle*, int, int, int);
+extern void (*XShapeCombineMask_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Pixmap, int);
+extern void (*XShapeCombineShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Window, int, int);
+extern void (*XShapeOffsetShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int);
+extern int (*XShapeQueryExtents_dylibloader_wrapper_xext)( Display*, Window, int*, int*, int*, unsigned int*, unsigned int*, int*, int*, int*, unsigned int*, unsigned int*);
+extern void (*XShapeSelectInput_dylibloader_wrapper_xext)( Display*, Window, unsigned long);
+extern unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)( Display*, Window);
+extern XRectangle* (*XShapeGetRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int*, int*);
+int initialize_xext(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c
new file mode 100644
index 0000000000..85ac80e3f2
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c
@@ -0,0 +1,71 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:53:11
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xinerama.h --sys-include <X11/extensions/Xinerama.h> --soname libXinerama.so.1 --init-name xinerama --output-header xinerama-so_wrap.h --output-implementation xinerama-so_wrap.c
+//
+// NOTE: Generated from Xinerama 1.1.4.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, but absent in libXinerama.so.1, were removed.
+#include <stdint.h>
+
+#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
+#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
+#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
+#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
+#include <X11/extensions/Xinerama.h>
+#undef XineramaQueryExtension
+#undef XineramaQueryVersion
+#undef XineramaIsActive
+#undef XineramaQueryScreens
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)( Display*, int*, int*);
+int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)( Display*, int*, int*);
+int (*XineramaIsActive_dylibloader_wrapper_xinerama)( Display*);
+XineramaScreenInfo* (*XineramaQueryScreens_dylibloader_wrapper_xinerama)( Display*, int*);
+int initialize_xinerama(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXinerama.so.1", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XineramaQueryExtension
+ *(void **) (&XineramaQueryExtension_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XineramaQueryVersion
+ *(void **) (&XineramaQueryVersion_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XineramaIsActive
+ *(void **) (&XineramaIsActive_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaIsActive");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XineramaQueryScreens
+ *(void **) (&XineramaQueryScreens_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryScreens");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h
new file mode 100644
index 0000000000..9139421cd6
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h
@@ -0,0 +1,38 @@
+#ifndef DYLIBLOAD_WRAPPER_XINERAMA
+#define DYLIBLOAD_WRAPPER_XINERAMA
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:53:11
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xinerama.h --sys-include <X11/extensions/Xinerama.h> --soname libXinerama.so.1 --init-name xinerama --output-header xinerama-so_wrap.h --output-implementation xinerama-so_wrap.c
+//
+// NOTE: Generated from Xinerama 1.1.4.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, but absent in libXinerama.so.1, were removed.
+#include <stdint.h>
+
+#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
+#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
+#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
+#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
+#include <X11/extensions/Xinerama.h>
+#undef XineramaQueryExtension
+#undef XineramaQueryVersion
+#undef XineramaIsActive
+#undef XineramaQueryScreens
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XineramaQueryExtension XineramaQueryExtension_dylibloader_wrapper_xinerama
+#define XineramaQueryVersion XineramaQueryVersion_dylibloader_wrapper_xinerama
+#define XineramaIsActive XineramaIsActive_dylibloader_wrapper_xinerama
+#define XineramaQueryScreens XineramaQueryScreens_dylibloader_wrapper_xinerama
+extern int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)( Display*, int*, int*);
+extern int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)( Display*, int*, int*);
+extern int (*XineramaIsActive_dylibloader_wrapper_xinerama)( Display*);
+extern XineramaScreenInfo* (*XineramaQueryScreens_dylibloader_wrapper_xinerama)( Display*, int*);
+int initialize_xinerama(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c
new file mode 100644
index 0000000000..5f16bc6111
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c
@@ -0,0 +1,401 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:54:10
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/XInput2.h --sys-include <X11/extensions/XInput2.h> --soname libXi.so.6 --init-name xinput2 --output-header xinput2-so_wrap.h --output-implementation xinput2-so_wrap.c
+//
+// NOTE: Generated from Xi 1.7.10.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, liXext and libXfixes, but absent in libXi.so.6, were removed.
+#include <stdint.h>
+
+#define XIQueryPointer XIQueryPointer_dylibloader_orig_xinput2
+#define XIWarpPointer XIWarpPointer_dylibloader_orig_xinput2
+#define XIDefineCursor XIDefineCursor_dylibloader_orig_xinput2
+#define XIUndefineCursor XIUndefineCursor_dylibloader_orig_xinput2
+#define XIChangeHierarchy XIChangeHierarchy_dylibloader_orig_xinput2
+#define XISetClientPointer XISetClientPointer_dylibloader_orig_xinput2
+#define XIGetClientPointer XIGetClientPointer_dylibloader_orig_xinput2
+#define XISelectEvents XISelectEvents_dylibloader_orig_xinput2
+#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_orig_xinput2
+#define XIQueryVersion XIQueryVersion_dylibloader_orig_xinput2
+#define XIQueryDevice XIQueryDevice_dylibloader_orig_xinput2
+#define XISetFocus XISetFocus_dylibloader_orig_xinput2
+#define XIGetFocus XIGetFocus_dylibloader_orig_xinput2
+#define XIGrabDevice XIGrabDevice_dylibloader_orig_xinput2
+#define XIUngrabDevice XIUngrabDevice_dylibloader_orig_xinput2
+#define XIAllowEvents XIAllowEvents_dylibloader_orig_xinput2
+#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_orig_xinput2
+#define XIGrabButton XIGrabButton_dylibloader_orig_xinput2
+#define XIGrabKeycode XIGrabKeycode_dylibloader_orig_xinput2
+#define XIGrabEnter XIGrabEnter_dylibloader_orig_xinput2
+#define XIGrabFocusIn XIGrabFocusIn_dylibloader_orig_xinput2
+#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_orig_xinput2
+#define XIUngrabButton XIUngrabButton_dylibloader_orig_xinput2
+#define XIUngrabKeycode XIUngrabKeycode_dylibloader_orig_xinput2
+#define XIUngrabEnter XIUngrabEnter_dylibloader_orig_xinput2
+#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_orig_xinput2
+#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_orig_xinput2
+#define XIListProperties XIListProperties_dylibloader_orig_xinput2
+#define XIChangeProperty XIChangeProperty_dylibloader_orig_xinput2
+#define XIDeleteProperty XIDeleteProperty_dylibloader_orig_xinput2
+#define XIGetProperty XIGetProperty_dylibloader_orig_xinput2
+#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_orig_xinput2
+#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_orig_xinput2
+#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_orig_xinput2
+#include <X11/extensions/XInput2.h>
+#undef XIQueryPointer
+#undef XIWarpPointer
+#undef XIDefineCursor
+#undef XIUndefineCursor
+#undef XIChangeHierarchy
+#undef XISetClientPointer
+#undef XIGetClientPointer
+#undef XISelectEvents
+#undef XIGetSelectedEvents
+#undef XIQueryVersion
+#undef XIQueryDevice
+#undef XISetFocus
+#undef XIGetFocus
+#undef XIGrabDevice
+#undef XIUngrabDevice
+#undef XIAllowEvents
+#undef XIAllowTouchEvents
+#undef XIGrabButton
+#undef XIGrabKeycode
+#undef XIGrabEnter
+#undef XIGrabFocusIn
+#undef XIGrabTouchBegin
+#undef XIUngrabButton
+#undef XIUngrabKeycode
+#undef XIUngrabEnter
+#undef XIUngrabFocusIn
+#undef XIUngrabTouchBegin
+#undef XIListProperties
+#undef XIChangeProperty
+#undef XIDeleteProperty
+#undef XIGetProperty
+#undef XIBarrierReleasePointers
+#undef XIBarrierReleasePointer
+#undef XIFreeDeviceInfo
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XIQueryPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window*, Window*, double*, double*, double*, double*, XIButtonState*, XIModifierState*, XIGroupState*);
+int (*XIWarpPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window, double, double, unsigned int, unsigned int, double, double);
+int (*XIDefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor);
+int (*XIUndefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window);
+int (*XIChangeHierarchy_dylibloader_wrapper_xinput2)( Display*, XIAnyHierarchyChangeInfo*, int);
+int (*XISetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int);
+int (*XIGetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int*);
+int (*XISelectEvents_dylibloader_wrapper_xinput2)( Display*, Window, XIEventMask*, int);
+XIEventMask* (*XIGetSelectedEvents_dylibloader_wrapper_xinput2)( Display*, Window, int*);
+int (*XIQueryVersion_dylibloader_wrapper_xinput2)( Display*, int*, int*);
+XIDeviceInfo* (*XIQueryDevice_dylibloader_wrapper_xinput2)( Display*, int, int*);
+int (*XISetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window, Time);
+int (*XIGetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window*);
+int (*XIGrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Window, Time, Cursor, int, int, int, XIEventMask*);
+int (*XIUngrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Time);
+int (*XIAllowEvents_dylibloader_wrapper_xinput2)( Display*, int, int, Time);
+int (*XIAllowTouchEvents_dylibloader_wrapper_xinput2)( Display*, int, unsigned int, Window, int);
+int (*XIGrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIGrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIGrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIGrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIGrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIUngrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
+int (*XIUngrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
+int (*XIUngrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+int (*XIUngrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+int (*XIUngrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+Atom* (*XIListProperties_dylibloader_wrapper_xinput2)( Display*, int, int*);
+void (*XIChangeProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, Atom, int, int, unsigned char*, int);
+void (*XIDeleteProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom);
+int (*XIGetProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+void (*XIBarrierReleasePointers_dylibloader_wrapper_xinput2)( Display*, XIBarrierReleasePointerInfo*, int);
+void (*XIBarrierReleasePointer_dylibloader_wrapper_xinput2)( Display*, int, PointerBarrier, BarrierEventID);
+void (*XIFreeDeviceInfo_dylibloader_wrapper_xinput2)( XIDeviceInfo*);
+int initialize_xinput2(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXi.so.6", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XIQueryPointer
+ *(void **) (&XIQueryPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIWarpPointer
+ *(void **) (&XIWarpPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIWarpPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIDefineCursor
+ *(void **) (&XIDefineCursor_dylibloader_wrapper_xinput2) = dlsym(handle, "XIDefineCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUndefineCursor
+ *(void **) (&XIUndefineCursor_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUndefineCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIChangeHierarchy
+ *(void **) (&XIChangeHierarchy_dylibloader_wrapper_xinput2) = dlsym(handle, "XIChangeHierarchy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XISetClientPointer
+ *(void **) (&XISetClientPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XISetClientPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGetClientPointer
+ *(void **) (&XIGetClientPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetClientPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XISelectEvents
+ *(void **) (&XISelectEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XISelectEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGetSelectedEvents
+ *(void **) (&XIGetSelectedEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetSelectedEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIQueryVersion
+ *(void **) (&XIQueryVersion_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIQueryDevice
+ *(void **) (&XIQueryDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryDevice");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XISetFocus
+ *(void **) (&XISetFocus_dylibloader_wrapper_xinput2) = dlsym(handle, "XISetFocus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGetFocus
+ *(void **) (&XIGetFocus_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetFocus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabDevice
+ *(void **) (&XIGrabDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabDevice");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabDevice
+ *(void **) (&XIUngrabDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabDevice");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIAllowEvents
+ *(void **) (&XIAllowEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIAllowEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIAllowTouchEvents
+ *(void **) (&XIAllowTouchEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIAllowTouchEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabButton
+ *(void **) (&XIGrabButton_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabButton");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabKeycode
+ *(void **) (&XIGrabKeycode_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabKeycode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabEnter
+ *(void **) (&XIGrabEnter_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabEnter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabFocusIn
+ *(void **) (&XIGrabFocusIn_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabFocusIn");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabTouchBegin
+ *(void **) (&XIGrabTouchBegin_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabTouchBegin");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabButton
+ *(void **) (&XIUngrabButton_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabButton");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabKeycode
+ *(void **) (&XIUngrabKeycode_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabKeycode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabEnter
+ *(void **) (&XIUngrabEnter_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabEnter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabFocusIn
+ *(void **) (&XIUngrabFocusIn_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabFocusIn");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabTouchBegin
+ *(void **) (&XIUngrabTouchBegin_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabTouchBegin");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIListProperties
+ *(void **) (&XIListProperties_dylibloader_wrapper_xinput2) = dlsym(handle, "XIListProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIChangeProperty
+ *(void **) (&XIChangeProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIChangeProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIDeleteProperty
+ *(void **) (&XIDeleteProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIDeleteProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGetProperty
+ *(void **) (&XIGetProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIBarrierReleasePointers
+ *(void **) (&XIBarrierReleasePointers_dylibloader_wrapper_xinput2) = dlsym(handle, "XIBarrierReleasePointers");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIBarrierReleasePointer
+ *(void **) (&XIBarrierReleasePointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIBarrierReleasePointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIFreeDeviceInfo
+ *(void **) (&XIFreeDeviceInfo_dylibloader_wrapper_xinput2) = dlsym(handle, "XIFreeDeviceInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h
new file mode 100644
index 0000000000..ecb7aa5048
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h
@@ -0,0 +1,158 @@
+#ifndef DYLIBLOAD_WRAPPER_XINPUT2
+#define DYLIBLOAD_WRAPPER_XINPUT2
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:54:10
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/XInput2.h --sys-include <X11/extensions/XInput2.h> --soname libXi.so.6 --init-name xinput2 --output-header xinput2-so_wrap.h --output-implementation xinput2-so_wrap.c
+//
+// NOTE: Generated from Xi 1.7.10.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, liXext and libXfixes, but absent in libXi.so.6, were removed.
+#include <stdint.h>
+
+#define XIQueryPointer XIQueryPointer_dylibloader_orig_xinput2
+#define XIWarpPointer XIWarpPointer_dylibloader_orig_xinput2
+#define XIDefineCursor XIDefineCursor_dylibloader_orig_xinput2
+#define XIUndefineCursor XIUndefineCursor_dylibloader_orig_xinput2
+#define XIChangeHierarchy XIChangeHierarchy_dylibloader_orig_xinput2
+#define XISetClientPointer XISetClientPointer_dylibloader_orig_xinput2
+#define XIGetClientPointer XIGetClientPointer_dylibloader_orig_xinput2
+#define XISelectEvents XISelectEvents_dylibloader_orig_xinput2
+#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_orig_xinput2
+#define XIQueryVersion XIQueryVersion_dylibloader_orig_xinput2
+#define XIQueryDevice XIQueryDevice_dylibloader_orig_xinput2
+#define XISetFocus XISetFocus_dylibloader_orig_xinput2
+#define XIGetFocus XIGetFocus_dylibloader_orig_xinput2
+#define XIGrabDevice XIGrabDevice_dylibloader_orig_xinput2
+#define XIUngrabDevice XIUngrabDevice_dylibloader_orig_xinput2
+#define XIAllowEvents XIAllowEvents_dylibloader_orig_xinput2
+#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_orig_xinput2
+#define XIGrabButton XIGrabButton_dylibloader_orig_xinput2
+#define XIGrabKeycode XIGrabKeycode_dylibloader_orig_xinput2
+#define XIGrabEnter XIGrabEnter_dylibloader_orig_xinput2
+#define XIGrabFocusIn XIGrabFocusIn_dylibloader_orig_xinput2
+#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_orig_xinput2
+#define XIUngrabButton XIUngrabButton_dylibloader_orig_xinput2
+#define XIUngrabKeycode XIUngrabKeycode_dylibloader_orig_xinput2
+#define XIUngrabEnter XIUngrabEnter_dylibloader_orig_xinput2
+#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_orig_xinput2
+#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_orig_xinput2
+#define XIListProperties XIListProperties_dylibloader_orig_xinput2
+#define XIChangeProperty XIChangeProperty_dylibloader_orig_xinput2
+#define XIDeleteProperty XIDeleteProperty_dylibloader_orig_xinput2
+#define XIGetProperty XIGetProperty_dylibloader_orig_xinput2
+#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_orig_xinput2
+#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_orig_xinput2
+#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_orig_xinput2
+#include <X11/extensions/XInput2.h>
+#undef XIQueryPointer
+#undef XIWarpPointer
+#undef XIDefineCursor
+#undef XIUndefineCursor
+#undef XIChangeHierarchy
+#undef XISetClientPointer
+#undef XIGetClientPointer
+#undef XISelectEvents
+#undef XIGetSelectedEvents
+#undef XIQueryVersion
+#undef XIQueryDevice
+#undef XISetFocus
+#undef XIGetFocus
+#undef XIGrabDevice
+#undef XIUngrabDevice
+#undef XIAllowEvents
+#undef XIAllowTouchEvents
+#undef XIGrabButton
+#undef XIGrabKeycode
+#undef XIGrabEnter
+#undef XIGrabFocusIn
+#undef XIGrabTouchBegin
+#undef XIUngrabButton
+#undef XIUngrabKeycode
+#undef XIUngrabEnter
+#undef XIUngrabFocusIn
+#undef XIUngrabTouchBegin
+#undef XIListProperties
+#undef XIChangeProperty
+#undef XIDeleteProperty
+#undef XIGetProperty
+#undef XIBarrierReleasePointers
+#undef XIBarrierReleasePointer
+#undef XIFreeDeviceInfo
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XIQueryPointer XIQueryPointer_dylibloader_wrapper_xinput2
+#define XIWarpPointer XIWarpPointer_dylibloader_wrapper_xinput2
+#define XIDefineCursor XIDefineCursor_dylibloader_wrapper_xinput2
+#define XIUndefineCursor XIUndefineCursor_dylibloader_wrapper_xinput2
+#define XIChangeHierarchy XIChangeHierarchy_dylibloader_wrapper_xinput2
+#define XISetClientPointer XISetClientPointer_dylibloader_wrapper_xinput2
+#define XIGetClientPointer XIGetClientPointer_dylibloader_wrapper_xinput2
+#define XISelectEvents XISelectEvents_dylibloader_wrapper_xinput2
+#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_wrapper_xinput2
+#define XIQueryVersion XIQueryVersion_dylibloader_wrapper_xinput2
+#define XIQueryDevice XIQueryDevice_dylibloader_wrapper_xinput2
+#define XISetFocus XISetFocus_dylibloader_wrapper_xinput2
+#define XIGetFocus XIGetFocus_dylibloader_wrapper_xinput2
+#define XIGrabDevice XIGrabDevice_dylibloader_wrapper_xinput2
+#define XIUngrabDevice XIUngrabDevice_dylibloader_wrapper_xinput2
+#define XIAllowEvents XIAllowEvents_dylibloader_wrapper_xinput2
+#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_wrapper_xinput2
+#define XIGrabButton XIGrabButton_dylibloader_wrapper_xinput2
+#define XIGrabKeycode XIGrabKeycode_dylibloader_wrapper_xinput2
+#define XIGrabEnter XIGrabEnter_dylibloader_wrapper_xinput2
+#define XIGrabFocusIn XIGrabFocusIn_dylibloader_wrapper_xinput2
+#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_wrapper_xinput2
+#define XIUngrabButton XIUngrabButton_dylibloader_wrapper_xinput2
+#define XIUngrabKeycode XIUngrabKeycode_dylibloader_wrapper_xinput2
+#define XIUngrabEnter XIUngrabEnter_dylibloader_wrapper_xinput2
+#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_wrapper_xinput2
+#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_wrapper_xinput2
+#define XIListProperties XIListProperties_dylibloader_wrapper_xinput2
+#define XIChangeProperty XIChangeProperty_dylibloader_wrapper_xinput2
+#define XIDeleteProperty XIDeleteProperty_dylibloader_wrapper_xinput2
+#define XIGetProperty XIGetProperty_dylibloader_wrapper_xinput2
+#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_wrapper_xinput2
+#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_wrapper_xinput2
+#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_wrapper_xinput2
+extern int (*XIQueryPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window*, Window*, double*, double*, double*, double*, XIButtonState*, XIModifierState*, XIGroupState*);
+extern int (*XIWarpPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window, double, double, unsigned int, unsigned int, double, double);
+extern int (*XIDefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor);
+extern int (*XIUndefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window);
+extern int (*XIChangeHierarchy_dylibloader_wrapper_xinput2)( Display*, XIAnyHierarchyChangeInfo*, int);
+extern int (*XISetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int);
+extern int (*XIGetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int*);
+extern int (*XISelectEvents_dylibloader_wrapper_xinput2)( Display*, Window, XIEventMask*, int);
+extern XIEventMask* (*XIGetSelectedEvents_dylibloader_wrapper_xinput2)( Display*, Window, int*);
+extern int (*XIQueryVersion_dylibloader_wrapper_xinput2)( Display*, int*, int*);
+extern XIDeviceInfo* (*XIQueryDevice_dylibloader_wrapper_xinput2)( Display*, int, int*);
+extern int (*XISetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window, Time);
+extern int (*XIGetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window*);
+extern int (*XIGrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Window, Time, Cursor, int, int, int, XIEventMask*);
+extern int (*XIUngrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Time);
+extern int (*XIAllowEvents_dylibloader_wrapper_xinput2)( Display*, int, int, Time);
+extern int (*XIAllowTouchEvents_dylibloader_wrapper_xinput2)( Display*, int, unsigned int, Window, int);
+extern int (*XIGrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIGrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIGrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIGrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIGrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIUngrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
+extern int (*XIUngrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
+extern int (*XIUngrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+extern int (*XIUngrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+extern int (*XIUngrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+extern Atom* (*XIListProperties_dylibloader_wrapper_xinput2)( Display*, int, int*);
+extern void (*XIChangeProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, Atom, int, int, unsigned char*, int);
+extern void (*XIDeleteProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom);
+extern int (*XIGetProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+extern void (*XIBarrierReleasePointers_dylibloader_wrapper_xinput2)( Display*, XIBarrierReleasePointerInfo*, int);
+extern void (*XIBarrierReleasePointer_dylibloader_wrapper_xinput2)( Display*, int, PointerBarrier, BarrierEventID);
+extern void (*XIFreeDeviceInfo_dylibloader_wrapper_xinput2)( XIDeviceInfo*);
+int initialize_xinput2(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c
new file mode 100644
index 0000000000..12097a2987
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c
@@ -0,0 +1,6664 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:54:53
+// flags: ./generate-wrapper.py --include /usr/include/X11/Xlib.h --include /usr/include/X11/Xutil.h --include /usr/include/X11/XKBlib.h --sys-include <X11/Xlib.h> --sys-include <X11/Xutil.h> --sys-include <X11/XKBlib.h> --soname libX11.so.6 --init-name xlib --omit-prefix XkbGetDeviceIndicatorState --omit-prefix XkbAddSymInterpret --output-header xlib-so_wrap.h --output-implementation xlib-so_wrap.c
+//
+// NOTE: Generated from Xlib 1.6.9.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, the type of the third argument of
+// XIfEvent, XPeekIfEvent and XCheckIfEvent had to be fixed as it wasn't parsed
+// fully (it's a Bool function pointer, but it was just being parsed as an int
+// pointer).
+#include <stdint.h>
+
+#define _Xmblen _Xmblen_dylibloader_orig_xlib
+#define XLoadQueryFont XLoadQueryFont_dylibloader_orig_xlib
+#define XQueryFont XQueryFont_dylibloader_orig_xlib
+#define XGetMotionEvents XGetMotionEvents_dylibloader_orig_xlib
+#define XDeleteModifiermapEntry XDeleteModifiermapEntry_dylibloader_orig_xlib
+#define XGetModifierMapping XGetModifierMapping_dylibloader_orig_xlib
+#define XInsertModifiermapEntry XInsertModifiermapEntry_dylibloader_orig_xlib
+#define XNewModifiermap XNewModifiermap_dylibloader_orig_xlib
+#define XCreateImage XCreateImage_dylibloader_orig_xlib
+#define XInitImage XInitImage_dylibloader_orig_xlib
+#define XGetImage XGetImage_dylibloader_orig_xlib
+#define XGetSubImage XGetSubImage_dylibloader_orig_xlib
+#define XOpenDisplay XOpenDisplay_dylibloader_orig_xlib
+#define XrmInitialize XrmInitialize_dylibloader_orig_xlib
+#define XFetchBytes XFetchBytes_dylibloader_orig_xlib
+#define XFetchBuffer XFetchBuffer_dylibloader_orig_xlib
+#define XGetAtomName XGetAtomName_dylibloader_orig_xlib
+#define XGetAtomNames XGetAtomNames_dylibloader_orig_xlib
+#define XGetDefault XGetDefault_dylibloader_orig_xlib
+#define XDisplayName XDisplayName_dylibloader_orig_xlib
+#define XKeysymToString XKeysymToString_dylibloader_orig_xlib
+#define XSynchronize XSynchronize_dylibloader_orig_xlib
+#define XSetAfterFunction XSetAfterFunction_dylibloader_orig_xlib
+#define XInternAtom XInternAtom_dylibloader_orig_xlib
+#define XInternAtoms XInternAtoms_dylibloader_orig_xlib
+#define XCopyColormapAndFree XCopyColormapAndFree_dylibloader_orig_xlib
+#define XCreateColormap XCreateColormap_dylibloader_orig_xlib
+#define XCreatePixmapCursor XCreatePixmapCursor_dylibloader_orig_xlib
+#define XCreateGlyphCursor XCreateGlyphCursor_dylibloader_orig_xlib
+#define XCreateFontCursor XCreateFontCursor_dylibloader_orig_xlib
+#define XLoadFont XLoadFont_dylibloader_orig_xlib
+#define XCreateGC XCreateGC_dylibloader_orig_xlib
+#define XGContextFromGC XGContextFromGC_dylibloader_orig_xlib
+#define XFlushGC XFlushGC_dylibloader_orig_xlib
+#define XCreatePixmap XCreatePixmap_dylibloader_orig_xlib
+#define XCreateBitmapFromData XCreateBitmapFromData_dylibloader_orig_xlib
+#define XCreatePixmapFromBitmapData XCreatePixmapFromBitmapData_dylibloader_orig_xlib
+#define XCreateSimpleWindow XCreateSimpleWindow_dylibloader_orig_xlib
+#define XGetSelectionOwner XGetSelectionOwner_dylibloader_orig_xlib
+#define XCreateWindow XCreateWindow_dylibloader_orig_xlib
+#define XListInstalledColormaps XListInstalledColormaps_dylibloader_orig_xlib
+#define XListFonts XListFonts_dylibloader_orig_xlib
+#define XListFontsWithInfo XListFontsWithInfo_dylibloader_orig_xlib
+#define XGetFontPath XGetFontPath_dylibloader_orig_xlib
+#define XListExtensions XListExtensions_dylibloader_orig_xlib
+#define XListProperties XListProperties_dylibloader_orig_xlib
+#define XListHosts XListHosts_dylibloader_orig_xlib
+#define XKeycodeToKeysym XKeycodeToKeysym_dylibloader_orig_xlib
+#define XLookupKeysym XLookupKeysym_dylibloader_orig_xlib
+#define XGetKeyboardMapping XGetKeyboardMapping_dylibloader_orig_xlib
+#define XStringToKeysym XStringToKeysym_dylibloader_orig_xlib
+#define XMaxRequestSize XMaxRequestSize_dylibloader_orig_xlib
+#define XExtendedMaxRequestSize XExtendedMaxRequestSize_dylibloader_orig_xlib
+#define XResourceManagerString XResourceManagerString_dylibloader_orig_xlib
+#define XScreenResourceString XScreenResourceString_dylibloader_orig_xlib
+#define XDisplayMotionBufferSize XDisplayMotionBufferSize_dylibloader_orig_xlib
+#define XVisualIDFromVisual XVisualIDFromVisual_dylibloader_orig_xlib
+#define XInitThreads XInitThreads_dylibloader_orig_xlib
+#define XLockDisplay XLockDisplay_dylibloader_orig_xlib
+#define XUnlockDisplay XUnlockDisplay_dylibloader_orig_xlib
+#define XInitExtension XInitExtension_dylibloader_orig_xlib
+#define XAddExtension XAddExtension_dylibloader_orig_xlib
+#define XFindOnExtensionList XFindOnExtensionList_dylibloader_orig_xlib
+#define XEHeadOfExtensionList XEHeadOfExtensionList_dylibloader_orig_xlib
+#define XRootWindow XRootWindow_dylibloader_orig_xlib
+#define XDefaultRootWindow XDefaultRootWindow_dylibloader_orig_xlib
+#define XRootWindowOfScreen XRootWindowOfScreen_dylibloader_orig_xlib
+#define XDefaultVisual XDefaultVisual_dylibloader_orig_xlib
+#define XDefaultVisualOfScreen XDefaultVisualOfScreen_dylibloader_orig_xlib
+#define XDefaultGC XDefaultGC_dylibloader_orig_xlib
+#define XDefaultGCOfScreen XDefaultGCOfScreen_dylibloader_orig_xlib
+#define XBlackPixel XBlackPixel_dylibloader_orig_xlib
+#define XWhitePixel XWhitePixel_dylibloader_orig_xlib
+#define XAllPlanes XAllPlanes_dylibloader_orig_xlib
+#define XBlackPixelOfScreen XBlackPixelOfScreen_dylibloader_orig_xlib
+#define XWhitePixelOfScreen XWhitePixelOfScreen_dylibloader_orig_xlib
+#define XNextRequest XNextRequest_dylibloader_orig_xlib
+#define XLastKnownRequestProcessed XLastKnownRequestProcessed_dylibloader_orig_xlib
+#define XServerVendor XServerVendor_dylibloader_orig_xlib
+#define XDisplayString XDisplayString_dylibloader_orig_xlib
+#define XDefaultColormap XDefaultColormap_dylibloader_orig_xlib
+#define XDefaultColormapOfScreen XDefaultColormapOfScreen_dylibloader_orig_xlib
+#define XDisplayOfScreen XDisplayOfScreen_dylibloader_orig_xlib
+#define XScreenOfDisplay XScreenOfDisplay_dylibloader_orig_xlib
+#define XDefaultScreenOfDisplay XDefaultScreenOfDisplay_dylibloader_orig_xlib
+#define XEventMaskOfScreen XEventMaskOfScreen_dylibloader_orig_xlib
+#define XScreenNumberOfScreen XScreenNumberOfScreen_dylibloader_orig_xlib
+#define XSetErrorHandler XSetErrorHandler_dylibloader_orig_xlib
+#define XSetIOErrorHandler XSetIOErrorHandler_dylibloader_orig_xlib
+#define XListPixmapFormats XListPixmapFormats_dylibloader_orig_xlib
+#define XListDepths XListDepths_dylibloader_orig_xlib
+#define XReconfigureWMWindow XReconfigureWMWindow_dylibloader_orig_xlib
+#define XGetWMProtocols XGetWMProtocols_dylibloader_orig_xlib
+#define XSetWMProtocols XSetWMProtocols_dylibloader_orig_xlib
+#define XIconifyWindow XIconifyWindow_dylibloader_orig_xlib
+#define XWithdrawWindow XWithdrawWindow_dylibloader_orig_xlib
+#define XGetCommand XGetCommand_dylibloader_orig_xlib
+#define XGetWMColormapWindows XGetWMColormapWindows_dylibloader_orig_xlib
+#define XSetWMColormapWindows XSetWMColormapWindows_dylibloader_orig_xlib
+#define XFreeStringList XFreeStringList_dylibloader_orig_xlib
+#define XSetTransientForHint XSetTransientForHint_dylibloader_orig_xlib
+#define XActivateScreenSaver XActivateScreenSaver_dylibloader_orig_xlib
+#define XAddHost XAddHost_dylibloader_orig_xlib
+#define XAddHosts XAddHosts_dylibloader_orig_xlib
+#define XAddToExtensionList XAddToExtensionList_dylibloader_orig_xlib
+#define XAddToSaveSet XAddToSaveSet_dylibloader_orig_xlib
+#define XAllocColor XAllocColor_dylibloader_orig_xlib
+#define XAllocColorCells XAllocColorCells_dylibloader_orig_xlib
+#define XAllocColorPlanes XAllocColorPlanes_dylibloader_orig_xlib
+#define XAllocNamedColor XAllocNamedColor_dylibloader_orig_xlib
+#define XAllowEvents XAllowEvents_dylibloader_orig_xlib
+#define XAutoRepeatOff XAutoRepeatOff_dylibloader_orig_xlib
+#define XAutoRepeatOn XAutoRepeatOn_dylibloader_orig_xlib
+#define XBell XBell_dylibloader_orig_xlib
+#define XBitmapBitOrder XBitmapBitOrder_dylibloader_orig_xlib
+#define XBitmapPad XBitmapPad_dylibloader_orig_xlib
+#define XBitmapUnit XBitmapUnit_dylibloader_orig_xlib
+#define XCellsOfScreen XCellsOfScreen_dylibloader_orig_xlib
+#define XChangeActivePointerGrab XChangeActivePointerGrab_dylibloader_orig_xlib
+#define XChangeGC XChangeGC_dylibloader_orig_xlib
+#define XChangeKeyboardControl XChangeKeyboardControl_dylibloader_orig_xlib
+#define XChangeKeyboardMapping XChangeKeyboardMapping_dylibloader_orig_xlib
+#define XChangePointerControl XChangePointerControl_dylibloader_orig_xlib
+#define XChangeProperty XChangeProperty_dylibloader_orig_xlib
+#define XChangeSaveSet XChangeSaveSet_dylibloader_orig_xlib
+#define XChangeWindowAttributes XChangeWindowAttributes_dylibloader_orig_xlib
+#define XCheckIfEvent XCheckIfEvent_dylibloader_orig_xlib
+#define XCheckMaskEvent XCheckMaskEvent_dylibloader_orig_xlib
+#define XCheckTypedEvent XCheckTypedEvent_dylibloader_orig_xlib
+#define XCheckTypedWindowEvent XCheckTypedWindowEvent_dylibloader_orig_xlib
+#define XCheckWindowEvent XCheckWindowEvent_dylibloader_orig_xlib
+#define XCirculateSubwindows XCirculateSubwindows_dylibloader_orig_xlib
+#define XCirculateSubwindowsDown XCirculateSubwindowsDown_dylibloader_orig_xlib
+#define XCirculateSubwindowsUp XCirculateSubwindowsUp_dylibloader_orig_xlib
+#define XClearArea XClearArea_dylibloader_orig_xlib
+#define XClearWindow XClearWindow_dylibloader_orig_xlib
+#define XCloseDisplay XCloseDisplay_dylibloader_orig_xlib
+#define XConfigureWindow XConfigureWindow_dylibloader_orig_xlib
+#define XConnectionNumber XConnectionNumber_dylibloader_orig_xlib
+#define XConvertSelection XConvertSelection_dylibloader_orig_xlib
+#define XCopyArea XCopyArea_dylibloader_orig_xlib
+#define XCopyGC XCopyGC_dylibloader_orig_xlib
+#define XCopyPlane XCopyPlane_dylibloader_orig_xlib
+#define XDefaultDepth XDefaultDepth_dylibloader_orig_xlib
+#define XDefaultDepthOfScreen XDefaultDepthOfScreen_dylibloader_orig_xlib
+#define XDefaultScreen XDefaultScreen_dylibloader_orig_xlib
+#define XDefineCursor XDefineCursor_dylibloader_orig_xlib
+#define XDeleteProperty XDeleteProperty_dylibloader_orig_xlib
+#define XDestroyWindow XDestroyWindow_dylibloader_orig_xlib
+#define XDestroySubwindows XDestroySubwindows_dylibloader_orig_xlib
+#define XDoesBackingStore XDoesBackingStore_dylibloader_orig_xlib
+#define XDoesSaveUnders XDoesSaveUnders_dylibloader_orig_xlib
+#define XDisableAccessControl XDisableAccessControl_dylibloader_orig_xlib
+#define XDisplayCells XDisplayCells_dylibloader_orig_xlib
+#define XDisplayHeight XDisplayHeight_dylibloader_orig_xlib
+#define XDisplayHeightMM XDisplayHeightMM_dylibloader_orig_xlib
+#define XDisplayKeycodes XDisplayKeycodes_dylibloader_orig_xlib
+#define XDisplayPlanes XDisplayPlanes_dylibloader_orig_xlib
+#define XDisplayWidth XDisplayWidth_dylibloader_orig_xlib
+#define XDisplayWidthMM XDisplayWidthMM_dylibloader_orig_xlib
+#define XDrawArc XDrawArc_dylibloader_orig_xlib
+#define XDrawArcs XDrawArcs_dylibloader_orig_xlib
+#define XDrawImageString XDrawImageString_dylibloader_orig_xlib
+#define XDrawImageString16 XDrawImageString16_dylibloader_orig_xlib
+#define XDrawLine XDrawLine_dylibloader_orig_xlib
+#define XDrawLines XDrawLines_dylibloader_orig_xlib
+#define XDrawPoint XDrawPoint_dylibloader_orig_xlib
+#define XDrawPoints XDrawPoints_dylibloader_orig_xlib
+#define XDrawRectangle XDrawRectangle_dylibloader_orig_xlib
+#define XDrawRectangles XDrawRectangles_dylibloader_orig_xlib
+#define XDrawSegments XDrawSegments_dylibloader_orig_xlib
+#define XDrawString XDrawString_dylibloader_orig_xlib
+#define XDrawString16 XDrawString16_dylibloader_orig_xlib
+#define XDrawText XDrawText_dylibloader_orig_xlib
+#define XDrawText16 XDrawText16_dylibloader_orig_xlib
+#define XEnableAccessControl XEnableAccessControl_dylibloader_orig_xlib
+#define XEventsQueued XEventsQueued_dylibloader_orig_xlib
+#define XFetchName XFetchName_dylibloader_orig_xlib
+#define XFillArc XFillArc_dylibloader_orig_xlib
+#define XFillArcs XFillArcs_dylibloader_orig_xlib
+#define XFillPolygon XFillPolygon_dylibloader_orig_xlib
+#define XFillRectangle XFillRectangle_dylibloader_orig_xlib
+#define XFillRectangles XFillRectangles_dylibloader_orig_xlib
+#define XFlush XFlush_dylibloader_orig_xlib
+#define XForceScreenSaver XForceScreenSaver_dylibloader_orig_xlib
+#define XFree XFree_dylibloader_orig_xlib
+#define XFreeColormap XFreeColormap_dylibloader_orig_xlib
+#define XFreeColors XFreeColors_dylibloader_orig_xlib
+#define XFreeCursor XFreeCursor_dylibloader_orig_xlib
+#define XFreeExtensionList XFreeExtensionList_dylibloader_orig_xlib
+#define XFreeFont XFreeFont_dylibloader_orig_xlib
+#define XFreeFontInfo XFreeFontInfo_dylibloader_orig_xlib
+#define XFreeFontNames XFreeFontNames_dylibloader_orig_xlib
+#define XFreeFontPath XFreeFontPath_dylibloader_orig_xlib
+#define XFreeGC XFreeGC_dylibloader_orig_xlib
+#define XFreeModifiermap XFreeModifiermap_dylibloader_orig_xlib
+#define XFreePixmap XFreePixmap_dylibloader_orig_xlib
+#define XGeometry XGeometry_dylibloader_orig_xlib
+#define XGetErrorDatabaseText XGetErrorDatabaseText_dylibloader_orig_xlib
+#define XGetErrorText XGetErrorText_dylibloader_orig_xlib
+#define XGetFontProperty XGetFontProperty_dylibloader_orig_xlib
+#define XGetGCValues XGetGCValues_dylibloader_orig_xlib
+#define XGetGeometry XGetGeometry_dylibloader_orig_xlib
+#define XGetIconName XGetIconName_dylibloader_orig_xlib
+#define XGetInputFocus XGetInputFocus_dylibloader_orig_xlib
+#define XGetKeyboardControl XGetKeyboardControl_dylibloader_orig_xlib
+#define XGetPointerControl XGetPointerControl_dylibloader_orig_xlib
+#define XGetPointerMapping XGetPointerMapping_dylibloader_orig_xlib
+#define XGetScreenSaver XGetScreenSaver_dylibloader_orig_xlib
+#define XGetTransientForHint XGetTransientForHint_dylibloader_orig_xlib
+#define XGetWindowProperty XGetWindowProperty_dylibloader_orig_xlib
+#define XGetWindowAttributes XGetWindowAttributes_dylibloader_orig_xlib
+#define XGrabButton XGrabButton_dylibloader_orig_xlib
+#define XGrabKey XGrabKey_dylibloader_orig_xlib
+#define XGrabKeyboard XGrabKeyboard_dylibloader_orig_xlib
+#define XGrabPointer XGrabPointer_dylibloader_orig_xlib
+#define XGrabServer XGrabServer_dylibloader_orig_xlib
+#define XHeightMMOfScreen XHeightMMOfScreen_dylibloader_orig_xlib
+#define XHeightOfScreen XHeightOfScreen_dylibloader_orig_xlib
+#define XIfEvent XIfEvent_dylibloader_orig_xlib
+#define XImageByteOrder XImageByteOrder_dylibloader_orig_xlib
+#define XInstallColormap XInstallColormap_dylibloader_orig_xlib
+#define XKeysymToKeycode XKeysymToKeycode_dylibloader_orig_xlib
+#define XKillClient XKillClient_dylibloader_orig_xlib
+#define XLookupColor XLookupColor_dylibloader_orig_xlib
+#define XLowerWindow XLowerWindow_dylibloader_orig_xlib
+#define XMapRaised XMapRaised_dylibloader_orig_xlib
+#define XMapSubwindows XMapSubwindows_dylibloader_orig_xlib
+#define XMapWindow XMapWindow_dylibloader_orig_xlib
+#define XMaskEvent XMaskEvent_dylibloader_orig_xlib
+#define XMaxCmapsOfScreen XMaxCmapsOfScreen_dylibloader_orig_xlib
+#define XMinCmapsOfScreen XMinCmapsOfScreen_dylibloader_orig_xlib
+#define XMoveResizeWindow XMoveResizeWindow_dylibloader_orig_xlib
+#define XMoveWindow XMoveWindow_dylibloader_orig_xlib
+#define XNextEvent XNextEvent_dylibloader_orig_xlib
+#define XNoOp XNoOp_dylibloader_orig_xlib
+#define XParseColor XParseColor_dylibloader_orig_xlib
+#define XParseGeometry XParseGeometry_dylibloader_orig_xlib
+#define XPeekEvent XPeekEvent_dylibloader_orig_xlib
+#define XPeekIfEvent XPeekIfEvent_dylibloader_orig_xlib
+#define XPending XPending_dylibloader_orig_xlib
+#define XPlanesOfScreen XPlanesOfScreen_dylibloader_orig_xlib
+#define XProtocolRevision XProtocolRevision_dylibloader_orig_xlib
+#define XProtocolVersion XProtocolVersion_dylibloader_orig_xlib
+#define XPutBackEvent XPutBackEvent_dylibloader_orig_xlib
+#define XPutImage XPutImage_dylibloader_orig_xlib
+#define XQLength XQLength_dylibloader_orig_xlib
+#define XQueryBestCursor XQueryBestCursor_dylibloader_orig_xlib
+#define XQueryBestSize XQueryBestSize_dylibloader_orig_xlib
+#define XQueryBestStipple XQueryBestStipple_dylibloader_orig_xlib
+#define XQueryBestTile XQueryBestTile_dylibloader_orig_xlib
+#define XQueryColor XQueryColor_dylibloader_orig_xlib
+#define XQueryColors XQueryColors_dylibloader_orig_xlib
+#define XQueryExtension XQueryExtension_dylibloader_orig_xlib
+#define XQueryKeymap XQueryKeymap_dylibloader_orig_xlib
+#define XQueryPointer XQueryPointer_dylibloader_orig_xlib
+#define XQueryTextExtents XQueryTextExtents_dylibloader_orig_xlib
+#define XQueryTextExtents16 XQueryTextExtents16_dylibloader_orig_xlib
+#define XQueryTree XQueryTree_dylibloader_orig_xlib
+#define XRaiseWindow XRaiseWindow_dylibloader_orig_xlib
+#define XReadBitmapFile XReadBitmapFile_dylibloader_orig_xlib
+#define XReadBitmapFileData XReadBitmapFileData_dylibloader_orig_xlib
+#define XRebindKeysym XRebindKeysym_dylibloader_orig_xlib
+#define XRecolorCursor XRecolorCursor_dylibloader_orig_xlib
+#define XRefreshKeyboardMapping XRefreshKeyboardMapping_dylibloader_orig_xlib
+#define XRemoveFromSaveSet XRemoveFromSaveSet_dylibloader_orig_xlib
+#define XRemoveHost XRemoveHost_dylibloader_orig_xlib
+#define XRemoveHosts XRemoveHosts_dylibloader_orig_xlib
+#define XReparentWindow XReparentWindow_dylibloader_orig_xlib
+#define XResetScreenSaver XResetScreenSaver_dylibloader_orig_xlib
+#define XResizeWindow XResizeWindow_dylibloader_orig_xlib
+#define XRestackWindows XRestackWindows_dylibloader_orig_xlib
+#define XRotateBuffers XRotateBuffers_dylibloader_orig_xlib
+#define XRotateWindowProperties XRotateWindowProperties_dylibloader_orig_xlib
+#define XScreenCount XScreenCount_dylibloader_orig_xlib
+#define XSelectInput XSelectInput_dylibloader_orig_xlib
+#define XSendEvent XSendEvent_dylibloader_orig_xlib
+#define XSetAccessControl XSetAccessControl_dylibloader_orig_xlib
+#define XSetArcMode XSetArcMode_dylibloader_orig_xlib
+#define XSetBackground XSetBackground_dylibloader_orig_xlib
+#define XSetClipMask XSetClipMask_dylibloader_orig_xlib
+#define XSetClipOrigin XSetClipOrigin_dylibloader_orig_xlib
+#define XSetClipRectangles XSetClipRectangles_dylibloader_orig_xlib
+#define XSetCloseDownMode XSetCloseDownMode_dylibloader_orig_xlib
+#define XSetCommand XSetCommand_dylibloader_orig_xlib
+#define XSetDashes XSetDashes_dylibloader_orig_xlib
+#define XSetFillRule XSetFillRule_dylibloader_orig_xlib
+#define XSetFillStyle XSetFillStyle_dylibloader_orig_xlib
+#define XSetFont XSetFont_dylibloader_orig_xlib
+#define XSetFontPath XSetFontPath_dylibloader_orig_xlib
+#define XSetForeground XSetForeground_dylibloader_orig_xlib
+#define XSetFunction XSetFunction_dylibloader_orig_xlib
+#define XSetGraphicsExposures XSetGraphicsExposures_dylibloader_orig_xlib
+#define XSetIconName XSetIconName_dylibloader_orig_xlib
+#define XSetInputFocus XSetInputFocus_dylibloader_orig_xlib
+#define XSetLineAttributes XSetLineAttributes_dylibloader_orig_xlib
+#define XSetModifierMapping XSetModifierMapping_dylibloader_orig_xlib
+#define XSetPlaneMask XSetPlaneMask_dylibloader_orig_xlib
+#define XSetPointerMapping XSetPointerMapping_dylibloader_orig_xlib
+#define XSetScreenSaver XSetScreenSaver_dylibloader_orig_xlib
+#define XSetSelectionOwner XSetSelectionOwner_dylibloader_orig_xlib
+#define XSetState XSetState_dylibloader_orig_xlib
+#define XSetStipple XSetStipple_dylibloader_orig_xlib
+#define XSetSubwindowMode XSetSubwindowMode_dylibloader_orig_xlib
+#define XSetTSOrigin XSetTSOrigin_dylibloader_orig_xlib
+#define XSetTile XSetTile_dylibloader_orig_xlib
+#define XSetWindowBackground XSetWindowBackground_dylibloader_orig_xlib
+#define XSetWindowBackgroundPixmap XSetWindowBackgroundPixmap_dylibloader_orig_xlib
+#define XSetWindowBorder XSetWindowBorder_dylibloader_orig_xlib
+#define XSetWindowBorderPixmap XSetWindowBorderPixmap_dylibloader_orig_xlib
+#define XSetWindowBorderWidth XSetWindowBorderWidth_dylibloader_orig_xlib
+#define XSetWindowColormap XSetWindowColormap_dylibloader_orig_xlib
+#define XStoreBuffer XStoreBuffer_dylibloader_orig_xlib
+#define XStoreBytes XStoreBytes_dylibloader_orig_xlib
+#define XStoreColor XStoreColor_dylibloader_orig_xlib
+#define XStoreColors XStoreColors_dylibloader_orig_xlib
+#define XStoreName XStoreName_dylibloader_orig_xlib
+#define XStoreNamedColor XStoreNamedColor_dylibloader_orig_xlib
+#define XSync XSync_dylibloader_orig_xlib
+#define XTextExtents XTextExtents_dylibloader_orig_xlib
+#define XTextExtents16 XTextExtents16_dylibloader_orig_xlib
+#define XTextWidth XTextWidth_dylibloader_orig_xlib
+#define XTextWidth16 XTextWidth16_dylibloader_orig_xlib
+#define XTranslateCoordinates XTranslateCoordinates_dylibloader_orig_xlib
+#define XUndefineCursor XUndefineCursor_dylibloader_orig_xlib
+#define XUngrabButton XUngrabButton_dylibloader_orig_xlib
+#define XUngrabKey XUngrabKey_dylibloader_orig_xlib
+#define XUngrabKeyboard XUngrabKeyboard_dylibloader_orig_xlib
+#define XUngrabPointer XUngrabPointer_dylibloader_orig_xlib
+#define XUngrabServer XUngrabServer_dylibloader_orig_xlib
+#define XUninstallColormap XUninstallColormap_dylibloader_orig_xlib
+#define XUnloadFont XUnloadFont_dylibloader_orig_xlib
+#define XUnmapSubwindows XUnmapSubwindows_dylibloader_orig_xlib
+#define XUnmapWindow XUnmapWindow_dylibloader_orig_xlib
+#define XVendorRelease XVendorRelease_dylibloader_orig_xlib
+#define XWarpPointer XWarpPointer_dylibloader_orig_xlib
+#define XWidthMMOfScreen XWidthMMOfScreen_dylibloader_orig_xlib
+#define XWidthOfScreen XWidthOfScreen_dylibloader_orig_xlib
+#define XWindowEvent XWindowEvent_dylibloader_orig_xlib
+#define XWriteBitmapFile XWriteBitmapFile_dylibloader_orig_xlib
+#define XSupportsLocale XSupportsLocale_dylibloader_orig_xlib
+#define XSetLocaleModifiers XSetLocaleModifiers_dylibloader_orig_xlib
+#define XOpenOM XOpenOM_dylibloader_orig_xlib
+#define XCloseOM XCloseOM_dylibloader_orig_xlib
+#define XSetOMValues XSetOMValues_dylibloader_orig_xlib
+#define XGetOMValues XGetOMValues_dylibloader_orig_xlib
+#define XDisplayOfOM XDisplayOfOM_dylibloader_orig_xlib
+#define XLocaleOfOM XLocaleOfOM_dylibloader_orig_xlib
+#define XCreateOC XCreateOC_dylibloader_orig_xlib
+#define XDestroyOC XDestroyOC_dylibloader_orig_xlib
+#define XOMOfOC XOMOfOC_dylibloader_orig_xlib
+#define XSetOCValues XSetOCValues_dylibloader_orig_xlib
+#define XGetOCValues XGetOCValues_dylibloader_orig_xlib
+#define XCreateFontSet XCreateFontSet_dylibloader_orig_xlib
+#define XFreeFontSet XFreeFontSet_dylibloader_orig_xlib
+#define XFontsOfFontSet XFontsOfFontSet_dylibloader_orig_xlib
+#define XBaseFontNameListOfFontSet XBaseFontNameListOfFontSet_dylibloader_orig_xlib
+#define XLocaleOfFontSet XLocaleOfFontSet_dylibloader_orig_xlib
+#define XContextDependentDrawing XContextDependentDrawing_dylibloader_orig_xlib
+#define XDirectionalDependentDrawing XDirectionalDependentDrawing_dylibloader_orig_xlib
+#define XContextualDrawing XContextualDrawing_dylibloader_orig_xlib
+#define XExtentsOfFontSet XExtentsOfFontSet_dylibloader_orig_xlib
+#define XmbTextEscapement XmbTextEscapement_dylibloader_orig_xlib
+#define XwcTextEscapement XwcTextEscapement_dylibloader_orig_xlib
+#define Xutf8TextEscapement Xutf8TextEscapement_dylibloader_orig_xlib
+#define XmbTextExtents XmbTextExtents_dylibloader_orig_xlib
+#define XwcTextExtents XwcTextExtents_dylibloader_orig_xlib
+#define Xutf8TextExtents Xutf8TextExtents_dylibloader_orig_xlib
+#define XmbTextPerCharExtents XmbTextPerCharExtents_dylibloader_orig_xlib
+#define XwcTextPerCharExtents XwcTextPerCharExtents_dylibloader_orig_xlib
+#define Xutf8TextPerCharExtents Xutf8TextPerCharExtents_dylibloader_orig_xlib
+#define XmbDrawText XmbDrawText_dylibloader_orig_xlib
+#define XwcDrawText XwcDrawText_dylibloader_orig_xlib
+#define Xutf8DrawText Xutf8DrawText_dylibloader_orig_xlib
+#define XmbDrawString XmbDrawString_dylibloader_orig_xlib
+#define XwcDrawString XwcDrawString_dylibloader_orig_xlib
+#define Xutf8DrawString Xutf8DrawString_dylibloader_orig_xlib
+#define XmbDrawImageString XmbDrawImageString_dylibloader_orig_xlib
+#define XwcDrawImageString XwcDrawImageString_dylibloader_orig_xlib
+#define Xutf8DrawImageString Xutf8DrawImageString_dylibloader_orig_xlib
+#define XOpenIM XOpenIM_dylibloader_orig_xlib
+#define XCloseIM XCloseIM_dylibloader_orig_xlib
+#define XGetIMValues XGetIMValues_dylibloader_orig_xlib
+#define XSetIMValues XSetIMValues_dylibloader_orig_xlib
+#define XDisplayOfIM XDisplayOfIM_dylibloader_orig_xlib
+#define XLocaleOfIM XLocaleOfIM_dylibloader_orig_xlib
+#define XCreateIC XCreateIC_dylibloader_orig_xlib
+#define XDestroyIC XDestroyIC_dylibloader_orig_xlib
+#define XSetICFocus XSetICFocus_dylibloader_orig_xlib
+#define XUnsetICFocus XUnsetICFocus_dylibloader_orig_xlib
+#define XwcResetIC XwcResetIC_dylibloader_orig_xlib
+#define XmbResetIC XmbResetIC_dylibloader_orig_xlib
+#define Xutf8ResetIC Xutf8ResetIC_dylibloader_orig_xlib
+#define XSetICValues XSetICValues_dylibloader_orig_xlib
+#define XGetICValues XGetICValues_dylibloader_orig_xlib
+#define XIMOfIC XIMOfIC_dylibloader_orig_xlib
+#define XFilterEvent XFilterEvent_dylibloader_orig_xlib
+#define XmbLookupString XmbLookupString_dylibloader_orig_xlib
+#define XwcLookupString XwcLookupString_dylibloader_orig_xlib
+#define Xutf8LookupString Xutf8LookupString_dylibloader_orig_xlib
+#define XVaCreateNestedList XVaCreateNestedList_dylibloader_orig_xlib
+#define XRegisterIMInstantiateCallback XRegisterIMInstantiateCallback_dylibloader_orig_xlib
+#define XUnregisterIMInstantiateCallback XUnregisterIMInstantiateCallback_dylibloader_orig_xlib
+#define XInternalConnectionNumbers XInternalConnectionNumbers_dylibloader_orig_xlib
+#define XProcessInternalConnection XProcessInternalConnection_dylibloader_orig_xlib
+#define XAddConnectionWatch XAddConnectionWatch_dylibloader_orig_xlib
+#define XRemoveConnectionWatch XRemoveConnectionWatch_dylibloader_orig_xlib
+#define XSetAuthorization XSetAuthorization_dylibloader_orig_xlib
+#define _Xmbtowc _Xmbtowc_dylibloader_orig_xlib
+#define _Xwctomb _Xwctomb_dylibloader_orig_xlib
+#define XGetEventData XGetEventData_dylibloader_orig_xlib
+#define XFreeEventData XFreeEventData_dylibloader_orig_xlib
+#define XAllocClassHint XAllocClassHint_dylibloader_orig_xlib
+#define XAllocIconSize XAllocIconSize_dylibloader_orig_xlib
+#define XAllocSizeHints XAllocSizeHints_dylibloader_orig_xlib
+#define XAllocStandardColormap XAllocStandardColormap_dylibloader_orig_xlib
+#define XAllocWMHints XAllocWMHints_dylibloader_orig_xlib
+#define XClipBox XClipBox_dylibloader_orig_xlib
+#define XCreateRegion XCreateRegion_dylibloader_orig_xlib
+#define XDefaultString XDefaultString_dylibloader_orig_xlib
+#define XDeleteContext XDeleteContext_dylibloader_orig_xlib
+#define XDestroyRegion XDestroyRegion_dylibloader_orig_xlib
+#define XEmptyRegion XEmptyRegion_dylibloader_orig_xlib
+#define XEqualRegion XEqualRegion_dylibloader_orig_xlib
+#define XFindContext XFindContext_dylibloader_orig_xlib
+#define XGetClassHint XGetClassHint_dylibloader_orig_xlib
+#define XGetIconSizes XGetIconSizes_dylibloader_orig_xlib
+#define XGetNormalHints XGetNormalHints_dylibloader_orig_xlib
+#define XGetRGBColormaps XGetRGBColormaps_dylibloader_orig_xlib
+#define XGetSizeHints XGetSizeHints_dylibloader_orig_xlib
+#define XGetStandardColormap XGetStandardColormap_dylibloader_orig_xlib
+#define XGetTextProperty XGetTextProperty_dylibloader_orig_xlib
+#define XGetVisualInfo XGetVisualInfo_dylibloader_orig_xlib
+#define XGetWMClientMachine XGetWMClientMachine_dylibloader_orig_xlib
+#define XGetWMHints XGetWMHints_dylibloader_orig_xlib
+#define XGetWMIconName XGetWMIconName_dylibloader_orig_xlib
+#define XGetWMName XGetWMName_dylibloader_orig_xlib
+#define XGetWMNormalHints XGetWMNormalHints_dylibloader_orig_xlib
+#define XGetWMSizeHints XGetWMSizeHints_dylibloader_orig_xlib
+#define XGetZoomHints XGetZoomHints_dylibloader_orig_xlib
+#define XIntersectRegion XIntersectRegion_dylibloader_orig_xlib
+#define XConvertCase XConvertCase_dylibloader_orig_xlib
+#define XLookupString XLookupString_dylibloader_orig_xlib
+#define XMatchVisualInfo XMatchVisualInfo_dylibloader_orig_xlib
+#define XOffsetRegion XOffsetRegion_dylibloader_orig_xlib
+#define XPointInRegion XPointInRegion_dylibloader_orig_xlib
+#define XPolygonRegion XPolygonRegion_dylibloader_orig_xlib
+#define XRectInRegion XRectInRegion_dylibloader_orig_xlib
+#define XSaveContext XSaveContext_dylibloader_orig_xlib
+#define XSetClassHint XSetClassHint_dylibloader_orig_xlib
+#define XSetIconSizes XSetIconSizes_dylibloader_orig_xlib
+#define XSetNormalHints XSetNormalHints_dylibloader_orig_xlib
+#define XSetRGBColormaps XSetRGBColormaps_dylibloader_orig_xlib
+#define XSetSizeHints XSetSizeHints_dylibloader_orig_xlib
+#define XSetStandardProperties XSetStandardProperties_dylibloader_orig_xlib
+#define XSetTextProperty XSetTextProperty_dylibloader_orig_xlib
+#define XSetWMClientMachine XSetWMClientMachine_dylibloader_orig_xlib
+#define XSetWMHints XSetWMHints_dylibloader_orig_xlib
+#define XSetWMIconName XSetWMIconName_dylibloader_orig_xlib
+#define XSetWMName XSetWMName_dylibloader_orig_xlib
+#define XSetWMNormalHints XSetWMNormalHints_dylibloader_orig_xlib
+#define XSetWMProperties XSetWMProperties_dylibloader_orig_xlib
+#define XmbSetWMProperties XmbSetWMProperties_dylibloader_orig_xlib
+#define Xutf8SetWMProperties Xutf8SetWMProperties_dylibloader_orig_xlib
+#define XSetWMSizeHints XSetWMSizeHints_dylibloader_orig_xlib
+#define XSetRegion XSetRegion_dylibloader_orig_xlib
+#define XSetStandardColormap XSetStandardColormap_dylibloader_orig_xlib
+#define XSetZoomHints XSetZoomHints_dylibloader_orig_xlib
+#define XShrinkRegion XShrinkRegion_dylibloader_orig_xlib
+#define XStringListToTextProperty XStringListToTextProperty_dylibloader_orig_xlib
+#define XSubtractRegion XSubtractRegion_dylibloader_orig_xlib
+#define XmbTextListToTextProperty XmbTextListToTextProperty_dylibloader_orig_xlib
+#define XwcTextListToTextProperty XwcTextListToTextProperty_dylibloader_orig_xlib
+#define Xutf8TextListToTextProperty Xutf8TextListToTextProperty_dylibloader_orig_xlib
+#define XwcFreeStringList XwcFreeStringList_dylibloader_orig_xlib
+#define XTextPropertyToStringList XTextPropertyToStringList_dylibloader_orig_xlib
+#define XmbTextPropertyToTextList XmbTextPropertyToTextList_dylibloader_orig_xlib
+#define XwcTextPropertyToTextList XwcTextPropertyToTextList_dylibloader_orig_xlib
+#define Xutf8TextPropertyToTextList Xutf8TextPropertyToTextList_dylibloader_orig_xlib
+#define XUnionRectWithRegion XUnionRectWithRegion_dylibloader_orig_xlib
+#define XUnionRegion XUnionRegion_dylibloader_orig_xlib
+#define XWMGeometry XWMGeometry_dylibloader_orig_xlib
+#define XXorRegion XXorRegion_dylibloader_orig_xlib
+#define XkbIgnoreExtension XkbIgnoreExtension_dylibloader_orig_xlib
+#define XkbOpenDisplay XkbOpenDisplay_dylibloader_orig_xlib
+#define XkbQueryExtension XkbQueryExtension_dylibloader_orig_xlib
+#define XkbUseExtension XkbUseExtension_dylibloader_orig_xlib
+#define XkbLibraryVersion XkbLibraryVersion_dylibloader_orig_xlib
+#define XkbSetXlibControls XkbSetXlibControls_dylibloader_orig_xlib
+#define XkbGetXlibControls XkbGetXlibControls_dylibloader_orig_xlib
+#define XkbXlibControlsImplemented XkbXlibControlsImplemented_dylibloader_orig_xlib
+#define XkbSetAtomFuncs XkbSetAtomFuncs_dylibloader_orig_xlib
+#define XkbKeycodeToKeysym XkbKeycodeToKeysym_dylibloader_orig_xlib
+#define XkbKeysymToModifiers XkbKeysymToModifiers_dylibloader_orig_xlib
+#define XkbLookupKeySym XkbLookupKeySym_dylibloader_orig_xlib
+#define XkbLookupKeyBinding XkbLookupKeyBinding_dylibloader_orig_xlib
+#define XkbTranslateKeyCode XkbTranslateKeyCode_dylibloader_orig_xlib
+#define XkbTranslateKeySym XkbTranslateKeySym_dylibloader_orig_xlib
+#define XkbSetAutoRepeatRate XkbSetAutoRepeatRate_dylibloader_orig_xlib
+#define XkbGetAutoRepeatRate XkbGetAutoRepeatRate_dylibloader_orig_xlib
+#define XkbChangeEnabledControls XkbChangeEnabledControls_dylibloader_orig_xlib
+#define XkbDeviceBell XkbDeviceBell_dylibloader_orig_xlib
+#define XkbForceDeviceBell XkbForceDeviceBell_dylibloader_orig_xlib
+#define XkbDeviceBellEvent XkbDeviceBellEvent_dylibloader_orig_xlib
+#define XkbBell XkbBell_dylibloader_orig_xlib
+#define XkbForceBell XkbForceBell_dylibloader_orig_xlib
+#define XkbBellEvent XkbBellEvent_dylibloader_orig_xlib
+#define XkbSelectEvents XkbSelectEvents_dylibloader_orig_xlib
+#define XkbSelectEventDetails XkbSelectEventDetails_dylibloader_orig_xlib
+#define XkbNoteMapChanges XkbNoteMapChanges_dylibloader_orig_xlib
+#define XkbNoteNameChanges XkbNoteNameChanges_dylibloader_orig_xlib
+#define XkbGetIndicatorState XkbGetIndicatorState_dylibloader_orig_xlib
+#define XkbGetIndicatorMap XkbGetIndicatorMap_dylibloader_orig_xlib
+#define XkbSetIndicatorMap XkbSetIndicatorMap_dylibloader_orig_xlib
+#define XkbGetNamedIndicator XkbGetNamedIndicator_dylibloader_orig_xlib
+#define XkbGetNamedDeviceIndicator XkbGetNamedDeviceIndicator_dylibloader_orig_xlib
+#define XkbSetNamedIndicator XkbSetNamedIndicator_dylibloader_orig_xlib
+#define XkbSetNamedDeviceIndicator XkbSetNamedDeviceIndicator_dylibloader_orig_xlib
+#define XkbLockModifiers XkbLockModifiers_dylibloader_orig_xlib
+#define XkbLatchModifiers XkbLatchModifiers_dylibloader_orig_xlib
+#define XkbLockGroup XkbLockGroup_dylibloader_orig_xlib
+#define XkbLatchGroup XkbLatchGroup_dylibloader_orig_xlib
+#define XkbSetServerInternalMods XkbSetServerInternalMods_dylibloader_orig_xlib
+#define XkbSetIgnoreLockMods XkbSetIgnoreLockMods_dylibloader_orig_xlib
+#define XkbVirtualModsToReal XkbVirtualModsToReal_dylibloader_orig_xlib
+#define XkbComputeEffectiveMap XkbComputeEffectiveMap_dylibloader_orig_xlib
+#define XkbInitCanonicalKeyTypes XkbInitCanonicalKeyTypes_dylibloader_orig_xlib
+#define XkbAllocKeyboard XkbAllocKeyboard_dylibloader_orig_xlib
+#define XkbFreeKeyboard XkbFreeKeyboard_dylibloader_orig_xlib
+#define XkbAllocClientMap XkbAllocClientMap_dylibloader_orig_xlib
+#define XkbAllocServerMap XkbAllocServerMap_dylibloader_orig_xlib
+#define XkbFreeClientMap XkbFreeClientMap_dylibloader_orig_xlib
+#define XkbFreeServerMap XkbFreeServerMap_dylibloader_orig_xlib
+#define XkbAddKeyType XkbAddKeyType_dylibloader_orig_xlib
+#define XkbAllocIndicatorMaps XkbAllocIndicatorMaps_dylibloader_orig_xlib
+#define XkbFreeIndicatorMaps XkbFreeIndicatorMaps_dylibloader_orig_xlib
+#define XkbGetMap XkbGetMap_dylibloader_orig_xlib
+#define XkbGetUpdatedMap XkbGetUpdatedMap_dylibloader_orig_xlib
+#define XkbGetMapChanges XkbGetMapChanges_dylibloader_orig_xlib
+#define XkbRefreshKeyboardMapping XkbRefreshKeyboardMapping_dylibloader_orig_xlib
+#define XkbGetKeyTypes XkbGetKeyTypes_dylibloader_orig_xlib
+#define XkbGetKeySyms XkbGetKeySyms_dylibloader_orig_xlib
+#define XkbGetKeyActions XkbGetKeyActions_dylibloader_orig_xlib
+#define XkbGetKeyBehaviors XkbGetKeyBehaviors_dylibloader_orig_xlib
+#define XkbGetVirtualMods XkbGetVirtualMods_dylibloader_orig_xlib
+#define XkbGetKeyExplicitComponents XkbGetKeyExplicitComponents_dylibloader_orig_xlib
+#define XkbGetKeyModifierMap XkbGetKeyModifierMap_dylibloader_orig_xlib
+#define XkbGetKeyVirtualModMap XkbGetKeyVirtualModMap_dylibloader_orig_xlib
+#define XkbAllocControls XkbAllocControls_dylibloader_orig_xlib
+#define XkbFreeControls XkbFreeControls_dylibloader_orig_xlib
+#define XkbGetControls XkbGetControls_dylibloader_orig_xlib
+#define XkbSetControls XkbSetControls_dylibloader_orig_xlib
+#define XkbNoteControlsChanges XkbNoteControlsChanges_dylibloader_orig_xlib
+#define XkbAllocCompatMap XkbAllocCompatMap_dylibloader_orig_xlib
+#define XkbFreeCompatMap XkbFreeCompatMap_dylibloader_orig_xlib
+#define XkbGetCompatMap XkbGetCompatMap_dylibloader_orig_xlib
+#define XkbSetCompatMap XkbSetCompatMap_dylibloader_orig_xlib
+#define XkbAllocNames XkbAllocNames_dylibloader_orig_xlib
+#define XkbGetNames XkbGetNames_dylibloader_orig_xlib
+#define XkbSetNames XkbSetNames_dylibloader_orig_xlib
+#define XkbChangeNames XkbChangeNames_dylibloader_orig_xlib
+#define XkbFreeNames XkbFreeNames_dylibloader_orig_xlib
+#define XkbGetState XkbGetState_dylibloader_orig_xlib
+#define XkbSetMap XkbSetMap_dylibloader_orig_xlib
+#define XkbChangeMap XkbChangeMap_dylibloader_orig_xlib
+#define XkbSetDetectableAutoRepeat XkbSetDetectableAutoRepeat_dylibloader_orig_xlib
+#define XkbGetDetectableAutoRepeat XkbGetDetectableAutoRepeat_dylibloader_orig_xlib
+#define XkbSetAutoResetControls XkbSetAutoResetControls_dylibloader_orig_xlib
+#define XkbGetAutoResetControls XkbGetAutoResetControls_dylibloader_orig_xlib
+#define XkbSetPerClientControls XkbSetPerClientControls_dylibloader_orig_xlib
+#define XkbGetPerClientControls XkbGetPerClientControls_dylibloader_orig_xlib
+#define XkbCopyKeyType XkbCopyKeyType_dylibloader_orig_xlib
+#define XkbCopyKeyTypes XkbCopyKeyTypes_dylibloader_orig_xlib
+#define XkbResizeKeyType XkbResizeKeyType_dylibloader_orig_xlib
+#define XkbResizeKeySyms XkbResizeKeySyms_dylibloader_orig_xlib
+#define XkbResizeKeyActions XkbResizeKeyActions_dylibloader_orig_xlib
+#define XkbChangeTypesOfKey XkbChangeTypesOfKey_dylibloader_orig_xlib
+#define XkbChangeKeycodeRange XkbChangeKeycodeRange_dylibloader_orig_xlib
+#define XkbListComponents XkbListComponents_dylibloader_orig_xlib
+#define XkbFreeComponentList XkbFreeComponentList_dylibloader_orig_xlib
+#define XkbGetKeyboard XkbGetKeyboard_dylibloader_orig_xlib
+#define XkbGetKeyboardByName XkbGetKeyboardByName_dylibloader_orig_xlib
+#define XkbKeyTypesForCoreSymbols XkbKeyTypesForCoreSymbols_dylibloader_orig_xlib
+#define XkbApplyCompatMapToKey XkbApplyCompatMapToKey_dylibloader_orig_xlib
+#define XkbUpdateMapFromCore XkbUpdateMapFromCore_dylibloader_orig_xlib
+#define XkbAddDeviceLedInfo XkbAddDeviceLedInfo_dylibloader_orig_xlib
+#define XkbResizeDeviceButtonActions XkbResizeDeviceButtonActions_dylibloader_orig_xlib
+#define XkbAllocDeviceInfo XkbAllocDeviceInfo_dylibloader_orig_xlib
+#define XkbFreeDeviceInfo XkbFreeDeviceInfo_dylibloader_orig_xlib
+#define XkbNoteDeviceChanges XkbNoteDeviceChanges_dylibloader_orig_xlib
+#define XkbGetDeviceInfo XkbGetDeviceInfo_dylibloader_orig_xlib
+#define XkbGetDeviceInfoChanges XkbGetDeviceInfoChanges_dylibloader_orig_xlib
+#define XkbGetDeviceButtonActions XkbGetDeviceButtonActions_dylibloader_orig_xlib
+#define XkbGetDeviceLedInfo XkbGetDeviceLedInfo_dylibloader_orig_xlib
+#define XkbSetDeviceInfo XkbSetDeviceInfo_dylibloader_orig_xlib
+#define XkbChangeDeviceInfo XkbChangeDeviceInfo_dylibloader_orig_xlib
+#define XkbSetDeviceLedInfo XkbSetDeviceLedInfo_dylibloader_orig_xlib
+#define XkbSetDeviceButtonActions XkbSetDeviceButtonActions_dylibloader_orig_xlib
+#define XkbToControl XkbToControl_dylibloader_orig_xlib
+#define XkbSetDebuggingFlags XkbSetDebuggingFlags_dylibloader_orig_xlib
+#define XkbApplyVirtualModChanges XkbApplyVirtualModChanges_dylibloader_orig_xlib
+#define XkbUpdateActionVirtualMods XkbUpdateActionVirtualMods_dylibloader_orig_xlib
+#define XkbUpdateKeyTypeVirtualMods XkbUpdateKeyTypeVirtualMods_dylibloader_orig_xlib
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/XKBlib.h>
+#undef _Xmblen
+#undef XLoadQueryFont
+#undef XQueryFont
+#undef XGetMotionEvents
+#undef XDeleteModifiermapEntry
+#undef XGetModifierMapping
+#undef XInsertModifiermapEntry
+#undef XNewModifiermap
+#undef XCreateImage
+#undef XInitImage
+#undef XGetImage
+#undef XGetSubImage
+#undef XOpenDisplay
+#undef XrmInitialize
+#undef XFetchBytes
+#undef XFetchBuffer
+#undef XGetAtomName
+#undef XGetAtomNames
+#undef XGetDefault
+#undef XDisplayName
+#undef XKeysymToString
+#undef XSynchronize
+#undef XSetAfterFunction
+#undef XInternAtom
+#undef XInternAtoms
+#undef XCopyColormapAndFree
+#undef XCreateColormap
+#undef XCreatePixmapCursor
+#undef XCreateGlyphCursor
+#undef XCreateFontCursor
+#undef XLoadFont
+#undef XCreateGC
+#undef XGContextFromGC
+#undef XFlushGC
+#undef XCreatePixmap
+#undef XCreateBitmapFromData
+#undef XCreatePixmapFromBitmapData
+#undef XCreateSimpleWindow
+#undef XGetSelectionOwner
+#undef XCreateWindow
+#undef XListInstalledColormaps
+#undef XListFonts
+#undef XListFontsWithInfo
+#undef XGetFontPath
+#undef XListExtensions
+#undef XListProperties
+#undef XListHosts
+#undef XKeycodeToKeysym
+#undef XLookupKeysym
+#undef XGetKeyboardMapping
+#undef XStringToKeysym
+#undef XMaxRequestSize
+#undef XExtendedMaxRequestSize
+#undef XResourceManagerString
+#undef XScreenResourceString
+#undef XDisplayMotionBufferSize
+#undef XVisualIDFromVisual
+#undef XInitThreads
+#undef XLockDisplay
+#undef XUnlockDisplay
+#undef XInitExtension
+#undef XAddExtension
+#undef XFindOnExtensionList
+#undef XEHeadOfExtensionList
+#undef XRootWindow
+#undef XDefaultRootWindow
+#undef XRootWindowOfScreen
+#undef XDefaultVisual
+#undef XDefaultVisualOfScreen
+#undef XDefaultGC
+#undef XDefaultGCOfScreen
+#undef XBlackPixel
+#undef XWhitePixel
+#undef XAllPlanes
+#undef XBlackPixelOfScreen
+#undef XWhitePixelOfScreen
+#undef XNextRequest
+#undef XLastKnownRequestProcessed
+#undef XServerVendor
+#undef XDisplayString
+#undef XDefaultColormap
+#undef XDefaultColormapOfScreen
+#undef XDisplayOfScreen
+#undef XScreenOfDisplay
+#undef XDefaultScreenOfDisplay
+#undef XEventMaskOfScreen
+#undef XScreenNumberOfScreen
+#undef XSetErrorHandler
+#undef XSetIOErrorHandler
+#undef XListPixmapFormats
+#undef XListDepths
+#undef XReconfigureWMWindow
+#undef XGetWMProtocols
+#undef XSetWMProtocols
+#undef XIconifyWindow
+#undef XWithdrawWindow
+#undef XGetCommand
+#undef XGetWMColormapWindows
+#undef XSetWMColormapWindows
+#undef XFreeStringList
+#undef XSetTransientForHint
+#undef XActivateScreenSaver
+#undef XAddHost
+#undef XAddHosts
+#undef XAddToExtensionList
+#undef XAddToSaveSet
+#undef XAllocColor
+#undef XAllocColorCells
+#undef XAllocColorPlanes
+#undef XAllocNamedColor
+#undef XAllowEvents
+#undef XAutoRepeatOff
+#undef XAutoRepeatOn
+#undef XBell
+#undef XBitmapBitOrder
+#undef XBitmapPad
+#undef XBitmapUnit
+#undef XCellsOfScreen
+#undef XChangeActivePointerGrab
+#undef XChangeGC
+#undef XChangeKeyboardControl
+#undef XChangeKeyboardMapping
+#undef XChangePointerControl
+#undef XChangeProperty
+#undef XChangeSaveSet
+#undef XChangeWindowAttributes
+#undef XCheckIfEvent
+#undef XCheckMaskEvent
+#undef XCheckTypedEvent
+#undef XCheckTypedWindowEvent
+#undef XCheckWindowEvent
+#undef XCirculateSubwindows
+#undef XCirculateSubwindowsDown
+#undef XCirculateSubwindowsUp
+#undef XClearArea
+#undef XClearWindow
+#undef XCloseDisplay
+#undef XConfigureWindow
+#undef XConnectionNumber
+#undef XConvertSelection
+#undef XCopyArea
+#undef XCopyGC
+#undef XCopyPlane
+#undef XDefaultDepth
+#undef XDefaultDepthOfScreen
+#undef XDefaultScreen
+#undef XDefineCursor
+#undef XDeleteProperty
+#undef XDestroyWindow
+#undef XDestroySubwindows
+#undef XDoesBackingStore
+#undef XDoesSaveUnders
+#undef XDisableAccessControl
+#undef XDisplayCells
+#undef XDisplayHeight
+#undef XDisplayHeightMM
+#undef XDisplayKeycodes
+#undef XDisplayPlanes
+#undef XDisplayWidth
+#undef XDisplayWidthMM
+#undef XDrawArc
+#undef XDrawArcs
+#undef XDrawImageString
+#undef XDrawImageString16
+#undef XDrawLine
+#undef XDrawLines
+#undef XDrawPoint
+#undef XDrawPoints
+#undef XDrawRectangle
+#undef XDrawRectangles
+#undef XDrawSegments
+#undef XDrawString
+#undef XDrawString16
+#undef XDrawText
+#undef XDrawText16
+#undef XEnableAccessControl
+#undef XEventsQueued
+#undef XFetchName
+#undef XFillArc
+#undef XFillArcs
+#undef XFillPolygon
+#undef XFillRectangle
+#undef XFillRectangles
+#undef XFlush
+#undef XForceScreenSaver
+#undef XFree
+#undef XFreeColormap
+#undef XFreeColors
+#undef XFreeCursor
+#undef XFreeExtensionList
+#undef XFreeFont
+#undef XFreeFontInfo
+#undef XFreeFontNames
+#undef XFreeFontPath
+#undef XFreeGC
+#undef XFreeModifiermap
+#undef XFreePixmap
+#undef XGeometry
+#undef XGetErrorDatabaseText
+#undef XGetErrorText
+#undef XGetFontProperty
+#undef XGetGCValues
+#undef XGetGeometry
+#undef XGetIconName
+#undef XGetInputFocus
+#undef XGetKeyboardControl
+#undef XGetPointerControl
+#undef XGetPointerMapping
+#undef XGetScreenSaver
+#undef XGetTransientForHint
+#undef XGetWindowProperty
+#undef XGetWindowAttributes
+#undef XGrabButton
+#undef XGrabKey
+#undef XGrabKeyboard
+#undef XGrabPointer
+#undef XGrabServer
+#undef XHeightMMOfScreen
+#undef XHeightOfScreen
+#undef XIfEvent
+#undef XImageByteOrder
+#undef XInstallColormap
+#undef XKeysymToKeycode
+#undef XKillClient
+#undef XLookupColor
+#undef XLowerWindow
+#undef XMapRaised
+#undef XMapSubwindows
+#undef XMapWindow
+#undef XMaskEvent
+#undef XMaxCmapsOfScreen
+#undef XMinCmapsOfScreen
+#undef XMoveResizeWindow
+#undef XMoveWindow
+#undef XNextEvent
+#undef XNoOp
+#undef XParseColor
+#undef XParseGeometry
+#undef XPeekEvent
+#undef XPeekIfEvent
+#undef XPending
+#undef XPlanesOfScreen
+#undef XProtocolRevision
+#undef XProtocolVersion
+#undef XPutBackEvent
+#undef XPutImage
+#undef XQLength
+#undef XQueryBestCursor
+#undef XQueryBestSize
+#undef XQueryBestStipple
+#undef XQueryBestTile
+#undef XQueryColor
+#undef XQueryColors
+#undef XQueryExtension
+#undef XQueryKeymap
+#undef XQueryPointer
+#undef XQueryTextExtents
+#undef XQueryTextExtents16
+#undef XQueryTree
+#undef XRaiseWindow
+#undef XReadBitmapFile
+#undef XReadBitmapFileData
+#undef XRebindKeysym
+#undef XRecolorCursor
+#undef XRefreshKeyboardMapping
+#undef XRemoveFromSaveSet
+#undef XRemoveHost
+#undef XRemoveHosts
+#undef XReparentWindow
+#undef XResetScreenSaver
+#undef XResizeWindow
+#undef XRestackWindows
+#undef XRotateBuffers
+#undef XRotateWindowProperties
+#undef XScreenCount
+#undef XSelectInput
+#undef XSendEvent
+#undef XSetAccessControl
+#undef XSetArcMode
+#undef XSetBackground
+#undef XSetClipMask
+#undef XSetClipOrigin
+#undef XSetClipRectangles
+#undef XSetCloseDownMode
+#undef XSetCommand
+#undef XSetDashes
+#undef XSetFillRule
+#undef XSetFillStyle
+#undef XSetFont
+#undef XSetFontPath
+#undef XSetForeground
+#undef XSetFunction
+#undef XSetGraphicsExposures
+#undef XSetIconName
+#undef XSetInputFocus
+#undef XSetLineAttributes
+#undef XSetModifierMapping
+#undef XSetPlaneMask
+#undef XSetPointerMapping
+#undef XSetScreenSaver
+#undef XSetSelectionOwner
+#undef XSetState
+#undef XSetStipple
+#undef XSetSubwindowMode
+#undef XSetTSOrigin
+#undef XSetTile
+#undef XSetWindowBackground
+#undef XSetWindowBackgroundPixmap
+#undef XSetWindowBorder
+#undef XSetWindowBorderPixmap
+#undef XSetWindowBorderWidth
+#undef XSetWindowColormap
+#undef XStoreBuffer
+#undef XStoreBytes
+#undef XStoreColor
+#undef XStoreColors
+#undef XStoreName
+#undef XStoreNamedColor
+#undef XSync
+#undef XTextExtents
+#undef XTextExtents16
+#undef XTextWidth
+#undef XTextWidth16
+#undef XTranslateCoordinates
+#undef XUndefineCursor
+#undef XUngrabButton
+#undef XUngrabKey
+#undef XUngrabKeyboard
+#undef XUngrabPointer
+#undef XUngrabServer
+#undef XUninstallColormap
+#undef XUnloadFont
+#undef XUnmapSubwindows
+#undef XUnmapWindow
+#undef XVendorRelease
+#undef XWarpPointer
+#undef XWidthMMOfScreen
+#undef XWidthOfScreen
+#undef XWindowEvent
+#undef XWriteBitmapFile
+#undef XSupportsLocale
+#undef XSetLocaleModifiers
+#undef XOpenOM
+#undef XCloseOM
+#undef XSetOMValues
+#undef XGetOMValues
+#undef XDisplayOfOM
+#undef XLocaleOfOM
+#undef XCreateOC
+#undef XDestroyOC
+#undef XOMOfOC
+#undef XSetOCValues
+#undef XGetOCValues
+#undef XCreateFontSet
+#undef XFreeFontSet
+#undef XFontsOfFontSet
+#undef XBaseFontNameListOfFontSet
+#undef XLocaleOfFontSet
+#undef XContextDependentDrawing
+#undef XDirectionalDependentDrawing
+#undef XContextualDrawing
+#undef XExtentsOfFontSet
+#undef XmbTextEscapement
+#undef XwcTextEscapement
+#undef Xutf8TextEscapement
+#undef XmbTextExtents
+#undef XwcTextExtents
+#undef Xutf8TextExtents
+#undef XmbTextPerCharExtents
+#undef XwcTextPerCharExtents
+#undef Xutf8TextPerCharExtents
+#undef XmbDrawText
+#undef XwcDrawText
+#undef Xutf8DrawText
+#undef XmbDrawString
+#undef XwcDrawString
+#undef Xutf8DrawString
+#undef XmbDrawImageString
+#undef XwcDrawImageString
+#undef Xutf8DrawImageString
+#undef XOpenIM
+#undef XCloseIM
+#undef XGetIMValues
+#undef XSetIMValues
+#undef XDisplayOfIM
+#undef XLocaleOfIM
+#undef XCreateIC
+#undef XDestroyIC
+#undef XSetICFocus
+#undef XUnsetICFocus
+#undef XwcResetIC
+#undef XmbResetIC
+#undef Xutf8ResetIC
+#undef XSetICValues
+#undef XGetICValues
+#undef XIMOfIC
+#undef XFilterEvent
+#undef XmbLookupString
+#undef XwcLookupString
+#undef Xutf8LookupString
+#undef XVaCreateNestedList
+#undef XRegisterIMInstantiateCallback
+#undef XUnregisterIMInstantiateCallback
+#undef XInternalConnectionNumbers
+#undef XProcessInternalConnection
+#undef XAddConnectionWatch
+#undef XRemoveConnectionWatch
+#undef XSetAuthorization
+#undef _Xmbtowc
+#undef _Xwctomb
+#undef XGetEventData
+#undef XFreeEventData
+#undef XAllocClassHint
+#undef XAllocIconSize
+#undef XAllocSizeHints
+#undef XAllocStandardColormap
+#undef XAllocWMHints
+#undef XClipBox
+#undef XCreateRegion
+#undef XDefaultString
+#undef XDeleteContext
+#undef XDestroyRegion
+#undef XEmptyRegion
+#undef XEqualRegion
+#undef XFindContext
+#undef XGetClassHint
+#undef XGetIconSizes
+#undef XGetNormalHints
+#undef XGetRGBColormaps
+#undef XGetSizeHints
+#undef XGetStandardColormap
+#undef XGetTextProperty
+#undef XGetVisualInfo
+#undef XGetWMClientMachine
+#undef XGetWMHints
+#undef XGetWMIconName
+#undef XGetWMName
+#undef XGetWMNormalHints
+#undef XGetWMSizeHints
+#undef XGetZoomHints
+#undef XIntersectRegion
+#undef XConvertCase
+#undef XLookupString
+#undef XMatchVisualInfo
+#undef XOffsetRegion
+#undef XPointInRegion
+#undef XPolygonRegion
+#undef XRectInRegion
+#undef XSaveContext
+#undef XSetClassHint
+#undef XSetIconSizes
+#undef XSetNormalHints
+#undef XSetRGBColormaps
+#undef XSetSizeHints
+#undef XSetStandardProperties
+#undef XSetTextProperty
+#undef XSetWMClientMachine
+#undef XSetWMHints
+#undef XSetWMIconName
+#undef XSetWMName
+#undef XSetWMNormalHints
+#undef XSetWMProperties
+#undef XmbSetWMProperties
+#undef Xutf8SetWMProperties
+#undef XSetWMSizeHints
+#undef XSetRegion
+#undef XSetStandardColormap
+#undef XSetZoomHints
+#undef XShrinkRegion
+#undef XStringListToTextProperty
+#undef XSubtractRegion
+#undef XmbTextListToTextProperty
+#undef XwcTextListToTextProperty
+#undef Xutf8TextListToTextProperty
+#undef XwcFreeStringList
+#undef XTextPropertyToStringList
+#undef XmbTextPropertyToTextList
+#undef XwcTextPropertyToTextList
+#undef Xutf8TextPropertyToTextList
+#undef XUnionRectWithRegion
+#undef XUnionRegion
+#undef XWMGeometry
+#undef XXorRegion
+#undef XkbIgnoreExtension
+#undef XkbOpenDisplay
+#undef XkbQueryExtension
+#undef XkbUseExtension
+#undef XkbLibraryVersion
+#undef XkbSetXlibControls
+#undef XkbGetXlibControls
+#undef XkbXlibControlsImplemented
+#undef XkbSetAtomFuncs
+#undef XkbKeycodeToKeysym
+#undef XkbKeysymToModifiers
+#undef XkbLookupKeySym
+#undef XkbLookupKeyBinding
+#undef XkbTranslateKeyCode
+#undef XkbTranslateKeySym
+#undef XkbSetAutoRepeatRate
+#undef XkbGetAutoRepeatRate
+#undef XkbChangeEnabledControls
+#undef XkbDeviceBell
+#undef XkbForceDeviceBell
+#undef XkbDeviceBellEvent
+#undef XkbBell
+#undef XkbForceBell
+#undef XkbBellEvent
+#undef XkbSelectEvents
+#undef XkbSelectEventDetails
+#undef XkbNoteMapChanges
+#undef XkbNoteNameChanges
+#undef XkbGetIndicatorState
+#undef XkbGetIndicatorMap
+#undef XkbSetIndicatorMap
+#undef XkbGetNamedIndicator
+#undef XkbGetNamedDeviceIndicator
+#undef XkbSetNamedIndicator
+#undef XkbSetNamedDeviceIndicator
+#undef XkbLockModifiers
+#undef XkbLatchModifiers
+#undef XkbLockGroup
+#undef XkbLatchGroup
+#undef XkbSetServerInternalMods
+#undef XkbSetIgnoreLockMods
+#undef XkbVirtualModsToReal
+#undef XkbComputeEffectiveMap
+#undef XkbInitCanonicalKeyTypes
+#undef XkbAllocKeyboard
+#undef XkbFreeKeyboard
+#undef XkbAllocClientMap
+#undef XkbAllocServerMap
+#undef XkbFreeClientMap
+#undef XkbFreeServerMap
+#undef XkbAddKeyType
+#undef XkbAllocIndicatorMaps
+#undef XkbFreeIndicatorMaps
+#undef XkbGetMap
+#undef XkbGetUpdatedMap
+#undef XkbGetMapChanges
+#undef XkbRefreshKeyboardMapping
+#undef XkbGetKeyTypes
+#undef XkbGetKeySyms
+#undef XkbGetKeyActions
+#undef XkbGetKeyBehaviors
+#undef XkbGetVirtualMods
+#undef XkbGetKeyExplicitComponents
+#undef XkbGetKeyModifierMap
+#undef XkbGetKeyVirtualModMap
+#undef XkbAllocControls
+#undef XkbFreeControls
+#undef XkbGetControls
+#undef XkbSetControls
+#undef XkbNoteControlsChanges
+#undef XkbAllocCompatMap
+#undef XkbFreeCompatMap
+#undef XkbGetCompatMap
+#undef XkbSetCompatMap
+#undef XkbAllocNames
+#undef XkbGetNames
+#undef XkbSetNames
+#undef XkbChangeNames
+#undef XkbFreeNames
+#undef XkbGetState
+#undef XkbSetMap
+#undef XkbChangeMap
+#undef XkbSetDetectableAutoRepeat
+#undef XkbGetDetectableAutoRepeat
+#undef XkbSetAutoResetControls
+#undef XkbGetAutoResetControls
+#undef XkbSetPerClientControls
+#undef XkbGetPerClientControls
+#undef XkbCopyKeyType
+#undef XkbCopyKeyTypes
+#undef XkbResizeKeyType
+#undef XkbResizeKeySyms
+#undef XkbResizeKeyActions
+#undef XkbChangeTypesOfKey
+#undef XkbChangeKeycodeRange
+#undef XkbListComponents
+#undef XkbFreeComponentList
+#undef XkbGetKeyboard
+#undef XkbGetKeyboardByName
+#undef XkbKeyTypesForCoreSymbols
+#undef XkbApplyCompatMapToKey
+#undef XkbUpdateMapFromCore
+#undef XkbAddDeviceLedInfo
+#undef XkbResizeDeviceButtonActions
+#undef XkbAllocDeviceInfo
+#undef XkbFreeDeviceInfo
+#undef XkbNoteDeviceChanges
+#undef XkbGetDeviceInfo
+#undef XkbGetDeviceInfoChanges
+#undef XkbGetDeviceButtonActions
+#undef XkbGetDeviceLedInfo
+#undef XkbSetDeviceInfo
+#undef XkbChangeDeviceInfo
+#undef XkbSetDeviceLedInfo
+#undef XkbSetDeviceButtonActions
+#undef XkbToControl
+#undef XkbSetDebuggingFlags
+#undef XkbApplyVirtualModChanges
+#undef XkbUpdateActionVirtualMods
+#undef XkbUpdateKeyTypeVirtualMods
+#include <dlfcn.h>
+#include <stdio.h>
+int (*_Xmblen_dylibloader_wrapper_xlib)( char*, int);
+XFontStruct* (*XLoadQueryFont_dylibloader_wrapper_xlib)( Display*,const char*);
+XFontStruct* (*XQueryFont_dylibloader_wrapper_xlib)( Display*, XID);
+XTimeCoord* (*XGetMotionEvents_dylibloader_wrapper_xlib)( Display*, Window, Time, Time, int*);
+XModifierKeymap* (*XDeleteModifiermapEntry_dylibloader_wrapper_xlib)( XModifierKeymap*, KeyCode, int);
+XModifierKeymap* (*XGetModifierMapping_dylibloader_wrapper_xlib)( Display*);
+XModifierKeymap* (*XInsertModifiermapEntry_dylibloader_wrapper_xlib)( XModifierKeymap*, KeyCode, int);
+XModifierKeymap* (*XNewModifiermap_dylibloader_wrapper_xlib)( int);
+XImage* (*XCreateImage_dylibloader_wrapper_xlib)( Display*, Visual*, unsigned int, int, int, char*, unsigned int, unsigned int, int, int);
+int (*XInitImage_dylibloader_wrapper_xlib)( XImage*);
+XImage* (*XGetImage_dylibloader_wrapper_xlib)( Display*, Drawable, int, int, unsigned int, unsigned int, unsigned long, int);
+XImage* (*XGetSubImage_dylibloader_wrapper_xlib)( Display*, Drawable, int, int, unsigned int, unsigned int, unsigned long, int, XImage*, int, int);
+Display* (*XOpenDisplay_dylibloader_wrapper_xlib)(const char*);
+void (*XrmInitialize_dylibloader_wrapper_xlib)( void);
+char* (*XFetchBytes_dylibloader_wrapper_xlib)( Display*, int*);
+char* (*XFetchBuffer_dylibloader_wrapper_xlib)( Display*, int*, int);
+char* (*XGetAtomName_dylibloader_wrapper_xlib)( Display*, Atom);
+int (*XGetAtomNames_dylibloader_wrapper_xlib)( Display*, Atom*, int, char**);
+char* (*XGetDefault_dylibloader_wrapper_xlib)( Display*,const char*,const char*);
+char* (*XDisplayName_dylibloader_wrapper_xlib)(const char*);
+char* (*XKeysymToString_dylibloader_wrapper_xlib)( KeySym);
+int* (*XSynchronize_dylibloader_wrapper_xlib)( Display*, int);
+int* (*XSetAfterFunction_dylibloader_wrapper_xlib)( Display*, int*);
+Atom (*XInternAtom_dylibloader_wrapper_xlib)( Display*,const char*, int);
+int (*XInternAtoms_dylibloader_wrapper_xlib)( Display*, char**, int, int, Atom*);
+Colormap (*XCopyColormapAndFree_dylibloader_wrapper_xlib)( Display*, Colormap);
+Colormap (*XCreateColormap_dylibloader_wrapper_xlib)( Display*, Window, Visual*, int);
+Cursor (*XCreatePixmapCursor_dylibloader_wrapper_xlib)( Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
+Cursor (*XCreateGlyphCursor_dylibloader_wrapper_xlib)( Display*, Font, Font, unsigned int, unsigned int,const XColor*,const XColor*);
+Cursor (*XCreateFontCursor_dylibloader_wrapper_xlib)( Display*, unsigned int);
+Font (*XLoadFont_dylibloader_wrapper_xlib)( Display*,const char*);
+GC (*XCreateGC_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned long, XGCValues*);
+GContext (*XGContextFromGC_dylibloader_wrapper_xlib)( GC);
+void (*XFlushGC_dylibloader_wrapper_xlib)( Display*, GC);
+Pixmap (*XCreatePixmap_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned int, unsigned int, unsigned int);
+Pixmap (*XCreateBitmapFromData_dylibloader_wrapper_xlib)( Display*, Drawable,const char*, unsigned int, unsigned int);
+Pixmap (*XCreatePixmapFromBitmapData_dylibloader_wrapper_xlib)( Display*, Drawable, char*, unsigned int, unsigned int, unsigned long, unsigned long, unsigned int);
+Window (*XCreateSimpleWindow_dylibloader_wrapper_xlib)( Display*, Window, int, int, unsigned int, unsigned int, unsigned int, unsigned long, unsigned long);
+Window (*XGetSelectionOwner_dylibloader_wrapper_xlib)( Display*, Atom);
+Window (*XCreateWindow_dylibloader_wrapper_xlib)( Display*, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual*, unsigned long, XSetWindowAttributes*);
+Colormap* (*XListInstalledColormaps_dylibloader_wrapper_xlib)( Display*, Window, int*);
+char** (*XListFonts_dylibloader_wrapper_xlib)( Display*,const char*, int, int*);
+char** (*XListFontsWithInfo_dylibloader_wrapper_xlib)( Display*,const char*, int, int*, XFontStruct**);
+char** (*XGetFontPath_dylibloader_wrapper_xlib)( Display*, int*);
+char** (*XListExtensions_dylibloader_wrapper_xlib)( Display*, int*);
+Atom* (*XListProperties_dylibloader_wrapper_xlib)( Display*, Window, int*);
+XHostAddress* (*XListHosts_dylibloader_wrapper_xlib)( Display*, int*, int*);
+KeySym (*XKeycodeToKeysym_dylibloader_wrapper_xlib)( Display*, KeyCode, int);
+KeySym (*XLookupKeysym_dylibloader_wrapper_xlib)( XKeyEvent*, int);
+KeySym* (*XGetKeyboardMapping_dylibloader_wrapper_xlib)( Display*, KeyCode, int, int*);
+KeySym (*XStringToKeysym_dylibloader_wrapper_xlib)(const char*);
+long (*XMaxRequestSize_dylibloader_wrapper_xlib)( Display*);
+long (*XExtendedMaxRequestSize_dylibloader_wrapper_xlib)( Display*);
+char* (*XResourceManagerString_dylibloader_wrapper_xlib)( Display*);
+char* (*XScreenResourceString_dylibloader_wrapper_xlib)( Screen*);
+unsigned long (*XDisplayMotionBufferSize_dylibloader_wrapper_xlib)( Display*);
+VisualID (*XVisualIDFromVisual_dylibloader_wrapper_xlib)( Visual*);
+int (*XInitThreads_dylibloader_wrapper_xlib)( void);
+void (*XLockDisplay_dylibloader_wrapper_xlib)( Display*);
+void (*XUnlockDisplay_dylibloader_wrapper_xlib)( Display*);
+XExtCodes* (*XInitExtension_dylibloader_wrapper_xlib)( Display*,const char*);
+XExtCodes* (*XAddExtension_dylibloader_wrapper_xlib)( Display*);
+XExtData* (*XFindOnExtensionList_dylibloader_wrapper_xlib)( XExtData**, int);
+XExtData** (*XEHeadOfExtensionList_dylibloader_wrapper_xlib)( XEDataObject);
+Window (*XRootWindow_dylibloader_wrapper_xlib)( Display*, int);
+Window (*XDefaultRootWindow_dylibloader_wrapper_xlib)( Display*);
+Window (*XRootWindowOfScreen_dylibloader_wrapper_xlib)( Screen*);
+Visual* (*XDefaultVisual_dylibloader_wrapper_xlib)( Display*, int);
+Visual* (*XDefaultVisualOfScreen_dylibloader_wrapper_xlib)( Screen*);
+GC (*XDefaultGC_dylibloader_wrapper_xlib)( Display*, int);
+GC (*XDefaultGCOfScreen_dylibloader_wrapper_xlib)( Screen*);
+unsigned long (*XBlackPixel_dylibloader_wrapper_xlib)( Display*, int);
+unsigned long (*XWhitePixel_dylibloader_wrapper_xlib)( Display*, int);
+unsigned long (*XAllPlanes_dylibloader_wrapper_xlib)( void);
+unsigned long (*XBlackPixelOfScreen_dylibloader_wrapper_xlib)( Screen*);
+unsigned long (*XWhitePixelOfScreen_dylibloader_wrapper_xlib)( Screen*);
+unsigned long (*XNextRequest_dylibloader_wrapper_xlib)( Display*);
+unsigned long (*XLastKnownRequestProcessed_dylibloader_wrapper_xlib)( Display*);
+char* (*XServerVendor_dylibloader_wrapper_xlib)( Display*);
+char* (*XDisplayString_dylibloader_wrapper_xlib)( Display*);
+Colormap (*XDefaultColormap_dylibloader_wrapper_xlib)( Display*, int);
+Colormap (*XDefaultColormapOfScreen_dylibloader_wrapper_xlib)( Screen*);
+Display* (*XDisplayOfScreen_dylibloader_wrapper_xlib)( Screen*);
+Screen* (*XScreenOfDisplay_dylibloader_wrapper_xlib)( Display*, int);
+Screen* (*XDefaultScreenOfDisplay_dylibloader_wrapper_xlib)( Display*);
+long (*XEventMaskOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XScreenNumberOfScreen_dylibloader_wrapper_xlib)( Screen*);
+XErrorHandler (*XSetErrorHandler_dylibloader_wrapper_xlib)( XErrorHandler);
+XIOErrorHandler (*XSetIOErrorHandler_dylibloader_wrapper_xlib)( XIOErrorHandler);
+XPixmapFormatValues* (*XListPixmapFormats_dylibloader_wrapper_xlib)( Display*, int*);
+int* (*XListDepths_dylibloader_wrapper_xlib)( Display*, int, int*);
+int (*XReconfigureWMWindow_dylibloader_wrapper_xlib)( Display*, Window, int, unsigned int, XWindowChanges*);
+int (*XGetWMProtocols_dylibloader_wrapper_xlib)( Display*, Window, Atom**, int*);
+int (*XSetWMProtocols_dylibloader_wrapper_xlib)( Display*, Window, Atom*, int);
+int (*XIconifyWindow_dylibloader_wrapper_xlib)( Display*, Window, int);
+int (*XWithdrawWindow_dylibloader_wrapper_xlib)( Display*, Window, int);
+int (*XGetCommand_dylibloader_wrapper_xlib)( Display*, Window, char***, int*);
+int (*XGetWMColormapWindows_dylibloader_wrapper_xlib)( Display*, Window, Window**, int*);
+int (*XSetWMColormapWindows_dylibloader_wrapper_xlib)( Display*, Window, Window*, int);
+void (*XFreeStringList_dylibloader_wrapper_xlib)( char**);
+int (*XSetTransientForHint_dylibloader_wrapper_xlib)( Display*, Window, Window);
+int (*XActivateScreenSaver_dylibloader_wrapper_xlib)( Display*);
+int (*XAddHost_dylibloader_wrapper_xlib)( Display*, XHostAddress*);
+int (*XAddHosts_dylibloader_wrapper_xlib)( Display*, XHostAddress*, int);
+int (*XAddToExtensionList_dylibloader_wrapper_xlib)(struct _XExtData**, XExtData*);
+int (*XAddToSaveSet_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XAllocColor_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*);
+int (*XAllocColorCells_dylibloader_wrapper_xlib)( Display*, Colormap, int, unsigned long*, unsigned int, unsigned long*, unsigned int);
+int (*XAllocColorPlanes_dylibloader_wrapper_xlib)( Display*, Colormap, int, unsigned long*, int, int, int, int, unsigned long*, unsigned long*, unsigned long*);
+int (*XAllocNamedColor_dylibloader_wrapper_xlib)( Display*, Colormap,const char*, XColor*, XColor*);
+int (*XAllowEvents_dylibloader_wrapper_xlib)( Display*, int, Time);
+int (*XAutoRepeatOff_dylibloader_wrapper_xlib)( Display*);
+int (*XAutoRepeatOn_dylibloader_wrapper_xlib)( Display*);
+int (*XBell_dylibloader_wrapper_xlib)( Display*, int);
+int (*XBitmapBitOrder_dylibloader_wrapper_xlib)( Display*);
+int (*XBitmapPad_dylibloader_wrapper_xlib)( Display*);
+int (*XBitmapUnit_dylibloader_wrapper_xlib)( Display*);
+int (*XCellsOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XChangeActivePointerGrab_dylibloader_wrapper_xlib)( Display*, unsigned int, Cursor, Time);
+int (*XChangeGC_dylibloader_wrapper_xlib)( Display*, GC, unsigned long, XGCValues*);
+int (*XChangeKeyboardControl_dylibloader_wrapper_xlib)( Display*, unsigned long, XKeyboardControl*);
+int (*XChangeKeyboardMapping_dylibloader_wrapper_xlib)( Display*, int, int, KeySym*, int);
+int (*XChangePointerControl_dylibloader_wrapper_xlib)( Display*, int, int, int, int, int);
+int (*XChangeProperty_dylibloader_wrapper_xlib)( Display*, Window, Atom, Atom, int, int,const unsigned char*, int);
+int (*XChangeSaveSet_dylibloader_wrapper_xlib)( Display*, Window, int);
+int (*XChangeWindowAttributes_dylibloader_wrapper_xlib)( Display*, Window, unsigned long, XSetWindowAttributes*);
+int (*XCheckIfEvent_dylibloader_wrapper_xlib)( Display*, XEvent*, Bool (*) (Display*, XEvent*, XPointer), XPointer);
+int (*XCheckMaskEvent_dylibloader_wrapper_xlib)( Display*, long, XEvent*);
+int (*XCheckTypedEvent_dylibloader_wrapper_xlib)( Display*, int, XEvent*);
+int (*XCheckTypedWindowEvent_dylibloader_wrapper_xlib)( Display*, Window, int, XEvent*);
+int (*XCheckWindowEvent_dylibloader_wrapper_xlib)( Display*, Window, long, XEvent*);
+int (*XCirculateSubwindows_dylibloader_wrapper_xlib)( Display*, Window, int);
+int (*XCirculateSubwindowsDown_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XCirculateSubwindowsUp_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XClearArea_dylibloader_wrapper_xlib)( Display*, Window, int, int, unsigned int, unsigned int, int);
+int (*XClearWindow_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XCloseDisplay_dylibloader_wrapper_xlib)( Display*);
+int (*XConfigureWindow_dylibloader_wrapper_xlib)( Display*, Window, unsigned int, XWindowChanges*);
+int (*XConnectionNumber_dylibloader_wrapper_xlib)( Display*);
+int (*XConvertSelection_dylibloader_wrapper_xlib)( Display*, Atom, Atom, Atom, Window, Time);
+int (*XCopyArea_dylibloader_wrapper_xlib)( Display*, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
+int (*XCopyGC_dylibloader_wrapper_xlib)( Display*, GC, unsigned long, GC);
+int (*XCopyPlane_dylibloader_wrapper_xlib)( Display*, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int, unsigned long);
+int (*XDefaultDepth_dylibloader_wrapper_xlib)( Display*, int);
+int (*XDefaultDepthOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XDefaultScreen_dylibloader_wrapper_xlib)( Display*);
+int (*XDefineCursor_dylibloader_wrapper_xlib)( Display*, Window, Cursor);
+int (*XDeleteProperty_dylibloader_wrapper_xlib)( Display*, Window, Atom);
+int (*XDestroyWindow_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XDestroySubwindows_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XDoesBackingStore_dylibloader_wrapper_xlib)( Screen*);
+int (*XDoesSaveUnders_dylibloader_wrapper_xlib)( Screen*);
+int (*XDisableAccessControl_dylibloader_wrapper_xlib)( Display*);
+int (*XDisplayCells_dylibloader_wrapper_xlib)( Display*, int);
+int (*XDisplayHeight_dylibloader_wrapper_xlib)( Display*, int);
+int (*XDisplayHeightMM_dylibloader_wrapper_xlib)( Display*, int);
+int (*XDisplayKeycodes_dylibloader_wrapper_xlib)( Display*, int*, int*);
+int (*XDisplayPlanes_dylibloader_wrapper_xlib)( Display*, int);
+int (*XDisplayWidth_dylibloader_wrapper_xlib)( Display*, int);
+int (*XDisplayWidthMM_dylibloader_wrapper_xlib)( Display*, int);
+int (*XDrawArc_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
+int (*XDrawArcs_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XArc*, int);
+int (*XDrawImageString_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int,const char*, int);
+int (*XDrawImageString16_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int,const XChar2b*, int);
+int (*XDrawLine_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, int, int);
+int (*XDrawLines_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XPoint*, int, int);
+int (*XDrawPoint_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int);
+int (*XDrawPoints_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XPoint*, int, int);
+int (*XDrawRectangle_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, unsigned int, unsigned int);
+int (*XDrawRectangles_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XRectangle*, int);
+int (*XDrawSegments_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XSegment*, int);
+int (*XDrawString_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int,const char*, int);
+int (*XDrawString16_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int,const XChar2b*, int);
+int (*XDrawText_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XTextItem*, int);
+int (*XDrawText16_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XTextItem16*, int);
+int (*XEnableAccessControl_dylibloader_wrapper_xlib)( Display*);
+int (*XEventsQueued_dylibloader_wrapper_xlib)( Display*, int);
+int (*XFetchName_dylibloader_wrapper_xlib)( Display*, Window, char**);
+int (*XFillArc_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
+int (*XFillArcs_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XArc*, int);
+int (*XFillPolygon_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XPoint*, int, int, int);
+int (*XFillRectangle_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, unsigned int, unsigned int);
+int (*XFillRectangles_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XRectangle*, int);
+int (*XFlush_dylibloader_wrapper_xlib)( Display*);
+int (*XForceScreenSaver_dylibloader_wrapper_xlib)( Display*, int);
+int (*XFree_dylibloader_wrapper_xlib)( void*);
+int (*XFreeColormap_dylibloader_wrapper_xlib)( Display*, Colormap);
+int (*XFreeColors_dylibloader_wrapper_xlib)( Display*, Colormap, unsigned long*, int, unsigned long);
+int (*XFreeCursor_dylibloader_wrapper_xlib)( Display*, Cursor);
+int (*XFreeExtensionList_dylibloader_wrapper_xlib)( char**);
+int (*XFreeFont_dylibloader_wrapper_xlib)( Display*, XFontStruct*);
+int (*XFreeFontInfo_dylibloader_wrapper_xlib)( char**, XFontStruct*, int);
+int (*XFreeFontNames_dylibloader_wrapper_xlib)( char**);
+int (*XFreeFontPath_dylibloader_wrapper_xlib)( char**);
+int (*XFreeGC_dylibloader_wrapper_xlib)( Display*, GC);
+int (*XFreeModifiermap_dylibloader_wrapper_xlib)( XModifierKeymap*);
+int (*XFreePixmap_dylibloader_wrapper_xlib)( Display*, Pixmap);
+int (*XGeometry_dylibloader_wrapper_xlib)( Display*, int,const char*,const char*, unsigned int, unsigned int, unsigned int, int, int, int*, int*, int*, int*);
+int (*XGetErrorDatabaseText_dylibloader_wrapper_xlib)( Display*,const char*,const char*,const char*, char*, int);
+int (*XGetErrorText_dylibloader_wrapper_xlib)( Display*, int, char*, int);
+int (*XGetFontProperty_dylibloader_wrapper_xlib)( XFontStruct*, Atom, unsigned long*);
+int (*XGetGCValues_dylibloader_wrapper_xlib)( Display*, GC, unsigned long, XGCValues*);
+int (*XGetGeometry_dylibloader_wrapper_xlib)( Display*, Drawable, Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*);
+int (*XGetIconName_dylibloader_wrapper_xlib)( Display*, Window, char**);
+int (*XGetInputFocus_dylibloader_wrapper_xlib)( Display*, Window*, int*);
+int (*XGetKeyboardControl_dylibloader_wrapper_xlib)( Display*, XKeyboardState*);
+int (*XGetPointerControl_dylibloader_wrapper_xlib)( Display*, int*, int*, int*);
+int (*XGetPointerMapping_dylibloader_wrapper_xlib)( Display*, unsigned char*, int);
+int (*XGetScreenSaver_dylibloader_wrapper_xlib)( Display*, int*, int*, int*, int*);
+int (*XGetTransientForHint_dylibloader_wrapper_xlib)( Display*, Window, Window*);
+int (*XGetWindowProperty_dylibloader_wrapper_xlib)( Display*, Window, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+int (*XGetWindowAttributes_dylibloader_wrapper_xlib)( Display*, Window, XWindowAttributes*);
+int (*XGrabButton_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, Window, int, unsigned int, int, int, Window, Cursor);
+int (*XGrabKey_dylibloader_wrapper_xlib)( Display*, int, unsigned int, Window, int, int, int);
+int (*XGrabKeyboard_dylibloader_wrapper_xlib)( Display*, Window, int, int, int, Time);
+int (*XGrabPointer_dylibloader_wrapper_xlib)( Display*, Window, int, unsigned int, int, int, Window, Cursor, Time);
+int (*XGrabServer_dylibloader_wrapper_xlib)( Display*);
+int (*XHeightMMOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XHeightOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XIfEvent_dylibloader_wrapper_xlib)( Display*, XEvent*, Bool (*) (Display*, XEvent*, XPointer), XPointer);
+int (*XImageByteOrder_dylibloader_wrapper_xlib)( Display*);
+int (*XInstallColormap_dylibloader_wrapper_xlib)( Display*, Colormap);
+KeyCode (*XKeysymToKeycode_dylibloader_wrapper_xlib)( Display*, KeySym);
+int (*XKillClient_dylibloader_wrapper_xlib)( Display*, XID);
+int (*XLookupColor_dylibloader_wrapper_xlib)( Display*, Colormap,const char*, XColor*, XColor*);
+int (*XLowerWindow_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XMapRaised_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XMapSubwindows_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XMapWindow_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XMaskEvent_dylibloader_wrapper_xlib)( Display*, long, XEvent*);
+int (*XMaxCmapsOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XMinCmapsOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XMoveResizeWindow_dylibloader_wrapper_xlib)( Display*, Window, int, int, unsigned int, unsigned int);
+int (*XMoveWindow_dylibloader_wrapper_xlib)( Display*, Window, int, int);
+int (*XNextEvent_dylibloader_wrapper_xlib)( Display*, XEvent*);
+int (*XNoOp_dylibloader_wrapper_xlib)( Display*);
+int (*XParseColor_dylibloader_wrapper_xlib)( Display*, Colormap,const char*, XColor*);
+int (*XParseGeometry_dylibloader_wrapper_xlib)(const char*, int*, int*, unsigned int*, unsigned int*);
+int (*XPeekEvent_dylibloader_wrapper_xlib)( Display*, XEvent*);
+int (*XPeekIfEvent_dylibloader_wrapper_xlib)( Display*, XEvent*, Bool (*) (Display*, XEvent*, XPointer), XPointer);
+int (*XPending_dylibloader_wrapper_xlib)( Display*);
+int (*XPlanesOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XProtocolRevision_dylibloader_wrapper_xlib)( Display*);
+int (*XProtocolVersion_dylibloader_wrapper_xlib)( Display*);
+int (*XPutBackEvent_dylibloader_wrapper_xlib)( Display*, XEvent*);
+int (*XPutImage_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XImage*, int, int, int, int, unsigned int, unsigned int);
+int (*XQLength_dylibloader_wrapper_xlib)( Display*);
+int (*XQueryBestCursor_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned int, unsigned int, unsigned int*, unsigned int*);
+int (*XQueryBestSize_dylibloader_wrapper_xlib)( Display*, int, Drawable, unsigned int, unsigned int, unsigned int*, unsigned int*);
+int (*XQueryBestStipple_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned int, unsigned int, unsigned int*, unsigned int*);
+int (*XQueryBestTile_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned int, unsigned int, unsigned int*, unsigned int*);
+int (*XQueryColor_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*);
+int (*XQueryColors_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*, int);
+int (*XQueryExtension_dylibloader_wrapper_xlib)( Display*,const char*, int*, int*, int*);
+int (*XQueryKeymap_dylibloader_wrapper_xlib)( Display*, char [32]);
+int (*XQueryPointer_dylibloader_wrapper_xlib)( Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*);
+int (*XQueryTextExtents_dylibloader_wrapper_xlib)( Display*, XID,const char*, int, int*, int*, int*, XCharStruct*);
+int (*XQueryTextExtents16_dylibloader_wrapper_xlib)( Display*, XID,const XChar2b*, int, int*, int*, int*, XCharStruct*);
+int (*XQueryTree_dylibloader_wrapper_xlib)( Display*, Window, Window*, Window*, Window**, unsigned int*);
+int (*XRaiseWindow_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XReadBitmapFile_dylibloader_wrapper_xlib)( Display*, Drawable,const char*, unsigned int*, unsigned int*, Pixmap*, int*, int*);
+int (*XReadBitmapFileData_dylibloader_wrapper_xlib)(const char*, unsigned int*, unsigned int*, unsigned char**, int*, int*);
+int (*XRebindKeysym_dylibloader_wrapper_xlib)( Display*, KeySym, KeySym*, int,const unsigned char*, int);
+int (*XRecolorCursor_dylibloader_wrapper_xlib)( Display*, Cursor, XColor*, XColor*);
+int (*XRefreshKeyboardMapping_dylibloader_wrapper_xlib)( XMappingEvent*);
+int (*XRemoveFromSaveSet_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XRemoveHost_dylibloader_wrapper_xlib)( Display*, XHostAddress*);
+int (*XRemoveHosts_dylibloader_wrapper_xlib)( Display*, XHostAddress*, int);
+int (*XReparentWindow_dylibloader_wrapper_xlib)( Display*, Window, Window, int, int);
+int (*XResetScreenSaver_dylibloader_wrapper_xlib)( Display*);
+int (*XResizeWindow_dylibloader_wrapper_xlib)( Display*, Window, unsigned int, unsigned int);
+int (*XRestackWindows_dylibloader_wrapper_xlib)( Display*, Window*, int);
+int (*XRotateBuffers_dylibloader_wrapper_xlib)( Display*, int);
+int (*XRotateWindowProperties_dylibloader_wrapper_xlib)( Display*, Window, Atom*, int, int);
+int (*XScreenCount_dylibloader_wrapper_xlib)( Display*);
+int (*XSelectInput_dylibloader_wrapper_xlib)( Display*, Window, long);
+int (*XSendEvent_dylibloader_wrapper_xlib)( Display*, Window, int, long, XEvent*);
+int (*XSetAccessControl_dylibloader_wrapper_xlib)( Display*, int);
+int (*XSetArcMode_dylibloader_wrapper_xlib)( Display*, GC, int);
+int (*XSetBackground_dylibloader_wrapper_xlib)( Display*, GC, unsigned long);
+int (*XSetClipMask_dylibloader_wrapper_xlib)( Display*, GC, Pixmap);
+int (*XSetClipOrigin_dylibloader_wrapper_xlib)( Display*, GC, int, int);
+int (*XSetClipRectangles_dylibloader_wrapper_xlib)( Display*, GC, int, int, XRectangle*, int, int);
+int (*XSetCloseDownMode_dylibloader_wrapper_xlib)( Display*, int);
+int (*XSetCommand_dylibloader_wrapper_xlib)( Display*, Window, char**, int);
+int (*XSetDashes_dylibloader_wrapper_xlib)( Display*, GC, int,const char*, int);
+int (*XSetFillRule_dylibloader_wrapper_xlib)( Display*, GC, int);
+int (*XSetFillStyle_dylibloader_wrapper_xlib)( Display*, GC, int);
+int (*XSetFont_dylibloader_wrapper_xlib)( Display*, GC, Font);
+int (*XSetFontPath_dylibloader_wrapper_xlib)( Display*, char**, int);
+int (*XSetForeground_dylibloader_wrapper_xlib)( Display*, GC, unsigned long);
+int (*XSetFunction_dylibloader_wrapper_xlib)( Display*, GC, int);
+int (*XSetGraphicsExposures_dylibloader_wrapper_xlib)( Display*, GC, int);
+int (*XSetIconName_dylibloader_wrapper_xlib)( Display*, Window,const char*);
+int (*XSetInputFocus_dylibloader_wrapper_xlib)( Display*, Window, int, Time);
+int (*XSetLineAttributes_dylibloader_wrapper_xlib)( Display*, GC, unsigned int, int, int, int);
+int (*XSetModifierMapping_dylibloader_wrapper_xlib)( Display*, XModifierKeymap*);
+int (*XSetPlaneMask_dylibloader_wrapper_xlib)( Display*, GC, unsigned long);
+int (*XSetPointerMapping_dylibloader_wrapper_xlib)( Display*,const unsigned char*, int);
+int (*XSetScreenSaver_dylibloader_wrapper_xlib)( Display*, int, int, int, int);
+int (*XSetSelectionOwner_dylibloader_wrapper_xlib)( Display*, Atom, Window, Time);
+int (*XSetState_dylibloader_wrapper_xlib)( Display*, GC, unsigned long, unsigned long, int, unsigned long);
+int (*XSetStipple_dylibloader_wrapper_xlib)( Display*, GC, Pixmap);
+int (*XSetSubwindowMode_dylibloader_wrapper_xlib)( Display*, GC, int);
+int (*XSetTSOrigin_dylibloader_wrapper_xlib)( Display*, GC, int, int);
+int (*XSetTile_dylibloader_wrapper_xlib)( Display*, GC, Pixmap);
+int (*XSetWindowBackground_dylibloader_wrapper_xlib)( Display*, Window, unsigned long);
+int (*XSetWindowBackgroundPixmap_dylibloader_wrapper_xlib)( Display*, Window, Pixmap);
+int (*XSetWindowBorder_dylibloader_wrapper_xlib)( Display*, Window, unsigned long);
+int (*XSetWindowBorderPixmap_dylibloader_wrapper_xlib)( Display*, Window, Pixmap);
+int (*XSetWindowBorderWidth_dylibloader_wrapper_xlib)( Display*, Window, unsigned int);
+int (*XSetWindowColormap_dylibloader_wrapper_xlib)( Display*, Window, Colormap);
+int (*XStoreBuffer_dylibloader_wrapper_xlib)( Display*,const char*, int, int);
+int (*XStoreBytes_dylibloader_wrapper_xlib)( Display*,const char*, int);
+int (*XStoreColor_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*);
+int (*XStoreColors_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*, int);
+int (*XStoreName_dylibloader_wrapper_xlib)( Display*, Window,const char*);
+int (*XStoreNamedColor_dylibloader_wrapper_xlib)( Display*, Colormap,const char*, unsigned long, int);
+int (*XSync_dylibloader_wrapper_xlib)( Display*, int);
+int (*XTextExtents_dylibloader_wrapper_xlib)( XFontStruct*,const char*, int, int*, int*, int*, XCharStruct*);
+int (*XTextExtents16_dylibloader_wrapper_xlib)( XFontStruct*,const XChar2b*, int, int*, int*, int*, XCharStruct*);
+int (*XTextWidth_dylibloader_wrapper_xlib)( XFontStruct*,const char*, int);
+int (*XTextWidth16_dylibloader_wrapper_xlib)( XFontStruct*,const XChar2b*, int);
+int (*XTranslateCoordinates_dylibloader_wrapper_xlib)( Display*, Window, Window, int, int, int*, int*, Window*);
+int (*XUndefineCursor_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XUngrabButton_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, Window);
+int (*XUngrabKey_dylibloader_wrapper_xlib)( Display*, int, unsigned int, Window);
+int (*XUngrabKeyboard_dylibloader_wrapper_xlib)( Display*, Time);
+int (*XUngrabPointer_dylibloader_wrapper_xlib)( Display*, Time);
+int (*XUngrabServer_dylibloader_wrapper_xlib)( Display*);
+int (*XUninstallColormap_dylibloader_wrapper_xlib)( Display*, Colormap);
+int (*XUnloadFont_dylibloader_wrapper_xlib)( Display*, Font);
+int (*XUnmapSubwindows_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XUnmapWindow_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XVendorRelease_dylibloader_wrapper_xlib)( Display*);
+int (*XWarpPointer_dylibloader_wrapper_xlib)( Display*, Window, Window, int, int, unsigned int, unsigned int, int, int);
+int (*XWidthMMOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XWidthOfScreen_dylibloader_wrapper_xlib)( Screen*);
+int (*XWindowEvent_dylibloader_wrapper_xlib)( Display*, Window, long, XEvent*);
+int (*XWriteBitmapFile_dylibloader_wrapper_xlib)( Display*,const char*, Pixmap, unsigned int, unsigned int, int, int);
+int (*XSupportsLocale_dylibloader_wrapper_xlib)( void);
+char* (*XSetLocaleModifiers_dylibloader_wrapper_xlib)(const char*);
+XOM (*XOpenOM_dylibloader_wrapper_xlib)( Display*,struct _XrmHashBucketRec*,const char*,const char*);
+int (*XCloseOM_dylibloader_wrapper_xlib)( XOM);
+char* (*XSetOMValues_dylibloader_wrapper_xlib)( XOM,...);
+char* (*XGetOMValues_dylibloader_wrapper_xlib)( XOM,...);
+Display* (*XDisplayOfOM_dylibloader_wrapper_xlib)( XOM);
+char* (*XLocaleOfOM_dylibloader_wrapper_xlib)( XOM);
+XOC (*XCreateOC_dylibloader_wrapper_xlib)( XOM,...);
+void (*XDestroyOC_dylibloader_wrapper_xlib)( XOC);
+XOM (*XOMOfOC_dylibloader_wrapper_xlib)( XOC);
+char* (*XSetOCValues_dylibloader_wrapper_xlib)( XOC,...);
+char* (*XGetOCValues_dylibloader_wrapper_xlib)( XOC,...);
+XFontSet (*XCreateFontSet_dylibloader_wrapper_xlib)( Display*,const char*, char***, int*, char**);
+void (*XFreeFontSet_dylibloader_wrapper_xlib)( Display*, XFontSet);
+int (*XFontsOfFontSet_dylibloader_wrapper_xlib)( XFontSet, XFontStruct***, char***);
+char* (*XBaseFontNameListOfFontSet_dylibloader_wrapper_xlib)( XFontSet);
+char* (*XLocaleOfFontSet_dylibloader_wrapper_xlib)( XFontSet);
+int (*XContextDependentDrawing_dylibloader_wrapper_xlib)( XFontSet);
+int (*XDirectionalDependentDrawing_dylibloader_wrapper_xlib)( XFontSet);
+int (*XContextualDrawing_dylibloader_wrapper_xlib)( XFontSet);
+XFontSetExtents* (*XExtentsOfFontSet_dylibloader_wrapper_xlib)( XFontSet);
+int (*XmbTextEscapement_dylibloader_wrapper_xlib)( XFontSet,const char*, int);
+int (*XwcTextEscapement_dylibloader_wrapper_xlib)( XFontSet,const wchar_t*, int);
+int (*Xutf8TextEscapement_dylibloader_wrapper_xlib)( XFontSet,const char*, int);
+int (*XmbTextExtents_dylibloader_wrapper_xlib)( XFontSet,const char*, int, XRectangle*, XRectangle*);
+int (*XwcTextExtents_dylibloader_wrapper_xlib)( XFontSet,const wchar_t*, int, XRectangle*, XRectangle*);
+int (*Xutf8TextExtents_dylibloader_wrapper_xlib)( XFontSet,const char*, int, XRectangle*, XRectangle*);
+int (*XmbTextPerCharExtents_dylibloader_wrapper_xlib)( XFontSet,const char*, int, XRectangle*, XRectangle*, int, int*, XRectangle*, XRectangle*);
+int (*XwcTextPerCharExtents_dylibloader_wrapper_xlib)( XFontSet,const wchar_t*, int, XRectangle*, XRectangle*, int, int*, XRectangle*, XRectangle*);
+int (*Xutf8TextPerCharExtents_dylibloader_wrapper_xlib)( XFontSet,const char*, int, XRectangle*, XRectangle*, int, int*, XRectangle*, XRectangle*);
+void (*XmbDrawText_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XmbTextItem*, int);
+void (*XwcDrawText_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XwcTextItem*, int);
+void (*Xutf8DrawText_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XmbTextItem*, int);
+void (*XmbDrawString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const char*, int);
+void (*XwcDrawString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const wchar_t*, int);
+void (*Xutf8DrawString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const char*, int);
+void (*XmbDrawImageString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const char*, int);
+void (*XwcDrawImageString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const wchar_t*, int);
+void (*Xutf8DrawImageString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const char*, int);
+XIM (*XOpenIM_dylibloader_wrapper_xlib)( Display*,struct _XrmHashBucketRec*, char*, char*);
+int (*XCloseIM_dylibloader_wrapper_xlib)( XIM);
+char* (*XGetIMValues_dylibloader_wrapper_xlib)( XIM,...);
+char* (*XSetIMValues_dylibloader_wrapper_xlib)( XIM,...);
+Display* (*XDisplayOfIM_dylibloader_wrapper_xlib)( XIM);
+char* (*XLocaleOfIM_dylibloader_wrapper_xlib)( XIM);
+XIC (*XCreateIC_dylibloader_wrapper_xlib)( XIM,...);
+void (*XDestroyIC_dylibloader_wrapper_xlib)( XIC);
+void (*XSetICFocus_dylibloader_wrapper_xlib)( XIC);
+void (*XUnsetICFocus_dylibloader_wrapper_xlib)( XIC);
+wchar_t* (*XwcResetIC_dylibloader_wrapper_xlib)( XIC);
+char* (*XmbResetIC_dylibloader_wrapper_xlib)( XIC);
+char* (*Xutf8ResetIC_dylibloader_wrapper_xlib)( XIC);
+char* (*XSetICValues_dylibloader_wrapper_xlib)( XIC,...);
+char* (*XGetICValues_dylibloader_wrapper_xlib)( XIC,...);
+XIM (*XIMOfIC_dylibloader_wrapper_xlib)( XIC);
+int (*XFilterEvent_dylibloader_wrapper_xlib)( XEvent*, Window);
+int (*XmbLookupString_dylibloader_wrapper_xlib)( XIC, XKeyPressedEvent*, char*, int, KeySym*, int*);
+int (*XwcLookupString_dylibloader_wrapper_xlib)( XIC, XKeyPressedEvent*, wchar_t*, int, KeySym*, int*);
+int (*Xutf8LookupString_dylibloader_wrapper_xlib)( XIC, XKeyPressedEvent*, char*, int, KeySym*, int*);
+XVaNestedList (*XVaCreateNestedList_dylibloader_wrapper_xlib)( int,...);
+int (*XRegisterIMInstantiateCallback_dylibloader_wrapper_xlib)( Display*,struct _XrmHashBucketRec*, char*, char*, XIDProc, XPointer);
+int (*XUnregisterIMInstantiateCallback_dylibloader_wrapper_xlib)( Display*,struct _XrmHashBucketRec*, char*, char*, XIDProc, XPointer);
+int (*XInternalConnectionNumbers_dylibloader_wrapper_xlib)( Display*, int**, int*);
+void (*XProcessInternalConnection_dylibloader_wrapper_xlib)( Display*, int);
+int (*XAddConnectionWatch_dylibloader_wrapper_xlib)( Display*, XConnectionWatchProc, XPointer);
+void (*XRemoveConnectionWatch_dylibloader_wrapper_xlib)( Display*, XConnectionWatchProc, XPointer);
+void (*XSetAuthorization_dylibloader_wrapper_xlib)( char*, int, char*, int);
+int (*_Xmbtowc_dylibloader_wrapper_xlib)( wchar_t*, char*, int);
+int (*_Xwctomb_dylibloader_wrapper_xlib)( char*, wchar_t);
+int (*XGetEventData_dylibloader_wrapper_xlib)( Display*, XGenericEventCookie*);
+void (*XFreeEventData_dylibloader_wrapper_xlib)( Display*, XGenericEventCookie*);
+XClassHint* (*XAllocClassHint_dylibloader_wrapper_xlib)( void);
+XIconSize* (*XAllocIconSize_dylibloader_wrapper_xlib)( void);
+XSizeHints* (*XAllocSizeHints_dylibloader_wrapper_xlib)( void);
+XStandardColormap* (*XAllocStandardColormap_dylibloader_wrapper_xlib)( void);
+XWMHints* (*XAllocWMHints_dylibloader_wrapper_xlib)( void);
+int (*XClipBox_dylibloader_wrapper_xlib)( Region, XRectangle*);
+Region (*XCreateRegion_dylibloader_wrapper_xlib)( void);
+const char* (*XDefaultString_dylibloader_wrapper_xlib)( void);
+int (*XDeleteContext_dylibloader_wrapper_xlib)( Display*, XID, XContext);
+int (*XDestroyRegion_dylibloader_wrapper_xlib)( Region);
+int (*XEmptyRegion_dylibloader_wrapper_xlib)( Region);
+int (*XEqualRegion_dylibloader_wrapper_xlib)( Region, Region);
+int (*XFindContext_dylibloader_wrapper_xlib)( Display*, XID, XContext, XPointer*);
+int (*XGetClassHint_dylibloader_wrapper_xlib)( Display*, Window, XClassHint*);
+int (*XGetIconSizes_dylibloader_wrapper_xlib)( Display*, Window, XIconSize**, int*);
+int (*XGetNormalHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+int (*XGetRGBColormaps_dylibloader_wrapper_xlib)( Display*, Window, XStandardColormap**, int*, Atom);
+int (*XGetSizeHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, Atom);
+int (*XGetStandardColormap_dylibloader_wrapper_xlib)( Display*, Window, XStandardColormap*, Atom);
+int (*XGetTextProperty_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*, Atom);
+XVisualInfo* (*XGetVisualInfo_dylibloader_wrapper_xlib)( Display*, long, XVisualInfo*, int*);
+int (*XGetWMClientMachine_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+XWMHints* (*XGetWMHints_dylibloader_wrapper_xlib)( Display*, Window);
+int (*XGetWMIconName_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+int (*XGetWMName_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+int (*XGetWMNormalHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, long*);
+int (*XGetWMSizeHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, long*, Atom);
+int (*XGetZoomHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+int (*XIntersectRegion_dylibloader_wrapper_xlib)( Region, Region, Region);
+void (*XConvertCase_dylibloader_wrapper_xlib)( KeySym, KeySym*, KeySym*);
+int (*XLookupString_dylibloader_wrapper_xlib)( XKeyEvent*, char*, int, KeySym*, XComposeStatus*);
+int (*XMatchVisualInfo_dylibloader_wrapper_xlib)( Display*, int, int, int, XVisualInfo*);
+int (*XOffsetRegion_dylibloader_wrapper_xlib)( Region, int, int);
+int (*XPointInRegion_dylibloader_wrapper_xlib)( Region, int, int);
+Region (*XPolygonRegion_dylibloader_wrapper_xlib)( XPoint*, int, int);
+int (*XRectInRegion_dylibloader_wrapper_xlib)( Region, int, int, unsigned int, unsigned int);
+int (*XSaveContext_dylibloader_wrapper_xlib)( Display*, XID, XContext,const char*);
+int (*XSetClassHint_dylibloader_wrapper_xlib)( Display*, Window, XClassHint*);
+int (*XSetIconSizes_dylibloader_wrapper_xlib)( Display*, Window, XIconSize*, int);
+int (*XSetNormalHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+void (*XSetRGBColormaps_dylibloader_wrapper_xlib)( Display*, Window, XStandardColormap*, int, Atom);
+int (*XSetSizeHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, Atom);
+int (*XSetStandardProperties_dylibloader_wrapper_xlib)( Display*, Window,const char*,const char*, Pixmap, char**, int, XSizeHints*);
+void (*XSetTextProperty_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*, Atom);
+void (*XSetWMClientMachine_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+int (*XSetWMHints_dylibloader_wrapper_xlib)( Display*, Window, XWMHints*);
+void (*XSetWMIconName_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+void (*XSetWMName_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+void (*XSetWMNormalHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+void (*XSetWMProperties_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*, XTextProperty*, char**, int, XSizeHints*, XWMHints*, XClassHint*);
+void (*XmbSetWMProperties_dylibloader_wrapper_xlib)( Display*, Window,const char*,const char*, char**, int, XSizeHints*, XWMHints*, XClassHint*);
+void (*Xutf8SetWMProperties_dylibloader_wrapper_xlib)( Display*, Window,const char*,const char*, char**, int, XSizeHints*, XWMHints*, XClassHint*);
+void (*XSetWMSizeHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, Atom);
+int (*XSetRegion_dylibloader_wrapper_xlib)( Display*, GC, Region);
+void (*XSetStandardColormap_dylibloader_wrapper_xlib)( Display*, Window, XStandardColormap*, Atom);
+int (*XSetZoomHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+int (*XShrinkRegion_dylibloader_wrapper_xlib)( Region, int, int);
+int (*XStringListToTextProperty_dylibloader_wrapper_xlib)( char**, int, XTextProperty*);
+int (*XSubtractRegion_dylibloader_wrapper_xlib)( Region, Region, Region);
+int (*XmbTextListToTextProperty_dylibloader_wrapper_xlib)( Display*, char**, int, XICCEncodingStyle, XTextProperty*);
+int (*XwcTextListToTextProperty_dylibloader_wrapper_xlib)( Display*, wchar_t**, int, XICCEncodingStyle, XTextProperty*);
+int (*Xutf8TextListToTextProperty_dylibloader_wrapper_xlib)( Display*, char**, int, XICCEncodingStyle, XTextProperty*);
+void (*XwcFreeStringList_dylibloader_wrapper_xlib)( wchar_t**);
+int (*XTextPropertyToStringList_dylibloader_wrapper_xlib)( XTextProperty*, char***, int*);
+int (*XmbTextPropertyToTextList_dylibloader_wrapper_xlib)( Display*,const XTextProperty*, char***, int*);
+int (*XwcTextPropertyToTextList_dylibloader_wrapper_xlib)( Display*,const XTextProperty*, wchar_t***, int*);
+int (*Xutf8TextPropertyToTextList_dylibloader_wrapper_xlib)( Display*,const XTextProperty*, char***, int*);
+int (*XUnionRectWithRegion_dylibloader_wrapper_xlib)( XRectangle*, Region, Region);
+int (*XUnionRegion_dylibloader_wrapper_xlib)( Region, Region, Region);
+int (*XWMGeometry_dylibloader_wrapper_xlib)( Display*, int,const char*,const char*, unsigned int, XSizeHints*, int*, int*, int*, int*, int*);
+int (*XXorRegion_dylibloader_wrapper_xlib)( Region, Region, Region);
+int (*XkbIgnoreExtension_dylibloader_wrapper_xlib)( int);
+Display* (*XkbOpenDisplay_dylibloader_wrapper_xlib)( char*, int*, int*, int*, int*, int*);
+int (*XkbQueryExtension_dylibloader_wrapper_xlib)( Display*, int*, int*, int*, int*, int*);
+int (*XkbUseExtension_dylibloader_wrapper_xlib)( Display*, int*, int*);
+int (*XkbLibraryVersion_dylibloader_wrapper_xlib)( int*, int*);
+unsigned int (*XkbSetXlibControls_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+unsigned int (*XkbGetXlibControls_dylibloader_wrapper_xlib)( Display*);
+unsigned int (*XkbXlibControlsImplemented_dylibloader_wrapper_xlib)( void);
+void (*XkbSetAtomFuncs_dylibloader_wrapper_xlib)( XkbInternAtomFunc, XkbGetAtomNameFunc);
+KeySym (*XkbKeycodeToKeysym_dylibloader_wrapper_xlib)( Display*, KeyCode, int, int);
+unsigned int (*XkbKeysymToModifiers_dylibloader_wrapper_xlib)( Display*, KeySym);
+int (*XkbLookupKeySym_dylibloader_wrapper_xlib)( Display*, KeyCode, unsigned int, unsigned int*, KeySym*);
+int (*XkbLookupKeyBinding_dylibloader_wrapper_xlib)( Display*, KeySym, unsigned int, char*, int, int*);
+int (*XkbTranslateKeyCode_dylibloader_wrapper_xlib)( XkbDescPtr, KeyCode, unsigned int, unsigned int*, KeySym*);
+int (*XkbTranslateKeySym_dylibloader_wrapper_xlib)( Display*, KeySym*, unsigned int, char*, int, int*);
+int (*XkbSetAutoRepeatRate_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+int (*XkbGetAutoRepeatRate_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int*, unsigned int*);
+int (*XkbChangeEnabledControls_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+int (*XkbDeviceBell_dylibloader_wrapper_xlib)( Display*, Window, int, int, int, int, Atom);
+int (*XkbForceDeviceBell_dylibloader_wrapper_xlib)( Display*, int, int, int, int);
+int (*XkbDeviceBellEvent_dylibloader_wrapper_xlib)( Display*, Window, int, int, int, int, Atom);
+int (*XkbBell_dylibloader_wrapper_xlib)( Display*, Window, int, Atom);
+int (*XkbForceBell_dylibloader_wrapper_xlib)( Display*, int);
+int (*XkbBellEvent_dylibloader_wrapper_xlib)( Display*, Window, int, Atom);
+int (*XkbSelectEvents_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+int (*XkbSelectEventDetails_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned long, unsigned long);
+void (*XkbNoteMapChanges_dylibloader_wrapper_xlib)( XkbMapChangesPtr, XkbMapNotifyEvent*, unsigned int);
+void (*XkbNoteNameChanges_dylibloader_wrapper_xlib)( XkbNameChangesPtr, XkbNamesNotifyEvent*, unsigned int);
+int (*XkbGetIndicatorState_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int*);
+int (*XkbGetIndicatorMap_dylibloader_wrapper_xlib)( Display*, unsigned long, XkbDescPtr);
+int (*XkbSetIndicatorMap_dylibloader_wrapper_xlib)( Display*, unsigned long, XkbDescPtr);
+int (*XkbGetNamedIndicator_dylibloader_wrapper_xlib)( Display*, Atom, int*, int*, XkbIndicatorMapPtr, int*);
+int (*XkbGetNamedDeviceIndicator_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, Atom, int*, int*, XkbIndicatorMapPtr, int*);
+int (*XkbSetNamedIndicator_dylibloader_wrapper_xlib)( Display*, Atom, int, int, int, XkbIndicatorMapPtr);
+int (*XkbSetNamedDeviceIndicator_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, Atom, int, int, int, XkbIndicatorMapPtr);
+int (*XkbLockModifiers_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+int (*XkbLatchModifiers_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+int (*XkbLockGroup_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+int (*XkbLatchGroup_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+int (*XkbSetServerInternalMods_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
+int (*XkbSetIgnoreLockMods_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
+int (*XkbVirtualModsToReal_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, unsigned int*);
+int (*XkbComputeEffectiveMap_dylibloader_wrapper_xlib)( XkbDescPtr, XkbKeyTypePtr, unsigned char*);
+int (*XkbInitCanonicalKeyTypes_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+XkbDescPtr (*XkbAllocKeyboard_dylibloader_wrapper_xlib)( void);
+void (*XkbFreeKeyboard_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+int (*XkbAllocClientMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, unsigned int);
+int (*XkbAllocServerMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, unsigned int);
+void (*XkbFreeClientMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+void (*XkbFreeServerMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+XkbKeyTypePtr (*XkbAddKeyType_dylibloader_wrapper_xlib)( XkbDescPtr, Atom, int, int, int);
+int (*XkbAllocIndicatorMaps_dylibloader_wrapper_xlib)( XkbDescPtr);
+void (*XkbFreeIndicatorMaps_dylibloader_wrapper_xlib)( XkbDescPtr);
+XkbDescPtr (*XkbGetMap_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+int (*XkbGetUpdatedMap_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+int (*XkbGetMapChanges_dylibloader_wrapper_xlib)( Display*, XkbDescPtr, XkbMapChangesPtr);
+int (*XkbRefreshKeyboardMapping_dylibloader_wrapper_xlib)( XkbMapNotifyEvent*);
+int (*XkbGetKeyTypes_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+int (*XkbGetKeySyms_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+int (*XkbGetKeyActions_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+int (*XkbGetKeyBehaviors_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+int (*XkbGetVirtualMods_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+int (*XkbGetKeyExplicitComponents_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+int (*XkbGetKeyModifierMap_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+int (*XkbGetKeyVirtualModMap_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+int (*XkbAllocControls_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int);
+void (*XkbFreeControls_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+int (*XkbGetControls_dylibloader_wrapper_xlib)( Display*, unsigned long, XkbDescPtr);
+int (*XkbSetControls_dylibloader_wrapper_xlib)( Display*, unsigned long, XkbDescPtr);
+void (*XkbNoteControlsChanges_dylibloader_wrapper_xlib)( XkbControlsChangesPtr, XkbControlsNotifyEvent*, unsigned int);
+int (*XkbAllocCompatMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, unsigned int);
+void (*XkbFreeCompatMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+int (*XkbGetCompatMap_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+int (*XkbSetCompatMap_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr, int);
+int (*XkbAllocNames_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int, int);
+int (*XkbGetNames_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+int (*XkbSetNames_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, XkbDescPtr);
+int (*XkbChangeNames_dylibloader_wrapper_xlib)( Display*, XkbDescPtr, XkbNameChangesPtr);
+void (*XkbFreeNames_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+int (*XkbGetState_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbStatePtr);
+int (*XkbSetMap_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+int (*XkbChangeMap_dylibloader_wrapper_xlib)( Display*, XkbDescPtr, XkbMapChangesPtr);
+int (*XkbSetDetectableAutoRepeat_dylibloader_wrapper_xlib)( Display*, int, int*);
+int (*XkbGetDetectableAutoRepeat_dylibloader_wrapper_xlib)( Display*, int*);
+int (*XkbSetAutoResetControls_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int*, unsigned int*);
+int (*XkbGetAutoResetControls_dylibloader_wrapper_xlib)( Display*, unsigned int*, unsigned int*);
+int (*XkbSetPerClientControls_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int*);
+int (*XkbGetPerClientControls_dylibloader_wrapper_xlib)( Display*, unsigned int*);
+int (*XkbCopyKeyType_dylibloader_wrapper_xlib)( XkbKeyTypePtr, XkbKeyTypePtr);
+int (*XkbCopyKeyTypes_dylibloader_wrapper_xlib)( XkbKeyTypePtr, XkbKeyTypePtr, int);
+int (*XkbResizeKeyType_dylibloader_wrapper_xlib)( XkbDescPtr, int, int, int, int);
+KeySym* (*XkbResizeKeySyms_dylibloader_wrapper_xlib)( XkbDescPtr, int, int);
+XkbAction* (*XkbResizeKeyActions_dylibloader_wrapper_xlib)( XkbDescPtr, int, int);
+int (*XkbChangeTypesOfKey_dylibloader_wrapper_xlib)( XkbDescPtr, int, int, unsigned int, int*, XkbMapChangesPtr);
+int (*XkbChangeKeycodeRange_dylibloader_wrapper_xlib)( XkbDescPtr, int, int, XkbChangesPtr);
+XkbComponentListPtr (*XkbListComponents_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbComponentNamesPtr, int*);
+void (*XkbFreeComponentList_dylibloader_wrapper_xlib)( XkbComponentListPtr);
+XkbDescPtr (*XkbGetKeyboard_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+XkbDescPtr (*XkbGetKeyboardByName_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbComponentNamesPtr, unsigned int, unsigned int, int);
+int (*XkbKeyTypesForCoreSymbols_dylibloader_wrapper_xlib)( XkbDescPtr, int, KeySym*, unsigned int, int*, KeySym*);
+int (*XkbApplyCompatMapToKey_dylibloader_wrapper_xlib)( XkbDescPtr, KeyCode, XkbChangesPtr);
+int (*XkbUpdateMapFromCore_dylibloader_wrapper_xlib)( XkbDescPtr, KeyCode, int, int, KeySym*, XkbChangesPtr);
+XkbDeviceLedInfoPtr (*XkbAddDeviceLedInfo_dylibloader_wrapper_xlib)( XkbDeviceInfoPtr, unsigned int, unsigned int);
+int (*XkbResizeDeviceButtonActions_dylibloader_wrapper_xlib)( XkbDeviceInfoPtr, unsigned int);
+XkbDeviceInfoPtr (*XkbAllocDeviceInfo_dylibloader_wrapper_xlib)( unsigned int, unsigned int, unsigned int);
+void (*XkbFreeDeviceInfo_dylibloader_wrapper_xlib)( XkbDeviceInfoPtr, unsigned int, int);
+void (*XkbNoteDeviceChanges_dylibloader_wrapper_xlib)( XkbDeviceChangesPtr, XkbExtensionDeviceNotifyEvent*, unsigned int);
+XkbDeviceInfoPtr (*XkbGetDeviceInfo_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, unsigned int);
+int (*XkbGetDeviceInfoChanges_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, XkbDeviceChangesPtr);
+int (*XkbGetDeviceButtonActions_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, int, unsigned int, unsigned int);
+int (*XkbGetDeviceLedInfo_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, unsigned int, unsigned int, unsigned int);
+int (*XkbSetDeviceInfo_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDeviceInfoPtr);
+int (*XkbChangeDeviceInfo_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, XkbDeviceChangesPtr);
+int (*XkbSetDeviceLedInfo_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, unsigned int, unsigned int, unsigned int);
+int (*XkbSetDeviceButtonActions_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, unsigned int, unsigned int);
+char (*XkbToControl_dylibloader_wrapper_xlib)( char);
+int (*XkbSetDebuggingFlags_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, char*, unsigned int, unsigned int, unsigned int*, unsigned int*);
+int (*XkbApplyVirtualModChanges_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, XkbChangesPtr);
+int (*XkbUpdateActionVirtualMods_dylibloader_wrapper_xlib)( XkbDescPtr, XkbAction*, unsigned int);
+void (*XkbUpdateKeyTypeVirtualMods_dylibloader_wrapper_xlib)( XkbDescPtr, XkbKeyTypePtr, unsigned int, XkbChangesPtr);
+int initialize_xlib(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libX11.so.6", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// _Xmblen
+ *(void **) (&_Xmblen_dylibloader_wrapper_xlib) = dlsym(handle, "_Xmblen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLoadQueryFont
+ *(void **) (&XLoadQueryFont_dylibloader_wrapper_xlib) = dlsym(handle, "XLoadQueryFont");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryFont
+ *(void **) (&XQueryFont_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryFont");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetMotionEvents
+ *(void **) (&XGetMotionEvents_dylibloader_wrapper_xlib) = dlsym(handle, "XGetMotionEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDeleteModifiermapEntry
+ *(void **) (&XDeleteModifiermapEntry_dylibloader_wrapper_xlib) = dlsym(handle, "XDeleteModifiermapEntry");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetModifierMapping
+ *(void **) (&XGetModifierMapping_dylibloader_wrapper_xlib) = dlsym(handle, "XGetModifierMapping");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XInsertModifiermapEntry
+ *(void **) (&XInsertModifiermapEntry_dylibloader_wrapper_xlib) = dlsym(handle, "XInsertModifiermapEntry");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XNewModifiermap
+ *(void **) (&XNewModifiermap_dylibloader_wrapper_xlib) = dlsym(handle, "XNewModifiermap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateImage
+ *(void **) (&XCreateImage_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XInitImage
+ *(void **) (&XInitImage_dylibloader_wrapper_xlib) = dlsym(handle, "XInitImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetImage
+ *(void **) (&XGetImage_dylibloader_wrapper_xlib) = dlsym(handle, "XGetImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetSubImage
+ *(void **) (&XGetSubImage_dylibloader_wrapper_xlib) = dlsym(handle, "XGetSubImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XOpenDisplay
+ *(void **) (&XOpenDisplay_dylibloader_wrapper_xlib) = dlsym(handle, "XOpenDisplay");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XrmInitialize
+ *(void **) (&XrmInitialize_dylibloader_wrapper_xlib) = dlsym(handle, "XrmInitialize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFetchBytes
+ *(void **) (&XFetchBytes_dylibloader_wrapper_xlib) = dlsym(handle, "XFetchBytes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFetchBuffer
+ *(void **) (&XFetchBuffer_dylibloader_wrapper_xlib) = dlsym(handle, "XFetchBuffer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetAtomName
+ *(void **) (&XGetAtomName_dylibloader_wrapper_xlib) = dlsym(handle, "XGetAtomName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetAtomNames
+ *(void **) (&XGetAtomNames_dylibloader_wrapper_xlib) = dlsym(handle, "XGetAtomNames");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetDefault
+ *(void **) (&XGetDefault_dylibloader_wrapper_xlib) = dlsym(handle, "XGetDefault");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayName
+ *(void **) (&XDisplayName_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XKeysymToString
+ *(void **) (&XKeysymToString_dylibloader_wrapper_xlib) = dlsym(handle, "XKeysymToString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSynchronize
+ *(void **) (&XSynchronize_dylibloader_wrapper_xlib) = dlsym(handle, "XSynchronize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetAfterFunction
+ *(void **) (&XSetAfterFunction_dylibloader_wrapper_xlib) = dlsym(handle, "XSetAfterFunction");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XInternAtom
+ *(void **) (&XInternAtom_dylibloader_wrapper_xlib) = dlsym(handle, "XInternAtom");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XInternAtoms
+ *(void **) (&XInternAtoms_dylibloader_wrapper_xlib) = dlsym(handle, "XInternAtoms");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCopyColormapAndFree
+ *(void **) (&XCopyColormapAndFree_dylibloader_wrapper_xlib) = dlsym(handle, "XCopyColormapAndFree");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateColormap
+ *(void **) (&XCreateColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreatePixmapCursor
+ *(void **) (&XCreatePixmapCursor_dylibloader_wrapper_xlib) = dlsym(handle, "XCreatePixmapCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateGlyphCursor
+ *(void **) (&XCreateGlyphCursor_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateGlyphCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateFontCursor
+ *(void **) (&XCreateFontCursor_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateFontCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLoadFont
+ *(void **) (&XLoadFont_dylibloader_wrapper_xlib) = dlsym(handle, "XLoadFont");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateGC
+ *(void **) (&XCreateGC_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateGC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGContextFromGC
+ *(void **) (&XGContextFromGC_dylibloader_wrapper_xlib) = dlsym(handle, "XGContextFromGC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFlushGC
+ *(void **) (&XFlushGC_dylibloader_wrapper_xlib) = dlsym(handle, "XFlushGC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreatePixmap
+ *(void **) (&XCreatePixmap_dylibloader_wrapper_xlib) = dlsym(handle, "XCreatePixmap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateBitmapFromData
+ *(void **) (&XCreateBitmapFromData_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateBitmapFromData");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreatePixmapFromBitmapData
+ *(void **) (&XCreatePixmapFromBitmapData_dylibloader_wrapper_xlib) = dlsym(handle, "XCreatePixmapFromBitmapData");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateSimpleWindow
+ *(void **) (&XCreateSimpleWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateSimpleWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetSelectionOwner
+ *(void **) (&XGetSelectionOwner_dylibloader_wrapper_xlib) = dlsym(handle, "XGetSelectionOwner");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateWindow
+ *(void **) (&XCreateWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XListInstalledColormaps
+ *(void **) (&XListInstalledColormaps_dylibloader_wrapper_xlib) = dlsym(handle, "XListInstalledColormaps");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XListFonts
+ *(void **) (&XListFonts_dylibloader_wrapper_xlib) = dlsym(handle, "XListFonts");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XListFontsWithInfo
+ *(void **) (&XListFontsWithInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XListFontsWithInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetFontPath
+ *(void **) (&XGetFontPath_dylibloader_wrapper_xlib) = dlsym(handle, "XGetFontPath");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XListExtensions
+ *(void **) (&XListExtensions_dylibloader_wrapper_xlib) = dlsym(handle, "XListExtensions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XListProperties
+ *(void **) (&XListProperties_dylibloader_wrapper_xlib) = dlsym(handle, "XListProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XListHosts
+ *(void **) (&XListHosts_dylibloader_wrapper_xlib) = dlsym(handle, "XListHosts");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XKeycodeToKeysym
+ *(void **) (&XKeycodeToKeysym_dylibloader_wrapper_xlib) = dlsym(handle, "XKeycodeToKeysym");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLookupKeysym
+ *(void **) (&XLookupKeysym_dylibloader_wrapper_xlib) = dlsym(handle, "XLookupKeysym");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetKeyboardMapping
+ *(void **) (&XGetKeyboardMapping_dylibloader_wrapper_xlib) = dlsym(handle, "XGetKeyboardMapping");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XStringToKeysym
+ *(void **) (&XStringToKeysym_dylibloader_wrapper_xlib) = dlsym(handle, "XStringToKeysym");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMaxRequestSize
+ *(void **) (&XMaxRequestSize_dylibloader_wrapper_xlib) = dlsym(handle, "XMaxRequestSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XExtendedMaxRequestSize
+ *(void **) (&XExtendedMaxRequestSize_dylibloader_wrapper_xlib) = dlsym(handle, "XExtendedMaxRequestSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XResourceManagerString
+ *(void **) (&XResourceManagerString_dylibloader_wrapper_xlib) = dlsym(handle, "XResourceManagerString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XScreenResourceString
+ *(void **) (&XScreenResourceString_dylibloader_wrapper_xlib) = dlsym(handle, "XScreenResourceString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayMotionBufferSize
+ *(void **) (&XDisplayMotionBufferSize_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayMotionBufferSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XVisualIDFromVisual
+ *(void **) (&XVisualIDFromVisual_dylibloader_wrapper_xlib) = dlsym(handle, "XVisualIDFromVisual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XInitThreads
+ *(void **) (&XInitThreads_dylibloader_wrapper_xlib) = dlsym(handle, "XInitThreads");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLockDisplay
+ *(void **) (&XLockDisplay_dylibloader_wrapper_xlib) = dlsym(handle, "XLockDisplay");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUnlockDisplay
+ *(void **) (&XUnlockDisplay_dylibloader_wrapper_xlib) = dlsym(handle, "XUnlockDisplay");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XInitExtension
+ *(void **) (&XInitExtension_dylibloader_wrapper_xlib) = dlsym(handle, "XInitExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAddExtension
+ *(void **) (&XAddExtension_dylibloader_wrapper_xlib) = dlsym(handle, "XAddExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFindOnExtensionList
+ *(void **) (&XFindOnExtensionList_dylibloader_wrapper_xlib) = dlsym(handle, "XFindOnExtensionList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XEHeadOfExtensionList
+ *(void **) (&XEHeadOfExtensionList_dylibloader_wrapper_xlib) = dlsym(handle, "XEHeadOfExtensionList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRootWindow
+ *(void **) (&XRootWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XRootWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultRootWindow
+ *(void **) (&XDefaultRootWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultRootWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRootWindowOfScreen
+ *(void **) (&XRootWindowOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XRootWindowOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultVisual
+ *(void **) (&XDefaultVisual_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultVisual");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultVisualOfScreen
+ *(void **) (&XDefaultVisualOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultVisualOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultGC
+ *(void **) (&XDefaultGC_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultGC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultGCOfScreen
+ *(void **) (&XDefaultGCOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultGCOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XBlackPixel
+ *(void **) (&XBlackPixel_dylibloader_wrapper_xlib) = dlsym(handle, "XBlackPixel");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWhitePixel
+ *(void **) (&XWhitePixel_dylibloader_wrapper_xlib) = dlsym(handle, "XWhitePixel");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllPlanes
+ *(void **) (&XAllPlanes_dylibloader_wrapper_xlib) = dlsym(handle, "XAllPlanes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XBlackPixelOfScreen
+ *(void **) (&XBlackPixelOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XBlackPixelOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWhitePixelOfScreen
+ *(void **) (&XWhitePixelOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XWhitePixelOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XNextRequest
+ *(void **) (&XNextRequest_dylibloader_wrapper_xlib) = dlsym(handle, "XNextRequest");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLastKnownRequestProcessed
+ *(void **) (&XLastKnownRequestProcessed_dylibloader_wrapper_xlib) = dlsym(handle, "XLastKnownRequestProcessed");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XServerVendor
+ *(void **) (&XServerVendor_dylibloader_wrapper_xlib) = dlsym(handle, "XServerVendor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayString
+ *(void **) (&XDisplayString_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultColormap
+ *(void **) (&XDefaultColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultColormapOfScreen
+ *(void **) (&XDefaultColormapOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultColormapOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayOfScreen
+ *(void **) (&XDisplayOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XScreenOfDisplay
+ *(void **) (&XScreenOfDisplay_dylibloader_wrapper_xlib) = dlsym(handle, "XScreenOfDisplay");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultScreenOfDisplay
+ *(void **) (&XDefaultScreenOfDisplay_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultScreenOfDisplay");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XEventMaskOfScreen
+ *(void **) (&XEventMaskOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XEventMaskOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XScreenNumberOfScreen
+ *(void **) (&XScreenNumberOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XScreenNumberOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetErrorHandler
+ *(void **) (&XSetErrorHandler_dylibloader_wrapper_xlib) = dlsym(handle, "XSetErrorHandler");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetIOErrorHandler
+ *(void **) (&XSetIOErrorHandler_dylibloader_wrapper_xlib) = dlsym(handle, "XSetIOErrorHandler");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XListPixmapFormats
+ *(void **) (&XListPixmapFormats_dylibloader_wrapper_xlib) = dlsym(handle, "XListPixmapFormats");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XListDepths
+ *(void **) (&XListDepths_dylibloader_wrapper_xlib) = dlsym(handle, "XListDepths");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XReconfigureWMWindow
+ *(void **) (&XReconfigureWMWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XReconfigureWMWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWMProtocols
+ *(void **) (&XGetWMProtocols_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWMProtocols");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMProtocols
+ *(void **) (&XSetWMProtocols_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMProtocols");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIconifyWindow
+ *(void **) (&XIconifyWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XIconifyWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWithdrawWindow
+ *(void **) (&XWithdrawWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XWithdrawWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetCommand
+ *(void **) (&XGetCommand_dylibloader_wrapper_xlib) = dlsym(handle, "XGetCommand");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWMColormapWindows
+ *(void **) (&XGetWMColormapWindows_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWMColormapWindows");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMColormapWindows
+ *(void **) (&XSetWMColormapWindows_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMColormapWindows");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeStringList
+ *(void **) (&XFreeStringList_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeStringList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetTransientForHint
+ *(void **) (&XSetTransientForHint_dylibloader_wrapper_xlib) = dlsym(handle, "XSetTransientForHint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XActivateScreenSaver
+ *(void **) (&XActivateScreenSaver_dylibloader_wrapper_xlib) = dlsym(handle, "XActivateScreenSaver");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAddHost
+ *(void **) (&XAddHost_dylibloader_wrapper_xlib) = dlsym(handle, "XAddHost");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAddHosts
+ *(void **) (&XAddHosts_dylibloader_wrapper_xlib) = dlsym(handle, "XAddHosts");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAddToExtensionList
+ *(void **) (&XAddToExtensionList_dylibloader_wrapper_xlib) = dlsym(handle, "XAddToExtensionList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAddToSaveSet
+ *(void **) (&XAddToSaveSet_dylibloader_wrapper_xlib) = dlsym(handle, "XAddToSaveSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocColor
+ *(void **) (&XAllocColor_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocColorCells
+ *(void **) (&XAllocColorCells_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocColorCells");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocColorPlanes
+ *(void **) (&XAllocColorPlanes_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocColorPlanes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocNamedColor
+ *(void **) (&XAllocNamedColor_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocNamedColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllowEvents
+ *(void **) (&XAllowEvents_dylibloader_wrapper_xlib) = dlsym(handle, "XAllowEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAutoRepeatOff
+ *(void **) (&XAutoRepeatOff_dylibloader_wrapper_xlib) = dlsym(handle, "XAutoRepeatOff");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAutoRepeatOn
+ *(void **) (&XAutoRepeatOn_dylibloader_wrapper_xlib) = dlsym(handle, "XAutoRepeatOn");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XBell
+ *(void **) (&XBell_dylibloader_wrapper_xlib) = dlsym(handle, "XBell");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XBitmapBitOrder
+ *(void **) (&XBitmapBitOrder_dylibloader_wrapper_xlib) = dlsym(handle, "XBitmapBitOrder");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XBitmapPad
+ *(void **) (&XBitmapPad_dylibloader_wrapper_xlib) = dlsym(handle, "XBitmapPad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XBitmapUnit
+ *(void **) (&XBitmapUnit_dylibloader_wrapper_xlib) = dlsym(handle, "XBitmapUnit");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCellsOfScreen
+ *(void **) (&XCellsOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XCellsOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XChangeActivePointerGrab
+ *(void **) (&XChangeActivePointerGrab_dylibloader_wrapper_xlib) = dlsym(handle, "XChangeActivePointerGrab");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XChangeGC
+ *(void **) (&XChangeGC_dylibloader_wrapper_xlib) = dlsym(handle, "XChangeGC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XChangeKeyboardControl
+ *(void **) (&XChangeKeyboardControl_dylibloader_wrapper_xlib) = dlsym(handle, "XChangeKeyboardControl");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XChangeKeyboardMapping
+ *(void **) (&XChangeKeyboardMapping_dylibloader_wrapper_xlib) = dlsym(handle, "XChangeKeyboardMapping");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XChangePointerControl
+ *(void **) (&XChangePointerControl_dylibloader_wrapper_xlib) = dlsym(handle, "XChangePointerControl");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XChangeProperty
+ *(void **) (&XChangeProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XChangeProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XChangeSaveSet
+ *(void **) (&XChangeSaveSet_dylibloader_wrapper_xlib) = dlsym(handle, "XChangeSaveSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XChangeWindowAttributes
+ *(void **) (&XChangeWindowAttributes_dylibloader_wrapper_xlib) = dlsym(handle, "XChangeWindowAttributes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCheckIfEvent
+ *(void **) (&XCheckIfEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XCheckIfEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCheckMaskEvent
+ *(void **) (&XCheckMaskEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XCheckMaskEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCheckTypedEvent
+ *(void **) (&XCheckTypedEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XCheckTypedEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCheckTypedWindowEvent
+ *(void **) (&XCheckTypedWindowEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XCheckTypedWindowEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCheckWindowEvent
+ *(void **) (&XCheckWindowEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XCheckWindowEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCirculateSubwindows
+ *(void **) (&XCirculateSubwindows_dylibloader_wrapper_xlib) = dlsym(handle, "XCirculateSubwindows");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCirculateSubwindowsDown
+ *(void **) (&XCirculateSubwindowsDown_dylibloader_wrapper_xlib) = dlsym(handle, "XCirculateSubwindowsDown");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCirculateSubwindowsUp
+ *(void **) (&XCirculateSubwindowsUp_dylibloader_wrapper_xlib) = dlsym(handle, "XCirculateSubwindowsUp");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XClearArea
+ *(void **) (&XClearArea_dylibloader_wrapper_xlib) = dlsym(handle, "XClearArea");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XClearWindow
+ *(void **) (&XClearWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XClearWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCloseDisplay
+ *(void **) (&XCloseDisplay_dylibloader_wrapper_xlib) = dlsym(handle, "XCloseDisplay");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XConfigureWindow
+ *(void **) (&XConfigureWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XConfigureWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XConnectionNumber
+ *(void **) (&XConnectionNumber_dylibloader_wrapper_xlib) = dlsym(handle, "XConnectionNumber");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XConvertSelection
+ *(void **) (&XConvertSelection_dylibloader_wrapper_xlib) = dlsym(handle, "XConvertSelection");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCopyArea
+ *(void **) (&XCopyArea_dylibloader_wrapper_xlib) = dlsym(handle, "XCopyArea");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCopyGC
+ *(void **) (&XCopyGC_dylibloader_wrapper_xlib) = dlsym(handle, "XCopyGC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCopyPlane
+ *(void **) (&XCopyPlane_dylibloader_wrapper_xlib) = dlsym(handle, "XCopyPlane");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultDepth
+ *(void **) (&XDefaultDepth_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultDepth");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultDepthOfScreen
+ *(void **) (&XDefaultDepthOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultDepthOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultScreen
+ *(void **) (&XDefaultScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefineCursor
+ *(void **) (&XDefineCursor_dylibloader_wrapper_xlib) = dlsym(handle, "XDefineCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDeleteProperty
+ *(void **) (&XDeleteProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XDeleteProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDestroyWindow
+ *(void **) (&XDestroyWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XDestroyWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDestroySubwindows
+ *(void **) (&XDestroySubwindows_dylibloader_wrapper_xlib) = dlsym(handle, "XDestroySubwindows");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDoesBackingStore
+ *(void **) (&XDoesBackingStore_dylibloader_wrapper_xlib) = dlsym(handle, "XDoesBackingStore");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDoesSaveUnders
+ *(void **) (&XDoesSaveUnders_dylibloader_wrapper_xlib) = dlsym(handle, "XDoesSaveUnders");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisableAccessControl
+ *(void **) (&XDisableAccessControl_dylibloader_wrapper_xlib) = dlsym(handle, "XDisableAccessControl");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayCells
+ *(void **) (&XDisplayCells_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayCells");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayHeight
+ *(void **) (&XDisplayHeight_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayHeight");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayHeightMM
+ *(void **) (&XDisplayHeightMM_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayHeightMM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayKeycodes
+ *(void **) (&XDisplayKeycodes_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayKeycodes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayPlanes
+ *(void **) (&XDisplayPlanes_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayPlanes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayWidth
+ *(void **) (&XDisplayWidth_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayWidth");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayWidthMM
+ *(void **) (&XDisplayWidthMM_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayWidthMM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawArc
+ *(void **) (&XDrawArc_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawArc");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawArcs
+ *(void **) (&XDrawArcs_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawArcs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawImageString
+ *(void **) (&XDrawImageString_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawImageString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawImageString16
+ *(void **) (&XDrawImageString16_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawImageString16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawLine
+ *(void **) (&XDrawLine_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawLine");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawLines
+ *(void **) (&XDrawLines_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawLines");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawPoint
+ *(void **) (&XDrawPoint_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawPoint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawPoints
+ *(void **) (&XDrawPoints_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawPoints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawRectangle
+ *(void **) (&XDrawRectangle_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawRectangle");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawRectangles
+ *(void **) (&XDrawRectangles_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawSegments
+ *(void **) (&XDrawSegments_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawSegments");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawString
+ *(void **) (&XDrawString_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawString16
+ *(void **) (&XDrawString16_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawString16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawText
+ *(void **) (&XDrawText_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawText");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDrawText16
+ *(void **) (&XDrawText16_dylibloader_wrapper_xlib) = dlsym(handle, "XDrawText16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XEnableAccessControl
+ *(void **) (&XEnableAccessControl_dylibloader_wrapper_xlib) = dlsym(handle, "XEnableAccessControl");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XEventsQueued
+ *(void **) (&XEventsQueued_dylibloader_wrapper_xlib) = dlsym(handle, "XEventsQueued");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFetchName
+ *(void **) (&XFetchName_dylibloader_wrapper_xlib) = dlsym(handle, "XFetchName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFillArc
+ *(void **) (&XFillArc_dylibloader_wrapper_xlib) = dlsym(handle, "XFillArc");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFillArcs
+ *(void **) (&XFillArcs_dylibloader_wrapper_xlib) = dlsym(handle, "XFillArcs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFillPolygon
+ *(void **) (&XFillPolygon_dylibloader_wrapper_xlib) = dlsym(handle, "XFillPolygon");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFillRectangle
+ *(void **) (&XFillRectangle_dylibloader_wrapper_xlib) = dlsym(handle, "XFillRectangle");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFillRectangles
+ *(void **) (&XFillRectangles_dylibloader_wrapper_xlib) = dlsym(handle, "XFillRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFlush
+ *(void **) (&XFlush_dylibloader_wrapper_xlib) = dlsym(handle, "XFlush");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XForceScreenSaver
+ *(void **) (&XForceScreenSaver_dylibloader_wrapper_xlib) = dlsym(handle, "XForceScreenSaver");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFree
+ *(void **) (&XFree_dylibloader_wrapper_xlib) = dlsym(handle, "XFree");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeColormap
+ *(void **) (&XFreeColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeColors
+ *(void **) (&XFreeColors_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeColors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeCursor
+ *(void **) (&XFreeCursor_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeExtensionList
+ *(void **) (&XFreeExtensionList_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeExtensionList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeFont
+ *(void **) (&XFreeFont_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeFont");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeFontInfo
+ *(void **) (&XFreeFontInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeFontInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeFontNames
+ *(void **) (&XFreeFontNames_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeFontNames");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeFontPath
+ *(void **) (&XFreeFontPath_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeFontPath");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeGC
+ *(void **) (&XFreeGC_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeGC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeModifiermap
+ *(void **) (&XFreeModifiermap_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeModifiermap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreePixmap
+ *(void **) (&XFreePixmap_dylibloader_wrapper_xlib) = dlsym(handle, "XFreePixmap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGeometry
+ *(void **) (&XGeometry_dylibloader_wrapper_xlib) = dlsym(handle, "XGeometry");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetErrorDatabaseText
+ *(void **) (&XGetErrorDatabaseText_dylibloader_wrapper_xlib) = dlsym(handle, "XGetErrorDatabaseText");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetErrorText
+ *(void **) (&XGetErrorText_dylibloader_wrapper_xlib) = dlsym(handle, "XGetErrorText");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetFontProperty
+ *(void **) (&XGetFontProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XGetFontProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetGCValues
+ *(void **) (&XGetGCValues_dylibloader_wrapper_xlib) = dlsym(handle, "XGetGCValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetGeometry
+ *(void **) (&XGetGeometry_dylibloader_wrapper_xlib) = dlsym(handle, "XGetGeometry");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetIconName
+ *(void **) (&XGetIconName_dylibloader_wrapper_xlib) = dlsym(handle, "XGetIconName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetInputFocus
+ *(void **) (&XGetInputFocus_dylibloader_wrapper_xlib) = dlsym(handle, "XGetInputFocus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetKeyboardControl
+ *(void **) (&XGetKeyboardControl_dylibloader_wrapper_xlib) = dlsym(handle, "XGetKeyboardControl");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetPointerControl
+ *(void **) (&XGetPointerControl_dylibloader_wrapper_xlib) = dlsym(handle, "XGetPointerControl");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetPointerMapping
+ *(void **) (&XGetPointerMapping_dylibloader_wrapper_xlib) = dlsym(handle, "XGetPointerMapping");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetScreenSaver
+ *(void **) (&XGetScreenSaver_dylibloader_wrapper_xlib) = dlsym(handle, "XGetScreenSaver");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetTransientForHint
+ *(void **) (&XGetTransientForHint_dylibloader_wrapper_xlib) = dlsym(handle, "XGetTransientForHint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWindowProperty
+ *(void **) (&XGetWindowProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWindowProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWindowAttributes
+ *(void **) (&XGetWindowAttributes_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWindowAttributes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGrabButton
+ *(void **) (&XGrabButton_dylibloader_wrapper_xlib) = dlsym(handle, "XGrabButton");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGrabKey
+ *(void **) (&XGrabKey_dylibloader_wrapper_xlib) = dlsym(handle, "XGrabKey");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGrabKeyboard
+ *(void **) (&XGrabKeyboard_dylibloader_wrapper_xlib) = dlsym(handle, "XGrabKeyboard");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGrabPointer
+ *(void **) (&XGrabPointer_dylibloader_wrapper_xlib) = dlsym(handle, "XGrabPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGrabServer
+ *(void **) (&XGrabServer_dylibloader_wrapper_xlib) = dlsym(handle, "XGrabServer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XHeightMMOfScreen
+ *(void **) (&XHeightMMOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XHeightMMOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XHeightOfScreen
+ *(void **) (&XHeightOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XHeightOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIfEvent
+ *(void **) (&XIfEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XIfEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XImageByteOrder
+ *(void **) (&XImageByteOrder_dylibloader_wrapper_xlib) = dlsym(handle, "XImageByteOrder");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XInstallColormap
+ *(void **) (&XInstallColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XInstallColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XKeysymToKeycode
+ *(void **) (&XKeysymToKeycode_dylibloader_wrapper_xlib) = dlsym(handle, "XKeysymToKeycode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XKillClient
+ *(void **) (&XKillClient_dylibloader_wrapper_xlib) = dlsym(handle, "XKillClient");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLookupColor
+ *(void **) (&XLookupColor_dylibloader_wrapper_xlib) = dlsym(handle, "XLookupColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLowerWindow
+ *(void **) (&XLowerWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XLowerWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMapRaised
+ *(void **) (&XMapRaised_dylibloader_wrapper_xlib) = dlsym(handle, "XMapRaised");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMapSubwindows
+ *(void **) (&XMapSubwindows_dylibloader_wrapper_xlib) = dlsym(handle, "XMapSubwindows");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMapWindow
+ *(void **) (&XMapWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XMapWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMaskEvent
+ *(void **) (&XMaskEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XMaskEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMaxCmapsOfScreen
+ *(void **) (&XMaxCmapsOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XMaxCmapsOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMinCmapsOfScreen
+ *(void **) (&XMinCmapsOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XMinCmapsOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMoveResizeWindow
+ *(void **) (&XMoveResizeWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XMoveResizeWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMoveWindow
+ *(void **) (&XMoveWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XMoveWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XNextEvent
+ *(void **) (&XNextEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XNextEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XNoOp
+ *(void **) (&XNoOp_dylibloader_wrapper_xlib) = dlsym(handle, "XNoOp");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XParseColor
+ *(void **) (&XParseColor_dylibloader_wrapper_xlib) = dlsym(handle, "XParseColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XParseGeometry
+ *(void **) (&XParseGeometry_dylibloader_wrapper_xlib) = dlsym(handle, "XParseGeometry");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XPeekEvent
+ *(void **) (&XPeekEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XPeekEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XPeekIfEvent
+ *(void **) (&XPeekIfEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XPeekIfEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XPending
+ *(void **) (&XPending_dylibloader_wrapper_xlib) = dlsym(handle, "XPending");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XPlanesOfScreen
+ *(void **) (&XPlanesOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XPlanesOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XProtocolRevision
+ *(void **) (&XProtocolRevision_dylibloader_wrapper_xlib) = dlsym(handle, "XProtocolRevision");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XProtocolVersion
+ *(void **) (&XProtocolVersion_dylibloader_wrapper_xlib) = dlsym(handle, "XProtocolVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XPutBackEvent
+ *(void **) (&XPutBackEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XPutBackEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XPutImage
+ *(void **) (&XPutImage_dylibloader_wrapper_xlib) = dlsym(handle, "XPutImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQLength
+ *(void **) (&XQLength_dylibloader_wrapper_xlib) = dlsym(handle, "XQLength");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryBestCursor
+ *(void **) (&XQueryBestCursor_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryBestCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryBestSize
+ *(void **) (&XQueryBestSize_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryBestSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryBestStipple
+ *(void **) (&XQueryBestStipple_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryBestStipple");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryBestTile
+ *(void **) (&XQueryBestTile_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryBestTile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryColor
+ *(void **) (&XQueryColor_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryColors
+ *(void **) (&XQueryColors_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryColors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryExtension
+ *(void **) (&XQueryExtension_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryKeymap
+ *(void **) (&XQueryKeymap_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryKeymap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryPointer
+ *(void **) (&XQueryPointer_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryTextExtents
+ *(void **) (&XQueryTextExtents_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryTextExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryTextExtents16
+ *(void **) (&XQueryTextExtents16_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryTextExtents16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XQueryTree
+ *(void **) (&XQueryTree_dylibloader_wrapper_xlib) = dlsym(handle, "XQueryTree");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRaiseWindow
+ *(void **) (&XRaiseWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XRaiseWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XReadBitmapFile
+ *(void **) (&XReadBitmapFile_dylibloader_wrapper_xlib) = dlsym(handle, "XReadBitmapFile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XReadBitmapFileData
+ *(void **) (&XReadBitmapFileData_dylibloader_wrapper_xlib) = dlsym(handle, "XReadBitmapFileData");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRebindKeysym
+ *(void **) (&XRebindKeysym_dylibloader_wrapper_xlib) = dlsym(handle, "XRebindKeysym");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRecolorCursor
+ *(void **) (&XRecolorCursor_dylibloader_wrapper_xlib) = dlsym(handle, "XRecolorCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRefreshKeyboardMapping
+ *(void **) (&XRefreshKeyboardMapping_dylibloader_wrapper_xlib) = dlsym(handle, "XRefreshKeyboardMapping");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRemoveFromSaveSet
+ *(void **) (&XRemoveFromSaveSet_dylibloader_wrapper_xlib) = dlsym(handle, "XRemoveFromSaveSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRemoveHost
+ *(void **) (&XRemoveHost_dylibloader_wrapper_xlib) = dlsym(handle, "XRemoveHost");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRemoveHosts
+ *(void **) (&XRemoveHosts_dylibloader_wrapper_xlib) = dlsym(handle, "XRemoveHosts");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XReparentWindow
+ *(void **) (&XReparentWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XReparentWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XResetScreenSaver
+ *(void **) (&XResetScreenSaver_dylibloader_wrapper_xlib) = dlsym(handle, "XResetScreenSaver");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XResizeWindow
+ *(void **) (&XResizeWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XResizeWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRestackWindows
+ *(void **) (&XRestackWindows_dylibloader_wrapper_xlib) = dlsym(handle, "XRestackWindows");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRotateBuffers
+ *(void **) (&XRotateBuffers_dylibloader_wrapper_xlib) = dlsym(handle, "XRotateBuffers");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRotateWindowProperties
+ *(void **) (&XRotateWindowProperties_dylibloader_wrapper_xlib) = dlsym(handle, "XRotateWindowProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XScreenCount
+ *(void **) (&XScreenCount_dylibloader_wrapper_xlib) = dlsym(handle, "XScreenCount");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSelectInput
+ *(void **) (&XSelectInput_dylibloader_wrapper_xlib) = dlsym(handle, "XSelectInput");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSendEvent
+ *(void **) (&XSendEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XSendEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetAccessControl
+ *(void **) (&XSetAccessControl_dylibloader_wrapper_xlib) = dlsym(handle, "XSetAccessControl");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetArcMode
+ *(void **) (&XSetArcMode_dylibloader_wrapper_xlib) = dlsym(handle, "XSetArcMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetBackground
+ *(void **) (&XSetBackground_dylibloader_wrapper_xlib) = dlsym(handle, "XSetBackground");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetClipMask
+ *(void **) (&XSetClipMask_dylibloader_wrapper_xlib) = dlsym(handle, "XSetClipMask");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetClipOrigin
+ *(void **) (&XSetClipOrigin_dylibloader_wrapper_xlib) = dlsym(handle, "XSetClipOrigin");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetClipRectangles
+ *(void **) (&XSetClipRectangles_dylibloader_wrapper_xlib) = dlsym(handle, "XSetClipRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetCloseDownMode
+ *(void **) (&XSetCloseDownMode_dylibloader_wrapper_xlib) = dlsym(handle, "XSetCloseDownMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetCommand
+ *(void **) (&XSetCommand_dylibloader_wrapper_xlib) = dlsym(handle, "XSetCommand");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetDashes
+ *(void **) (&XSetDashes_dylibloader_wrapper_xlib) = dlsym(handle, "XSetDashes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetFillRule
+ *(void **) (&XSetFillRule_dylibloader_wrapper_xlib) = dlsym(handle, "XSetFillRule");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetFillStyle
+ *(void **) (&XSetFillStyle_dylibloader_wrapper_xlib) = dlsym(handle, "XSetFillStyle");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetFont
+ *(void **) (&XSetFont_dylibloader_wrapper_xlib) = dlsym(handle, "XSetFont");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetFontPath
+ *(void **) (&XSetFontPath_dylibloader_wrapper_xlib) = dlsym(handle, "XSetFontPath");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetForeground
+ *(void **) (&XSetForeground_dylibloader_wrapper_xlib) = dlsym(handle, "XSetForeground");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetFunction
+ *(void **) (&XSetFunction_dylibloader_wrapper_xlib) = dlsym(handle, "XSetFunction");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetGraphicsExposures
+ *(void **) (&XSetGraphicsExposures_dylibloader_wrapper_xlib) = dlsym(handle, "XSetGraphicsExposures");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetIconName
+ *(void **) (&XSetIconName_dylibloader_wrapper_xlib) = dlsym(handle, "XSetIconName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetInputFocus
+ *(void **) (&XSetInputFocus_dylibloader_wrapper_xlib) = dlsym(handle, "XSetInputFocus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetLineAttributes
+ *(void **) (&XSetLineAttributes_dylibloader_wrapper_xlib) = dlsym(handle, "XSetLineAttributes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetModifierMapping
+ *(void **) (&XSetModifierMapping_dylibloader_wrapper_xlib) = dlsym(handle, "XSetModifierMapping");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetPlaneMask
+ *(void **) (&XSetPlaneMask_dylibloader_wrapper_xlib) = dlsym(handle, "XSetPlaneMask");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetPointerMapping
+ *(void **) (&XSetPointerMapping_dylibloader_wrapper_xlib) = dlsym(handle, "XSetPointerMapping");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetScreenSaver
+ *(void **) (&XSetScreenSaver_dylibloader_wrapper_xlib) = dlsym(handle, "XSetScreenSaver");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetSelectionOwner
+ *(void **) (&XSetSelectionOwner_dylibloader_wrapper_xlib) = dlsym(handle, "XSetSelectionOwner");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetState
+ *(void **) (&XSetState_dylibloader_wrapper_xlib) = dlsym(handle, "XSetState");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetStipple
+ *(void **) (&XSetStipple_dylibloader_wrapper_xlib) = dlsym(handle, "XSetStipple");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetSubwindowMode
+ *(void **) (&XSetSubwindowMode_dylibloader_wrapper_xlib) = dlsym(handle, "XSetSubwindowMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetTSOrigin
+ *(void **) (&XSetTSOrigin_dylibloader_wrapper_xlib) = dlsym(handle, "XSetTSOrigin");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetTile
+ *(void **) (&XSetTile_dylibloader_wrapper_xlib) = dlsym(handle, "XSetTile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWindowBackground
+ *(void **) (&XSetWindowBackground_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWindowBackground");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWindowBackgroundPixmap
+ *(void **) (&XSetWindowBackgroundPixmap_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWindowBackgroundPixmap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWindowBorder
+ *(void **) (&XSetWindowBorder_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWindowBorder");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWindowBorderPixmap
+ *(void **) (&XSetWindowBorderPixmap_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWindowBorderPixmap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWindowBorderWidth
+ *(void **) (&XSetWindowBorderWidth_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWindowBorderWidth");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWindowColormap
+ *(void **) (&XSetWindowColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWindowColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XStoreBuffer
+ *(void **) (&XStoreBuffer_dylibloader_wrapper_xlib) = dlsym(handle, "XStoreBuffer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XStoreBytes
+ *(void **) (&XStoreBytes_dylibloader_wrapper_xlib) = dlsym(handle, "XStoreBytes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XStoreColor
+ *(void **) (&XStoreColor_dylibloader_wrapper_xlib) = dlsym(handle, "XStoreColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XStoreColors
+ *(void **) (&XStoreColors_dylibloader_wrapper_xlib) = dlsym(handle, "XStoreColors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XStoreName
+ *(void **) (&XStoreName_dylibloader_wrapper_xlib) = dlsym(handle, "XStoreName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XStoreNamedColor
+ *(void **) (&XStoreNamedColor_dylibloader_wrapper_xlib) = dlsym(handle, "XStoreNamedColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSync
+ *(void **) (&XSync_dylibloader_wrapper_xlib) = dlsym(handle, "XSync");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XTextExtents
+ *(void **) (&XTextExtents_dylibloader_wrapper_xlib) = dlsym(handle, "XTextExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XTextExtents16
+ *(void **) (&XTextExtents16_dylibloader_wrapper_xlib) = dlsym(handle, "XTextExtents16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XTextWidth
+ *(void **) (&XTextWidth_dylibloader_wrapper_xlib) = dlsym(handle, "XTextWidth");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XTextWidth16
+ *(void **) (&XTextWidth16_dylibloader_wrapper_xlib) = dlsym(handle, "XTextWidth16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XTranslateCoordinates
+ *(void **) (&XTranslateCoordinates_dylibloader_wrapper_xlib) = dlsym(handle, "XTranslateCoordinates");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUndefineCursor
+ *(void **) (&XUndefineCursor_dylibloader_wrapper_xlib) = dlsym(handle, "XUndefineCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUngrabButton
+ *(void **) (&XUngrabButton_dylibloader_wrapper_xlib) = dlsym(handle, "XUngrabButton");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUngrabKey
+ *(void **) (&XUngrabKey_dylibloader_wrapper_xlib) = dlsym(handle, "XUngrabKey");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUngrabKeyboard
+ *(void **) (&XUngrabKeyboard_dylibloader_wrapper_xlib) = dlsym(handle, "XUngrabKeyboard");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUngrabPointer
+ *(void **) (&XUngrabPointer_dylibloader_wrapper_xlib) = dlsym(handle, "XUngrabPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUngrabServer
+ *(void **) (&XUngrabServer_dylibloader_wrapper_xlib) = dlsym(handle, "XUngrabServer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUninstallColormap
+ *(void **) (&XUninstallColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XUninstallColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUnloadFont
+ *(void **) (&XUnloadFont_dylibloader_wrapper_xlib) = dlsym(handle, "XUnloadFont");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUnmapSubwindows
+ *(void **) (&XUnmapSubwindows_dylibloader_wrapper_xlib) = dlsym(handle, "XUnmapSubwindows");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUnmapWindow
+ *(void **) (&XUnmapWindow_dylibloader_wrapper_xlib) = dlsym(handle, "XUnmapWindow");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XVendorRelease
+ *(void **) (&XVendorRelease_dylibloader_wrapper_xlib) = dlsym(handle, "XVendorRelease");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWarpPointer
+ *(void **) (&XWarpPointer_dylibloader_wrapper_xlib) = dlsym(handle, "XWarpPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWidthMMOfScreen
+ *(void **) (&XWidthMMOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XWidthMMOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWidthOfScreen
+ *(void **) (&XWidthOfScreen_dylibloader_wrapper_xlib) = dlsym(handle, "XWidthOfScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWindowEvent
+ *(void **) (&XWindowEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XWindowEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWriteBitmapFile
+ *(void **) (&XWriteBitmapFile_dylibloader_wrapper_xlib) = dlsym(handle, "XWriteBitmapFile");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSupportsLocale
+ *(void **) (&XSupportsLocale_dylibloader_wrapper_xlib) = dlsym(handle, "XSupportsLocale");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetLocaleModifiers
+ *(void **) (&XSetLocaleModifiers_dylibloader_wrapper_xlib) = dlsym(handle, "XSetLocaleModifiers");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XOpenOM
+ *(void **) (&XOpenOM_dylibloader_wrapper_xlib) = dlsym(handle, "XOpenOM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCloseOM
+ *(void **) (&XCloseOM_dylibloader_wrapper_xlib) = dlsym(handle, "XCloseOM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetOMValues
+ *(void **) (&XSetOMValues_dylibloader_wrapper_xlib) = dlsym(handle, "XSetOMValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetOMValues
+ *(void **) (&XGetOMValues_dylibloader_wrapper_xlib) = dlsym(handle, "XGetOMValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayOfOM
+ *(void **) (&XDisplayOfOM_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayOfOM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLocaleOfOM
+ *(void **) (&XLocaleOfOM_dylibloader_wrapper_xlib) = dlsym(handle, "XLocaleOfOM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateOC
+ *(void **) (&XCreateOC_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateOC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDestroyOC
+ *(void **) (&XDestroyOC_dylibloader_wrapper_xlib) = dlsym(handle, "XDestroyOC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XOMOfOC
+ *(void **) (&XOMOfOC_dylibloader_wrapper_xlib) = dlsym(handle, "XOMOfOC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetOCValues
+ *(void **) (&XSetOCValues_dylibloader_wrapper_xlib) = dlsym(handle, "XSetOCValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetOCValues
+ *(void **) (&XGetOCValues_dylibloader_wrapper_xlib) = dlsym(handle, "XGetOCValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateFontSet
+ *(void **) (&XCreateFontSet_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateFontSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeFontSet
+ *(void **) (&XFreeFontSet_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeFontSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFontsOfFontSet
+ *(void **) (&XFontsOfFontSet_dylibloader_wrapper_xlib) = dlsym(handle, "XFontsOfFontSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XBaseFontNameListOfFontSet
+ *(void **) (&XBaseFontNameListOfFontSet_dylibloader_wrapper_xlib) = dlsym(handle, "XBaseFontNameListOfFontSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLocaleOfFontSet
+ *(void **) (&XLocaleOfFontSet_dylibloader_wrapper_xlib) = dlsym(handle, "XLocaleOfFontSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XContextDependentDrawing
+ *(void **) (&XContextDependentDrawing_dylibloader_wrapper_xlib) = dlsym(handle, "XContextDependentDrawing");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDirectionalDependentDrawing
+ *(void **) (&XDirectionalDependentDrawing_dylibloader_wrapper_xlib) = dlsym(handle, "XDirectionalDependentDrawing");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XContextualDrawing
+ *(void **) (&XContextualDrawing_dylibloader_wrapper_xlib) = dlsym(handle, "XContextualDrawing");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XExtentsOfFontSet
+ *(void **) (&XExtentsOfFontSet_dylibloader_wrapper_xlib) = dlsym(handle, "XExtentsOfFontSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbTextEscapement
+ *(void **) (&XmbTextEscapement_dylibloader_wrapper_xlib) = dlsym(handle, "XmbTextEscapement");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcTextEscapement
+ *(void **) (&XwcTextEscapement_dylibloader_wrapper_xlib) = dlsym(handle, "XwcTextEscapement");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8TextEscapement
+ *(void **) (&Xutf8TextEscapement_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8TextEscapement");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbTextExtents
+ *(void **) (&XmbTextExtents_dylibloader_wrapper_xlib) = dlsym(handle, "XmbTextExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcTextExtents
+ *(void **) (&XwcTextExtents_dylibloader_wrapper_xlib) = dlsym(handle, "XwcTextExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8TextExtents
+ *(void **) (&Xutf8TextExtents_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8TextExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbTextPerCharExtents
+ *(void **) (&XmbTextPerCharExtents_dylibloader_wrapper_xlib) = dlsym(handle, "XmbTextPerCharExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcTextPerCharExtents
+ *(void **) (&XwcTextPerCharExtents_dylibloader_wrapper_xlib) = dlsym(handle, "XwcTextPerCharExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8TextPerCharExtents
+ *(void **) (&Xutf8TextPerCharExtents_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8TextPerCharExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbDrawText
+ *(void **) (&XmbDrawText_dylibloader_wrapper_xlib) = dlsym(handle, "XmbDrawText");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcDrawText
+ *(void **) (&XwcDrawText_dylibloader_wrapper_xlib) = dlsym(handle, "XwcDrawText");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8DrawText
+ *(void **) (&Xutf8DrawText_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8DrawText");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbDrawString
+ *(void **) (&XmbDrawString_dylibloader_wrapper_xlib) = dlsym(handle, "XmbDrawString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcDrawString
+ *(void **) (&XwcDrawString_dylibloader_wrapper_xlib) = dlsym(handle, "XwcDrawString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8DrawString
+ *(void **) (&Xutf8DrawString_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8DrawString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbDrawImageString
+ *(void **) (&XmbDrawImageString_dylibloader_wrapper_xlib) = dlsym(handle, "XmbDrawImageString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcDrawImageString
+ *(void **) (&XwcDrawImageString_dylibloader_wrapper_xlib) = dlsym(handle, "XwcDrawImageString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8DrawImageString
+ *(void **) (&Xutf8DrawImageString_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8DrawImageString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XOpenIM
+ *(void **) (&XOpenIM_dylibloader_wrapper_xlib) = dlsym(handle, "XOpenIM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCloseIM
+ *(void **) (&XCloseIM_dylibloader_wrapper_xlib) = dlsym(handle, "XCloseIM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetIMValues
+ *(void **) (&XGetIMValues_dylibloader_wrapper_xlib) = dlsym(handle, "XGetIMValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetIMValues
+ *(void **) (&XSetIMValues_dylibloader_wrapper_xlib) = dlsym(handle, "XSetIMValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDisplayOfIM
+ *(void **) (&XDisplayOfIM_dylibloader_wrapper_xlib) = dlsym(handle, "XDisplayOfIM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLocaleOfIM
+ *(void **) (&XLocaleOfIM_dylibloader_wrapper_xlib) = dlsym(handle, "XLocaleOfIM");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateIC
+ *(void **) (&XCreateIC_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateIC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDestroyIC
+ *(void **) (&XDestroyIC_dylibloader_wrapper_xlib) = dlsym(handle, "XDestroyIC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetICFocus
+ *(void **) (&XSetICFocus_dylibloader_wrapper_xlib) = dlsym(handle, "XSetICFocus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUnsetICFocus
+ *(void **) (&XUnsetICFocus_dylibloader_wrapper_xlib) = dlsym(handle, "XUnsetICFocus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcResetIC
+ *(void **) (&XwcResetIC_dylibloader_wrapper_xlib) = dlsym(handle, "XwcResetIC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbResetIC
+ *(void **) (&XmbResetIC_dylibloader_wrapper_xlib) = dlsym(handle, "XmbResetIC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8ResetIC
+ *(void **) (&Xutf8ResetIC_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8ResetIC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetICValues
+ *(void **) (&XSetICValues_dylibloader_wrapper_xlib) = dlsym(handle, "XSetICValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetICValues
+ *(void **) (&XGetICValues_dylibloader_wrapper_xlib) = dlsym(handle, "XGetICValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIMOfIC
+ *(void **) (&XIMOfIC_dylibloader_wrapper_xlib) = dlsym(handle, "XIMOfIC");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFilterEvent
+ *(void **) (&XFilterEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XFilterEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbLookupString
+ *(void **) (&XmbLookupString_dylibloader_wrapper_xlib) = dlsym(handle, "XmbLookupString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcLookupString
+ *(void **) (&XwcLookupString_dylibloader_wrapper_xlib) = dlsym(handle, "XwcLookupString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8LookupString
+ *(void **) (&Xutf8LookupString_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8LookupString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XVaCreateNestedList
+ *(void **) (&XVaCreateNestedList_dylibloader_wrapper_xlib) = dlsym(handle, "XVaCreateNestedList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRegisterIMInstantiateCallback
+ *(void **) (&XRegisterIMInstantiateCallback_dylibloader_wrapper_xlib) = dlsym(handle, "XRegisterIMInstantiateCallback");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUnregisterIMInstantiateCallback
+ *(void **) (&XUnregisterIMInstantiateCallback_dylibloader_wrapper_xlib) = dlsym(handle, "XUnregisterIMInstantiateCallback");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XInternalConnectionNumbers
+ *(void **) (&XInternalConnectionNumbers_dylibloader_wrapper_xlib) = dlsym(handle, "XInternalConnectionNumbers");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XProcessInternalConnection
+ *(void **) (&XProcessInternalConnection_dylibloader_wrapper_xlib) = dlsym(handle, "XProcessInternalConnection");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAddConnectionWatch
+ *(void **) (&XAddConnectionWatch_dylibloader_wrapper_xlib) = dlsym(handle, "XAddConnectionWatch");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRemoveConnectionWatch
+ *(void **) (&XRemoveConnectionWatch_dylibloader_wrapper_xlib) = dlsym(handle, "XRemoveConnectionWatch");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetAuthorization
+ *(void **) (&XSetAuthorization_dylibloader_wrapper_xlib) = dlsym(handle, "XSetAuthorization");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// _Xmbtowc
+ *(void **) (&_Xmbtowc_dylibloader_wrapper_xlib) = dlsym(handle, "_Xmbtowc");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// _Xwctomb
+ *(void **) (&_Xwctomb_dylibloader_wrapper_xlib) = dlsym(handle, "_Xwctomb");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetEventData
+ *(void **) (&XGetEventData_dylibloader_wrapper_xlib) = dlsym(handle, "XGetEventData");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFreeEventData
+ *(void **) (&XFreeEventData_dylibloader_wrapper_xlib) = dlsym(handle, "XFreeEventData");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocClassHint
+ *(void **) (&XAllocClassHint_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocClassHint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocIconSize
+ *(void **) (&XAllocIconSize_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocIconSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocSizeHints
+ *(void **) (&XAllocSizeHints_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocSizeHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocStandardColormap
+ *(void **) (&XAllocStandardColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocStandardColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XAllocWMHints
+ *(void **) (&XAllocWMHints_dylibloader_wrapper_xlib) = dlsym(handle, "XAllocWMHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XClipBox
+ *(void **) (&XClipBox_dylibloader_wrapper_xlib) = dlsym(handle, "XClipBox");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XCreateRegion
+ *(void **) (&XCreateRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XCreateRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDefaultString
+ *(void **) (&XDefaultString_dylibloader_wrapper_xlib) = dlsym(handle, "XDefaultString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDeleteContext
+ *(void **) (&XDeleteContext_dylibloader_wrapper_xlib) = dlsym(handle, "XDeleteContext");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XDestroyRegion
+ *(void **) (&XDestroyRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XDestroyRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XEmptyRegion
+ *(void **) (&XEmptyRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XEmptyRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XEqualRegion
+ *(void **) (&XEqualRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XEqualRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XFindContext
+ *(void **) (&XFindContext_dylibloader_wrapper_xlib) = dlsym(handle, "XFindContext");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetClassHint
+ *(void **) (&XGetClassHint_dylibloader_wrapper_xlib) = dlsym(handle, "XGetClassHint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetIconSizes
+ *(void **) (&XGetIconSizes_dylibloader_wrapper_xlib) = dlsym(handle, "XGetIconSizes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetNormalHints
+ *(void **) (&XGetNormalHints_dylibloader_wrapper_xlib) = dlsym(handle, "XGetNormalHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetRGBColormaps
+ *(void **) (&XGetRGBColormaps_dylibloader_wrapper_xlib) = dlsym(handle, "XGetRGBColormaps");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetSizeHints
+ *(void **) (&XGetSizeHints_dylibloader_wrapper_xlib) = dlsym(handle, "XGetSizeHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetStandardColormap
+ *(void **) (&XGetStandardColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XGetStandardColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetTextProperty
+ *(void **) (&XGetTextProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XGetTextProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetVisualInfo
+ *(void **) (&XGetVisualInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XGetVisualInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWMClientMachine
+ *(void **) (&XGetWMClientMachine_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWMClientMachine");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWMHints
+ *(void **) (&XGetWMHints_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWMHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWMIconName
+ *(void **) (&XGetWMIconName_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWMIconName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWMName
+ *(void **) (&XGetWMName_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWMName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWMNormalHints
+ *(void **) (&XGetWMNormalHints_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWMNormalHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetWMSizeHints
+ *(void **) (&XGetWMSizeHints_dylibloader_wrapper_xlib) = dlsym(handle, "XGetWMSizeHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XGetZoomHints
+ *(void **) (&XGetZoomHints_dylibloader_wrapper_xlib) = dlsym(handle, "XGetZoomHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIntersectRegion
+ *(void **) (&XIntersectRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XIntersectRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XConvertCase
+ *(void **) (&XConvertCase_dylibloader_wrapper_xlib) = dlsym(handle, "XConvertCase");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XLookupString
+ *(void **) (&XLookupString_dylibloader_wrapper_xlib) = dlsym(handle, "XLookupString");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XMatchVisualInfo
+ *(void **) (&XMatchVisualInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XMatchVisualInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XOffsetRegion
+ *(void **) (&XOffsetRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XOffsetRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XPointInRegion
+ *(void **) (&XPointInRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XPointInRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XPolygonRegion
+ *(void **) (&XPolygonRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XPolygonRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRectInRegion
+ *(void **) (&XRectInRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XRectInRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSaveContext
+ *(void **) (&XSaveContext_dylibloader_wrapper_xlib) = dlsym(handle, "XSaveContext");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetClassHint
+ *(void **) (&XSetClassHint_dylibloader_wrapper_xlib) = dlsym(handle, "XSetClassHint");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetIconSizes
+ *(void **) (&XSetIconSizes_dylibloader_wrapper_xlib) = dlsym(handle, "XSetIconSizes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetNormalHints
+ *(void **) (&XSetNormalHints_dylibloader_wrapper_xlib) = dlsym(handle, "XSetNormalHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetRGBColormaps
+ *(void **) (&XSetRGBColormaps_dylibloader_wrapper_xlib) = dlsym(handle, "XSetRGBColormaps");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetSizeHints
+ *(void **) (&XSetSizeHints_dylibloader_wrapper_xlib) = dlsym(handle, "XSetSizeHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetStandardProperties
+ *(void **) (&XSetStandardProperties_dylibloader_wrapper_xlib) = dlsym(handle, "XSetStandardProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetTextProperty
+ *(void **) (&XSetTextProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XSetTextProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMClientMachine
+ *(void **) (&XSetWMClientMachine_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMClientMachine");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMHints
+ *(void **) (&XSetWMHints_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMIconName
+ *(void **) (&XSetWMIconName_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMIconName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMName
+ *(void **) (&XSetWMName_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMNormalHints
+ *(void **) (&XSetWMNormalHints_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMNormalHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMProperties
+ *(void **) (&XSetWMProperties_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbSetWMProperties
+ *(void **) (&XmbSetWMProperties_dylibloader_wrapper_xlib) = dlsym(handle, "XmbSetWMProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8SetWMProperties
+ *(void **) (&Xutf8SetWMProperties_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8SetWMProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetWMSizeHints
+ *(void **) (&XSetWMSizeHints_dylibloader_wrapper_xlib) = dlsym(handle, "XSetWMSizeHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetRegion
+ *(void **) (&XSetRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XSetRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetStandardColormap
+ *(void **) (&XSetStandardColormap_dylibloader_wrapper_xlib) = dlsym(handle, "XSetStandardColormap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSetZoomHints
+ *(void **) (&XSetZoomHints_dylibloader_wrapper_xlib) = dlsym(handle, "XSetZoomHints");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShrinkRegion
+ *(void **) (&XShrinkRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XShrinkRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XStringListToTextProperty
+ *(void **) (&XStringListToTextProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XStringListToTextProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XSubtractRegion
+ *(void **) (&XSubtractRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XSubtractRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbTextListToTextProperty
+ *(void **) (&XmbTextListToTextProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XmbTextListToTextProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcTextListToTextProperty
+ *(void **) (&XwcTextListToTextProperty_dylibloader_wrapper_xlib) = dlsym(handle, "XwcTextListToTextProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8TextListToTextProperty
+ *(void **) (&Xutf8TextListToTextProperty_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8TextListToTextProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcFreeStringList
+ *(void **) (&XwcFreeStringList_dylibloader_wrapper_xlib) = dlsym(handle, "XwcFreeStringList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XTextPropertyToStringList
+ *(void **) (&XTextPropertyToStringList_dylibloader_wrapper_xlib) = dlsym(handle, "XTextPropertyToStringList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XmbTextPropertyToTextList
+ *(void **) (&XmbTextPropertyToTextList_dylibloader_wrapper_xlib) = dlsym(handle, "XmbTextPropertyToTextList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XwcTextPropertyToTextList
+ *(void **) (&XwcTextPropertyToTextList_dylibloader_wrapper_xlib) = dlsym(handle, "XwcTextPropertyToTextList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// Xutf8TextPropertyToTextList
+ *(void **) (&Xutf8TextPropertyToTextList_dylibloader_wrapper_xlib) = dlsym(handle, "Xutf8TextPropertyToTextList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUnionRectWithRegion
+ *(void **) (&XUnionRectWithRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XUnionRectWithRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XUnionRegion
+ *(void **) (&XUnionRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XUnionRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XWMGeometry
+ *(void **) (&XWMGeometry_dylibloader_wrapper_xlib) = dlsym(handle, "XWMGeometry");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XXorRegion
+ *(void **) (&XXorRegion_dylibloader_wrapper_xlib) = dlsym(handle, "XXorRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbIgnoreExtension
+ *(void **) (&XkbIgnoreExtension_dylibloader_wrapper_xlib) = dlsym(handle, "XkbIgnoreExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbOpenDisplay
+ *(void **) (&XkbOpenDisplay_dylibloader_wrapper_xlib) = dlsym(handle, "XkbOpenDisplay");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbQueryExtension
+ *(void **) (&XkbQueryExtension_dylibloader_wrapper_xlib) = dlsym(handle, "XkbQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbUseExtension
+ *(void **) (&XkbUseExtension_dylibloader_wrapper_xlib) = dlsym(handle, "XkbUseExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbLibraryVersion
+ *(void **) (&XkbLibraryVersion_dylibloader_wrapper_xlib) = dlsym(handle, "XkbLibraryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetXlibControls
+ *(void **) (&XkbSetXlibControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetXlibControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetXlibControls
+ *(void **) (&XkbGetXlibControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetXlibControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbXlibControlsImplemented
+ *(void **) (&XkbXlibControlsImplemented_dylibloader_wrapper_xlib) = dlsym(handle, "XkbXlibControlsImplemented");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetAtomFuncs
+ *(void **) (&XkbSetAtomFuncs_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetAtomFuncs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbKeycodeToKeysym
+ *(void **) (&XkbKeycodeToKeysym_dylibloader_wrapper_xlib) = dlsym(handle, "XkbKeycodeToKeysym");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbKeysymToModifiers
+ *(void **) (&XkbKeysymToModifiers_dylibloader_wrapper_xlib) = dlsym(handle, "XkbKeysymToModifiers");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbLookupKeySym
+ *(void **) (&XkbLookupKeySym_dylibloader_wrapper_xlib) = dlsym(handle, "XkbLookupKeySym");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbLookupKeyBinding
+ *(void **) (&XkbLookupKeyBinding_dylibloader_wrapper_xlib) = dlsym(handle, "XkbLookupKeyBinding");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbTranslateKeyCode
+ *(void **) (&XkbTranslateKeyCode_dylibloader_wrapper_xlib) = dlsym(handle, "XkbTranslateKeyCode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbTranslateKeySym
+ *(void **) (&XkbTranslateKeySym_dylibloader_wrapper_xlib) = dlsym(handle, "XkbTranslateKeySym");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetAutoRepeatRate
+ *(void **) (&XkbSetAutoRepeatRate_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetAutoRepeatRate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetAutoRepeatRate
+ *(void **) (&XkbGetAutoRepeatRate_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetAutoRepeatRate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbChangeEnabledControls
+ *(void **) (&XkbChangeEnabledControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbChangeEnabledControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbDeviceBell
+ *(void **) (&XkbDeviceBell_dylibloader_wrapper_xlib) = dlsym(handle, "XkbDeviceBell");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbForceDeviceBell
+ *(void **) (&XkbForceDeviceBell_dylibloader_wrapper_xlib) = dlsym(handle, "XkbForceDeviceBell");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbDeviceBellEvent
+ *(void **) (&XkbDeviceBellEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XkbDeviceBellEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbBell
+ *(void **) (&XkbBell_dylibloader_wrapper_xlib) = dlsym(handle, "XkbBell");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbForceBell
+ *(void **) (&XkbForceBell_dylibloader_wrapper_xlib) = dlsym(handle, "XkbForceBell");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbBellEvent
+ *(void **) (&XkbBellEvent_dylibloader_wrapper_xlib) = dlsym(handle, "XkbBellEvent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSelectEvents
+ *(void **) (&XkbSelectEvents_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSelectEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSelectEventDetails
+ *(void **) (&XkbSelectEventDetails_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSelectEventDetails");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbNoteMapChanges
+ *(void **) (&XkbNoteMapChanges_dylibloader_wrapper_xlib) = dlsym(handle, "XkbNoteMapChanges");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbNoteNameChanges
+ *(void **) (&XkbNoteNameChanges_dylibloader_wrapper_xlib) = dlsym(handle, "XkbNoteNameChanges");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetIndicatorState
+ *(void **) (&XkbGetIndicatorState_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetIndicatorState");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetIndicatorMap
+ *(void **) (&XkbGetIndicatorMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetIndicatorMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetIndicatorMap
+ *(void **) (&XkbSetIndicatorMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetIndicatorMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetNamedIndicator
+ *(void **) (&XkbGetNamedIndicator_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetNamedIndicator");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetNamedDeviceIndicator
+ *(void **) (&XkbGetNamedDeviceIndicator_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetNamedDeviceIndicator");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetNamedIndicator
+ *(void **) (&XkbSetNamedIndicator_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetNamedIndicator");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetNamedDeviceIndicator
+ *(void **) (&XkbSetNamedDeviceIndicator_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetNamedDeviceIndicator");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbLockModifiers
+ *(void **) (&XkbLockModifiers_dylibloader_wrapper_xlib) = dlsym(handle, "XkbLockModifiers");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbLatchModifiers
+ *(void **) (&XkbLatchModifiers_dylibloader_wrapper_xlib) = dlsym(handle, "XkbLatchModifiers");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbLockGroup
+ *(void **) (&XkbLockGroup_dylibloader_wrapper_xlib) = dlsym(handle, "XkbLockGroup");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbLatchGroup
+ *(void **) (&XkbLatchGroup_dylibloader_wrapper_xlib) = dlsym(handle, "XkbLatchGroup");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetServerInternalMods
+ *(void **) (&XkbSetServerInternalMods_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetServerInternalMods");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetIgnoreLockMods
+ *(void **) (&XkbSetIgnoreLockMods_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetIgnoreLockMods");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbVirtualModsToReal
+ *(void **) (&XkbVirtualModsToReal_dylibloader_wrapper_xlib) = dlsym(handle, "XkbVirtualModsToReal");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbComputeEffectiveMap
+ *(void **) (&XkbComputeEffectiveMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbComputeEffectiveMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbInitCanonicalKeyTypes
+ *(void **) (&XkbInitCanonicalKeyTypes_dylibloader_wrapper_xlib) = dlsym(handle, "XkbInitCanonicalKeyTypes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAllocKeyboard
+ *(void **) (&XkbAllocKeyboard_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAllocKeyboard");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeKeyboard
+ *(void **) (&XkbFreeKeyboard_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeKeyboard");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAllocClientMap
+ *(void **) (&XkbAllocClientMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAllocClientMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAllocServerMap
+ *(void **) (&XkbAllocServerMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAllocServerMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeClientMap
+ *(void **) (&XkbFreeClientMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeClientMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeServerMap
+ *(void **) (&XkbFreeServerMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeServerMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAddKeyType
+ *(void **) (&XkbAddKeyType_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAddKeyType");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAllocIndicatorMaps
+ *(void **) (&XkbAllocIndicatorMaps_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAllocIndicatorMaps");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeIndicatorMaps
+ *(void **) (&XkbFreeIndicatorMaps_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeIndicatorMaps");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetMap
+ *(void **) (&XkbGetMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetUpdatedMap
+ *(void **) (&XkbGetUpdatedMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetUpdatedMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetMapChanges
+ *(void **) (&XkbGetMapChanges_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetMapChanges");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbRefreshKeyboardMapping
+ *(void **) (&XkbRefreshKeyboardMapping_dylibloader_wrapper_xlib) = dlsym(handle, "XkbRefreshKeyboardMapping");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeyTypes
+ *(void **) (&XkbGetKeyTypes_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeyTypes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeySyms
+ *(void **) (&XkbGetKeySyms_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeySyms");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeyActions
+ *(void **) (&XkbGetKeyActions_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeyActions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeyBehaviors
+ *(void **) (&XkbGetKeyBehaviors_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeyBehaviors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetVirtualMods
+ *(void **) (&XkbGetVirtualMods_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetVirtualMods");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeyExplicitComponents
+ *(void **) (&XkbGetKeyExplicitComponents_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeyExplicitComponents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeyModifierMap
+ *(void **) (&XkbGetKeyModifierMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeyModifierMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeyVirtualModMap
+ *(void **) (&XkbGetKeyVirtualModMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeyVirtualModMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAllocControls
+ *(void **) (&XkbAllocControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAllocControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeControls
+ *(void **) (&XkbFreeControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetControls
+ *(void **) (&XkbGetControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetControls
+ *(void **) (&XkbSetControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbNoteControlsChanges
+ *(void **) (&XkbNoteControlsChanges_dylibloader_wrapper_xlib) = dlsym(handle, "XkbNoteControlsChanges");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAllocCompatMap
+ *(void **) (&XkbAllocCompatMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAllocCompatMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeCompatMap
+ *(void **) (&XkbFreeCompatMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeCompatMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetCompatMap
+ *(void **) (&XkbGetCompatMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetCompatMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetCompatMap
+ *(void **) (&XkbSetCompatMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetCompatMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAllocNames
+ *(void **) (&XkbAllocNames_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAllocNames");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetNames
+ *(void **) (&XkbGetNames_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetNames");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetNames
+ *(void **) (&XkbSetNames_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetNames");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbChangeNames
+ *(void **) (&XkbChangeNames_dylibloader_wrapper_xlib) = dlsym(handle, "XkbChangeNames");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeNames
+ *(void **) (&XkbFreeNames_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeNames");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetState
+ *(void **) (&XkbGetState_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetState");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetMap
+ *(void **) (&XkbSetMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbChangeMap
+ *(void **) (&XkbChangeMap_dylibloader_wrapper_xlib) = dlsym(handle, "XkbChangeMap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetDetectableAutoRepeat
+ *(void **) (&XkbSetDetectableAutoRepeat_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetDetectableAutoRepeat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetDetectableAutoRepeat
+ *(void **) (&XkbGetDetectableAutoRepeat_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetDetectableAutoRepeat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetAutoResetControls
+ *(void **) (&XkbSetAutoResetControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetAutoResetControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetAutoResetControls
+ *(void **) (&XkbGetAutoResetControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetAutoResetControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetPerClientControls
+ *(void **) (&XkbSetPerClientControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetPerClientControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetPerClientControls
+ *(void **) (&XkbGetPerClientControls_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetPerClientControls");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbCopyKeyType
+ *(void **) (&XkbCopyKeyType_dylibloader_wrapper_xlib) = dlsym(handle, "XkbCopyKeyType");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbCopyKeyTypes
+ *(void **) (&XkbCopyKeyTypes_dylibloader_wrapper_xlib) = dlsym(handle, "XkbCopyKeyTypes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbResizeKeyType
+ *(void **) (&XkbResizeKeyType_dylibloader_wrapper_xlib) = dlsym(handle, "XkbResizeKeyType");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbResizeKeySyms
+ *(void **) (&XkbResizeKeySyms_dylibloader_wrapper_xlib) = dlsym(handle, "XkbResizeKeySyms");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbResizeKeyActions
+ *(void **) (&XkbResizeKeyActions_dylibloader_wrapper_xlib) = dlsym(handle, "XkbResizeKeyActions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbChangeTypesOfKey
+ *(void **) (&XkbChangeTypesOfKey_dylibloader_wrapper_xlib) = dlsym(handle, "XkbChangeTypesOfKey");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbChangeKeycodeRange
+ *(void **) (&XkbChangeKeycodeRange_dylibloader_wrapper_xlib) = dlsym(handle, "XkbChangeKeycodeRange");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbListComponents
+ *(void **) (&XkbListComponents_dylibloader_wrapper_xlib) = dlsym(handle, "XkbListComponents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeComponentList
+ *(void **) (&XkbFreeComponentList_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeComponentList");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeyboard
+ *(void **) (&XkbGetKeyboard_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeyboard");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetKeyboardByName
+ *(void **) (&XkbGetKeyboardByName_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetKeyboardByName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbKeyTypesForCoreSymbols
+ *(void **) (&XkbKeyTypesForCoreSymbols_dylibloader_wrapper_xlib) = dlsym(handle, "XkbKeyTypesForCoreSymbols");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbApplyCompatMapToKey
+ *(void **) (&XkbApplyCompatMapToKey_dylibloader_wrapper_xlib) = dlsym(handle, "XkbApplyCompatMapToKey");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbUpdateMapFromCore
+ *(void **) (&XkbUpdateMapFromCore_dylibloader_wrapper_xlib) = dlsym(handle, "XkbUpdateMapFromCore");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAddDeviceLedInfo
+ *(void **) (&XkbAddDeviceLedInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAddDeviceLedInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbResizeDeviceButtonActions
+ *(void **) (&XkbResizeDeviceButtonActions_dylibloader_wrapper_xlib) = dlsym(handle, "XkbResizeDeviceButtonActions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbAllocDeviceInfo
+ *(void **) (&XkbAllocDeviceInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XkbAllocDeviceInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbFreeDeviceInfo
+ *(void **) (&XkbFreeDeviceInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XkbFreeDeviceInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbNoteDeviceChanges
+ *(void **) (&XkbNoteDeviceChanges_dylibloader_wrapper_xlib) = dlsym(handle, "XkbNoteDeviceChanges");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetDeviceInfo
+ *(void **) (&XkbGetDeviceInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetDeviceInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetDeviceInfoChanges
+ *(void **) (&XkbGetDeviceInfoChanges_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetDeviceInfoChanges");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetDeviceButtonActions
+ *(void **) (&XkbGetDeviceButtonActions_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetDeviceButtonActions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbGetDeviceLedInfo
+ *(void **) (&XkbGetDeviceLedInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XkbGetDeviceLedInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetDeviceInfo
+ *(void **) (&XkbSetDeviceInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetDeviceInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbChangeDeviceInfo
+ *(void **) (&XkbChangeDeviceInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XkbChangeDeviceInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetDeviceLedInfo
+ *(void **) (&XkbSetDeviceLedInfo_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetDeviceLedInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetDeviceButtonActions
+ *(void **) (&XkbSetDeviceButtonActions_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetDeviceButtonActions");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbToControl
+ *(void **) (&XkbToControl_dylibloader_wrapper_xlib) = dlsym(handle, "XkbToControl");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbSetDebuggingFlags
+ *(void **) (&XkbSetDebuggingFlags_dylibloader_wrapper_xlib) = dlsym(handle, "XkbSetDebuggingFlags");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbApplyVirtualModChanges
+ *(void **) (&XkbApplyVirtualModChanges_dylibloader_wrapper_xlib) = dlsym(handle, "XkbApplyVirtualModChanges");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbUpdateActionVirtualMods
+ *(void **) (&XkbUpdateActionVirtualMods_dylibloader_wrapper_xlib) = dlsym(handle, "XkbUpdateActionVirtualMods");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XkbUpdateKeyTypeVirtualMods
+ *(void **) (&XkbUpdateKeyTypeVirtualMods_dylibloader_wrapper_xlib) = dlsym(handle, "XkbUpdateKeyTypeVirtualMods");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h
new file mode 100644
index 0000000000..47464078e3
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h
@@ -0,0 +1,2439 @@
+#ifndef DYLIBLOAD_WRAPPER_XLIB
+#define DYLIBLOAD_WRAPPER_XLIB
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:54:53
+// flags: ./generate-wrapper.py --include /usr/include/X11/Xlib.h --include /usr/include/X11/Xutil.h --include /usr/include/X11/XKBlib.h --sys-include <X11/Xlib.h> --sys-include <X11/Xutil.h> --sys-include <X11/XKBlib.h> --soname libX11.so.6 --init-name xlib --omit-prefix XkbGetDeviceIndicatorState --omit-prefix XkbAddSymInterpret --output-header xlib-so_wrap.h --output-implementation xlib-so_wrap.c
+//
+// NOTE: Generated from Xlib 1.6.9.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, the type of the third argument of
+// XIfEvent, XPeekIfEvent and XCheckIfEvent had to be fixed as it wasn't parsed
+// fully (it's a Bool function pointer, but it was just being parsed as an int
+// pointer).
+
+#include <stdint.h>
+
+#define _Xmblen _Xmblen_dylibloader_orig_xlib
+#define XLoadQueryFont XLoadQueryFont_dylibloader_orig_xlib
+#define XQueryFont XQueryFont_dylibloader_orig_xlib
+#define XGetMotionEvents XGetMotionEvents_dylibloader_orig_xlib
+#define XDeleteModifiermapEntry XDeleteModifiermapEntry_dylibloader_orig_xlib
+#define XGetModifierMapping XGetModifierMapping_dylibloader_orig_xlib
+#define XInsertModifiermapEntry XInsertModifiermapEntry_dylibloader_orig_xlib
+#define XNewModifiermap XNewModifiermap_dylibloader_orig_xlib
+#define XCreateImage XCreateImage_dylibloader_orig_xlib
+#define XInitImage XInitImage_dylibloader_orig_xlib
+#define XGetImage XGetImage_dylibloader_orig_xlib
+#define XGetSubImage XGetSubImage_dylibloader_orig_xlib
+#define XOpenDisplay XOpenDisplay_dylibloader_orig_xlib
+#define XrmInitialize XrmInitialize_dylibloader_orig_xlib
+#define XFetchBytes XFetchBytes_dylibloader_orig_xlib
+#define XFetchBuffer XFetchBuffer_dylibloader_orig_xlib
+#define XGetAtomName XGetAtomName_dylibloader_orig_xlib
+#define XGetAtomNames XGetAtomNames_dylibloader_orig_xlib
+#define XGetDefault XGetDefault_dylibloader_orig_xlib
+#define XDisplayName XDisplayName_dylibloader_orig_xlib
+#define XKeysymToString XKeysymToString_dylibloader_orig_xlib
+#define XSynchronize XSynchronize_dylibloader_orig_xlib
+#define XSetAfterFunction XSetAfterFunction_dylibloader_orig_xlib
+#define XInternAtom XInternAtom_dylibloader_orig_xlib
+#define XInternAtoms XInternAtoms_dylibloader_orig_xlib
+#define XCopyColormapAndFree XCopyColormapAndFree_dylibloader_orig_xlib
+#define XCreateColormap XCreateColormap_dylibloader_orig_xlib
+#define XCreatePixmapCursor XCreatePixmapCursor_dylibloader_orig_xlib
+#define XCreateGlyphCursor XCreateGlyphCursor_dylibloader_orig_xlib
+#define XCreateFontCursor XCreateFontCursor_dylibloader_orig_xlib
+#define XLoadFont XLoadFont_dylibloader_orig_xlib
+#define XCreateGC XCreateGC_dylibloader_orig_xlib
+#define XGContextFromGC XGContextFromGC_dylibloader_orig_xlib
+#define XFlushGC XFlushGC_dylibloader_orig_xlib
+#define XCreatePixmap XCreatePixmap_dylibloader_orig_xlib
+#define XCreateBitmapFromData XCreateBitmapFromData_dylibloader_orig_xlib
+#define XCreatePixmapFromBitmapData XCreatePixmapFromBitmapData_dylibloader_orig_xlib
+#define XCreateSimpleWindow XCreateSimpleWindow_dylibloader_orig_xlib
+#define XGetSelectionOwner XGetSelectionOwner_dylibloader_orig_xlib
+#define XCreateWindow XCreateWindow_dylibloader_orig_xlib
+#define XListInstalledColormaps XListInstalledColormaps_dylibloader_orig_xlib
+#define XListFonts XListFonts_dylibloader_orig_xlib
+#define XListFontsWithInfo XListFontsWithInfo_dylibloader_orig_xlib
+#define XGetFontPath XGetFontPath_dylibloader_orig_xlib
+#define XListExtensions XListExtensions_dylibloader_orig_xlib
+#define XListProperties XListProperties_dylibloader_orig_xlib
+#define XListHosts XListHosts_dylibloader_orig_xlib
+#define XKeycodeToKeysym XKeycodeToKeysym_dylibloader_orig_xlib
+#define XLookupKeysym XLookupKeysym_dylibloader_orig_xlib
+#define XGetKeyboardMapping XGetKeyboardMapping_dylibloader_orig_xlib
+#define XStringToKeysym XStringToKeysym_dylibloader_orig_xlib
+#define XMaxRequestSize XMaxRequestSize_dylibloader_orig_xlib
+#define XExtendedMaxRequestSize XExtendedMaxRequestSize_dylibloader_orig_xlib
+#define XResourceManagerString XResourceManagerString_dylibloader_orig_xlib
+#define XScreenResourceString XScreenResourceString_dylibloader_orig_xlib
+#define XDisplayMotionBufferSize XDisplayMotionBufferSize_dylibloader_orig_xlib
+#define XVisualIDFromVisual XVisualIDFromVisual_dylibloader_orig_xlib
+#define XInitThreads XInitThreads_dylibloader_orig_xlib
+#define XLockDisplay XLockDisplay_dylibloader_orig_xlib
+#define XUnlockDisplay XUnlockDisplay_dylibloader_orig_xlib
+#define XInitExtension XInitExtension_dylibloader_orig_xlib
+#define XAddExtension XAddExtension_dylibloader_orig_xlib
+#define XFindOnExtensionList XFindOnExtensionList_dylibloader_orig_xlib
+#define XEHeadOfExtensionList XEHeadOfExtensionList_dylibloader_orig_xlib
+#define XRootWindow XRootWindow_dylibloader_orig_xlib
+#define XDefaultRootWindow XDefaultRootWindow_dylibloader_orig_xlib
+#define XRootWindowOfScreen XRootWindowOfScreen_dylibloader_orig_xlib
+#define XDefaultVisual XDefaultVisual_dylibloader_orig_xlib
+#define XDefaultVisualOfScreen XDefaultVisualOfScreen_dylibloader_orig_xlib
+#define XDefaultGC XDefaultGC_dylibloader_orig_xlib
+#define XDefaultGCOfScreen XDefaultGCOfScreen_dylibloader_orig_xlib
+#define XBlackPixel XBlackPixel_dylibloader_orig_xlib
+#define XWhitePixel XWhitePixel_dylibloader_orig_xlib
+#define XAllPlanes XAllPlanes_dylibloader_orig_xlib
+#define XBlackPixelOfScreen XBlackPixelOfScreen_dylibloader_orig_xlib
+#define XWhitePixelOfScreen XWhitePixelOfScreen_dylibloader_orig_xlib
+#define XNextRequest XNextRequest_dylibloader_orig_xlib
+#define XLastKnownRequestProcessed XLastKnownRequestProcessed_dylibloader_orig_xlib
+#define XServerVendor XServerVendor_dylibloader_orig_xlib
+#define XDisplayString XDisplayString_dylibloader_orig_xlib
+#define XDefaultColormap XDefaultColormap_dylibloader_orig_xlib
+#define XDefaultColormapOfScreen XDefaultColormapOfScreen_dylibloader_orig_xlib
+#define XDisplayOfScreen XDisplayOfScreen_dylibloader_orig_xlib
+#define XScreenOfDisplay XScreenOfDisplay_dylibloader_orig_xlib
+#define XDefaultScreenOfDisplay XDefaultScreenOfDisplay_dylibloader_orig_xlib
+#define XEventMaskOfScreen XEventMaskOfScreen_dylibloader_orig_xlib
+#define XScreenNumberOfScreen XScreenNumberOfScreen_dylibloader_orig_xlib
+#define XSetErrorHandler XSetErrorHandler_dylibloader_orig_xlib
+#define XSetIOErrorHandler XSetIOErrorHandler_dylibloader_orig_xlib
+#define XListPixmapFormats XListPixmapFormats_dylibloader_orig_xlib
+#define XListDepths XListDepths_dylibloader_orig_xlib
+#define XReconfigureWMWindow XReconfigureWMWindow_dylibloader_orig_xlib
+#define XGetWMProtocols XGetWMProtocols_dylibloader_orig_xlib
+#define XSetWMProtocols XSetWMProtocols_dylibloader_orig_xlib
+#define XIconifyWindow XIconifyWindow_dylibloader_orig_xlib
+#define XWithdrawWindow XWithdrawWindow_dylibloader_orig_xlib
+#define XGetCommand XGetCommand_dylibloader_orig_xlib
+#define XGetWMColormapWindows XGetWMColormapWindows_dylibloader_orig_xlib
+#define XSetWMColormapWindows XSetWMColormapWindows_dylibloader_orig_xlib
+#define XFreeStringList XFreeStringList_dylibloader_orig_xlib
+#define XSetTransientForHint XSetTransientForHint_dylibloader_orig_xlib
+#define XActivateScreenSaver XActivateScreenSaver_dylibloader_orig_xlib
+#define XAddHost XAddHost_dylibloader_orig_xlib
+#define XAddHosts XAddHosts_dylibloader_orig_xlib
+#define XAddToExtensionList XAddToExtensionList_dylibloader_orig_xlib
+#define XAddToSaveSet XAddToSaveSet_dylibloader_orig_xlib
+#define XAllocColor XAllocColor_dylibloader_orig_xlib
+#define XAllocColorCells XAllocColorCells_dylibloader_orig_xlib
+#define XAllocColorPlanes XAllocColorPlanes_dylibloader_orig_xlib
+#define XAllocNamedColor XAllocNamedColor_dylibloader_orig_xlib
+#define XAllowEvents XAllowEvents_dylibloader_orig_xlib
+#define XAutoRepeatOff XAutoRepeatOff_dylibloader_orig_xlib
+#define XAutoRepeatOn XAutoRepeatOn_dylibloader_orig_xlib
+#define XBell XBell_dylibloader_orig_xlib
+#define XBitmapBitOrder XBitmapBitOrder_dylibloader_orig_xlib
+#define XBitmapPad XBitmapPad_dylibloader_orig_xlib
+#define XBitmapUnit XBitmapUnit_dylibloader_orig_xlib
+#define XCellsOfScreen XCellsOfScreen_dylibloader_orig_xlib
+#define XChangeActivePointerGrab XChangeActivePointerGrab_dylibloader_orig_xlib
+#define XChangeGC XChangeGC_dylibloader_orig_xlib
+#define XChangeKeyboardControl XChangeKeyboardControl_dylibloader_orig_xlib
+#define XChangeKeyboardMapping XChangeKeyboardMapping_dylibloader_orig_xlib
+#define XChangePointerControl XChangePointerControl_dylibloader_orig_xlib
+#define XChangeProperty XChangeProperty_dylibloader_orig_xlib
+#define XChangeSaveSet XChangeSaveSet_dylibloader_orig_xlib
+#define XChangeWindowAttributes XChangeWindowAttributes_dylibloader_orig_xlib
+#define XCheckIfEvent XCheckIfEvent_dylibloader_orig_xlib
+#define XCheckMaskEvent XCheckMaskEvent_dylibloader_orig_xlib
+#define XCheckTypedEvent XCheckTypedEvent_dylibloader_orig_xlib
+#define XCheckTypedWindowEvent XCheckTypedWindowEvent_dylibloader_orig_xlib
+#define XCheckWindowEvent XCheckWindowEvent_dylibloader_orig_xlib
+#define XCirculateSubwindows XCirculateSubwindows_dylibloader_orig_xlib
+#define XCirculateSubwindowsDown XCirculateSubwindowsDown_dylibloader_orig_xlib
+#define XCirculateSubwindowsUp XCirculateSubwindowsUp_dylibloader_orig_xlib
+#define XClearArea XClearArea_dylibloader_orig_xlib
+#define XClearWindow XClearWindow_dylibloader_orig_xlib
+#define XCloseDisplay XCloseDisplay_dylibloader_orig_xlib
+#define XConfigureWindow XConfigureWindow_dylibloader_orig_xlib
+#define XConnectionNumber XConnectionNumber_dylibloader_orig_xlib
+#define XConvertSelection XConvertSelection_dylibloader_orig_xlib
+#define XCopyArea XCopyArea_dylibloader_orig_xlib
+#define XCopyGC XCopyGC_dylibloader_orig_xlib
+#define XCopyPlane XCopyPlane_dylibloader_orig_xlib
+#define XDefaultDepth XDefaultDepth_dylibloader_orig_xlib
+#define XDefaultDepthOfScreen XDefaultDepthOfScreen_dylibloader_orig_xlib
+#define XDefaultScreen XDefaultScreen_dylibloader_orig_xlib
+#define XDefineCursor XDefineCursor_dylibloader_orig_xlib
+#define XDeleteProperty XDeleteProperty_dylibloader_orig_xlib
+#define XDestroyWindow XDestroyWindow_dylibloader_orig_xlib
+#define XDestroySubwindows XDestroySubwindows_dylibloader_orig_xlib
+#define XDoesBackingStore XDoesBackingStore_dylibloader_orig_xlib
+#define XDoesSaveUnders XDoesSaveUnders_dylibloader_orig_xlib
+#define XDisableAccessControl XDisableAccessControl_dylibloader_orig_xlib
+#define XDisplayCells XDisplayCells_dylibloader_orig_xlib
+#define XDisplayHeight XDisplayHeight_dylibloader_orig_xlib
+#define XDisplayHeightMM XDisplayHeightMM_dylibloader_orig_xlib
+#define XDisplayKeycodes XDisplayKeycodes_dylibloader_orig_xlib
+#define XDisplayPlanes XDisplayPlanes_dylibloader_orig_xlib
+#define XDisplayWidth XDisplayWidth_dylibloader_orig_xlib
+#define XDisplayWidthMM XDisplayWidthMM_dylibloader_orig_xlib
+#define XDrawArc XDrawArc_dylibloader_orig_xlib
+#define XDrawArcs XDrawArcs_dylibloader_orig_xlib
+#define XDrawImageString XDrawImageString_dylibloader_orig_xlib
+#define XDrawImageString16 XDrawImageString16_dylibloader_orig_xlib
+#define XDrawLine XDrawLine_dylibloader_orig_xlib
+#define XDrawLines XDrawLines_dylibloader_orig_xlib
+#define XDrawPoint XDrawPoint_dylibloader_orig_xlib
+#define XDrawPoints XDrawPoints_dylibloader_orig_xlib
+#define XDrawRectangle XDrawRectangle_dylibloader_orig_xlib
+#define XDrawRectangles XDrawRectangles_dylibloader_orig_xlib
+#define XDrawSegments XDrawSegments_dylibloader_orig_xlib
+#define XDrawString XDrawString_dylibloader_orig_xlib
+#define XDrawString16 XDrawString16_dylibloader_orig_xlib
+#define XDrawText XDrawText_dylibloader_orig_xlib
+#define XDrawText16 XDrawText16_dylibloader_orig_xlib
+#define XEnableAccessControl XEnableAccessControl_dylibloader_orig_xlib
+#define XEventsQueued XEventsQueued_dylibloader_orig_xlib
+#define XFetchName XFetchName_dylibloader_orig_xlib
+#define XFillArc XFillArc_dylibloader_orig_xlib
+#define XFillArcs XFillArcs_dylibloader_orig_xlib
+#define XFillPolygon XFillPolygon_dylibloader_orig_xlib
+#define XFillRectangle XFillRectangle_dylibloader_orig_xlib
+#define XFillRectangles XFillRectangles_dylibloader_orig_xlib
+#define XFlush XFlush_dylibloader_orig_xlib
+#define XForceScreenSaver XForceScreenSaver_dylibloader_orig_xlib
+#define XFree XFree_dylibloader_orig_xlib
+#define XFreeColormap XFreeColormap_dylibloader_orig_xlib
+#define XFreeColors XFreeColors_dylibloader_orig_xlib
+#define XFreeCursor XFreeCursor_dylibloader_orig_xlib
+#define XFreeExtensionList XFreeExtensionList_dylibloader_orig_xlib
+#define XFreeFont XFreeFont_dylibloader_orig_xlib
+#define XFreeFontInfo XFreeFontInfo_dylibloader_orig_xlib
+#define XFreeFontNames XFreeFontNames_dylibloader_orig_xlib
+#define XFreeFontPath XFreeFontPath_dylibloader_orig_xlib
+#define XFreeGC XFreeGC_dylibloader_orig_xlib
+#define XFreeModifiermap XFreeModifiermap_dylibloader_orig_xlib
+#define XFreePixmap XFreePixmap_dylibloader_orig_xlib
+#define XGeometry XGeometry_dylibloader_orig_xlib
+#define XGetErrorDatabaseText XGetErrorDatabaseText_dylibloader_orig_xlib
+#define XGetErrorText XGetErrorText_dylibloader_orig_xlib
+#define XGetFontProperty XGetFontProperty_dylibloader_orig_xlib
+#define XGetGCValues XGetGCValues_dylibloader_orig_xlib
+#define XGetGeometry XGetGeometry_dylibloader_orig_xlib
+#define XGetIconName XGetIconName_dylibloader_orig_xlib
+#define XGetInputFocus XGetInputFocus_dylibloader_orig_xlib
+#define XGetKeyboardControl XGetKeyboardControl_dylibloader_orig_xlib
+#define XGetPointerControl XGetPointerControl_dylibloader_orig_xlib
+#define XGetPointerMapping XGetPointerMapping_dylibloader_orig_xlib
+#define XGetScreenSaver XGetScreenSaver_dylibloader_orig_xlib
+#define XGetTransientForHint XGetTransientForHint_dylibloader_orig_xlib
+#define XGetWindowProperty XGetWindowProperty_dylibloader_orig_xlib
+#define XGetWindowAttributes XGetWindowAttributes_dylibloader_orig_xlib
+#define XGrabButton XGrabButton_dylibloader_orig_xlib
+#define XGrabKey XGrabKey_dylibloader_orig_xlib
+#define XGrabKeyboard XGrabKeyboard_dylibloader_orig_xlib
+#define XGrabPointer XGrabPointer_dylibloader_orig_xlib
+#define XGrabServer XGrabServer_dylibloader_orig_xlib
+#define XHeightMMOfScreen XHeightMMOfScreen_dylibloader_orig_xlib
+#define XHeightOfScreen XHeightOfScreen_dylibloader_orig_xlib
+#define XIfEvent XIfEvent_dylibloader_orig_xlib
+#define XImageByteOrder XImageByteOrder_dylibloader_orig_xlib
+#define XInstallColormap XInstallColormap_dylibloader_orig_xlib
+#define XKeysymToKeycode XKeysymToKeycode_dylibloader_orig_xlib
+#define XKillClient XKillClient_dylibloader_orig_xlib
+#define XLookupColor XLookupColor_dylibloader_orig_xlib
+#define XLowerWindow XLowerWindow_dylibloader_orig_xlib
+#define XMapRaised XMapRaised_dylibloader_orig_xlib
+#define XMapSubwindows XMapSubwindows_dylibloader_orig_xlib
+#define XMapWindow XMapWindow_dylibloader_orig_xlib
+#define XMaskEvent XMaskEvent_dylibloader_orig_xlib
+#define XMaxCmapsOfScreen XMaxCmapsOfScreen_dylibloader_orig_xlib
+#define XMinCmapsOfScreen XMinCmapsOfScreen_dylibloader_orig_xlib
+#define XMoveResizeWindow XMoveResizeWindow_dylibloader_orig_xlib
+#define XMoveWindow XMoveWindow_dylibloader_orig_xlib
+#define XNextEvent XNextEvent_dylibloader_orig_xlib
+#define XNoOp XNoOp_dylibloader_orig_xlib
+#define XParseColor XParseColor_dylibloader_orig_xlib
+#define XParseGeometry XParseGeometry_dylibloader_orig_xlib
+#define XPeekEvent XPeekEvent_dylibloader_orig_xlib
+#define XPeekIfEvent XPeekIfEvent_dylibloader_orig_xlib
+#define XPending XPending_dylibloader_orig_xlib
+#define XPlanesOfScreen XPlanesOfScreen_dylibloader_orig_xlib
+#define XProtocolRevision XProtocolRevision_dylibloader_orig_xlib
+#define XProtocolVersion XProtocolVersion_dylibloader_orig_xlib
+#define XPutBackEvent XPutBackEvent_dylibloader_orig_xlib
+#define XPutImage XPutImage_dylibloader_orig_xlib
+#define XQLength XQLength_dylibloader_orig_xlib
+#define XQueryBestCursor XQueryBestCursor_dylibloader_orig_xlib
+#define XQueryBestSize XQueryBestSize_dylibloader_orig_xlib
+#define XQueryBestStipple XQueryBestStipple_dylibloader_orig_xlib
+#define XQueryBestTile XQueryBestTile_dylibloader_orig_xlib
+#define XQueryColor XQueryColor_dylibloader_orig_xlib
+#define XQueryColors XQueryColors_dylibloader_orig_xlib
+#define XQueryExtension XQueryExtension_dylibloader_orig_xlib
+#define XQueryKeymap XQueryKeymap_dylibloader_orig_xlib
+#define XQueryPointer XQueryPointer_dylibloader_orig_xlib
+#define XQueryTextExtents XQueryTextExtents_dylibloader_orig_xlib
+#define XQueryTextExtents16 XQueryTextExtents16_dylibloader_orig_xlib
+#define XQueryTree XQueryTree_dylibloader_orig_xlib
+#define XRaiseWindow XRaiseWindow_dylibloader_orig_xlib
+#define XReadBitmapFile XReadBitmapFile_dylibloader_orig_xlib
+#define XReadBitmapFileData XReadBitmapFileData_dylibloader_orig_xlib
+#define XRebindKeysym XRebindKeysym_dylibloader_orig_xlib
+#define XRecolorCursor XRecolorCursor_dylibloader_orig_xlib
+#define XRefreshKeyboardMapping XRefreshKeyboardMapping_dylibloader_orig_xlib
+#define XRemoveFromSaveSet XRemoveFromSaveSet_dylibloader_orig_xlib
+#define XRemoveHost XRemoveHost_dylibloader_orig_xlib
+#define XRemoveHosts XRemoveHosts_dylibloader_orig_xlib
+#define XReparentWindow XReparentWindow_dylibloader_orig_xlib
+#define XResetScreenSaver XResetScreenSaver_dylibloader_orig_xlib
+#define XResizeWindow XResizeWindow_dylibloader_orig_xlib
+#define XRestackWindows XRestackWindows_dylibloader_orig_xlib
+#define XRotateBuffers XRotateBuffers_dylibloader_orig_xlib
+#define XRotateWindowProperties XRotateWindowProperties_dylibloader_orig_xlib
+#define XScreenCount XScreenCount_dylibloader_orig_xlib
+#define XSelectInput XSelectInput_dylibloader_orig_xlib
+#define XSendEvent XSendEvent_dylibloader_orig_xlib
+#define XSetAccessControl XSetAccessControl_dylibloader_orig_xlib
+#define XSetArcMode XSetArcMode_dylibloader_orig_xlib
+#define XSetBackground XSetBackground_dylibloader_orig_xlib
+#define XSetClipMask XSetClipMask_dylibloader_orig_xlib
+#define XSetClipOrigin XSetClipOrigin_dylibloader_orig_xlib
+#define XSetClipRectangles XSetClipRectangles_dylibloader_orig_xlib
+#define XSetCloseDownMode XSetCloseDownMode_dylibloader_orig_xlib
+#define XSetCommand XSetCommand_dylibloader_orig_xlib
+#define XSetDashes XSetDashes_dylibloader_orig_xlib
+#define XSetFillRule XSetFillRule_dylibloader_orig_xlib
+#define XSetFillStyle XSetFillStyle_dylibloader_orig_xlib
+#define XSetFont XSetFont_dylibloader_orig_xlib
+#define XSetFontPath XSetFontPath_dylibloader_orig_xlib
+#define XSetForeground XSetForeground_dylibloader_orig_xlib
+#define XSetFunction XSetFunction_dylibloader_orig_xlib
+#define XSetGraphicsExposures XSetGraphicsExposures_dylibloader_orig_xlib
+#define XSetIconName XSetIconName_dylibloader_orig_xlib
+#define XSetInputFocus XSetInputFocus_dylibloader_orig_xlib
+#define XSetLineAttributes XSetLineAttributes_dylibloader_orig_xlib
+#define XSetModifierMapping XSetModifierMapping_dylibloader_orig_xlib
+#define XSetPlaneMask XSetPlaneMask_dylibloader_orig_xlib
+#define XSetPointerMapping XSetPointerMapping_dylibloader_orig_xlib
+#define XSetScreenSaver XSetScreenSaver_dylibloader_orig_xlib
+#define XSetSelectionOwner XSetSelectionOwner_dylibloader_orig_xlib
+#define XSetState XSetState_dylibloader_orig_xlib
+#define XSetStipple XSetStipple_dylibloader_orig_xlib
+#define XSetSubwindowMode XSetSubwindowMode_dylibloader_orig_xlib
+#define XSetTSOrigin XSetTSOrigin_dylibloader_orig_xlib
+#define XSetTile XSetTile_dylibloader_orig_xlib
+#define XSetWindowBackground XSetWindowBackground_dylibloader_orig_xlib
+#define XSetWindowBackgroundPixmap XSetWindowBackgroundPixmap_dylibloader_orig_xlib
+#define XSetWindowBorder XSetWindowBorder_dylibloader_orig_xlib
+#define XSetWindowBorderPixmap XSetWindowBorderPixmap_dylibloader_orig_xlib
+#define XSetWindowBorderWidth XSetWindowBorderWidth_dylibloader_orig_xlib
+#define XSetWindowColormap XSetWindowColormap_dylibloader_orig_xlib
+#define XStoreBuffer XStoreBuffer_dylibloader_orig_xlib
+#define XStoreBytes XStoreBytes_dylibloader_orig_xlib
+#define XStoreColor XStoreColor_dylibloader_orig_xlib
+#define XStoreColors XStoreColors_dylibloader_orig_xlib
+#define XStoreName XStoreName_dylibloader_orig_xlib
+#define XStoreNamedColor XStoreNamedColor_dylibloader_orig_xlib
+#define XSync XSync_dylibloader_orig_xlib
+#define XTextExtents XTextExtents_dylibloader_orig_xlib
+#define XTextExtents16 XTextExtents16_dylibloader_orig_xlib
+#define XTextWidth XTextWidth_dylibloader_orig_xlib
+#define XTextWidth16 XTextWidth16_dylibloader_orig_xlib
+#define XTranslateCoordinates XTranslateCoordinates_dylibloader_orig_xlib
+#define XUndefineCursor XUndefineCursor_dylibloader_orig_xlib
+#define XUngrabButton XUngrabButton_dylibloader_orig_xlib
+#define XUngrabKey XUngrabKey_dylibloader_orig_xlib
+#define XUngrabKeyboard XUngrabKeyboard_dylibloader_orig_xlib
+#define XUngrabPointer XUngrabPointer_dylibloader_orig_xlib
+#define XUngrabServer XUngrabServer_dylibloader_orig_xlib
+#define XUninstallColormap XUninstallColormap_dylibloader_orig_xlib
+#define XUnloadFont XUnloadFont_dylibloader_orig_xlib
+#define XUnmapSubwindows XUnmapSubwindows_dylibloader_orig_xlib
+#define XUnmapWindow XUnmapWindow_dylibloader_orig_xlib
+#define XVendorRelease XVendorRelease_dylibloader_orig_xlib
+#define XWarpPointer XWarpPointer_dylibloader_orig_xlib
+#define XWidthMMOfScreen XWidthMMOfScreen_dylibloader_orig_xlib
+#define XWidthOfScreen XWidthOfScreen_dylibloader_orig_xlib
+#define XWindowEvent XWindowEvent_dylibloader_orig_xlib
+#define XWriteBitmapFile XWriteBitmapFile_dylibloader_orig_xlib
+#define XSupportsLocale XSupportsLocale_dylibloader_orig_xlib
+#define XSetLocaleModifiers XSetLocaleModifiers_dylibloader_orig_xlib
+#define XOpenOM XOpenOM_dylibloader_orig_xlib
+#define XCloseOM XCloseOM_dylibloader_orig_xlib
+#define XSetOMValues XSetOMValues_dylibloader_orig_xlib
+#define XGetOMValues XGetOMValues_dylibloader_orig_xlib
+#define XDisplayOfOM XDisplayOfOM_dylibloader_orig_xlib
+#define XLocaleOfOM XLocaleOfOM_dylibloader_orig_xlib
+#define XCreateOC XCreateOC_dylibloader_orig_xlib
+#define XDestroyOC XDestroyOC_dylibloader_orig_xlib
+#define XOMOfOC XOMOfOC_dylibloader_orig_xlib
+#define XSetOCValues XSetOCValues_dylibloader_orig_xlib
+#define XGetOCValues XGetOCValues_dylibloader_orig_xlib
+#define XCreateFontSet XCreateFontSet_dylibloader_orig_xlib
+#define XFreeFontSet XFreeFontSet_dylibloader_orig_xlib
+#define XFontsOfFontSet XFontsOfFontSet_dylibloader_orig_xlib
+#define XBaseFontNameListOfFontSet XBaseFontNameListOfFontSet_dylibloader_orig_xlib
+#define XLocaleOfFontSet XLocaleOfFontSet_dylibloader_orig_xlib
+#define XContextDependentDrawing XContextDependentDrawing_dylibloader_orig_xlib
+#define XDirectionalDependentDrawing XDirectionalDependentDrawing_dylibloader_orig_xlib
+#define XContextualDrawing XContextualDrawing_dylibloader_orig_xlib
+#define XExtentsOfFontSet XExtentsOfFontSet_dylibloader_orig_xlib
+#define XmbTextEscapement XmbTextEscapement_dylibloader_orig_xlib
+#define XwcTextEscapement XwcTextEscapement_dylibloader_orig_xlib
+#define Xutf8TextEscapement Xutf8TextEscapement_dylibloader_orig_xlib
+#define XmbTextExtents XmbTextExtents_dylibloader_orig_xlib
+#define XwcTextExtents XwcTextExtents_dylibloader_orig_xlib
+#define Xutf8TextExtents Xutf8TextExtents_dylibloader_orig_xlib
+#define XmbTextPerCharExtents XmbTextPerCharExtents_dylibloader_orig_xlib
+#define XwcTextPerCharExtents XwcTextPerCharExtents_dylibloader_orig_xlib
+#define Xutf8TextPerCharExtents Xutf8TextPerCharExtents_dylibloader_orig_xlib
+#define XmbDrawText XmbDrawText_dylibloader_orig_xlib
+#define XwcDrawText XwcDrawText_dylibloader_orig_xlib
+#define Xutf8DrawText Xutf8DrawText_dylibloader_orig_xlib
+#define XmbDrawString XmbDrawString_dylibloader_orig_xlib
+#define XwcDrawString XwcDrawString_dylibloader_orig_xlib
+#define Xutf8DrawString Xutf8DrawString_dylibloader_orig_xlib
+#define XmbDrawImageString XmbDrawImageString_dylibloader_orig_xlib
+#define XwcDrawImageString XwcDrawImageString_dylibloader_orig_xlib
+#define Xutf8DrawImageString Xutf8DrawImageString_dylibloader_orig_xlib
+#define XOpenIM XOpenIM_dylibloader_orig_xlib
+#define XCloseIM XCloseIM_dylibloader_orig_xlib
+#define XGetIMValues XGetIMValues_dylibloader_orig_xlib
+#define XSetIMValues XSetIMValues_dylibloader_orig_xlib
+#define XDisplayOfIM XDisplayOfIM_dylibloader_orig_xlib
+#define XLocaleOfIM XLocaleOfIM_dylibloader_orig_xlib
+#define XCreateIC XCreateIC_dylibloader_orig_xlib
+#define XDestroyIC XDestroyIC_dylibloader_orig_xlib
+#define XSetICFocus XSetICFocus_dylibloader_orig_xlib
+#define XUnsetICFocus XUnsetICFocus_dylibloader_orig_xlib
+#define XwcResetIC XwcResetIC_dylibloader_orig_xlib
+#define XmbResetIC XmbResetIC_dylibloader_orig_xlib
+#define Xutf8ResetIC Xutf8ResetIC_dylibloader_orig_xlib
+#define XSetICValues XSetICValues_dylibloader_orig_xlib
+#define XGetICValues XGetICValues_dylibloader_orig_xlib
+#define XIMOfIC XIMOfIC_dylibloader_orig_xlib
+#define XFilterEvent XFilterEvent_dylibloader_orig_xlib
+#define XmbLookupString XmbLookupString_dylibloader_orig_xlib
+#define XwcLookupString XwcLookupString_dylibloader_orig_xlib
+#define Xutf8LookupString Xutf8LookupString_dylibloader_orig_xlib
+#define XVaCreateNestedList XVaCreateNestedList_dylibloader_orig_xlib
+#define XRegisterIMInstantiateCallback XRegisterIMInstantiateCallback_dylibloader_orig_xlib
+#define XUnregisterIMInstantiateCallback XUnregisterIMInstantiateCallback_dylibloader_orig_xlib
+#define XInternalConnectionNumbers XInternalConnectionNumbers_dylibloader_orig_xlib
+#define XProcessInternalConnection XProcessInternalConnection_dylibloader_orig_xlib
+#define XAddConnectionWatch XAddConnectionWatch_dylibloader_orig_xlib
+#define XRemoveConnectionWatch XRemoveConnectionWatch_dylibloader_orig_xlib
+#define XSetAuthorization XSetAuthorization_dylibloader_orig_xlib
+#define _Xmbtowc _Xmbtowc_dylibloader_orig_xlib
+#define _Xwctomb _Xwctomb_dylibloader_orig_xlib
+#define XGetEventData XGetEventData_dylibloader_orig_xlib
+#define XFreeEventData XFreeEventData_dylibloader_orig_xlib
+#define XAllocClassHint XAllocClassHint_dylibloader_orig_xlib
+#define XAllocIconSize XAllocIconSize_dylibloader_orig_xlib
+#define XAllocSizeHints XAllocSizeHints_dylibloader_orig_xlib
+#define XAllocStandardColormap XAllocStandardColormap_dylibloader_orig_xlib
+#define XAllocWMHints XAllocWMHints_dylibloader_orig_xlib
+#define XClipBox XClipBox_dylibloader_orig_xlib
+#define XCreateRegion XCreateRegion_dylibloader_orig_xlib
+#define XDefaultString XDefaultString_dylibloader_orig_xlib
+#define XDeleteContext XDeleteContext_dylibloader_orig_xlib
+#define XDestroyRegion XDestroyRegion_dylibloader_orig_xlib
+#define XEmptyRegion XEmptyRegion_dylibloader_orig_xlib
+#define XEqualRegion XEqualRegion_dylibloader_orig_xlib
+#define XFindContext XFindContext_dylibloader_orig_xlib
+#define XGetClassHint XGetClassHint_dylibloader_orig_xlib
+#define XGetIconSizes XGetIconSizes_dylibloader_orig_xlib
+#define XGetNormalHints XGetNormalHints_dylibloader_orig_xlib
+#define XGetRGBColormaps XGetRGBColormaps_dylibloader_orig_xlib
+#define XGetSizeHints XGetSizeHints_dylibloader_orig_xlib
+#define XGetStandardColormap XGetStandardColormap_dylibloader_orig_xlib
+#define XGetTextProperty XGetTextProperty_dylibloader_orig_xlib
+#define XGetVisualInfo XGetVisualInfo_dylibloader_orig_xlib
+#define XGetWMClientMachine XGetWMClientMachine_dylibloader_orig_xlib
+#define XGetWMHints XGetWMHints_dylibloader_orig_xlib
+#define XGetWMIconName XGetWMIconName_dylibloader_orig_xlib
+#define XGetWMName XGetWMName_dylibloader_orig_xlib
+#define XGetWMNormalHints XGetWMNormalHints_dylibloader_orig_xlib
+#define XGetWMSizeHints XGetWMSizeHints_dylibloader_orig_xlib
+#define XGetZoomHints XGetZoomHints_dylibloader_orig_xlib
+#define XIntersectRegion XIntersectRegion_dylibloader_orig_xlib
+#define XConvertCase XConvertCase_dylibloader_orig_xlib
+#define XLookupString XLookupString_dylibloader_orig_xlib
+#define XMatchVisualInfo XMatchVisualInfo_dylibloader_orig_xlib
+#define XOffsetRegion XOffsetRegion_dylibloader_orig_xlib
+#define XPointInRegion XPointInRegion_dylibloader_orig_xlib
+#define XPolygonRegion XPolygonRegion_dylibloader_orig_xlib
+#define XRectInRegion XRectInRegion_dylibloader_orig_xlib
+#define XSaveContext XSaveContext_dylibloader_orig_xlib
+#define XSetClassHint XSetClassHint_dylibloader_orig_xlib
+#define XSetIconSizes XSetIconSizes_dylibloader_orig_xlib
+#define XSetNormalHints XSetNormalHints_dylibloader_orig_xlib
+#define XSetRGBColormaps XSetRGBColormaps_dylibloader_orig_xlib
+#define XSetSizeHints XSetSizeHints_dylibloader_orig_xlib
+#define XSetStandardProperties XSetStandardProperties_dylibloader_orig_xlib
+#define XSetTextProperty XSetTextProperty_dylibloader_orig_xlib
+#define XSetWMClientMachine XSetWMClientMachine_dylibloader_orig_xlib
+#define XSetWMHints XSetWMHints_dylibloader_orig_xlib
+#define XSetWMIconName XSetWMIconName_dylibloader_orig_xlib
+#define XSetWMName XSetWMName_dylibloader_orig_xlib
+#define XSetWMNormalHints XSetWMNormalHints_dylibloader_orig_xlib
+#define XSetWMProperties XSetWMProperties_dylibloader_orig_xlib
+#define XmbSetWMProperties XmbSetWMProperties_dylibloader_orig_xlib
+#define Xutf8SetWMProperties Xutf8SetWMProperties_dylibloader_orig_xlib
+#define XSetWMSizeHints XSetWMSizeHints_dylibloader_orig_xlib
+#define XSetRegion XSetRegion_dylibloader_orig_xlib
+#define XSetStandardColormap XSetStandardColormap_dylibloader_orig_xlib
+#define XSetZoomHints XSetZoomHints_dylibloader_orig_xlib
+#define XShrinkRegion XShrinkRegion_dylibloader_orig_xlib
+#define XStringListToTextProperty XStringListToTextProperty_dylibloader_orig_xlib
+#define XSubtractRegion XSubtractRegion_dylibloader_orig_xlib
+#define XmbTextListToTextProperty XmbTextListToTextProperty_dylibloader_orig_xlib
+#define XwcTextListToTextProperty XwcTextListToTextProperty_dylibloader_orig_xlib
+#define Xutf8TextListToTextProperty Xutf8TextListToTextProperty_dylibloader_orig_xlib
+#define XwcFreeStringList XwcFreeStringList_dylibloader_orig_xlib
+#define XTextPropertyToStringList XTextPropertyToStringList_dylibloader_orig_xlib
+#define XmbTextPropertyToTextList XmbTextPropertyToTextList_dylibloader_orig_xlib
+#define XwcTextPropertyToTextList XwcTextPropertyToTextList_dylibloader_orig_xlib
+#define Xutf8TextPropertyToTextList Xutf8TextPropertyToTextList_dylibloader_orig_xlib
+#define XUnionRectWithRegion XUnionRectWithRegion_dylibloader_orig_xlib
+#define XUnionRegion XUnionRegion_dylibloader_orig_xlib
+#define XWMGeometry XWMGeometry_dylibloader_orig_xlib
+#define XXorRegion XXorRegion_dylibloader_orig_xlib
+#define XkbIgnoreExtension XkbIgnoreExtension_dylibloader_orig_xlib
+#define XkbOpenDisplay XkbOpenDisplay_dylibloader_orig_xlib
+#define XkbQueryExtension XkbQueryExtension_dylibloader_orig_xlib
+#define XkbUseExtension XkbUseExtension_dylibloader_orig_xlib
+#define XkbLibraryVersion XkbLibraryVersion_dylibloader_orig_xlib
+#define XkbSetXlibControls XkbSetXlibControls_dylibloader_orig_xlib
+#define XkbGetXlibControls XkbGetXlibControls_dylibloader_orig_xlib
+#define XkbXlibControlsImplemented XkbXlibControlsImplemented_dylibloader_orig_xlib
+#define XkbSetAtomFuncs XkbSetAtomFuncs_dylibloader_orig_xlib
+#define XkbKeycodeToKeysym XkbKeycodeToKeysym_dylibloader_orig_xlib
+#define XkbKeysymToModifiers XkbKeysymToModifiers_dylibloader_orig_xlib
+#define XkbLookupKeySym XkbLookupKeySym_dylibloader_orig_xlib
+#define XkbLookupKeyBinding XkbLookupKeyBinding_dylibloader_orig_xlib
+#define XkbTranslateKeyCode XkbTranslateKeyCode_dylibloader_orig_xlib
+#define XkbTranslateKeySym XkbTranslateKeySym_dylibloader_orig_xlib
+#define XkbSetAutoRepeatRate XkbSetAutoRepeatRate_dylibloader_orig_xlib
+#define XkbGetAutoRepeatRate XkbGetAutoRepeatRate_dylibloader_orig_xlib
+#define XkbChangeEnabledControls XkbChangeEnabledControls_dylibloader_orig_xlib
+#define XkbDeviceBell XkbDeviceBell_dylibloader_orig_xlib
+#define XkbForceDeviceBell XkbForceDeviceBell_dylibloader_orig_xlib
+#define XkbDeviceBellEvent XkbDeviceBellEvent_dylibloader_orig_xlib
+#define XkbBell XkbBell_dylibloader_orig_xlib
+#define XkbForceBell XkbForceBell_dylibloader_orig_xlib
+#define XkbBellEvent XkbBellEvent_dylibloader_orig_xlib
+#define XkbSelectEvents XkbSelectEvents_dylibloader_orig_xlib
+#define XkbSelectEventDetails XkbSelectEventDetails_dylibloader_orig_xlib
+#define XkbNoteMapChanges XkbNoteMapChanges_dylibloader_orig_xlib
+#define XkbNoteNameChanges XkbNoteNameChanges_dylibloader_orig_xlib
+#define XkbGetIndicatorState XkbGetIndicatorState_dylibloader_orig_xlib
+#define XkbGetIndicatorMap XkbGetIndicatorMap_dylibloader_orig_xlib
+#define XkbSetIndicatorMap XkbSetIndicatorMap_dylibloader_orig_xlib
+#define XkbGetNamedIndicator XkbGetNamedIndicator_dylibloader_orig_xlib
+#define XkbGetNamedDeviceIndicator XkbGetNamedDeviceIndicator_dylibloader_orig_xlib
+#define XkbSetNamedIndicator XkbSetNamedIndicator_dylibloader_orig_xlib
+#define XkbSetNamedDeviceIndicator XkbSetNamedDeviceIndicator_dylibloader_orig_xlib
+#define XkbLockModifiers XkbLockModifiers_dylibloader_orig_xlib
+#define XkbLatchModifiers XkbLatchModifiers_dylibloader_orig_xlib
+#define XkbLockGroup XkbLockGroup_dylibloader_orig_xlib
+#define XkbLatchGroup XkbLatchGroup_dylibloader_orig_xlib
+#define XkbSetServerInternalMods XkbSetServerInternalMods_dylibloader_orig_xlib
+#define XkbSetIgnoreLockMods XkbSetIgnoreLockMods_dylibloader_orig_xlib
+#define XkbVirtualModsToReal XkbVirtualModsToReal_dylibloader_orig_xlib
+#define XkbComputeEffectiveMap XkbComputeEffectiveMap_dylibloader_orig_xlib
+#define XkbInitCanonicalKeyTypes XkbInitCanonicalKeyTypes_dylibloader_orig_xlib
+#define XkbAllocKeyboard XkbAllocKeyboard_dylibloader_orig_xlib
+#define XkbFreeKeyboard XkbFreeKeyboard_dylibloader_orig_xlib
+#define XkbAllocClientMap XkbAllocClientMap_dylibloader_orig_xlib
+#define XkbAllocServerMap XkbAllocServerMap_dylibloader_orig_xlib
+#define XkbFreeClientMap XkbFreeClientMap_dylibloader_orig_xlib
+#define XkbFreeServerMap XkbFreeServerMap_dylibloader_orig_xlib
+#define XkbAddKeyType XkbAddKeyType_dylibloader_orig_xlib
+#define XkbAllocIndicatorMaps XkbAllocIndicatorMaps_dylibloader_orig_xlib
+#define XkbFreeIndicatorMaps XkbFreeIndicatorMaps_dylibloader_orig_xlib
+#define XkbGetMap XkbGetMap_dylibloader_orig_xlib
+#define XkbGetUpdatedMap XkbGetUpdatedMap_dylibloader_orig_xlib
+#define XkbGetMapChanges XkbGetMapChanges_dylibloader_orig_xlib
+#define XkbRefreshKeyboardMapping XkbRefreshKeyboardMapping_dylibloader_orig_xlib
+#define XkbGetKeyTypes XkbGetKeyTypes_dylibloader_orig_xlib
+#define XkbGetKeySyms XkbGetKeySyms_dylibloader_orig_xlib
+#define XkbGetKeyActions XkbGetKeyActions_dylibloader_orig_xlib
+#define XkbGetKeyBehaviors XkbGetKeyBehaviors_dylibloader_orig_xlib
+#define XkbGetVirtualMods XkbGetVirtualMods_dylibloader_orig_xlib
+#define XkbGetKeyExplicitComponents XkbGetKeyExplicitComponents_dylibloader_orig_xlib
+#define XkbGetKeyModifierMap XkbGetKeyModifierMap_dylibloader_orig_xlib
+#define XkbGetKeyVirtualModMap XkbGetKeyVirtualModMap_dylibloader_orig_xlib
+#define XkbAllocControls XkbAllocControls_dylibloader_orig_xlib
+#define XkbFreeControls XkbFreeControls_dylibloader_orig_xlib
+#define XkbGetControls XkbGetControls_dylibloader_orig_xlib
+#define XkbSetControls XkbSetControls_dylibloader_orig_xlib
+#define XkbNoteControlsChanges XkbNoteControlsChanges_dylibloader_orig_xlib
+#define XkbAllocCompatMap XkbAllocCompatMap_dylibloader_orig_xlib
+#define XkbFreeCompatMap XkbFreeCompatMap_dylibloader_orig_xlib
+#define XkbGetCompatMap XkbGetCompatMap_dylibloader_orig_xlib
+#define XkbSetCompatMap XkbSetCompatMap_dylibloader_orig_xlib
+#define XkbAllocNames XkbAllocNames_dylibloader_orig_xlib
+#define XkbGetNames XkbGetNames_dylibloader_orig_xlib
+#define XkbSetNames XkbSetNames_dylibloader_orig_xlib
+#define XkbChangeNames XkbChangeNames_dylibloader_orig_xlib
+#define XkbFreeNames XkbFreeNames_dylibloader_orig_xlib
+#define XkbGetState XkbGetState_dylibloader_orig_xlib
+#define XkbSetMap XkbSetMap_dylibloader_orig_xlib
+#define XkbChangeMap XkbChangeMap_dylibloader_orig_xlib
+#define XkbSetDetectableAutoRepeat XkbSetDetectableAutoRepeat_dylibloader_orig_xlib
+#define XkbGetDetectableAutoRepeat XkbGetDetectableAutoRepeat_dylibloader_orig_xlib
+#define XkbSetAutoResetControls XkbSetAutoResetControls_dylibloader_orig_xlib
+#define XkbGetAutoResetControls XkbGetAutoResetControls_dylibloader_orig_xlib
+#define XkbSetPerClientControls XkbSetPerClientControls_dylibloader_orig_xlib
+#define XkbGetPerClientControls XkbGetPerClientControls_dylibloader_orig_xlib
+#define XkbCopyKeyType XkbCopyKeyType_dylibloader_orig_xlib
+#define XkbCopyKeyTypes XkbCopyKeyTypes_dylibloader_orig_xlib
+#define XkbResizeKeyType XkbResizeKeyType_dylibloader_orig_xlib
+#define XkbResizeKeySyms XkbResizeKeySyms_dylibloader_orig_xlib
+#define XkbResizeKeyActions XkbResizeKeyActions_dylibloader_orig_xlib
+#define XkbChangeTypesOfKey XkbChangeTypesOfKey_dylibloader_orig_xlib
+#define XkbChangeKeycodeRange XkbChangeKeycodeRange_dylibloader_orig_xlib
+#define XkbListComponents XkbListComponents_dylibloader_orig_xlib
+#define XkbFreeComponentList XkbFreeComponentList_dylibloader_orig_xlib
+#define XkbGetKeyboard XkbGetKeyboard_dylibloader_orig_xlib
+#define XkbGetKeyboardByName XkbGetKeyboardByName_dylibloader_orig_xlib
+#define XkbKeyTypesForCoreSymbols XkbKeyTypesForCoreSymbols_dylibloader_orig_xlib
+#define XkbApplyCompatMapToKey XkbApplyCompatMapToKey_dylibloader_orig_xlib
+#define XkbUpdateMapFromCore XkbUpdateMapFromCore_dylibloader_orig_xlib
+#define XkbAddDeviceLedInfo XkbAddDeviceLedInfo_dylibloader_orig_xlib
+#define XkbResizeDeviceButtonActions XkbResizeDeviceButtonActions_dylibloader_orig_xlib
+#define XkbAllocDeviceInfo XkbAllocDeviceInfo_dylibloader_orig_xlib
+#define XkbFreeDeviceInfo XkbFreeDeviceInfo_dylibloader_orig_xlib
+#define XkbNoteDeviceChanges XkbNoteDeviceChanges_dylibloader_orig_xlib
+#define XkbGetDeviceInfo XkbGetDeviceInfo_dylibloader_orig_xlib
+#define XkbGetDeviceInfoChanges XkbGetDeviceInfoChanges_dylibloader_orig_xlib
+#define XkbGetDeviceButtonActions XkbGetDeviceButtonActions_dylibloader_orig_xlib
+#define XkbGetDeviceLedInfo XkbGetDeviceLedInfo_dylibloader_orig_xlib
+#define XkbSetDeviceInfo XkbSetDeviceInfo_dylibloader_orig_xlib
+#define XkbChangeDeviceInfo XkbChangeDeviceInfo_dylibloader_orig_xlib
+#define XkbSetDeviceLedInfo XkbSetDeviceLedInfo_dylibloader_orig_xlib
+#define XkbSetDeviceButtonActions XkbSetDeviceButtonActions_dylibloader_orig_xlib
+#define XkbToControl XkbToControl_dylibloader_orig_xlib
+#define XkbSetDebuggingFlags XkbSetDebuggingFlags_dylibloader_orig_xlib
+#define XkbApplyVirtualModChanges XkbApplyVirtualModChanges_dylibloader_orig_xlib
+#define XkbUpdateActionVirtualMods XkbUpdateActionVirtualMods_dylibloader_orig_xlib
+#define XkbUpdateKeyTypeVirtualMods XkbUpdateKeyTypeVirtualMods_dylibloader_orig_xlib
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/XKBlib.h>
+#undef _Xmblen
+#undef XLoadQueryFont
+#undef XQueryFont
+#undef XGetMotionEvents
+#undef XDeleteModifiermapEntry
+#undef XGetModifierMapping
+#undef XInsertModifiermapEntry
+#undef XNewModifiermap
+#undef XCreateImage
+#undef XInitImage
+#undef XGetImage
+#undef XGetSubImage
+#undef XOpenDisplay
+#undef XrmInitialize
+#undef XFetchBytes
+#undef XFetchBuffer
+#undef XGetAtomName
+#undef XGetAtomNames
+#undef XGetDefault
+#undef XDisplayName
+#undef XKeysymToString
+#undef XSynchronize
+#undef XSetAfterFunction
+#undef XInternAtom
+#undef XInternAtoms
+#undef XCopyColormapAndFree
+#undef XCreateColormap
+#undef XCreatePixmapCursor
+#undef XCreateGlyphCursor
+#undef XCreateFontCursor
+#undef XLoadFont
+#undef XCreateGC
+#undef XGContextFromGC
+#undef XFlushGC
+#undef XCreatePixmap
+#undef XCreateBitmapFromData
+#undef XCreatePixmapFromBitmapData
+#undef XCreateSimpleWindow
+#undef XGetSelectionOwner
+#undef XCreateWindow
+#undef XListInstalledColormaps
+#undef XListFonts
+#undef XListFontsWithInfo
+#undef XGetFontPath
+#undef XListExtensions
+#undef XListProperties
+#undef XListHosts
+#undef XKeycodeToKeysym
+#undef XLookupKeysym
+#undef XGetKeyboardMapping
+#undef XStringToKeysym
+#undef XMaxRequestSize
+#undef XExtendedMaxRequestSize
+#undef XResourceManagerString
+#undef XScreenResourceString
+#undef XDisplayMotionBufferSize
+#undef XVisualIDFromVisual
+#undef XInitThreads
+#undef XLockDisplay
+#undef XUnlockDisplay
+#undef XInitExtension
+#undef XAddExtension
+#undef XFindOnExtensionList
+#undef XEHeadOfExtensionList
+#undef XRootWindow
+#undef XDefaultRootWindow
+#undef XRootWindowOfScreen
+#undef XDefaultVisual
+#undef XDefaultVisualOfScreen
+#undef XDefaultGC
+#undef XDefaultGCOfScreen
+#undef XBlackPixel
+#undef XWhitePixel
+#undef XAllPlanes
+#undef XBlackPixelOfScreen
+#undef XWhitePixelOfScreen
+#undef XNextRequest
+#undef XLastKnownRequestProcessed
+#undef XServerVendor
+#undef XDisplayString
+#undef XDefaultColormap
+#undef XDefaultColormapOfScreen
+#undef XDisplayOfScreen
+#undef XScreenOfDisplay
+#undef XDefaultScreenOfDisplay
+#undef XEventMaskOfScreen
+#undef XScreenNumberOfScreen
+#undef XSetErrorHandler
+#undef XSetIOErrorHandler
+#undef XListPixmapFormats
+#undef XListDepths
+#undef XReconfigureWMWindow
+#undef XGetWMProtocols
+#undef XSetWMProtocols
+#undef XIconifyWindow
+#undef XWithdrawWindow
+#undef XGetCommand
+#undef XGetWMColormapWindows
+#undef XSetWMColormapWindows
+#undef XFreeStringList
+#undef XSetTransientForHint
+#undef XActivateScreenSaver
+#undef XAddHost
+#undef XAddHosts
+#undef XAddToExtensionList
+#undef XAddToSaveSet
+#undef XAllocColor
+#undef XAllocColorCells
+#undef XAllocColorPlanes
+#undef XAllocNamedColor
+#undef XAllowEvents
+#undef XAutoRepeatOff
+#undef XAutoRepeatOn
+#undef XBell
+#undef XBitmapBitOrder
+#undef XBitmapPad
+#undef XBitmapUnit
+#undef XCellsOfScreen
+#undef XChangeActivePointerGrab
+#undef XChangeGC
+#undef XChangeKeyboardControl
+#undef XChangeKeyboardMapping
+#undef XChangePointerControl
+#undef XChangeProperty
+#undef XChangeSaveSet
+#undef XChangeWindowAttributes
+#undef XCheckIfEvent
+#undef XCheckMaskEvent
+#undef XCheckTypedEvent
+#undef XCheckTypedWindowEvent
+#undef XCheckWindowEvent
+#undef XCirculateSubwindows
+#undef XCirculateSubwindowsDown
+#undef XCirculateSubwindowsUp
+#undef XClearArea
+#undef XClearWindow
+#undef XCloseDisplay
+#undef XConfigureWindow
+#undef XConnectionNumber
+#undef XConvertSelection
+#undef XCopyArea
+#undef XCopyGC
+#undef XCopyPlane
+#undef XDefaultDepth
+#undef XDefaultDepthOfScreen
+#undef XDefaultScreen
+#undef XDefineCursor
+#undef XDeleteProperty
+#undef XDestroyWindow
+#undef XDestroySubwindows
+#undef XDoesBackingStore
+#undef XDoesSaveUnders
+#undef XDisableAccessControl
+#undef XDisplayCells
+#undef XDisplayHeight
+#undef XDisplayHeightMM
+#undef XDisplayKeycodes
+#undef XDisplayPlanes
+#undef XDisplayWidth
+#undef XDisplayWidthMM
+#undef XDrawArc
+#undef XDrawArcs
+#undef XDrawImageString
+#undef XDrawImageString16
+#undef XDrawLine
+#undef XDrawLines
+#undef XDrawPoint
+#undef XDrawPoints
+#undef XDrawRectangle
+#undef XDrawRectangles
+#undef XDrawSegments
+#undef XDrawString
+#undef XDrawString16
+#undef XDrawText
+#undef XDrawText16
+#undef XEnableAccessControl
+#undef XEventsQueued
+#undef XFetchName
+#undef XFillArc
+#undef XFillArcs
+#undef XFillPolygon
+#undef XFillRectangle
+#undef XFillRectangles
+#undef XFlush
+#undef XForceScreenSaver
+#undef XFree
+#undef XFreeColormap
+#undef XFreeColors
+#undef XFreeCursor
+#undef XFreeExtensionList
+#undef XFreeFont
+#undef XFreeFontInfo
+#undef XFreeFontNames
+#undef XFreeFontPath
+#undef XFreeGC
+#undef XFreeModifiermap
+#undef XFreePixmap
+#undef XGeometry
+#undef XGetErrorDatabaseText
+#undef XGetErrorText
+#undef XGetFontProperty
+#undef XGetGCValues
+#undef XGetGeometry
+#undef XGetIconName
+#undef XGetInputFocus
+#undef XGetKeyboardControl
+#undef XGetPointerControl
+#undef XGetPointerMapping
+#undef XGetScreenSaver
+#undef XGetTransientForHint
+#undef XGetWindowProperty
+#undef XGetWindowAttributes
+#undef XGrabButton
+#undef XGrabKey
+#undef XGrabKeyboard
+#undef XGrabPointer
+#undef XGrabServer
+#undef XHeightMMOfScreen
+#undef XHeightOfScreen
+#undef XIfEvent
+#undef XImageByteOrder
+#undef XInstallColormap
+#undef XKeysymToKeycode
+#undef XKillClient
+#undef XLookupColor
+#undef XLowerWindow
+#undef XMapRaised
+#undef XMapSubwindows
+#undef XMapWindow
+#undef XMaskEvent
+#undef XMaxCmapsOfScreen
+#undef XMinCmapsOfScreen
+#undef XMoveResizeWindow
+#undef XMoveWindow
+#undef XNextEvent
+#undef XNoOp
+#undef XParseColor
+#undef XParseGeometry
+#undef XPeekEvent
+#undef XPeekIfEvent
+#undef XPending
+#undef XPlanesOfScreen
+#undef XProtocolRevision
+#undef XProtocolVersion
+#undef XPutBackEvent
+#undef XPutImage
+#undef XQLength
+#undef XQueryBestCursor
+#undef XQueryBestSize
+#undef XQueryBestStipple
+#undef XQueryBestTile
+#undef XQueryColor
+#undef XQueryColors
+#undef XQueryExtension
+#undef XQueryKeymap
+#undef XQueryPointer
+#undef XQueryTextExtents
+#undef XQueryTextExtents16
+#undef XQueryTree
+#undef XRaiseWindow
+#undef XReadBitmapFile
+#undef XReadBitmapFileData
+#undef XRebindKeysym
+#undef XRecolorCursor
+#undef XRefreshKeyboardMapping
+#undef XRemoveFromSaveSet
+#undef XRemoveHost
+#undef XRemoveHosts
+#undef XReparentWindow
+#undef XResetScreenSaver
+#undef XResizeWindow
+#undef XRestackWindows
+#undef XRotateBuffers
+#undef XRotateWindowProperties
+#undef XScreenCount
+#undef XSelectInput
+#undef XSendEvent
+#undef XSetAccessControl
+#undef XSetArcMode
+#undef XSetBackground
+#undef XSetClipMask
+#undef XSetClipOrigin
+#undef XSetClipRectangles
+#undef XSetCloseDownMode
+#undef XSetCommand
+#undef XSetDashes
+#undef XSetFillRule
+#undef XSetFillStyle
+#undef XSetFont
+#undef XSetFontPath
+#undef XSetForeground
+#undef XSetFunction
+#undef XSetGraphicsExposures
+#undef XSetIconName
+#undef XSetInputFocus
+#undef XSetLineAttributes
+#undef XSetModifierMapping
+#undef XSetPlaneMask
+#undef XSetPointerMapping
+#undef XSetScreenSaver
+#undef XSetSelectionOwner
+#undef XSetState
+#undef XSetStipple
+#undef XSetSubwindowMode
+#undef XSetTSOrigin
+#undef XSetTile
+#undef XSetWindowBackground
+#undef XSetWindowBackgroundPixmap
+#undef XSetWindowBorder
+#undef XSetWindowBorderPixmap
+#undef XSetWindowBorderWidth
+#undef XSetWindowColormap
+#undef XStoreBuffer
+#undef XStoreBytes
+#undef XStoreColor
+#undef XStoreColors
+#undef XStoreName
+#undef XStoreNamedColor
+#undef XSync
+#undef XTextExtents
+#undef XTextExtents16
+#undef XTextWidth
+#undef XTextWidth16
+#undef XTranslateCoordinates
+#undef XUndefineCursor
+#undef XUngrabButton
+#undef XUngrabKey
+#undef XUngrabKeyboard
+#undef XUngrabPointer
+#undef XUngrabServer
+#undef XUninstallColormap
+#undef XUnloadFont
+#undef XUnmapSubwindows
+#undef XUnmapWindow
+#undef XVendorRelease
+#undef XWarpPointer
+#undef XWidthMMOfScreen
+#undef XWidthOfScreen
+#undef XWindowEvent
+#undef XWriteBitmapFile
+#undef XSupportsLocale
+#undef XSetLocaleModifiers
+#undef XOpenOM
+#undef XCloseOM
+#undef XSetOMValues
+#undef XGetOMValues
+#undef XDisplayOfOM
+#undef XLocaleOfOM
+#undef XCreateOC
+#undef XDestroyOC
+#undef XOMOfOC
+#undef XSetOCValues
+#undef XGetOCValues
+#undef XCreateFontSet
+#undef XFreeFontSet
+#undef XFontsOfFontSet
+#undef XBaseFontNameListOfFontSet
+#undef XLocaleOfFontSet
+#undef XContextDependentDrawing
+#undef XDirectionalDependentDrawing
+#undef XContextualDrawing
+#undef XExtentsOfFontSet
+#undef XmbTextEscapement
+#undef XwcTextEscapement
+#undef Xutf8TextEscapement
+#undef XmbTextExtents
+#undef XwcTextExtents
+#undef Xutf8TextExtents
+#undef XmbTextPerCharExtents
+#undef XwcTextPerCharExtents
+#undef Xutf8TextPerCharExtents
+#undef XmbDrawText
+#undef XwcDrawText
+#undef Xutf8DrawText
+#undef XmbDrawString
+#undef XwcDrawString
+#undef Xutf8DrawString
+#undef XmbDrawImageString
+#undef XwcDrawImageString
+#undef Xutf8DrawImageString
+#undef XOpenIM
+#undef XCloseIM
+#undef XGetIMValues
+#undef XSetIMValues
+#undef XDisplayOfIM
+#undef XLocaleOfIM
+#undef XCreateIC
+#undef XDestroyIC
+#undef XSetICFocus
+#undef XUnsetICFocus
+#undef XwcResetIC
+#undef XmbResetIC
+#undef Xutf8ResetIC
+#undef XSetICValues
+#undef XGetICValues
+#undef XIMOfIC
+#undef XFilterEvent
+#undef XmbLookupString
+#undef XwcLookupString
+#undef Xutf8LookupString
+#undef XVaCreateNestedList
+#undef XRegisterIMInstantiateCallback
+#undef XUnregisterIMInstantiateCallback
+#undef XInternalConnectionNumbers
+#undef XProcessInternalConnection
+#undef XAddConnectionWatch
+#undef XRemoveConnectionWatch
+#undef XSetAuthorization
+#undef _Xmbtowc
+#undef _Xwctomb
+#undef XGetEventData
+#undef XFreeEventData
+#undef XAllocClassHint
+#undef XAllocIconSize
+#undef XAllocSizeHints
+#undef XAllocStandardColormap
+#undef XAllocWMHints
+#undef XClipBox
+#undef XCreateRegion
+#undef XDefaultString
+#undef XDeleteContext
+#undef XDestroyRegion
+#undef XEmptyRegion
+#undef XEqualRegion
+#undef XFindContext
+#undef XGetClassHint
+#undef XGetIconSizes
+#undef XGetNormalHints
+#undef XGetRGBColormaps
+#undef XGetSizeHints
+#undef XGetStandardColormap
+#undef XGetTextProperty
+#undef XGetVisualInfo
+#undef XGetWMClientMachine
+#undef XGetWMHints
+#undef XGetWMIconName
+#undef XGetWMName
+#undef XGetWMNormalHints
+#undef XGetWMSizeHints
+#undef XGetZoomHints
+#undef XIntersectRegion
+#undef XConvertCase
+#undef XLookupString
+#undef XMatchVisualInfo
+#undef XOffsetRegion
+#undef XPointInRegion
+#undef XPolygonRegion
+#undef XRectInRegion
+#undef XSaveContext
+#undef XSetClassHint
+#undef XSetIconSizes
+#undef XSetNormalHints
+#undef XSetRGBColormaps
+#undef XSetSizeHints
+#undef XSetStandardProperties
+#undef XSetTextProperty
+#undef XSetWMClientMachine
+#undef XSetWMHints
+#undef XSetWMIconName
+#undef XSetWMName
+#undef XSetWMNormalHints
+#undef XSetWMProperties
+#undef XmbSetWMProperties
+#undef Xutf8SetWMProperties
+#undef XSetWMSizeHints
+#undef XSetRegion
+#undef XSetStandardColormap
+#undef XSetZoomHints
+#undef XShrinkRegion
+#undef XStringListToTextProperty
+#undef XSubtractRegion
+#undef XmbTextListToTextProperty
+#undef XwcTextListToTextProperty
+#undef Xutf8TextListToTextProperty
+#undef XwcFreeStringList
+#undef XTextPropertyToStringList
+#undef XmbTextPropertyToTextList
+#undef XwcTextPropertyToTextList
+#undef Xutf8TextPropertyToTextList
+#undef XUnionRectWithRegion
+#undef XUnionRegion
+#undef XWMGeometry
+#undef XXorRegion
+#undef XkbIgnoreExtension
+#undef XkbOpenDisplay
+#undef XkbQueryExtension
+#undef XkbUseExtension
+#undef XkbLibraryVersion
+#undef XkbSetXlibControls
+#undef XkbGetXlibControls
+#undef XkbXlibControlsImplemented
+#undef XkbSetAtomFuncs
+#undef XkbKeycodeToKeysym
+#undef XkbKeysymToModifiers
+#undef XkbLookupKeySym
+#undef XkbLookupKeyBinding
+#undef XkbTranslateKeyCode
+#undef XkbTranslateKeySym
+#undef XkbSetAutoRepeatRate
+#undef XkbGetAutoRepeatRate
+#undef XkbChangeEnabledControls
+#undef XkbDeviceBell
+#undef XkbForceDeviceBell
+#undef XkbDeviceBellEvent
+#undef XkbBell
+#undef XkbForceBell
+#undef XkbBellEvent
+#undef XkbSelectEvents
+#undef XkbSelectEventDetails
+#undef XkbNoteMapChanges
+#undef XkbNoteNameChanges
+#undef XkbGetIndicatorState
+#undef XkbGetIndicatorMap
+#undef XkbSetIndicatorMap
+#undef XkbGetNamedIndicator
+#undef XkbGetNamedDeviceIndicator
+#undef XkbSetNamedIndicator
+#undef XkbSetNamedDeviceIndicator
+#undef XkbLockModifiers
+#undef XkbLatchModifiers
+#undef XkbLockGroup
+#undef XkbLatchGroup
+#undef XkbSetServerInternalMods
+#undef XkbSetIgnoreLockMods
+#undef XkbVirtualModsToReal
+#undef XkbComputeEffectiveMap
+#undef XkbInitCanonicalKeyTypes
+#undef XkbAllocKeyboard
+#undef XkbFreeKeyboard
+#undef XkbAllocClientMap
+#undef XkbAllocServerMap
+#undef XkbFreeClientMap
+#undef XkbFreeServerMap
+#undef XkbAddKeyType
+#undef XkbAllocIndicatorMaps
+#undef XkbFreeIndicatorMaps
+#undef XkbGetMap
+#undef XkbGetUpdatedMap
+#undef XkbGetMapChanges
+#undef XkbRefreshKeyboardMapping
+#undef XkbGetKeyTypes
+#undef XkbGetKeySyms
+#undef XkbGetKeyActions
+#undef XkbGetKeyBehaviors
+#undef XkbGetVirtualMods
+#undef XkbGetKeyExplicitComponents
+#undef XkbGetKeyModifierMap
+#undef XkbGetKeyVirtualModMap
+#undef XkbAllocControls
+#undef XkbFreeControls
+#undef XkbGetControls
+#undef XkbSetControls
+#undef XkbNoteControlsChanges
+#undef XkbAllocCompatMap
+#undef XkbFreeCompatMap
+#undef XkbGetCompatMap
+#undef XkbSetCompatMap
+#undef XkbAllocNames
+#undef XkbGetNames
+#undef XkbSetNames
+#undef XkbChangeNames
+#undef XkbFreeNames
+#undef XkbGetState
+#undef XkbSetMap
+#undef XkbChangeMap
+#undef XkbSetDetectableAutoRepeat
+#undef XkbGetDetectableAutoRepeat
+#undef XkbSetAutoResetControls
+#undef XkbGetAutoResetControls
+#undef XkbSetPerClientControls
+#undef XkbGetPerClientControls
+#undef XkbCopyKeyType
+#undef XkbCopyKeyTypes
+#undef XkbResizeKeyType
+#undef XkbResizeKeySyms
+#undef XkbResizeKeyActions
+#undef XkbChangeTypesOfKey
+#undef XkbChangeKeycodeRange
+#undef XkbListComponents
+#undef XkbFreeComponentList
+#undef XkbGetKeyboard
+#undef XkbGetKeyboardByName
+#undef XkbKeyTypesForCoreSymbols
+#undef XkbApplyCompatMapToKey
+#undef XkbUpdateMapFromCore
+#undef XkbAddDeviceLedInfo
+#undef XkbResizeDeviceButtonActions
+#undef XkbAllocDeviceInfo
+#undef XkbFreeDeviceInfo
+#undef XkbNoteDeviceChanges
+#undef XkbGetDeviceInfo
+#undef XkbGetDeviceInfoChanges
+#undef XkbGetDeviceButtonActions
+#undef XkbGetDeviceLedInfo
+#undef XkbSetDeviceInfo
+#undef XkbChangeDeviceInfo
+#undef XkbSetDeviceLedInfo
+#undef XkbSetDeviceButtonActions
+#undef XkbToControl
+#undef XkbSetDebuggingFlags
+#undef XkbApplyVirtualModChanges
+#undef XkbUpdateActionVirtualMods
+#undef XkbUpdateKeyTypeVirtualMods
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define _Xmblen _Xmblen_dylibloader_wrapper_xlib
+#define XLoadQueryFont XLoadQueryFont_dylibloader_wrapper_xlib
+#define XQueryFont XQueryFont_dylibloader_wrapper_xlib
+#define XGetMotionEvents XGetMotionEvents_dylibloader_wrapper_xlib
+#define XDeleteModifiermapEntry XDeleteModifiermapEntry_dylibloader_wrapper_xlib
+#define XGetModifierMapping XGetModifierMapping_dylibloader_wrapper_xlib
+#define XInsertModifiermapEntry XInsertModifiermapEntry_dylibloader_wrapper_xlib
+#define XNewModifiermap XNewModifiermap_dylibloader_wrapper_xlib
+#define XCreateImage XCreateImage_dylibloader_wrapper_xlib
+#define XInitImage XInitImage_dylibloader_wrapper_xlib
+#define XGetImage XGetImage_dylibloader_wrapper_xlib
+#define XGetSubImage XGetSubImage_dylibloader_wrapper_xlib
+#define XOpenDisplay XOpenDisplay_dylibloader_wrapper_xlib
+#define XrmInitialize XrmInitialize_dylibloader_wrapper_xlib
+#define XFetchBytes XFetchBytes_dylibloader_wrapper_xlib
+#define XFetchBuffer XFetchBuffer_dylibloader_wrapper_xlib
+#define XGetAtomName XGetAtomName_dylibloader_wrapper_xlib
+#define XGetAtomNames XGetAtomNames_dylibloader_wrapper_xlib
+#define XGetDefault XGetDefault_dylibloader_wrapper_xlib
+#define XDisplayName XDisplayName_dylibloader_wrapper_xlib
+#define XKeysymToString XKeysymToString_dylibloader_wrapper_xlib
+#define XSynchronize XSynchronize_dylibloader_wrapper_xlib
+#define XSetAfterFunction XSetAfterFunction_dylibloader_wrapper_xlib
+#define XInternAtom XInternAtom_dylibloader_wrapper_xlib
+#define XInternAtoms XInternAtoms_dylibloader_wrapper_xlib
+#define XCopyColormapAndFree XCopyColormapAndFree_dylibloader_wrapper_xlib
+#define XCreateColormap XCreateColormap_dylibloader_wrapper_xlib
+#define XCreatePixmapCursor XCreatePixmapCursor_dylibloader_wrapper_xlib
+#define XCreateGlyphCursor XCreateGlyphCursor_dylibloader_wrapper_xlib
+#define XCreateFontCursor XCreateFontCursor_dylibloader_wrapper_xlib
+#define XLoadFont XLoadFont_dylibloader_wrapper_xlib
+#define XCreateGC XCreateGC_dylibloader_wrapper_xlib
+#define XGContextFromGC XGContextFromGC_dylibloader_wrapper_xlib
+#define XFlushGC XFlushGC_dylibloader_wrapper_xlib
+#define XCreatePixmap XCreatePixmap_dylibloader_wrapper_xlib
+#define XCreateBitmapFromData XCreateBitmapFromData_dylibloader_wrapper_xlib
+#define XCreatePixmapFromBitmapData XCreatePixmapFromBitmapData_dylibloader_wrapper_xlib
+#define XCreateSimpleWindow XCreateSimpleWindow_dylibloader_wrapper_xlib
+#define XGetSelectionOwner XGetSelectionOwner_dylibloader_wrapper_xlib
+#define XCreateWindow XCreateWindow_dylibloader_wrapper_xlib
+#define XListInstalledColormaps XListInstalledColormaps_dylibloader_wrapper_xlib
+#define XListFonts XListFonts_dylibloader_wrapper_xlib
+#define XListFontsWithInfo XListFontsWithInfo_dylibloader_wrapper_xlib
+#define XGetFontPath XGetFontPath_dylibloader_wrapper_xlib
+#define XListExtensions XListExtensions_dylibloader_wrapper_xlib
+#define XListProperties XListProperties_dylibloader_wrapper_xlib
+#define XListHosts XListHosts_dylibloader_wrapper_xlib
+#define XKeycodeToKeysym XKeycodeToKeysym_dylibloader_wrapper_xlib
+#define XLookupKeysym XLookupKeysym_dylibloader_wrapper_xlib
+#define XGetKeyboardMapping XGetKeyboardMapping_dylibloader_wrapper_xlib
+#define XStringToKeysym XStringToKeysym_dylibloader_wrapper_xlib
+#define XMaxRequestSize XMaxRequestSize_dylibloader_wrapper_xlib
+#define XExtendedMaxRequestSize XExtendedMaxRequestSize_dylibloader_wrapper_xlib
+#define XResourceManagerString XResourceManagerString_dylibloader_wrapper_xlib
+#define XScreenResourceString XScreenResourceString_dylibloader_wrapper_xlib
+#define XDisplayMotionBufferSize XDisplayMotionBufferSize_dylibloader_wrapper_xlib
+#define XVisualIDFromVisual XVisualIDFromVisual_dylibloader_wrapper_xlib
+#define XInitThreads XInitThreads_dylibloader_wrapper_xlib
+#define XLockDisplay XLockDisplay_dylibloader_wrapper_xlib
+#define XUnlockDisplay XUnlockDisplay_dylibloader_wrapper_xlib
+#define XInitExtension XInitExtension_dylibloader_wrapper_xlib
+#define XAddExtension XAddExtension_dylibloader_wrapper_xlib
+#define XFindOnExtensionList XFindOnExtensionList_dylibloader_wrapper_xlib
+#define XEHeadOfExtensionList XEHeadOfExtensionList_dylibloader_wrapper_xlib
+#define XRootWindow XRootWindow_dylibloader_wrapper_xlib
+#define XDefaultRootWindow XDefaultRootWindow_dylibloader_wrapper_xlib
+#define XRootWindowOfScreen XRootWindowOfScreen_dylibloader_wrapper_xlib
+#define XDefaultVisual XDefaultVisual_dylibloader_wrapper_xlib
+#define XDefaultVisualOfScreen XDefaultVisualOfScreen_dylibloader_wrapper_xlib
+#define XDefaultGC XDefaultGC_dylibloader_wrapper_xlib
+#define XDefaultGCOfScreen XDefaultGCOfScreen_dylibloader_wrapper_xlib
+#define XBlackPixel XBlackPixel_dylibloader_wrapper_xlib
+#define XWhitePixel XWhitePixel_dylibloader_wrapper_xlib
+#define XAllPlanes XAllPlanes_dylibloader_wrapper_xlib
+#define XBlackPixelOfScreen XBlackPixelOfScreen_dylibloader_wrapper_xlib
+#define XWhitePixelOfScreen XWhitePixelOfScreen_dylibloader_wrapper_xlib
+#define XNextRequest XNextRequest_dylibloader_wrapper_xlib
+#define XLastKnownRequestProcessed XLastKnownRequestProcessed_dylibloader_wrapper_xlib
+#define XServerVendor XServerVendor_dylibloader_wrapper_xlib
+#define XDisplayString XDisplayString_dylibloader_wrapper_xlib
+#define XDefaultColormap XDefaultColormap_dylibloader_wrapper_xlib
+#define XDefaultColormapOfScreen XDefaultColormapOfScreen_dylibloader_wrapper_xlib
+#define XDisplayOfScreen XDisplayOfScreen_dylibloader_wrapper_xlib
+#define XScreenOfDisplay XScreenOfDisplay_dylibloader_wrapper_xlib
+#define XDefaultScreenOfDisplay XDefaultScreenOfDisplay_dylibloader_wrapper_xlib
+#define XEventMaskOfScreen XEventMaskOfScreen_dylibloader_wrapper_xlib
+#define XScreenNumberOfScreen XScreenNumberOfScreen_dylibloader_wrapper_xlib
+#define XSetErrorHandler XSetErrorHandler_dylibloader_wrapper_xlib
+#define XSetIOErrorHandler XSetIOErrorHandler_dylibloader_wrapper_xlib
+#define XListPixmapFormats XListPixmapFormats_dylibloader_wrapper_xlib
+#define XListDepths XListDepths_dylibloader_wrapper_xlib
+#define XReconfigureWMWindow XReconfigureWMWindow_dylibloader_wrapper_xlib
+#define XGetWMProtocols XGetWMProtocols_dylibloader_wrapper_xlib
+#define XSetWMProtocols XSetWMProtocols_dylibloader_wrapper_xlib
+#define XIconifyWindow XIconifyWindow_dylibloader_wrapper_xlib
+#define XWithdrawWindow XWithdrawWindow_dylibloader_wrapper_xlib
+#define XGetCommand XGetCommand_dylibloader_wrapper_xlib
+#define XGetWMColormapWindows XGetWMColormapWindows_dylibloader_wrapper_xlib
+#define XSetWMColormapWindows XSetWMColormapWindows_dylibloader_wrapper_xlib
+#define XFreeStringList XFreeStringList_dylibloader_wrapper_xlib
+#define XSetTransientForHint XSetTransientForHint_dylibloader_wrapper_xlib
+#define XActivateScreenSaver XActivateScreenSaver_dylibloader_wrapper_xlib
+#define XAddHost XAddHost_dylibloader_wrapper_xlib
+#define XAddHosts XAddHosts_dylibloader_wrapper_xlib
+#define XAddToExtensionList XAddToExtensionList_dylibloader_wrapper_xlib
+#define XAddToSaveSet XAddToSaveSet_dylibloader_wrapper_xlib
+#define XAllocColor XAllocColor_dylibloader_wrapper_xlib
+#define XAllocColorCells XAllocColorCells_dylibloader_wrapper_xlib
+#define XAllocColorPlanes XAllocColorPlanes_dylibloader_wrapper_xlib
+#define XAllocNamedColor XAllocNamedColor_dylibloader_wrapper_xlib
+#define XAllowEvents XAllowEvents_dylibloader_wrapper_xlib
+#define XAutoRepeatOff XAutoRepeatOff_dylibloader_wrapper_xlib
+#define XAutoRepeatOn XAutoRepeatOn_dylibloader_wrapper_xlib
+#define XBell XBell_dylibloader_wrapper_xlib
+#define XBitmapBitOrder XBitmapBitOrder_dylibloader_wrapper_xlib
+#define XBitmapPad XBitmapPad_dylibloader_wrapper_xlib
+#define XBitmapUnit XBitmapUnit_dylibloader_wrapper_xlib
+#define XCellsOfScreen XCellsOfScreen_dylibloader_wrapper_xlib
+#define XChangeActivePointerGrab XChangeActivePointerGrab_dylibloader_wrapper_xlib
+#define XChangeGC XChangeGC_dylibloader_wrapper_xlib
+#define XChangeKeyboardControl XChangeKeyboardControl_dylibloader_wrapper_xlib
+#define XChangeKeyboardMapping XChangeKeyboardMapping_dylibloader_wrapper_xlib
+#define XChangePointerControl XChangePointerControl_dylibloader_wrapper_xlib
+#define XChangeProperty XChangeProperty_dylibloader_wrapper_xlib
+#define XChangeSaveSet XChangeSaveSet_dylibloader_wrapper_xlib
+#define XChangeWindowAttributes XChangeWindowAttributes_dylibloader_wrapper_xlib
+#define XCheckIfEvent XCheckIfEvent_dylibloader_wrapper_xlib
+#define XCheckMaskEvent XCheckMaskEvent_dylibloader_wrapper_xlib
+#define XCheckTypedEvent XCheckTypedEvent_dylibloader_wrapper_xlib
+#define XCheckTypedWindowEvent XCheckTypedWindowEvent_dylibloader_wrapper_xlib
+#define XCheckWindowEvent XCheckWindowEvent_dylibloader_wrapper_xlib
+#define XCirculateSubwindows XCirculateSubwindows_dylibloader_wrapper_xlib
+#define XCirculateSubwindowsDown XCirculateSubwindowsDown_dylibloader_wrapper_xlib
+#define XCirculateSubwindowsUp XCirculateSubwindowsUp_dylibloader_wrapper_xlib
+#define XClearArea XClearArea_dylibloader_wrapper_xlib
+#define XClearWindow XClearWindow_dylibloader_wrapper_xlib
+#define XCloseDisplay XCloseDisplay_dylibloader_wrapper_xlib
+#define XConfigureWindow XConfigureWindow_dylibloader_wrapper_xlib
+#define XConnectionNumber XConnectionNumber_dylibloader_wrapper_xlib
+#define XConvertSelection XConvertSelection_dylibloader_wrapper_xlib
+#define XCopyArea XCopyArea_dylibloader_wrapper_xlib
+#define XCopyGC XCopyGC_dylibloader_wrapper_xlib
+#define XCopyPlane XCopyPlane_dylibloader_wrapper_xlib
+#define XDefaultDepth XDefaultDepth_dylibloader_wrapper_xlib
+#define XDefaultDepthOfScreen XDefaultDepthOfScreen_dylibloader_wrapper_xlib
+#define XDefaultScreen XDefaultScreen_dylibloader_wrapper_xlib
+#define XDefineCursor XDefineCursor_dylibloader_wrapper_xlib
+#define XDeleteProperty XDeleteProperty_dylibloader_wrapper_xlib
+#define XDestroyWindow XDestroyWindow_dylibloader_wrapper_xlib
+#define XDestroySubwindows XDestroySubwindows_dylibloader_wrapper_xlib
+#define XDoesBackingStore XDoesBackingStore_dylibloader_wrapper_xlib
+#define XDoesSaveUnders XDoesSaveUnders_dylibloader_wrapper_xlib
+#define XDisableAccessControl XDisableAccessControl_dylibloader_wrapper_xlib
+#define XDisplayCells XDisplayCells_dylibloader_wrapper_xlib
+#define XDisplayHeight XDisplayHeight_dylibloader_wrapper_xlib
+#define XDisplayHeightMM XDisplayHeightMM_dylibloader_wrapper_xlib
+#define XDisplayKeycodes XDisplayKeycodes_dylibloader_wrapper_xlib
+#define XDisplayPlanes XDisplayPlanes_dylibloader_wrapper_xlib
+#define XDisplayWidth XDisplayWidth_dylibloader_wrapper_xlib
+#define XDisplayWidthMM XDisplayWidthMM_dylibloader_wrapper_xlib
+#define XDrawArc XDrawArc_dylibloader_wrapper_xlib
+#define XDrawArcs XDrawArcs_dylibloader_wrapper_xlib
+#define XDrawImageString XDrawImageString_dylibloader_wrapper_xlib
+#define XDrawImageString16 XDrawImageString16_dylibloader_wrapper_xlib
+#define XDrawLine XDrawLine_dylibloader_wrapper_xlib
+#define XDrawLines XDrawLines_dylibloader_wrapper_xlib
+#define XDrawPoint XDrawPoint_dylibloader_wrapper_xlib
+#define XDrawPoints XDrawPoints_dylibloader_wrapper_xlib
+#define XDrawRectangle XDrawRectangle_dylibloader_wrapper_xlib
+#define XDrawRectangles XDrawRectangles_dylibloader_wrapper_xlib
+#define XDrawSegments XDrawSegments_dylibloader_wrapper_xlib
+#define XDrawString XDrawString_dylibloader_wrapper_xlib
+#define XDrawString16 XDrawString16_dylibloader_wrapper_xlib
+#define XDrawText XDrawText_dylibloader_wrapper_xlib
+#define XDrawText16 XDrawText16_dylibloader_wrapper_xlib
+#define XEnableAccessControl XEnableAccessControl_dylibloader_wrapper_xlib
+#define XEventsQueued XEventsQueued_dylibloader_wrapper_xlib
+#define XFetchName XFetchName_dylibloader_wrapper_xlib
+#define XFillArc XFillArc_dylibloader_wrapper_xlib
+#define XFillArcs XFillArcs_dylibloader_wrapper_xlib
+#define XFillPolygon XFillPolygon_dylibloader_wrapper_xlib
+#define XFillRectangle XFillRectangle_dylibloader_wrapper_xlib
+#define XFillRectangles XFillRectangles_dylibloader_wrapper_xlib
+#define XFlush XFlush_dylibloader_wrapper_xlib
+#define XForceScreenSaver XForceScreenSaver_dylibloader_wrapper_xlib
+#define XFree XFree_dylibloader_wrapper_xlib
+#define XFreeColormap XFreeColormap_dylibloader_wrapper_xlib
+#define XFreeColors XFreeColors_dylibloader_wrapper_xlib
+#define XFreeCursor XFreeCursor_dylibloader_wrapper_xlib
+#define XFreeExtensionList XFreeExtensionList_dylibloader_wrapper_xlib
+#define XFreeFont XFreeFont_dylibloader_wrapper_xlib
+#define XFreeFontInfo XFreeFontInfo_dylibloader_wrapper_xlib
+#define XFreeFontNames XFreeFontNames_dylibloader_wrapper_xlib
+#define XFreeFontPath XFreeFontPath_dylibloader_wrapper_xlib
+#define XFreeGC XFreeGC_dylibloader_wrapper_xlib
+#define XFreeModifiermap XFreeModifiermap_dylibloader_wrapper_xlib
+#define XFreePixmap XFreePixmap_dylibloader_wrapper_xlib
+#define XGeometry XGeometry_dylibloader_wrapper_xlib
+#define XGetErrorDatabaseText XGetErrorDatabaseText_dylibloader_wrapper_xlib
+#define XGetErrorText XGetErrorText_dylibloader_wrapper_xlib
+#define XGetFontProperty XGetFontProperty_dylibloader_wrapper_xlib
+#define XGetGCValues XGetGCValues_dylibloader_wrapper_xlib
+#define XGetGeometry XGetGeometry_dylibloader_wrapper_xlib
+#define XGetIconName XGetIconName_dylibloader_wrapper_xlib
+#define XGetInputFocus XGetInputFocus_dylibloader_wrapper_xlib
+#define XGetKeyboardControl XGetKeyboardControl_dylibloader_wrapper_xlib
+#define XGetPointerControl XGetPointerControl_dylibloader_wrapper_xlib
+#define XGetPointerMapping XGetPointerMapping_dylibloader_wrapper_xlib
+#define XGetScreenSaver XGetScreenSaver_dylibloader_wrapper_xlib
+#define XGetTransientForHint XGetTransientForHint_dylibloader_wrapper_xlib
+#define XGetWindowProperty XGetWindowProperty_dylibloader_wrapper_xlib
+#define XGetWindowAttributes XGetWindowAttributes_dylibloader_wrapper_xlib
+#define XGrabButton XGrabButton_dylibloader_wrapper_xlib
+#define XGrabKey XGrabKey_dylibloader_wrapper_xlib
+#define XGrabKeyboard XGrabKeyboard_dylibloader_wrapper_xlib
+#define XGrabPointer XGrabPointer_dylibloader_wrapper_xlib
+#define XGrabServer XGrabServer_dylibloader_wrapper_xlib
+#define XHeightMMOfScreen XHeightMMOfScreen_dylibloader_wrapper_xlib
+#define XHeightOfScreen XHeightOfScreen_dylibloader_wrapper_xlib
+#define XIfEvent XIfEvent_dylibloader_wrapper_xlib
+#define XImageByteOrder XImageByteOrder_dylibloader_wrapper_xlib
+#define XInstallColormap XInstallColormap_dylibloader_wrapper_xlib
+#define XKeysymToKeycode XKeysymToKeycode_dylibloader_wrapper_xlib
+#define XKillClient XKillClient_dylibloader_wrapper_xlib
+#define XLookupColor XLookupColor_dylibloader_wrapper_xlib
+#define XLowerWindow XLowerWindow_dylibloader_wrapper_xlib
+#define XMapRaised XMapRaised_dylibloader_wrapper_xlib
+#define XMapSubwindows XMapSubwindows_dylibloader_wrapper_xlib
+#define XMapWindow XMapWindow_dylibloader_wrapper_xlib
+#define XMaskEvent XMaskEvent_dylibloader_wrapper_xlib
+#define XMaxCmapsOfScreen XMaxCmapsOfScreen_dylibloader_wrapper_xlib
+#define XMinCmapsOfScreen XMinCmapsOfScreen_dylibloader_wrapper_xlib
+#define XMoveResizeWindow XMoveResizeWindow_dylibloader_wrapper_xlib
+#define XMoveWindow XMoveWindow_dylibloader_wrapper_xlib
+#define XNextEvent XNextEvent_dylibloader_wrapper_xlib
+#define XNoOp XNoOp_dylibloader_wrapper_xlib
+#define XParseColor XParseColor_dylibloader_wrapper_xlib
+#define XParseGeometry XParseGeometry_dylibloader_wrapper_xlib
+#define XPeekEvent XPeekEvent_dylibloader_wrapper_xlib
+#define XPeekIfEvent XPeekIfEvent_dylibloader_wrapper_xlib
+#define XPending XPending_dylibloader_wrapper_xlib
+#define XPlanesOfScreen XPlanesOfScreen_dylibloader_wrapper_xlib
+#define XProtocolRevision XProtocolRevision_dylibloader_wrapper_xlib
+#define XProtocolVersion XProtocolVersion_dylibloader_wrapper_xlib
+#define XPutBackEvent XPutBackEvent_dylibloader_wrapper_xlib
+#define XPutImage XPutImage_dylibloader_wrapper_xlib
+#define XQLength XQLength_dylibloader_wrapper_xlib
+#define XQueryBestCursor XQueryBestCursor_dylibloader_wrapper_xlib
+#define XQueryBestSize XQueryBestSize_dylibloader_wrapper_xlib
+#define XQueryBestStipple XQueryBestStipple_dylibloader_wrapper_xlib
+#define XQueryBestTile XQueryBestTile_dylibloader_wrapper_xlib
+#define XQueryColor XQueryColor_dylibloader_wrapper_xlib
+#define XQueryColors XQueryColors_dylibloader_wrapper_xlib
+#define XQueryExtension XQueryExtension_dylibloader_wrapper_xlib
+#define XQueryKeymap XQueryKeymap_dylibloader_wrapper_xlib
+#define XQueryPointer XQueryPointer_dylibloader_wrapper_xlib
+#define XQueryTextExtents XQueryTextExtents_dylibloader_wrapper_xlib
+#define XQueryTextExtents16 XQueryTextExtents16_dylibloader_wrapper_xlib
+#define XQueryTree XQueryTree_dylibloader_wrapper_xlib
+#define XRaiseWindow XRaiseWindow_dylibloader_wrapper_xlib
+#define XReadBitmapFile XReadBitmapFile_dylibloader_wrapper_xlib
+#define XReadBitmapFileData XReadBitmapFileData_dylibloader_wrapper_xlib
+#define XRebindKeysym XRebindKeysym_dylibloader_wrapper_xlib
+#define XRecolorCursor XRecolorCursor_dylibloader_wrapper_xlib
+#define XRefreshKeyboardMapping XRefreshKeyboardMapping_dylibloader_wrapper_xlib
+#define XRemoveFromSaveSet XRemoveFromSaveSet_dylibloader_wrapper_xlib
+#define XRemoveHost XRemoveHost_dylibloader_wrapper_xlib
+#define XRemoveHosts XRemoveHosts_dylibloader_wrapper_xlib
+#define XReparentWindow XReparentWindow_dylibloader_wrapper_xlib
+#define XResetScreenSaver XResetScreenSaver_dylibloader_wrapper_xlib
+#define XResizeWindow XResizeWindow_dylibloader_wrapper_xlib
+#define XRestackWindows XRestackWindows_dylibloader_wrapper_xlib
+#define XRotateBuffers XRotateBuffers_dylibloader_wrapper_xlib
+#define XRotateWindowProperties XRotateWindowProperties_dylibloader_wrapper_xlib
+#define XScreenCount XScreenCount_dylibloader_wrapper_xlib
+#define XSelectInput XSelectInput_dylibloader_wrapper_xlib
+#define XSendEvent XSendEvent_dylibloader_wrapper_xlib
+#define XSetAccessControl XSetAccessControl_dylibloader_wrapper_xlib
+#define XSetArcMode XSetArcMode_dylibloader_wrapper_xlib
+#define XSetBackground XSetBackground_dylibloader_wrapper_xlib
+#define XSetClipMask XSetClipMask_dylibloader_wrapper_xlib
+#define XSetClipOrigin XSetClipOrigin_dylibloader_wrapper_xlib
+#define XSetClipRectangles XSetClipRectangles_dylibloader_wrapper_xlib
+#define XSetCloseDownMode XSetCloseDownMode_dylibloader_wrapper_xlib
+#define XSetCommand XSetCommand_dylibloader_wrapper_xlib
+#define XSetDashes XSetDashes_dylibloader_wrapper_xlib
+#define XSetFillRule XSetFillRule_dylibloader_wrapper_xlib
+#define XSetFillStyle XSetFillStyle_dylibloader_wrapper_xlib
+#define XSetFont XSetFont_dylibloader_wrapper_xlib
+#define XSetFontPath XSetFontPath_dylibloader_wrapper_xlib
+#define XSetForeground XSetForeground_dylibloader_wrapper_xlib
+#define XSetFunction XSetFunction_dylibloader_wrapper_xlib
+#define XSetGraphicsExposures XSetGraphicsExposures_dylibloader_wrapper_xlib
+#define XSetIconName XSetIconName_dylibloader_wrapper_xlib
+#define XSetInputFocus XSetInputFocus_dylibloader_wrapper_xlib
+#define XSetLineAttributes XSetLineAttributes_dylibloader_wrapper_xlib
+#define XSetModifierMapping XSetModifierMapping_dylibloader_wrapper_xlib
+#define XSetPlaneMask XSetPlaneMask_dylibloader_wrapper_xlib
+#define XSetPointerMapping XSetPointerMapping_dylibloader_wrapper_xlib
+#define XSetScreenSaver XSetScreenSaver_dylibloader_wrapper_xlib
+#define XSetSelectionOwner XSetSelectionOwner_dylibloader_wrapper_xlib
+#define XSetState XSetState_dylibloader_wrapper_xlib
+#define XSetStipple XSetStipple_dylibloader_wrapper_xlib
+#define XSetSubwindowMode XSetSubwindowMode_dylibloader_wrapper_xlib
+#define XSetTSOrigin XSetTSOrigin_dylibloader_wrapper_xlib
+#define XSetTile XSetTile_dylibloader_wrapper_xlib
+#define XSetWindowBackground XSetWindowBackground_dylibloader_wrapper_xlib
+#define XSetWindowBackgroundPixmap XSetWindowBackgroundPixmap_dylibloader_wrapper_xlib
+#define XSetWindowBorder XSetWindowBorder_dylibloader_wrapper_xlib
+#define XSetWindowBorderPixmap XSetWindowBorderPixmap_dylibloader_wrapper_xlib
+#define XSetWindowBorderWidth XSetWindowBorderWidth_dylibloader_wrapper_xlib
+#define XSetWindowColormap XSetWindowColormap_dylibloader_wrapper_xlib
+#define XStoreBuffer XStoreBuffer_dylibloader_wrapper_xlib
+#define XStoreBytes XStoreBytes_dylibloader_wrapper_xlib
+#define XStoreColor XStoreColor_dylibloader_wrapper_xlib
+#define XStoreColors XStoreColors_dylibloader_wrapper_xlib
+#define XStoreName XStoreName_dylibloader_wrapper_xlib
+#define XStoreNamedColor XStoreNamedColor_dylibloader_wrapper_xlib
+#define XSync XSync_dylibloader_wrapper_xlib
+#define XTextExtents XTextExtents_dylibloader_wrapper_xlib
+#define XTextExtents16 XTextExtents16_dylibloader_wrapper_xlib
+#define XTextWidth XTextWidth_dylibloader_wrapper_xlib
+#define XTextWidth16 XTextWidth16_dylibloader_wrapper_xlib
+#define XTranslateCoordinates XTranslateCoordinates_dylibloader_wrapper_xlib
+#define XUndefineCursor XUndefineCursor_dylibloader_wrapper_xlib
+#define XUngrabButton XUngrabButton_dylibloader_wrapper_xlib
+#define XUngrabKey XUngrabKey_dylibloader_wrapper_xlib
+#define XUngrabKeyboard XUngrabKeyboard_dylibloader_wrapper_xlib
+#define XUngrabPointer XUngrabPointer_dylibloader_wrapper_xlib
+#define XUngrabServer XUngrabServer_dylibloader_wrapper_xlib
+#define XUninstallColormap XUninstallColormap_dylibloader_wrapper_xlib
+#define XUnloadFont XUnloadFont_dylibloader_wrapper_xlib
+#define XUnmapSubwindows XUnmapSubwindows_dylibloader_wrapper_xlib
+#define XUnmapWindow XUnmapWindow_dylibloader_wrapper_xlib
+#define XVendorRelease XVendorRelease_dylibloader_wrapper_xlib
+#define XWarpPointer XWarpPointer_dylibloader_wrapper_xlib
+#define XWidthMMOfScreen XWidthMMOfScreen_dylibloader_wrapper_xlib
+#define XWidthOfScreen XWidthOfScreen_dylibloader_wrapper_xlib
+#define XWindowEvent XWindowEvent_dylibloader_wrapper_xlib
+#define XWriteBitmapFile XWriteBitmapFile_dylibloader_wrapper_xlib
+#define XSupportsLocale XSupportsLocale_dylibloader_wrapper_xlib
+#define XSetLocaleModifiers XSetLocaleModifiers_dylibloader_wrapper_xlib
+#define XOpenOM XOpenOM_dylibloader_wrapper_xlib
+#define XCloseOM XCloseOM_dylibloader_wrapper_xlib
+#define XSetOMValues XSetOMValues_dylibloader_wrapper_xlib
+#define XGetOMValues XGetOMValues_dylibloader_wrapper_xlib
+#define XDisplayOfOM XDisplayOfOM_dylibloader_wrapper_xlib
+#define XLocaleOfOM XLocaleOfOM_dylibloader_wrapper_xlib
+#define XCreateOC XCreateOC_dylibloader_wrapper_xlib
+#define XDestroyOC XDestroyOC_dylibloader_wrapper_xlib
+#define XOMOfOC XOMOfOC_dylibloader_wrapper_xlib
+#define XSetOCValues XSetOCValues_dylibloader_wrapper_xlib
+#define XGetOCValues XGetOCValues_dylibloader_wrapper_xlib
+#define XCreateFontSet XCreateFontSet_dylibloader_wrapper_xlib
+#define XFreeFontSet XFreeFontSet_dylibloader_wrapper_xlib
+#define XFontsOfFontSet XFontsOfFontSet_dylibloader_wrapper_xlib
+#define XBaseFontNameListOfFontSet XBaseFontNameListOfFontSet_dylibloader_wrapper_xlib
+#define XLocaleOfFontSet XLocaleOfFontSet_dylibloader_wrapper_xlib
+#define XContextDependentDrawing XContextDependentDrawing_dylibloader_wrapper_xlib
+#define XDirectionalDependentDrawing XDirectionalDependentDrawing_dylibloader_wrapper_xlib
+#define XContextualDrawing XContextualDrawing_dylibloader_wrapper_xlib
+#define XExtentsOfFontSet XExtentsOfFontSet_dylibloader_wrapper_xlib
+#define XmbTextEscapement XmbTextEscapement_dylibloader_wrapper_xlib
+#define XwcTextEscapement XwcTextEscapement_dylibloader_wrapper_xlib
+#define Xutf8TextEscapement Xutf8TextEscapement_dylibloader_wrapper_xlib
+#define XmbTextExtents XmbTextExtents_dylibloader_wrapper_xlib
+#define XwcTextExtents XwcTextExtents_dylibloader_wrapper_xlib
+#define Xutf8TextExtents Xutf8TextExtents_dylibloader_wrapper_xlib
+#define XmbTextPerCharExtents XmbTextPerCharExtents_dylibloader_wrapper_xlib
+#define XwcTextPerCharExtents XwcTextPerCharExtents_dylibloader_wrapper_xlib
+#define Xutf8TextPerCharExtents Xutf8TextPerCharExtents_dylibloader_wrapper_xlib
+#define XmbDrawText XmbDrawText_dylibloader_wrapper_xlib
+#define XwcDrawText XwcDrawText_dylibloader_wrapper_xlib
+#define Xutf8DrawText Xutf8DrawText_dylibloader_wrapper_xlib
+#define XmbDrawString XmbDrawString_dylibloader_wrapper_xlib
+#define XwcDrawString XwcDrawString_dylibloader_wrapper_xlib
+#define Xutf8DrawString Xutf8DrawString_dylibloader_wrapper_xlib
+#define XmbDrawImageString XmbDrawImageString_dylibloader_wrapper_xlib
+#define XwcDrawImageString XwcDrawImageString_dylibloader_wrapper_xlib
+#define Xutf8DrawImageString Xutf8DrawImageString_dylibloader_wrapper_xlib
+#define XOpenIM XOpenIM_dylibloader_wrapper_xlib
+#define XCloseIM XCloseIM_dylibloader_wrapper_xlib
+#define XGetIMValues XGetIMValues_dylibloader_wrapper_xlib
+#define XSetIMValues XSetIMValues_dylibloader_wrapper_xlib
+#define XDisplayOfIM XDisplayOfIM_dylibloader_wrapper_xlib
+#define XLocaleOfIM XLocaleOfIM_dylibloader_wrapper_xlib
+#define XCreateIC XCreateIC_dylibloader_wrapper_xlib
+#define XDestroyIC XDestroyIC_dylibloader_wrapper_xlib
+#define XSetICFocus XSetICFocus_dylibloader_wrapper_xlib
+#define XUnsetICFocus XUnsetICFocus_dylibloader_wrapper_xlib
+#define XwcResetIC XwcResetIC_dylibloader_wrapper_xlib
+#define XmbResetIC XmbResetIC_dylibloader_wrapper_xlib
+#define Xutf8ResetIC Xutf8ResetIC_dylibloader_wrapper_xlib
+#define XSetICValues XSetICValues_dylibloader_wrapper_xlib
+#define XGetICValues XGetICValues_dylibloader_wrapper_xlib
+#define XIMOfIC XIMOfIC_dylibloader_wrapper_xlib
+#define XFilterEvent XFilterEvent_dylibloader_wrapper_xlib
+#define XmbLookupString XmbLookupString_dylibloader_wrapper_xlib
+#define XwcLookupString XwcLookupString_dylibloader_wrapper_xlib
+#define Xutf8LookupString Xutf8LookupString_dylibloader_wrapper_xlib
+#define XVaCreateNestedList XVaCreateNestedList_dylibloader_wrapper_xlib
+#define XRegisterIMInstantiateCallback XRegisterIMInstantiateCallback_dylibloader_wrapper_xlib
+#define XUnregisterIMInstantiateCallback XUnregisterIMInstantiateCallback_dylibloader_wrapper_xlib
+#define XInternalConnectionNumbers XInternalConnectionNumbers_dylibloader_wrapper_xlib
+#define XProcessInternalConnection XProcessInternalConnection_dylibloader_wrapper_xlib
+#define XAddConnectionWatch XAddConnectionWatch_dylibloader_wrapper_xlib
+#define XRemoveConnectionWatch XRemoveConnectionWatch_dylibloader_wrapper_xlib
+#define XSetAuthorization XSetAuthorization_dylibloader_wrapper_xlib
+#define _Xmbtowc _Xmbtowc_dylibloader_wrapper_xlib
+#define _Xwctomb _Xwctomb_dylibloader_wrapper_xlib
+#define XGetEventData XGetEventData_dylibloader_wrapper_xlib
+#define XFreeEventData XFreeEventData_dylibloader_wrapper_xlib
+#define XAllocClassHint XAllocClassHint_dylibloader_wrapper_xlib
+#define XAllocIconSize XAllocIconSize_dylibloader_wrapper_xlib
+#define XAllocSizeHints XAllocSizeHints_dylibloader_wrapper_xlib
+#define XAllocStandardColormap XAllocStandardColormap_dylibloader_wrapper_xlib
+#define XAllocWMHints XAllocWMHints_dylibloader_wrapper_xlib
+#define XClipBox XClipBox_dylibloader_wrapper_xlib
+#define XCreateRegion XCreateRegion_dylibloader_wrapper_xlib
+#define XDefaultString XDefaultString_dylibloader_wrapper_xlib
+#define XDeleteContext XDeleteContext_dylibloader_wrapper_xlib
+#define XDestroyRegion XDestroyRegion_dylibloader_wrapper_xlib
+#define XEmptyRegion XEmptyRegion_dylibloader_wrapper_xlib
+#define XEqualRegion XEqualRegion_dylibloader_wrapper_xlib
+#define XFindContext XFindContext_dylibloader_wrapper_xlib
+#define XGetClassHint XGetClassHint_dylibloader_wrapper_xlib
+#define XGetIconSizes XGetIconSizes_dylibloader_wrapper_xlib
+#define XGetNormalHints XGetNormalHints_dylibloader_wrapper_xlib
+#define XGetRGBColormaps XGetRGBColormaps_dylibloader_wrapper_xlib
+#define XGetSizeHints XGetSizeHints_dylibloader_wrapper_xlib
+#define XGetStandardColormap XGetStandardColormap_dylibloader_wrapper_xlib
+#define XGetTextProperty XGetTextProperty_dylibloader_wrapper_xlib
+#define XGetVisualInfo XGetVisualInfo_dylibloader_wrapper_xlib
+#define XGetWMClientMachine XGetWMClientMachine_dylibloader_wrapper_xlib
+#define XGetWMHints XGetWMHints_dylibloader_wrapper_xlib
+#define XGetWMIconName XGetWMIconName_dylibloader_wrapper_xlib
+#define XGetWMName XGetWMName_dylibloader_wrapper_xlib
+#define XGetWMNormalHints XGetWMNormalHints_dylibloader_wrapper_xlib
+#define XGetWMSizeHints XGetWMSizeHints_dylibloader_wrapper_xlib
+#define XGetZoomHints XGetZoomHints_dylibloader_wrapper_xlib
+#define XIntersectRegion XIntersectRegion_dylibloader_wrapper_xlib
+#define XConvertCase XConvertCase_dylibloader_wrapper_xlib
+#define XLookupString XLookupString_dylibloader_wrapper_xlib
+#define XMatchVisualInfo XMatchVisualInfo_dylibloader_wrapper_xlib
+#define XOffsetRegion XOffsetRegion_dylibloader_wrapper_xlib
+#define XPointInRegion XPointInRegion_dylibloader_wrapper_xlib
+#define XPolygonRegion XPolygonRegion_dylibloader_wrapper_xlib
+#define XRectInRegion XRectInRegion_dylibloader_wrapper_xlib
+#define XSaveContext XSaveContext_dylibloader_wrapper_xlib
+#define XSetClassHint XSetClassHint_dylibloader_wrapper_xlib
+#define XSetIconSizes XSetIconSizes_dylibloader_wrapper_xlib
+#define XSetNormalHints XSetNormalHints_dylibloader_wrapper_xlib
+#define XSetRGBColormaps XSetRGBColormaps_dylibloader_wrapper_xlib
+#define XSetSizeHints XSetSizeHints_dylibloader_wrapper_xlib
+#define XSetStandardProperties XSetStandardProperties_dylibloader_wrapper_xlib
+#define XSetTextProperty XSetTextProperty_dylibloader_wrapper_xlib
+#define XSetWMClientMachine XSetWMClientMachine_dylibloader_wrapper_xlib
+#define XSetWMHints XSetWMHints_dylibloader_wrapper_xlib
+#define XSetWMIconName XSetWMIconName_dylibloader_wrapper_xlib
+#define XSetWMName XSetWMName_dylibloader_wrapper_xlib
+#define XSetWMNormalHints XSetWMNormalHints_dylibloader_wrapper_xlib
+#define XSetWMProperties XSetWMProperties_dylibloader_wrapper_xlib
+#define XmbSetWMProperties XmbSetWMProperties_dylibloader_wrapper_xlib
+#define Xutf8SetWMProperties Xutf8SetWMProperties_dylibloader_wrapper_xlib
+#define XSetWMSizeHints XSetWMSizeHints_dylibloader_wrapper_xlib
+#define XSetRegion XSetRegion_dylibloader_wrapper_xlib
+#define XSetStandardColormap XSetStandardColormap_dylibloader_wrapper_xlib
+#define XSetZoomHints XSetZoomHints_dylibloader_wrapper_xlib
+#define XShrinkRegion XShrinkRegion_dylibloader_wrapper_xlib
+#define XStringListToTextProperty XStringListToTextProperty_dylibloader_wrapper_xlib
+#define XSubtractRegion XSubtractRegion_dylibloader_wrapper_xlib
+#define XmbTextListToTextProperty XmbTextListToTextProperty_dylibloader_wrapper_xlib
+#define XwcTextListToTextProperty XwcTextListToTextProperty_dylibloader_wrapper_xlib
+#define Xutf8TextListToTextProperty Xutf8TextListToTextProperty_dylibloader_wrapper_xlib
+#define XwcFreeStringList XwcFreeStringList_dylibloader_wrapper_xlib
+#define XTextPropertyToStringList XTextPropertyToStringList_dylibloader_wrapper_xlib
+#define XmbTextPropertyToTextList XmbTextPropertyToTextList_dylibloader_wrapper_xlib
+#define XwcTextPropertyToTextList XwcTextPropertyToTextList_dylibloader_wrapper_xlib
+#define Xutf8TextPropertyToTextList Xutf8TextPropertyToTextList_dylibloader_wrapper_xlib
+#define XUnionRectWithRegion XUnionRectWithRegion_dylibloader_wrapper_xlib
+#define XUnionRegion XUnionRegion_dylibloader_wrapper_xlib
+#define XWMGeometry XWMGeometry_dylibloader_wrapper_xlib
+#define XXorRegion XXorRegion_dylibloader_wrapper_xlib
+#define XkbIgnoreExtension XkbIgnoreExtension_dylibloader_wrapper_xlib
+#define XkbOpenDisplay XkbOpenDisplay_dylibloader_wrapper_xlib
+#define XkbQueryExtension XkbQueryExtension_dylibloader_wrapper_xlib
+#define XkbUseExtension XkbUseExtension_dylibloader_wrapper_xlib
+#define XkbLibraryVersion XkbLibraryVersion_dylibloader_wrapper_xlib
+#define XkbSetXlibControls XkbSetXlibControls_dylibloader_wrapper_xlib
+#define XkbGetXlibControls XkbGetXlibControls_dylibloader_wrapper_xlib
+#define XkbXlibControlsImplemented XkbXlibControlsImplemented_dylibloader_wrapper_xlib
+#define XkbSetAtomFuncs XkbSetAtomFuncs_dylibloader_wrapper_xlib
+#define XkbKeycodeToKeysym XkbKeycodeToKeysym_dylibloader_wrapper_xlib
+#define XkbKeysymToModifiers XkbKeysymToModifiers_dylibloader_wrapper_xlib
+#define XkbLookupKeySym XkbLookupKeySym_dylibloader_wrapper_xlib
+#define XkbLookupKeyBinding XkbLookupKeyBinding_dylibloader_wrapper_xlib
+#define XkbTranslateKeyCode XkbTranslateKeyCode_dylibloader_wrapper_xlib
+#define XkbTranslateKeySym XkbTranslateKeySym_dylibloader_wrapper_xlib
+#define XkbSetAutoRepeatRate XkbSetAutoRepeatRate_dylibloader_wrapper_xlib
+#define XkbGetAutoRepeatRate XkbGetAutoRepeatRate_dylibloader_wrapper_xlib
+#define XkbChangeEnabledControls XkbChangeEnabledControls_dylibloader_wrapper_xlib
+#define XkbDeviceBell XkbDeviceBell_dylibloader_wrapper_xlib
+#define XkbForceDeviceBell XkbForceDeviceBell_dylibloader_wrapper_xlib
+#define XkbDeviceBellEvent XkbDeviceBellEvent_dylibloader_wrapper_xlib
+#define XkbBell XkbBell_dylibloader_wrapper_xlib
+#define XkbForceBell XkbForceBell_dylibloader_wrapper_xlib
+#define XkbBellEvent XkbBellEvent_dylibloader_wrapper_xlib
+#define XkbSelectEvents XkbSelectEvents_dylibloader_wrapper_xlib
+#define XkbSelectEventDetails XkbSelectEventDetails_dylibloader_wrapper_xlib
+#define XkbNoteMapChanges XkbNoteMapChanges_dylibloader_wrapper_xlib
+#define XkbNoteNameChanges XkbNoteNameChanges_dylibloader_wrapper_xlib
+#define XkbGetIndicatorState XkbGetIndicatorState_dylibloader_wrapper_xlib
+#define XkbGetIndicatorMap XkbGetIndicatorMap_dylibloader_wrapper_xlib
+#define XkbSetIndicatorMap XkbSetIndicatorMap_dylibloader_wrapper_xlib
+#define XkbGetNamedIndicator XkbGetNamedIndicator_dylibloader_wrapper_xlib
+#define XkbGetNamedDeviceIndicator XkbGetNamedDeviceIndicator_dylibloader_wrapper_xlib
+#define XkbSetNamedIndicator XkbSetNamedIndicator_dylibloader_wrapper_xlib
+#define XkbSetNamedDeviceIndicator XkbSetNamedDeviceIndicator_dylibloader_wrapper_xlib
+#define XkbLockModifiers XkbLockModifiers_dylibloader_wrapper_xlib
+#define XkbLatchModifiers XkbLatchModifiers_dylibloader_wrapper_xlib
+#define XkbLockGroup XkbLockGroup_dylibloader_wrapper_xlib
+#define XkbLatchGroup XkbLatchGroup_dylibloader_wrapper_xlib
+#define XkbSetServerInternalMods XkbSetServerInternalMods_dylibloader_wrapper_xlib
+#define XkbSetIgnoreLockMods XkbSetIgnoreLockMods_dylibloader_wrapper_xlib
+#define XkbVirtualModsToReal XkbVirtualModsToReal_dylibloader_wrapper_xlib
+#define XkbComputeEffectiveMap XkbComputeEffectiveMap_dylibloader_wrapper_xlib
+#define XkbInitCanonicalKeyTypes XkbInitCanonicalKeyTypes_dylibloader_wrapper_xlib
+#define XkbAllocKeyboard XkbAllocKeyboard_dylibloader_wrapper_xlib
+#define XkbFreeKeyboard XkbFreeKeyboard_dylibloader_wrapper_xlib
+#define XkbAllocClientMap XkbAllocClientMap_dylibloader_wrapper_xlib
+#define XkbAllocServerMap XkbAllocServerMap_dylibloader_wrapper_xlib
+#define XkbFreeClientMap XkbFreeClientMap_dylibloader_wrapper_xlib
+#define XkbFreeServerMap XkbFreeServerMap_dylibloader_wrapper_xlib
+#define XkbAddKeyType XkbAddKeyType_dylibloader_wrapper_xlib
+#define XkbAllocIndicatorMaps XkbAllocIndicatorMaps_dylibloader_wrapper_xlib
+#define XkbFreeIndicatorMaps XkbFreeIndicatorMaps_dylibloader_wrapper_xlib
+#define XkbGetMap XkbGetMap_dylibloader_wrapper_xlib
+#define XkbGetUpdatedMap XkbGetUpdatedMap_dylibloader_wrapper_xlib
+#define XkbGetMapChanges XkbGetMapChanges_dylibloader_wrapper_xlib
+#define XkbRefreshKeyboardMapping XkbRefreshKeyboardMapping_dylibloader_wrapper_xlib
+#define XkbGetKeyTypes XkbGetKeyTypes_dylibloader_wrapper_xlib
+#define XkbGetKeySyms XkbGetKeySyms_dylibloader_wrapper_xlib
+#define XkbGetKeyActions XkbGetKeyActions_dylibloader_wrapper_xlib
+#define XkbGetKeyBehaviors XkbGetKeyBehaviors_dylibloader_wrapper_xlib
+#define XkbGetVirtualMods XkbGetVirtualMods_dylibloader_wrapper_xlib
+#define XkbGetKeyExplicitComponents XkbGetKeyExplicitComponents_dylibloader_wrapper_xlib
+#define XkbGetKeyModifierMap XkbGetKeyModifierMap_dylibloader_wrapper_xlib
+#define XkbGetKeyVirtualModMap XkbGetKeyVirtualModMap_dylibloader_wrapper_xlib
+#define XkbAllocControls XkbAllocControls_dylibloader_wrapper_xlib
+#define XkbFreeControls XkbFreeControls_dylibloader_wrapper_xlib
+#define XkbGetControls XkbGetControls_dylibloader_wrapper_xlib
+#define XkbSetControls XkbSetControls_dylibloader_wrapper_xlib
+#define XkbNoteControlsChanges XkbNoteControlsChanges_dylibloader_wrapper_xlib
+#define XkbAllocCompatMap XkbAllocCompatMap_dylibloader_wrapper_xlib
+#define XkbFreeCompatMap XkbFreeCompatMap_dylibloader_wrapper_xlib
+#define XkbGetCompatMap XkbGetCompatMap_dylibloader_wrapper_xlib
+#define XkbSetCompatMap XkbSetCompatMap_dylibloader_wrapper_xlib
+#define XkbAllocNames XkbAllocNames_dylibloader_wrapper_xlib
+#define XkbGetNames XkbGetNames_dylibloader_wrapper_xlib
+#define XkbSetNames XkbSetNames_dylibloader_wrapper_xlib
+#define XkbChangeNames XkbChangeNames_dylibloader_wrapper_xlib
+#define XkbFreeNames XkbFreeNames_dylibloader_wrapper_xlib
+#define XkbGetState XkbGetState_dylibloader_wrapper_xlib
+#define XkbSetMap XkbSetMap_dylibloader_wrapper_xlib
+#define XkbChangeMap XkbChangeMap_dylibloader_wrapper_xlib
+#define XkbSetDetectableAutoRepeat XkbSetDetectableAutoRepeat_dylibloader_wrapper_xlib
+#define XkbGetDetectableAutoRepeat XkbGetDetectableAutoRepeat_dylibloader_wrapper_xlib
+#define XkbSetAutoResetControls XkbSetAutoResetControls_dylibloader_wrapper_xlib
+#define XkbGetAutoResetControls XkbGetAutoResetControls_dylibloader_wrapper_xlib
+#define XkbSetPerClientControls XkbSetPerClientControls_dylibloader_wrapper_xlib
+#define XkbGetPerClientControls XkbGetPerClientControls_dylibloader_wrapper_xlib
+#define XkbCopyKeyType XkbCopyKeyType_dylibloader_wrapper_xlib
+#define XkbCopyKeyTypes XkbCopyKeyTypes_dylibloader_wrapper_xlib
+#define XkbResizeKeyType XkbResizeKeyType_dylibloader_wrapper_xlib
+#define XkbResizeKeySyms XkbResizeKeySyms_dylibloader_wrapper_xlib
+#define XkbResizeKeyActions XkbResizeKeyActions_dylibloader_wrapper_xlib
+#define XkbChangeTypesOfKey XkbChangeTypesOfKey_dylibloader_wrapper_xlib
+#define XkbChangeKeycodeRange XkbChangeKeycodeRange_dylibloader_wrapper_xlib
+#define XkbListComponents XkbListComponents_dylibloader_wrapper_xlib
+#define XkbFreeComponentList XkbFreeComponentList_dylibloader_wrapper_xlib
+#define XkbGetKeyboard XkbGetKeyboard_dylibloader_wrapper_xlib
+#define XkbGetKeyboardByName XkbGetKeyboardByName_dylibloader_wrapper_xlib
+#define XkbKeyTypesForCoreSymbols XkbKeyTypesForCoreSymbols_dylibloader_wrapper_xlib
+#define XkbApplyCompatMapToKey XkbApplyCompatMapToKey_dylibloader_wrapper_xlib
+#define XkbUpdateMapFromCore XkbUpdateMapFromCore_dylibloader_wrapper_xlib
+#define XkbAddDeviceLedInfo XkbAddDeviceLedInfo_dylibloader_wrapper_xlib
+#define XkbResizeDeviceButtonActions XkbResizeDeviceButtonActions_dylibloader_wrapper_xlib
+#define XkbAllocDeviceInfo XkbAllocDeviceInfo_dylibloader_wrapper_xlib
+#define XkbFreeDeviceInfo XkbFreeDeviceInfo_dylibloader_wrapper_xlib
+#define XkbNoteDeviceChanges XkbNoteDeviceChanges_dylibloader_wrapper_xlib
+#define XkbGetDeviceInfo XkbGetDeviceInfo_dylibloader_wrapper_xlib
+#define XkbGetDeviceInfoChanges XkbGetDeviceInfoChanges_dylibloader_wrapper_xlib
+#define XkbGetDeviceButtonActions XkbGetDeviceButtonActions_dylibloader_wrapper_xlib
+#define XkbGetDeviceLedInfo XkbGetDeviceLedInfo_dylibloader_wrapper_xlib
+#define XkbSetDeviceInfo XkbSetDeviceInfo_dylibloader_wrapper_xlib
+#define XkbChangeDeviceInfo XkbChangeDeviceInfo_dylibloader_wrapper_xlib
+#define XkbSetDeviceLedInfo XkbSetDeviceLedInfo_dylibloader_wrapper_xlib
+#define XkbSetDeviceButtonActions XkbSetDeviceButtonActions_dylibloader_wrapper_xlib
+#define XkbToControl XkbToControl_dylibloader_wrapper_xlib
+#define XkbSetDebuggingFlags XkbSetDebuggingFlags_dylibloader_wrapper_xlib
+#define XkbApplyVirtualModChanges XkbApplyVirtualModChanges_dylibloader_wrapper_xlib
+#define XkbUpdateActionVirtualMods XkbUpdateActionVirtualMods_dylibloader_wrapper_xlib
+#define XkbUpdateKeyTypeVirtualMods XkbUpdateKeyTypeVirtualMods_dylibloader_wrapper_xlib
+extern int (*_Xmblen_dylibloader_wrapper_xlib)( char*, int);
+extern XFontStruct* (*XLoadQueryFont_dylibloader_wrapper_xlib)( Display*,const char*);
+extern XFontStruct* (*XQueryFont_dylibloader_wrapper_xlib)( Display*, XID);
+extern XTimeCoord* (*XGetMotionEvents_dylibloader_wrapper_xlib)( Display*, Window, Time, Time, int*);
+extern XModifierKeymap* (*XDeleteModifiermapEntry_dylibloader_wrapper_xlib)( XModifierKeymap*, KeyCode, int);
+extern XModifierKeymap* (*XGetModifierMapping_dylibloader_wrapper_xlib)( Display*);
+extern XModifierKeymap* (*XInsertModifiermapEntry_dylibloader_wrapper_xlib)( XModifierKeymap*, KeyCode, int);
+extern XModifierKeymap* (*XNewModifiermap_dylibloader_wrapper_xlib)( int);
+extern XImage* (*XCreateImage_dylibloader_wrapper_xlib)( Display*, Visual*, unsigned int, int, int, char*, unsigned int, unsigned int, int, int);
+extern int (*XInitImage_dylibloader_wrapper_xlib)( XImage*);
+extern XImage* (*XGetImage_dylibloader_wrapper_xlib)( Display*, Drawable, int, int, unsigned int, unsigned int, unsigned long, int);
+extern XImage* (*XGetSubImage_dylibloader_wrapper_xlib)( Display*, Drawable, int, int, unsigned int, unsigned int, unsigned long, int, XImage*, int, int);
+extern Display* (*XOpenDisplay_dylibloader_wrapper_xlib)(const char*);
+extern void (*XrmInitialize_dylibloader_wrapper_xlib)( void);
+extern char* (*XFetchBytes_dylibloader_wrapper_xlib)( Display*, int*);
+extern char* (*XFetchBuffer_dylibloader_wrapper_xlib)( Display*, int*, int);
+extern char* (*XGetAtomName_dylibloader_wrapper_xlib)( Display*, Atom);
+extern int (*XGetAtomNames_dylibloader_wrapper_xlib)( Display*, Atom*, int, char**);
+extern char* (*XGetDefault_dylibloader_wrapper_xlib)( Display*,const char*,const char*);
+extern char* (*XDisplayName_dylibloader_wrapper_xlib)(const char*);
+extern char* (*XKeysymToString_dylibloader_wrapper_xlib)( KeySym);
+extern int* (*XSynchronize_dylibloader_wrapper_xlib)( Display*, int);
+extern int* (*XSetAfterFunction_dylibloader_wrapper_xlib)( Display*, int*);
+extern Atom (*XInternAtom_dylibloader_wrapper_xlib)( Display*,const char*, int);
+extern int (*XInternAtoms_dylibloader_wrapper_xlib)( Display*, char**, int, int, Atom*);
+extern Colormap (*XCopyColormapAndFree_dylibloader_wrapper_xlib)( Display*, Colormap);
+extern Colormap (*XCreateColormap_dylibloader_wrapper_xlib)( Display*, Window, Visual*, int);
+extern Cursor (*XCreatePixmapCursor_dylibloader_wrapper_xlib)( Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
+extern Cursor (*XCreateGlyphCursor_dylibloader_wrapper_xlib)( Display*, Font, Font, unsigned int, unsigned int,const XColor*,const XColor*);
+extern Cursor (*XCreateFontCursor_dylibloader_wrapper_xlib)( Display*, unsigned int);
+extern Font (*XLoadFont_dylibloader_wrapper_xlib)( Display*,const char*);
+extern GC (*XCreateGC_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned long, XGCValues*);
+extern GContext (*XGContextFromGC_dylibloader_wrapper_xlib)( GC);
+extern void (*XFlushGC_dylibloader_wrapper_xlib)( Display*, GC);
+extern Pixmap (*XCreatePixmap_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned int, unsigned int, unsigned int);
+extern Pixmap (*XCreateBitmapFromData_dylibloader_wrapper_xlib)( Display*, Drawable,const char*, unsigned int, unsigned int);
+extern Pixmap (*XCreatePixmapFromBitmapData_dylibloader_wrapper_xlib)( Display*, Drawable, char*, unsigned int, unsigned int, unsigned long, unsigned long, unsigned int);
+extern Window (*XCreateSimpleWindow_dylibloader_wrapper_xlib)( Display*, Window, int, int, unsigned int, unsigned int, unsigned int, unsigned long, unsigned long);
+extern Window (*XGetSelectionOwner_dylibloader_wrapper_xlib)( Display*, Atom);
+extern Window (*XCreateWindow_dylibloader_wrapper_xlib)( Display*, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual*, unsigned long, XSetWindowAttributes*);
+extern Colormap* (*XListInstalledColormaps_dylibloader_wrapper_xlib)( Display*, Window, int*);
+extern char** (*XListFonts_dylibloader_wrapper_xlib)( Display*,const char*, int, int*);
+extern char** (*XListFontsWithInfo_dylibloader_wrapper_xlib)( Display*,const char*, int, int*, XFontStruct**);
+extern char** (*XGetFontPath_dylibloader_wrapper_xlib)( Display*, int*);
+extern char** (*XListExtensions_dylibloader_wrapper_xlib)( Display*, int*);
+extern Atom* (*XListProperties_dylibloader_wrapper_xlib)( Display*, Window, int*);
+extern XHostAddress* (*XListHosts_dylibloader_wrapper_xlib)( Display*, int*, int*);
+extern KeySym (*XKeycodeToKeysym_dylibloader_wrapper_xlib)( Display*, KeyCode, int);
+extern KeySym (*XLookupKeysym_dylibloader_wrapper_xlib)( XKeyEvent*, int);
+extern KeySym* (*XGetKeyboardMapping_dylibloader_wrapper_xlib)( Display*, KeyCode, int, int*);
+extern KeySym (*XStringToKeysym_dylibloader_wrapper_xlib)(const char*);
+extern long (*XMaxRequestSize_dylibloader_wrapper_xlib)( Display*);
+extern long (*XExtendedMaxRequestSize_dylibloader_wrapper_xlib)( Display*);
+extern char* (*XResourceManagerString_dylibloader_wrapper_xlib)( Display*);
+extern char* (*XScreenResourceString_dylibloader_wrapper_xlib)( Screen*);
+extern unsigned long (*XDisplayMotionBufferSize_dylibloader_wrapper_xlib)( Display*);
+extern VisualID (*XVisualIDFromVisual_dylibloader_wrapper_xlib)( Visual*);
+extern int (*XInitThreads_dylibloader_wrapper_xlib)( void);
+extern void (*XLockDisplay_dylibloader_wrapper_xlib)( Display*);
+extern void (*XUnlockDisplay_dylibloader_wrapper_xlib)( Display*);
+extern XExtCodes* (*XInitExtension_dylibloader_wrapper_xlib)( Display*,const char*);
+extern XExtCodes* (*XAddExtension_dylibloader_wrapper_xlib)( Display*);
+extern XExtData* (*XFindOnExtensionList_dylibloader_wrapper_xlib)( XExtData**, int);
+extern XExtData** (*XEHeadOfExtensionList_dylibloader_wrapper_xlib)( XEDataObject);
+extern Window (*XRootWindow_dylibloader_wrapper_xlib)( Display*, int);
+extern Window (*XDefaultRootWindow_dylibloader_wrapper_xlib)( Display*);
+extern Window (*XRootWindowOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern Visual* (*XDefaultVisual_dylibloader_wrapper_xlib)( Display*, int);
+extern Visual* (*XDefaultVisualOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern GC (*XDefaultGC_dylibloader_wrapper_xlib)( Display*, int);
+extern GC (*XDefaultGCOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern unsigned long (*XBlackPixel_dylibloader_wrapper_xlib)( Display*, int);
+extern unsigned long (*XWhitePixel_dylibloader_wrapper_xlib)( Display*, int);
+extern unsigned long (*XAllPlanes_dylibloader_wrapper_xlib)( void);
+extern unsigned long (*XBlackPixelOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern unsigned long (*XWhitePixelOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern unsigned long (*XNextRequest_dylibloader_wrapper_xlib)( Display*);
+extern unsigned long (*XLastKnownRequestProcessed_dylibloader_wrapper_xlib)( Display*);
+extern char* (*XServerVendor_dylibloader_wrapper_xlib)( Display*);
+extern char* (*XDisplayString_dylibloader_wrapper_xlib)( Display*);
+extern Colormap (*XDefaultColormap_dylibloader_wrapper_xlib)( Display*, int);
+extern Colormap (*XDefaultColormapOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern Display* (*XDisplayOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern Screen* (*XScreenOfDisplay_dylibloader_wrapper_xlib)( Display*, int);
+extern Screen* (*XDefaultScreenOfDisplay_dylibloader_wrapper_xlib)( Display*);
+extern long (*XEventMaskOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XScreenNumberOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern XErrorHandler (*XSetErrorHandler_dylibloader_wrapper_xlib)( XErrorHandler);
+extern XIOErrorHandler (*XSetIOErrorHandler_dylibloader_wrapper_xlib)( XIOErrorHandler);
+extern XPixmapFormatValues* (*XListPixmapFormats_dylibloader_wrapper_xlib)( Display*, int*);
+extern int* (*XListDepths_dylibloader_wrapper_xlib)( Display*, int, int*);
+extern int (*XReconfigureWMWindow_dylibloader_wrapper_xlib)( Display*, Window, int, unsigned int, XWindowChanges*);
+extern int (*XGetWMProtocols_dylibloader_wrapper_xlib)( Display*, Window, Atom**, int*);
+extern int (*XSetWMProtocols_dylibloader_wrapper_xlib)( Display*, Window, Atom*, int);
+extern int (*XIconifyWindow_dylibloader_wrapper_xlib)( Display*, Window, int);
+extern int (*XWithdrawWindow_dylibloader_wrapper_xlib)( Display*, Window, int);
+extern int (*XGetCommand_dylibloader_wrapper_xlib)( Display*, Window, char***, int*);
+extern int (*XGetWMColormapWindows_dylibloader_wrapper_xlib)( Display*, Window, Window**, int*);
+extern int (*XSetWMColormapWindows_dylibloader_wrapper_xlib)( Display*, Window, Window*, int);
+extern void (*XFreeStringList_dylibloader_wrapper_xlib)( char**);
+extern int (*XSetTransientForHint_dylibloader_wrapper_xlib)( Display*, Window, Window);
+extern int (*XActivateScreenSaver_dylibloader_wrapper_xlib)( Display*);
+extern int (*XAddHost_dylibloader_wrapper_xlib)( Display*, XHostAddress*);
+extern int (*XAddHosts_dylibloader_wrapper_xlib)( Display*, XHostAddress*, int);
+extern int (*XAddToExtensionList_dylibloader_wrapper_xlib)(struct _XExtData**, XExtData*);
+extern int (*XAddToSaveSet_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XAllocColor_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*);
+extern int (*XAllocColorCells_dylibloader_wrapper_xlib)( Display*, Colormap, int, unsigned long*, unsigned int, unsigned long*, unsigned int);
+extern int (*XAllocColorPlanes_dylibloader_wrapper_xlib)( Display*, Colormap, int, unsigned long*, int, int, int, int, unsigned long*, unsigned long*, unsigned long*);
+extern int (*XAllocNamedColor_dylibloader_wrapper_xlib)( Display*, Colormap,const char*, XColor*, XColor*);
+extern int (*XAllowEvents_dylibloader_wrapper_xlib)( Display*, int, Time);
+extern int (*XAutoRepeatOff_dylibloader_wrapper_xlib)( Display*);
+extern int (*XAutoRepeatOn_dylibloader_wrapper_xlib)( Display*);
+extern int (*XBell_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XBitmapBitOrder_dylibloader_wrapper_xlib)( Display*);
+extern int (*XBitmapPad_dylibloader_wrapper_xlib)( Display*);
+extern int (*XBitmapUnit_dylibloader_wrapper_xlib)( Display*);
+extern int (*XCellsOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XChangeActivePointerGrab_dylibloader_wrapper_xlib)( Display*, unsigned int, Cursor, Time);
+extern int (*XChangeGC_dylibloader_wrapper_xlib)( Display*, GC, unsigned long, XGCValues*);
+extern int (*XChangeKeyboardControl_dylibloader_wrapper_xlib)( Display*, unsigned long, XKeyboardControl*);
+extern int (*XChangeKeyboardMapping_dylibloader_wrapper_xlib)( Display*, int, int, KeySym*, int);
+extern int (*XChangePointerControl_dylibloader_wrapper_xlib)( Display*, int, int, int, int, int);
+extern int (*XChangeProperty_dylibloader_wrapper_xlib)( Display*, Window, Atom, Atom, int, int,const unsigned char*, int);
+extern int (*XChangeSaveSet_dylibloader_wrapper_xlib)( Display*, Window, int);
+extern int (*XChangeWindowAttributes_dylibloader_wrapper_xlib)( Display*, Window, unsigned long, XSetWindowAttributes*);
+extern int (*XCheckIfEvent_dylibloader_wrapper_xlib)( Display*, XEvent*, Bool (*) (Display*, XEvent*, XPointer), XPointer);
+extern int (*XCheckMaskEvent_dylibloader_wrapper_xlib)( Display*, long, XEvent*);
+extern int (*XCheckTypedEvent_dylibloader_wrapper_xlib)( Display*, int, XEvent*);
+extern int (*XCheckTypedWindowEvent_dylibloader_wrapper_xlib)( Display*, Window, int, XEvent*);
+extern int (*XCheckWindowEvent_dylibloader_wrapper_xlib)( Display*, Window, long, XEvent*);
+extern int (*XCirculateSubwindows_dylibloader_wrapper_xlib)( Display*, Window, int);
+extern int (*XCirculateSubwindowsDown_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XCirculateSubwindowsUp_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XClearArea_dylibloader_wrapper_xlib)( Display*, Window, int, int, unsigned int, unsigned int, int);
+extern int (*XClearWindow_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XCloseDisplay_dylibloader_wrapper_xlib)( Display*);
+extern int (*XConfigureWindow_dylibloader_wrapper_xlib)( Display*, Window, unsigned int, XWindowChanges*);
+extern int (*XConnectionNumber_dylibloader_wrapper_xlib)( Display*);
+extern int (*XConvertSelection_dylibloader_wrapper_xlib)( Display*, Atom, Atom, Atom, Window, Time);
+extern int (*XCopyArea_dylibloader_wrapper_xlib)( Display*, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
+extern int (*XCopyGC_dylibloader_wrapper_xlib)( Display*, GC, unsigned long, GC);
+extern int (*XCopyPlane_dylibloader_wrapper_xlib)( Display*, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int, unsigned long);
+extern int (*XDefaultDepth_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XDefaultDepthOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XDefaultScreen_dylibloader_wrapper_xlib)( Display*);
+extern int (*XDefineCursor_dylibloader_wrapper_xlib)( Display*, Window, Cursor);
+extern int (*XDeleteProperty_dylibloader_wrapper_xlib)( Display*, Window, Atom);
+extern int (*XDestroyWindow_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XDestroySubwindows_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XDoesBackingStore_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XDoesSaveUnders_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XDisableAccessControl_dylibloader_wrapper_xlib)( Display*);
+extern int (*XDisplayCells_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XDisplayHeight_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XDisplayHeightMM_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XDisplayKeycodes_dylibloader_wrapper_xlib)( Display*, int*, int*);
+extern int (*XDisplayPlanes_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XDisplayWidth_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XDisplayWidthMM_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XDrawArc_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
+extern int (*XDrawArcs_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XArc*, int);
+extern int (*XDrawImageString_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int,const char*, int);
+extern int (*XDrawImageString16_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int,const XChar2b*, int);
+extern int (*XDrawLine_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, int, int);
+extern int (*XDrawLines_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XPoint*, int, int);
+extern int (*XDrawPoint_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int);
+extern int (*XDrawPoints_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XPoint*, int, int);
+extern int (*XDrawRectangle_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, unsigned int, unsigned int);
+extern int (*XDrawRectangles_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XRectangle*, int);
+extern int (*XDrawSegments_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XSegment*, int);
+extern int (*XDrawString_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int,const char*, int);
+extern int (*XDrawString16_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int,const XChar2b*, int);
+extern int (*XDrawText_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XTextItem*, int);
+extern int (*XDrawText16_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XTextItem16*, int);
+extern int (*XEnableAccessControl_dylibloader_wrapper_xlib)( Display*);
+extern int (*XEventsQueued_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XFetchName_dylibloader_wrapper_xlib)( Display*, Window, char**);
+extern int (*XFillArc_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
+extern int (*XFillArcs_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XArc*, int);
+extern int (*XFillPolygon_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XPoint*, int, int, int);
+extern int (*XFillRectangle_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, unsigned int, unsigned int);
+extern int (*XFillRectangles_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XRectangle*, int);
+extern int (*XFlush_dylibloader_wrapper_xlib)( Display*);
+extern int (*XForceScreenSaver_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XFree_dylibloader_wrapper_xlib)( void*);
+extern int (*XFreeColormap_dylibloader_wrapper_xlib)( Display*, Colormap);
+extern int (*XFreeColors_dylibloader_wrapper_xlib)( Display*, Colormap, unsigned long*, int, unsigned long);
+extern int (*XFreeCursor_dylibloader_wrapper_xlib)( Display*, Cursor);
+extern int (*XFreeExtensionList_dylibloader_wrapper_xlib)( char**);
+extern int (*XFreeFont_dylibloader_wrapper_xlib)( Display*, XFontStruct*);
+extern int (*XFreeFontInfo_dylibloader_wrapper_xlib)( char**, XFontStruct*, int);
+extern int (*XFreeFontNames_dylibloader_wrapper_xlib)( char**);
+extern int (*XFreeFontPath_dylibloader_wrapper_xlib)( char**);
+extern int (*XFreeGC_dylibloader_wrapper_xlib)( Display*, GC);
+extern int (*XFreeModifiermap_dylibloader_wrapper_xlib)( XModifierKeymap*);
+extern int (*XFreePixmap_dylibloader_wrapper_xlib)( Display*, Pixmap);
+extern int (*XGeometry_dylibloader_wrapper_xlib)( Display*, int,const char*,const char*, unsigned int, unsigned int, unsigned int, int, int, int*, int*, int*, int*);
+extern int (*XGetErrorDatabaseText_dylibloader_wrapper_xlib)( Display*,const char*,const char*,const char*, char*, int);
+extern int (*XGetErrorText_dylibloader_wrapper_xlib)( Display*, int, char*, int);
+extern int (*XGetFontProperty_dylibloader_wrapper_xlib)( XFontStruct*, Atom, unsigned long*);
+extern int (*XGetGCValues_dylibloader_wrapper_xlib)( Display*, GC, unsigned long, XGCValues*);
+extern int (*XGetGeometry_dylibloader_wrapper_xlib)( Display*, Drawable, Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*);
+extern int (*XGetIconName_dylibloader_wrapper_xlib)( Display*, Window, char**);
+extern int (*XGetInputFocus_dylibloader_wrapper_xlib)( Display*, Window*, int*);
+extern int (*XGetKeyboardControl_dylibloader_wrapper_xlib)( Display*, XKeyboardState*);
+extern int (*XGetPointerControl_dylibloader_wrapper_xlib)( Display*, int*, int*, int*);
+extern int (*XGetPointerMapping_dylibloader_wrapper_xlib)( Display*, unsigned char*, int);
+extern int (*XGetScreenSaver_dylibloader_wrapper_xlib)( Display*, int*, int*, int*, int*);
+extern int (*XGetTransientForHint_dylibloader_wrapper_xlib)( Display*, Window, Window*);
+extern int (*XGetWindowProperty_dylibloader_wrapper_xlib)( Display*, Window, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+extern int (*XGetWindowAttributes_dylibloader_wrapper_xlib)( Display*, Window, XWindowAttributes*);
+extern int (*XGrabButton_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, Window, int, unsigned int, int, int, Window, Cursor);
+extern int (*XGrabKey_dylibloader_wrapper_xlib)( Display*, int, unsigned int, Window, int, int, int);
+extern int (*XGrabKeyboard_dylibloader_wrapper_xlib)( Display*, Window, int, int, int, Time);
+extern int (*XGrabPointer_dylibloader_wrapper_xlib)( Display*, Window, int, unsigned int, int, int, Window, Cursor, Time);
+extern int (*XGrabServer_dylibloader_wrapper_xlib)( Display*);
+extern int (*XHeightMMOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XHeightOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XIfEvent_dylibloader_wrapper_xlib)( Display*, XEvent*, Bool (*) (Display*, XEvent*, XPointer), XPointer);
+extern int (*XImageByteOrder_dylibloader_wrapper_xlib)( Display*);
+extern int (*XInstallColormap_dylibloader_wrapper_xlib)( Display*, Colormap);
+extern KeyCode (*XKeysymToKeycode_dylibloader_wrapper_xlib)( Display*, KeySym);
+extern int (*XKillClient_dylibloader_wrapper_xlib)( Display*, XID);
+extern int (*XLookupColor_dylibloader_wrapper_xlib)( Display*, Colormap,const char*, XColor*, XColor*);
+extern int (*XLowerWindow_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XMapRaised_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XMapSubwindows_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XMapWindow_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XMaskEvent_dylibloader_wrapper_xlib)( Display*, long, XEvent*);
+extern int (*XMaxCmapsOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XMinCmapsOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XMoveResizeWindow_dylibloader_wrapper_xlib)( Display*, Window, int, int, unsigned int, unsigned int);
+extern int (*XMoveWindow_dylibloader_wrapper_xlib)( Display*, Window, int, int);
+extern int (*XNextEvent_dylibloader_wrapper_xlib)( Display*, XEvent*);
+extern int (*XNoOp_dylibloader_wrapper_xlib)( Display*);
+extern int (*XParseColor_dylibloader_wrapper_xlib)( Display*, Colormap,const char*, XColor*);
+extern int (*XParseGeometry_dylibloader_wrapper_xlib)(const char*, int*, int*, unsigned int*, unsigned int*);
+extern int (*XPeekEvent_dylibloader_wrapper_xlib)( Display*, XEvent*);
+extern int (*XPeekIfEvent_dylibloader_wrapper_xlib)( Display*, XEvent*, Bool (*) (Display*, XEvent*, XPointer), XPointer);
+extern int (*XPending_dylibloader_wrapper_xlib)( Display*);
+extern int (*XPlanesOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XProtocolRevision_dylibloader_wrapper_xlib)( Display*);
+extern int (*XProtocolVersion_dylibloader_wrapper_xlib)( Display*);
+extern int (*XPutBackEvent_dylibloader_wrapper_xlib)( Display*, XEvent*);
+extern int (*XPutImage_dylibloader_wrapper_xlib)( Display*, Drawable, GC, XImage*, int, int, int, int, unsigned int, unsigned int);
+extern int (*XQLength_dylibloader_wrapper_xlib)( Display*);
+extern int (*XQueryBestCursor_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned int, unsigned int, unsigned int*, unsigned int*);
+extern int (*XQueryBestSize_dylibloader_wrapper_xlib)( Display*, int, Drawable, unsigned int, unsigned int, unsigned int*, unsigned int*);
+extern int (*XQueryBestStipple_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned int, unsigned int, unsigned int*, unsigned int*);
+extern int (*XQueryBestTile_dylibloader_wrapper_xlib)( Display*, Drawable, unsigned int, unsigned int, unsigned int*, unsigned int*);
+extern int (*XQueryColor_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*);
+extern int (*XQueryColors_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*, int);
+extern int (*XQueryExtension_dylibloader_wrapper_xlib)( Display*,const char*, int*, int*, int*);
+extern int (*XQueryKeymap_dylibloader_wrapper_xlib)( Display*, char [32]);
+extern int (*XQueryPointer_dylibloader_wrapper_xlib)( Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*);
+extern int (*XQueryTextExtents_dylibloader_wrapper_xlib)( Display*, XID,const char*, int, int*, int*, int*, XCharStruct*);
+extern int (*XQueryTextExtents16_dylibloader_wrapper_xlib)( Display*, XID,const XChar2b*, int, int*, int*, int*, XCharStruct*);
+extern int (*XQueryTree_dylibloader_wrapper_xlib)( Display*, Window, Window*, Window*, Window**, unsigned int*);
+extern int (*XRaiseWindow_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XReadBitmapFile_dylibloader_wrapper_xlib)( Display*, Drawable,const char*, unsigned int*, unsigned int*, Pixmap*, int*, int*);
+extern int (*XReadBitmapFileData_dylibloader_wrapper_xlib)(const char*, unsigned int*, unsigned int*, unsigned char**, int*, int*);
+extern int (*XRebindKeysym_dylibloader_wrapper_xlib)( Display*, KeySym, KeySym*, int,const unsigned char*, int);
+extern int (*XRecolorCursor_dylibloader_wrapper_xlib)( Display*, Cursor, XColor*, XColor*);
+extern int (*XRefreshKeyboardMapping_dylibloader_wrapper_xlib)( XMappingEvent*);
+extern int (*XRemoveFromSaveSet_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XRemoveHost_dylibloader_wrapper_xlib)( Display*, XHostAddress*);
+extern int (*XRemoveHosts_dylibloader_wrapper_xlib)( Display*, XHostAddress*, int);
+extern int (*XReparentWindow_dylibloader_wrapper_xlib)( Display*, Window, Window, int, int);
+extern int (*XResetScreenSaver_dylibloader_wrapper_xlib)( Display*);
+extern int (*XResizeWindow_dylibloader_wrapper_xlib)( Display*, Window, unsigned int, unsigned int);
+extern int (*XRestackWindows_dylibloader_wrapper_xlib)( Display*, Window*, int);
+extern int (*XRotateBuffers_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XRotateWindowProperties_dylibloader_wrapper_xlib)( Display*, Window, Atom*, int, int);
+extern int (*XScreenCount_dylibloader_wrapper_xlib)( Display*);
+extern int (*XSelectInput_dylibloader_wrapper_xlib)( Display*, Window, long);
+extern int (*XSendEvent_dylibloader_wrapper_xlib)( Display*, Window, int, long, XEvent*);
+extern int (*XSetAccessControl_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XSetArcMode_dylibloader_wrapper_xlib)( Display*, GC, int);
+extern int (*XSetBackground_dylibloader_wrapper_xlib)( Display*, GC, unsigned long);
+extern int (*XSetClipMask_dylibloader_wrapper_xlib)( Display*, GC, Pixmap);
+extern int (*XSetClipOrigin_dylibloader_wrapper_xlib)( Display*, GC, int, int);
+extern int (*XSetClipRectangles_dylibloader_wrapper_xlib)( Display*, GC, int, int, XRectangle*, int, int);
+extern int (*XSetCloseDownMode_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XSetCommand_dylibloader_wrapper_xlib)( Display*, Window, char**, int);
+extern int (*XSetDashes_dylibloader_wrapper_xlib)( Display*, GC, int,const char*, int);
+extern int (*XSetFillRule_dylibloader_wrapper_xlib)( Display*, GC, int);
+extern int (*XSetFillStyle_dylibloader_wrapper_xlib)( Display*, GC, int);
+extern int (*XSetFont_dylibloader_wrapper_xlib)( Display*, GC, Font);
+extern int (*XSetFontPath_dylibloader_wrapper_xlib)( Display*, char**, int);
+extern int (*XSetForeground_dylibloader_wrapper_xlib)( Display*, GC, unsigned long);
+extern int (*XSetFunction_dylibloader_wrapper_xlib)( Display*, GC, int);
+extern int (*XSetGraphicsExposures_dylibloader_wrapper_xlib)( Display*, GC, int);
+extern int (*XSetIconName_dylibloader_wrapper_xlib)( Display*, Window,const char*);
+extern int (*XSetInputFocus_dylibloader_wrapper_xlib)( Display*, Window, int, Time);
+extern int (*XSetLineAttributes_dylibloader_wrapper_xlib)( Display*, GC, unsigned int, int, int, int);
+extern int (*XSetModifierMapping_dylibloader_wrapper_xlib)( Display*, XModifierKeymap*);
+extern int (*XSetPlaneMask_dylibloader_wrapper_xlib)( Display*, GC, unsigned long);
+extern int (*XSetPointerMapping_dylibloader_wrapper_xlib)( Display*,const unsigned char*, int);
+extern int (*XSetScreenSaver_dylibloader_wrapper_xlib)( Display*, int, int, int, int);
+extern int (*XSetSelectionOwner_dylibloader_wrapper_xlib)( Display*, Atom, Window, Time);
+extern int (*XSetState_dylibloader_wrapper_xlib)( Display*, GC, unsigned long, unsigned long, int, unsigned long);
+extern int (*XSetStipple_dylibloader_wrapper_xlib)( Display*, GC, Pixmap);
+extern int (*XSetSubwindowMode_dylibloader_wrapper_xlib)( Display*, GC, int);
+extern int (*XSetTSOrigin_dylibloader_wrapper_xlib)( Display*, GC, int, int);
+extern int (*XSetTile_dylibloader_wrapper_xlib)( Display*, GC, Pixmap);
+extern int (*XSetWindowBackground_dylibloader_wrapper_xlib)( Display*, Window, unsigned long);
+extern int (*XSetWindowBackgroundPixmap_dylibloader_wrapper_xlib)( Display*, Window, Pixmap);
+extern int (*XSetWindowBorder_dylibloader_wrapper_xlib)( Display*, Window, unsigned long);
+extern int (*XSetWindowBorderPixmap_dylibloader_wrapper_xlib)( Display*, Window, Pixmap);
+extern int (*XSetWindowBorderWidth_dylibloader_wrapper_xlib)( Display*, Window, unsigned int);
+extern int (*XSetWindowColormap_dylibloader_wrapper_xlib)( Display*, Window, Colormap);
+extern int (*XStoreBuffer_dylibloader_wrapper_xlib)( Display*,const char*, int, int);
+extern int (*XStoreBytes_dylibloader_wrapper_xlib)( Display*,const char*, int);
+extern int (*XStoreColor_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*);
+extern int (*XStoreColors_dylibloader_wrapper_xlib)( Display*, Colormap, XColor*, int);
+extern int (*XStoreName_dylibloader_wrapper_xlib)( Display*, Window,const char*);
+extern int (*XStoreNamedColor_dylibloader_wrapper_xlib)( Display*, Colormap,const char*, unsigned long, int);
+extern int (*XSync_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XTextExtents_dylibloader_wrapper_xlib)( XFontStruct*,const char*, int, int*, int*, int*, XCharStruct*);
+extern int (*XTextExtents16_dylibloader_wrapper_xlib)( XFontStruct*,const XChar2b*, int, int*, int*, int*, XCharStruct*);
+extern int (*XTextWidth_dylibloader_wrapper_xlib)( XFontStruct*,const char*, int);
+extern int (*XTextWidth16_dylibloader_wrapper_xlib)( XFontStruct*,const XChar2b*, int);
+extern int (*XTranslateCoordinates_dylibloader_wrapper_xlib)( Display*, Window, Window, int, int, int*, int*, Window*);
+extern int (*XUndefineCursor_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XUngrabButton_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, Window);
+extern int (*XUngrabKey_dylibloader_wrapper_xlib)( Display*, int, unsigned int, Window);
+extern int (*XUngrabKeyboard_dylibloader_wrapper_xlib)( Display*, Time);
+extern int (*XUngrabPointer_dylibloader_wrapper_xlib)( Display*, Time);
+extern int (*XUngrabServer_dylibloader_wrapper_xlib)( Display*);
+extern int (*XUninstallColormap_dylibloader_wrapper_xlib)( Display*, Colormap);
+extern int (*XUnloadFont_dylibloader_wrapper_xlib)( Display*, Font);
+extern int (*XUnmapSubwindows_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XUnmapWindow_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XVendorRelease_dylibloader_wrapper_xlib)( Display*);
+extern int (*XWarpPointer_dylibloader_wrapper_xlib)( Display*, Window, Window, int, int, unsigned int, unsigned int, int, int);
+extern int (*XWidthMMOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XWidthOfScreen_dylibloader_wrapper_xlib)( Screen*);
+extern int (*XWindowEvent_dylibloader_wrapper_xlib)( Display*, Window, long, XEvent*);
+extern int (*XWriteBitmapFile_dylibloader_wrapper_xlib)( Display*,const char*, Pixmap, unsigned int, unsigned int, int, int);
+extern int (*XSupportsLocale_dylibloader_wrapper_xlib)( void);
+extern char* (*XSetLocaleModifiers_dylibloader_wrapper_xlib)(const char*);
+extern XOM (*XOpenOM_dylibloader_wrapper_xlib)( Display*,struct _XrmHashBucketRec*,const char*,const char*);
+extern int (*XCloseOM_dylibloader_wrapper_xlib)( XOM);
+extern char* (*XSetOMValues_dylibloader_wrapper_xlib)( XOM,...);
+extern char* (*XGetOMValues_dylibloader_wrapper_xlib)( XOM,...);
+extern Display* (*XDisplayOfOM_dylibloader_wrapper_xlib)( XOM);
+extern char* (*XLocaleOfOM_dylibloader_wrapper_xlib)( XOM);
+extern XOC (*XCreateOC_dylibloader_wrapper_xlib)( XOM,...);
+extern void (*XDestroyOC_dylibloader_wrapper_xlib)( XOC);
+extern XOM (*XOMOfOC_dylibloader_wrapper_xlib)( XOC);
+extern char* (*XSetOCValues_dylibloader_wrapper_xlib)( XOC,...);
+extern char* (*XGetOCValues_dylibloader_wrapper_xlib)( XOC,...);
+extern XFontSet (*XCreateFontSet_dylibloader_wrapper_xlib)( Display*,const char*, char***, int*, char**);
+extern void (*XFreeFontSet_dylibloader_wrapper_xlib)( Display*, XFontSet);
+extern int (*XFontsOfFontSet_dylibloader_wrapper_xlib)( XFontSet, XFontStruct***, char***);
+extern char* (*XBaseFontNameListOfFontSet_dylibloader_wrapper_xlib)( XFontSet);
+extern char* (*XLocaleOfFontSet_dylibloader_wrapper_xlib)( XFontSet);
+extern int (*XContextDependentDrawing_dylibloader_wrapper_xlib)( XFontSet);
+extern int (*XDirectionalDependentDrawing_dylibloader_wrapper_xlib)( XFontSet);
+extern int (*XContextualDrawing_dylibloader_wrapper_xlib)( XFontSet);
+extern XFontSetExtents* (*XExtentsOfFontSet_dylibloader_wrapper_xlib)( XFontSet);
+extern int (*XmbTextEscapement_dylibloader_wrapper_xlib)( XFontSet,const char*, int);
+extern int (*XwcTextEscapement_dylibloader_wrapper_xlib)( XFontSet,const wchar_t*, int);
+extern int (*Xutf8TextEscapement_dylibloader_wrapper_xlib)( XFontSet,const char*, int);
+extern int (*XmbTextExtents_dylibloader_wrapper_xlib)( XFontSet,const char*, int, XRectangle*, XRectangle*);
+extern int (*XwcTextExtents_dylibloader_wrapper_xlib)( XFontSet,const wchar_t*, int, XRectangle*, XRectangle*);
+extern int (*Xutf8TextExtents_dylibloader_wrapper_xlib)( XFontSet,const char*, int, XRectangle*, XRectangle*);
+extern int (*XmbTextPerCharExtents_dylibloader_wrapper_xlib)( XFontSet,const char*, int, XRectangle*, XRectangle*, int, int*, XRectangle*, XRectangle*);
+extern int (*XwcTextPerCharExtents_dylibloader_wrapper_xlib)( XFontSet,const wchar_t*, int, XRectangle*, XRectangle*, int, int*, XRectangle*, XRectangle*);
+extern int (*Xutf8TextPerCharExtents_dylibloader_wrapper_xlib)( XFontSet,const char*, int, XRectangle*, XRectangle*, int, int*, XRectangle*, XRectangle*);
+extern void (*XmbDrawText_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XmbTextItem*, int);
+extern void (*XwcDrawText_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XwcTextItem*, int);
+extern void (*Xutf8DrawText_dylibloader_wrapper_xlib)( Display*, Drawable, GC, int, int, XmbTextItem*, int);
+extern void (*XmbDrawString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const char*, int);
+extern void (*XwcDrawString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const wchar_t*, int);
+extern void (*Xutf8DrawString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const char*, int);
+extern void (*XmbDrawImageString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const char*, int);
+extern void (*XwcDrawImageString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const wchar_t*, int);
+extern void (*Xutf8DrawImageString_dylibloader_wrapper_xlib)( Display*, Drawable, XFontSet, GC, int, int,const char*, int);
+extern XIM (*XOpenIM_dylibloader_wrapper_xlib)( Display*,struct _XrmHashBucketRec*, char*, char*);
+extern int (*XCloseIM_dylibloader_wrapper_xlib)( XIM);
+extern char* (*XGetIMValues_dylibloader_wrapper_xlib)( XIM,...);
+extern char* (*XSetIMValues_dylibloader_wrapper_xlib)( XIM,...);
+extern Display* (*XDisplayOfIM_dylibloader_wrapper_xlib)( XIM);
+extern char* (*XLocaleOfIM_dylibloader_wrapper_xlib)( XIM);
+extern XIC (*XCreateIC_dylibloader_wrapper_xlib)( XIM,...);
+extern void (*XDestroyIC_dylibloader_wrapper_xlib)( XIC);
+extern void (*XSetICFocus_dylibloader_wrapper_xlib)( XIC);
+extern void (*XUnsetICFocus_dylibloader_wrapper_xlib)( XIC);
+extern wchar_t* (*XwcResetIC_dylibloader_wrapper_xlib)( XIC);
+extern char* (*XmbResetIC_dylibloader_wrapper_xlib)( XIC);
+extern char* (*Xutf8ResetIC_dylibloader_wrapper_xlib)( XIC);
+extern char* (*XSetICValues_dylibloader_wrapper_xlib)( XIC,...);
+extern char* (*XGetICValues_dylibloader_wrapper_xlib)( XIC,...);
+extern XIM (*XIMOfIC_dylibloader_wrapper_xlib)( XIC);
+extern int (*XFilterEvent_dylibloader_wrapper_xlib)( XEvent*, Window);
+extern int (*XmbLookupString_dylibloader_wrapper_xlib)( XIC, XKeyPressedEvent*, char*, int, KeySym*, int*);
+extern int (*XwcLookupString_dylibloader_wrapper_xlib)( XIC, XKeyPressedEvent*, wchar_t*, int, KeySym*, int*);
+extern int (*Xutf8LookupString_dylibloader_wrapper_xlib)( XIC, XKeyPressedEvent*, char*, int, KeySym*, int*);
+extern XVaNestedList (*XVaCreateNestedList_dylibloader_wrapper_xlib)( int,...);
+extern int (*XRegisterIMInstantiateCallback_dylibloader_wrapper_xlib)( Display*,struct _XrmHashBucketRec*, char*, char*, XIDProc, XPointer);
+extern int (*XUnregisterIMInstantiateCallback_dylibloader_wrapper_xlib)( Display*,struct _XrmHashBucketRec*, char*, char*, XIDProc, XPointer);
+extern int (*XInternalConnectionNumbers_dylibloader_wrapper_xlib)( Display*, int**, int*);
+extern void (*XProcessInternalConnection_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XAddConnectionWatch_dylibloader_wrapper_xlib)( Display*, XConnectionWatchProc, XPointer);
+extern void (*XRemoveConnectionWatch_dylibloader_wrapper_xlib)( Display*, XConnectionWatchProc, XPointer);
+extern void (*XSetAuthorization_dylibloader_wrapper_xlib)( char*, int, char*, int);
+extern int (*_Xmbtowc_dylibloader_wrapper_xlib)( wchar_t*, char*, int);
+extern int (*_Xwctomb_dylibloader_wrapper_xlib)( char*, wchar_t);
+extern int (*XGetEventData_dylibloader_wrapper_xlib)( Display*, XGenericEventCookie*);
+extern void (*XFreeEventData_dylibloader_wrapper_xlib)( Display*, XGenericEventCookie*);
+extern XClassHint* (*XAllocClassHint_dylibloader_wrapper_xlib)( void);
+extern XIconSize* (*XAllocIconSize_dylibloader_wrapper_xlib)( void);
+extern XSizeHints* (*XAllocSizeHints_dylibloader_wrapper_xlib)( void);
+extern XStandardColormap* (*XAllocStandardColormap_dylibloader_wrapper_xlib)( void);
+extern XWMHints* (*XAllocWMHints_dylibloader_wrapper_xlib)( void);
+extern int (*XClipBox_dylibloader_wrapper_xlib)( Region, XRectangle*);
+extern Region (*XCreateRegion_dylibloader_wrapper_xlib)( void);
+extern const char* (*XDefaultString_dylibloader_wrapper_xlib)( void);
+extern int (*XDeleteContext_dylibloader_wrapper_xlib)( Display*, XID, XContext);
+extern int (*XDestroyRegion_dylibloader_wrapper_xlib)( Region);
+extern int (*XEmptyRegion_dylibloader_wrapper_xlib)( Region);
+extern int (*XEqualRegion_dylibloader_wrapper_xlib)( Region, Region);
+extern int (*XFindContext_dylibloader_wrapper_xlib)( Display*, XID, XContext, XPointer*);
+extern int (*XGetClassHint_dylibloader_wrapper_xlib)( Display*, Window, XClassHint*);
+extern int (*XGetIconSizes_dylibloader_wrapper_xlib)( Display*, Window, XIconSize**, int*);
+extern int (*XGetNormalHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+extern int (*XGetRGBColormaps_dylibloader_wrapper_xlib)( Display*, Window, XStandardColormap**, int*, Atom);
+extern int (*XGetSizeHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, Atom);
+extern int (*XGetStandardColormap_dylibloader_wrapper_xlib)( Display*, Window, XStandardColormap*, Atom);
+extern int (*XGetTextProperty_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*, Atom);
+extern XVisualInfo* (*XGetVisualInfo_dylibloader_wrapper_xlib)( Display*, long, XVisualInfo*, int*);
+extern int (*XGetWMClientMachine_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+extern XWMHints* (*XGetWMHints_dylibloader_wrapper_xlib)( Display*, Window);
+extern int (*XGetWMIconName_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+extern int (*XGetWMName_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+extern int (*XGetWMNormalHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, long*);
+extern int (*XGetWMSizeHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, long*, Atom);
+extern int (*XGetZoomHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+extern int (*XIntersectRegion_dylibloader_wrapper_xlib)( Region, Region, Region);
+extern void (*XConvertCase_dylibloader_wrapper_xlib)( KeySym, KeySym*, KeySym*);
+extern int (*XLookupString_dylibloader_wrapper_xlib)( XKeyEvent*, char*, int, KeySym*, XComposeStatus*);
+extern int (*XMatchVisualInfo_dylibloader_wrapper_xlib)( Display*, int, int, int, XVisualInfo*);
+extern int (*XOffsetRegion_dylibloader_wrapper_xlib)( Region, int, int);
+extern int (*XPointInRegion_dylibloader_wrapper_xlib)( Region, int, int);
+extern Region (*XPolygonRegion_dylibloader_wrapper_xlib)( XPoint*, int, int);
+extern int (*XRectInRegion_dylibloader_wrapper_xlib)( Region, int, int, unsigned int, unsigned int);
+extern int (*XSaveContext_dylibloader_wrapper_xlib)( Display*, XID, XContext,const char*);
+extern int (*XSetClassHint_dylibloader_wrapper_xlib)( Display*, Window, XClassHint*);
+extern int (*XSetIconSizes_dylibloader_wrapper_xlib)( Display*, Window, XIconSize*, int);
+extern int (*XSetNormalHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+extern void (*XSetRGBColormaps_dylibloader_wrapper_xlib)( Display*, Window, XStandardColormap*, int, Atom);
+extern int (*XSetSizeHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, Atom);
+extern int (*XSetStandardProperties_dylibloader_wrapper_xlib)( Display*, Window,const char*,const char*, Pixmap, char**, int, XSizeHints*);
+extern void (*XSetTextProperty_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*, Atom);
+extern void (*XSetWMClientMachine_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+extern int (*XSetWMHints_dylibloader_wrapper_xlib)( Display*, Window, XWMHints*);
+extern void (*XSetWMIconName_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+extern void (*XSetWMName_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*);
+extern void (*XSetWMNormalHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+extern void (*XSetWMProperties_dylibloader_wrapper_xlib)( Display*, Window, XTextProperty*, XTextProperty*, char**, int, XSizeHints*, XWMHints*, XClassHint*);
+extern void (*XmbSetWMProperties_dylibloader_wrapper_xlib)( Display*, Window,const char*,const char*, char**, int, XSizeHints*, XWMHints*, XClassHint*);
+extern void (*Xutf8SetWMProperties_dylibloader_wrapper_xlib)( Display*, Window,const char*,const char*, char**, int, XSizeHints*, XWMHints*, XClassHint*);
+extern void (*XSetWMSizeHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*, Atom);
+extern int (*XSetRegion_dylibloader_wrapper_xlib)( Display*, GC, Region);
+extern void (*XSetStandardColormap_dylibloader_wrapper_xlib)( Display*, Window, XStandardColormap*, Atom);
+extern int (*XSetZoomHints_dylibloader_wrapper_xlib)( Display*, Window, XSizeHints*);
+extern int (*XShrinkRegion_dylibloader_wrapper_xlib)( Region, int, int);
+extern int (*XStringListToTextProperty_dylibloader_wrapper_xlib)( char**, int, XTextProperty*);
+extern int (*XSubtractRegion_dylibloader_wrapper_xlib)( Region, Region, Region);
+extern int (*XmbTextListToTextProperty_dylibloader_wrapper_xlib)( Display*, char**, int, XICCEncodingStyle, XTextProperty*);
+extern int (*XwcTextListToTextProperty_dylibloader_wrapper_xlib)( Display*, wchar_t**, int, XICCEncodingStyle, XTextProperty*);
+extern int (*Xutf8TextListToTextProperty_dylibloader_wrapper_xlib)( Display*, char**, int, XICCEncodingStyle, XTextProperty*);
+extern void (*XwcFreeStringList_dylibloader_wrapper_xlib)( wchar_t**);
+extern int (*XTextPropertyToStringList_dylibloader_wrapper_xlib)( XTextProperty*, char***, int*);
+extern int (*XmbTextPropertyToTextList_dylibloader_wrapper_xlib)( Display*,const XTextProperty*, char***, int*);
+extern int (*XwcTextPropertyToTextList_dylibloader_wrapper_xlib)( Display*,const XTextProperty*, wchar_t***, int*);
+extern int (*Xutf8TextPropertyToTextList_dylibloader_wrapper_xlib)( Display*,const XTextProperty*, char***, int*);
+extern int (*XUnionRectWithRegion_dylibloader_wrapper_xlib)( XRectangle*, Region, Region);
+extern int (*XUnionRegion_dylibloader_wrapper_xlib)( Region, Region, Region);
+extern int (*XWMGeometry_dylibloader_wrapper_xlib)( Display*, int,const char*,const char*, unsigned int, XSizeHints*, int*, int*, int*, int*, int*);
+extern int (*XXorRegion_dylibloader_wrapper_xlib)( Region, Region, Region);
+extern int (*XkbIgnoreExtension_dylibloader_wrapper_xlib)( int);
+extern Display* (*XkbOpenDisplay_dylibloader_wrapper_xlib)( char*, int*, int*, int*, int*, int*);
+extern int (*XkbQueryExtension_dylibloader_wrapper_xlib)( Display*, int*, int*, int*, int*, int*);
+extern int (*XkbUseExtension_dylibloader_wrapper_xlib)( Display*, int*, int*);
+extern int (*XkbLibraryVersion_dylibloader_wrapper_xlib)( int*, int*);
+extern unsigned int (*XkbSetXlibControls_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+extern unsigned int (*XkbGetXlibControls_dylibloader_wrapper_xlib)( Display*);
+extern unsigned int (*XkbXlibControlsImplemented_dylibloader_wrapper_xlib)( void);
+extern void (*XkbSetAtomFuncs_dylibloader_wrapper_xlib)( XkbInternAtomFunc, XkbGetAtomNameFunc);
+extern KeySym (*XkbKeycodeToKeysym_dylibloader_wrapper_xlib)( Display*, KeyCode, int, int);
+extern unsigned int (*XkbKeysymToModifiers_dylibloader_wrapper_xlib)( Display*, KeySym);
+extern int (*XkbLookupKeySym_dylibloader_wrapper_xlib)( Display*, KeyCode, unsigned int, unsigned int*, KeySym*);
+extern int (*XkbLookupKeyBinding_dylibloader_wrapper_xlib)( Display*, KeySym, unsigned int, char*, int, int*);
+extern int (*XkbTranslateKeyCode_dylibloader_wrapper_xlib)( XkbDescPtr, KeyCode, unsigned int, unsigned int*, KeySym*);
+extern int (*XkbTranslateKeySym_dylibloader_wrapper_xlib)( Display*, KeySym*, unsigned int, char*, int, int*);
+extern int (*XkbSetAutoRepeatRate_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+extern int (*XkbGetAutoRepeatRate_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int*, unsigned int*);
+extern int (*XkbChangeEnabledControls_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+extern int (*XkbDeviceBell_dylibloader_wrapper_xlib)( Display*, Window, int, int, int, int, Atom);
+extern int (*XkbForceDeviceBell_dylibloader_wrapper_xlib)( Display*, int, int, int, int);
+extern int (*XkbDeviceBellEvent_dylibloader_wrapper_xlib)( Display*, Window, int, int, int, int, Atom);
+extern int (*XkbBell_dylibloader_wrapper_xlib)( Display*, Window, int, Atom);
+extern int (*XkbForceBell_dylibloader_wrapper_xlib)( Display*, int);
+extern int (*XkbBellEvent_dylibloader_wrapper_xlib)( Display*, Window, int, Atom);
+extern int (*XkbSelectEvents_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+extern int (*XkbSelectEventDetails_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned long, unsigned long);
+extern void (*XkbNoteMapChanges_dylibloader_wrapper_xlib)( XkbMapChangesPtr, XkbMapNotifyEvent*, unsigned int);
+extern void (*XkbNoteNameChanges_dylibloader_wrapper_xlib)( XkbNameChangesPtr, XkbNamesNotifyEvent*, unsigned int);
+extern int (*XkbGetIndicatorState_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int*);
+extern int (*XkbGetIndicatorMap_dylibloader_wrapper_xlib)( Display*, unsigned long, XkbDescPtr);
+extern int (*XkbSetIndicatorMap_dylibloader_wrapper_xlib)( Display*, unsigned long, XkbDescPtr);
+extern int (*XkbGetNamedIndicator_dylibloader_wrapper_xlib)( Display*, Atom, int*, int*, XkbIndicatorMapPtr, int*);
+extern int (*XkbGetNamedDeviceIndicator_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, Atom, int*, int*, XkbIndicatorMapPtr, int*);
+extern int (*XkbSetNamedIndicator_dylibloader_wrapper_xlib)( Display*, Atom, int, int, int, XkbIndicatorMapPtr);
+extern int (*XkbSetNamedDeviceIndicator_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, Atom, int, int, int, XkbIndicatorMapPtr);
+extern int (*XkbLockModifiers_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+extern int (*XkbLatchModifiers_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int);
+extern int (*XkbLockGroup_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+extern int (*XkbLatchGroup_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+extern int (*XkbSetServerInternalMods_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
+extern int (*XkbSetIgnoreLockMods_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
+extern int (*XkbVirtualModsToReal_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, unsigned int*);
+extern int (*XkbComputeEffectiveMap_dylibloader_wrapper_xlib)( XkbDescPtr, XkbKeyTypePtr, unsigned char*);
+extern int (*XkbInitCanonicalKeyTypes_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+extern XkbDescPtr (*XkbAllocKeyboard_dylibloader_wrapper_xlib)( void);
+extern void (*XkbFreeKeyboard_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+extern int (*XkbAllocClientMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, unsigned int);
+extern int (*XkbAllocServerMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, unsigned int);
+extern void (*XkbFreeClientMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+extern void (*XkbFreeServerMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+extern XkbKeyTypePtr (*XkbAddKeyType_dylibloader_wrapper_xlib)( XkbDescPtr, Atom, int, int, int);
+extern int (*XkbAllocIndicatorMaps_dylibloader_wrapper_xlib)( XkbDescPtr);
+extern void (*XkbFreeIndicatorMaps_dylibloader_wrapper_xlib)( XkbDescPtr);
+extern XkbDescPtr (*XkbGetMap_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+extern int (*XkbGetUpdatedMap_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+extern int (*XkbGetMapChanges_dylibloader_wrapper_xlib)( Display*, XkbDescPtr, XkbMapChangesPtr);
+extern int (*XkbRefreshKeyboardMapping_dylibloader_wrapper_xlib)( XkbMapNotifyEvent*);
+extern int (*XkbGetKeyTypes_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+extern int (*XkbGetKeySyms_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+extern int (*XkbGetKeyActions_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+extern int (*XkbGetKeyBehaviors_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+extern int (*XkbGetVirtualMods_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+extern int (*XkbGetKeyExplicitComponents_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+extern int (*XkbGetKeyModifierMap_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+extern int (*XkbGetKeyVirtualModMap_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, XkbDescPtr);
+extern int (*XkbAllocControls_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int);
+extern void (*XkbFreeControls_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+extern int (*XkbGetControls_dylibloader_wrapper_xlib)( Display*, unsigned long, XkbDescPtr);
+extern int (*XkbSetControls_dylibloader_wrapper_xlib)( Display*, unsigned long, XkbDescPtr);
+extern void (*XkbNoteControlsChanges_dylibloader_wrapper_xlib)( XkbControlsChangesPtr, XkbControlsNotifyEvent*, unsigned int);
+extern int (*XkbAllocCompatMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, unsigned int);
+extern void (*XkbFreeCompatMap_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+extern int (*XkbGetCompatMap_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+extern int (*XkbSetCompatMap_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr, int);
+extern int (*XkbAllocNames_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int, int);
+extern int (*XkbGetNames_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+extern int (*XkbSetNames_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, XkbDescPtr);
+extern int (*XkbChangeNames_dylibloader_wrapper_xlib)( Display*, XkbDescPtr, XkbNameChangesPtr);
+extern void (*XkbFreeNames_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, int);
+extern int (*XkbGetState_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbStatePtr);
+extern int (*XkbSetMap_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDescPtr);
+extern int (*XkbChangeMap_dylibloader_wrapper_xlib)( Display*, XkbDescPtr, XkbMapChangesPtr);
+extern int (*XkbSetDetectableAutoRepeat_dylibloader_wrapper_xlib)( Display*, int, int*);
+extern int (*XkbGetDetectableAutoRepeat_dylibloader_wrapper_xlib)( Display*, int*);
+extern int (*XkbSetAutoResetControls_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int*, unsigned int*);
+extern int (*XkbGetAutoResetControls_dylibloader_wrapper_xlib)( Display*, unsigned int*, unsigned int*);
+extern int (*XkbSetPerClientControls_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int*);
+extern int (*XkbGetPerClientControls_dylibloader_wrapper_xlib)( Display*, unsigned int*);
+extern int (*XkbCopyKeyType_dylibloader_wrapper_xlib)( XkbKeyTypePtr, XkbKeyTypePtr);
+extern int (*XkbCopyKeyTypes_dylibloader_wrapper_xlib)( XkbKeyTypePtr, XkbKeyTypePtr, int);
+extern int (*XkbResizeKeyType_dylibloader_wrapper_xlib)( XkbDescPtr, int, int, int, int);
+extern KeySym* (*XkbResizeKeySyms_dylibloader_wrapper_xlib)( XkbDescPtr, int, int);
+extern XkbAction* (*XkbResizeKeyActions_dylibloader_wrapper_xlib)( XkbDescPtr, int, int);
+extern int (*XkbChangeTypesOfKey_dylibloader_wrapper_xlib)( XkbDescPtr, int, int, unsigned int, int*, XkbMapChangesPtr);
+extern int (*XkbChangeKeycodeRange_dylibloader_wrapper_xlib)( XkbDescPtr, int, int, XkbChangesPtr);
+extern XkbComponentListPtr (*XkbListComponents_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbComponentNamesPtr, int*);
+extern void (*XkbFreeComponentList_dylibloader_wrapper_xlib)( XkbComponentListPtr);
+extern XkbDescPtr (*XkbGetKeyboard_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int);
+extern XkbDescPtr (*XkbGetKeyboardByName_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbComponentNamesPtr, unsigned int, unsigned int, int);
+extern int (*XkbKeyTypesForCoreSymbols_dylibloader_wrapper_xlib)( XkbDescPtr, int, KeySym*, unsigned int, int*, KeySym*);
+extern int (*XkbApplyCompatMapToKey_dylibloader_wrapper_xlib)( XkbDescPtr, KeyCode, XkbChangesPtr);
+extern int (*XkbUpdateMapFromCore_dylibloader_wrapper_xlib)( XkbDescPtr, KeyCode, int, int, KeySym*, XkbChangesPtr);
+extern XkbDeviceLedInfoPtr (*XkbAddDeviceLedInfo_dylibloader_wrapper_xlib)( XkbDeviceInfoPtr, unsigned int, unsigned int);
+extern int (*XkbResizeDeviceButtonActions_dylibloader_wrapper_xlib)( XkbDeviceInfoPtr, unsigned int);
+extern XkbDeviceInfoPtr (*XkbAllocDeviceInfo_dylibloader_wrapper_xlib)( unsigned int, unsigned int, unsigned int);
+extern void (*XkbFreeDeviceInfo_dylibloader_wrapper_xlib)( XkbDeviceInfoPtr, unsigned int, int);
+extern void (*XkbNoteDeviceChanges_dylibloader_wrapper_xlib)( XkbDeviceChangesPtr, XkbExtensionDeviceNotifyEvent*, unsigned int);
+extern XkbDeviceInfoPtr (*XkbGetDeviceInfo_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, unsigned int, unsigned int);
+extern int (*XkbGetDeviceInfoChanges_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, XkbDeviceChangesPtr);
+extern int (*XkbGetDeviceButtonActions_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, int, unsigned int, unsigned int);
+extern int (*XkbGetDeviceLedInfo_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, unsigned int, unsigned int, unsigned int);
+extern int (*XkbSetDeviceInfo_dylibloader_wrapper_xlib)( Display*, unsigned int, XkbDeviceInfoPtr);
+extern int (*XkbChangeDeviceInfo_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, XkbDeviceChangesPtr);
+extern int (*XkbSetDeviceLedInfo_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, unsigned int, unsigned int, unsigned int);
+extern int (*XkbSetDeviceButtonActions_dylibloader_wrapper_xlib)( Display*, XkbDeviceInfoPtr, unsigned int, unsigned int);
+extern char (*XkbToControl_dylibloader_wrapper_xlib)( char);
+extern int (*XkbSetDebuggingFlags_dylibloader_wrapper_xlib)( Display*, unsigned int, unsigned int, char*, unsigned int, unsigned int, unsigned int*, unsigned int*);
+extern int (*XkbApplyVirtualModChanges_dylibloader_wrapper_xlib)( XkbDescPtr, unsigned int, XkbChangesPtr);
+extern int (*XkbUpdateActionVirtualMods_dylibloader_wrapper_xlib)( XkbDescPtr, XkbAction*, unsigned int);
+extern void (*XkbUpdateKeyTypeVirtualMods_dylibloader_wrapper_xlib)( XkbDescPtr, XkbKeyTypePtr, unsigned int, XkbChangesPtr);
+int initialize_xlib(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c
new file mode 100644
index 0000000000..f37f3a9db0
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c
@@ -0,0 +1,797 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:55:12
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xrandr.h --sys-include <X11/extensions/Xrandr.h> --soname libXrandr.so.2 --init-name xrandr --output-header xrandr-so_wrap.h --output-implementation xrandr-so_wrap.c
+//
+// NOTE: Generated from Xrandr 1.5.2.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11 and libXrender, but absent in libXrandr.so.2, were removed.
+#include <stdint.h>
+
+#define XRRQueryExtension XRRQueryExtension_dylibloader_orig_xrandr
+#define XRRQueryVersion XRRQueryVersion_dylibloader_orig_xrandr
+#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_orig_xrandr
+#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_orig_xrandr
+#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_orig_xrandr
+#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_orig_xrandr
+#define XRRConfigRotations XRRConfigRotations_dylibloader_orig_xrandr
+#define XRRConfigTimes XRRConfigTimes_dylibloader_orig_xrandr
+#define XRRConfigSizes XRRConfigSizes_dylibloader_orig_xrandr
+#define XRRConfigRates XRRConfigRates_dylibloader_orig_xrandr
+#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_orig_xrandr
+#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_orig_xrandr
+#define XRRRootToScreen XRRRootToScreen_dylibloader_orig_xrandr
+#define XRRSelectInput XRRSelectInput_dylibloader_orig_xrandr
+#define XRRRotations XRRRotations_dylibloader_orig_xrandr
+#define XRRSizes XRRSizes_dylibloader_orig_xrandr
+#define XRRRates XRRRates_dylibloader_orig_xrandr
+#define XRRTimes XRRTimes_dylibloader_orig_xrandr
+#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_orig_xrandr
+#define XRRSetScreenSize XRRSetScreenSize_dylibloader_orig_xrandr
+#define XRRGetScreenResources XRRGetScreenResources_dylibloader_orig_xrandr
+#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_orig_xrandr
+#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_orig_xrandr
+#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_orig_xrandr
+#define XRRListOutputProperties XRRListOutputProperties_dylibloader_orig_xrandr
+#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_orig_xrandr
+#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_orig_xrandr
+#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_orig_xrandr
+#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_orig_xrandr
+#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_orig_xrandr
+#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_orig_xrandr
+#define XRRCreateMode XRRCreateMode_dylibloader_orig_xrandr
+#define XRRDestroyMode XRRDestroyMode_dylibloader_orig_xrandr
+#define XRRAddOutputMode XRRAddOutputMode_dylibloader_orig_xrandr
+#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_orig_xrandr
+#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_orig_xrandr
+#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_orig_xrandr
+#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_orig_xrandr
+#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_orig_xrandr
+#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_orig_xrandr
+#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_orig_xrandr
+#define XRRAllocGamma XRRAllocGamma_dylibloader_orig_xrandr
+#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_orig_xrandr
+#define XRRFreeGamma XRRFreeGamma_dylibloader_orig_xrandr
+#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_orig_xrandr
+#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_orig_xrandr
+#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_orig_xrandr
+#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_orig_xrandr
+#define XRRGetPanning XRRGetPanning_dylibloader_orig_xrandr
+#define XRRFreePanning XRRFreePanning_dylibloader_orig_xrandr
+#define XRRSetPanning XRRSetPanning_dylibloader_orig_xrandr
+#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_orig_xrandr
+#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_orig_xrandr
+#define XRRGetProviderResources XRRGetProviderResources_dylibloader_orig_xrandr
+#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_orig_xrandr
+#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_orig_xrandr
+#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_orig_xrandr
+#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_orig_xrandr
+#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_orig_xrandr
+#define XRRListProviderProperties XRRListProviderProperties_dylibloader_orig_xrandr
+#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_orig_xrandr
+#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_orig_xrandr
+#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_orig_xrandr
+#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_orig_xrandr
+#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_orig_xrandr
+#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_orig_xrandr
+#define XRRGetMonitors XRRGetMonitors_dylibloader_orig_xrandr
+#define XRRSetMonitor XRRSetMonitor_dylibloader_orig_xrandr
+#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_orig_xrandr
+#define XRRFreeMonitors XRRFreeMonitors_dylibloader_orig_xrandr
+#include <X11/extensions/Xrandr.h>
+#undef XRRQueryExtension
+#undef XRRQueryVersion
+#undef XRRGetScreenInfo
+#undef XRRFreeScreenConfigInfo
+#undef XRRSetScreenConfig
+#undef XRRSetScreenConfigAndRate
+#undef XRRConfigRotations
+#undef XRRConfigTimes
+#undef XRRConfigSizes
+#undef XRRConfigRates
+#undef XRRConfigCurrentConfiguration
+#undef XRRConfigCurrentRate
+#undef XRRRootToScreen
+#undef XRRSelectInput
+#undef XRRRotations
+#undef XRRSizes
+#undef XRRRates
+#undef XRRTimes
+#undef XRRGetScreenSizeRange
+#undef XRRSetScreenSize
+#undef XRRGetScreenResources
+#undef XRRFreeScreenResources
+#undef XRRGetOutputInfo
+#undef XRRFreeOutputInfo
+#undef XRRListOutputProperties
+#undef XRRQueryOutputProperty
+#undef XRRConfigureOutputProperty
+#undef XRRChangeOutputProperty
+#undef XRRDeleteOutputProperty
+#undef XRRGetOutputProperty
+#undef XRRAllocModeInfo
+#undef XRRCreateMode
+#undef XRRDestroyMode
+#undef XRRAddOutputMode
+#undef XRRDeleteOutputMode
+#undef XRRFreeModeInfo
+#undef XRRGetCrtcInfo
+#undef XRRFreeCrtcInfo
+#undef XRRSetCrtcConfig
+#undef XRRGetCrtcGammaSize
+#undef XRRGetCrtcGamma
+#undef XRRAllocGamma
+#undef XRRSetCrtcGamma
+#undef XRRFreeGamma
+#undef XRRGetScreenResourcesCurrent
+#undef XRRSetCrtcTransform
+#undef XRRGetCrtcTransform
+#undef XRRUpdateConfiguration
+#undef XRRGetPanning
+#undef XRRFreePanning
+#undef XRRSetPanning
+#undef XRRSetOutputPrimary
+#undef XRRGetOutputPrimary
+#undef XRRGetProviderResources
+#undef XRRFreeProviderResources
+#undef XRRGetProviderInfo
+#undef XRRFreeProviderInfo
+#undef XRRSetProviderOutputSource
+#undef XRRSetProviderOffloadSink
+#undef XRRListProviderProperties
+#undef XRRQueryProviderProperty
+#undef XRRConfigureProviderProperty
+#undef XRRChangeProviderProperty
+#undef XRRDeleteProviderProperty
+#undef XRRGetProviderProperty
+#undef XRRAllocateMonitor
+#undef XRRGetMonitors
+#undef XRRSetMonitor
+#undef XRRDeleteMonitor
+#undef XRRFreeMonitors
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XRRQueryExtension_dylibloader_wrapper_xrandr)( Display*, int*, int*);
+int (*XRRQueryVersion_dylibloader_wrapper_xrandr)( Display*, int*, int*);
+XRRScreenConfiguration* (*XRRGetScreenInfo_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
+int (*XRRSetScreenConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, Time);
+int (*XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, short, Time);
+Rotation (*XRRConfigRotations_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
+Time (*XRRConfigTimes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Time*);
+XRRScreenSize* (*XRRConfigSizes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int*);
+short* (*XRRConfigRates_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int, int*);
+SizeID (*XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
+short (*XRRConfigCurrentRate_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
+int (*XRRRootToScreen_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRSelectInput_dylibloader_wrapper_xrandr)( Display*, Window, int);
+Rotation (*XRRRotations_dylibloader_wrapper_xrandr)( Display*, int, Rotation*);
+XRRScreenSize* (*XRRSizes_dylibloader_wrapper_xrandr)( Display*, int, int*);
+short* (*XRRRates_dylibloader_wrapper_xrandr)( Display*, int, int, int*);
+Time (*XRRTimes_dylibloader_wrapper_xrandr)( Display*, int, Time*);
+int (*XRRGetScreenSizeRange_dylibloader_wrapper_xrandr)( Display*, Window, int*, int*, int*, int*);
+void (*XRRSetScreenSize_dylibloader_wrapper_xrandr)( Display*, Window, int, int, int, int);
+XRRScreenResources* (*XRRGetScreenResources_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRFreeScreenResources_dylibloader_wrapper_xrandr)( XRRScreenResources*);
+XRROutputInfo* (*XRRGetOutputInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RROutput);
+void (*XRRFreeOutputInfo_dylibloader_wrapper_xrandr)( XRROutputInfo*);
+Atom* (*XRRListOutputProperties_dylibloader_wrapper_xrandr)( Display*, RROutput, int*);
+XRRPropertyInfo* (*XRRQueryOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
+void (*XRRConfigureOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, int, int, int, long*);
+void (*XRRChangeOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, Atom, int, int,const unsigned char*, int);
+void (*XRRDeleteOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
+int (*XRRGetOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+XRRModeInfo* (*XRRAllocModeInfo_dylibloader_wrapper_xrandr)(const char*, int);
+RRMode (*XRRCreateMode_dylibloader_wrapper_xrandr)( Display*, Window, XRRModeInfo*);
+void (*XRRDestroyMode_dylibloader_wrapper_xrandr)( Display*, RRMode);
+void (*XRRAddOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
+void (*XRRDeleteOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
+void (*XRRFreeModeInfo_dylibloader_wrapper_xrandr)( XRRModeInfo*);
+XRRCrtcInfo* (*XRRGetCrtcInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
+void (*XRRFreeCrtcInfo_dylibloader_wrapper_xrandr)( XRRCrtcInfo*);
+int (*XRRSetCrtcConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, Time, int, int, RRMode, Rotation, RROutput*, int);
+int (*XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
+XRRCrtcGamma* (*XRRGetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
+XRRCrtcGamma* (*XRRAllocGamma_dylibloader_wrapper_xrandr)( int);
+void (*XRRSetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcGamma*);
+void (*XRRFreeGamma_dylibloader_wrapper_xrandr)( XRRCrtcGamma*);
+XRRScreenResources* (*XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRSetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XTransform*,const char*, XFixed*, int);
+int (*XRRGetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcTransformAttributes**);
+int (*XRRUpdateConfiguration_dylibloader_wrapper_xrandr)( XEvent*);
+XRRPanning* (*XRRGetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
+void (*XRRFreePanning_dylibloader_wrapper_xrandr)( XRRPanning*);
+int (*XRRSetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, XRRPanning*);
+void (*XRRSetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window, RROutput);
+RROutput (*XRRGetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window);
+XRRProviderResources* (*XRRGetProviderResources_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRFreeProviderResources_dylibloader_wrapper_xrandr)( XRRProviderResources*);
+XRRProviderInfo* (*XRRGetProviderInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRProvider);
+void (*XRRFreeProviderInfo_dylibloader_wrapper_xrandr)( XRRProviderInfo*);
+int (*XRRSetProviderOutputSource_dylibloader_wrapper_xrandr)( Display*, XID, XID);
+int (*XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr)( Display*, XID, XID);
+Atom* (*XRRListProviderProperties_dylibloader_wrapper_xrandr)( Display*, RRProvider, int*);
+XRRPropertyInfo* (*XRRQueryProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
+void (*XRRConfigureProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, int, int, int, long*);
+void (*XRRChangeProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, Atom, int, int,const unsigned char*, int);
+void (*XRRDeleteProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
+int (*XRRGetProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+XRRMonitorInfo* (*XRRAllocateMonitor_dylibloader_wrapper_xrandr)( Display*, int);
+XRRMonitorInfo* (*XRRGetMonitors_dylibloader_wrapper_xrandr)( Display*, Window, int, int*);
+void (*XRRSetMonitor_dylibloader_wrapper_xrandr)( Display*, Window, XRRMonitorInfo*);
+void (*XRRDeleteMonitor_dylibloader_wrapper_xrandr)( Display*, Window, Atom);
+void (*XRRFreeMonitors_dylibloader_wrapper_xrandr)( XRRMonitorInfo*);
+int initialize_xrandr(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXrandr.so.2", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XRRQueryExtension
+ *(void **) (&XRRQueryExtension_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRQueryVersion
+ *(void **) (&XRRQueryVersion_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetScreenInfo
+ *(void **) (&XRRGetScreenInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeScreenConfigInfo
+ *(void **) (&XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeScreenConfigInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetScreenConfig
+ *(void **) (&XRRSetScreenConfig_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenConfig");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetScreenConfigAndRate
+ *(void **) (&XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenConfigAndRate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigRotations
+ *(void **) (&XRRConfigRotations_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigRotations");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigTimes
+ *(void **) (&XRRConfigTimes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigTimes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigSizes
+ *(void **) (&XRRConfigSizes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigSizes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigRates
+ *(void **) (&XRRConfigRates_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigRates");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigCurrentConfiguration
+ *(void **) (&XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigCurrentConfiguration");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigCurrentRate
+ *(void **) (&XRRConfigCurrentRate_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigCurrentRate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRRootToScreen
+ *(void **) (&XRRRootToScreen_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRootToScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSelectInput
+ *(void **) (&XRRSelectInput_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSelectInput");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRRotations
+ *(void **) (&XRRRotations_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRotations");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSizes
+ *(void **) (&XRRSizes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSizes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRRates
+ *(void **) (&XRRRates_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRates");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRTimes
+ *(void **) (&XRRTimes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRTimes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetScreenSizeRange
+ *(void **) (&XRRGetScreenSizeRange_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenSizeRange");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetScreenSize
+ *(void **) (&XRRSetScreenSize_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetScreenResources
+ *(void **) (&XRRGetScreenResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenResources");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeScreenResources
+ *(void **) (&XRRFreeScreenResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeScreenResources");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetOutputInfo
+ *(void **) (&XRRGetOutputInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeOutputInfo
+ *(void **) (&XRRFreeOutputInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeOutputInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRListOutputProperties
+ *(void **) (&XRRListOutputProperties_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRListOutputProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRQueryOutputProperty
+ *(void **) (&XRRQueryOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigureOutputProperty
+ *(void **) (&XRRConfigureOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigureOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRChangeOutputProperty
+ *(void **) (&XRRChangeOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRChangeOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDeleteOutputProperty
+ *(void **) (&XRRDeleteOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetOutputProperty
+ *(void **) (&XRRGetOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRAllocModeInfo
+ *(void **) (&XRRAllocModeInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocModeInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRCreateMode
+ *(void **) (&XRRCreateMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRCreateMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDestroyMode
+ *(void **) (&XRRDestroyMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDestroyMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRAddOutputMode
+ *(void **) (&XRRAddOutputMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAddOutputMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDeleteOutputMode
+ *(void **) (&XRRDeleteOutputMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteOutputMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeModeInfo
+ *(void **) (&XRRFreeModeInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeModeInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetCrtcInfo
+ *(void **) (&XRRGetCrtcInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeCrtcInfo
+ *(void **) (&XRRFreeCrtcInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeCrtcInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetCrtcConfig
+ *(void **) (&XRRSetCrtcConfig_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcConfig");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetCrtcGammaSize
+ *(void **) (&XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcGammaSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetCrtcGamma
+ *(void **) (&XRRGetCrtcGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcGamma");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRAllocGamma
+ *(void **) (&XRRAllocGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocGamma");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetCrtcGamma
+ *(void **) (&XRRSetCrtcGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcGamma");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeGamma
+ *(void **) (&XRRFreeGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeGamma");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetScreenResourcesCurrent
+ *(void **) (&XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenResourcesCurrent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetCrtcTransform
+ *(void **) (&XRRSetCrtcTransform_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcTransform");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetCrtcTransform
+ *(void **) (&XRRGetCrtcTransform_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcTransform");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRUpdateConfiguration
+ *(void **) (&XRRUpdateConfiguration_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRUpdateConfiguration");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetPanning
+ *(void **) (&XRRGetPanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetPanning");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreePanning
+ *(void **) (&XRRFreePanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreePanning");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetPanning
+ *(void **) (&XRRSetPanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetPanning");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetOutputPrimary
+ *(void **) (&XRRSetOutputPrimary_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetOutputPrimary");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetOutputPrimary
+ *(void **) (&XRRGetOutputPrimary_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputPrimary");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetProviderResources
+ *(void **) (&XRRGetProviderResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderResources");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeProviderResources
+ *(void **) (&XRRFreeProviderResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeProviderResources");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetProviderInfo
+ *(void **) (&XRRGetProviderInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeProviderInfo
+ *(void **) (&XRRFreeProviderInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeProviderInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetProviderOutputSource
+ *(void **) (&XRRSetProviderOutputSource_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetProviderOutputSource");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetProviderOffloadSink
+ *(void **) (&XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetProviderOffloadSink");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRListProviderProperties
+ *(void **) (&XRRListProviderProperties_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRListProviderProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRQueryProviderProperty
+ *(void **) (&XRRQueryProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigureProviderProperty
+ *(void **) (&XRRConfigureProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigureProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRChangeProviderProperty
+ *(void **) (&XRRChangeProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRChangeProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDeleteProviderProperty
+ *(void **) (&XRRDeleteProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetProviderProperty
+ *(void **) (&XRRGetProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRAllocateMonitor
+ *(void **) (&XRRAllocateMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocateMonitor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetMonitors
+ *(void **) (&XRRGetMonitors_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetMonitors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetMonitor
+ *(void **) (&XRRSetMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetMonitor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDeleteMonitor
+ *(void **) (&XRRDeleteMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteMonitor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeMonitors
+ *(void **) (&XRRFreeMonitors_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeMonitors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h
new file mode 100644
index 0000000000..046d4c7de3
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h
@@ -0,0 +1,302 @@
+#ifndef DYLIBLOAD_WRAPPER_XRANDR
+#define DYLIBLOAD_WRAPPER_XRANDR
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:55:12
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xrandr.h --sys-include <X11/extensions/Xrandr.h> --soname libXrandr.so.2 --init-name xrandr --output-header xrandr-so_wrap.h --output-implementation xrandr-so_wrap.c
+//
+// NOTE: Generated from Xrandr 1.5.2.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11 and libXrender, but absent in libXrandr.so.2, were removed.
+#include <stdint.h>
+
+#define XRRQueryExtension XRRQueryExtension_dylibloader_orig_xrandr
+#define XRRQueryVersion XRRQueryVersion_dylibloader_orig_xrandr
+#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_orig_xrandr
+#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_orig_xrandr
+#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_orig_xrandr
+#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_orig_xrandr
+#define XRRConfigRotations XRRConfigRotations_dylibloader_orig_xrandr
+#define XRRConfigTimes XRRConfigTimes_dylibloader_orig_xrandr
+#define XRRConfigSizes XRRConfigSizes_dylibloader_orig_xrandr
+#define XRRConfigRates XRRConfigRates_dylibloader_orig_xrandr
+#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_orig_xrandr
+#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_orig_xrandr
+#define XRRRootToScreen XRRRootToScreen_dylibloader_orig_xrandr
+#define XRRSelectInput XRRSelectInput_dylibloader_orig_xrandr
+#define XRRRotations XRRRotations_dylibloader_orig_xrandr
+#define XRRSizes XRRSizes_dylibloader_orig_xrandr
+#define XRRRates XRRRates_dylibloader_orig_xrandr
+#define XRRTimes XRRTimes_dylibloader_orig_xrandr
+#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_orig_xrandr
+#define XRRSetScreenSize XRRSetScreenSize_dylibloader_orig_xrandr
+#define XRRGetScreenResources XRRGetScreenResources_dylibloader_orig_xrandr
+#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_orig_xrandr
+#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_orig_xrandr
+#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_orig_xrandr
+#define XRRListOutputProperties XRRListOutputProperties_dylibloader_orig_xrandr
+#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_orig_xrandr
+#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_orig_xrandr
+#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_orig_xrandr
+#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_orig_xrandr
+#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_orig_xrandr
+#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_orig_xrandr
+#define XRRCreateMode XRRCreateMode_dylibloader_orig_xrandr
+#define XRRDestroyMode XRRDestroyMode_dylibloader_orig_xrandr
+#define XRRAddOutputMode XRRAddOutputMode_dylibloader_orig_xrandr
+#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_orig_xrandr
+#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_orig_xrandr
+#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_orig_xrandr
+#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_orig_xrandr
+#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_orig_xrandr
+#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_orig_xrandr
+#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_orig_xrandr
+#define XRRAllocGamma XRRAllocGamma_dylibloader_orig_xrandr
+#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_orig_xrandr
+#define XRRFreeGamma XRRFreeGamma_dylibloader_orig_xrandr
+#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_orig_xrandr
+#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_orig_xrandr
+#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_orig_xrandr
+#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_orig_xrandr
+#define XRRGetPanning XRRGetPanning_dylibloader_orig_xrandr
+#define XRRFreePanning XRRFreePanning_dylibloader_orig_xrandr
+#define XRRSetPanning XRRSetPanning_dylibloader_orig_xrandr
+#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_orig_xrandr
+#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_orig_xrandr
+#define XRRGetProviderResources XRRGetProviderResources_dylibloader_orig_xrandr
+#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_orig_xrandr
+#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_orig_xrandr
+#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_orig_xrandr
+#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_orig_xrandr
+#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_orig_xrandr
+#define XRRListProviderProperties XRRListProviderProperties_dylibloader_orig_xrandr
+#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_orig_xrandr
+#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_orig_xrandr
+#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_orig_xrandr
+#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_orig_xrandr
+#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_orig_xrandr
+#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_orig_xrandr
+#define XRRGetMonitors XRRGetMonitors_dylibloader_orig_xrandr
+#define XRRSetMonitor XRRSetMonitor_dylibloader_orig_xrandr
+#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_orig_xrandr
+#define XRRFreeMonitors XRRFreeMonitors_dylibloader_orig_xrandr
+#include <X11/extensions/Xrandr.h>
+#undef XRRQueryExtension
+#undef XRRQueryVersion
+#undef XRRGetScreenInfo
+#undef XRRFreeScreenConfigInfo
+#undef XRRSetScreenConfig
+#undef XRRSetScreenConfigAndRate
+#undef XRRConfigRotations
+#undef XRRConfigTimes
+#undef XRRConfigSizes
+#undef XRRConfigRates
+#undef XRRConfigCurrentConfiguration
+#undef XRRConfigCurrentRate
+#undef XRRRootToScreen
+#undef XRRSelectInput
+#undef XRRRotations
+#undef XRRSizes
+#undef XRRRates
+#undef XRRTimes
+#undef XRRGetScreenSizeRange
+#undef XRRSetScreenSize
+#undef XRRGetScreenResources
+#undef XRRFreeScreenResources
+#undef XRRGetOutputInfo
+#undef XRRFreeOutputInfo
+#undef XRRListOutputProperties
+#undef XRRQueryOutputProperty
+#undef XRRConfigureOutputProperty
+#undef XRRChangeOutputProperty
+#undef XRRDeleteOutputProperty
+#undef XRRGetOutputProperty
+#undef XRRAllocModeInfo
+#undef XRRCreateMode
+#undef XRRDestroyMode
+#undef XRRAddOutputMode
+#undef XRRDeleteOutputMode
+#undef XRRFreeModeInfo
+#undef XRRGetCrtcInfo
+#undef XRRFreeCrtcInfo
+#undef XRRSetCrtcConfig
+#undef XRRGetCrtcGammaSize
+#undef XRRGetCrtcGamma
+#undef XRRAllocGamma
+#undef XRRSetCrtcGamma
+#undef XRRFreeGamma
+#undef XRRGetScreenResourcesCurrent
+#undef XRRSetCrtcTransform
+#undef XRRGetCrtcTransform
+#undef XRRUpdateConfiguration
+#undef XRRGetPanning
+#undef XRRFreePanning
+#undef XRRSetPanning
+#undef XRRSetOutputPrimary
+#undef XRRGetOutputPrimary
+#undef XRRGetProviderResources
+#undef XRRFreeProviderResources
+#undef XRRGetProviderInfo
+#undef XRRFreeProviderInfo
+#undef XRRSetProviderOutputSource
+#undef XRRSetProviderOffloadSink
+#undef XRRListProviderProperties
+#undef XRRQueryProviderProperty
+#undef XRRConfigureProviderProperty
+#undef XRRChangeProviderProperty
+#undef XRRDeleteProviderProperty
+#undef XRRGetProviderProperty
+#undef XRRAllocateMonitor
+#undef XRRGetMonitors
+#undef XRRSetMonitor
+#undef XRRDeleteMonitor
+#undef XRRFreeMonitors
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XRRQueryExtension XRRQueryExtension_dylibloader_wrapper_xrandr
+#define XRRQueryVersion XRRQueryVersion_dylibloader_wrapper_xrandr
+#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_wrapper_xrandr
+#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr
+#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_wrapper_xrandr
+#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr
+#define XRRConfigRotations XRRConfigRotations_dylibloader_wrapper_xrandr
+#define XRRConfigTimes XRRConfigTimes_dylibloader_wrapper_xrandr
+#define XRRConfigSizes XRRConfigSizes_dylibloader_wrapper_xrandr
+#define XRRConfigRates XRRConfigRates_dylibloader_wrapper_xrandr
+#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr
+#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_wrapper_xrandr
+#define XRRRootToScreen XRRRootToScreen_dylibloader_wrapper_xrandr
+#define XRRSelectInput XRRSelectInput_dylibloader_wrapper_xrandr
+#define XRRRotations XRRRotations_dylibloader_wrapper_xrandr
+#define XRRSizes XRRSizes_dylibloader_wrapper_xrandr
+#define XRRRates XRRRates_dylibloader_wrapper_xrandr
+#define XRRTimes XRRTimes_dylibloader_wrapper_xrandr
+#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_wrapper_xrandr
+#define XRRSetScreenSize XRRSetScreenSize_dylibloader_wrapper_xrandr
+#define XRRGetScreenResources XRRGetScreenResources_dylibloader_wrapper_xrandr
+#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_wrapper_xrandr
+#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_wrapper_xrandr
+#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_wrapper_xrandr
+#define XRRListOutputProperties XRRListOutputProperties_dylibloader_wrapper_xrandr
+#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_wrapper_xrandr
+#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_wrapper_xrandr
+#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_wrapper_xrandr
+#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_wrapper_xrandr
+#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_wrapper_xrandr
+#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_wrapper_xrandr
+#define XRRCreateMode XRRCreateMode_dylibloader_wrapper_xrandr
+#define XRRDestroyMode XRRDestroyMode_dylibloader_wrapper_xrandr
+#define XRRAddOutputMode XRRAddOutputMode_dylibloader_wrapper_xrandr
+#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_wrapper_xrandr
+#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_wrapper_xrandr
+#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_wrapper_xrandr
+#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_wrapper_xrandr
+#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_wrapper_xrandr
+#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr
+#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_wrapper_xrandr
+#define XRRAllocGamma XRRAllocGamma_dylibloader_wrapper_xrandr
+#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_wrapper_xrandr
+#define XRRFreeGamma XRRFreeGamma_dylibloader_wrapper_xrandr
+#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr
+#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_wrapper_xrandr
+#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_wrapper_xrandr
+#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_wrapper_xrandr
+#define XRRGetPanning XRRGetPanning_dylibloader_wrapper_xrandr
+#define XRRFreePanning XRRFreePanning_dylibloader_wrapper_xrandr
+#define XRRSetPanning XRRSetPanning_dylibloader_wrapper_xrandr
+#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_wrapper_xrandr
+#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_wrapper_xrandr
+#define XRRGetProviderResources XRRGetProviderResources_dylibloader_wrapper_xrandr
+#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_wrapper_xrandr
+#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_wrapper_xrandr
+#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_wrapper_xrandr
+#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_wrapper_xrandr
+#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr
+#define XRRListProviderProperties XRRListProviderProperties_dylibloader_wrapper_xrandr
+#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_wrapper_xrandr
+#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_wrapper_xrandr
+#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_wrapper_xrandr
+#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_wrapper_xrandr
+#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_wrapper_xrandr
+#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_wrapper_xrandr
+#define XRRGetMonitors XRRGetMonitors_dylibloader_wrapper_xrandr
+#define XRRSetMonitor XRRSetMonitor_dylibloader_wrapper_xrandr
+#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_wrapper_xrandr
+#define XRRFreeMonitors XRRFreeMonitors_dylibloader_wrapper_xrandr
+extern int (*XRRQueryExtension_dylibloader_wrapper_xrandr)( Display*, int*, int*);
+extern int (*XRRQueryVersion_dylibloader_wrapper_xrandr)( Display*, int*, int*);
+extern XRRScreenConfiguration* (*XRRGetScreenInfo_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
+extern int (*XRRSetScreenConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, Time);
+extern int (*XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, short, Time);
+extern Rotation (*XRRConfigRotations_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
+extern Time (*XRRConfigTimes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Time*);
+extern XRRScreenSize* (*XRRConfigSizes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int*);
+extern short* (*XRRConfigRates_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int, int*);
+extern SizeID (*XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
+extern short (*XRRConfigCurrentRate_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
+extern int (*XRRRootToScreen_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRSelectInput_dylibloader_wrapper_xrandr)( Display*, Window, int);
+extern Rotation (*XRRRotations_dylibloader_wrapper_xrandr)( Display*, int, Rotation*);
+extern XRRScreenSize* (*XRRSizes_dylibloader_wrapper_xrandr)( Display*, int, int*);
+extern short* (*XRRRates_dylibloader_wrapper_xrandr)( Display*, int, int, int*);
+extern Time (*XRRTimes_dylibloader_wrapper_xrandr)( Display*, int, Time*);
+extern int (*XRRGetScreenSizeRange_dylibloader_wrapper_xrandr)( Display*, Window, int*, int*, int*, int*);
+extern void (*XRRSetScreenSize_dylibloader_wrapper_xrandr)( Display*, Window, int, int, int, int);
+extern XRRScreenResources* (*XRRGetScreenResources_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRFreeScreenResources_dylibloader_wrapper_xrandr)( XRRScreenResources*);
+extern XRROutputInfo* (*XRRGetOutputInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RROutput);
+extern void (*XRRFreeOutputInfo_dylibloader_wrapper_xrandr)( XRROutputInfo*);
+extern Atom* (*XRRListOutputProperties_dylibloader_wrapper_xrandr)( Display*, RROutput, int*);
+extern XRRPropertyInfo* (*XRRQueryOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
+extern void (*XRRConfigureOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, int, int, int, long*);
+extern void (*XRRChangeOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, Atom, int, int,const unsigned char*, int);
+extern void (*XRRDeleteOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
+extern int (*XRRGetOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+extern XRRModeInfo* (*XRRAllocModeInfo_dylibloader_wrapper_xrandr)(const char*, int);
+extern RRMode (*XRRCreateMode_dylibloader_wrapper_xrandr)( Display*, Window, XRRModeInfo*);
+extern void (*XRRDestroyMode_dylibloader_wrapper_xrandr)( Display*, RRMode);
+extern void (*XRRAddOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
+extern void (*XRRDeleteOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
+extern void (*XRRFreeModeInfo_dylibloader_wrapper_xrandr)( XRRModeInfo*);
+extern XRRCrtcInfo* (*XRRGetCrtcInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
+extern void (*XRRFreeCrtcInfo_dylibloader_wrapper_xrandr)( XRRCrtcInfo*);
+extern int (*XRRSetCrtcConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, Time, int, int, RRMode, Rotation, RROutput*, int);
+extern int (*XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
+extern XRRCrtcGamma* (*XRRGetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
+extern XRRCrtcGamma* (*XRRAllocGamma_dylibloader_wrapper_xrandr)( int);
+extern void (*XRRSetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcGamma*);
+extern void (*XRRFreeGamma_dylibloader_wrapper_xrandr)( XRRCrtcGamma*);
+extern XRRScreenResources* (*XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRSetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XTransform*,const char*, XFixed*, int);
+extern int (*XRRGetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcTransformAttributes**);
+extern int (*XRRUpdateConfiguration_dylibloader_wrapper_xrandr)( XEvent*);
+extern XRRPanning* (*XRRGetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
+extern void (*XRRFreePanning_dylibloader_wrapper_xrandr)( XRRPanning*);
+extern int (*XRRSetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, XRRPanning*);
+extern void (*XRRSetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window, RROutput);
+extern RROutput (*XRRGetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window);
+extern XRRProviderResources* (*XRRGetProviderResources_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRFreeProviderResources_dylibloader_wrapper_xrandr)( XRRProviderResources*);
+extern XRRProviderInfo* (*XRRGetProviderInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRProvider);
+extern void (*XRRFreeProviderInfo_dylibloader_wrapper_xrandr)( XRRProviderInfo*);
+extern int (*XRRSetProviderOutputSource_dylibloader_wrapper_xrandr)( Display*, XID, XID);
+extern int (*XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr)( Display*, XID, XID);
+extern Atom* (*XRRListProviderProperties_dylibloader_wrapper_xrandr)( Display*, RRProvider, int*);
+extern XRRPropertyInfo* (*XRRQueryProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
+extern void (*XRRConfigureProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, int, int, int, long*);
+extern void (*XRRChangeProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, Atom, int, int,const unsigned char*, int);
+extern void (*XRRDeleteProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
+extern int (*XRRGetProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+extern XRRMonitorInfo* (*XRRAllocateMonitor_dylibloader_wrapper_xrandr)( Display*, int);
+extern XRRMonitorInfo* (*XRRGetMonitors_dylibloader_wrapper_xrandr)( Display*, Window, int, int*);
+extern void (*XRRSetMonitor_dylibloader_wrapper_xrandr)( Display*, Window, XRRMonitorInfo*);
+extern void (*XRRDeleteMonitor_dylibloader_wrapper_xrandr)( Display*, Window, Atom);
+extern void (*XRRFreeMonitors_dylibloader_wrapper_xrandr)( XRRMonitorInfo*);
+int initialize_xrandr(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c
new file mode 100644
index 0000000000..2d3847e584
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c
@@ -0,0 +1,511 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:55:28
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xrender.h --sys-include <X11/extensions/Xrender.h> --soname libXrender.so.1 --init-name xrender --output-header xrender-so_wrap.h --output-implementation xrender-so_wrap.c
+//
+// NOTE: Generated from Xrender 0.9.10.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, but absent in libXrender.so.1, were removed.
+#include <stdint.h>
+
+#define XRenderQueryExtension XRenderQueryExtension_dylibloader_orig_xrender
+#define XRenderQueryVersion XRenderQueryVersion_dylibloader_orig_xrender
+#define XRenderQueryFormats XRenderQueryFormats_dylibloader_orig_xrender
+#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_orig_xrender
+#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_orig_xrender
+#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_orig_xrender
+#define XRenderFindFormat XRenderFindFormat_dylibloader_orig_xrender
+#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_orig_xrender
+#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_orig_xrender
+#define XRenderCreatePicture XRenderCreatePicture_dylibloader_orig_xrender
+#define XRenderChangePicture XRenderChangePicture_dylibloader_orig_xrender
+#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_orig_xrender
+#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_orig_xrender
+#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_orig_xrender
+#define XRenderFreePicture XRenderFreePicture_dylibloader_orig_xrender
+#define XRenderComposite XRenderComposite_dylibloader_orig_xrender
+#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_orig_xrender
+#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_orig_xrender
+#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_orig_xrender
+#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_orig_xrender
+#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_orig_xrender
+#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_orig_xrender
+#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_orig_xrender
+#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_orig_xrender
+#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_orig_xrender
+#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_orig_xrender
+#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_orig_xrender
+#define XRenderFillRectangle XRenderFillRectangle_dylibloader_orig_xrender
+#define XRenderFillRectangles XRenderFillRectangles_dylibloader_orig_xrender
+#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_orig_xrender
+#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_orig_xrender
+#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_orig_xrender
+#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_orig_xrender
+#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_orig_xrender
+#define XRenderParseColor XRenderParseColor_dylibloader_orig_xrender
+#define XRenderCreateCursor XRenderCreateCursor_dylibloader_orig_xrender
+#define XRenderQueryFilters XRenderQueryFilters_dylibloader_orig_xrender
+#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_orig_xrender
+#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_orig_xrender
+#define XRenderAddTraps XRenderAddTraps_dylibloader_orig_xrender
+#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_orig_xrender
+#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_orig_xrender
+#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_orig_xrender
+#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_orig_xrender
+#include <X11/extensions/Xrender.h>
+#undef XRenderQueryExtension
+#undef XRenderQueryVersion
+#undef XRenderQueryFormats
+#undef XRenderQuerySubpixelOrder
+#undef XRenderSetSubpixelOrder
+#undef XRenderFindVisualFormat
+#undef XRenderFindFormat
+#undef XRenderFindStandardFormat
+#undef XRenderQueryPictIndexValues
+#undef XRenderCreatePicture
+#undef XRenderChangePicture
+#undef XRenderSetPictureClipRectangles
+#undef XRenderSetPictureClipRegion
+#undef XRenderSetPictureTransform
+#undef XRenderFreePicture
+#undef XRenderComposite
+#undef XRenderCreateGlyphSet
+#undef XRenderReferenceGlyphSet
+#undef XRenderFreeGlyphSet
+#undef XRenderAddGlyphs
+#undef XRenderFreeGlyphs
+#undef XRenderCompositeString8
+#undef XRenderCompositeString16
+#undef XRenderCompositeString32
+#undef XRenderCompositeText8
+#undef XRenderCompositeText16
+#undef XRenderCompositeText32
+#undef XRenderFillRectangle
+#undef XRenderFillRectangles
+#undef XRenderCompositeTrapezoids
+#undef XRenderCompositeTriangles
+#undef XRenderCompositeTriStrip
+#undef XRenderCompositeTriFan
+#undef XRenderCompositeDoublePoly
+#undef XRenderParseColor
+#undef XRenderCreateCursor
+#undef XRenderQueryFilters
+#undef XRenderSetPictureFilter
+#undef XRenderCreateAnimCursor
+#undef XRenderAddTraps
+#undef XRenderCreateSolidFill
+#undef XRenderCreateLinearGradient
+#undef XRenderCreateRadialGradient
+#undef XRenderCreateConicalGradient
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XRenderQueryExtension_dylibloader_wrapper_xrender)( Display*, int*, int*);
+int (*XRenderQueryVersion_dylibloader_wrapper_xrender)( Display*, int*, int*);
+int (*XRenderQueryFormats_dylibloader_wrapper_xrender)( Display*);
+int (*XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender)( Display*, int);
+int (*XRenderSetSubpixelOrder_dylibloader_wrapper_xrender)( Display*, int, int);
+XRenderPictFormat* (*XRenderFindVisualFormat_dylibloader_wrapper_xrender)( Display*,const Visual*);
+XRenderPictFormat* (*XRenderFindFormat_dylibloader_wrapper_xrender)( Display*, unsigned long,const XRenderPictFormat*, int);
+XRenderPictFormat* (*XRenderFindStandardFormat_dylibloader_wrapper_xrender)( Display*, int);
+XIndexValue* (*XRenderQueryPictIndexValues_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*, int*);
+Picture (*XRenderCreatePicture_dylibloader_wrapper_xrender)( Display*, Drawable,const XRenderPictFormat*, unsigned long,const XRenderPictureAttributes*);
+void (*XRenderChangePicture_dylibloader_wrapper_xrender)( Display*, Picture, unsigned long,const XRenderPictureAttributes*);
+void (*XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XRectangle*, int);
+void (*XRenderSetPictureClipRegion_dylibloader_wrapper_xrender)( Display*, Picture, Region);
+void (*XRenderSetPictureTransform_dylibloader_wrapper_xrender)( Display*, Picture, XTransform*);
+void (*XRenderFreePicture_dylibloader_wrapper_xrender)( Display*, Picture);
+void (*XRenderComposite_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture, Picture, int, int, int, int, int, int, unsigned int, unsigned int);
+GlyphSet (*XRenderCreateGlyphSet_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*);
+GlyphSet (*XRenderReferenceGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
+void (*XRenderFreeGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
+void (*XRenderAddGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*,const XGlyphInfo*, int,const char*, int);
+void (*XRenderFreeGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*, int);
+void (*XRenderCompositeString8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const char*, int);
+void (*XRenderCompositeString16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned short*, int);
+void (*XRenderCompositeString32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned int*, int);
+void (*XRenderCompositeText8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt8*, int);
+void (*XRenderCompositeText16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt16*, int);
+void (*XRenderCompositeText32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt32*, int);
+void (*XRenderFillRectangle_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*, int, int, unsigned int, unsigned int);
+void (*XRenderFillRectangles_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*,const XRectangle*, int);
+void (*XRenderCompositeTrapezoids_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTrapezoid*, int);
+void (*XRenderCompositeTriangles_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTriangle*, int);
+void (*XRenderCompositeTriStrip_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
+void (*XRenderCompositeTriFan_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
+void (*XRenderCompositeDoublePoly_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XPointDouble*, int, int);
+int (*XRenderParseColor_dylibloader_wrapper_xrender)( Display*, char*, XRenderColor*);
+Cursor (*XRenderCreateCursor_dylibloader_wrapper_xrender)( Display*, Picture, unsigned int, unsigned int);
+XFilters* (*XRenderQueryFilters_dylibloader_wrapper_xrender)( Display*, Drawable);
+void (*XRenderSetPictureFilter_dylibloader_wrapper_xrender)( Display*, Picture,const char*, XFixed*, int);
+Cursor (*XRenderCreateAnimCursor_dylibloader_wrapper_xrender)( Display*, int, XAnimCursor*);
+void (*XRenderAddTraps_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XTrap*, int);
+Picture (*XRenderCreateSolidFill_dylibloader_wrapper_xrender)( Display*,const XRenderColor*);
+Picture (*XRenderCreateLinearGradient_dylibloader_wrapper_xrender)( Display*,const XLinearGradient*,const XFixed*,const XRenderColor*, int);
+Picture (*XRenderCreateRadialGradient_dylibloader_wrapper_xrender)( Display*,const XRadialGradient*,const XFixed*,const XRenderColor*, int);
+Picture (*XRenderCreateConicalGradient_dylibloader_wrapper_xrender)( Display*,const XConicalGradient*,const XFixed*,const XRenderColor*, int);
+int initialize_xrender(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXrender.so.1", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XRenderQueryExtension
+ *(void **) (&XRenderQueryExtension_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQueryVersion
+ *(void **) (&XRenderQueryVersion_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQueryFormats
+ *(void **) (&XRenderQueryFormats_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryFormats");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQuerySubpixelOrder
+ *(void **) (&XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQuerySubpixelOrder");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetSubpixelOrder
+ *(void **) (&XRenderSetSubpixelOrder_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetSubpixelOrder");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFindVisualFormat
+ *(void **) (&XRenderFindVisualFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindVisualFormat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFindFormat
+ *(void **) (&XRenderFindFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindFormat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFindStandardFormat
+ *(void **) (&XRenderFindStandardFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindStandardFormat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQueryPictIndexValues
+ *(void **) (&XRenderQueryPictIndexValues_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryPictIndexValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreatePicture
+ *(void **) (&XRenderCreatePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreatePicture");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderChangePicture
+ *(void **) (&XRenderChangePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderChangePicture");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetPictureClipRectangles
+ *(void **) (&XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureClipRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetPictureClipRegion
+ *(void **) (&XRenderSetPictureClipRegion_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureClipRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetPictureTransform
+ *(void **) (&XRenderSetPictureTransform_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureTransform");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFreePicture
+ *(void **) (&XRenderFreePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreePicture");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderComposite
+ *(void **) (&XRenderComposite_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderComposite");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateGlyphSet
+ *(void **) (&XRenderCreateGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateGlyphSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderReferenceGlyphSet
+ *(void **) (&XRenderReferenceGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderReferenceGlyphSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFreeGlyphSet
+ *(void **) (&XRenderFreeGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreeGlyphSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderAddGlyphs
+ *(void **) (&XRenderAddGlyphs_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderAddGlyphs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFreeGlyphs
+ *(void **) (&XRenderFreeGlyphs_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreeGlyphs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeString8
+ *(void **) (&XRenderCompositeString8_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString8");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeString16
+ *(void **) (&XRenderCompositeString16_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeString32
+ *(void **) (&XRenderCompositeString32_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString32");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeText8
+ *(void **) (&XRenderCompositeText8_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText8");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeText16
+ *(void **) (&XRenderCompositeText16_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeText32
+ *(void **) (&XRenderCompositeText32_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText32");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFillRectangle
+ *(void **) (&XRenderFillRectangle_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFillRectangle");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFillRectangles
+ *(void **) (&XRenderFillRectangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFillRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeTrapezoids
+ *(void **) (&XRenderCompositeTrapezoids_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTrapezoids");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeTriangles
+ *(void **) (&XRenderCompositeTriangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeTriStrip
+ *(void **) (&XRenderCompositeTriStrip_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriStrip");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeTriFan
+ *(void **) (&XRenderCompositeTriFan_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriFan");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeDoublePoly
+ *(void **) (&XRenderCompositeDoublePoly_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeDoublePoly");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderParseColor
+ *(void **) (&XRenderParseColor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderParseColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateCursor
+ *(void **) (&XRenderCreateCursor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQueryFilters
+ *(void **) (&XRenderQueryFilters_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryFilters");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetPictureFilter
+ *(void **) (&XRenderSetPictureFilter_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureFilter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateAnimCursor
+ *(void **) (&XRenderCreateAnimCursor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateAnimCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderAddTraps
+ *(void **) (&XRenderAddTraps_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderAddTraps");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateSolidFill
+ *(void **) (&XRenderCreateSolidFill_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateSolidFill");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateLinearGradient
+ *(void **) (&XRenderCreateLinearGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateLinearGradient");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateRadialGradient
+ *(void **) (&XRenderCreateRadialGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateRadialGradient");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateConicalGradient
+ *(void **) (&XRenderCreateConicalGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateConicalGradient");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h
new file mode 100644
index 0000000000..e873448ec5
--- /dev/null
+++ b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h
@@ -0,0 +1,198 @@
+#ifndef DYLIBLOAD_WRAPPER_XRENDER
+#define DYLIBLOAD_WRAPPER_XRENDER
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by ./generate-wrapper.py 0.3 on 2022-12-02 12:55:28
+// flags: ./generate-wrapper.py --include /usr/include/X11/extensions/Xrender.h --sys-include <X11/extensions/Xrender.h> --soname libXrender.so.1 --init-name xrender --output-header xrender-so_wrap.h --output-implementation xrender-so_wrap.c
+//
+// NOTE: Generated from Xrender 0.9.10.
+// This has been handpatched to workaround some issues with the generator that
+// will be eventually fixed. In this case, non-existent symbols inherited from
+// libX11, but absent in libXrender.so.1, were removed.
+#include <stdint.h>
+
+#define XRenderQueryExtension XRenderQueryExtension_dylibloader_orig_xrender
+#define XRenderQueryVersion XRenderQueryVersion_dylibloader_orig_xrender
+#define XRenderQueryFormats XRenderQueryFormats_dylibloader_orig_xrender
+#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_orig_xrender
+#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_orig_xrender
+#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_orig_xrender
+#define XRenderFindFormat XRenderFindFormat_dylibloader_orig_xrender
+#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_orig_xrender
+#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_orig_xrender
+#define XRenderCreatePicture XRenderCreatePicture_dylibloader_orig_xrender
+#define XRenderChangePicture XRenderChangePicture_dylibloader_orig_xrender
+#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_orig_xrender
+#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_orig_xrender
+#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_orig_xrender
+#define XRenderFreePicture XRenderFreePicture_dylibloader_orig_xrender
+#define XRenderComposite XRenderComposite_dylibloader_orig_xrender
+#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_orig_xrender
+#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_orig_xrender
+#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_orig_xrender
+#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_orig_xrender
+#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_orig_xrender
+#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_orig_xrender
+#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_orig_xrender
+#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_orig_xrender
+#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_orig_xrender
+#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_orig_xrender
+#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_orig_xrender
+#define XRenderFillRectangle XRenderFillRectangle_dylibloader_orig_xrender
+#define XRenderFillRectangles XRenderFillRectangles_dylibloader_orig_xrender
+#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_orig_xrender
+#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_orig_xrender
+#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_orig_xrender
+#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_orig_xrender
+#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_orig_xrender
+#define XRenderParseColor XRenderParseColor_dylibloader_orig_xrender
+#define XRenderCreateCursor XRenderCreateCursor_dylibloader_orig_xrender
+#define XRenderQueryFilters XRenderQueryFilters_dylibloader_orig_xrender
+#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_orig_xrender
+#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_orig_xrender
+#define XRenderAddTraps XRenderAddTraps_dylibloader_orig_xrender
+#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_orig_xrender
+#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_orig_xrender
+#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_orig_xrender
+#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_orig_xrender
+#include <X11/extensions/Xrender.h>
+#undef XRenderQueryExtension
+#undef XRenderQueryVersion
+#undef XRenderQueryFormats
+#undef XRenderQuerySubpixelOrder
+#undef XRenderSetSubpixelOrder
+#undef XRenderFindVisualFormat
+#undef XRenderFindFormat
+#undef XRenderFindStandardFormat
+#undef XRenderQueryPictIndexValues
+#undef XRenderCreatePicture
+#undef XRenderChangePicture
+#undef XRenderSetPictureClipRectangles
+#undef XRenderSetPictureClipRegion
+#undef XRenderSetPictureTransform
+#undef XRenderFreePicture
+#undef XRenderComposite
+#undef XRenderCreateGlyphSet
+#undef XRenderReferenceGlyphSet
+#undef XRenderFreeGlyphSet
+#undef XRenderAddGlyphs
+#undef XRenderFreeGlyphs
+#undef XRenderCompositeString8
+#undef XRenderCompositeString16
+#undef XRenderCompositeString32
+#undef XRenderCompositeText8
+#undef XRenderCompositeText16
+#undef XRenderCompositeText32
+#undef XRenderFillRectangle
+#undef XRenderFillRectangles
+#undef XRenderCompositeTrapezoids
+#undef XRenderCompositeTriangles
+#undef XRenderCompositeTriStrip
+#undef XRenderCompositeTriFan
+#undef XRenderCompositeDoublePoly
+#undef XRenderParseColor
+#undef XRenderCreateCursor
+#undef XRenderQueryFilters
+#undef XRenderSetPictureFilter
+#undef XRenderCreateAnimCursor
+#undef XRenderAddTraps
+#undef XRenderCreateSolidFill
+#undef XRenderCreateLinearGradient
+#undef XRenderCreateRadialGradient
+#undef XRenderCreateConicalGradient
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XRenderQueryExtension XRenderQueryExtension_dylibloader_wrapper_xrender
+#define XRenderQueryVersion XRenderQueryVersion_dylibloader_wrapper_xrender
+#define XRenderQueryFormats XRenderQueryFormats_dylibloader_wrapper_xrender
+#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender
+#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_wrapper_xrender
+#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_wrapper_xrender
+#define XRenderFindFormat XRenderFindFormat_dylibloader_wrapper_xrender
+#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_wrapper_xrender
+#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_wrapper_xrender
+#define XRenderCreatePicture XRenderCreatePicture_dylibloader_wrapper_xrender
+#define XRenderChangePicture XRenderChangePicture_dylibloader_wrapper_xrender
+#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender
+#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_wrapper_xrender
+#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_wrapper_xrender
+#define XRenderFreePicture XRenderFreePicture_dylibloader_wrapper_xrender
+#define XRenderComposite XRenderComposite_dylibloader_wrapper_xrender
+#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_wrapper_xrender
+#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_wrapper_xrender
+#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_wrapper_xrender
+#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_wrapper_xrender
+#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_wrapper_xrender
+#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_wrapper_xrender
+#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_wrapper_xrender
+#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_wrapper_xrender
+#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_wrapper_xrender
+#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_wrapper_xrender
+#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_wrapper_xrender
+#define XRenderFillRectangle XRenderFillRectangle_dylibloader_wrapper_xrender
+#define XRenderFillRectangles XRenderFillRectangles_dylibloader_wrapper_xrender
+#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_wrapper_xrender
+#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_wrapper_xrender
+#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_wrapper_xrender
+#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_wrapper_xrender
+#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_wrapper_xrender
+#define XRenderParseColor XRenderParseColor_dylibloader_wrapper_xrender
+#define XRenderCreateCursor XRenderCreateCursor_dylibloader_wrapper_xrender
+#define XRenderQueryFilters XRenderQueryFilters_dylibloader_wrapper_xrender
+#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_wrapper_xrender
+#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_wrapper_xrender
+#define XRenderAddTraps XRenderAddTraps_dylibloader_wrapper_xrender
+#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_wrapper_xrender
+#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_wrapper_xrender
+#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_wrapper_xrender
+#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_wrapper_xrender
+extern int (*XRenderQueryExtension_dylibloader_wrapper_xrender)( Display*, int*, int*);
+extern int (*XRenderQueryVersion_dylibloader_wrapper_xrender)( Display*, int*, int*);
+extern int (*XRenderQueryFormats_dylibloader_wrapper_xrender)( Display*);
+extern int (*XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender)( Display*, int);
+extern int (*XRenderSetSubpixelOrder_dylibloader_wrapper_xrender)( Display*, int, int);
+extern XRenderPictFormat* (*XRenderFindVisualFormat_dylibloader_wrapper_xrender)( Display*,const Visual*);
+extern XRenderPictFormat* (*XRenderFindFormat_dylibloader_wrapper_xrender)( Display*, unsigned long,const XRenderPictFormat*, int);
+extern XRenderPictFormat* (*XRenderFindStandardFormat_dylibloader_wrapper_xrender)( Display*, int);
+extern XIndexValue* (*XRenderQueryPictIndexValues_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*, int*);
+extern Picture (*XRenderCreatePicture_dylibloader_wrapper_xrender)( Display*, Drawable,const XRenderPictFormat*, unsigned long,const XRenderPictureAttributes*);
+extern void (*XRenderChangePicture_dylibloader_wrapper_xrender)( Display*, Picture, unsigned long,const XRenderPictureAttributes*);
+extern void (*XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XRectangle*, int);
+extern void (*XRenderSetPictureClipRegion_dylibloader_wrapper_xrender)( Display*, Picture, Region);
+extern void (*XRenderSetPictureTransform_dylibloader_wrapper_xrender)( Display*, Picture, XTransform*);
+extern void (*XRenderFreePicture_dylibloader_wrapper_xrender)( Display*, Picture);
+extern void (*XRenderComposite_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture, Picture, int, int, int, int, int, int, unsigned int, unsigned int);
+extern GlyphSet (*XRenderCreateGlyphSet_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*);
+extern GlyphSet (*XRenderReferenceGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
+extern void (*XRenderFreeGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
+extern void (*XRenderAddGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*,const XGlyphInfo*, int,const char*, int);
+extern void (*XRenderFreeGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*, int);
+extern void (*XRenderCompositeString8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const char*, int);
+extern void (*XRenderCompositeString16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned short*, int);
+extern void (*XRenderCompositeString32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned int*, int);
+extern void (*XRenderCompositeText8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt8*, int);
+extern void (*XRenderCompositeText16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt16*, int);
+extern void (*XRenderCompositeText32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt32*, int);
+extern void (*XRenderFillRectangle_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*, int, int, unsigned int, unsigned int);
+extern void (*XRenderFillRectangles_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*,const XRectangle*, int);
+extern void (*XRenderCompositeTrapezoids_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTrapezoid*, int);
+extern void (*XRenderCompositeTriangles_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTriangle*, int);
+extern void (*XRenderCompositeTriStrip_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
+extern void (*XRenderCompositeTriFan_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
+extern void (*XRenderCompositeDoublePoly_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XPointDouble*, int, int);
+extern int (*XRenderParseColor_dylibloader_wrapper_xrender)( Display*, char*, XRenderColor*);
+extern Cursor (*XRenderCreateCursor_dylibloader_wrapper_xrender)( Display*, Picture, unsigned int, unsigned int);
+extern XFilters* (*XRenderQueryFilters_dylibloader_wrapper_xrender)( Display*, Drawable);
+extern void (*XRenderSetPictureFilter_dylibloader_wrapper_xrender)( Display*, Picture,const char*, XFixed*, int);
+extern Cursor (*XRenderCreateAnimCursor_dylibloader_wrapper_xrender)( Display*, int, XAnimCursor*);
+extern void (*XRenderAddTraps_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XTrap*, int);
+extern Picture (*XRenderCreateSolidFill_dylibloader_wrapper_xrender)( Display*,const XRenderColor*);
+extern Picture (*XRenderCreateLinearGradient_dylibloader_wrapper_xrender)( Display*,const XLinearGradient*,const XFixed*,const XRenderColor*, int);
+extern Picture (*XRenderCreateRadialGradient_dylibloader_wrapper_xrender)( Display*,const XRadialGradient*,const XFixed*,const XRenderColor*, int);
+extern Picture (*XRenderCreateConicalGradient_dylibloader_wrapper_xrender)( Display*,const XConicalGradient*,const XFixed*,const XRenderColor*, int);
+int initialize_xrender(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/gl_manager_x11.cpp b/platform/linuxbsd/x11/gl_manager_x11.cpp
index f586c57dda..12846f148d 100644
--- a/platform/linuxbsd/gl_manager_x11.cpp
+++ b/platform/linuxbsd/x11/gl_manager_x11.cpp
@@ -37,9 +37,7 @@
#include <stdlib.h>
#include <unistd.h>
-#define GLX_GLXEXT_PROTOTYPES
-#include <GL/glx.h>
-#include <GL/glxext.h>
+#include "thirdparty/glad/glad/glx.h"
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
@@ -323,16 +321,15 @@ void GLManager_X11::swap_buffers() {
glXSwapBuffers(_x_windisp.x11_display, _x_windisp.x11_window);
}
-Error GLManager_X11::initialize() {
+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) {
- static bool setup = false;
- static PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT = nullptr;
- static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalMESA = nullptr;
- static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = nullptr;
-
// force vsync in the editor for now, as a safety measure
bool is_editor = Engine::get_singleton()->is_editor_hint();
if (is_editor) {
@@ -345,25 +342,12 @@ void GLManager_X11::set_use_vsync(bool p_use) {
}
const GLDisplay &disp = get_current_display();
- if (!setup) {
- setup = true;
- String extensions = glXQueryExtensionsString(disp.x11_display, DefaultScreen(disp.x11_display));
- if (extensions.find("GLX_EXT_swap_control") != -1) {
- glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)glXGetProcAddressARB((const GLubyte *)"glXSwapIntervalEXT");
- }
- if (extensions.find("GLX_MESA_swap_control") != -1) {
- glXSwapIntervalMESA = (PFNGLXSWAPINTERVALSGIPROC)glXGetProcAddressARB((const GLubyte *)"glXSwapIntervalMESA");
- }
- if (extensions.find("GLX_SGI_swap_control") != -1) {
- glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)glXGetProcAddressARB((const GLubyte *)"glXSwapIntervalSGI");
- }
- }
int val = p_use ? 1 : 0;
- if (glXSwapIntervalMESA) {
+ if (GLAD_GLX_MESA_swap_control) {
glXSwapIntervalMESA(val);
- } else if (glXSwapIntervalSGI) {
+ } else if (GLAD_GLX_SGI_swap_control) {
glXSwapIntervalSGI(val);
- } else if (glXSwapIntervalEXT) {
+ } else if (GLAD_GLX_EXT_swap_control) {
GLXDrawable drawable = glXGetCurrentDrawable();
glXSwapIntervalEXT(disp.x11_display, drawable, val);
} else {
@@ -376,6 +360,17 @@ 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;
diff --git a/platform/linuxbsd/gl_manager_x11.h b/platform/linuxbsd/x11/gl_manager_x11.h
index 4f78c45c88..3ab37b54ac 100644
--- a/platform/linuxbsd/gl_manager_x11.h
+++ b/platform/linuxbsd/x11/gl_manager_x11.h
@@ -37,9 +37,10 @@
#include "core/os/os.h"
#include "core/templates/local_vector.h"
+#include "dynwrappers/xext-so_wrap.h"
+#include "dynwrappers/xlib-so_wrap.h"
+#include "dynwrappers/xrender-so_wrap.h"
#include "servers/display_server.h"
-#include <X11/Xlib.h>
-#include <X11/extensions/Xrender.h>
struct GLManager_X11_Private;
@@ -111,11 +112,13 @@ public:
void window_make_current(DisplayServer::WindowID p_window_id);
- Error initialize();
+ Error initialize(Display *p_display);
void set_use_vsync(bool p_use);
bool is_using_vsync() const;
+ void *get_glx_context(DisplayServer::WindowID p_window_id);
+
GLManager_X11(const Vector2i &p_size, ContextType p_context_type);
~GLManager_X11();
};
diff --git a/platform/linuxbsd/key_mapping_x11.cpp b/platform/linuxbsd/x11/key_mapping_x11.cpp
index f774c99d99..f774c99d99 100644
--- a/platform/linuxbsd/key_mapping_x11.cpp
+++ b/platform/linuxbsd/x11/key_mapping_x11.cpp
diff --git a/platform/linuxbsd/key_mapping_x11.h b/platform/linuxbsd/x11/key_mapping_x11.h
index b7b8a3b787..b7b8a3b787 100644
--- a/platform/linuxbsd/key_mapping_x11.h
+++ b/platform/linuxbsd/x11/key_mapping_x11.h
diff --git a/platform/linuxbsd/vulkan_context_x11.cpp b/platform/linuxbsd/x11/vulkan_context_x11.cpp
index b4f585726f..92aaf33b05 100644
--- a/platform/linuxbsd/vulkan_context_x11.cpp
+++ b/platform/linuxbsd/x11/vulkan_context_x11.cpp
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifdef VULKAN_ENABLED
+
#include "vulkan_context_x11.h"
#ifdef USE_VOLK
@@ -59,3 +61,5 @@ VulkanContextX11::VulkanContextX11() {
VulkanContextX11::~VulkanContextX11() {
}
+
+#endif // VULKAN_ENABLED
diff --git a/platform/linuxbsd/vulkan_context_x11.h b/platform/linuxbsd/x11/vulkan_context_x11.h
index 0c4a6cd278..0adb50ef44 100644
--- a/platform/linuxbsd/vulkan_context_x11.h
+++ b/platform/linuxbsd/x11/vulkan_context_x11.h
@@ -31,6 +31,8 @@
#ifndef VULKAN_CONTEXT_X11_H
#define VULKAN_CONTEXT_X11_H
+#ifdef VULKAN_ENABLED
+
#include "drivers/vulkan/vulkan_context.h"
#include <X11/Xlib.h>
@@ -44,4 +46,6 @@ public:
~VulkanContextX11();
};
+#endif // VULKAN_ENABLED
+
#endif // VULKAN_CONTEXT_X11_H
diff --git a/platform/macos/detect.py b/platform/macos/detect.py
index 511286d52b..67e4b49b14 100644
--- a/platform/macos/detect.py
+++ b/platform/macos/detect.py
@@ -223,6 +223,8 @@ def configure(env: "Environment"):
"AVFoundation",
"-framework",
"CoreMedia",
+ "-framework",
+ "QuartzCore",
]
)
env.Append(LIBS=["pthread", "z"])
@@ -236,22 +238,28 @@ def configure(env: "Environment"):
if env["vulkan"]:
env.Append(CPPDEFINES=["VULKAN_ENABLED"])
- env.Append(LINKFLAGS=["-framework", "Metal", "-framework", "QuartzCore", "-framework", "IOSurface"])
+ env.Append(LINKFLAGS=["-framework", "Metal", "-framework", "IOSurface"])
if not env["use_volk"]:
env.Append(LINKFLAGS=["-lMoltenVK"])
mvk_found = False
+
+ mkv_list = [get_mvk_sdk_path(), "/opt/homebrew/lib", "/usr/local/homebrew/lib", "/opt/local/lib"]
if env["vulkan_sdk_path"] != "":
- mvk_path = os.path.join(
- os.path.expanduser(env["vulkan_sdk_path"]), "MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/"
+ mkv_list.insert(0, os.path.expanduser(env["vulkan_sdk_path"]))
+ mkv_list.insert(
+ 0,
+ os.path.join(
+ os.path.expanduser(env["vulkan_sdk_path"]), "MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/"
+ ),
)
- if os.path.isfile(os.path.join(mvk_path, "libMoltenVK.a")):
- mvk_found = True
- env.Append(LINKFLAGS=["-L" + mvk_path])
- if not mvk_found:
- mvk_path = get_mvk_sdk_path()
+
+ for mvk_path in mkv_list:
if mvk_path and os.path.isfile(os.path.join(mvk_path, "libMoltenVK.a")):
mvk_found = True
+ print("MoltenVK found at: " + mvk_path)
env.Append(LINKFLAGS=["-L" + mvk_path])
+ break
+
if not mvk_found:
print(
"MoltenVK SDK installation directory not found, use 'vulkan_sdk_path' SCons parameter to specify SDK path."
diff --git a/platform/macos/display_server_macos.h b/platform/macos/display_server_macos.h
index 484b8ffebc..bd26f6e417 100644
--- a/platform/macos/display_server_macos.h
+++ b/platform/macos/display_server_macos.h
@@ -106,6 +106,7 @@ public:
bool layered_window = false;
bool fullscreen = false;
+ bool exclusive_fullscreen = false;
bool on_top = false;
bool borderless = false;
bool resize_disabled = false;
@@ -232,6 +233,7 @@ public:
void popup_close(WindowID p_window);
void set_is_resizing(bool p_is_resizing);
bool get_is_resizing() const;
+ void reparent_check(WindowID p_window);
void window_update(WindowID p_window);
void window_destroy(WindowID p_window);
@@ -353,6 +355,7 @@ public:
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_transient(WindowID p_window, WindowID p_parent) override;
@@ -366,7 +369,7 @@ public:
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_real_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;
@@ -430,12 +433,12 @@ public:
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_resolution, Error &r_error);
+ 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, Error &r_error);
static Vector<String> get_rendering_drivers_func();
static void register_macos_driver();
- DisplayServerMacOS(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ DisplayServerMacOS(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
~DisplayServerMacOS();
};
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index f4692abc92..5c979dbf22 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -166,6 +166,7 @@ DisplayServerMacOS::WindowID DisplayServerMacOS::_create_window(WindowMode p_mod
Error err = gl_manager->window_create(window_id_counter, wd.window_view, p_rect.size.width, p_rect.size.height);
ERR_FAIL_COND_V_MSG(err != OK, INVALID_WINDOW_ID, "Can't create an OpenGL context");
}
+ window_set_vsync_mode(p_vsync_mode, window_id_counter);
#endif
[wd.window_view updateLayerDelegate];
id = window_id_counter++;
@@ -1843,11 +1844,22 @@ void DisplayServerMacOS::mouse_set_mode(MouseMode p_mode) {
window_id = MAIN_WINDOW_ID;
}
WindowData &wd = windows[window_id];
+
+ bool show_cursor = (p_mode == MOUSE_MODE_VISIBLE || p_mode == MOUSE_MODE_CONFINED);
+ bool previously_shown = (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED);
+
+ if (show_cursor && !previously_shown) {
+ WindowID window_id = get_window_at_screen_position(mouse_get_position());
+ if (window_id != INVALID_WINDOW_ID) {
+ send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_ENTER);
+ }
+ }
+
if (p_mode == MOUSE_MODE_CAPTURED) {
// Apple Docs state that the display parameter is not used.
// "This parameter is not used. By default, you may pass kCGDirectMainDisplay."
// https://developer.apple.com/library/mac/documentation/graphicsimaging/reference/Quartz_Services_Ref/Reference/reference.html
- if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) {
+ if (previously_shown) {
CGDisplayHideCursor(kCGDirectMainDisplay);
}
CGAssociateMouseAndMouseCursorPosition(false);
@@ -1858,7 +1870,7 @@ void DisplayServerMacOS::mouse_set_mode(MouseMode p_mode) {
CGPoint lMouseWarpPos = { pointOnScreen.x, CGDisplayBounds(CGMainDisplayID()).size.height - pointOnScreen.y };
CGWarpMouseCursorPosition(lMouseWarpPos);
} else if (p_mode == MOUSE_MODE_HIDDEN) {
- if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) {
+ if (previously_shown) {
CGDisplayHideCursor(kCGDirectMainDisplay);
}
[wd.window_object setMovable:YES];
@@ -1868,7 +1880,7 @@ void DisplayServerMacOS::mouse_set_mode(MouseMode p_mode) {
[wd.window_object setMovable:NO];
CGAssociateMouseAndMouseCursorPosition(false);
} else if (p_mode == MOUSE_MODE_CONFINED_HIDDEN) {
- if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) {
+ if (previously_shown) {
CGDisplayHideCursor(kCGDirectMainDisplay);
}
[wd.window_object setMovable:NO];
@@ -1884,7 +1896,7 @@ void DisplayServerMacOS::mouse_set_mode(MouseMode p_mode) {
warp_events.clear();
mouse_mode = p_mode;
- if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) {
+ if (show_cursor) {
cursor_update_shape();
}
}
@@ -2179,7 +2191,7 @@ void DisplayServerMacOS::screen_set_keep_on(bool p_enable) {
}
if (p_enable) {
- String app_name_string = ProjectSettings::get_singleton()->get("application/config/name");
+ String app_name_string = GLOBAL_GET("application/config/name");
NSString *name = [NSString stringWithUTF8String:(app_name_string.is_empty() ? "Godot Engine" : app_name_string.utf8().get_data())];
NSString *reason = @"Godot Engine running with display/window/energy_saving/keep_screen_on = true";
IOPMAssertionCreateWithDescription(kIOPMAssertPreventUserIdleDisplaySleep, (__bridge CFStringRef)name, (__bridge CFStringRef)reason, (__bridge CFStringRef)reason, nullptr, 0, nullptr, &screen_keep_on_assertion);
@@ -2325,24 +2337,60 @@ void DisplayServerMacOS::window_set_current_screen(int p_screen, WindowID p_wind
}
}
-void DisplayServerMacOS::window_set_exclusive(WindowID p_window, bool p_exclusive) {
- _THREAD_SAFE_METHOD_
+void DisplayServerMacOS::reparent_check(WindowID p_window) {
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
- if (wd.exclusive != p_exclusive) {
- wd.exclusive = p_exclusive;
- if (wd.transient_parent != INVALID_WINDOW_ID) {
- WindowData &wd_parent = windows[wd.transient_parent];
- if (wd.exclusive) {
- ERR_FAIL_COND_MSG([[wd_parent.window_object childWindows] count] > 0, "Transient parent has another exclusive child.");
+ NSScreen *screen = [wd.window_object screen];
+
+ if (wd.transient_parent != INVALID_WINDOW_ID) {
+ WindowData &wd_parent = windows[wd.transient_parent];
+ NSScreen *parent_screen = [wd_parent.window_object screen];
+
+ if (parent_screen == screen) {
+ if (![[wd_parent.window_object childWindows] containsObject:wd.window_object]) {
+ [wd.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
[wd_parent.window_object addChildWindow:wd.window_object ordered:NSWindowAbove];
- } else {
+ }
+ } else {
+ if ([[wd_parent.window_object childWindows] containsObject:wd.window_object]) {
[wd_parent.window_object removeChildWindow:wd.window_object];
+ [wd.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
+ [wd.window_object orderFront:nil];
+ }
+ }
+ }
+
+ for (const WindowID &child : wd.transient_children) {
+ WindowData &wd_child = windows[child];
+ NSScreen *child_screen = [wd_child.window_object screen];
+
+ if (child_screen == screen) {
+ if (![[wd.window_object childWindows] containsObject:wd_child.window_object]) {
+ if (wd_child.fullscreen) {
+ [wd_child.window_object toggleFullScreen:nil];
+ }
+ [wd_child.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
+ [wd.window_object addChildWindow:wd_child.window_object ordered:NSWindowAbove];
+ }
+ } else {
+ if ([[wd.window_object childWindows] containsObject:wd_child.window_object]) {
+ [wd.window_object removeChildWindow:wd_child.window_object];
+ [wd_child.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
}
}
}
}
+void DisplayServerMacOS::window_set_exclusive(WindowID p_window, bool p_exclusive) {
+ _THREAD_SAFE_METHOD_
+ ERR_FAIL_COND(!windows.has(p_window));
+ WindowData &wd = windows[p_window];
+ if (wd.exclusive != p_exclusive) {
+ wd.exclusive = p_exclusive;
+ reparent_check(p_window);
+ }
+}
+
Point2i DisplayServerMacOS::window_get_position(WindowID p_window) const {
_THREAD_SAFE_METHOD_
@@ -2366,13 +2414,34 @@ Point2i DisplayServerMacOS::window_get_position(WindowID p_window) const {
return pos;
}
+Point2i DisplayServerMacOS::window_get_position_with_decorations(WindowID p_window) const {
+ _THREAD_SAFE_METHOD_
+
+ ERR_FAIL_COND_V(!windows.has(p_window), Point2i());
+ const WindowData &wd = windows[p_window];
+
+ const NSRect nsrect = [wd.window_object frame];
+ Point2i pos;
+
+ // Return the position of the top-left corner, for OS X the y starts at the bottom.
+ const float scale = screen_get_max_scale();
+ pos.x = nsrect.origin.x;
+ pos.y = (nsrect.origin.y + nsrect.size.height);
+ pos *= scale;
+ pos -= _get_screens_origin();
+ // OS X native y-coordinate relative to _get_screens_origin() is negative,
+ // Godot expects a positive value.
+ pos.y *= -1;
+ return pos;
+}
+
void DisplayServerMacOS::window_set_position(const Point2i &p_position, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
- if ([wd.window_object isZoomed]) {
+ if (NSEqualRects([wd.window_object frame], [[wd.window_object screen] visibleFrame])) {
return;
}
@@ -2417,11 +2486,10 @@ void DisplayServerMacOS::window_set_transient(WindowID p_window, WindowID p_pare
wd_window.transient_parent = INVALID_WINDOW_ID;
wd_parent.transient_children.erase(p_window);
- [wd_window.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
-
- if (wd_window.exclusive) {
+ if ([[wd_parent.window_object childWindows] containsObject:wd_window.window_object]) {
[wd_parent.window_object removeChildWindow:wd_window.window_object];
}
+ [wd_window.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
} else {
ERR_FAIL_COND(!windows.has(p_parent));
ERR_FAIL_COND_MSG(wd_window.transient_parent != INVALID_WINDOW_ID, "Window already has a transient parent");
@@ -2429,11 +2497,7 @@ void DisplayServerMacOS::window_set_transient(WindowID p_window, WindowID p_pare
wd_window.transient_parent = p_parent;
wd_parent.transient_children.insert(p_window);
- [wd_window.window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
-
- if (wd_window.exclusive) {
- [wd_parent.window_object addChildWindow:wd_window.window_object ordered:NSWindowAbove];
- }
+ reparent_check(p_window);
}
}
@@ -2500,7 +2564,7 @@ void DisplayServerMacOS::window_set_size(const Size2i p_size, WindowID p_window)
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
- if ([wd.window_object isZoomed]) {
+ if (NSEqualRects([wd.window_object frame], [[wd.window_object screen] visibleFrame])) {
return;
}
@@ -2530,7 +2594,7 @@ Size2i DisplayServerMacOS::window_get_size(WindowID p_window) const {
return wd.size;
}
-Size2i DisplayServerMacOS::window_get_real_size(WindowID p_window) const {
+Size2i DisplayServerMacOS::window_get_size_with_decorations(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
@@ -2573,10 +2637,16 @@ void DisplayServerMacOS::window_set_mode(WindowMode p_mode, WindowID p_window) {
[wd.window_object setContentMaxSize:NSMakeSize(size.x, size.y)];
}
[wd.window_object toggleFullScreen:nil];
+
+ if (old_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {
+ [NSApp setPresentationOptions:NSApplicationPresentationDefault];
+ }
+
wd.fullscreen = false;
+ wd.exclusive_fullscreen = false;
} break;
case WINDOW_MODE_MAXIMIZED: {
- if ([wd.window_object isZoomed]) {
+ if (NSEqualRects([wd.window_object frame], [[wd.window_object screen] visibleFrame])) {
[wd.window_object zoom:nil];
}
} break;
@@ -2598,10 +2668,18 @@ void DisplayServerMacOS::window_set_mode(WindowMode p_mode, WindowID p_window) {
[wd.window_object setContentMinSize:NSMakeSize(0, 0)];
[wd.window_object setContentMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)];
[wd.window_object toggleFullScreen:nil];
+
wd.fullscreen = true;
+ if (p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {
+ const NSUInteger presentationOptions = NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar;
+ [NSApp setPresentationOptions:presentationOptions];
+ wd.exclusive_fullscreen = true;
+ } else {
+ wd.exclusive_fullscreen = false;
+ }
} break;
case WINDOW_MODE_MAXIMIZED: {
- if (![wd.window_object isZoomed]) {
+ if (!NSEqualRects([wd.window_object frame], [[wd.window_object screen] visibleFrame])) {
[wd.window_object zoom:nil];
}
} break;
@@ -2615,9 +2693,13 @@ DisplayServer::WindowMode DisplayServerMacOS::window_get_mode(WindowID p_window)
const WindowData &wd = windows[p_window];
if (wd.fullscreen) { // If fullscreen, it's not in another mode.
- return WINDOW_MODE_FULLSCREEN;
+ if (wd.exclusive_fullscreen) {
+ return WINDOW_MODE_EXCLUSIVE_FULLSCREEN;
+ } else {
+ return WINDOW_MODE_FULLSCREEN;
+ }
}
- if ([wd.window_object isZoomed] && !wd.resize_disabled) {
+ if (NSEqualRects([wd.window_object frame], [[wd.window_object screen] visibleFrame])) {
return WINDOW_MODE_MAXIMIZED;
}
if ([wd.window_object respondsToSelector:@selector(isMiniaturized)]) {
@@ -2727,8 +2809,10 @@ void DisplayServerMacOS::window_set_flag(WindowFlags p_flag, bool p_enabled, Win
}
if (p_enabled) {
[wd.window_object setStyleMask:[wd.window_object styleMask] & ~NSWindowStyleMaskResizable];
+ [[wd.window_object standardWindowButton:NSWindowZoomButton] setEnabled:NO];
} else {
[wd.window_object setStyleMask:[wd.window_object styleMask] | NSWindowStyleMaskResizable];
+ [[wd.window_object standardWindowButton:NSWindowZoomButton] setEnabled:YES];
}
} break;
case WINDOW_FLAG_EXTEND_TO_TITLE: {
@@ -2932,6 +3016,14 @@ int64_t DisplayServerMacOS::window_get_native_handle(HandleType p_handle_type, W
case WINDOW_VIEW: {
return (int64_t)windows[p_window].window_view;
}
+#ifdef GLES3_ENABLED
+ case OPENGL_CONTEXT: {
+ if (gl_manager) {
+ return (int64_t)gl_manager->get_context(p_window);
+ }
+ return 0;
+ }
+#endif
default: {
return 0;
}
@@ -2962,7 +3054,7 @@ void DisplayServerMacOS::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_
_THREAD_SAFE_METHOD_
#if defined(GLES3_ENABLED)
if (gl_manager) {
- gl_manager->set_use_vsync(p_vsync_mode);
+ gl_manager->set_use_vsync(p_vsync_mode != DisplayServer::VSYNC_DISABLED);
}
#endif
#if defined(VULKAN_ENABLED)
@@ -3405,10 +3497,29 @@ void DisplayServerMacOS::set_icon(const Ref<Image> &p_icon) {
[NSApp setApplicationIconImage:nsimg];
}
-DisplayServer *DisplayServerMacOS::create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
- DisplayServer *ds = memnew(DisplayServerMacOS(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
+DisplayServer *DisplayServerMacOS::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, Error &r_error) {
+ DisplayServer *ds = memnew(DisplayServerMacOS(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, r_error));
if (r_error != OK) {
- OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan or OpenGL versions.", "Unable to initialize Video driver");
+ if (p_rendering_driver == "vulkan") {
+ String executable_command;
+ if (OS::get_singleton()->get_bundle_resource_dir() == OS::get_singleton()->get_executable_path().get_base_dir()) {
+ executable_command = vformat("%s --rendering-driver opengl3", OS::get_singleton()->get_executable_path());
+ } else {
+ executable_command = vformat("open %s --args --rendering-driver opengl3", OS::get_singleton()->get_bundle_resource_dir().path_join("../..").simplify_path());
+ }
+ OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n"
+ "Please try updating your GPU driver or try using the OpenGL 3 driver.\n"
+ "You can enable the OpenGL 3 driver by starting the engine from the\n"
+ "command line with the command: '" +
+ executable_command + "'.\n"
+ "If you have updated your graphics drivers recently, try rebooting.",
+ "Unable to initialize Video driver");
+ } else {
+ OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n"
+ "Please try updating your GPU driver.\n"
+ "If you have updated your graphics drivers recently, try rebooting.",
+ "Unable to initialize Video driver");
+ }
}
return ds;
}
@@ -3556,7 +3667,7 @@ bool DisplayServerMacOS::mouse_process_popups(bool p_close) {
return closed;
}
-DisplayServerMacOS::DisplayServerMacOS(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+DisplayServerMacOS::DisplayServerMacOS(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events);
r_error = OK;
@@ -3665,6 +3776,11 @@ DisplayServerMacOS::DisplayServerMacOS(const String &p_rendering_driver, WindowM
Point2i window_position(
screen_get_position(0).x + (screen_get_size(0).width - p_resolution.width) / 2,
screen_get_position(0).y + (screen_get_size(0).height - p_resolution.height) / 2);
+
+ if (p_position != nullptr) {
+ window_position = *p_position;
+ }
+
WindowID main_window = _create_window(p_mode, p_vsync_mode, Rect2i(window_position, p_resolution));
ERR_FAIL_COND(main_window == INVALID_WINDOW_ID);
for (int i = 0; i < WINDOW_FLAG_MAX; i++) {
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index f5f64f9663..49c8c7758d 100644
--- a/platform/macos/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -34,6 +34,7 @@
#include "lipo.h"
#include "macho.h"
+#include "core/io/image_loader.h"
#include "core/string/translation.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
@@ -90,11 +91,14 @@ bool EditorExportPlatformMacOS::get_export_option_visibility(const EditorExportP
return false;
}
} break;
- case 2: { // "altool"
+ case 2: { // "notarytool"
+ // All options are visible.
+ } break;
+ case 3: { // "altool"
// All options are visible.
} break;
default: { // disabled
- if (p_option == "notarization/apple_id_name" || p_option == "notarization/apple_id_password" || p_option == "notarization/apple_team_id" || p_option == "notarization/api_uuid" || p_option == "notarization/api_key") {
+ if (p_option == "notarization/apple_id_name" || p_option == "notarization/apple_id_password" || p_option == "notarization/apple_team_id" || p_option == "notarization/api_uuid" || p_option == "notarization/api_key" || p_option == "notarization/api_key_id") {
return false;
}
} break;
@@ -116,7 +120,8 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "debug/export_console_script", PROPERTY_HINT_ENUM, "No,Debug Only,Debug and Release"), 1));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/icon", PROPERTY_HINT_FILE, "*.png,*.icns"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/icon", PROPERTY_HINT_FILE, "*.icns,*.png,*.webp,*.svg"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/icon_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/bundle_identifier", PROPERTY_HINT_PLACEHOLDER_TEXT, "com.example.game"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/signature"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/app_category", PROPERTY_HINT_ENUM, "Business,Developer-tools,Education,Entertainment,Finance,Games,Action-games,Adventure-games,Arcade-games,Board-games,Card-games,Casino-games,Dice-games,Educational-games,Family-games,Kids-games,Music-games,Puzzle-games,Racing-games,Role-playing-games,Simulation-games,Sports-games,Strategy-games,Trivia-games,Word-games,Graphics-design,Healthcare-fitness,Lifestyle,Medical,Music,News,Photography,Productivity,Reference,Social-networking,Sports,Travel,Utilities,Video,Weather"), "Games"));
@@ -127,9 +132,9 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "display/high_res"), false));
#ifdef MACOS_ENABLED
- r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/codesign", PROPERTY_HINT_ENUM, "Disabled,Built-in (ad-hoc only),PyOxidizer rcodesign,Xcode codesign"), 3, true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/codesign", PROPERTY_HINT_ENUM, "Disabled,Built-in (ad-hoc only),rcodesign,Xcode codesign"), 3, true));
#else
- r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/codesign", PROPERTY_HINT_ENUM, "Disabled,Built-in (ad-hoc only),PyOxidizer rcodesign"), 1, true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/codesign", PROPERTY_HINT_ENUM, "Disabled,Built-in (ad-hoc only),rcodesign"), 1, true));
#endif
// "codesign" only options:
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/identity", PROPERTY_HINT_PLACEHOLDER_TEXT, "Type: Name (ID)"), ""));
@@ -163,17 +168,18 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray()));
#ifdef MACOS_ENABLED
- r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "notarization/notarization", PROPERTY_HINT_ENUM, "Disabled,PyOxidizer rcodesign,Xcode altool"), 0, true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "notarization/notarization", PROPERTY_HINT_ENUM, "Disabled,rcodesign,Xcode notarytool,Xcode altool (deprecated)"), 0, true));
#else
- r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "notarization/notarization", PROPERTY_HINT_ENUM, "Disabled,PyOxidizer rcodesign"), 0, true));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "notarization/notarization", PROPERTY_HINT_ENUM, "Disabled,rcodesign"), 0, true));
#endif
- // "altool" only options:
+ // "altool" and "notarytool" only options:
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "notarization/apple_id_name", PROPERTY_HINT_PLACEHOLDER_TEXT, "Apple ID email"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "notarization/apple_id_password", PROPERTY_HINT_PASSWORD, "Enable two-factor authentication and provide app-specific password"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "notarization/apple_team_id", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide team ID if your Apple ID belongs to multiple teams"), ""));
- // "altool" and "rcodesign" only options:
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "notarization/api_uuid", PROPERTY_HINT_PLACEHOLDER_TEXT, "App Store Connect issuer ID"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "notarization/api_key", PROPERTY_HINT_PLACEHOLDER_TEXT, "App Store Connect API key ID"), ""));
+ // "altool", "notarytool" and "rcodesign" only options:
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "notarization/api_uuid", PROPERTY_HINT_PLACEHOLDER_TEXT, "App Store Connect issuer ID UUID"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "notarization/api_key", PROPERTY_HINT_GLOBAL_FILE, "*.p8"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "notarization/api_key_id", PROPERTY_HINT_PLACEHOLDER_TEXT, "App Store Connect API key ID"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "privacy/microphone_usage_description", PROPERTY_HINT_PLACEHOLDER_TEXT, "Provide a message if you need to use the microphone"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::DICTIONARY, "privacy/microphone_usage_description_localized", PROPERTY_HINT_LOCALIZABLE_STRING), Dictionary()));
@@ -268,7 +274,7 @@ void _rgba8_to_packbits_encode(int p_ch, int p_size, Vector<uint8_t> &p_source,
memcpy(&p_dest.write[ofs], result.ptr(), res_size);
}
-void EditorExportPlatformMacOS::_make_icon(const Ref<Image> &p_icon, Vector<uint8_t> &p_data) {
+void EditorExportPlatformMacOS::_make_icon(const Ref<EditorExportPreset> &p_preset, const Ref<Image> &p_icon, Vector<uint8_t> &p_data) {
Ref<ImageTexture> it = memnew(ImageTexture);
Vector<uint8_t> data;
@@ -302,7 +308,7 @@ void EditorExportPlatformMacOS::_make_icon(const Ref<Image> &p_icon, Vector<uint
for (uint64_t i = 0; i < (sizeof(icon_infos) / sizeof(icon_infos[0])); ++i) {
Ref<Image> copy = p_icon; // does this make sense? doesn't this just increase the reference count instead of making a copy? Do we even need a copy?
copy->convert(Image::FORMAT_RGBA8);
- copy->resize(icon_infos[i].size, icon_infos[i].size);
+ copy->resize(icon_infos[i].size, icon_infos[i].size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
if (icon_infos[i].is_png) {
// Encode PNG icon.
@@ -383,7 +389,7 @@ void EditorExportPlatformMacOS::_fix_plist(const Ref<EditorExportPreset> &p_pres
if (lines[i].find("$binary") != -1) {
strnew += lines[i].replace("$binary", p_binary) + "\n";
} else if (lines[i].find("$name") != -1) {
- strnew += lines[i].replace("$name", ProjectSettings::get_singleton()->get("application/config/name")) + "\n";
+ strnew += lines[i].replace("$name", GLOBAL_GET("application/config/name")) + "\n";
} else if (lines[i].find("$bundle_identifier") != -1) {
strnew += lines[i].replace("$bundle_identifier", p_preset->get("application/bundle_identifier")) + "\n";
} else if (lines[i].find("$short_version") != -1) {
@@ -473,7 +479,7 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
case 1: { // "rcodesign"
print_verbose("using rcodesign notarization...");
- String rcodesign = EditorSettings::get_singleton()->get("export/macos/rcodesign").operator String();
+ String rcodesign = EDITOR_GET("export/macos/rcodesign").operator String();
if (rcodesign.is_empty()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Notarization"), TTR("rcodesign path is not set. Configure rcodesign path in the Editor Settings (Export > macOS > rcodesign)."));
return Error::FAILED;
@@ -496,7 +502,12 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
args.push_back(p_preset->get("notarization/api_uuid"));
args.push_back("--api-key");
- args.push_back(p_preset->get("notarization/api_key"));
+ args.push_back(p_preset->get("notarization/api_key_id"));
+
+ if (!p_preset->get("notarization/api_key").operator String().is_empty()) {
+ args.push_back("--api-key-path");
+ args.push_back(p_preset->get("notarization/api_key"));
+ }
args.push_back(p_path);
@@ -517,7 +528,7 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
} else {
print_verbose("rcodesign (" + p_path + "):\n" + str);
int next_nl = str.find("\n", rq_offset);
- String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 14, -1) : str.substr(rq_offset + 14, next_nl - rq_offset - 14);
+ String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 23, -1) : str.substr(rq_offset + 23, next_nl - rq_offset - 23);
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), vformat(TTR("Notarization request UUID: \"%s\""), request_uuid));
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), TTR("The notarization process generally takes less than an hour."));
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t" + TTR("You can check progress manually by opening a Terminal and running the following command:"));
@@ -527,7 +538,91 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
}
} break;
#ifdef MACOS_ENABLED
- case 2: { // "altool"
+ case 2: { // "notarytool"
+ print_verbose("using notarytool notarization...");
+
+ if (!FileAccess::exists("/usr/bin/xcrun") && !FileAccess::exists("/bin/xcrun")) {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Notarization"), TTR("Xcode command line tools are not installed."));
+ return Error::FAILED;
+ }
+
+ List<String> args;
+
+ args.push_back("notarytool");
+ args.push_back("submit");
+
+ args.push_back(p_path);
+
+ if (p_preset->get("notarization/apple_id_name") == "" && p_preset->get("notarization/api_uuid") == "") {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Notarization"), TTR("Neither Apple ID name nor App Store Connect issuer ID name not specified."));
+ return Error::FAILED;
+ }
+ if (p_preset->get("notarization/apple_id_name") != "" && p_preset->get("notarization/api_uuid") != "") {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Notarization"), TTR("Both Apple ID name and App Store Connect issuer ID name are specified, only one should be set at the same time."));
+ return Error::FAILED;
+ }
+
+ if (p_preset->get("notarization/apple_id_name") != "") {
+ if (p_preset->get("notarization/apple_id_password") == "") {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Notarization"), TTR("Apple ID password not specified."));
+ return Error::FAILED;
+ }
+ args.push_back("--apple-id");
+ args.push_back(p_preset->get("notarization/apple_id_name"));
+
+ args.push_back("--password");
+ args.push_back(p_preset->get("notarization/apple_id_password"));
+ } else {
+ if (p_preset->get("notarization/api_key_id") == "") {
+ add_message(EXPORT_MESSAGE_ERROR, TTR("Notarization"), TTR("App Store Connect API key ID not specified."));
+ return Error::FAILED;
+ }
+ args.push_back("--issuer");
+ args.push_back(p_preset->get("notarization/api_uuid"));
+
+ if (!p_preset->get("notarization/api_key").operator String().is_empty()) {
+ args.push_back("--key");
+ args.push_back(p_preset->get("notarization/api_key"));
+ }
+
+ args.push_back("--key-id");
+ args.push_back(p_preset->get("notarization/api_key_id"));
+ }
+
+ args.push_back("--no-progress");
+
+ if (p_preset->get("notarization/apple_team_id")) {
+ args.push_back("--team-id");
+ args.push_back(p_preset->get("notarization/apple_team_id"));
+ }
+
+ String str;
+ int exitcode = 0;
+ Error err = OS::get_singleton()->execute("xcrun", args, &str, &exitcode, true);
+ if (err != OK) {
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Notarization"), TTR("Could not start xcrun executable."));
+ return err;
+ }
+
+ int rq_offset = str.find("id:");
+ if (exitcode != 0 || rq_offset == -1) {
+ print_line("notarytool (" + p_path + "):\n" + str);
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Notarization"), TTR("Notarization failed, see editor log for details."));
+ return Error::FAILED;
+ } else {
+ print_verbose("notarytool (" + p_path + "):\n" + str);
+ int next_nl = str.find("\n", rq_offset);
+ String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 4, -1) : str.substr(rq_offset + 4, next_nl - rq_offset - 4);
+ add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), vformat(TTR("Notarization request UUID: \"%s\""), request_uuid));
+ add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), TTR("The notarization process generally takes less than an hour."));
+ add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t" + TTR("You can check progress manually by opening a Terminal and running the following command:"));
+ add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t\t\"xcrun notarytool log <request uuid> --issuer <api uuid> --key-id <api key id> --key <api key path>\" or");
+ add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t\t\"xcrun notarytool log <request uuid> --apple-id <your email> --password <app-specific pwd>>\"");
+ add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t" + TTR("Run the following command to staple the notarization ticket to the exported application (optional):"));
+ add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t\t\"xcrun stapler staple <app path>\"");
+ }
+ } break;
+ case 3: { // "altool"
print_verbose("using altool notarization...");
if (!FileAccess::exists("/usr/bin/xcrun") && !FileAccess::exists("/bin/xcrun")) {
@@ -571,7 +666,7 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
args.push_back(p_preset->get("notarization/api_uuid"));
args.push_back("--apiKey");
- args.push_back(p_preset->get("notarization/api_key"));
+ args.push_back(p_preset->get("notarization/api_key_id"));
}
args.push_back("--type");
@@ -593,7 +688,7 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
return err;
}
- int rq_offset = str.find("RequestUUID");
+ int rq_offset = str.find("RequestUUID:");
if (exitcode != 0 || rq_offset == -1) {
print_line("xcrun altool (" + p_path + "):\n" + str);
add_message(EXPORT_MESSAGE_WARNING, TTR("Notarization"), TTR("Notarization failed, see editor log for details."));
@@ -601,7 +696,7 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
} else {
print_verbose("xcrun altool (" + p_path + "):\n" + str);
int next_nl = str.find("\n", rq_offset);
- String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 14, -1) : str.substr(rq_offset + 14, next_nl - rq_offset - 14);
+ String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 13, -1) : str.substr(rq_offset + 13, next_nl - rq_offset - 13);
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), vformat(TTR("Notarization request UUID: \"%s\""), request_uuid));
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), TTR("The notarization process generally takes less than an hour. When the process is completed, you'll receive an email."));
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t" + TTR("You can check progress manually by opening a Terminal and running the following command:"));
@@ -636,7 +731,7 @@ Error EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_pre
case 2: { // "rcodesign"
print_verbose("using rcodesign codesign...");
- String rcodesign = EditorSettings::get_singleton()->get("export/macos/rcodesign").operator String();
+ String rcodesign = EDITOR_GET("export/macos/rcodesign").operator String();
if (rcodesign.is_empty()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Code Signing"), TTR("Xrcodesign path is not set. Configure rcodesign path in the Editor Settings (Export > macOS > rcodesign)."));
return Error::FAILED;
@@ -726,7 +821,7 @@ Error EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_pre
String str;
int exitcode = 0;
- Error err = OS::get_singleton()->execute("codesign", args, &str, nullptr, true);
+ Error err = OS::get_singleton()->execute("codesign", args, &str, &exitcode, true);
if (err != OK) {
add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), TTR("Could not start codesign executable, make sure Xcode command line tools are installed."));
return err;
@@ -982,8 +1077,8 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + "." + architecture;
String pkg_name;
- if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
- pkg_name = String(ProjectSettings::get_singleton()->get("application/config/name"));
+ if (String(GLOBAL_GET("application/config/name")) != "") {
+ pkg_name = String(GLOBAL_GET("application/config/name"));
} else {
pkg_name = "Unnamed";
}
@@ -1073,7 +1168,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
}
}
- Dictionary appnames = ProjectSettings::get_singleton()->get("application/config/name_localized");
+ Dictionary appnames = GLOBAL_GET("application/config/name_localized");
Dictionary microphone_usage_descriptions = p_preset->get("privacy/microphone_usage_description_localized");
Dictionary camera_usage_descriptions = p_preset->get("privacy/camera_usage_description_localized");
Dictionary location_usage_descriptions = p_preset->get("privacy/location_usage_description_localized");
@@ -1087,7 +1182,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
Dictionary removable_volumes_usage_descriptions = p_preset->get("privacy/removable_volumes_usage_description_localized");
Dictionary copyrights = p_preset->get("application/copyright_localized");
- Vector<String> translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
+ Vector<String> translations = GLOBAL_GET("internationalization/locale/translations");
if (translations.size() > 0) {
{
String fname = tmp_app_path_name + "/Contents/Resources/en.lproj";
@@ -1095,7 +1190,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
Ref<FileAccess> f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
f->store_line("/* Localized versions of Info.plist keys */");
f->store_line("");
- f->store_line("CFBundleDisplayName = \"" + ProjectSettings::get_singleton()->get("application/config/name").operator String() + "\";");
+ f->store_line("CFBundleDisplayName = \"" + GLOBAL_GET("application/config/name").operator String() + "\";");
if (!((String)p_preset->get("privacy/microphone_usage_description")).is_empty()) {
f->store_line("NSMicrophoneUsageDescription = \"" + p_preset->get("privacy/microphone_usage_description").operator String() + "\";");
}
@@ -1257,7 +1352,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
if (p_preset->get("application/icon") != "") {
iconpath = p_preset->get("application/icon");
} else {
- iconpath = ProjectSettings::get_singleton()->get("application/config/icon");
+ iconpath = GLOBAL_GET("application/config/icon");
}
if (!iconpath.is_empty()) {
@@ -1270,9 +1365,9 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
} else {
Ref<Image> icon;
icon.instantiate();
- icon->load(iconpath);
- if (!icon->is_empty()) {
- _make_icon(icon, data);
+ err = ImageLoader::load_image(iconpath, icon);
+ if (err == OK && !icon->is_empty()) {
+ _make_icon(p_preset, icon, data);
}
}
}
@@ -1817,7 +1912,7 @@ bool EditorExportPlatformMacOS::has_valid_project_configuration(const Ref<Editor
err += TTR("Notarization: Code signing is required for notarization.") + "\n";
valid = false;
}
- if (notary_tool == 2) {
+ if (notary_tool == 2 || notary_tool == 3) {
if (!FileAccess::exists("/usr/bin/xcrun") && !FileAccess::exists("/bin/xcrun")) {
err += TTR("Notarization: Xcode command line tools are not installed.") + "\n";
valid = false;
@@ -1832,11 +1927,11 @@ bool EditorExportPlatformMacOS::has_valid_project_configuration(const Ref<Editor
if (p_preset->get("notarization/apple_id_name") != "") {
if (p_preset->get("notarization/apple_id_password") == "") {
err += TTR("Notarization: Apple ID password not specified.") + "\n";
+ valid = false;
}
- valid = false;
}
if (p_preset->get("notarization/api_uuid") != "") {
- if (p_preset->get("notarization/api_key") == "") {
+ if (p_preset->get("notarization/api_key_id") == "") {
err += TTR("Notarization: App Store Connect API key ID not specified.") + "\n";
valid = false;
}
@@ -1847,12 +1942,12 @@ bool EditorExportPlatformMacOS::has_valid_project_configuration(const Ref<Editor
err += TTR("Notarization: App Store Connect issuer ID name not specified.") + "\n";
valid = false;
}
- if (p_preset->get("notarization/api_key") == "") {
+ if (p_preset->get("notarization/api_key_id") == "") {
err += TTR("Notarization: App Store Connect API key ID not specified.") + "\n";
valid = false;
}
- String rcodesign = EditorSettings::get_singleton()->get("export/macos/rcodesign").operator String();
+ String rcodesign = EDITOR_GET("export/macos/rcodesign").operator String();
if (rcodesign.is_empty()) {
err += TTR("Notarization: rcodesign path is not set. Configure rcodesign path in the Editor Settings (Export > macOS > rcodesign).") + "\n";
valid = false;
@@ -1875,7 +1970,7 @@ bool EditorExportPlatformMacOS::has_valid_project_configuration(const Ref<Editor
valid = false;
}
} else if (codesign_tool == 2) {
- String rcodesign = EditorSettings::get_singleton()->get("export/macos/rcodesign").operator String();
+ String rcodesign = EDITOR_GET("export/macos/rcodesign").operator String();
if (rcodesign.is_empty()) {
err += TTR("Code signing: rcodesign path is not set. Configure rcodesign path in the Editor Settings (Export > macOS > rcodesign).") + "\n";
valid = false;
diff --git a/platform/macos/export/export_plugin.h b/platform/macos/export/export_plugin.h
index b6ad587caa..af7570c394 100644
--- a/platform/macos/export/export_plugin.h
+++ b/platform/macos/export/export_plugin.h
@@ -53,7 +53,7 @@ class EditorExportPlatformMacOS : public EditorExportPlatform {
Ref<ImageTexture> logo;
void _fix_plist(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &plist, const String &p_binary);
- void _make_icon(const Ref<Image> &p_icon, Vector<uint8_t> &p_data);
+ void _make_icon(const Ref<EditorExportPreset> &p_preset, const Ref<Image> &p_icon, Vector<uint8_t> &p_data);
Error _notarize(const Ref<EditorExportPreset> &p_preset, const String &p_path);
Error _code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path, const String &p_ent_path, bool p_warn = true);
diff --git a/platform/macos/export/plist.cpp b/platform/macos/export/plist.cpp
index cad014e65b..c88b6e1077 100644
--- a/platform/macos/export/plist.cpp
+++ b/platform/macos/export/plist.cpp
@@ -30,6 +30,119 @@
#include "plist.h"
+PList::PLNodeType PListNode::get_type() const {
+ return data_type;
+}
+
+Variant PListNode::get_value() const {
+ switch (data_type) {
+ case PList::PL_NODE_TYPE_NIL: {
+ return Variant();
+ } break;
+ case PList::PL_NODE_TYPE_STRING: {
+ return String::utf8(data_string.get_data());
+ } break;
+ case PList::PL_NODE_TYPE_ARRAY: {
+ Array arr;
+ for (const Ref<PListNode> &E : data_array) {
+ arr.push_back(E);
+ }
+ return arr;
+ } break;
+ case PList::PL_NODE_TYPE_DICT: {
+ Dictionary dict;
+ for (const KeyValue<String, Ref<PListNode>> &E : data_dict) {
+ dict[E.key] = E.value;
+ }
+ return dict;
+ } break;
+ case PList::PL_NODE_TYPE_BOOLEAN: {
+ return data_bool;
+ } break;
+ case PList::PL_NODE_TYPE_INTEGER: {
+ return data_int;
+ } break;
+ case PList::PL_NODE_TYPE_REAL: {
+ return data_real;
+ } break;
+ case PList::PL_NODE_TYPE_DATA: {
+ int strlen = data_string.length();
+
+ size_t arr_len = 0;
+ Vector<uint8_t> buf;
+ {
+ buf.resize(strlen / 4 * 3 + 1);
+ uint8_t *w = buf.ptrw();
+
+ ERR_FAIL_COND_V(CryptoCore::b64_decode(&w[0], buf.size(), &arr_len, (unsigned char *)data_string.get_data(), strlen) != OK, Vector<uint8_t>());
+ }
+ buf.resize(arr_len);
+ return buf;
+ } break;
+ case PList::PL_NODE_TYPE_DATE: {
+ return String(data_string.get_data());
+ } break;
+ }
+ return Variant();
+}
+
+Ref<PListNode> PListNode::new_node(const Variant &p_value) {
+ Ref<PListNode> node;
+ node.instantiate();
+
+ switch (p_value.get_type()) {
+ case Variant::NIL: {
+ node->data_type = PList::PL_NODE_TYPE_NIL;
+ } break;
+ case Variant::BOOL: {
+ node->data_type = PList::PL_NODE_TYPE_BOOLEAN;
+ node->data_bool = p_value;
+ } break;
+ case Variant::INT: {
+ node->data_type = PList::PL_NODE_TYPE_INTEGER;
+ node->data_int = p_value;
+ } break;
+ case Variant::FLOAT: {
+ node->data_type = PList::PL_NODE_TYPE_REAL;
+ node->data_real = p_value;
+ } break;
+ case Variant::STRING_NAME:
+ case Variant::STRING: {
+ node->data_type = PList::PL_NODE_TYPE_STRING;
+ node->data_string = p_value.operator String().utf8();
+ } break;
+ case Variant::DICTIONARY: {
+ node->data_type = PList::PL_NODE_TYPE_DICT;
+ Dictionary dict = p_value;
+ const Variant *next = dict.next(nullptr);
+ while (next) {
+ Ref<PListNode> sub_node = dict[*next];
+ ERR_FAIL_COND_V_MSG(sub_node.is_null(), Ref<PListNode>(), "Invalid dictionary element, should be PListNode.");
+ node->data_dict[*next] = sub_node;
+ next = dict.next(next);
+ }
+ } break;
+ case Variant::ARRAY: {
+ node->data_type = PList::PL_NODE_TYPE_ARRAY;
+ Array ar = p_value;
+ for (int i = 0; i < ar.size(); i++) {
+ Ref<PListNode> sub_node = ar[i];
+ ERR_FAIL_COND_V_MSG(sub_node.is_null(), Ref<PListNode>(), "Invalid array element, should be PListNode.");
+ node->data_array.push_back(sub_node);
+ }
+ } break;
+ case Variant::PACKED_BYTE_ARRAY: {
+ node->data_type = PList::PL_NODE_TYPE_DATA;
+ PackedByteArray buf = p_value;
+ node->data_string = CryptoCore::b64_encode_str(buf.ptr(), buf.size()).utf8();
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(Ref<PListNode>(), "Unsupported data type.");
+ } break;
+ }
+ return node;
+}
+
Ref<PListNode> PListNode::new_array() {
Ref<PListNode> node = memnew(PListNode());
ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
@@ -65,6 +178,7 @@ Ref<PListNode> PListNode::new_date(const String &p_string) {
ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
node->data_type = PList::PLNodeType::PL_NODE_TYPE_DATE;
node->data_string = p_string.utf8();
+ node->data_real = (double)Time::get_singleton()->get_unix_time_from_datetime_string(p_string) - 978307200.0;
return node;
}
@@ -76,7 +190,7 @@ Ref<PListNode> PListNode::new_bool(bool p_bool) {
return node;
}
-Ref<PListNode> PListNode::new_int(int32_t p_int) {
+Ref<PListNode> PListNode::new_int(int64_t p_int) {
Ref<PListNode> node = memnew(PListNode());
ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
node->data_type = PList::PLNodeType::PL_NODE_TYPE_INTEGER;
@@ -84,7 +198,7 @@ Ref<PListNode> PListNode::new_int(int32_t p_int) {
return node;
}
-Ref<PListNode> PListNode::new_real(float p_real) {
+Ref<PListNode> PListNode::new_real(double p_real) {
Ref<PListNode> node = memnew(PListNode());
ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
node->data_type = PList::PLNodeType::PL_NODE_TYPE_REAL;
@@ -337,6 +451,168 @@ PList::PList(const String &p_string) {
load_string(p_string);
}
+uint64_t PList::read_bplist_var_size_int(Ref<FileAccess> p_file, uint8_t p_size) {
+ uint64_t pos = p_file->get_position();
+ uint64_t ret = 0;
+ switch (p_size) {
+ case 1: {
+ ret = p_file->get_8();
+ } break;
+ case 2: {
+ ret = BSWAP16(p_file->get_16());
+ } break;
+ case 3: {
+ ret = BSWAP32(p_file->get_32() & 0x00FFFFFF);
+ } break;
+ case 4: {
+ ret = BSWAP32(p_file->get_32());
+ } break;
+ case 5: {
+ ret = BSWAP64(p_file->get_64() & 0x000000FFFFFFFFFF);
+ } break;
+ case 6: {
+ ret = BSWAP64(p_file->get_64() & 0x0000FFFFFFFFFFFF);
+ } break;
+ case 7: {
+ ret = BSWAP64(p_file->get_64() & 0x00FFFFFFFFFFFFFF);
+ } break;
+ case 8: {
+ ret = BSWAP64(p_file->get_64());
+ } break;
+ default: {
+ ret = 0;
+ }
+ }
+ p_file->seek(pos + p_size);
+
+ return ret;
+}
+
+Ref<PListNode> PList::read_bplist_obj(Ref<FileAccess> p_file, uint64_t p_offset_idx) {
+ Ref<PListNode> node;
+ node.instantiate();
+
+ uint64_t ot_off = trailer.offset_table_start + p_offset_idx * trailer.offset_size;
+ p_file->seek(ot_off);
+ uint64_t marker_off = read_bplist_var_size_int(p_file, trailer.offset_size);
+ ERR_FAIL_COND_V_MSG(marker_off == 0, Ref<PListNode>(), "Invalid marker size.");
+
+ p_file->seek(marker_off);
+ uint8_t marker = p_file->get_8();
+ uint8_t marker_type = marker & 0xF0;
+ uint64_t marker_size = marker & 0x0F;
+
+ switch (marker_type) {
+ case 0x00: {
+ if (marker_size == 0x00) {
+ node->data_type = PL_NODE_TYPE_NIL;
+ } else if (marker_size == 0x08) {
+ node->data_type = PL_NODE_TYPE_BOOLEAN;
+ node->data_bool = false;
+ } else if (marker_size == 0x09) {
+ node->data_type = PL_NODE_TYPE_BOOLEAN;
+ node->data_bool = true;
+ } else {
+ ERR_FAIL_V_MSG(Ref<PListNode>(), "Invalid nil/bool marker value.");
+ }
+ } break;
+ case 0x10: {
+ node->data_type = PL_NODE_TYPE_INTEGER;
+ node->data_int = static_cast<int64_t>(read_bplist_var_size_int(p_file, pow(2, marker_size)));
+ } break;
+ case 0x20: {
+ node->data_type = PL_NODE_TYPE_REAL;
+ node->data_int = static_cast<int64_t>(read_bplist_var_size_int(p_file, pow(2, marker_size)));
+ } break;
+ case 0x30: {
+ node->data_type = PL_NODE_TYPE_DATE;
+ node->data_int = BSWAP64(p_file->get_64());
+ node->data_string = Time::get_singleton()->get_datetime_string_from_unix_time(node->data_real + 978307200.0).utf8();
+ } break;
+ case 0x40: {
+ if (marker_size == 0x0F) {
+ uint8_t ext = p_file->get_8() & 0xF;
+ marker_size = read_bplist_var_size_int(p_file, pow(2, ext));
+ }
+ node->data_type = PL_NODE_TYPE_DATA;
+ PackedByteArray buf;
+ buf.resize(marker_size + 1);
+ p_file->get_buffer(reinterpret_cast<uint8_t *>(buf.ptrw()), marker_size);
+ node->data_string = CryptoCore::b64_encode_str(buf.ptr(), buf.size()).utf8();
+ } break;
+ case 0x50: {
+ if (marker_size == 0x0F) {
+ uint8_t ext = p_file->get_8() & 0xF;
+ marker_size = read_bplist_var_size_int(p_file, pow(2, ext));
+ }
+ node->data_type = PL_NODE_TYPE_STRING;
+ node->data_string.resize(marker_size + 1);
+ p_file->get_buffer(reinterpret_cast<uint8_t *>(node->data_string.ptrw()), marker_size);
+ } break;
+ case 0x60: {
+ if (marker_size == 0x0F) {
+ uint8_t ext = p_file->get_8() & 0xF;
+ marker_size = read_bplist_var_size_int(p_file, pow(2, ext));
+ }
+ Char16String cs16;
+ cs16.resize(marker_size + 1);
+ for (uint64_t i = 0; i < marker_size; i++) {
+ cs16[i] = BSWAP16(p_file->get_16());
+ }
+ node->data_type = PL_NODE_TYPE_STRING;
+ node->data_string = String::utf16(cs16.ptr(), cs16.length()).utf8();
+ } break;
+ case 0x80: {
+ node->data_type = PL_NODE_TYPE_INTEGER;
+ node->data_int = static_cast<int64_t>(read_bplist_var_size_int(p_file, marker_size + 1));
+ } break;
+ case 0xA0:
+ case 0xC0: {
+ if (marker_size == 0x0F) {
+ uint8_t ext = p_file->get_8() & 0xF;
+ marker_size = read_bplist_var_size_int(p_file, pow(2, ext));
+ }
+ uint64_t pos = p_file->get_position();
+
+ node->data_type = PL_NODE_TYPE_ARRAY;
+ for (uint64_t i = 0; i < marker_size; i++) {
+ p_file->seek(pos + trailer.ref_size * i);
+ uint64_t ref = read_bplist_var_size_int(p_file, trailer.ref_size);
+
+ Ref<PListNode> element = read_bplist_obj(p_file, ref);
+ ERR_FAIL_COND_V(element.is_null(), Ref<PListNode>());
+ node->data_array.push_back(element);
+ }
+ } break;
+ case 0xD0: {
+ if (marker_size == 0x0F) {
+ uint8_t ext = p_file->get_8() & 0xF;
+ marker_size = read_bplist_var_size_int(p_file, pow(2, ext));
+ }
+ uint64_t pos = p_file->get_position();
+
+ node->data_type = PL_NODE_TYPE_DICT;
+ for (uint64_t i = 0; i < marker_size; i++) {
+ p_file->seek(pos + trailer.ref_size * i);
+ uint64_t key_ref = read_bplist_var_size_int(p_file, trailer.ref_size);
+
+ p_file->seek(pos + trailer.ref_size * (i + marker_size));
+ uint64_t obj_ref = read_bplist_var_size_int(p_file, trailer.ref_size);
+
+ Ref<PListNode> element_key = read_bplist_obj(p_file, key_ref);
+ ERR_FAIL_COND_V(element_key.is_null() || element_key->data_type != PL_NODE_TYPE_STRING, Ref<PListNode>());
+ Ref<PListNode> element = read_bplist_obj(p_file, obj_ref);
+ ERR_FAIL_COND_V(element.is_null(), Ref<PListNode>());
+ node->data_dict[String::utf8(element_key->data_string.ptr(), element_key->data_string.length())] = element;
+ }
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(Ref<PListNode>(), "Invalid marker type.");
+ }
+ }
+ return node;
+}
+
bool PList::load_file(const String &p_filename) {
root = Ref<PListNode>();
@@ -349,11 +625,19 @@ bool PList::load_file(const String &p_filename) {
fb->get_buffer(magic, 8);
if (String((const char *)magic, 8) == "bplist00") {
- ERR_FAIL_V_MSG(false, "PList: Binary property lists are not supported.");
+ fb->seek_end(-26);
+ trailer.offset_size = fb->get_8();
+ trailer.ref_size = fb->get_8();
+ trailer.object_num = BSWAP64(fb->get_64());
+ trailer.root_offset_idx = BSWAP64(fb->get_64());
+ trailer.offset_table_start = BSWAP64(fb->get_64());
+ root = read_bplist_obj(fb, trailer.root_offset_idx);
+
+ return root.is_valid();
} else {
// Load text plist.
Error err;
- Vector<uint8_t> array = FileAccess::get_file_as_array(p_filename, &err);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(p_filename, &err);
ERR_FAIL_COND_V(err != OK, false);
String ret;
diff --git a/platform/macos/export/plist.h b/platform/macos/export/plist.h
index 97331a3629..d53e88832f 100644
--- a/platform/macos/export/plist.h
+++ b/platform/macos/export/plist.h
@@ -35,6 +35,7 @@
#include "core/crypto/crypto_core.h"
#include "core/io/file_access.h"
+#include "core/os/time.h"
class PListNode;
@@ -55,8 +56,20 @@ public:
};
private:
+ struct PListTrailer {
+ uint8_t offset_size;
+ uint8_t ref_size;
+ uint64_t object_num;
+ uint64_t root_offset_idx;
+ uint64_t offset_table_start;
+ };
+
+ PListTrailer trailer;
Ref<PListNode> root;
+ uint64_t read_bplist_var_size_int(Ref<FileAccess> p_file, uint8_t p_size);
+ Ref<PListNode> read_bplist_obj(Ref<FileAccess> p_file, uint64_t p_offset_idx);
+
public:
PList();
PList(const String &p_string);
@@ -82,19 +95,23 @@ public:
Vector<Ref<PListNode>> data_array;
HashMap<String, Ref<PListNode>> data_dict;
union {
- int32_t data_int;
+ int64_t data_int;
bool data_bool;
- float data_real;
+ double data_real;
};
+ PList::PLNodeType get_type() const;
+ Variant get_value() const;
+
+ static Ref<PListNode> new_node(const Variant &p_value);
static Ref<PListNode> new_array();
static Ref<PListNode> new_dict();
static Ref<PListNode> new_string(const String &p_string);
static Ref<PListNode> new_data(const String &p_string);
static Ref<PListNode> new_date(const String &p_string);
static Ref<PListNode> new_bool(bool p_bool);
- static Ref<PListNode> new_int(int32_t p_int);
- static Ref<PListNode> new_real(float p_real);
+ static Ref<PListNode> new_int(int64_t p_int);
+ static Ref<PListNode> new_real(double p_real);
bool push_subnode(const Ref<PListNode> &p_node, const String &p_key = "");
diff --git a/platform/macos/gl_manager_macos_legacy.h b/platform/macos/gl_manager_macos_legacy.h
index 8752086551..d7ad5b1197 100644
--- a/platform/macos/gl_manager_macos_legacy.h
+++ b/platform/macos/gl_manager_macos_legacy.h
@@ -89,6 +89,8 @@ public:
void set_use_vsync(bool p_use);
bool is_using_vsync() const;
+ NSOpenGLContext *get_context(DisplayServer::WindowID p_window_id);
+
GLManager_MacOS(ContextType p_context_type);
~GLManager_MacOS();
};
diff --git a/platform/macos/gl_manager_macos_legacy.mm b/platform/macos/gl_manager_macos_legacy.mm
index dec4821b86..ea5c36da6c 100644
--- a/platform/macos/gl_manager_macos_legacy.mm
+++ b/platform/macos/gl_manager_macos_legacy.mm
@@ -215,6 +215,15 @@ bool GLManager_MacOS::is_using_vsync() const {
return use_vsync;
}
+NSOpenGLContext *GLManager_MacOS::get_context(DisplayServer::WindowID p_window_id) {
+ if (!windows.has(p_window_id)) {
+ return nullptr;
+ }
+
+ GLWindow &win = windows[p_window_id];
+ return win.context;
+}
+
GLManager_MacOS::GLManager_MacOS(ContextType p_context_type) {
context_type = p_context_type;
}
diff --git a/platform/macos/godot_application_delegate.mm b/platform/macos/godot_application_delegate.mm
index bacdcc2bc4..f1168c685a 100644
--- a/platform/macos/godot_application_delegate.mm
+++ b/platform/macos/godot_application_delegate.mm
@@ -61,7 +61,9 @@
- (void)applicationDidFinishLaunching:(NSNotification *)notice {
NSString *nsappname = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
- if (nsappname == nil || isatty(STDOUT_FILENO) || isatty(STDIN_FILENO) || isatty(STDERR_FILENO)) {
+ NSString *nsbundleid_env = [NSString stringWithUTF8String:getenv("__CFBundleIdentifier")];
+ NSString *nsbundleid = [[NSBundle mainBundle] bundleIdentifier];
+ if (nsappname == nil || isatty(STDOUT_FILENO) || isatty(STDIN_FILENO) || isatty(STDERR_FILENO) || ![nsbundleid isEqualToString:nsbundleid_env]) {
// If the executable is started from terminal or is not bundled, macOS WindowServer won't register and activate app window correctly (menu and title bar are grayed out and input ignored).
[self performSelector:@selector(forceUnbundledWindowActivationHackStep1) withObject:nil afterDelay:0.02];
}
diff --git a/platform/macos/godot_window_delegate.mm b/platform/macos/godot_window_delegate.mm
index 279fd2a359..27efd3ebb2 100644
--- a/platform/macos/godot_window_delegate.mm
+++ b/platform/macos/godot_window_delegate.mm
@@ -147,7 +147,12 @@
}
DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
+ if (wd.exclusive_fullscreen) {
+ [NSApp setPresentationOptions:NSApplicationPresentationDefault];
+ }
+
wd.fullscreen = false;
+ wd.exclusive_fullscreen = false;
[(GodotWindow *)wd.window_object setAnimDuration:-1.0f];
@@ -251,6 +256,15 @@
}
}
+- (void)windowDidChangeScreen:(NSNotification *)notification {
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
+ if (!ds || !ds->has_window(window_id)) {
+ return;
+ }
+
+ ds->reparent_check(window_id);
+}
+
- (void)windowDidMove:(NSNotification *)notification {
DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
diff --git a/platform/macos/os_macos.h b/platform/macos/os_macos.h
index 46e7c17ebe..b2734e57cc 100644
--- a/platform/macos/os_macos.h
+++ b/platform/macos/os_macos.h
@@ -57,6 +57,10 @@ class OS_MacOS : public OS_Unix {
List<String> launch_service_args;
+ CGFloat _weight_to_ct(int p_weight) const;
+ CGFloat _stretch_to_ct(int p_stretch) const;
+ String _get_default_fontname(const String &p_font_name) const;
+
static _FORCE_INLINE_ String get_framework_executable(const String &p_path);
static void pre_wait_observer_cb(CFRunLoopObserverRef p_observer, CFRunLoopActivity p_activiy, void *p_context);
@@ -98,7 +102,8 @@ public:
virtual String get_locale() const override;
virtual Vector<String> get_system_fonts() const override;
- virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const override;
+ virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
+ virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
virtual String get_executable_path() const override;
virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override;
virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
diff --git a/platform/macos/os_macos.mm b/platform/macos/os_macos.mm
index 8ffb0abfdb..fd8ba38808 100644
--- a/platform/macos/os_macos.mm
+++ b/platform/macos/os_macos.mm
@@ -45,16 +45,6 @@
#include <os/log.h>
#include <sys/sysctl.h>
-_FORCE_INLINE_ String OS_MacOS::get_framework_executable(const String &p_path) {
- // Append framework executable name, or return as is if p_path is not a framework.
- Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- if (da->dir_exists(p_path) && da->file_exists(p_path.path_join(p_path.get_file().get_basename()))) {
- return p_path.path_join(p_path.get_file().get_basename());
- } else {
- return p_path;
- }
-}
-
void OS_MacOS::pre_wait_observer_cb(CFRunLoopObserverRef p_observer, CFRunLoopActivity p_activiy, void *p_context) {
// Prevent main loop from sleeping and redraw window during modal popup display.
// Do not redraw when rendering is done from the separate thread, it will conflict with the OpenGL context updates.
@@ -162,6 +152,28 @@ void OS_MacOS::alert(const String &p_alert, const String &p_title) {
}
}
+_FORCE_INLINE_ String OS_MacOS::get_framework_executable(const String &p_path) {
+ Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+
+ // Read framework bundle to get executable name.
+ NSURL *url = [NSURL fileURLWithPath:@(p_path.utf8().get_data())];
+ NSBundle *bundle = [NSBundle bundleWithURL:url];
+ if (bundle) {
+ String exe_path = String::utf8([[bundle executablePath] UTF8String]);
+ if (da->file_exists(exe_path)) {
+ return exe_path;
+ }
+ }
+
+ // Try default executable name (invalid framework).
+ if (da->dir_exists(p_path) && da->file_exists(p_path.path_join(p_path.get_file().get_basename()))) {
+ return p_path.path_join(p_path.get_file().get_basename());
+ }
+
+ // Not a framework, try loading as .dylib.
+ return p_path;
+}
+
Error OS_MacOS::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
String path = get_framework_executable(p_path);
@@ -190,14 +202,6 @@ MainLoop *OS_MacOS::get_main_loop() const {
}
String OS_MacOS::get_config_path() const {
- // The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on macOS as well.
- if (has_environment("XDG_CONFIG_HOME")) {
- if (get_environment("XDG_CONFIG_HOME").is_absolute_path()) {
- return get_environment("XDG_CONFIG_HOME");
- } else {
- WARN_PRINT_ONCE("`XDG_CONFIG_HOME` is a relative path. Ignoring its value and falling back to `$HOME/Library/Application Support` or `.` per the XDG Base Directory specification.");
- }
- }
if (has_environment("HOME")) {
return get_environment("HOME").path_join("Library/Application Support");
}
@@ -205,26 +209,10 @@ String OS_MacOS::get_config_path() const {
}
String OS_MacOS::get_data_path() const {
- // The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on macOS as well.
- if (has_environment("XDG_DATA_HOME")) {
- if (get_environment("XDG_DATA_HOME").is_absolute_path()) {
- return get_environment("XDG_DATA_HOME");
- } else {
- WARN_PRINT_ONCE("`XDG_DATA_HOME` is a relative path. Ignoring its value and falling back to `get_config_path()` per the XDG Base Directory specification.");
- }
- }
return get_config_path();
}
String OS_MacOS::get_cache_path() const {
- // The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on macOS as well.
- if (has_environment("XDG_CACHE_HOME")) {
- if (get_environment("XDG_CACHE_HOME").is_absolute_path()) {
- return get_environment("XDG_CACHE_HOME");
- } else {
- WARN_PRINT_ONCE("`XDG_CACHE_HOME` is a relative path. Ignoring its value and falling back to `$HOME/Library/Caches` or `get_config_path()` per the XDG Base Directory specification.");
- }
- }
if (has_environment("HOME")) {
return get_environment("HOME").path_join("Library/Caches");
}
@@ -336,9 +324,7 @@ Vector<String> OS_MacOS::get_system_fonts() const {
return ret;
}
-String OS_MacOS::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
- String ret;
-
+String OS_MacOS::_get_default_fontname(const String &p_font_name) const {
String font_name = p_font_name;
if (font_name.to_lower() == "sans-serif") {
font_name = "Helvetica";
@@ -351,21 +337,153 @@ String OS_MacOS::get_system_font_path(const String &p_font_name, bool p_bold, bo
} else if (font_name.to_lower() == "cursive") {
font_name = "Apple Chancery";
};
+ return font_name;
+}
+
+CGFloat OS_MacOS::_weight_to_ct(int p_weight) const {
+ if (p_weight < 150) {
+ return -0.80;
+ } else if (p_weight < 250) {
+ return -0.60;
+ } else if (p_weight < 350) {
+ return -0.40;
+ } else if (p_weight < 450) {
+ return 0.0;
+ } else if (p_weight < 550) {
+ return 0.23;
+ } else if (p_weight < 650) {
+ return 0.30;
+ } else if (p_weight < 750) {
+ return 0.40;
+ } else if (p_weight < 850) {
+ return 0.56;
+ } else if (p_weight < 925) {
+ return 0.62;
+ } else {
+ return 1.00;
+ }
+}
+
+CGFloat OS_MacOS::_stretch_to_ct(int p_stretch) const {
+ if (p_stretch < 56) {
+ return -0.5;
+ } else if (p_stretch < 69) {
+ return -0.37;
+ } else if (p_stretch < 81) {
+ return -0.25;
+ } else if (p_stretch < 93) {
+ return -0.13;
+ } else if (p_stretch < 106) {
+ return 0.0;
+ } else if (p_stretch < 137) {
+ return 0.13;
+ } else if (p_stretch < 144) {
+ return 0.25;
+ } else if (p_stretch < 162) {
+ return 0.37;
+ } else {
+ return 0.5;
+ }
+}
+
+Vector<String> OS_MacOS::get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale, const String &p_script, int p_weight, int p_stretch, bool p_italic) const {
+ Vector<String> ret;
+ String font_name = _get_default_fontname(p_font_name);
+
+ CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name.utf8().get_data(), kCFStringEncodingUTF8);
+ CTFontSymbolicTraits traits = 0;
+ if (p_weight >= 700) {
+ traits |= kCTFontBoldTrait;
+ }
+ if (p_italic) {
+ traits |= kCTFontItalicTrait;
+ }
+ if (p_stretch < 100) {
+ traits |= kCTFontCondensedTrait;
+ } else if (p_stretch > 100) {
+ traits |= kCTFontExpandedTrait;
+ }
+
+ CFNumberRef sym_traits = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &traits);
+ CFMutableDictionaryRef traits_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
+ CFDictionaryAddValue(traits_dict, kCTFontSymbolicTrait, sym_traits);
+
+ CGFloat weight = _weight_to_ct(p_weight);
+ CFNumberRef font_weight = CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &weight);
+ CFDictionaryAddValue(traits_dict, kCTFontWeightTrait, font_weight);
+
+ CGFloat stretch = _stretch_to_ct(p_stretch);
+ CFNumberRef font_stretch = CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &stretch);
+ CFDictionaryAddValue(traits_dict, kCTFontWidthTrait, font_stretch);
+
+ CFMutableDictionaryRef attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
+ CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, name);
+ CFDictionaryAddValue(attributes, kCTFontTraitsAttribute, traits_dict);
+
+ CTFontDescriptorRef font = CTFontDescriptorCreateWithAttributes(attributes);
+ if (font) {
+ CTFontRef family = CTFontCreateWithFontDescriptor(font, 0, nullptr);
+ CFStringRef string = CFStringCreateWithCString(kCFAllocatorDefault, p_text.utf8().get_data(), kCFStringEncodingUTF8);
+ CFRange range = CFRangeMake(0, CFStringGetLength(string));
+ CTFontRef fallback_family = CTFontCreateForString(family, string, range);
+ if (fallback_family) {
+ CTFontDescriptorRef fallback_font = CTFontCopyFontDescriptor(fallback_family);
+ if (fallback_font) {
+ CFURLRef url = (CFURLRef)CTFontDescriptorCopyAttribute(fallback_font, kCTFontURLAttribute);
+ if (url) {
+ NSString *font_path = [NSString stringWithString:[(__bridge NSURL *)url path]];
+ ret.push_back(String::utf8([font_path UTF8String]));
+ CFRelease(url);
+ }
+ CFRelease(fallback_font);
+ }
+ CFRelease(fallback_family);
+ }
+ CFRelease(string);
+ CFRelease(font);
+ }
+
+ CFRelease(attributes);
+ CFRelease(traits_dict);
+ CFRelease(sym_traits);
+ CFRelease(font_stretch);
+ CFRelease(font_weight);
+ CFRelease(name);
+
+ return ret;
+}
+
+String OS_MacOS::get_system_font_path(const String &p_font_name, int p_weight, int p_stretch, bool p_italic) const {
+ String ret;
+ String font_name = _get_default_fontname(p_font_name);
CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name.utf8().get_data(), kCFStringEncodingUTF8);
CTFontSymbolicTraits traits = 0;
- if (p_bold) {
+ if (p_weight > 700) {
traits |= kCTFontBoldTrait;
}
if (p_italic) {
traits |= kCTFontItalicTrait;
}
+ if (p_stretch < 100) {
+ traits |= kCTFontCondensedTrait;
+ } else if (p_stretch > 100) {
+ traits |= kCTFontExpandedTrait;
+ }
CFNumberRef sym_traits = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &traits);
CFMutableDictionaryRef traits_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
CFDictionaryAddValue(traits_dict, kCTFontSymbolicTrait, sym_traits);
+ CGFloat weight = _weight_to_ct(p_weight);
+ CFNumberRef font_weight = CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &weight);
+ CFDictionaryAddValue(traits_dict, kCTFontWeightTrait, font_weight);
+
+ CGFloat stretch = _stretch_to_ct(p_stretch);
+ CFNumberRef font_stretch = CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &stretch);
+ CFDictionaryAddValue(traits_dict, kCTFontWidthTrait, font_stretch);
+
CFMutableDictionaryRef attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, nullptr, nullptr);
CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, name);
CFDictionaryAddValue(attributes, kCTFontTraitsAttribute, traits_dict);
@@ -384,6 +502,8 @@ String OS_MacOS::get_system_font_path(const String &p_font_name, bool p_bold, bo
CFRelease(attributes);
CFRelease(traits_dict);
CFRelease(sym_traits);
+ CFRelease(font_stretch);
+ CFRelease(font_weight);
CFRelease(name);
return ret;
@@ -499,7 +619,14 @@ String OS_MacOS::get_unique_id() const {
}
bool OS_MacOS::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "pc";
+ if (p_feature == "system_fonts") {
+ return true;
+ }
+ if (p_feature == "pc") {
+ return true;
+ }
+
+ return false;
}
void OS_MacOS::disable_crash_handler() {
diff --git a/platform/macos/platform_config.h b/platform/macos/platform_config.h
index e114606b82..46c46b8803 100644
--- a/platform/macos/platform_config.h
+++ b/platform/macos/platform_config.h
@@ -30,5 +30,5 @@
#include <alloca.h>
-#define OPENGL_INCLUDE_H "thirdparty/glad/glad/glad.h"
+#define OPENGL_INCLUDE_H "thirdparty/glad/glad/gl.h"
#define PTHREAD_RENAME_SELF
diff --git a/platform/macos/vulkan_context_macos.h b/platform/macos/vulkan_context_macos.h
index 579c42b042..2a81336994 100644
--- a/platform/macos/vulkan_context_macos.h
+++ b/platform/macos/vulkan_context_macos.h
@@ -31,6 +31,8 @@
#ifndef VULKAN_CONTEXT_MACOS_H
#define VULKAN_CONTEXT_MACOS_H
+#ifdef VULKAN_ENABLED
+
#include "drivers/vulkan/vulkan_context.h"
#import <AppKit/AppKit.h>
@@ -44,4 +46,6 @@ public:
~VulkanContextMacOS();
};
+#endif // VULKAN_ENABLED
+
#endif // VULKAN_CONTEXT_MACOS_H
diff --git a/platform/macos/vulkan_context_macos.mm b/platform/macos/vulkan_context_macos.mm
index cf317f3c68..1df6b3ed18 100644
--- a/platform/macos/vulkan_context_macos.mm
+++ b/platform/macos/vulkan_context_macos.mm
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifdef VULKAN_ENABLED
#include "vulkan_context_macos.h"
#ifdef USE_VOLK
#include <volk.h>
@@ -57,3 +58,5 @@ VulkanContextMacOS::VulkanContextMacOS() {
VulkanContextMacOS::~VulkanContextMacOS() {
}
+
+#endif // VULKAN_ENABLED
diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp
index 4e4afb9704..ab0b20762f 100644
--- a/platform/uwp/export/export_plugin.cpp
+++ b/platform/uwp/export/export_plugin.cpp
@@ -442,7 +442,7 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
#ifdef WINDOWS_ENABLED
// Sign with signtool
- String signtool_path = EditorSettings::get_singleton()->get("export/uwp/signtool");
+ String signtool_path = EDITOR_GET("export/uwp/signtool");
if (signtool_path.is_empty()) {
return OK;
}
@@ -454,9 +454,9 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
static String algs[] = { "MD5", "SHA1", "SHA256" };
- String cert_path = EditorSettings::get_singleton()->get("export/uwp/debug_certificate");
- String cert_pass = EditorSettings::get_singleton()->get("export/uwp/debug_password");
- int cert_alg = EditorSettings::get_singleton()->get("export/uwp/debug_algorithm");
+ String cert_path = EDITOR_GET("export/uwp/debug_certificate");
+ String cert_pass = EDITOR_GET("export/uwp/debug_password");
+ int cert_alg = EDITOR_GET("export/uwp/debug_algorithm");
if (!p_debug) {
cert_path = p_preset->get("signing/certificate");
diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h
index b0427d1a65..74b9ab4875 100644
--- a/platform/uwp/export/export_plugin.h
+++ b/platform/uwp/export/export_plugin.h
@@ -213,7 +213,7 @@ class EditorExportPlatformUWP : public EditorExportPlatform {
String architecture = arch == "arm32" ? "arm" : (arch == "x86_32" ? "x86" : "x64");
result = result.replace("$architecture$", architecture);
- result = result.replace("$display_name$", String(p_preset->get("package/display_name")).is_empty() ? (String)ProjectSettings::get_singleton()->get("application/config/name") : String(p_preset->get("package/display_name")));
+ result = result.replace("$display_name$", String(p_preset->get("package/display_name")).is_empty() ? (String)GLOBAL_GET("application/config/name") : String(p_preset->get("package/display_name")));
result = result.replace("$publisher_display_name$", p_preset->get("package/publisher_display_name"));
result = result.replace("$app_description$", p_preset->get("package/description"));
diff --git a/platform/web/SCsub b/platform/web/SCsub
index cb00fa9f5b..e44e59bfb9 100644
--- a/platform/web/SCsub
+++ b/platform/web/SCsub
@@ -35,6 +35,12 @@ sys_env.AddJSLibraries(
"js/libs/library_godot_os.js",
"js/libs/library_godot_runtime.js",
"js/libs/library_godot_input.js",
+ "js/libs/library_godot_webgl2.js",
+ ]
+)
+sys_env.AddJSExterns(
+ [
+ "js/libs/library_godot_webgl2.externs.js",
]
)
@@ -43,9 +49,9 @@ if env["javascript_eval"]:
for lib in sys_env["JS_LIBS"]:
sys_env.Append(LINKFLAGS=["--js-library", lib.abspath])
-for js in env["JS_PRE"]:
+for js in sys_env["JS_PRE"]:
sys_env.Append(LINKFLAGS=["--pre-js", js.abspath])
-for ext in env["JS_EXTERNS"]:
+for ext in sys_env["JS_EXTERNS"]:
sys_env["ENV"]["EMCC_CLOSURE_ARGS"] += " --externs " + ext.abspath
build = []
diff --git a/platform/web/display_server_web.cpp b/platform/web/display_server_web.cpp
index f6a61b18e4..d057010c02 100644
--- a/platform/web/display_server_web.cpp
+++ b/platform/web/display_server_web.cpp
@@ -54,7 +54,15 @@ DisplayServerWeb *DisplayServerWeb::get_singleton() {
// Window (canvas)
bool DisplayServerWeb::check_size_force_redraw() {
- return godot_js_display_size_update() != 0;
+ bool size_changed = godot_js_display_size_update() != 0;
+ if (size_changed && !rect_changed_callback.is_null()) {
+ Variant size = Rect2i(Point2i(), window_get_size()); // TODO use window_get_position if implemented.
+ Variant *vp = &size;
+ Variant ret;
+ Callable::CallError ce;
+ rect_changed_callback.callp((const Variant **)&vp, 1, ret, ce);
+ }
+ return size_changed;
}
void DisplayServerWeb::fullscreen_change_callback(int p_fullscreen) {
@@ -212,7 +220,7 @@ int DisplayServerWeb::mouse_button_callback(int p_pressed, int p_button, double
void DisplayServerWeb::mouse_move_callback(double p_x, double p_y, double p_rel_x, double p_rel_y, int p_modifiers) {
MouseButton input_mask = Input::get_singleton()->get_mouse_button_mask();
// For motion outside the canvas, only read mouse movement if dragging
- // started inside the canvas; imitating desktop app behaviour.
+ // started inside the canvas; imitating desktop app behavior.
if (!get_singleton()->cursor_inside_canvas && input_mask == MouseButton::NONE) {
return;
}
@@ -571,8 +579,8 @@ void DisplayServerWeb::touch_callback(int p_type, int p_count) {
}
}
-bool DisplayServerWeb::screen_is_touchscreen(int p_screen) const {
- return godot_js_display_touchscreen_is_available();
+bool DisplayServerWeb::is_touchscreen_available() const {
+ return godot_js_display_touchscreen_is_available() || (Input::get_singleton() && Input::get_singleton()->is_emulating_touch_from_mouse());
}
// Virtual Keyboard
@@ -738,11 +746,11 @@ void DisplayServerWeb::_dispatch_input_event(const Ref<InputEvent> &p_event) {
}
}
-DisplayServer *DisplayServerWeb::create_func(const String &p_rendering_driver, WindowMode p_window_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Size2i &p_resolution, Error &r_error) {
- return memnew(DisplayServerWeb(p_rendering_driver, p_window_mode, p_vsync_mode, p_flags, p_resolution, r_error));
+DisplayServer *DisplayServerWeb::create_func(const String &p_rendering_driver, WindowMode p_window_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Point2i *p_position, const Size2i &p_resolution, Error &r_error) {
+ return memnew(DisplayServerWeb(p_rendering_driver, p_window_mode, p_vsync_mode, p_flags, p_position, p_resolution, r_error));
}
-DisplayServerWeb::DisplayServerWeb(const String &p_rendering_driver, WindowMode p_window_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Size2i &p_resolution, Error &r_error) {
+DisplayServerWeb::DisplayServerWeb(const String &p_rendering_driver, WindowMode p_window_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Point2i *p_position, const Size2i &p_resolution, Error &r_error) {
r_error = OK; // Always succeeds for now.
// Ensure the canvas ID.
@@ -758,10 +766,8 @@ DisplayServerWeb::DisplayServerWeb(const String &p_rendering_driver, WindowMode
godot_js_os_request_quit_cb(request_quit_callback);
#ifdef GLES3_ENABLED
- // TODO "vulkan" defaults to webgl2 for now.
- bool wants_webgl2 = p_rendering_driver == "opengl3" || p_rendering_driver == "vulkan";
- bool webgl2_init_failed = wants_webgl2 && !godot_js_display_has_webgl(2);
- if (wants_webgl2 && !webgl2_init_failed) {
+ bool webgl2_inited = false;
+ if (godot_js_display_has_webgl(2)) {
EmscriptenWebGLContextAttributes attributes;
emscripten_webgl_init_context_attributes(&attributes);
attributes.alpha = OS::get_singleton()->is_layered_allowed();
@@ -770,17 +776,17 @@ DisplayServerWeb::DisplayServerWeb(const String &p_rendering_driver, WindowMode
attributes.explicitSwapControl = true;
webgl_ctx = emscripten_webgl_create_context(canvas_id, &attributes);
- if (emscripten_webgl_make_context_current(webgl_ctx) != EMSCRIPTEN_RESULT_SUCCESS) {
- webgl2_init_failed = true;
- } else {
- RasterizerGLES3::make_current();
- }
+ webgl2_inited = webgl_ctx && emscripten_webgl_make_context_current(webgl_ctx) == EMSCRIPTEN_RESULT_SUCCESS;
}
- if (webgl2_init_failed) {
+ if (webgl2_inited) {
+ if (!emscripten_webgl_enable_extension(webgl_ctx, "OVR_multiview2")) {
+ print_verbose("Failed to enable WebXR extension.");
+ }
+ RasterizerGLES3::make_current();
+
+ } else {
OS::get_singleton()->alert("Your browser does not seem to support WebGL2. Please update your browser version.",
"Unable to initialize video driver");
- }
- if (!wants_webgl2 || webgl2_init_failed) {
RasterizerDummy::make_current();
}
#else
@@ -905,7 +911,7 @@ ObjectID DisplayServerWeb::window_get_attached_instance_id(WindowID p_window) co
}
void DisplayServerWeb::window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window) {
- // Not supported.
+ rect_changed_callback = p_callable;
}
void DisplayServerWeb::window_set_window_event_callback(const Callable &p_callable, WindowID p_window) {
@@ -937,7 +943,11 @@ void DisplayServerWeb::window_set_current_screen(int p_screen, WindowID p_window
}
Point2i DisplayServerWeb::window_get_position(WindowID p_window) const {
- return Point2i(); // TODO Does this need implementation?
+ return Point2i();
+}
+
+Point2i DisplayServerWeb::window_get_position_with_decorations(WindowID p_window) const {
+ return Point2i();
}
void DisplayServerWeb::window_set_position(const Point2i &p_position, WindowID p_window) {
@@ -974,7 +984,7 @@ Size2i DisplayServerWeb::window_get_size(WindowID p_window) const {
return Size2i(size[0], size[1]);
}
-Size2i DisplayServerWeb::window_get_real_size(WindowID p_window) const {
+Size2i DisplayServerWeb::window_get_size_with_decorations(WindowID p_window) const {
return window_get_size(p_window);
}
diff --git a/platform/web/display_server_web.h b/platform/web/display_server_web.h
index 85076b906f..fce98ec3d0 100644
--- a/platform/web/display_server_web.h
+++ b/platform/web/display_server_web.h
@@ -60,6 +60,7 @@ private:
WindowMode window_mode = WINDOW_MODE_WINDOWED;
ObjectID window_attached_instance_id = {};
+ Callable rect_changed_callback;
Callable window_event_callback;
Callable input_event_callback;
Callable input_text_callback;
@@ -96,7 +97,7 @@ private:
static void _js_utterance_callback(int p_event, int p_id, int p_pos);
static Vector<String> get_rendering_drivers_func();
- static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_window_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_window_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
static void _dispatch_input_event(const Ref<InputEvent> &p_event);
@@ -142,7 +143,7 @@ public:
virtual Point2i mouse_get_position() const override;
// touch
- virtual bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
+ virtual bool is_touchscreen_available() const override;
// clipboard
virtual void clipboard_set(const String &p_text) override;
@@ -181,6 +182,7 @@ public:
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_transient(WindowID p_window, WindowID p_parent) override;
@@ -193,7 +195,7 @@ public:
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_real_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;
@@ -221,7 +223,7 @@ public:
virtual void swap_buffers() override;
static void register_web_driver();
- DisplayServerWeb(const String &p_rendering_driver, WindowMode p_window_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Size2i &p_resolution, Error &r_error);
+ DisplayServerWeb(const String &p_rendering_driver, WindowMode p_window_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Point2i *p_position, const Size2i &p_resolution, Error &r_error);
~DisplayServerWeb();
};
diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cpp
index f59ac54f20..3087b12c40 100644
--- a/platform/web/export/export_plugin.cpp
+++ b/platform/web/export/export_plugin.cpp
@@ -133,7 +133,7 @@ void EditorExportPlatformWeb::_fix_html(Vector<uint8_t> &p_html, const Ref<Edito
config["canvasResizePolicy"] = p_preset->get("html/canvas_resize_policy");
config["experimentalVK"] = p_preset->get("html/experimental_virtual_keyboard");
config["focusCanvas"] = p_preset->get("html/focus_canvas_on_start");
- config["gdnativeLibs"] = libs;
+ config["gdextensionLibs"] = libs;
config["executable"] = p_name;
config["args"] = args;
config["fileSizes"] = p_file_sizes;
diff --git a/platform/web/godot_webgl2.h b/platform/web/godot_webgl2.h
index 968b70f84b..ae6b23ae18 100644
--- a/platform/web/godot_webgl2.h
+++ b/platform/web/godot_webgl2.h
@@ -34,4 +34,21 @@
#include "GLES3/gl3.h"
#include "webgl/webgl2.h"
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632
+#define GL_MAX_VIEWS_OVR 0x9631
+#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void godot_webgl2_glFramebufferTextureMultiviewOVR(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
+
+#define glFramebufferTextureMultiviewOVR godot_webgl2_glFramebufferTextureMultiviewOVR
+
+#ifdef __cplusplus
+}
+#endif
+
#endif // GODOT_WEBGL2_H
diff --git a/platform/web/js/engine/config.js b/platform/web/js/engine/config.js
index 41be7b2512..6a30c253fb 100644
--- a/platform/web/js/engine/config.js
+++ b/platform/web/js/engine/config.js
@@ -127,7 +127,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
* @ignore
* @type {Array.<string>}
*/
- gdnativeLibs: [],
+ gdextensionLibs: [],
/**
* @ignore
* @type {Array.<string>}
@@ -257,7 +257,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
this.experimentalVK = parse('experimentalVK', this.experimentalVK);
this.focusCanvas = parse('focusCanvas', this.focusCanvas);
this.serviceWorker = parse('serviceWorker', this.serviceWorker);
- this.gdnativeLibs = parse('gdnativeLibs', this.gdnativeLibs);
+ this.gdextensionLibs = parse('gdextensionLibs', this.gdextensionLibs);
this.fileSizes = parse('fileSizes', this.fileSizes);
this.args = parse('args', this.args);
this.onExecute = parse('onExecute', this.onExecute);
@@ -275,7 +275,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
'print': this.onPrint,
'printErr': this.onPrintError,
'thisProgram': this.executable,
- 'noExitRuntime': true,
+ 'noExitRuntime': false,
'dynamicLibraries': [`${loadPath}.side.wasm`],
'instantiateWasm': function (imports, onSuccess) {
function done(result) {
diff --git a/platform/web/js/engine/engine.js b/platform/web/js/engine/engine.js
index 9227aa1f05..fb80bd55e1 100644
--- a/platform/web/js/engine/engine.js
+++ b/platform/web/js/engine/engine.js
@@ -162,9 +162,9 @@ const Engine = (function () {
// Godot configuration.
me.rtenv['initConfig'](config);
- // Preload GDNative libraries.
+ // Preload GDExtension libraries.
const libs = [];
- me.config.gdnativeLibs.forEach(function (lib) {
+ me.config.gdextensionLibs.forEach(function (lib) {
libs.push(me.rtenv['loadDynamicLibrary'](lib, { 'loadAsync': true }));
});
return Promise.all(libs).then(function () {
diff --git a/platform/web/js/engine/features.js b/platform/web/js/engine/features.js
index f91a4eff81..b7c6c9d445 100644
--- a/platform/web/js/engine/features.js
+++ b/platform/web/js/engine/features.js
@@ -76,19 +76,19 @@ const Features = { // eslint-disable-line no-unused-vars
getMissingFeatures: function () {
const missing = [];
if (!Features.isWebGLAvailable(2)) {
- missing.push('WebGL2');
+ missing.push('WebGL2 - Check web browser configuration and hardware support');
}
if (!Features.isFetchAvailable()) {
- missing.push('Fetch');
+ missing.push('Fetch - Check web browser version');
}
if (!Features.isSecureContext()) {
- missing.push('Secure Context');
+ missing.push('Secure Context - Check web server configuration (use HTTPS)');
}
if (!Features.isCrossOriginIsolated()) {
- missing.push('Cross Origin Isolation');
+ missing.push('Cross Origin Isolation - Check web server configuration (send correct headers)');
}
if (!Features.isSharedArrayBufferAvailable()) {
- missing.push('SharedArrayBuffer');
+ missing.push('SharedArrayBuffer - Check web server configuration (send correct headers)');
}
// Audio is normally optional since we have a dummy fallback.
return missing;
diff --git a/platform/web/js/libs/library_godot_webgl2.externs.js b/platform/web/js/libs/library_godot_webgl2.externs.js
new file mode 100644
index 0000000000..18d8d0815a
--- /dev/null
+++ b/platform/web/js/libs/library_godot_webgl2.externs.js
@@ -0,0 +1,36 @@
+
+/**
+ * @constructor OVR_multiview2
+ */
+function OVR_multiview2() {}
+
+/**
+ * @type {number}
+ */
+OVR_multiview2.prototype.FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR;
+
+/**
+ * @type {number}
+ */
+OVR_multiview2.prototype.FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR;
+
+/**
+ * @type {number}
+ */
+OVR_multiview2.prototype.MAX_VIEWS_OVR;
+
+/**
+ * @type {number}
+ */
+OVR_multiview2.prototype.FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR;
+
+/**
+ * @param {number} target
+ * @param {number} attachment
+ * @param {WebGLTexture} texture
+ * @param {number} level
+ * @param {number} baseViewIndex
+ * @param {number} numViews
+ * @return {void}
+ */
+OVR_multiview2.prototype.framebufferTextureMultiviewOVR = function(target, attachment, texture, level, baseViewIndex, numViews) {};
diff --git a/platform/web/js/libs/library_godot_webgl2.js b/platform/web/js/libs/library_godot_webgl2.js
new file mode 100644
index 0000000000..ba990b3ee0
--- /dev/null
+++ b/platform/web/js/libs/library_godot_webgl2.js
@@ -0,0 +1,53 @@
+/*************************************************************************/
+/* library_godot_webgl2.js */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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. */
+/*************************************************************************/
+const GodotWebGL2 = {
+ $GodotWebGL2__deps: ['$GL', '$GodotRuntime'],
+ $GodotWebGL2: {},
+
+ godot_webgl2_glFramebufferTextureMultiviewOVR__deps: ['emscripten_webgl_get_current_context'],
+ godot_webgl2_glFramebufferTextureMultiviewOVR__proxy: 'sync',
+ godot_webgl2_glFramebufferTextureMultiviewOVR__sig: 'viiiiii',
+ godot_webgl2_glFramebufferTextureMultiviewOVR: function (target, attachment, texture, level, base_view_index, num_views) {
+ const context = GL.currentContext;
+ if (typeof context.multiviewExt === 'undefined') {
+ const /** OVR_multiview2 */ ext = context.GLctx.getExtension('OVR_multiview2');
+ if (!ext) {
+ console.error('Trying to call glFramebufferTextureMultiviewOVR() without the OVR_multiview2 extension');
+ return;
+ }
+ context.multiviewExt = ext;
+ }
+ const /** OVR_multiview2 */ ext = context.multiviewExt;
+ ext.framebufferTextureMultiviewOVR(target, attachment, GL.textures[texture], level, base_view_index, num_views);
+ },
+};
+
+autoAddDeps(GodotWebGL2, '$GodotWebGL2');
+mergeInto(LibraryManager.library, GodotWebGL2);
diff --git a/platform/web/package-lock.json b/platform/web/package-lock.json
index 4c12c8602d..e1428546c6 100644
--- a/platform/web/package-lock.json
+++ b/platform/web/package-lock.json
@@ -1686,9 +1686,9 @@
"dev": true
},
"node_modules/minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
@@ -3791,9 +3791,9 @@
"dev": true
},
"minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
diff --git a/platform/web/web_main.cpp b/platform/web/web_main.cpp
index a76b98f4e9..fce782b546 100644
--- a/platform/web/web_main.cpp
+++ b/platform/web/web_main.cpp
@@ -41,30 +41,25 @@
static OS_Web *os = nullptr;
static uint64_t target_ticks = 0;
+static bool main_started = false;
+static bool shutdown_complete = false;
void exit_callback() {
- emscripten_cancel_main_loop(); // After this, we can exit!
- Main::cleanup();
+ if (!shutdown_complete) {
+ return; // Still waiting.
+ }
+ if (main_started) {
+ Main::cleanup();
+ main_started = false;
+ }
int exit_code = OS_Web::get_singleton()->get_exit_code();
memdelete(os);
os = nullptr;
- emscripten_force_exit(exit_code); // No matter that we call cancel_main_loop, regular "exit" will not work, forcing.
+ emscripten_force_exit(exit_code); // Exit runtime.
}
void cleanup_after_sync() {
- emscripten_set_main_loop(exit_callback, -1, false);
-}
-
-void early_cleanup() {
- emscripten_cancel_main_loop(); // After this, we can exit!
- int exit_code = OS_Web::get_singleton()->get_exit_code();
- memdelete(os);
- os = nullptr;
- emscripten_force_exit(exit_code); // No matter that we call cancel_main_loop, regular "exit" will not work, forcing.
-}
-
-void early_cleanup_sync() {
- emscripten_set_main_loop(early_cleanup, -1, false);
+ shutdown_complete = true;
}
void main_loop_callback() {
@@ -87,7 +82,8 @@ void main_loop_callback() {
target_ticks += (uint64_t)(1000000 / max_fps);
}
if (os->main_loop_iterate()) {
- emscripten_cancel_main_loop(); // Cancel current loop and wait for cleanup_after_sync.
+ emscripten_cancel_main_loop(); // Cancel current loop and set the cleanup one.
+ emscripten_set_main_loop(exit_callback, -1, false);
godot_js_os_finish_async(cleanup_after_sync);
}
}
@@ -109,10 +105,14 @@ extern EMSCRIPTEN_KEEPALIVE int godot_web_main(int argc, char *argv[]) {
}
os->set_exit_code(exit_code);
// Will only exit after sync.
- godot_js_os_finish_async(early_cleanup_sync);
+ emscripten_set_main_loop(exit_callback, -1, false);
+ godot_js_os_finish_async(cleanup_after_sync);
return exit_code;
}
+ os->set_exit_code(0);
+ main_started = true;
+
// Ease up compatibility.
ResourceLoader::set_abort_on_missing_resources(false);
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index 7e412b140f..efbb47d965 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -19,19 +19,44 @@ common_win = [
"gl_manager_windows.cpp",
]
+common_win_wrap = [
+ "console_wrapper_windows.cpp",
+]
+
res_file = "godot_res.rc"
res_target = "godot_res" + env["OBJSUFFIX"]
res_obj = env.RES(res_target, res_file)
prog = env.add_program("#bin/godot", common_win + res_obj, PROGSUFFIX=env["PROGSUFFIX"])
+# Build console wrapper app.
+if env["windows_subsystem"] == "gui":
+ env_wrap = env.Clone()
+ res_wrap_file = "godot_res_wrap.rc"
+ res_wrap_target = "godot_res_wrap" + env["OBJSUFFIX"]
+ res_wrap_obj = env_wrap.RES(res_wrap_target, res_wrap_file)
+
+ if env.msvc:
+ env_wrap.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"])
+ env_wrap.Append(LINKFLAGS=["version.lib"])
+ else:
+ env_wrap.Append(LINKFLAGS=["-Wl,--subsystem,console"])
+ env_wrap.Append(LIBS=["version"])
+
+ prog_wrap = env_wrap.add_program("#bin/godot", common_win_wrap + res_wrap_obj, PROGSUFFIX=env["PROGSUFFIX_WRAP"])
+
# Microsoft Visual Studio Project Generation
if env["vsproj"]:
env.vs_srcs += ["platform/windows/" + res_file]
env.vs_srcs += ["platform/windows/godot.natvis"]
for x in common_win:
env.vs_srcs += ["platform/windows/" + str(x)]
+ if env["windows_subsystem"] == "gui":
+ for x in common_win_wrap:
+ env.vs_srcs += ["platform/windows/" + str(x)]
if not os.getenv("VCINSTALLDIR"):
if env["debug_symbols"] and env["separate_debug_symbols"]:
env.AddPostAction(prog, run_in_subprocess(platform_windows_builders.make_debug_mingw))
+ if env["windows_subsystem"] == "gui":
+ env.AddPostAction(prog_wrap, run_in_subprocess(platform_windows_builders.make_debug_mingw))
diff --git a/platform/windows/console_wrapper_windows.cpp b/platform/windows/console_wrapper_windows.cpp
new file mode 100644
index 0000000000..258176426b
--- /dev/null
+++ b/platform/windows/console_wrapper_windows.cpp
@@ -0,0 +1,181 @@
+/*************************************************************************/
+/* console_wrapper_windows.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* 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 <windows.h>
+
+#include <shlwapi.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4
+#endif
+
+int main(int argc, char *argv[]) {
+ // Get executable name.
+ WCHAR exe_name[MAX_PATH] = {};
+ if (!GetModuleFileNameW(nullptr, exe_name, MAX_PATH)) {
+ wprintf(L"GetModuleFileName failed, error %d\n", GetLastError());
+ return -1;
+ }
+
+ // Get product name from the resources and set console title.
+ DWORD ver_info_handle = 0;
+ DWORD ver_info_size = GetFileVersionInfoSizeW(exe_name, &ver_info_handle);
+ if (ver_info_size > 0) {
+ LPBYTE ver_info = (LPBYTE)malloc(ver_info_size);
+ if (ver_info) {
+ if (GetFileVersionInfoW(exe_name, ver_info_handle, ver_info_size, ver_info)) {
+ LPCWSTR text_ptr = nullptr;
+ UINT text_size = 0;
+ if (VerQueryValueW(ver_info, L"\\StringFileInfo\\040904b0\\ProductName", (void **)&text_ptr, &text_size) && (text_size > 0)) {
+ SetConsoleTitleW(text_ptr);
+ }
+ }
+ free(ver_info);
+ }
+ }
+
+ // Enable virtual terminal sequences processing.
+ HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
+ DWORD out_mode = ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+ SetConsoleMode(stdout_handle, out_mode);
+
+ // Find main executable name and check if it exist.
+ static PCWSTR exe_renames[] = {
+ L".console.exe",
+ L"_console.exe",
+ L" console.exe",
+ L"console.exe",
+ nullptr,
+ };
+
+ bool rename_found = false;
+ for (int i = 0; exe_renames[i]; i++) {
+ PWSTR c = StrRStrIW(exe_name, nullptr, exe_renames[i]);
+ if (c) {
+ CopyMemory(c, L".exe", sizeof(WCHAR) * 5);
+ rename_found = true;
+ break;
+ }
+ }
+ if (!rename_found) {
+ wprintf(L"Invalid wrapper executable name.\n");
+ return -1;
+ }
+
+ DWORD file_attrib = GetFileAttributesW(exe_name);
+ if (file_attrib == INVALID_FILE_ATTRIBUTES || (file_attrib & FILE_ATTRIBUTE_DIRECTORY)) {
+ wprintf(L"Main executable %ls not found.\n", exe_name);
+ return -1;
+ }
+
+ // Create job to monitor process tree.
+ HANDLE job_handle = CreateJobObjectW(nullptr, nullptr);
+ if (!job_handle) {
+ wprintf(L"CreateJobObject failed, error %d\n", GetLastError());
+ return -1;
+ }
+
+ HANDLE io_port_handle = CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 1);
+ if (!io_port_handle) {
+ wprintf(L"CreateIoCompletionPort failed, error %d\n", GetLastError());
+ return -1;
+ }
+
+ JOBOBJECT_ASSOCIATE_COMPLETION_PORT compl_port;
+ ZeroMemory(&compl_port, sizeof(compl_port));
+ compl_port.CompletionKey = job_handle;
+ compl_port.CompletionPort = io_port_handle;
+
+ if (!SetInformationJobObject(job_handle, JobObjectAssociateCompletionPortInformation, &compl_port, sizeof(compl_port))) {
+ wprintf(L"SetInformationJobObject(AssociateCompletionPortInformation) failed, error %d\n", GetLastError());
+ return -1;
+ }
+
+ JOBOBJECT_EXTENDED_LIMIT_INFORMATION jeli;
+ ZeroMemory(&jeli, sizeof(jeli));
+ jeli.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
+
+ if (!SetInformationJobObject(job_handle, JobObjectExtendedLimitInformation, &jeli, sizeof(jeli))) {
+ wprintf(L"SetInformationJobObject(ExtendedLimitInformation) failed, error %d\n", GetLastError());
+ return -1;
+ }
+
+ // Start the main process.
+ PROCESS_INFORMATION pi;
+ ZeroMemory(&pi, sizeof(pi));
+
+ STARTUPINFOW si;
+ ZeroMemory(&si, sizeof(si));
+ si.cb = sizeof(si);
+
+ WCHAR new_command_line[32767];
+ _snwprintf_s(new_command_line, 32767, _TRUNCATE, L"%ls %ls", exe_name, PathGetArgsW(GetCommandLineW()));
+
+ if (!CreateProcessW(nullptr, new_command_line, nullptr, nullptr, true, CREATE_SUSPENDED, nullptr, nullptr, &si, &pi)) {
+ wprintf(L"CreateProcess failed, error %d\n", GetLastError());
+ return -1;
+ }
+
+ if (!AssignProcessToJobObject(job_handle, pi.hProcess)) {
+ wprintf(L"AssignProcessToJobObject failed, error %d\n", GetLastError());
+ return -1;
+ }
+
+ ResumeThread(pi.hThread);
+ CloseHandle(pi.hThread);
+
+ // Wait until main process and all of its children are finished.
+ DWORD completion_code = 0;
+ ULONG_PTR completion_key = 0;
+ LPOVERLAPPED overlapped = nullptr;
+
+ while (GetQueuedCompletionStatus(io_port_handle, &completion_code, &completion_key, &overlapped, INFINITE)) {
+ if ((HANDLE)completion_key == job_handle && completion_code == JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO) {
+ break;
+ }
+ }
+
+ CloseHandle(job_handle);
+ CloseHandle(io_port_handle);
+
+ // Get exit code of the main process.
+ DWORD exit_code = 0;
+ GetExitCodeProcess(pi.hProcess, &exit_code);
+
+ CloseHandle(pi.hProcess);
+
+ return exit_code;
+}
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
+ return main(0, nullptr);
+}
diff --git a/platform/windows/crash_handler_windows.cpp b/platform/windows/crash_handler_windows.cpp
index b501ee78db..7ba66750cf 100644
--- a/platform/windows/crash_handler_windows.cpp
+++ b/platform/windows/crash_handler_windows.cpp
@@ -157,7 +157,7 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) {
return EXCEPTION_CONTINUE_SEARCH;
}
- SymSetOptions(SymGetOptions() | SYMOPT_LOAD_LINES | SYMOPT_UNDNAME);
+ SymSetOptions(SymGetOptions() | SYMOPT_LOAD_LINES | SYMOPT_UNDNAME | SYMOPT_EXACT_SYMBOLS);
EnumProcessModules(process, &module_handles[0], module_handles.size() * sizeof(HMODULE), &cbNeeded);
module_handles.resize(cbNeeded / sizeof(HMODULE));
EnumProcessModules(process, &module_handles[0], module_handles.size() * sizeof(HMODULE), &cbNeeded);
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 74868fc6a2..1b55574b19 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -188,6 +188,7 @@ def get_opts():
BoolVariable("use_llvm", "Use the LLVM compiler", False),
BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True),
BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
+ BoolVariable("debug_crt", "Compile with MSVC's debug CRT (/MDd)", False),
]
@@ -339,10 +340,14 @@ def configure_msvc(env, vcvars_msvc_config):
## Compile/link flags
- if env["use_static_cpp"]:
- env.AppendUnique(CCFLAGS=["/MT"])
+ if env["debug_crt"]:
+ # Always use dynamic runtime, static debug CRT breaks thread_local.
+ env.AppendUnique(CCFLAGS=["/MDd"])
else:
- env.AppendUnique(CCFLAGS=["/MD"])
+ if env["use_static_cpp"]:
+ env.AppendUnique(CCFLAGS=["/MT"])
+ else:
+ env.AppendUnique(CCFLAGS=["/MD"])
if env["arch"] == "x86_32":
env["x86_libtheora_opt_vc"] = True
@@ -582,12 +587,14 @@ def configure_mingw(env):
]
)
- env.Append(CPPDEFINES=["VULKAN_ENABLED"])
- if not env["use_volk"]:
- env.Append(LIBS=["vulkan"])
+ if env["vulkan"]:
+ env.Append(CPPDEFINES=["VULKAN_ENABLED"])
+ if not env["use_volk"]:
+ env.Append(LIBS=["vulkan"])
- env.Append(CPPDEFINES=["GLES3_ENABLED"])
- env.Append(LIBS=["opengl32"])
+ if env["opengl3"]:
+ env.Append(CPPDEFINES=["GLES3_ENABLED"])
+ env.Append(LIBS=["opengl32"])
env.Append(CPPDEFINES=["MINGW_ENABLED", ("MINGW_HAS_SECURE_API", 1)])
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index bc767a47e5..e7864ebac0 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -741,9 +741,20 @@ int64_t DisplayServerWindows::window_get_native_handle(HandleType p_handle_type,
case WINDOW_HANDLE: {
return (int64_t)windows[p_window].hWnd;
}
+#if defined(GLES3_ENABLED)
case WINDOW_VIEW: {
- return 0; // Not supported.
+ if (gl_manager) {
+ return (int64_t)gl_manager->get_hdc(p_window);
+ }
+ return 0;
+ }
+ case OPENGL_CONTEXT: {
+ if (gl_manager) {
+ return (int64_t)gl_manager->get_hglrc(p_window);
+ }
+ return 0;
}
+#endif
default: {
return 0;
}
@@ -898,6 +909,24 @@ Point2i DisplayServerWindows::window_get_position(WindowID p_window) const {
return Point2i(point.x, point.y);
}
+Point2i DisplayServerWindows::window_get_position_with_decorations(WindowID p_window) const {
+ _THREAD_SAFE_METHOD_
+
+ ERR_FAIL_COND_V(!windows.has(p_window), Point2i());
+ const WindowData &wd = windows[p_window];
+
+ if (wd.minimized) {
+ return wd.last_pos;
+ }
+
+ RECT r;
+ if (GetWindowRect(wd.hWnd, &r)) {
+ return Point2i(r.left, r.top);
+ }
+
+ return Point2i();
+}
+
void DisplayServerWindows::_update_real_mouse_position(WindowID p_window) {
ERR_FAIL_COND(!windows.has(p_window));
@@ -1113,7 +1142,7 @@ Size2i DisplayServerWindows::window_get_size(WindowID p_window) const {
return Size2();
}
-Size2i DisplayServerWindows::window_get_real_size(WindowID p_window) const {
+Size2i DisplayServerWindows::window_get_size_with_decorations(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
@@ -1881,7 +1910,7 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
pos += sizeof(WORD);
f->seek(pos);
- icon_dir = (ICONDIR *)memrealloc(icon_dir, 3 * sizeof(WORD) + icon_dir->idCount * sizeof(ICONDIRENTRY));
+ icon_dir = (ICONDIR *)memrealloc(icon_dir, sizeof(ICONDIR) - sizeof(ICONDIRENTRY) + icon_dir->idCount * sizeof(ICONDIRENTRY));
f->get_buffer((uint8_t *)&icon_dir->idEntries[0], icon_dir->idCount * sizeof(ICONDIRENTRY));
int small_icon_index = -1; // Select 16x16 with largest color count.
@@ -2012,6 +2041,12 @@ void DisplayServerWindows::window_set_vsync_mode(DisplayServer::VSyncMode p_vsyn
context_vulkan->set_vsync_mode(p_window, p_vsync_mode);
}
#endif
+
+#if defined(GLES3_ENABLED)
+ if (gl_manager) {
+ gl_manager->set_use_vsync(p_window, p_vsync_mode != DisplayServer::VSYNC_DISABLED);
+ }
+#endif
}
DisplayServer::VSyncMode DisplayServerWindows::window_get_vsync_mode(WindowID p_window) const {
@@ -2021,6 +2056,13 @@ DisplayServer::VSyncMode DisplayServerWindows::window_get_vsync_mode(WindowID p_
return context_vulkan->get_vsync_mode(p_window);
}
#endif
+
+#if defined(GLES3_ENABLED)
+ if (gl_manager) {
+ return gl_manager->is_using_vsync(p_window) ? DisplayServer::VSYNC_ENABLED : DisplayServer::VSYNC_DISABLED;
+ }
+#endif
+
return DisplayServer::VSYNC_ENABLED;
}
@@ -2390,7 +2432,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
case WM_GETMINMAXINFO: {
if (windows[window_id].resizable && !windows[window_id].fullscreen) {
// Size of window decorations.
- Size2 decor = window_get_real_size(window_id) - window_get_size(window_id);
+ Size2 decor = window_get_size_with_decorations(window_id) - window_get_size(window_id);
MINMAXINFO *min_max_info = (MINMAXINFO *)lParam;
if (windows[window_id].min_size != Size2()) {
@@ -2444,10 +2486,16 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
return 0; // Jump back.
}
case WM_MOUSELEAVE: {
- old_invalid = true;
- windows[window_id].mouse_outside = true;
+ if (window_mouseover_id == window_id) {
+ old_invalid = true;
+ window_mouseover_id = INVALID_WINDOW_ID;
- _send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_EXIT);
+ _send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_EXIT);
+ } else if (window_mouseover_id != INVALID_WINDOW_ID && windows.has(window_mouseover_id)) {
+ // This is reached during drag and drop, after dropping in a different window.
+ // Once-off notification, must call again.
+ track_mouse_leave_event(windows[window_mouseover_id].hWnd);
+ }
} break;
case WM_INPUT: {
@@ -2678,17 +2726,21 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
}
- if (windows[window_id].mouse_outside) {
+ if (window_mouseover_id != window_id) {
// Mouse enter.
if (mouse_mode != MOUSE_MODE_CAPTURED) {
+ if (window_mouseover_id != INVALID_WINDOW_ID && windows.has(window_mouseover_id)) {
+ // Leave previous window.
+ _send_window_event(windows[window_mouseover_id], WINDOW_EVENT_MOUSE_EXIT);
+ }
_send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_ENTER);
}
CursorShape c = cursor_shape;
cursor_shape = CURSOR_MAX;
cursor_set_shape(c);
- windows[window_id].mouse_outside = false;
+ window_mouseover_id = window_id;
// Once-off notification, must call again.
track_mouse_leave_event(hWnd);
@@ -2779,17 +2831,29 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
}
- if (windows[window_id].mouse_outside) {
+ DisplayServer::WindowID over_id = get_window_at_screen_position(mouse_get_position());
+ if (windows.has(over_id) && !Rect2(window_get_position(over_id), Point2(windows[over_id].width, windows[over_id].height)).has_point(mouse_get_position())) {
+ // Don't consider the windowborder as part of the window.
+ over_id = INVALID_WINDOW_ID;
+ }
+ if (window_mouseover_id != over_id) {
// Mouse enter.
if (mouse_mode != MOUSE_MODE_CAPTURED) {
- _send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_ENTER);
+ if (window_mouseover_id != INVALID_WINDOW_ID && windows.has(window_mouseover_id)) {
+ // Leave previous window.
+ _send_window_event(windows[window_mouseover_id], WINDOW_EVENT_MOUSE_EXIT);
+ }
+
+ if (over_id != INVALID_WINDOW_ID && windows.has(over_id)) {
+ _send_window_event(windows[over_id], WINDOW_EVENT_MOUSE_ENTER);
+ }
}
CursorShape c = cursor_shape;
cursor_shape = CURSOR_MAX;
cursor_set_shape(c);
- windows[window_id].mouse_outside = false;
+ window_mouseover_id = over_id;
// Once-off notification, must call again.
track_mouse_leave_event(hWnd);
@@ -2800,9 +2864,13 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
break;
}
+ DisplayServer::WindowID receiving_window_id = _get_focused_window_or_popup();
+ if (receiving_window_id == INVALID_WINDOW_ID) {
+ receiving_window_id = window_id;
+ }
Ref<InputEventMouseMotion> mm;
mm.instantiate();
- mm->set_window_id(window_id);
+ mm->set_window_id(receiving_window_id);
mm->set_ctrl_pressed((wParam & MK_CONTROL) != 0);
mm->set_shift_pressed((wParam & MK_SHIFT) != 0);
mm->set_alt_pressed(alt_mem);
@@ -2859,9 +2927,13 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
mm->set_relative(Vector2(mm->get_position() - Vector2(old_x, old_y)));
old_x = mm->get_position().x;
old_y = mm->get_position().y;
- if (windows[window_id].window_has_focus || window_get_active_popup() == window_id) {
- Input::get_singleton()->parse_input_event(mm);
+
+ if (receiving_window_id != window_id) {
+ // Adjust event position relative to window distance when event is sent to a different window.
+ mm->set_position(mm->get_position() - window_get_position(receiving_window_id) + window_get_position(window_id));
+ mm->set_global_position(mm->get_position());
}
+ Input::get_singleton()->parse_input_event(mm);
} break;
case WM_LBUTTONDOWN:
@@ -3466,7 +3538,7 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
DWORD dwExStyle;
DWORD dwStyle;
- _get_window_style(window_id_counter == MAIN_WINDOW_ID, (p_mode == WINDOW_MODE_FULLSCREEN || p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN), p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN, p_flags & WINDOW_FLAG_BORDERLESS_BIT, !(p_flags & WINDOW_FLAG_RESIZE_DISABLED_BIT), p_mode == WINDOW_MODE_MAXIMIZED, (p_flags & WINDOW_FLAG_NO_FOCUS_BIT), dwStyle, dwExStyle);
+ _get_window_style(window_id_counter == MAIN_WINDOW_ID, (p_mode == WINDOW_MODE_FULLSCREEN || p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN), p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN, p_flags & WINDOW_FLAG_BORDERLESS_BIT, !(p_flags & WINDOW_FLAG_RESIZE_DISABLED_BIT), p_mode == WINDOW_MODE_MAXIMIZED, (p_flags & WINDOW_FLAG_NO_FOCUS_BIT) | (p_flags & WINDOW_FLAG_POPUP), dwStyle, dwExStyle);
RECT WindowRect;
@@ -3559,6 +3631,7 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
windows.erase(id);
ERR_FAIL_V_MSG(INVALID_WINDOW_ID, "Failed to create an OpenGL window.");
}
+ window_set_vsync_mode(p_vsync_mode, id);
}
#endif
@@ -3704,7 +3777,7 @@ void DisplayServerWindows::tablet_set_current_driver(const String &p_driver) {
}
}
-DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
drop_events = false;
key_event_pos = 0;
@@ -3856,9 +3929,15 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
(screen_get_size(0).width - p_resolution.width) / 2,
(screen_get_size(0).height - p_resolution.height) / 2);
+ if (p_position != nullptr) {
+ window_position = *p_position;
+ }
+
WindowID main_window = _create_window(p_mode, p_vsync_mode, 0, Rect2i(window_position, p_resolution));
ERR_FAIL_COND_MSG(main_window == INVALID_WINDOW_ID, "Failed to create main window.");
+ joypad = new JoypadWindows(&windows[MAIN_WINDOW_ID].hWnd);
+
for (int i = 0; i < WINDOW_FLAG_MAX; i++) {
if (p_flags & (1 << i)) {
window_set_flag(WindowFlags(i), true, main_window);
@@ -3898,8 +3977,6 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
_update_real_mouse_position(MAIN_WINDOW_ID);
- joypad = new JoypadWindows(&windows[MAIN_WINDOW_ID].hWnd);
-
r_error = OK;
static_cast<OS_Windows *>(OS::get_singleton())->set_main_window(windows[MAIN_WINDOW_ID].hWnd);
@@ -3919,12 +3996,24 @@ Vector<String> DisplayServerWindows::get_rendering_drivers_func() {
return drivers;
}
-DisplayServer *DisplayServerWindows::create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
- DisplayServer *ds = memnew(DisplayServerWindows(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
+DisplayServer *DisplayServerWindows::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, Error &r_error) {
+ DisplayServer *ds = memnew(DisplayServerWindows(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, r_error));
if (r_error != OK) {
- OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan or OpenGL versions.\n"
- "Please update your drivers or if you have a very old or integrated GPU upgrade it.",
- "Unable to initialize Video driver");
+ if (p_rendering_driver == "vulkan") {
+ String executable_name = OS::get_singleton()->get_executable_path().get_file();
+ OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n"
+ "Please try updating your GPU driver or try using the OpenGL 3 driver.\n"
+ "You can enable the OpenGL 3 driver by starting the engine from the\n"
+ "command line with the command:\n'./" +
+ executable_name + " --rendering-driver opengl3'.\n "
+ "If you have updated your graphics drivers recently, try rebooting.",
+ "Unable to initialize Video driver");
+ } else {
+ OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n"
+ "Please try updating your GPU driver.\n"
+ "If you have updated your graphics drivers recently, try rebooting.",
+ "Unable to initialize Video driver");
+ }
}
return ds;
}
diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h
index 53cde001ae..4702bb7765 100644
--- a/platform/windows/display_server_windows.h
+++ b/platform/windows/display_server_windows.h
@@ -323,6 +323,8 @@ class DisplayServerWindows : public DisplayServer {
LPARAM lParam;
};
+ WindowID window_mouseover_id = INVALID_WINDOW_ID;
+
KeyEvent key_event_buffer[KEY_EVENT_BUFFER_SIZE];
int key_event_pos;
@@ -398,7 +400,6 @@ class DisplayServerWindows : public DisplayServer {
Size2 window_rect;
Point2 last_pos;
- bool mouse_outside = true;
ObjectID instance_id;
@@ -554,6 +555,7 @@ public:
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_transient(WindowID p_window, WindowID p_parent) override;
@@ -567,7 +569,7 @@ public:
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_real_size(WindowID p_window = MAIN_WINDOW_ID) const override; //wtf is this? should probable use proper name
+ 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;
@@ -623,11 +625,11 @@ public:
virtual void set_context(Context p_context) override;
- static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ 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, Error &r_error);
static Vector<String> get_rendering_drivers_func();
static void register_windows_driver();
- DisplayServerWindows(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ DisplayServerWindows(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error);
~DisplayServerWindows();
};
diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp
index 016d201f2c..89f56ffd93 100644
--- a/platform/windows/export/export_plugin.cpp
+++ b/platform/windows/export/export_plugin.cpp
@@ -31,34 +31,138 @@
#include "export_plugin.h"
#include "core/config/project_settings.h"
+#include "core/io/image_loader.h"
#include "editor/editor_node.h"
+#include "editor/editor_paths.h"
-Error EditorExportPlatformWindows::sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) {
- if (p_preset->get("codesign/enable")) {
- return _code_sign(p_preset, p_path);
+Error EditorExportPlatformWindows::_process_icon(const Ref<EditorExportPreset> &p_preset, const String &p_src_path, const String &p_dst_path) {
+ static const uint8_t icon_size[] = { 16, 32, 48, 64, 128, 0 /*256*/ };
+
+ struct IconData {
+ Vector<uint8_t> data;
+ uint8_t pal_colors = 0;
+ uint16_t planes = 0;
+ uint16_t bpp = 32;
+ };
+
+ HashMap<uint8_t, IconData> images;
+ Error err;
+
+ if (p_src_path.get_extension() == "ico") {
+ Ref<FileAccess> f = FileAccess::open(p_src_path, FileAccess::READ, &err);
+ if (err != OK) {
+ return err;
+ }
+
+ // Read ICONDIR.
+ f->get_16(); // Reserved.
+ uint16_t icon_type = f->get_16(); // Image type: 1 - ICO.
+ uint16_t icon_count = f->get_16(); // Number of images.
+ ERR_FAIL_COND_V(icon_type != 1, ERR_CANT_OPEN);
+
+ for (uint16_t i = 0; i < icon_count; i++) {
+ // Read ICONDIRENTRY.
+ uint16_t w = f->get_8(); // Width in pixels.
+ uint16_t h = f->get_8(); // Height in pixels.
+ uint8_t pal_colors = f->get_8(); // Number of colors in the palette (0 - no palette).
+ f->get_8(); // Reserved.
+ uint16_t planes = f->get_16(); // Number of color planes.
+ uint16_t bpp = f->get_16(); // Bits per pixel.
+ uint32_t img_size = f->get_32(); // Image data size in bytes.
+ uint32_t img_offset = f->get_32(); // Image data offset.
+ if (w != h) {
+ continue;
+ }
+
+ // Read image data.
+ uint64_t prev_offset = f->get_position();
+ images[w].pal_colors = pal_colors;
+ images[w].planes = planes;
+ images[w].bpp = bpp;
+ images[w].data.resize(img_size);
+ f->seek(img_offset);
+ f->get_buffer(images[w].data.ptrw(), img_size);
+ f->seek(prev_offset);
+ }
} else {
- return OK;
+ Ref<Image> src_image;
+ src_image.instantiate();
+ err = ImageLoader::load_image(p_src_path, src_image);
+ ERR_FAIL_COND_V(err != OK || src_image->is_empty(), ERR_CANT_OPEN);
+ for (size_t i = 0; i < sizeof(icon_size) / sizeof(icon_size[0]); ++i) {
+ int size = (icon_size[i] == 0) ? 256 : icon_size[i];
+
+ Ref<Image> res_image = src_image->duplicate();
+ ERR_FAIL_COND_V(res_image.is_null() || res_image->is_empty(), ERR_CANT_OPEN);
+ res_image->resize(size, size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
+ images[icon_size[i]].data = res_image->save_png_to_buffer();
+ }
}
-}
-Error EditorExportPlatformWindows::_export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path) {
- Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::WRITE);
- if (f.is_null()) {
- add_message(EXPORT_MESSAGE_ERROR, TTR("Debug Script Export"), vformat(TTR("Could not open file \"%s\"."), p_path));
- return ERR_CANT_CREATE;
+ uint16_t valid_icon_count = 0;
+ for (size_t i = 0; i < sizeof(icon_size) / sizeof(icon_size[0]); ++i) {
+ if (images.has(icon_size[i])) {
+ valid_icon_count++;
+ } else {
+ int size = (icon_size[i] == 0) ? 256 : icon_size[i];
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("Icon size \"%d\" is missing."), size));
+ }
}
+ ERR_FAIL_COND_V(valid_icon_count == 0, ERR_CANT_OPEN);
- f->store_line("@echo off");
- f->store_line("title \"" + p_app_name + "\"");
- f->store_line("\"%~dp0" + p_pkg_name + "\" \"%*\"");
- f->store_line("pause > nul");
+ Ref<FileAccess> fw = FileAccess::open(p_dst_path, FileAccess::WRITE, &err);
+ if (err != OK) {
+ return err;
+ }
+ // Write ICONDIR.
+ fw->store_16(0); // Reserved.
+ fw->store_16(1); // Image type: 1 - ICO.
+ fw->store_16(valid_icon_count); // Number of images.
+
+ // Write ICONDIRENTRY.
+ uint32_t img_offset = 6 + 16 * valid_icon_count;
+ for (size_t i = 0; i < sizeof(icon_size) / sizeof(icon_size[0]); ++i) {
+ if (images.has(icon_size[i])) {
+ const IconData &di = images[icon_size[i]];
+ fw->store_8(icon_size[i]); // Width in pixels.
+ fw->store_8(icon_size[i]); // Height in pixels.
+ fw->store_8(di.pal_colors); // Number of colors in the palette (0 - no palette).
+ fw->store_8(0); // Reserved.
+ fw->store_16(di.planes); // Number of color planes.
+ fw->store_16(di.bpp); // Bits per pixel.
+ fw->store_32(di.data.size()); // Image data size in bytes.
+ fw->store_32(img_offset); // Image data offset.
+
+ img_offset += di.data.size();
+ }
+ }
+
+ // Write image data.
+ for (size_t i = 0; i < sizeof(icon_size) / sizeof(icon_size[0]); ++i) {
+ if (images.has(icon_size[i])) {
+ const IconData &di = images[icon_size[i]];
+ fw->store_buffer(di.data.ptr(), di.data.size());
+ }
+ }
return OK;
}
+Error EditorExportPlatformWindows::sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) {
+ if (p_preset->get("codesign/enable")) {
+ return _code_sign(p_preset, p_path);
+ } else {
+ return OK;
+ }
+}
+
Error EditorExportPlatformWindows::modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
if (p_preset->get("application/modify_resources")) {
- _rcedit_add_data(p_preset, p_path);
+ _rcedit_add_data(p_preset, p_path, true);
+ String wrapper_path = p_path.get_basename() + ".console.exe";
+ if (FileAccess::exists(wrapper_path)) {
+ _rcedit_add_data(p_preset, wrapper_path, false);
+ }
}
return OK;
}
@@ -71,6 +175,10 @@ Error EditorExportPlatformWindows::export_project(const Ref<EditorExportPreset>
Error err = EditorExportPlatformPC::export_project(p_preset, p_debug, pck_path, p_flags);
if (p_preset->get("codesign/enable") && err == OK) {
_code_sign(p_preset, pck_path);
+ String wrapper_path = p_path.get_basename() + ".console.exe";
+ if (FileAccess::exists(wrapper_path)) {
+ _code_sign(p_preset, wrapper_path);
+ }
}
if (p_preset->get("binary_format/embed_pck") && err == OK) {
@@ -81,25 +189,6 @@ Error EditorExportPlatformWindows::export_project(const Ref<EditorExportPreset>
}
}
- String app_name;
- if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
- app_name = String(ProjectSettings::get_singleton()->get("application/config/name"));
- } else {
- app_name = "Unnamed";
- }
- app_name = OS::get_singleton()->get_safe_dir_name(app_name);
-
- // Save console script.
- if (err == OK) {
- int con_scr = p_preset->get("debug/export_console_script");
- if ((con_scr == 1 && p_debug) || (con_scr == 2)) {
- String scr_path = p_path.get_basename() + ".cmd";
- if (_export_debug_script(p_preset, app_name, p_path.get_file(), scr_path) != OK) {
- add_message(EXPORT_MESSAGE_ERROR, TTR("Debug Script Export"), TTR("Could not create console script."));
- }
- }
- }
-
return err;
}
@@ -136,7 +225,9 @@ void EditorExportPlatformWindows::get_export_options(List<ExportOption> *r_optio
r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray()));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "application/modify_resources"), true));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/icon", PROPERTY_HINT_FILE, "*.ico"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/icon", PROPERTY_HINT_FILE, "*.ico,*.png,*.webp,*.svg"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/console_wrapper_icon", PROPERTY_HINT_FILE, "*.ico,*.png,*.webp,*.svg"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/icon_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/file_version", PROPERTY_HINT_PLACEHOLDER_TEXT, "1.0.0.0"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/product_version", PROPERTY_HINT_PLACEHOLDER_TEXT, "1.0.0.0"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/company_name", PROPERTY_HINT_PLACEHOLDER_TEXT, "Company Name"), ""));
@@ -146,8 +237,8 @@ void EditorExportPlatformWindows::get_export_options(List<ExportOption> *r_optio
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/trademarks"), ""));
}
-Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
- String rcedit_path = EditorSettings::get_singleton()->get("export/windows/rcedit");
+Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset> &p_preset, const String &p_path, bool p_console_icon) {
+ String rcedit_path = EDITOR_GET("export/windows/rcedit");
if (rcedit_path != String() && !FileAccess::exists(rcedit_path)) {
add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("Could not find rcedit executable at \"%s\"."), rcedit_path));
@@ -160,7 +251,7 @@ Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset
#ifndef WINDOWS_ENABLED
// On non-Windows we need WINE to run rcedit
- String wine_path = EditorSettings::get_singleton()->get("export/windows/wine");
+ String wine_path = EDITOR_GET("export/windows/wine");
if (!wine_path.is_empty() && !FileAccess::exists(wine_path)) {
add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("Could not find wine executable at \"%s\"."), wine_path));
@@ -173,6 +264,21 @@ Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset
#endif
String icon_path = ProjectSettings::get_singleton()->globalize_path(p_preset->get("application/icon"));
+ if (p_console_icon) {
+ String console_icon_path = ProjectSettings::get_singleton()->globalize_path(p_preset->get("application/console_wrapper_icon"));
+ if (!console_icon_path.is_empty() && FileAccess::exists(console_icon_path)) {
+ icon_path = console_icon_path;
+ }
+ }
+
+ String tmp_icon_path = EditorPaths::get_singleton()->get_cache_dir().path_join("_rcedit.ico");
+ if (!icon_path.is_empty()) {
+ if (_process_icon(p_preset, icon_path, tmp_icon_path) != OK) {
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("Invalid icon file \"%s\"."), icon_path));
+ icon_path = String();
+ }
+ }
+
String file_verion = p_preset->get("application/file_version");
String product_version = p_preset->get("application/product_version");
String company_name = p_preset->get("application/company_name");
@@ -186,7 +292,7 @@ Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset
args.push_back(p_path);
if (!icon_path.is_empty()) {
args.push_back("--set-icon");
- args.push_back(icon_path);
+ args.push_back(tmp_icon_path);
}
if (!file_verion.is_empty()) {
args.push_back("--set-file-version");
@@ -230,6 +336,11 @@ Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset
String str;
Error err = OS::get_singleton()->execute(rcedit_path, args, &str, nullptr, true);
+
+ if (FileAccess::exists(tmp_icon_path)) {
+ DirAccess::remove_file_or_error(tmp_icon_path);
+ }
+
if (err != OK || (str.find("not found") != -1) || (str.find("not recognized") != -1)) {
add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), TTR("Could not start rcedit executable. Configure rcedit path in the Editor Settings (Export > Windows > rcedit), or disable \"Application > Modify Resources\" in the export preset."));
return err;
@@ -248,7 +359,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
List<String> args;
#ifdef WINDOWS_ENABLED
- String signtool_path = EditorSettings::get_singleton()->get("export/windows/signtool");
+ String signtool_path = EDITOR_GET("export/windows/signtool");
if (!signtool_path.is_empty() && !FileAccess::exists(signtool_path)) {
add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), vformat(TTR("Could not find signtool executable at \"%s\"."), signtool_path));
return ERR_FILE_NOT_FOUND;
@@ -257,7 +368,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
signtool_path = "signtool"; // try to run signtool from PATH
}
#else
- String signtool_path = EditorSettings::get_singleton()->get("export/windows/osslsigncode");
+ String signtool_path = EDITOR_GET("export/windows/osslsigncode");
if (!signtool_path.is_empty() && !FileAccess::exists(signtool_path)) {
add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), vformat(TTR("Could not find osslsigncode executable at \"%s\"."), signtool_path));
return ERR_FILE_NOT_FOUND;
@@ -420,7 +531,7 @@ bool EditorExportPlatformWindows::has_valid_export_configuration(const Ref<Edito
String err = "";
bool valid = EditorExportPlatformPC::has_valid_export_configuration(p_preset, err, r_missing_templates);
- String rcedit_path = EditorSettings::get_singleton()->get("export/windows/rcedit");
+ String rcedit_path = EDITOR_GET("export/windows/rcedit");
if (p_preset->get("application/modify_resources") && rcedit_path.is_empty()) {
err += TTR("The rcedit tool must be configured in the Editor Settings (Export > Windows > rcedit) to change the icon or app information data.") + "\n";
}
diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h
index f85331c898..a9e6d51b9d 100644
--- a/platform/windows/export/export_plugin.h
+++ b/platform/windows/export/export_plugin.h
@@ -38,9 +38,9 @@
#include "platform/windows/logo.gen.h"
class EditorExportPlatformWindows : public EditorExportPlatformPC {
- Error _rcedit_add_data(const Ref<EditorExportPreset> &p_preset, const String &p_path);
+ Error _process_icon(const Ref<EditorExportPreset> &p_preset, const String &p_src_path, const String &p_dst_path);
+ Error _rcedit_add_data(const Ref<EditorExportPreset> &p_preset, const String &p_path, bool p_console_icon);
Error _code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path);
- Error _export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path);
public:
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
diff --git a/platform/windows/gl_manager_windows.cpp b/platform/windows/gl_manager_windows.cpp
index 7689751f1b..5b39c56ea3 100644
--- a/platform/windows/gl_manager_windows.cpp
+++ b/platform/windows/gl_manager_windows.cpp
@@ -185,6 +185,10 @@ Error GLManager_Windows::_create_context(GLWindow &win, GLDisplay &gl_display) {
return ERR_CANT_CREATE;
}
+ if (!wglSwapIntervalEXT) {
+ wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
+ }
+
return OK;
}
@@ -293,50 +297,40 @@ void GLManager_Windows::swap_buffers() {
}
Error GLManager_Windows::initialize() {
- wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
- wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)wglGetProcAddress("wglGetSwapIntervalEXT");
- //glWrapperInit(wrapper_get_proc_address);
-
return OK;
}
-void GLManager_Windows::set_use_vsync(bool p_use) {
- /*
- static bool setup = false;
- static PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT = nullptr;
- static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalMESA = nullptr;
- static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = nullptr;
-
- if (!setup) {
- setup = true;
- String extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display));
- if (extensions.find("GLX_EXT_swap_control") != -1) {
- glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)glXGetProcAddressARB((const GLubyte *)"glXSwapIntervalEXT");
- }
- if (extensions.find("GLX_MESA_swap_control") != -1) {
- glXSwapIntervalMESA = (PFNGLXSWAPINTERVALSGIPROC)glXGetProcAddressARB((const GLubyte *)"glXSwapIntervalMESA");
- }
- if (extensions.find("GLX_SGI_swap_control") != -1) {
- glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)glXGetProcAddressARB((const GLubyte *)"glXSwapIntervalSGI");
- }
+void GLManager_Windows::set_use_vsync(DisplayServer::WindowID p_window_id, bool p_use) {
+ GLWindow &win = get_window(p_window_id);
+ GLWindow *current = _current_window;
+
+ if (&win != _current_window) {
+ window_make_current(p_window_id);
}
- int val = p_use ? 1 : 0;
- if (glXSwapIntervalMESA) {
- glXSwapIntervalMESA(val);
- } else if (glXSwapIntervalSGI) {
- glXSwapIntervalSGI(val);
- } else if (glXSwapIntervalEXT) {
- GLXDrawable drawable = glXGetCurrentDrawable();
- glXSwapIntervalEXT(x11_display, drawable, val);
- } else {
- return;
+
+ if (wglSwapIntervalEXT) {
+ win.use_vsync = p_use;
+ wglSwapIntervalEXT(p_use ? 1 : 0);
}
- use_vsync = p_use;
- */
+
+ if (current != _current_window) {
+ _current_window = current;
+ make_current();
+ }
+}
+
+bool GLManager_Windows::is_using_vsync(DisplayServer::WindowID p_window_id) const {
+ return get_window(p_window_id).use_vsync;
}
-bool GLManager_Windows::is_using_vsync() const {
- return use_vsync;
+HDC GLManager_Windows::get_hdc(DisplayServer::WindowID p_window_id) {
+ return get_window(p_window_id).hDC;
+}
+
+HGLRC GLManager_Windows::get_hglrc(DisplayServer::WindowID p_window_id) {
+ const GLWindow &win = get_window(p_window_id);
+ const GLDisplay &disp = get_display(win.gldisplay_id);
+ return disp.hRC;
}
GLManager_Windows::GLManager_Windows(ContextType p_context_type) {
@@ -344,7 +338,6 @@ GLManager_Windows::GLManager_Windows(ContextType p_context_type) {
direct_render = false;
glx_minor = glx_major = 0;
- use_vsync = false;
_current_window = nullptr;
}
diff --git a/platform/windows/gl_manager_windows.h b/platform/windows/gl_manager_windows.h
index 5e43a3de2a..94f3ce9860 100644
--- a/platform/windows/gl_manager_windows.h
+++ b/platform/windows/gl_manager_windows.h
@@ -54,6 +54,7 @@ private:
struct GLWindow {
int width = 0;
int height = 0;
+ bool use_vsync = false;
// windows specific
HDC hDC;
@@ -72,8 +73,8 @@ private:
GLWindow *_current_window = nullptr;
- PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
- PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT;
+ PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = nullptr;
+ PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = nullptr;
// funcs
void _internal_set_current_window(GLWindow *p_win);
@@ -86,7 +87,6 @@ private:
bool direct_render;
int glx_minor, glx_major;
- bool use_vsync;
ContextType context_type;
private:
@@ -110,8 +110,11 @@ public:
Error initialize();
- void set_use_vsync(bool p_use);
- bool is_using_vsync() const;
+ void set_use_vsync(DisplayServer::WindowID p_window_id, bool p_use);
+ bool is_using_vsync(DisplayServer::WindowID p_window_id) const;
+
+ HDC get_hdc(DisplayServer::WindowID p_window_id);
+ HGLRC get_hglrc(DisplayServer::WindowID p_window_id);
GLManager_Windows(ContextType p_context_type);
~GLManager_Windows();
diff --git a/platform/windows/godot.ico b/platform/windows/godot.ico
index 25830ffdc6..f0bb68225d 100644
--- a/platform/windows/godot.ico
+++ b/platform/windows/godot.ico
Binary files differ
diff --git a/platform/windows/godot_console.ico b/platform/windows/godot_console.ico
new file mode 100644
index 0000000000..1d27e3d6ae
--- /dev/null
+++ b/platform/windows/godot_console.ico
Binary files differ
diff --git a/platform/windows/godot_res_wrap.rc b/platform/windows/godot_res_wrap.rc
new file mode 100644
index 0000000000..9dd29afe51
--- /dev/null
+++ b/platform/windows/godot_res_wrap.rc
@@ -0,0 +1,33 @@
+#include "core/version.h"
+#ifndef _STR
+#define _STR(m_x) #m_x
+#define _MKSTR(m_x) _STR(m_x)
+#endif
+
+GODOT_ICON ICON platform/windows/godot_console.ico
+
+1 VERSIONINFO
+FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
+PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
+FILEOS 4
+FILETYPE 1
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "Godot Engine"
+ VALUE "FileDescription", VERSION_NAME " (Console)"
+ VALUE "FileVersion", VERSION_NUMBER
+ VALUE "ProductName", VERSION_NAME " (Console)"
+ VALUE "Licence", "MIT"
+ VALUE "LegalCopyright", "Copyright (c) 2007-" _MKSTR(VERSION_YEAR) " Juan Linietsky, Ariel Manzur and contributors"
+ VALUE "Info", "https://godotengine.org"
+ VALUE "ProductVersion", VERSION_FULL_BUILD
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp
index d039fd13a7..2b5c8cad48 100644
--- a/platform/windows/joypad_windows.cpp
+++ b/platform/windows/joypad_windows.cpp
@@ -167,7 +167,7 @@ bool JoypadWindows::setup_dinput_joypad(const DIDEVICEINSTANCE *instance) {
const GUID &guid = instance->guidProduct;
char uid[128];
- ERR_FAIL_COND_V_MSG(memcmp(&guid.Data4[2], "PIDVID", 6), false, "DirectInput device not recognised.");
+ ERR_FAIL_COND_V_MSG(memcmp(&guid.Data4[2], "PIDVID", 6), false, "DirectInput device not recognized.");
WORD type = BSWAP16(0x03);
WORD vendor = BSWAP16(LOWORD(guid.Data1));
WORD product = BSWAP16(HIWORD(guid.Data1));
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 5ca064e523..f8633d29ac 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -43,12 +43,12 @@
#include "platform/windows/display_server_windows.h"
#include "servers/audio_server.h"
#include "servers/rendering/rendering_server_default.h"
+#include "servers/text_server.h"
#include "windows_terminal_logger.h"
#include <avrt.h>
#include <bcrypt.h>
#include <direct.h>
-#include <dwrite.h>
#include <knownfolders.h>
#include <process.h>
#include <regstr.h>
@@ -103,8 +103,6 @@ void RedirectIOToConsole() {
RedirectStream("CONIN$", "r", stdin, STD_INPUT_HANDLE);
RedirectStream("CONOUT$", "w", stdout, STD_OUTPUT_HANDLE);
RedirectStream("CONOUT$", "w", stderr, STD_ERROR_HANDLE);
-
- printf("\n"); // Make sure our output is starting from the new line.
}
}
@@ -191,6 +189,27 @@ void OS_Windows::initialize() {
IPUnix::make_default();
main_loop = nullptr;
+
+ CoInitialize(nullptr);
+ HRESULT hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), reinterpret_cast<IUnknown **>(&dwrite_factory));
+ if (SUCCEEDED(hr)) {
+ hr = dwrite_factory->GetSystemFontCollection(&font_collection, false);
+ if (SUCCEEDED(hr)) {
+ dwrite_init = true;
+ hr = dwrite_factory->QueryInterface(&dwrite_factory2);
+ if (SUCCEEDED(hr)) {
+ hr = dwrite_factory2->GetSystemFontFallback(&system_font_fallback);
+ if (SUCCEEDED(hr)) {
+ dwrite2_init = true;
+ }
+ }
+ }
+ }
+ if (!dwrite_init) {
+ print_verbose("Unable to load IDWriteFactory, system font support is disabled.");
+ } else if (!dwrite2_init) {
+ print_verbose("Unable to load IDWriteFactory2, automatic system font fallback is disabled.");
+ }
}
void OS_Windows::delete_main_loop() {
@@ -205,6 +224,22 @@ void OS_Windows::set_main_loop(MainLoop *p_main_loop) {
}
void OS_Windows::finalize() {
+ if (dwrite_factory2) {
+ dwrite_factory2->Release();
+ dwrite_factory2 = nullptr;
+ }
+ if (font_collection) {
+ font_collection->Release();
+ font_collection = nullptr;
+ }
+ if (system_font_fallback) {
+ system_font_fallback->Release();
+ system_font_fallback = nullptr;
+ }
+ if (dwrite_factory) {
+ dwrite_factory->Release();
+ dwrite_factory = nullptr;
+ }
#ifdef WINMIDI_ENABLED
driver_midi.close();
#endif
@@ -237,7 +272,7 @@ Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_han
String path = p_path.replace("/", "\\");
if (!FileAccess::exists(path)) {
- //this code exists so gdnative can load .dll files from within the executable path
+ //this code exists so gdextension can load .dll files from within the executable path
path = get_executable_path().get_base_dir().path_join(p_path.get_file());
}
@@ -311,6 +346,10 @@ String OS_Windows::get_version() const {
}
Vector<String> OS_Windows::get_video_adapter_driver_info() const {
+ if (RenderingServer::get_singleton()->get_rendering_device() == nullptr) {
+ return Vector<String>();
+ }
+
REFCLSID clsid = CLSID_WbemLocator; // Unmarshaler CLSID
REFIID uuid = IID_IWbemLocator; // Interface UUID
IWbemLocator *wbemLocator = NULL; // to get the services
@@ -724,21 +763,17 @@ Error OS_Windows::set_cwd(const String &p_cwd) {
}
Vector<String> OS_Windows::get_system_fonts() const {
+ if (!dwrite_init) {
+ return Vector<String>();
+ }
+
Vector<String> ret;
HashSet<String> font_names;
- ComAutoreleaseRef<IDWriteFactory> dwrite_factory;
- HRESULT hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), reinterpret_cast<IUnknown **>(&dwrite_factory.reference));
- ERR_FAIL_COND_V(FAILED(hr) || dwrite_factory.is_null(), ret);
-
- ComAutoreleaseRef<IDWriteFontCollection> font_collection;
- hr = dwrite_factory->GetSystemFontCollection(&font_collection.reference, false);
- ERR_FAIL_COND_V(FAILED(hr) || font_collection.is_null(), ret);
-
UINT32 family_count = font_collection->GetFontFamilyCount();
for (UINT32 i = 0; i < family_count; i++) {
ComAutoreleaseRef<IDWriteFontFamily> family;
- hr = font_collection->GetFontFamily(i, &family.reference);
+ HRESULT hr = font_collection->GetFontFamily(i, &family.reference);
ERR_CONTINUE(FAILED(hr) || family.is_null());
ComAutoreleaseRef<IDWriteLocalizedStrings> family_names;
@@ -769,7 +804,98 @@ Vector<String> OS_Windows::get_system_fonts() const {
return ret;
}
-String OS_Windows::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+
+class FallbackTextAnalysisSource : public IDWriteTextAnalysisSource {
+ LONG _cRef = 1;
+
+ bool rtl = false;
+ Char16String string;
+ Char16String locale;
+ IDWriteNumberSubstitution *n_sub = nullptr;
+
+public:
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID **ppvInterface) {
+ if (IID_IUnknown == riid) {
+ AddRef();
+ *ppvInterface = (IUnknown *)this;
+ } else if (__uuidof(IMMNotificationClient) == riid) {
+ AddRef();
+ *ppvInterface = (IMMNotificationClient *)this;
+ } else {
+ *ppvInterface = nullptr;
+ return E_NOINTERFACE;
+ }
+ return S_OK;
+ }
+
+ ULONG STDMETHODCALLTYPE AddRef() {
+ return InterlockedIncrement(&_cRef);
+ }
+
+ ULONG STDMETHODCALLTYPE Release() {
+ ULONG ulRef = InterlockedDecrement(&_cRef);
+ if (0 == ulRef) {
+ delete this;
+ }
+ return ulRef;
+ }
+
+ HRESULT STDMETHODCALLTYPE GetTextAtPosition(UINT32 p_text_position, WCHAR const **r_text_string, UINT32 *r_text_length) override {
+ if (p_text_position >= (UINT32)string.length()) {
+ *r_text_string = nullptr;
+ *r_text_length = 0;
+ return S_OK;
+ }
+ *r_text_string = reinterpret_cast<const wchar_t *>(string.get_data()) + p_text_position;
+ *r_text_length = string.length() - p_text_position;
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE GetTextBeforePosition(UINT32 p_text_position, WCHAR const **r_text_string, UINT32 *r_text_length) override {
+ if (p_text_position < 1 || p_text_position >= (UINT32)string.length()) {
+ *r_text_string = nullptr;
+ *r_text_length = 0;
+ return S_OK;
+ }
+ *r_text_string = reinterpret_cast<const wchar_t *>(string.get_data());
+ *r_text_length = p_text_position;
+ return S_OK;
+ }
+
+ DWRITE_READING_DIRECTION STDMETHODCALLTYPE GetParagraphReadingDirection() override {
+ return (rtl) ? DWRITE_READING_DIRECTION_RIGHT_TO_LEFT : DWRITE_READING_DIRECTION_LEFT_TO_RIGHT;
+ }
+
+ HRESULT STDMETHODCALLTYPE GetLocaleName(UINT32 p_text_position, UINT32 *r_text_length, WCHAR const **r_locale_name) override {
+ *r_locale_name = reinterpret_cast<const wchar_t *>(locale.get_data());
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE GetNumberSubstitution(UINT32 p_text_position, UINT32 *r_text_length, IDWriteNumberSubstitution **r_number_substitution) override {
+ *r_number_substitution = n_sub;
+ return S_OK;
+ }
+
+ FallbackTextAnalysisSource(const Char16String &p_text, const Char16String &p_locale, bool p_rtl, IDWriteNumberSubstitution *p_nsub) {
+ _cRef = 1;
+ string = p_text;
+ locale = p_locale;
+ n_sub = p_nsub;
+ rtl = p_rtl;
+ };
+
+ virtual ~FallbackTextAnalysisSource() {}
+};
+
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
+
+String OS_Windows::_get_default_fontname(const String &p_font_name) const {
String font_name = p_font_name;
if (font_name.to_lower() == "sans-serif") {
font_name = "Arial";
@@ -782,19 +908,158 @@ String OS_Windows::get_system_font_path(const String &p_font_name, bool p_bold,
} else if (font_name.to_lower() == "fantasy") {
font_name = "Gabriola";
}
+ return font_name;
+}
- ComAutoreleaseRef<IDWriteFactory> dwrite_factory;
- HRESULT hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), reinterpret_cast<IUnknown **>(&dwrite_factory.reference));
- ERR_FAIL_COND_V(FAILED(hr) || dwrite_factory.is_null(), String());
+DWRITE_FONT_WEIGHT OS_Windows::_weight_to_dw(int p_weight) const {
+ if (p_weight < 150) {
+ return DWRITE_FONT_WEIGHT_THIN;
+ } else if (p_weight < 250) {
+ return DWRITE_FONT_WEIGHT_EXTRA_LIGHT;
+ } else if (p_weight < 325) {
+ return DWRITE_FONT_WEIGHT_LIGHT;
+ } else if (p_weight < 375) {
+ return DWRITE_FONT_WEIGHT_SEMI_LIGHT;
+ } else if (p_weight < 450) {
+ return DWRITE_FONT_WEIGHT_NORMAL;
+ } else if (p_weight < 550) {
+ return DWRITE_FONT_WEIGHT_MEDIUM;
+ } else if (p_weight < 650) {
+ return DWRITE_FONT_WEIGHT_DEMI_BOLD;
+ } else if (p_weight < 750) {
+ return DWRITE_FONT_WEIGHT_BOLD;
+ } else if (p_weight < 850) {
+ return DWRITE_FONT_WEIGHT_EXTRA_BOLD;
+ } else if (p_weight < 925) {
+ return DWRITE_FONT_WEIGHT_BLACK;
+ } else {
+ return DWRITE_FONT_WEIGHT_EXTRA_BLACK;
+ }
+}
+
+DWRITE_FONT_STRETCH OS_Windows::_stretch_to_dw(int p_stretch) const {
+ if (p_stretch < 56) {
+ return DWRITE_FONT_STRETCH_ULTRA_CONDENSED;
+ } else if (p_stretch < 69) {
+ return DWRITE_FONT_STRETCH_EXTRA_CONDENSED;
+ } else if (p_stretch < 81) {
+ return DWRITE_FONT_STRETCH_CONDENSED;
+ } else if (p_stretch < 93) {
+ return DWRITE_FONT_STRETCH_SEMI_CONDENSED;
+ } else if (p_stretch < 106) {
+ return DWRITE_FONT_STRETCH_NORMAL;
+ } else if (p_stretch < 137) {
+ return DWRITE_FONT_STRETCH_SEMI_EXPANDED;
+ } else if (p_stretch < 144) {
+ return DWRITE_FONT_STRETCH_EXPANDED;
+ } else if (p_stretch < 162) {
+ return DWRITE_FONT_STRETCH_EXTRA_EXPANDED;
+ } else {
+ return DWRITE_FONT_STRETCH_ULTRA_EXPANDED;
+ }
+}
+
+Vector<String> OS_Windows::get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale, const String &p_script, int p_weight, int p_stretch, bool p_italic) const {
+ if (!dwrite2_init) {
+ return Vector<String>();
+ }
- ComAutoreleaseRef<IDWriteFontCollection> font_collection;
- hr = dwrite_factory->GetSystemFontCollection(&font_collection.reference, false);
- ERR_FAIL_COND_V(FAILED(hr) || font_collection.is_null(), String());
+ String font_name = _get_default_fontname(p_font_name);
+
+ bool rtl = TS->is_locale_right_to_left(p_locale);
+ Char16String text = p_text.utf16();
+ Char16String locale = p_locale.utf16();
+
+ ComAutoreleaseRef<IDWriteNumberSubstitution> number_substitution;
+ HRESULT hr = dwrite_factory->CreateNumberSubstitution(DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, reinterpret_cast<const wchar_t *>(locale.get_data()), true, &number_substitution.reference);
+ ERR_FAIL_COND_V(FAILED(hr) || number_substitution.is_null(), Vector<String>());
+
+ FallbackTextAnalysisSource fs = FallbackTextAnalysisSource(text, locale, rtl, number_substitution.reference);
+ UINT32 mapped_length = 0;
+ FLOAT scale = 0.0;
+ ComAutoreleaseRef<IDWriteFont> dwrite_font;
+ hr = system_font_fallback->MapCharacters(
+ &fs,
+ 0,
+ (UINT32)text.length(),
+ font_collection,
+ reinterpret_cast<const wchar_t *>(font_name.utf16().get_data()),
+ _weight_to_dw(p_weight),
+ p_italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL,
+ _stretch_to_dw(p_stretch),
+ &mapped_length,
+ &dwrite_font.reference,
+ &scale);
+
+ if (FAILED(hr) || dwrite_font.is_null()) {
+ return Vector<String>();
+ }
+
+ ComAutoreleaseRef<IDWriteFontFace> dwrite_face;
+ hr = dwrite_font->CreateFontFace(&dwrite_face.reference);
+ if (FAILED(hr) || dwrite_face.is_null()) {
+ return Vector<String>();
+ }
+
+ UINT32 number_of_files = 0;
+ hr = dwrite_face->GetFiles(&number_of_files, nullptr);
+ if (FAILED(hr)) {
+ return Vector<String>();
+ }
+ Vector<ComAutoreleaseRef<IDWriteFontFile>> files;
+ files.resize(number_of_files);
+ hr = dwrite_face->GetFiles(&number_of_files, (IDWriteFontFile **)files.ptrw());
+ if (FAILED(hr)) {
+ return Vector<String>();
+ }
+
+ Vector<String> ret;
+ for (UINT32 i = 0; i < number_of_files; i++) {
+ void const *reference_key = nullptr;
+ UINT32 reference_key_size = 0;
+ ComAutoreleaseRef<IDWriteLocalFontFileLoader> loader;
+
+ hr = files.write[i]->GetLoader((IDWriteFontFileLoader **)&loader.reference);
+ if (FAILED(hr) || loader.is_null()) {
+ continue;
+ }
+ hr = files.write[i]->GetReferenceKey(&reference_key, &reference_key_size);
+ if (FAILED(hr)) {
+ continue;
+ }
+
+ WCHAR file_path[MAX_PATH];
+ hr = loader->GetFilePathFromKey(reference_key, reference_key_size, &file_path[0], MAX_PATH);
+ if (FAILED(hr)) {
+ continue;
+ }
+ String fpath = String::utf16((const char16_t *)&file_path[0]);
+
+ WIN32_FIND_DATAW d;
+ HANDLE fnd = FindFirstFileW((LPCWSTR)&file_path[0], &d);
+ if (fnd != INVALID_HANDLE_VALUE) {
+ String fname = String::utf16((const char16_t *)d.cFileName);
+ if (!fname.is_empty()) {
+ fpath = fpath.get_base_dir().path_join(fname);
+ }
+ FindClose(fnd);
+ }
+ ret.push_back(fpath);
+ }
+ return ret;
+}
+
+String OS_Windows::get_system_font_path(const String &p_font_name, int p_weight, int p_stretch, bool p_italic) const {
+ if (!dwrite_init) {
+ return String();
+ }
+
+ String font_name = _get_default_fontname(p_font_name);
UINT32 index = 0;
BOOL exists = false;
- font_collection->FindFamilyName((const WCHAR *)font_name.utf16().get_data(), &index, &exists);
- if (FAILED(hr)) {
+ HRESULT hr = font_collection->FindFamilyName((const WCHAR *)font_name.utf16().get_data(), &index, &exists);
+ if (FAILED(hr) || !exists) {
return String();
}
@@ -805,7 +1070,7 @@ String OS_Windows::get_system_font_path(const String &p_font_name, bool p_bold,
}
ComAutoreleaseRef<IDWriteFont> dwrite_font;
- hr = family->GetFirstMatchingFont(p_bold ? DWRITE_FONT_WEIGHT_BOLD : DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STRETCH_NORMAL, p_italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL, &dwrite_font.reference);
+ hr = family->GetFirstMatchingFont(_weight_to_dw(p_weight), _stretch_to_dw(p_stretch), p_italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL, &dwrite_font.reference);
if (FAILED(hr) || dwrite_font.is_null()) {
return String();
}
@@ -847,7 +1112,19 @@ String OS_Windows::get_system_font_path(const String &p_font_name, bool p_bold,
if (FAILED(hr)) {
continue;
}
- return String::utf16((const char16_t *)&file_path[0]);
+ String fpath = String::utf16((const char16_t *)&file_path[0]);
+
+ WIN32_FIND_DATAW d;
+ HANDLE fnd = FindFirstFileW((LPCWSTR)&file_path[0], &d);
+ if (fnd != INVALID_HANDLE_VALUE) {
+ String fname = String::utf16((const char16_t *)d.cFileName);
+ if (!fname.is_empty()) {
+ fpath = fpath.get_base_dir().path_join(fname);
+ }
+ FindClose(fnd);
+ }
+
+ return fpath;
}
return String();
}
@@ -887,8 +1164,11 @@ bool OS_Windows::set_environment(const String &p_var, const String &p_value) con
String OS_Windows::get_stdin_string(bool p_block) {
if (p_block) {
- char buff[1024];
- return fgets(buff, 1024, stdin);
+ WCHAR buff[1024];
+ DWORD count = 0;
+ if (ReadConsoleW(GetStdHandle(STD_INPUT_HANDLE), buff, 1024, &count, nullptr)) {
+ return String::utf16((const char16_t *)buff, count);
+ }
}
return String();
@@ -1059,14 +1339,6 @@ uint64_t OS_Windows::get_embedded_pck_offset() const {
}
String OS_Windows::get_config_path() const {
- // The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on Windows as well.
- if (has_environment("XDG_CONFIG_HOME")) {
- if (get_environment("XDG_CONFIG_HOME").is_absolute_path()) {
- return get_environment("XDG_CONFIG_HOME").replace("\\", "/");
- } else {
- WARN_PRINT_ONCE("`XDG_CONFIG_HOME` is a relative path. Ignoring its value and falling back to `%APPDATA%` or `.` per the XDG Base Directory specification.");
- }
- }
if (has_environment("APPDATA")) {
return get_environment("APPDATA").replace("\\", "/");
}
@@ -1074,29 +1346,13 @@ String OS_Windows::get_config_path() const {
}
String OS_Windows::get_data_path() const {
- // The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on Windows as well.
- if (has_environment("XDG_DATA_HOME")) {
- if (get_environment("XDG_DATA_HOME").is_absolute_path()) {
- return get_environment("XDG_DATA_HOME").replace("\\", "/");
- } else {
- WARN_PRINT_ONCE("`XDG_DATA_HOME` is a relative path. Ignoring its value and falling back to `get_config_path()` per the XDG Base Directory specification.");
- }
- }
return get_config_path();
}
String OS_Windows::get_cache_path() const {
static String cache_path_cache;
if (cache_path_cache.is_empty()) {
- // The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on Windows as well.
- if (has_environment("XDG_CACHE_HOME")) {
- if (get_environment("XDG_CACHE_HOME").is_absolute_path()) {
- cache_path_cache = get_environment("XDG_CACHE_HOME").replace("\\", "/");
- } else {
- WARN_PRINT_ONCE("`XDG_CACHE_HOME` is a relative path. Ignoring its value and falling back to `%LOCALAPPDATA%\\cache`, `%TEMP%` or `get_config_path()` per the XDG Base Directory specification.");
- }
- }
- if (cache_path_cache.is_empty() && has_environment("LOCALAPPDATA")) {
+ if (has_environment("LOCALAPPDATA")) {
cache_path_cache = get_environment("LOCALAPPDATA").replace("\\", "/");
}
if (cache_path_cache.is_empty() && has_environment("TEMP")) {
@@ -1153,11 +1409,11 @@ String OS_Windows::get_system_dir(SystemDir p_dir, bool p_shared_storage) const
}
String OS_Windows::get_user_data_dir() const {
- String appname = get_safe_dir_name(ProjectSettings::get_singleton()->get("application/config/name"));
+ String appname = get_safe_dir_name(GLOBAL_GET("application/config/name"));
if (!appname.is_empty()) {
- bool use_custom_dir = ProjectSettings::get_singleton()->get("application/config/use_custom_user_dir");
+ bool use_custom_dir = GLOBAL_GET("application/config/use_custom_user_dir");
if (use_custom_dir) {
- String custom_dir = get_safe_dir_name(ProjectSettings::get_singleton()->get("application/config/custom_user_dir_name"), true);
+ String custom_dir = get_safe_dir_name(GLOBAL_GET("application/config/custom_user_dir_name"), true);
if (custom_dir.is_empty()) {
custom_dir = appname;
}
@@ -1177,7 +1433,14 @@ String OS_Windows::get_unique_id() const {
}
bool OS_Windows::_check_internal_feature_support(const String &p_feature) {
- return p_feature == "pc";
+ if (p_feature == "system_fonts") {
+ return dwrite_init;
+ }
+ if (p_feature == "pc") {
+ return true;
+ }
+
+ return false;
}
void OS_Windows::disable_crash_handler() {
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index bf934bce64..1db2b5880d 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -55,6 +55,8 @@
#include <stdio.h>
#define WIN32_LEAN_AND_MEAN
+#include <dwrite.h>
+#include <dwrite_2.h>
#include <windows.h>
#include <windowsx.h>
@@ -63,6 +65,10 @@
#define WINDOWS_DEBUG_OUTPUT_ENABLED
#endif
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4
+#endif
+
template <class T>
class ComAutoreleaseRef {
public:
@@ -75,6 +81,9 @@ public:
_FORCE_INLINE_ bool is_valid() const { return reference != nullptr; }
_FORCE_INLINE_ bool is_null() const { return reference == nullptr; }
ComAutoreleaseRef() {}
+ ComAutoreleaseRef(T *p_ref) {
+ reference = p_ref;
+ }
~ComAutoreleaseRef() {
if (reference != nullptr) {
reference->Release();
@@ -110,6 +119,18 @@ class OS_Windows : public OS {
HWND main_window;
+ IDWriteFactory *dwrite_factory = nullptr;
+ IDWriteFactory2 *dwrite_factory2 = nullptr;
+ IDWriteFontCollection *font_collection = nullptr;
+ IDWriteFontFallback *system_font_fallback = nullptr;
+
+ bool dwrite_init = false;
+ bool dwrite2_init = false;
+
+ String _get_default_fontname(const String &p_font_name) const;
+ DWRITE_FONT_WEIGHT _weight_to_dw(int p_weight) const;
+ DWRITE_FONT_STRETCH _stretch_to_dw(int p_stretch) const;
+
// functions used by main to initialize/deinitialize the OS
protected:
virtual void initialize() override;
@@ -168,7 +189,8 @@ public:
virtual bool set_environment(const String &p_var, const String &p_value) const override;
virtual Vector<String> get_system_fonts() const override;
- virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const override;
+ virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
+ virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
virtual String get_executable_path() const override;
diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h
index 8e80f8cacb..7f0042d76f 100644
--- a/platform/windows/platform_config.h
+++ b/platform/windows/platform_config.h
@@ -30,4 +30,4 @@
#include <malloc.h>
-#define OPENGL_INCLUDE_H "thirdparty/glad/glad/glad.h"
+#define OPENGL_INCLUDE_H "thirdparty/glad/glad/gl.h"
diff --git a/platform/windows/platform_windows_builders.py b/platform/windows/platform_windows_builders.py
index 33ca2e8ffa..b522a75a9c 100644
--- a/platform/windows/platform_windows_builders.py
+++ b/platform/windows/platform_windows_builders.py
@@ -4,18 +4,15 @@ All such functions are invoked in a subprocess on Windows to prevent build flaki
"""
import os
+from detect import get_mingw_bin_prefix
from platform_methods import subprocess_main
def make_debug_mingw(target, source, env):
- mingw_prefix = ""
- if env["arch"] == "x86_32":
- mingw_prefix = env["mingw_prefix_32"]
- else:
- mingw_prefix = env["mingw_prefix_64"]
- os.system(mingw_prefix + "objcopy --only-keep-debug {0} {0}.debugsymbols".format(target[0]))
- os.system(mingw_prefix + "strip --strip-debug --strip-unneeded {0}".format(target[0]))
- os.system(mingw_prefix + "objcopy --add-gnu-debuglink={0}.debugsymbols {0}".format(target[0]))
+ mingw_bin_prefix = get_mingw_bin_prefix(env["mingw_prefix"], env["arch"])
+ os.system(mingw_bin_prefix + "objcopy --only-keep-debug {0} {0}.debugsymbols".format(target[0]))
+ os.system(mingw_bin_prefix + "strip --strip-debug --strip-unneeded {0}".format(target[0]))
+ os.system(mingw_bin_prefix + "objcopy --add-gnu-debuglink={0}.debugsymbols {0}".format(target[0]))
if __name__ == "__main__":
diff --git a/platform/windows/vulkan_context_win.h b/platform/windows/vulkan_context_win.h
index 2ecdfc8f3f..9dedcabb2b 100644
--- a/platform/windows/vulkan_context_win.h
+++ b/platform/windows/vulkan_context_win.h
@@ -31,6 +31,8 @@
#ifndef VULKAN_CONTEXT_WIN_H
#define VULKAN_CONTEXT_WIN_H
+#ifdef VULKAN_ENABLED
+
#include "drivers/vulkan/vulkan_context.h"
#define WIN32_LEAN_AND_MEAN
@@ -46,4 +48,6 @@ public:
~VulkanContextWindows();
};
+#endif // VULKAN_ENABLED
+
#endif // VULKAN_CONTEXT_WIN_H