summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/core_bind.cpp11
-rw-r--r--core/core_bind.h3
-rw-r--r--core/core_constants.cpp1
-rw-r--r--core/io/file_access.cpp7
-rw-r--r--core/io/file_access.h5
-rw-r--r--core/io/pck_packer.cpp2
-rw-r--r--core/object/object.cpp2
-rw-r--r--core/object/object.h31
-rw-r--r--core/os/os.h3
-rw-r--r--core/variant/variant_op.h24
-rw-r--r--core/variant/variant_parser.cpp73
-rw-r--r--core/variant/variant_parser.h32
-rw-r--r--doc/classes/@GlobalScope.xml36
-rw-r--r--doc/classes/Animation.xml7
-rw-r--r--doc/classes/Color.xml170
-rw-r--r--doc/classes/Curve2D.xml16
-rw-r--r--doc/classes/Curve3D.xml4
-rw-r--r--doc/classes/DisplayServer.xml1
-rw-r--r--doc/classes/FileAccess.xml14
-rw-r--r--doc/classes/Font.xml12
-rw-r--r--doc/classes/FontFile.xml9
-rw-r--r--doc/classes/OS.xml30
-rw-r--r--doc/classes/Object.xml16
-rw-r--r--doc/classes/RID.xml13
-rw-r--r--doc/classes/RichTextLabel.xml6
-rw-r--r--doc/classes/SystemFont.xml15
-rw-r--r--doc/classes/TextServer.xml48
-rw-r--r--doc/classes/TextServerExtension.xml44
-rw-r--r--doc/classes/Vector2.xml4
-rw-r--r--doc/classes/Vector3.xml4
-rwxr-xr-xdoc/tools/make_rst.py319
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp2
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h5
-rw-r--r--drivers/gles3/shaders/canvas.glsl12
-rw-r--r--drivers/gles3/shaders/scene.glsl16
-rw-r--r--drivers/gles3/shaders/stdlib_inc.glsl19
-rw-r--r--drivers/gles3/storage/material_storage.cpp1
-rw-r--r--editor/animation_track_editor.cpp13
-rw-r--r--editor/animation_track_editor.h1
-rw-r--r--editor/code_editor.cpp263
-rw-r--r--editor/create_dialog.cpp3
-rw-r--r--editor/editor_fonts.cpp2
-rw-r--r--editor/export/editor_export_platform.cpp26
-rw-r--r--editor/icons/TrackTrigger.svg1
-rw-r--r--editor/import/dynamic_font_import_settings.cpp7
-rw-r--r--editor/import/resource_importer_bmfont.cpp1
-rw-r--r--editor/import/resource_importer_dynamic_font.cpp5
-rw-r--r--editor/import/resource_importer_imagefont.cpp1
-rw-r--r--editor/import/resource_importer_scene.cpp2
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp58
-rw-r--r--editor/plugins/animation_player_editor_plugin.h2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp16
-rw-r--r--editor/plugins/node_3d_editor_plugin.h2
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp9
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
-rw-r--r--editor/shader_globals_editor.cpp43
-rw-r--r--main/main.cpp150
-rw-r--r--misc/dist/shell/_godot.zsh-completion6
-rw-r--r--misc/dist/shell/godot.bash-completion9
-rw-r--r--misc/dist/shell/godot.fish5
-rw-r--r--modules/gltf/gltf_document.cpp4
-rw-r--r--modules/openxr/extensions/openxr_opengl_extension.cpp2
-rw-r--r--modules/raycast/SCsub7
-rw-r--r--modules/raycast/config.py14
-rw-r--r--modules/text_server_adv/text_server_adv.cpp274
-rw-r--r--modules/text_server_adv/text_server_adv.h142
-rw-r--r--modules/text_server_fb/text_server_fb.cpp243
-rw-r--r--modules/text_server_fb/text_server_fb.h141
-rw-r--r--platform/android/display_server_android.cpp14
-rw-r--r--platform/android/export/export_plugin.cpp4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt5
-rw-r--r--platform/android/os_android.cpp226
-rw-r--r--platform/android/os_android.h21
-rw-r--r--platform/ios/os_ios.h7
-rw-r--r--platform/ios/os_ios.mm140
-rw-r--r--platform/linuxbsd/detect.py15
-rw-r--r--platform/linuxbsd/fontconfig-so_wrap.c380
-rw-r--r--platform/linuxbsd/fontconfig-so_wrap.h142
-rw-r--r--platform/linuxbsd/joypad_linux.cpp2
-rw-r--r--platform/linuxbsd/os_linuxbsd.cpp152
-rw-r--r--platform/linuxbsd/os_linuxbsd.h13
-rw-r--r--platform/linuxbsd/x11/SCsub8
-rw-r--r--platform/linuxbsd/x11/detect_prime_x11.cpp12
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp47
-rw-r--r--platform/linuxbsd/x11/display_server_x11.h14
-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.cpp4
-rw-r--r--platform/linuxbsd/x11/gl_manager_x11.h7
-rw-r--r--platform/macos/export/plist.cpp2
-rw-r--r--platform/macos/os_macos.h7
-rw-r--r--platform/macos/os_macos.mm140
-rw-r--r--platform/windows/detect.py11
-rw-r--r--platform/windows/display_server_windows.cpp9
-rw-r--r--platform/windows/os_windows.cpp303
-rw-r--r--platform/windows/os_windows.h20
-rw-r--r--scene/2d/path_2d.cpp2
-rw-r--r--scene/3d/mesh_instance_3d.cpp5
-rw-r--r--scene/3d/xr_nodes.cpp40
-rw-r--r--scene/3d/xr_nodes.h2
-rw-r--r--scene/animation/animation_player.cpp54
-rw-r--r--scene/animation/animation_tree.cpp8
-rw-r--r--scene/gui/code_edit.cpp5
-rw-r--r--scene/gui/code_edit.h1
-rw-r--r--scene/gui/graph_node.cpp66
-rw-r--r--scene/gui/line_edit.cpp69
-rw-r--r--scene/gui/line_edit.h3
-rw-r--r--scene/gui/rich_text_label.cpp31
-rw-r--r--scene/gui/rich_text_label.h2
-rw-r--r--scene/gui/text_edit.cpp4
-rw-r--r--scene/gui/tree.cpp2
-rw-r--r--scene/resources/animation.cpp3
-rw-r--r--scene/resources/animation.h1
-rw-r--r--scene/resources/curve.cpp309
-rw-r--r--scene/resources/curve.h15
-rw-r--r--scene/resources/font.cpp161
-rw-r--r--scene/resources/font.h27
-rw-r--r--scene/resources/resource_format_text.cpp2
-rw-r--r--scene/resources/shader.cpp2
-rw-r--r--scene/resources/shader_include.cpp2
-rw-r--r--scene/resources/visual_shader.cpp2
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp1
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp1
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp1
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_data_inc.glsl2
-rw-r--r--servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.cpp1
-rw-r--r--servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.h3
-rw-r--r--servers/rendering/renderer_scene_cull.cpp4
-rw-r--r--servers/rendering/renderer_scene_render.cpp4
-rw-r--r--servers/rendering/renderer_scene_render.h3
-rw-r--r--servers/rendering/shader_types.cpp2
-rw-r--r--servers/text/text_server_extension.cpp45
-rw-r--r--servers/text/text_server_extension.h18
-rw-r--r--servers/text_server.cpp9
-rw-r--r--servers/text_server.h11
-rw-r--r--tests/scene/test_curve.h5
-rw-r--r--tests/servers/test_text_server.h2
149 files changed, 16894 insertions, 951 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 1fe34cb4fd..9503bd2575 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -236,8 +236,12 @@ Vector<String> OS::get_system_fonts() const {
return ::OS::get_singleton()->get_system_fonts();
}
-String OS::get_system_font_path(const String &p_font_name, bool p_bold, bool p_italic) const {
- return ::OS::get_singleton()->get_system_font_path(p_font_name, p_bold, p_italic);
+String OS::get_system_font_path(const String &p_font_name, int p_weight, int p_stretch, bool p_italic) const {
+ return ::OS::get_singleton()->get_system_font_path(p_font_name, p_weight, p_stretch, p_italic);
+}
+
+Vector<String> OS::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 {
+ return ::OS::get_singleton()->get_system_font_path_for_text(p_font_name, p_text, p_locale, p_script, p_weight, p_stretch, p_italic);
}
String OS::get_executable_path() const {
@@ -532,7 +536,8 @@ void OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_processor_name"), &OS::get_processor_name);
ClassDB::bind_method(D_METHOD("get_system_fonts"), &OS::get_system_fonts);
- ClassDB::bind_method(D_METHOD("get_system_font_path", "font_name", "bold", "italic"), &OS::get_system_font_path, DEFVAL(false), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("get_system_font_path", "font_name", "weight", "stretch", "italic"), &OS::get_system_font_path, DEFVAL(400), DEFVAL(100), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("get_system_font_path_for_text", "font_name", "text", "locale", "script", "weight", "stretch", "italic"), &OS::get_system_font_path_for_text, DEFVAL(String()), DEFVAL(String()), DEFVAL(400), DEFVAL(100), DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_executable_path"), &OS::get_executable_path);
ClassDB::bind_method(D_METHOD("read_string_from_stdin", "block"), &OS::read_string_from_stdin, DEFVAL(true));
ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "output", "read_stderr", "open_console"), &OS::execute, DEFVAL(Array()), DEFVAL(false), DEFVAL(false));
diff --git a/core/core_bind.h b/core/core_bind.h
index 748ecb4929..c863a8094c 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -170,7 +170,8 @@ public:
void crash(const String &p_message);
Vector<String> get_system_fonts() const;
- String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const;
+ String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const;
+ 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;
String get_executable_path() const;
String read_string_from_stdin(bool p_block = true);
int execute(const String &p_path, const Vector<String> &p_arguments, Array r_output = Array(), bool p_read_stderr = false, bool p_open_console = false);
diff --git a/core/core_constants.cpp b/core/core_constants.cpp
index 628740ed32..e0772cd43d 100644
--- a/core/core_constants.cpp
+++ b/core/core_constants.cpp
@@ -637,7 +637,6 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_SCRIPT_VARIABLE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_STORE_IF_NULL);
- BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_ANIMATE_AS_TRIGGER);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_CLASS_IS_ENUM);
diff --git a/core/io/file_access.cpp b/core/io/file_access.cpp
index cb25564342..0ceb300f97 100644
--- a/core/io/file_access.cpp
+++ b/core/io/file_access.cpp
@@ -690,7 +690,7 @@ void FileAccess::store_var(const Variant &p_var, bool p_full_objects) {
_store_buffer(buff);
}
-Vector<uint8_t> FileAccess::get_file_as_array(const String &p_path, Error *r_error) {
+Vector<uint8_t> FileAccess::get_file_as_bytes(const String &p_path, Error *r_error) {
Ref<FileAccess> f = FileAccess::open(p_path, READ, r_error);
if (f.is_null()) {
if (r_error) { // if error requested, do not throw error
@@ -706,7 +706,7 @@ Vector<uint8_t> FileAccess::get_file_as_array(const String &p_path, Error *r_err
String FileAccess::get_file_as_string(const String &p_path, Error *r_error) {
Error err;
- Vector<uint8_t> array = get_file_as_array(p_path, &err);
+ Vector<uint8_t> array = get_file_as_bytes(p_path, &err);
if (r_error) {
*r_error = err;
}
@@ -810,6 +810,9 @@ void FileAccess::_bind_methods() {
ClassDB::bind_static_method("FileAccess", D_METHOD("open_compressed", "path", "mode_flags", "compression_mode"), &FileAccess::open_compressed, DEFVAL(0));
ClassDB::bind_static_method("FileAccess", D_METHOD("get_open_error"), &FileAccess::get_open_error);
+ ClassDB::bind_static_method("FileAccess", D_METHOD("get_file_as_bytes", "path"), &FileAccess::_get_file_as_bytes);
+ ClassDB::bind_static_method("FileAccess", D_METHOD("get_file_as_string", "path"), &FileAccess::_get_file_as_string);
+
ClassDB::bind_method(D_METHOD("flush"), &FileAccess::flush);
ClassDB::bind_method(D_METHOD("get_path"), &FileAccess::get_path);
ClassDB::bind_method(D_METHOD("get_path_absolute"), &FileAccess::get_path_absolute);
diff --git a/core/io/file_access.h b/core/io/file_access.h
index 8ca44306a0..54a0235333 100644
--- a/core/io/file_access.h
+++ b/core/io/file_access.h
@@ -192,9 +192,12 @@ public:
static String get_sha256(const String &p_file);
static String get_multiple_md5(const Vector<String> &p_file);
- static Vector<uint8_t> get_file_as_array(const String &p_path, Error *r_error = nullptr);
+ static Vector<uint8_t> get_file_as_bytes(const String &p_path, Error *r_error = nullptr);
static String get_file_as_string(const String &p_path, Error *r_error = nullptr);
+ static PackedByteArray _get_file_as_bytes(const String &p_path) { return get_file_as_bytes(p_path); }
+ static String _get_file_as_string(const String &p_path) { return get_file_as_string(p_path); };
+
template <class T>
static void make_default(AccessType p_access) {
create_func[p_access] = _create_builtin<T>;
diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp
index 0118b4c6af..0556f45b0c 100644
--- a/core/io/pck_packer.cpp
+++ b/core/io/pck_packer.cpp
@@ -120,7 +120,7 @@ Error PCKPacker::add_file(const String &p_file, const String &p_src, bool p_encr
pf.ofs = ofs;
pf.size = f->get_length();
- Vector<uint8_t> data = FileAccess::get_file_as_array(p_src);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(p_src);
{
unsigned char hash[16];
CryptoCore::md5(data.ptr(), data.size(), hash);
diff --git a/core/object/object.cpp b/core/object/object.cpp
index d27e0d7621..105f9560d6 100644
--- a/core/object/object.cpp
+++ b/core/object/object.cpp
@@ -1473,6 +1473,8 @@ void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_indexed", "property_path"), &Object::_get_indexed_bind);
ClassDB::bind_method(D_METHOD("get_property_list"), &Object::_get_property_list_bind);
ClassDB::bind_method(D_METHOD("get_method_list"), &Object::_get_method_list_bind);
+ ClassDB::bind_method(D_METHOD("property_can_revert", "property"), &Object::property_can_revert);
+ ClassDB::bind_method(D_METHOD("property_get_revert", "property"), &Object::property_get_revert);
ClassDB::bind_method(D_METHOD("notification", "what", "reversed"), &Object::notification, DEFVAL(false));
ClassDB::bind_method(D_METHOD("to_string"), &Object::to_string);
ClassDB::bind_method(D_METHOD("get_instance_id"), &Object::get_instance_id);
diff --git a/core/object/object.h b/core/object/object.h
index 9416eb7762..3ad8391dd6 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -113,22 +113,21 @@ enum PropertyUsageFlags {
PROPERTY_USAGE_RESTART_IF_CHANGED = 1 << 11,
PROPERTY_USAGE_SCRIPT_VARIABLE = 1 << 12,
PROPERTY_USAGE_STORE_IF_NULL = 1 << 13,
- PROPERTY_USAGE_ANIMATE_AS_TRIGGER = 1 << 14,
- PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED = 1 << 15,
- PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE = 1 << 16,
- PROPERTY_USAGE_CLASS_IS_ENUM = 1 << 17,
- PROPERTY_USAGE_NIL_IS_VARIANT = 1 << 18,
- PROPERTY_USAGE_INTERNAL = 1 << 19,
- PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE = 1 << 20, // If the object is duplicated also this property will be duplicated.
- PROPERTY_USAGE_HIGH_END_GFX = 1 << 21,
- PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 22,
- PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT = 1 << 23,
- PROPERTY_USAGE_KEYING_INCREMENTS = 1 << 24, // Used in inspector to increment property when keyed in animation player.
- PROPERTY_USAGE_DEFERRED_SET_RESOURCE = 1 << 25, // when loading, the resource for this property can be set at the end of loading.
- PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 26, // For Object properties, instantiate them when creating in editor.
- PROPERTY_USAGE_EDITOR_BASIC_SETTING = 1 << 27, //for project or editor settings, show when basic settings are selected.
- PROPERTY_USAGE_READ_ONLY = 1 << 28, // Mark a property as read-only in the inspector.
- PROPERTY_USAGE_ARRAY = 1 << 29, // Used in the inspector to group properties as elements of an array.
+ PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED = 1 << 14,
+ PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE = 1 << 15,
+ PROPERTY_USAGE_CLASS_IS_ENUM = 1 << 16,
+ PROPERTY_USAGE_NIL_IS_VARIANT = 1 << 17,
+ PROPERTY_USAGE_INTERNAL = 1 << 18,
+ PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE = 1 << 19, // If the object is duplicated also this property will be duplicated.
+ PROPERTY_USAGE_HIGH_END_GFX = 1 << 20,
+ PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 21,
+ PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT = 1 << 22,
+ PROPERTY_USAGE_KEYING_INCREMENTS = 1 << 23, // Used in inspector to increment property when keyed in animation player.
+ PROPERTY_USAGE_DEFERRED_SET_RESOURCE = 1 << 24, // when loading, the resource for this property can be set at the end of loading.
+ PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 25, // For Object properties, instantiate them when creating in editor.
+ PROPERTY_USAGE_EDITOR_BASIC_SETTING = 1 << 26, //for project or editor settings, show when basic settings are selected.
+ PROPERTY_USAGE_READ_ONLY = 1 << 27, // Mark a property as read-only in the inspector.
+ PROPERTY_USAGE_ARRAY = 1 << 28, // Used in the inspector to group properties as elements of an array.
PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNATIONALIZED,
diff --git a/core/os/os.h b/core/os/os.h
index af7b40f3ec..72a91f318a 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -150,7 +150,8 @@ public:
virtual int get_low_processor_usage_mode_sleep_usec() const;
virtual Vector<String> get_system_fonts() const { return Vector<String>(); };
- virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const { return String(); };
+ virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return String(); };
+ 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 { return Vector<String>(); };
virtual String get_executable_path() const;
virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) = 0;
virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) = 0;
diff --git a/core/variant/variant_op.h b/core/variant/variant_op.h
index ec1ce67445..34858540ec 100644
--- a/core/variant/variant_op.h
+++ b/core/variant/variant_op.h
@@ -890,10 +890,12 @@ public:
static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) {
const String &a = *VariantGetInternalPtr<String>::get_ptr(&p_left);
*r_ret = do_mod(a, &r_valid);
- r_valid = true;
}
static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
- *VariantGetInternalPtr<String>::get_ptr(r_ret) = do_mod(*VariantGetInternalPtr<String>::get_ptr(left), nullptr);
+ bool valid = true;
+ String result = do_mod(*VariantGetInternalPtr<String>::get_ptr(left), &valid);
+ ERR_FAIL_COND_MSG(!valid, result);
+ *VariantGetInternalPtr<String>::get_ptr(r_ret) = result;
}
static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
PtrToArg<String>::encode(do_mod(PtrToArg<String>::convert(left), nullptr), r_ret);
@@ -913,10 +915,12 @@ public:
static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) {
const String &a = *VariantGetInternalPtr<String>::get_ptr(&p_left);
*r_ret = do_mod(a, *VariantGetInternalPtr<Array>::get_ptr(&p_right), &r_valid);
- r_valid = true;
}
static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
- *VariantGetInternalPtr<String>::get_ptr(r_ret) = do_mod(*VariantGetInternalPtr<String>::get_ptr(left), *VariantGetInternalPtr<Array>::get_ptr(right), nullptr);
+ bool valid = true;
+ String result = do_mod(*VariantGetInternalPtr<String>::get_ptr(left), *VariantGetInternalPtr<Array>::get_ptr(right), &valid);
+ ERR_FAIL_COND_MSG(!valid, result);
+ *VariantGetInternalPtr<String>::get_ptr(r_ret) = result;
}
static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
PtrToArg<String>::encode(do_mod(PtrToArg<String>::convert(left), PtrToArg<Array>::convert(right), nullptr), r_ret);
@@ -939,10 +943,12 @@ public:
static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) {
const String &a = *VariantGetInternalPtr<String>::get_ptr(&p_left);
*r_ret = do_mod(a, p_right.get_validated_object(), &r_valid);
- r_valid = true;
}
static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
- *VariantGetInternalPtr<String>::get_ptr(r_ret) = do_mod(*VariantGetInternalPtr<String>::get_ptr(left), right->get_validated_object(), nullptr);
+ bool valid = true;
+ String result = do_mod(*VariantGetInternalPtr<String>::get_ptr(left), right->get_validated_object(), &valid);
+ ERR_FAIL_COND_MSG(!valid, result);
+ *VariantGetInternalPtr<String>::get_ptr(r_ret) = result;
}
static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
PtrToArg<String>::encode(do_mod(PtrToArg<String>::convert(left), PtrToArg<Object *>::convert(right), nullptr), r_ret);
@@ -965,10 +971,12 @@ public:
static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) {
const String &a = *VariantGetInternalPtr<String>::get_ptr(&p_left);
*r_ret = do_mod(a, *VariantGetInternalPtr<T>::get_ptr(&p_right), &r_valid);
- r_valid = true;
}
static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
- *VariantGetInternalPtr<String>::get_ptr(r_ret) = do_mod(*VariantGetInternalPtr<String>::get_ptr(left), *VariantGetInternalPtr<T>::get_ptr(right), nullptr);
+ bool valid = true;
+ String result = do_mod(*VariantGetInternalPtr<String>::get_ptr(left), *VariantGetInternalPtr<T>::get_ptr(right), &valid);
+ ERR_FAIL_COND_MSG(!valid, result);
+ *VariantGetInternalPtr<String>::get_ptr(r_ret) = result;
}
static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
PtrToArg<String>::encode(do_mod(PtrToArg<String>::convert(left), PtrToArg<T>::convert(right), nullptr), r_ret);
diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp
index 17d41ca95e..9f500dbf5e 100644
--- a/core/variant/variant_parser.cpp
+++ b/core/variant/variant_parser.cpp
@@ -35,37 +35,76 @@
#include "core/os/keyboard.h"
#include "core/string/string_buffer.h"
-char32_t VariantParser::StreamFile::get_char() {
- return f->get_8();
+char32_t VariantParser::Stream::get_char() {
+ // is within buffer?
+ if (readahead_pointer < readahead_filled) {
+ return readahead_buffer[readahead_pointer++];
+ }
+
+ // attempt to readahead
+ readahead_filled = _read_buffer(readahead_buffer, READAHEAD_SIZE);
+ if (readahead_filled) {
+ readahead_pointer = 0;
+ } else {
+ // EOF
+ readahead_pointer = 1;
+ eof = true;
+ return 0;
+ }
+ return get_char();
}
bool VariantParser::StreamFile::is_utf8() const {
return true;
}
-bool VariantParser::StreamFile::is_eof() const {
- return f->eof_reached();
-}
+uint32_t VariantParser::StreamFile::_read_buffer(char32_t *p_buffer, uint32_t p_num_chars) {
+ // The buffer is assumed to include at least one character (for null terminator)
+ ERR_FAIL_COND_V(!p_num_chars, 0);
-char32_t VariantParser::StreamString::get_char() {
- if (pos > s.length()) {
- return 0;
- } else if (pos == s.length()) {
- // You need to try to read again when you have reached the end for EOF to be reported,
- // so this works the same as files (like StreamFile does)
- pos++;
- return 0;
- } else {
- return s[pos++];
+ uint8_t *temp = (uint8_t *)alloca(p_num_chars);
+ uint64_t num_read = f->get_buffer(temp, p_num_chars);
+ ERR_FAIL_COND_V(num_read == UINT64_MAX, 0);
+
+ // translate to wchar
+ for (uint32_t n = 0; n < num_read; n++) {
+ p_buffer[n] = temp[n];
}
+
+ // could be less than p_num_chars, or zero
+ return num_read;
}
bool VariantParser::StreamString::is_utf8() const {
return false;
}
-bool VariantParser::StreamString::is_eof() const {
- return pos > s.length();
+uint32_t VariantParser::StreamString::_read_buffer(char32_t *p_buffer, uint32_t p_num_chars) {
+ // The buffer is assumed to include at least one character (for null terminator)
+ ERR_FAIL_COND_V(!p_num_chars, 0);
+
+ int available = MAX(s.length() - pos, 0);
+ if (available >= (int)p_num_chars) {
+ const char32_t *src = s.ptr();
+ src += pos;
+ memcpy(p_buffer, src, p_num_chars * sizeof(char32_t));
+ pos += p_num_chars;
+
+ return p_num_chars;
+ }
+
+ // going to reach EOF
+ if (available) {
+ const char32_t *src = s.ptr();
+ src += pos;
+ memcpy(p_buffer, src, available * sizeof(char32_t));
+ pos += available;
+ }
+
+ // add a zero
+ p_buffer[available] = 0;
+
+ return available;
}
/////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/core/variant/variant_parser.h b/core/variant/variant_parser.h
index 56b484c8bc..6b1d095ab5 100644
--- a/core/variant/variant_parser.h
+++ b/core/variant/variant_parser.h
@@ -38,34 +38,50 @@
class VariantParser {
public:
struct Stream {
- virtual char32_t get_char() = 0;
- virtual bool is_utf8() const = 0;
- virtual bool is_eof() const = 0;
+ private:
+ enum { READAHEAD_SIZE = 2048 };
+ char32_t readahead_buffer[READAHEAD_SIZE];
+ uint32_t readahead_pointer = 0;
+ uint32_t readahead_filled = 0;
+ bool eof = false;
+
+ protected:
+ virtual uint32_t _read_buffer(char32_t *p_buffer, uint32_t p_num_chars) = 0;
+ public:
char32_t saved = 0;
+ char32_t get_char();
+ virtual bool is_utf8() const = 0;
+ bool is_eof() const { return eof; }
+
Stream() {}
virtual ~Stream() {}
};
struct StreamFile : public Stream {
+ protected:
+ virtual uint32_t _read_buffer(char32_t *p_buffer, uint32_t p_num_chars) override;
+
+ public:
Ref<FileAccess> f;
- virtual char32_t get_char() override;
virtual bool is_utf8() const override;
- virtual bool is_eof() const override;
StreamFile() {}
};
struct StreamString : public Stream {
String s;
+
+ private:
int pos = 0;
- virtual char32_t get_char() override;
- virtual bool is_utf8() const override;
- virtual bool is_eof() const override;
+ protected:
+ virtual uint32_t _read_buffer(char32_t *p_buffer, uint32_t p_num_chars) override;
+ public:
+ virtual bool is_utf8() const override;
StreamString() {}
};
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 33afe38446..4a6b85f229 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -115,7 +115,7 @@
<param index="3" name="end" type="float" />
<param index="4" name="t" type="float" />
<description>
- Returns the derivative at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
+ Returns the derivative at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
<method name="bezier_interpolate">
@@ -126,7 +126,7 @@
<param index="3" name="end" type="float" />
<param index="4" name="t" type="float" />
<description>
- Returns the point at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
+ Returns the point at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
<method name="bytes_to_var">
@@ -2877,40 +2877,38 @@
</constant>
<constant name="PROPERTY_USAGE_STORE_IF_NULL" value="8192" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_ANIMATE_AS_TRIGGER" value="16384" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="16384" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="32768" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="32768" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="65536" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="65536" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="131072" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="131072" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="262144" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_INTERNAL" value="262144" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_INTERNAL" value="524288" enum="PropertyUsageFlags">
- </constant>
- <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="1048576" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="524288" enum="PropertyUsageFlags">
If the property is a [Resource], a new copy of it is always created when calling [method Node.duplicate] or [method Resource.duplicate].
</constant>
- <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="2097152" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="1048576" enum="PropertyUsageFlags">
The property is only shown in the editor if modern renderers are supported (GLES3 is excluded).
</constant>
- <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="4194304" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="2097152" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="8388608" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="4194304" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="16777216" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="8388608" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="33554432" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="16777216" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="67108864" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="33554432" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="67108864" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_READ_ONLY" value="268435456" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_READ_ONLY" value="134217728" enum="PropertyUsageFlags">
The property is read-only in the [EditorInspector].
</constant>
- <constant name="PROPERTY_USAGE_ARRAY" value="536870912" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_ARRAY" value="268435456" enum="PropertyUsageFlags">
The property is an array.
</constant>
<constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 58681090b4..d9a1f896f1 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -596,15 +596,12 @@
[b]Note:[/b] The result value is always normalized and may not match the key value.
</constant>
<constant name="UPDATE_CONTINUOUS" value="0" enum="UpdateMode">
- Update between keyframes.
+ Update between keyframes and hold the value.
</constant>
<constant name="UPDATE_DISCRETE" value="1" enum="UpdateMode">
- Update at the keyframes and hold the value.
- </constant>
- <constant name="UPDATE_TRIGGER" value="2" enum="UpdateMode">
Update at the keyframes.
</constant>
- <constant name="UPDATE_CAPTURE" value="3" enum="UpdateMode">
+ <constant name="UPDATE_CAPTURE" value="2" enum="UpdateMode">
Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds.
</constant>
<constant name="LOOP_NONE" value="0" enum="LoopMode">
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 90fbdcc622..4d78433915 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Color" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Color in RGBA format using floats on the range of 0 to 1.
+ Color built-in type, in RGBA format.
</brief_description>
<description>
- A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for opacity. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
- You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
- If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
+ A color represented in RGBA format by red ([member r]), green ([member g]), blue ([member b]), and alpha ([member a]) components. Each component is a 16-bit floating-point value, usually ranging from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may support values greater than 1, for overbright or High Dynamic Range colors. If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
+ Colors can also be created by name from a set of standardized colors, through the [String] constructor, [method from_string], or by directly fetching the color constants documented here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url], with the addition of [constant TRANSPARENT].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]
</description>
@@ -19,7 +18,8 @@
<constructor name="Color">
<return type="Color" />
<description>
- Constructs a default-initialized [Color] with all components set to [code]0[/code].
+ Constructs a default [Color] from opaque black. This is the same as [constant BLACK].
+ [b]Note:[/b] in C#, constructs an empty color with all of its components set to [code]0.0[/code] (transparent black).
</description>
</constructor>
<constructor name="Color">
@@ -27,10 +27,10 @@
<param index="0" name="from" type="Color" />
<param index="1" name="alpha" type="float" />
<description>
- Constructs a [Color] from an existing color, but with a custom alpha value.
+ Constructs a [Color] from the existing color, with [member a] set to the given [param alpha] value.
[codeblocks]
[gdscript]
- var red = Color(Color.red, 0.2) # 20% opaque red.
+ var red = Color(Color.RED, 0.2) # 20% opaque red.
[/gdscript]
[csharp]
var red = new Color(Colors.Red, 0.2f); // 20% opaque red.
@@ -49,7 +49,7 @@
<return type="Color" />
<param index="0" name="code" type="String" />
<description>
- Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants.
+ Constructs a [Color] either from an HTML color code or from a standardized color name. The supported color names are the same as the constants.
</description>
</constructor>
<constructor name="Color">
@@ -57,7 +57,7 @@
<param index="0" name="code" type="String" />
<param index="1" name="alpha" type="float" />
<description>
- Constructs a [Color] either from an HTML color code or from a standardized color name, with [param alpha] on the range of 0 to 1. Supported color names are the same as the constants.
+ Constructs a [Color] either from an HTML color code or from a standardized color name, with [param alpha] on the range of 0.0 to 1.0. The supported color names are the same as the constants.
</description>
</constructor>
<constructor name="Color">
@@ -66,7 +66,7 @@
<param index="1" name="g" type="float" />
<param index="2" name="b" type="float" />
<description>
- Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
+ Constructs a [Color] from RGB values, typically between 0.0 and 1.0. [member a] is set to 1.0.
[codeblocks]
[gdscript]
var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`
@@ -84,7 +84,7 @@
<param index="2" name="b" type="float" />
<param index="3" name="a" type="float" />
<description>
- Constructs a [Color] from RGBA values, typically between 0 and 1.
+ Constructs a [Color] from RGBA values, typically between 0.0 and 1.0.
[codeblocks]
[gdscript]
var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`
@@ -101,7 +101,7 @@
<return type="Color" />
<param index="0" name="over" type="Color" />
<description>
- Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values.
+ Returns a new color resulting from overlaying this color over the given color. In a painting program, you can imagine it as the [param over] color painted over this colour (including alpha).
[codeblocks]
[gdscript]
var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%
@@ -128,7 +128,7 @@
<return type="Color" />
<param index="0" name="amount" type="float" />
<description>
- Returns a new color resulting from making this color darker by the specified percentage (ratio from 0 to 1).
+ Returns a new color resulting from making this color darker by the specified [param amount] (ratio from 0.0 to 1.0). See also [method lightened].
[codeblocks]
[gdscript]
var green = Color(0.0, 1.0, 0.0)
@@ -148,7 +148,7 @@
<param index="2" name="v" type="float" />
<param index="3" name="alpha" type="float" default="1.0" />
<description>
- Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. [param h] (hue), [param s] (saturation), and [param v] (value) are typically between 0 and 1.
+ Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. The hue ([param h]), saturation ([param s]), and value ([param v]) are typically between 0.0 and 1.0.
[codeblocks]
[gdscript]
var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8)
@@ -166,7 +166,7 @@
<param index="2" name="l" type="float" />
<param index="3" name="alpha" type="float" default="1.0" />
<description>
- Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. [param h] (hue), [param s] (saturation), and [param l] (lightness) are typically between 0 and 1.
+ Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. The hue ([param h]), saturation ([param s]), and lightness ([param l]) are typically between 0.0 and 1.0.
[codeblocks]
[gdscript]
var color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8)
@@ -189,14 +189,13 @@
<param index="0" name="str" type="String" />
<param index="1" name="default" type="Color" />
<description>
- Creates a [Color] from string, which can be either a HTML color code or a named color. Fallbacks to [param default] if the string does not denote any valid color.
+ Creates a [Color] from the given string, which can be either an HTML color code or a named color (case-insensitive). Returns [param default] if the color cannot be inferred from the string.
</description>
</method>
<method name="get_luminance" qualifiers="const">
<return type="float" />
<description>
- Returns the luminance of the color in the [code][0.0, 1.0][/code] range.
- This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark.
+ Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclusive). This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark.
[b]Note:[/b] [method get_luminance] relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first.
</description>
</method>
@@ -204,9 +203,12 @@
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
- Returns the [Color] associated with the provided integer number, with 8 bits per channel in ARGB order. The integer should be 32-bit. Best used with hexadecimal notation.
+ Returns the [Color] associated with the provided [param hex] integer in 32-bit ARGB format (8 bits per channel, alpha channel first).
+ In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix).
[codeblock]
- modulate = Color.hex(0xffff0000) # red
+ var red = Color.hex(0xffff0000)
+ var dark_cyan = Color.hex(0xff008b8b)
+ var my_color = Color.hex(0xa4bbefd2)
[/codeblock]
</description>
</method>
@@ -214,25 +216,27 @@
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
- Same as [method hex], but takes 64-bit integer and the color uses 16 bits per channel.
+ Returns the [Color] associated with the provided [param hex] integer in 64-bit ARGB format (16 bits per channel, alpha channel first).
+ In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix).
</description>
</method>
<method name="html" qualifiers="static">
<return type="Color" />
<param index="0" name="rgba" type="String" />
<description>
- Returns a new color from [param rgba], an HTML hexadecimal color string. [param rgba] is not case sensitive, and may be prefixed with a '#' character.
- [param rgba] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [param rgba] does not contain an alpha channel value, an alpha channel value of 1.0 is applied.
- If [param rgba] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned.
- [b]Note:[/b] This method is not implemented in C#, but the same functionality is provided in the class constructor.
+ Returns a new color from [param rgba], an HTML hexadecimal color string. [param rgba] is not case-sensitive, and may be prefixed by a hash sign ([code]#[/code]).
+ [param rgba] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [param rgba] does not contain an alpha channel value, an alpha channel value of 1.0 is applied. If [param rgba] is invalid, returns an empty color.
+ [b]Note:[/b] In C#, this method is not implemented. The same functionality is provided by the Color constructor.
[codeblocks]
[gdscript]
- var green = Color.html("#00FF00FF") # set green to Color(0.0, 1.0, 0.0, 1.0)
- var blue = Color.html("#0000FF") # set blue to Color(0.0, 0.0, 1.0, 1.0)
+ var blue = Color.html("#0000ff") # blue is Color(0.0, 0.0, 1.0, 1.0)
+ var green = Color.html("#0F0") # green is Color(0.0, 1.0, 0.0, 1.0)
+ var col = Color.html("663399cc") # col is Color(0.4, 0.2, 0.6, 0.8)
[/gdscript]
[csharp]
- var green = new Color("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0)
- var blue = new Color("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0)
+ var blue = new Color("#0000ff"); // blue is Color(0.0, 0.0, 1.0, 1.0)
+ var green = new Color("#0F0"); // green is Color(0.0, 1.0, 0.0, 1.0)
+ var col = new Color("663399cc"); // col is Color(0.4, 0.2, 0.6, 0.8)
[/csharp]
[/codeblocks]
</description>
@@ -241,24 +245,26 @@
<return type="bool" />
<param index="0" name="color" type="String" />
<description>
- Returns [code]true[/code] if [param color] is a valid HTML hexadecimal color string. [param color] is not case sensitive, and may be prefixed with a '#' character.
- For a string to be valid it must be three-digit or six-digit hexadecimal, and may contain an alpha channel value.
+ Returns [code]true[/code] if [param color] is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign ([code]#[/code]). This method is identical to [method String.is_valid_html_color].
[codeblocks]
[gdscript]
- var result = Color.html_is_valid("#55aaFF") # result is true
- result = Color.html_is_valid("#55AAFF20") # result is true
- result = Color.html_is_valid("55AAFF") # result is true
- result = Color.html_is_valid("#F2C") # result is true
- result = Color.html_is_valid("#AABBC) # result is false
- result = Color.html_is_valid("#55aaFF5") # result is false
+ Color.html_is_valid("#55aaFF") # Returns true
+ Color.html_is_valid("#55AAFF20") # Returns true
+ Color.html_is_valid("55AAFF") # Returns true
+ Color.html_is_valid("#F2C") # Returns true
+
+ Color.html_is_valid("#AABBC) # Returns false
+ Color.html_is_valid("#55aaFF5") # Returns false
[/gdscript]
[csharp]
- var result = Color.HtmlIsValid("#55AAFF"); // result is true
- result = Color.HtmlIsValid("#55AAFF20"); // result is true
- result = Color.HtmlIsValid("55AAFF); // result is true
- result = Color.HtmlIsValid("#F2C"); // result is true
- result = Color.HtmlIsValid("#AABBC"); // result is false
- result = Color.HtmlIsValid("#55aaFF5"); // result is false
+ // This method is not available in C#. Use `StringExtensions.IsValidHtmlColor()`, instead.
+ "#55AAFF".IsValidHtmlColor(); // Returns true
+ "#55AAFF20".IsValidHtmlColor(); // Returns true
+ "55AAFF".IsValidHtmlColor(); // Returns true
+ "#F2C".IsValidHtmlColor(); // Returns true
+
+ "#AABBC".IsValidHtmlColor(); // Returns false
+ "#55aaFF5".IsValidHtmlColor(); // Returns false
[/csharp]
[/codeblocks]
</description>
@@ -266,13 +272,15 @@
<method name="inverted" qualifiers="const">
<return type="Color" />
<description>
- Returns the inverted color [code](1 - r, 1 - g, 1 - b, a)[/code].
+ Returns the color with its [member r], [member g], and [member b] components inverted ([code](1 - r, 1 - g, 1 - b, a)[/code]).
[codeblocks]
[gdscript]
+ var black = Color.WHITE.inverted()
var color = Color(0.3, 0.4, 0.9)
var inverted_color = color.inverted() # Equivalent to `Color(0.7, 0.6, 0.1)`
[/gdscript]
[csharp]
+ var black = Colors.White.Inverted();
var color = new Color(0.3f, 0.4f, 0.9f);
Color invertedColor = color.Inverted(); // Equivalent to `new Color(0.7f, 0.6f, 0.1f)`
[/csharp]
@@ -291,17 +299,23 @@
<param index="0" name="to" type="Color" />
<param index="1" name="weight" type="float" />
<description>
- Returns the linear interpolation with another color. The interpolation factor [param weight] is between 0 and 1.
+ Returns the linear interpolation between this color's components and [param to]'s components. The interpolation factor [param weight] should be between 0.0 and 1.0 (inclusive). See also [method @GlobalScope.lerp].
[codeblocks]
[gdscript]
- var c1 = Color(1.0, 0.0, 0.0)
- var c2 = Color(0.0, 1.0, 0.0)
- var lerp_color = c1.lerp(c2, 0.5) # Equivalent to `Color(0.5, 0.5, 0.0)`
+ var red = Color(1.0, 0.0, 0.0)
+ var aqua = Color(0.0, 1.0, 0.8)
+
+ red.lerp(aqua, 0.2) # Returns Color(0.8, 0.2, 0.16)
+ red.lerp(aqua, 0.5) # Returns Color(0.5, 0.5, 0.4)
+ red.lerp(aqua, 1.0) # Returns Color(0.0, 1.0, 0.8)
[/gdscript]
[csharp]
- var c1 = new Color(1.0f, 0.0f, 0.0f);
- var c2 = new Color(0.0f, 1.0f, 0.0f);
- Color lerpColor = c1.Lerp(c2, 0.5f); // Equivalent to `new Color(0.5f, 0.5f, 0.0f)`
+ var red = new Color(1.0f, 0.0f, 0.0f);
+ var aqua = new Color(0.0f, 1.0f, 0.8f);
+
+ red.Lerp(aqua, 0.2f); // Returns Color(0.8f, 0.2f, 0.16f)
+ red.Lerp(aqua, 0.5f); // Returns Color(0.5f, 0.5f, 0.4f)
+ red.Lerp(aqua, 1.0f); // Returns Color(0.0f, 1.0f, 0.8f)
[/csharp]
[/codeblocks]
</description>
@@ -310,15 +324,15 @@
<return type="Color" />
<param index="0" name="amount" type="float" />
<description>
- Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1).
+ Returns a new color resulting from making this color lighter by the specified [param amount], which should be a ratio from 0.0 to 1.0. See also [method darkened].
[codeblocks]
[gdscript]
var green = Color(0.0, 1.0, 0.0)
- var lightgreen = green.lightened(0.2) # 20% lighter than regular green
+ var light_green = green.lightened(0.2) # 20% lighter than regular green
[/gdscript]
[csharp]
var green = new Color(0.0f, 1.0f, 0.0f);
- Color lightgreen = green.Lightened(0.2f); // 20% lighter than regular green
+ Color lightGreen = green.Lightened(0.2f); // 20% lighter than regular green
[/csharp]
[/codeblocks]
</description>
@@ -326,19 +340,19 @@
<method name="linear_to_srgb" qualifiers="const">
<return type="Color" />
<description>
- Returns the color converted to the [url=https://en.wikipedia.org/wiki/SRGB]sRGB[/url] color space. This assumes the original color is in the linear color space. See also [method srgb_to_linear] which performs the opposite operation.
+ Returns the color converted to the [url=https://en.wikipedia.org/wiki/SRGB]sRGB[/url] color space. This method assumes the original color is in the linear color space. See also [method srgb_to_linear] which performs the opposite operation.
</description>
</method>
<method name="srgb_to_linear" qualifiers="const">
<return type="Color" />
<description>
- Returns the color converted to the linear color space. This assumes the original color is in the sRGB color space. See also [method linear_to_srgb] which performs the opposite operation.
+ Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also [method linear_to_srgb] which performs the opposite operation.
</description>
</method>
<method name="to_abgr32" qualifiers="const">
<return type="int" />
<description>
- Returns the color converted to a 32-bit integer in ABGR format (each byte represents a color channel). ABGR is the reversed version of the default format.
+ Returns the color converted to a 32-bit integer in ABGR format (each component is 8 bits). ABGR is the reversed version of the default RGBA format.
[codeblocks]
[gdscript]
var color = Color(1, 0.5, 0.2)
@@ -354,7 +368,7 @@
<method name="to_abgr64" qualifiers="const">
<return type="int" />
<description>
- Returns the color converted to a 64-bit integer in ABGR format (each word represents a color channel). ABGR is the reversed version of the default format.
+ Returns the color converted to a 64-bit integer in ABGR format (each component is 16 bits). ABGR is the reversed version of the default RGBA format.
[codeblocks]
[gdscript]
var color = Color(1, 0.5, 0.2)
@@ -370,7 +384,7 @@
<method name="to_argb32" qualifiers="const">
<return type="int" />
<description>
- Returns the color converted to a 32-bit integer in ARGB format (each byte represents a color channel). ARGB is more compatible with DirectX.
+ Returns the color converted to a 32-bit integer in ARGB format (each component is 8 bits). ARGB is more compatible with DirectX.
[codeblocks]
[gdscript]
var color = Color(1, 0.5, 0.2)
@@ -386,7 +400,7 @@
<method name="to_argb64" qualifiers="const">
<return type="int" />
<description>
- Returns the color converted to a 64-bit integer in ARGB format (each word represents a color channel). ARGB is more compatible with DirectX.
+ Returns the color converted to a 64-bit integer in ARGB format (each component is 16 bits). ARGB is more compatible with DirectX.
[codeblocks]
[gdscript]
var color = Color(1, 0.5, 0.2)
@@ -403,18 +417,18 @@
<return type="String" />
<param index="0" name="with_alpha" type="bool" default="true" />
<description>
- Returns the color converted to an HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]).
- Setting [param with_alpha] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format).
+ Returns the color converted to an HTML hexadecimal color [String] in RGBA format, without the hash ([code]#[/code]) prefix.
+ Setting [param with_alpha] to [code]false[/code], excludes alpha from the hexadecimal string, using RGB format instead of RGBA format.
[codeblocks]
[gdscript]
- var color = Color(1, 1, 1, 0.5)
- var with_alpha = color.to_html() # Returns "ffffff7f"
- var without_alpha = color.to_html(false) # Returns "ffffff"
+ var white = Color(1, 1, 1, 0.5)
+ var with_alpha = white.to_html() # Returns "ffffff7f"
+ var without_alpha = white.to_html(false) # Returns "ffffff"
[/gdscript]
[csharp]
- var color = new Color(1, 1, 1, 0.5f);
- String withAlpha = color.ToHtml(); // Returns "ffffff7f"
- String withoutAlpha = color.ToHtml(false); // Returns "ffffff"
+ var white = new Color(1, 1, 1, 0.5f);
+ string withAlpha = white.ToHtml(); // Returns "ffffff7f"
+ string withoutAlpha = white.ToHtml(false); // Returns "ffffff"
[/csharp]
[/codeblocks]
</description>
@@ -422,7 +436,7 @@
<method name="to_rgba32" qualifiers="const">
<return type="int" />
<description>
- Returns the color converted to a 32-bit integer in RGBA format (each byte represents a color channel). RGBA is Godot's default format.
+ Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format.
[codeblocks]
[gdscript]
var color = Color(1, 0.5, 0.2)
@@ -438,7 +452,7 @@
<method name="to_rgba64" qualifiers="const">
<return type="int" />
<description>
- Returns the color converted to a 64-bit integer in RGBA format (each word represents a color channel). RGBA is Godot's default format.
+ Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format.
[codeblocks]
[gdscript]
var color = Color(1, 0.5, 0.2)
@@ -457,19 +471,19 @@
The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque.
</member>
<member name="a8" type="int" setter="" getter="" default="255">
- Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1.
+ Wrapper for [member a] that uses the range 0 to 255, instead of 0 to 1.
</member>
<member name="b" type="float" setter="" getter="" default="0.0">
The color's blue component, typically on the range of 0 to 1.
</member>
<member name="b8" type="int" setter="" getter="" default="0">
- Wrapper for [member b] that uses the range 0 to 255 instead of 0 to 1.
+ Wrapper for [member b] that uses the range 0 to 255, instead of 0 to 1.
</member>
<member name="g" type="float" setter="" getter="" default="0.0">
The color's green component, typically on the range of 0 to 1.
</member>
<member name="g8" type="int" setter="" getter="" default="0">
- Wrapper for [member g] that uses the range 0 to 255 instead of 0 to 1.
+ Wrapper for [member g] that uses the range 0 to 255, instead of 0 to 1.
</member>
<member name="h" type="float" setter="" getter="" default="0.0">
The HSV hue of this color, on the range 0 to 1.
@@ -478,7 +492,7 @@
The color's red component, typically on the range of 0 to 1.
</member>
<member name="r8" type="int" setter="" getter="" default="0">
- Wrapper for [member r] that uses the range 0 to 255 instead of 0 to 1.
+ Wrapper for [member r] that uses the range 0 to 255, instead of 0 to 1.
</member>
<member name="s" type="float" setter="" getter="" default="0.0">
The HSV saturation of this color, on the range 0 to 1.
@@ -510,7 +524,7 @@
Bisque color.
</constant>
<constant name="BLACK" value="Color(0, 0, 0, 1)">
- Black color.
+ Black color. In GDScript, this is the default value of any color.
</constant>
<constant name="BLANCHED_ALMOND" value="Color(1, 0.921569, 0.803922, 1)">
Blanched almond color.
@@ -932,7 +946,7 @@
<return type="bool" />
<param index="0" name="right" type="Color" />
<description>
- Returns [code]true[/code] if the colors are not equal.
+ Returns [code]true[/code] if the colors are not exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
@@ -1004,7 +1018,7 @@
<return type="float" />
<param index="0" name="index" type="int" />
<description>
- Access color components using their index. [code]c[0][/code] is equivalent to [code]c.r[/code], [code]c[1][/code] is equivalent to [code]c.g[/code], [code]c[2][/code] is equivalent to [code]c.b[/code], and [code]c[3][/code] is equivalent to [code]c.a[/code].
+ Access color components using their index. [code][0][/code] is equivalent to [member r], [code][1][/code] is equivalent to [member g], [code][2][/code] is equivalent to [member b], and [code][3][/code] is equivalent to [member a].
</description>
</operator>
<operator name="operator unary+">
@@ -1016,7 +1030,7 @@
<operator name="operator unary-">
<return type="Color" />
<description>
- Inverts the given color. This is equivalent to [code]Color.WHITE - c[/code] or [code]Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)[/code].
+ Inverts the given color. This is equivalent to [code]Color.WHITE - c[/code] or [code]Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)[/code]. Unlike with [method inverted], the [member a] component is inverted, too.
</description>
</operator>
</operators>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index ccdf085319..b5e75dff68 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -51,7 +51,7 @@
<return type="Vector2" />
<param index="0" name="to_point" type="Vector2" />
<description>
- Returns the closest baked point (in curve's local space) to [param to_point].
+ Returns the closest point on baked segments (in curve's local space) to [param to_point].
[param to_point] must be in this curve's local space.
</description>
</method>
@@ -94,7 +94,7 @@
</method>
<method name="sample_baked" qualifiers="const">
<return type="Vector2" />
- <param index="0" name="offset" type="float" />
+ <param index="0" name="offset" type="float" default="0.0" />
<param index="1" name="cubic" type="bool" default="false" />
<description>
Returns a point within the curve at position [param offset], where [param offset] is measured as a pixel distance along the curve.
@@ -104,13 +104,10 @@
</method>
<method name="sample_baked_with_rotation" qualifiers="const">
<return type="Transform2D" />
- <param index="0" name="offset" type="float" />
+ <param index="0" name="offset" type="float" default="0.0" />
<param index="1" name="cubic" type="bool" default="false" />
- <param index="2" name="loop" type="bool" default="true" />
- <param index="3" name="lookahead" type="float" default="4.0" />
<description>
Similar to [method sample_baked], but returns [Transform2D] that includes a rotation along the curve. Returns empty transform if length of the curve is [code]0[/code].
- Use [param loop] to smooth the tangent at the end of the curve. [param lookahead] defines the distance to a nearby point for calculating the tangent vector.
[codeblock]
var transform = curve.sample_baked_with_rotation(offset)
position = transform.get_origin()
@@ -160,6 +157,13 @@
[param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
</description>
</method>
+ <method name="tessellate_even_length" qualifiers="const">
+ <return type="PackedVector2Array" />
+ <param index="0" name="max_stages" type="int" default="5" />
+ <param index="1" name="tolerance_length" type="float" default="20.0" />
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="5.0">
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index 851996131f..cfe2036499 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -114,7 +114,7 @@
</method>
<method name="sample_baked" qualifiers="const">
<return type="Vector3" />
- <param index="0" name="offset" type="float" />
+ <param index="0" name="offset" type="float" default="0.0" />
<param index="1" name="cubic" type="bool" default="false" />
<description>
Returns a point within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve.
@@ -134,7 +134,7 @@
</method>
<method name="sample_baked_with_rotation" qualifiers="const">
<return type="Transform3D" />
- <param index="0" name="offset" type="float" />
+ <param index="0" name="offset" type="float" default="0.0" />
<param index="1" name="cubic" type="bool" default="false" />
<param index="2" name="apply_tilt" type="bool" default="false" />
<description>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 0039301bf6..c59bfbfe4f 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1715,6 +1715,7 @@
<constant name="DISPLAY_HANDLE" value="0" enum="HandleType">
Display handle:
- Linux (X11): [code]X11::Display*[/code] for the display.
+ - Android: [code]EGLDisplay[/code] for the display.
</constant>
<constant name="WINDOW_HANDLE" value="1" enum="HandleType">
Window handle:
diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml
index e52f897164..be0c8fd6ca 100644
--- a/doc/classes/FileAccess.xml
+++ b/doc/classes/FileAccess.xml
@@ -153,6 +153,20 @@
Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [enum Error].
</description>
</method>
+ <method name="get_file_as_bytes" qualifiers="static">
+ <return type="PackedByteArray" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Returns the whole [param path] file contents as a [PackedByteArray] without any decoding.
+ </description>
+ </method>
+ <method name="get_file_as_string" qualifiers="static">
+ <return type="String" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Returns the whole [param path] file contents as a [String]. Text is interpreted as being UTF-8 encoded.
+ </description>
+ </method>
<method name="get_float" qualifiers="const">
<return type="float" />
<description>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 6a42b62bcf..761e75339a 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -161,6 +161,12 @@
Returns font family name.
</description>
</method>
+ <method name="get_font_stretch" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ </description>
+ </method>
<method name="get_font_style" qualifiers="const">
<return type="int" enum="TextServer.FontStyle" />
<description>
@@ -173,6 +179,12 @@
Returns font style name.
</description>
</method>
+ <method name="get_font_weight" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
+ </description>
+ </method>
<method name="get_height" qualifiers="const">
<return type="float" />
<param index="0" name="font_size" type="int" default="16" />
diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml
index 271f6a13e0..1019c271dc 100644
--- a/doc/classes/FontFile.xml
+++ b/doc/classes/FontFile.xml
@@ -542,6 +542,9 @@
</method>
</methods>
<members>
+ <member name="allow_system_fallback" type="bool" setter="set_allow_system_fallback" getter="is_allow_system_fallback" default="true">
+ If set to [code]true[/code], system fonts can be automatically used as fallbacks.
+ </member>
<member name="antialiasing" type="int" setter="set_antialiasing" getter="get_antialiasing" enum="TextServer.FontAntialiasing" default="1">
Font anti-aliasing mode.
</member>
@@ -557,9 +560,15 @@
<member name="font_name" type="String" setter="set_font_name" getter="get_font_name" default="&quot;&quot;">
Font family name.
</member>
+ <member name="font_stretch" type="int" setter="set_font_stretch" getter="get_font_stretch" default="100">
+ Font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ </member>
<member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
Font style flags, see [enum TextServer.FontStyle].
</member>
+ <member name="font_weight" type="int" setter="set_font_weight" getter="get_font_weight" default="400">
+ Weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
+ </member>
<member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
</member>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 610f77e3d8..0efc6ab399 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -394,18 +394,38 @@
<method name="get_system_font_path" qualifiers="const">
<return type="String" />
<param index="0" name="font_name" type="String" />
- <param index="1" name="bold" type="bool" default="false" />
- <param index="2" name="italic" type="bool" default="false" />
+ <param index="1" name="weight" type="int" default="400" />
+ <param index="2" name="stretch" type="int" default="100" />
+ <param index="3" name="italic" type="bool" default="false" />
<description>
- Returns path to the system font file with [param font_name] and style. Return empty string if no matching fonts found.
- [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ Returns path to the system font file with [param font_name] and style. Returns empty string if no matching fonts found.
+ The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy".
+ [b]Note:[/b] Returned font might have different style if the requested style is not available.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ </description>
+ </method>
+ <method name="get_system_font_path_for_text" qualifiers="const">
+ <return type="PackedStringArray" />
+ <param index="0" name="font_name" type="String" />
+ <param index="1" name="text" type="String" />
+ <param index="2" name="locale" type="String" default="&quot;&quot;" />
+ <param index="3" name="script" type="String" default="&quot;&quot;" />
+ <param index="4" name="weight" type="int" default="400" />
+ <param index="5" name="stretch" type="int" default="100" />
+ <param index="6" name="italic" type="bool" default="false" />
+ <description>
+ Returns an array of the system substitute font file paths, which are similar to the font with [param font_name] and style for the specified text, locale and script. Returns empty array if no matching fonts found.
+ The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy".
+ [b]Note:[/b] Depending on OS, it's not guaranteed that any of the returned fonts is suitable for rendering specified text. Fonts should be loaded and checked in the order they are returned, and the first suitable one used.
+ [b]Note:[/b] Returned fonts might have different style if the requested style is not available or belong to a different font family.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="get_system_fonts" qualifiers="const">
<return type="PackedStringArray" />
<description>
Returns list of font family names available.
- [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
<method name="get_thread_caller_id" qualifiers="const">
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index bf15f96291..5e834b3d91 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -764,6 +764,22 @@
Emits the [signal property_list_changed] signal. This is mainly used to refresh the editor, so that the Inspector and editor plugins are properly updated.
</description>
</method>
+ <method name="property_can_revert" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="property" type="StringName" />
+ <description>
+ Returns [code]true[/code] if the given [param property] has a custom default value. Use [method property_get_revert] to get the [param property]'s default value.
+ [b]Note:[/b] This method is used by the Inspector dock to display a revert icon. The object must implement [method _property_can_revert] to customize the default value. If [method _property_can_revert] is not implemented, this method returns [code]false[/code].
+ </description>
+ </method>
+ <method name="property_get_revert" qualifiers="const">
+ <return type="Variant" />
+ <param index="0" name="property" type="StringName" />
+ <description>
+ Returns the custom default value of the given [param property]. Use [method property_can_revert] to check if the [param property] has a custom default value.
+ [b]Note:[/b] This method is used by the Inspector dock to display a revert icon. The object must implement [method _property_get_revert] to customize the default value. If [method _property_get_revert] is not implemented, this method returns [code]null[/code].
+ </description>
+ </method>
<method name="remove_meta">
<return type="void" />
<param index="0" name="name" type="StringName" />
diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml
index a6523e4c8b..2d40a7be57 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -4,7 +4,8 @@
Handle for a [Resource]'s unique ID.
</brief_description>
<description>
- The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [RenderingServer].
+ The RID [Variant] type is used to access a low-level resource by its unique ID. RIDs are opaque, which means they do not grant access to the resource by themselves. They are used by the low-level server classes, such as [DisplayServer], [RenderingServer], [TextServer], etc.
+ A low-level resource may correspond to a high-level [Resource], such as [Texture] or [Mesh].
</description>
<tutorials>
</tutorials>
@@ -27,13 +28,13 @@
<method name="get_id" qualifiers="const">
<return type="int" />
<description>
- Returns the ID of the referenced resource.
+ Returns the ID of the referenced low-level resource.
</description>
</method>
<method name="is_valid" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if [RID] is valid.
+ Returns [code]true[/code] if the [RID] is not [code]0[/code].
</description>
</method>
</methods>
@@ -42,36 +43,42 @@
<return type="bool" />
<param index="0" name="right" type="RID" />
<description>
+ Returns [code]true[/code] if the [RID]s are not equal.
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<param index="0" name="right" type="RID" />
<description>
+ Returns [code]true[/code] if the [RID]'s ID is less than [param right]'s ID.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<param index="0" name="right" type="RID" />
<description>
+ Returns [code]true[/code] if the [RID]'s ID is less than or equal to [param right]'s ID.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="RID" />
<description>
+ Returns [code]true[/code] if both [RID]s are equal, which means they both refer to the same low-level resource.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<param index="0" name="right" type="RID" />
<description>
+ Returns [code]true[/code] if the [RID]'s ID is greater than [param right]'s ID.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<param index="0" name="right" type="RID" />
<description>
+ Returns [code]true[/code] if the [RID]'s ID is greater than or equal to [param right]'s ID.
</description>
</operator>
</operators>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index cb2481f705..e222894647 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -399,6 +399,12 @@
Scrolls the window's top line to match first line of the [param paragraph].
</description>
</method>
+ <method name="scroll_to_selection">
+ <return type="void" />
+ <description>
+ Scrolls to the beginning of the current selection.
+ </description>
+ </method>
<method name="select_all">
<return type="void" />
<description>
diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml
index b47d6ded7d..20bfd0d8ae 100644
--- a/doc/classes/SystemFont.xml
+++ b/doc/classes/SystemFont.xml
@@ -7,23 +7,32 @@
<description>
[SystemFont] loads a font from a system font with the first matching name from [member font_names].
It will attempt to match font style, but it's not guaranteed.
- The returned font might be part of a font collection or be a variable font with OpenType "weight" and/or "italic" features set.
+ The returned font might be part of a font collection or be a variable font with OpenType "weight", "width" and/or "italic" features set.
You can create [FontVariation] of the system font for fine control over its features.
</description>
<tutorials>
</tutorials>
<members>
+ <member name="allow_system_fallback" type="bool" setter="set_allow_system_fallback" getter="is_allow_system_fallback" default="true">
+ If set to [code]true[/code], system fonts can be automatically used as fallbacks.
+ </member>
<member name="antialiasing" type="int" setter="set_antialiasing" getter="get_antialiasing" enum="TextServer.FontAntialiasing" default="1">
Font anti-aliasing mode.
</member>
<member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
Array of fallback [Font]s.
</member>
+ <member name="font_italic" type="bool" setter="set_font_italic" getter="get_font_italic" default="false">
+ If set to [code]true[/code], italic or oblique font is preferred.
+ </member>
<member name="font_names" type="PackedStringArray" setter="set_font_names" getter="get_font_names" default="PackedStringArray()">
Array of font family names to search, first matching font found is used.
</member>
- <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
- Font style flags, see [enum TextServer.FontStyle].
+ <member name="font_stretch" type="int" setter="set_font_stretch" getter="get_font_stretch" default="100">
+ Preferred font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ </member>
+ <member name="font_weight" type="int" setter="set_font_weight" getter="get_font_weight" default="400">
+ Preferred weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
</member>
<member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting.
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index f4d92ab9b6..b3e55b5cd0 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -362,6 +362,13 @@
Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
+ <method name="font_get_stretch" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ </description>
+ </method>
<method name="font_get_style" qualifiers="const">
<return type="int" enum="TextServer.FontStyle" />
<param index="0" name="font_rid" type="RID" />
@@ -446,6 +453,13 @@
Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
+ <method name="font_get_weight" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Returns weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
+ </description>
+ </method>
<method name="font_has_char" qualifiers="const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -454,6 +468,13 @@
Returns [code]true[/code] if a Unicode [param char] is available in the font.
</description>
</method>
+ <method name="font_is_allow_system_fallback" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if system fonts can be automatically used as fallbacks.
+ </description>
+ </method>
<method name="font_is_force_autohinter" qualifiers="const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -556,6 +577,14 @@
Renders the range of characters to the font cache texture.
</description>
</method>
+ <method name="font_set_allow_system_fallback">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="allow_system_fallback" type="bool" />
+ <description>
+ If set to [code]true[/code], system fonts can be automatically used as fallbacks.
+ </description>
+ </method>
<method name="font_set_antialiasing">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
@@ -783,12 +812,22 @@
Adds override for [method font_is_script_supported].
</description>
</method>
+ <method name="font_set_stretch">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="weight" type="int" />
+ <description>
+ Sets font stretch amount, compared to a normal width. A percentage value between [code]50%[/code] and [code]200%[/code].
+ [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_transform] instead.
+ </description>
+ </method>
<method name="font_set_style">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="style" type="int" enum="TextServer.FontStyle" />
<description>
Sets the font style flags, see [enum FontStyle].
+ [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], [method font_set_embolden], or [method font_set_transform] instead.
</description>
</method>
<method name="font_set_style_name">
@@ -862,6 +901,15 @@
Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
+ <method name="font_set_weight">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="weight" type="int" />
+ <description>
+ Sets weight (boldness) of the font. A value in the [code]100...999[/code] range, normal font weight is [code]400[/code], bold font weight is [code]700[/code].
+ [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_embolden] instead.
+ </description>
+ </method>
<method name="font_supported_feature_list" qualifiers="const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 37d2698dd4..4c9817fcd4 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -9,6 +9,11 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_cleanup" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
<method name="_create_font" qualifiers="virtual">
<return type="RID" />
<description>
@@ -306,6 +311,12 @@
<description>
</description>
</method>
+ <method name="_font_get_stretch" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_font_get_style" qualifiers="virtual const">
<return type="int" enum="TextServer.FontStyle" />
<param index="0" name="font_rid" type="RID" />
@@ -379,6 +390,12 @@
<description>
</description>
</method>
+ <method name="_font_get_weight" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_font_has_char" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -386,6 +403,12 @@
<description>
</description>
</method>
+ <method name="_font_is_allow_system_fallback" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_font_is_force_autohinter" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
@@ -474,6 +497,13 @@
<description>
</description>
</method>
+ <method name="_font_set_allow_system_fallback" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="allow_system_fallback" type="bool" />
+ <description>
+ </description>
+ </method>
<method name="_font_set_antialiasing" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
@@ -680,6 +710,13 @@
<description>
</description>
</method>
+ <method name="_font_set_stretch" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="stretch" type="int" />
+ <description>
+ </description>
+ </method>
<method name="_font_set_style" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
@@ -749,6 +786,13 @@
<description>
</description>
</method>
+ <method name="_font_set_weight" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="weight" type="int" />
+ <description>
+ </description>
+ </method>
<method name="_font_supported_feature_list" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 4156030d77..1cd73688ee 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -93,7 +93,7 @@
<param index="2" name="end" type="Vector2" />
<param index="3" name="t" type="float" />
<description>
- Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
+ Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
<method name="bezier_interpolate" qualifiers="const">
@@ -103,7 +103,7 @@
<param index="2" name="end" type="Vector2" />
<param index="3" name="t" type="float" />
<description>
- Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
+ Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
<method name="bounce" qualifiers="const">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 2896408505..1d7eda6bb9 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -69,7 +69,7 @@
<param index="2" name="end" type="Vector3" />
<param index="3" name="t" type="float" />
<description>
- Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
+ Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
<method name="bezier_interpolate" qualifiers="const">
@@ -79,7 +79,7 @@
<param index="2" name="end" type="Vector3" />
<param index="3" name="t" type="float" />
<description>
- Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
+ Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
<method name="bounce" qualifiers="const">
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py
index e5a0bbb008..8960c66acc 100755
--- a/doc/tools/make_rst.py
+++ b/doc/tools/make_rst.py
@@ -240,7 +240,7 @@ class State:
enum_def = class_def.enums[enum]
else:
- enum_def = EnumDef(enum, is_bitfield)
+ enum_def = EnumDef(enum, TypeName("int", enum), is_bitfield)
class_def.enums[enum] = enum_def
enum_def.values[constant_name] = constant_def
@@ -458,9 +458,10 @@ class ConstantDef(DefinitionBase):
class EnumDef(DefinitionBase):
- def __init__(self, name: str, bitfield: bool) -> None:
+ def __init__(self, name: str, type_name: TypeName, bitfield: bool) -> None:
super().__init__("enum", name)
+ self.type_name = type_name
self.values: OrderedDict[str, ConstantDef] = OrderedDict()
self.is_bitfield = bitfield
@@ -754,7 +755,8 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
f.write(f".. _class_{class_name}:\n\n")
f.write(make_heading(class_name, "=", False))
- # Inheritance tree
+ ### INHERITANCE TREE ###
+
# Ascendants
if class_def.inherits:
inherits = class_def.inherits.strip()
@@ -788,6 +790,8 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
f.write(make_type(child, state))
f.write("\n\n")
+ ### INTRODUCTION ###
+
has_description = False
# Brief description
@@ -800,7 +804,9 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
if class_def.description is not None and class_def.description.strip() != "":
has_description = True
+ f.write(".. rst-class:: classref-introduction-group\n\n")
f.write(make_heading("Description", "-"))
+
f.write(f"{format_text_block(class_def.description.strip(), class_def, state)}\n\n")
if not has_description:
@@ -814,14 +820,22 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
# Online tutorials
if len(class_def.tutorials) > 0:
+ f.write(".. rst-class:: classref-introduction-group\n\n")
f.write(make_heading("Tutorials", "-"))
+
for url, title in class_def.tutorials:
f.write(f"- {make_link(url, title)}\n\n")
- # Properties overview
+ ### REFERENCE TABLES ###
+
+ # Reused container for reference tables.
ml: List[Tuple[Optional[str], ...]] = []
+
+ # Properties reference table
if len(class_def.properties) > 0:
+ f.write(".. rst-class:: classref-reftable-group\n\n")
f.write(make_heading("Properties", "-"))
+
ml = []
for property_def in class_def.properties.values():
type_rst = property_def.type_name.to_rst(state)
@@ -833,76 +847,108 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
else:
ref = f":ref:`{property_def.name}<class_{class_name}_property_{property_def.name}>`"
ml.append((type_rst, ref, default))
+
format_table(f, ml, True)
- # Constructors, Methods, Operators overview
+ # Constructors, Methods, Operators reference tables
if len(class_def.constructors) > 0:
+ f.write(".. rst-class:: classref-reftable-group\n\n")
f.write(make_heading("Constructors", "-"))
+
ml = []
for method_list in class_def.constructors.values():
for m in method_list:
ml.append(make_method_signature(class_def, m, "constructor", state))
+
format_table(f, ml)
if len(class_def.methods) > 0:
+ f.write(".. rst-class:: classref-reftable-group\n\n")
f.write(make_heading("Methods", "-"))
+
ml = []
for method_list in class_def.methods.values():
for m in method_list:
ml.append(make_method_signature(class_def, m, "method", state))
+
format_table(f, ml)
if len(class_def.operators) > 0:
+ f.write(".. rst-class:: classref-reftable-group\n\n")
f.write(make_heading("Operators", "-"))
+
ml = []
for method_list in class_def.operators.values():
for m in method_list:
ml.append(make_method_signature(class_def, m, "operator", state))
+
format_table(f, ml)
- # Theme properties
+ # Theme properties reference table
if len(class_def.theme_items) > 0:
+ f.write(".. rst-class:: classref-reftable-group\n\n")
f.write(make_heading("Theme Properties", "-"))
- pl: List[Tuple[Optional[str], ...]] = []
+
+ ml = []
for theme_item_def in class_def.theme_items.values():
ref = f":ref:`{theme_item_def.name}<class_{class_name}_theme_{theme_item_def.data_name}_{theme_item_def.name}>`"
- pl.append((theme_item_def.type_name.to_rst(state), ref, theme_item_def.default_value))
- format_table(f, pl, True)
+ ml.append((theme_item_def.type_name.to_rst(state), ref, theme_item_def.default_value))
+
+ format_table(f, ml, True)
- # Signals
+ ### DETAILED DESCRIPTIONS ###
+
+ # Signal descriptions
if len(class_def.signals) > 0:
+ f.write(make_separator(True))
+ f.write(".. rst-class:: classref-descriptions-group\n\n")
f.write(make_heading("Signals", "-"))
+
index = 0
for signal in class_def.signals.values():
if index != 0:
- f.write("----\n\n")
+ f.write(make_separator())
+
+ # Create signal signature and anchor point.
f.write(f".. _class_{class_name}_signal_{signal.name}:\n\n")
+ f.write(".. rst-class:: classref-signal\n\n")
+
_, signature = make_method_signature(class_def, signal, "", state)
- f.write(f"- {signature}\n\n")
+ f.write(f"{signature}\n\n")
+
+ # Add signal description, or a call to action if it's missing.
if signal.description is not None and signal.description.strip() != "":
f.write(f"{format_text_block(signal.description.strip(), signal, state)}\n\n")
+ else:
+ f.write(".. container:: contribute\n\n\t")
+ f.write(
+ translate(
+ "There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!"
+ )
+ + "\n\n"
+ )
index += 1
- # Enums
+ # Enumeration descriptions
if len(class_def.enums) > 0:
+ f.write(make_separator(True))
+ f.write(".. rst-class:: classref-descriptions-group\n\n")
f.write(make_heading("Enumerations", "-"))
+
index = 0
for e in class_def.enums.values():
if index != 0:
- f.write("----\n\n")
+ f.write(make_separator())
+
+ # Create enumeration signature and anchor point.
f.write(f".. _enum_{class_name}_{e.name}:\n\n")
- # Sphinx seems to divide the bullet list into individual <ul> tags if we weave the labels into it.
- # As such I'll put them all above the list. Won't be perfect but better than making the list visually broken.
- # As to why I'm not modifying the reference parser to directly link to the _enum label:
- # If somebody gets annoyed enough to fix it, all existing references will magically improve.
- for value in e.values.values():
- f.write(f".. _class_{class_name}_constant_{value.name}:\n\n")
+ f.write(".. rst-class:: classref-enumeration\n\n")
if e.is_bitfield:
f.write(f"flags **{e.name}**:\n\n")
@@ -910,45 +956,66 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
f.write(f"enum **{e.name}**:\n\n")
for value in e.values.values():
- f.write(f"- **{value.name}** = **{value.value}**")
+ # Also create signature and anchor point for each enum constant.
+
+ f.write(f".. _class_{class_name}_constant_{value.name}:\n\n")
+ f.write(".. rst-class:: classref-enumeration-constant\n\n")
+
+ f.write(f"{e.type_name.to_rst(state)} **{value.name}** = ``{value.value}``\n\n")
+
+ # Add enum constant description.
+
if value.text is not None and value.text.strip() != "":
- # If value.text contains a bullet point list, each entry needs additional indentation
- f.write(f" --- {indent_bullets(format_text_block(value.text.strip(), value, state))}")
+ f.write(f"{format_text_block(value.text.strip(), value, state)}")
f.write("\n\n")
index += 1
- # Constants
+ # Constant descriptions
if len(class_def.constants) > 0:
+ f.write(make_separator(True))
+ f.write(".. rst-class:: classref-descriptions-group\n\n")
f.write(make_heading("Constants", "-"))
- # Sphinx seems to divide the bullet list into individual <ul> tags if we weave the labels into it.
- # As such I'll put them all above the list. Won't be perfect but better than making the list visually broken.
+
for constant in class_def.constants.values():
+ # Create constant signature and anchor point.
+
f.write(f".. _class_{class_name}_constant_{constant.name}:\n\n")
+ f.write(".. rst-class:: classref-constant\n\n")
+
+ f.write(f"**{constant.name}** = ``{constant.value}``\n\n")
+
+ # Add enum constant description.
- for constant in class_def.constants.values():
- f.write(f"- **{constant.name}** = **{constant.value}**")
if constant.text is not None and constant.text.strip() != "":
- f.write(f" --- {format_text_block(constant.text.strip(), constant, state)}")
+ f.write(f"{format_text_block(constant.text.strip(), constant, state)}")
f.write("\n\n")
- # Annotations
+ # Annotation descriptions
if len(class_def.annotations) > 0:
+ f.write(make_separator(True))
f.write(make_heading("Annotations", "-"))
+
index = 0
for method_list in class_def.annotations.values(): # type: ignore
for i, m in enumerate(method_list):
if index != 0:
- f.write("----\n\n")
+ f.write(make_separator())
+
+ # Create annotation signature and anchor point.
if i == 0:
f.write(f".. _class_{class_name}_annotation_{m.name}:\n\n")
+ f.write(".. rst-class:: classref-annotation\n\n")
+
_, signature = make_method_signature(class_def, m, "", state)
- f.write(f"- {signature}\n\n")
+ f.write(f"{signature}\n\n")
+
+ # Add annotation description, or a call to action if it's missing.
if m.description is not None and m.description.strip() != "":
f.write(f"{format_text_block(m.description.strip(), m, state)}\n\n")
@@ -965,7 +1032,10 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
# Property descriptions
if any(not p.overrides for p in class_def.properties.values()) > 0:
+ f.write(make_separator(True))
+ f.write(".. rst-class:: classref-descriptions-group\n\n")
f.write(make_heading("Property Descriptions", "-"))
+
index = 0
for property_def in class_def.properties.values():
@@ -973,22 +1043,36 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
continue
if index != 0:
- f.write("----\n\n")
+ f.write(make_separator())
+
+ # Create property signature and anchor point.
f.write(f".. _class_{class_name}_property_{property_def.name}:\n\n")
- f.write(f"- {property_def.type_name.to_rst(state)} **{property_def.name}**\n\n")
+ f.write(".. rst-class:: classref-property\n\n")
- info: List[Tuple[Optional[str], ...]] = []
- # Not using translate() for now as it breaks table formatting.
+ property_default = ""
if property_def.default_value is not None:
- info.append(("*Default*", property_def.default_value))
+ property_default = f" = {property_def.default_value}"
+ f.write(f"{property_def.type_name.to_rst(state)} **{property_def.name}**{property_default}\n\n")
+
+ # Create property setter and getter records.
+
+ property_setget = ""
+
if property_def.setter is not None and not property_def.setter.startswith("_"):
- info.append(("*Setter*", f"{property_def.setter}(value)"))
+ property_setter = make_setter_signature(class_def, property_def, state)
+ property_setget += f"- {property_setter}\n"
+
if property_def.getter is not None and not property_def.getter.startswith("_"):
- info.append(("*Getter*", f"{property_def.getter}()"))
+ property_getter = make_getter_signature(class_def, property_def, state)
+ property_setget += f"- {property_getter}\n"
+
+ if property_setget != "":
+ f.write(".. rst-class:: classref-property-setget\n\n")
+ f.write(property_setget)
+ f.write("\n")
- if len(info) > 0:
- format_table(f, info)
+ # Add property description, or a call to action if it's missing.
if property_def.text is not None and property_def.text.strip() != "":
f.write(f"{format_text_block(property_def.text.strip(), property_def, state)}\n\n")
@@ -1005,19 +1089,28 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
# Constructor, Method, Operator descriptions
if len(class_def.constructors) > 0:
+ f.write(make_separator(True))
+ f.write(".. rst-class:: classref-descriptions-group\n\n")
f.write(make_heading("Constructor Descriptions", "-"))
+
index = 0
for method_list in class_def.constructors.values():
for i, m in enumerate(method_list):
if index != 0:
- f.write("----\n\n")
+ f.write(make_separator())
+
+ # Create constructor signature and anchor point.
if i == 0:
f.write(f".. _class_{class_name}_constructor_{m.name}:\n\n")
+ f.write(".. rst-class:: classref-constructor\n\n")
+
ret_type, signature = make_method_signature(class_def, m, "", state)
- f.write(f"- {ret_type} {signature}\n\n")
+ f.write(f"{ret_type} {signature}\n\n")
+
+ # Add constructor description, or a call to action if it's missing.
if m.description is not None and m.description.strip() != "":
f.write(f"{format_text_block(m.description.strip(), m, state)}\n\n")
@@ -1033,19 +1126,28 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
index += 1
if len(class_def.methods) > 0:
+ f.write(make_separator(True))
+ f.write(".. rst-class:: classref-descriptions-group\n\n")
f.write(make_heading("Method Descriptions", "-"))
+
index = 0
for method_list in class_def.methods.values():
for i, m in enumerate(method_list):
if index != 0:
- f.write("----\n\n")
+ f.write(make_separator())
+
+ # Create method signature and anchor point.
if i == 0:
f.write(f".. _class_{class_name}_method_{m.name}:\n\n")
+ f.write(".. rst-class:: classref-method\n\n")
+
ret_type, signature = make_method_signature(class_def, m, "", state)
- f.write(f"- {ret_type} {signature}\n\n")
+ f.write(f"{ret_type} {signature}\n\n")
+
+ # Add method description, or a call to action if it's missing.
if m.description is not None and m.description.strip() != "":
f.write(f"{format_text_block(m.description.strip(), m, state)}\n\n")
@@ -1061,20 +1163,31 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
index += 1
if len(class_def.operators) > 0:
+ f.write(make_separator(True))
+ f.write(".. rst-class:: classref-descriptions-group\n\n")
f.write(make_heading("Operator Descriptions", "-"))
+
index = 0
for method_list in class_def.operators.values():
for i, m in enumerate(method_list):
if index != 0:
- f.write("----\n\n")
- out = f".. _class_{class_name}_operator_{sanitize_operator_name(m.name, state)}"
+ f.write(make_separator())
+
+ # Create operator signature and anchor point.
+
+ operator_anchor = f".. _class_{class_name}_operator_{sanitize_operator_name(m.name, state)}"
for parameter in m.parameters:
- out += f"_{parameter.type_name.type_name}"
- out += f":\n\n"
- f.write(out)
+ operator_anchor += f"_{parameter.type_name.type_name}"
+ operator_anchor += f":\n\n"
+ f.write(operator_anchor)
+
+ f.write(".. rst-class:: classref-operator\n\n")
+
ret_type, signature = make_method_signature(class_def, m, "", state)
- f.write(f"- {ret_type} {signature}\n\n")
+ f.write(f"{ret_type} {signature}\n\n")
+
+ # Add operator description, or a call to action if it's missing.
if m.description is not None and m.description.strip() != "":
f.write(f"{format_text_block(m.description.strip(), m, state)}\n\n")
@@ -1091,23 +1204,27 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir:
# Theme property descriptions
if len(class_def.theme_items) > 0:
+ f.write(make_separator(True))
+ f.write(".. rst-class:: classref-descriptions-group\n\n")
f.write(make_heading("Theme Property Descriptions", "-"))
+
index = 0
for theme_item_def in class_def.theme_items.values():
if index != 0:
- f.write("----\n\n")
+ f.write(make_separator())
+
+ # Create theme property signature and anchor point.
f.write(f".. _class_{class_name}_theme_{theme_item_def.data_name}_{theme_item_def.name}:\n\n")
- f.write(f"- {theme_item_def.type_name.to_rst(state)} **{theme_item_def.name}**\n\n")
+ f.write(".. rst-class:: classref-themeproperty\n\n")
- info = []
+ theme_item_default = ""
if theme_item_def.default_value is not None:
- # Not using translate() for now as it breaks table formatting.
- info.append(("*Default*", theme_item_def.default_value))
+ theme_item_default = f" = {theme_item_def.default_value}"
+ f.write(f"{theme_item_def.type_name.to_rst(state)} **{theme_item_def.name}**{theme_item_default}\n\n")
- if len(info) > 0:
- format_table(f, info)
+ # Add theme property description, or a call to action if it's missing.
if theme_item_def.text is not None and theme_item_def.text.strip() != "":
f.write(f"{format_text_block(theme_item_def.text.strip(), theme_item_def, state)}\n\n")
@@ -1216,6 +1333,39 @@ def make_method_signature(
return ret_type, out
+def make_setter_signature(class_def: ClassDef, property_def: PropertyDef, state: State) -> str:
+ if property_def.setter is None:
+ return ""
+
+ # If setter is a method available as a method definition, we use that.
+ if property_def.setter in class_def.methods:
+ setter = class_def.methods[property_def.setter][0]
+ # Otherwise we fake it with the information we have available.
+ else:
+ setter_params: List[ParameterDef] = []
+ setter_params.append(ParameterDef("value", property_def.type_name, None))
+ setter = MethodDef(property_def.setter, TypeName("void"), setter_params, None, None)
+
+ ret_type, signature = make_method_signature(class_def, setter, "", state)
+ return f"{ret_type} {signature}"
+
+
+def make_getter_signature(class_def: ClassDef, property_def: PropertyDef, state: State) -> str:
+ if property_def.getter is None:
+ return ""
+
+ # If getter is a method available as a method definition, we use that.
+ if property_def.getter in class_def.methods:
+ getter = class_def.methods[property_def.getter][0]
+ # Otherwise we fake it with the information we have available.
+ else:
+ getter_params: List[ParameterDef] = []
+ getter = MethodDef(property_def.getter, property_def.type_name, getter_params, None, None)
+
+ ret_type, signature = make_method_signature(class_def, getter, "", state)
+ return f"{ret_type} {signature}"
+
+
def make_heading(title: str, underline: str, l10n: bool = True) -> str:
if l10n:
new_title = translate(title)
@@ -1247,6 +1397,14 @@ def make_footer() -> str:
)
+def make_separator(section_level: bool = False) -> str:
+ separator_class = "item"
+ if section_level:
+ separator_class = "section"
+
+ return f".. rst-class:: classref-{separator_class}-separator\n\n----\n\n"
+
+
def make_link(url: str, title: str) -> str:
match = GODOT_DOCS_PATTERN.search(url)
if match:
@@ -1409,8 +1567,8 @@ def format_text_block(
# Tag is a reference to a class.
if tag_text in state.classes:
if tag_text == state.current_class:
- # Don't create a link to the same class, format it as inline code.
- tag_text = f"``{tag_text}``"
+ # Don't create a link to the same class, format it as strong emphasis.
+ tag_text = f"**{tag_text}**"
else:
tag_text = make_type(tag_text, state)
escape_pre = True
@@ -1872,6 +2030,11 @@ def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_
if len(data) == 0:
return
+ f.write(".. table::\n")
+ f.write(" :widths: auto\n\n")
+
+ # Calculate the width of each column first, we will use this information
+ # to properly format RST-style tables.
column_sizes = [0] * len(data[0])
for row in data:
for i, text in enumerate(row):
@@ -1879,14 +2042,21 @@ def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_
if text_length > column_sizes[i]:
column_sizes[i] = text_length
+ # Each table row is wrapped in two separators, consecutive rows share the same separator.
+ # All separators, or rather borders, have the same shape and content. We compose it once,
+ # then reuse it.
+
sep = ""
for size in column_sizes:
if size == 0 and remove_empty_columns:
continue
- sep += "+" + "-" * (size + 2)
+ sep += "+" + "-" * (size + 2) # Content of each cell is padded by 1 on each side.
sep += "+\n"
- f.write(sep)
+ # Draw the first separator.
+ f.write(f" {sep}")
+
+ # Draw each row and close it with a separator.
for row in data:
row_text = "|"
for i, text in enumerate(row):
@@ -1894,8 +2064,10 @@ def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_
continue
row_text += f' {(text or "").ljust(column_sizes[i])} |'
row_text += "\n"
- f.write(row_text)
- f.write(sep)
+
+ f.write(f" {row_text}")
+ f.write(f" {sep}")
+
f.write("\n")
@@ -1957,24 +2129,5 @@ def sanitize_operator_name(dirty_name: str, state: State) -> str:
return clear_name
-def indent_bullets(text: str) -> str:
- # Take the text and check each line for a bullet point represented by "-".
- # Where found, indent the given line by a further "\t".
- # Used to properly indent bullet points contained in the description for enum values.
- # Ignore the first line - text will be prepended to it so bullet points wouldn't work anyway.
- bullet_points = "-"
-
- lines = text.splitlines(keepends=True)
- for line_index, line in enumerate(lines[1:], start=1):
- pos = 0
- while pos < len(line) and line[pos] == "\t":
- pos += 1
-
- if pos < len(line) and line[pos] in bullet_points:
- lines[line_index] = f"{line[:pos]}\t{line[pos:]}"
-
- return "".join(lines)
-
-
if __name__ == "__main__":
main()
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 8250140c3f..2743801466 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -1321,6 +1321,7 @@ void RasterizerSceneGLES3::_setup_environment(const RenderDataGLES3 *p_render_da
GLES3::MaterialStorage::store_camera(projection.inverse(), scene_state.ubo.inv_projection_matrix);
GLES3::MaterialStorage::store_transform(p_render_data->cam_transform, scene_state.ubo.inv_view_matrix);
GLES3::MaterialStorage::store_transform(p_render_data->inv_cam_transform, scene_state.ubo.view_matrix);
+ scene_state.ubo.camera_visible_layers = p_render_data->camera_visible_layers;
if (p_render_data->view_count > 1) {
for (uint32_t v = 0; v < p_render_data->view_count; v++) {
@@ -1705,6 +1706,7 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_
render_data.inv_cam_transform = render_data.cam_transform.affine_inverse();
render_data.cam_projection = p_camera_data->main_projection;
render_data.cam_orthogonal = p_camera_data->is_orthogonal;
+ render_data.camera_visible_layers = p_camera_data->visible_layers;
render_data.view_count = p_camera_data->view_count;
for (uint32_t v = 0; v < p_camera_data->view_count; v++) {
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 6e1f1babf8..cd1f44e679 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -93,6 +93,7 @@ struct RenderDataGLES3 {
Transform3D inv_cam_transform;
Projection cam_projection;
bool cam_orthogonal = false;
+ uint32_t camera_visible_layers = 0xFFFFFFFF;
// For stereo rendering
uint32_t view_count = 1;
@@ -333,6 +334,10 @@ private:
float fog_light_color[3];
float fog_sun_scatter;
+ uint32_t camera_visible_layers;
+ uint32_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
};
static_assert(sizeof(UBO) % 16 == 0, "Scene UBO size must be a multiple of 16 bytes");
diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl
index 60139de472..a61ea1587d 100644
--- a/drivers/gles3/shaders/canvas.glsl
+++ b/drivers/gles3/shaders/canvas.glsl
@@ -288,11 +288,9 @@ vec3 light_normal_compute(vec3 light_vec, vec3 normal, vec3 base_color, vec3 lig
#endif
-#define SHADOW_TEST(m_uv) \
- { \
- highp float sd = SHADOW_DEPTH(m_uv); \
- shadow += step(sd, shadow_uv.z / shadow_uv.w); \
- }
+/* clang-format off */
+#define SHADOW_TEST(m_uv) { highp float sd = SHADOW_DEPTH(m_uv); shadow += step(sd, shadow_uv.z / shadow_uv.w); }
+/* clang-format on */
//float distance = length(shadow_pos);
vec4 light_shadow_compute(uint light_base, vec4 light_color, vec4 shadow_uv
@@ -332,7 +330,7 @@ vec4 light_shadow_compute(uint light_base, vec4 light_color, vec4 shadow_uv
shadow /= 13.0;
}
- vec4 shadow_color = unpackUnorm4x8(light_array[light_base].shadow_color);
+ vec4 shadow_color = godot_unpackUnorm4x8(light_array[light_base].shadow_color);
#ifdef LIGHT_CODE_USED
shadow_color.rgb *= shadow_modulate;
#endif
@@ -499,7 +497,7 @@ void main() {
if (specular_shininess_used || (using_light && normal_used && bool(draw_data[draw_data_instance].flags & FLAGS_DEFAULT_SPECULAR_MAP_USED))) {
specular_shininess = texture(specular_texture, uv);
- specular_shininess *= unpackUnorm4x8(draw_data[draw_data_instance].specular_shininess);
+ specular_shininess *= godot_unpackUnorm4x8(draw_data[draw_data_instance].specular_shininess);
specular_shininess_used = true;
} else {
specular_shininess = vec4(1.0);
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index adb4562750..32557d3314 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -129,7 +129,7 @@ layout(std140) uniform SceneData { // ubo:2
mediump float ambient_color_sky_mix;
bool material_uv2_mode;
- float pad2;
+ float emissive_exposure_normalization;
bool use_ambient_light;
bool use_ambient_cubemap;
bool use_reflection_cubemap;
@@ -142,7 +142,7 @@ layout(std140) uniform SceneData { // ubo:2
uint directional_light_count;
float z_far;
float z_near;
- float pad;
+ float IBL_exposure_normalization;
bool fog_enabled;
float fog_density;
@@ -151,6 +151,10 @@ layout(std140) uniform SceneData { // ubo:2
vec3 fog_light_color;
float fog_sun_scatter;
+ uint camera_visible_layers;
+ uint pad3;
+ uint pad4;
+ uint pad5;
}
scene_data;
@@ -455,7 +459,7 @@ layout(std140) uniform SceneData { // ubo:2
mediump float ambient_color_sky_mix;
bool material_uv2_mode;
- float pad2;
+ float emissive_exposure_normalization;
bool use_ambient_light;
bool use_ambient_cubemap;
bool use_reflection_cubemap;
@@ -468,7 +472,7 @@ layout(std140) uniform SceneData { // ubo:2
uint directional_light_count;
float z_far;
float z_near;
- float pad;
+ float IBL_exposure_normalization;
bool fog_enabled;
float fog_density;
@@ -477,6 +481,10 @@ layout(std140) uniform SceneData { // ubo:2
vec3 fog_light_color;
float fog_sun_scatter;
+ uint camera_visible_layers;
+ uint pad3;
+ uint pad4;
+ uint pad5;
}
scene_data;
diff --git a/drivers/gles3/shaders/stdlib_inc.glsl b/drivers/gles3/shaders/stdlib_inc.glsl
index d819940b1d..8d4a24cc1f 100644
--- a/drivers/gles3/shaders/stdlib_inc.glsl
+++ b/drivers/gles3/shaders/stdlib_inc.glsl
@@ -39,23 +39,32 @@ vec2 unpackSnorm2x16(uint p) {
return clamp((v - 32767.0) * vec2(0.00003051851), vec2(-1.0), vec2(1.0));
}
-uint packUnorm4x8(vec4 v) {
+#endif
+
+// Compatibility renames. These are exposed with the "godot_" prefix
+// to work around an Adreno bug which was exposing these ES310 functions
+// in ES300 shaders. Internally, we must use the "godot_" prefix, but user shaders
+// will be mapped automatically.
+uint godot_packUnorm4x8(vec4 v) {
uvec4 uv = uvec4(round(clamp(v, vec4(0.0), vec4(1.0)) * 255.0));
return uv.x | (uv.y << uint(8)) | (uv.z << uint(16)) | (uv.w << uint(24));
}
-vec4 unpackUnorm4x8(uint p) {
+vec4 godot_unpackUnorm4x8(uint p) {
return vec4(float(p & uint(0xff)), float((p >> uint(8)) & uint(0xff)), float((p >> uint(16)) & uint(0xff)), float(p >> uint(24))) * 0.00392156862; // 1.0 / 255.0
}
-uint packSnorm4x8(vec4 v) {
+uint godot_packSnorm4x8(vec4 v) {
uvec4 uv = uvec4(round(clamp(v, vec4(-1.0), vec4(1.0)) * 127.0) + 127.0);
return uv.x | uv.y << uint(8) | uv.z << uint(16) | uv.w << uint(24);
}
-vec4 unpackSnorm4x8(uint p) {
+vec4 godot_unpackSnorm4x8(uint p) {
vec4 v = vec4(float(p & uint(0xff)), float((p >> uint(8)) & uint(0xff)), float((p >> uint(16)) & uint(0xff)), float(p >> uint(24)));
return clamp((v - vec4(127.0)) * vec4(0.00787401574), vec4(-1.0), vec4(1.0));
}
-#endif
+#define packUnorm4x8 godot_packUnorm4x8
+#define unpackUnorm4x8 godot_unpackUnorm4x8
+#define packSnorm4x8 godot_packSnorm4x8
+#define unpackSnorm4x8 godot_unpackSnorm4x8
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index d413c2b00e..19e841f466 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -1522,6 +1522,7 @@ MaterialStorage::MaterialStorage() {
actions.renames["NODE_POSITION_WORLD"] = "model_matrix[3].xyz";
actions.renames["CAMERA_POSITION_WORLD"] = "scene_data.inv_view_matrix[3].xyz";
actions.renames["CAMERA_DIRECTION_WORLD"] = "scene_data.view_matrix[3].xyz";
+ actions.renames["CAMERA_VISIBLE_LAYERS"] = "scene_data.camera_visible_layers";
actions.renames["NODE_POSITION_VIEW"] = "(model_matrix * scene_data.view_matrix)[3].xyz";
actions.renames["VIEW_INDEX"] = "ViewIndex";
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 7c403b7523..ecc465ef64 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -2134,10 +2134,9 @@ void AnimationTrackEdit::_notification(int p_what) {
get_theme_icon(SNAME("InterpLinearAngle"), SNAME("EditorIcons")),
get_theme_icon(SNAME("InterpCubicAngle"), SNAME("EditorIcons")),
};
- Ref<Texture2D> cont_icon[4] = {
+ Ref<Texture2D> cont_icon[3] = {
get_theme_icon(SNAME("TrackContinuous"), SNAME("EditorIcons")),
get_theme_icon(SNAME("TrackDiscrete"), SNAME("EditorIcons")),
- get_theme_icon(SNAME("TrackTrigger"), SNAME("EditorIcons")),
get_theme_icon(SNAME("TrackCapture"), SNAME("EditorIcons"))
};
@@ -2829,7 +2828,6 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
menu->clear();
menu->add_icon_item(get_theme_icon(SNAME("TrackContinuous"), SNAME("EditorIcons")), TTR("Continuous"), MENU_CALL_MODE_CONTINUOUS);
menu->add_icon_item(get_theme_icon(SNAME("TrackDiscrete"), SNAME("EditorIcons")), TTR("Discrete"), MENU_CALL_MODE_DISCRETE);
- menu->add_icon_item(get_theme_icon(SNAME("TrackTrigger"), SNAME("EditorIcons")), TTR("Trigger"), MENU_CALL_MODE_TRIGGER);
menu->add_icon_item(get_theme_icon(SNAME("TrackCapture"), SNAME("EditorIcons")), TTR("Capture"), MENU_CALL_MODE_CAPTURE);
menu->reset_size();
@@ -3194,7 +3192,6 @@ void AnimationTrackEdit::_menu_selected(int p_index) {
switch (p_index) {
case MENU_CALL_MODE_CONTINUOUS:
case MENU_CALL_MODE_DISCRETE:
- case MENU_CALL_MODE_TRIGGER:
case MENU_CALL_MODE_CAPTURE: {
Animation::UpdateMode update_mode = Animation::UpdateMode(p_index);
Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
@@ -4322,10 +4319,6 @@ AnimationTrackEditor::TrackIndices AnimationTrackEditor::_confirm_insert(InsertD
h.type == Variant::TRANSFORM3D) {
update_mode = Animation::UPDATE_CONTINUOUS;
}
-
- if (h.usage & PROPERTY_USAGE_ANIMATE_AS_TRIGGER) {
- update_mode = Animation::UPDATE_TRIGGER;
- }
}
}
@@ -4953,10 +4946,6 @@ void AnimationTrackEditor::_new_track_property_selected(String p_name) {
h.type == Variant::TRANSFORM3D) {
update_mode = Animation::UPDATE_CONTINUOUS;
}
-
- if (h.usage & PROPERTY_USAGE_ANIMATE_AS_TRIGGER) {
- update_mode = Animation::UPDATE_TRIGGER;
- }
}
undo_redo->create_action(TTR("Add Track"));
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index dc0c4abe5f..4b50424f39 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -138,7 +138,6 @@ class AnimationTrackEdit : public Control {
enum {
MENU_CALL_MODE_CONTINUOUS,
MENU_CALL_MODE_DISCRETE,
- MENU_CALL_MODE_TRIGGER,
MENU_CALL_MODE_CAPTURE,
MENU_INTERPOLATION_NEAREST,
MENU_INTERPOLATION_LINEAR,
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 65cb083ac7..926c01b334 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -33,6 +33,7 @@
#include "core/input/input.h"
#include "core/os/keyboard.h"
#include "core/string/string_builder.h"
+#include "core/templates/pair.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/plugins/script_editor_plugin.h"
@@ -1290,90 +1291,98 @@ void CodeTextEditor::convert_case(CaseStyle p_case) {
void CodeTextEditor::move_lines_up() {
text_editor->begin_complex_operation();
- Vector<int> carets_to_remove;
-
Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
+
+ // Lists of carets representing each group
+ Vector<Vector<int>> caret_groups;
+ Vector<Pair<int, int>> group_borders;
+
+ // Search for groups of carets and their selections residing on the same lines
for (int i = 0; i < caret_edit_order.size(); i++) {
int c = caret_edit_order[i];
- int cl = text_editor->get_caret_line(c);
- bool swaped_caret = false;
- for (int j = i + 1; j < caret_edit_order.size(); j++) {
- if (text_editor->has_selection(caret_edit_order[j])) {
- if (text_editor->get_selection_from_line() == cl) {
- carets_to_remove.push_back(caret_edit_order[j]);
- continue;
- }
+ Vector<int> new_group{ c };
+ Pair<int, int> group_border;
+ if (text_editor->has_selection(c)) {
+ group_border.first = text_editor->get_selection_from_line(c);
+ group_border.second = text_editor->get_selection_to_line(c);
+ } else {
+ group_border.first = text_editor->get_caret_line(c);
+ group_border.second = text_editor->get_caret_line(c);
+ }
- if (text_editor->get_selection_to_line() == cl) {
- if (text_editor->has_selection(c)) {
- if (text_editor->get_selection_to_line(c) != cl) {
- text_editor->select(cl + 1, 0, text_editor->get_selection_to_line(c), text_editor->get_selection_to_column(c), c);
- break;
- }
- }
+ for (int j = i; j < caret_edit_order.size() - 1; j++) {
+ int c_current = caret_edit_order[j];
+ int c_next = caret_edit_order[j + 1];
- carets_to_remove.push_back(c);
- i = j - 1;
- swaped_caret = true;
- break;
- }
+ int next_start_pos = text_editor->has_selection(c_next) ? text_editor->get_selection_from_line(c_next) : text_editor->get_caret_line(c_next);
+ int next_end_pos = text_editor->has_selection(c_next) ? text_editor->get_selection_to_line(c_next) : text_editor->get_caret_line(c_next);
+
+ int current_start_pos = text_editor->has_selection(c_current) ? text_editor->get_selection_from_line(c_current) : text_editor->get_caret_line(c_current);
+
+ i = j;
+ if (next_end_pos != current_start_pos && next_end_pos + 1 != current_start_pos) {
break;
}
-
- if (text_editor->get_caret_line(caret_edit_order[j]) == cl) {
- carets_to_remove.push_back(caret_edit_order[j]);
- i = j;
- continue;
+ group_border.first = next_start_pos;
+ new_group.push_back(c_next);
+ // If the last caret is added to the current group there is no need to process it again
+ if (j + 1 == caret_edit_order.size() - 1) {
+ i++;
}
- break;
}
+ group_borders.push_back(group_border);
+ caret_groups.push_back(new_group);
+ }
- if (swaped_caret) {
+ for (int i = group_borders.size() - 1; i >= 0; i--) {
+ if (group_borders[i].first - 1 < 0) {
continue;
}
- if (text_editor->has_selection(c)) {
+ // If the group starts overlapping with the upper group don't move it
+ if (i < group_borders.size() - 1 && group_borders[i].first - 1 <= group_borders[i + 1].second) {
+ continue;
+ }
+
+ // We have to remember caret positions and selections prior to line swapping
+ Vector<Vector<int>> caret_group_parameters;
+
+ for (int j = 0; j < caret_groups[i].size(); j++) {
+ int c = caret_groups[i][j];
+ int cursor_line = text_editor->get_caret_line(c);
+ int cursor_column = text_editor->get_caret_column(c);
+
+ if (!text_editor->has_selection(c)) {
+ caret_group_parameters.push_back(Vector<int>{ -1, -1, -1, -1, cursor_line, cursor_column });
+ continue;
+ }
int from_line = text_editor->get_selection_from_line(c);
int from_col = text_editor->get_selection_from_column(c);
int to_line = text_editor->get_selection_to_line(c);
int to_column = text_editor->get_selection_to_column(c);
- int cursor_line = text_editor->get_caret_line(c);
-
- for (int j = from_line; j <= to_line; j++) {
- int line_id = j;
- int next_id = j - 1;
+ caret_group_parameters.push_back(Vector<int>{ from_line, from_col, to_line, to_column, cursor_line, cursor_column });
+ }
- if (line_id == 0 || next_id < 0) {
- return;
- }
+ for (int line_id = group_borders[i].first; line_id <= group_borders[i].second; line_id++) {
+ text_editor->unfold_line(line_id);
+ text_editor->unfold_line(line_id - 1);
- text_editor->unfold_line(line_id);
- text_editor->unfold_line(next_id);
+ text_editor->swap_lines(line_id - 1, line_id);
+ }
- text_editor->swap_lines(line_id, next_id);
- text_editor->set_caret_line(next_id, c == 0, true, 0, c);
- }
- int from_line_up = from_line > 0 ? from_line - 1 : from_line;
- int to_line_up = to_line > 0 ? to_line - 1 : to_line;
- int cursor_line_up = cursor_line > 0 ? cursor_line - 1 : cursor_line;
- text_editor->select(from_line_up, from_col, to_line_up, to_column, c);
- text_editor->set_caret_line(cursor_line_up, c == 0, true, 0, c);
- } else {
- int line_id = text_editor->get_caret_line(c);
- int next_id = line_id - 1;
+ for (int j = 0; j < caret_groups[i].size(); j++) {
+ int c = caret_groups[i][j];
+ Vector<int> caret_parameters = caret_group_parameters[j];
+ text_editor->set_caret_line(caret_parameters[4] - 1, c == 0, true, 0, c);
+ text_editor->set_caret_column(caret_parameters[5], c == 0, c);
- if (line_id == 0 || next_id < 0) {
- return;
+ if (caret_parameters[0] >= 0) {
+ text_editor->select(caret_parameters[0] - 1, caret_parameters[1], caret_parameters[2] - 1, caret_parameters[3], c);
}
-
- text_editor->unfold_line(line_id);
- text_editor->unfold_line(next_id);
-
- text_editor->swap_lines(line_id, next_id);
- text_editor->set_caret_line(next_id, c == 0, true, 0, c);
}
}
+
text_editor->end_complex_operation();
text_editor->merge_overlapping_carets();
text_editor->queue_redraw();
@@ -1382,95 +1391,97 @@ void CodeTextEditor::move_lines_up() {
void CodeTextEditor::move_lines_down() {
text_editor->begin_complex_operation();
- Vector<int> carets_to_remove;
-
Vector<int> caret_edit_order = text_editor->get_caret_index_edit_order();
+
+ // Lists of carets representing each group
+ Vector<Vector<int>> caret_groups;
+ Vector<Pair<int, int>> group_borders;
+
+ // Search for groups of carets and their selections residing on the same lines
for (int i = 0; i < caret_edit_order.size(); i++) {
int c = caret_edit_order[i];
- int cl = text_editor->get_caret_line(c);
- bool swaped_caret = false;
- for (int j = i + 1; j < caret_edit_order.size(); j++) {
- if (text_editor->has_selection(caret_edit_order[j])) {
- if (text_editor->get_selection_from_line() == cl) {
- carets_to_remove.push_back(caret_edit_order[j]);
- continue;
- }
+ Vector<int> new_group{ c };
+ Pair<int, int> group_border;
+ if (text_editor->has_selection(c)) {
+ group_border.first = text_editor->get_selection_from_line(c);
+ group_border.second = text_editor->get_selection_to_line(c);
+ } else {
+ group_border.first = text_editor->get_caret_line(c);
+ group_border.second = text_editor->get_caret_line(c);
+ }
- if (text_editor->get_selection_to_line() == cl) {
- if (text_editor->has_selection(c)) {
- if (text_editor->get_selection_to_line(c) != cl) {
- text_editor->select(cl + 1, 0, text_editor->get_selection_to_line(c), text_editor->get_selection_to_column(c), c);
- break;
- }
- }
+ for (int j = i; j < caret_edit_order.size() - 1; j++) {
+ int c_current = caret_edit_order[j];
+ int c_next = caret_edit_order[j + 1];
- carets_to_remove.push_back(c);
- i = j - 1;
- swaped_caret = true;
- break;
+ int next_start_pos = text_editor->has_selection(c_next) ? text_editor->get_selection_from_line(c_next) : text_editor->get_caret_line(c_next);
+ int next_end_pos = text_editor->has_selection(c_next) ? text_editor->get_selection_to_line(c_next) : text_editor->get_caret_line(c_next);
+
+ int current_start_pos = text_editor->has_selection(c_current) ? text_editor->get_selection_from_line(c_current) : text_editor->get_caret_line(c_current);
+
+ i = j;
+ if (next_end_pos == current_start_pos || next_end_pos + 1 == current_start_pos) {
+ group_border.first = next_start_pos;
+ new_group.push_back(c_next);
+ // If the last caret is added to the current group there is no need to process it again
+ if (j + 1 == caret_edit_order.size() - 1) {
+ i++;
}
+ } else {
break;
}
-
- if (text_editor->get_caret_line(caret_edit_order[j]) == cl) {
- carets_to_remove.push_back(caret_edit_order[j]);
- i = j;
- continue;
- }
- break;
}
+ group_borders.push_back(group_border);
+ caret_groups.push_back(new_group);
+ }
- if (swaped_caret) {
+ for (int i = 0; i < group_borders.size(); i++) {
+ if (group_borders[i].second + 1 > text_editor->get_line_count() - 1) {
continue;
}
- if (text_editor->has_selection(c)) {
- int from_line = text_editor->get_selection_from_line(c);
- int from_col = text_editor->get_selection_from_column(c);
- int to_line = text_editor->get_selection_to_line(c);
- int to_column = text_editor->get_selection_to_column(c);
- int cursor_line = text_editor->get_caret_line(c);
-
- for (int l = to_line; l >= from_line; l--) {
- int line_id = l;
- int next_id = l + 1;
-
- if (line_id == text_editor->get_line_count() - 1 || next_id > text_editor->get_line_count()) {
- continue;
- }
-
- text_editor->unfold_line(line_id);
- text_editor->unfold_line(next_id);
+ // If the group starts overlapping with the upper group don't move it
+ if (i > 0 && group_borders[i].second + 1 >= group_borders[i - 1].first) {
+ continue;
+ }
- text_editor->swap_lines(line_id, next_id);
- text_editor->set_caret_line(next_id, c == 0, true, 0, c);
- }
- int from_line_down = from_line < text_editor->get_line_count() ? from_line + 1 : from_line;
- int to_line_down = to_line < text_editor->get_line_count() ? to_line + 1 : to_line;
- int cursor_line_down = cursor_line < text_editor->get_line_count() ? cursor_line + 1 : cursor_line;
- text_editor->select(from_line_down, from_col, to_line_down, to_column, c);
- text_editor->set_caret_line(cursor_line_down, c == 0, true, 0, c);
- } else {
- int line_id = text_editor->get_caret_line(c);
- int next_id = line_id + 1;
+ // We have to remember caret positions and selections prior to line swapping
+ Vector<Vector<int>> caret_group_parameters;
- if (line_id == text_editor->get_line_count() - 1 || next_id > text_editor->get_line_count()) {
- continue;
+ for (int j = 0; j < caret_groups[i].size(); j++) {
+ int c = caret_groups[i][j];
+ int cursor_line = text_editor->get_caret_line(c);
+ int cursor_column = text_editor->get_caret_column(c);
+
+ if (text_editor->has_selection(c)) {
+ int from_line = text_editor->get_selection_from_line(c);
+ int from_col = text_editor->get_selection_from_column(c);
+ int to_line = text_editor->get_selection_to_line(c);
+ int to_column = text_editor->get_selection_to_column(c);
+ caret_group_parameters.push_back(Vector<int>{ from_line, from_col, to_line, to_column, cursor_line, cursor_column });
+ } else {
+ caret_group_parameters.push_back(Vector<int>{ -1, -1, -1, -1, cursor_line, cursor_column });
}
+ }
+ for (int line_id = group_borders[i].second; line_id >= group_borders[i].first; line_id--) {
text_editor->unfold_line(line_id);
- text_editor->unfold_line(next_id);
+ text_editor->unfold_line(line_id + 1);
- text_editor->swap_lines(line_id, next_id);
- text_editor->set_caret_line(next_id, c == 0, true, 0, c);
+ text_editor->swap_lines(line_id + 1, line_id);
}
- }
- // Sort and remove backwards to preserve indexes.
- carets_to_remove.sort();
- for (int i = carets_to_remove.size() - 1; i >= 0; i--) {
- text_editor->remove_caret(carets_to_remove[i]);
+ for (int j = 0; j < caret_groups[i].size(); j++) {
+ int c = caret_groups[i][j];
+ Vector<int> caret_parameters = caret_group_parameters[j];
+ text_editor->set_caret_line(caret_parameters[4] + 1, c == 0, true, 0, c);
+ text_editor->set_caret_column(caret_parameters[5], c == 0, c);
+
+ if (caret_parameters[0] >= 0) {
+ text_editor->select(caret_parameters[0] + 1, caret_parameters[1], caret_parameters[2] + 1, caret_parameters[3], c);
+ }
+ }
}
text_editor->merge_overlapping_carets();
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 785476d75b..2adab089e4 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -275,7 +275,8 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String
r_item->set_text(0, "\"" + p_type + "\"");
} else if (script_type) {
r_item->set_metadata(0, p_type);
- r_item->set_text(0, p_type + " (" + ScriptServer::get_global_class_path(p_type).get_file() + ")");
+ r_item->set_text(0, p_type);
+ r_item->set_suffix(0, "(" + ScriptServer::get_global_class_path(p_type).get_file() + ")");
} else {
r_item->set_metadata(0, custom_type_parents[p_type]);
r_item->set_text(0, p_type);
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index e7d4636ad9..cf413133aa 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -41,7 +41,7 @@ Ref<FontFile> load_external_font(const String &p_path, TextServer::Hinting p_hin
Ref<FontFile> font;
font.instantiate();
- Vector<uint8_t> data = FileAccess::get_file_as_array(p_path);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(p_path);
font->set_data(data);
font->set_multichannel_signed_distance_field(p_msdf);
diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp
index 7c5c7da2ef..4273a31d62 100644
--- a/editor/export/editor_export_platform.cpp
+++ b/editor/export/editor_export_platform.cpp
@@ -1034,7 +1034,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
return err;
}
// Now actual remapped file:
- sarr = FileAccess::get_file_as_array(export_path);
+ sarr = FileAccess::get_file_as_bytes(export_path);
err = p_func(p_udata, export_path, sarr, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1053,7 +1053,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
if (importer_type == "keep") {
//just keep file as-is
- Vector<uint8_t> array = FileAccess::get_file_as_array(path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(path);
err = p_func(p_udata, path, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
@@ -1086,14 +1086,14 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
String remap = F;
if (remap == "path") {
String remapped_path = config->get_value("remap", remap);
- Vector<uint8_t> array = FileAccess::get_file_as_array(remapped_path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(remapped_path);
err = p_func(p_udata, remapped_path, array, idx, total, enc_in_filters, enc_ex_filters, key);
} else if (remap.begins_with("path.")) {
String feature = remap.get_slice(".", 1);
if (remap_features.has(feature)) {
String remapped_path = config->get_value("remap", remap);
- Vector<uint8_t> array = FileAccess::get_file_as_array(remapped_path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(remapped_path);
err = p_func(p_udata, remapped_path, array, idx, total, enc_in_filters, enc_ex_filters, key);
}
}
@@ -1104,7 +1104,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
//also save the .import file
- Vector<uint8_t> array = FileAccess::get_file_as_array(path + ".import");
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(path + ".import");
err = p_func(p_udata, path + ".import", array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
@@ -1164,7 +1164,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
path_remaps.push_back(export_path);
}
- Vector<uint8_t> array = FileAccess::get_file_as_array(export_path);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(export_path);
err = p_func(p_udata, export_path, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1244,14 +1244,14 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
String icon = GLOBAL_GET("application/config/icon");
String splash = GLOBAL_GET("application/boot_splash/image");
if (!icon.is_empty() && FileAccess::exists(icon)) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(icon);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(icon);
err = p_func(p_udata, icon, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
}
}
if (!splash.is_empty() && FileAccess::exists(splash) && icon != splash) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(splash);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(splash);
err = p_func(p_udata, splash, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1259,7 +1259,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
String resource_cache_file = ResourceUID::get_cache_file();
if (FileAccess::exists(resource_cache_file)) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(resource_cache_file);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(resource_cache_file);
err = p_func(p_udata, resource_cache_file, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1268,7 +1268,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
String extension_list_config_file = NativeExtension::get_extension_list_config_file();
if (FileAccess::exists(extension_list_config_file)) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(extension_list_config_file);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(extension_list_config_file);
err = p_func(p_udata, extension_list_config_file, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1282,7 +1282,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
// Try using user provided data file.
String ts_data = "res://" + TS->get_support_data_filename();
if (FileAccess::exists(ts_data)) {
- Vector<uint8_t> array = FileAccess::get_file_as_array(ts_data);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(ts_data);
err = p_func(p_udata, ts_data, array, idx, total, enc_in_filters, enc_ex_filters, key);
if (err != OK) {
return err;
@@ -1291,7 +1291,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
// Use default text server data.
String icu_data_file = EditorPaths::get_singleton()->get_cache_dir().path_join("tmp_icu_data");
TS->save_support_data(icu_data_file);
- Vector<uint8_t> array = FileAccess::get_file_as_array(icu_data_file);
+ Vector<uint8_t> array = FileAccess::get_file_as_bytes(icu_data_file);
err = p_func(p_udata, ts_data, array, idx, total, enc_in_filters, enc_ex_filters, key);
DirAccess::remove_file_or_error(icu_data_file);
if (err != OK) {
@@ -1304,7 +1304,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
String config_file = "project.binary";
String engine_cfb = EditorPaths::get_singleton()->get_cache_dir().path_join("tmp" + config_file);
ProjectSettings::get_singleton()->save_custom(engine_cfb, custom_map, custom_list);
- Vector<uint8_t> data = FileAccess::get_file_as_array(engine_cfb);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(engine_cfb);
DirAccess::remove_file_or_error(engine_cfb);
return p_func(p_udata, "res://" + config_file, data, idx, total, enc_in_filters, enc_ex_filters, key);
diff --git a/editor/icons/TrackTrigger.svg b/editor/icons/TrackTrigger.svg
deleted file mode 100644
index c403fba59a..0000000000
--- a/editor/icons/TrackTrigger.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="8" viewBox="0 0 16 8" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h2v4h2v-4h2v-2zm13 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1zm-3 2a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0 -1-1z" fill="#f68f45"/></svg>
diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp
index 0aa77f6ea0..75d0abbb0c 100644
--- a/editor/import/dynamic_font_import_settings.cpp
+++ b/editor/import/dynamic_font_import_settings.cpp
@@ -469,6 +469,8 @@ void DynamicFontImportSettings::_main_prop_changed(const String &p_edited_proper
font_preview->set_msdf_pixel_range(import_settings_data->get("msdf_pixel_range"));
} else if (p_edited_property == "msdf_size") {
font_preview->set_msdf_size(import_settings_data->get("msdf_size"));
+ } else if (p_edited_property == "allow_system_fallback") {
+ font_preview->set_allow_system_fallback(import_settings_data->get("allow_system_fallback"));
} else if (p_edited_property == "force_autohinter") {
font_preview->set_force_autohinter(import_settings_data->get("force_autohinter"));
} else if (p_edited_property == "hinting") {
@@ -936,6 +938,7 @@ void DynamicFontImportSettings::_re_import() {
main_settings["multichannel_signed_distance_field"] = import_settings_data->get("multichannel_signed_distance_field");
main_settings["msdf_pixel_range"] = import_settings_data->get("msdf_pixel_range");
main_settings["msdf_size"] = import_settings_data->get("msdf_size");
+ main_settings["allow_system_fallback"] = import_settings_data->get("allow_system_fallback");
main_settings["force_autohinter"] = import_settings_data->get("force_autohinter");
main_settings["hinting"] = import_settings_data->get("hinting");
main_settings["subpixel_positioning"] = import_settings_data->get("subpixel_positioning");
@@ -1036,7 +1039,7 @@ void DynamicFontImportSettings::_process_locales() {
void DynamicFontImportSettings::open_settings(const String &p_path) {
// Load base font data.
- Vector<uint8_t> font_data = FileAccess::get_file_as_array(p_path);
+ Vector<uint8_t> font_data = FileAccess::get_file_as_bytes(p_path);
// Load project locale list.
locale_tree->clear();
@@ -1202,6 +1205,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) {
font_preview->set_multichannel_signed_distance_field(import_settings_data->get("multichannel_signed_distance_field"));
font_preview->set_msdf_pixel_range(import_settings_data->get("msdf_pixel_range"));
font_preview->set_msdf_size(import_settings_data->get("msdf_size"));
+ font_preview->set_allow_system_fallback(import_settings_data->get("allow_system_fallback"));
font_preview->set_force_autohinter(import_settings_data->get("force_autohinter"));
font_preview->set_hinting((TextServer::Hinting)import_settings_data->get("hinting").operator int());
font_preview->set_subpixel_positioning((TextServer::SubpixelPositioning)import_settings_data->get("subpixel_positioning").operator int());
@@ -1232,6 +1236,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "multichannel_signed_distance_field", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "msdf_pixel_range", PROPERTY_HINT_RANGE, "1,100,1"), 8));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "msdf_size", PROPERTY_HINT_RANGE, "1,250,1"), 48));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "allow_system_fallback"), true));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "force_autohinter"), false));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), 1));
options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel"), 1));
diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp
index 4fb1b726bd..357faf0022 100644
--- a/editor/import/resource_importer_bmfont.cpp
+++ b/editor/import/resource_importer_bmfont.cpp
@@ -76,6 +76,7 @@ Error ResourceImporterBMFont::import(const String &p_source_file, const String &
Error err = font->load_bitmap_font(p_source_file);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot load font to file \"" + p_source_file + "\".");
+ font->set_allow_system_fallback(false);
font->set_fallbacks(fallbacks);
int flg = 0;
diff --git a/editor/import/resource_importer_dynamic_font.cpp b/editor/import/resource_importer_dynamic_font.cpp
index 44440a92bd..2f1445af48 100644
--- a/editor/import/resource_importer_dynamic_font.cpp
+++ b/editor/import/resource_importer_dynamic_font.cpp
@@ -114,6 +114,7 @@ void ResourceImporterDynamicFont::get_import_options(const String &p_path, List<
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "msdf_pixel_range", PROPERTY_HINT_RANGE, "1,100,1"), 8));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "msdf_size", PROPERTY_HINT_RANGE, "1,250,1"), 48));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "allow_system_fallback"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force_autohinter"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), 1));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel"), 1));
@@ -150,13 +151,14 @@ Error ResourceImporterDynamicFont::import(const String &p_source_file, const Str
Dictionary ot_ov = p_options["opentype_features"];
bool autohinter = p_options["force_autohinter"];
+ bool allow_system_fallback = p_options["allow_system_fallback"];
int hinting = p_options["hinting"];
int subpixel_positioning = p_options["subpixel_positioning"];
real_t oversampling = p_options["oversampling"];
Array fallbacks = p_options["fallbacks"];
// Load base font data.
- Vector<uint8_t> data = FileAccess::get_file_as_array(p_source_file);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(p_source_file);
// Create font.
Ref<FontFile> font;
@@ -170,6 +172,7 @@ Error ResourceImporterDynamicFont::import(const String &p_source_file, const Str
font->set_opentype_feature_overrides(ot_ov);
font->set_fixed_size(0);
font->set_force_autohinter(autohinter);
+ font->set_allow_system_fallback(allow_system_fallback);
font->set_subpixel_positioning((TextServer::SubpixelPositioning)subpixel_positioning);
font->set_hinting((TextServer::Hinting)hinting);
font->set_oversampling(oversampling);
diff --git a/editor/import/resource_importer_imagefont.cpp b/editor/import/resource_importer_imagefont.cpp
index eb4916663e..9c3304d946 100644
--- a/editor/import/resource_importer_imagefont.cpp
+++ b/editor/import/resource_importer_imagefont.cpp
@@ -121,6 +121,7 @@ Error ResourceImporterImageFont::import(const String &p_source_file, const Strin
font->set_fixed_size(chr_height);
font->set_subpixel_positioning(TextServer::SUBPIXEL_POSITIONING_DISABLED);
font->set_force_autohinter(false);
+ font->set_allow_system_fallback(false);
font->set_hinting(TextServer::HINTING_NONE);
font->set_oversampling(1.0f);
font->set_fallbacks(fallbacks);
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index a9ce6e9f88..9566c1b23c 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -2448,7 +2448,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Vector<Vector<uint8_t>> mesh_lightmap_caches;
{
- src_lightmap_cache = FileAccess::get_file_as_array(p_source_file + ".unwrap_cache", &err);
+ src_lightmap_cache = FileAccess::get_file_as_bytes(p_source_file + ".unwrap_cache", &err);
if (err != OK) {
src_lightmap_cache.clear();
}
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index f8ebd377d1..5183a738ae 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -199,6 +199,7 @@ void AnimationPlayerEditor::_play_pressed() {
if (current == player->get_assigned_animation()) {
player->stop(); //so it won't blend with itself
}
+ ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing.");
player->play(current);
}
@@ -211,13 +212,12 @@ void AnimationPlayerEditor::_play_from_pressed() {
if (!current.is_empty()) {
float time = player->get_current_animation_position();
-
if (current == player->get_assigned_animation() && player->is_playing()) {
player->stop(); //so it won't blend with itself
}
-
- player->play(current);
+ ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing.");
player->seek(time);
+ player->play(current);
}
//unstop
@@ -237,6 +237,7 @@ void AnimationPlayerEditor::_play_bw_pressed() {
if (current == player->get_assigned_animation()) {
player->stop(); //so it won't blend with itself
}
+ ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing.");
player->play(current, -1, -1, true);
}
@@ -252,9 +253,9 @@ void AnimationPlayerEditor::_play_bw_from_pressed() {
if (current == player->get_assigned_animation()) {
player->stop(); //so it won't blend with itself
}
-
- player->play(current, -1, -1, true);
+ ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing.");
player->seek(time);
+ player->play(current, -1, -1, true);
}
//unstop
@@ -1564,6 +1565,53 @@ void AnimationPlayerEditor::_pin_pressed() {
SceneTreeDock::get_singleton()->get_tree_editor()->update_tree();
}
+bool AnimationPlayerEditor::_validate_tracks(const Ref<Animation> p_anim) {
+ bool is_valid = true;
+ if (!p_anim.is_valid()) {
+ return true; // There is a problem outside of the animation track.
+ }
+ int len = p_anim->get_track_count();
+ for (int i = 0; i < len; i++) {
+ Animation::TrackType ttype = p_anim->track_get_type(i);
+ if (ttype == Animation::TYPE_ROTATION_3D) {
+ int key_len = p_anim->track_get_key_count(i);
+ for (int j = 0; j < key_len; j++) {
+ Quaternion q;
+ p_anim->rotation_track_get_key(i, j, &q);
+ ERR_BREAK_EDMSG(!q.is_normalized(), "AnimationPlayer: '" + player->get_name() + "', Animation: '" + player->get_current_animation() + "', rotation track: '" + p_anim->track_get_path(i) + "' contains unnormalized Quaternion key.");
+ }
+ } else if (ttype == Animation::TYPE_VALUE) {
+ int key_len = p_anim->track_get_key_count(i);
+ if (key_len == 0) {
+ continue;
+ }
+ switch (p_anim->track_get_key_value(i, 0).get_type()) {
+ case Variant::QUATERNION: {
+ for (int j = 0; j < key_len; j++) {
+ Quaternion q = Quaternion(p_anim->track_get_key_value(i, j));
+ if (!q.is_normalized()) {
+ is_valid = false;
+ ERR_BREAK_EDMSG(true, "AnimationPlayer: '" + player->get_name() + "', Animation: '" + player->get_current_animation() + "', value track: '" + p_anim->track_get_path(i) + "' contains unnormalized Quaternion key.");
+ }
+ }
+ } break;
+ case Variant::TRANSFORM3D: {
+ for (int j = 0; j < key_len; j++) {
+ Transform3D t = Transform3D(p_anim->track_get_key_value(i, j));
+ if (!t.basis.orthonormalized().is_rotation()) {
+ is_valid = false;
+ ERR_BREAK_EDMSG(true, "AnimationPlayer: '" + player->get_name() + "', Animation: '" + player->get_current_animation() + "', value track: '" + p_anim->track_get_path(i) + "' contains corrupted basis (some axes are too close other axis or scaled by zero) Transform3D key.");
+ }
+ }
+ } break;
+ default: {
+ } break;
+ }
+ }
+ }
+ return is_valid;
+}
+
void AnimationPlayerEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_animation_new"), &AnimationPlayerEditor::_animation_new);
ClassDB::bind_method(D_METHOD("_animation_rename"), &AnimationPlayerEditor::_animation_rename);
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index 6370b00ea8..53d460fc9e 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -212,6 +212,8 @@ class AnimationPlayerEditor : public VBoxContainer {
void _start_onion_skinning();
void _stop_onion_skinning();
+ bool _validate_tracks(const Ref<Animation> p_anim);
+
void _pin_pressed();
String _get_current() const;
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 4194fd831b..c97de80a76 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -92,6 +92,9 @@ void ViewportNavigationControl::_notification(int p_what) {
if (!is_connected("mouse_exited", callable_mp(this, &ViewportNavigationControl::_on_mouse_exited))) {
connect("mouse_exited", callable_mp(this, &ViewportNavigationControl::_on_mouse_exited));
}
+ if (!is_connected("mouse_entered", callable_mp(this, &ViewportNavigationControl::_on_mouse_entered))) {
+ connect("mouse_entered", callable_mp(this, &ViewportNavigationControl::_on_mouse_entered));
+ }
} break;
case NOTIFICATION_DRAW: {
@@ -112,7 +115,7 @@ void ViewportNavigationControl::_draw() {
float radius = get_size().x / 2.0;
const bool focused = focused_index != -1;
- draw_circle(center, radius, Color(0.5, 0.5, 0.5, focused ? 0.25 : 0.05));
+ draw_circle(center, radius, Color(0.5, 0.5, 0.5, focused || hovered ? 0.35 : 0.15));
const Color c = focused ? Color(0.9, 0.9, 0.9, 0.9) : Color(0.5, 0.5, 0.5, 0.25);
@@ -123,6 +126,9 @@ void ViewportNavigationControl::_draw() {
}
void ViewportNavigationControl::_process_click(int p_index, Vector2 p_position, bool p_pressed) {
+ hovered = false;
+ queue_redraw();
+
if (focused_index != -1 && focused_index != p_index) {
return;
}
@@ -233,7 +239,13 @@ void ViewportNavigationControl::_update_navigation() {
}
}
+void ViewportNavigationControl::_on_mouse_entered() {
+ hovered = true;
+ queue_redraw();
+}
+
void ViewportNavigationControl::_on_mouse_exited() {
+ hovered = false;
queue_redraw();
}
@@ -5133,7 +5145,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
// Prevent visible spacing between frame time labels.
top_right_vbox->add_theme_constant_override("separation", 0);
- const int navigation_control_size = 200;
+ const int navigation_control_size = 150;
position_control = memnew(ViewportNavigationControl);
position_control->set_navigation_mode(Node3DEditorViewport::NAVIGATION_MOVE);
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 04fc030f2b..ed555d86c3 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -930,6 +930,7 @@ class ViewportNavigationControl : public Control {
Node3DEditorViewport *viewport = nullptr;
Vector2i focused_mouse_start;
Vector2 focused_pos;
+ bool hovered = false;
int focused_index = -1;
Node3DEditorViewport::NavigationMode nav_mode = Node3DEditorViewport::NavigationMode::NAVIGATION_NONE;
@@ -939,6 +940,7 @@ protected:
void _notification(int p_what);
virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _draw();
+ void _on_mouse_entered();
void _on_mouse_exited();
void _process_click(int p_index, Vector2 p_position, bool p_pressed);
void _process_drag(int p_index, Vector2 p_position, Vector2 p_relative_position);
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index ae7570e161..7ed84423bc 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -2345,6 +2345,15 @@ void TileSetAtlasSourceEditor::_notification(int p_what) {
tile_set_changed_needs_update = false;
}
} break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ for (KeyValue<String, TileDataEditor *> &E : tile_data_editors) {
+ Control *toolbar = E.value->get_toolbar();
+ if (toolbar->get_parent() == tool_settings_tile_data_toolbar_container) {
+ tool_settings_tile_data_toolbar_container->remove_child(toolbar);
+ }
+ }
+ } break;
}
}
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index f32e0bdfa2..9990d5c06f 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -5209,6 +5209,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("NodePositionWorld", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "node_position_world", "NODE_POSITION_WORLD"), { "node_position_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("CameraPositionWorld", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_position_world", "CAMERA_POSITION_WORLD"), { "camera_position_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("CameraDirectionWorld", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_direction_world", "CAMERA_DIRECTION_WORLD"), { "camera_direction_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("CameraVisibleLayers", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_visible_layers", "CAMERA_VISIBLE_LAYERS"), { "camera_visible_layers" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("NodePositionView", "Input/Vertex", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "node_position_view", "NODE_POSITION_VIEW"), { "node_position_view" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_VERTEX, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("Binormal", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "binormal", "BINORMAL"), { "binormal" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
@@ -5228,6 +5229,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("NodePositionWorld", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "node_position_world", "NODE_POSITION_WORLD"), { "node_position_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("CameraPositionWorld", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_position_world", "CAMERA_POSITION_WORLD"), { "camera_position_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("CameraDirectionWorld", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_direction_world", "CAMERA_DIRECTION_WORLD"), { "camera_direction_world" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
+ add_options.push_back(AddOption("CameraVisibleLayers", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "camera_visible_layers", "CAMERA_VISIBLE_LAYERS"), { "camera_visible_layers" }, VisualShaderNode::PORT_TYPE_SCALAR_INT, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("NodePositionView", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "node_position_view", "NODE_POSITION_VIEW"), { "node_position_view" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
add_options.push_back(AddOption("Albedo", "Input/Light", "VisualShaderNodeInput", vformat(input_param_for_light_shader_mode, "albedo", "ALBEDO"), { "albedo" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_LIGHT, Shader::MODE_SPATIAL));
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 22a1d49422..b778262fed 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -69,28 +69,12 @@ static const char *global_var_type_names[RS::GLOBAL_VAR_TYPE_MAX] = {
class ShaderGlobalsEditorInterface : public Object {
GDCLASS(ShaderGlobalsEditorInterface, Object)
- void _var_changed() {
- emit_signal(SNAME("var_changed"));
- }
-
-protected:
- static void _bind_methods() {
- ClassDB::bind_method("_var_changed", &ShaderGlobalsEditorInterface::_var_changed);
- ADD_SIGNAL(MethodInfo("var_changed"));
- }
-
- bool _set(const StringName &p_name, const Variant &p_value) {
- Variant existing = RS::get_singleton()->global_shader_parameter_get(p_name);
-
- if (existing.get_type() == Variant::NIL) {
- return false;
- }
-
+ void _set_var(const StringName &p_name, const Variant &p_value, const Variant &p_prev_value) {
Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
undo_redo->create_action(TTR("Set Shader Global Variable"));
undo_redo->add_do_method(RS::get_singleton(), "global_shader_parameter_set", p_name, p_value);
- undo_redo->add_undo_method(RS::get_singleton(), "global_shader_parameter_set", p_name, existing);
+ undo_redo->add_undo_method(RS::get_singleton(), "global_shader_parameter_set", p_name, p_prev_value);
RS::GlobalShaderParameterType type = RS::get_singleton()->global_shader_parameter_get_type(p_name);
Dictionary gv;
gv["type"] = global_var_type_names[type];
@@ -111,8 +95,29 @@ protected:
undo_redo->add_do_method(this, "_var_changed");
undo_redo->add_undo_method(this, "_var_changed");
block_update = true;
- undo_redo->commit_action(false);
+ undo_redo->commit_action();
block_update = false;
+ }
+
+ void _var_changed() {
+ emit_signal(SNAME("var_changed"));
+ }
+
+protected:
+ static void _bind_methods() {
+ ClassDB::bind_method("_set_var", &ShaderGlobalsEditorInterface::_set_var);
+ ClassDB::bind_method("_var_changed", &ShaderGlobalsEditorInterface::_var_changed);
+ ADD_SIGNAL(MethodInfo("var_changed"));
+ }
+
+ bool _set(const StringName &p_name, const Variant &p_value) {
+ Variant existing = RS::get_singleton()->global_shader_parameter_get(p_name);
+
+ if (existing.get_type() == Variant::NIL) {
+ return false;
+ }
+
+ call_deferred("_set_var", p_name, p_value, existing);
return true;
}
diff --git a/main/main.cpp b/main/main.cpp
index 2d0843a331..c2e2238482 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -311,29 +311,29 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print("\n");
OS::get_singleton()->print("General options:\n");
- OS::get_singleton()->print(" -h, --help Display this help message.\n");
- OS::get_singleton()->print(" --version Display the version string.\n");
- OS::get_singleton()->print(" -v, --verbose Use verbose stdout mode.\n");
- OS::get_singleton()->print(" -q, --quiet Quiet mode, silences stdout messages. Errors are still displayed.\n");
+ OS::get_singleton()->print(" -h, --help Display this help message.\n");
+ OS::get_singleton()->print(" --version Display the version string.\n");
+ OS::get_singleton()->print(" -v, --verbose Use verbose stdout mode.\n");
+ OS::get_singleton()->print(" -q, --quiet Quiet mode, silences stdout messages. Errors are still displayed.\n");
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Run options:\n");
- OS::get_singleton()->print(" --, ++ Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n");
+ OS::get_singleton()->print(" --, ++ Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n");
#ifdef TOOLS_ENABLED
- OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
- OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
- OS::get_singleton()->print(" --debug-server <uri> Start the editor debug server (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007)\n");
+ OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
+ OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
+ OS::get_singleton()->print(" --debug-server <uri> Start the editor debug server (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007)\n");
#endif
- OS::get_singleton()->print(" --quit Quit after the first iteration.\n");
- OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n");
- OS::get_singleton()->print(" --path <directory> Path to a project (<directory> must contain a 'project.godot' file).\n");
- OS::get_singleton()->print(" -u, --upwards Scan folders upwards for project.godot file.\n");
- OS::get_singleton()->print(" --main-pack <file> Path to a pack (.pck) file to load.\n");
- OS::get_singleton()->print(" --render-thread <mode> Render thread mode ('unsafe', 'safe', 'separate').\n");
- OS::get_singleton()->print(" --remote-fs <address> Remote filesystem (<host/IP>[:<port>] address).\n");
- OS::get_singleton()->print(" --remote-fs-password <password> Password for remote filesystem.\n");
-
- OS::get_singleton()->print(" --audio-driver <driver> Audio driver [");
+ OS::get_singleton()->print(" --quit Quit after the first iteration.\n");
+ OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n");
+ OS::get_singleton()->print(" --path <directory> Path to a project (<directory> must contain a 'project.godot' file).\n");
+ OS::get_singleton()->print(" -u, --upwards Scan folders upwards for project.godot file.\n");
+ OS::get_singleton()->print(" --main-pack <file> Path to a pack (.pck) file to load.\n");
+ OS::get_singleton()->print(" --render-thread <mode> Render thread mode ['unsafe', 'safe', 'separate'].\n");
+ OS::get_singleton()->print(" --remote-fs <address> Remote filesystem (<host/IP>[:<port>] address).\n");
+ OS::get_singleton()->print(" --remote-fs-password <password> Password for remote filesystem.\n");
+
+ OS::get_singleton()->print(" --audio-driver <driver> Audio driver [");
for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
if (i > 0) {
OS::get_singleton()->print(", ");
@@ -342,7 +342,7 @@ void Main::print_help(const char *p_binary) {
}
OS::get_singleton()->print("].\n");
- OS::get_singleton()->print(" --display-driver <driver> Display driver (and rendering driver) [");
+ OS::get_singleton()->print(" --display-driver <driver> Display driver (and rendering driver) [");
for (int i = 0; i < DisplayServer::get_create_function_count(); i++) {
if (i > 0) {
OS::get_singleton()->print(", ");
@@ -359,72 +359,76 @@ void Main::print_help(const char *p_binary) {
}
OS::get_singleton()->print("].\n");
- OS::get_singleton()->print(" --rendering-method <renderer> Renderer name. Requires driver support.\n");
- OS::get_singleton()->print(" --rendering-driver <driver> Rendering driver (depends on display driver).\n");
- OS::get_singleton()->print(" --gpu-index <device_index> Use a specific GPU (run with --verbose to get available device list).\n");
- OS::get_singleton()->print(" --text-driver <driver> Text driver (Fonts, BiDi, shaping)\n");
- OS::get_singleton()->print(" --tablet-driver <driver> Pen tablet input driver.\n");
- OS::get_singleton()->print(" --headless Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script.\n");
- OS::get_singleton()->print(" --write-movie <file> Run the engine in a way that a movie is written (by default .avi MJPEG). Fixed FPS is forced when enabled, but can be used to change movie FPS. Disabling vsync can speed up movie writing but makes interaction more difficult.\n");
- OS::get_singleton()->print(" --disable-vsync Force disabling of vsync. Run the engine in a way that a movie is written (by default .avi MJPEG). Fixed FPS is forced when enabled, but can be used to change movie FPS.\n");
+ OS::get_singleton()->print(" --rendering-method <renderer> Renderer name. Requires driver support.\n");
+ OS::get_singleton()->print(" --rendering-driver <driver> Rendering driver (depends on display driver).\n");
+ OS::get_singleton()->print(" --gpu-index <device_index> Use a specific GPU (run with --verbose to get available device list).\n");
+ OS::get_singleton()->print(" --text-driver <driver> Text driver (Fonts, BiDi, shaping).\n");
+ OS::get_singleton()->print(" --tablet-driver <driver> Pen tablet input driver.\n");
+ OS::get_singleton()->print(" --headless Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script.\n");
+ OS::get_singleton()->print(" --write-movie <file> Writes a video to the specified path (usually with .avi or .png extension).\n");
+ OS::get_singleton()->print(" --fixed-fps is forced when enabled, but it can be used to change movie FPS.\n");
+ OS::get_singleton()->print(" --disable-vsync can speed up movie writing but makes interaction more difficult.\n");
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Display options:\n");
- OS::get_singleton()->print(" -f, --fullscreen Request fullscreen mode.\n");
- OS::get_singleton()->print(" -m, --maximized Request a maximized window.\n");
- OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n");
- OS::get_singleton()->print(" -t, --always-on-top Request an always-on-top window.\n");
- OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
- OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
- OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n");
- OS::get_singleton()->print(" --xr-mode <mode> Select XR mode (default/off/on).\n");
+ OS::get_singleton()->print(" -f, --fullscreen Request fullscreen mode.\n");
+ OS::get_singleton()->print(" -m, --maximized Request a maximized window.\n");
+ OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n");
+ OS::get_singleton()->print(" -t, --always-on-top Request an always-on-top window.\n");
+ OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
+ OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
+ OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n");
+ OS::get_singleton()->print(" --xr-mode <mode> Select XR (Extended Reality) mode ['default', 'off', 'on'].\n");
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Debug options:\n");
- OS::get_singleton()->print(" -d, --debug Debug (local stdout debugger).\n");
- OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n");
- OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n");
- OS::get_singleton()->print(" --gpu-profile Show a GPU profile of the tasks that took the most time during frame rendering.\n");
- OS::get_singleton()->print(" --gpu-validation Enable graphics API validation layers for debugging.\n");
+ OS::get_singleton()->print(" -d, --debug Debug (local stdout debugger).\n");
+ OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n");
+ OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n");
+ OS::get_singleton()->print(" --gpu-profile Show a GPU profile of the tasks that took the most time during frame rendering.\n");
+ OS::get_singleton()->print(" --gpu-validation Enable graphics API validation layers for debugging.\n");
#if DEBUG_ENABLED
- OS::get_singleton()->print(" --gpu-abort Abort on graphics API usage errors (usually validation layer errors). May help see the problem if your system freezes.\n");
+ OS::get_singleton()->print(" --gpu-abort Abort on graphics API usage errors (usually validation layer errors). May help see the problem if your system freezes.\n");
#endif
- OS::get_singleton()->print(" --remote-debug <uri> Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n");
+ OS::get_singleton()->print(" --remote-debug <uri> Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n");
#if defined(DEBUG_ENABLED)
- OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n");
- OS::get_singleton()->print(" --debug-paths Show path lines when running the scene.\n");
- OS::get_singleton()->print(" --debug-navigation Show navigation polygons when running the scene.\n");
- OS::get_singleton()->print(" --debug-stringnames Print all StringName allocations to stdout when the engine quits.\n");
+ OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n");
+ OS::get_singleton()->print(" --debug-paths Show path lines when running the scene.\n");
+ OS::get_singleton()->print(" --debug-navigation Show navigation polygons when running the scene.\n");
+ OS::get_singleton()->print(" --debug-stringnames Print all StringName allocations to stdout when the engine quits.\n");
#endif
- OS::get_singleton()->print(" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).\n");
- OS::get_singleton()->print(" --time-scale <scale> Force time scale (higher values are faster, 1.0 is normal speed).\n");
- OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n");
- OS::get_singleton()->print(" --disable-crash-handler Disable crash handler when supported by the platform code.\n");
- OS::get_singleton()->print(" --fixed-fps <fps> Force a fixed number of frames per second. This setting disables real-time synchronization.\n");
- OS::get_singleton()->print(" --print-fps Print the frames per second to the stdout.\n");
+ OS::get_singleton()->print(" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).\n");
+ OS::get_singleton()->print(" --time-scale <scale> Force time scale (higher values are faster, 1.0 is normal speed).\n");
+ OS::get_singleton()->print(" --disable-vsync Forces disabling of vertical synchronization, even if enabled in the project settings. Does not override driver-level V-Sync enforcement.\n");
+ OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n");
+ OS::get_singleton()->print(" --disable-crash-handler Disable crash handler when supported by the platform code.\n");
+ OS::get_singleton()->print(" --fixed-fps <fps> Force a fixed number of frames per second. This setting disables real-time synchronization.\n");
+ OS::get_singleton()->print(" --print-fps Print the frames per second to the stdout.\n");
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Standalone tools:\n");
- OS::get_singleton()->print(" -s, --script <script> Run a script.\n");
- OS::get_singleton()->print(" --check-only Only parse for errors and quit (use with --script).\n");
+ OS::get_singleton()->print(" -s, --script <script> Run a script.\n");
+ OS::get_singleton()->print(" --check-only Only parse for errors and quit (use with --script).\n");
#ifdef TOOLS_ENABLED
- OS::get_singleton()->print(" --export-release <preset> <path> Export the project in release mode using the given preset and output path. The preset name should match one defined in export_presets.cfg.\n");
- OS::get_singleton()->print(" <path> should be absolute or relative to the project directory, and include the filename for the binary (e.g. 'builds/game.exe').\n");
- OS::get_singleton()->print(" The target directory must exist.\n");
- OS::get_singleton()->print(" --export-debug <preset> <path> Export the project in debug mode using the given preset and output path. The preset name should match one defined in export_presets.cfg.\n");
- OS::get_singleton()->print(" --export-pack <preset> <path> Export the project data only using the given preset and output path. The <path> extension determines whether it will be in PCK or ZIP format.\n");
- OS::get_singleton()->print(" --convert-3to4 [<max_file_kb>] [<max_line_size>] Converts project from Godot 3.x to Godot 4.x.\n");
- OS::get_singleton()->print(" --validate-conversion-3to4 [<max_file_kb>] [<max_line_size>] Shows what elements will be renamed when converting project from Godot 3.x to Godot 4.x.\n");
- OS::get_singleton()->print(" --doctool [<path>] Dump the engine API reference to the given <path> (defaults to current dir) in XML format, merging if existing files are found.\n");
- OS::get_singleton()->print(" --no-docbase Disallow dumping the base types (used with --doctool).\n");
- OS::get_singleton()->print(" --build-solutions Build the scripting solutions (e.g. for C# projects). Implies --editor and requires a valid project to edit.\n");
- OS::get_singleton()->print(" --dump-gdextension-interface Generate GDExtension header file 'gdnative_interface.h' in the current folder. This file is the base file required to implement a GDExtension.\n");
- OS::get_singleton()->print(" --dump-extension-api Generate JSON dump of the Godot API for GDExtension bindings named 'extension_api.json' in the current folder.\n");
- OS::get_singleton()->print(" --startup-benchmark Benchmark the startup time and print it to console.\n");
- OS::get_singleton()->print(" --startup-benchmark-file <path> Benchmark the startup time and save it to a given file in JSON format.\n");
+ OS::get_singleton()->print(" --export-release <preset> <path> Export the project in release mode using the given preset and output path. The preset name should match one defined in export_presets.cfg.\n");
+ OS::get_singleton()->print(" <path> should be absolute or relative to the project directory, and include the filename for the binary (e.g. 'builds/game.exe').\n");
+ OS::get_singleton()->print(" The target directory must exist.\n");
+ OS::get_singleton()->print(" --export-debug <preset> <path> Export the project in debug mode using the given preset and output path. See --export-release description for other considerations.\n");
+ OS::get_singleton()->print(" --export-pack <preset> <path> Export the project data only using the given preset and output path. The <path> extension determines whether it will be in PCK or ZIP format.\n");
+ OS::get_singleton()->print(" --convert-3to4 [<max_file_kb>] [<max_line_size>]\n");
+ OS::get_singleton()->print(" Converts project from Godot 3.x to Godot 4.x.\n");
+ OS::get_singleton()->print(" --validate-conversion-3to4 [<max_file_kb>] [<max_line_size>]\n");
+ OS::get_singleton()->print(" Shows what elements will be renamed when converting project from Godot 3.x to Godot 4.x.\n");
+ OS::get_singleton()->print(" --doctool [<path>] Dump the engine API reference to the given <path> (defaults to current dir) in XML format, merging if existing files are found.\n");
+ OS::get_singleton()->print(" --no-docbase Disallow dumping the base types (used with --doctool).\n");
+ OS::get_singleton()->print(" --build-solutions Build the scripting solutions (e.g. for C# projects). Implies --editor and requires a valid project to edit.\n");
+ OS::get_singleton()->print(" --dump-gdextension-interface Generate GDExtension header file 'gdnative_interface.h' in the current folder. This file is the base file required to implement a GDExtension.\n");
+ OS::get_singleton()->print(" --dump-extension-api Generate JSON dump of the Godot API for GDExtension bindings named 'extension_api.json' in the current folder.\n");
+ OS::get_singleton()->print(" --startup-benchmark Benchmark the startup time and print it to console.\n");
+ OS::get_singleton()->print(" --startup-benchmark-file <path> Benchmark the startup time and save it to a given file in JSON format.\n");
#ifdef TESTS_ENABLED
- OS::get_singleton()->print(" --test [--help] Run unit tests. Use --test --help for more information.\n");
+ OS::get_singleton()->print(" --test [--help] Run unit tests. Use --test --help for more information.\n");
#endif
#endif
OS::get_singleton()->print("\n");
@@ -533,6 +537,10 @@ Error Main::test_setup() {
void Main::test_cleanup() {
ERR_FAIL_COND(!_start_success);
+ for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) {
+ TextServerManager::get_singleton()->get_interface(i)->cleanup();
+ }
+
EngineDebugger::deinitialize();
ResourceLoader::remove_custom_loaders();
@@ -3300,6 +3308,10 @@ void Main::cleanup(bool p_force) {
ERR_FAIL_COND(!_start_success);
}
+ for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) {
+ TextServerManager::get_singleton()->get_interface(i)->cleanup();
+ }
+
if (movie_writer) {
movie_writer->end();
}
diff --git a/misc/dist/shell/_godot.zsh-completion b/misc/dist/shell/_godot.zsh-completion
index 9b4ef52f3f..7b3e01d277 100644
--- a/misc/dist/shell/_godot.zsh-completion
+++ b/misc/dist/shell/_godot.zsh-completion
@@ -50,14 +50,15 @@ _arguments \
'--text-driver[set the text driver]:text driver name' \
'--tablet-driver[set the pen tablet input driver]:tablet driver name' \
'--headless[enable headless mode (--display-driver headless --audio-driver Dummy), useful for servers and with --script]' \
+ '--write-movie[writes a video to the specified path (usually with .avi or .png extension)]:path to output video file' \
'(-f --fullscreen)'{-f,--fullscreen}'[request fullscreen mode]' \
'(-m --maximized)'{-m,--maximized}'[request a maximized window]' \
'(-w --windowed)'{-w,--windowed}'[request windowed mode]' \
'(-t --always-on-top)'{-t,--always-on-top}'[request an always-on-top window]' \
'--resolution[request window resolution]:resolution in WxH format' \
'--position[request window position]:position in X,Y format' \
- '--headless[enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script]' \
'--single-window[use a single window (no separate subwindows)]' \
+ '--xr-mode[select Extended Reality (XR) mode]:Extended Reality (XR) mode:(default off on)' \
'(-d --debug)'{-d,--debug}'[debug (local stdout debugger)]' \
'(-b --breakpoints)'{-b,--breakpoints}'[specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)]:breakpoint list' \
'--profiling[enable profiling in the script debugger]' \
@@ -70,6 +71,7 @@ _arguments \
'--debug-stringnames[print all StringName allocations to stdout when the engine quits]' \
'--frame-delay[simulate high CPU load (delay each frame by the given number of milliseconds)]:number of milliseconds' \
'--time-scale[force time scale (higher values are faster, 1.0 is normal speed)]:time scale' \
+ '--disable-vsync[disable vertical synchronization even if enabled in the project settings]' \
'--disable-render-loop[disable render loop so rendering only occurs when called explicitly from script]' \
'--disable-crash-handler[disable crash handler when supported by the platform code]' \
'--fixed-fps[force a fixed number of frames per second (this setting disables real-time synchronization)]:frames per second' \
@@ -86,4 +88,6 @@ _arguments \
'--build-solutions[build the scripting solutions (e.g. for C# projects)]' \
'--dump-gdextension-interface[generate GDExtension header file 'gdnative_interface.h' in the current folder. This file is the base file required to implement a GDExtension.]' \
'--dump-extension-api[generate JSON dump of the Godot API for GDExtension bindings named "extension_api.json" in the current folder]' \
+ '--startup-benchmark[benchmark the startup time and print it to console]' \
+ '--startup-benchmark-file[benchmark the startup time and save it to a given file in JSON format]:path to output JSON file' \
'--test[run all unit tests; run with "--test --help" for more information]'
diff --git a/misc/dist/shell/godot.bash-completion b/misc/dist/shell/godot.bash-completion
index 02dcc94033..73107c0cf3 100644
--- a/misc/dist/shell/godot.bash-completion
+++ b/misc/dist/shell/godot.bash-completion
@@ -53,6 +53,7 @@ _complete_godot_options() {
--text-driver
--tablet-driver
--headless
+--write-movie
--fullscreen
--maximized
--windowed
@@ -60,6 +61,7 @@ _complete_godot_options() {
--resolution
--position
--single-window
+--xr-mode
--debug
--breakpoints
--profiling
@@ -72,6 +74,7 @@ _complete_godot_options() {
--debug-stringnames
--frame-delay
--time-scale
+--disable-vsync
--disable-render-loop
--disable-crash-handler
--fixed-fps
@@ -88,6 +91,8 @@ _complete_godot_options() {
--build-solutions
--dump-gdextension-interface
--dump-extension-api
+--startup-benchmark
+--startup-benchmark-file
--test
" -- "$1"))
}
@@ -121,6 +126,10 @@ _complete_godot_bash() {
local IFS=$' \n\t'
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "vulkan opengl3 dummy" -- "$cur"))
+ elif [[ $prev == "--xr-mode" ]]; then
+ local IFS=$' \n\t'
+ # shellcheck disable=SC2207
+ COMPREPLY=($(compgen -W "default off on" -- "$cur"))
elif [[ $prev == "--path" || $prev == "--doctool" ]]; then
local IFS=$'\n\t'
# shellcheck disable=SC2207
diff --git a/misc/dist/shell/godot.fish b/misc/dist/shell/godot.fish
index 4f7803124b..c6edf75112 100644
--- a/misc/dist/shell/godot.fish
+++ b/misc/dist/shell/godot.fish
@@ -66,6 +66,7 @@ complete -c godot -l gpu-index -d "Use a specific GPU (run with --verbose to get
complete -c godot -l text-driver -d "Set the text driver" -x
complete -c godot -l tablet-driver -d "Set the pen tablet input driver" -x
complete -c godot -l headless -d "Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script"
+complete -c godot -l write-movie -d "Writes a video to the specified path (usually with .avi or .png extension). --fixed-fps is forced when enabled" -x
# Display options:
complete -c godot -s f -l fullscreen -d "Request fullscreen mode"
@@ -74,8 +75,8 @@ complete -c godot -s w -l windowed -d "Request windowed mode"
complete -c godot -s t -l always-on-top -d "Request an always-on-top window"
complete -c godot -l resolution -d "Request window resolution" -x
complete -c godot -l position -d "Request window position" -x
-complete -c godot -l headless -d "Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script"
complete -c godot -l single-window -d "Use a single window (no separate subwindows)"
+complete -c godot -l xr-mode -d "Select Extended Reality (XR) mode" -a "default off on"
# Debug options:
complete -c godot -s d -l debug -d "Debug (local stdout debugger)"
@@ -108,4 +109,6 @@ complete -c godot -l no-docbase -d "Disallow dumping the base types (used with -
complete -c godot -l build-solutions -d "Build the scripting solutions (e.g. for C# projects)"
complete -c godot -l dump-gdextension-interface -d "Generate GDExtension header file 'gdnative_interface.h' in the current folder. This file is the base file required to implement a GDExtension"
complete -c godot -l dump-extension-api -d "Generate JSON dump of the Godot API for GDExtension bindings named 'extension_api.json' in the current folder"
+complete -c godot -l startup-benchmark -d "Benchmark the startup time and print it to console"
+complete -c godot -l startup-benchmark-file -d "Benchmark the startup time and save it to a given file in JSON format" -x
complete -c godot -l test -d "Run all unit tests; run with '--test --help' for more information" -x
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 735e35ac1e..a3685daf0e 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -796,7 +796,7 @@ Error GLTFDocument::_parse_buffers(Ref<GLTFState> state, const String &p_base_pa
ERR_FAIL_COND_V(p_base_path.is_empty(), ERR_INVALID_PARAMETER);
uri = uri.uri_decode();
uri = p_base_path.path_join(uri).replace("\\", "/"); // Fix for Windows.
- buffer_data = FileAccess::get_file_as_array(uri);
+ buffer_data = FileAccess::get_file_as_bytes(uri);
ERR_FAIL_COND_V_MSG(buffer.size() == 0, ERR_PARSE_ERROR, "glTF: Couldn't load binary file as an array: " + uri);
}
@@ -3139,7 +3139,7 @@ Error GLTFDocument::_parse_images(Ref<GLTFState> state, const String &p_base_pat
// Fallback to loading as byte array.
// This enables us to support the spec's requirement that we honor mimetype
// regardless of file URI.
- data = FileAccess::get_file_as_array(uri);
+ data = FileAccess::get_file_as_bytes(uri);
if (data.size() == 0) {
WARN_PRINT(vformat("glTF: Image index '%d' couldn't be loaded as a buffer of MIME type '%s' from URI: %s. Skipping it.", i, mimetype, uri));
state->images.push_back(Ref<Texture2D>()); // Placeholder to keep count.
diff --git a/modules/openxr/extensions/openxr_opengl_extension.cpp b/modules/openxr/extensions/openxr_opengl_extension.cpp
index 234c5f8391..3b7c130149 100644
--- a/modules/openxr/extensions/openxr_opengl_extension.cpp
+++ b/modules/openxr/extensions/openxr_opengl_extension.cpp
@@ -136,7 +136,7 @@ void *OpenXROpenGLExtension::set_session_create_and_get_next_pointer(void *p_nex
graphics_binding_gl.type = XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR;
graphics_binding_gl.next = p_next_pointer;
- graphics_binding_gl.display = eglGetCurrentDisplay();
+ graphics_binding_gl.display = (void *)display_server->window_get_native_handle(DisplayServer::DISPLAY_HANDLE);
graphics_binding_gl.config = (EGLConfig)0; // https://github.com/KhronosGroup/OpenXR-SDK-Source/blob/master/src/tests/hello_xr/graphicsplugin_opengles.cpp#L122
graphics_binding_gl.context = (void *)display_server->window_get_native_handle(DisplayServer::OPENGL_CONTEXT);
#else
diff --git a/modules/raycast/SCsub b/modules/raycast/SCsub
index 20b05816e1..51d75d45b0 100644
--- a/modules/raycast/SCsub
+++ b/modules/raycast/SCsub
@@ -67,7 +67,7 @@ if env["builtin_embree"]:
env_raycast.AppendUnique(CPPDEFINES=["NDEBUG"]) # No assert() even in debug builds.
if not env.msvc:
- if env["arch"] == "x86_64":
+ if env["arch"] in ["x86_64", "x86_32"]:
env_raycast.Append(CPPFLAGS=["-msse2", "-mxsave"])
if env["platform"] == "windows":
@@ -87,10 +87,13 @@ if env["builtin_embree"]:
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
- if env["arch"] == "arm64" or env.msvc:
+ if env["arch"] != "x86_64" or env.msvc:
# Embree needs those, it will automatically use SSE2NEON in ARM
env_thirdparty.Append(CPPDEFINES=["__SSE2__", "__SSE__"])
+ if env["platform"] == "web":
+ env_thirdparty.Append(CPPFLAGS=["-msimd128"])
+
if not env.msvc:
env_thirdparty.Append(
CPPFLAGS=[
diff --git a/modules/raycast/config.py b/modules/raycast/config.py
index 833ad50018..f4243f01c5 100644
--- a/modules/raycast/config.py
+++ b/modules/raycast/config.py
@@ -1,9 +1,13 @@
def can_build(env, platform):
- # Depends on Embree library, which only supports x86_64 and arm64.
- if platform == "windows":
- return env["arch"] == "x86_64" # TODO build for Windows on ARM
-
- return env["arch"] in ["x86_64", "arm64"]
+ # Supported architectures depend on the Embree library.
+ # No ARM32 support planned.
+ if env["arch"] == "arm32":
+ return False
+ # x86_32 only seems supported on Windows for now.
+ if env["arch"] == "x86_32" and platform != "windows":
+ return False
+ # The rest works, even wasm32!
+ return True
def configure(env):
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index cf2d8c9986..27fab88956 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -34,6 +34,7 @@
// Headers for building as GDExtension plug-in.
#include <godot_cpp/classes/file_access.hpp>
+#include <godot_cpp/classes/os.hpp>
#include <godot_cpp/classes/project_settings.hpp>
#include <godot_cpp/classes/rendering_server.hpp>
#include <godot_cpp/classes/translation_server.hpp>
@@ -1437,11 +1438,13 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
if (fd->face->style_name != nullptr) {
p_font_data->style_name = String::utf8((const char *)fd->face->style_name);
}
+ p_font_data->weight = _font_get_weight_by_name(p_font_data->style_name.to_lower());
+ p_font_data->stretch = _font_get_stretch_by_name(p_font_data->style_name.to_lower());
p_font_data->style_flags = 0;
- if (fd->face->style_flags & FT_STYLE_FLAG_BOLD) {
+ if ((fd->face->style_flags & FT_STYLE_FLAG_BOLD) || p_font_data->weight >= 700) {
p_font_data->style_flags.set_flag(FONT_BOLD);
}
- if (fd->face->style_flags & FT_STYLE_FLAG_ITALIC) {
+ if ((fd->face->style_flags & FT_STYLE_FLAG_ITALIC) || _is_ital_style(p_font_data->style_name.to_lower())) {
p_font_data->style_flags.set_flag(FONT_ITALIC);
}
if (fd->face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) {
@@ -1967,6 +1970,46 @@ String TextServerAdvanced::_font_get_style_name(const RID &p_font_rid) const {
return fd->style_name;
}
+void TextServerAdvanced::_font_set_weight(const RID &p_font_rid, int64_t p_weight) {
+ FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->weight = CLAMP(p_weight, 100, 999);
+}
+
+int64_t TextServerAdvanced::_font_get_weight(const RID &p_font_rid) const {
+ FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 400);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 400);
+ return fd->weight;
+}
+
+void TextServerAdvanced::_font_set_stretch(const RID &p_font_rid, int64_t p_stretch) {
+ FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->stretch = CLAMP(p_stretch, 50, 200);
+}
+
+int64_t TextServerAdvanced::_font_get_stretch(const RID &p_font_rid) const {
+ FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 100);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 100);
+ return fd->stretch;
+}
+
void TextServerAdvanced::_font_set_name(const RID &p_font_rid, const String &p_name) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2103,6 +2146,25 @@ int64_t TextServerAdvanced::_font_get_fixed_size(const RID &p_font_rid) const {
return fd->fixed_size;
}
+void TextServerAdvanced::_font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) {
+ FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->allow_system_fallback != p_allow_system_fallback) {
+ _font_clear_cache(fd);
+ fd->allow_system_fallback = p_allow_system_fallback;
+ }
+}
+
+bool TextServerAdvanced::_font_is_allow_system_fallback(const RID &p_font_rid) const {
+ FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->allow_system_fallback;
+}
+
void TextServerAdvanced::_font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -4632,12 +4694,11 @@ bool TextServerAdvanced::_shaped_text_update_breaks(const RID &p_shaped) {
sd->breaks[pos] = true;
} else if ((ubrk_getRuleStatus(bi) >= UBRK_LINE_SOFT) && (ubrk_getRuleStatus(bi) < UBRK_LINE_SOFT_LIMIT)) {
sd->breaks[pos] = false;
-
- int pos_p = pos - 1 - sd->start;
- char32_t c = sd->text[pos_p];
- if (pos - sd->start != sd->end && !is_whitespace(c) && (c != 0xfffc)) {
- sd->break_inserts++;
- }
+ }
+ int pos_p = pos - 1 - sd->start;
+ char32_t c = sd->text[pos_p];
+ if (pos - sd->start != sd->end && !is_whitespace(c) && (c != 0xfffc)) {
+ sd->break_inserts++;
}
}
}
@@ -5066,10 +5127,177 @@ _FORCE_INLINE_ void TextServerAdvanced::_add_featuers(const Dictionary &p_source
}
}
-void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_start, int64_t p_end, hb_script_t p_script, hb_direction_t p_direction, TypedArray<RID> p_fonts, int64_t p_span, int64_t p_fb_index) {
+void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_start, int64_t p_end, hb_script_t p_script, hb_direction_t p_direction, TypedArray<RID> p_fonts, int64_t p_span, int64_t p_fb_index, int64_t p_prev_start, int64_t p_prev_end) {
+ RID f;
int fs = p_sd->spans[p_span].font_size;
- if (p_fb_index >= p_fonts.size()) {
- // Add fallback glyphs.
+
+ if (p_fb_index >= 0 && p_fb_index < p_fonts.size()) {
+ // Try font from list.
+ f = p_fonts[p_fb_index];
+ } else if (OS::get_singleton()->has_feature("system_fonts") && p_fonts.size() > 0 && ((p_fb_index == p_fonts.size()) || (p_fb_index > p_fonts.size() && p_start != p_prev_start))) {
+ // Try system fallback.
+ RID fdef = p_fonts[0];
+ if (_font_is_allow_system_fallback(fdef)) {
+ String text = p_sd->text.substr(p_start, 1);
+ String font_name = _font_get_name(fdef);
+ BitField<FontStyle> font_style = _font_get_style(fdef);
+ int font_weight = _font_get_weight(fdef);
+ int font_stretch = _font_get_stretch(fdef);
+ Dictionary dvar = _font_get_variation_coordinates(fdef);
+ static int64_t wgth_tag = _name_to_tag("weight");
+ static int64_t wdth_tag = _name_to_tag("width");
+ static int64_t ital_tag = _name_to_tag("italic");
+ if (dvar.has(wgth_tag)) {
+ font_weight = dvar[wgth_tag].operator int();
+ }
+ if (dvar.has(wdth_tag)) {
+ font_stretch = dvar[wdth_tag].operator int();
+ }
+ if (dvar.has(ital_tag) && dvar[ital_tag].operator int() == 1) {
+ font_style.set_flag(TextServer::FONT_ITALIC);
+ }
+
+ char scr_buffer[5] = { 0, 0, 0, 0, 0 };
+ hb_tag_to_string(hb_script_to_iso15924_tag(p_script), scr_buffer);
+ String script_code = String(scr_buffer);
+ String locale = (p_sd->spans[p_span].language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_sd->spans[p_span].language;
+
+ PackedStringArray fallback_font_name = OS::get_singleton()->get_system_font_path_for_text(font_name, text, locale, script_code, font_weight, font_stretch, font_style & TextServer::FONT_ITALIC);
+#ifdef GDEXTENSION
+ for (int fb = 0; fb < fallback_font_name.size(); fb++) {
+ const String &E = fallback_font_name[fb];
+#else
+ for (const String &E : fallback_font_name) {
+#endif
+ SystemFontKey key = SystemFontKey(E, font_style & TextServer::FONT_ITALIC, font_weight, font_stretch, fdef, this);
+ if (system_fonts.has(key)) {
+ const SystemFontCache &sysf_cache = system_fonts[key];
+ int best_score = 0;
+ int best_match = -1;
+ for (int face_idx = 0; face_idx < sysf_cache.var.size(); face_idx++) {
+ const SystemFontCacheRec &F = sysf_cache.var[face_idx];
+ if (unlikely(!_font_has_char(F.rid, text[0]))) {
+ continue;
+ }
+ BitField<FontStyle> style = _font_get_style(F.rid);
+ int weight = _font_get_weight(F.rid);
+ int stretch = _font_get_stretch(F.rid);
+ int score = (20 - Math::abs(weight - font_weight) / 50);
+ score += (20 - Math::abs(stretch - font_stretch) / 10);
+ if (bool(style & TextServer::FONT_ITALIC) == bool(font_style & TextServer::FONT_ITALIC)) {
+ score += 30;
+ }
+ if (score >= best_score) {
+ best_score = score;
+ best_match = face_idx;
+ }
+ if (best_score == 70) {
+ break;
+ }
+ }
+ if (best_match != -1) {
+ f = sysf_cache.var[best_match].rid;
+ }
+ }
+ if (!f.is_valid()) {
+ if (system_fonts.has(key)) {
+ const SystemFontCache &sysf_cache = system_fonts[key];
+ if (sysf_cache.max_var == sysf_cache.var.size()) {
+ // All subfonts already tested, skip.
+ continue;
+ }
+ }
+
+ if (!system_font_data.has(E)) {
+ system_font_data[E] = FileAccess::get_file_as_bytes(E);
+ }
+
+ const PackedByteArray &font_data = system_font_data[E];
+
+ SystemFontCacheRec sysf;
+ sysf.rid = _create_font();
+ _font_set_data_ptr(sysf.rid, font_data.ptr(), font_data.size());
+
+ Dictionary var = dvar;
+ // Select matching style from collection.
+ int best_score = 0;
+ int best_match = -1;
+ for (int face_idx = 0; face_idx < _font_get_face_count(sysf.rid); face_idx++) {
+ _font_set_face_index(sysf.rid, face_idx);
+ if (unlikely(!_font_has_char(sysf.rid, text[0]))) {
+ continue;
+ }
+ BitField<FontStyle> style = _font_get_style(sysf.rid);
+ int weight = _font_get_weight(sysf.rid);
+ int stretch = _font_get_stretch(sysf.rid);
+ int score = (20 - Math::abs(weight - font_weight) / 50);
+ score += (20 - Math::abs(stretch - font_stretch) / 10);
+ if (bool(style & TextServer::FONT_ITALIC) == bool(font_style & TextServer::FONT_ITALIC)) {
+ score += 30;
+ }
+ if (score >= best_score) {
+ best_score = score;
+ best_match = face_idx;
+ }
+ if (best_score == 70) {
+ break;
+ }
+ }
+ if (best_match == -1) {
+ _free_rid(sysf.rid);
+ continue;
+ } else {
+ _font_set_face_index(sysf.rid, best_match);
+ }
+ sysf.index = best_match;
+
+ // If it's a variable font, apply weight, stretch and italic coordinates to match requested style.
+ if (best_score != 70) {
+ Dictionary ftr = _font_supported_variation_list(sysf.rid);
+ if (ftr.has(wdth_tag)) {
+ var[wdth_tag] = font_stretch;
+ _font_set_stretch(sysf.rid, font_stretch);
+ }
+ if (ftr.has(wgth_tag)) {
+ var[wgth_tag] = font_weight;
+ _font_set_weight(sysf.rid, font_weight);
+ }
+ if ((font_style & TextServer::FONT_ITALIC) && ftr.has(ital_tag)) {
+ var[ital_tag] = 1;
+ _font_set_style(sysf.rid, _font_get_style(sysf.rid) | TextServer::FONT_ITALIC);
+ }
+ }
+
+ _font_set_antialiasing(sysf.rid, key.antialiasing);
+ _font_set_generate_mipmaps(sysf.rid, key.mipmaps);
+ _font_set_multichannel_signed_distance_field(sysf.rid, key.msdf);
+ _font_set_msdf_pixel_range(sysf.rid, key.msdf_range);
+ _font_set_msdf_size(sysf.rid, key.msdf_source_size);
+ _font_set_fixed_size(sysf.rid, key.fixed_size);
+ _font_set_force_autohinter(sysf.rid, key.force_autohinter);
+ _font_set_hinting(sysf.rid, key.hinting);
+ _font_set_subpixel_positioning(sysf.rid, key.subpixel_positioning);
+ _font_set_variation_coordinates(sysf.rid, var);
+ _font_set_oversampling(sysf.rid, key.oversampling);
+ _font_set_embolden(sysf.rid, key.embolden);
+ _font_set_transform(sysf.rid, key.transform);
+
+ if (system_fonts.has(key)) {
+ system_fonts[key].var.push_back(sysf);
+ } else {
+ SystemFontCache &sysf_cache = system_fonts[key];
+ sysf_cache.max_var = _font_get_face_count(sysf.rid);
+ sysf_cache.var.push_back(sysf);
+ }
+ f = sysf.rid;
+ }
+ break;
+ }
+ }
+ }
+
+ if (!f.is_valid()) {
+ // No valid font, use fallback hex code boxes.
for (int i = p_start; i < p_end; i++) {
if (p_sd->preserve_invalid || (p_sd->preserve_control && is_control(p_sd->text[i]))) {
Glyph gl;
@@ -5100,7 +5328,6 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
return;
}
- RID f = p_fonts[p_fb_index];
FontAdvanced *fd = font_owner.get_or_null(f);
ERR_FAIL_COND(!fd);
MutexLock lock(fd->mutex);
@@ -5195,7 +5422,7 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
gl.end = end;
gl.count = 0;
- gl.font_rid = p_fonts[p_fb_index];
+ gl.font_rid = f;
gl.font_size = fs;
if (glyph_info[i].mask & HB_GLYPH_FLAG_UNSAFE_TO_BREAK) {
@@ -5262,7 +5489,7 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
for (unsigned int i = 0; i < glyph_count; i++) {
if ((w[i].flags & GRAPHEME_IS_VALID) == GRAPHEME_IS_VALID) {
if (failed_subrun_start != p_end + 1) {
- _shape_run(p_sd, failed_subrun_start, failed_subrun_end, p_script, p_direction, p_fonts, p_span, p_fb_index + 1);
+ _shape_run(p_sd, failed_subrun_start, failed_subrun_end, p_script, p_direction, p_fonts, p_span, p_fb_index + 1, p_start, p_end);
failed_subrun_start = p_end + 1;
failed_subrun_end = p_start;
}
@@ -5292,7 +5519,7 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
}
memfree(w);
if (failed_subrun_start != p_end + 1) {
- _shape_run(p_sd, failed_subrun_start, failed_subrun_end, p_script, p_direction, p_fonts, p_span, p_fb_index + 1);
+ _shape_run(p_sd, failed_subrun_start, failed_subrun_end, p_script, p_direction, p_fonts, p_span, p_fb_index + 1, p_start, p_end);
}
p_sd->ascent = MAX(p_sd->ascent, _font_get_ascent(f, fs));
p_sd->descent = MAX(p_sd->descent, _font_get_descent(f, fs));
@@ -5464,7 +5691,7 @@ bool TextServerAdvanced::_shaped_text_shape(const RID &p_shaped) {
}
fonts.append_array(fonts_scr_only);
fonts.append_array(fonts_no_match);
- _shape_run(sd, MAX(sd->spans[k].start - sd->start, script_run_start), MIN(sd->spans[k].end - sd->start, script_run_end), sd->script_iter->script_ranges[j].script, bidi_run_direction, fonts, k, 0);
+ _shape_run(sd, MAX(sd->spans[k].start - sd->start, script_run_start), MIN(sd->spans[k].end - sd->start, script_run_end), sd->script_iter->script_ranges[j].script, bidi_run_direction, fonts, k, 0, 0, 0);
}
}
}
@@ -5961,7 +6188,11 @@ String TextServerAdvanced::_strip_diacritics(const String &p_string) const {
String result;
for (int i = 0; i < normalized_string.length(); i++) {
if (u_getCombiningClass(normalized_string[i]) == 0) {
+#ifdef GDEXTENSION
+ result = result + String::chr(normalized_string[i]);
+#else
result = result + normalized_string[i];
+#endif
}
}
return result;
@@ -6243,6 +6474,17 @@ TextServerAdvanced::TextServerAdvanced() {
_bmp_create_font_funcs();
}
+void TextServerAdvanced::_cleanup() {
+ for (const KeyValue<SystemFontKey, SystemFontCache> &E : system_fonts) {
+ const Vector<SystemFontCacheRec> &sysf_cache = E.value.var;
+ for (const SystemFontCacheRec &F : sysf_cache) {
+ _free_rid(F.rid);
+ }
+ }
+ system_fonts.clear();
+ system_font_data.clear();
+}
+
TextServerAdvanced::~TextServerAdvanced() {
_bmp_free_font_funcs();
#ifdef MODULE_FREETYPE_ENABLED
diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h
index 10fe3c2316..5e6d2cc2c0 100644
--- a/modules/text_server_adv/text_server_adv.h
+++ b/modules/text_server_adv/text_server_adv.h
@@ -300,6 +300,7 @@ class TextServerAdvanced : public TextServerExtension {
int msdf_range = 14;
int msdf_source_size = 48;
int fixed_size = 0;
+ bool allow_system_fallback = true;
bool force_autohinter = false;
TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
TextServer::SubpixelPositioning subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_AUTO;
@@ -311,6 +312,8 @@ class TextServerAdvanced : public TextServerExtension {
BitField<TextServer::FontStyle> style_flags = 0;
String font_name;
String style_name;
+ int weight = 400;
+ int stretch = 100;
HashMap<Vector2i, FontForSizeAdvanced *, VariantHasher, VariantComparator> cache;
@@ -372,6 +375,57 @@ class TextServerAdvanced : public TextServerExtension {
_FORCE_INLINE_ double _get_extra_advance(RID p_font_rid, int p_font_size) const;
_FORCE_INLINE_ Variant::Type _get_tag_type(int64_t p_tag) const;
_FORCE_INLINE_ bool _get_tag_hidden(int64_t p_tag) const;
+ _FORCE_INLINE_ int _font_get_weight_by_name(const String &p_sty_name) const {
+ String sty_name = p_sty_name.replace(" ", "").replace("-", "");
+ if (sty_name.find("thin") >= 0 || sty_name.find("hairline") >= 0) {
+ return 100;
+ } else if (sty_name.find("extralight") >= 0 || sty_name.find("ultralight") >= 0) {
+ return 200;
+ } else if (sty_name.find("light") >= 0) {
+ return 300;
+ } else if (sty_name.find("semilight") >= 0) {
+ return 350;
+ } else if (sty_name.find("regular") >= 0) {
+ return 400;
+ } else if (sty_name.find("medium") >= 0) {
+ return 500;
+ } else if (sty_name.find("semibold") >= 0 || sty_name.find("demibold") >= 0) {
+ return 600;
+ } else if (sty_name.find("bold") >= 0) {
+ return 700;
+ } else if (sty_name.find("extrabold") >= 0 || sty_name.find("ultrabold") >= 0) {
+ return 800;
+ } else if (sty_name.find("black") >= 0 || sty_name.find("heavy") >= 0) {
+ return 900;
+ } else if (sty_name.find("extrablack") >= 0 || sty_name.find("ultrablack") >= 0) {
+ return 950;
+ }
+ return 400;
+ }
+ _FORCE_INLINE_ int _font_get_stretch_by_name(const String &p_sty_name) const {
+ String sty_name = p_sty_name.replace(" ", "").replace("-", "");
+ if (sty_name.find("ultracondensed") >= 0) {
+ return 50;
+ } else if (sty_name.find("extracondensed") >= 0) {
+ return 63;
+ } else if (sty_name.find("condensed") >= 0) {
+ return 75;
+ } else if (sty_name.find("semicondensed") >= 0) {
+ return 87;
+ } else if (sty_name.find("semiexpanded") >= 0) {
+ return 113;
+ } else if (sty_name.find("expanded") >= 0) {
+ return 125;
+ } else if (sty_name.find("extraexpanded") >= 0) {
+ return 150;
+ } else if (sty_name.find("ultraexpanded") >= 0) {
+ return 200;
+ }
+ return 100;
+ }
+ _FORCE_INLINE_ bool _is_ital_style(const String &p_sty_name) const {
+ return (p_sty_name.find("italic") >= 0) || (p_sty_name.find("oblique") >= 0);
+ }
// Shaped text cache data.
struct TrimData {
@@ -474,12 +528,87 @@ class TextServerAdvanced : public TextServerExtension {
mutable RID_PtrOwner<FontAdvanced> font_owner;
mutable RID_PtrOwner<ShapedTextDataAdvanced> shaped_owner;
+ struct SystemFontKey {
+ String font_name;
+ TextServer::FontAntialiasing antialiasing = TextServer::FONT_ANTIALIASING_GRAY;
+ bool italic = false;
+ bool mipmaps = false;
+ bool msdf = false;
+ bool force_autohinter = false;
+ int weight = 400;
+ int stretch = 100;
+ int msdf_range = 14;
+ int msdf_source_size = 48;
+ int fixed_size = 0;
+ TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
+ TextServer::SubpixelPositioning subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_AUTO;
+ Dictionary variation_coordinates;
+ double oversampling = 0.0;
+ double embolden = 0.0;
+ Transform2D transform;
+
+ bool operator==(const SystemFontKey &p_b) const {
+ return (font_name == p_b.font_name) && (antialiasing == p_b.antialiasing) && (italic == p_b.italic) && (mipmaps == p_b.mipmaps) && (msdf == p_b.msdf) && (force_autohinter == p_b.force_autohinter) && (weight == p_b.weight) && (stretch == p_b.stretch) && (msdf_range == p_b.msdf_range) && (msdf_source_size == p_b.msdf_source_size) && (fixed_size == p_b.fixed_size) && (hinting == p_b.hinting) && (subpixel_positioning == p_b.subpixel_positioning) && (variation_coordinates == p_b.variation_coordinates) && (oversampling == p_b.oversampling) && (embolden == p_b.embolden) && (transform == p_b.transform);
+ }
+
+ SystemFontKey(const String &p_font_name, bool p_italic, int p_weight, int p_stretch, RID p_font, const TextServerAdvanced *p_fb) {
+ font_name = p_font_name;
+ italic = p_italic;
+ weight = p_weight;
+ stretch = p_stretch;
+ antialiasing = p_fb->_font_get_antialiasing(p_font);
+ mipmaps = p_fb->_font_get_generate_mipmaps(p_font);
+ msdf = p_fb->_font_is_multichannel_signed_distance_field(p_font);
+ msdf_range = p_fb->_font_get_msdf_pixel_range(p_font);
+ msdf_source_size = p_fb->_font_get_msdf_size(p_font);
+ fixed_size = p_fb->_font_get_fixed_size(p_font);
+ force_autohinter = p_fb->_font_is_force_autohinter(p_font);
+ hinting = p_fb->_font_get_hinting(p_font);
+ subpixel_positioning = p_fb->_font_get_subpixel_positioning(p_font);
+ variation_coordinates = p_fb->_font_get_variation_coordinates(p_font);
+ oversampling = p_fb->_font_get_oversampling(p_font);
+ embolden = p_fb->_font_get_embolden(p_font);
+ transform = p_fb->_font_get_transform(p_font);
+ }
+ };
+
+ struct SystemFontCacheRec {
+ RID rid;
+ int index = 0;
+ };
+
+ struct SystemFontCache {
+ Vector<SystemFontCacheRec> var;
+ int max_var = 0;
+ };
+
+ struct SystemFontKeyHasher {
+ _FORCE_INLINE_ static uint32_t hash(const SystemFontKey &p_a) {
+ uint32_t hash = p_a.font_name.hash();
+ hash = hash_murmur3_one_32(p_a.variation_coordinates.hash(), hash);
+ hash = hash_murmur3_one_32(p_a.weight, hash);
+ hash = hash_murmur3_one_32(p_a.stretch, hash);
+ hash = hash_murmur3_one_32(p_a.msdf_range, hash);
+ hash = hash_murmur3_one_32(p_a.msdf_source_size, hash);
+ hash = hash_murmur3_one_32(p_a.fixed_size, hash);
+ hash = hash_murmur3_one_double(p_a.oversampling, hash);
+ hash = hash_murmur3_one_double(p_a.embolden, hash);
+ hash = hash_murmur3_one_real(p_a.transform[0].x, hash);
+ hash = hash_murmur3_one_real(p_a.transform[0].y, hash);
+ hash = hash_murmur3_one_real(p_a.transform[1].x, hash);
+ hash = hash_murmur3_one_real(p_a.transform[1].y, hash);
+ return hash_fmix32(hash_murmur3_one_32(((int)p_a.mipmaps) | ((int)p_a.msdf << 1) | ((int)p_a.italic << 2) | ((int)p_a.force_autohinter << 3) | ((int)p_a.hinting << 4) | ((int)p_a.subpixel_positioning << 8) | ((int)p_a.antialiasing << 12), hash));
+ }
+ };
+ mutable HashMap<SystemFontKey, SystemFontCache, SystemFontKeyHasher> system_fonts;
+ mutable HashMap<String, PackedByteArray> system_font_data;
+
void _realign(ShapedTextDataAdvanced *p_sd) const;
int64_t _convert_pos(const String &p_utf32, const Char16String &p_utf16, int64_t p_pos) const;
int64_t _convert_pos(const ShapedTextDataAdvanced *p_sd, int64_t p_pos) const;
int64_t _convert_pos_inv(const ShapedTextDataAdvanced *p_sd, int64_t p_pos) const;
bool _shape_substr(ShapedTextDataAdvanced *p_new_sd, const ShapedTextDataAdvanced *p_sd, int64_t p_start, int64_t p_length) const;
- void _shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_start, int64_t p_end, hb_script_t p_script, hb_direction_t p_direction, TypedArray<RID> p_fonts, int64_t p_span, int64_t p_fb_index);
+ void _shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_start, int64_t p_end, hb_script_t p_script, hb_direction_t p_direction, TypedArray<RID> p_fonts, int64_t p_span, int64_t p_fb_index, int64_t p_prev_start, int64_t p_prev_end);
Glyph _shape_single_glyph(ShapedTextDataAdvanced *p_sd, char32_t p_char, hb_script_t p_script, hb_direction_t p_direction, const RID &p_font, int64_t p_font_size);
_FORCE_INLINE_ void _add_featuers(const Dictionary &p_source, Vector<hb_feature_t> &r_ftrs);
@@ -568,6 +697,12 @@ public:
MODBIND2(font_set_style_name, const RID &, const String &);
MODBIND1RC(String, font_get_style_name, const RID &);
+ MODBIND2(font_set_weight, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_weight, const RID &);
+
+ MODBIND2(font_set_stretch, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_stretch, const RID &);
+
MODBIND2(font_set_name, const RID &, const String &);
MODBIND1RC(String, font_get_name, const RID &);
@@ -589,6 +724,9 @@ public:
MODBIND2(font_set_fixed_size, const RID &, int64_t);
MODBIND1RC(int64_t, font_get_fixed_size, const RID &);
+ MODBIND2(font_set_allow_system_fallback, const RID &, bool);
+ MODBIND1RC(bool, font_is_allow_system_fallback, const RID &);
+
MODBIND2(font_set_force_autohinter, const RID &, bool);
MODBIND1RC(bool, font_is_force_autohinter, const RID &);
@@ -787,6 +925,8 @@ public:
MODBIND2RC(String, string_to_upper, const String &, const String &);
MODBIND2RC(String, string_to_lower, const String &, const String &);
+ MODBIND0(cleanup);
+
TextServerAdvanced();
~TextServerAdvanced();
};
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp
index aaef9c9a3d..9133c277bb 100644
--- a/modules/text_server_fb/text_server_fb.cpp
+++ b/modules/text_server_fb/text_server_fb.cpp
@@ -34,6 +34,7 @@
// Headers for building as GDExtension plug-in.
#include <godot_cpp/classes/file_access.hpp>
+#include <godot_cpp/classes/os.hpp>
#include <godot_cpp/classes/project_settings.hpp>
#include <godot_cpp/classes/rendering_server.hpp>
#include <godot_cpp/classes/translation_server.hpp>
@@ -49,6 +50,7 @@ using namespace godot;
#include "core/config/project_settings.h"
#include "core/error/error_macros.h"
#include "core/string/print_string.h"
+#include "core/string/translation.h"
#include "core/string/ucaps.h"
#include "modules/modules_enabled.gen.h" // For freetype, msdfgen, svg.
@@ -852,11 +854,13 @@ _FORCE_INLINE_ bool TextServerFallback::_ensure_cache_for_size(FontFallback *p_f
if (fd->face->style_name != nullptr) {
p_font_data->style_name = String::utf8((const char *)fd->face->style_name);
}
+ p_font_data->weight = _font_get_weight_by_name(p_font_data->style_name.to_lower());
+ p_font_data->stretch = _font_get_stretch_by_name(p_font_data->style_name.to_lower());
p_font_data->style_flags = 0;
- if (fd->face->style_flags & FT_STYLE_FLAG_BOLD) {
+ if ((fd->face->style_flags & FT_STYLE_FLAG_BOLD) || p_font_data->weight >= 700) {
p_font_data->style_flags.set_flag(FONT_BOLD);
}
- if (fd->face->style_flags & FT_STYLE_FLAG_ITALIC) {
+ if ((fd->face->style_flags & FT_STYLE_FLAG_ITALIC) || _is_ital_style(p_font_data->style_name.to_lower())) {
p_font_data->style_flags.set_flag(FONT_ITALIC);
}
if (fd->face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) {
@@ -1061,6 +1065,46 @@ String TextServerFallback::_font_get_style_name(const RID &p_font_rid) const {
return fd->style_name;
}
+void TextServerFallback::_font_set_weight(const RID &p_font_rid, int64_t p_weight) {
+ FontFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->weight = CLAMP(p_weight, 100, 999);
+}
+
+int64_t TextServerFallback::_font_get_weight(const RID &p_font_rid) const {
+ FontFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 400);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 400);
+ return fd->weight;
+}
+
+void TextServerFallback::_font_set_stretch(const RID &p_font_rid, int64_t p_stretch) {
+ FontFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->stretch = CLAMP(p_stretch, 50, 200);
+}
+
+int64_t TextServerFallback::_font_get_stretch(const RID &p_font_rid) const {
+ FontFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 100);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 100);
+ return fd->stretch;
+}
+
void TextServerFallback::_font_set_name(const RID &p_font_rid, const String &p_name) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1197,6 +1241,25 @@ int64_t TextServerFallback::_font_get_fixed_size(const RID &p_font_rid) const {
return fd->fixed_size;
}
+void TextServerFallback::_font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) {
+ FontFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->allow_system_fallback != p_allow_system_fallback) {
+ _font_clear_cache(fd);
+ fd->allow_system_fallback = p_allow_system_fallback;
+ }
+}
+
+bool TextServerFallback::_font_is_allow_system_fallback(const RID &p_font_rid) const {
+ FontFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->allow_system_fallback;
+}
+
void TextServerFallback::_font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3603,6 +3666,7 @@ bool TextServerFallback::_shaped_text_shape(const RID &p_shaped) {
sd->glyphs.push_back(gl);
} else {
// Text span.
+ RID prev_font;
for (int j = span.start; j < span.end; j++) {
Glyph gl;
gl.start = j;
@@ -3623,6 +3687,170 @@ bool TextServerFallback::_shaped_text_shape(const RID &p_shaped) {
break;
}
}
+ if (!gl.font_rid.is_valid() && prev_font.is_valid()) {
+ if (_font_has_char(prev_font, gl.index)) {
+ gl.font_rid = prev_font;
+ }
+ }
+ if (!gl.font_rid.is_valid() && OS::get_singleton()->has_feature("system_fonts") && span.fonts.size() > 0) {
+ // Try system fallback.
+ RID fdef = span.fonts[0];
+ if (_font_is_allow_system_fallback(fdef)) {
+ String text = sd->text.substr(j, 1);
+ String font_name = _font_get_name(fdef);
+ BitField<FontStyle> font_style = _font_get_style(fdef);
+ int font_weight = _font_get_weight(fdef);
+ int font_stretch = _font_get_stretch(fdef);
+ Dictionary dvar = _font_get_variation_coordinates(fdef);
+ static int64_t wgth_tag = _name_to_tag("weight");
+ static int64_t wdth_tag = _name_to_tag("width");
+ static int64_t ital_tag = _name_to_tag("italic");
+ if (dvar.has(wgth_tag)) {
+ font_weight = dvar[wgth_tag].operator int();
+ }
+ if (dvar.has(wdth_tag)) {
+ font_stretch = dvar[wdth_tag].operator int();
+ }
+ if (dvar.has(ital_tag) && dvar[ital_tag].operator int() == 1) {
+ font_style.set_flag(TextServer::FONT_ITALIC);
+ }
+
+ String locale = (span.language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : span.language;
+
+ PackedStringArray fallback_font_name = OS::get_singleton()->get_system_font_path_for_text(font_name, text, locale, String(), font_weight, font_stretch, font_style & TextServer::FONT_ITALIC);
+#ifdef GDEXTENSION
+ for (int fb = 0; fb < fallback_font_name.size(); fb++) {
+ const String &E = fallback_font_name[fb];
+#else
+ for (const String &E : fallback_font_name) {
+#endif
+ SystemFontKey key = SystemFontKey(E, font_style & TextServer::FONT_ITALIC, font_weight, font_stretch, fdef, this);
+ if (system_fonts.has(key)) {
+ const SystemFontCache &sysf_cache = system_fonts[key];
+ int best_score = 0;
+ int best_match = -1;
+ for (int face_idx = 0; face_idx < sysf_cache.var.size(); face_idx++) {
+ const SystemFontCacheRec &F = sysf_cache.var[face_idx];
+ if (unlikely(!_font_has_char(F.rid, text[0]))) {
+ continue;
+ }
+ BitField<FontStyle> style = _font_get_style(F.rid);
+ int weight = _font_get_weight(F.rid);
+ int stretch = _font_get_stretch(F.rid);
+ int score = (20 - Math::abs(weight - font_weight) / 50);
+ score += (20 - Math::abs(stretch - font_stretch) / 10);
+ if (bool(style & TextServer::FONT_ITALIC) == bool(font_style & TextServer::FONT_ITALIC)) {
+ score += 30;
+ }
+ if (score >= best_score) {
+ best_score = score;
+ best_match = face_idx;
+ }
+ if (best_score == 70) {
+ break;
+ }
+ }
+ if (best_match != -1) {
+ gl.font_rid = sysf_cache.var[best_match].rid;
+ }
+ }
+ if (!gl.font_rid.is_valid()) {
+ if (system_fonts.has(key)) {
+ const SystemFontCache &sysf_cache = system_fonts[key];
+ if (sysf_cache.max_var == sysf_cache.var.size()) {
+ // All subfonts already tested, skip.
+ continue;
+ }
+ }
+
+ if (!system_font_data.has(E)) {
+ system_font_data[E] = FileAccess::get_file_as_bytes(E);
+ }
+
+ const PackedByteArray &font_data = system_font_data[E];
+
+ SystemFontCacheRec sysf;
+ sysf.rid = _create_font();
+ _font_set_data_ptr(sysf.rid, font_data.ptr(), font_data.size());
+
+ Dictionary var = dvar;
+ // Select matching style from collection.
+ int best_score = 0;
+ int best_match = -1;
+ for (int face_idx = 0; face_idx < _font_get_face_count(sysf.rid); face_idx++) {
+ _font_set_face_index(sysf.rid, face_idx);
+ if (unlikely(!_font_has_char(sysf.rid, text[0]))) {
+ continue;
+ }
+ BitField<FontStyle> style = _font_get_style(sysf.rid);
+ int weight = _font_get_weight(sysf.rid);
+ int stretch = _font_get_stretch(sysf.rid);
+ int score = (20 - Math::abs(weight - font_weight) / 50);
+ score += (20 - Math::abs(stretch - font_stretch) / 10);
+ if (bool(style & TextServer::FONT_ITALIC) == bool(font_style & TextServer::FONT_ITALIC)) {
+ score += 30;
+ }
+ if (score >= best_score) {
+ best_score = score;
+ best_match = face_idx;
+ }
+ if (best_score == 70) {
+ break;
+ }
+ }
+ if (best_match == -1) {
+ _free_rid(sysf.rid);
+ continue;
+ } else {
+ _font_set_face_index(sysf.rid, best_match);
+ }
+ sysf.index = best_match;
+
+ // If it's a variable font, apply weight, stretch and italic coordinates to match requested style.
+ if (best_score != 70) {
+ Dictionary ftr = _font_supported_variation_list(sysf.rid);
+ if (ftr.has(wdth_tag)) {
+ var[wdth_tag] = font_stretch;
+ _font_set_stretch(sysf.rid, font_stretch);
+ }
+ if (ftr.has(wgth_tag)) {
+ var[wgth_tag] = font_weight;
+ _font_set_weight(sysf.rid, font_weight);
+ }
+ if ((font_style & TextServer::FONT_ITALIC) && ftr.has(ital_tag)) {
+ var[ital_tag] = 1;
+ _font_set_style(sysf.rid, _font_get_style(sysf.rid) | TextServer::FONT_ITALIC);
+ }
+ }
+
+ _font_set_antialiasing(sysf.rid, key.antialiasing);
+ _font_set_generate_mipmaps(sysf.rid, key.mipmaps);
+ _font_set_multichannel_signed_distance_field(sysf.rid, key.msdf);
+ _font_set_msdf_pixel_range(sysf.rid, key.msdf_range);
+ _font_set_msdf_size(sysf.rid, key.msdf_source_size);
+ _font_set_fixed_size(sysf.rid, key.fixed_size);
+ _font_set_force_autohinter(sysf.rid, key.force_autohinter);
+ _font_set_hinting(sysf.rid, key.hinting);
+ _font_set_subpixel_positioning(sysf.rid, key.subpixel_positioning);
+ _font_set_variation_coordinates(sysf.rid, var);
+ _font_set_oversampling(sysf.rid, key.oversampling);
+ _font_set_embolden(sysf.rid, key.embolden);
+ _font_set_transform(sysf.rid, key.transform);
+
+ if (system_fonts.has(key)) {
+ system_fonts[key].var.push_back(sysf);
+ } else {
+ SystemFontCache &sysf_cache = system_fonts[key];
+ sysf_cache.max_var = _font_get_face_count(sysf.rid);
+ sysf_cache.var.push_back(sysf);
+ }
+ gl.font_rid = sysf.rid;
+ }
+ break;
+ }
+ }
+ }
+ prev_font = gl.font_rid;
double scale = _font_get_scale(gl.font_rid, gl.font_size);
if (gl.font_rid.is_valid()) {
@@ -3893,6 +4121,17 @@ TextServerFallback::TextServerFallback() {
_insert_feature_sets();
};
+void TextServerFallback::_cleanup() {
+ for (const KeyValue<SystemFontKey, SystemFontCache> &E : system_fonts) {
+ const Vector<SystemFontCacheRec> &sysf_cache = E.value.var;
+ for (const SystemFontCacheRec &F : sysf_cache) {
+ _free_rid(F.rid);
+ }
+ }
+ system_fonts.clear();
+ system_font_data.clear();
+}
+
TextServerFallback::~TextServerFallback() {
#ifdef MODULE_FREETYPE_ENABLED
if (ft_library != nullptr) {
diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h
index 7e0bc99618..f8a05f9433 100644
--- a/modules/text_server_fb/text_server_fb.h
+++ b/modules/text_server_fb/text_server_fb.h
@@ -256,6 +256,7 @@ class TextServerFallback : public TextServerExtension {
int msdf_source_size = 48;
int fixed_size = 0;
bool force_autohinter = false;
+ bool allow_system_fallback = true;
TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
TextServer::SubpixelPositioning subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_AUTO;
Dictionary variation_coordinates;
@@ -266,6 +267,8 @@ class TextServerFallback : public TextServerExtension {
BitField<TextServer::FontStyle> style_flags = 0;
String font_name;
String style_name;
+ int weight = 400;
+ int stretch = 100;
HashMap<Vector2i, FontForSizeFallback *, VariantHasher, VariantComparator> cache;
@@ -322,6 +325,58 @@ class TextServerFallback : public TextServerExtension {
}
}
+ _FORCE_INLINE_ int _font_get_weight_by_name(const String &p_sty_name) const {
+ String sty_name = p_sty_name.replace(" ", "").replace("-", "");
+ if (sty_name.find("thin") >= 0 || sty_name.find("hairline") >= 0) {
+ return 100;
+ } else if (sty_name.find("extralight") >= 0 || sty_name.find("ultralight") >= 0) {
+ return 200;
+ } else if (sty_name.find("light") >= 0) {
+ return 300;
+ } else if (sty_name.find("semilight") >= 0) {
+ return 350;
+ } else if (sty_name.find("regular") >= 0) {
+ return 400;
+ } else if (sty_name.find("medium") >= 0) {
+ return 500;
+ } else if (sty_name.find("semibold") >= 0 || sty_name.find("demibold") >= 0) {
+ return 600;
+ } else if (sty_name.find("bold") >= 0) {
+ return 700;
+ } else if (sty_name.find("extrabold") >= 0 || sty_name.find("ultrabold") >= 0) {
+ return 800;
+ } else if (sty_name.find("black") >= 0 || sty_name.find("heavy") >= 0) {
+ return 900;
+ } else if (sty_name.find("extrablack") >= 0 || sty_name.find("ultrablack") >= 0) {
+ return 950;
+ }
+ return 400;
+ }
+ _FORCE_INLINE_ int _font_get_stretch_by_name(const String &p_sty_name) const {
+ String sty_name = p_sty_name.replace(" ", "").replace("-", "");
+ if (sty_name.find("ultracondensed") >= 0) {
+ return 50;
+ } else if (sty_name.find("extracondensed") >= 0) {
+ return 63;
+ } else if (sty_name.find("condensed") >= 0) {
+ return 75;
+ } else if (sty_name.find("semicondensed") >= 0) {
+ return 87;
+ } else if (sty_name.find("semiexpanded") >= 0) {
+ return 113;
+ } else if (sty_name.find("expanded") >= 0) {
+ return 125;
+ } else if (sty_name.find("extraexpanded") >= 0) {
+ return 150;
+ } else if (sty_name.find("ultraexpanded") >= 0) {
+ return 200;
+ }
+ return 100;
+ }
+ _FORCE_INLINE_ bool _is_ital_style(const String &p_sty_name) const {
+ return (p_sty_name.find("italic") >= 0) || (p_sty_name.find("oblique") >= 0);
+ }
+
// Shaped text cache data.
struct TrimData {
int trim_pos = -1;
@@ -398,6 +453,81 @@ class TextServerFallback : public TextServerExtension {
mutable RID_PtrOwner<FontFallback> font_owner;
mutable RID_PtrOwner<ShapedTextDataFallback> shaped_owner;
+ struct SystemFontKey {
+ String font_name;
+ TextServer::FontAntialiasing antialiasing = TextServer::FONT_ANTIALIASING_GRAY;
+ bool italic = false;
+ bool mipmaps = false;
+ bool msdf = false;
+ bool force_autohinter = false;
+ int weight = 400;
+ int stretch = 100;
+ int msdf_range = 14;
+ int msdf_source_size = 48;
+ int fixed_size = 0;
+ TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
+ TextServer::SubpixelPositioning subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_AUTO;
+ Dictionary variation_coordinates;
+ double oversampling = 0.0;
+ double embolden = 0.0;
+ Transform2D transform;
+
+ bool operator==(const SystemFontKey &p_b) const {
+ return (font_name == p_b.font_name) && (antialiasing == p_b.antialiasing) && (italic == p_b.italic) && (mipmaps == p_b.mipmaps) && (msdf == p_b.msdf) && (force_autohinter == p_b.force_autohinter) && (weight == p_b.weight) && (stretch == p_b.stretch) && (msdf_range == p_b.msdf_range) && (msdf_source_size == p_b.msdf_source_size) && (fixed_size == p_b.fixed_size) && (hinting == p_b.hinting) && (subpixel_positioning == p_b.subpixel_positioning) && (variation_coordinates == p_b.variation_coordinates) && (oversampling == p_b.oversampling) && (embolden == p_b.embolden) && (transform == p_b.transform);
+ }
+
+ SystemFontKey(const String &p_font_name, bool p_italic, int p_weight, int p_stretch, RID p_font, const TextServerFallback *p_fb) {
+ font_name = p_font_name;
+ italic = p_italic;
+ weight = p_weight;
+ stretch = p_stretch;
+ antialiasing = p_fb->_font_get_antialiasing(p_font);
+ mipmaps = p_fb->_font_get_generate_mipmaps(p_font);
+ msdf = p_fb->_font_is_multichannel_signed_distance_field(p_font);
+ msdf_range = p_fb->_font_get_msdf_pixel_range(p_font);
+ msdf_source_size = p_fb->_font_get_msdf_size(p_font);
+ fixed_size = p_fb->_font_get_fixed_size(p_font);
+ force_autohinter = p_fb->_font_is_force_autohinter(p_font);
+ hinting = p_fb->_font_get_hinting(p_font);
+ subpixel_positioning = p_fb->_font_get_subpixel_positioning(p_font);
+ variation_coordinates = p_fb->_font_get_variation_coordinates(p_font);
+ oversampling = p_fb->_font_get_oversampling(p_font);
+ embolden = p_fb->_font_get_embolden(p_font);
+ transform = p_fb->_font_get_transform(p_font);
+ }
+ };
+
+ struct SystemFontCacheRec {
+ RID rid;
+ int index = 0;
+ };
+
+ struct SystemFontCache {
+ Vector<SystemFontCacheRec> var;
+ int max_var = 0;
+ };
+
+ struct SystemFontKeyHasher {
+ _FORCE_INLINE_ static uint32_t hash(const SystemFontKey &p_a) {
+ uint32_t hash = p_a.font_name.hash();
+ hash = hash_murmur3_one_32(p_a.variation_coordinates.hash(), hash);
+ hash = hash_murmur3_one_32(p_a.weight, hash);
+ hash = hash_murmur3_one_32(p_a.stretch, hash);
+ hash = hash_murmur3_one_32(p_a.msdf_range, hash);
+ hash = hash_murmur3_one_32(p_a.msdf_source_size, hash);
+ hash = hash_murmur3_one_32(p_a.fixed_size, hash);
+ hash = hash_murmur3_one_double(p_a.oversampling, hash);
+ hash = hash_murmur3_one_double(p_a.embolden, hash);
+ hash = hash_murmur3_one_real(p_a.transform[0].x, hash);
+ hash = hash_murmur3_one_real(p_a.transform[0].y, hash);
+ hash = hash_murmur3_one_real(p_a.transform[1].x, hash);
+ hash = hash_murmur3_one_real(p_a.transform[1].y, hash);
+ return hash_fmix32(hash_murmur3_one_32(((int)p_a.mipmaps) | ((int)p_a.msdf << 1) | ((int)p_a.italic << 2) | ((int)p_a.force_autohinter << 3) | ((int)p_a.hinting << 4) | ((int)p_a.subpixel_positioning << 8) | ((int)p_a.antialiasing << 12), hash));
+ }
+ };
+ mutable HashMap<SystemFontKey, SystemFontCache, SystemFontKeyHasher> system_fonts;
+ mutable HashMap<String, PackedByteArray> system_font_data;
+
void _realign(ShapedTextDataFallback *p_sd) const;
protected:
@@ -442,6 +572,12 @@ public:
MODBIND2(font_set_style_name, const RID &, const String &);
MODBIND1RC(String, font_get_style_name, const RID &);
+ MODBIND2(font_set_weight, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_weight, const RID &);
+
+ MODBIND2(font_set_stretch, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_stretch, const RID &);
+
MODBIND2(font_set_name, const RID &, const String &);
MODBIND1RC(String, font_get_name, const RID &);
@@ -463,6 +599,9 @@ public:
MODBIND2(font_set_fixed_size, const RID &, int64_t);
MODBIND1RC(int64_t, font_get_fixed_size, const RID &);
+ MODBIND2(font_set_allow_system_fallback, const RID &, bool);
+ MODBIND1RC(bool, font_is_allow_system_fallback, const RID &);
+
MODBIND2(font_set_force_autohinter, const RID &, bool);
MODBIND1RC(bool, font_is_force_autohinter, const RID &);
@@ -651,6 +790,8 @@ public:
MODBIND2RC(String, string_to_upper, const String &, const String &);
MODBIND2RC(String, string_to_lower, const String &, const String &);
+ MODBIND0(cleanup);
+
TextServerFallback();
~TextServerFallback();
};
diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp
index f76f3844e9..937b929d62 100644
--- a/platform/android/display_server_android.cpp
+++ b/platform/android/display_server_android.cpp
@@ -316,9 +316,6 @@ 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());
}
@@ -326,8 +323,17 @@ int64_t DisplayServerAndroid::window_get_native_handle(HandleType p_handle_type,
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: {
- return reinterpret_cast<int64_t>(eglGetCurrentContext());
+ if (rendering_driver == "opengl3") {
+ return reinterpret_cast<int64_t>(eglGetCurrentContext());
+ }
+ return 0;
}
#endif
default: {
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 737e25b270..795a542ed5 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -703,7 +703,7 @@ Error EditorExportPlatformAndroid::save_apk_so(void *p_userdata, const SharedObj
exported = true;
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 + "'.");
}
@@ -748,7 +748,7 @@ Error EditorExportPlatformAndroid::copy_gradle_so(void *p_userdata, const Shared
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);
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/os_android.cpp b/platform/android/os_android.cpp
index 4f81e4bccd..317a63f21f 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -337,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.
@@ -449,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;
}
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/ios/os_ios.h b/platform/ios/os_ios.h
index 3560de7486..186efd14a8 100644
--- a/platform/ios/os_ios.h
+++ b/platform/ios/os_ios.h
@@ -73,6 +73,10 @@ private:
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;
+
void deinitialize_modules();
public:
@@ -90,7 +94,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;
diff --git a/platform/ios/os_ios.mm b/platform/ios/os_ios.mm
index 9a8cfc2593..9617627b6f 100644
--- a/platform/ios/os_ios.mm
+++ b/platform/ios/os_ios.mm
@@ -334,9 +334,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";
@@ -349,21 +347,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);
@@ -382,6 +512,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;
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 004bcb8674..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"])
diff --git a/platform/linuxbsd/fontconfig-so_wrap.c b/platform/linuxbsd/fontconfig-so_wrap.c
index 1a915faf98..a428cf1fb4 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 --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*);
@@ -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/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 e14e4fb52d..d5a75edeea 100644
--- a/platform/linuxbsd/os_linuxbsd.cpp
+++ b/platform/linuxbsd/os_linuxbsd.cpp
@@ -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" };
@@ -585,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();
@@ -616,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);
@@ -628,27 +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.");
}
- 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");
+ 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);
- String ret;
+ 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);
@@ -663,8 +746,6 @@ String OS_LinuxBSD::get_system_font_path(const String &p_font_name, bool p_bold,
if (family_name && String::utf8(family_name).to_lower() != p_font_name.to_lower()) {
FcPatternDestroy(match);
FcPatternDestroy(pattern);
- FcObjectSetDestroy(object_set);
- FcConfigDestroy(config);
return String();
}
@@ -681,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
@@ -1008,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 aa7af92aa1..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
@@ -94,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;
@@ -119,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/x11/SCsub b/platform/linuxbsd/x11/SCsub
index 30c6080355..8b2e2aabe4 100644
--- a/platform/linuxbsd/x11/SCsub
+++ b/platform/linuxbsd/x11/SCsub
@@ -5,12 +5,20 @@ Import("env")
source_files = [
"display_server_x11.cpp",
"key_mapping_x11.cpp",
+ "dynwrappers/xlib-so_wrap.c",
+ "dynwrappers/xcursor-so_wrap.c",
+ "dynwrappers/xinerama-so_wrap.c",
+ "dynwrappers/xinput2-so_wrap.c",
+ "dynwrappers/xrandr-so_wrap.c",
+ "dynwrappers/xrender-so_wrap.c",
+ "dynwrappers/xext-so_wrap.c",
]
if env["vulkan"]:
source_files.append("vulkan_context_x11.cpp")
if env["opengl3"]:
+ env.Append(CPPDEFINES=["GLAD_GLX_NO_X11"])
source_files.append(["gl_manager_x11.cpp", "detect_prime_x11.cpp", "#thirdparty/glad/glx.c"])
objects = []
diff --git a/platform/linuxbsd/x11/detect_prime_x11.cpp b/platform/linuxbsd/x11/detect_prime_x11.cpp
index ed046432d8..0f756d10e2 100644
--- a/platform/linuxbsd/x11/detect_prime_x11.cpp
+++ b/platform/linuxbsd/x11/detect_prime_x11.cpp
@@ -41,8 +41,7 @@
#include "thirdparty/glad/glad/gl.h"
#include "thirdparty/glad/glad/glx.h"
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
+#include "dynwrappers/xlib-so_wrap.h"
#include <cstring>
@@ -89,6 +88,10 @@ void create_context() {
None
};
+ if (gladLoaderLoadGLX(x11_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(x11_display))) == 0) {
+ print_verbose("Unable to load GLX, GPU detection skipped.");
+ quick_exit(1);
+ }
int fbcount;
GLXFBConfig fbconfig = nullptr;
XVisualInfo *vi = nullptr;
@@ -189,11 +192,6 @@ int detect_prime() {
setenv("DRI_PRIME", "1", 1);
}
- if (gladLoaderLoadGLX(NULL, 0) == 0) {
- print_verbose("Unable to load GLX, GPU detection skipped.");
- quick_exit(1);
- }
-
create_context();
PFNGLGETSTRINGPROC glGetString = (PFNGLGETSTRINGPROC)glXGetProcAddressARB((GLubyte *)"glGetString");
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index cf50748ac8..a5e3e60775 100644
--- a/platform/linuxbsd/x11/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
@@ -4710,6 +4705,46 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V
}
DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) {
+#ifdef DEBUG_ENABLED
+ int dylibloader_verbose = 1;
+#else
+ int dylibloader_verbose = 0;
+#endif
+ if (initialize_xlib(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xlib dynamically.");
+ }
+
+ if (initialize_xcursor(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load XCursor dynamically.");
+ }
+
+ if (initialize_xext(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xext dynamically.");
+ }
+
+ if (initialize_xinerama(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xinerama dynamically.");
+ }
+
+ if (initialize_xrandr(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xrandr dynamically.");
+ }
+
+ if (initialize_xrender(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xrender dynamically.");
+ }
+
+ if (initialize_xinput2(dylibloader_verbose) != 0) {
+ r_error = ERR_UNAVAILABLE;
+ ERR_FAIL_MSG("Can't load Xinput2 dynamically.");
+ }
+
Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events);
r_error = OK;
@@ -4910,7 +4945,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
gl_manager = memnew(GLManager_X11(p_resolution, opengl_api_type));
- if (gl_manager->initialize() != OK) {
+ if (gl_manager->initialize(x11_display) != OK) {
memdelete(gl_manager);
gl_manager = nullptr;
r_error = ERR_UNAVAILABLE;
diff --git a/platform/linuxbsd/x11/display_server_x11.h b/platform/linuxbsd/x11/display_server_x11.h
index 4be8c3a534..c88a6b466a 100644
--- a/platform/linuxbsd/x11/display_server_x11.h
+++ b/platform/linuxbsd/x11/display_server_x11.h
@@ -64,12 +64,20 @@
#include "../freedesktop_screensaver.h"
#endif
-#include <X11/Xcursor/Xcursor.h>
+#include <X11/Xatom.h>
#include <X11/Xlib.h>
-#include <X11/extensions/XInput2.h>
-#include <X11/extensions/Xrandr.h>
+#include <X11/Xutil.h>
#include <X11/keysym.h>
+#include "dynwrappers/xlib-so_wrap.h"
+
+#include "dynwrappers/xcursor-so_wrap.h"
+#include "dynwrappers/xext-so_wrap.h"
+#include "dynwrappers/xinerama-so_wrap.h"
+#include "dynwrappers/xinput2-so_wrap.h"
+#include "dynwrappers/xrandr-so_wrap.h"
+#include "dynwrappers/xrender-so_wrap.h"
+
typedef struct _xrr_monitor_info {
Atom name;
Bool primary = false;
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..d689ff1aa8
--- /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-existant symbols inherited from
+// libX11, but absent in libXcursor.so.1, were removed.
+#include <stdint.h>
+
+#define XcursorImageCreate XcursorImageCreate_dylibloader_orig_xcursor
+#define XcursorImageDestroy XcursorImageDestroy_dylibloader_orig_xcursor
+#define XcursorImagesCreate XcursorImagesCreate_dylibloader_orig_xcursor
+#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_orig_xcursor
+#define XcursorImagesSetName XcursorImagesSetName_dylibloader_orig_xcursor
+#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_orig_xcursor
+#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_orig_xcursor
+#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_orig_xcursor
+#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_orig_xcursor
+#define XcursorAnimateNext XcursorAnimateNext_dylibloader_orig_xcursor
+#define XcursorCommentCreate XcursorCommentCreate_dylibloader_orig_xcursor
+#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_orig_xcursor
+#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_orig_xcursor
+#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_orig_xcursor
+#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_orig_xcursor
+#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_orig_xcursor
+#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_orig_xcursor
+#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_orig_xcursor
+#define XcursorXcFileSave XcursorXcFileSave_dylibloader_orig_xcursor
+#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_orig_xcursor
+#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_orig_xcursor
+#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_orig_xcursor
+#define XcursorFileLoad XcursorFileLoad_dylibloader_orig_xcursor
+#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_orig_xcursor
+#define XcursorFileSave XcursorFileSave_dylibloader_orig_xcursor
+#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_orig_xcursor
+#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_orig_xcursor
+#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_orig_xcursor
+#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_orig_xcursor
+#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_orig_xcursor
+#define XcursorFilenameSave XcursorFilenameSave_dylibloader_orig_xcursor
+#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_orig_xcursor
+#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_orig_xcursor
+#define XcursorLibraryPath XcursorLibraryPath_dylibloader_orig_xcursor
+#define XcursorLibraryShape XcursorLibraryShape_dylibloader_orig_xcursor
+#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_orig_xcursor
+#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_orig_xcursor
+#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_orig_xcursor
+#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_orig_xcursor
+#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_orig_xcursor
+#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_orig_xcursor
+#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_orig_xcursor
+#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_orig_xcursor
+#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_orig_xcursor
+#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_orig_xcursor
+#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_orig_xcursor
+#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_orig_xcursor
+#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_orig_xcursor
+#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_orig_xcursor
+#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_orig_xcursor
+#define XcursorImageHash XcursorImageHash_dylibloader_orig_xcursor
+#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_orig_xcursor
+#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_orig_xcursor
+#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_orig_xcursor
+#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_orig_xcursor
+#define XcursorSetTheme XcursorSetTheme_dylibloader_orig_xcursor
+#define XcursorGetTheme XcursorGetTheme_dylibloader_orig_xcursor
+#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_orig_xcursor
+#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_orig_xcursor
+#include <X11/Xcursor/Xcursor.h>
+#undef XcursorImageCreate
+#undef XcursorImageDestroy
+#undef XcursorImagesCreate
+#undef XcursorImagesDestroy
+#undef XcursorImagesSetName
+#undef XcursorCursorsCreate
+#undef XcursorCursorsDestroy
+#undef XcursorAnimateCreate
+#undef XcursorAnimateDestroy
+#undef XcursorAnimateNext
+#undef XcursorCommentCreate
+#undef XcursorCommentDestroy
+#undef XcursorCommentsCreate
+#undef XcursorCommentsDestroy
+#undef XcursorXcFileLoadImage
+#undef XcursorXcFileLoadImages
+#undef XcursorXcFileLoadAllImages
+#undef XcursorXcFileLoad
+#undef XcursorXcFileSave
+#undef XcursorFileLoadImage
+#undef XcursorFileLoadImages
+#undef XcursorFileLoadAllImages
+#undef XcursorFileLoad
+#undef XcursorFileSaveImages
+#undef XcursorFileSave
+#undef XcursorFilenameLoadImage
+#undef XcursorFilenameLoadImages
+#undef XcursorFilenameLoadAllImages
+#undef XcursorFilenameLoad
+#undef XcursorFilenameSaveImages
+#undef XcursorFilenameSave
+#undef XcursorLibraryLoadImage
+#undef XcursorLibraryLoadImages
+#undef XcursorLibraryPath
+#undef XcursorLibraryShape
+#undef XcursorImageLoadCursor
+#undef XcursorImagesLoadCursors
+#undef XcursorImagesLoadCursor
+#undef XcursorFilenameLoadCursor
+#undef XcursorFilenameLoadCursors
+#undef XcursorLibraryLoadCursor
+#undef XcursorLibraryLoadCursors
+#undef XcursorShapeLoadImage
+#undef XcursorShapeLoadImages
+#undef XcursorShapeLoadCursor
+#undef XcursorShapeLoadCursors
+#undef XcursorTryShapeCursor
+#undef XcursorNoticeCreateBitmap
+#undef XcursorNoticePutBitmap
+#undef XcursorTryShapeBitmapCursor
+#undef XcursorImageHash
+#undef XcursorSupportsARGB
+#undef XcursorSupportsAnim
+#undef XcursorSetDefaultSize
+#undef XcursorGetDefaultSize
+#undef XcursorSetTheme
+#undef XcursorGetTheme
+#undef XcursorGetThemeCore
+#undef XcursorSetThemeCore
+#include <dlfcn.h>
+#include <stdio.h>
+XcursorImage* (*XcursorImageCreate_dylibloader_wrapper_xcursor)( int, int);
+void (*XcursorImageDestroy_dylibloader_wrapper_xcursor)( XcursorImage*);
+XcursorImages* (*XcursorImagesCreate_dylibloader_wrapper_xcursor)( int);
+void (*XcursorImagesDestroy_dylibloader_wrapper_xcursor)( XcursorImages*);
+void (*XcursorImagesSetName_dylibloader_wrapper_xcursor)( XcursorImages*,const char*);
+XcursorCursors* (*XcursorCursorsCreate_dylibloader_wrapper_xcursor)( Display*, int);
+void (*XcursorCursorsDestroy_dylibloader_wrapper_xcursor)( XcursorCursors*);
+XcursorAnimate* (*XcursorAnimateCreate_dylibloader_wrapper_xcursor)( XcursorCursors*);
+void (*XcursorAnimateDestroy_dylibloader_wrapper_xcursor)( XcursorAnimate*);
+Cursor (*XcursorAnimateNext_dylibloader_wrapper_xcursor)( XcursorAnimate*);
+XcursorComment* (*XcursorCommentCreate_dylibloader_wrapper_xcursor)( XcursorUInt, int);
+void (*XcursorCommentDestroy_dylibloader_wrapper_xcursor)( XcursorComment*);
+XcursorComments* (*XcursorCommentsCreate_dylibloader_wrapper_xcursor)( int);
+void (*XcursorCommentsDestroy_dylibloader_wrapper_xcursor)( XcursorComments*);
+XcursorImage* (*XcursorXcFileLoadImage_dylibloader_wrapper_xcursor)( XcursorFile*, int);
+XcursorImages* (*XcursorXcFileLoadImages_dylibloader_wrapper_xcursor)( XcursorFile*, int);
+XcursorImages* (*XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor)( XcursorFile*);
+XcursorBool (*XcursorXcFileLoad_dylibloader_wrapper_xcursor)( XcursorFile*, XcursorComments**, XcursorImages**);
+XcursorBool (*XcursorXcFileSave_dylibloader_wrapper_xcursor)( XcursorFile*,const XcursorComments*,const XcursorImages*);
+XcursorImage* (*XcursorFileLoadImage_dylibloader_wrapper_xcursor)( FILE*, int);
+XcursorImages* (*XcursorFileLoadImages_dylibloader_wrapper_xcursor)( FILE*, int);
+XcursorImages* (*XcursorFileLoadAllImages_dylibloader_wrapper_xcursor)( FILE*);
+XcursorBool (*XcursorFileLoad_dylibloader_wrapper_xcursor)( FILE*, XcursorComments**, XcursorImages**);
+XcursorBool (*XcursorFileSaveImages_dylibloader_wrapper_xcursor)( FILE*,const XcursorImages*);
+XcursorBool (*XcursorFileSave_dylibloader_wrapper_xcursor)( FILE*,const XcursorComments*,const XcursorImages*);
+XcursorImage* (*XcursorFilenameLoadImage_dylibloader_wrapper_xcursor)(const char*, int);
+XcursorImages* (*XcursorFilenameLoadImages_dylibloader_wrapper_xcursor)(const char*, int);
+XcursorImages* (*XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor)(const char*);
+XcursorBool (*XcursorFilenameLoad_dylibloader_wrapper_xcursor)(const char*, XcursorComments**, XcursorImages**);
+XcursorBool (*XcursorFilenameSaveImages_dylibloader_wrapper_xcursor)(const char*,const XcursorImages*);
+XcursorBool (*XcursorFilenameSave_dylibloader_wrapper_xcursor)(const char*,const XcursorComments*,const XcursorImages*);
+XcursorImage* (*XcursorLibraryLoadImage_dylibloader_wrapper_xcursor)(const char*,const char*, int);
+XcursorImages* (*XcursorLibraryLoadImages_dylibloader_wrapper_xcursor)(const char*,const char*, int);
+const char* (*XcursorLibraryPath_dylibloader_wrapper_xcursor)( void);
+int (*XcursorLibraryShape_dylibloader_wrapper_xcursor)(const char*);
+Cursor (*XcursorImageLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImage*);
+XcursorCursors* (*XcursorImagesLoadCursors_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
+Cursor (*XcursorImagesLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
+Cursor (*XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
+XcursorCursors* (*XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
+Cursor (*XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
+XcursorCursors* (*XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
+XcursorImage* (*XcursorShapeLoadImage_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
+XcursorImages* (*XcursorShapeLoadImages_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
+Cursor (*XcursorShapeLoadCursor_dylibloader_wrapper_xcursor)( Display*, unsigned int);
+XcursorCursors* (*XcursorShapeLoadCursors_dylibloader_wrapper_xcursor)( Display*, unsigned int);
+Cursor (*XcursorTryShapeCursor_dylibloader_wrapper_xcursor)( Display*, Font, Font, unsigned int, unsigned int,const XColor*,const XColor*);
+void (*XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor)( Display*, Pixmap, unsigned int, unsigned int);
+void (*XcursorNoticePutBitmap_dylibloader_wrapper_xcursor)( Display*, Drawable, XImage*);
+Cursor (*XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor)( Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
+void (*XcursorImageHash_dylibloader_wrapper_xcursor)( XImage*, unsigned char [16]);
+XcursorBool (*XcursorSupportsARGB_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorSupportsAnim_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorSetDefaultSize_dylibloader_wrapper_xcursor)( Display*, int);
+int (*XcursorGetDefaultSize_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorSetTheme_dylibloader_wrapper_xcursor)( Display*,const char*);
+char* (*XcursorGetTheme_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorGetThemeCore_dylibloader_wrapper_xcursor)( Display*);
+XcursorBool (*XcursorSetThemeCore_dylibloader_wrapper_xcursor)( Display*, XcursorBool);
+int initialize_xcursor(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXcursor.so.1", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XcursorImageCreate
+ *(void **) (&XcursorImageCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImageDestroy
+ *(void **) (&XcursorImageDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesCreate
+ *(void **) (&XcursorImagesCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesDestroy
+ *(void **) (&XcursorImagesDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesSetName
+ *(void **) (&XcursorImagesSetName_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesSetName");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCursorsCreate
+ *(void **) (&XcursorCursorsCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCursorsCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCursorsDestroy
+ *(void **) (&XcursorCursorsDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCursorsDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorAnimateCreate
+ *(void **) (&XcursorAnimateCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorAnimateDestroy
+ *(void **) (&XcursorAnimateDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorAnimateNext
+ *(void **) (&XcursorAnimateNext_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorAnimateNext");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCommentCreate
+ *(void **) (&XcursorCommentCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCommentDestroy
+ *(void **) (&XcursorCommentDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCommentsCreate
+ *(void **) (&XcursorCommentsCreate_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentsCreate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorCommentsDestroy
+ *(void **) (&XcursorCommentsDestroy_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorCommentsDestroy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileLoadImage
+ *(void **) (&XcursorXcFileLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileLoadImages
+ *(void **) (&XcursorXcFileLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileLoadAllImages
+ *(void **) (&XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoadAllImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileLoad
+ *(void **) (&XcursorXcFileLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileLoad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorXcFileSave
+ *(void **) (&XcursorXcFileSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorXcFileSave");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileLoadImage
+ *(void **) (&XcursorFileLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileLoadImages
+ *(void **) (&XcursorFileLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileLoadAllImages
+ *(void **) (&XcursorFileLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoadAllImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileLoad
+ *(void **) (&XcursorFileLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileLoad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileSaveImages
+ *(void **) (&XcursorFileSaveImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileSaveImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFileSave
+ *(void **) (&XcursorFileSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFileSave");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadImage
+ *(void **) (&XcursorFilenameLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadImages
+ *(void **) (&XcursorFilenameLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadAllImages
+ *(void **) (&XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadAllImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoad
+ *(void **) (&XcursorFilenameLoad_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoad");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameSaveImages
+ *(void **) (&XcursorFilenameSaveImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameSaveImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameSave
+ *(void **) (&XcursorFilenameSave_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameSave");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryLoadImage
+ *(void **) (&XcursorLibraryLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryLoadImages
+ *(void **) (&XcursorLibraryLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryPath
+ *(void **) (&XcursorLibraryPath_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryPath");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryShape
+ *(void **) (&XcursorLibraryShape_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryShape");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImageLoadCursor
+ *(void **) (&XcursorImageLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesLoadCursors
+ *(void **) (&XcursorImagesLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesLoadCursors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImagesLoadCursor
+ *(void **) (&XcursorImagesLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImagesLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadCursor
+ *(void **) (&XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorFilenameLoadCursors
+ *(void **) (&XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorFilenameLoadCursors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryLoadCursor
+ *(void **) (&XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorLibraryLoadCursors
+ *(void **) (&XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorLibraryLoadCursors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorShapeLoadImage
+ *(void **) (&XcursorShapeLoadImage_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadImage");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorShapeLoadImages
+ *(void **) (&XcursorShapeLoadImages_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadImages");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorShapeLoadCursor
+ *(void **) (&XcursorShapeLoadCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorShapeLoadCursors
+ *(void **) (&XcursorShapeLoadCursors_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorShapeLoadCursors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorTryShapeCursor
+ *(void **) (&XcursorTryShapeCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorTryShapeCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorNoticeCreateBitmap
+ *(void **) (&XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorNoticeCreateBitmap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorNoticePutBitmap
+ *(void **) (&XcursorNoticePutBitmap_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorNoticePutBitmap");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorTryShapeBitmapCursor
+ *(void **) (&XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorTryShapeBitmapCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorImageHash
+ *(void **) (&XcursorImageHash_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorImageHash");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSupportsARGB
+ *(void **) (&XcursorSupportsARGB_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSupportsARGB");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSupportsAnim
+ *(void **) (&XcursorSupportsAnim_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSupportsAnim");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSetDefaultSize
+ *(void **) (&XcursorSetDefaultSize_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetDefaultSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorGetDefaultSize
+ *(void **) (&XcursorGetDefaultSize_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetDefaultSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSetTheme
+ *(void **) (&XcursorSetTheme_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetTheme");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorGetTheme
+ *(void **) (&XcursorGetTheme_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetTheme");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorGetThemeCore
+ *(void **) (&XcursorGetThemeCore_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorGetThemeCore");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XcursorSetThemeCore
+ *(void **) (&XcursorSetThemeCore_dylibloader_wrapper_xcursor) = dlsym(handle, "XcursorSetThemeCore");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
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..43bbcf62c5
--- /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-existant symbols inherited from
+// libX11, but absent in libXcursor.so.1, were removed.
+#include <stdint.h>
+
+#define XcursorImageCreate XcursorImageCreate_dylibloader_orig_xcursor
+#define XcursorImageDestroy XcursorImageDestroy_dylibloader_orig_xcursor
+#define XcursorImagesCreate XcursorImagesCreate_dylibloader_orig_xcursor
+#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_orig_xcursor
+#define XcursorImagesSetName XcursorImagesSetName_dylibloader_orig_xcursor
+#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_orig_xcursor
+#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_orig_xcursor
+#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_orig_xcursor
+#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_orig_xcursor
+#define XcursorAnimateNext XcursorAnimateNext_dylibloader_orig_xcursor
+#define XcursorCommentCreate XcursorCommentCreate_dylibloader_orig_xcursor
+#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_orig_xcursor
+#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_orig_xcursor
+#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_orig_xcursor
+#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_orig_xcursor
+#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_orig_xcursor
+#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_orig_xcursor
+#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_orig_xcursor
+#define XcursorXcFileSave XcursorXcFileSave_dylibloader_orig_xcursor
+#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_orig_xcursor
+#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_orig_xcursor
+#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_orig_xcursor
+#define XcursorFileLoad XcursorFileLoad_dylibloader_orig_xcursor
+#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_orig_xcursor
+#define XcursorFileSave XcursorFileSave_dylibloader_orig_xcursor
+#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_orig_xcursor
+#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_orig_xcursor
+#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_orig_xcursor
+#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_orig_xcursor
+#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_orig_xcursor
+#define XcursorFilenameSave XcursorFilenameSave_dylibloader_orig_xcursor
+#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_orig_xcursor
+#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_orig_xcursor
+#define XcursorLibraryPath XcursorLibraryPath_dylibloader_orig_xcursor
+#define XcursorLibraryShape XcursorLibraryShape_dylibloader_orig_xcursor
+#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_orig_xcursor
+#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_orig_xcursor
+#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_orig_xcursor
+#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_orig_xcursor
+#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_orig_xcursor
+#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_orig_xcursor
+#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_orig_xcursor
+#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_orig_xcursor
+#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_orig_xcursor
+#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_orig_xcursor
+#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_orig_xcursor
+#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_orig_xcursor
+#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_orig_xcursor
+#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_orig_xcursor
+#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_orig_xcursor
+#define XcursorImageHash XcursorImageHash_dylibloader_orig_xcursor
+#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_orig_xcursor
+#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_orig_xcursor
+#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_orig_xcursor
+#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_orig_xcursor
+#define XcursorSetTheme XcursorSetTheme_dylibloader_orig_xcursor
+#define XcursorGetTheme XcursorGetTheme_dylibloader_orig_xcursor
+#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_orig_xcursor
+#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_orig_xcursor
+#include <X11/Xcursor/Xcursor.h>
+#undef XcursorImageCreate
+#undef XcursorImageDestroy
+#undef XcursorImagesCreate
+#undef XcursorImagesDestroy
+#undef XcursorImagesSetName
+#undef XcursorCursorsCreate
+#undef XcursorCursorsDestroy
+#undef XcursorAnimateCreate
+#undef XcursorAnimateDestroy
+#undef XcursorAnimateNext
+#undef XcursorCommentCreate
+#undef XcursorCommentDestroy
+#undef XcursorCommentsCreate
+#undef XcursorCommentsDestroy
+#undef XcursorXcFileLoadImage
+#undef XcursorXcFileLoadImages
+#undef XcursorXcFileLoadAllImages
+#undef XcursorXcFileLoad
+#undef XcursorXcFileSave
+#undef XcursorFileLoadImage
+#undef XcursorFileLoadImages
+#undef XcursorFileLoadAllImages
+#undef XcursorFileLoad
+#undef XcursorFileSaveImages
+#undef XcursorFileSave
+#undef XcursorFilenameLoadImage
+#undef XcursorFilenameLoadImages
+#undef XcursorFilenameLoadAllImages
+#undef XcursorFilenameLoad
+#undef XcursorFilenameSaveImages
+#undef XcursorFilenameSave
+#undef XcursorLibraryLoadImage
+#undef XcursorLibraryLoadImages
+#undef XcursorLibraryPath
+#undef XcursorLibraryShape
+#undef XcursorImageLoadCursor
+#undef XcursorImagesLoadCursors
+#undef XcursorImagesLoadCursor
+#undef XcursorFilenameLoadCursor
+#undef XcursorFilenameLoadCursors
+#undef XcursorLibraryLoadCursor
+#undef XcursorLibraryLoadCursors
+#undef XcursorShapeLoadImage
+#undef XcursorShapeLoadImages
+#undef XcursorShapeLoadCursor
+#undef XcursorShapeLoadCursors
+#undef XcursorTryShapeCursor
+#undef XcursorNoticeCreateBitmap
+#undef XcursorNoticePutBitmap
+#undef XcursorTryShapeBitmapCursor
+#undef XcursorImageHash
+#undef XcursorSupportsARGB
+#undef XcursorSupportsAnim
+#undef XcursorSetDefaultSize
+#undef XcursorGetDefaultSize
+#undef XcursorSetTheme
+#undef XcursorGetTheme
+#undef XcursorGetThemeCore
+#undef XcursorSetThemeCore
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XcursorImageCreate XcursorImageCreate_dylibloader_wrapper_xcursor
+#define XcursorImageDestroy XcursorImageDestroy_dylibloader_wrapper_xcursor
+#define XcursorImagesCreate XcursorImagesCreate_dylibloader_wrapper_xcursor
+#define XcursorImagesDestroy XcursorImagesDestroy_dylibloader_wrapper_xcursor
+#define XcursorImagesSetName XcursorImagesSetName_dylibloader_wrapper_xcursor
+#define XcursorCursorsCreate XcursorCursorsCreate_dylibloader_wrapper_xcursor
+#define XcursorCursorsDestroy XcursorCursorsDestroy_dylibloader_wrapper_xcursor
+#define XcursorAnimateCreate XcursorAnimateCreate_dylibloader_wrapper_xcursor
+#define XcursorAnimateDestroy XcursorAnimateDestroy_dylibloader_wrapper_xcursor
+#define XcursorAnimateNext XcursorAnimateNext_dylibloader_wrapper_xcursor
+#define XcursorCommentCreate XcursorCommentCreate_dylibloader_wrapper_xcursor
+#define XcursorCommentDestroy XcursorCommentDestroy_dylibloader_wrapper_xcursor
+#define XcursorCommentsCreate XcursorCommentsCreate_dylibloader_wrapper_xcursor
+#define XcursorCommentsDestroy XcursorCommentsDestroy_dylibloader_wrapper_xcursor
+#define XcursorXcFileLoadImage XcursorXcFileLoadImage_dylibloader_wrapper_xcursor
+#define XcursorXcFileLoadImages XcursorXcFileLoadImages_dylibloader_wrapper_xcursor
+#define XcursorXcFileLoadAllImages XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor
+#define XcursorXcFileLoad XcursorXcFileLoad_dylibloader_wrapper_xcursor
+#define XcursorXcFileSave XcursorXcFileSave_dylibloader_wrapper_xcursor
+#define XcursorFileLoadImage XcursorFileLoadImage_dylibloader_wrapper_xcursor
+#define XcursorFileLoadImages XcursorFileLoadImages_dylibloader_wrapper_xcursor
+#define XcursorFileLoadAllImages XcursorFileLoadAllImages_dylibloader_wrapper_xcursor
+#define XcursorFileLoad XcursorFileLoad_dylibloader_wrapper_xcursor
+#define XcursorFileSaveImages XcursorFileSaveImages_dylibloader_wrapper_xcursor
+#define XcursorFileSave XcursorFileSave_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadImage XcursorFilenameLoadImage_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadImages XcursorFilenameLoadImages_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadAllImages XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoad XcursorFilenameLoad_dylibloader_wrapper_xcursor
+#define XcursorFilenameSaveImages XcursorFilenameSaveImages_dylibloader_wrapper_xcursor
+#define XcursorFilenameSave XcursorFilenameSave_dylibloader_wrapper_xcursor
+#define XcursorLibraryLoadImage XcursorLibraryLoadImage_dylibloader_wrapper_xcursor
+#define XcursorLibraryLoadImages XcursorLibraryLoadImages_dylibloader_wrapper_xcursor
+#define XcursorLibraryPath XcursorLibraryPath_dylibloader_wrapper_xcursor
+#define XcursorLibraryShape XcursorLibraryShape_dylibloader_wrapper_xcursor
+#define XcursorImageLoadCursor XcursorImageLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorImagesLoadCursors XcursorImagesLoadCursors_dylibloader_wrapper_xcursor
+#define XcursorImagesLoadCursor XcursorImagesLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadCursor XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorFilenameLoadCursors XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor
+#define XcursorLibraryLoadCursor XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorLibraryLoadCursors XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor
+#define XcursorShapeLoadImage XcursorShapeLoadImage_dylibloader_wrapper_xcursor
+#define XcursorShapeLoadImages XcursorShapeLoadImages_dylibloader_wrapper_xcursor
+#define XcursorShapeLoadCursor XcursorShapeLoadCursor_dylibloader_wrapper_xcursor
+#define XcursorShapeLoadCursors XcursorShapeLoadCursors_dylibloader_wrapper_xcursor
+#define XcursorTryShapeCursor XcursorTryShapeCursor_dylibloader_wrapper_xcursor
+#define XcursorNoticeCreateBitmap XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor
+#define XcursorNoticePutBitmap XcursorNoticePutBitmap_dylibloader_wrapper_xcursor
+#define XcursorTryShapeBitmapCursor XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor
+#define XcursorImageHash XcursorImageHash_dylibloader_wrapper_xcursor
+#define XcursorSupportsARGB XcursorSupportsARGB_dylibloader_wrapper_xcursor
+#define XcursorSupportsAnim XcursorSupportsAnim_dylibloader_wrapper_xcursor
+#define XcursorSetDefaultSize XcursorSetDefaultSize_dylibloader_wrapper_xcursor
+#define XcursorGetDefaultSize XcursorGetDefaultSize_dylibloader_wrapper_xcursor
+#define XcursorSetTheme XcursorSetTheme_dylibloader_wrapper_xcursor
+#define XcursorGetTheme XcursorGetTheme_dylibloader_wrapper_xcursor
+#define XcursorGetThemeCore XcursorGetThemeCore_dylibloader_wrapper_xcursor
+#define XcursorSetThemeCore XcursorSetThemeCore_dylibloader_wrapper_xcursor
+extern XcursorImage* (*XcursorImageCreate_dylibloader_wrapper_xcursor)( int, int);
+extern void (*XcursorImageDestroy_dylibloader_wrapper_xcursor)( XcursorImage*);
+extern XcursorImages* (*XcursorImagesCreate_dylibloader_wrapper_xcursor)( int);
+extern void (*XcursorImagesDestroy_dylibloader_wrapper_xcursor)( XcursorImages*);
+extern void (*XcursorImagesSetName_dylibloader_wrapper_xcursor)( XcursorImages*,const char*);
+extern XcursorCursors* (*XcursorCursorsCreate_dylibloader_wrapper_xcursor)( Display*, int);
+extern void (*XcursorCursorsDestroy_dylibloader_wrapper_xcursor)( XcursorCursors*);
+extern XcursorAnimate* (*XcursorAnimateCreate_dylibloader_wrapper_xcursor)( XcursorCursors*);
+extern void (*XcursorAnimateDestroy_dylibloader_wrapper_xcursor)( XcursorAnimate*);
+extern Cursor (*XcursorAnimateNext_dylibloader_wrapper_xcursor)( XcursorAnimate*);
+extern XcursorComment* (*XcursorCommentCreate_dylibloader_wrapper_xcursor)( XcursorUInt, int);
+extern void (*XcursorCommentDestroy_dylibloader_wrapper_xcursor)( XcursorComment*);
+extern XcursorComments* (*XcursorCommentsCreate_dylibloader_wrapper_xcursor)( int);
+extern void (*XcursorCommentsDestroy_dylibloader_wrapper_xcursor)( XcursorComments*);
+extern XcursorImage* (*XcursorXcFileLoadImage_dylibloader_wrapper_xcursor)( XcursorFile*, int);
+extern XcursorImages* (*XcursorXcFileLoadImages_dylibloader_wrapper_xcursor)( XcursorFile*, int);
+extern XcursorImages* (*XcursorXcFileLoadAllImages_dylibloader_wrapper_xcursor)( XcursorFile*);
+extern XcursorBool (*XcursorXcFileLoad_dylibloader_wrapper_xcursor)( XcursorFile*, XcursorComments**, XcursorImages**);
+extern XcursorBool (*XcursorXcFileSave_dylibloader_wrapper_xcursor)( XcursorFile*,const XcursorComments*,const XcursorImages*);
+extern XcursorImage* (*XcursorFileLoadImage_dylibloader_wrapper_xcursor)( FILE*, int);
+extern XcursorImages* (*XcursorFileLoadImages_dylibloader_wrapper_xcursor)( FILE*, int);
+extern XcursorImages* (*XcursorFileLoadAllImages_dylibloader_wrapper_xcursor)( FILE*);
+extern XcursorBool (*XcursorFileLoad_dylibloader_wrapper_xcursor)( FILE*, XcursorComments**, XcursorImages**);
+extern XcursorBool (*XcursorFileSaveImages_dylibloader_wrapper_xcursor)( FILE*,const XcursorImages*);
+extern XcursorBool (*XcursorFileSave_dylibloader_wrapper_xcursor)( FILE*,const XcursorComments*,const XcursorImages*);
+extern XcursorImage* (*XcursorFilenameLoadImage_dylibloader_wrapper_xcursor)(const char*, int);
+extern XcursorImages* (*XcursorFilenameLoadImages_dylibloader_wrapper_xcursor)(const char*, int);
+extern XcursorImages* (*XcursorFilenameLoadAllImages_dylibloader_wrapper_xcursor)(const char*);
+extern XcursorBool (*XcursorFilenameLoad_dylibloader_wrapper_xcursor)(const char*, XcursorComments**, XcursorImages**);
+extern XcursorBool (*XcursorFilenameSaveImages_dylibloader_wrapper_xcursor)(const char*,const XcursorImages*);
+extern XcursorBool (*XcursorFilenameSave_dylibloader_wrapper_xcursor)(const char*,const XcursorComments*,const XcursorImages*);
+extern XcursorImage* (*XcursorLibraryLoadImage_dylibloader_wrapper_xcursor)(const char*,const char*, int);
+extern XcursorImages* (*XcursorLibraryLoadImages_dylibloader_wrapper_xcursor)(const char*,const char*, int);
+extern const char* (*XcursorLibraryPath_dylibloader_wrapper_xcursor)( void);
+extern int (*XcursorLibraryShape_dylibloader_wrapper_xcursor)(const char*);
+extern Cursor (*XcursorImageLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImage*);
+extern XcursorCursors* (*XcursorImagesLoadCursors_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
+extern Cursor (*XcursorImagesLoadCursor_dylibloader_wrapper_xcursor)( Display*,const XcursorImages*);
+extern Cursor (*XcursorFilenameLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern XcursorCursors* (*XcursorFilenameLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern Cursor (*XcursorLibraryLoadCursor_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern XcursorCursors* (*XcursorLibraryLoadCursors_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern XcursorImage* (*XcursorShapeLoadImage_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
+extern XcursorImages* (*XcursorShapeLoadImages_dylibloader_wrapper_xcursor)( unsigned int,const char*, int);
+extern Cursor (*XcursorShapeLoadCursor_dylibloader_wrapper_xcursor)( Display*, unsigned int);
+extern XcursorCursors* (*XcursorShapeLoadCursors_dylibloader_wrapper_xcursor)( Display*, unsigned int);
+extern Cursor (*XcursorTryShapeCursor_dylibloader_wrapper_xcursor)( Display*, Font, Font, unsigned int, unsigned int,const XColor*,const XColor*);
+extern void (*XcursorNoticeCreateBitmap_dylibloader_wrapper_xcursor)( Display*, Pixmap, unsigned int, unsigned int);
+extern void (*XcursorNoticePutBitmap_dylibloader_wrapper_xcursor)( Display*, Drawable, XImage*);
+extern Cursor (*XcursorTryShapeBitmapCursor_dylibloader_wrapper_xcursor)( Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int);
+extern void (*XcursorImageHash_dylibloader_wrapper_xcursor)( XImage*, unsigned char [16]);
+extern XcursorBool (*XcursorSupportsARGB_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorSupportsAnim_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorSetDefaultSize_dylibloader_wrapper_xcursor)( Display*, int);
+extern int (*XcursorGetDefaultSize_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorSetTheme_dylibloader_wrapper_xcursor)( Display*,const char*);
+extern char* (*XcursorGetTheme_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorGetThemeCore_dylibloader_wrapper_xcursor)( Display*);
+extern XcursorBool (*XcursorSetThemeCore_dylibloader_wrapper_xcursor)( Display*, XcursorBool);
+int initialize_xcursor(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
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..711dd3fa5e
--- /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-existant symbols inherited from
+// libX11, but absent in libXext.so.6, were removed and an include needed for
+// proper parsing was added (this had also to be temporarily added to the
+// original header, as dynload-wrapper would complain otherwsise)
+#include <stdint.h>
+
+// HANDPATCH: Needed for a successful compilation.
+#include <X11/Xlib.h>
+
+#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
+#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
+#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
+#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
+#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
+#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
+#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
+#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
+#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
+#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
+#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/shape.h>
+#undef XShapeQueryExtension
+#undef XShapeQueryVersion
+#undef XShapeCombineRegion
+#undef XShapeCombineRectangles
+#undef XShapeCombineMask
+#undef XShapeCombineShape
+#undef XShapeOffsetShape
+#undef XShapeQueryExtents
+#undef XShapeSelectInput
+#undef XShapeInputSelected
+#undef XShapeGetRectangles
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XShapeQueryExtension_dylibloader_wrapper_xext)( Display*, int*, int*);
+int (*XShapeQueryVersion_dylibloader_wrapper_xext)( Display*, int*, int*);
+void (*XShapeCombineRegion_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Region, int);
+void (*XShapeCombineRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int, int, XRectangle*, int, int, int);
+void (*XShapeCombineMask_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Pixmap, int);
+void (*XShapeCombineShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Window, int, int);
+void (*XShapeOffsetShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int);
+int (*XShapeQueryExtents_dylibloader_wrapper_xext)( Display*, Window, int*, int*, int*, unsigned int*, unsigned int*, int*, int*, int*, unsigned int*, unsigned int*);
+void (*XShapeSelectInput_dylibloader_wrapper_xext)( Display*, Window, unsigned long);
+unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)( Display*, Window);
+XRectangle* (*XShapeGetRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int*, int*);
+int initialize_xext(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXext.so.6", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XShapeQueryExtension
+ *(void **) (&XShapeQueryExtension_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeQueryVersion
+ *(void **) (&XShapeQueryVersion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeCombineRegion
+ *(void **) (&XShapeCombineRegion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeCombineRectangles
+ *(void **) (&XShapeCombineRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeCombineMask
+ *(void **) (&XShapeCombineMask_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineMask");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeCombineShape
+ *(void **) (&XShapeCombineShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineShape");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeOffsetShape
+ *(void **) (&XShapeOffsetShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeOffsetShape");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeQueryExtents
+ *(void **) (&XShapeQueryExtents_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeSelectInput
+ *(void **) (&XShapeSelectInput_dylibloader_wrapper_xext) = dlsym(handle, "XShapeSelectInput");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeInputSelected
+ *(void **) (&XShapeInputSelected_dylibloader_wrapper_xext) = dlsym(handle, "XShapeInputSelected");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XShapeGetRectangles
+ *(void **) (&XShapeGetRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeGetRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
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..991d07b405
--- /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-existant symbols inherited from
+// libX11, but absent in libXext.so.6, were removed and an include needed for
+// proper parsing was added (this had also to be temporarily added to the
+// original header, as dynload-wrapper would complain otherwsise)
+#include <stdint.h>
+
+// HANDPATCH: Needed for a successful compilation.
+#include <X11/Xlib.h>
+
+#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
+#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
+#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
+#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
+#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
+#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
+#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
+#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
+#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
+#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
+#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/shape.h>
+#undef XShapeQueryExtension
+#undef XShapeQueryVersion
+#undef XShapeCombineRegion
+#undef XShapeCombineRectangles
+#undef XShapeCombineMask
+#undef XShapeCombineShape
+#undef XShapeOffsetShape
+#undef XShapeQueryExtents
+#undef XShapeSelectInput
+#undef XShapeInputSelected
+#undef XShapeGetRectangles
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XShapeQueryExtension XShapeQueryExtension_dylibloader_wrapper_xext
+#define XShapeQueryVersion XShapeQueryVersion_dylibloader_wrapper_xext
+#define XShapeCombineRegion XShapeCombineRegion_dylibloader_wrapper_xext
+#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_wrapper_xext
+#define XShapeCombineMask XShapeCombineMask_dylibloader_wrapper_xext
+#define XShapeCombineShape XShapeCombineShape_dylibloader_wrapper_xext
+#define XShapeOffsetShape XShapeOffsetShape_dylibloader_wrapper_xext
+#define XShapeQueryExtents XShapeQueryExtents_dylibloader_wrapper_xext
+#define XShapeSelectInput XShapeSelectInput_dylibloader_wrapper_xext
+#define XShapeInputSelected XShapeInputSelected_dylibloader_wrapper_xext
+#define XShapeGetRectangles XShapeGetRectangles_dylibloader_wrapper_xext
+extern int (*XShapeQueryExtension_dylibloader_wrapper_xext)( Display*, int*, int*);
+extern int (*XShapeQueryVersion_dylibloader_wrapper_xext)( Display*, int*, int*);
+extern void (*XShapeCombineRegion_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Region, int);
+extern void (*XShapeCombineRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int, int, XRectangle*, int, int, int);
+extern void (*XShapeCombineMask_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Pixmap, int);
+extern void (*XShapeCombineShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Window, int, int);
+extern void (*XShapeOffsetShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int);
+extern int (*XShapeQueryExtents_dylibloader_wrapper_xext)( Display*, Window, int*, int*, int*, unsigned int*, unsigned int*, int*, int*, int*, unsigned int*, unsigned int*);
+extern void (*XShapeSelectInput_dylibloader_wrapper_xext)( Display*, Window, unsigned long);
+extern unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)( Display*, Window);
+extern XRectangle* (*XShapeGetRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int*, int*);
+int initialize_xext(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
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..42af983345
--- /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-existant symbols inherited from
+// libX11, but absent in libXinerama.so.1, were removed.
+#include <stdint.h>
+
+#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
+#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
+#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
+#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
+#include <X11/extensions/Xinerama.h>
+#undef XineramaQueryExtension
+#undef XineramaQueryVersion
+#undef XineramaIsActive
+#undef XineramaQueryScreens
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)( Display*, int*, int*);
+int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)( Display*, int*, int*);
+int (*XineramaIsActive_dylibloader_wrapper_xinerama)( Display*);
+XineramaScreenInfo* (*XineramaQueryScreens_dylibloader_wrapper_xinerama)( Display*, int*);
+int initialize_xinerama(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXinerama.so.1", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XineramaQueryExtension
+ *(void **) (&XineramaQueryExtension_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XineramaQueryVersion
+ *(void **) (&XineramaQueryVersion_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XineramaIsActive
+ *(void **) (&XineramaIsActive_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaIsActive");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XineramaQueryScreens
+ *(void **) (&XineramaQueryScreens_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryScreens");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
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..891d9f21fd
--- /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-existant symbols inherited from
+// libX11, but absent in libXinerama.so.1, were removed.
+#include <stdint.h>
+
+#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
+#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
+#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
+#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
+#include <X11/extensions/Xinerama.h>
+#undef XineramaQueryExtension
+#undef XineramaQueryVersion
+#undef XineramaIsActive
+#undef XineramaQueryScreens
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XineramaQueryExtension XineramaQueryExtension_dylibloader_wrapper_xinerama
+#define XineramaQueryVersion XineramaQueryVersion_dylibloader_wrapper_xinerama
+#define XineramaIsActive XineramaIsActive_dylibloader_wrapper_xinerama
+#define XineramaQueryScreens XineramaQueryScreens_dylibloader_wrapper_xinerama
+extern int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)( Display*, int*, int*);
+extern int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)( Display*, int*, int*);
+extern int (*XineramaIsActive_dylibloader_wrapper_xinerama)( Display*);
+extern XineramaScreenInfo* (*XineramaQueryScreens_dylibloader_wrapper_xinerama)( Display*, int*);
+int initialize_xinerama(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
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..5e1f0999fc
--- /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-existant symbols inherited from
+// libX11, liXext and libXfixes, but absent in libXi.so.6, were removed.
+#include <stdint.h>
+
+#define XIQueryPointer XIQueryPointer_dylibloader_orig_xinput2
+#define XIWarpPointer XIWarpPointer_dylibloader_orig_xinput2
+#define XIDefineCursor XIDefineCursor_dylibloader_orig_xinput2
+#define XIUndefineCursor XIUndefineCursor_dylibloader_orig_xinput2
+#define XIChangeHierarchy XIChangeHierarchy_dylibloader_orig_xinput2
+#define XISetClientPointer XISetClientPointer_dylibloader_orig_xinput2
+#define XIGetClientPointer XIGetClientPointer_dylibloader_orig_xinput2
+#define XISelectEvents XISelectEvents_dylibloader_orig_xinput2
+#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_orig_xinput2
+#define XIQueryVersion XIQueryVersion_dylibloader_orig_xinput2
+#define XIQueryDevice XIQueryDevice_dylibloader_orig_xinput2
+#define XISetFocus XISetFocus_dylibloader_orig_xinput2
+#define XIGetFocus XIGetFocus_dylibloader_orig_xinput2
+#define XIGrabDevice XIGrabDevice_dylibloader_orig_xinput2
+#define XIUngrabDevice XIUngrabDevice_dylibloader_orig_xinput2
+#define XIAllowEvents XIAllowEvents_dylibloader_orig_xinput2
+#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_orig_xinput2
+#define XIGrabButton XIGrabButton_dylibloader_orig_xinput2
+#define XIGrabKeycode XIGrabKeycode_dylibloader_orig_xinput2
+#define XIGrabEnter XIGrabEnter_dylibloader_orig_xinput2
+#define XIGrabFocusIn XIGrabFocusIn_dylibloader_orig_xinput2
+#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_orig_xinput2
+#define XIUngrabButton XIUngrabButton_dylibloader_orig_xinput2
+#define XIUngrabKeycode XIUngrabKeycode_dylibloader_orig_xinput2
+#define XIUngrabEnter XIUngrabEnter_dylibloader_orig_xinput2
+#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_orig_xinput2
+#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_orig_xinput2
+#define XIListProperties XIListProperties_dylibloader_orig_xinput2
+#define XIChangeProperty XIChangeProperty_dylibloader_orig_xinput2
+#define XIDeleteProperty XIDeleteProperty_dylibloader_orig_xinput2
+#define XIGetProperty XIGetProperty_dylibloader_orig_xinput2
+#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_orig_xinput2
+#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_orig_xinput2
+#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_orig_xinput2
+#include <X11/extensions/XInput2.h>
+#undef XIQueryPointer
+#undef XIWarpPointer
+#undef XIDefineCursor
+#undef XIUndefineCursor
+#undef XIChangeHierarchy
+#undef XISetClientPointer
+#undef XIGetClientPointer
+#undef XISelectEvents
+#undef XIGetSelectedEvents
+#undef XIQueryVersion
+#undef XIQueryDevice
+#undef XISetFocus
+#undef XIGetFocus
+#undef XIGrabDevice
+#undef XIUngrabDevice
+#undef XIAllowEvents
+#undef XIAllowTouchEvents
+#undef XIGrabButton
+#undef XIGrabKeycode
+#undef XIGrabEnter
+#undef XIGrabFocusIn
+#undef XIGrabTouchBegin
+#undef XIUngrabButton
+#undef XIUngrabKeycode
+#undef XIUngrabEnter
+#undef XIUngrabFocusIn
+#undef XIUngrabTouchBegin
+#undef XIListProperties
+#undef XIChangeProperty
+#undef XIDeleteProperty
+#undef XIGetProperty
+#undef XIBarrierReleasePointers
+#undef XIBarrierReleasePointer
+#undef XIFreeDeviceInfo
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XIQueryPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window*, Window*, double*, double*, double*, double*, XIButtonState*, XIModifierState*, XIGroupState*);
+int (*XIWarpPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window, double, double, unsigned int, unsigned int, double, double);
+int (*XIDefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor);
+int (*XIUndefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window);
+int (*XIChangeHierarchy_dylibloader_wrapper_xinput2)( Display*, XIAnyHierarchyChangeInfo*, int);
+int (*XISetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int);
+int (*XIGetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int*);
+int (*XISelectEvents_dylibloader_wrapper_xinput2)( Display*, Window, XIEventMask*, int);
+XIEventMask* (*XIGetSelectedEvents_dylibloader_wrapper_xinput2)( Display*, Window, int*);
+int (*XIQueryVersion_dylibloader_wrapper_xinput2)( Display*, int*, int*);
+XIDeviceInfo* (*XIQueryDevice_dylibloader_wrapper_xinput2)( Display*, int, int*);
+int (*XISetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window, Time);
+int (*XIGetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window*);
+int (*XIGrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Window, Time, Cursor, int, int, int, XIEventMask*);
+int (*XIUngrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Time);
+int (*XIAllowEvents_dylibloader_wrapper_xinput2)( Display*, int, int, Time);
+int (*XIAllowTouchEvents_dylibloader_wrapper_xinput2)( Display*, int, unsigned int, Window, int);
+int (*XIGrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIGrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIGrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIGrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIGrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIEventMask*, int, XIGrabModifiers*);
+int (*XIUngrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
+int (*XIUngrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
+int (*XIUngrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+int (*XIUngrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+int (*XIUngrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+Atom* (*XIListProperties_dylibloader_wrapper_xinput2)( Display*, int, int*);
+void (*XIChangeProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, Atom, int, int, unsigned char*, int);
+void (*XIDeleteProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom);
+int (*XIGetProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+void (*XIBarrierReleasePointers_dylibloader_wrapper_xinput2)( Display*, XIBarrierReleasePointerInfo*, int);
+void (*XIBarrierReleasePointer_dylibloader_wrapper_xinput2)( Display*, int, PointerBarrier, BarrierEventID);
+void (*XIFreeDeviceInfo_dylibloader_wrapper_xinput2)( XIDeviceInfo*);
+int initialize_xinput2(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXi.so.6", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XIQueryPointer
+ *(void **) (&XIQueryPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIWarpPointer
+ *(void **) (&XIWarpPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIWarpPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIDefineCursor
+ *(void **) (&XIDefineCursor_dylibloader_wrapper_xinput2) = dlsym(handle, "XIDefineCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUndefineCursor
+ *(void **) (&XIUndefineCursor_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUndefineCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIChangeHierarchy
+ *(void **) (&XIChangeHierarchy_dylibloader_wrapper_xinput2) = dlsym(handle, "XIChangeHierarchy");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XISetClientPointer
+ *(void **) (&XISetClientPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XISetClientPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGetClientPointer
+ *(void **) (&XIGetClientPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetClientPointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XISelectEvents
+ *(void **) (&XISelectEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XISelectEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGetSelectedEvents
+ *(void **) (&XIGetSelectedEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetSelectedEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIQueryVersion
+ *(void **) (&XIQueryVersion_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIQueryDevice
+ *(void **) (&XIQueryDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryDevice");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XISetFocus
+ *(void **) (&XISetFocus_dylibloader_wrapper_xinput2) = dlsym(handle, "XISetFocus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGetFocus
+ *(void **) (&XIGetFocus_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetFocus");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabDevice
+ *(void **) (&XIGrabDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabDevice");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabDevice
+ *(void **) (&XIUngrabDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabDevice");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIAllowEvents
+ *(void **) (&XIAllowEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIAllowEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIAllowTouchEvents
+ *(void **) (&XIAllowTouchEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIAllowTouchEvents");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabButton
+ *(void **) (&XIGrabButton_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabButton");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabKeycode
+ *(void **) (&XIGrabKeycode_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabKeycode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabEnter
+ *(void **) (&XIGrabEnter_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabEnter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabFocusIn
+ *(void **) (&XIGrabFocusIn_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabFocusIn");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGrabTouchBegin
+ *(void **) (&XIGrabTouchBegin_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabTouchBegin");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabButton
+ *(void **) (&XIUngrabButton_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabButton");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabKeycode
+ *(void **) (&XIUngrabKeycode_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabKeycode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabEnter
+ *(void **) (&XIUngrabEnter_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabEnter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabFocusIn
+ *(void **) (&XIUngrabFocusIn_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabFocusIn");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIUngrabTouchBegin
+ *(void **) (&XIUngrabTouchBegin_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabTouchBegin");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIListProperties
+ *(void **) (&XIListProperties_dylibloader_wrapper_xinput2) = dlsym(handle, "XIListProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIChangeProperty
+ *(void **) (&XIChangeProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIChangeProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIDeleteProperty
+ *(void **) (&XIDeleteProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIDeleteProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIGetProperty
+ *(void **) (&XIGetProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIBarrierReleasePointers
+ *(void **) (&XIBarrierReleasePointers_dylibloader_wrapper_xinput2) = dlsym(handle, "XIBarrierReleasePointers");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIBarrierReleasePointer
+ *(void **) (&XIBarrierReleasePointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIBarrierReleasePointer");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XIFreeDeviceInfo
+ *(void **) (&XIFreeDeviceInfo_dylibloader_wrapper_xinput2) = dlsym(handle, "XIFreeDeviceInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
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..95740cee58
--- /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-existant symbols inherited from
+// libX11, liXext and libXfixes, but absent in libXi.so.6, were removed.
+#include <stdint.h>
+
+#define XIQueryPointer XIQueryPointer_dylibloader_orig_xinput2
+#define XIWarpPointer XIWarpPointer_dylibloader_orig_xinput2
+#define XIDefineCursor XIDefineCursor_dylibloader_orig_xinput2
+#define XIUndefineCursor XIUndefineCursor_dylibloader_orig_xinput2
+#define XIChangeHierarchy XIChangeHierarchy_dylibloader_orig_xinput2
+#define XISetClientPointer XISetClientPointer_dylibloader_orig_xinput2
+#define XIGetClientPointer XIGetClientPointer_dylibloader_orig_xinput2
+#define XISelectEvents XISelectEvents_dylibloader_orig_xinput2
+#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_orig_xinput2
+#define XIQueryVersion XIQueryVersion_dylibloader_orig_xinput2
+#define XIQueryDevice XIQueryDevice_dylibloader_orig_xinput2
+#define XISetFocus XISetFocus_dylibloader_orig_xinput2
+#define XIGetFocus XIGetFocus_dylibloader_orig_xinput2
+#define XIGrabDevice XIGrabDevice_dylibloader_orig_xinput2
+#define XIUngrabDevice XIUngrabDevice_dylibloader_orig_xinput2
+#define XIAllowEvents XIAllowEvents_dylibloader_orig_xinput2
+#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_orig_xinput2
+#define XIGrabButton XIGrabButton_dylibloader_orig_xinput2
+#define XIGrabKeycode XIGrabKeycode_dylibloader_orig_xinput2
+#define XIGrabEnter XIGrabEnter_dylibloader_orig_xinput2
+#define XIGrabFocusIn XIGrabFocusIn_dylibloader_orig_xinput2
+#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_orig_xinput2
+#define XIUngrabButton XIUngrabButton_dylibloader_orig_xinput2
+#define XIUngrabKeycode XIUngrabKeycode_dylibloader_orig_xinput2
+#define XIUngrabEnter XIUngrabEnter_dylibloader_orig_xinput2
+#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_orig_xinput2
+#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_orig_xinput2
+#define XIListProperties XIListProperties_dylibloader_orig_xinput2
+#define XIChangeProperty XIChangeProperty_dylibloader_orig_xinput2
+#define XIDeleteProperty XIDeleteProperty_dylibloader_orig_xinput2
+#define XIGetProperty XIGetProperty_dylibloader_orig_xinput2
+#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_orig_xinput2
+#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_orig_xinput2
+#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_orig_xinput2
+#include <X11/extensions/XInput2.h>
+#undef XIQueryPointer
+#undef XIWarpPointer
+#undef XIDefineCursor
+#undef XIUndefineCursor
+#undef XIChangeHierarchy
+#undef XISetClientPointer
+#undef XIGetClientPointer
+#undef XISelectEvents
+#undef XIGetSelectedEvents
+#undef XIQueryVersion
+#undef XIQueryDevice
+#undef XISetFocus
+#undef XIGetFocus
+#undef XIGrabDevice
+#undef XIUngrabDevice
+#undef XIAllowEvents
+#undef XIAllowTouchEvents
+#undef XIGrabButton
+#undef XIGrabKeycode
+#undef XIGrabEnter
+#undef XIGrabFocusIn
+#undef XIGrabTouchBegin
+#undef XIUngrabButton
+#undef XIUngrabKeycode
+#undef XIUngrabEnter
+#undef XIUngrabFocusIn
+#undef XIUngrabTouchBegin
+#undef XIListProperties
+#undef XIChangeProperty
+#undef XIDeleteProperty
+#undef XIGetProperty
+#undef XIBarrierReleasePointers
+#undef XIBarrierReleasePointer
+#undef XIFreeDeviceInfo
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XIQueryPointer XIQueryPointer_dylibloader_wrapper_xinput2
+#define XIWarpPointer XIWarpPointer_dylibloader_wrapper_xinput2
+#define XIDefineCursor XIDefineCursor_dylibloader_wrapper_xinput2
+#define XIUndefineCursor XIUndefineCursor_dylibloader_wrapper_xinput2
+#define XIChangeHierarchy XIChangeHierarchy_dylibloader_wrapper_xinput2
+#define XISetClientPointer XISetClientPointer_dylibloader_wrapper_xinput2
+#define XIGetClientPointer XIGetClientPointer_dylibloader_wrapper_xinput2
+#define XISelectEvents XISelectEvents_dylibloader_wrapper_xinput2
+#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_wrapper_xinput2
+#define XIQueryVersion XIQueryVersion_dylibloader_wrapper_xinput2
+#define XIQueryDevice XIQueryDevice_dylibloader_wrapper_xinput2
+#define XISetFocus XISetFocus_dylibloader_wrapper_xinput2
+#define XIGetFocus XIGetFocus_dylibloader_wrapper_xinput2
+#define XIGrabDevice XIGrabDevice_dylibloader_wrapper_xinput2
+#define XIUngrabDevice XIUngrabDevice_dylibloader_wrapper_xinput2
+#define XIAllowEvents XIAllowEvents_dylibloader_wrapper_xinput2
+#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_wrapper_xinput2
+#define XIGrabButton XIGrabButton_dylibloader_wrapper_xinput2
+#define XIGrabKeycode XIGrabKeycode_dylibloader_wrapper_xinput2
+#define XIGrabEnter XIGrabEnter_dylibloader_wrapper_xinput2
+#define XIGrabFocusIn XIGrabFocusIn_dylibloader_wrapper_xinput2
+#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_wrapper_xinput2
+#define XIUngrabButton XIUngrabButton_dylibloader_wrapper_xinput2
+#define XIUngrabKeycode XIUngrabKeycode_dylibloader_wrapper_xinput2
+#define XIUngrabEnter XIUngrabEnter_dylibloader_wrapper_xinput2
+#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_wrapper_xinput2
+#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_wrapper_xinput2
+#define XIListProperties XIListProperties_dylibloader_wrapper_xinput2
+#define XIChangeProperty XIChangeProperty_dylibloader_wrapper_xinput2
+#define XIDeleteProperty XIDeleteProperty_dylibloader_wrapper_xinput2
+#define XIGetProperty XIGetProperty_dylibloader_wrapper_xinput2
+#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_wrapper_xinput2
+#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_wrapper_xinput2
+#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_wrapper_xinput2
+extern int (*XIQueryPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window*, Window*, double*, double*, double*, double*, XIButtonState*, XIModifierState*, XIGroupState*);
+extern int (*XIWarpPointer_dylibloader_wrapper_xinput2)( Display*, int, Window, Window, double, double, unsigned int, unsigned int, double, double);
+extern int (*XIDefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor);
+extern int (*XIUndefineCursor_dylibloader_wrapper_xinput2)( Display*, int, Window);
+extern int (*XIChangeHierarchy_dylibloader_wrapper_xinput2)( Display*, XIAnyHierarchyChangeInfo*, int);
+extern int (*XISetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int);
+extern int (*XIGetClientPointer_dylibloader_wrapper_xinput2)( Display*, Window, int*);
+extern int (*XISelectEvents_dylibloader_wrapper_xinput2)( Display*, Window, XIEventMask*, int);
+extern XIEventMask* (*XIGetSelectedEvents_dylibloader_wrapper_xinput2)( Display*, Window, int*);
+extern int (*XIQueryVersion_dylibloader_wrapper_xinput2)( Display*, int*, int*);
+extern XIDeviceInfo* (*XIQueryDevice_dylibloader_wrapper_xinput2)( Display*, int, int*);
+extern int (*XISetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window, Time);
+extern int (*XIGetFocus_dylibloader_wrapper_xinput2)( Display*, int, Window*);
+extern int (*XIGrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Window, Time, Cursor, int, int, int, XIEventMask*);
+extern int (*XIUngrabDevice_dylibloader_wrapper_xinput2)( Display*, int, Time);
+extern int (*XIAllowEvents_dylibloader_wrapper_xinput2)( Display*, int, int, Time);
+extern int (*XIAllowTouchEvents_dylibloader_wrapper_xinput2)( Display*, int, unsigned int, Window, int);
+extern int (*XIGrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIGrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIGrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, Cursor, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIGrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, int, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIGrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIEventMask*, int, XIGrabModifiers*);
+extern int (*XIUngrabButton_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
+extern int (*XIUngrabKeycode_dylibloader_wrapper_xinput2)( Display*, int, int, Window, int, XIGrabModifiers*);
+extern int (*XIUngrabEnter_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+extern int (*XIUngrabFocusIn_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+extern int (*XIUngrabTouchBegin_dylibloader_wrapper_xinput2)( Display*, int, Window, int, XIGrabModifiers*);
+extern Atom* (*XIListProperties_dylibloader_wrapper_xinput2)( Display*, int, int*);
+extern void (*XIChangeProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, Atom, int, int, unsigned char*, int);
+extern void (*XIDeleteProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom);
+extern int (*XIGetProperty_dylibloader_wrapper_xinput2)( Display*, int, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+extern void (*XIBarrierReleasePointers_dylibloader_wrapper_xinput2)( Display*, XIBarrierReleasePointerInfo*, int);
+extern void (*XIBarrierReleasePointer_dylibloader_wrapper_xinput2)( Display*, int, PointerBarrier, BarrierEventID);
+extern void (*XIFreeDeviceInfo_dylibloader_wrapper_xinput2)( XIDeviceInfo*);
+int initialize_xinput2(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
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..eb0f9abf15
--- /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-existant symbols inherited from
+// libX11 and libXrender, but absent in libXrandr.so.2, were removed.
+#include <stdint.h>
+
+#define XRRQueryExtension XRRQueryExtension_dylibloader_orig_xrandr
+#define XRRQueryVersion XRRQueryVersion_dylibloader_orig_xrandr
+#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_orig_xrandr
+#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_orig_xrandr
+#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_orig_xrandr
+#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_orig_xrandr
+#define XRRConfigRotations XRRConfigRotations_dylibloader_orig_xrandr
+#define XRRConfigTimes XRRConfigTimes_dylibloader_orig_xrandr
+#define XRRConfigSizes XRRConfigSizes_dylibloader_orig_xrandr
+#define XRRConfigRates XRRConfigRates_dylibloader_orig_xrandr
+#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_orig_xrandr
+#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_orig_xrandr
+#define XRRRootToScreen XRRRootToScreen_dylibloader_orig_xrandr
+#define XRRSelectInput XRRSelectInput_dylibloader_orig_xrandr
+#define XRRRotations XRRRotations_dylibloader_orig_xrandr
+#define XRRSizes XRRSizes_dylibloader_orig_xrandr
+#define XRRRates XRRRates_dylibloader_orig_xrandr
+#define XRRTimes XRRTimes_dylibloader_orig_xrandr
+#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_orig_xrandr
+#define XRRSetScreenSize XRRSetScreenSize_dylibloader_orig_xrandr
+#define XRRGetScreenResources XRRGetScreenResources_dylibloader_orig_xrandr
+#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_orig_xrandr
+#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_orig_xrandr
+#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_orig_xrandr
+#define XRRListOutputProperties XRRListOutputProperties_dylibloader_orig_xrandr
+#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_orig_xrandr
+#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_orig_xrandr
+#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_orig_xrandr
+#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_orig_xrandr
+#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_orig_xrandr
+#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_orig_xrandr
+#define XRRCreateMode XRRCreateMode_dylibloader_orig_xrandr
+#define XRRDestroyMode XRRDestroyMode_dylibloader_orig_xrandr
+#define XRRAddOutputMode XRRAddOutputMode_dylibloader_orig_xrandr
+#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_orig_xrandr
+#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_orig_xrandr
+#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_orig_xrandr
+#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_orig_xrandr
+#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_orig_xrandr
+#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_orig_xrandr
+#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_orig_xrandr
+#define XRRAllocGamma XRRAllocGamma_dylibloader_orig_xrandr
+#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_orig_xrandr
+#define XRRFreeGamma XRRFreeGamma_dylibloader_orig_xrandr
+#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_orig_xrandr
+#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_orig_xrandr
+#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_orig_xrandr
+#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_orig_xrandr
+#define XRRGetPanning XRRGetPanning_dylibloader_orig_xrandr
+#define XRRFreePanning XRRFreePanning_dylibloader_orig_xrandr
+#define XRRSetPanning XRRSetPanning_dylibloader_orig_xrandr
+#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_orig_xrandr
+#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_orig_xrandr
+#define XRRGetProviderResources XRRGetProviderResources_dylibloader_orig_xrandr
+#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_orig_xrandr
+#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_orig_xrandr
+#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_orig_xrandr
+#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_orig_xrandr
+#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_orig_xrandr
+#define XRRListProviderProperties XRRListProviderProperties_dylibloader_orig_xrandr
+#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_orig_xrandr
+#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_orig_xrandr
+#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_orig_xrandr
+#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_orig_xrandr
+#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_orig_xrandr
+#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_orig_xrandr
+#define XRRGetMonitors XRRGetMonitors_dylibloader_orig_xrandr
+#define XRRSetMonitor XRRSetMonitor_dylibloader_orig_xrandr
+#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_orig_xrandr
+#define XRRFreeMonitors XRRFreeMonitors_dylibloader_orig_xrandr
+#include <X11/extensions/Xrandr.h>
+#undef XRRQueryExtension
+#undef XRRQueryVersion
+#undef XRRGetScreenInfo
+#undef XRRFreeScreenConfigInfo
+#undef XRRSetScreenConfig
+#undef XRRSetScreenConfigAndRate
+#undef XRRConfigRotations
+#undef XRRConfigTimes
+#undef XRRConfigSizes
+#undef XRRConfigRates
+#undef XRRConfigCurrentConfiguration
+#undef XRRConfigCurrentRate
+#undef XRRRootToScreen
+#undef XRRSelectInput
+#undef XRRRotations
+#undef XRRSizes
+#undef XRRRates
+#undef XRRTimes
+#undef XRRGetScreenSizeRange
+#undef XRRSetScreenSize
+#undef XRRGetScreenResources
+#undef XRRFreeScreenResources
+#undef XRRGetOutputInfo
+#undef XRRFreeOutputInfo
+#undef XRRListOutputProperties
+#undef XRRQueryOutputProperty
+#undef XRRConfigureOutputProperty
+#undef XRRChangeOutputProperty
+#undef XRRDeleteOutputProperty
+#undef XRRGetOutputProperty
+#undef XRRAllocModeInfo
+#undef XRRCreateMode
+#undef XRRDestroyMode
+#undef XRRAddOutputMode
+#undef XRRDeleteOutputMode
+#undef XRRFreeModeInfo
+#undef XRRGetCrtcInfo
+#undef XRRFreeCrtcInfo
+#undef XRRSetCrtcConfig
+#undef XRRGetCrtcGammaSize
+#undef XRRGetCrtcGamma
+#undef XRRAllocGamma
+#undef XRRSetCrtcGamma
+#undef XRRFreeGamma
+#undef XRRGetScreenResourcesCurrent
+#undef XRRSetCrtcTransform
+#undef XRRGetCrtcTransform
+#undef XRRUpdateConfiguration
+#undef XRRGetPanning
+#undef XRRFreePanning
+#undef XRRSetPanning
+#undef XRRSetOutputPrimary
+#undef XRRGetOutputPrimary
+#undef XRRGetProviderResources
+#undef XRRFreeProviderResources
+#undef XRRGetProviderInfo
+#undef XRRFreeProviderInfo
+#undef XRRSetProviderOutputSource
+#undef XRRSetProviderOffloadSink
+#undef XRRListProviderProperties
+#undef XRRQueryProviderProperty
+#undef XRRConfigureProviderProperty
+#undef XRRChangeProviderProperty
+#undef XRRDeleteProviderProperty
+#undef XRRGetProviderProperty
+#undef XRRAllocateMonitor
+#undef XRRGetMonitors
+#undef XRRSetMonitor
+#undef XRRDeleteMonitor
+#undef XRRFreeMonitors
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XRRQueryExtension_dylibloader_wrapper_xrandr)( Display*, int*, int*);
+int (*XRRQueryVersion_dylibloader_wrapper_xrandr)( Display*, int*, int*);
+XRRScreenConfiguration* (*XRRGetScreenInfo_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
+int (*XRRSetScreenConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, Time);
+int (*XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, short, Time);
+Rotation (*XRRConfigRotations_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
+Time (*XRRConfigTimes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Time*);
+XRRScreenSize* (*XRRConfigSizes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int*);
+short* (*XRRConfigRates_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int, int*);
+SizeID (*XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
+short (*XRRConfigCurrentRate_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
+int (*XRRRootToScreen_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRSelectInput_dylibloader_wrapper_xrandr)( Display*, Window, int);
+Rotation (*XRRRotations_dylibloader_wrapper_xrandr)( Display*, int, Rotation*);
+XRRScreenSize* (*XRRSizes_dylibloader_wrapper_xrandr)( Display*, int, int*);
+short* (*XRRRates_dylibloader_wrapper_xrandr)( Display*, int, int, int*);
+Time (*XRRTimes_dylibloader_wrapper_xrandr)( Display*, int, Time*);
+int (*XRRGetScreenSizeRange_dylibloader_wrapper_xrandr)( Display*, Window, int*, int*, int*, int*);
+void (*XRRSetScreenSize_dylibloader_wrapper_xrandr)( Display*, Window, int, int, int, int);
+XRRScreenResources* (*XRRGetScreenResources_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRFreeScreenResources_dylibloader_wrapper_xrandr)( XRRScreenResources*);
+XRROutputInfo* (*XRRGetOutputInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RROutput);
+void (*XRRFreeOutputInfo_dylibloader_wrapper_xrandr)( XRROutputInfo*);
+Atom* (*XRRListOutputProperties_dylibloader_wrapper_xrandr)( Display*, RROutput, int*);
+XRRPropertyInfo* (*XRRQueryOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
+void (*XRRConfigureOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, int, int, int, long*);
+void (*XRRChangeOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, Atom, int, int,const unsigned char*, int);
+void (*XRRDeleteOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
+int (*XRRGetOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+XRRModeInfo* (*XRRAllocModeInfo_dylibloader_wrapper_xrandr)(const char*, int);
+RRMode (*XRRCreateMode_dylibloader_wrapper_xrandr)( Display*, Window, XRRModeInfo*);
+void (*XRRDestroyMode_dylibloader_wrapper_xrandr)( Display*, RRMode);
+void (*XRRAddOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
+void (*XRRDeleteOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
+void (*XRRFreeModeInfo_dylibloader_wrapper_xrandr)( XRRModeInfo*);
+XRRCrtcInfo* (*XRRGetCrtcInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
+void (*XRRFreeCrtcInfo_dylibloader_wrapper_xrandr)( XRRCrtcInfo*);
+int (*XRRSetCrtcConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, Time, int, int, RRMode, Rotation, RROutput*, int);
+int (*XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
+XRRCrtcGamma* (*XRRGetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
+XRRCrtcGamma* (*XRRAllocGamma_dylibloader_wrapper_xrandr)( int);
+void (*XRRSetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcGamma*);
+void (*XRRFreeGamma_dylibloader_wrapper_xrandr)( XRRCrtcGamma*);
+XRRScreenResources* (*XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRSetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XTransform*,const char*, XFixed*, int);
+int (*XRRGetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcTransformAttributes**);
+int (*XRRUpdateConfiguration_dylibloader_wrapper_xrandr)( XEvent*);
+XRRPanning* (*XRRGetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
+void (*XRRFreePanning_dylibloader_wrapper_xrandr)( XRRPanning*);
+int (*XRRSetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, XRRPanning*);
+void (*XRRSetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window, RROutput);
+RROutput (*XRRGetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window);
+XRRProviderResources* (*XRRGetProviderResources_dylibloader_wrapper_xrandr)( Display*, Window);
+void (*XRRFreeProviderResources_dylibloader_wrapper_xrandr)( XRRProviderResources*);
+XRRProviderInfo* (*XRRGetProviderInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRProvider);
+void (*XRRFreeProviderInfo_dylibloader_wrapper_xrandr)( XRRProviderInfo*);
+int (*XRRSetProviderOutputSource_dylibloader_wrapper_xrandr)( Display*, XID, XID);
+int (*XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr)( Display*, XID, XID);
+Atom* (*XRRListProviderProperties_dylibloader_wrapper_xrandr)( Display*, RRProvider, int*);
+XRRPropertyInfo* (*XRRQueryProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
+void (*XRRConfigureProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, int, int, int, long*);
+void (*XRRChangeProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, Atom, int, int,const unsigned char*, int);
+void (*XRRDeleteProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
+int (*XRRGetProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+XRRMonitorInfo* (*XRRAllocateMonitor_dylibloader_wrapper_xrandr)( Display*, int);
+XRRMonitorInfo* (*XRRGetMonitors_dylibloader_wrapper_xrandr)( Display*, Window, int, int*);
+void (*XRRSetMonitor_dylibloader_wrapper_xrandr)( Display*, Window, XRRMonitorInfo*);
+void (*XRRDeleteMonitor_dylibloader_wrapper_xrandr)( Display*, Window, Atom);
+void (*XRRFreeMonitors_dylibloader_wrapper_xrandr)( XRRMonitorInfo*);
+int initialize_xrandr(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXrandr.so.2", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XRRQueryExtension
+ *(void **) (&XRRQueryExtension_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRQueryVersion
+ *(void **) (&XRRQueryVersion_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetScreenInfo
+ *(void **) (&XRRGetScreenInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeScreenConfigInfo
+ *(void **) (&XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeScreenConfigInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetScreenConfig
+ *(void **) (&XRRSetScreenConfig_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenConfig");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetScreenConfigAndRate
+ *(void **) (&XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenConfigAndRate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigRotations
+ *(void **) (&XRRConfigRotations_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigRotations");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigTimes
+ *(void **) (&XRRConfigTimes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigTimes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigSizes
+ *(void **) (&XRRConfigSizes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigSizes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigRates
+ *(void **) (&XRRConfigRates_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigRates");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigCurrentConfiguration
+ *(void **) (&XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigCurrentConfiguration");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigCurrentRate
+ *(void **) (&XRRConfigCurrentRate_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigCurrentRate");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRRootToScreen
+ *(void **) (&XRRRootToScreen_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRootToScreen");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSelectInput
+ *(void **) (&XRRSelectInput_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSelectInput");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRRotations
+ *(void **) (&XRRRotations_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRotations");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSizes
+ *(void **) (&XRRSizes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSizes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRRates
+ *(void **) (&XRRRates_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRRates");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRTimes
+ *(void **) (&XRRTimes_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRTimes");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetScreenSizeRange
+ *(void **) (&XRRGetScreenSizeRange_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenSizeRange");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetScreenSize
+ *(void **) (&XRRSetScreenSize_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetScreenSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetScreenResources
+ *(void **) (&XRRGetScreenResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenResources");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeScreenResources
+ *(void **) (&XRRFreeScreenResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeScreenResources");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetOutputInfo
+ *(void **) (&XRRGetOutputInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeOutputInfo
+ *(void **) (&XRRFreeOutputInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeOutputInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRListOutputProperties
+ *(void **) (&XRRListOutputProperties_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRListOutputProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRQueryOutputProperty
+ *(void **) (&XRRQueryOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigureOutputProperty
+ *(void **) (&XRRConfigureOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigureOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRChangeOutputProperty
+ *(void **) (&XRRChangeOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRChangeOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDeleteOutputProperty
+ *(void **) (&XRRDeleteOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetOutputProperty
+ *(void **) (&XRRGetOutputProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRAllocModeInfo
+ *(void **) (&XRRAllocModeInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocModeInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRCreateMode
+ *(void **) (&XRRCreateMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRCreateMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDestroyMode
+ *(void **) (&XRRDestroyMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDestroyMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRAddOutputMode
+ *(void **) (&XRRAddOutputMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAddOutputMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDeleteOutputMode
+ *(void **) (&XRRDeleteOutputMode_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteOutputMode");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeModeInfo
+ *(void **) (&XRRFreeModeInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeModeInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetCrtcInfo
+ *(void **) (&XRRGetCrtcInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeCrtcInfo
+ *(void **) (&XRRFreeCrtcInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeCrtcInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetCrtcConfig
+ *(void **) (&XRRSetCrtcConfig_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcConfig");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetCrtcGammaSize
+ *(void **) (&XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcGammaSize");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetCrtcGamma
+ *(void **) (&XRRGetCrtcGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcGamma");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRAllocGamma
+ *(void **) (&XRRAllocGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocGamma");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetCrtcGamma
+ *(void **) (&XRRSetCrtcGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcGamma");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeGamma
+ *(void **) (&XRRFreeGamma_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeGamma");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetScreenResourcesCurrent
+ *(void **) (&XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetScreenResourcesCurrent");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetCrtcTransform
+ *(void **) (&XRRSetCrtcTransform_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetCrtcTransform");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetCrtcTransform
+ *(void **) (&XRRGetCrtcTransform_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetCrtcTransform");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRUpdateConfiguration
+ *(void **) (&XRRUpdateConfiguration_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRUpdateConfiguration");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetPanning
+ *(void **) (&XRRGetPanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetPanning");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreePanning
+ *(void **) (&XRRFreePanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreePanning");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetPanning
+ *(void **) (&XRRSetPanning_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetPanning");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetOutputPrimary
+ *(void **) (&XRRSetOutputPrimary_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetOutputPrimary");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetOutputPrimary
+ *(void **) (&XRRGetOutputPrimary_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetOutputPrimary");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetProviderResources
+ *(void **) (&XRRGetProviderResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderResources");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeProviderResources
+ *(void **) (&XRRFreeProviderResources_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeProviderResources");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetProviderInfo
+ *(void **) (&XRRGetProviderInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeProviderInfo
+ *(void **) (&XRRFreeProviderInfo_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeProviderInfo");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetProviderOutputSource
+ *(void **) (&XRRSetProviderOutputSource_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetProviderOutputSource");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetProviderOffloadSink
+ *(void **) (&XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetProviderOffloadSink");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRListProviderProperties
+ *(void **) (&XRRListProviderProperties_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRListProviderProperties");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRQueryProviderProperty
+ *(void **) (&XRRQueryProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRQueryProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRConfigureProviderProperty
+ *(void **) (&XRRConfigureProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRConfigureProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRChangeProviderProperty
+ *(void **) (&XRRChangeProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRChangeProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDeleteProviderProperty
+ *(void **) (&XRRDeleteProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetProviderProperty
+ *(void **) (&XRRGetProviderProperty_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetProviderProperty");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRAllocateMonitor
+ *(void **) (&XRRAllocateMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRAllocateMonitor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRGetMonitors
+ *(void **) (&XRRGetMonitors_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRGetMonitors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRSetMonitor
+ *(void **) (&XRRSetMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRSetMonitor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRDeleteMonitor
+ *(void **) (&XRRDeleteMonitor_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRDeleteMonitor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRRFreeMonitors
+ *(void **) (&XRRFreeMonitors_dylibloader_wrapper_xrandr) = dlsym(handle, "XRRFreeMonitors");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
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..f1ca9f94a5
--- /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-existant symbols inherited from
+// libX11 and libXrender, but absent in libXrandr.so.2, were removed.
+#include <stdint.h>
+
+#define XRRQueryExtension XRRQueryExtension_dylibloader_orig_xrandr
+#define XRRQueryVersion XRRQueryVersion_dylibloader_orig_xrandr
+#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_orig_xrandr
+#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_orig_xrandr
+#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_orig_xrandr
+#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_orig_xrandr
+#define XRRConfigRotations XRRConfigRotations_dylibloader_orig_xrandr
+#define XRRConfigTimes XRRConfigTimes_dylibloader_orig_xrandr
+#define XRRConfigSizes XRRConfigSizes_dylibloader_orig_xrandr
+#define XRRConfigRates XRRConfigRates_dylibloader_orig_xrandr
+#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_orig_xrandr
+#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_orig_xrandr
+#define XRRRootToScreen XRRRootToScreen_dylibloader_orig_xrandr
+#define XRRSelectInput XRRSelectInput_dylibloader_orig_xrandr
+#define XRRRotations XRRRotations_dylibloader_orig_xrandr
+#define XRRSizes XRRSizes_dylibloader_orig_xrandr
+#define XRRRates XRRRates_dylibloader_orig_xrandr
+#define XRRTimes XRRTimes_dylibloader_orig_xrandr
+#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_orig_xrandr
+#define XRRSetScreenSize XRRSetScreenSize_dylibloader_orig_xrandr
+#define XRRGetScreenResources XRRGetScreenResources_dylibloader_orig_xrandr
+#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_orig_xrandr
+#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_orig_xrandr
+#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_orig_xrandr
+#define XRRListOutputProperties XRRListOutputProperties_dylibloader_orig_xrandr
+#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_orig_xrandr
+#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_orig_xrandr
+#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_orig_xrandr
+#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_orig_xrandr
+#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_orig_xrandr
+#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_orig_xrandr
+#define XRRCreateMode XRRCreateMode_dylibloader_orig_xrandr
+#define XRRDestroyMode XRRDestroyMode_dylibloader_orig_xrandr
+#define XRRAddOutputMode XRRAddOutputMode_dylibloader_orig_xrandr
+#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_orig_xrandr
+#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_orig_xrandr
+#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_orig_xrandr
+#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_orig_xrandr
+#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_orig_xrandr
+#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_orig_xrandr
+#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_orig_xrandr
+#define XRRAllocGamma XRRAllocGamma_dylibloader_orig_xrandr
+#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_orig_xrandr
+#define XRRFreeGamma XRRFreeGamma_dylibloader_orig_xrandr
+#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_orig_xrandr
+#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_orig_xrandr
+#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_orig_xrandr
+#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_orig_xrandr
+#define XRRGetPanning XRRGetPanning_dylibloader_orig_xrandr
+#define XRRFreePanning XRRFreePanning_dylibloader_orig_xrandr
+#define XRRSetPanning XRRSetPanning_dylibloader_orig_xrandr
+#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_orig_xrandr
+#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_orig_xrandr
+#define XRRGetProviderResources XRRGetProviderResources_dylibloader_orig_xrandr
+#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_orig_xrandr
+#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_orig_xrandr
+#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_orig_xrandr
+#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_orig_xrandr
+#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_orig_xrandr
+#define XRRListProviderProperties XRRListProviderProperties_dylibloader_orig_xrandr
+#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_orig_xrandr
+#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_orig_xrandr
+#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_orig_xrandr
+#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_orig_xrandr
+#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_orig_xrandr
+#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_orig_xrandr
+#define XRRGetMonitors XRRGetMonitors_dylibloader_orig_xrandr
+#define XRRSetMonitor XRRSetMonitor_dylibloader_orig_xrandr
+#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_orig_xrandr
+#define XRRFreeMonitors XRRFreeMonitors_dylibloader_orig_xrandr
+#include <X11/extensions/Xrandr.h>
+#undef XRRQueryExtension
+#undef XRRQueryVersion
+#undef XRRGetScreenInfo
+#undef XRRFreeScreenConfigInfo
+#undef XRRSetScreenConfig
+#undef XRRSetScreenConfigAndRate
+#undef XRRConfigRotations
+#undef XRRConfigTimes
+#undef XRRConfigSizes
+#undef XRRConfigRates
+#undef XRRConfigCurrentConfiguration
+#undef XRRConfigCurrentRate
+#undef XRRRootToScreen
+#undef XRRSelectInput
+#undef XRRRotations
+#undef XRRSizes
+#undef XRRRates
+#undef XRRTimes
+#undef XRRGetScreenSizeRange
+#undef XRRSetScreenSize
+#undef XRRGetScreenResources
+#undef XRRFreeScreenResources
+#undef XRRGetOutputInfo
+#undef XRRFreeOutputInfo
+#undef XRRListOutputProperties
+#undef XRRQueryOutputProperty
+#undef XRRConfigureOutputProperty
+#undef XRRChangeOutputProperty
+#undef XRRDeleteOutputProperty
+#undef XRRGetOutputProperty
+#undef XRRAllocModeInfo
+#undef XRRCreateMode
+#undef XRRDestroyMode
+#undef XRRAddOutputMode
+#undef XRRDeleteOutputMode
+#undef XRRFreeModeInfo
+#undef XRRGetCrtcInfo
+#undef XRRFreeCrtcInfo
+#undef XRRSetCrtcConfig
+#undef XRRGetCrtcGammaSize
+#undef XRRGetCrtcGamma
+#undef XRRAllocGamma
+#undef XRRSetCrtcGamma
+#undef XRRFreeGamma
+#undef XRRGetScreenResourcesCurrent
+#undef XRRSetCrtcTransform
+#undef XRRGetCrtcTransform
+#undef XRRUpdateConfiguration
+#undef XRRGetPanning
+#undef XRRFreePanning
+#undef XRRSetPanning
+#undef XRRSetOutputPrimary
+#undef XRRGetOutputPrimary
+#undef XRRGetProviderResources
+#undef XRRFreeProviderResources
+#undef XRRGetProviderInfo
+#undef XRRFreeProviderInfo
+#undef XRRSetProviderOutputSource
+#undef XRRSetProviderOffloadSink
+#undef XRRListProviderProperties
+#undef XRRQueryProviderProperty
+#undef XRRConfigureProviderProperty
+#undef XRRChangeProviderProperty
+#undef XRRDeleteProviderProperty
+#undef XRRGetProviderProperty
+#undef XRRAllocateMonitor
+#undef XRRGetMonitors
+#undef XRRSetMonitor
+#undef XRRDeleteMonitor
+#undef XRRFreeMonitors
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XRRQueryExtension XRRQueryExtension_dylibloader_wrapper_xrandr
+#define XRRQueryVersion XRRQueryVersion_dylibloader_wrapper_xrandr
+#define XRRGetScreenInfo XRRGetScreenInfo_dylibloader_wrapper_xrandr
+#define XRRFreeScreenConfigInfo XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr
+#define XRRSetScreenConfig XRRSetScreenConfig_dylibloader_wrapper_xrandr
+#define XRRSetScreenConfigAndRate XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr
+#define XRRConfigRotations XRRConfigRotations_dylibloader_wrapper_xrandr
+#define XRRConfigTimes XRRConfigTimes_dylibloader_wrapper_xrandr
+#define XRRConfigSizes XRRConfigSizes_dylibloader_wrapper_xrandr
+#define XRRConfigRates XRRConfigRates_dylibloader_wrapper_xrandr
+#define XRRConfigCurrentConfiguration XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr
+#define XRRConfigCurrentRate XRRConfigCurrentRate_dylibloader_wrapper_xrandr
+#define XRRRootToScreen XRRRootToScreen_dylibloader_wrapper_xrandr
+#define XRRSelectInput XRRSelectInput_dylibloader_wrapper_xrandr
+#define XRRRotations XRRRotations_dylibloader_wrapper_xrandr
+#define XRRSizes XRRSizes_dylibloader_wrapper_xrandr
+#define XRRRates XRRRates_dylibloader_wrapper_xrandr
+#define XRRTimes XRRTimes_dylibloader_wrapper_xrandr
+#define XRRGetScreenSizeRange XRRGetScreenSizeRange_dylibloader_wrapper_xrandr
+#define XRRSetScreenSize XRRSetScreenSize_dylibloader_wrapper_xrandr
+#define XRRGetScreenResources XRRGetScreenResources_dylibloader_wrapper_xrandr
+#define XRRFreeScreenResources XRRFreeScreenResources_dylibloader_wrapper_xrandr
+#define XRRGetOutputInfo XRRGetOutputInfo_dylibloader_wrapper_xrandr
+#define XRRFreeOutputInfo XRRFreeOutputInfo_dylibloader_wrapper_xrandr
+#define XRRListOutputProperties XRRListOutputProperties_dylibloader_wrapper_xrandr
+#define XRRQueryOutputProperty XRRQueryOutputProperty_dylibloader_wrapper_xrandr
+#define XRRConfigureOutputProperty XRRConfigureOutputProperty_dylibloader_wrapper_xrandr
+#define XRRChangeOutputProperty XRRChangeOutputProperty_dylibloader_wrapper_xrandr
+#define XRRDeleteOutputProperty XRRDeleteOutputProperty_dylibloader_wrapper_xrandr
+#define XRRGetOutputProperty XRRGetOutputProperty_dylibloader_wrapper_xrandr
+#define XRRAllocModeInfo XRRAllocModeInfo_dylibloader_wrapper_xrandr
+#define XRRCreateMode XRRCreateMode_dylibloader_wrapper_xrandr
+#define XRRDestroyMode XRRDestroyMode_dylibloader_wrapper_xrandr
+#define XRRAddOutputMode XRRAddOutputMode_dylibloader_wrapper_xrandr
+#define XRRDeleteOutputMode XRRDeleteOutputMode_dylibloader_wrapper_xrandr
+#define XRRFreeModeInfo XRRFreeModeInfo_dylibloader_wrapper_xrandr
+#define XRRGetCrtcInfo XRRGetCrtcInfo_dylibloader_wrapper_xrandr
+#define XRRFreeCrtcInfo XRRFreeCrtcInfo_dylibloader_wrapper_xrandr
+#define XRRSetCrtcConfig XRRSetCrtcConfig_dylibloader_wrapper_xrandr
+#define XRRGetCrtcGammaSize XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr
+#define XRRGetCrtcGamma XRRGetCrtcGamma_dylibloader_wrapper_xrandr
+#define XRRAllocGamma XRRAllocGamma_dylibloader_wrapper_xrandr
+#define XRRSetCrtcGamma XRRSetCrtcGamma_dylibloader_wrapper_xrandr
+#define XRRFreeGamma XRRFreeGamma_dylibloader_wrapper_xrandr
+#define XRRGetScreenResourcesCurrent XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr
+#define XRRSetCrtcTransform XRRSetCrtcTransform_dylibloader_wrapper_xrandr
+#define XRRGetCrtcTransform XRRGetCrtcTransform_dylibloader_wrapper_xrandr
+#define XRRUpdateConfiguration XRRUpdateConfiguration_dylibloader_wrapper_xrandr
+#define XRRGetPanning XRRGetPanning_dylibloader_wrapper_xrandr
+#define XRRFreePanning XRRFreePanning_dylibloader_wrapper_xrandr
+#define XRRSetPanning XRRSetPanning_dylibloader_wrapper_xrandr
+#define XRRSetOutputPrimary XRRSetOutputPrimary_dylibloader_wrapper_xrandr
+#define XRRGetOutputPrimary XRRGetOutputPrimary_dylibloader_wrapper_xrandr
+#define XRRGetProviderResources XRRGetProviderResources_dylibloader_wrapper_xrandr
+#define XRRFreeProviderResources XRRFreeProviderResources_dylibloader_wrapper_xrandr
+#define XRRGetProviderInfo XRRGetProviderInfo_dylibloader_wrapper_xrandr
+#define XRRFreeProviderInfo XRRFreeProviderInfo_dylibloader_wrapper_xrandr
+#define XRRSetProviderOutputSource XRRSetProviderOutputSource_dylibloader_wrapper_xrandr
+#define XRRSetProviderOffloadSink XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr
+#define XRRListProviderProperties XRRListProviderProperties_dylibloader_wrapper_xrandr
+#define XRRQueryProviderProperty XRRQueryProviderProperty_dylibloader_wrapper_xrandr
+#define XRRConfigureProviderProperty XRRConfigureProviderProperty_dylibloader_wrapper_xrandr
+#define XRRChangeProviderProperty XRRChangeProviderProperty_dylibloader_wrapper_xrandr
+#define XRRDeleteProviderProperty XRRDeleteProviderProperty_dylibloader_wrapper_xrandr
+#define XRRGetProviderProperty XRRGetProviderProperty_dylibloader_wrapper_xrandr
+#define XRRAllocateMonitor XRRAllocateMonitor_dylibloader_wrapper_xrandr
+#define XRRGetMonitors XRRGetMonitors_dylibloader_wrapper_xrandr
+#define XRRSetMonitor XRRSetMonitor_dylibloader_wrapper_xrandr
+#define XRRDeleteMonitor XRRDeleteMonitor_dylibloader_wrapper_xrandr
+#define XRRFreeMonitors XRRFreeMonitors_dylibloader_wrapper_xrandr
+extern int (*XRRQueryExtension_dylibloader_wrapper_xrandr)( Display*, int*, int*);
+extern int (*XRRQueryVersion_dylibloader_wrapper_xrandr)( Display*, int*, int*);
+extern XRRScreenConfiguration* (*XRRGetScreenInfo_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRFreeScreenConfigInfo_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
+extern int (*XRRSetScreenConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, Time);
+extern int (*XRRSetScreenConfigAndRate_dylibloader_wrapper_xrandr)( Display*, XRRScreenConfiguration*, Drawable, int, Rotation, short, Time);
+extern Rotation (*XRRConfigRotations_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
+extern Time (*XRRConfigTimes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Time*);
+extern XRRScreenSize* (*XRRConfigSizes_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int*);
+extern short* (*XRRConfigRates_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, int, int*);
+extern SizeID (*XRRConfigCurrentConfiguration_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*, Rotation*);
+extern short (*XRRConfigCurrentRate_dylibloader_wrapper_xrandr)( XRRScreenConfiguration*);
+extern int (*XRRRootToScreen_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRSelectInput_dylibloader_wrapper_xrandr)( Display*, Window, int);
+extern Rotation (*XRRRotations_dylibloader_wrapper_xrandr)( Display*, int, Rotation*);
+extern XRRScreenSize* (*XRRSizes_dylibloader_wrapper_xrandr)( Display*, int, int*);
+extern short* (*XRRRates_dylibloader_wrapper_xrandr)( Display*, int, int, int*);
+extern Time (*XRRTimes_dylibloader_wrapper_xrandr)( Display*, int, Time*);
+extern int (*XRRGetScreenSizeRange_dylibloader_wrapper_xrandr)( Display*, Window, int*, int*, int*, int*);
+extern void (*XRRSetScreenSize_dylibloader_wrapper_xrandr)( Display*, Window, int, int, int, int);
+extern XRRScreenResources* (*XRRGetScreenResources_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRFreeScreenResources_dylibloader_wrapper_xrandr)( XRRScreenResources*);
+extern XRROutputInfo* (*XRRGetOutputInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RROutput);
+extern void (*XRRFreeOutputInfo_dylibloader_wrapper_xrandr)( XRROutputInfo*);
+extern Atom* (*XRRListOutputProperties_dylibloader_wrapper_xrandr)( Display*, RROutput, int*);
+extern XRRPropertyInfo* (*XRRQueryOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
+extern void (*XRRConfigureOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, int, int, int, long*);
+extern void (*XRRChangeOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, Atom, int, int,const unsigned char*, int);
+extern void (*XRRDeleteOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom);
+extern int (*XRRGetOutputProperty_dylibloader_wrapper_xrandr)( Display*, RROutput, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+extern XRRModeInfo* (*XRRAllocModeInfo_dylibloader_wrapper_xrandr)(const char*, int);
+extern RRMode (*XRRCreateMode_dylibloader_wrapper_xrandr)( Display*, Window, XRRModeInfo*);
+extern void (*XRRDestroyMode_dylibloader_wrapper_xrandr)( Display*, RRMode);
+extern void (*XRRAddOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
+extern void (*XRRDeleteOutputMode_dylibloader_wrapper_xrandr)( Display*, RROutput, RRMode);
+extern void (*XRRFreeModeInfo_dylibloader_wrapper_xrandr)( XRRModeInfo*);
+extern XRRCrtcInfo* (*XRRGetCrtcInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
+extern void (*XRRFreeCrtcInfo_dylibloader_wrapper_xrandr)( XRRCrtcInfo*);
+extern int (*XRRSetCrtcConfig_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, Time, int, int, RRMode, Rotation, RROutput*, int);
+extern int (*XRRGetCrtcGammaSize_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
+extern XRRCrtcGamma* (*XRRGetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc);
+extern XRRCrtcGamma* (*XRRAllocGamma_dylibloader_wrapper_xrandr)( int);
+extern void (*XRRSetCrtcGamma_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcGamma*);
+extern void (*XRRFreeGamma_dylibloader_wrapper_xrandr)( XRRCrtcGamma*);
+extern XRRScreenResources* (*XRRGetScreenResourcesCurrent_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRSetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XTransform*,const char*, XFixed*, int);
+extern int (*XRRGetCrtcTransform_dylibloader_wrapper_xrandr)( Display*, RRCrtc, XRRCrtcTransformAttributes**);
+extern int (*XRRUpdateConfiguration_dylibloader_wrapper_xrandr)( XEvent*);
+extern XRRPanning* (*XRRGetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc);
+extern void (*XRRFreePanning_dylibloader_wrapper_xrandr)( XRRPanning*);
+extern int (*XRRSetPanning_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRCrtc, XRRPanning*);
+extern void (*XRRSetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window, RROutput);
+extern RROutput (*XRRGetOutputPrimary_dylibloader_wrapper_xrandr)( Display*, Window);
+extern XRRProviderResources* (*XRRGetProviderResources_dylibloader_wrapper_xrandr)( Display*, Window);
+extern void (*XRRFreeProviderResources_dylibloader_wrapper_xrandr)( XRRProviderResources*);
+extern XRRProviderInfo* (*XRRGetProviderInfo_dylibloader_wrapper_xrandr)( Display*, XRRScreenResources*, RRProvider);
+extern void (*XRRFreeProviderInfo_dylibloader_wrapper_xrandr)( XRRProviderInfo*);
+extern int (*XRRSetProviderOutputSource_dylibloader_wrapper_xrandr)( Display*, XID, XID);
+extern int (*XRRSetProviderOffloadSink_dylibloader_wrapper_xrandr)( Display*, XID, XID);
+extern Atom* (*XRRListProviderProperties_dylibloader_wrapper_xrandr)( Display*, RRProvider, int*);
+extern XRRPropertyInfo* (*XRRQueryProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
+extern void (*XRRConfigureProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, int, int, int, long*);
+extern void (*XRRChangeProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, Atom, int, int,const unsigned char*, int);
+extern void (*XRRDeleteProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom);
+extern int (*XRRGetProviderProperty_dylibloader_wrapper_xrandr)( Display*, RRProvider, Atom, long, long, int, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
+extern XRRMonitorInfo* (*XRRAllocateMonitor_dylibloader_wrapper_xrandr)( Display*, int);
+extern XRRMonitorInfo* (*XRRGetMonitors_dylibloader_wrapper_xrandr)( Display*, Window, int, int*);
+extern void (*XRRSetMonitor_dylibloader_wrapper_xrandr)( Display*, Window, XRRMonitorInfo*);
+extern void (*XRRDeleteMonitor_dylibloader_wrapper_xrandr)( Display*, Window, Atom);
+extern void (*XRRFreeMonitors_dylibloader_wrapper_xrandr)( XRRMonitorInfo*);
+int initialize_xrandr(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
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..b63a1eca8d
--- /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-existant symbols inherited from
+// libX11, but absent in libXrender.so.1, were removed.
+#include <stdint.h>
+
+#define XRenderQueryExtension XRenderQueryExtension_dylibloader_orig_xrender
+#define XRenderQueryVersion XRenderQueryVersion_dylibloader_orig_xrender
+#define XRenderQueryFormats XRenderQueryFormats_dylibloader_orig_xrender
+#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_orig_xrender
+#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_orig_xrender
+#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_orig_xrender
+#define XRenderFindFormat XRenderFindFormat_dylibloader_orig_xrender
+#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_orig_xrender
+#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_orig_xrender
+#define XRenderCreatePicture XRenderCreatePicture_dylibloader_orig_xrender
+#define XRenderChangePicture XRenderChangePicture_dylibloader_orig_xrender
+#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_orig_xrender
+#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_orig_xrender
+#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_orig_xrender
+#define XRenderFreePicture XRenderFreePicture_dylibloader_orig_xrender
+#define XRenderComposite XRenderComposite_dylibloader_orig_xrender
+#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_orig_xrender
+#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_orig_xrender
+#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_orig_xrender
+#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_orig_xrender
+#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_orig_xrender
+#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_orig_xrender
+#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_orig_xrender
+#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_orig_xrender
+#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_orig_xrender
+#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_orig_xrender
+#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_orig_xrender
+#define XRenderFillRectangle XRenderFillRectangle_dylibloader_orig_xrender
+#define XRenderFillRectangles XRenderFillRectangles_dylibloader_orig_xrender
+#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_orig_xrender
+#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_orig_xrender
+#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_orig_xrender
+#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_orig_xrender
+#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_orig_xrender
+#define XRenderParseColor XRenderParseColor_dylibloader_orig_xrender
+#define XRenderCreateCursor XRenderCreateCursor_dylibloader_orig_xrender
+#define XRenderQueryFilters XRenderQueryFilters_dylibloader_orig_xrender
+#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_orig_xrender
+#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_orig_xrender
+#define XRenderAddTraps XRenderAddTraps_dylibloader_orig_xrender
+#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_orig_xrender
+#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_orig_xrender
+#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_orig_xrender
+#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_orig_xrender
+#include <X11/extensions/Xrender.h>
+#undef XRenderQueryExtension
+#undef XRenderQueryVersion
+#undef XRenderQueryFormats
+#undef XRenderQuerySubpixelOrder
+#undef XRenderSetSubpixelOrder
+#undef XRenderFindVisualFormat
+#undef XRenderFindFormat
+#undef XRenderFindStandardFormat
+#undef XRenderQueryPictIndexValues
+#undef XRenderCreatePicture
+#undef XRenderChangePicture
+#undef XRenderSetPictureClipRectangles
+#undef XRenderSetPictureClipRegion
+#undef XRenderSetPictureTransform
+#undef XRenderFreePicture
+#undef XRenderComposite
+#undef XRenderCreateGlyphSet
+#undef XRenderReferenceGlyphSet
+#undef XRenderFreeGlyphSet
+#undef XRenderAddGlyphs
+#undef XRenderFreeGlyphs
+#undef XRenderCompositeString8
+#undef XRenderCompositeString16
+#undef XRenderCompositeString32
+#undef XRenderCompositeText8
+#undef XRenderCompositeText16
+#undef XRenderCompositeText32
+#undef XRenderFillRectangle
+#undef XRenderFillRectangles
+#undef XRenderCompositeTrapezoids
+#undef XRenderCompositeTriangles
+#undef XRenderCompositeTriStrip
+#undef XRenderCompositeTriFan
+#undef XRenderCompositeDoublePoly
+#undef XRenderParseColor
+#undef XRenderCreateCursor
+#undef XRenderQueryFilters
+#undef XRenderSetPictureFilter
+#undef XRenderCreateAnimCursor
+#undef XRenderAddTraps
+#undef XRenderCreateSolidFill
+#undef XRenderCreateLinearGradient
+#undef XRenderCreateRadialGradient
+#undef XRenderCreateConicalGradient
+#include <dlfcn.h>
+#include <stdio.h>
+int (*XRenderQueryExtension_dylibloader_wrapper_xrender)( Display*, int*, int*);
+int (*XRenderQueryVersion_dylibloader_wrapper_xrender)( Display*, int*, int*);
+int (*XRenderQueryFormats_dylibloader_wrapper_xrender)( Display*);
+int (*XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender)( Display*, int);
+int (*XRenderSetSubpixelOrder_dylibloader_wrapper_xrender)( Display*, int, int);
+XRenderPictFormat* (*XRenderFindVisualFormat_dylibloader_wrapper_xrender)( Display*,const Visual*);
+XRenderPictFormat* (*XRenderFindFormat_dylibloader_wrapper_xrender)( Display*, unsigned long,const XRenderPictFormat*, int);
+XRenderPictFormat* (*XRenderFindStandardFormat_dylibloader_wrapper_xrender)( Display*, int);
+XIndexValue* (*XRenderQueryPictIndexValues_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*, int*);
+Picture (*XRenderCreatePicture_dylibloader_wrapper_xrender)( Display*, Drawable,const XRenderPictFormat*, unsigned long,const XRenderPictureAttributes*);
+void (*XRenderChangePicture_dylibloader_wrapper_xrender)( Display*, Picture, unsigned long,const XRenderPictureAttributes*);
+void (*XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XRectangle*, int);
+void (*XRenderSetPictureClipRegion_dylibloader_wrapper_xrender)( Display*, Picture, Region);
+void (*XRenderSetPictureTransform_dylibloader_wrapper_xrender)( Display*, Picture, XTransform*);
+void (*XRenderFreePicture_dylibloader_wrapper_xrender)( Display*, Picture);
+void (*XRenderComposite_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture, Picture, int, int, int, int, int, int, unsigned int, unsigned int);
+GlyphSet (*XRenderCreateGlyphSet_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*);
+GlyphSet (*XRenderReferenceGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
+void (*XRenderFreeGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
+void (*XRenderAddGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*,const XGlyphInfo*, int,const char*, int);
+void (*XRenderFreeGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*, int);
+void (*XRenderCompositeString8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const char*, int);
+void (*XRenderCompositeString16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned short*, int);
+void (*XRenderCompositeString32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned int*, int);
+void (*XRenderCompositeText8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt8*, int);
+void (*XRenderCompositeText16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt16*, int);
+void (*XRenderCompositeText32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt32*, int);
+void (*XRenderFillRectangle_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*, int, int, unsigned int, unsigned int);
+void (*XRenderFillRectangles_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*,const XRectangle*, int);
+void (*XRenderCompositeTrapezoids_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTrapezoid*, int);
+void (*XRenderCompositeTriangles_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTriangle*, int);
+void (*XRenderCompositeTriStrip_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
+void (*XRenderCompositeTriFan_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
+void (*XRenderCompositeDoublePoly_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XPointDouble*, int, int);
+int (*XRenderParseColor_dylibloader_wrapper_xrender)( Display*, char*, XRenderColor*);
+Cursor (*XRenderCreateCursor_dylibloader_wrapper_xrender)( Display*, Picture, unsigned int, unsigned int);
+XFilters* (*XRenderQueryFilters_dylibloader_wrapper_xrender)( Display*, Drawable);
+void (*XRenderSetPictureFilter_dylibloader_wrapper_xrender)( Display*, Picture,const char*, XFixed*, int);
+Cursor (*XRenderCreateAnimCursor_dylibloader_wrapper_xrender)( Display*, int, XAnimCursor*);
+void (*XRenderAddTraps_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XTrap*, int);
+Picture (*XRenderCreateSolidFill_dylibloader_wrapper_xrender)( Display*,const XRenderColor*);
+Picture (*XRenderCreateLinearGradient_dylibloader_wrapper_xrender)( Display*,const XLinearGradient*,const XFixed*,const XRenderColor*, int);
+Picture (*XRenderCreateRadialGradient_dylibloader_wrapper_xrender)( Display*,const XRadialGradient*,const XFixed*,const XRenderColor*, int);
+Picture (*XRenderCreateConicalGradient_dylibloader_wrapper_xrender)( Display*,const XConicalGradient*,const XFixed*,const XRenderColor*, int);
+int initialize_xrender(int verbose) {
+ void *handle;
+ char *error;
+ handle = dlopen("libXrender.so.1", RTLD_LAZY);
+ if (!handle) {
+ if (verbose) {
+ fprintf(stderr, "%s\n", dlerror());
+ }
+ return(1);
+ }
+ dlerror();
+// XRenderQueryExtension
+ *(void **) (&XRenderQueryExtension_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryExtension");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQueryVersion
+ *(void **) (&XRenderQueryVersion_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryVersion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQueryFormats
+ *(void **) (&XRenderQueryFormats_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryFormats");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQuerySubpixelOrder
+ *(void **) (&XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQuerySubpixelOrder");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetSubpixelOrder
+ *(void **) (&XRenderSetSubpixelOrder_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetSubpixelOrder");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFindVisualFormat
+ *(void **) (&XRenderFindVisualFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindVisualFormat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFindFormat
+ *(void **) (&XRenderFindFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindFormat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFindStandardFormat
+ *(void **) (&XRenderFindStandardFormat_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFindStandardFormat");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQueryPictIndexValues
+ *(void **) (&XRenderQueryPictIndexValues_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryPictIndexValues");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreatePicture
+ *(void **) (&XRenderCreatePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreatePicture");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderChangePicture
+ *(void **) (&XRenderChangePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderChangePicture");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetPictureClipRectangles
+ *(void **) (&XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureClipRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetPictureClipRegion
+ *(void **) (&XRenderSetPictureClipRegion_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureClipRegion");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetPictureTransform
+ *(void **) (&XRenderSetPictureTransform_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureTransform");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFreePicture
+ *(void **) (&XRenderFreePicture_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreePicture");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderComposite
+ *(void **) (&XRenderComposite_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderComposite");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateGlyphSet
+ *(void **) (&XRenderCreateGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateGlyphSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderReferenceGlyphSet
+ *(void **) (&XRenderReferenceGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderReferenceGlyphSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFreeGlyphSet
+ *(void **) (&XRenderFreeGlyphSet_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreeGlyphSet");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderAddGlyphs
+ *(void **) (&XRenderAddGlyphs_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderAddGlyphs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFreeGlyphs
+ *(void **) (&XRenderFreeGlyphs_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFreeGlyphs");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeString8
+ *(void **) (&XRenderCompositeString8_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString8");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeString16
+ *(void **) (&XRenderCompositeString16_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeString32
+ *(void **) (&XRenderCompositeString32_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeString32");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeText8
+ *(void **) (&XRenderCompositeText8_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText8");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeText16
+ *(void **) (&XRenderCompositeText16_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText16");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeText32
+ *(void **) (&XRenderCompositeText32_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeText32");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFillRectangle
+ *(void **) (&XRenderFillRectangle_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFillRectangle");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderFillRectangles
+ *(void **) (&XRenderFillRectangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderFillRectangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeTrapezoids
+ *(void **) (&XRenderCompositeTrapezoids_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTrapezoids");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeTriangles
+ *(void **) (&XRenderCompositeTriangles_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriangles");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeTriStrip
+ *(void **) (&XRenderCompositeTriStrip_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriStrip");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeTriFan
+ *(void **) (&XRenderCompositeTriFan_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeTriFan");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCompositeDoublePoly
+ *(void **) (&XRenderCompositeDoublePoly_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCompositeDoublePoly");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderParseColor
+ *(void **) (&XRenderParseColor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderParseColor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateCursor
+ *(void **) (&XRenderCreateCursor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderQueryFilters
+ *(void **) (&XRenderQueryFilters_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderQueryFilters");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderSetPictureFilter
+ *(void **) (&XRenderSetPictureFilter_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderSetPictureFilter");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateAnimCursor
+ *(void **) (&XRenderCreateAnimCursor_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateAnimCursor");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderAddTraps
+ *(void **) (&XRenderAddTraps_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderAddTraps");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateSolidFill
+ *(void **) (&XRenderCreateSolidFill_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateSolidFill");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateLinearGradient
+ *(void **) (&XRenderCreateLinearGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateLinearGradient");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateRadialGradient
+ *(void **) (&XRenderCreateRadialGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateRadialGradient");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+// XRenderCreateConicalGradient
+ *(void **) (&XRenderCreateConicalGradient_dylibloader_wrapper_xrender) = dlsym(handle, "XRenderCreateConicalGradient");
+ if (verbose) {
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+ }
+return 0;
+}
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..d3862ed459
--- /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-existant symbols inherited from
+// libX11, but absent in libXrender.so.1, were removed.
+#include <stdint.h>
+
+#define XRenderQueryExtension XRenderQueryExtension_dylibloader_orig_xrender
+#define XRenderQueryVersion XRenderQueryVersion_dylibloader_orig_xrender
+#define XRenderQueryFormats XRenderQueryFormats_dylibloader_orig_xrender
+#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_orig_xrender
+#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_orig_xrender
+#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_orig_xrender
+#define XRenderFindFormat XRenderFindFormat_dylibloader_orig_xrender
+#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_orig_xrender
+#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_orig_xrender
+#define XRenderCreatePicture XRenderCreatePicture_dylibloader_orig_xrender
+#define XRenderChangePicture XRenderChangePicture_dylibloader_orig_xrender
+#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_orig_xrender
+#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_orig_xrender
+#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_orig_xrender
+#define XRenderFreePicture XRenderFreePicture_dylibloader_orig_xrender
+#define XRenderComposite XRenderComposite_dylibloader_orig_xrender
+#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_orig_xrender
+#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_orig_xrender
+#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_orig_xrender
+#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_orig_xrender
+#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_orig_xrender
+#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_orig_xrender
+#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_orig_xrender
+#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_orig_xrender
+#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_orig_xrender
+#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_orig_xrender
+#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_orig_xrender
+#define XRenderFillRectangle XRenderFillRectangle_dylibloader_orig_xrender
+#define XRenderFillRectangles XRenderFillRectangles_dylibloader_orig_xrender
+#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_orig_xrender
+#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_orig_xrender
+#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_orig_xrender
+#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_orig_xrender
+#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_orig_xrender
+#define XRenderParseColor XRenderParseColor_dylibloader_orig_xrender
+#define XRenderCreateCursor XRenderCreateCursor_dylibloader_orig_xrender
+#define XRenderQueryFilters XRenderQueryFilters_dylibloader_orig_xrender
+#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_orig_xrender
+#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_orig_xrender
+#define XRenderAddTraps XRenderAddTraps_dylibloader_orig_xrender
+#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_orig_xrender
+#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_orig_xrender
+#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_orig_xrender
+#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_orig_xrender
+#include <X11/extensions/Xrender.h>
+#undef XRenderQueryExtension
+#undef XRenderQueryVersion
+#undef XRenderQueryFormats
+#undef XRenderQuerySubpixelOrder
+#undef XRenderSetSubpixelOrder
+#undef XRenderFindVisualFormat
+#undef XRenderFindFormat
+#undef XRenderFindStandardFormat
+#undef XRenderQueryPictIndexValues
+#undef XRenderCreatePicture
+#undef XRenderChangePicture
+#undef XRenderSetPictureClipRectangles
+#undef XRenderSetPictureClipRegion
+#undef XRenderSetPictureTransform
+#undef XRenderFreePicture
+#undef XRenderComposite
+#undef XRenderCreateGlyphSet
+#undef XRenderReferenceGlyphSet
+#undef XRenderFreeGlyphSet
+#undef XRenderAddGlyphs
+#undef XRenderFreeGlyphs
+#undef XRenderCompositeString8
+#undef XRenderCompositeString16
+#undef XRenderCompositeString32
+#undef XRenderCompositeText8
+#undef XRenderCompositeText16
+#undef XRenderCompositeText32
+#undef XRenderFillRectangle
+#undef XRenderFillRectangles
+#undef XRenderCompositeTrapezoids
+#undef XRenderCompositeTriangles
+#undef XRenderCompositeTriStrip
+#undef XRenderCompositeTriFan
+#undef XRenderCompositeDoublePoly
+#undef XRenderParseColor
+#undef XRenderCreateCursor
+#undef XRenderQueryFilters
+#undef XRenderSetPictureFilter
+#undef XRenderCreateAnimCursor
+#undef XRenderAddTraps
+#undef XRenderCreateSolidFill
+#undef XRenderCreateLinearGradient
+#undef XRenderCreateRadialGradient
+#undef XRenderCreateConicalGradient
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define XRenderQueryExtension XRenderQueryExtension_dylibloader_wrapper_xrender
+#define XRenderQueryVersion XRenderQueryVersion_dylibloader_wrapper_xrender
+#define XRenderQueryFormats XRenderQueryFormats_dylibloader_wrapper_xrender
+#define XRenderQuerySubpixelOrder XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender
+#define XRenderSetSubpixelOrder XRenderSetSubpixelOrder_dylibloader_wrapper_xrender
+#define XRenderFindVisualFormat XRenderFindVisualFormat_dylibloader_wrapper_xrender
+#define XRenderFindFormat XRenderFindFormat_dylibloader_wrapper_xrender
+#define XRenderFindStandardFormat XRenderFindStandardFormat_dylibloader_wrapper_xrender
+#define XRenderQueryPictIndexValues XRenderQueryPictIndexValues_dylibloader_wrapper_xrender
+#define XRenderCreatePicture XRenderCreatePicture_dylibloader_wrapper_xrender
+#define XRenderChangePicture XRenderChangePicture_dylibloader_wrapper_xrender
+#define XRenderSetPictureClipRectangles XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender
+#define XRenderSetPictureClipRegion XRenderSetPictureClipRegion_dylibloader_wrapper_xrender
+#define XRenderSetPictureTransform XRenderSetPictureTransform_dylibloader_wrapper_xrender
+#define XRenderFreePicture XRenderFreePicture_dylibloader_wrapper_xrender
+#define XRenderComposite XRenderComposite_dylibloader_wrapper_xrender
+#define XRenderCreateGlyphSet XRenderCreateGlyphSet_dylibloader_wrapper_xrender
+#define XRenderReferenceGlyphSet XRenderReferenceGlyphSet_dylibloader_wrapper_xrender
+#define XRenderFreeGlyphSet XRenderFreeGlyphSet_dylibloader_wrapper_xrender
+#define XRenderAddGlyphs XRenderAddGlyphs_dylibloader_wrapper_xrender
+#define XRenderFreeGlyphs XRenderFreeGlyphs_dylibloader_wrapper_xrender
+#define XRenderCompositeString8 XRenderCompositeString8_dylibloader_wrapper_xrender
+#define XRenderCompositeString16 XRenderCompositeString16_dylibloader_wrapper_xrender
+#define XRenderCompositeString32 XRenderCompositeString32_dylibloader_wrapper_xrender
+#define XRenderCompositeText8 XRenderCompositeText8_dylibloader_wrapper_xrender
+#define XRenderCompositeText16 XRenderCompositeText16_dylibloader_wrapper_xrender
+#define XRenderCompositeText32 XRenderCompositeText32_dylibloader_wrapper_xrender
+#define XRenderFillRectangle XRenderFillRectangle_dylibloader_wrapper_xrender
+#define XRenderFillRectangles XRenderFillRectangles_dylibloader_wrapper_xrender
+#define XRenderCompositeTrapezoids XRenderCompositeTrapezoids_dylibloader_wrapper_xrender
+#define XRenderCompositeTriangles XRenderCompositeTriangles_dylibloader_wrapper_xrender
+#define XRenderCompositeTriStrip XRenderCompositeTriStrip_dylibloader_wrapper_xrender
+#define XRenderCompositeTriFan XRenderCompositeTriFan_dylibloader_wrapper_xrender
+#define XRenderCompositeDoublePoly XRenderCompositeDoublePoly_dylibloader_wrapper_xrender
+#define XRenderParseColor XRenderParseColor_dylibloader_wrapper_xrender
+#define XRenderCreateCursor XRenderCreateCursor_dylibloader_wrapper_xrender
+#define XRenderQueryFilters XRenderQueryFilters_dylibloader_wrapper_xrender
+#define XRenderSetPictureFilter XRenderSetPictureFilter_dylibloader_wrapper_xrender
+#define XRenderCreateAnimCursor XRenderCreateAnimCursor_dylibloader_wrapper_xrender
+#define XRenderAddTraps XRenderAddTraps_dylibloader_wrapper_xrender
+#define XRenderCreateSolidFill XRenderCreateSolidFill_dylibloader_wrapper_xrender
+#define XRenderCreateLinearGradient XRenderCreateLinearGradient_dylibloader_wrapper_xrender
+#define XRenderCreateRadialGradient XRenderCreateRadialGradient_dylibloader_wrapper_xrender
+#define XRenderCreateConicalGradient XRenderCreateConicalGradient_dylibloader_wrapper_xrender
+extern int (*XRenderQueryExtension_dylibloader_wrapper_xrender)( Display*, int*, int*);
+extern int (*XRenderQueryVersion_dylibloader_wrapper_xrender)( Display*, int*, int*);
+extern int (*XRenderQueryFormats_dylibloader_wrapper_xrender)( Display*);
+extern int (*XRenderQuerySubpixelOrder_dylibloader_wrapper_xrender)( Display*, int);
+extern int (*XRenderSetSubpixelOrder_dylibloader_wrapper_xrender)( Display*, int, int);
+extern XRenderPictFormat* (*XRenderFindVisualFormat_dylibloader_wrapper_xrender)( Display*,const Visual*);
+extern XRenderPictFormat* (*XRenderFindFormat_dylibloader_wrapper_xrender)( Display*, unsigned long,const XRenderPictFormat*, int);
+extern XRenderPictFormat* (*XRenderFindStandardFormat_dylibloader_wrapper_xrender)( Display*, int);
+extern XIndexValue* (*XRenderQueryPictIndexValues_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*, int*);
+extern Picture (*XRenderCreatePicture_dylibloader_wrapper_xrender)( Display*, Drawable,const XRenderPictFormat*, unsigned long,const XRenderPictureAttributes*);
+extern void (*XRenderChangePicture_dylibloader_wrapper_xrender)( Display*, Picture, unsigned long,const XRenderPictureAttributes*);
+extern void (*XRenderSetPictureClipRectangles_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XRectangle*, int);
+extern void (*XRenderSetPictureClipRegion_dylibloader_wrapper_xrender)( Display*, Picture, Region);
+extern void (*XRenderSetPictureTransform_dylibloader_wrapper_xrender)( Display*, Picture, XTransform*);
+extern void (*XRenderFreePicture_dylibloader_wrapper_xrender)( Display*, Picture);
+extern void (*XRenderComposite_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture, Picture, int, int, int, int, int, int, unsigned int, unsigned int);
+extern GlyphSet (*XRenderCreateGlyphSet_dylibloader_wrapper_xrender)( Display*,const XRenderPictFormat*);
+extern GlyphSet (*XRenderReferenceGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
+extern void (*XRenderFreeGlyphSet_dylibloader_wrapper_xrender)( Display*, GlyphSet);
+extern void (*XRenderAddGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*,const XGlyphInfo*, int,const char*, int);
+extern void (*XRenderFreeGlyphs_dylibloader_wrapper_xrender)( Display*, GlyphSet,const Glyph*, int);
+extern void (*XRenderCompositeString8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const char*, int);
+extern void (*XRenderCompositeString16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned short*, int);
+extern void (*XRenderCompositeString32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, GlyphSet, int, int, int, int,const unsigned int*, int);
+extern void (*XRenderCompositeText8_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt8*, int);
+extern void (*XRenderCompositeText16_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt16*, int);
+extern void (*XRenderCompositeText32_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XGlyphElt32*, int);
+extern void (*XRenderFillRectangle_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*, int, int, unsigned int, unsigned int);
+extern void (*XRenderFillRectangles_dylibloader_wrapper_xrender)( Display*, int, Picture,const XRenderColor*,const XRectangle*, int);
+extern void (*XRenderCompositeTrapezoids_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTrapezoid*, int);
+extern void (*XRenderCompositeTriangles_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XTriangle*, int);
+extern void (*XRenderCompositeTriStrip_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
+extern void (*XRenderCompositeTriFan_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int,const XPointFixed*, int);
+extern void (*XRenderCompositeDoublePoly_dylibloader_wrapper_xrender)( Display*, int, Picture, Picture,const XRenderPictFormat*, int, int, int, int,const XPointDouble*, int, int);
+extern int (*XRenderParseColor_dylibloader_wrapper_xrender)( Display*, char*, XRenderColor*);
+extern Cursor (*XRenderCreateCursor_dylibloader_wrapper_xrender)( Display*, Picture, unsigned int, unsigned int);
+extern XFilters* (*XRenderQueryFilters_dylibloader_wrapper_xrender)( Display*, Drawable);
+extern void (*XRenderSetPictureFilter_dylibloader_wrapper_xrender)( Display*, Picture,const char*, XFixed*, int);
+extern Cursor (*XRenderCreateAnimCursor_dylibloader_wrapper_xrender)( Display*, int, XAnimCursor*);
+extern void (*XRenderAddTraps_dylibloader_wrapper_xrender)( Display*, Picture, int, int,const XTrap*, int);
+extern Picture (*XRenderCreateSolidFill_dylibloader_wrapper_xrender)( Display*,const XRenderColor*);
+extern Picture (*XRenderCreateLinearGradient_dylibloader_wrapper_xrender)( Display*,const XLinearGradient*,const XFixed*,const XRenderColor*, int);
+extern Picture (*XRenderCreateRadialGradient_dylibloader_wrapper_xrender)( Display*,const XRadialGradient*,const XFixed*,const XRenderColor*, int);
+extern Picture (*XRenderCreateConicalGradient_dylibloader_wrapper_xrender)( Display*,const XConicalGradient*,const XFixed*,const XRenderColor*, int);
+int initialize_xrender(int verbose);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/x11/gl_manager_x11.cpp b/platform/linuxbsd/x11/gl_manager_x11.cpp
index bcefcf9695..12846f148d 100644
--- a/platform/linuxbsd/x11/gl_manager_x11.cpp
+++ b/platform/linuxbsd/x11/gl_manager_x11.cpp
@@ -321,8 +321,8 @@ void GLManager_X11::swap_buffers() {
glXSwapBuffers(_x_windisp.x11_display, _x_windisp.x11_window);
}
-Error GLManager_X11::initialize() {
- if (!gladLoaderLoadGLX(nullptr, 0)) {
+Error GLManager_X11::initialize(Display *p_display) {
+ if (!gladLoaderLoadGLX(p_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(p_display)))) {
return ERR_CANT_CREATE;
}
diff --git a/platform/linuxbsd/x11/gl_manager_x11.h b/platform/linuxbsd/x11/gl_manager_x11.h
index 1594c82801..3ab37b54ac 100644
--- a/platform/linuxbsd/x11/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,7 +112,7 @@ public:
void window_make_current(DisplayServer::WindowID p_window_id);
- Error initialize();
+ Error initialize(Display *p_display);
void set_use_vsync(bool p_use);
bool is_using_vsync() const;
diff --git a/platform/macos/export/plist.cpp b/platform/macos/export/plist.cpp
index cad014e65b..82ecd41d9c 100644
--- a/platform/macos/export/plist.cpp
+++ b/platform/macos/export/plist.cpp
@@ -353,7 +353,7 @@ bool PList::load_file(const String &p_filename) {
} 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/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 e620b058d3..ebba96ceb1 100644
--- a/platform/macos/os_macos.mm
+++ b/platform/macos/os_macos.mm
@@ -336,9 +336,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 +349,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 +514,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;
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 705e83dace..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
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 29482213d8..c704a26b7a 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -2910,11 +2910,10 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
old_x = mm->get_position().x;
old_y = mm->get_position().y;
- if (!windows[receiving_window_id].window_has_focus) {
- // In case of unfocused Popups, adjust event position.
- Point2i pos = mm->get_position() - window_get_position(receiving_window_id) + window_get_position(window_id);
- mm->set_position(pos);
- mm->set_global_position(pos);
+ 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);
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index d8548eb545..e957a25e87 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>
@@ -189,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() {
@@ -203,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
@@ -726,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;
@@ -771,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";
@@ -784,18 +908,157 @@ 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;
+}
+
+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>();
+ }
+
+ 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;
+}
- 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());
+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();
+ }
- 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);
UINT32 index = 0;
BOOL exists = false;
- font_collection->FindFamilyName((const WCHAR *)font_name.utf16().get_data(), &index, &exists);
+ HRESULT hr = font_collection->FindFamilyName((const WCHAR *)font_name.utf16().get_data(), &index, &exists);
if (FAILED(hr)) {
return String();
}
@@ -807,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();
}
@@ -1192,7 +1455,7 @@ String OS_Windows::get_unique_id() const {
bool OS_Windows::_check_internal_feature_support(const String &p_feature) {
if (p_feature == "system_fonts") {
- return true;
+ return dwrite_init;
}
if (p_feature == "pc") {
return true;
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 6f89be699a..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>
@@ -79,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();
@@ -114,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;
@@ -172,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/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index b5945a4562..b68a8fb031 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -177,7 +177,7 @@ void PathFollow2D::_update_transform() {
}
if (rotates) {
- Transform2D xform = c->sample_baked_with_rotation(progress, cubic, loop, lookahead);
+ Transform2D xform = c->sample_baked_with_rotation(progress, cubic);
xform.translate_local(v_offset, h_offset);
set_rotation(xform[1].angle());
set_position(xform[2]);
diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp
index 04d164ba88..88b1c340d8 100644
--- a/scene/3d/mesh_instance_3d.cpp
+++ b/scene/3d/mesh_instance_3d.cpp
@@ -322,6 +322,11 @@ void MeshInstance3D::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
_resolve_skeleton_path();
} break;
+ case NOTIFICATION_TRANSLATION_CHANGED: {
+ if (mesh.is_valid()) {
+ mesh->notification(NOTIFICATION_TRANSLATION_CHANGED);
+ }
+ } break;
}
}
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp
index ca7d1dfc1d..05fc73306c 100644
--- a/scene/3d/xr_nodes.cpp
+++ b/scene/3d/xr_nodes.cpp
@@ -627,7 +627,9 @@ void XROrigin3D::set_world_scale(real_t p_world_scale) {
xr_server->set_world_scale(p_world_scale);
}
-void XROrigin3D::set_current(bool p_enabled) {
+void XROrigin3D::_set_current(bool p_enabled, bool p_update_others) {
+ // We run this logic even if current already equals p_enabled as we may have set this previously before we entered our tree.
+ // This is then called a second time on NOTIFICATION_ENTER_TREE where we actually process activating this origin node.
current = p_enabled;
if (!is_inside_tree() || Engine::get_singleton()->is_editor_hint()) {
@@ -638,30 +640,38 @@ void XROrigin3D::set_current(bool p_enabled) {
set_notify_local_transform(current);
set_notify_transform(current);
+ // update XRServer with our current position
if (current) {
- for (int i = 0; i < origin_nodes.size(); i++) {
- if (origin_nodes[i] != this) {
- origin_nodes[i]->set_current(false);
- }
- }
-
- // update XRServer with our current position
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL(xr_server);
xr_server->set_world_origin(get_global_transform());
- } else {
- bool found = false;
- // We no longer have a current origin so find the first one we can make current
- for (int i = 0; !found && i < origin_nodes.size(); i++) {
- if (origin_nodes[i] != this) {
- origin_nodes[i]->set_current(true);
- found = true;
+ }
+
+ // Check if we need to update our other origin nodes accordingly
+ if (p_update_others) {
+ if (current) {
+ for (int i = 0; i < origin_nodes.size(); i++) {
+ if (origin_nodes[i] != this && origin_nodes[i]->current) {
+ origin_nodes[i]->_set_current(false, false);
+ }
+ }
+ } else {
+ // We no longer have a current origin so find the first one we can make current
+ for (int i = 0; i < origin_nodes.size(); i++) {
+ if (origin_nodes[i] != this) {
+ origin_nodes[i]->_set_current(true, false);
+ return; // we are done.
+ }
}
}
}
}
+void XROrigin3D::set_current(bool p_enabled) {
+ _set_current(p_enabled, true);
+}
+
bool XROrigin3D::is_current() const {
if (Engine::get_singleton()->is_editor_hint()) {
// return as is
diff --git a/scene/3d/xr_nodes.h b/scene/3d/xr_nodes.h
index 990fb61983..ec8e151a08 100644
--- a/scene/3d/xr_nodes.h
+++ b/scene/3d/xr_nodes.h
@@ -183,6 +183,8 @@ private:
bool current = false;
static Vector<XROrigin3D *> origin_nodes; // all origin nodes in tree
+ void _set_current(bool p_enabled, bool p_update_others);
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index ee6fb58583..f7baa7facc 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -664,7 +664,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
}
}
- if (update_mode == Animation::UPDATE_CONTINUOUS || update_mode == Animation::UPDATE_CAPTURE || (p_delta == 0 && update_mode == Animation::UPDATE_DISCRETE)) { //delta == 0 means seek
+ if (update_mode == Animation::UPDATE_CONTINUOUS || update_mode == Animation::UPDATE_CAPTURE) {
Variant value = a->value_track_interpolate(i, p_time);
if (value == Variant()) {
@@ -681,15 +681,23 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
pa->value_accum = Animation::interpolate_variant(pa->value_accum, value, p_interp);
}
- } else if (p_is_current && p_delta != 0) {
+ } else {
List<int> indices;
- if (p_started) {
- int first_key = a->track_find_key(i, p_prev_time, true);
- if (first_key >= 0) {
- indices.push_back(first_key);
+
+ if (p_seeked) {
+ int found_key = a->track_find_key(i, p_time);
+ if (found_key >= 0) {
+ indices.push_back(found_key);
}
+ } else {
+ if (p_started) {
+ int first_key = a->track_find_key(i, p_prev_time, true);
+ if (first_key >= 0) {
+ indices.push_back(first_key);
+ }
+ }
+ a->track_get_key_indices_in_range(i, p_time, p_delta, &indices, p_looped_flag);
}
- a->track_get_key_indices_in_range(i, p_time, p_delta, &indices, p_looped_flag);
for (int &F : indices) {
Variant value = a->track_get_key_value(i, F);
@@ -740,21 +748,26 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (!nc->node) {
continue;
}
- if (p_delta == 0) {
- continue;
- }
if (!p_is_current) {
break;
}
List<int> indices;
- if (p_started) {
- int first_key = a->track_find_key(i, p_prev_time, true);
- if (first_key >= 0) {
- indices.push_back(first_key);
+
+ if (p_seeked) {
+ int found_key = a->track_find_key(i, p_time);
+ if (found_key >= 0) {
+ indices.push_back(found_key);
+ }
+ } else {
+ if (p_started) {
+ int first_key = a->track_find_key(i, p_prev_time, true);
+ if (first_key >= 0) {
+ indices.push_back(first_key);
+ }
}
+ a->track_get_key_indices_in_range(i, p_time, p_delta, &indices, p_looped_flag);
}
- a->track_get_key_indices_in_range(i, p_time, p_delta, &indices, p_looped_flag);
for (int &E : indices) {
StringName method = a->method_track_get_name(i, E);
@@ -798,9 +811,6 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (!nc->node) {
continue;
}
- if (p_delta == 0) {
- continue;
- }
if (p_seeked) {
//find whatever should be playing
@@ -910,7 +920,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
continue;
}
- if (p_delta == 0 || p_seeked) {
+ if (p_seeked) {
//seek
int idx = a->track_find_key(i, p_time);
if (idx < 0) {
@@ -945,7 +955,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
break;
}
- if (player->is_playing() || p_seeked) {
+ if (player->is_playing()) {
player->play(anim_name);
player->seek(at_anim_pos);
nc->animation_playing = true;
@@ -1056,7 +1066,7 @@ void AnimationPlayer::_animation_process2(double p_delta, bool p_started) {
accum_pass++;
- _animation_process_data(c.current, p_delta, 1.0f, c.seeked && p_delta != 0, p_started);
+ _animation_process_data(c.current, p_delta, 1.0f, c.seeked, p_started);
if (p_delta != 0) {
c.seeked = false;
}
@@ -2135,7 +2145,7 @@ void AnimationPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationPlayer::advance);
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "root_node"), "set_root", "get_root");
- ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "current_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ANIMATE_AS_TRIGGER), "set_current_animation", "get_current_animation");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "current_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_EDITOR), "set_current_animation", "get_current_animation");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "assigned_animation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_assigned_animation", "get_assigned_animation");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "autoplay", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_autoplay", "get_autoplay");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "reset_on_save", PROPERTY_HINT_NONE, ""), "set_reset_on_save_enabled", "is_reset_on_save_enabled");
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 16621faa33..bd9b918900 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -586,7 +586,7 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) {
track_value->object = child;
}
- track_value->is_discrete = anim->value_track_get_update_mode(i) == Animation::UPDATE_DISCRETE || anim->value_track_get_update_mode(i) == Animation::UPDATE_TRIGGER;
+ track_value->is_discrete = anim->value_track_get_update_mode(i) == Animation::UPDATE_DISCRETE;
track_value->is_using_angle = anim->track_get_interpolation_type(i) == Animation::INTERPOLATION_LINEAR_ANGLE || anim->track_get_interpolation_type(i) == Animation::INTERPOLATION_CUBIC_ANGLE;
track_value->subpath = leftover_path;
@@ -803,11 +803,11 @@ bool AnimationTree::_update_caches(AnimationPlayer *player) {
TrackCacheValue *track_value = static_cast<TrackCacheValue *>(track);
bool was_discrete = track_value->is_discrete;
bool was_using_angle = track_value->is_using_angle;
- track_value->is_discrete |= anim->value_track_get_update_mode(i) == Animation::UPDATE_DISCRETE || anim->value_track_get_update_mode(i) == Animation::UPDATE_TRIGGER;
+ track_value->is_discrete |= anim->value_track_get_update_mode(i) == Animation::UPDATE_DISCRETE;
track_value->is_using_angle |= anim->track_get_interpolation_type(i) == Animation::INTERPOLATION_LINEAR_ANGLE || anim->track_get_interpolation_type(i) == Animation::INTERPOLATION_CUBIC_ANGLE;
if (was_discrete != track_value->is_discrete) {
- ERR_PRINT_ED("Value track: " + String(path) + " with different update modes are blended. Blending prioritizes Discrete/Trigger mode, so other update mode tracks will not be blended.");
+ ERR_PRINT_ED("Value track: " + String(path) + " with different update modes are blended. Blending prioritizes Discrete mode, so other update mode tracks will not be blended.");
}
if (was_using_angle != track_value->is_using_angle) {
WARN_PRINT_ED("Value track: " + String(path) + " with different interpolation types for rotation are blended. Blending prioritizes angle interpolation, so the blending result uses the shortest path referenced to the initial (RESET animation) value.");
@@ -1670,7 +1670,7 @@ void AnimationTree::_process_graph(double p_delta) {
TrackCacheValue *t = static_cast<TrackCacheValue *>(track);
if (t->is_discrete) {
- break; // Don't overwrite the value set by UPDATE_DISCRETE or UPDATE_TRIGGER.
+ break; // Don't overwrite the value set by UPDATE_DISCRETE.
}
if (t->init_value.get_type() == Variant::BOOL) {
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 9e0dc049e5..f46daef127 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -378,12 +378,13 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
}
if (symbol_lookup_on_click_enabled) {
- if (mm->is_command_or_control_pressed() && mm->get_button_mask() == MouseButton::NONE && !is_dragging_cursor()) {
+ if (mm->is_command_or_control_pressed() && mm->get_button_mask() == MouseButton::NONE) {
+ symbol_lookup_pos = get_line_column_at_pos(mpos);
symbol_lookup_new_word = get_word_at_pos(mpos);
if (symbol_lookup_new_word != symbol_lookup_word) {
emit_signal(SNAME("symbol_validate"), symbol_lookup_new_word);
}
- } else {
+ } else if (!mm->is_command_or_control_pressed() || (mm->get_button_mask() != MouseButton::NONE && symbol_lookup_pos != get_line_column_at_pos(mpos))) {
set_symbol_lookup_word_as_valid(false);
}
}
diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h
index cbbc13480e..e409c7c82b 100644
--- a/scene/gui/code_edit.h
+++ b/scene/gui/code_edit.h
@@ -236,6 +236,7 @@ private:
String symbol_lookup_new_word = "";
String symbol_lookup_word = "";
+ Point2i symbol_lookup_pos;
/* Visual */
Ref<StyleBox> style_normal;
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 5df4c066e4..83c789f3d5 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -366,38 +366,46 @@ void GraphNode::_notification(int p_what) {
close_rect = Rect2();
}
- for (const KeyValue<int, Slot> &E : slot_info) {
- if (E.key < 0 || E.key >= cache_y.size()) {
- continue;
- }
- if (!slot_info.has(E.key)) {
- continue;
- }
- const Slot &s = slot_info[E.key];
- // Left port.
- if (s.enable_left) {
- Ref<Texture2D> p = port;
- if (s.custom_slot_left.is_valid()) {
- p = s.custom_slot_left;
+ if (get_child_count() > 0) {
+ for (const KeyValue<int, Slot> &E : slot_info) {
+ if (E.key < 0 || E.key >= cache_y.size()) {
+ continue;
}
- p->draw(get_canvas_item(), icofs + Point2(edgeofs, cache_y[E.key]), s.color_left);
- }
- // Right port.
- if (s.enable_right) {
- Ref<Texture2D> p = port;
- if (s.custom_slot_right.is_valid()) {
- p = s.custom_slot_right;
+ if (!slot_info.has(E.key)) {
+ continue;
+ }
+ const Slot &s = slot_info[E.key];
+ // Left port.
+ if (s.enable_left) {
+ Ref<Texture2D> p = port;
+ if (s.custom_slot_left.is_valid()) {
+ p = s.custom_slot_left;
+ }
+ p->draw(get_canvas_item(), icofs + Point2(edgeofs, cache_y[E.key]), s.color_left);
+ }
+ // Right port.
+ if (s.enable_right) {
+ Ref<Texture2D> p = port;
+ if (s.custom_slot_right.is_valid()) {
+ p = s.custom_slot_right;
+ }
+ p->draw(get_canvas_item(), icofs + Point2(get_size().x - edgeofs, cache_y[E.key]), s.color_right);
}
- p->draw(get_canvas_item(), icofs + Point2(get_size().x - edgeofs, cache_y[E.key]), s.color_right);
- }
- // Draw slot stylebox.
- if (s.draw_stylebox) {
- Control *c = Object::cast_to<Control>(get_child(E.key));
- Rect2 c_rect = c->get_rect();
- c_rect.position.x = sb->get_margin(SIDE_LEFT);
- c_rect.size.width = w;
- draw_style_box(sb_slot, c_rect);
+ // Draw slot stylebox.
+ if (s.draw_stylebox) {
+ Control *c = Object::cast_to<Control>(get_child(E.key));
+ if (!c || !c->is_visible_in_tree()) {
+ continue;
+ }
+ if (c->is_set_as_top_level()) {
+ continue;
+ }
+ Rect2 c_rect = c->get_rect();
+ c_rect.position.x = sb->get_margin(SIDE_LEFT);
+ c_rect.size.width = w;
+ draw_style_box(sb_slot, c_rect);
+ }
}
}
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 8a77c39487..bd39ee3bb3 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -768,18 +768,18 @@ void LineEdit::_notification(int p_what) {
case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
window_has_focus = true;
- draw_caret = true;
+ _validate_caret_can_draw();
queue_redraw();
} break;
case NOTIFICATION_WM_WINDOW_FOCUS_OUT: {
window_has_focus = false;
- draw_caret = false;
+ _validate_caret_can_draw();
queue_redraw();
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
- if (caret_blinking) {
+ if (caret_blink_enabled && caret_can_draw) {
caret_blink_timer += get_process_delta_time();
if (caret_blink_timer >= caret_blink_interval) {
@@ -790,10 +790,6 @@ void LineEdit::_notification(int p_what) {
} break;
case NOTIFICATION_DRAW: {
- if ((!has_focus() && !(menu && menu->has_focus()) && !caret_force_displayed) || !window_has_focus) {
- draw_caret = false;
- }
-
int width, height;
bool rtl = is_layout_rtl();
@@ -806,7 +802,6 @@ void LineEdit::_notification(int p_what) {
Ref<StyleBox> style = theme_cache.normal;
if (!is_editable()) {
style = theme_cache.read_only;
- draw_caret = false;
}
Ref<Font> font = theme_cache.font;
@@ -953,7 +948,7 @@ void LineEdit::_notification(int p_what) {
// Draw carets.
ofs.x = x_ofs + scroll_offset;
- if (draw_caret || drag_caret_force_displayed) {
+ if ((caret_can_draw && draw_caret) || drag_caret_force_displayed) {
// Prevent carets from disappearing at theme scales below 1.0 (if the caret width is 1).
const int caret_width = theme_cache.caret_width * MAX(1, theme_cache.base_scale);
@@ -1063,16 +1058,7 @@ void LineEdit::_notification(int p_what) {
} break;
case NOTIFICATION_FOCUS_ENTER: {
- if (!caret_force_displayed) {
- if (caret_blink_enabled) {
- if (!caret_blinking) {
- caret_blinking = true;
- caret_blink_timer = 0.0;
- }
- } else {
- draw_caret = true;
- }
- }
+ _validate_caret_can_draw();
if (select_all_on_focus) {
if (Input::get_singleton()->is_mouse_button_pressed(MouseButton::LEFT)) {
@@ -1093,9 +1079,7 @@ void LineEdit::_notification(int p_what) {
} break;
case NOTIFICATION_FOCUS_EXIT: {
- if (caret_blink_enabled && !caret_force_displayed) {
- caret_blinking = false;
- }
+ _validate_caret_can_draw();
if (get_viewport()->get_window_id() != DisplayServer::INVALID_WINDOW_ID && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_IME)) {
DisplayServer::get_singleton()->window_set_ime_position(Point2(), get_viewport()->get_window_id());
@@ -1401,21 +1385,18 @@ bool LineEdit::is_caret_blink_enabled() const {
}
void LineEdit::set_caret_blink_enabled(const bool p_enabled) {
+ if (caret_blink_enabled == p_enabled) {
+ return;
+ }
+
caret_blink_enabled = p_enabled;
set_process_internal(p_enabled);
- if (has_focus() || caret_force_displayed) {
- if (p_enabled) {
- if (!caret_blinking) {
- caret_blinking = true;
- caret_blink_timer = 0.0;
- }
- } else {
- caret_blinking = false;
- }
+ draw_caret = !caret_blink_enabled;
+ if (caret_blink_enabled) {
+ caret_blink_timer = 0.0;
}
-
- draw_caret = true;
+ queue_redraw();
notify_property_list_changed();
}
@@ -1425,8 +1406,13 @@ bool LineEdit::is_caret_force_displayed() const {
}
void LineEdit::set_caret_force_displayed(const bool p_enabled) {
+ if (caret_force_displayed == p_enabled) {
+ return;
+ }
+
caret_force_displayed = p_enabled;
- set_caret_blink_enabled(caret_blink_enabled);
+ _validate_caret_can_draw();
+
queue_redraw();
}
@@ -1442,7 +1428,7 @@ void LineEdit::set_caret_blink_interval(const float p_interval) {
void LineEdit::_reset_caret_blink_timer() {
if (caret_blink_enabled) {
draw_caret = true;
- if (has_focus()) {
+ if (caret_can_draw) {
caret_blink_timer = 0.0;
queue_redraw();
}
@@ -1451,11 +1437,19 @@ void LineEdit::_reset_caret_blink_timer() {
void LineEdit::_toggle_draw_caret() {
draw_caret = !draw_caret;
- if (is_visible_in_tree() && ((has_focus() && window_has_focus) || caret_force_displayed)) {
+ if (is_visible_in_tree() && caret_can_draw) {
queue_redraw();
}
}
+void LineEdit::_validate_caret_can_draw() {
+ if (caret_blink_enabled) {
+ draw_caret = true;
+ caret_blink_timer = 0.0;
+ }
+ caret_can_draw = editable && (window_has_focus || (menu && menu->has_focus())) && (has_focus() || caret_force_displayed);
+}
+
void LineEdit::delete_char() {
if ((text.length() <= 0) || (caret_column == 0)) {
return;
@@ -1846,6 +1840,7 @@ void LineEdit::set_editable(bool p_editable) {
}
editable = p_editable;
+ _validate_caret_can_draw();
update_minimum_size();
queue_redraw();
@@ -2523,6 +2518,8 @@ void LineEdit::_ensure_menu() {
menu->add_child(menu_ctl, false, INTERNAL_MODE_FRONT);
menu->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
+ menu->connect(SNAME("focus_entered"), callable_mp(this, &LineEdit::_validate_caret_can_draw));
+ menu->connect(SNAME("focus_exited"), callable_mp(this, &LineEdit::_validate_caret_can_draw));
menu_dir->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
menu_ctl->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
}
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index e0a079b623..79db9dce21 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -172,7 +172,7 @@ private:
bool draw_caret = true;
float caret_blink_interval = 0.65;
double caret_blink_timer = 0.0;
- bool caret_blinking = false;
+ bool caret_can_draw = false;
bool pending_select_all_on_focus = false;
bool select_all_on_focus = false;
@@ -225,6 +225,7 @@ private:
void _reset_caret_blink_timer();
void _toggle_draw_caret();
+ void _validate_caret_can_draw();
void clear_internal();
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index df41863e74..60d107cce6 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -4528,6 +4528,30 @@ void RichTextLabel::append_text(const String &p_bbcode) {
}
}
+void RichTextLabel::scroll_to_selection() {
+ if (selection.active && selection.from_frame && selection.from_line >= 0 && selection.from_line < (int)selection.from_frame->lines.size()) {
+ // Selected frame paragraph offset.
+ float line_offset = selection.from_frame->lines[selection.from_line].offset.y;
+
+ // Add wrapped line offset.
+ for (int i = 0; i < selection.from_frame->lines[selection.from_line].text_buf->get_line_count(); i++) {
+ Vector2i range = selection.from_frame->lines[selection.from_line].text_buf->get_line_range(i);
+ if (range.x <= selection.from_char && range.y >= selection.from_char) {
+ break;
+ }
+ line_offset += selection.from_frame->lines[selection.from_line].text_buf->get_line_size(i).y + theme_cache.line_separation;
+ }
+
+ // Add nested frame (e.g. table cell) offset.
+ ItemFrame *it = selection.from_frame;
+ while (it->parent_frame != nullptr) {
+ line_offset += it->parent_frame->lines[it->line].offset.y;
+ it = it->parent_frame;
+ }
+ vscroll->set_value(line_offset);
+ }
+}
+
void RichTextLabel::scroll_to_paragraph(int p_paragraph) {
_validate_line_caches();
@@ -4772,7 +4796,7 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection, bool p
char_idx = p_search_previous ? selection.from_char - 1 : selection.to_char;
if (!(p_search_previous && char_idx < 0) &&
_search_line(selection.from_frame, selection.from_line, p_string, char_idx, p_search_previous)) {
- scroll_to_line(selection.from_frame->line + selection.from_line);
+ scroll_to_selection();
queue_redraw();
return true;
}
@@ -4797,7 +4821,7 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection, bool p
// Search for next element
if (_search_table(parent_table, parent_element, p_string, p_search_previous)) {
- scroll_to_line(selection.from_frame->line + selection.from_line);
+ scroll_to_selection();
queue_redraw();
return true;
}
@@ -4821,7 +4845,7 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection, bool p
}
if (_search_line(main, current_line, p_string, char_idx, p_search_previous)) {
- scroll_to_line(current_line);
+ scroll_to_selection();
queue_redraw();
return true;
}
@@ -5309,6 +5333,7 @@ void RichTextLabel::_bind_methods() {
ClassDB::bind_method(D_METHOD("scroll_to_line", "line"), &RichTextLabel::scroll_to_line);
ClassDB::bind_method(D_METHOD("scroll_to_paragraph", "paragraph"), &RichTextLabel::scroll_to_paragraph);
+ ClassDB::bind_method(D_METHOD("scroll_to_selection"), &RichTextLabel::scroll_to_selection);
ClassDB::bind_method(D_METHOD("set_tab_size", "spaces"), &RichTextLabel::set_tab_size);
ClassDB::bind_method(D_METHOD("get_tab_size"), &RichTextLabel::get_tab_size);
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index d30baaa8d3..b00cc3d055 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -657,6 +657,8 @@ public:
int get_content_height() const;
int get_content_width() const;
+ void scroll_to_selection();
+
VScrollBar *get_v_scroll_bar() { return vscroll; }
virtual CursorShape get_cursor_shape(const Point2 &p_pos) const override;
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index cce9fa4f34..e7d704a281 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -7038,8 +7038,8 @@ void TextEdit::_update_selection_mode_word() {
if ((col <= carets[caret_idx].selection.selected_word_origin && line == get_selection_line(caret_idx)) || line < get_selection_line(caret_idx)) {
carets.write[caret_idx].selection.selecting_column = carets[caret_idx].selection.selected_word_end;
select(line, beg, get_selection_line(caret_idx), carets[caret_idx].selection.selected_word_end, caret_idx);
- set_caret_line(get_selection_from_line(caret_idx), false, true, 0, caret_idx);
- set_caret_column(get_selection_from_column(caret_idx), true, caret_idx);
+ set_caret_line(line, false, true, 0, caret_idx);
+ set_caret_column(beg, true, caret_idx);
} else {
carets.write[caret_idx].selection.selecting_column = carets[caret_idx].selection.selected_word_beg;
select(get_selection_line(caret_idx), carets[caret_idx].selection.selected_word_beg, line, end, caret_idx);
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 93c910a7f0..c0990211aa 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1018,7 +1018,7 @@ void TreeItem::set_as_cursor(int p_column) {
if (tree->select_mode != Tree::SELECT_MULTI) {
return;
}
- if (tree->selected_col == p_column) {
+ if (tree->selected_item == this && tree->selected_col == p_column) {
return;
}
tree->selected_item = this;
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 3967858d47..077a53464e 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -2709,7 +2709,7 @@ void Animation::value_track_set_update_mode(int p_track, UpdateMode p_mode) {
ERR_FAIL_INDEX(p_track, tracks.size());
Track *t = tracks[p_track];
ERR_FAIL_COND(t->type != TYPE_VALUE);
- ERR_FAIL_INDEX((int)p_mode, 4);
+ ERR_FAIL_INDEX((int)p_mode, 3);
ValueTrack *vt = static_cast<ValueTrack *>(t);
vt->update_mode = p_mode;
@@ -3896,7 +3896,6 @@ void Animation::_bind_methods() {
BIND_ENUM_CONSTANT(UPDATE_CONTINUOUS);
BIND_ENUM_CONSTANT(UPDATE_DISCRETE);
- BIND_ENUM_CONSTANT(UPDATE_TRIGGER);
BIND_ENUM_CONSTANT(UPDATE_CAPTURE);
BIND_ENUM_CONSTANT(LOOP_NONE);
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index e66af77018..0ac1279063 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -64,7 +64,6 @@ public:
enum UpdateMode {
UPDATE_CONTINUOUS,
UPDATE_DISCRETE,
- UPDATE_TRIGGER,
UPDATE_CAPTURE,
};
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 93c3d4f851..fa7a1f3dbf 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -341,7 +341,7 @@ real_t Curve::sample_local_nocheck(int p_index, real_t p_local_offset) const {
const Point a = _points[p_index];
const Point b = _points[p_index + 1];
- /* Cubic bezier
+ /* Cubic bézier
*
* ac-----bc
* / \
@@ -774,6 +774,22 @@ void Curve2D::_bake_segment2d(RBMap<real_t, Vector2> &r_bake, real_t p_begin, re
}
}
+void Curve2D::_bake_segment2d_even_length(RBMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_length) const {
+ Vector2 beg = p_a.bezier_interpolate(p_a + p_out, p_b + p_in, p_b, p_begin);
+ Vector2 end = p_a.bezier_interpolate(p_a + p_out, p_b + p_in, p_b, p_end);
+
+ real_t length = beg.distance_to(end);
+
+ if (length > p_length && p_depth < p_max_depth) {
+ real_t mp = (p_begin + p_end) * 0.5;
+ Vector2 mid = p_a.bezier_interpolate(p_a + p_out, p_b + p_in, p_b, mp);
+ r_bake[mp] = mid;
+
+ _bake_segment2d_even_length(r_bake, p_begin, mp, p_a, p_out, p_b, p_in, p_depth + 1, p_max_depth, p_length);
+ _bake_segment2d_even_length(r_bake, mp, p_end, p_a, p_out, p_b, p_in, p_depth + 1, p_max_depth, p_length);
+ }
+}
+
void Curve2D::_bake() const {
if (!baked_cache_dirty) {
return;
@@ -785,94 +801,62 @@ void Curve2D::_bake() const {
if (points.size() == 0) {
baked_point_cache.clear();
baked_dist_cache.clear();
+ baked_forward_vector_cache.clear();
return;
}
if (points.size() == 1) {
baked_point_cache.resize(1);
baked_point_cache.set(0, points[0].position);
-
baked_dist_cache.resize(1);
baked_dist_cache.set(0, 0.0);
+ baked_forward_vector_cache.resize(1);
+ baked_forward_vector_cache.set(0, Vector2(0.0, 0.1));
+
return;
}
- Vector2 position = points[0].position;
- real_t dist = 0.0;
-
- List<Vector2> pointlist;
- List<real_t> distlist;
-
- // Start always from origin.
- pointlist.push_back(position);
- distlist.push_back(0.0);
-
- for (int i = 0; i < points.size() - 1; i++) {
- real_t step = 0.1; // at least 10 substeps ought to be enough?
- real_t p = 0.0;
-
- while (p < 1.0) {
- real_t np = p + step;
- if (np > 1.0) {
- np = 1.0;
- }
-
- Vector2 npp = points[i].position.bezier_interpolate(points[i].position + points[i].out, points[i + 1].position + points[i + 1].in, points[i + 1].position, np);
- real_t d = position.distance_to(npp);
-
- if (d > bake_interval) {
- // OK! between P and NP there _has_ to be Something, let's go searching!
-
- int iterations = 10; //lots of detail!
-
- real_t low = p;
- real_t hi = np;
- real_t mid = low + (hi - low) * 0.5;
-
- for (int j = 0; j < iterations; j++) {
- npp = points[i].position.bezier_interpolate(points[i].position + points[i].out, points[i + 1].position + points[i + 1].in, points[i + 1].position, mid);
- d = position.distance_to(npp);
-
- if (bake_interval < d) {
- hi = mid;
- } else {
- low = mid;
- }
- mid = low + (hi - low) * 0.5;
- }
-
- position = npp;
- p = mid;
- dist += d;
+ // Tesselate curve to (almost) even length segments
+ {
+ Vector<RBMap<real_t, Vector2>> midpoints = _tessellate_even_length(10, bake_interval);
- pointlist.push_back(position);
- distlist.push_back(dist);
- } else {
- p = np;
- }
+ int pc = 1;
+ for (int i = 0; i < points.size() - 1; i++) {
+ pc++;
+ pc += midpoints[i].size();
}
- Vector2 npp = points[i + 1].position;
- real_t d = position.distance_to(npp);
+ baked_point_cache.resize(pc);
+ baked_dist_cache.resize(pc);
+ baked_forward_vector_cache.resize(pc);
- position = npp;
- dist += d;
+ Vector2 *bpw = baked_point_cache.ptrw();
+ Vector2 *bfw = baked_forward_vector_cache.ptrw();
- pointlist.push_back(position);
- distlist.push_back(dist);
- }
-
- baked_max_ofs = dist;
+ // Collect positions and sample tilts and tangents for each baked points.
+ bpw[0] = points[0].position;
+ bfw[0] = points[0].position.bezier_derivative(points[0].position + points[0].out, points[1].position + points[1].in, points[1].position, 0.0).normalized();
+ int pidx = 0;
- baked_point_cache.resize(pointlist.size());
- baked_dist_cache.resize(distlist.size());
+ for (int i = 0; i < points.size() - 1; i++) {
+ for (const KeyValue<real_t, Vector2> &E : midpoints[i]) {
+ pidx++;
+ bpw[pidx] = E.value;
+ bfw[pidx] = points[i].position.bezier_derivative(points[i].position + points[i].out, points[i + 1].position + points[i + 1].in, points[i + 1].position, E.key).normalized();
+ }
- Vector2 *w = baked_point_cache.ptrw();
- real_t *wd = baked_dist_cache.ptrw();
+ pidx++;
+ bpw[pidx] = points[i + 1].position;
+ bfw[pidx] = points[i].position.bezier_derivative(points[i].position + points[i].out, points[i + 1].position + points[i + 1].in, points[i + 1].position, 1.0).normalized();
+ }
- for (int i = 0; i < pointlist.size(); i++) {
- w[i] = pointlist[i];
- wd[i] = distlist[i];
+ // Recalculate the baked distances.
+ real_t *bdw = baked_dist_cache.ptrw();
+ bdw[0] = 0.0;
+ for (int i = 0; i < pc - 1; i++) {
+ bdw[i + 1] = bdw[i] + bpw[i].distance_to(bpw[i + 1]);
+ }
+ baked_max_ofs = bdw[pc - 1];
}
}
@@ -884,27 +868,15 @@ real_t Curve2D::get_baked_length() const {
return baked_max_ofs;
}
-Vector2 Curve2D::sample_baked(real_t p_offset, bool p_cubic) const {
- if (baked_cache_dirty) {
- _bake();
- }
+Curve2D::Interval Curve2D::_find_interval(real_t p_offset) const {
+ Interval interval = {
+ -1,
+ 0.0
+ };
+ ERR_FAIL_COND_V_MSG(baked_cache_dirty, interval, "Backed cache is dirty");
- // Validate: Curve may not have baked points.
int pc = baked_point_cache.size();
- ERR_FAIL_COND_V_MSG(pc == 0, Vector2(), "No points in Curve2D.");
-
- if (pc == 1) {
- return baked_point_cache.get(0);
- }
-
- const Vector2 *r = baked_point_cache.ptr();
-
- if (p_offset < 0) {
- return r[0];
- }
- if (p_offset >= baked_max_ofs) {
- return r[pc - 1];
- }
+ ERR_FAIL_COND_V_MSG(pc < 2, interval, "Less than two points in cache");
int start = 0;
int end = pc;
@@ -924,9 +896,27 @@ Vector2 Curve2D::sample_baked(real_t p_offset, bool p_cubic) const {
real_t offset_end = baked_dist_cache[idx + 1];
real_t idx_interval = offset_end - offset_begin;
- ERR_FAIL_COND_V_MSG(p_offset < offset_begin || p_offset > offset_end, Vector2(), "Couldn't find baked segment.");
+ ERR_FAIL_COND_V_MSG(p_offset < offset_begin || p_offset > offset_end, interval, "Offset out of range.");
- real_t frac = (p_offset - offset_begin) / idx_interval;
+ interval.idx = idx;
+ if (idx_interval < FLT_EPSILON) {
+ interval.frac = 0.5; // For a very short interval, 0.5 is a reasonable choice.
+ ERR_FAIL_V_MSG(interval, "Zero length interval.");
+ }
+
+ interval.frac = (p_offset - offset_begin) / idx_interval;
+ return interval;
+}
+
+Vector2 Curve2D::_sample_baked(Interval p_interval, bool p_cubic) const {
+ // Assuming p_interval is valid.
+ ERR_FAIL_INDEX_V_MSG(p_interval.idx, baked_point_cache.size(), Vector2(), "Invalid interval");
+
+ int idx = p_interval.idx;
+ real_t frac = p_interval.frac;
+
+ const Vector2 *r = baked_point_cache.ptr();
+ int pc = baked_point_cache.size();
if (p_cubic) {
Vector2 pre = idx > 0 ? r[idx - 1] : r[idx];
@@ -937,44 +927,70 @@ Vector2 Curve2D::sample_baked(real_t p_offset, bool p_cubic) const {
}
}
-Transform2D Curve2D::sample_baked_with_rotation(real_t p_offset, bool p_cubic, bool p_loop, real_t p_lookahead) const {
- real_t path_length = get_baked_length(); // Ensure baked.
- ERR_FAIL_COND_V_MSG(path_length == 0, Transform2D(), "Length of Curve2D is 0.");
+Transform2D Curve2D::_sample_posture(Interval p_interval) const {
+ // Assuming that p_interval is valid.
+ ERR_FAIL_INDEX_V_MSG(p_interval.idx, baked_point_cache.size(), Transform2D(), "Invalid interval");
- Vector2 pos = sample_baked(p_offset, p_cubic);
+ int idx = p_interval.idx;
+ real_t frac = p_interval.frac;
- real_t ahead = p_offset + p_lookahead;
+ Vector2 forward_begin = baked_forward_vector_cache[idx];
+ Vector2 forward_end = baked_forward_vector_cache[idx + 1];
- if (p_loop && ahead >= path_length) {
- // If our lookahead will loop, we need to check if the path is closed.
- int point_count = get_point_count();
- if (point_count > 0) {
- Vector2 start_point = get_point_position(0);
- Vector2 end_point = get_point_position(point_count - 1);
- if (start_point == end_point) {
- // Since the path is closed we want to 'smooth off'
- // the corner at the start/end.
- // So we wrap the lookahead back round.
- ahead = Math::fmod(ahead, path_length);
- }
- }
+ // Build frames at both ends of the interval, then interpolate.
+ const Vector2 forward = forward_begin.slerp(forward_end, frac).normalized();
+ const Vector2 side = Vector2(-forward.y, forward.x);
+
+ return Transform2D(forward, side, Vector2(0.0, 0.0));
+}
+
+Vector2 Curve2D::sample_baked(real_t p_offset, bool p_cubic) const {
+ if (baked_cache_dirty) {
+ _bake();
}
- Vector2 ahead_pos = sample_baked(ahead, p_cubic);
+ // Validate: Curve may not have baked points.
+ int pc = baked_point_cache.size();
+ ERR_FAIL_COND_V_MSG(pc == 0, Vector2(), "No points in Curve2D.");
- Vector2 tangent_to_curve;
- if (ahead_pos == pos) {
- // This will happen at the end of non-looping or non-closed paths.
- // We'll try a look behind instead, in order to get a meaningful angle.
- tangent_to_curve =
- (pos - sample_baked(p_offset - p_lookahead, p_cubic)).normalized();
- } else {
- tangent_to_curve = (ahead_pos - pos).normalized();
+ if (pc == 1) {
+ return baked_point_cache[0];
+ }
+
+ p_offset = CLAMP(p_offset, 0.0, get_baked_length()); // PathFollower implement wrapping logic.
+
+ Curve2D::Interval interval = _find_interval(p_offset);
+ return _sample_baked(interval, p_cubic);
+}
+
+Transform2D Curve2D::sample_baked_with_rotation(real_t p_offset, bool p_cubic) const {
+ if (baked_cache_dirty) {
+ _bake();
}
- Vector2 normal_of_curve = -tangent_to_curve.orthogonal();
+ // Validate: Curve may not have baked points.
+ const int point_count = baked_point_cache.size();
+ ERR_FAIL_COND_V_MSG(point_count == 0, Transform2D(), "No points in Curve3D.");
+
+ if (point_count == 1) {
+ Transform2D t;
+ t.set_origin(baked_point_cache.get(0));
+ ERR_FAIL_V_MSG(t, "Only 1 point in Curve2D.");
+ }
+
+ p_offset = CLAMP(p_offset, 0.0, get_baked_length()); // PathFollower implement wrapping logic.
+
+ // 0. Find interval for all sampling steps.
+ Curve2D::Interval interval = _find_interval(p_offset);
+
+ // 1. Sample position.
+ Vector2 pos = _sample_baked(interval, p_cubic);
- return Transform2D(normal_of_curve, tangent_to_curve, pos);
+ // 2. Sample rotation frame.
+ Transform2D frame = _sample_posture(interval);
+ frame.set_origin(pos);
+
+ return frame;
}
PackedVector2Array Curve2D::get_baked_points() const {
@@ -1147,6 +1163,50 @@ PackedVector2Array Curve2D::tessellate(int p_max_stages, real_t p_tolerance) con
return tess;
}
+Vector<RBMap<real_t, Vector2>> Curve2D::_tessellate_even_length(int p_max_stages, real_t p_length) const {
+ Vector<RBMap<real_t, Vector2>> midpoints;
+ ERR_FAIL_COND_V_MSG(points.size() < 2, midpoints, "Curve must have at least 2 control point");
+
+ midpoints.resize(points.size() - 1);
+
+ for (int i = 0; i < points.size() - 1; i++) {
+ _bake_segment2d_even_length(midpoints.write[i], 0, 1, points[i].position, points[i].out, points[i + 1].position, points[i + 1].in, 0, p_max_stages, p_length);
+ }
+ return midpoints;
+}
+
+PackedVector2Array Curve2D::tessellate_even_length(int p_max_stages, real_t p_length) const {
+ PackedVector2Array tess;
+
+ Vector<RBMap<real_t, Vector2>> midpoints = _tessellate_even_length(p_max_stages, p_length);
+ if (midpoints.size() == 0) {
+ return tess;
+ }
+
+ int pc = 1;
+ for (int i = 0; i < points.size() - 1; i++) {
+ pc++;
+ pc += midpoints[i].size();
+ }
+
+ tess.resize(pc);
+ Vector2 *bpw = tess.ptrw();
+ bpw[0] = points[0].position;
+ int pidx = 0;
+
+ for (int i = 0; i < points.size() - 1; i++) {
+ for (const KeyValue<real_t, Vector2> &E : midpoints[i]) {
+ pidx++;
+ bpw[pidx] = E.value;
+ }
+
+ pidx++;
+ bpw[pidx] = points[i + 1].position;
+ }
+
+ return tess;
+}
+
bool Curve2D::_set(const StringName &p_name, const Variant &p_value) {
Vector<String> components = String(p_name).split("/", true, 2);
if (components.size() >= 2 && components[0].begins_with("point_") && components[0].trim_prefix("point_").is_valid_int()) {
@@ -1224,12 +1284,13 @@ void Curve2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_bake_interval"), &Curve2D::get_bake_interval);
ClassDB::bind_method(D_METHOD("get_baked_length"), &Curve2D::get_baked_length);
- ClassDB::bind_method(D_METHOD("sample_baked", "offset", "cubic"), &Curve2D::sample_baked, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("sample_baked_with_rotation", "offset", "cubic", "loop", "lookahead"), &Curve2D::sample_baked_with_rotation, DEFVAL(false), DEFVAL(true), DEFVAL(4.0));
+ ClassDB::bind_method(D_METHOD("sample_baked", "offset", "cubic"), &Curve2D::sample_baked, DEFVAL(0.0), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("sample_baked_with_rotation", "offset", "cubic"), &Curve2D::sample_baked_with_rotation, DEFVAL(0.0), DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_baked_points"), &Curve2D::get_baked_points);
ClassDB::bind_method(D_METHOD("get_closest_point", "to_point"), &Curve2D::get_closest_point);
ClassDB::bind_method(D_METHOD("get_closest_offset", "to_point"), &Curve2D::get_closest_offset);
ClassDB::bind_method(D_METHOD("tessellate", "max_stages", "tolerance_degrees"), &Curve2D::tessellate, DEFVAL(5), DEFVAL(4));
+ ClassDB::bind_method(D_METHOD("tessellate_even_length", "max_stages", "tolerance_length"), &Curve2D::tessellate_even_length, DEFVAL(5), DEFVAL(20.0));
ClassDB::bind_method(D_METHOD("_get_data"), &Curve2D::_get_data);
ClassDB::bind_method(D_METHOD("_set_data", "data"), &Curve2D::_set_data);
@@ -2133,8 +2194,8 @@ void Curve3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_up_vector_enabled"), &Curve3D::is_up_vector_enabled);
ClassDB::bind_method(D_METHOD("get_baked_length"), &Curve3D::get_baked_length);
- ClassDB::bind_method(D_METHOD("sample_baked", "offset", "cubic"), &Curve3D::sample_baked, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("sample_baked_with_rotation", "offset", "cubic", "apply_tilt"), &Curve3D::sample_baked_with_rotation, DEFVAL(false), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("sample_baked", "offset", "cubic"), &Curve3D::sample_baked, DEFVAL(0.0), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("sample_baked_with_rotation", "offset", "cubic", "apply_tilt"), &Curve3D::sample_baked_with_rotation, DEFVAL(0.0), DEFVAL(false), DEFVAL(false));
ClassDB::bind_method(D_METHOD("sample_baked_up_vector", "offset", "apply_tilt"), &Curve3D::sample_baked_up_vector, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_baked_points"), &Curve3D::get_baked_points);
ClassDB::bind_method(D_METHOD("get_baked_tilts"), &Curve3D::get_baked_tilts);
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index 88c3cf3ae6..ea3ceabb14 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -172,6 +172,7 @@ class Curve2D : public Resource {
mutable bool baked_cache_dirty = false;
mutable PackedVector2Array baked_point_cache;
+ mutable PackedVector2Array baked_forward_vector_cache;
mutable Vector<real_t> baked_dist_cache;
mutable real_t baked_max_ofs = 0.0;
@@ -181,7 +182,16 @@ class Curve2D : public Resource {
real_t bake_interval = 5.0;
+ struct Interval {
+ int idx;
+ real_t frac;
+ };
+ Interval _find_interval(real_t p_offset) const;
+ Vector2 _sample_baked(Interval p_interval, bool p_cubic) const;
+ Transform2D _sample_posture(Interval p_interval) const;
+
void _bake_segment2d(RBMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_tol) const;
+ void _bake_segment2d_even_length(RBMap<real_t, Vector2> &r_bake, real_t p_begin, real_t p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, real_t p_length) const;
Dictionary _get_data() const;
void _set_data(const Dictionary &p_data);
@@ -192,6 +202,8 @@ class Curve2D : public Resource {
void _add_point(const Vector2 &p_position, const Vector2 &p_in = Vector2(), const Vector2 &p_out = Vector2(), int p_atpos = -1);
void _remove_point(int p_index);
+ Vector<RBMap<real_t, Vector2>> _tessellate_even_length(int p_max_stages = 5, real_t p_length = 0.2) const;
+
protected:
static void _bind_methods();
@@ -216,12 +228,13 @@ public:
real_t get_baked_length() const;
Vector2 sample_baked(real_t p_offset, bool p_cubic = false) const;
- Transform2D sample_baked_with_rotation(real_t p_offset, bool p_cubic = false, bool p_loop = true, real_t p_lookahead = 4.0) const;
+ Transform2D sample_baked_with_rotation(real_t p_offset, bool p_cubic = false) const;
PackedVector2Array get_baked_points() const; //useful for going through
Vector2 get_closest_point(const Vector2 &p_to_point) const;
real_t get_closest_offset(const Vector2 &p_to_point) const;
PackedVector2Array tessellate(int p_max_stages = 5, real_t p_tolerance = 4) const; //useful for display
+ PackedVector2Array tessellate_even_length(int p_max_stages = 5, real_t p_length = 20.0) const; // Useful for baking.
Curve2D();
};
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index af51d6539e..584a7e7eac 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -63,6 +63,8 @@ void Font::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_font_name"), &Font::get_font_name);
ClassDB::bind_method(D_METHOD("get_font_style_name"), &Font::get_font_style_name);
ClassDB::bind_method(D_METHOD("get_font_style"), &Font::get_font_style);
+ ClassDB::bind_method(D_METHOD("get_font_weight"), &Font::get_font_weight);
+ ClassDB::bind_method(D_METHOD("get_font_stretch"), &Font::get_font_stretch);
ClassDB::bind_method(D_METHOD("get_spacing", "spacing"), &Font::get_spacing);
ClassDB::bind_method(D_METHOD("get_opentype_features"), &Font::get_opentype_features);
@@ -249,6 +251,14 @@ BitField<TextServer::FontStyle> Font::get_font_style() const {
return TS->font_get_style(_get_rid());
}
+int Font::get_font_weight() const {
+ return TS->font_get_weight(_get_rid());
+}
+
+int Font::get_font_stretch() const {
+ return TS->font_get_stretch(_get_rid());
+}
+
Dictionary Font::get_opentype_features() const {
return Dictionary();
}
@@ -590,6 +600,7 @@ _FORCE_INLINE_ void FontFile::_ensure_rid(int p_cache_index) const {
TS->font_set_msdf_size(cache[p_cache_index], msdf_size);
TS->font_set_fixed_size(cache[p_cache_index], fixed_size);
TS->font_set_force_autohinter(cache[p_cache_index], force_autohinter);
+ TS->font_set_allow_system_fallback(cache[p_cache_index], allow_system_fallback);
TS->font_set_hinting(cache[p_cache_index], hinting);
TS->font_set_subpixel_positioning(cache[p_cache_index], subpixel_positioning);
TS->font_set_oversampling(cache[p_cache_index], oversampling);
@@ -881,6 +892,8 @@ void FontFile::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_font_name", "name"), &FontFile::set_font_name);
ClassDB::bind_method(D_METHOD("set_font_style_name", "name"), &FontFile::set_font_style_name);
ClassDB::bind_method(D_METHOD("set_font_style", "style"), &FontFile::set_font_style);
+ ClassDB::bind_method(D_METHOD("set_font_weight", "weight"), &FontFile::set_font_weight);
+ ClassDB::bind_method(D_METHOD("set_font_stretch", "stretch"), &FontFile::set_font_stretch);
ClassDB::bind_method(D_METHOD("set_antialiasing", "antialiasing"), &FontFile::set_antialiasing);
ClassDB::bind_method(D_METHOD("get_antialiasing"), &FontFile::get_antialiasing);
@@ -900,6 +913,9 @@ void FontFile::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_fixed_size", "fixed_size"), &FontFile::set_fixed_size);
ClassDB::bind_method(D_METHOD("get_fixed_size"), &FontFile::get_fixed_size);
+ ClassDB::bind_method(D_METHOD("set_allow_system_fallback", "allow_system_fallback"), &FontFile::set_allow_system_fallback);
+ ClassDB::bind_method(D_METHOD("is_allow_system_fallback"), &FontFile::is_allow_system_fallback);
+
ClassDB::bind_method(D_METHOD("set_force_autohinter", "force_autohinter"), &FontFile::set_force_autohinter);
ClassDB::bind_method(D_METHOD("is_force_autohinter"), &FontFile::is_force_autohinter);
@@ -1007,10 +1023,14 @@ void FontFile::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "font_name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "set_font_name", "get_font_name");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "style_name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "set_font_style_name", "get_font_style_name");
ADD_PROPERTY(PropertyInfo(Variant::INT, "font_style", PROPERTY_HINT_FLAGS, "Bold,Italic,Fixed Size", PROPERTY_USAGE_STORAGE), "set_font_style", "get_font_style");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "font_weight", PROPERTY_HINT_RANGE, "100,999,25", PROPERTY_USAGE_STORAGE), "set_font_weight", "get_font_weight");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "font_stretch", PROPERTY_HINT_RANGE, "50,200,25", PROPERTY_USAGE_STORAGE), "set_font_stretch", "get_font_stretch");
+
ADD_PROPERTY(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel", PROPERTY_USAGE_STORAGE), "set_subpixel_positioning", "get_subpixel_positioning");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "multichannel_signed_distance_field", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "set_multichannel_signed_distance_field", "is_multichannel_signed_distance_field");
ADD_PROPERTY(PropertyInfo(Variant::INT, "msdf_pixel_range", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "set_msdf_pixel_range", "get_msdf_pixel_range");
ADD_PROPERTY(PropertyInfo(Variant::INT, "msdf_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "set_msdf_size", "get_msdf_size");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_system_fallback", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "set_allow_system_fallback", "is_allow_system_fallback");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "force_autohinter", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "set_force_autohinter", "is_force_autohinter");
ADD_PROPERTY(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal", PROPERTY_USAGE_STORAGE), "set_hinting", "get_hinting");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "set_oversampling", "get_oversampling");
@@ -1329,6 +1349,7 @@ void FontFile::reset_state() {
mipmaps = false;
msdf = false;
force_autohinter = false;
+ allow_system_fallback = true;
hinting = TextServer::HINTING_LIGHT;
subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_DISABLED;
msdf_pixel_range = 14;
@@ -1361,6 +1382,7 @@ Error FontFile::load_bitmap_font(const String &p_path) {
mipmaps = false;
msdf = false;
force_autohinter = false;
+ allow_system_fallback = true;
hinting = TextServer::HINTING_NONE;
oversampling = 1.0f;
@@ -1937,6 +1959,9 @@ Error FontFile::load_bitmap_font(const String &p_path) {
set_font_name(font_name);
set_font_style(st_flags);
+ if (st_flags & TextServer::FONT_BOLD) {
+ set_font_weight(700);
+ }
set_cache_ascent(0, base_size, ascent);
set_cache_descent(0, base_size, height - ascent);
@@ -1946,7 +1971,7 @@ Error FontFile::load_bitmap_font(const String &p_path) {
Error FontFile::load_dynamic_font(const String &p_path) {
reset_state();
- Vector<uint8_t> font_data = FileAccess::get_file_as_array(p_path);
+ Vector<uint8_t> font_data = FileAccess::get_file_as_bytes(p_path);
set_data(font_data);
return OK;
@@ -2000,6 +2025,16 @@ void FontFile::set_font_style(BitField<TextServer::FontStyle> p_style) {
TS->font_set_style(cache[0], p_style);
}
+void FontFile::set_font_weight(int p_weight) {
+ _ensure_rid(0);
+ TS->font_set_weight(cache[0], p_weight);
+}
+
+void FontFile::set_font_stretch(int p_stretch) {
+ _ensure_rid(0);
+ TS->font_set_stretch(cache[0], p_stretch);
+}
+
void FontFile::set_antialiasing(TextServer::FontAntialiasing p_antialiasing) {
if (antialiasing != p_antialiasing) {
antialiasing = p_antialiasing;
@@ -2090,6 +2125,21 @@ int FontFile::get_fixed_size() const {
return fixed_size;
}
+void FontFile::set_allow_system_fallback(bool p_allow_system_fallback) {
+ if (allow_system_fallback != p_allow_system_fallback) {
+ allow_system_fallback = p_allow_system_fallback;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_allow_system_fallback(cache[i], allow_system_fallback);
+ }
+ emit_changed();
+ }
+}
+
+bool FontFile::is_allow_system_fallback() const {
+ return allow_system_fallback;
+}
+
void FontFile::set_force_autohinter(bool p_force_autohinter) {
if (force_autohinter != p_force_autohinter) {
force_autohinter = p_force_autohinter;
@@ -2839,6 +2889,9 @@ void SystemFont::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_generate_mipmaps", "generate_mipmaps"), &SystemFont::set_generate_mipmaps);
ClassDB::bind_method(D_METHOD("get_generate_mipmaps"), &SystemFont::get_generate_mipmaps);
+ ClassDB::bind_method(D_METHOD("set_allow_system_fallback", "allow_system_fallback"), &SystemFont::set_allow_system_fallback);
+ ClassDB::bind_method(D_METHOD("is_allow_system_fallback"), &SystemFont::is_allow_system_fallback);
+
ClassDB::bind_method(D_METHOD("set_force_autohinter", "force_autohinter"), &SystemFont::set_force_autohinter);
ClassDB::bind_method(D_METHOD("is_force_autohinter"), &SystemFont::is_force_autohinter);
@@ -2857,12 +2910,18 @@ void SystemFont::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_font_names"), &SystemFont::get_font_names);
ClassDB::bind_method(D_METHOD("set_font_names", "names"), &SystemFont::set_font_names);
- ClassDB::bind_method(D_METHOD("set_font_style", "style"), &SystemFont::set_font_style);
+ ClassDB::bind_method(D_METHOD("get_font_italic"), &SystemFont::get_font_italic);
+ ClassDB::bind_method(D_METHOD("set_font_italic", "italic"), &SystemFont::set_font_italic);
+ ClassDB::bind_method(D_METHOD("set_font_weight", "weight"), &SystemFont::set_font_weight);
+ ClassDB::bind_method(D_METHOD("set_font_stretch", "stretch"), &SystemFont::set_font_stretch);
ADD_PROPERTY(PropertyInfo(Variant::PACKED_STRING_ARRAY, "font_names"), "set_font_names", "get_font_names");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "font_style", PROPERTY_HINT_FLAGS, "Bold,Italic"), "set_font_style", "get_font_style");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "font_italic"), "set_font_italic", "get_font_italic");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "font_weight", PROPERTY_HINT_RANGE, "100,999,25"), "set_font_weight", "get_font_weight");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "font_stretch", PROPERTY_HINT_RANGE, "50,200,25"), "set_font_stretch", "get_font_stretch");
ADD_PROPERTY(PropertyInfo(Variant::INT, "antialiasing", PROPERTY_HINT_ENUM, "None,Grayscale,LCD Subpixel", PROPERTY_USAGE_STORAGE), "set_antialiasing", "get_antialiasing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "generate_mipmaps"), "set_generate_mipmaps", "get_generate_mipmaps");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_system_fallback"), "set_allow_system_fallback", "is_allow_system_fallback");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "force_autohinter"), "set_force_autohinter", "is_force_autohinter");
ADD_PROPERTY(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), "set_hinting", "get_hinting");
ADD_PROPERTY(PropertyInfo(Variant::INT, "subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel"), "set_subpixel_positioning", "get_subpixel_positioning");
@@ -2899,13 +2958,14 @@ void SystemFont::_update_base_font() {
face_indeces.clear();
ftr_weight = 0;
+ ftr_stretch = 0;
ftr_italic = 0;
for (const String &E : names) {
if (E.is_empty()) {
continue;
}
- String path = OS::get_singleton()->get_system_font_path(E, style & TextServer::FONT_BOLD, style & TextServer::FONT_ITALIC);
+ String path = OS::get_singleton()->get_system_font_path(E, weight, stretch, italic);
if (path.is_empty()) {
continue;
}
@@ -2917,9 +2977,22 @@ void SystemFont::_update_base_font() {
}
// If it's a font collection check all faces to match requested style.
+ int best_score = 0;
for (int i = 0; i < file->get_face_count(); i++) {
file->set_face_index(0, i);
- if (((file->get_font_style() & TextServer::FONT_BOLD) == (style & TextServer::FONT_BOLD)) && ((file->get_font_style() & TextServer::FONT_ITALIC) == (style & TextServer::FONT_ITALIC))) {
+ BitField<TextServer::FontStyle> style = file->get_font_style();
+ int font_weight = file->get_font_weight();
+ int font_stretch = file->get_font_stretch();
+ int score = (20 - Math::abs(font_weight - weight) / 50);
+ score += (20 - Math::abs(font_stretch - stretch) / 10);
+ if (bool(style & TextServer::FONT_ITALIC) == italic) {
+ score += 30;
+ }
+ if (score > best_score) {
+ face_indeces.clear();
+ }
+ if (score >= best_score) {
+ best_score = score;
face_indeces.push_back(i);
}
}
@@ -2928,19 +3001,25 @@ void SystemFont::_update_base_font() {
}
file->set_face_index(0, face_indeces[0]);
- // If it's a variable font, apply weight and italic coordinates to match requested style.
- Dictionary ftr = file->get_supported_variation_list();
- if ((style & TextServer::FONT_BOLD) && ftr.has(TS->name_to_tag("weight"))) {
- ftr_weight = 700;
- }
- if ((style & TextServer::FONT_ITALIC) && ftr.has(TS->name_to_tag("italic"))) {
- ftr_italic = 1;
+ // If it's a variable font, apply weight, stretch and italic coordinates to match requested style.
+ if (best_score != 50) {
+ Dictionary ftr = file->get_supported_variation_list();
+ if (ftr.has(TS->name_to_tag("width"))) {
+ ftr_stretch = stretch;
+ }
+ if (ftr.has(TS->name_to_tag("weight"))) {
+ ftr_weight = weight;
+ }
+ if (italic && ftr.has(TS->name_to_tag("italic"))) {
+ ftr_italic = 1;
+ }
}
// Apply font rendering settings.
file->set_antialiasing(antialiasing);
file->set_generate_mipmaps(mipmaps);
file->set_force_autohinter(force_autohinter);
+ file->set_allow_system_fallback(allow_system_fallback);
file->set_hinting(hinting);
file->set_subpixel_positioning(subpixel_positioning);
file->set_multichannel_signed_distance_field(msdf);
@@ -2973,11 +3052,15 @@ void SystemFont::reset_state() {
names.clear();
face_indeces.clear();
ftr_weight = 0;
+ ftr_stretch = 0;
ftr_italic = 0;
- style = 0;
+ italic = false;
+ weight = 400;
+ stretch = 100;
antialiasing = TextServer::FONT_ANTIALIASING_GRAY;
mipmaps = false;
force_autohinter = false;
+ allow_system_fallback = true;
hinting = TextServer::HINTING_LIGHT;
subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_DISABLED;
oversampling = 0.f;
@@ -3069,6 +3152,20 @@ bool SystemFont::get_generate_mipmaps() const {
return mipmaps;
}
+void SystemFont::set_allow_system_fallback(bool p_allow_system_fallback) {
+ if (allow_system_fallback != p_allow_system_fallback) {
+ allow_system_fallback = p_allow_system_fallback;
+ if (base_font.is_valid()) {
+ base_font->set_allow_system_fallback(allow_system_fallback);
+ }
+ emit_changed();
+ }
+}
+
+bool SystemFont::is_allow_system_fallback() const {
+ return allow_system_fallback;
+}
+
void SystemFont::set_force_autohinter(bool p_force_autohinter) {
if (force_autohinter != p_force_autohinter) {
force_autohinter = p_force_autohinter;
@@ -3150,15 +3247,37 @@ PackedStringArray SystemFont::get_font_names() const {
return names;
}
-void SystemFont::set_font_style(BitField<TextServer::FontStyle> p_style) {
- if (style != p_style) {
- style = p_style;
+void SystemFont::set_font_italic(bool p_italic) {
+ if (italic != p_italic) {
+ italic = p_italic;
_update_base_font();
}
}
-BitField<TextServer::FontStyle> SystemFont::get_font_style() const {
- return style;
+bool SystemFont::get_font_italic() const {
+ return italic;
+}
+
+void SystemFont::set_font_weight(int p_weight) {
+ if (weight != p_weight) {
+ weight = CLAMP(p_weight, 100, 999);
+ _update_base_font();
+ }
+}
+
+int SystemFont::get_font_weight() const {
+ return weight;
+}
+
+void SystemFont::set_font_stretch(int p_stretch) {
+ if (stretch != p_stretch) {
+ stretch = CLAMP(p_stretch, 50, 200);
+ _update_base_font();
+ }
+}
+
+int SystemFont::get_font_stretch() const {
+ return stretch;
}
int SystemFont::get_spacing(TextServer::SpacingType p_spacing) const {
@@ -3176,6 +3295,9 @@ RID SystemFont::find_variation(const Dictionary &p_variation_coordinates, int p_
if (ftr_weight > 0 && !var.has(TS->name_to_tag("weight"))) {
var[TS->name_to_tag("weight")] = ftr_weight;
}
+ if (ftr_stretch > 0 && !var.has(TS->name_to_tag("width"))) {
+ var[TS->name_to_tag("width")] = ftr_stretch;
+ }
if (ftr_italic > 0 && !var.has(TS->name_to_tag("italic"))) {
var[TS->name_to_tag("italic")] = ftr_italic;
}
@@ -3198,6 +3320,9 @@ RID SystemFont::_get_rid() const {
if (ftr_weight > 0) {
var[TS->name_to_tag("weight")] = ftr_weight;
}
+ if (ftr_stretch > 0) {
+ var[TS->name_to_tag("width")] = ftr_stretch;
+ }
if (ftr_italic > 0) {
var[TS->name_to_tag("italic")] = ftr_italic;
}
diff --git a/scene/resources/font.h b/scene/resources/font.h
index 5cf596b41d..e9f7507652 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -92,6 +92,8 @@ public:
virtual String get_font_name() const;
virtual String get_font_style_name() const;
virtual BitField<TextServer::FontStyle> get_font_style() const;
+ virtual int get_font_weight() const;
+ virtual int get_font_stretch() const;
virtual int get_spacing(TextServer::SpacingType p_spacing) const { return 0; };
virtual Dictionary get_opentype_features() const;
@@ -148,6 +150,7 @@ class FontFile : public Font {
int msdf_size = 48;
int fixed_size = 0;
bool force_autohinter = false;
+ bool allow_system_fallback = true;
TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
TextServer::SubpixelPositioning subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_AUTO;
real_t oversampling = 0.f;
@@ -191,6 +194,8 @@ public:
virtual void set_font_name(const String &p_name);
virtual void set_font_style_name(const String &p_name);
virtual void set_font_style(BitField<TextServer::FontStyle> p_style);
+ virtual void set_font_weight(int p_weight);
+ virtual void set_font_stretch(int p_stretch);
virtual void set_antialiasing(TextServer::FontAntialiasing p_antialiasing);
virtual TextServer::FontAntialiasing get_antialiasing() const;
@@ -210,6 +215,9 @@ public:
virtual void set_fixed_size(int p_fixed_size);
virtual int get_fixed_size() const;
+ virtual void set_allow_system_fallback(bool p_allow_system_fallback);
+ virtual bool is_allow_system_fallback() const;
+
virtual void set_force_autohinter(bool p_force_autohinter);
virtual bool is_force_autohinter() const;
@@ -389,18 +397,22 @@ class SystemFont : public Font {
GDCLASS(SystemFont, Font);
PackedStringArray names;
- BitField<TextServer::FontStyle> style = 0;
+ bool italic = false;
+ int weight = 400;
+ int stretch = 100;
mutable Ref<Font> theme_font;
Ref<FontFile> base_font;
Vector<int> face_indeces;
int ftr_weight = 0;
+ int ftr_stretch = 0;
int ftr_italic = 0;
TextServer::FontAntialiasing antialiasing = TextServer::FONT_ANTIALIASING_GRAY;
bool mipmaps = false;
bool force_autohinter = false;
+ bool allow_system_fallback = true;
TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
TextServer::SubpixelPositioning subpixel_positioning = TextServer::SUBPIXEL_POSITIONING_AUTO;
real_t oversampling = 0.f;
@@ -423,6 +435,9 @@ public:
virtual void set_generate_mipmaps(bool p_generate_mipmaps);
virtual bool get_generate_mipmaps() const;
+ virtual void set_allow_system_fallback(bool p_allow_system_fallback);
+ virtual bool is_allow_system_fallback() const;
+
virtual void set_force_autohinter(bool p_force_autohinter);
virtual bool is_force_autohinter() const;
@@ -441,8 +456,14 @@ public:
virtual void set_font_names(const PackedStringArray &p_names);
virtual PackedStringArray get_font_names() const;
- virtual void set_font_style(BitField<TextServer::FontStyle> p_style);
- virtual BitField<TextServer::FontStyle> get_font_style() const override;
+ virtual void set_font_italic(bool p_italic);
+ virtual bool get_font_italic() const;
+
+ virtual void set_font_weight(int p_weight);
+ virtual int get_font_weight() const override;
+
+ virtual void set_font_stretch(int p_stretch);
+ virtual int get_font_stretch() const override;
virtual int get_spacing(TextServer::SpacingType p_spacing) const override;
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 354373ef3c..36e4a8ea37 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -1356,7 +1356,7 @@ Error ResourceLoaderText::save_as_binary(const String &p_path) {
wf->seek_end();
- Vector<uint8_t> data = FileAccess::get_file_as_array(temp_file);
+ Vector<uint8_t> data = FileAccess::get_file_as_bytes(temp_file);
wf->store_buffer(data.ptr(), data.size());
{
Ref<DirAccess> dar = DirAccess::open(temp_file.get_base_dir());
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index 3a671edeea..48ec084b02 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -221,7 +221,7 @@ Ref<Resource> ResourceFormatLoaderShader::load(const String &p_path, const Strin
Ref<Shader> shader;
shader.instantiate();
- Vector<uint8_t> buffer = FileAccess::get_file_as_array(p_path);
+ Vector<uint8_t> buffer = FileAccess::get_file_as_bytes(p_path);
String str;
str.parse_utf8((const char *)buffer.ptr(), buffer.size());
diff --git a/scene/resources/shader_include.cpp b/scene/resources/shader_include.cpp
index fe628dd323..a680e66a50 100644
--- a/scene/resources/shader_include.cpp
+++ b/scene/resources/shader_include.cpp
@@ -81,7 +81,7 @@ Ref<Resource> ResourceFormatLoaderShaderInclude::load(const String &p_path, cons
Ref<ShaderInclude> shader_inc;
shader_inc.instantiate();
- Vector<uint8_t> buffer = FileAccess::get_file_as_array(p_path);
+ Vector<uint8_t> buffer = FileAccess::get_file_as_bytes(p_path);
String str;
str.parse_utf8((const char *)buffer.ptr(), buffer.size());
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index b30ca3e721..461dccfbdd 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -2658,6 +2658,7 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = {
{ Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "node_position_world", "NODE_POSITION_WORLD" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "camera_position_world", "CAMERA_POSITION_WORLD" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "camera_direction_world", "CAMERA_DIRECTION_WORLD" },
+ { Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_SCALAR_INT, "camera_visible_layers", "CAMERA_VISIBLE_LAYERS" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_VERTEX, VisualShaderNode::PORT_TYPE_VECTOR_3D, "node_position_view", "NODE_POSITION_VIEW" },
// Node3D, Fragment
@@ -2690,6 +2691,7 @@ const VisualShaderNodeInput::Port VisualShaderNodeInput::ports[] = {
{ Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "node_position_world", "NODE_POSITION_WORLD" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "camera_position_world", "CAMERA_POSITION_WORLD" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "camera_direction_world", "CAMERA_DIRECTION_WORLD" },
+ { Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_SCALAR_INT, "camera_visible_layers", "CAMERA_VISIBLE_LAYERS" },
{ Shader::MODE_SPATIAL, VisualShader::TYPE_FRAGMENT, VisualShaderNode::PORT_TYPE_VECTOR_3D, "node_position_view", "NODE_POSITION_VIEW" },
// Node3D, Light
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
index 6c8ce5265e..b5d4098e65 100644
--- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
+++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
@@ -709,6 +709,7 @@ void SceneShaderForwardClustered::init(const String p_defines) {
actions.renames["NODE_POSITION_WORLD"] = "read_model_matrix[3].xyz";
actions.renames["CAMERA_POSITION_WORLD"] = "scene_data.inv_view_matrix[3].xyz";
actions.renames["CAMERA_DIRECTION_WORLD"] = "scene_data.view_matrix[3].xyz";
+ actions.renames["CAMERA_VISIBLE_LAYERS"] = "scene_data.camera_visible_layers";
actions.renames["NODE_POSITION_VIEW"] = "(read_model_matrix * scene_data.view_matrix)[3].xyz";
actions.renames["VIEW_INDEX"] = "ViewIndex";
diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
index ee82fa7c7d..2d80cffdad 100644
--- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
+++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
@@ -609,6 +609,7 @@ void SceneShaderForwardMobile::init(const String p_defines) {
actions.renames["NODE_POSITION_WORLD"] = "read_model_matrix[3].xyz";
actions.renames["CAMERA_POSITION_WORLD"] = "scene_data.inv_view_matrix[3].xyz";
actions.renames["CAMERA_DIRECTION_WORLD"] = "scene_data.view_matrix[3].xyz";
+ actions.renames["CAMERA_VISIBLE_LAYERS"] = "scene_data.camera_visible_layers";
actions.renames["NODE_POSITION_VIEW"] = "(read_model_matrix * scene_data.view_matrix)[3].xyz";
actions.renames["VIEW_INDEX"] = "ViewIndex";
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index 75fe84f46b..0f4dda3f11 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -1078,6 +1078,7 @@ void RendererSceneRenderRD::render_scene(const Ref<RenderSceneBuffers> &p_render
scene_data.cam_transform = p_camera_data->main_transform;
scene_data.cam_projection = p_camera_data->main_projection;
scene_data.cam_orthogonal = p_camera_data->is_orthogonal;
+ scene_data.camera_visible_layers = p_camera_data->visible_layers;
scene_data.taa_jitter = p_camera_data->taa_jitter;
scene_data.view_count = p_camera_data->view_count;
diff --git a/servers/rendering/renderer_rd/shaders/scene_data_inc.glsl b/servers/rendering/renderer_rd/shaders/scene_data_inc.glsl
index 048257e9ef..b57ee18521 100644
--- a/servers/rendering/renderer_rd/shaders/scene_data_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_data_inc.glsl
@@ -63,7 +63,7 @@ struct SceneData {
float IBL_exposure_normalization;
bool pancake_shadows;
- uint pad1;
+ uint camera_visible_layers;
uint pad2;
uint pad3;
};
diff --git a/servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.cpp b/servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.cpp
index 7dd790d1da..9b3d5a2d29 100644
--- a/servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.cpp
@@ -88,6 +88,7 @@ void RenderSceneDataRD::update_ubo(RID p_uniform_buffer, RS::ViewportDebugDraw p
RendererRD::MaterialStorage::store_soft_shadow_kernel(render_scene_render->directional_soft_shadow_kernel_get(), ubo.directional_soft_shadow_kernel);
RendererRD::MaterialStorage::store_soft_shadow_kernel(render_scene_render->penumbra_shadow_kernel_get(), ubo.penumbra_shadow_kernel);
RendererRD::MaterialStorage::store_soft_shadow_kernel(render_scene_render->soft_shadow_kernel_get(), ubo.soft_shadow_kernel);
+ ubo.camera_visible_layers = camera_visible_layers;
ubo.viewport_size[0] = p_screen_size.x;
ubo.viewport_size[1] = p_screen_size.y;
diff --git a/servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.h b/servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.h
index 9c031acc1e..5ea4991e8e 100644
--- a/servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.h
+++ b/servers/rendering/renderer_rd/storage_rd/render_scene_data_rd.h
@@ -45,6 +45,7 @@ public:
Transform3D cam_transform;
Projection cam_projection;
Vector2 taa_jitter;
+ uint32_t camera_visible_layers;
bool cam_orthogonal = false;
// For stereo rendering
@@ -142,7 +143,7 @@ private:
float IBL_exposure_normalization; // Adjusts for baked exposure.
uint32_t pancake_shadows;
- uint32_t pad1;
+ uint32_t camera_visible_layers;
uint32_t pad2;
uint32_t pad3;
};
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index 4b68d1f5c0..cfc25fc577 100644
--- a/servers/rendering/renderer_scene_cull.cpp
+++ b/servers/rendering/renderer_scene_cull.cpp
@@ -2512,7 +2512,7 @@ void RendererSceneCull::render_camera(const Ref<RenderSceneBuffers> &p_render_bu
} break;
}
- camera_data.set_camera(transform, projection, is_orthogonal, vaspect, jitter);
+ camera_data.set_camera(transform, projection, is_orthogonal, vaspect, jitter, camera->visible_layers);
} else {
// Setup our camera for our XR interface.
// We can support multiple views here each with their own camera
@@ -2534,7 +2534,7 @@ void RendererSceneCull::render_camera(const Ref<RenderSceneBuffers> &p_render_bu
}
if (view_count == 1) {
- camera_data.set_camera(transforms[0], projections[0], false, camera->vaspect, jitter);
+ camera_data.set_camera(transforms[0], projections[0], false, camera->vaspect, jitter, camera->visible_layers);
} else if (view_count == 2) {
camera_data.set_multiview_camera(view_count, transforms, projections, false, camera->vaspect);
} else {
diff --git a/servers/rendering/renderer_scene_render.cpp b/servers/rendering/renderer_scene_render.cpp
index f085168df3..3c069f6e2e 100644
--- a/servers/rendering/renderer_scene_render.cpp
+++ b/servers/rendering/renderer_scene_render.cpp
@@ -33,7 +33,7 @@
/////////////////////////////////////////////////////////////////////////////
// CameraData
-void RendererSceneRender::CameraData::set_camera(const Transform3D p_transform, const Projection p_projection, bool p_is_orthogonal, bool p_vaspect, const Vector2 &p_taa_jitter) {
+void RendererSceneRender::CameraData::set_camera(const Transform3D p_transform, const Projection p_projection, bool p_is_orthogonal, bool p_vaspect, const Vector2 &p_taa_jitter, const uint32_t p_visible_layers) {
view_count = 1;
is_orthogonal = p_is_orthogonal;
vaspect = p_vaspect;
@@ -41,6 +41,7 @@ void RendererSceneRender::CameraData::set_camera(const Transform3D p_transform,
main_transform = p_transform;
main_projection = p_projection;
+ visible_layers = p_visible_layers;
view_offset[0] = Transform3D();
view_projection[0] = p_projection;
taa_jitter = p_taa_jitter;
@@ -49,6 +50,7 @@ void RendererSceneRender::CameraData::set_camera(const Transform3D p_transform,
void RendererSceneRender::CameraData::set_multiview_camera(uint32_t p_view_count, const Transform3D *p_transforms, const Projection *p_projections, bool p_is_orthogonal, bool p_vaspect) {
ERR_FAIL_COND_MSG(p_view_count != 2, "Incorrect view count for stereoscopic view");
+ visible_layers = 0xFFFFFFFF;
view_count = p_view_count;
is_orthogonal = p_is_orthogonal;
vaspect = p_vaspect;
diff --git a/servers/rendering/renderer_scene_render.h b/servers/rendering/renderer_scene_render.h
index a8df897077..2c2d5a5a9e 100644
--- a/servers/rendering/renderer_scene_render.h
+++ b/servers/rendering/renderer_scene_render.h
@@ -268,6 +268,7 @@ public:
// flags
uint32_t view_count;
bool is_orthogonal;
+ uint32_t visible_layers;
bool vaspect;
// Main/center projection
@@ -278,7 +279,7 @@ public:
Projection view_projection[RendererSceneRender::MAX_RENDER_VIEWS];
Vector2 taa_jitter;
- void set_camera(const Transform3D p_transform, const Projection p_projection, bool p_is_orthogonal, bool p_vaspect, const Vector2 &p_taa_jitter = Vector2());
+ void set_camera(const Transform3D p_transform, const Projection p_projection, bool p_is_orthogonal, bool p_vaspect, const Vector2 &p_taa_jitter = Vector2(), uint32_t p_visible_layers = 0xFFFFFFFF);
void set_multiview_camera(uint32_t p_view_count, const Transform3D *p_transforms, const Projection *p_projections, bool p_is_orthogonal, bool p_vaspect);
};
diff --git a/servers/rendering/shader_types.cpp b/servers/rendering/shader_types.cpp
index 5e1da7c15d..86dd6a8b7e 100644
--- a/servers/rendering/shader_types.cpp
+++ b/servers/rendering/shader_types.cpp
@@ -100,6 +100,7 @@ ShaderTypes::ShaderTypes() {
shader_modes[RS::SHADER_SPATIAL].functions["vertex"].built_ins["NODE_POSITION_WORLD"] = ShaderLanguage::TYPE_VEC3;
shader_modes[RS::SHADER_SPATIAL].functions["vertex"].built_ins["CAMERA_POSITION_WORLD"] = ShaderLanguage::TYPE_VEC3;
shader_modes[RS::SHADER_SPATIAL].functions["vertex"].built_ins["CAMERA_DIRECTION_WORLD"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[RS::SHADER_SPATIAL].functions["vertex"].built_ins["CAMERA_VISIBLE_LAYERS"] = ShaderLanguage::TYPE_UINT;
shader_modes[RS::SHADER_SPATIAL].functions["vertex"].built_ins["NODE_POSITION_VIEW"] = ShaderLanguage::TYPE_VEC3;
shader_modes[RS::SHADER_SPATIAL].functions["vertex"].built_ins["VIEW_INDEX"] = constt(ShaderLanguage::TYPE_INT);
@@ -147,6 +148,7 @@ ShaderTypes::ShaderTypes() {
shader_modes[RS::SHADER_SPATIAL].functions["fragment"].built_ins["NODE_POSITION_WORLD"] = ShaderLanguage::TYPE_VEC3;
shader_modes[RS::SHADER_SPATIAL].functions["fragment"].built_ins["CAMERA_POSITION_WORLD"] = ShaderLanguage::TYPE_VEC3;
shader_modes[RS::SHADER_SPATIAL].functions["fragment"].built_ins["CAMERA_DIRECTION_WORLD"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[RS::SHADER_SPATIAL].functions["fragment"].built_ins["CAMERA_VISIBLE_LAYERS"] = ShaderLanguage::TYPE_UINT;
shader_modes[RS::SHADER_SPATIAL].functions["fragment"].built_ins["NODE_POSITION_VIEW"] = ShaderLanguage::TYPE_VEC3;
shader_modes[RS::SHADER_SPATIAL].functions["fragment"].built_ins["VIEW_INDEX"] = constt(ShaderLanguage::TYPE_INT);
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp
index dd4cb5accb..64e8b1b5f7 100644
--- a/servers/text/text_server_extension.cpp
+++ b/servers/text/text_server_extension.cpp
@@ -69,6 +69,12 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_font_set_style_name, "font_rid", "name_style");
GDVIRTUAL_BIND(_font_get_style_name, "font_rid");
+ GDVIRTUAL_BIND(_font_set_weight, "font_rid", "weight");
+ GDVIRTUAL_BIND(_font_get_weight, "font_rid");
+
+ GDVIRTUAL_BIND(_font_set_stretch, "font_rid", "stretch");
+ GDVIRTUAL_BIND(_font_get_stretch, "font_rid");
+
GDVIRTUAL_BIND(_font_set_antialiasing, "font_rid", "antialiasing");
GDVIRTUAL_BIND(_font_get_antialiasing, "font_rid");
@@ -87,6 +93,9 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_font_set_fixed_size, "font_rid", "fixed_size");
GDVIRTUAL_BIND(_font_get_fixed_size, "font_rid");
+ GDVIRTUAL_BIND(_font_set_allow_system_fallback, "font_rid", "allow_system_fallback");
+ GDVIRTUAL_BIND(_font_is_allow_system_fallback, "font_rid");
+
GDVIRTUAL_BIND(_font_set_force_autohinter, "font_rid", "force_autohinter");
GDVIRTUAL_BIND(_font_is_force_autohinter, "font_rid");
@@ -308,6 +317,8 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_string_to_lower, "string", "language");
GDVIRTUAL_BIND(_parse_structured_text, "parser_type", "args", "text");
+
+ GDVIRTUAL_BIND(_cleanup);
}
bool TextServerExtension::has_feature(Feature p_feature) const {
@@ -434,6 +445,26 @@ String TextServerExtension::font_get_style_name(const RID &p_font_rid) const {
return ret;
}
+void TextServerExtension::font_set_weight(const RID &p_font_rid, int64_t p_weight) {
+ GDVIRTUAL_CALL(_font_set_weight, p_font_rid, p_weight);
+}
+
+int64_t TextServerExtension::font_get_weight(const RID &p_font_rid) const {
+ int64_t ret = 400;
+ GDVIRTUAL_CALL(_font_get_weight, p_font_rid, ret);
+ return ret;
+}
+
+void TextServerExtension::font_set_stretch(const RID &p_font_rid, int64_t p_stretch) {
+ GDVIRTUAL_CALL(_font_set_stretch, p_font_rid, p_stretch);
+}
+
+int64_t TextServerExtension::font_get_stretch(const RID &p_font_rid) const {
+ int64_t ret = 100;
+ GDVIRTUAL_CALL(_font_get_stretch, p_font_rid, ret);
+ return ret;
+}
+
void TextServerExtension::font_set_name(const RID &p_font_rid, const String &p_name) {
GDVIRTUAL_CALL(_font_set_name, p_font_rid, p_name);
}
@@ -504,6 +535,16 @@ int64_t TextServerExtension::font_get_fixed_size(const RID &p_font_rid) const {
return ret;
}
+void TextServerExtension::font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) {
+ GDVIRTUAL_CALL(_font_set_allow_system_fallback, p_font_rid, p_allow_system_fallback);
+}
+
+bool TextServerExtension::font_is_allow_system_fallback(const RID &p_font_rid) const {
+ bool ret = false;
+ GDVIRTUAL_CALL(_font_is_allow_system_fallback, p_font_rid, ret);
+ return ret;
+}
+
void TextServerExtension::font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
GDVIRTUAL_CALL(_font_set_force_autohinter, p_font_rid, p_force_autohinter);
}
@@ -1360,6 +1401,10 @@ bool TextServerExtension::spoof_check(const String &p_string) const {
return TextServer::spoof_check(p_string);
}
+void TextServerExtension::cleanup() {
+ GDVIRTUAL_CALL(_cleanup);
+}
+
TextServerExtension::TextServerExtension() {
//NOP
}
diff --git a/servers/text/text_server_extension.h b/servers/text/text_server_extension.h
index 992b708045..46ed43e9c8 100644
--- a/servers/text/text_server_extension.h
+++ b/servers/text/text_server_extension.h
@@ -109,6 +109,16 @@ public:
GDVIRTUAL2(_font_set_style_name, RID, const String &);
GDVIRTUAL1RC(String, _font_get_style_name, RID);
+ virtual void font_set_weight(const RID &p_font_rid, int64_t p_weight) override;
+ virtual int64_t font_get_weight(const RID &p_font_rid) const override;
+ GDVIRTUAL2(_font_set_weight, RID, int);
+ GDVIRTUAL1RC(int64_t, _font_get_weight, RID);
+
+ virtual void font_set_stretch(const RID &p_font_rid, int64_t p_stretch) override;
+ virtual int64_t font_get_stretch(const RID &p_font_rid) const override;
+ GDVIRTUAL2(_font_set_stretch, RID, int);
+ GDVIRTUAL1RC(int64_t, _font_get_stretch, RID);
+
virtual void font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) override;
virtual TextServer::FontAntialiasing font_get_antialiasing(const RID &p_font_rid) const override;
GDVIRTUAL2(_font_set_antialiasing, RID, TextServer::FontAntialiasing);
@@ -154,6 +164,11 @@ public:
GDVIRTUAL2(_font_set_transform, RID, Transform2D);
GDVIRTUAL1RC(Transform2D, _font_get_transform, RID);
+ virtual void font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) override;
+ virtual bool font_is_allow_system_fallback(const RID &p_font_rid) const override;
+ GDVIRTUAL2(_font_set_allow_system_fallback, RID, bool);
+ GDVIRTUAL1RC(bool, _font_is_allow_system_fallback, RID);
+
virtual void font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) override;
virtual bool font_is_force_autohinter(const RID &p_font_rid) const override;
GDVIRTUAL2(_font_set_force_autohinter, RID, bool);
@@ -514,6 +529,9 @@ public:
GDVIRTUAL2RC(int64_t, _is_confusable, const String &, const PackedStringArray &);
GDVIRTUAL1RC(bool, _spoof_check, const String &);
+ virtual void cleanup() override;
+ GDVIRTUAL0(_cleanup);
+
TextServerExtension();
~TextServerExtension();
};
diff --git a/servers/text_server.cpp b/servers/text_server.cpp
index dfeb5cb70c..1b9cd28cfb 100644
--- a/servers/text_server.cpp
+++ b/servers/text_server.cpp
@@ -223,6 +223,12 @@ void TextServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("font_set_style_name", "font_rid", "name"), &TextServer::font_set_style_name);
ClassDB::bind_method(D_METHOD("font_get_style_name", "font_rid"), &TextServer::font_get_style_name);
+ ClassDB::bind_method(D_METHOD("font_set_weight", "font_rid", "weight"), &TextServer::font_set_weight);
+ ClassDB::bind_method(D_METHOD("font_get_weight", "font_rid"), &TextServer::font_get_weight);
+
+ ClassDB::bind_method(D_METHOD("font_set_stretch", "font_rid", "weight"), &TextServer::font_set_stretch);
+ ClassDB::bind_method(D_METHOD("font_get_stretch", "font_rid"), &TextServer::font_get_stretch);
+
ClassDB::bind_method(D_METHOD("font_set_antialiasing", "font_rid", "antialiasing"), &TextServer::font_set_antialiasing);
ClassDB::bind_method(D_METHOD("font_get_antialiasing", "font_rid"), &TextServer::font_get_antialiasing);
@@ -241,6 +247,9 @@ void TextServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("font_set_fixed_size", "font_rid", "fixed_size"), &TextServer::font_set_fixed_size);
ClassDB::bind_method(D_METHOD("font_get_fixed_size", "font_rid"), &TextServer::font_get_fixed_size);
+ ClassDB::bind_method(D_METHOD("font_set_allow_system_fallback", "font_rid", "allow_system_fallback"), &TextServer::font_set_allow_system_fallback);
+ ClassDB::bind_method(D_METHOD("font_is_allow_system_fallback", "font_rid"), &TextServer::font_is_allow_system_fallback);
+
ClassDB::bind_method(D_METHOD("font_set_force_autohinter", "font_rid", "force_autohinter"), &TextServer::font_set_force_autohinter);
ClassDB::bind_method(D_METHOD("font_is_force_autohinter", "font_rid"), &TextServer::font_is_force_autohinter);
diff --git a/servers/text_server.h b/servers/text_server.h
index a4e6080fd0..5da38a627a 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -250,6 +250,12 @@ public:
virtual void font_set_style_name(const RID &p_font_rid, const String &p_name) = 0;
virtual String font_get_style_name(const RID &p_font_rid) const = 0;
+ virtual void font_set_weight(const RID &p_font_rid, int64_t p_weight) = 0;
+ virtual int64_t font_get_weight(const RID &p_font_rid) const = 0;
+
+ virtual void font_set_stretch(const RID &p_font_rid, int64_t p_stretch) = 0;
+ virtual int64_t font_get_stretch(const RID &p_font_rid) const = 0;
+
virtual void font_set_antialiasing(const RID &p_font_rid, FontAntialiasing p_antialiasing) = 0;
virtual FontAntialiasing font_get_antialiasing(const RID &p_font_rid) const = 0;
@@ -268,6 +274,9 @@ public:
virtual void font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) = 0;
virtual int64_t font_get_fixed_size(const RID &p_font_rid) const = 0;
+ virtual void font_set_allow_system_fallback(const RID &p_font_rid, bool p_allow_system_fallback) = 0;
+ virtual bool font_is_allow_system_fallback(const RID &p_font_rid) const = 0;
+
virtual void font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) = 0;
virtual bool font_is_force_autohinter(const RID &p_font_rid) const = 0;
@@ -498,6 +507,8 @@ public:
TypedArray<Vector2i> parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const;
+ virtual void cleanup() {}
+
TextServer();
~TextServer();
};
diff --git a/tests/scene/test_curve.h b/tests/scene/test_curve.h
index 36ec0c0a4d..4afd5b293f 100644
--- a/tests/scene/test_curve.h
+++ b/tests/scene/test_curve.h
@@ -31,6 +31,7 @@
#ifndef TEST_CURVE_H
#define TEST_CURVE_H
+#include "core/math/math_funcs.h"
#include "scene/resources/curve.h"
#include "tests/test_macros.h"
@@ -229,7 +230,7 @@ TEST_CASE("[Curve2D] Linear sampling should return exact value") {
for (int i = 0; i < len; i++) {
Vector2 pos = curve->sample_baked(i);
- CHECK_MESSAGE(pos.x == i, "sample_baked should return exact value");
+ CHECK_MESSAGE(Math::is_equal_approx(pos.x, i), "sample_baked should return exact value");
}
}
@@ -245,7 +246,7 @@ TEST_CASE("[Curve3D] Linear sampling should return exact value") {
for (int i = 0; i < len; i++) {
Vector3 pos = curve->sample_baked(i);
- CHECK_MESSAGE(pos.x == i, "sample_baked should return exact value");
+ CHECK_MESSAGE(Math::is_equal_approx(pos.x, i), "sample_baked should return exact value");
}
}
diff --git a/tests/servers/test_text_server.h b/tests/servers/test_text_server.h
index 9ebd0f34b4..297f7d2068 100644
--- a/tests/servers/test_text_server.h
+++ b/tests/servers/test_text_server.h
@@ -68,8 +68,10 @@ TEST_SUITE("[TextServer]") {
RID font1 = ts->create_font();
ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
+ ts->font_set_allow_system_fallback(font1, false);
RID font2 = ts->create_font();
ts->font_set_data_ptr(font2, _font_NotoSansThaiUI_Regular, _font_NotoSansThaiUI_Regular_size);
+ ts->font_set_allow_system_fallback(font2, false);
Array font;
font.push_back(font1);