diff options
154 files changed, 16725 insertions, 1694 deletions
diff --git a/SConstruct b/SConstruct index 6847a7c937..03043ee110 100644 --- a/SConstruct +++ b/SConstruct @@ -544,6 +544,12 @@ if selected_platform in platform_list: env.Append(CCFLAGS=["-g3"]) else: env.Append(CCFLAGS=["-g2"]) + else: + if methods.using_clang(env) and not methods.is_vanilla_clang(env): + # Apple Clang, its linker doesn't like -s. + env.Append(LINKFLAGS=["-Wl,-S", "-Wl,-x", "-Wl,-dead_strip"]) + else: + env.Append(LINKFLAGS=["-s"]) if env["optimize"] == "speed": env.Append(CCFLAGS=["-O3"]) 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/extension/gdnative_interface.cpp b/core/extension/gdnative_interface.cpp index 864f2fa86b..78dc6dac0b 100644 --- a/core/extension/gdnative_interface.cpp +++ b/core/extension/gdnative_interface.cpp @@ -61,15 +61,15 @@ static void gdnative_print_script_error(const char *p_description, const char *p _err_print_error(p_function, p_file, p_line, p_description, false, ERR_HANDLER_SCRIPT); } -uint64_t gdnative_get_native_struct_size(const GDNativeStringNamePtr p_name) { +uint64_t gdnative_get_native_struct_size(GDNativeConstStringNamePtr p_name) { const StringName name = *reinterpret_cast<const StringName *>(p_name); return ClassDB::get_native_struct_size(name); } // Variant functions -static void gdnative_variant_new_copy(GDNativeVariantPtr r_dest, const GDNativeVariantPtr p_src) { - memnew_placement(reinterpret_cast<Variant *>(r_dest), Variant(*reinterpret_cast<Variant *>(p_src))); +static void gdnative_variant_new_copy(GDNativeVariantPtr r_dest, GDNativeConstVariantPtr p_src) { + memnew_placement(reinterpret_cast<Variant *>(r_dest), Variant(*reinterpret_cast<const Variant *>(p_src))); } static void gdnative_variant_new_nil(GDNativeVariantPtr r_dest) { memnew_placement(reinterpret_cast<Variant *>(r_dest), Variant); @@ -80,7 +80,7 @@ static void gdnative_variant_destroy(GDNativeVariantPtr p_self) { // variant type -static void gdnative_variant_call(GDNativeVariantPtr p_self, const GDNativeStringNamePtr p_method, const GDNativeVariantPtr *p_args, const GDNativeInt p_argcount, GDNativeVariantPtr r_return, GDNativeCallError *r_error) { +static void gdnative_variant_call(GDNativeVariantPtr p_self, GDNativeConstStringNamePtr p_method, GDNativeConstVariantPtr *p_args, GDNativeInt p_argcount, GDNativeVariantPtr r_return, GDNativeCallError *r_error) { Variant *self = (Variant *)p_self; const StringName method = *reinterpret_cast<const StringName *>(p_method); const Variant **args = (const Variant **)p_args; @@ -96,7 +96,7 @@ static void gdnative_variant_call(GDNativeVariantPtr p_self, const GDNativeStrin } } -static void gdnative_variant_call_static(GDNativeVariantType p_type, const GDNativeStringNamePtr p_method, const GDNativeVariantPtr *p_args, const GDNativeInt p_argcount, GDNativeVariantPtr r_return, GDNativeCallError *r_error) { +static void gdnative_variant_call_static(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_method, GDNativeConstVariantPtr *p_args, GDNativeInt p_argcount, GDNativeVariantPtr r_return, GDNativeCallError *r_error) { Variant::Type type = (Variant::Type)p_type; const StringName method = *reinterpret_cast<const StringName *>(p_method); const Variant **args = (const Variant **)p_args; @@ -112,7 +112,7 @@ static void gdnative_variant_call_static(GDNativeVariantType p_type, const GDNat } } -static void gdnative_variant_evaluate(GDNativeVariantOperator p_op, const GDNativeVariantPtr p_a, const GDNativeVariantPtr p_b, GDNativeVariantPtr r_return, GDNativeBool *r_valid) { +static void gdnative_variant_evaluate(GDNativeVariantOperator p_op, GDNativeConstVariantPtr p_a, GDNativeConstVariantPtr p_b, GDNativeVariantPtr r_return, GDNativeBool *r_valid) { Variant::Operator op = (Variant::Operator)p_op; const Variant *a = (const Variant *)p_a; const Variant *b = (const Variant *)p_b; @@ -122,7 +122,7 @@ static void gdnative_variant_evaluate(GDNativeVariantOperator p_op, const GDNati *r_valid = valid; } -static void gdnative_variant_set(GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, const GDNativeVariantPtr p_value, GDNativeBool *r_valid) { +static void gdnative_variant_set(GDNativeVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeConstVariantPtr p_value, GDNativeBool *r_valid) { Variant *self = (Variant *)p_self; const Variant *key = (const Variant *)p_key; const Variant *value = (const Variant *)p_value; @@ -132,7 +132,7 @@ static void gdnative_variant_set(GDNativeVariantPtr p_self, const GDNativeVarian *r_valid = valid; } -static void gdnative_variant_set_named(GDNativeVariantPtr p_self, const GDNativeStringNamePtr p_key, const GDNativeVariantPtr p_value, GDNativeBool *r_valid) { +static void gdnative_variant_set_named(GDNativeVariantPtr p_self, GDNativeConstStringNamePtr p_key, GDNativeConstVariantPtr p_value, GDNativeBool *r_valid) { Variant *self = (Variant *)p_self; const StringName *key = (const StringName *)p_key; const Variant *value = (const Variant *)p_value; @@ -142,7 +142,7 @@ static void gdnative_variant_set_named(GDNativeVariantPtr p_self, const GDNative *r_valid = valid; } -static void gdnative_variant_set_keyed(GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, const GDNativeVariantPtr p_value, GDNativeBool *r_valid) { +static void gdnative_variant_set_keyed(GDNativeVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeConstVariantPtr p_value, GDNativeBool *r_valid) { Variant *self = (Variant *)p_self; const Variant *key = (const Variant *)p_key; const Variant *value = (const Variant *)p_value; @@ -152,7 +152,7 @@ static void gdnative_variant_set_keyed(GDNativeVariantPtr p_self, const GDNative *r_valid = valid; } -static void gdnative_variant_set_indexed(GDNativeVariantPtr p_self, GDNativeInt p_index, const GDNativeVariantPtr p_value, GDNativeBool *r_valid, GDNativeBool *r_oob) { +static void gdnative_variant_set_indexed(GDNativeVariantPtr p_self, GDNativeInt p_index, GDNativeConstVariantPtr p_value, GDNativeBool *r_valid, GDNativeBool *r_oob) { Variant *self = (Variant *)p_self; const Variant *value = (const Variant *)p_value; @@ -163,7 +163,7 @@ static void gdnative_variant_set_indexed(GDNativeVariantPtr p_self, GDNativeInt *r_oob = oob; } -static void gdnative_variant_get(const GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid) { +static void gdnative_variant_get(GDNativeConstVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid) { const Variant *self = (const Variant *)p_self; const Variant *key = (const Variant *)p_key; @@ -172,7 +172,7 @@ static void gdnative_variant_get(const GDNativeVariantPtr p_self, const GDNative *r_valid = valid; } -static void gdnative_variant_get_named(const GDNativeVariantPtr p_self, const GDNativeStringNamePtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid) { +static void gdnative_variant_get_named(GDNativeConstVariantPtr p_self, GDNativeConstStringNamePtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid) { const Variant *self = (const Variant *)p_self; const StringName *key = (const StringName *)p_key; @@ -181,7 +181,7 @@ static void gdnative_variant_get_named(const GDNativeVariantPtr p_self, const GD *r_valid = valid; } -static void gdnative_variant_get_keyed(const GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid) { +static void gdnative_variant_get_keyed(GDNativeConstVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid) { const Variant *self = (const Variant *)p_self; const Variant *key = (const Variant *)p_key; @@ -190,7 +190,7 @@ static void gdnative_variant_get_keyed(const GDNativeVariantPtr p_self, const GD *r_valid = valid; } -static void gdnative_variant_get_indexed(const GDNativeVariantPtr p_self, GDNativeInt p_index, GDNativeVariantPtr r_ret, GDNativeBool *r_valid, GDNativeBool *r_oob) { +static void gdnative_variant_get_indexed(GDNativeConstVariantPtr p_self, GDNativeInt p_index, GDNativeVariantPtr r_ret, GDNativeBool *r_valid, GDNativeBool *r_oob) { const Variant *self = (const Variant *)p_self; bool valid; @@ -201,7 +201,7 @@ static void gdnative_variant_get_indexed(const GDNativeVariantPtr p_self, GDNati } /// Iteration. -static GDNativeBool gdnative_variant_iter_init(const GDNativeVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeBool *r_valid) { +static GDNativeBool gdnative_variant_iter_init(GDNativeConstVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeBool *r_valid) { const Variant *self = (const Variant *)p_self; Variant *iter = (Variant *)r_iter; @@ -211,7 +211,7 @@ static GDNativeBool gdnative_variant_iter_init(const GDNativeVariantPtr p_self, return ret; } -static GDNativeBool gdnative_variant_iter_next(const GDNativeVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeBool *r_valid) { +static GDNativeBool gdnative_variant_iter_next(GDNativeConstVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeBool *r_valid) { const Variant *self = (const Variant *)p_self; Variant *iter = (Variant *)r_iter; @@ -221,7 +221,7 @@ static GDNativeBool gdnative_variant_iter_next(const GDNativeVariantPtr p_self, return ret; } -static void gdnative_variant_iter_get(const GDNativeVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeVariantPtr r_ret, GDNativeBool *r_valid) { +static void gdnative_variant_iter_get(GDNativeConstVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeVariantPtr r_ret, GDNativeBool *r_valid) { const Variant *self = (const Variant *)p_self; Variant *iter = (Variant *)r_iter; @@ -231,53 +231,53 @@ static void gdnative_variant_iter_get(const GDNativeVariantPtr p_self, GDNativeV } /// Variant functions. -static GDNativeInt gdnative_variant_hash(const GDNativeVariantPtr p_self) { +static GDNativeInt gdnative_variant_hash(GDNativeConstVariantPtr p_self) { const Variant *self = (const Variant *)p_self; return self->hash(); } -static GDNativeInt gdnative_variant_recursive_hash(const GDNativeVariantPtr p_self, GDNativeInt p_recursion_count) { +static GDNativeInt gdnative_variant_recursive_hash(GDNativeConstVariantPtr p_self, GDNativeInt p_recursion_count) { const Variant *self = (const Variant *)p_self; return self->recursive_hash(p_recursion_count); } -static GDNativeBool gdnative_variant_hash_compare(const GDNativeVariantPtr p_self, const GDNativeVariantPtr p_other) { +static GDNativeBool gdnative_variant_hash_compare(GDNativeConstVariantPtr p_self, GDNativeConstVariantPtr p_other) { const Variant *self = (const Variant *)p_self; const Variant *other = (const Variant *)p_other; return self->hash_compare(*other); } -static GDNativeBool gdnative_variant_booleanize(const GDNativeVariantPtr p_self) { +static GDNativeBool gdnative_variant_booleanize(GDNativeConstVariantPtr p_self) { const Variant *self = (const Variant *)p_self; return self->booleanize(); } -static void gdnative_variant_duplicate(const GDNativeVariantPtr p_self, GDNativeVariantPtr r_ret, GDNativeBool p_deep) { +static void gdnative_variant_duplicate(GDNativeConstVariantPtr p_self, GDNativeVariantPtr r_ret, GDNativeBool p_deep) { const Variant *self = (const Variant *)p_self; memnew_placement(r_ret, Variant(self->duplicate(p_deep))); } -static void gdnative_variant_stringify(const GDNativeVariantPtr p_self, GDNativeStringPtr r_ret) { +static void gdnative_variant_stringify(GDNativeConstVariantPtr p_self, GDNativeStringPtr r_ret) { const Variant *self = (const Variant *)p_self; memnew_placement(r_ret, String(*self)); } -static GDNativeVariantType gdnative_variant_get_type(const GDNativeVariantPtr p_self) { +static GDNativeVariantType gdnative_variant_get_type(GDNativeConstVariantPtr p_self) { const Variant *self = (const Variant *)p_self; return (GDNativeVariantType)self->get_type(); } -static GDNativeBool gdnative_variant_has_method(const GDNativeVariantPtr p_self, const GDNativeStringNamePtr p_method) { +static GDNativeBool gdnative_variant_has_method(GDNativeConstVariantPtr p_self, GDNativeConstStringNamePtr p_method) { const Variant *self = (const Variant *)p_self; const StringName *method = (const StringName *)p_method; return self->has_method(*method); } -static GDNativeBool gdnative_variant_has_member(GDNativeVariantType p_type, const GDNativeStringNamePtr p_member) { +static GDNativeBool gdnative_variant_has_member(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_member) { return Variant::has_member((Variant::Type)p_type, *((const StringName *)p_member)); } -static GDNativeBool gdnative_variant_has_key(const GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, GDNativeBool *r_valid) { +static GDNativeBool gdnative_variant_has_key(GDNativeConstVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeBool *r_valid) { const Variant *self = (const Variant *)p_self; const Variant *key = (const Variant *)p_key; bool valid; @@ -470,7 +470,7 @@ static GDNativeTypeFromVariantConstructorFunc gdnative_get_type_from_variant_con static GDNativePtrOperatorEvaluator gdnative_variant_get_ptr_operator_evaluator(GDNativeVariantOperator p_operator, GDNativeVariantType p_type_a, GDNativeVariantType p_type_b) { return (GDNativePtrOperatorEvaluator)Variant::get_ptr_operator_evaluator(Variant::Operator(p_operator), Variant::Type(p_type_a), Variant::Type(p_type_b)); } -static GDNativePtrBuiltInMethod gdnative_variant_get_ptr_builtin_method(GDNativeVariantType p_type, const GDNativeStringNamePtr p_method, GDNativeInt p_hash) { +static GDNativePtrBuiltInMethod gdnative_variant_get_ptr_builtin_method(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_method, GDNativeInt p_hash) { const StringName method = *reinterpret_cast<const StringName *>(p_method); uint32_t hash = Variant::get_builtin_method_hash(Variant::Type(p_type), method); if (hash != p_hash) { @@ -486,7 +486,7 @@ static GDNativePtrConstructor gdnative_variant_get_ptr_constructor(GDNativeVaria static GDNativePtrDestructor gdnative_variant_get_ptr_destructor(GDNativeVariantType p_type) { return (GDNativePtrDestructor)Variant::get_ptr_destructor(Variant::Type(p_type)); } -static void gdnative_variant_construct(GDNativeVariantType p_type, GDNativeVariantPtr p_base, const GDNativeVariantPtr *p_args, int32_t p_argument_count, GDNativeCallError *r_error) { +static void gdnative_variant_construct(GDNativeVariantType p_type, GDNativeVariantPtr p_base, GDNativeConstVariantPtr *p_args, int32_t p_argument_count, GDNativeCallError *r_error) { memnew_placement(p_base, Variant); Callable::CallError error; @@ -498,11 +498,11 @@ static void gdnative_variant_construct(GDNativeVariantType p_type, GDNativeVaria r_error->expected = error.expected; } } -static GDNativePtrSetter gdnative_variant_get_ptr_setter(GDNativeVariantType p_type, const GDNativeStringNamePtr p_member) { +static GDNativePtrSetter gdnative_variant_get_ptr_setter(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_member) { const StringName member = *reinterpret_cast<const StringName *>(p_member); return (GDNativePtrSetter)Variant::get_member_ptr_setter(Variant::Type(p_type), member); } -static GDNativePtrGetter gdnative_variant_get_ptr_getter(GDNativeVariantType p_type, const GDNativeStringNamePtr p_member) { +static GDNativePtrGetter gdnative_variant_get_ptr_getter(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_member) { const StringName member = *reinterpret_cast<const StringName *>(p_member); return (GDNativePtrGetter)Variant::get_member_ptr_getter(Variant::Type(p_type), member); } @@ -521,11 +521,11 @@ static GDNativePtrKeyedGetter gdnative_variant_get_ptr_keyed_getter(GDNativeVari static GDNativePtrKeyedChecker gdnative_variant_get_ptr_keyed_checker(GDNativeVariantType p_type) { return (GDNativePtrKeyedChecker)Variant::get_member_ptr_keyed_checker(Variant::Type(p_type)); } -static void gdnative_variant_get_constant_value(GDNativeVariantType p_type, const GDNativeStringNamePtr p_constant, GDNativeVariantPtr r_ret) { +static void gdnative_variant_get_constant_value(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_constant, GDNativeVariantPtr r_ret) { StringName constant = *reinterpret_cast<const StringName *>(p_constant); memnew_placement(r_ret, Variant(Variant::get_constant_value(Variant::Type(p_type), constant))); } -static GDNativePtrUtilityFunction gdnative_variant_get_ptr_utility_function(const GDNativeStringNamePtr p_function, GDNativeInt p_hash) { +static GDNativePtrUtilityFunction gdnative_variant_get_ptr_utility_function(GDNativeConstStringNamePtr p_function, GDNativeInt p_hash) { StringName function = *reinterpret_cast<const StringName *>(p_function); uint32_t hash = Variant::get_utility_function_hash(function); if (hash != p_hash) { @@ -574,31 +574,31 @@ static void gdnative_string_new_with_wide_chars(GDNativeStringPtr r_dest, const } } -static void gdnative_string_new_with_latin1_chars_and_len(GDNativeStringPtr r_dest, const char *p_contents, const GDNativeInt p_size) { +static void gdnative_string_new_with_latin1_chars_and_len(GDNativeStringPtr r_dest, const char *p_contents, GDNativeInt p_size) { String *dest = (String *)r_dest; memnew_placement(dest, String); *dest = String(p_contents, p_size); } -static void gdnative_string_new_with_utf8_chars_and_len(GDNativeStringPtr r_dest, const char *p_contents, const GDNativeInt p_size) { +static void gdnative_string_new_with_utf8_chars_and_len(GDNativeStringPtr r_dest, const char *p_contents, GDNativeInt p_size) { String *dest = (String *)r_dest; memnew_placement(dest, String); dest->parse_utf8(p_contents, p_size); } -static void gdnative_string_new_with_utf16_chars_and_len(GDNativeStringPtr r_dest, const char16_t *p_contents, const GDNativeInt p_size) { +static void gdnative_string_new_with_utf16_chars_and_len(GDNativeStringPtr r_dest, const char16_t *p_contents, GDNativeInt p_size) { String *dest = (String *)r_dest; memnew_placement(dest, String); dest->parse_utf16(p_contents, p_size); } -static void gdnative_string_new_with_utf32_chars_and_len(GDNativeStringPtr r_dest, const char32_t *p_contents, const GDNativeInt p_size) { +static void gdnative_string_new_with_utf32_chars_and_len(GDNativeStringPtr r_dest, const char32_t *p_contents, GDNativeInt p_size) { String *dest = (String *)r_dest; memnew_placement(dest, String); *dest = String((const char32_t *)p_contents, p_size); } -static void gdnative_string_new_with_wide_chars_and_len(GDNativeStringPtr r_dest, const wchar_t *p_contents, const GDNativeInt p_size) { +static void gdnative_string_new_with_wide_chars_and_len(GDNativeStringPtr r_dest, const wchar_t *p_contents, GDNativeInt p_size) { String *dest = (String *)r_dest; if constexpr (sizeof(wchar_t) == 2) { // wchar_t is 16 bit, parse. @@ -611,7 +611,7 @@ static void gdnative_string_new_with_wide_chars_and_len(GDNativeStringPtr r_dest } } -static GDNativeInt gdnative_string_to_latin1_chars(const GDNativeStringPtr p_self, char *r_text, GDNativeInt p_max_write_length) { +static GDNativeInt gdnative_string_to_latin1_chars(GDNativeConstStringPtr p_self, char *r_text, GDNativeInt p_max_write_length) { String *self = (String *)p_self; CharString cs = self->ascii(true); GDNativeInt len = cs.length(); @@ -623,7 +623,7 @@ static GDNativeInt gdnative_string_to_latin1_chars(const GDNativeStringPtr p_sel } return len; } -static GDNativeInt gdnative_string_to_utf8_chars(const GDNativeStringPtr p_self, char *r_text, GDNativeInt p_max_write_length) { +static GDNativeInt gdnative_string_to_utf8_chars(GDNativeConstStringPtr p_self, char *r_text, GDNativeInt p_max_write_length) { String *self = (String *)p_self; CharString cs = self->utf8(); GDNativeInt len = cs.length(); @@ -635,7 +635,7 @@ static GDNativeInt gdnative_string_to_utf8_chars(const GDNativeStringPtr p_self, } return len; } -static GDNativeInt gdnative_string_to_utf16_chars(const GDNativeStringPtr p_self, char16_t *r_text, GDNativeInt p_max_write_length) { +static GDNativeInt gdnative_string_to_utf16_chars(GDNativeConstStringPtr p_self, char16_t *r_text, GDNativeInt p_max_write_length) { String *self = (String *)p_self; Char16String cs = self->utf16(); GDNativeInt len = cs.length(); @@ -647,7 +647,7 @@ static GDNativeInt gdnative_string_to_utf16_chars(const GDNativeStringPtr p_self } return len; } -static GDNativeInt gdnative_string_to_utf32_chars(const GDNativeStringPtr p_self, char32_t *r_text, GDNativeInt p_max_write_length) { +static GDNativeInt gdnative_string_to_utf32_chars(GDNativeConstStringPtr p_self, char32_t *r_text, GDNativeInt p_max_write_length) { String *self = (String *)p_self; GDNativeInt len = self->length(); if (r_text) { @@ -658,7 +658,7 @@ static GDNativeInt gdnative_string_to_utf32_chars(const GDNativeStringPtr p_self } return len; } -static GDNativeInt gdnative_string_to_wide_chars(const GDNativeStringPtr p_self, wchar_t *r_text, GDNativeInt p_max_write_length) { +static GDNativeInt gdnative_string_to_wide_chars(GDNativeConstStringPtr p_self, wchar_t *r_text, GDNativeInt p_max_write_length) { if constexpr (sizeof(wchar_t) == 4) { return gdnative_string_to_utf32_chars(p_self, (char32_t *)r_text, p_max_write_length); } else { @@ -672,7 +672,7 @@ static char32_t *gdnative_string_operator_index(GDNativeStringPtr p_self, GDNati return &self->ptrw()[p_index]; } -static const char32_t *gdnative_string_operator_index_const(const GDNativeStringPtr p_self, GDNativeInt p_index) { +static const char32_t *gdnative_string_operator_index_const(GDNativeConstStringPtr p_self, GDNativeInt p_index) { const String *self = (const String *)p_self; ERR_FAIL_INDEX_V(p_index, self->length() + 1, nullptr); return &self->ptr()[p_index]; @@ -686,7 +686,7 @@ static uint8_t *gdnative_packed_byte_array_operator_index(GDNativeTypePtr p_self return &self->ptrw()[p_index]; } -static const uint8_t *gdnative_packed_byte_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static const uint8_t *gdnative_packed_byte_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedByteArray *self = (const PackedByteArray *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return &self->ptr()[p_index]; @@ -698,7 +698,7 @@ static GDNativeTypePtr gdnative_packed_color_array_operator_index(GDNativeTypePt return (GDNativeTypePtr)&self->ptrw()[p_index]; } -static GDNativeTypePtr gdnative_packed_color_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static GDNativeTypePtr gdnative_packed_color_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedColorArray *self = (const PackedColorArray *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return (GDNativeTypePtr)&self->ptr()[p_index]; @@ -710,7 +710,7 @@ static float *gdnative_packed_float32_array_operator_index(GDNativeTypePtr p_sel return &self->ptrw()[p_index]; } -static const float *gdnative_packed_float32_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static const float *gdnative_packed_float32_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedFloat32Array *self = (const PackedFloat32Array *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return &self->ptr()[p_index]; @@ -722,7 +722,7 @@ static double *gdnative_packed_float64_array_operator_index(GDNativeTypePtr p_se return &self->ptrw()[p_index]; } -static const double *gdnative_packed_float64_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static const double *gdnative_packed_float64_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedFloat64Array *self = (const PackedFloat64Array *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return &self->ptr()[p_index]; @@ -734,7 +734,7 @@ static int32_t *gdnative_packed_int32_array_operator_index(GDNativeTypePtr p_sel return &self->ptrw()[p_index]; } -static const int32_t *gdnative_packed_int32_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static const int32_t *gdnative_packed_int32_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedInt32Array *self = (const PackedInt32Array *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return &self->ptr()[p_index]; @@ -746,7 +746,7 @@ static int64_t *gdnative_packed_int64_array_operator_index(GDNativeTypePtr p_sel return &self->ptrw()[p_index]; } -static const int64_t *gdnative_packed_int64_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static const int64_t *gdnative_packed_int64_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedInt64Array *self = (const PackedInt64Array *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return &self->ptr()[p_index]; @@ -758,7 +758,7 @@ static GDNativeStringPtr gdnative_packed_string_array_operator_index(GDNativeTyp return (GDNativeStringPtr)&self->ptrw()[p_index]; } -static GDNativeStringPtr gdnative_packed_string_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static GDNativeStringPtr gdnative_packed_string_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedStringArray *self = (const PackedStringArray *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return (GDNativeStringPtr)&self->ptr()[p_index]; @@ -770,7 +770,7 @@ static GDNativeTypePtr gdnative_packed_vector2_array_operator_index(GDNativeType return (GDNativeTypePtr)&self->ptrw()[p_index]; } -static GDNativeTypePtr gdnative_packed_vector2_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static GDNativeTypePtr gdnative_packed_vector2_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedVector2Array *self = (const PackedVector2Array *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return (GDNativeTypePtr)&self->ptr()[p_index]; @@ -782,7 +782,7 @@ static GDNativeTypePtr gdnative_packed_vector3_array_operator_index(GDNativeType return (GDNativeTypePtr)&self->ptrw()[p_index]; } -static GDNativeTypePtr gdnative_packed_vector3_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static GDNativeTypePtr gdnative_packed_vector3_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const PackedVector3Array *self = (const PackedVector3Array *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return (GDNativeTypePtr)&self->ptr()[p_index]; @@ -794,7 +794,7 @@ static GDNativeVariantPtr gdnative_array_operator_index(GDNativeTypePtr p_self, return (GDNativeVariantPtr)&self->operator[](p_index); } -static GDNativeVariantPtr gdnative_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) { +static GDNativeVariantPtr gdnative_array_operator_index_const(GDNativeConstTypePtr p_self, GDNativeInt p_index) { const Array *self = (const Array *)p_self; ERR_FAIL_INDEX_V(p_index, self->size(), nullptr); return (GDNativeVariantPtr)&self->operator[](p_index); @@ -802,20 +802,20 @@ static GDNativeVariantPtr gdnative_array_operator_index_const(const GDNativeType /* Dictionary functions */ -static GDNativeVariantPtr gdnative_dictionary_operator_index(GDNativeTypePtr p_self, const GDNativeVariantPtr p_key) { +static GDNativeVariantPtr gdnative_dictionary_operator_index(GDNativeTypePtr p_self, GDNativeConstVariantPtr p_key) { Dictionary *self = (Dictionary *)p_self; return (GDNativeVariantPtr)&self->operator[](*(const Variant *)p_key); } -static GDNativeVariantPtr gdnative_dictionary_operator_index_const(const GDNativeTypePtr p_self, const GDNativeVariantPtr p_key) { +static GDNativeVariantPtr gdnative_dictionary_operator_index_const(GDNativeConstTypePtr p_self, GDNativeConstVariantPtr p_key) { const Dictionary *self = (const Dictionary *)p_self; return (GDNativeVariantPtr)&self->operator[](*(const Variant *)p_key); } /* OBJECT API */ -static void gdnative_object_method_bind_call(const GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeVariantPtr *p_args, GDNativeInt p_arg_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error) { - MethodBind *mb = (MethodBind *)p_method_bind; +static void gdnative_object_method_bind_call(GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, GDNativeConstVariantPtr *p_args, GDNativeInt p_arg_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error) { + const MethodBind *mb = reinterpret_cast<const MethodBind *>(p_method_bind); Object *o = (Object *)p_instance; const Variant **args = (const Variant **)p_args; Callable::CallError error; @@ -830,8 +830,8 @@ static void gdnative_object_method_bind_call(const GDNativeMethodBindPtr p_metho } } -static void gdnative_object_method_bind_ptrcall(const GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr p_ret) { - MethodBind *mb = (MethodBind *)p_method_bind; +static void gdnative_object_method_bind_ptrcall(GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, GDNativeConstTypePtr *p_args, GDNativeTypePtr p_ret) { + const MethodBind *mb = reinterpret_cast<const MethodBind *>(p_method_bind); Object *o = (Object *)p_instance; mb->ptrcall(o, (const void **)p_args, p_ret); } @@ -840,7 +840,7 @@ static void gdnative_object_destroy(GDNativeObjectPtr p_o) { memdelete((Object *)p_o); } -static GDNativeObjectPtr gdnative_global_get_singleton(const GDNativeStringNamePtr p_name) { +static GDNativeObjectPtr gdnative_global_get_singleton(GDNativeConstStringNamePtr p_name) { const StringName name = *reinterpret_cast<const StringName *>(p_name); return (GDNativeObjectPtr)Engine::get_singleton()->get_singleton_object(name); } @@ -855,7 +855,7 @@ static void gdnative_object_set_instance_binding(GDNativeObjectPtr p_object, voi o->set_instance_binding(p_token, p_binding, p_callbacks); } -static void gdnative_object_set_instance(GDNativeObjectPtr p_object, const GDNativeStringNamePtr p_classname, GDExtensionClassInstancePtr p_instance) { +static void gdnative_object_set_instance(GDNativeObjectPtr p_object, GDNativeConstStringNamePtr p_classname, GDExtensionClassInstancePtr p_instance) { const StringName classname = *reinterpret_cast<const StringName *>(p_classname); Object *o = (Object *)p_object; ClassDB::set_object_extension_instance(o, classname, p_instance); @@ -865,7 +865,7 @@ static GDNativeObjectPtr gdnative_object_get_instance_from_id(GDObjectInstanceID return (GDNativeObjectPtr)ObjectDB::get_instance(ObjectID(p_instance_id)); } -static GDNativeObjectPtr gdnative_object_cast_to(const GDNativeObjectPtr p_object, void *p_class_tag) { +static GDNativeObjectPtr gdnative_object_cast_to(GDNativeConstObjectPtr p_object, void *p_class_tag) { if (!p_object) { return nullptr; } @@ -874,7 +874,7 @@ static GDNativeObjectPtr gdnative_object_cast_to(const GDNativeObjectPtr p_objec return o->is_class_ptr(p_class_tag) ? (GDNativeObjectPtr)o : (GDNativeObjectPtr) nullptr; } -static GDObjectInstanceID gdnative_object_get_instance_id(const GDNativeObjectPtr p_object) { +static GDObjectInstanceID gdnative_object_get_instance_id(GDNativeConstObjectPtr p_object) { const Object *o = (const Object *)p_object; return (GDObjectInstanceID)o->get_instance_id(); } @@ -886,7 +886,7 @@ static GDNativeScriptInstancePtr gdnative_script_instance_create(const GDNativeE return reinterpret_cast<GDNativeScriptInstancePtr>(script_instance_extension); } -static GDNativeMethodBindPtr gdnative_classdb_get_method_bind(const GDNativeStringNamePtr p_classname, const GDNativeStringNamePtr p_methodname, GDNativeInt p_hash) { +static GDNativeMethodBindPtr gdnative_classdb_get_method_bind(GDNativeConstStringNamePtr p_classname, GDNativeConstStringNamePtr p_methodname, GDNativeInt p_hash) { const StringName classname = *reinterpret_cast<const StringName *>(p_classname); const StringName methodname = *reinterpret_cast<const StringName *>(p_methodname); MethodBind *mb = ClassDB::get_method(classname, methodname); @@ -898,12 +898,12 @@ static GDNativeMethodBindPtr gdnative_classdb_get_method_bind(const GDNativeStri return (GDNativeMethodBindPtr)mb; } -static GDNativeObjectPtr gdnative_classdb_construct_object(const GDNativeStringNamePtr p_classname) { +static GDNativeObjectPtr gdnative_classdb_construct_object(GDNativeConstStringNamePtr p_classname) { const StringName classname = *reinterpret_cast<const StringName *>(p_classname); return (GDNativeObjectPtr)ClassDB::instantiate(classname); } -static void *gdnative_classdb_get_class_tag(const GDNativeStringNamePtr p_classname) { +static void *gdnative_classdb_get_class_tag(GDNativeConstStringNamePtr p_classname) { const StringName classname = *reinterpret_cast<const StringName *>(p_classname); ClassDB::ClassInfo *class_info = ClassDB::classes.getptr(classname); return class_info ? class_info->class_ptr : nullptr; diff --git a/core/extension/gdnative_interface.h b/core/extension/gdnative_interface.h index 50410c4857..486f5be344 100644 --- a/core/extension/gdnative_interface.h +++ b/core/extension/gdnative_interface.h @@ -141,12 +141,16 @@ typedef enum { } GDNativeVariantOperator; typedef void *GDNativeVariantPtr; +typedef const void *GDNativeConstVariantPtr; typedef void *GDNativeStringNamePtr; +typedef const void *GDNativeConstStringNamePtr; typedef void *GDNativeStringPtr; +typedef const void *GDNativeConstStringPtr; typedef void *GDNativeObjectPtr; +typedef const void *GDNativeConstObjectPtr; typedef void *GDNativeTypePtr; -typedef void *GDNativeExtensionPtr; -typedef void *GDNativeMethodBindPtr; +typedef const void *GDNativeConstTypePtr; +typedef const void *GDNativeMethodBindPtr; typedef int64_t GDNativeInt; typedef uint8_t GDNativeBool; typedef uint64_t GDObjectInstanceID; @@ -171,18 +175,18 @@ typedef struct { typedef void (*GDNativeVariantFromTypeConstructorFunc)(GDNativeVariantPtr, GDNativeTypePtr); typedef void (*GDNativeTypeFromVariantConstructorFunc)(GDNativeTypePtr, GDNativeVariantPtr); -typedef void (*GDNativePtrOperatorEvaluator)(const GDNativeTypePtr p_left, const GDNativeTypePtr p_right, GDNativeTypePtr r_result); -typedef void (*GDNativePtrBuiltInMethod)(GDNativeTypePtr p_base, const GDNativeTypePtr *p_args, GDNativeTypePtr r_return, int p_argument_count); -typedef void (*GDNativePtrConstructor)(GDNativeTypePtr p_base, const GDNativeTypePtr *p_args); +typedef void (*GDNativePtrOperatorEvaluator)(GDNativeConstTypePtr p_left, GDNativeConstTypePtr p_right, GDNativeTypePtr r_result); +typedef void (*GDNativePtrBuiltInMethod)(GDNativeTypePtr p_base, GDNativeConstTypePtr *p_args, GDNativeTypePtr r_return, int p_argument_count); +typedef void (*GDNativePtrConstructor)(GDNativeTypePtr p_base, GDNativeConstTypePtr *p_args); typedef void (*GDNativePtrDestructor)(GDNativeTypePtr p_base); -typedef void (*GDNativePtrSetter)(GDNativeTypePtr p_base, const GDNativeTypePtr p_value); -typedef void (*GDNativePtrGetter)(const GDNativeTypePtr p_base, GDNativeTypePtr r_value); -typedef void (*GDNativePtrIndexedSetter)(GDNativeTypePtr p_base, GDNativeInt p_index, const GDNativeTypePtr p_value); -typedef void (*GDNativePtrIndexedGetter)(const GDNativeTypePtr p_base, GDNativeInt p_index, GDNativeTypePtr r_value); -typedef void (*GDNativePtrKeyedSetter)(GDNativeTypePtr p_base, const GDNativeTypePtr p_key, const GDNativeTypePtr p_value); -typedef void (*GDNativePtrKeyedGetter)(const GDNativeTypePtr p_base, const GDNativeTypePtr p_key, GDNativeTypePtr r_value); -typedef uint32_t (*GDNativePtrKeyedChecker)(const GDNativeVariantPtr p_base, const GDNativeVariantPtr p_key); -typedef void (*GDNativePtrUtilityFunction)(GDNativeTypePtr r_return, const GDNativeTypePtr *p_arguments, int p_argument_count); +typedef void (*GDNativePtrSetter)(GDNativeTypePtr p_base, GDNativeConstTypePtr p_value); +typedef void (*GDNativePtrGetter)(GDNativeConstTypePtr p_base, GDNativeTypePtr r_value); +typedef void (*GDNativePtrIndexedSetter)(GDNativeTypePtr p_base, GDNativeInt p_index, GDNativeConstTypePtr p_value); +typedef void (*GDNativePtrIndexedGetter)(GDNativeConstTypePtr p_base, GDNativeInt p_index, GDNativeTypePtr r_value); +typedef void (*GDNativePtrKeyedSetter)(GDNativeTypePtr p_base, GDNativeConstTypePtr p_key, GDNativeConstTypePtr p_value); +typedef void (*GDNativePtrKeyedGetter)(GDNativeConstTypePtr p_base, GDNativeConstTypePtr p_key, GDNativeTypePtr r_value); +typedef uint32_t (*GDNativePtrKeyedChecker)(GDNativeConstVariantPtr p_base, GDNativeConstVariantPtr p_key); +typedef void (*GDNativePtrUtilityFunction)(GDNativeTypePtr r_return, GDNativeConstTypePtr *p_arguments, int p_argument_count); typedef GDNativeObjectPtr (*GDNativeClassConstructor)(); @@ -200,8 +204,8 @@ typedef struct { typedef void *GDExtensionClassInstancePtr; -typedef GDNativeBool (*GDNativeExtensionClassSet)(GDExtensionClassInstancePtr p_instance, const GDNativeStringNamePtr p_name, const GDNativeVariantPtr p_value); -typedef GDNativeBool (*GDNativeExtensionClassGet)(GDExtensionClassInstancePtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret); +typedef GDNativeBool (*GDNativeExtensionClassSet)(GDExtensionClassInstancePtr p_instance, GDNativeConstStringNamePtr p_name, GDNativeConstVariantPtr p_value); +typedef GDNativeBool (*GDNativeExtensionClassGet)(GDExtensionClassInstancePtr p_instance, GDNativeConstStringNamePtr p_name, GDNativeVariantPtr r_ret); typedef uint64_t (*GDNativeExtensionClassGetRID)(GDExtensionClassInstancePtr p_instance); typedef struct { @@ -230,16 +234,16 @@ typedef struct { typedef const GDNativePropertyInfo *(*GDNativeExtensionClassGetPropertyList)(GDExtensionClassInstancePtr p_instance, uint32_t *r_count); typedef void (*GDNativeExtensionClassFreePropertyList)(GDExtensionClassInstancePtr p_instance, const GDNativePropertyInfo *p_list); -typedef GDNativeBool (*GDNativeExtensionClassPropertyCanRevert)(GDExtensionClassInstancePtr p_instance, const GDNativeStringNamePtr p_name); -typedef GDNativeBool (*GDNativeExtensionClassPropertyGetRevert)(GDExtensionClassInstancePtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret); +typedef GDNativeBool (*GDNativeExtensionClassPropertyCanRevert)(GDExtensionClassInstancePtr p_instance, GDNativeConstStringNamePtr p_name); +typedef GDNativeBool (*GDNativeExtensionClassPropertyGetRevert)(GDExtensionClassInstancePtr p_instance, GDNativeConstStringNamePtr p_name, GDNativeVariantPtr r_ret); typedef void (*GDNativeExtensionClassNotification)(GDExtensionClassInstancePtr p_instance, int32_t p_what); typedef void (*GDNativeExtensionClassToString)(GDExtensionClassInstancePtr p_instance, GDNativeBool *r_is_valid, GDNativeStringPtr p_out); typedef void (*GDNativeExtensionClassReference)(GDExtensionClassInstancePtr p_instance); typedef void (*GDNativeExtensionClassUnreference)(GDExtensionClassInstancePtr p_instance); -typedef void (*GDNativeExtensionClassCallVirtual)(GDExtensionClassInstancePtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_ret); +typedef void (*GDNativeExtensionClassCallVirtual)(GDExtensionClassInstancePtr p_instance, GDNativeConstTypePtr *p_args, GDNativeTypePtr r_ret); typedef GDNativeObjectPtr (*GDNativeExtensionClassCreateInstance)(void *p_userdata); typedef void (*GDNativeExtensionClassFreeInstance)(void *p_userdata, GDExtensionClassInstancePtr p_instance); -typedef GDNativeExtensionClassCallVirtual (*GDNativeExtensionClassGetVirtual)(void *p_userdata, const GDNativeStringNamePtr p_name); +typedef GDNativeExtensionClassCallVirtual (*GDNativeExtensionClassGetVirtual)(void *p_userdata, GDNativeConstStringNamePtr p_name); typedef struct { GDNativeBool is_virtual; @@ -289,8 +293,8 @@ typedef enum { GDNATIVE_EXTENSION_METHOD_ARGUMENT_METADATA_REAL_IS_DOUBLE } GDNativeExtensionClassMethodArgumentMetadata; -typedef void (*GDNativeExtensionClassMethodCall)(void *method_userdata, GDExtensionClassInstancePtr p_instance, const GDNativeVariantPtr *p_args, const GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); -typedef void (*GDNativeExtensionClassMethodPtrCall)(void *method_userdata, GDExtensionClassInstancePtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_ret); +typedef void (*GDNativeExtensionClassMethodCall)(void *method_userdata, GDExtensionClassInstancePtr p_instance, GDNativeConstVariantPtr *p_args, GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); +typedef void (*GDNativeExtensionClassMethodPtrCall)(void *method_userdata, GDExtensionClassInstancePtr p_instance, GDNativeConstTypePtr *p_args, GDNativeTypePtr r_ret); typedef struct { GDNativeStringNamePtr name; @@ -320,25 +324,25 @@ typedef struct { typedef void *GDNativeExtensionScriptInstanceDataPtr; // Pointer to custom ScriptInstance native implementation. -typedef GDNativeBool (*GDNativeExtensionScriptInstanceSet)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, const GDNativeVariantPtr p_value); -typedef GDNativeBool (*GDNativeExtensionScriptInstanceGet)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret); +typedef GDNativeBool (*GDNativeExtensionScriptInstanceSet)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeConstStringNamePtr p_name, GDNativeConstVariantPtr p_value); +typedef GDNativeBool (*GDNativeExtensionScriptInstanceGet)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeConstStringNamePtr p_name, GDNativeVariantPtr r_ret); typedef const GDNativePropertyInfo *(*GDNativeExtensionScriptInstanceGetPropertyList)(GDNativeExtensionScriptInstanceDataPtr p_instance, uint32_t *r_count); typedef void (*GDNativeExtensionScriptInstanceFreePropertyList)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativePropertyInfo *p_list); -typedef GDNativeVariantType (*GDNativeExtensionScriptInstanceGetPropertyType)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, GDNativeBool *r_is_valid); +typedef GDNativeVariantType (*GDNativeExtensionScriptInstanceGetPropertyType)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeConstStringNamePtr p_name, GDNativeBool *r_is_valid); -typedef GDNativeBool (*GDNativeExtensionScriptInstancePropertyCanRevert)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name); -typedef GDNativeBool (*GDNativeExtensionScriptInstancePropertyGetRevert)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret); +typedef GDNativeBool (*GDNativeExtensionScriptInstancePropertyCanRevert)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeConstStringNamePtr p_name); +typedef GDNativeBool (*GDNativeExtensionScriptInstancePropertyGetRevert)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeConstStringNamePtr p_name, GDNativeVariantPtr r_ret); typedef GDNativeObjectPtr (*GDNativeExtensionScriptInstanceGetOwner)(GDNativeExtensionScriptInstanceDataPtr p_instance); -typedef void (*GDNativeExtensionScriptInstancePropertyStateAdd)(const GDNativeStringNamePtr p_name, const GDNativeVariantPtr p_value, void *p_userdata); +typedef void (*GDNativeExtensionScriptInstancePropertyStateAdd)(GDNativeConstStringNamePtr p_name, GDNativeConstVariantPtr p_value, void *p_userdata); typedef void (*GDNativeExtensionScriptInstanceGetPropertyState)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeExtensionScriptInstancePropertyStateAdd p_add_func, void *p_userdata); typedef const GDNativeMethodInfo *(*GDNativeExtensionScriptInstanceGetMethodList)(GDNativeExtensionScriptInstanceDataPtr p_instance, uint32_t *r_count); typedef void (*GDNativeExtensionScriptInstanceFreeMethodList)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeMethodInfo *p_list); -typedef GDNativeBool (*GDNativeExtensionScriptInstanceHasMethod)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name); +typedef GDNativeBool (*GDNativeExtensionScriptInstanceHasMethod)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeConstStringNamePtr p_name); -typedef void (*GDNativeExtensionScriptInstanceCall)(GDNativeExtensionScriptInstanceDataPtr p_self, const GDNativeStringNamePtr p_method, const GDNativeVariantPtr *p_args, const GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); +typedef void (*GDNativeExtensionScriptInstanceCall)(GDNativeExtensionScriptInstanceDataPtr p_self, GDNativeConstStringNamePtr p_method, GDNativeConstVariantPtr *p_args, GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); typedef void (*GDNativeExtensionScriptInstanceNotification)(GDNativeExtensionScriptInstanceDataPtr p_instance, int32_t p_what); typedef void (*GDNativeExtensionScriptInstanceToString)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeBool *r_is_valid, GDNativeStringPtr r_out); @@ -413,41 +417,41 @@ typedef struct { void (*print_warning)(const char *p_description, const char *p_function, const char *p_file, int32_t p_line); void (*print_script_error)(const char *p_description, const char *p_function, const char *p_file, int32_t p_line); - uint64_t (*get_native_struct_size)(const GDNativeStringNamePtr p_name); + uint64_t (*get_native_struct_size)(GDNativeConstStringNamePtr p_name); /* GODOT VARIANT */ /* variant general */ - void (*variant_new_copy)(GDNativeVariantPtr r_dest, const GDNativeVariantPtr p_src); + void (*variant_new_copy)(GDNativeVariantPtr r_dest, GDNativeConstVariantPtr p_src); void (*variant_new_nil)(GDNativeVariantPtr r_dest); void (*variant_destroy)(GDNativeVariantPtr p_self); /* variant type */ - void (*variant_call)(GDNativeVariantPtr p_self, const GDNativeStringNamePtr p_method, const GDNativeVariantPtr *p_args, const GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); - void (*variant_call_static)(GDNativeVariantType p_type, const GDNativeStringNamePtr p_method, const GDNativeVariantPtr *p_args, const GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); - void (*variant_evaluate)(GDNativeVariantOperator p_op, const GDNativeVariantPtr p_a, const GDNativeVariantPtr p_b, GDNativeVariantPtr r_return, GDNativeBool *r_valid); - void (*variant_set)(GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, const GDNativeVariantPtr p_value, GDNativeBool *r_valid); - void (*variant_set_named)(GDNativeVariantPtr p_self, const GDNativeStringNamePtr p_key, const GDNativeVariantPtr p_value, GDNativeBool *r_valid); - void (*variant_set_keyed)(GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, const GDNativeVariantPtr p_value, GDNativeBool *r_valid); - void (*variant_set_indexed)(GDNativeVariantPtr p_self, GDNativeInt p_index, const GDNativeVariantPtr p_value, GDNativeBool *r_valid, GDNativeBool *r_oob); - void (*variant_get)(const GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid); - void (*variant_get_named)(const GDNativeVariantPtr p_self, const GDNativeStringNamePtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid); - void (*variant_get_keyed)(const GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid); - void (*variant_get_indexed)(const GDNativeVariantPtr p_self, GDNativeInt p_index, GDNativeVariantPtr r_ret, GDNativeBool *r_valid, GDNativeBool *r_oob); - GDNativeBool (*variant_iter_init)(const GDNativeVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeBool *r_valid); - GDNativeBool (*variant_iter_next)(const GDNativeVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeBool *r_valid); - void (*variant_iter_get)(const GDNativeVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeVariantPtr r_ret, GDNativeBool *r_valid); - GDNativeInt (*variant_hash)(const GDNativeVariantPtr p_self); - GDNativeInt (*variant_recursive_hash)(const GDNativeVariantPtr p_self, GDNativeInt p_recursion_count); - GDNativeBool (*variant_hash_compare)(const GDNativeVariantPtr p_self, const GDNativeVariantPtr p_other); - GDNativeBool (*variant_booleanize)(const GDNativeVariantPtr p_self); - void (*variant_duplicate)(const GDNativeVariantPtr p_self, GDNativeVariantPtr r_ret, GDNativeBool p_deep); - void (*variant_stringify)(const GDNativeVariantPtr p_self, GDNativeStringPtr r_ret); - - GDNativeVariantType (*variant_get_type)(const GDNativeVariantPtr p_self); - GDNativeBool (*variant_has_method)(const GDNativeVariantPtr p_self, const GDNativeStringNamePtr p_method); - GDNativeBool (*variant_has_member)(GDNativeVariantType p_type, const GDNativeStringNamePtr p_member); - GDNativeBool (*variant_has_key)(const GDNativeVariantPtr p_self, const GDNativeVariantPtr p_key, GDNativeBool *r_valid); + void (*variant_call)(GDNativeVariantPtr p_self, GDNativeConstStringNamePtr p_method, GDNativeConstVariantPtr *p_args, GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); + void (*variant_call_static)(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_method, GDNativeConstVariantPtr *p_args, GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); + void (*variant_evaluate)(GDNativeVariantOperator p_op, GDNativeConstVariantPtr p_a, GDNativeConstVariantPtr p_b, GDNativeVariantPtr r_return, GDNativeBool *r_valid); + void (*variant_set)(GDNativeVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeConstVariantPtr p_value, GDNativeBool *r_valid); + void (*variant_set_named)(GDNativeVariantPtr p_self, GDNativeConstStringNamePtr p_key, GDNativeConstVariantPtr p_value, GDNativeBool *r_valid); + void (*variant_set_keyed)(GDNativeVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeConstVariantPtr p_value, GDNativeBool *r_valid); + void (*variant_set_indexed)(GDNativeVariantPtr p_self, GDNativeInt p_index, GDNativeConstVariantPtr p_value, GDNativeBool *r_valid, GDNativeBool *r_oob); + void (*variant_get)(GDNativeConstVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid); + void (*variant_get_named)(GDNativeConstVariantPtr p_self, GDNativeConstStringNamePtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid); + void (*variant_get_keyed)(GDNativeConstVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeVariantPtr r_ret, GDNativeBool *r_valid); + void (*variant_get_indexed)(GDNativeConstVariantPtr p_self, GDNativeInt p_index, GDNativeVariantPtr r_ret, GDNativeBool *r_valid, GDNativeBool *r_oob); + GDNativeBool (*variant_iter_init)(GDNativeConstVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeBool *r_valid); + GDNativeBool (*variant_iter_next)(GDNativeConstVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeBool *r_valid); + void (*variant_iter_get)(GDNativeConstVariantPtr p_self, GDNativeVariantPtr r_iter, GDNativeVariantPtr r_ret, GDNativeBool *r_valid); + GDNativeInt (*variant_hash)(GDNativeConstVariantPtr p_self); + GDNativeInt (*variant_recursive_hash)(GDNativeConstVariantPtr p_self, GDNativeInt p_recursion_count); + GDNativeBool (*variant_hash_compare)(GDNativeConstVariantPtr p_self, GDNativeConstVariantPtr p_other); + GDNativeBool (*variant_booleanize)(GDNativeConstVariantPtr p_self); + void (*variant_duplicate)(GDNativeConstVariantPtr p_self, GDNativeVariantPtr r_ret, GDNativeBool p_deep); + void (*variant_stringify)(GDNativeConstVariantPtr p_self, GDNativeStringPtr r_ret); + + GDNativeVariantType (*variant_get_type)(GDNativeConstVariantPtr p_self); + GDNativeBool (*variant_has_method)(GDNativeConstVariantPtr p_self, GDNativeConstStringNamePtr p_method); + GDNativeBool (*variant_has_member)(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_member); + GDNativeBool (*variant_has_key)(GDNativeConstVariantPtr p_self, GDNativeConstVariantPtr p_key, GDNativeBool *r_valid); void (*variant_get_type_name)(GDNativeVariantType p_type, GDNativeStringPtr r_name); GDNativeBool (*variant_can_convert)(GDNativeVariantType p_from, GDNativeVariantType p_to); GDNativeBool (*variant_can_convert_strict)(GDNativeVariantType p_from, GDNativeVariantType p_to); @@ -456,19 +460,19 @@ typedef struct { GDNativeVariantFromTypeConstructorFunc (*get_variant_from_type_constructor)(GDNativeVariantType p_type); GDNativeTypeFromVariantConstructorFunc (*get_variant_to_type_constructor)(GDNativeVariantType p_type); GDNativePtrOperatorEvaluator (*variant_get_ptr_operator_evaluator)(GDNativeVariantOperator p_operator, GDNativeVariantType p_type_a, GDNativeVariantType p_type_b); - GDNativePtrBuiltInMethod (*variant_get_ptr_builtin_method)(GDNativeVariantType p_type, const GDNativeStringNamePtr p_method, GDNativeInt p_hash); + GDNativePtrBuiltInMethod (*variant_get_ptr_builtin_method)(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_method, GDNativeInt p_hash); GDNativePtrConstructor (*variant_get_ptr_constructor)(GDNativeVariantType p_type, int32_t p_constructor); GDNativePtrDestructor (*variant_get_ptr_destructor)(GDNativeVariantType p_type); - void (*variant_construct)(GDNativeVariantType p_type, GDNativeVariantPtr p_base, const GDNativeVariantPtr *p_args, int32_t p_argument_count, GDNativeCallError *r_error); - GDNativePtrSetter (*variant_get_ptr_setter)(GDNativeVariantType p_type, const GDNativeStringNamePtr p_member); - GDNativePtrGetter (*variant_get_ptr_getter)(GDNativeVariantType p_type, const GDNativeStringNamePtr p_member); + void (*variant_construct)(GDNativeVariantType p_type, GDNativeVariantPtr p_base, GDNativeConstVariantPtr *p_args, int32_t p_argument_count, GDNativeCallError *r_error); + GDNativePtrSetter (*variant_get_ptr_setter)(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_member); + GDNativePtrGetter (*variant_get_ptr_getter)(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_member); GDNativePtrIndexedSetter (*variant_get_ptr_indexed_setter)(GDNativeVariantType p_type); GDNativePtrIndexedGetter (*variant_get_ptr_indexed_getter)(GDNativeVariantType p_type); GDNativePtrKeyedSetter (*variant_get_ptr_keyed_setter)(GDNativeVariantType p_type); GDNativePtrKeyedGetter (*variant_get_ptr_keyed_getter)(GDNativeVariantType p_type); GDNativePtrKeyedChecker (*variant_get_ptr_keyed_checker)(GDNativeVariantType p_type); - void (*variant_get_constant_value)(GDNativeVariantType p_type, const GDNativeStringNamePtr p_constant, GDNativeVariantPtr r_ret); - GDNativePtrUtilityFunction (*variant_get_ptr_utility_function)(const GDNativeStringNamePtr p_function, GDNativeInt p_hash); + void (*variant_get_constant_value)(GDNativeVariantType p_type, GDNativeConstStringNamePtr p_constant, GDNativeVariantPtr r_ret); + GDNativePtrUtilityFunction (*variant_get_ptr_utility_function)(GDNativeConstStringNamePtr p_function, GDNativeInt p_hash); /* extra utilities */ void (*string_new_with_latin1_chars)(GDNativeStringPtr r_dest, const char *p_contents); @@ -476,12 +480,11 @@ typedef struct { void (*string_new_with_utf16_chars)(GDNativeStringPtr r_dest, const char16_t *p_contents); void (*string_new_with_utf32_chars)(GDNativeStringPtr r_dest, const char32_t *p_contents); void (*string_new_with_wide_chars)(GDNativeStringPtr r_dest, const wchar_t *p_contents); - void (*string_new_with_latin1_chars_and_len)(GDNativeStringPtr r_dest, const char *p_contents, const GDNativeInt p_size); - void (*string_new_with_utf8_chars_and_len)(GDNativeStringPtr r_dest, const char *p_contents, const GDNativeInt p_size); - void (*string_new_with_utf16_chars_and_len)(GDNativeStringPtr r_dest, const char16_t *p_contents, const GDNativeInt p_size); - void (*string_new_with_utf32_chars_and_len)(GDNativeStringPtr r_dest, const char32_t *p_contents, const GDNativeInt p_size); - void (*string_new_with_wide_chars_and_len)(GDNativeStringPtr r_dest, const wchar_t *p_contents, const GDNativeInt p_size); - + void (*string_new_with_latin1_chars_and_len)(GDNativeStringPtr r_dest, const char *p_contents, GDNativeInt p_size); + void (*string_new_with_utf8_chars_and_len)(GDNativeStringPtr r_dest, const char *p_contents, GDNativeInt p_size); + void (*string_new_with_utf16_chars_and_len)(GDNativeStringPtr r_dest, const char16_t *p_contents, GDNativeInt p_size); + void (*string_new_with_utf32_chars_and_len)(GDNativeStringPtr r_dest, const char32_t *p_contents, GDNativeInt p_size); + void (*string_new_with_wide_chars_and_len)(GDNativeStringPtr r_dest, const wchar_t *p_contents, GDNativeInt p_size); /* Information about the following functions: * - The return value is the resulting encoded string length. * - The length returned is in characters, not in bytes. It also does not include a trailing zero. @@ -490,63 +493,63 @@ typedef struct { * - p_max_write_length argument is in characters, not bytes. It will be ignored if r_text is NULL. * - p_max_write_length argument does not affect the return value, it's only to cap write length. */ - GDNativeInt (*string_to_latin1_chars)(const GDNativeStringPtr p_self, char *r_text, GDNativeInt p_max_write_length); - GDNativeInt (*string_to_utf8_chars)(const GDNativeStringPtr p_self, char *r_text, GDNativeInt p_max_write_length); - GDNativeInt (*string_to_utf16_chars)(const GDNativeStringPtr p_self, char16_t *r_text, GDNativeInt p_max_write_length); - GDNativeInt (*string_to_utf32_chars)(const GDNativeStringPtr p_self, char32_t *r_text, GDNativeInt p_max_write_length); - GDNativeInt (*string_to_wide_chars)(const GDNativeStringPtr p_self, wchar_t *r_text, GDNativeInt p_max_write_length); + GDNativeInt (*string_to_latin1_chars)(GDNativeConstStringPtr p_self, char *r_text, GDNativeInt p_max_write_length); + GDNativeInt (*string_to_utf8_chars)(GDNativeConstStringPtr p_self, char *r_text, GDNativeInt p_max_write_length); + GDNativeInt (*string_to_utf16_chars)(GDNativeConstStringPtr p_self, char16_t *r_text, GDNativeInt p_max_write_length); + GDNativeInt (*string_to_utf32_chars)(GDNativeConstStringPtr p_self, char32_t *r_text, GDNativeInt p_max_write_length); + GDNativeInt (*string_to_wide_chars)(GDNativeConstStringPtr p_self, wchar_t *r_text, GDNativeInt p_max_write_length); char32_t *(*string_operator_index)(GDNativeStringPtr p_self, GDNativeInt p_index); - const char32_t *(*string_operator_index_const)(const GDNativeStringPtr p_self, GDNativeInt p_index); + const char32_t *(*string_operator_index_const)(GDNativeConstStringPtr p_self, GDNativeInt p_index); /* Packed array functions */ uint8_t *(*packed_byte_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedByteArray - const uint8_t *(*packed_byte_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedByteArray + const uint8_t *(*packed_byte_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedByteArray GDNativeTypePtr (*packed_color_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedColorArray, returns Color ptr - GDNativeTypePtr (*packed_color_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedColorArray, returns Color ptr + GDNativeTypePtr (*packed_color_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedColorArray, returns Color ptr float *(*packed_float32_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat32Array - const float *(*packed_float32_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat32Array + const float *(*packed_float32_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat32Array double *(*packed_float64_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat64Array - const double *(*packed_float64_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat64Array + const double *(*packed_float64_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat64Array int32_t *(*packed_int32_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array - const int32_t *(*packed_int32_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array + const int32_t *(*packed_int32_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array int64_t *(*packed_int64_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array - const int64_t *(*packed_int64_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array + const int64_t *(*packed_int64_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array GDNativeStringPtr (*packed_string_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedStringArray - GDNativeStringPtr (*packed_string_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedStringArray + GDNativeStringPtr (*packed_string_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedStringArray GDNativeTypePtr (*packed_vector2_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector2Array, returns Vector2 ptr - GDNativeTypePtr (*packed_vector2_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector2Array, returns Vector2 ptr + GDNativeTypePtr (*packed_vector2_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector2Array, returns Vector2 ptr GDNativeTypePtr (*packed_vector3_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector3Array, returns Vector3 ptr - GDNativeTypePtr (*packed_vector3_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector3Array, returns Vector3 ptr + GDNativeTypePtr (*packed_vector3_array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector3Array, returns Vector3 ptr GDNativeVariantPtr (*array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be an Array ptr - GDNativeVariantPtr (*array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be an Array ptr + GDNativeVariantPtr (*array_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeInt p_index); // p_self should be an Array ptr /* Dictionary functions */ - GDNativeVariantPtr (*dictionary_operator_index)(GDNativeTypePtr p_self, const GDNativeVariantPtr p_key); // p_self should be an Dictionary ptr - GDNativeVariantPtr (*dictionary_operator_index_const)(const GDNativeTypePtr p_self, const GDNativeVariantPtr p_key); // p_self should be an Dictionary ptr + GDNativeVariantPtr (*dictionary_operator_index)(GDNativeTypePtr p_self, GDNativeConstVariantPtr p_key); // p_self should be an Dictionary ptr + GDNativeVariantPtr (*dictionary_operator_index_const)(GDNativeConstTypePtr p_self, GDNativeConstVariantPtr p_key); // p_self should be an Dictionary ptr /* OBJECT */ - void (*object_method_bind_call)(const GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeVariantPtr *p_args, GDNativeInt p_arg_count, GDNativeVariantPtr r_ret, GDNativeCallError *r_error); - void (*object_method_bind_ptrcall)(const GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_ret); + void (*object_method_bind_call)(GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, GDNativeConstVariantPtr *p_args, GDNativeInt p_arg_count, GDNativeVariantPtr r_ret, GDNativeCallError *r_error); + void (*object_method_bind_ptrcall)(GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, GDNativeConstTypePtr *p_args, GDNativeTypePtr r_ret); void (*object_destroy)(GDNativeObjectPtr p_o); - GDNativeObjectPtr (*global_get_singleton)(const GDNativeStringNamePtr p_name); + GDNativeObjectPtr (*global_get_singleton)(GDNativeConstStringNamePtr p_name); void *(*object_get_instance_binding)(GDNativeObjectPtr p_o, void *p_token, const GDNativeInstanceBindingCallbacks *p_callbacks); void (*object_set_instance_binding)(GDNativeObjectPtr p_o, void *p_token, void *p_binding, const GDNativeInstanceBindingCallbacks *p_callbacks); - void (*object_set_instance)(GDNativeObjectPtr p_o, const GDNativeStringNamePtr p_classname, GDExtensionClassInstancePtr p_instance); /* p_classname should be a registered extension class and should extend the p_o object's class. */ + void (*object_set_instance)(GDNativeObjectPtr p_o, GDNativeConstStringNamePtr p_classname, GDExtensionClassInstancePtr p_instance); /* p_classname should be a registered extension class and should extend the p_o object's class. */ - GDNativeObjectPtr (*object_cast_to)(const GDNativeObjectPtr p_object, void *p_class_tag); + GDNativeObjectPtr (*object_cast_to)(GDNativeConstObjectPtr p_object, void *p_class_tag); GDNativeObjectPtr (*object_get_instance_from_id)(GDObjectInstanceID p_instance_id); - GDObjectInstanceID (*object_get_instance_id)(const GDNativeObjectPtr p_object); + GDObjectInstanceID (*object_get_instance_id)(GDNativeConstObjectPtr p_object); /* SCRIPT INSTANCE */ @@ -554,23 +557,23 @@ typedef struct { /* CLASSDB */ - GDNativeObjectPtr (*classdb_construct_object)(const GDNativeStringNamePtr p_classname); /* The passed class must be a built-in godot class, or an already-registered extension class. In both case, object_set_instance should be called to fully initialize the object. */ - GDNativeMethodBindPtr (*classdb_get_method_bind)(const GDNativeStringNamePtr p_classname, const GDNativeStringNamePtr p_methodname, GDNativeInt p_hash); - void *(*classdb_get_class_tag)(const GDNativeStringNamePtr p_classname); + GDNativeObjectPtr (*classdb_construct_object)(GDNativeConstStringNamePtr p_classname); /* The passed class must be a built-in godot class, or an already-registered extension class. In both case, object_set_instance should be called to fully initialize the object. */ + GDNativeMethodBindPtr (*classdb_get_method_bind)(GDNativeConstStringNamePtr p_classname, GDNativeConstStringNamePtr p_methodname, GDNativeInt p_hash); + void *(*classdb_get_class_tag)(GDNativeConstStringNamePtr p_classname); /* CLASSDB EXTENSION */ /* Provided parameters for `classdb_register_extension_*` can be safely freed once the function returns. */ - void (*classdb_register_extension_class)(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs); - void (*classdb_register_extension_class_method)(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info); - void (*classdb_register_extension_class_integer_constant)(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_enum_name, const GDNativeStringNamePtr p_constant_name, GDNativeInt p_constant_value, GDNativeBool p_is_bitfield); - void (*classdb_register_extension_class_property)(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativePropertyInfo *p_info, const GDNativeStringNamePtr p_setter, const GDNativeStringNamePtr p_getter); - void (*classdb_register_extension_class_property_group)(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringPtr p_group_name, const GDNativeStringPtr p_prefix); - void (*classdb_register_extension_class_property_subgroup)(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringPtr p_subgroup_name, const GDNativeStringPtr p_prefix); - void (*classdb_register_extension_class_signal)(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count); - void (*classdb_unregister_extension_class)(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name); /* Unregistering a parent class before a class that inherits it will result in failure. Inheritors must be unregistered first. */ + void (*classdb_register_extension_class)(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs); + void (*classdb_register_extension_class_method)(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info); + void (*classdb_register_extension_class_integer_constant)(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_enum_name, GDNativeConstStringNamePtr p_constant_name, GDNativeInt p_constant_value, GDNativeBool p_is_bitfield); + void (*classdb_register_extension_class_property)(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, const GDNativePropertyInfo *p_info, GDNativeConstStringNamePtr p_setter, GDNativeConstStringNamePtr p_getter); + void (*classdb_register_extension_class_property_group)(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringPtr p_group_name, GDNativeConstStringPtr p_prefix); + void (*classdb_register_extension_class_property_subgroup)(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringPtr p_subgroup_name, GDNativeConstStringPtr p_prefix); + void (*classdb_register_extension_class_signal)(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count); + void (*classdb_unregister_extension_class)(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name); /* Unregistering a parent class before a class that inherits it will result in failure. Inheritors must be unregistered first. */ - void (*get_library_path)(const GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path); + void (*get_library_path)(GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path); } GDNativeInterface; @@ -600,7 +603,7 @@ typedef struct { * It can be used to set up different init levels, which are called during various stages of initialization/shutdown. * The function name must be a unique one specified in the .gdextension config file. */ -typedef GDNativeBool (*GDNativeInitializationFunction)(const GDNativeInterface *p_interface, const GDNativeExtensionClassLibraryPtr p_library, GDNativeInitialization *r_initialization); +typedef GDNativeBool (*GDNativeInitializationFunction)(const GDNativeInterface *p_interface, GDNativeExtensionClassLibraryPtr p_library, GDNativeInitialization *r_initialization); #ifdef __cplusplus } diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp index 83a2e80793..37967cdb48 100644 --- a/core/extension/native_extension.cpp +++ b/core/extension/native_extension.cpp @@ -76,20 +76,20 @@ public: } #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { Variant ret; GDExtensionClassInstancePtr extension_instance = is_static() ? nullptr : p_object->_get_extension_instance(); GDNativeCallError ce{ GDNATIVE_CALL_OK, 0, 0 }; - call_func(method_userdata, extension_instance, (const GDNativeVariantPtr *)p_args, p_arg_count, (GDNativeVariantPtr)&ret, &ce); + call_func(method_userdata, extension_instance, reinterpret_cast<GDNativeConstVariantPtr *>(p_args), p_arg_count, (GDNativeVariantPtr)&ret, &ce); r_error.error = Callable::CallError::Error(ce.error); r_error.argument = ce.argument; r_error.expected = ce.expected; return ret; } - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) override { + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const override { ERR_FAIL_COND_MSG(vararg, "Vararg methods don't have ptrcall support. This is most likely an engine bug."); GDExtensionClassInstancePtr extension_instance = p_object->_get_extension_instance(); - ptrcall_func(method_userdata, extension_instance, (const GDNativeTypePtr *)p_args, (GDNativeTypePtr)r_ret); + ptrcall_func(method_userdata, extension_instance, reinterpret_cast<GDNativeConstTypePtr *>(p_args), (GDNativeTypePtr)r_ret); } virtual bool is_vararg() const override { @@ -135,11 +135,11 @@ public: static GDNativeInterface gdnative_interface; -void NativeExtension::_register_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_register_extension_class(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); - StringName class_name = *reinterpret_cast<StringName *>(p_class_name); - StringName parent_class_name = *reinterpret_cast<StringName *>(p_parent_class_name); + StringName class_name = *reinterpret_cast<const StringName *>(p_class_name); + StringName parent_class_name = *reinterpret_cast<const StringName *>(p_parent_class_name); ERR_FAIL_COND_MSG(!String(class_name).is_valid_identifier(), "Attempt to register extension class '" + class_name + "', which is not a valid class identifier."); ERR_FAIL_COND_MSG(ClassDB::class_exists(class_name), "Attempt to register extension class '" + class_name + "', which appears to be already registered."); @@ -190,8 +190,8 @@ void NativeExtension::_register_extension_class(const GDNativeExtensionClassLibr ClassDB::register_extension_class(&extension->native_extension); } -void NativeExtension::_register_extension_class_method(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_register_extension_class_method(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); StringName class_name = *reinterpret_cast<const StringName *>(p_class_name); StringName method_name = *reinterpret_cast<const StringName *>(p_method_info->name); @@ -204,8 +204,8 @@ void NativeExtension::_register_extension_class_method(const GDNativeExtensionCl ClassDB::bind_method_custom(class_name, method); } -void NativeExtension::_register_extension_class_integer_constant(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_enum_name, const GDNativeStringNamePtr p_constant_name, GDNativeInt p_constant_value, GDNativeBool p_is_bitfield) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_register_extension_class_integer_constant(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_enum_name, GDNativeConstStringNamePtr p_constant_name, GDNativeInt p_constant_value, GDNativeBool p_is_bitfield) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); StringName class_name = *reinterpret_cast<const StringName *>(p_class_name); StringName enum_name = *reinterpret_cast<const StringName *>(p_enum_name); @@ -215,8 +215,8 @@ void NativeExtension::_register_extension_class_integer_constant(const GDNativeE ClassDB::bind_integer_constant(class_name, enum_name, constant_name, p_constant_value, p_is_bitfield); } -void NativeExtension::_register_extension_class_property(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativePropertyInfo *p_info, const GDNativeStringNamePtr p_setter, const GDNativeStringNamePtr p_getter) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_register_extension_class_property(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, const GDNativePropertyInfo *p_info, GDNativeConstStringNamePtr p_setter, GDNativeConstStringNamePtr p_getter) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); StringName class_name = *reinterpret_cast<const StringName *>(p_class_name); StringName setter = *reinterpret_cast<const StringName *>(p_setter); @@ -230,8 +230,8 @@ void NativeExtension::_register_extension_class_property(const GDNativeExtension ClassDB::add_property(class_name, pinfo, setter, getter); } -void NativeExtension::_register_extension_class_property_group(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringPtr p_group_name, const GDNativeStringPtr p_prefix) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_register_extension_class_property_group(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringPtr p_group_name, GDNativeConstStringPtr p_prefix) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); StringName class_name = *reinterpret_cast<const StringName *>(p_class_name); String group_name = *reinterpret_cast<const String *>(p_group_name); @@ -241,8 +241,8 @@ void NativeExtension::_register_extension_class_property_group(const GDNativeExt ClassDB::add_property_group(class_name, group_name, prefix); } -void NativeExtension::_register_extension_class_property_subgroup(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringPtr p_subgroup_name, const GDNativeStringPtr p_prefix) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_register_extension_class_property_subgroup(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringPtr p_subgroup_name, GDNativeConstStringPtr p_prefix) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); StringName class_name = *reinterpret_cast<const StringName *>(p_class_name); String subgroup_name = *reinterpret_cast<const String *>(p_subgroup_name); @@ -252,8 +252,8 @@ void NativeExtension::_register_extension_class_property_subgroup(const GDNative ClassDB::add_property_subgroup(class_name, subgroup_name, prefix); } -void NativeExtension::_register_extension_class_signal(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_register_extension_class_signal(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); StringName class_name = *reinterpret_cast<const StringName *>(p_class_name); StringName signal_name = *reinterpret_cast<const StringName *>(p_signal_name); @@ -268,8 +268,8 @@ void NativeExtension::_register_extension_class_signal(const GDNativeExtensionCl ClassDB::add_signal(class_name, s); } -void NativeExtension::_unregister_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_unregister_extension_class(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); StringName class_name = *reinterpret_cast<const StringName *>(p_class_name); ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to unregister unexisting extension class '" + class_name + "'."); @@ -283,8 +283,8 @@ void NativeExtension::_unregister_extension_class(const GDNativeExtensionClassLi self->extension_classes.erase(class_name); } -void NativeExtension::_get_library_path(const GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path) { - NativeExtension *self = static_cast<NativeExtension *>(p_library); +void NativeExtension::_get_library_path(GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path) { + NativeExtension *self = reinterpret_cast<NativeExtension *>(p_library); *(String *)r_path = self->library_path; } diff --git a/core/extension/native_extension.h b/core/extension/native_extension.h index 70f6f9f039..ca6200cd1e 100644 --- a/core/extension/native_extension.h +++ b/core/extension/native_extension.h @@ -47,15 +47,15 @@ class NativeExtension : public Resource { HashMap<StringName, Extension> extension_classes; - static void _register_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs); - static void _register_extension_class_method(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info); - static void _register_extension_class_integer_constant(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_enum_name, const GDNativeStringNamePtr p_constant_name, GDNativeInt p_constant_value, GDNativeBool p_is_bitfield); - static void _register_extension_class_property(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativePropertyInfo *p_info, const GDNativeStringNamePtr p_setter, const GDNativeStringNamePtr p_getter); - static void _register_extension_class_property_group(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_group_name, const GDNativeStringNamePtr p_prefix); - static void _register_extension_class_property_subgroup(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_subgroup_name, const GDNativeStringNamePtr p_prefix); - static void _register_extension_class_signal(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name, const GDNativeStringNamePtr p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count); - static void _unregister_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const GDNativeStringNamePtr p_class_name); - static void _get_library_path(const GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path); + static void _register_extension_class(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs); + static void _register_extension_class_method(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info); + static void _register_extension_class_integer_constant(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_enum_name, GDNativeConstStringNamePtr p_constant_name, GDNativeInt p_constant_value, GDNativeBool p_is_bitfield); + static void _register_extension_class_property(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, const GDNativePropertyInfo *p_info, GDNativeConstStringNamePtr p_setter, GDNativeConstStringNamePtr p_getter); + static void _register_extension_class_property_group(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_group_name, GDNativeConstStringNamePtr p_prefix); + static void _register_extension_class_property_subgroup(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_subgroup_name, GDNativeConstStringNamePtr p_prefix); + static void _register_extension_class_signal(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name, GDNativeConstStringNamePtr p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count); + static void _unregister_extension_class(GDNativeExtensionClassLibraryPtr p_library, GDNativeConstStringNamePtr p_class_name); + static void _get_library_path(GDNativeExtensionClassLibraryPtr p_library, GDNativeStringPtr r_path); GDNativeInitialization initialization; int32_t level_initialized = -1; 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/make_virtuals.py b/core/object/make_virtuals.py index 61bf6d900a..c92ac0961e 100644 --- a/core/object/make_virtuals.py +++ b/core/object/make_virtuals.py @@ -94,7 +94,7 @@ def generate_version(argcount, const=False, returns=False): argtext += ", " callsiargs = "Variant vargs[" + str(argcount) + "]={" callsiargptrs = "\t\tconst Variant *vargptrs[" + str(argcount) + "]={" - callptrargsptr = "\t\tconst GDNativeTypePtr argptrs[" + str(argcount) + "]={" + callptrargsptr = "\t\tGDNativeConstTypePtr argptrs[" + str(argcount) + "]={" callptrargs = "" for i in range(argcount): if i > 0: @@ -121,7 +121,7 @@ def generate_version(argcount, const=False, returns=False): s = s.replace("$CALLSIARGPASS", "(const Variant **)vargptrs," + str(argcount)) callptrargsptr += "};\\\n" s = s.replace("$CALLPTRARGS", callptrargs + callptrargsptr) - s = s.replace("$CALLPTRARGPASS", "(const GDNativeTypePtr*)argptrs") + s = s.replace("$CALLPTRARGPASS", "reinterpret_cast<GDNativeConstTypePtr*>(argptrs)") else: s = s.replace("$CALLSIARGS", "") s = s.replace("$CALLSIARGPASS", "nullptr, 0") diff --git a/core/object/method_bind.h b/core/object/method_bind.h index 598e8a224d..0f1366aefd 100644 --- a/core/object/method_bind.h +++ b/core/object/method_bind.h @@ -110,8 +110,8 @@ public: _FORCE_INLINE_ int get_argument_count() const { return argument_count; }; - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) = 0; - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) = 0; + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const = 0; + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const = 0; StringName get_name() const; void set_name(const StringName &p_name); @@ -158,7 +158,7 @@ public: } #endif - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) override { + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const override { ERR_FAIL(); // Can't call. } @@ -210,7 +210,7 @@ class MethodBindVarArgT : public MethodBindVarArgBase<MethodBindVarArgT<T>, T, v friend class MethodBindVarArgBase<MethodBindVarArgT<T>, T, void, false>; public: - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { (static_cast<T *>(p_object)->*MethodBindVarArgBase<MethodBindVarArgT<T>, T, void, false>::method)(p_args, p_arg_count, r_error); return {}; } @@ -246,7 +246,7 @@ public: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { return (static_cast<T *>(p_object)->*MethodBindVarArgBase<MethodBindVarArgTR<T, R>, T, R, true>::method)(p_args, p_arg_count, r_error); } #if defined(SANITIZERS_ENABLED) && defined(__GNUC__) && !defined(__clang__) @@ -313,7 +313,7 @@ public: } #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { #ifdef TYPED_METHOD_BIND call_with_variant_args_dv(static_cast<T *>(p_object), method, p_args, p_arg_count, r_error, get_default_arguments()); #else @@ -322,7 +322,7 @@ public: return Variant(); } - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) override { + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const override { #ifdef TYPED_METHOD_BIND call_with_ptr_args<T, P...>(static_cast<T *>(p_object), method, p_args); #else @@ -380,7 +380,7 @@ public: } #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { #ifdef TYPED_METHOD_BIND call_with_variant_argsc_dv(static_cast<T *>(p_object), method, p_args, p_arg_count, r_error, get_default_arguments()); #else @@ -389,7 +389,7 @@ public: return Variant(); } - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) override { + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const override { #ifdef TYPED_METHOD_BIND call_with_ptr_argsc<T, P...>(static_cast<T *>(p_object), method, p_args); #else @@ -457,7 +457,7 @@ public: } #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { Variant ret; #ifdef TYPED_METHOD_BIND call_with_variant_args_ret_dv(static_cast<T *>(p_object), method, p_args, p_arg_count, ret, r_error, get_default_arguments()); @@ -467,7 +467,7 @@ public: return ret; } - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) override { + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const override { #ifdef TYPED_METHOD_BIND call_with_ptr_args_ret<T, R, P...>(static_cast<T *>(p_object), method, p_args, r_ret); #else @@ -536,7 +536,7 @@ public: } #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { Variant ret; #ifdef TYPED_METHOD_BIND call_with_variant_args_retc_dv(static_cast<T *>(p_object), method, p_args, p_arg_count, ret, r_error, get_default_arguments()); @@ -546,7 +546,7 @@ public: return ret; } - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) override { + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const override { #ifdef TYPED_METHOD_BIND call_with_ptr_args_retc<T, R, P...>(static_cast<T *>(p_object), method, p_args, r_ret); #else @@ -604,13 +604,13 @@ public: } #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { (void)p_object; // unused call_with_variant_args_static_dv(function, p_args, p_arg_count, r_error, get_default_arguments()); return Variant(); } - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) override { + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const override { (void)p_object; (void)r_ret; call_with_ptr_args_static_method(function, p_args); @@ -667,13 +667,13 @@ public: } #endif - virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override { + virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override { Variant ret; call_with_variant_args_static_ret_dv(function, p_args, p_arg_count, ret, r_error, get_default_arguments()); return ret; } - virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) override { + virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) const override { (void)p_object; call_with_ptr_args_static_method_ret(function, p_args, r_ret); } 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/object/script_language_extension.h b/core/object/script_language_extension.h index 9a2a176096..5262c41644 100644 --- a/core/object/script_language_extension.h +++ b/core/object/script_language_extension.h @@ -650,13 +650,13 @@ public: virtual bool set(const StringName &p_name, const Variant &p_value) override { if (native_info->set_func) { - return native_info->set_func(instance, (const GDNativeStringNamePtr)&p_name, (const GDNativeVariantPtr)&p_value); + return native_info->set_func(instance, (GDNativeConstStringNamePtr)&p_name, (GDNativeConstVariantPtr)&p_value); } return false; } virtual bool get(const StringName &p_name, Variant &r_ret) const override { if (native_info->get_func) { - return native_info->get_func(instance, (const GDNativeStringNamePtr)&p_name, (GDNativeVariantPtr)&r_ret); + return native_info->get_func(instance, (GDNativeConstStringNamePtr)&p_name, (GDNativeVariantPtr)&r_ret); } return false; } @@ -683,7 +683,7 @@ public: virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = nullptr) const override { if (native_info->get_property_type_func) { GDNativeBool is_valid = 0; - GDNativeVariantType type = native_info->get_property_type_func(instance, (const GDNativeStringNamePtr)&p_name, &is_valid); + GDNativeVariantType type = native_info->get_property_type_func(instance, (GDNativeConstStringNamePtr)&p_name, &is_valid); if (r_is_valid) { *r_is_valid = is_valid != 0; } @@ -694,13 +694,13 @@ public: virtual bool property_can_revert(const StringName &p_name) const override { if (native_info->property_can_revert_func) { - return native_info->property_can_revert_func(instance, (const GDNativeStringNamePtr)&p_name); + return native_info->property_can_revert_func(instance, (GDNativeConstStringNamePtr)&p_name); } return false; } virtual bool property_get_revert(const StringName &p_name, Variant &r_ret) const override { if (native_info->property_get_revert_func) { - return native_info->property_get_revert_func(instance, (const GDNativeStringNamePtr)&p_name, (GDNativeVariantPtr)&r_ret); + return native_info->property_get_revert_func(instance, (GDNativeConstStringNamePtr)&p_name, (GDNativeVariantPtr)&r_ret); } return false; } @@ -711,7 +711,7 @@ public: } return nullptr; } - static void _add_property_with_state(const GDNativeStringNamePtr p_name, const GDNativeVariantPtr p_value, void *p_userdata) { + static void _add_property_with_state(GDNativeConstStringNamePtr p_name, GDNativeConstVariantPtr p_value, void *p_userdata) { List<Pair<StringName, Variant>> *state = (List<Pair<StringName, Variant>> *)p_userdata; state->push_back(Pair<StringName, Variant>(*(const StringName *)p_name, *(const Variant *)p_value)); } @@ -744,7 +744,7 @@ public: Variant ret; if (native_info->call_func) { GDNativeCallError ce; - native_info->call_func(instance, (const GDNativeStringNamePtr)&p_method, (const GDNativeVariantPtr *)p_args, p_argcount, (GDNativeVariantPtr)&ret, &ce); + native_info->call_func(instance, (GDNativeConstStringNamePtr)&p_method, (GDNativeConstVariantPtr *)p_args, p_argcount, (GDNativeVariantPtr)&ret, &ce); r_error.error = Callable::CallError::Error(ce.error); r_error.argument = ce.argument; r_error.expected = ce.expected; @@ -799,7 +799,7 @@ public: virtual void property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid) override { if (native_info->set_fallback_func) { - bool ret = native_info->set_fallback_func(instance, (const GDNativeStringNamePtr)&p_name, (const GDNativeVariantPtr)&p_value); + bool ret = native_info->set_fallback_func(instance, (GDNativeConstStringNamePtr)&p_name, (GDNativeConstVariantPtr)&p_value); if (r_valid) { *r_valid = ret; } @@ -808,7 +808,7 @@ public: virtual Variant property_get_fallback(const StringName &p_name, bool *r_valid) override { Variant ret; if (native_info->get_fallback_func) { - bool valid = native_info->get_fallback_func(instance, (const GDNativeStringNamePtr)&p_name, (GDNativeVariantPtr)&ret); + bool valid = native_info->get_fallback_func(instance, (GDNativeConstStringNamePtr)&p_name, (GDNativeVariantPtr)&ret); if (r_valid) { *r_valid = valid; } 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_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..977bcb78e9 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -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/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index fbb31cadcd..8a5048de6b 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -319,7 +319,7 @@ Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale]. </member> <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0"> - Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. + Specifies the channel of the [member refraction_texture] in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored refraction in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="rim" type="float" setter="set_rim" getter="get_rim" default="1.0"> Sets the strength of the rim lighting effect. @@ -341,7 +341,7 @@ Texture used to control the roughness per-pixel. Multiplied by [member roughness]. </member> <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0"> - Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. + Specifies the channel of the [member roughness_texture] in which the roughness information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="shading_mode" type="int" setter="set_shading_mode" getter="get_shading_mode" enum="BaseMaterial3D.ShadingMode" default="1"> Sets whether the shading takes place per-pixel or per-vertex. Per-vertex lighting is faster, making it the best choice for mobile applications, however it looks considerably worse than per-pixel. diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 67e4e45e52..851996131f 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -64,7 +64,7 @@ <return type="Vector3" /> <param index="0" name="to_point" type="Vector3" /> <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> 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=""""> 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/GraphEdit.xml b/doc/classes/GraphEdit.xml index 5050ce7715..ea4e4b53ba 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -291,7 +291,7 @@ </description> </signal> <signal name="connection_drag_started"> - <param index="0" name="from_node" type="String" /> + <param index="0" name="from_node" type="StringName" /> <param index="1" name="from_port" type="int" /> <param index="2" name="is_output" type="bool" /> <description> 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="""" /> + <param index="3" name="script" type="String" default="""" /> + <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/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/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/scene.glsl b/drivers/gles3/shaders/scene.glsl index 04dba602dd..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; @@ -1100,7 +1108,7 @@ void main() { ref_vec = mix(ref_vec, normal, roughness * roughness); float horizon = min(1.0 + dot(ref_vec, normal), 1.0); ref_vec = scene_data.radiance_inverse_xform * ref_vec; - specular_light = textureLod(radiance_map, ref_vec, roughness * RADIANCE_MAX_LOD).rgb; + specular_light = textureLod(radiance_map, ref_vec, sqrt(roughness) * RADIANCE_MAX_LOD).rgb; specular_light = srgb_to_linear(specular_light); specular_light *= horizon * horizon; specular_light *= scene_data.ambient_light_color_energy.a; @@ -1162,7 +1170,7 @@ void main() { float a004 = min(r.x * r.x, exp2(-9.28 * ndotv)) * r.x + r.y; vec2 env = vec2(-1.04, 1.04) * a004 + r.zw; - specular_light *= env.x * f0 + env.y * clamp(50.0 * f0.g, 0.0, 1.0); + specular_light *= env.x * f0 + env.y * clamp(50.0 * f0.g, metallic, 1.0); #endif } 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/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..338688f274 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,11 +212,10 @@ 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 } - + ERR_FAIL_COND_EDMSG(!_validate_tracks(player->get_animation(current)), "Animation tracks may have any invalid key, abort playing."); player->play(current); player->seek(time); } @@ -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,7 +253,7 @@ void AnimationPlayerEditor::_play_bw_from_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); player->seek(time); } @@ -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 44126b4497..4194fd831b 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -8408,7 +8408,7 @@ Node3DEditor::Node3DEditor() { EDITOR_DEF("editors/3d/manipulator_gizmo_opacity", 0.9); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "editors/3d/manipulator_gizmo_opacity", PROPERTY_HINT_RANGE, "0,1,0.01")); EDITOR_DEF_RST("editors/3d/navigation/show_viewport_rotation_gizmo", true); - EDITOR_DEF_RST("editors/3d/navigation/show_viewport_navigation_gizmo", DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_TOUCHSCREEN)); + EDITOR_DEF_RST("editors/3d/navigation/show_viewport_navigation_gizmo", DisplayServer::get_singleton()->screen_is_touchscreen()); current_hover_gizmo_handle = -1; current_hover_gizmo_handle_secondary = false; 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/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/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index dff6e41dca..663d72038d 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -196,8 +196,11 @@ Error GDScriptAnalyzer::check_class_member_name_conflict(const GDScriptParser::C while (current_data_type && current_data_type->kind == GDScriptParser::DataType::Kind::CLASS) { GDScriptParser::ClassNode *current_class_node = current_data_type->class_type; if (has_member_name_conflict_in_script_class(p_member_name, current_class_node, p_member_node)) { - push_error(vformat(R"(The member "%s" already exists in parent class %s.)", p_member_name, current_class_node->identifier->name), - p_member_node); + String parent_class_name = current_class_node->fqcn; + if (current_class_node->identifier != nullptr) { + parent_class_name = current_class_node->identifier->name; + } + push_error(vformat(R"(The member "%s" already exists in parent class %s.)", p_member_name, parent_class_name), p_member_node); return ERR_PARSE_ERROR; } current_data_type = ¤t_class_node->base_type; 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/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props index 0459257106..0d0889c491 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props @@ -12,8 +12,7 @@ <Configurations>Debug;ExportDebug;ExportRelease</Configurations> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <GodotProjectDir Condition=" '$(SolutionDir)' != '' ">$(SolutionDir)</GodotProjectDir> - <GodotProjectDir Condition=" '$(SolutionDir)' == '' ">$(MSBuildProjectDirectory)</GodotProjectDir> + <GodotProjectDir Condition=" '$(GodotProjectDir)' == '' ">$(MSBuildProjectDirectory)</GodotProjectDir> <GodotProjectDir>$([MSBuild]::EnsureTrailingSlash('$(GodotProjectDir)'))</GodotProjectDir> <!-- Custom output paths for Godot projects. In brief, 'bin\' and 'obj\' are moved to '$(GodotProjectDir)\.godot\mono\temp\'. --> diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs index 7008fb638f..d67e57edc2 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs @@ -268,8 +268,9 @@ namespace Godot.SourceGenerators if (parameters.Length > paramTypes.Length) return null; // Ignore incompatible method - return new GodotMethodData(method, paramTypes, parameters - .Select(p => p.Type).ToImmutableArray(), retType, retSymbol); + return new GodotMethodData(method, paramTypes, + parameters.Select(p => p.Type).ToImmutableArray(), + retType != null ? (retType.Value, retSymbol) : null); } public static IEnumerable<GodotMethodData> WhereHasGodotCompatibleSignature( @@ -330,10 +331,10 @@ namespace Godot.SourceGenerators public static string Path(this Location location) => location.SourceTree?.GetLineSpan(location.SourceSpan).Path - ?? location.GetLineSpan().Path; + ?? location.GetLineSpan().Path; public static int StartLine(this Location location) => location.SourceTree?.GetLineSpan(location.SourceSpan).StartLinePosition.Line - ?? location.GetLineSpan().StartLinePosition.Line; + ?? location.GetLineSpan().StartLinePosition.Line; } } diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GodotMemberData.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GodotMemberData.cs index abd8079922..0760ea11bb 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GodotMemberData.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GodotMemberData.cs @@ -6,20 +6,18 @@ namespace Godot.SourceGenerators public readonly struct GodotMethodData { public GodotMethodData(IMethodSymbol method, ImmutableArray<MarshalType> paramTypes, - ImmutableArray<ITypeSymbol> paramTypeSymbols, MarshalType? retType, ITypeSymbol? retSymbol) + ImmutableArray<ITypeSymbol> paramTypeSymbols, (MarshalType MarshalType, ITypeSymbol TypeSymbol)? retType) { Method = method; ParamTypes = paramTypes; ParamTypeSymbols = paramTypeSymbols; RetType = retType; - RetSymbol = retSymbol; } public IMethodSymbol Method { get; } public ImmutableArray<MarshalType> ParamTypes { get; } public ImmutableArray<ITypeSymbol> ParamTypeSymbols { get; } - public MarshalType? RetType { get; } - public ITypeSymbol? RetSymbol { get; } + public (MarshalType MarshalType, ITypeSymbol TypeSymbol)? RetType { get; } } public readonly struct GodotSignalDelegateData diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs index 4fdd40f638..5b3f677f87 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs @@ -304,240 +304,33 @@ namespace Godot.SourceGenerators { return marshalType switch { - MarshalType.Boolean => - source.Append(VariantUtils, ".ConvertToBool(", inputExpr, ")"), - MarshalType.Char => - source.Append("(char)", VariantUtils, ".ConvertToUInt16(", inputExpr, ")"), - MarshalType.SByte => - source.Append(VariantUtils, ".ConvertToInt8(", inputExpr, ")"), - MarshalType.Int16 => - source.Append(VariantUtils, ".ConvertToInt16(", inputExpr, ")"), - MarshalType.Int32 => - source.Append(VariantUtils, ".ConvertToInt32(", inputExpr, ")"), - MarshalType.Int64 => - source.Append(VariantUtils, ".ConvertToInt64(", inputExpr, ")"), - MarshalType.Byte => - source.Append(VariantUtils, ".ConvertToUInt8(", inputExpr, ")"), - MarshalType.UInt16 => - source.Append(VariantUtils, ".ConvertToUInt16(", inputExpr, ")"), - MarshalType.UInt32 => - source.Append(VariantUtils, ".ConvertToUInt32(", inputExpr, ")"), - MarshalType.UInt64 => - source.Append(VariantUtils, ".ConvertToUInt64(", inputExpr, ")"), - MarshalType.Single => - source.Append(VariantUtils, ".ConvertToFloat32(", inputExpr, ")"), - MarshalType.Double => - source.Append(VariantUtils, ".ConvertToFloat64(", inputExpr, ")"), - MarshalType.String => - source.Append(VariantUtils, ".ConvertToStringObject(", inputExpr, ")"), - MarshalType.Vector2 => - source.Append(VariantUtils, ".ConvertToVector2(", inputExpr, ")"), - MarshalType.Vector2i => - source.Append(VariantUtils, ".ConvertToVector2i(", inputExpr, ")"), - MarshalType.Rect2 => - source.Append(VariantUtils, ".ConvertToRect2(", inputExpr, ")"), - MarshalType.Rect2i => - source.Append(VariantUtils, ".ConvertToRect2i(", inputExpr, ")"), - MarshalType.Transform2D => - source.Append(VariantUtils, ".ConvertToTransform2D(", inputExpr, ")"), - MarshalType.Vector3 => - source.Append(VariantUtils, ".ConvertToVector3(", inputExpr, ")"), - MarshalType.Vector3i => - source.Append(VariantUtils, ".ConvertToVector3i(", inputExpr, ")"), - MarshalType.Basis => - source.Append(VariantUtils, ".ConvertToBasis(", inputExpr, ")"), - MarshalType.Quaternion => - source.Append(VariantUtils, ".ConvertToQuaternion(", inputExpr, ")"), - MarshalType.Transform3D => - source.Append(VariantUtils, ".ConvertToTransform3D(", inputExpr, ")"), - MarshalType.Vector4 => - source.Append(VariantUtils, ".ConvertToVector4(", inputExpr, ")"), - MarshalType.Vector4i => - source.Append(VariantUtils, ".ConvertToVector4i(", inputExpr, ")"), - MarshalType.Projection => - source.Append(VariantUtils, ".ConvertToProjection(", inputExpr, ")"), - MarshalType.AABB => - source.Append(VariantUtils, ".ConvertToAABB(", inputExpr, ")"), - MarshalType.Color => - source.Append(VariantUtils, ".ConvertToColor(", inputExpr, ")"), - MarshalType.Plane => - source.Append(VariantUtils, ".ConvertToPlane(", inputExpr, ")"), - MarshalType.Callable => - source.Append(VariantUtils, ".ConvertToCallableManaged(", inputExpr, ")"), - MarshalType.SignalInfo => - source.Append(VariantUtils, ".ConvertToSignalInfo(", inputExpr, ")"), - MarshalType.Enum => - source.Append("(", typeSymbol.FullQualifiedNameIncludeGlobal(), - ")", VariantUtils, ".ConvertToInt32(", inputExpr, ")"), - MarshalType.ByteArray => - source.Append(VariantUtils, ".ConvertAsPackedByteArrayToSystemArray(", inputExpr, ")"), - MarshalType.Int32Array => - source.Append(VariantUtils, ".ConvertAsPackedInt32ArrayToSystemArray(", inputExpr, ")"), - MarshalType.Int64Array => - source.Append(VariantUtils, ".ConvertAsPackedInt64ArrayToSystemArray(", inputExpr, ")"), - MarshalType.Float32Array => - source.Append(VariantUtils, ".ConvertAsPackedFloat32ArrayToSystemArray(", inputExpr, ")"), - MarshalType.Float64Array => - source.Append(VariantUtils, ".ConvertAsPackedFloat64ArrayToSystemArray(", inputExpr, ")"), - MarshalType.StringArray => - source.Append(VariantUtils, ".ConvertAsPackedStringArrayToSystemArray(", inputExpr, ")"), - MarshalType.Vector2Array => - source.Append(VariantUtils, ".ConvertAsPackedVector2ArrayToSystemArray(", inputExpr, ")"), - MarshalType.Vector3Array => - source.Append(VariantUtils, ".ConvertAsPackedVector3ArrayToSystemArray(", inputExpr, ")"), - MarshalType.ColorArray => - source.Append(VariantUtils, ".ConvertAsPackedColorArrayToSystemArray(", inputExpr, ")"), - MarshalType.GodotObjectOrDerivedArray => - source.Append(VariantUtils, ".ConvertToSystemArrayOfGodotObject<", - ((IArrayTypeSymbol)typeSymbol).ElementType.FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), - MarshalType.SystemArrayOfStringName => - source.Append(VariantUtils, ".ConvertToSystemArrayOfStringName(", inputExpr, ")"), - MarshalType.SystemArrayOfNodePath => - source.Append(VariantUtils, ".ConvertToSystemArrayOfNodePath(", inputExpr, ")"), - MarshalType.SystemArrayOfRID => - source.Append(VariantUtils, ".ConvertToSystemArrayOfRID(", inputExpr, ")"), - MarshalType.Variant => - source.Append("global::Godot.Variant.CreateCopyingBorrowed(", inputExpr, ")"), - MarshalType.GodotObjectOrDerived => - source.Append("(", typeSymbol.FullQualifiedNameIncludeGlobal(), - ")", VariantUtils, ".ConvertToGodotObject(", inputExpr, ")"), - MarshalType.StringName => - source.Append(VariantUtils, ".ConvertToStringNameObject(", inputExpr, ")"), - MarshalType.NodePath => - source.Append(VariantUtils, ".ConvertToNodePathObject(", inputExpr, ")"), - MarshalType.RID => - source.Append(VariantUtils, ".ConvertToRID(", inputExpr, ")"), - MarshalType.GodotDictionary => - source.Append(VariantUtils, ".ConvertToDictionaryObject(", inputExpr, ")"), - MarshalType.GodotArray => - source.Append(VariantUtils, ".ConvertToArrayObject(", inputExpr, ")"), + // For generic Godot collections, VariantUtils.ConvertTo<T> is slower, so we need this special case MarshalType.GodotGenericDictionary => source.Append(VariantUtils, ".ConvertToDictionaryObject<", ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ", ", - ((INamedTypeSymbol)typeSymbol).TypeArguments[1].FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), + ((INamedTypeSymbol)typeSymbol).TypeArguments[1].FullQualifiedNameIncludeGlobal(), ">(", + inputExpr, ")"), MarshalType.GodotGenericArray => source.Append(VariantUtils, ".ConvertToArrayObject<", - ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), - _ => throw new ArgumentOutOfRangeException(nameof(marshalType), marshalType, - "Received unexpected marshal type") + ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ">(", + inputExpr, ")"), + _ => source.Append(VariantUtils, ".ConvertTo<", + typeSymbol.FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), }; } - public static StringBuilder AppendManagedToNativeVariantExpr( - this StringBuilder source, string inputExpr, MarshalType marshalType) + public static StringBuilder AppendManagedToNativeVariantExpr(this StringBuilder source, + string inputExpr, ITypeSymbol typeSymbol, MarshalType marshalType) { return marshalType switch { - MarshalType.Boolean => - source.Append(VariantUtils, ".CreateFromBool(", inputExpr, ")"), - MarshalType.Char => - source.Append(VariantUtils, ".CreateFromInt((ushort)", inputExpr, ")"), - MarshalType.SByte => - source.Append(VariantUtils, ".CreateFromInt(", inputExpr, ")"), - MarshalType.Int16 => - source.Append(VariantUtils, ".CreateFromInt(", inputExpr, ")"), - MarshalType.Int32 => - source.Append(VariantUtils, ".CreateFromInt(", inputExpr, ")"), - MarshalType.Int64 => - source.Append(VariantUtils, ".CreateFromInt(", inputExpr, ")"), - MarshalType.Byte => - source.Append(VariantUtils, ".CreateFromInt(", inputExpr, ")"), - MarshalType.UInt16 => - source.Append(VariantUtils, ".CreateFromInt(", inputExpr, ")"), - MarshalType.UInt32 => - source.Append(VariantUtils, ".CreateFromInt(", inputExpr, ")"), - MarshalType.UInt64 => - source.Append(VariantUtils, ".CreateFromInt(", inputExpr, ")"), - MarshalType.Single => - source.Append(VariantUtils, ".CreateFromFloat(", inputExpr, ")"), - MarshalType.Double => - source.Append(VariantUtils, ".CreateFromFloat(", inputExpr, ")"), - MarshalType.String => - source.Append(VariantUtils, ".CreateFromString(", inputExpr, ")"), - MarshalType.Vector2 => - source.Append(VariantUtils, ".CreateFromVector2(", inputExpr, ")"), - MarshalType.Vector2i => - source.Append(VariantUtils, ".CreateFromVector2i(", inputExpr, ")"), - MarshalType.Rect2 => - source.Append(VariantUtils, ".CreateFromRect2(", inputExpr, ")"), - MarshalType.Rect2i => - source.Append(VariantUtils, ".CreateFromRect2i(", inputExpr, ")"), - MarshalType.Transform2D => - source.Append(VariantUtils, ".CreateFromTransform2D(", inputExpr, ")"), - MarshalType.Vector3 => - source.Append(VariantUtils, ".CreateFromVector3(", inputExpr, ")"), - MarshalType.Vector3i => - source.Append(VariantUtils, ".CreateFromVector3i(", inputExpr, ")"), - MarshalType.Basis => - source.Append(VariantUtils, ".CreateFromBasis(", inputExpr, ")"), - MarshalType.Quaternion => - source.Append(VariantUtils, ".CreateFromQuaternion(", inputExpr, ")"), - MarshalType.Transform3D => - source.Append(VariantUtils, ".CreateFromTransform3D(", inputExpr, ")"), - MarshalType.Vector4 => - source.Append(VariantUtils, ".CreateFromVector4(", inputExpr, ")"), - MarshalType.Vector4i => - source.Append(VariantUtils, ".CreateFromVector4i(", inputExpr, ")"), - MarshalType.Projection => - source.Append(VariantUtils, ".CreateFromProjection(", inputExpr, ")"), - MarshalType.AABB => - source.Append(VariantUtils, ".CreateFromAABB(", inputExpr, ")"), - MarshalType.Color => - source.Append(VariantUtils, ".CreateFromColor(", inputExpr, ")"), - MarshalType.Plane => - source.Append(VariantUtils, ".CreateFromPlane(", inputExpr, ")"), - MarshalType.Callable => - source.Append(VariantUtils, ".CreateFromCallable(", inputExpr, ")"), - MarshalType.SignalInfo => - source.Append(VariantUtils, ".CreateFromSignalInfo(", inputExpr, ")"), - MarshalType.Enum => - source.Append(VariantUtils, ".CreateFromInt((int)", inputExpr, ")"), - MarshalType.ByteArray => - source.Append(VariantUtils, ".CreateFromPackedByteArray(", inputExpr, ")"), - MarshalType.Int32Array => - source.Append(VariantUtils, ".CreateFromPackedInt32Array(", inputExpr, ")"), - MarshalType.Int64Array => - source.Append(VariantUtils, ".CreateFromPackedInt64Array(", inputExpr, ")"), - MarshalType.Float32Array => - source.Append(VariantUtils, ".CreateFromPackedFloat32Array(", inputExpr, ")"), - MarshalType.Float64Array => - source.Append(VariantUtils, ".CreateFromPackedFloat64Array(", inputExpr, ")"), - MarshalType.StringArray => - source.Append(VariantUtils, ".CreateFromPackedStringArray(", inputExpr, ")"), - MarshalType.Vector2Array => - source.Append(VariantUtils, ".CreateFromPackedVector2Array(", inputExpr, ")"), - MarshalType.Vector3Array => - source.Append(VariantUtils, ".CreateFromPackedVector3Array(", inputExpr, ")"), - MarshalType.ColorArray => - source.Append(VariantUtils, ".CreateFromPackedColorArray(", inputExpr, ")"), - MarshalType.GodotObjectOrDerivedArray => - source.Append(VariantUtils, ".CreateFromSystemArrayOfGodotObject(", inputExpr, ")"), - MarshalType.SystemArrayOfStringName => - source.Append(VariantUtils, ".CreateFromSystemArrayOfStringName(", inputExpr, ")"), - MarshalType.SystemArrayOfNodePath => - source.Append(VariantUtils, ".CreateFromSystemArrayOfNodePath(", inputExpr, ")"), - MarshalType.SystemArrayOfRID => - source.Append(VariantUtils, ".CreateFromSystemArrayOfRID(", inputExpr, ")"), - MarshalType.Variant => - source.Append(inputExpr, ".CopyNativeVariant()"), - MarshalType.GodotObjectOrDerived => - source.Append(VariantUtils, ".CreateFromGodotObject(", inputExpr, ")"), - MarshalType.StringName => - source.Append(VariantUtils, ".CreateFromStringName(", inputExpr, ")"), - MarshalType.NodePath => - source.Append(VariantUtils, ".CreateFromNodePath(", inputExpr, ")"), - MarshalType.RID => - source.Append(VariantUtils, ".CreateFromRID(", inputExpr, ")"), - MarshalType.GodotDictionary => - source.Append(VariantUtils, ".CreateFromDictionary(", inputExpr, ")"), - MarshalType.GodotArray => - source.Append(VariantUtils, ".CreateFromArray(", inputExpr, ")"), + // For generic Godot collections, VariantUtils.CreateFrom<T> is slower, so we need this special case MarshalType.GodotGenericDictionary => source.Append(VariantUtils, ".CreateFromDictionary(", inputExpr, ")"), MarshalType.GodotGenericArray => source.Append(VariantUtils, ".CreateFromArray(", inputExpr, ")"), - _ => throw new ArgumentOutOfRangeException(nameof(marshalType), marshalType, - "Received unexpected marshal type") + _ => source.Append(VariantUtils, ".CreateFrom<", + typeSymbol.FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), }; } @@ -546,137 +339,30 @@ namespace Godot.SourceGenerators { return marshalType switch { - MarshalType.Boolean => source.Append(inputExpr, ".AsBool()"), - MarshalType.Char => source.Append(inputExpr, ".AsChar()"), - MarshalType.SByte => source.Append(inputExpr, ".AsSByte()"), - MarshalType.Int16 => source.Append(inputExpr, ".AsInt16()"), - MarshalType.Int32 => source.Append(inputExpr, ".AsInt32()"), - MarshalType.Int64 => source.Append(inputExpr, ".AsInt64()"), - MarshalType.Byte => source.Append(inputExpr, ".AsByte()"), - MarshalType.UInt16 => source.Append(inputExpr, ".AsUInt16()"), - MarshalType.UInt32 => source.Append(inputExpr, ".AsUInt32()"), - MarshalType.UInt64 => source.Append(inputExpr, ".AsUInt64()"), - MarshalType.Single => source.Append(inputExpr, ".AsSingle()"), - MarshalType.Double => source.Append(inputExpr, ".AsDouble()"), - MarshalType.String => source.Append(inputExpr, ".AsString()"), - MarshalType.Vector2 => source.Append(inputExpr, ".AsVector2()"), - MarshalType.Vector2i => source.Append(inputExpr, ".AsVector2i()"), - MarshalType.Rect2 => source.Append(inputExpr, ".AsRect2()"), - MarshalType.Rect2i => source.Append(inputExpr, ".AsRect2i()"), - MarshalType.Transform2D => source.Append(inputExpr, ".AsTransform2D()"), - MarshalType.Vector3 => source.Append(inputExpr, ".AsVector3()"), - MarshalType.Vector3i => source.Append(inputExpr, ".AsVector3i()"), - MarshalType.Basis => source.Append(inputExpr, ".AsBasis()"), - MarshalType.Quaternion => source.Append(inputExpr, ".AsQuaternion()"), - MarshalType.Transform3D => source.Append(inputExpr, ".AsTransform3D()"), - MarshalType.Vector4 => source.Append(inputExpr, ".AsVector4()"), - MarshalType.Vector4i => source.Append(inputExpr, ".AsVector4i()"), - MarshalType.Projection => source.Append(inputExpr, ".AsProjection()"), - MarshalType.AABB => source.Append(inputExpr, ".AsAABB()"), - MarshalType.Color => source.Append(inputExpr, ".AsColor()"), - MarshalType.Plane => source.Append(inputExpr, ".AsPlane()"), - MarshalType.Callable => source.Append(inputExpr, ".AsCallable()"), - MarshalType.SignalInfo => source.Append(inputExpr, ".AsSignalInfo()"), - MarshalType.Enum => - source.Append("(", typeSymbol.FullQualifiedNameIncludeGlobal(), ")", inputExpr, ".AsInt64()"), - MarshalType.ByteArray => source.Append(inputExpr, ".AsByteArray()"), - MarshalType.Int32Array => source.Append(inputExpr, ".AsInt32Array()"), - MarshalType.Int64Array => source.Append(inputExpr, ".AsInt64Array()"), - MarshalType.Float32Array => source.Append(inputExpr, ".AsFloat32Array()"), - MarshalType.Float64Array => source.Append(inputExpr, ".AsFloat64Array()"), - MarshalType.StringArray => source.Append(inputExpr, ".AsStringArray()"), - MarshalType.Vector2Array => source.Append(inputExpr, ".AsVector2Array()"), - MarshalType.Vector3Array => source.Append(inputExpr, ".AsVector3Array()"), - MarshalType.ColorArray => source.Append(inputExpr, ".AsColorArray()"), - MarshalType.GodotObjectOrDerivedArray => source.Append(inputExpr, ".AsGodotObjectArray<", - ((IArrayTypeSymbol)typeSymbol).ElementType.FullQualifiedNameIncludeGlobal(), ">()"), - MarshalType.SystemArrayOfStringName => source.Append(inputExpr, ".AsSystemArrayOfStringName()"), - MarshalType.SystemArrayOfNodePath => source.Append(inputExpr, ".AsSystemArrayOfNodePath()"), - MarshalType.SystemArrayOfRID => source.Append(inputExpr, ".AsSystemArrayOfRID()"), - MarshalType.Variant => source.Append(inputExpr), - MarshalType.GodotObjectOrDerived => source.Append("(", - typeSymbol.FullQualifiedNameIncludeGlobal(), ")", inputExpr, ".AsGodotObject()"), - MarshalType.StringName => source.Append(inputExpr, ".AsStringName()"), - MarshalType.NodePath => source.Append(inputExpr, ".AsNodePath()"), - MarshalType.RID => source.Append(inputExpr, ".AsRID()"), - MarshalType.GodotDictionary => source.Append(inputExpr, ".AsGodotDictionary()"), - MarshalType.GodotArray => source.Append(inputExpr, ".AsGodotArray()"), - MarshalType.GodotGenericDictionary => source.Append(inputExpr, ".AsGodotDictionary<", - ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ", ", - ((INamedTypeSymbol)typeSymbol).TypeArguments[1].FullQualifiedNameIncludeGlobal(), ">()"), - MarshalType.GodotGenericArray => source.Append(inputExpr, ".AsGodotArray<", - ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ">()"), - _ => throw new ArgumentOutOfRangeException(nameof(marshalType), marshalType, - "Received unexpected marshal type") + // For generic Godot collections, Variant.As<T> is slower, so we need this special case + MarshalType.GodotGenericDictionary => + source.Append(inputExpr, ".AsGodotDictionary<", + ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ", ", + ((INamedTypeSymbol)typeSymbol).TypeArguments[1].FullQualifiedNameIncludeGlobal(), ">()"), + MarshalType.GodotGenericArray => + source.Append(inputExpr, ".AsGodotArray<", + ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ">()"), + _ => source.Append(inputExpr, ".As<", + typeSymbol.FullQualifiedNameIncludeGlobal(), ">()") }; } public static StringBuilder AppendManagedToVariantExpr(this StringBuilder source, - string inputExpr, MarshalType marshalType) + string inputExpr, ITypeSymbol typeSymbol, MarshalType marshalType) { - switch (marshalType) + return marshalType switch { - case MarshalType.Boolean: - case MarshalType.Char: - case MarshalType.SByte: - case MarshalType.Int16: - case MarshalType.Int32: - case MarshalType.Int64: - case MarshalType.Byte: - case MarshalType.UInt16: - case MarshalType.UInt32: - case MarshalType.UInt64: - case MarshalType.Single: - case MarshalType.Double: - case MarshalType.String: - case MarshalType.Vector2: - case MarshalType.Vector2i: - case MarshalType.Rect2: - case MarshalType.Rect2i: - case MarshalType.Transform2D: - case MarshalType.Vector3: - case MarshalType.Vector3i: - case MarshalType.Basis: - case MarshalType.Quaternion: - case MarshalType.Transform3D: - case MarshalType.Vector4: - case MarshalType.Vector4i: - case MarshalType.Projection: - case MarshalType.AABB: - case MarshalType.Color: - case MarshalType.Plane: - case MarshalType.Callable: - case MarshalType.SignalInfo: - case MarshalType.ByteArray: - case MarshalType.Int32Array: - case MarshalType.Int64Array: - case MarshalType.Float32Array: - case MarshalType.Float64Array: - case MarshalType.StringArray: - case MarshalType.Vector2Array: - case MarshalType.Vector3Array: - case MarshalType.ColorArray: - case MarshalType.GodotObjectOrDerivedArray: - case MarshalType.SystemArrayOfStringName: - case MarshalType.SystemArrayOfNodePath: - case MarshalType.SystemArrayOfRID: - case MarshalType.GodotObjectOrDerived: - case MarshalType.StringName: - case MarshalType.NodePath: - case MarshalType.RID: - case MarshalType.GodotDictionary: - case MarshalType.GodotArray: - case MarshalType.GodotGenericDictionary: - case MarshalType.GodotGenericArray: - return source.Append("Variant.CreateFrom(", inputExpr, ")"); - case MarshalType.Enum: - return source.Append("Variant.CreateFrom((long)", inputExpr, ")"); - case MarshalType.Variant: - return source.Append(inputExpr); - default: - throw new ArgumentOutOfRangeException(nameof(marshalType), marshalType, - "Received unexpected marshal type"); - } + // For generic Godot collections, Variant.From<T> is slower, so we need this special case + MarshalType.GodotGenericDictionary or MarshalType.GodotGenericArray => + source.Append("global::Godot.Variant.CreateFrom(", inputExpr, ")"), + _ => source.Append("global::Godot.Variant.From<", + typeSymbol.FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")") + }; } } } diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs index 2f51018293..f79909589e 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs @@ -135,7 +135,8 @@ namespace Godot.SourceGenerators source.Append("#pragma warning disable CS0109 // Disable warning about redundant 'new' keyword\n"); - source.Append($" public new class MethodName : {symbol.BaseType.FullQualifiedNameIncludeGlobal()}.MethodName {{\n"); + source.Append( + $" public new class MethodName : {symbol.BaseType.FullQualifiedNameIncludeGlobal()}.MethodName {{\n"); // Generate cached StringNames for methods and properties, for fast lookup @@ -297,7 +298,7 @@ namespace Godot.SourceGenerators if (method.RetType != null) { - returnVal = DeterminePropertyInfo(method.RetType.Value, name: string.Empty); + returnVal = DeterminePropertyInfo(method.RetType.Value.MarshalType, name: string.Empty); } else { @@ -391,7 +392,8 @@ namespace Godot.SourceGenerators { source.Append(" ret = "); - source.AppendManagedToNativeVariantExpr("callRet", method.RetType.Value); + source.AppendManagedToNativeVariantExpr("callRet", + method.RetType.Value.TypeSymbol, method.RetType.Value.MarshalType); source.Append(";\n"); source.Append(" return true;\n"); diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs index 252f162b0c..6c4206a575 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs @@ -124,7 +124,8 @@ namespace Godot.SourceGenerators source.Append("#pragma warning disable CS0109 // Disable warning about redundant 'new' keyword\n"); - source.Append($" public new class PropertyName : {symbol.BaseType.FullQualifiedNameIncludeGlobal()}.PropertyName {{\n"); + source.Append( + $" public new class PropertyName : {symbol.BaseType.FullQualifiedNameIncludeGlobal()}.PropertyName {{\n"); // Generate cached StringNames for methods and properties, for fast lookup @@ -199,14 +200,14 @@ namespace Godot.SourceGenerators foreach (var property in godotClassProperties) { GeneratePropertyGetter(property.PropertySymbol.Name, - property.Type, source, isFirstEntry); + property.PropertySymbol.Type, property.Type, source, isFirstEntry); isFirstEntry = false; } foreach (var field in godotClassFields) { GeneratePropertyGetter(field.FieldSymbol.Name, - field.Type, source, isFirstEntry); + field.FieldSymbol.Type, field.Type, source, isFirstEntry); isFirstEntry = false; } @@ -303,6 +304,7 @@ namespace Godot.SourceGenerators private static void GeneratePropertyGetter( string propertyMemberName, + ITypeSymbol propertyTypeSymbol, MarshalType propertyMarshalType, StringBuilder source, bool isFirstEntry @@ -317,7 +319,8 @@ namespace Godot.SourceGenerators .Append(propertyMemberName) .Append(") {\n") .Append(" value = ") - .AppendManagedToNativeVariantExpr("this." + propertyMemberName, propertyMarshalType) + .AppendManagedToNativeVariantExpr("this." + propertyMemberName, + propertyTypeSymbol, propertyMarshalType) .Append(";\n") .Append(" return true;\n") .Append(" }\n"); @@ -376,7 +379,8 @@ namespace Godot.SourceGenerators if (propertyUsage != PropertyUsageFlags.Category && attr.ConstructorArguments.Length > 1) hintString = attr.ConstructorArguments[1].Value?.ToString(); - yield return new PropertyInfo(VariantType.Nil, name, PropertyHint.None, hintString, propertyUsage.Value, true); + yield return new PropertyInfo(VariantType.Nil, name, PropertyHint.None, hintString, + propertyUsage.Value, true); } } } diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs index 63339b3487..aa9dd9583e 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs @@ -174,7 +174,8 @@ namespace Godot.SourceGenerators } else { - var propertyGet = propertyDeclarationSyntax.AccessorList?.Accessors.Where(a => a.Keyword.IsKind(SyntaxKind.GetKeyword)).FirstOrDefault(); + var propertyGet = propertyDeclarationSyntax.AccessorList?.Accessors + .Where(a => a.Keyword.IsKind(SyntaxKind.GetKeyword)).FirstOrDefault(); if (propertyGet != null) { if (propertyGet.ExpressionBody != null) @@ -200,7 +201,8 @@ namespace Godot.SourceGenerators { var returns = propertyGet.DescendantNodes().OfType<ReturnStatementSyntax>(); if (returns.Count() == 1) - {// Generate only single return + { + // Generate only single return var returnStatementSyntax = returns.Single(); if (returnStatementSyntax.Expression is IdentifierNameSyntax identifierNameSyntax) { @@ -277,7 +279,8 @@ namespace Godot.SourceGenerators { source.Append("#pragma warning disable CS0109 // Disable warning about redundant 'new' keyword\n"); - string dictionaryType = "System.Collections.Generic.Dictionary<Godot.StringName, object>"; + string dictionaryType = + "global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant>"; source.Append("#if TOOLS\n"); source.Append(" internal new static "); @@ -304,7 +307,8 @@ namespace Godot.SourceGenerators source.Append(" values.Add(PropertyName."); source.Append(exportedMember.Name); source.Append(", "); - source.Append(defaultValueLocalName); + source.AppendManagedToVariantExpr(defaultValueLocalName, + exportedMember.TypeSymbol, exportedMember.Type); source.Append(");\n"); } diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs index ed877cbd17..821f3af75f 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs @@ -162,7 +162,8 @@ namespace Godot.SourceGenerators source.Append(" info.AddProperty(PropertyName.") .Append(propertyName) .Append(", ") - .AppendManagedToVariantExpr(string.Concat("this.", propertyName), property.Type) + .AppendManagedToVariantExpr(string.Concat("this.", propertyName), + property.PropertySymbol.Type, property.Type) .Append(");\n"); } @@ -175,7 +176,8 @@ namespace Godot.SourceGenerators source.Append(" info.AddProperty(PropertyName.") .Append(fieldName) .Append(", ") - .AppendManagedToVariantExpr(string.Concat("this.", fieldName), field.Type) + .AppendManagedToVariantExpr(string.Concat("this.", fieldName), + field.FieldSymbol.Type, field.Type) .Append(");\n"); } diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs index 119cc9d4f0..ba6c10aa31 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs @@ -176,7 +176,8 @@ namespace Godot.SourceGenerators source.Append("#pragma warning disable CS0109 // Disable warning about redundant 'new' keyword\n"); - source.Append($" public new class SignalName : {symbol.BaseType.FullQualifiedNameIncludeGlobal()}.SignalName {{\n"); + source.Append( + $" public new class SignalName : {symbol.BaseType.FullQualifiedNameIncludeGlobal()}.SignalName {{\n"); // Generate cached StringNames for methods and properties, for fast lookup @@ -236,7 +237,8 @@ namespace Godot.SourceGenerators .Append(signalName) .Append(";\n"); - source.Append($" /// <inheritdoc cref=\"{signalDelegate.DelegateSymbol.FullQualifiedNameIncludeGlobal()}\"/>\n"); + source.Append( + $" /// <inheritdoc cref=\"{signalDelegate.DelegateSymbol.FullQualifiedNameIncludeGlobal()}\"/>\n"); source.Append(" public event ") .Append(signalDelegate.DelegateSymbol.FullQualifiedNameIncludeGlobal()) @@ -351,7 +353,7 @@ namespace Godot.SourceGenerators if (invokeMethodData.RetType != null) { - returnVal = DeterminePropertyInfo(invokeMethodData.RetType.Value, name: string.Empty); + returnVal = DeterminePropertyInfo(invokeMethodData.RetType.Value.MarshalType, name: string.Empty); } else { diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs index 89364d1c02..de10c04e31 100644 --- a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs +++ b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs @@ -57,24 +57,22 @@ namespace GodotTools { pr.Step("Generating C# project...".TTR()); - string resourceDir = ProjectSettings.GlobalizePath("res://"); - - string path = resourceDir; + string csprojDir = Path.GetDirectoryName(GodotSharpDirs.ProjectCsProjPath); + string slnDir = Path.GetDirectoryName(GodotSharpDirs.ProjectSlnPath); string name = GodotSharpDirs.ProjectAssemblyName; - - string guid = CsProjOperations.GenerateGameProject(path, name); + string guid = CsProjOperations.GenerateGameProject(csprojDir, name); if (guid.Length > 0) { var solution = new DotNetSolution(name) { - DirectoryPath = path + DirectoryPath = slnDir }; var projectInfo = new DotNetSolution.ProjectInfo { Guid = guid, - PathRelativeToSolution = name + ".csproj", + PathRelativeToSolution = Path.GetRelativePath(slnDir, GodotSharpDirs.ProjectCsProjPath), Configs = new List<string> { "Debug", "ExportDebug", "ExportRelease" } }; @@ -375,6 +373,8 @@ namespace GodotTools { base._EnablePlugin(); + ProjectSettingsChanged += GodotSharpDirs.DetermineProjectLocation; + if (Instance != null) throw new InvalidOperationException(); Instance = this; @@ -455,7 +455,7 @@ namespace GodotTools _menuPopup.IdPressed += _MenuOptionPressed; // External editor settings - EditorDef("mono/editor/external_editor", ExternalEditorId.None); + EditorDef("mono/editor/external_editor", Variant.From(ExternalEditorId.None)); string settingsHintStr = "Disabled"; diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs index acb7cc3ab0..45ae7eb86b 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs @@ -1,3 +1,4 @@ +using Godot; using Godot.NativeInterop; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; @@ -8,30 +9,31 @@ namespace GodotTools.Internals { public static float EditorScale => Internal.godot_icall_Globals_EditorScale(); - public static unsafe object GlobalDef(string setting, object defaultValue, bool restartIfChanged = false) + // ReSharper disable once UnusedMethodReturnValue.Global + public static Variant GlobalDef(string setting, Variant defaultValue, bool restartIfChanged = false) { using godot_string settingIn = Marshaling.ConvertStringToNative(setting); - using godot_variant defaultValueIn = Marshaling.ConvertManagedObjectToVariant(defaultValue); - Internal.godot_icall_Globals_GlobalDef(settingIn, defaultValueIn, restartIfChanged, out godot_variant result); - using (result) - return Marshaling.ConvertVariantToManagedObject(result); + using godot_variant defaultValueIn = defaultValue.CopyNativeVariant(); + Internal.godot_icall_Globals_GlobalDef(settingIn, defaultValueIn, restartIfChanged, + out godot_variant result); + return Variant.CreateTakingOwnershipOfDisposableValue(result); } - public static unsafe object EditorDef(string setting, object defaultValue, bool restartIfChanged = false) + // ReSharper disable once UnusedMethodReturnValue.Global + public static Variant EditorDef(string setting, Variant defaultValue, bool restartIfChanged = false) { using godot_string settingIn = Marshaling.ConvertStringToNative(setting); - using godot_variant defaultValueIn = Marshaling.ConvertManagedObjectToVariant(defaultValue); - Internal.godot_icall_Globals_EditorDef(settingIn, defaultValueIn, restartIfChanged, out godot_variant result); - using (result) - return Marshaling.ConvertVariantToManagedObject(result); + using godot_variant defaultValueIn = defaultValue.CopyNativeVariant(); + Internal.godot_icall_Globals_EditorDef(settingIn, defaultValueIn, restartIfChanged, + out godot_variant result); + return Variant.CreateTakingOwnershipOfDisposableValue(result); } - public static object EditorShortcut(string setting) + public static Variant EditorShortcut(string setting) { using godot_string settingIn = Marshaling.ConvertStringToNative(setting); Internal.godot_icall_Globals_EditorShortcut(settingIn, out godot_variant result); - using (result) - return Marshaling.ConvertVariantToManagedObject(result); + return Variant.CreateTakingOwnershipOfDisposableValue(result); } [SuppressMessage("ReSharper", "InconsistentNaming")] diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs index 14285cc0f1..4e892be55c 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs @@ -52,10 +52,9 @@ namespace GodotTools.Internals { GlobalDef("dotnet/project/assembly_name", ""); GlobalDef("dotnet/project/solution_directory", ""); - GlobalDef("dotnet/project/c#_project_directory", ""); } - private static void DetermineProjectLocation() + public static void DetermineProjectLocation() { static string DetermineProjectName() { @@ -76,10 +75,11 @@ namespace GodotTools.Internals string slnParentDir = (string)ProjectSettings.GetSetting("dotnet/project/solution_directory"); if (string.IsNullOrEmpty(slnParentDir)) slnParentDir = "res://"; + else if (!slnParentDir.StartsWith("res://")) + slnParentDir = "res://" + slnParentDir; - string csprojParentDir = (string)ProjectSettings.GetSetting("dotnet/project/c#_project_directory"); - if (string.IsNullOrEmpty(csprojParentDir)) - csprojParentDir = "res://"; + // The csproj should be in the same folder as project.godot. + string csprojParentDir = "res://"; _projectSlnPath = Path.Combine(ProjectSettings.GlobalizePath(slnParentDir), string.Concat(_projectAssemblyName, ".sln")); diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 9185506776..9f0bc3fbe3 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -2837,9 +2837,6 @@ bool BindingsGenerator::_populate_object_type_interfaces() { itype.is_ref_counted = ClassDB::is_parent_class(type_cname, name_cache.type_RefCounted); itype.memory_own = itype.is_ref_counted; - itype.cs_variant_to_managed = "(%1)VariantUtils.ConvertToGodotObject(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromGodotObject(%0)"; - itype.c_out = "%5return "; itype.c_out += C_METHOD_UNMANAGED_GET_MANAGED; itype.c_out += itype.is_ref_counted ? "(%1.Reference);\n" : "(%1);\n"; @@ -3218,8 +3215,6 @@ bool BindingsGenerator::_populate_object_type_interfaces() { enum_itype.cname = StringName(enum_itype.name); enum_itype.proxy_name = itype.proxy_name + "." + enum_proxy_name; TypeInterface::postsetup_enum_type(enum_itype); - enum_itype.cs_variant_to_managed = "(%1)VariantUtils.ConvertToInt32(%0)"; - enum_itype.cs_managed_to_variant = "VariantUtils.CreateFromInt((int)%0)"; enum_types.insert(enum_itype.cname, enum_itype); } @@ -3448,16 +3443,14 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { TypeInterface itype; -#define INSERT_STRUCT_TYPE(m_type) \ - { \ - itype = TypeInterface::create_value_type(String(#m_type)); \ - itype.c_type_in = #m_type "*"; \ - itype.c_type_out = itype.cs_type; \ - itype.cs_in_expr = "&%0"; \ - itype.cs_in_expr_is_unsafe = true; \ - itype.cs_variant_to_managed = "VariantUtils.ConvertTo%2(%0)"; \ - itype.cs_managed_to_variant = "VariantUtils.CreateFrom%2(%0)"; \ - builtin_types.insert(itype.cname, itype); \ +#define INSERT_STRUCT_TYPE(m_type) \ + { \ + itype = TypeInterface::create_value_type(String(#m_type)); \ + itype.c_type_in = #m_type "*"; \ + itype.c_type_out = itype.cs_type; \ + itype.cs_in_expr = "&%0"; \ + itype.cs_in_expr_is_unsafe = true; \ + builtin_types.insert(itype.cname, itype); \ } INSERT_STRUCT_TYPE(Vector2) @@ -3488,8 +3481,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_out = itype.c_type; itype.c_arg_in = "&%s"; itype.c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromBool(%1);\n"; - itype.cs_variant_to_managed = "VariantUtils.ConvertToBool(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromBool(%0)"; builtin_types.insert(itype.cname, itype); // Integer types @@ -3510,8 +3501,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_in = itype.name; \ itype.c_type_out = itype.name; \ itype.c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromInt(%1);\n"; \ - itype.cs_variant_to_managed = "VariantUtils.ConvertTo" m_int_struct_name "(%0)"; \ - itype.cs_managed_to_variant = "VariantUtils.CreateFromInt(%0)"; \ builtin_types.insert(itype.cname, itype); \ } @@ -3547,8 +3536,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_in = itype.proxy_name; itype.c_type_out = itype.proxy_name; itype.c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromFloat(%1);\n"; - itype.cs_variant_to_managed = "VariantUtils.ConvertToFloat32(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromFloat(%0)"; builtin_types.insert(itype.cname, itype); // double @@ -3562,8 +3549,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_in = itype.proxy_name; itype.c_type_out = itype.proxy_name; itype.c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromFloat(%1);\n"; - itype.cs_variant_to_managed = "VariantUtils.ConvertToFloat64(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromFloat(%0)"; builtin_types.insert(itype.cname, itype); } @@ -3581,8 +3566,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_out = itype.cs_type; itype.c_type_is_disposable_struct = true; itype.c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromString(%1);\n"; - itype.cs_variant_to_managed = "VariantUtils.ConvertToStringObject(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromString(%0)"; builtin_types.insert(itype.cname, itype); // StringName @@ -3601,8 +3584,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_in_vararg = "%5using godot_variant %1_in = VariantUtils.CreateFromStringName(%1);\n"; itype.c_type_is_disposable_struct = false; // [c_out] takes ownership itype.c_ret_needs_default_initialization = true; - itype.cs_variant_to_managed = "VariantUtils.ConvertToStringNameObject(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromStringName(%0)"; builtin_types.insert(itype.cname, itype); // NodePath @@ -3620,8 +3601,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_out = itype.cs_type; itype.c_type_is_disposable_struct = false; // [c_out] takes ownership itype.c_ret_needs_default_initialization = true; - itype.cs_variant_to_managed = "VariantUtils.ConvertToNodePathObject(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromNodePath(%0)"; builtin_types.insert(itype.cname, itype); // RID @@ -3634,8 +3613,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type = itype.cs_type; itype.c_type_in = itype.c_type; itype.c_type_out = itype.c_type; - itype.cs_variant_to_managed = "VariantUtils.ConvertToRID(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromRID(%0)"; builtin_types.insert(itype.cname, itype); // Variant @@ -3652,8 +3629,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_out = itype.cs_type; itype.c_type_is_disposable_struct = false; // [c_out] takes ownership itype.c_ret_needs_default_initialization = true; - itype.cs_variant_to_managed = "Variant.CreateCopyingBorrowed(%0)"; - itype.cs_managed_to_variant = "%0.CopyNativeVariant()"; builtin_types.insert(itype.cname, itype); // Callable @@ -3666,8 +3641,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_in = "in " + itype.cs_type; itype.c_type_out = itype.cs_type; itype.c_type_is_disposable_struct = true; - itype.cs_variant_to_managed = "VariantUtils.ConvertToCallableManaged(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromCallable(%0)"; builtin_types.insert(itype.cname, itype); // Signal @@ -3684,8 +3657,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_in = "in " + itype.cs_type; itype.c_type_out = itype.cs_type; itype.c_type_is_disposable_struct = true; - itype.cs_variant_to_managed = "VariantUtils.ConvertToSignalInfo(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromSignalInfo(%0)"; builtin_types.insert(itype.cname, itype); // VarArg (fictitious type to represent variable arguments) @@ -3715,8 +3686,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_in = itype.proxy_name; \ itype.c_type_out = itype.proxy_name; \ itype.c_type_is_disposable_struct = true; \ - itype.cs_variant_to_managed = "VariantUtils.ConvertAs%2ToSystemArray(%0)"; \ - itype.cs_managed_to_variant = "VariantUtils.CreateFrom%2(%0)"; \ builtin_types.insert(itype.name, itype); \ } @@ -3752,8 +3721,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_out = itype.cs_type; itype.c_type_is_disposable_struct = false; // [c_out] takes ownership itype.c_ret_needs_default_initialization = true; - itype.cs_variant_to_managed = "VariantUtils.ConvertToArrayObject(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromArray(%0)"; builtin_types.insert(itype.cname, itype); // Array_@generic @@ -3761,6 +3728,9 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.name = "Array_@generic"; itype.cname = itype.name; itype.cs_out = "%5return new %2(%0(%1));"; + // For generic Godot collections, Variant.From<T>/As<T> is slower, so we need this special case + itype.cs_variant_to_managed = "VariantUtils.ConvertToArrayObject(%0)"; + itype.cs_managed_to_variant = "VariantUtils.CreateFromArray(%0)"; builtin_types.insert(itype.cname, itype); // Dictionary @@ -3778,8 +3748,6 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.c_type_out = itype.cs_type; itype.c_type_is_disposable_struct = false; // [c_out] takes ownership itype.c_ret_needs_default_initialization = true; - itype.cs_variant_to_managed = "VariantUtils.ConvertToDictionaryObject(%0)"; - itype.cs_managed_to_variant = "VariantUtils.CreateFromDictionary(%0)"; builtin_types.insert(itype.cname, itype); // Dictionary_@generic @@ -3787,6 +3755,9 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.name = "Dictionary_@generic"; itype.cname = itype.name; itype.cs_out = "%5return new %2(%0(%1));"; + // For generic Godot collections, Variant.From<T>/As<T> is slower, so we need this special case + itype.cs_variant_to_managed = "VariantUtils.ConvertToDictionaryObject(%0)"; + itype.cs_managed_to_variant = "VariantUtils.CreateFromDictionary(%0)"; builtin_types.insert(itype.cname, itype); // void (fictitious type to represent the return type of methods that do not return anything) @@ -3852,8 +3823,6 @@ void BindingsGenerator::_populate_global_constants() { enum_itype.cname = ienum.cname; enum_itype.proxy_name = enum_itype.name; TypeInterface::postsetup_enum_type(enum_itype); - enum_itype.cs_variant_to_managed = "(%1)VariantUtils.ConvertToInt32(%0)"; - enum_itype.cs_managed_to_variant = "VariantUtils.CreateFromInt((int)%0)"; enum_types.insert(enum_itype.cname, enum_itype); int prefix_length = _determine_enum_prefix(ienum); @@ -3886,8 +3855,6 @@ void BindingsGenerator::_populate_global_constants() { enum_itype.cname = enum_cname; enum_itype.proxy_name = enum_itype.name; TypeInterface::postsetup_enum_type(enum_itype); - enum_itype.cs_variant_to_managed = "(%1)VariantUtils.ConvertToInt32(%0)"; - enum_itype.cs_managed_to_variant = "VariantUtils.CreateFromInt((int)%0)"; enum_types.insert(enum_itype.cname, enum_itype); } } diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h index a479c44368..6d172f4fb8 100644 --- a/modules/mono/editor/bindings_generator.h +++ b/modules/mono/editor/bindings_generator.h @@ -209,7 +209,7 @@ class BindingsGenerator { String name; StringName cname; - int type_parameter_count; + int type_parameter_count = 0; /** * Identifier name of the base class. @@ -514,7 +514,12 @@ class BindingsGenerator { static void postsetup_enum_type(TypeInterface &r_enum_itype); - TypeInterface() {} + TypeInterface() { + static String default_cs_variant_to_managed = "VariantUtils.ConvertTo<%1>(%0)"; + static String default_cs_managed_to_variant = "VariantUtils.CreateFrom<%1>(%0)"; + cs_variant_to_managed = default_cs_variant_to_managed; + cs_managed_to_variant = default_cs_managed_to_variant; + } }; struct InternalCall { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs index 1b9f63c22d..130776499b 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs @@ -418,8 +418,8 @@ namespace Godot.Collections { for (int i = 0; i < count; i++) { - object obj = Marshaling.ConvertVariantToManagedObject(NativeValue.DangerousSelfRef.Elements[i]); - array.SetValue(obj, index); + object boxedVariant = Variant.CreateCopyingBorrowed(NativeValue.DangerousSelfRef.Elements[i]); + array.SetValue(boxedVariant, index); index++; } } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs index d6fad391b6..e6a8054ae2 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs @@ -159,7 +159,7 @@ namespace Godot.Bridge for (int i = 0; i < paramCount; i++) { - invokeParams[i] = Marshaling.ConvertVariantToManagedObjectOfType( + invokeParams[i] = DelegateUtils.RuntimeTypeConversionHelper.ConvertToObjectOfType( *args[i], parameters[i].ParameterType); } @@ -832,7 +832,8 @@ namespace Godot.Bridge } else { - interopProperties = ((godotsharp_property_info*)NativeMemory.Alloc((nuint)length, (nuint)sizeof(godotsharp_property_info)))!; + interopProperties = ((godotsharp_property_info*)NativeMemory.Alloc( + (nuint)length, (nuint)sizeof(godotsharp_property_info)))!; } try @@ -858,8 +859,8 @@ namespace Godot.Bridge addPropInfoFunc(scriptPtr, ¤tClassName, interopProperties, length); - // We're borrowing the StringName's without making an owning copy, so the - // managed collection needs to be kept alive until `addPropInfoFunc` returns. + // We're borrowing the native value of the StringName entries. + // The dictionary needs to be kept alive until `addPropInfoFunc` returns. GC.KeepAlive(properties); } finally @@ -884,12 +885,7 @@ namespace Godot.Bridge { // Careful with padding... public godot_string_name Name; // Not owned - public godot_variant Value; - - public void Dispose() - { - Value.Dispose(); - } + public godot_variant Value; // Not owned } [UnmanagedCallersOnly] @@ -928,10 +924,35 @@ namespace Godot.Bridge if (getGodotPropertyDefaultValuesMethod == null) return; - var defaultValues = (Dictionary<StringName, object>?) - getGodotPropertyDefaultValuesMethod.Invoke(null, null); + var defaultValuesObj = getGodotPropertyDefaultValuesMethod.Invoke(null, null); + + if (defaultValuesObj == null) + return; + + Dictionary<StringName, Variant> defaultValues; + + if (defaultValuesObj is Dictionary<StringName, object> defaultValuesLegacy) + { + // We have to support this for some time, otherwise this could cause data loss for projects + // built with previous releases. Ideally, we should remove this before Godot 4.0 stable. + + if (defaultValuesLegacy.Count <= 0) + return; - if (defaultValues == null || defaultValues.Count <= 0) + defaultValues = new(); + + foreach (var pair in defaultValuesLegacy) + { + defaultValues[pair.Key] = Variant.CreateTakingOwnershipOfDisposableValue( + DelegateUtils.RuntimeTypeConversionHelper.ConvertToVariant(pair.Value)); + } + } + else + { + defaultValues = (Dictionary<StringName, Variant>)defaultValuesObj; + } + + if (defaultValues.Count <= 0) return; int length = defaultValues.Count; @@ -952,7 +973,8 @@ namespace Godot.Bridge } else { - interopDefaultValues = ((godotsharp_property_def_val_pair*)NativeMemory.Alloc((nuint)length, (nuint)sizeof(godotsharp_property_def_val_pair)))!; + interopDefaultValues = ((godotsharp_property_def_val_pair*)NativeMemory.Alloc( + (nuint)length, (nuint)sizeof(godotsharp_property_def_val_pair)))!; } try @@ -963,7 +985,7 @@ namespace Godot.Bridge godotsharp_property_def_val_pair interopProperty = new() { Name = (godot_string_name)defaultValuePair.Key.NativeValue, // Not owned - Value = Marshaling.ConvertManagedObjectToVariant(defaultValuePair.Value) + Value = (godot_variant)defaultValuePair.Value.NativeVar // Not owned }; interopDefaultValues[i] = interopProperty; @@ -973,15 +995,12 @@ namespace Godot.Bridge addDefValFunc(scriptPtr, interopDefaultValues, length); - // We're borrowing the StringName's without making an owning copy, so the - // managed collection needs to be kept alive until `addDefValFunc` returns. + // We're borrowing the native value of the StringName and Variant entries. + // The dictionary needs to be kept alive until `addDefValFunc` returns. GC.KeepAlive(defaultValues); } finally { - for (int i = 0; i < length; i++) - interopDefaultValues[i].Dispose(); - if (!useStack) NativeMemory.Free(interopDefaultValues); } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs index d19e0c08f2..a3cfecfaa6 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs @@ -186,7 +186,7 @@ namespace Godot writer.Write(field.Name); var fieldValue = field.GetValue(target); - using var fieldValueVariant = Marshaling.ConvertManagedObjectToVariant(fieldValue); + using var fieldValueVariant = RuntimeTypeConversionHelper.ConvertToVariant(fieldValue); byte[] valueBuffer = VarToBytes(fieldValueVariant); writer.Write(valueBuffer.Length); writer.Write(valueBuffer); @@ -443,7 +443,14 @@ namespace Godot FieldInfo? fieldInfo = targetType.GetField(name, BindingFlags.Instance | BindingFlags.Public); - fieldInfo?.SetValue(recreatedTarget, GD.BytesToVar(valueBuffer)); + + if (fieldInfo != null) + { + var variantValue = GD.BytesToVar(valueBuffer); + object? managedValue = RuntimeTypeConversionHelper.ConvertToObjectOfType( + (godot_variant)variantValue.NativeVar, fieldInfo.FieldType); + fieldInfo.SetValue(recreatedTarget, managedValue); + } } @delegate = Delegate.CreateDelegate(delegateType, recreatedTarget, methodInfo, @@ -537,5 +544,269 @@ namespace Godot return type; } + + internal static class RuntimeTypeConversionHelper + { + [SuppressMessage("ReSharper", "RedundantNameQualifier")] + public static godot_variant ConvertToVariant(object? obj) + { + if (obj == null) + return default; + + switch (obj) + { + case bool @bool: + return VariantUtils.CreateFrom(@bool); + case char @char: + return VariantUtils.CreateFrom(@char); + case sbyte int8: + return VariantUtils.CreateFrom(int8); + case short int16: + return VariantUtils.CreateFrom(int16); + case int int32: + return VariantUtils.CreateFrom(int32); + case long int64: + return VariantUtils.CreateFrom(int64); + case byte uint8: + return VariantUtils.CreateFrom(uint8); + case ushort uint16: + return VariantUtils.CreateFrom(uint16); + case uint uint32: + return VariantUtils.CreateFrom(uint32); + case ulong uint64: + return VariantUtils.CreateFrom(uint64); + case float @float: + return VariantUtils.CreateFrom(@float); + case double @double: + return VariantUtils.CreateFrom(@double); + case Vector2 vector2: + return VariantUtils.CreateFrom(vector2); + case Vector2i vector2I: + return VariantUtils.CreateFrom(vector2I); + case Rect2 rect2: + return VariantUtils.CreateFrom(rect2); + case Rect2i rect2I: + return VariantUtils.CreateFrom(rect2I); + case Transform2D transform2D: + return VariantUtils.CreateFrom(transform2D); + case Vector3 vector3: + return VariantUtils.CreateFrom(vector3); + case Vector3i vector3I: + return VariantUtils.CreateFrom(vector3I); + case Vector4 vector4: + return VariantUtils.CreateFrom(vector4); + case Vector4i vector4I: + return VariantUtils.CreateFrom(vector4I); + case Basis basis: + return VariantUtils.CreateFrom(basis); + case Quaternion quaternion: + return VariantUtils.CreateFrom(quaternion); + case Transform3D transform3d: + return VariantUtils.CreateFrom(transform3d); + case Projection projection: + return VariantUtils.CreateFrom(projection); + case AABB aabb: + return VariantUtils.CreateFrom(aabb); + case Color color: + return VariantUtils.CreateFrom(color); + case Plane plane: + return VariantUtils.CreateFrom(plane); + case Callable callable: + return VariantUtils.CreateFrom(callable); + case SignalInfo signalInfo: + return VariantUtils.CreateFrom(signalInfo); + case string @string: + return VariantUtils.CreateFrom(@string); + case byte[] byteArray: + return VariantUtils.CreateFrom(byteArray); + case int[] int32Array: + return VariantUtils.CreateFrom(int32Array); + case long[] int64Array: + return VariantUtils.CreateFrom(int64Array); + case float[] floatArray: + return VariantUtils.CreateFrom(floatArray); + case double[] doubleArray: + return VariantUtils.CreateFrom(doubleArray); + case string[] stringArray: + return VariantUtils.CreateFrom(stringArray); + case Vector2[] vector2Array: + return VariantUtils.CreateFrom(vector2Array); + case Vector3[] vector3Array: + return VariantUtils.CreateFrom(vector3Array); + case Color[] colorArray: + return VariantUtils.CreateFrom(colorArray); + case StringName[] stringNameArray: + return VariantUtils.CreateFrom(stringNameArray); + case NodePath[] nodePathArray: + return VariantUtils.CreateFrom(nodePathArray); + case RID[] ridArray: + return VariantUtils.CreateFrom(ridArray); + case Godot.Object[] godotObjectArray: + return VariantUtils.CreateFrom(godotObjectArray); + case StringName stringName: + return VariantUtils.CreateFrom(stringName); + case NodePath nodePath: + return VariantUtils.CreateFrom(nodePath); + case RID rid: + return VariantUtils.CreateFrom(rid); + case Collections.Dictionary godotDictionary: + return VariantUtils.CreateFrom(godotDictionary); + case Collections.Array godotArray: + return VariantUtils.CreateFrom(godotArray); + case Variant variant: + return VariantUtils.CreateFrom(variant); + case Godot.Object godotObject: + return VariantUtils.CreateFrom(godotObject); + case Enum @enum: + return VariantUtils.CreateFrom(Convert.ToInt64(@enum)); + case Collections.IGenericGodotDictionary godotDictionary: + return VariantUtils.CreateFrom(godotDictionary.UnderlyingDictionary); + case Collections.IGenericGodotArray godotArray: + return VariantUtils.CreateFrom(godotArray.UnderlyingArray); + } + + GD.PushError("Attempted to convert an unmarshallable managed type to Variant. Name: '" + + obj.GetType().FullName + "."); + return new godot_variant(); + } + + private delegate object? ConvertToSystemObjectFunc(in godot_variant managed); + + [SuppressMessage("ReSharper", "RedundantNameQualifier")] + // ReSharper disable once RedundantNameQualifier + private static readonly System.Collections.Generic.Dictionary<Type, ConvertToSystemObjectFunc> + ToSystemObjectFuncByType = new() + { + [typeof(bool)] = (in godot_variant variant) => VariantUtils.ConvertTo<bool>(variant), + [typeof(char)] = (in godot_variant variant) => VariantUtils.ConvertTo<char>(variant), + [typeof(sbyte)] = (in godot_variant variant) => VariantUtils.ConvertTo<sbyte>(variant), + [typeof(short)] = (in godot_variant variant) => VariantUtils.ConvertTo<short>(variant), + [typeof(int)] = (in godot_variant variant) => VariantUtils.ConvertTo<int>(variant), + [typeof(long)] = (in godot_variant variant) => VariantUtils.ConvertTo<long>(variant), + [typeof(byte)] = (in godot_variant variant) => VariantUtils.ConvertTo<byte>(variant), + [typeof(ushort)] = (in godot_variant variant) => VariantUtils.ConvertTo<ushort>(variant), + [typeof(uint)] = (in godot_variant variant) => VariantUtils.ConvertTo<uint>(variant), + [typeof(ulong)] = (in godot_variant variant) => VariantUtils.ConvertTo<ulong>(variant), + [typeof(float)] = (in godot_variant variant) => VariantUtils.ConvertTo<float>(variant), + [typeof(double)] = (in godot_variant variant) => VariantUtils.ConvertTo<double>(variant), + [typeof(Vector2)] = (in godot_variant variant) => VariantUtils.ConvertTo<Vector2>(variant), + [typeof(Vector2i)] = (in godot_variant variant) => VariantUtils.ConvertTo<Vector2i>(variant), + [typeof(Rect2)] = (in godot_variant variant) => VariantUtils.ConvertTo<Rect2>(variant), + [typeof(Rect2i)] = (in godot_variant variant) => VariantUtils.ConvertTo<Rect2i>(variant), + [typeof(Transform2D)] = (in godot_variant variant) => VariantUtils.ConvertTo<Transform2D>(variant), + [typeof(Vector3)] = (in godot_variant variant) => VariantUtils.ConvertTo<Vector3>(variant), + [typeof(Vector3i)] = (in godot_variant variant) => VariantUtils.ConvertTo<Vector3i>(variant), + [typeof(Basis)] = (in godot_variant variant) => VariantUtils.ConvertTo<Basis>(variant), + [typeof(Quaternion)] = (in godot_variant variant) => VariantUtils.ConvertTo<Quaternion>(variant), + [typeof(Transform3D)] = (in godot_variant variant) => VariantUtils.ConvertTo<Transform3D>(variant), + [typeof(Vector4)] = (in godot_variant variant) => VariantUtils.ConvertTo<Vector4>(variant), + [typeof(Vector4i)] = (in godot_variant variant) => VariantUtils.ConvertTo<Vector4i>(variant), + [typeof(AABB)] = (in godot_variant variant) => VariantUtils.ConvertTo<AABB>(variant), + [typeof(Color)] = (in godot_variant variant) => VariantUtils.ConvertTo<Color>(variant), + [typeof(Plane)] = (in godot_variant variant) => VariantUtils.ConvertTo<Plane>(variant), + [typeof(Callable)] = (in godot_variant variant) => VariantUtils.ConvertTo<Callable>(variant), + [typeof(SignalInfo)] = (in godot_variant variant) => VariantUtils.ConvertTo<SignalInfo>(variant), + [typeof(string)] = (in godot_variant variant) => VariantUtils.ConvertTo<string>(variant), + [typeof(byte[])] = (in godot_variant variant) => VariantUtils.ConvertTo<byte[]>(variant), + [typeof(int[])] = (in godot_variant variant) => VariantUtils.ConvertTo<int[]>(variant), + [typeof(long[])] = (in godot_variant variant) => VariantUtils.ConvertTo<long[]>(variant), + [typeof(float[])] = (in godot_variant variant) => VariantUtils.ConvertTo<float[]>(variant), + [typeof(double[])] = (in godot_variant variant) => VariantUtils.ConvertTo<double[]>(variant), + [typeof(string[])] = (in godot_variant variant) => VariantUtils.ConvertTo<string[]>(variant), + [typeof(Vector2[])] = (in godot_variant variant) => VariantUtils.ConvertTo<Vector2[]>(variant), + [typeof(Vector3[])] = (in godot_variant variant) => VariantUtils.ConvertTo<Vector3[]>(variant), + [typeof(Color[])] = (in godot_variant variant) => VariantUtils.ConvertTo<Color[]>(variant), + [typeof(StringName[])] = + (in godot_variant variant) => VariantUtils.ConvertTo<StringName[]>(variant), + [typeof(NodePath[])] = (in godot_variant variant) => VariantUtils.ConvertTo<NodePath[]>(variant), + [typeof(RID[])] = (in godot_variant variant) => VariantUtils.ConvertTo<RID[]>(variant), + [typeof(StringName)] = (in godot_variant variant) => VariantUtils.ConvertTo<StringName>(variant), + [typeof(NodePath)] = (in godot_variant variant) => VariantUtils.ConvertTo<NodePath>(variant), + [typeof(RID)] = (in godot_variant variant) => VariantUtils.ConvertTo<RID>(variant), + [typeof(Godot.Collections.Dictionary)] = (in godot_variant variant) => + VariantUtils.ConvertTo<Godot.Collections.Dictionary>(variant), + [typeof(Godot.Collections.Array)] = + (in godot_variant variant) => VariantUtils.ConvertTo<Godot.Collections.Array>(variant), + [typeof(Variant)] = (in godot_variant variant) => VariantUtils.ConvertTo<Variant>(variant), + }; + + [SuppressMessage("ReSharper", "RedundantNameQualifier")] + public static object? ConvertToObjectOfType(in godot_variant variant, Type type) + { + if (ToSystemObjectFuncByType.TryGetValue(type, out var func)) + return func(variant); + + if (typeof(Godot.Object).IsAssignableFrom(type)) + return Convert.ChangeType(VariantUtils.ConvertTo<Godot.Object>(variant), type); + + if (type.IsEnum) + { + var enumUnderlyingType = type.GetEnumUnderlyingType(); + + switch (Type.GetTypeCode(enumUnderlyingType)) + { + case TypeCode.SByte: + return Enum.ToObject(type, VariantUtils.ConvertToInt8(variant)); + case TypeCode.Int16: + return Enum.ToObject(type, VariantUtils.ConvertToInt16(variant)); + case TypeCode.Int32: + return Enum.ToObject(type, VariantUtils.ConvertToInt32(variant)); + case TypeCode.Int64: + return Enum.ToObject(type, VariantUtils.ConvertToInt64(variant)); + case TypeCode.Byte: + return Enum.ToObject(type, VariantUtils.ConvertToUInt8(variant)); + case TypeCode.UInt16: + return Enum.ToObject(type, VariantUtils.ConvertToUInt16(variant)); + case TypeCode.UInt32: + return Enum.ToObject(type, VariantUtils.ConvertToUInt32(variant)); + case TypeCode.UInt64: + return Enum.ToObject(type, VariantUtils.ConvertToUInt64(variant)); + default: + { + GD.PushError( + "Attempted to convert Variant to enum value of unsupported underlying type. Name: " + + type.FullName + " : " + enumUnderlyingType.FullName + "."); + return null; + } + } + } + + if (type.IsGenericType) + { + var genericTypeDef = type.GetGenericTypeDefinition(); + + if (genericTypeDef == typeof(Godot.Collections.Dictionary<,>)) + { + var ctor = type.GetConstructor(BindingFlags.Default, + new[] { typeof(Godot.Collections.Dictionary) }); + + if (ctor == null) + throw new InvalidOperationException("Dictionary constructor not found"); + + return ctor.Invoke(new object?[] + { + VariantUtils.ConvertTo<Godot.Collections.Dictionary>(variant) + }); + } + + if (genericTypeDef == typeof(Godot.Collections.Array<>)) + { + var ctor = type.GetConstructor(BindingFlags.Default, + new[] { typeof(Godot.Collections.Array) }); + + if (ctor == null) + throw new InvalidOperationException("Array constructor not found"); + + return ctor.Invoke(new object?[] + { + VariantUtils.ConvertTo<Godot.Collections.Array>(variant) + }); + } + } + + GD.PushError($"Attempted to convert Variant to unsupported type. Name: {type.FullName}."); + return null; + } + } } } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs index d2a80d0e92..6176093bc1 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs @@ -1,5 +1,7 @@ using System; using System.Runtime.InteropServices; +using Godot.Collections; +using Array = System.Array; // ReSharper disable InconsistentNaming @@ -148,6 +150,15 @@ namespace Godot.NativeInterop { if (typeof(Godot.Object).IsAssignableFrom(type)) return Variant.Type.Object; + + // We use `IsAssignableFrom` with our helper interfaces to detect generic Godot collections + // because `GetGenericTypeDefinition` is not supported in NativeAOT reflection-free mode. + + if (typeof(IGenericGodotDictionary).IsAssignableFrom(type)) + return Variant.Type.Dictionary; + + if (typeof(IGenericGodotArray).IsAssignableFrom(type)) + return Variant.Type.Array; } else if (type == typeof(Variant)) { @@ -183,512 +194,6 @@ namespace Godot.NativeInterop return Variant.Type.Nil; } - /* TODO: Reflection and type checking each time is slow. This will be replaced with source generators. */ - public static godot_variant ConvertManagedObjectToVariant(object? p_obj) - { - if (p_obj == null) - return new godot_variant(); - - switch (p_obj) - { - case bool @bool: - return VariantUtils.CreateFromBool(@bool); - case char @char: - return VariantUtils.CreateFromInt(@char); - case sbyte @int8: - return VariantUtils.CreateFromInt(@int8); - case short @int16: - return VariantUtils.CreateFromInt(@int16); - case int @int32: - return VariantUtils.CreateFromInt(@int32); - case long @int64: - return VariantUtils.CreateFromInt(@int64); - case byte @uint8: - return VariantUtils.CreateFromInt(@uint8); - case ushort @uint16: - return VariantUtils.CreateFromInt(@uint16); - case uint @uint32: - return VariantUtils.CreateFromInt(@uint32); - case ulong @uint64: - return VariantUtils.CreateFromInt(@uint64); - case float @float: - return VariantUtils.CreateFromFloat(@float); - case double @double: - return VariantUtils.CreateFromFloat(@double); - case Vector2 @vector2: - return VariantUtils.CreateFromVector2(@vector2); - case Vector2i @vector2i: - return VariantUtils.CreateFromVector2i(@vector2i); - case Rect2 @rect2: - return VariantUtils.CreateFromRect2(@rect2); - case Rect2i @rect2i: - return VariantUtils.CreateFromRect2i(@rect2i); - case Transform2D @transform2D: - return VariantUtils.CreateFromTransform2D(@transform2D); - case Vector3 @vector3: - return VariantUtils.CreateFromVector3(@vector3); - case Vector3i @vector3i: - return VariantUtils.CreateFromVector3i(@vector3i); - case Vector4 @vector4: - return VariantUtils.CreateFromVector4(@vector4); - case Vector4i @vector4i: - return VariantUtils.CreateFromVector4i(@vector4i); - case Basis @basis: - return VariantUtils.CreateFromBasis(@basis); - case Quaternion @quaternion: - return VariantUtils.CreateFromQuaternion(@quaternion); - case Transform3D @transform3d: - return VariantUtils.CreateFromTransform3D(@transform3d); - case Projection @projection: - return VariantUtils.CreateFromProjection(@projection); - case AABB @aabb: - return VariantUtils.CreateFromAABB(@aabb); - case Color @color: - return VariantUtils.CreateFromColor(@color); - case Plane @plane: - return VariantUtils.CreateFromPlane(@plane); - case Callable @callable: - return VariantUtils.CreateFromCallable(@callable); - case SignalInfo @signalInfo: - return VariantUtils.CreateFromSignalInfo(@signalInfo); - case Enum @enum: - return VariantUtils.CreateFromInt(Convert.ToInt64(@enum)); - case string @string: - return VariantUtils.CreateFromString(@string); - case byte[] byteArray: - return VariantUtils.CreateFromPackedByteArray(byteArray); - case int[] int32Array: - return VariantUtils.CreateFromPackedInt32Array(int32Array); - case long[] int64Array: - return VariantUtils.CreateFromPackedInt64Array(int64Array); - case float[] floatArray: - return VariantUtils.CreateFromPackedFloat32Array(floatArray); - case double[] doubleArray: - return VariantUtils.CreateFromPackedFloat64Array(doubleArray); - case string[] stringArray: - return VariantUtils.CreateFromPackedStringArray(stringArray); - case Vector2[] vector2Array: - return VariantUtils.CreateFromPackedVector2Array(vector2Array); - case Vector3[] vector3Array: - return VariantUtils.CreateFromPackedVector3Array(vector3Array); - case Color[] colorArray: - return VariantUtils.CreateFromPackedColorArray(colorArray); - case StringName[] stringNameArray: - return VariantUtils.CreateFromSystemArrayOfStringName(stringNameArray); - case NodePath[] nodePathArray: - return VariantUtils.CreateFromSystemArrayOfNodePath(nodePathArray); - case RID[] ridArray: - return VariantUtils.CreateFromSystemArrayOfRID(ridArray); - case Godot.Object[] godotObjectArray: - return VariantUtils.CreateFromSystemArrayOfGodotObject(godotObjectArray); - case Godot.Object godotObject: - return VariantUtils.CreateFromGodotObject(godotObject); - case StringName stringName: - return VariantUtils.CreateFromStringName(stringName); - case NodePath nodePath: - return VariantUtils.CreateFromNodePath(nodePath); - case RID rid: - return VariantUtils.CreateFromRID(rid); - case Collections.Dictionary godotDictionary: - return VariantUtils.CreateFromDictionary(godotDictionary); - case Collections.Array godotArray: - return VariantUtils.CreateFromArray(godotArray); - case Collections.IGenericGodotDictionary godotDictionary: - return VariantUtils.CreateFromDictionary(godotDictionary.UnderlyingDictionary); - case Collections.IGenericGodotArray godotArray: - return VariantUtils.CreateFromArray(godotArray.UnderlyingArray); - case Variant variant: - return NativeFuncs.godotsharp_variant_new_copy((godot_variant)variant.NativeVar); - } - - GD.PushError("Attempted to convert an unmarshallable managed type to Variant. Name: '" + - p_obj.GetType().FullName + "."); - return new godot_variant(); - } - - public static object? ConvertVariantToManagedObjectOfType(in godot_variant p_var, Type type) - { - // This function is only needed to set the value of properties. Fields have their own implementation, set_value_from_variant. - switch (Type.GetTypeCode(type)) - { - case TypeCode.Boolean: - return VariantUtils.ConvertToBool(p_var); - case TypeCode.Char: - return VariantUtils.ConvertToChar(p_var); - case TypeCode.SByte: - return VariantUtils.ConvertToInt8(p_var); - case TypeCode.Int16: - return VariantUtils.ConvertToInt16(p_var); - case TypeCode.Int32: - return VariantUtils.ConvertToInt32(p_var); - case TypeCode.Int64: - return VariantUtils.ConvertToInt64(p_var); - case TypeCode.Byte: - return VariantUtils.ConvertToUInt8(p_var); - case TypeCode.UInt16: - return VariantUtils.ConvertToUInt16(p_var); - case TypeCode.UInt32: - return VariantUtils.ConvertToUInt32(p_var); - case TypeCode.UInt64: - return VariantUtils.ConvertToUInt64(p_var); - case TypeCode.Single: - return VariantUtils.ConvertToFloat32(p_var); - case TypeCode.Double: - return VariantUtils.ConvertToFloat64(p_var); - case TypeCode.String: - return VariantUtils.ConvertToStringObject(p_var); - default: - { - if (type == typeof(Vector2)) - return VariantUtils.ConvertToVector2(p_var); - - if (type == typeof(Vector2i)) - return VariantUtils.ConvertToVector2i(p_var); - - if (type == typeof(Rect2)) - return VariantUtils.ConvertToRect2(p_var); - - if (type == typeof(Rect2i)) - return VariantUtils.ConvertToRect2i(p_var); - - if (type == typeof(Transform2D)) - return VariantUtils.ConvertToTransform2D(p_var); - - if (type == typeof(Vector3)) - return VariantUtils.ConvertToVector3(p_var); - - if (type == typeof(Vector3i)) - return VariantUtils.ConvertToVector3i(p_var); - - if (type == typeof(Vector4)) - return VariantUtils.ConvertToVector4(p_var); - - if (type == typeof(Vector4i)) - return VariantUtils.ConvertToVector4i(p_var); - - if (type == typeof(Basis)) - return VariantUtils.ConvertToBasis(p_var); - - if (type == typeof(Quaternion)) - return VariantUtils.ConvertToQuaternion(p_var); - - if (type == typeof(Transform3D)) - return VariantUtils.ConvertToTransform3D(p_var); - - if (type == typeof(Projection)) - return VariantUtils.ConvertToProjection(p_var); - - if (type == typeof(AABB)) - return VariantUtils.ConvertToAABB(p_var); - - if (type == typeof(Color)) - return VariantUtils.ConvertToColor(p_var); - - if (type == typeof(Plane)) - return VariantUtils.ConvertToPlane(p_var); - - if (type == typeof(Callable)) - return VariantUtils.ConvertToCallableManaged(p_var); - - if (type == typeof(SignalInfo)) - return VariantUtils.ConvertToSignalInfo(p_var); - - if (type.IsEnum) - { - var enumUnderlyingType = type.GetEnumUnderlyingType(); - switch (Type.GetTypeCode(enumUnderlyingType)) - { - case TypeCode.SByte: - return VariantUtils.ConvertToInt8(p_var); - case TypeCode.Int16: - return VariantUtils.ConvertToInt16(p_var); - case TypeCode.Int32: - return VariantUtils.ConvertToInt32(p_var); - case TypeCode.Int64: - return VariantUtils.ConvertToInt64(p_var); - case TypeCode.Byte: - return VariantUtils.ConvertToUInt8(p_var); - case TypeCode.UInt16: - return VariantUtils.ConvertToUInt16(p_var); - case TypeCode.UInt32: - return VariantUtils.ConvertToUInt32(p_var); - case TypeCode.UInt64: - return VariantUtils.ConvertToUInt64(p_var); - default: - { - GD.PushError( - "Attempted to convert Variant to enum value of unsupported underlying type. Name: " + - type.FullName + " : " + enumUnderlyingType.FullName + "."); - return null; - } - } - } - - if (type.IsArray || type.IsSZArray) - { - return ConvertVariantToSystemArrayOfType(p_var, type); - } - else if (type.IsGenericType) - { - if (typeof(Godot.Object).IsAssignableFrom(type)) - { - var godotObject = VariantUtils.ConvertToGodotObject(p_var); - - if (!type.IsInstanceOfType(godotObject)) - { - GD.PushError("Invalid cast when marshaling Godot.Object type." + - $" `{godotObject.GetType()}` is not assignable to `{type.FullName}`."); - return null; - } - - return godotObject; - } - - return null; - } - else if (type == typeof(Variant)) - { - return Variant.CreateCopyingBorrowed(p_var); - } - - if (ConvertVariantToManagedObjectOfClass(p_var, type, out object? res)) - return res; - - break; - } - } - - GD.PushError("Attempted to convert Variant to unsupported type. Name: " + - type.FullName + "."); - return null; - } - - private static object? ConvertVariantToSystemArrayOfType(in godot_variant p_var, Type type) - { - if (type == typeof(byte[])) - return VariantUtils.ConvertAsPackedByteArrayToSystemArray(p_var); - - if (type == typeof(int[])) - return VariantUtils.ConvertAsPackedInt32ArrayToSystemArray(p_var); - - if (type == typeof(long[])) - return VariantUtils.ConvertAsPackedInt64ArrayToSystemArray(p_var); - - if (type == typeof(float[])) - return VariantUtils.ConvertAsPackedFloat32ArrayToSystemArray(p_var); - - if (type == typeof(double[])) - return VariantUtils.ConvertAsPackedFloat64ArrayToSystemArray(p_var); - - if (type == typeof(string[])) - return VariantUtils.ConvertAsPackedStringArrayToSystemArray(p_var); - - if (type == typeof(Vector2[])) - return VariantUtils.ConvertAsPackedVector2ArrayToSystemArray(p_var); - - if (type == typeof(Vector3[])) - return VariantUtils.ConvertAsPackedVector3ArrayToSystemArray(p_var); - - if (type == typeof(Color[])) - return VariantUtils.ConvertAsPackedColorArrayToSystemArray(p_var); - - if (type == typeof(StringName[])) - return VariantUtils.ConvertToSystemArrayOfStringName(p_var); - - if (type == typeof(NodePath[])) - return VariantUtils.ConvertToSystemArrayOfNodePath(p_var); - - if (type == typeof(RID[])) - return VariantUtils.ConvertToSystemArrayOfRID(p_var); - - if (typeof(Godot.Object[]).IsAssignableFrom(type)) - return VariantUtils.ConvertToSystemArrayOfGodotObject(p_var, type); - - GD.PushError("Attempted to convert Variant to array of unsupported element type. Name: " + - type.GetElementType()!.FullName + "."); - return null; - } - - private static bool ConvertVariantToManagedObjectOfClass(in godot_variant p_var, Type type, - out object? res) - { - if (typeof(Godot.Object).IsAssignableFrom(type)) - { - if (p_var.Type == Variant.Type.Nil) - { - res = null; - return true; - } - - if (p_var.Type != Variant.Type.Object) - { - GD.PushError("Invalid cast when marshaling Godot.Object type." + - $" Variant type is `{p_var.Type}`; expected `{p_var.Object}`."); - res = null; - return true; - } - - var godotObjectPtr = VariantUtils.ConvertToGodotObjectPtr(p_var); - - if (godotObjectPtr == IntPtr.Zero) - { - res = null; - return true; - } - - var godotObject = InteropUtils.UnmanagedGetManaged(godotObjectPtr); - - if (!type.IsInstanceOfType(godotObject)) - { - GD.PushError("Invalid cast when marshaling Godot.Object type." + - $" `{godotObject.GetType()}` is not assignable to `{type.FullName}`."); - res = null; - return false; - } - - res = godotObject; - return true; - } - - if (typeof(StringName) == type) - { - res = VariantUtils.ConvertToStringNameObject(p_var); - return true; - } - - if (typeof(NodePath) == type) - { - res = VariantUtils.ConvertToNodePathObject(p_var); - return true; - } - - if (typeof(RID) == type) - { - res = VariantUtils.ConvertToRID(p_var); - return true; - } - - if (typeof(Collections.Dictionary) == type) - { - res = VariantUtils.ConvertToDictionaryObject(p_var); - return true; - } - - if (typeof(Collections.Array) == type) - { - res = VariantUtils.ConvertToArrayObject(p_var); - return true; - } - - res = null; - return false; - } - - public static unsafe object? ConvertVariantToManagedObject(in godot_variant p_var) - { - switch (p_var.Type) - { - case Variant.Type.Bool: - return p_var.Bool.ToBool(); - case Variant.Type.Int: - return p_var.Int; - case Variant.Type.Float: - { -#if REAL_T_IS_DOUBLE - return p_var.Float; -#else - return (float)p_var.Float; -#endif - } - case Variant.Type.String: - return ConvertStringToManaged(p_var.String); - case Variant.Type.Vector2: - return p_var.Vector2; - case Variant.Type.Vector2i: - return p_var.Vector2i; - case Variant.Type.Rect2: - return p_var.Rect2; - case Variant.Type.Rect2i: - return p_var.Rect2i; - case Variant.Type.Vector3: - return p_var.Vector3; - case Variant.Type.Vector3i: - return p_var.Vector3i; - case Variant.Type.Transform2d: - return *p_var.Transform2D; - case Variant.Type.Vector4: - return p_var.Vector4; - case Variant.Type.Vector4i: - return p_var.Vector4i; - case Variant.Type.Plane: - return p_var.Plane; - case Variant.Type.Quaternion: - return p_var.Quaternion; - case Variant.Type.Aabb: - return *p_var.AABB; - case Variant.Type.Basis: - return *p_var.Basis; - case Variant.Type.Transform3d: - return *p_var.Transform3D; - case Variant.Type.Projection: - return *p_var.Projection; - case Variant.Type.Color: - return p_var.Color; - case Variant.Type.StringName: - { - // The Variant owns the value, so we need to make a copy - return StringName.CreateTakingOwnershipOfDisposableValue( - NativeFuncs.godotsharp_string_name_new_copy(p_var.StringName)); - } - case Variant.Type.NodePath: - { - // The Variant owns the value, so we need to make a copy - return NodePath.CreateTakingOwnershipOfDisposableValue( - NativeFuncs.godotsharp_node_path_new_copy(p_var.NodePath)); - } - case Variant.Type.Rid: - return p_var.RID; - case Variant.Type.Object: - return InteropUtils.UnmanagedGetManaged(p_var.Object); - case Variant.Type.Callable: - return ConvertCallableToManaged(p_var.Callable); - case Variant.Type.Signal: - return ConvertSignalToManaged(p_var.Signal); - case Variant.Type.Dictionary: - { - // The Variant owns the value, so we need to make a copy - return Collections.Dictionary.CreateTakingOwnershipOfDisposableValue( - NativeFuncs.godotsharp_dictionary_new_copy(p_var.Dictionary)); - } - case Variant.Type.Array: - { - // The Variant owns the value, so we need to make a copy - return Collections.Array.CreateTakingOwnershipOfDisposableValue( - NativeFuncs.godotsharp_array_new_copy(p_var.Array)); - } - case Variant.Type.PackedByteArray: - return VariantUtils.ConvertAsPackedByteArrayToSystemArray(p_var); - case Variant.Type.PackedInt32Array: - return VariantUtils.ConvertAsPackedInt32ArrayToSystemArray(p_var); - case Variant.Type.PackedInt64Array: - return VariantUtils.ConvertAsPackedInt64ArrayToSystemArray(p_var); - case Variant.Type.PackedFloat32Array: - return VariantUtils.ConvertAsPackedFloat32ArrayToSystemArray(p_var); - case Variant.Type.PackedFloat64Array: - return VariantUtils.ConvertAsPackedFloat64ArrayToSystemArray(p_var); - case Variant.Type.PackedStringArray: - return VariantUtils.ConvertAsPackedStringArrayToSystemArray(p_var); - case Variant.Type.PackedVector2Array: - return VariantUtils.ConvertAsPackedVector2ArrayToSystemArray(p_var); - case Variant.Type.PackedVector3Array: - return VariantUtils.ConvertAsPackedVector3ArrayToSystemArray(p_var); - case Variant.Type.PackedColorArray: - return VariantUtils.ConvertAsPackedColorArrayToSystemArray(p_var); - default: - return null; - } - } - // String public static unsafe godot_string ConvertStringToNative(string? p_mono_string) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs index 694da6db77..80ef2a1ea1 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs @@ -4,6 +4,8 @@ using System.Runtime.CompilerServices; namespace Godot.NativeInterop; +#nullable enable + public partial class VariantUtils { private static Exception UnsupportedType<T>() => new InvalidOperationException( diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs index 237a4da364..49a363cef2 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs @@ -109,16 +109,50 @@ public partial struct Variant : IDisposable public override string ToString() => AsString(); - public object? Obj - { - get + public object? Obj => + _obj ??= NativeVar.DangerousSelfRef.Type switch { - if (_obj == null) - _obj = Marshaling.ConvertVariantToManagedObject((godot_variant)NativeVar); - - return _obj; - } - } + Type.Bool => AsBool(), + Type.Int => AsInt64(), + Type.Float => AsDouble(), + Type.String => AsString(), + Type.Vector2 => AsVector2(), + Type.Vector2i => AsVector2i(), + Type.Rect2 => AsRect2(), + Type.Rect2i => AsRect2i(), + Type.Vector3 => AsVector3(), + Type.Vector3i => AsVector3i(), + Type.Transform2d => AsTransform2D(), + Type.Vector4 => AsVector4(), + Type.Vector4i => AsVector4i(), + Type.Plane => AsPlane(), + Type.Quaternion => AsQuaternion(), + Type.Aabb => AsAABB(), + Type.Basis => AsBasis(), + Type.Transform3d => AsTransform3D(), + Type.Projection => AsProjection(), + Type.Color => AsColor(), + Type.StringName => AsStringName(), + Type.NodePath => AsNodePath(), + Type.Rid => AsRID(), + Type.Object => AsGodotObject(), + Type.Callable => AsCallable(), + Type.Signal => AsSignalInfo(), + Type.Dictionary => AsGodotDictionary(), + Type.Array => AsGodotArray(), + Type.PackedByteArray => AsByteArray(), + Type.PackedInt32Array => AsInt32Array(), + Type.PackedInt64Array => AsInt64Array(), + Type.PackedFloat32Array => AsFloat32Array(), + Type.PackedFloat64Array => AsFloat64Array(), + Type.PackedStringArray => AsStringArray(), + Type.PackedVector2Array => AsVector2Array(), + Type.PackedVector3Array => AsVector3Array(), + Type.PackedColorArray => AsColorArray(), + Type.Nil => null, + Type.Max or _ => + throw new InvalidOperationException($"Invalid Variant type: {NativeVar.DangerousSelfRef.Type}"), + }; [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Variant From<[MustBeVariant] T>(in T from) => 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/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/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp index e14e4fb52d..25cb575199 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,120 @@ 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 { +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; + } +} + +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 +744,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 +760,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 +1085,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..ef830a069b 100644 --- a/platform/linuxbsd/os_linuxbsd.h +++ b/platform/linuxbsd/os_linuxbsd.h @@ -40,11 +40,17 @@ #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; #endif #ifdef JOYDEV_ENABLED @@ -67,6 +73,9 @@ class OS_LinuxBSD : public OS_Unix { MainLoop *main_loop = nullptr; + int _weight_to_fc(int p_weight) const; + int _stretch_to_fc(int p_stretch) const; + String get_systemd_os_release_info_value(const String &key) const; Vector<String> lspci_device_filter(Vector<String> vendor_device_id_mapping, String class_suffix, String check_column, String whitelist) const; @@ -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/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/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/animation/animation_player.cpp b/scene/animation/animation_player.cpp index ee6fb58583..ca1befc135 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) { @@ -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_edit.cpp b/scene/gui/graph_edit.cpp index 40792dd43f..1c4c8c2574 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -623,7 +623,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { //check disconnect for (const Connection &E : connections) { if (E.from == gn->get_name() && E.from_port == j) { - Node *to = get_node(String(E.to)); + Node *to = get_node(NodePath(E.to)); if (Object::cast_to<GraphNode>(to)) { connecting_from = E.to; connecting_index = E.to_port; @@ -637,7 +637,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { just_disconnected = true; emit_signal(SNAME("disconnection_request"), E.from, E.from_port, E.to, E.to_port); - to = get_node(String(connecting_from)); //maybe it was erased + to = get_node(NodePath(connecting_from)); // Maybe it was erased. if (Object::cast_to<GraphNode>(to)) { connecting = true; emit_signal(SNAME("connection_drag_started"), connecting_from, connecting_index, false); @@ -673,10 +673,10 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { if (is_in_input_hotzone(gn, j, click_pos, port_size)) { if (right_disconnects || valid_right_disconnect_types.has(gn->get_connection_input_type(j))) { - //check disconnect + // Check disconnect. for (const Connection &E : connections) { if (E.to == gn->get_name() && E.to_port == j) { - Node *fr = get_node(String(E.from)); + Node *fr = get_node(NodePath(E.from)); if (Object::cast_to<GraphNode>(fr)) { connecting_from = E.from; connecting_index = E.from_port; @@ -689,7 +689,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { if (connecting_type >= 0) { emit_signal(SNAME("disconnection_request"), E.from, E.from_port, E.to, E.to_port); - fr = get_node(String(connecting_from)); //maybe it was erased + fr = get_node(NodePath(connecting_from)); // Maybe it was erased. if (Object::cast_to<GraphNode>(fr)) { connecting = true; emit_signal(SNAME("connection_drag_started"), connecting_from, connecting_index, true); @@ -780,26 +780,16 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed()) { if (connecting_valid) { if (connecting && connecting_target) { - String from = connecting_from; - int from_port = connecting_index; - String to = connecting_target_to; - int to_port = connecting_target_index; - - if (!connecting_out) { - SWAP(from, to); - SWAP(from_port, to_port); + if (connecting_out) { + emit_signal(SNAME("connection_request"), connecting_from, connecting_index, connecting_target_to, connecting_target_index); + } else { + emit_signal(SNAME("connection_request"), connecting_target_to, connecting_target_index, connecting_from, connecting_index); } - emit_signal(SNAME("connection_request"), from, from_port, to, to_port); - } else if (!just_disconnected) { - String from = connecting_from; - int from_port = connecting_index; - Vector2 ofs = mb->get_position(); - - if (!connecting_out) { - emit_signal(SNAME("connection_from_empty"), from, from_port, ofs); + if (connecting_out) { + emit_signal(SNAME("connection_to_empty"), connecting_from, connecting_index, mb->get_position()); } else { - emit_signal(SNAME("connection_to_empty"), from, from_port, ofs); + emit_signal(SNAME("connection_from_empty"), connecting_from, connecting_index, mb->get_position()); } } } @@ -935,17 +925,12 @@ void GraphEdit::_draw_connection_line(CanvasItem *p_where, const Vector2 &p_from void GraphEdit::_connections_layer_draw() { Color activity_color = get_theme_color(SNAME("activity")); - //draw connections + // Draw connections. List<List<Connection>::Element *> to_erase; for (List<Connection>::Element *E = connections.front(); E; E = E->next()) { - NodePath fromnp(E->get().from); - - Node *from = get_node(fromnp); - if (!from) { - to_erase.push_back(E); - continue; - } + const Connection &c = E->get(); + Node *from = get_node(NodePath(c.from)); GraphNode *gfrom = Object::cast_to<GraphNode>(from); if (!gfrom) { @@ -953,13 +938,7 @@ void GraphEdit::_connections_layer_draw() { continue; } - NodePath tonp(E->get().to); - Node *to = get_node(tonp); - if (!to) { - to_erase.push_back(E); - continue; - } - + Node *to = get_node(NodePath(c.to)); GraphNode *gto = Object::cast_to<GraphNode>(to); if (!gto) { @@ -967,21 +946,20 @@ void GraphEdit::_connections_layer_draw() { continue; } - Vector2 frompos = gfrom->get_connection_output_position(E->get().from_port) + gfrom->get_position_offset() * zoom; - Color color = gfrom->get_connection_output_color(E->get().from_port); - Vector2 topos = gto->get_connection_input_position(E->get().to_port) + gto->get_position_offset() * zoom; - Color tocolor = gto->get_connection_input_color(E->get().to_port); + Vector2 frompos = gfrom->get_connection_output_position(c.from_port) + gfrom->get_position_offset() * zoom; + Color color = gfrom->get_connection_output_color(c.from_port); + Vector2 topos = gto->get_connection_input_position(c.to_port) + gto->get_position_offset() * zoom; + Color tocolor = gto->get_connection_input_color(c.to_port); - if (E->get().activity > 0) { - color = color.lerp(activity_color, E->get().activity); - tocolor = tocolor.lerp(activity_color, E->get().activity); + if (c.activity > 0) { + color = color.lerp(activity_color, c.activity); + tocolor = tocolor.lerp(activity_color, c.activity); } _draw_connection_line(connections_layer, frompos, topos, color, tocolor, lines_thickness, zoom); } - while (to_erase.size()) { - connections.erase(to_erase.front()->get()); - to_erase.pop_front(); + for (List<Connection>::Element *&E : to_erase) { + connections.erase(E); } } @@ -989,7 +967,7 @@ void GraphEdit::_top_layer_draw() { _update_scroll(); if (connecting) { - Node *fromn = get_node(connecting_from); + Node *fromn = get_node(NodePath(connecting_from)); ERR_FAIL_COND(!fromn); GraphNode *from = Object::cast_to<GraphNode>(fromn); ERR_FAIL_COND(!from); @@ -1087,22 +1065,13 @@ void GraphEdit::_minimap_draw() { // Draw node connections. Color activity_color = get_theme_color(SNAME("activity")); for (const Connection &E : connections) { - NodePath fromnp(E.from); - - Node *from = get_node(fromnp); - if (!from) { - continue; - } + Node *from = get_node(NodePath(E.from)); GraphNode *gfrom = Object::cast_to<GraphNode>(from); if (!gfrom) { continue; } - NodePath tonp(E.to); - Node *to = get_node(tonp); - if (!to) { - continue; - } + Node *to = get_node(NodePath(E.to)); GraphNode *gto = Object::cast_to<GraphNode>(to); if (!gto) { continue; @@ -2428,7 +2397,7 @@ void GraphEdit::_bind_methods() { ADD_SIGNAL(MethodInfo("begin_node_move")); ADD_SIGNAL(MethodInfo("end_node_move")); ADD_SIGNAL(MethodInfo("scroll_offset_changed", PropertyInfo(Variant::VECTOR2, "offset"))); - ADD_SIGNAL(MethodInfo("connection_drag_started", PropertyInfo(Variant::STRING, "from_node"), PropertyInfo(Variant::INT, "from_port"), PropertyInfo(Variant::BOOL, "is_output"))); + ADD_SIGNAL(MethodInfo("connection_drag_started", PropertyInfo(Variant::STRING_NAME, "from_node"), PropertyInfo(Variant::INT, "from_port"), PropertyInfo(Variant::BOOL, "is_output"))); ADD_SIGNAL(MethodInfo("connection_drag_ended")); BIND_ENUM_CONSTANT(SCROLL_ZOOMS); diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index 101087bdbd..eda7ddd824 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -136,14 +136,14 @@ private: bool arrange_nodes_button_hidden = false; bool connecting = false; - String connecting_from; + StringName connecting_from; bool connecting_out = false; int connecting_index = 0; int connecting_type = 0; Color connecting_color; bool connecting_target = false; Vector2 connecting_to; - String connecting_target_to; + StringName connecting_target_to; int connecting_target_index = 0; bool just_disconnected = false; bool connecting_valid = false; 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 9289c5da4a..93c3d4f851 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -1407,15 +1407,15 @@ void Curve3D::_bake_segment3d_even_length(RBMap<real_t, Vector3> &r_bake, real_t Vector3 beg = p_a.bezier_interpolate(p_a + p_out, p_b + p_in, p_b, p_begin); Vector3 end = p_a.bezier_interpolate(p_a + p_out, p_b + p_in, p_b, p_end); - size_t length = beg.distance_to(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; Vector3 mid = p_a.bezier_interpolate(p_a + p_out, p_b + p_in, p_b, mp); r_bake[mp] = mid; - _bake_segment3d(r_bake, p_begin, mp, p_a, p_out, p_b, p_in, p_depth + 1, p_max_depth, p_length); - _bake_segment3d(r_bake, mp, p_end, p_a, p_out, p_b, p_in, p_depth + 1, p_max_depth, p_length); + _bake_segment3d_even_length(r_bake, p_begin, mp, p_a, p_out, p_b, p_in, p_depth + 1, p_max_depth, p_length); + _bake_segment3d_even_length(r_bake, mp, p_end, p_a, p_out, p_b, p_in, p_depth + 1, p_max_depth, p_length); } } @@ -1839,10 +1839,11 @@ Vector3 Curve3D::get_closest_point(const Vector3 &p_to_point) const { real_t nearest_dist = -1.0f; for (int i = 0; i < pc - 1; i++) { + const real_t interval = baked_dist_cache[i + 1] - baked_dist_cache[i]; Vector3 origin = r[i]; - Vector3 direction = (r[i + 1] - origin) / bake_interval; + Vector3 direction = (r[i + 1] - origin) / interval; - real_t d = CLAMP((p_to_point - origin).dot(direction), 0.0f, bake_interval); + real_t d = CLAMP((p_to_point - origin).dot(direction), 0.0f, interval); Vector3 proj = origin + direction * d; real_t dist = proj.distance_squared_to(p_to_point); @@ -1875,13 +1876,16 @@ real_t Curve3D::get_closest_offset(const Vector3 &p_to_point) const { real_t nearest = 0.0f; real_t nearest_dist = -1.0f; - real_t offset = 0.0f; + real_t offset; for (int i = 0; i < pc - 1; i++) { + offset = baked_dist_cache[i]; + + const real_t interval = baked_dist_cache[i + 1] - baked_dist_cache[i]; Vector3 origin = r[i]; - Vector3 direction = (r[i + 1] - origin) / bake_interval; + Vector3 direction = (r[i + 1] - origin) / interval; - real_t d = CLAMP((p_to_point - origin).dot(direction), 0.0f, bake_interval); + real_t d = CLAMP((p_to_point - origin).dot(direction), 0.0f, interval); Vector3 proj = origin + direction * d; real_t dist = proj.distance_squared_to(p_to_point); @@ -1890,8 +1894,6 @@ real_t Curve3D::get_closest_offset(const Vector3 &p_to_point) const { nearest = offset + d; nearest_dist = dist; } - - offset += bake_interval; } return nearest; 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/effects/copy_effects.cpp b/servers/rendering/renderer_rd/effects/copy_effects.cpp index a05db8c563..f94abd66d7 100644 --- a/servers/rendering/renderer_rd/effects/copy_effects.cpp +++ b/servers/rendering/renderer_rd/effects/copy_effects.cpp @@ -1153,7 +1153,8 @@ void CopyEffects::cubemap_roughness(RID p_source_rd_texture, RID p_dest_texture, memset(&roughness.push_constant, 0, sizeof(CubemapRoughnessPushConstant)); roughness.push_constant.face_id = p_face_id > 9 ? 0 : p_face_id; - roughness.push_constant.roughness = p_roughness * p_roughness; // Shader expects roughness, not perceptual roughness, so multiply before passing in. + // Remap to perceptual-roughness^2 to create more detail in lower mips and match the mapping of cubemap_filter. + roughness.push_constant.roughness = p_roughness * p_roughness; roughness.push_constant.sample_count = p_sample_count; roughness.push_constant.use_direct_write = p_roughness == 0.0; roughness.push_constant.face_size = p_size; 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/effects/cubemap_roughness_inc.glsl b/servers/rendering/renderer_rd/shaders/effects/cubemap_roughness_inc.glsl index 1bee428a6f..c0597fe3f3 100644 --- a/servers/rendering/renderer_rd/shaders/effects/cubemap_roughness_inc.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/cubemap_roughness_inc.glsl @@ -70,17 +70,6 @@ float DistributionGGX(float NdotH, float roughness4) { return roughness4 / denom; } -// https://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html -float GGX(float NdotV, float a) { - float k = a / 2.0; - return NdotV / (NdotV * (1.0 - k) + k); -} - -// https://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html -float G_Smith(float a, float nDotV, float nDotL) { - return GGX(nDotL, a * a) * GGX(nDotV, a * a); -} - float radicalInverse_VdC(uint bits) { bits = (bits << 16u) | (bits >> 16u); bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); diff --git a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl index 896f51ca01..be53a7ae49 100644 --- a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl +++ b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl @@ -1084,12 +1084,13 @@ void fragment_shader(in SceneData scene_data) { #ifdef USE_RADIANCE_CUBEMAP_ARRAY float lod, blend; - blend = modf(roughness * MAX_ROUGHNESS_LOD, lod); + + blend = modf(sqrt(roughness) * MAX_ROUGHNESS_LOD, lod); specular_light = texture(samplerCubeArray(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), vec4(ref_vec, lod)).rgb; specular_light = mix(specular_light, texture(samplerCubeArray(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), vec4(ref_vec, lod + 1)).rgb, blend); #else - specular_light = textureLod(samplerCube(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), ref_vec, roughness * MAX_ROUGHNESS_LOD).rgb; + specular_light = textureLod(samplerCube(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), ref_vec, sqrt(roughness) * MAX_ROUGHNESS_LOD).rgb; #endif //USE_RADIANCE_CUBEMAP_ARRAY specular_light *= scene_data.IBL_exposure_normalization; @@ -1137,7 +1138,7 @@ void fragment_shader(in SceneData scene_data) { ref_vec = mix(ref_vec, n, clearcoat_roughness * clearcoat_roughness); float horizon = min(1.0 + dot(ref_vec, normal), 1.0); ref_vec = scene_data.radiance_inverse_xform * ref_vec; - float roughness_lod = mix(0.001, 0.1, clearcoat_roughness) * MAX_ROUGHNESS_LOD; + float roughness_lod = mix(0.001, 0.1, sqrt(clearcoat_roughness)) * MAX_ROUGHNESS_LOD; #ifdef USE_RADIANCE_CUBEMAP_ARRAY float lod, blend; @@ -1484,7 +1485,7 @@ void fragment_shader(in SceneData scene_data) { float a004 = min(r.x * r.x, exp2(-9.28 * ndotv)) * r.x + r.y; vec2 env = vec2(-1.04, 1.04) * a004 + r.zw; - specular_light *= env.x * f0 + env.y * clamp(50.0 * f0.g, 0.0, 1.0); + specular_light *= env.x * f0 + env.y * clamp(50.0 * f0.g, metallic, 1.0); #endif } diff --git a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl index d50749306e..b45c68db5a 100644 --- a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl +++ b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl @@ -987,12 +987,12 @@ void main() { #ifdef USE_RADIANCE_CUBEMAP_ARRAY float lod, blend; - blend = modf(roughness * MAX_ROUGHNESS_LOD, lod); + blend = modf(sqrt(roughness) * MAX_ROUGHNESS_LOD, lod); specular_light = texture(samplerCubeArray(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), vec4(ref_vec, lod)).rgb; specular_light = mix(specular_light, texture(samplerCubeArray(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), vec4(ref_vec, lod + 1)).rgb, blend); #else // USE_RADIANCE_CUBEMAP_ARRAY - specular_light = textureLod(samplerCube(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), ref_vec, roughness * MAX_ROUGHNESS_LOD).rgb; + specular_light = textureLod(samplerCube(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), ref_vec, sqrt(roughness) * MAX_ROUGHNESS_LOD).rgb; #endif //USE_RADIANCE_CUBEMAP_ARRAY specular_light *= sc_luminance_multiplier; @@ -1042,7 +1042,7 @@ void main() { float horizon = min(1.0 + dot(ref_vec, normal), 1.0); ref_vec = scene_data.radiance_inverse_xform * ref_vec; - float roughness_lod = mix(0.001, 0.1, clearcoat_roughness) * MAX_ROUGHNESS_LOD; + float roughness_lod = mix(0.001, 0.1, sqrt(clearcoat_roughness)) * MAX_ROUGHNESS_LOD; #ifdef USE_RADIANCE_CUBEMAP_ARRAY float lod, blend; @@ -1205,7 +1205,7 @@ void main() { float a004 = min(r.x * r.x, exp2(-9.28 * ndotv)) * r.x + r.y; vec2 env = vec2(-1.04, 1.04) * a004 + r.zw; - specular_light *= env.x * f0 + env.y; + specular_light *= env.x * f0 + env.y * clamp(50.0 * f0.g, metallic, 1.0); #endif } 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/shaders/scene_forward_lights_inc.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl index 2fba1351f7..ba31b9c6dd 100644 --- a/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl +++ b/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl @@ -202,7 +202,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float atte float cLdotH5 = SchlickFresnel(cLdotH); // Calculate Fresnel using specular occlusion term from Filament: // https://google.github.io/filament/Filament.html#lighting/occlusion/specularocclusion - float f90 = clamp(dot(f0, vec3(50.0 * 0.33)), 0.0, 1.0); + float f90 = clamp(dot(f0, vec3(50.0 * 0.33)), metallic, 1.0); vec3 F = f0 + (f90 - f0) * cLdotH5; vec3 specular_brdf_NL = cNdotL * D * F * G; 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/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); |