initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled

This commit is contained in:
2025-09-16 20:46:46 -04:00
commit 9d30169a8d
13378 changed files with 7050105 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# Linux/*BSD platform port
This folder contains the C++ code for the Linux/*BSD platform port.
See also [`misc/dist/linux`](/misc/dist/linux) folder for additional files
used by this platform.
## Documentation
- [Compiling for Linux/*BSD](https://docs.godotengine.org/en/latest/engine_details/development/compiling/compiling_for_linuxbsd.html)
- Instructions on building this platform port from source.
- [Exporting for Linux/*BSD](https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_linux.html)
- Instructions on using the compiled export templates to export a project.
## Artwork license
[`logo.svg`](export/logo.svg) is derived from the [Linux logo](https://isc.tamu.edu/~lewing/linux/):
> Permission to use and/or modify this image is granted provided you acknowledge me
> <lewing@isc.tamu.edu> and [The GIMP](https://isc.tamu.edu/~lewing/gimp/)
> if someone asks.

41
platform/linuxbsd/SCsub Normal file
View File

@@ -0,0 +1,41 @@
#!/usr/bin/env python
from misc.utility.scons_hints import *
Import("env")
import platform_linuxbsd_builders
common_linuxbsd = [
"crash_handler_linuxbsd.cpp",
"os_linuxbsd.cpp",
"freedesktop_portal_desktop.cpp",
"freedesktop_screensaver.cpp",
"freedesktop_at_spi_monitor.cpp",
]
if env["use_sowrap"]:
common_linuxbsd.append("xkbcommon-so_wrap.c")
if env["x11"]:
common_linuxbsd += SConscript("x11/SCsub")
if env["wayland"]:
common_linuxbsd += SConscript("wayland/SCsub")
if env["speechd"]:
common_linuxbsd.append("tts_linux.cpp")
if env["use_sowrap"]:
common_linuxbsd.append("speechd-so_wrap.c")
if env["fontconfig"]:
if env["use_sowrap"]:
common_linuxbsd.append("fontconfig-so_wrap.c")
if env["dbus"]:
if env["use_sowrap"]:
common_linuxbsd.append("dbus-so_wrap.c")
prog = env.add_program("#bin/godot", ["godot_linuxbsd.cpp"] + common_linuxbsd)
if env["debug_symbols"] and env["separate_debug_symbols"]:
env.AddPostAction(prog, env.Run(platform_linuxbsd_builders.make_debug_linuxbsd))

View File

@@ -0,0 +1,190 @@
/**************************************************************************/
/* crash_handler_linuxbsd.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "crash_handler_linuxbsd.h"
#include "core/config/project_settings.h"
#include "core/object/script_language.h"
#include "core/os/os.h"
#include "core/string/print_string.h"
#include "core/version.h"
#include "main/main.h"
#ifndef DEBUG_ENABLED
#undef CRASH_HANDLER_ENABLED
#endif
#ifdef CRASH_HANDLER_ENABLED
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
#include <link.h>
#include <csignal>
#include <cstdlib>
static void handle_crash(int sig) {
signal(SIGSEGV, SIG_DFL);
signal(SIGFPE, SIG_DFL);
signal(SIGILL, SIG_DFL);
if (OS::get_singleton() == nullptr) {
abort();
}
if (OS::get_singleton()->is_crash_handler_silent()) {
std::_Exit(0);
}
void *bt_buffer[256];
size_t size = backtrace(bt_buffer, 256);
String _execpath = OS::get_singleton()->get_executable_path();
String msg;
if (ProjectSettings::get_singleton()) {
msg = GLOBAL_GET("debug/settings/crash_handler/message");
}
// Tell MainLoop about the crash. This can be handled by users too in Node.
if (OS::get_singleton()->get_main_loop()) {
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_CRASH);
}
// Dump the backtrace to stderr with a message to the user
print_error("\n================================================================");
print_error(vformat("%s: Program crashed with signal %d", __FUNCTION__, sig));
// Print the engine version just before, so that people are reminded to include the version in backtrace reports.
if (String(GODOT_VERSION_HASH).is_empty()) {
print_error(vformat("Engine version: %s", GODOT_VERSION_FULL_NAME));
} else {
print_error(vformat("Engine version: %s (%s)", GODOT_VERSION_FULL_NAME, GODOT_VERSION_HASH));
}
print_error(vformat("Dumping the backtrace. %s", msg));
char **strings = backtrace_symbols(bt_buffer, size);
// PIE executable relocation, zero for non-PIE executables
#ifdef __GLIBC__
// This is a glibc only thing apparently.
uintptr_t relocation = _r_debug.r_map->l_addr;
#else
// Non glibc systems apparently don't give PIE relocation info.
uintptr_t relocation = 0;
#endif //__GLIBC__
if (strings) {
List<String> args;
for (size_t i = 0; i < size; i++) {
char str[1024];
snprintf(str, 1024, "%p", (void *)((uintptr_t)bt_buffer[i] - relocation));
args.push_back(str);
}
args.push_back("-e");
args.push_back(_execpath);
// Try to get the file/line number using addr2line
int ret;
String output = "";
Error err = OS::get_singleton()->execute(String("addr2line"), args, &output, &ret);
Vector<String> addr2line_results;
if (err == OK) {
addr2line_results = output.substr(0, output.length() - 1).split("\n", false);
}
for (size_t i = 1; i < size; i++) {
char fname[1024];
Dl_info info;
snprintf(fname, 1024, "%s", strings[i]);
// Try to demangle the function name to provide a more readable one
if (dladdr(bt_buffer[i], &info) && info.dli_sname) {
if (info.dli_sname[0] == '_') {
int status = 0;
char *demangled = abi::__cxa_demangle(info.dli_sname, nullptr, nullptr, &status);
if (status == 0 && demangled) {
snprintf(fname, 1024, "%s", demangled);
}
if (demangled) {
free(demangled);
}
}
}
// Simplify printed file paths to remove redundant `/./` sections (e.g. `/opt/godot/./core` -> `/opt/godot/core`).
print_error(vformat("[%d] %s (%s)", (int64_t)i, fname, err == OK ? addr2line_results[i].replace("/./", "/") : ""));
}
free(strings);
}
print_error("-- END OF C++ BACKTRACE --");
print_error("================================================================");
for (const Ref<ScriptBacktrace> &backtrace : ScriptServer::capture_script_backtraces(false)) {
if (!backtrace->is_empty()) {
print_error(backtrace->format());
print_error(vformat("-- END OF %s BACKTRACE --", backtrace->get_language_name().to_upper()));
print_error("================================================================");
}
}
// Abort to pass the error to the OS
abort();
}
#endif
CrashHandler::CrashHandler() {
disabled = false;
}
CrashHandler::~CrashHandler() {
disable();
}
void CrashHandler::disable() {
if (disabled) {
return;
}
#ifdef CRASH_HANDLER_ENABLED
signal(SIGSEGV, SIG_DFL);
signal(SIGFPE, SIG_DFL);
signal(SIGILL, SIG_DFL);
#endif
disabled = true;
}
void CrashHandler::initialize() {
#ifdef CRASH_HANDLER_ENABLED
signal(SIGSEGV, handle_crash);
signal(SIGFPE, handle_crash);
signal(SIGILL, handle_crash);
#endif
}

View File

@@ -0,0 +1,44 @@
/**************************************************************************/
/* crash_handler_linuxbsd.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
class CrashHandler {
bool disabled;
public:
void initialize();
void disable();
bool is_disabled() const { return disabled; }
CrashHandler();
~CrashHandler();
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,970 @@
#ifndef DYLIBLOAD_WRAPPER_DBUS
#define DYLIBLOAD_WRAPPER_DBUS
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.3 on 2023-01-12 10:26:35
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/dbus/dbus.h --sys-include "thirdparty/linuxbsd_headers/dbus/dbus.h" --soname libdbus-1.so.3 --init-name dbus --output-header ./platform/linuxbsd/dbus-so_wrap.h --output-implementation ./platform/linuxbsd/dbus-so_wrap.c
//
#include <stdint.h>
#define dbus_error_init dbus_error_init_dylibloader_orig_dbus
#define dbus_error_free dbus_error_free_dylibloader_orig_dbus
#define dbus_set_error dbus_set_error_dylibloader_orig_dbus
#define dbus_set_error_const dbus_set_error_const_dylibloader_orig_dbus
#define dbus_move_error dbus_move_error_dylibloader_orig_dbus
#define dbus_error_has_name dbus_error_has_name_dylibloader_orig_dbus
#define dbus_error_is_set dbus_error_is_set_dylibloader_orig_dbus
#define dbus_parse_address dbus_parse_address_dylibloader_orig_dbus
#define dbus_address_entry_get_value dbus_address_entry_get_value_dylibloader_orig_dbus
#define dbus_address_entry_get_method dbus_address_entry_get_method_dylibloader_orig_dbus
#define dbus_address_entries_free dbus_address_entries_free_dylibloader_orig_dbus
#define dbus_address_escape_value dbus_address_escape_value_dylibloader_orig_dbus
#define dbus_address_unescape_value dbus_address_unescape_value_dylibloader_orig_dbus
#define dbus_malloc dbus_malloc_dylibloader_orig_dbus
#define dbus_malloc0 dbus_malloc0_dylibloader_orig_dbus
#define dbus_realloc dbus_realloc_dylibloader_orig_dbus
#define dbus_free dbus_free_dylibloader_orig_dbus
#define dbus_free_string_array dbus_free_string_array_dylibloader_orig_dbus
#define dbus_shutdown dbus_shutdown_dylibloader_orig_dbus
#define dbus_message_new dbus_message_new_dylibloader_orig_dbus
#define dbus_message_new_method_call dbus_message_new_method_call_dylibloader_orig_dbus
#define dbus_message_new_method_return dbus_message_new_method_return_dylibloader_orig_dbus
#define dbus_message_new_signal dbus_message_new_signal_dylibloader_orig_dbus
#define dbus_message_new_error dbus_message_new_error_dylibloader_orig_dbus
#define dbus_message_new_error_printf dbus_message_new_error_printf_dylibloader_orig_dbus
#define dbus_message_copy dbus_message_copy_dylibloader_orig_dbus
#define dbus_message_ref dbus_message_ref_dylibloader_orig_dbus
#define dbus_message_unref dbus_message_unref_dylibloader_orig_dbus
#define dbus_message_get_type dbus_message_get_type_dylibloader_orig_dbus
#define dbus_message_set_path dbus_message_set_path_dylibloader_orig_dbus
#define dbus_message_get_path dbus_message_get_path_dylibloader_orig_dbus
#define dbus_message_has_path dbus_message_has_path_dylibloader_orig_dbus
#define dbus_message_set_interface dbus_message_set_interface_dylibloader_orig_dbus
#define dbus_message_get_interface dbus_message_get_interface_dylibloader_orig_dbus
#define dbus_message_has_interface dbus_message_has_interface_dylibloader_orig_dbus
#define dbus_message_set_member dbus_message_set_member_dylibloader_orig_dbus
#define dbus_message_get_member dbus_message_get_member_dylibloader_orig_dbus
#define dbus_message_has_member dbus_message_has_member_dylibloader_orig_dbus
#define dbus_message_set_error_name dbus_message_set_error_name_dylibloader_orig_dbus
#define dbus_message_get_error_name dbus_message_get_error_name_dylibloader_orig_dbus
#define dbus_message_set_destination dbus_message_set_destination_dylibloader_orig_dbus
#define dbus_message_get_destination dbus_message_get_destination_dylibloader_orig_dbus
#define dbus_message_set_sender dbus_message_set_sender_dylibloader_orig_dbus
#define dbus_message_get_sender dbus_message_get_sender_dylibloader_orig_dbus
#define dbus_message_get_signature dbus_message_get_signature_dylibloader_orig_dbus
#define dbus_message_set_no_reply dbus_message_set_no_reply_dylibloader_orig_dbus
#define dbus_message_get_no_reply dbus_message_get_no_reply_dylibloader_orig_dbus
#define dbus_message_is_method_call dbus_message_is_method_call_dylibloader_orig_dbus
#define dbus_message_is_signal dbus_message_is_signal_dylibloader_orig_dbus
#define dbus_message_is_error dbus_message_is_error_dylibloader_orig_dbus
#define dbus_message_has_destination dbus_message_has_destination_dylibloader_orig_dbus
#define dbus_message_has_sender dbus_message_has_sender_dylibloader_orig_dbus
#define dbus_message_has_signature dbus_message_has_signature_dylibloader_orig_dbus
#define dbus_message_get_serial dbus_message_get_serial_dylibloader_orig_dbus
#define dbus_message_set_serial dbus_message_set_serial_dylibloader_orig_dbus
#define dbus_message_set_reply_serial dbus_message_set_reply_serial_dylibloader_orig_dbus
#define dbus_message_get_reply_serial dbus_message_get_reply_serial_dylibloader_orig_dbus
#define dbus_message_set_auto_start dbus_message_set_auto_start_dylibloader_orig_dbus
#define dbus_message_get_auto_start dbus_message_get_auto_start_dylibloader_orig_dbus
#define dbus_message_get_path_decomposed dbus_message_get_path_decomposed_dylibloader_orig_dbus
#define dbus_message_append_args dbus_message_append_args_dylibloader_orig_dbus
#define dbus_message_append_args_valist dbus_message_append_args_valist_dylibloader_orig_dbus
#define dbus_message_get_args dbus_message_get_args_dylibloader_orig_dbus
#define dbus_message_get_args_valist dbus_message_get_args_valist_dylibloader_orig_dbus
#define dbus_message_contains_unix_fds dbus_message_contains_unix_fds_dylibloader_orig_dbus
#define dbus_message_iter_init_closed dbus_message_iter_init_closed_dylibloader_orig_dbus
#define dbus_message_iter_init dbus_message_iter_init_dylibloader_orig_dbus
#define dbus_message_iter_has_next dbus_message_iter_has_next_dylibloader_orig_dbus
#define dbus_message_iter_next dbus_message_iter_next_dylibloader_orig_dbus
#define dbus_message_iter_get_signature dbus_message_iter_get_signature_dylibloader_orig_dbus
#define dbus_message_iter_get_arg_type dbus_message_iter_get_arg_type_dylibloader_orig_dbus
#define dbus_message_iter_get_element_type dbus_message_iter_get_element_type_dylibloader_orig_dbus
#define dbus_message_iter_recurse dbus_message_iter_recurse_dylibloader_orig_dbus
#define dbus_message_iter_get_basic dbus_message_iter_get_basic_dylibloader_orig_dbus
#define dbus_message_iter_get_element_count dbus_message_iter_get_element_count_dylibloader_orig_dbus
#define dbus_message_iter_get_array_len dbus_message_iter_get_array_len_dylibloader_orig_dbus
#define dbus_message_iter_get_fixed_array dbus_message_iter_get_fixed_array_dylibloader_orig_dbus
#define dbus_message_iter_init_append dbus_message_iter_init_append_dylibloader_orig_dbus
#define dbus_message_iter_append_basic dbus_message_iter_append_basic_dylibloader_orig_dbus
#define dbus_message_iter_append_fixed_array dbus_message_iter_append_fixed_array_dylibloader_orig_dbus
#define dbus_message_iter_open_container dbus_message_iter_open_container_dylibloader_orig_dbus
#define dbus_message_iter_close_container dbus_message_iter_close_container_dylibloader_orig_dbus
#define dbus_message_iter_abandon_container dbus_message_iter_abandon_container_dylibloader_orig_dbus
#define dbus_message_iter_abandon_container_if_open dbus_message_iter_abandon_container_if_open_dylibloader_orig_dbus
#define dbus_message_lock dbus_message_lock_dylibloader_orig_dbus
#define dbus_set_error_from_message dbus_set_error_from_message_dylibloader_orig_dbus
#define dbus_message_allocate_data_slot dbus_message_allocate_data_slot_dylibloader_orig_dbus
#define dbus_message_free_data_slot dbus_message_free_data_slot_dylibloader_orig_dbus
#define dbus_message_set_data dbus_message_set_data_dylibloader_orig_dbus
#define dbus_message_get_data dbus_message_get_data_dylibloader_orig_dbus
#define dbus_message_type_from_string dbus_message_type_from_string_dylibloader_orig_dbus
#define dbus_message_type_to_string dbus_message_type_to_string_dylibloader_orig_dbus
#define dbus_message_marshal dbus_message_marshal_dylibloader_orig_dbus
#define dbus_message_demarshal dbus_message_demarshal_dylibloader_orig_dbus
#define dbus_message_demarshal_bytes_needed dbus_message_demarshal_bytes_needed_dylibloader_orig_dbus
#define dbus_message_set_allow_interactive_authorization dbus_message_set_allow_interactive_authorization_dylibloader_orig_dbus
#define dbus_message_get_allow_interactive_authorization dbus_message_get_allow_interactive_authorization_dylibloader_orig_dbus
#define dbus_connection_open dbus_connection_open_dylibloader_orig_dbus
#define dbus_connection_open_private dbus_connection_open_private_dylibloader_orig_dbus
#define dbus_connection_ref dbus_connection_ref_dylibloader_orig_dbus
#define dbus_connection_unref dbus_connection_unref_dylibloader_orig_dbus
#define dbus_connection_close dbus_connection_close_dylibloader_orig_dbus
#define dbus_connection_get_is_connected dbus_connection_get_is_connected_dylibloader_orig_dbus
#define dbus_connection_get_is_authenticated dbus_connection_get_is_authenticated_dylibloader_orig_dbus
#define dbus_connection_get_is_anonymous dbus_connection_get_is_anonymous_dylibloader_orig_dbus
#define dbus_connection_get_server_id dbus_connection_get_server_id_dylibloader_orig_dbus
#define dbus_connection_can_send_type dbus_connection_can_send_type_dylibloader_orig_dbus
#define dbus_connection_set_exit_on_disconnect dbus_connection_set_exit_on_disconnect_dylibloader_orig_dbus
#define dbus_connection_flush dbus_connection_flush_dylibloader_orig_dbus
#define dbus_connection_read_write_dispatch dbus_connection_read_write_dispatch_dylibloader_orig_dbus
#define dbus_connection_read_write dbus_connection_read_write_dylibloader_orig_dbus
#define dbus_connection_borrow_message dbus_connection_borrow_message_dylibloader_orig_dbus
#define dbus_connection_return_message dbus_connection_return_message_dylibloader_orig_dbus
#define dbus_connection_steal_borrowed_message dbus_connection_steal_borrowed_message_dylibloader_orig_dbus
#define dbus_connection_pop_message dbus_connection_pop_message_dylibloader_orig_dbus
#define dbus_connection_get_dispatch_status dbus_connection_get_dispatch_status_dylibloader_orig_dbus
#define dbus_connection_dispatch dbus_connection_dispatch_dylibloader_orig_dbus
#define dbus_connection_has_messages_to_send dbus_connection_has_messages_to_send_dylibloader_orig_dbus
#define dbus_connection_send dbus_connection_send_dylibloader_orig_dbus
#define dbus_connection_send_with_reply dbus_connection_send_with_reply_dylibloader_orig_dbus
#define dbus_connection_send_with_reply_and_block dbus_connection_send_with_reply_and_block_dylibloader_orig_dbus
#define dbus_connection_set_watch_functions dbus_connection_set_watch_functions_dylibloader_orig_dbus
#define dbus_connection_set_timeout_functions dbus_connection_set_timeout_functions_dylibloader_orig_dbus
#define dbus_connection_set_wakeup_main_function dbus_connection_set_wakeup_main_function_dylibloader_orig_dbus
#define dbus_connection_set_dispatch_status_function dbus_connection_set_dispatch_status_function_dylibloader_orig_dbus
#define dbus_connection_get_unix_user dbus_connection_get_unix_user_dylibloader_orig_dbus
#define dbus_connection_get_unix_process_id dbus_connection_get_unix_process_id_dylibloader_orig_dbus
#define dbus_connection_get_adt_audit_session_data dbus_connection_get_adt_audit_session_data_dylibloader_orig_dbus
#define dbus_connection_set_unix_user_function dbus_connection_set_unix_user_function_dylibloader_orig_dbus
#define dbus_connection_get_windows_user dbus_connection_get_windows_user_dylibloader_orig_dbus
#define dbus_connection_set_windows_user_function dbus_connection_set_windows_user_function_dylibloader_orig_dbus
#define dbus_connection_set_allow_anonymous dbus_connection_set_allow_anonymous_dylibloader_orig_dbus
#define dbus_connection_set_route_peer_messages dbus_connection_set_route_peer_messages_dylibloader_orig_dbus
#define dbus_connection_add_filter dbus_connection_add_filter_dylibloader_orig_dbus
#define dbus_connection_remove_filter dbus_connection_remove_filter_dylibloader_orig_dbus
#define dbus_connection_allocate_data_slot dbus_connection_allocate_data_slot_dylibloader_orig_dbus
#define dbus_connection_free_data_slot dbus_connection_free_data_slot_dylibloader_orig_dbus
#define dbus_connection_set_data dbus_connection_set_data_dylibloader_orig_dbus
#define dbus_connection_get_data dbus_connection_get_data_dylibloader_orig_dbus
#define dbus_connection_set_change_sigpipe dbus_connection_set_change_sigpipe_dylibloader_orig_dbus
#define dbus_connection_set_max_message_size dbus_connection_set_max_message_size_dylibloader_orig_dbus
#define dbus_connection_get_max_message_size dbus_connection_get_max_message_size_dylibloader_orig_dbus
#define dbus_connection_set_max_received_size dbus_connection_set_max_received_size_dylibloader_orig_dbus
#define dbus_connection_get_max_received_size dbus_connection_get_max_received_size_dylibloader_orig_dbus
#define dbus_connection_set_max_message_unix_fds dbus_connection_set_max_message_unix_fds_dylibloader_orig_dbus
#define dbus_connection_get_max_message_unix_fds dbus_connection_get_max_message_unix_fds_dylibloader_orig_dbus
#define dbus_connection_set_max_received_unix_fds dbus_connection_set_max_received_unix_fds_dylibloader_orig_dbus
#define dbus_connection_get_max_received_unix_fds dbus_connection_get_max_received_unix_fds_dylibloader_orig_dbus
#define dbus_connection_get_outgoing_size dbus_connection_get_outgoing_size_dylibloader_orig_dbus
#define dbus_connection_get_outgoing_unix_fds dbus_connection_get_outgoing_unix_fds_dylibloader_orig_dbus
#define dbus_connection_preallocate_send dbus_connection_preallocate_send_dylibloader_orig_dbus
#define dbus_connection_free_preallocated_send dbus_connection_free_preallocated_send_dylibloader_orig_dbus
#define dbus_connection_send_preallocated dbus_connection_send_preallocated_dylibloader_orig_dbus
#define dbus_connection_try_register_object_path dbus_connection_try_register_object_path_dylibloader_orig_dbus
#define dbus_connection_register_object_path dbus_connection_register_object_path_dylibloader_orig_dbus
#define dbus_connection_try_register_fallback dbus_connection_try_register_fallback_dylibloader_orig_dbus
#define dbus_connection_register_fallback dbus_connection_register_fallback_dylibloader_orig_dbus
#define dbus_connection_unregister_object_path dbus_connection_unregister_object_path_dylibloader_orig_dbus
#define dbus_connection_get_object_path_data dbus_connection_get_object_path_data_dylibloader_orig_dbus
#define dbus_connection_list_registered dbus_connection_list_registered_dylibloader_orig_dbus
#define dbus_connection_get_unix_fd dbus_connection_get_unix_fd_dylibloader_orig_dbus
#define dbus_connection_get_socket dbus_connection_get_socket_dylibloader_orig_dbus
#define dbus_watch_get_fd dbus_watch_get_fd_dylibloader_orig_dbus
#define dbus_watch_get_unix_fd dbus_watch_get_unix_fd_dylibloader_orig_dbus
#define dbus_watch_get_socket dbus_watch_get_socket_dylibloader_orig_dbus
#define dbus_watch_get_flags dbus_watch_get_flags_dylibloader_orig_dbus
#define dbus_watch_get_data dbus_watch_get_data_dylibloader_orig_dbus
#define dbus_watch_set_data dbus_watch_set_data_dylibloader_orig_dbus
#define dbus_watch_handle dbus_watch_handle_dylibloader_orig_dbus
#define dbus_watch_get_enabled dbus_watch_get_enabled_dylibloader_orig_dbus
#define dbus_timeout_get_interval dbus_timeout_get_interval_dylibloader_orig_dbus
#define dbus_timeout_get_data dbus_timeout_get_data_dylibloader_orig_dbus
#define dbus_timeout_set_data dbus_timeout_set_data_dylibloader_orig_dbus
#define dbus_timeout_handle dbus_timeout_handle_dylibloader_orig_dbus
#define dbus_timeout_get_enabled dbus_timeout_get_enabled_dylibloader_orig_dbus
#define dbus_bus_get dbus_bus_get_dylibloader_orig_dbus
#define dbus_bus_get_private dbus_bus_get_private_dylibloader_orig_dbus
#define dbus_bus_register dbus_bus_register_dylibloader_orig_dbus
#define dbus_bus_set_unique_name dbus_bus_set_unique_name_dylibloader_orig_dbus
#define dbus_bus_get_unique_name dbus_bus_get_unique_name_dylibloader_orig_dbus
#define dbus_bus_get_unix_user dbus_bus_get_unix_user_dylibloader_orig_dbus
#define dbus_bus_get_id dbus_bus_get_id_dylibloader_orig_dbus
#define dbus_bus_request_name dbus_bus_request_name_dylibloader_orig_dbus
#define dbus_bus_release_name dbus_bus_release_name_dylibloader_orig_dbus
#define dbus_bus_name_has_owner dbus_bus_name_has_owner_dylibloader_orig_dbus
#define dbus_bus_start_service_by_name dbus_bus_start_service_by_name_dylibloader_orig_dbus
#define dbus_bus_add_match dbus_bus_add_match_dylibloader_orig_dbus
#define dbus_bus_remove_match dbus_bus_remove_match_dylibloader_orig_dbus
#define dbus_get_local_machine_id dbus_get_local_machine_id_dylibloader_orig_dbus
#define dbus_get_version dbus_get_version_dylibloader_orig_dbus
#define dbus_setenv dbus_setenv_dylibloader_orig_dbus
#define dbus_try_get_local_machine_id dbus_try_get_local_machine_id_dylibloader_orig_dbus
#define dbus_pending_call_ref dbus_pending_call_ref_dylibloader_orig_dbus
#define dbus_pending_call_unref dbus_pending_call_unref_dylibloader_orig_dbus
#define dbus_pending_call_set_notify dbus_pending_call_set_notify_dylibloader_orig_dbus
#define dbus_pending_call_cancel dbus_pending_call_cancel_dylibloader_orig_dbus
#define dbus_pending_call_get_completed dbus_pending_call_get_completed_dylibloader_orig_dbus
#define dbus_pending_call_steal_reply dbus_pending_call_steal_reply_dylibloader_orig_dbus
#define dbus_pending_call_block dbus_pending_call_block_dylibloader_orig_dbus
#define dbus_pending_call_allocate_data_slot dbus_pending_call_allocate_data_slot_dylibloader_orig_dbus
#define dbus_pending_call_free_data_slot dbus_pending_call_free_data_slot_dylibloader_orig_dbus
#define dbus_pending_call_set_data dbus_pending_call_set_data_dylibloader_orig_dbus
#define dbus_pending_call_get_data dbus_pending_call_get_data_dylibloader_orig_dbus
#define dbus_server_listen dbus_server_listen_dylibloader_orig_dbus
#define dbus_server_ref dbus_server_ref_dylibloader_orig_dbus
#define dbus_server_unref dbus_server_unref_dylibloader_orig_dbus
#define dbus_server_disconnect dbus_server_disconnect_dylibloader_orig_dbus
#define dbus_server_get_is_connected dbus_server_get_is_connected_dylibloader_orig_dbus
#define dbus_server_get_address dbus_server_get_address_dylibloader_orig_dbus
#define dbus_server_get_id dbus_server_get_id_dylibloader_orig_dbus
#define dbus_server_set_new_connection_function dbus_server_set_new_connection_function_dylibloader_orig_dbus
#define dbus_server_set_watch_functions dbus_server_set_watch_functions_dylibloader_orig_dbus
#define dbus_server_set_timeout_functions dbus_server_set_timeout_functions_dylibloader_orig_dbus
#define dbus_server_set_auth_mechanisms dbus_server_set_auth_mechanisms_dylibloader_orig_dbus
#define dbus_server_allocate_data_slot dbus_server_allocate_data_slot_dylibloader_orig_dbus
#define dbus_server_free_data_slot dbus_server_free_data_slot_dylibloader_orig_dbus
#define dbus_server_set_data dbus_server_set_data_dylibloader_orig_dbus
#define dbus_server_get_data dbus_server_get_data_dylibloader_orig_dbus
#define dbus_signature_iter_init dbus_signature_iter_init_dylibloader_orig_dbus
#define dbus_signature_iter_get_current_type dbus_signature_iter_get_current_type_dylibloader_orig_dbus
#define dbus_signature_iter_get_signature dbus_signature_iter_get_signature_dylibloader_orig_dbus
#define dbus_signature_iter_get_element_type dbus_signature_iter_get_element_type_dylibloader_orig_dbus
#define dbus_signature_iter_next dbus_signature_iter_next_dylibloader_orig_dbus
#define dbus_signature_iter_recurse dbus_signature_iter_recurse_dylibloader_orig_dbus
#define dbus_signature_validate dbus_signature_validate_dylibloader_orig_dbus
#define dbus_signature_validate_single dbus_signature_validate_single_dylibloader_orig_dbus
#define dbus_type_is_valid dbus_type_is_valid_dylibloader_orig_dbus
#define dbus_type_is_basic dbus_type_is_basic_dylibloader_orig_dbus
#define dbus_type_is_container dbus_type_is_container_dylibloader_orig_dbus
#define dbus_type_is_fixed dbus_type_is_fixed_dylibloader_orig_dbus
#define dbus_validate_path dbus_validate_path_dylibloader_orig_dbus
#define dbus_validate_interface dbus_validate_interface_dylibloader_orig_dbus
#define dbus_validate_member dbus_validate_member_dylibloader_orig_dbus
#define dbus_validate_error_name dbus_validate_error_name_dylibloader_orig_dbus
#define dbus_validate_bus_name dbus_validate_bus_name_dylibloader_orig_dbus
#define dbus_validate_utf8 dbus_validate_utf8_dylibloader_orig_dbus
#define dbus_threads_init dbus_threads_init_dylibloader_orig_dbus
#define dbus_threads_init_default dbus_threads_init_default_dylibloader_orig_dbus
#include "thirdparty/linuxbsd_headers/dbus/dbus.h"
#undef dbus_error_init
#undef dbus_error_free
#undef dbus_set_error
#undef dbus_set_error_const
#undef dbus_move_error
#undef dbus_error_has_name
#undef dbus_error_is_set
#undef dbus_parse_address
#undef dbus_address_entry_get_value
#undef dbus_address_entry_get_method
#undef dbus_address_entries_free
#undef dbus_address_escape_value
#undef dbus_address_unescape_value
#undef dbus_malloc
#undef dbus_malloc0
#undef dbus_realloc
#undef dbus_free
#undef dbus_free_string_array
#undef dbus_shutdown
#undef dbus_message_new
#undef dbus_message_new_method_call
#undef dbus_message_new_method_return
#undef dbus_message_new_signal
#undef dbus_message_new_error
#undef dbus_message_new_error_printf
#undef dbus_message_copy
#undef dbus_message_ref
#undef dbus_message_unref
#undef dbus_message_get_type
#undef dbus_message_set_path
#undef dbus_message_get_path
#undef dbus_message_has_path
#undef dbus_message_set_interface
#undef dbus_message_get_interface
#undef dbus_message_has_interface
#undef dbus_message_set_member
#undef dbus_message_get_member
#undef dbus_message_has_member
#undef dbus_message_set_error_name
#undef dbus_message_get_error_name
#undef dbus_message_set_destination
#undef dbus_message_get_destination
#undef dbus_message_set_sender
#undef dbus_message_get_sender
#undef dbus_message_get_signature
#undef dbus_message_set_no_reply
#undef dbus_message_get_no_reply
#undef dbus_message_is_method_call
#undef dbus_message_is_signal
#undef dbus_message_is_error
#undef dbus_message_has_destination
#undef dbus_message_has_sender
#undef dbus_message_has_signature
#undef dbus_message_get_serial
#undef dbus_message_set_serial
#undef dbus_message_set_reply_serial
#undef dbus_message_get_reply_serial
#undef dbus_message_set_auto_start
#undef dbus_message_get_auto_start
#undef dbus_message_get_path_decomposed
#undef dbus_message_append_args
#undef dbus_message_append_args_valist
#undef dbus_message_get_args
#undef dbus_message_get_args_valist
#undef dbus_message_contains_unix_fds
#undef dbus_message_iter_init_closed
#undef dbus_message_iter_init
#undef dbus_message_iter_has_next
#undef dbus_message_iter_next
#undef dbus_message_iter_get_signature
#undef dbus_message_iter_get_arg_type
#undef dbus_message_iter_get_element_type
#undef dbus_message_iter_recurse
#undef dbus_message_iter_get_basic
#undef dbus_message_iter_get_element_count
#undef dbus_message_iter_get_array_len
#undef dbus_message_iter_get_fixed_array
#undef dbus_message_iter_init_append
#undef dbus_message_iter_append_basic
#undef dbus_message_iter_append_fixed_array
#undef dbus_message_iter_open_container
#undef dbus_message_iter_close_container
#undef dbus_message_iter_abandon_container
#undef dbus_message_iter_abandon_container_if_open
#undef dbus_message_lock
#undef dbus_set_error_from_message
#undef dbus_message_allocate_data_slot
#undef dbus_message_free_data_slot
#undef dbus_message_set_data
#undef dbus_message_get_data
#undef dbus_message_type_from_string
#undef dbus_message_type_to_string
#undef dbus_message_marshal
#undef dbus_message_demarshal
#undef dbus_message_demarshal_bytes_needed
#undef dbus_message_set_allow_interactive_authorization
#undef dbus_message_get_allow_interactive_authorization
#undef dbus_connection_open
#undef dbus_connection_open_private
#undef dbus_connection_ref
#undef dbus_connection_unref
#undef dbus_connection_close
#undef dbus_connection_get_is_connected
#undef dbus_connection_get_is_authenticated
#undef dbus_connection_get_is_anonymous
#undef dbus_connection_get_server_id
#undef dbus_connection_can_send_type
#undef dbus_connection_set_exit_on_disconnect
#undef dbus_connection_flush
#undef dbus_connection_read_write_dispatch
#undef dbus_connection_read_write
#undef dbus_connection_borrow_message
#undef dbus_connection_return_message
#undef dbus_connection_steal_borrowed_message
#undef dbus_connection_pop_message
#undef dbus_connection_get_dispatch_status
#undef dbus_connection_dispatch
#undef dbus_connection_has_messages_to_send
#undef dbus_connection_send
#undef dbus_connection_send_with_reply
#undef dbus_connection_send_with_reply_and_block
#undef dbus_connection_set_watch_functions
#undef dbus_connection_set_timeout_functions
#undef dbus_connection_set_wakeup_main_function
#undef dbus_connection_set_dispatch_status_function
#undef dbus_connection_get_unix_user
#undef dbus_connection_get_unix_process_id
#undef dbus_connection_get_adt_audit_session_data
#undef dbus_connection_set_unix_user_function
#undef dbus_connection_get_windows_user
#undef dbus_connection_set_windows_user_function
#undef dbus_connection_set_allow_anonymous
#undef dbus_connection_set_route_peer_messages
#undef dbus_connection_add_filter
#undef dbus_connection_remove_filter
#undef dbus_connection_allocate_data_slot
#undef dbus_connection_free_data_slot
#undef dbus_connection_set_data
#undef dbus_connection_get_data
#undef dbus_connection_set_change_sigpipe
#undef dbus_connection_set_max_message_size
#undef dbus_connection_get_max_message_size
#undef dbus_connection_set_max_received_size
#undef dbus_connection_get_max_received_size
#undef dbus_connection_set_max_message_unix_fds
#undef dbus_connection_get_max_message_unix_fds
#undef dbus_connection_set_max_received_unix_fds
#undef dbus_connection_get_max_received_unix_fds
#undef dbus_connection_get_outgoing_size
#undef dbus_connection_get_outgoing_unix_fds
#undef dbus_connection_preallocate_send
#undef dbus_connection_free_preallocated_send
#undef dbus_connection_send_preallocated
#undef dbus_connection_try_register_object_path
#undef dbus_connection_register_object_path
#undef dbus_connection_try_register_fallback
#undef dbus_connection_register_fallback
#undef dbus_connection_unregister_object_path
#undef dbus_connection_get_object_path_data
#undef dbus_connection_list_registered
#undef dbus_connection_get_unix_fd
#undef dbus_connection_get_socket
#undef dbus_watch_get_fd
#undef dbus_watch_get_unix_fd
#undef dbus_watch_get_socket
#undef dbus_watch_get_flags
#undef dbus_watch_get_data
#undef dbus_watch_set_data
#undef dbus_watch_handle
#undef dbus_watch_get_enabled
#undef dbus_timeout_get_interval
#undef dbus_timeout_get_data
#undef dbus_timeout_set_data
#undef dbus_timeout_handle
#undef dbus_timeout_get_enabled
#undef dbus_bus_get
#undef dbus_bus_get_private
#undef dbus_bus_register
#undef dbus_bus_set_unique_name
#undef dbus_bus_get_unique_name
#undef dbus_bus_get_unix_user
#undef dbus_bus_get_id
#undef dbus_bus_request_name
#undef dbus_bus_release_name
#undef dbus_bus_name_has_owner
#undef dbus_bus_start_service_by_name
#undef dbus_bus_add_match
#undef dbus_bus_remove_match
#undef dbus_get_local_machine_id
#undef dbus_get_version
#undef dbus_setenv
#undef dbus_try_get_local_machine_id
#undef dbus_pending_call_ref
#undef dbus_pending_call_unref
#undef dbus_pending_call_set_notify
#undef dbus_pending_call_cancel
#undef dbus_pending_call_get_completed
#undef dbus_pending_call_steal_reply
#undef dbus_pending_call_block
#undef dbus_pending_call_allocate_data_slot
#undef dbus_pending_call_free_data_slot
#undef dbus_pending_call_set_data
#undef dbus_pending_call_get_data
#undef dbus_server_listen
#undef dbus_server_ref
#undef dbus_server_unref
#undef dbus_server_disconnect
#undef dbus_server_get_is_connected
#undef dbus_server_get_address
#undef dbus_server_get_id
#undef dbus_server_set_new_connection_function
#undef dbus_server_set_watch_functions
#undef dbus_server_set_timeout_functions
#undef dbus_server_set_auth_mechanisms
#undef dbus_server_allocate_data_slot
#undef dbus_server_free_data_slot
#undef dbus_server_set_data
#undef dbus_server_get_data
#undef dbus_signature_iter_init
#undef dbus_signature_iter_get_current_type
#undef dbus_signature_iter_get_signature
#undef dbus_signature_iter_get_element_type
#undef dbus_signature_iter_next
#undef dbus_signature_iter_recurse
#undef dbus_signature_validate
#undef dbus_signature_validate_single
#undef dbus_type_is_valid
#undef dbus_type_is_basic
#undef dbus_type_is_container
#undef dbus_type_is_fixed
#undef dbus_validate_path
#undef dbus_validate_interface
#undef dbus_validate_member
#undef dbus_validate_error_name
#undef dbus_validate_bus_name
#undef dbus_validate_utf8
#undef dbus_threads_init
#undef dbus_threads_init_default
#ifdef __cplusplus
extern "C" {
#endif
#define dbus_error_init dbus_error_init_dylibloader_wrapper_dbus
#define dbus_error_free dbus_error_free_dylibloader_wrapper_dbus
#define dbus_set_error dbus_set_error_dylibloader_wrapper_dbus
#define dbus_set_error_const dbus_set_error_const_dylibloader_wrapper_dbus
#define dbus_move_error dbus_move_error_dylibloader_wrapper_dbus
#define dbus_error_has_name dbus_error_has_name_dylibloader_wrapper_dbus
#define dbus_error_is_set dbus_error_is_set_dylibloader_wrapper_dbus
#define dbus_parse_address dbus_parse_address_dylibloader_wrapper_dbus
#define dbus_address_entry_get_value dbus_address_entry_get_value_dylibloader_wrapper_dbus
#define dbus_address_entry_get_method dbus_address_entry_get_method_dylibloader_wrapper_dbus
#define dbus_address_entries_free dbus_address_entries_free_dylibloader_wrapper_dbus
#define dbus_address_escape_value dbus_address_escape_value_dylibloader_wrapper_dbus
#define dbus_address_unescape_value dbus_address_unescape_value_dylibloader_wrapper_dbus
#define dbus_malloc dbus_malloc_dylibloader_wrapper_dbus
#define dbus_malloc0 dbus_malloc0_dylibloader_wrapper_dbus
#define dbus_realloc dbus_realloc_dylibloader_wrapper_dbus
#define dbus_free dbus_free_dylibloader_wrapper_dbus
#define dbus_free_string_array dbus_free_string_array_dylibloader_wrapper_dbus
#define dbus_shutdown dbus_shutdown_dylibloader_wrapper_dbus
#define dbus_message_new dbus_message_new_dylibloader_wrapper_dbus
#define dbus_message_new_method_call dbus_message_new_method_call_dylibloader_wrapper_dbus
#define dbus_message_new_method_return dbus_message_new_method_return_dylibloader_wrapper_dbus
#define dbus_message_new_signal dbus_message_new_signal_dylibloader_wrapper_dbus
#define dbus_message_new_error dbus_message_new_error_dylibloader_wrapper_dbus
#define dbus_message_new_error_printf dbus_message_new_error_printf_dylibloader_wrapper_dbus
#define dbus_message_copy dbus_message_copy_dylibloader_wrapper_dbus
#define dbus_message_ref dbus_message_ref_dylibloader_wrapper_dbus
#define dbus_message_unref dbus_message_unref_dylibloader_wrapper_dbus
#define dbus_message_get_type dbus_message_get_type_dylibloader_wrapper_dbus
#define dbus_message_set_path dbus_message_set_path_dylibloader_wrapper_dbus
#define dbus_message_get_path dbus_message_get_path_dylibloader_wrapper_dbus
#define dbus_message_has_path dbus_message_has_path_dylibloader_wrapper_dbus
#define dbus_message_set_interface dbus_message_set_interface_dylibloader_wrapper_dbus
#define dbus_message_get_interface dbus_message_get_interface_dylibloader_wrapper_dbus
#define dbus_message_has_interface dbus_message_has_interface_dylibloader_wrapper_dbus
#define dbus_message_set_member dbus_message_set_member_dylibloader_wrapper_dbus
#define dbus_message_get_member dbus_message_get_member_dylibloader_wrapper_dbus
#define dbus_message_has_member dbus_message_has_member_dylibloader_wrapper_dbus
#define dbus_message_set_error_name dbus_message_set_error_name_dylibloader_wrapper_dbus
#define dbus_message_get_error_name dbus_message_get_error_name_dylibloader_wrapper_dbus
#define dbus_message_set_destination dbus_message_set_destination_dylibloader_wrapper_dbus
#define dbus_message_get_destination dbus_message_get_destination_dylibloader_wrapper_dbus
#define dbus_message_set_sender dbus_message_set_sender_dylibloader_wrapper_dbus
#define dbus_message_get_sender dbus_message_get_sender_dylibloader_wrapper_dbus
#define dbus_message_get_signature dbus_message_get_signature_dylibloader_wrapper_dbus
#define dbus_message_set_no_reply dbus_message_set_no_reply_dylibloader_wrapper_dbus
#define dbus_message_get_no_reply dbus_message_get_no_reply_dylibloader_wrapper_dbus
#define dbus_message_is_method_call dbus_message_is_method_call_dylibloader_wrapper_dbus
#define dbus_message_is_signal dbus_message_is_signal_dylibloader_wrapper_dbus
#define dbus_message_is_error dbus_message_is_error_dylibloader_wrapper_dbus
#define dbus_message_has_destination dbus_message_has_destination_dylibloader_wrapper_dbus
#define dbus_message_has_sender dbus_message_has_sender_dylibloader_wrapper_dbus
#define dbus_message_has_signature dbus_message_has_signature_dylibloader_wrapper_dbus
#define dbus_message_get_serial dbus_message_get_serial_dylibloader_wrapper_dbus
#define dbus_message_set_serial dbus_message_set_serial_dylibloader_wrapper_dbus
#define dbus_message_set_reply_serial dbus_message_set_reply_serial_dylibloader_wrapper_dbus
#define dbus_message_get_reply_serial dbus_message_get_reply_serial_dylibloader_wrapper_dbus
#define dbus_message_set_auto_start dbus_message_set_auto_start_dylibloader_wrapper_dbus
#define dbus_message_get_auto_start dbus_message_get_auto_start_dylibloader_wrapper_dbus
#define dbus_message_get_path_decomposed dbus_message_get_path_decomposed_dylibloader_wrapper_dbus
#define dbus_message_append_args dbus_message_append_args_dylibloader_wrapper_dbus
#define dbus_message_append_args_valist dbus_message_append_args_valist_dylibloader_wrapper_dbus
#define dbus_message_get_args dbus_message_get_args_dylibloader_wrapper_dbus
#define dbus_message_get_args_valist dbus_message_get_args_valist_dylibloader_wrapper_dbus
#define dbus_message_contains_unix_fds dbus_message_contains_unix_fds_dylibloader_wrapper_dbus
#define dbus_message_iter_init_closed dbus_message_iter_init_closed_dylibloader_wrapper_dbus
#define dbus_message_iter_init dbus_message_iter_init_dylibloader_wrapper_dbus
#define dbus_message_iter_has_next dbus_message_iter_has_next_dylibloader_wrapper_dbus
#define dbus_message_iter_next dbus_message_iter_next_dylibloader_wrapper_dbus
#define dbus_message_iter_get_signature dbus_message_iter_get_signature_dylibloader_wrapper_dbus
#define dbus_message_iter_get_arg_type dbus_message_iter_get_arg_type_dylibloader_wrapper_dbus
#define dbus_message_iter_get_element_type dbus_message_iter_get_element_type_dylibloader_wrapper_dbus
#define dbus_message_iter_recurse dbus_message_iter_recurse_dylibloader_wrapper_dbus
#define dbus_message_iter_get_basic dbus_message_iter_get_basic_dylibloader_wrapper_dbus
#define dbus_message_iter_get_element_count dbus_message_iter_get_element_count_dylibloader_wrapper_dbus
#define dbus_message_iter_get_array_len dbus_message_iter_get_array_len_dylibloader_wrapper_dbus
#define dbus_message_iter_get_fixed_array dbus_message_iter_get_fixed_array_dylibloader_wrapper_dbus
#define dbus_message_iter_init_append dbus_message_iter_init_append_dylibloader_wrapper_dbus
#define dbus_message_iter_append_basic dbus_message_iter_append_basic_dylibloader_wrapper_dbus
#define dbus_message_iter_append_fixed_array dbus_message_iter_append_fixed_array_dylibloader_wrapper_dbus
#define dbus_message_iter_open_container dbus_message_iter_open_container_dylibloader_wrapper_dbus
#define dbus_message_iter_close_container dbus_message_iter_close_container_dylibloader_wrapper_dbus
#define dbus_message_iter_abandon_container dbus_message_iter_abandon_container_dylibloader_wrapper_dbus
#define dbus_message_iter_abandon_container_if_open dbus_message_iter_abandon_container_if_open_dylibloader_wrapper_dbus
#define dbus_message_lock dbus_message_lock_dylibloader_wrapper_dbus
#define dbus_set_error_from_message dbus_set_error_from_message_dylibloader_wrapper_dbus
#define dbus_message_allocate_data_slot dbus_message_allocate_data_slot_dylibloader_wrapper_dbus
#define dbus_message_free_data_slot dbus_message_free_data_slot_dylibloader_wrapper_dbus
#define dbus_message_set_data dbus_message_set_data_dylibloader_wrapper_dbus
#define dbus_message_get_data dbus_message_get_data_dylibloader_wrapper_dbus
#define dbus_message_type_from_string dbus_message_type_from_string_dylibloader_wrapper_dbus
#define dbus_message_type_to_string dbus_message_type_to_string_dylibloader_wrapper_dbus
#define dbus_message_marshal dbus_message_marshal_dylibloader_wrapper_dbus
#define dbus_message_demarshal dbus_message_demarshal_dylibloader_wrapper_dbus
#define dbus_message_demarshal_bytes_needed dbus_message_demarshal_bytes_needed_dylibloader_wrapper_dbus
#define dbus_message_set_allow_interactive_authorization dbus_message_set_allow_interactive_authorization_dylibloader_wrapper_dbus
#define dbus_message_get_allow_interactive_authorization dbus_message_get_allow_interactive_authorization_dylibloader_wrapper_dbus
#define dbus_connection_open dbus_connection_open_dylibloader_wrapper_dbus
#define dbus_connection_open_private dbus_connection_open_private_dylibloader_wrapper_dbus
#define dbus_connection_ref dbus_connection_ref_dylibloader_wrapper_dbus
#define dbus_connection_unref dbus_connection_unref_dylibloader_wrapper_dbus
#define dbus_connection_close dbus_connection_close_dylibloader_wrapper_dbus
#define dbus_connection_get_is_connected dbus_connection_get_is_connected_dylibloader_wrapper_dbus
#define dbus_connection_get_is_authenticated dbus_connection_get_is_authenticated_dylibloader_wrapper_dbus
#define dbus_connection_get_is_anonymous dbus_connection_get_is_anonymous_dylibloader_wrapper_dbus
#define dbus_connection_get_server_id dbus_connection_get_server_id_dylibloader_wrapper_dbus
#define dbus_connection_can_send_type dbus_connection_can_send_type_dylibloader_wrapper_dbus
#define dbus_connection_set_exit_on_disconnect dbus_connection_set_exit_on_disconnect_dylibloader_wrapper_dbus
#define dbus_connection_flush dbus_connection_flush_dylibloader_wrapper_dbus
#define dbus_connection_read_write_dispatch dbus_connection_read_write_dispatch_dylibloader_wrapper_dbus
#define dbus_connection_read_write dbus_connection_read_write_dylibloader_wrapper_dbus
#define dbus_connection_borrow_message dbus_connection_borrow_message_dylibloader_wrapper_dbus
#define dbus_connection_return_message dbus_connection_return_message_dylibloader_wrapper_dbus
#define dbus_connection_steal_borrowed_message dbus_connection_steal_borrowed_message_dylibloader_wrapper_dbus
#define dbus_connection_pop_message dbus_connection_pop_message_dylibloader_wrapper_dbus
#define dbus_connection_get_dispatch_status dbus_connection_get_dispatch_status_dylibloader_wrapper_dbus
#define dbus_connection_dispatch dbus_connection_dispatch_dylibloader_wrapper_dbus
#define dbus_connection_has_messages_to_send dbus_connection_has_messages_to_send_dylibloader_wrapper_dbus
#define dbus_connection_send dbus_connection_send_dylibloader_wrapper_dbus
#define dbus_connection_send_with_reply dbus_connection_send_with_reply_dylibloader_wrapper_dbus
#define dbus_connection_send_with_reply_and_block dbus_connection_send_with_reply_and_block_dylibloader_wrapper_dbus
#define dbus_connection_set_watch_functions dbus_connection_set_watch_functions_dylibloader_wrapper_dbus
#define dbus_connection_set_timeout_functions dbus_connection_set_timeout_functions_dylibloader_wrapper_dbus
#define dbus_connection_set_wakeup_main_function dbus_connection_set_wakeup_main_function_dylibloader_wrapper_dbus
#define dbus_connection_set_dispatch_status_function dbus_connection_set_dispatch_status_function_dylibloader_wrapper_dbus
#define dbus_connection_get_unix_user dbus_connection_get_unix_user_dylibloader_wrapper_dbus
#define dbus_connection_get_unix_process_id dbus_connection_get_unix_process_id_dylibloader_wrapper_dbus
#define dbus_connection_get_adt_audit_session_data dbus_connection_get_adt_audit_session_data_dylibloader_wrapper_dbus
#define dbus_connection_set_unix_user_function dbus_connection_set_unix_user_function_dylibloader_wrapper_dbus
#define dbus_connection_get_windows_user dbus_connection_get_windows_user_dylibloader_wrapper_dbus
#define dbus_connection_set_windows_user_function dbus_connection_set_windows_user_function_dylibloader_wrapper_dbus
#define dbus_connection_set_allow_anonymous dbus_connection_set_allow_anonymous_dylibloader_wrapper_dbus
#define dbus_connection_set_route_peer_messages dbus_connection_set_route_peer_messages_dylibloader_wrapper_dbus
#define dbus_connection_add_filter dbus_connection_add_filter_dylibloader_wrapper_dbus
#define dbus_connection_remove_filter dbus_connection_remove_filter_dylibloader_wrapper_dbus
#define dbus_connection_allocate_data_slot dbus_connection_allocate_data_slot_dylibloader_wrapper_dbus
#define dbus_connection_free_data_slot dbus_connection_free_data_slot_dylibloader_wrapper_dbus
#define dbus_connection_set_data dbus_connection_set_data_dylibloader_wrapper_dbus
#define dbus_connection_get_data dbus_connection_get_data_dylibloader_wrapper_dbus
#define dbus_connection_set_change_sigpipe dbus_connection_set_change_sigpipe_dylibloader_wrapper_dbus
#define dbus_connection_set_max_message_size dbus_connection_set_max_message_size_dylibloader_wrapper_dbus
#define dbus_connection_get_max_message_size dbus_connection_get_max_message_size_dylibloader_wrapper_dbus
#define dbus_connection_set_max_received_size dbus_connection_set_max_received_size_dylibloader_wrapper_dbus
#define dbus_connection_get_max_received_size dbus_connection_get_max_received_size_dylibloader_wrapper_dbus
#define dbus_connection_set_max_message_unix_fds dbus_connection_set_max_message_unix_fds_dylibloader_wrapper_dbus
#define dbus_connection_get_max_message_unix_fds dbus_connection_get_max_message_unix_fds_dylibloader_wrapper_dbus
#define dbus_connection_set_max_received_unix_fds dbus_connection_set_max_received_unix_fds_dylibloader_wrapper_dbus
#define dbus_connection_get_max_received_unix_fds dbus_connection_get_max_received_unix_fds_dylibloader_wrapper_dbus
#define dbus_connection_get_outgoing_size dbus_connection_get_outgoing_size_dylibloader_wrapper_dbus
#define dbus_connection_get_outgoing_unix_fds dbus_connection_get_outgoing_unix_fds_dylibloader_wrapper_dbus
#define dbus_connection_preallocate_send dbus_connection_preallocate_send_dylibloader_wrapper_dbus
#define dbus_connection_free_preallocated_send dbus_connection_free_preallocated_send_dylibloader_wrapper_dbus
#define dbus_connection_send_preallocated dbus_connection_send_preallocated_dylibloader_wrapper_dbus
#define dbus_connection_try_register_object_path dbus_connection_try_register_object_path_dylibloader_wrapper_dbus
#define dbus_connection_register_object_path dbus_connection_register_object_path_dylibloader_wrapper_dbus
#define dbus_connection_try_register_fallback dbus_connection_try_register_fallback_dylibloader_wrapper_dbus
#define dbus_connection_register_fallback dbus_connection_register_fallback_dylibloader_wrapper_dbus
#define dbus_connection_unregister_object_path dbus_connection_unregister_object_path_dylibloader_wrapper_dbus
#define dbus_connection_get_object_path_data dbus_connection_get_object_path_data_dylibloader_wrapper_dbus
#define dbus_connection_list_registered dbus_connection_list_registered_dylibloader_wrapper_dbus
#define dbus_connection_get_unix_fd dbus_connection_get_unix_fd_dylibloader_wrapper_dbus
#define dbus_connection_get_socket dbus_connection_get_socket_dylibloader_wrapper_dbus
#define dbus_watch_get_fd dbus_watch_get_fd_dylibloader_wrapper_dbus
#define dbus_watch_get_unix_fd dbus_watch_get_unix_fd_dylibloader_wrapper_dbus
#define dbus_watch_get_socket dbus_watch_get_socket_dylibloader_wrapper_dbus
#define dbus_watch_get_flags dbus_watch_get_flags_dylibloader_wrapper_dbus
#define dbus_watch_get_data dbus_watch_get_data_dylibloader_wrapper_dbus
#define dbus_watch_set_data dbus_watch_set_data_dylibloader_wrapper_dbus
#define dbus_watch_handle dbus_watch_handle_dylibloader_wrapper_dbus
#define dbus_watch_get_enabled dbus_watch_get_enabled_dylibloader_wrapper_dbus
#define dbus_timeout_get_interval dbus_timeout_get_interval_dylibloader_wrapper_dbus
#define dbus_timeout_get_data dbus_timeout_get_data_dylibloader_wrapper_dbus
#define dbus_timeout_set_data dbus_timeout_set_data_dylibloader_wrapper_dbus
#define dbus_timeout_handle dbus_timeout_handle_dylibloader_wrapper_dbus
#define dbus_timeout_get_enabled dbus_timeout_get_enabled_dylibloader_wrapper_dbus
#define dbus_bus_get dbus_bus_get_dylibloader_wrapper_dbus
#define dbus_bus_get_private dbus_bus_get_private_dylibloader_wrapper_dbus
#define dbus_bus_register dbus_bus_register_dylibloader_wrapper_dbus
#define dbus_bus_set_unique_name dbus_bus_set_unique_name_dylibloader_wrapper_dbus
#define dbus_bus_get_unique_name dbus_bus_get_unique_name_dylibloader_wrapper_dbus
#define dbus_bus_get_unix_user dbus_bus_get_unix_user_dylibloader_wrapper_dbus
#define dbus_bus_get_id dbus_bus_get_id_dylibloader_wrapper_dbus
#define dbus_bus_request_name dbus_bus_request_name_dylibloader_wrapper_dbus
#define dbus_bus_release_name dbus_bus_release_name_dylibloader_wrapper_dbus
#define dbus_bus_name_has_owner dbus_bus_name_has_owner_dylibloader_wrapper_dbus
#define dbus_bus_start_service_by_name dbus_bus_start_service_by_name_dylibloader_wrapper_dbus
#define dbus_bus_add_match dbus_bus_add_match_dylibloader_wrapper_dbus
#define dbus_bus_remove_match dbus_bus_remove_match_dylibloader_wrapper_dbus
#define dbus_get_local_machine_id dbus_get_local_machine_id_dylibloader_wrapper_dbus
#define dbus_get_version dbus_get_version_dylibloader_wrapper_dbus
#define dbus_setenv dbus_setenv_dylibloader_wrapper_dbus
#define dbus_try_get_local_machine_id dbus_try_get_local_machine_id_dylibloader_wrapper_dbus
#define dbus_pending_call_ref dbus_pending_call_ref_dylibloader_wrapper_dbus
#define dbus_pending_call_unref dbus_pending_call_unref_dylibloader_wrapper_dbus
#define dbus_pending_call_set_notify dbus_pending_call_set_notify_dylibloader_wrapper_dbus
#define dbus_pending_call_cancel dbus_pending_call_cancel_dylibloader_wrapper_dbus
#define dbus_pending_call_get_completed dbus_pending_call_get_completed_dylibloader_wrapper_dbus
#define dbus_pending_call_steal_reply dbus_pending_call_steal_reply_dylibloader_wrapper_dbus
#define dbus_pending_call_block dbus_pending_call_block_dylibloader_wrapper_dbus
#define dbus_pending_call_allocate_data_slot dbus_pending_call_allocate_data_slot_dylibloader_wrapper_dbus
#define dbus_pending_call_free_data_slot dbus_pending_call_free_data_slot_dylibloader_wrapper_dbus
#define dbus_pending_call_set_data dbus_pending_call_set_data_dylibloader_wrapper_dbus
#define dbus_pending_call_get_data dbus_pending_call_get_data_dylibloader_wrapper_dbus
#define dbus_server_listen dbus_server_listen_dylibloader_wrapper_dbus
#define dbus_server_ref dbus_server_ref_dylibloader_wrapper_dbus
#define dbus_server_unref dbus_server_unref_dylibloader_wrapper_dbus
#define dbus_server_disconnect dbus_server_disconnect_dylibloader_wrapper_dbus
#define dbus_server_get_is_connected dbus_server_get_is_connected_dylibloader_wrapper_dbus
#define dbus_server_get_address dbus_server_get_address_dylibloader_wrapper_dbus
#define dbus_server_get_id dbus_server_get_id_dylibloader_wrapper_dbus
#define dbus_server_set_new_connection_function dbus_server_set_new_connection_function_dylibloader_wrapper_dbus
#define dbus_server_set_watch_functions dbus_server_set_watch_functions_dylibloader_wrapper_dbus
#define dbus_server_set_timeout_functions dbus_server_set_timeout_functions_dylibloader_wrapper_dbus
#define dbus_server_set_auth_mechanisms dbus_server_set_auth_mechanisms_dylibloader_wrapper_dbus
#define dbus_server_allocate_data_slot dbus_server_allocate_data_slot_dylibloader_wrapper_dbus
#define dbus_server_free_data_slot dbus_server_free_data_slot_dylibloader_wrapper_dbus
#define dbus_server_set_data dbus_server_set_data_dylibloader_wrapper_dbus
#define dbus_server_get_data dbus_server_get_data_dylibloader_wrapper_dbus
#define dbus_signature_iter_init dbus_signature_iter_init_dylibloader_wrapper_dbus
#define dbus_signature_iter_get_current_type dbus_signature_iter_get_current_type_dylibloader_wrapper_dbus
#define dbus_signature_iter_get_signature dbus_signature_iter_get_signature_dylibloader_wrapper_dbus
#define dbus_signature_iter_get_element_type dbus_signature_iter_get_element_type_dylibloader_wrapper_dbus
#define dbus_signature_iter_next dbus_signature_iter_next_dylibloader_wrapper_dbus
#define dbus_signature_iter_recurse dbus_signature_iter_recurse_dylibloader_wrapper_dbus
#define dbus_signature_validate dbus_signature_validate_dylibloader_wrapper_dbus
#define dbus_signature_validate_single dbus_signature_validate_single_dylibloader_wrapper_dbus
#define dbus_type_is_valid dbus_type_is_valid_dylibloader_wrapper_dbus
#define dbus_type_is_basic dbus_type_is_basic_dylibloader_wrapper_dbus
#define dbus_type_is_container dbus_type_is_container_dylibloader_wrapper_dbus
#define dbus_type_is_fixed dbus_type_is_fixed_dylibloader_wrapper_dbus
#define dbus_validate_path dbus_validate_path_dylibloader_wrapper_dbus
#define dbus_validate_interface dbus_validate_interface_dylibloader_wrapper_dbus
#define dbus_validate_member dbus_validate_member_dylibloader_wrapper_dbus
#define dbus_validate_error_name dbus_validate_error_name_dylibloader_wrapper_dbus
#define dbus_validate_bus_name dbus_validate_bus_name_dylibloader_wrapper_dbus
#define dbus_validate_utf8 dbus_validate_utf8_dylibloader_wrapper_dbus
#define dbus_threads_init dbus_threads_init_dylibloader_wrapper_dbus
#define dbus_threads_init_default dbus_threads_init_default_dylibloader_wrapper_dbus
extern void (*dbus_error_init_dylibloader_wrapper_dbus)( DBusError*);
extern void (*dbus_error_free_dylibloader_wrapper_dbus)( DBusError*);
extern void (*dbus_set_error_dylibloader_wrapper_dbus)( DBusError*,const char*,const char*,...);
extern void (*dbus_set_error_const_dylibloader_wrapper_dbus)( DBusError*,const char*,const char*);
extern void (*dbus_move_error_dylibloader_wrapper_dbus)( DBusError*, DBusError*);
extern dbus_bool_t (*dbus_error_has_name_dylibloader_wrapper_dbus)(const DBusError*,const char*);
extern dbus_bool_t (*dbus_error_is_set_dylibloader_wrapper_dbus)(const DBusError*);
extern dbus_bool_t (*dbus_parse_address_dylibloader_wrapper_dbus)(const char*, DBusAddressEntry***, int*, DBusError*);
extern const char* (*dbus_address_entry_get_value_dylibloader_wrapper_dbus)( DBusAddressEntry*,const char*);
extern const char* (*dbus_address_entry_get_method_dylibloader_wrapper_dbus)( DBusAddressEntry*);
extern void (*dbus_address_entries_free_dylibloader_wrapper_dbus)( DBusAddressEntry**);
extern char* (*dbus_address_escape_value_dylibloader_wrapper_dbus)(const char*);
extern char* (*dbus_address_unescape_value_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern void* (*dbus_malloc_dylibloader_wrapper_dbus)( size_t);
extern void* (*dbus_malloc0_dylibloader_wrapper_dbus)( size_t);
extern void* (*dbus_realloc_dylibloader_wrapper_dbus)( void*, size_t);
extern void (*dbus_free_dylibloader_wrapper_dbus)( void*);
extern void (*dbus_free_string_array_dylibloader_wrapper_dbus)( char**);
extern void (*dbus_shutdown_dylibloader_wrapper_dbus)( void);
extern DBusMessage* (*dbus_message_new_dylibloader_wrapper_dbus)( int);
extern DBusMessage* (*dbus_message_new_method_call_dylibloader_wrapper_dbus)(const char*,const char*,const char*,const char*);
extern DBusMessage* (*dbus_message_new_method_return_dylibloader_wrapper_dbus)( DBusMessage*);
extern DBusMessage* (*dbus_message_new_signal_dylibloader_wrapper_dbus)(const char*,const char*,const char*);
extern DBusMessage* (*dbus_message_new_error_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
extern DBusMessage* (*dbus_message_new_error_printf_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*,...);
extern DBusMessage* (*dbus_message_copy_dylibloader_wrapper_dbus)(const DBusMessage*);
extern DBusMessage* (*dbus_message_ref_dylibloader_wrapper_dbus)( DBusMessage*);
extern void (*dbus_message_unref_dylibloader_wrapper_dbus)( DBusMessage*);
extern int (*dbus_message_get_type_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_message_set_path_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern const char* (*dbus_message_get_path_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_message_has_path_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern dbus_bool_t (*dbus_message_set_interface_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern const char* (*dbus_message_get_interface_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_message_has_interface_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern dbus_bool_t (*dbus_message_set_member_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern const char* (*dbus_message_get_member_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_message_has_member_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern dbus_bool_t (*dbus_message_set_error_name_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern const char* (*dbus_message_get_error_name_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_message_set_destination_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern const char* (*dbus_message_get_destination_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_message_set_sender_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern const char* (*dbus_message_get_sender_dylibloader_wrapper_dbus)( DBusMessage*);
extern const char* (*dbus_message_get_signature_dylibloader_wrapper_dbus)( DBusMessage*);
extern void (*dbus_message_set_no_reply_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
extern dbus_bool_t (*dbus_message_get_no_reply_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_message_is_method_call_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
extern dbus_bool_t (*dbus_message_is_signal_dylibloader_wrapper_dbus)( DBusMessage*,const char*,const char*);
extern dbus_bool_t (*dbus_message_is_error_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern dbus_bool_t (*dbus_message_has_destination_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern dbus_bool_t (*dbus_message_has_sender_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern dbus_bool_t (*dbus_message_has_signature_dylibloader_wrapper_dbus)( DBusMessage*,const char*);
extern dbus_uint32_t (*dbus_message_get_serial_dylibloader_wrapper_dbus)( DBusMessage*);
extern void (*dbus_message_set_serial_dylibloader_wrapper_dbus)( DBusMessage*, dbus_uint32_t);
extern dbus_bool_t (*dbus_message_set_reply_serial_dylibloader_wrapper_dbus)( DBusMessage*, dbus_uint32_t);
extern dbus_uint32_t (*dbus_message_get_reply_serial_dylibloader_wrapper_dbus)( DBusMessage*);
extern void (*dbus_message_set_auto_start_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
extern dbus_bool_t (*dbus_message_get_auto_start_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_message_get_path_decomposed_dylibloader_wrapper_dbus)( DBusMessage*, char***);
extern dbus_bool_t (*dbus_message_append_args_dylibloader_wrapper_dbus)( DBusMessage*, int,...);
extern dbus_bool_t (*dbus_message_append_args_valist_dylibloader_wrapper_dbus)( DBusMessage*, int, va_list);
extern dbus_bool_t (*dbus_message_get_args_dylibloader_wrapper_dbus)( DBusMessage*, DBusError*, int,...);
extern dbus_bool_t (*dbus_message_get_args_valist_dylibloader_wrapper_dbus)( DBusMessage*, DBusError*, int, va_list);
extern dbus_bool_t (*dbus_message_contains_unix_fds_dylibloader_wrapper_dbus)( DBusMessage*);
extern void (*dbus_message_iter_init_closed_dylibloader_wrapper_dbus)( DBusMessageIter*);
extern dbus_bool_t (*dbus_message_iter_init_dylibloader_wrapper_dbus)( DBusMessage*, DBusMessageIter*);
extern dbus_bool_t (*dbus_message_iter_has_next_dylibloader_wrapper_dbus)( DBusMessageIter*);
extern dbus_bool_t (*dbus_message_iter_next_dylibloader_wrapper_dbus)( DBusMessageIter*);
extern char* (*dbus_message_iter_get_signature_dylibloader_wrapper_dbus)( DBusMessageIter*);
extern int (*dbus_message_iter_get_arg_type_dylibloader_wrapper_dbus)( DBusMessageIter*);
extern int (*dbus_message_iter_get_element_type_dylibloader_wrapper_dbus)( DBusMessageIter*);
extern void (*dbus_message_iter_recurse_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
extern void (*dbus_message_iter_get_basic_dylibloader_wrapper_dbus)( DBusMessageIter*, void*);
extern int (*dbus_message_iter_get_element_count_dylibloader_wrapper_dbus)( DBusMessageIter*);
extern int (*dbus_message_iter_get_array_len_dylibloader_wrapper_dbus)( DBusMessageIter*);
extern void (*dbus_message_iter_get_fixed_array_dylibloader_wrapper_dbus)( DBusMessageIter*, void*, int*);
extern void (*dbus_message_iter_init_append_dylibloader_wrapper_dbus)( DBusMessage*, DBusMessageIter*);
extern dbus_bool_t (*dbus_message_iter_append_basic_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const void*);
extern dbus_bool_t (*dbus_message_iter_append_fixed_array_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const void*, int);
extern dbus_bool_t (*dbus_message_iter_open_container_dylibloader_wrapper_dbus)( DBusMessageIter*, int,const char*, DBusMessageIter*);
extern dbus_bool_t (*dbus_message_iter_close_container_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
extern void (*dbus_message_iter_abandon_container_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
extern void (*dbus_message_iter_abandon_container_if_open_dylibloader_wrapper_dbus)( DBusMessageIter*, DBusMessageIter*);
extern void (*dbus_message_lock_dylibloader_wrapper_dbus)( DBusMessage*);
extern dbus_bool_t (*dbus_set_error_from_message_dylibloader_wrapper_dbus)( DBusError*, DBusMessage*);
extern dbus_bool_t (*dbus_message_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
extern void (*dbus_message_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
extern dbus_bool_t (*dbus_message_set_data_dylibloader_wrapper_dbus)( DBusMessage*, dbus_int32_t, void*, DBusFreeFunction);
extern void* (*dbus_message_get_data_dylibloader_wrapper_dbus)( DBusMessage*, dbus_int32_t);
extern int (*dbus_message_type_from_string_dylibloader_wrapper_dbus)(const char*);
extern const char* (*dbus_message_type_to_string_dylibloader_wrapper_dbus)( int);
extern dbus_bool_t (*dbus_message_marshal_dylibloader_wrapper_dbus)( DBusMessage*, char**, int*);
extern DBusMessage* (*dbus_message_demarshal_dylibloader_wrapper_dbus)(const char*, int, DBusError*);
extern int (*dbus_message_demarshal_bytes_needed_dylibloader_wrapper_dbus)(const char*, int);
extern void (*dbus_message_set_allow_interactive_authorization_dylibloader_wrapper_dbus)( DBusMessage*, dbus_bool_t);
extern dbus_bool_t (*dbus_message_get_allow_interactive_authorization_dylibloader_wrapper_dbus)( DBusMessage*);
extern DBusConnection* (*dbus_connection_open_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern DBusConnection* (*dbus_connection_open_private_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern DBusConnection* (*dbus_connection_ref_dylibloader_wrapper_dbus)( DBusConnection*);
extern void (*dbus_connection_unref_dylibloader_wrapper_dbus)( DBusConnection*);
extern void (*dbus_connection_close_dylibloader_wrapper_dbus)( DBusConnection*);
extern dbus_bool_t (*dbus_connection_get_is_connected_dylibloader_wrapper_dbus)( DBusConnection*);
extern dbus_bool_t (*dbus_connection_get_is_authenticated_dylibloader_wrapper_dbus)( DBusConnection*);
extern dbus_bool_t (*dbus_connection_get_is_anonymous_dylibloader_wrapper_dbus)( DBusConnection*);
extern char* (*dbus_connection_get_server_id_dylibloader_wrapper_dbus)( DBusConnection*);
extern dbus_bool_t (*dbus_connection_can_send_type_dylibloader_wrapper_dbus)( DBusConnection*, int);
extern void (*dbus_connection_set_exit_on_disconnect_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
extern void (*dbus_connection_flush_dylibloader_wrapper_dbus)( DBusConnection*);
extern dbus_bool_t (*dbus_connection_read_write_dispatch_dylibloader_wrapper_dbus)( DBusConnection*, int);
extern dbus_bool_t (*dbus_connection_read_write_dylibloader_wrapper_dbus)( DBusConnection*, int);
extern DBusMessage* (*dbus_connection_borrow_message_dylibloader_wrapper_dbus)( DBusConnection*);
extern void (*dbus_connection_return_message_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*);
extern void (*dbus_connection_steal_borrowed_message_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*);
extern DBusMessage* (*dbus_connection_pop_message_dylibloader_wrapper_dbus)( DBusConnection*);
extern DBusDispatchStatus (*dbus_connection_get_dispatch_status_dylibloader_wrapper_dbus)( DBusConnection*);
extern DBusDispatchStatus (*dbus_connection_dispatch_dylibloader_wrapper_dbus)( DBusConnection*);
extern dbus_bool_t (*dbus_connection_has_messages_to_send_dylibloader_wrapper_dbus)( DBusConnection*);
extern dbus_bool_t (*dbus_connection_send_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, dbus_uint32_t*);
extern dbus_bool_t (*dbus_connection_send_with_reply_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, DBusPendingCall**, int);
extern DBusMessage* (*dbus_connection_send_with_reply_and_block_dylibloader_wrapper_dbus)( DBusConnection*, DBusMessage*, int, DBusError*);
extern dbus_bool_t (*dbus_connection_set_watch_functions_dylibloader_wrapper_dbus)( DBusConnection*, DBusAddWatchFunction, DBusRemoveWatchFunction, DBusWatchToggledFunction, void*, DBusFreeFunction);
extern dbus_bool_t (*dbus_connection_set_timeout_functions_dylibloader_wrapper_dbus)( DBusConnection*, DBusAddTimeoutFunction, DBusRemoveTimeoutFunction, DBusTimeoutToggledFunction, void*, DBusFreeFunction);
extern void (*dbus_connection_set_wakeup_main_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusWakeupMainFunction, void*, DBusFreeFunction);
extern void (*dbus_connection_set_dispatch_status_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusDispatchStatusFunction, void*, DBusFreeFunction);
extern dbus_bool_t (*dbus_connection_get_unix_user_dylibloader_wrapper_dbus)( DBusConnection*, unsigned long*);
extern dbus_bool_t (*dbus_connection_get_unix_process_id_dylibloader_wrapper_dbus)( DBusConnection*, unsigned long*);
extern dbus_bool_t (*dbus_connection_get_adt_audit_session_data_dylibloader_wrapper_dbus)( DBusConnection*, void**, dbus_int32_t*);
extern void (*dbus_connection_set_unix_user_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusAllowUnixUserFunction, void*, DBusFreeFunction);
extern dbus_bool_t (*dbus_connection_get_windows_user_dylibloader_wrapper_dbus)( DBusConnection*, char**);
extern void (*dbus_connection_set_windows_user_function_dylibloader_wrapper_dbus)( DBusConnection*, DBusAllowWindowsUserFunction, void*, DBusFreeFunction);
extern void (*dbus_connection_set_allow_anonymous_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
extern void (*dbus_connection_set_route_peer_messages_dylibloader_wrapper_dbus)( DBusConnection*, dbus_bool_t);
extern dbus_bool_t (*dbus_connection_add_filter_dylibloader_wrapper_dbus)( DBusConnection*, DBusHandleMessageFunction, void*, DBusFreeFunction);
extern void (*dbus_connection_remove_filter_dylibloader_wrapper_dbus)( DBusConnection*, DBusHandleMessageFunction, void*);
extern dbus_bool_t (*dbus_connection_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
extern void (*dbus_connection_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
extern dbus_bool_t (*dbus_connection_set_data_dylibloader_wrapper_dbus)( DBusConnection*, dbus_int32_t, void*, DBusFreeFunction);
extern void* (*dbus_connection_get_data_dylibloader_wrapper_dbus)( DBusConnection*, dbus_int32_t);
extern void (*dbus_connection_set_change_sigpipe_dylibloader_wrapper_dbus)( dbus_bool_t);
extern void (*dbus_connection_set_max_message_size_dylibloader_wrapper_dbus)( DBusConnection*, long);
extern long (*dbus_connection_get_max_message_size_dylibloader_wrapper_dbus)( DBusConnection*);
extern void (*dbus_connection_set_max_received_size_dylibloader_wrapper_dbus)( DBusConnection*, long);
extern long (*dbus_connection_get_max_received_size_dylibloader_wrapper_dbus)( DBusConnection*);
extern void (*dbus_connection_set_max_message_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*, long);
extern long (*dbus_connection_get_max_message_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
extern void (*dbus_connection_set_max_received_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*, long);
extern long (*dbus_connection_get_max_received_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
extern long (*dbus_connection_get_outgoing_size_dylibloader_wrapper_dbus)( DBusConnection*);
extern long (*dbus_connection_get_outgoing_unix_fds_dylibloader_wrapper_dbus)( DBusConnection*);
extern DBusPreallocatedSend* (*dbus_connection_preallocate_send_dylibloader_wrapper_dbus)( DBusConnection*);
extern void (*dbus_connection_free_preallocated_send_dylibloader_wrapper_dbus)( DBusConnection*, DBusPreallocatedSend*);
extern void (*dbus_connection_send_preallocated_dylibloader_wrapper_dbus)( DBusConnection*, DBusPreallocatedSend*, DBusMessage*, dbus_uint32_t*);
extern dbus_bool_t (*dbus_connection_try_register_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*, DBusError*);
extern dbus_bool_t (*dbus_connection_register_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*);
extern dbus_bool_t (*dbus_connection_try_register_fallback_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*, DBusError*);
extern dbus_bool_t (*dbus_connection_register_fallback_dylibloader_wrapper_dbus)( DBusConnection*,const char*,const DBusObjectPathVTable*, void*);
extern dbus_bool_t (*dbus_connection_unregister_object_path_dylibloader_wrapper_dbus)( DBusConnection*,const char*);
extern dbus_bool_t (*dbus_connection_get_object_path_data_dylibloader_wrapper_dbus)( DBusConnection*,const char*, void**);
extern dbus_bool_t (*dbus_connection_list_registered_dylibloader_wrapper_dbus)( DBusConnection*,const char*, char***);
extern dbus_bool_t (*dbus_connection_get_unix_fd_dylibloader_wrapper_dbus)( DBusConnection*, int*);
extern dbus_bool_t (*dbus_connection_get_socket_dylibloader_wrapper_dbus)( DBusConnection*, int*);
extern int (*dbus_watch_get_fd_dylibloader_wrapper_dbus)( DBusWatch*);
extern int (*dbus_watch_get_unix_fd_dylibloader_wrapper_dbus)( DBusWatch*);
extern int (*dbus_watch_get_socket_dylibloader_wrapper_dbus)( DBusWatch*);
extern unsigned int (*dbus_watch_get_flags_dylibloader_wrapper_dbus)( DBusWatch*);
extern void* (*dbus_watch_get_data_dylibloader_wrapper_dbus)( DBusWatch*);
extern void (*dbus_watch_set_data_dylibloader_wrapper_dbus)( DBusWatch*, void*, DBusFreeFunction);
extern dbus_bool_t (*dbus_watch_handle_dylibloader_wrapper_dbus)( DBusWatch*, unsigned int);
extern dbus_bool_t (*dbus_watch_get_enabled_dylibloader_wrapper_dbus)( DBusWatch*);
extern int (*dbus_timeout_get_interval_dylibloader_wrapper_dbus)( DBusTimeout*);
extern void* (*dbus_timeout_get_data_dylibloader_wrapper_dbus)( DBusTimeout*);
extern void (*dbus_timeout_set_data_dylibloader_wrapper_dbus)( DBusTimeout*, void*, DBusFreeFunction);
extern dbus_bool_t (*dbus_timeout_handle_dylibloader_wrapper_dbus)( DBusTimeout*);
extern dbus_bool_t (*dbus_timeout_get_enabled_dylibloader_wrapper_dbus)( DBusTimeout*);
extern DBusConnection* (*dbus_bus_get_dylibloader_wrapper_dbus)( DBusBusType, DBusError*);
extern DBusConnection* (*dbus_bus_get_private_dylibloader_wrapper_dbus)( DBusBusType, DBusError*);
extern dbus_bool_t (*dbus_bus_register_dylibloader_wrapper_dbus)( DBusConnection*, DBusError*);
extern dbus_bool_t (*dbus_bus_set_unique_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*);
extern const char* (*dbus_bus_get_unique_name_dylibloader_wrapper_dbus)( DBusConnection*);
extern unsigned long (*dbus_bus_get_unix_user_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
extern char* (*dbus_bus_get_id_dylibloader_wrapper_dbus)( DBusConnection*, DBusError*);
extern int (*dbus_bus_request_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, unsigned int, DBusError*);
extern int (*dbus_bus_release_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
extern dbus_bool_t (*dbus_bus_name_has_owner_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
extern dbus_bool_t (*dbus_bus_start_service_by_name_dylibloader_wrapper_dbus)( DBusConnection*,const char*, dbus_uint32_t, dbus_uint32_t*, DBusError*);
extern void (*dbus_bus_add_match_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
extern void (*dbus_bus_remove_match_dylibloader_wrapper_dbus)( DBusConnection*,const char*, DBusError*);
extern char* (*dbus_get_local_machine_id_dylibloader_wrapper_dbus)( void);
extern void (*dbus_get_version_dylibloader_wrapper_dbus)( int*, int*, int*);
extern dbus_bool_t (*dbus_setenv_dylibloader_wrapper_dbus)(const char*,const char*);
extern char* (*dbus_try_get_local_machine_id_dylibloader_wrapper_dbus)( DBusError*);
extern DBusPendingCall* (*dbus_pending_call_ref_dylibloader_wrapper_dbus)( DBusPendingCall*);
extern void (*dbus_pending_call_unref_dylibloader_wrapper_dbus)( DBusPendingCall*);
extern dbus_bool_t (*dbus_pending_call_set_notify_dylibloader_wrapper_dbus)( DBusPendingCall*, DBusPendingCallNotifyFunction, void*, DBusFreeFunction);
extern void (*dbus_pending_call_cancel_dylibloader_wrapper_dbus)( DBusPendingCall*);
extern dbus_bool_t (*dbus_pending_call_get_completed_dylibloader_wrapper_dbus)( DBusPendingCall*);
extern DBusMessage* (*dbus_pending_call_steal_reply_dylibloader_wrapper_dbus)( DBusPendingCall*);
extern void (*dbus_pending_call_block_dylibloader_wrapper_dbus)( DBusPendingCall*);
extern dbus_bool_t (*dbus_pending_call_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
extern void (*dbus_pending_call_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
extern dbus_bool_t (*dbus_pending_call_set_data_dylibloader_wrapper_dbus)( DBusPendingCall*, dbus_int32_t, void*, DBusFreeFunction);
extern void* (*dbus_pending_call_get_data_dylibloader_wrapper_dbus)( DBusPendingCall*, dbus_int32_t);
extern DBusServer* (*dbus_server_listen_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern DBusServer* (*dbus_server_ref_dylibloader_wrapper_dbus)( DBusServer*);
extern void (*dbus_server_unref_dylibloader_wrapper_dbus)( DBusServer*);
extern void (*dbus_server_disconnect_dylibloader_wrapper_dbus)( DBusServer*);
extern dbus_bool_t (*dbus_server_get_is_connected_dylibloader_wrapper_dbus)( DBusServer*);
extern char* (*dbus_server_get_address_dylibloader_wrapper_dbus)( DBusServer*);
extern char* (*dbus_server_get_id_dylibloader_wrapper_dbus)( DBusServer*);
extern void (*dbus_server_set_new_connection_function_dylibloader_wrapper_dbus)( DBusServer*, DBusNewConnectionFunction, void*, DBusFreeFunction);
extern dbus_bool_t (*dbus_server_set_watch_functions_dylibloader_wrapper_dbus)( DBusServer*, DBusAddWatchFunction, DBusRemoveWatchFunction, DBusWatchToggledFunction, void*, DBusFreeFunction);
extern dbus_bool_t (*dbus_server_set_timeout_functions_dylibloader_wrapper_dbus)( DBusServer*, DBusAddTimeoutFunction, DBusRemoveTimeoutFunction, DBusTimeoutToggledFunction, void*, DBusFreeFunction);
extern dbus_bool_t (*dbus_server_set_auth_mechanisms_dylibloader_wrapper_dbus)( DBusServer*,const char**);
extern dbus_bool_t (*dbus_server_allocate_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
extern void (*dbus_server_free_data_slot_dylibloader_wrapper_dbus)( dbus_int32_t*);
extern dbus_bool_t (*dbus_server_set_data_dylibloader_wrapper_dbus)( DBusServer*, int, void*, DBusFreeFunction);
extern void* (*dbus_server_get_data_dylibloader_wrapper_dbus)( DBusServer*, int);
extern void (*dbus_signature_iter_init_dylibloader_wrapper_dbus)( DBusSignatureIter*,const char*);
extern int (*dbus_signature_iter_get_current_type_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
extern char* (*dbus_signature_iter_get_signature_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
extern int (*dbus_signature_iter_get_element_type_dylibloader_wrapper_dbus)(const DBusSignatureIter*);
extern dbus_bool_t (*dbus_signature_iter_next_dylibloader_wrapper_dbus)( DBusSignatureIter*);
extern void (*dbus_signature_iter_recurse_dylibloader_wrapper_dbus)(const DBusSignatureIter*, DBusSignatureIter*);
extern dbus_bool_t (*dbus_signature_validate_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern dbus_bool_t (*dbus_signature_validate_single_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern dbus_bool_t (*dbus_type_is_valid_dylibloader_wrapper_dbus)( int);
extern dbus_bool_t (*dbus_type_is_basic_dylibloader_wrapper_dbus)( int);
extern dbus_bool_t (*dbus_type_is_container_dylibloader_wrapper_dbus)( int);
extern dbus_bool_t (*dbus_type_is_fixed_dylibloader_wrapper_dbus)( int);
extern dbus_bool_t (*dbus_validate_path_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern dbus_bool_t (*dbus_validate_interface_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern dbus_bool_t (*dbus_validate_member_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern dbus_bool_t (*dbus_validate_error_name_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern dbus_bool_t (*dbus_validate_bus_name_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern dbus_bool_t (*dbus_validate_utf8_dylibloader_wrapper_dbus)(const char*, DBusError*);
extern dbus_bool_t (*dbus_threads_init_dylibloader_wrapper_dbus)(const DBusThreadFunctions*);
extern dbus_bool_t (*dbus_threads_init_default_dylibloader_wrapper_dbus)( void);
int initialize_dbus(int verbose);
#ifdef __cplusplus
}
#endif
#endif

541
platform/linuxbsd/detect.py Normal file
View File

@@ -0,0 +1,541 @@
import os
import platform
import sys
from typing import TYPE_CHECKING
from methods import get_compiler_version, print_error, print_info, print_warning, using_gcc
from platform_methods import detect_arch, validate_arch
if TYPE_CHECKING:
from SCons.Script.SConscript import SConsEnvironment
def get_name():
return "LinuxBSD"
def can_build():
if os.name != "posix" or sys.platform == "darwin":
return False
pkgconf_error = os.system("pkg-config --version > /dev/null")
if pkgconf_error:
print_error("pkg-config not found. Aborting.")
return False
return True
def get_opts():
from SCons.Variables import BoolVariable, EnumVariable
return [
EnumVariable("linker", "Linker program", "default", ["default", "bfd", "gold", "lld", "mold"], ignorecase=2),
BoolVariable("use_llvm", "Use the LLVM compiler", False),
BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", True),
BoolVariable("use_coverage", "Test Godot coverage", False),
BoolVariable("use_ubsan", "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)", False),
BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN)", False),
BoolVariable("use_lsan", "Use LLVM/GCC compiler leak sanitizer (LSAN)", False),
BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN)", False),
BoolVariable("use_msan", "Use LLVM compiler memory sanitizer (MSAN)", False),
BoolVariable("use_sowrap", "Dynamically load system libraries", True),
BoolVariable("alsa", "Use ALSA", True),
BoolVariable("pulseaudio", "Use PulseAudio", True),
BoolVariable("dbus", "Use D-Bus to handle screensaver and portal desktop settings", True),
BoolVariable("speechd", "Use Speech Dispatcher for Text-to-Speech support", True),
BoolVariable("fontconfig", "Use fontconfig for system fonts support", True),
BoolVariable("udev", "Use udev for gamepad connection callbacks", True),
BoolVariable("x11", "Enable X11 display", True),
BoolVariable("wayland", "Enable Wayland display", True),
BoolVariable("libdecor", "Enable libdecor support", True),
BoolVariable("touch", "Enable touch events", True),
BoolVariable("execinfo", "Use libexecinfo on systems where glibc is not available", False),
]
def get_doc_classes():
return [
"EditorExportPlatformLinuxBSD",
]
def get_doc_path():
return "doc_classes"
def get_flags():
return {
"arch": detect_arch(),
"supported": ["mono"],
}
def configure(env: "SConsEnvironment"):
# Validate arch.
supported_arches = ["x86_32", "x86_64", "arm32", "arm64", "rv64", "ppc64", "loongarch64"]
validate_arch(env["arch"], get_name(), supported_arches)
## Build type
if env.dev_build:
# This is needed for our crash handler to work properly.
# gdb works fine without it though, so maybe our crash handler could too.
env.Append(LINKFLAGS=["-rdynamic"])
# Cross-compilation
# TODO: Support cross-compilation on architectures other than x86.
host_is_64_bit = sys.maxsize > 2**32
if host_is_64_bit and env["arch"] == "x86_32":
env.Append(CCFLAGS=["-m32"])
env.Append(LINKFLAGS=["-m32"])
elif not host_is_64_bit and env["arch"] == "x86_64":
env.Append(CCFLAGS=["-m64"])
env.Append(LINKFLAGS=["-m64"])
# CPU architecture flags.
if env["arch"] == "rv64":
# G = General-purpose extensions, C = Compression extension (very common).
env.Append(CCFLAGS=["-march=rv64gc"])
## Compiler configuration
if "CXX" in env and "clang" in os.path.basename(env["CXX"]):
# Convenience check to enforce the use_llvm overrides when CXX is clang(++)
env["use_llvm"] = True
if env["use_llvm"]:
if "clang++" not in os.path.basename(env["CXX"]):
env["CC"] = "clang"
env["CXX"] = "clang++"
env.extra_suffix = ".llvm" + env.extra_suffix
if env["linker"] != "default":
print("Using linker program: " + env["linker"])
if env["linker"] == "mold" and using_gcc(env): # GCC < 12.1 doesn't support -fuse-ld=mold.
cc_version = get_compiler_version(env)
cc_semver = (cc_version["major"], cc_version["minor"])
if cc_semver < (12, 1):
found_wrapper = False
for path in ["/usr/libexec", "/usr/local/libexec", "/usr/lib", "/usr/local/lib"]:
if os.path.isfile(path + "/mold/ld"):
env.Append(LINKFLAGS=["-B" + path + "/mold"])
found_wrapper = True
break
if not found_wrapper:
for path in os.environ["PATH"].split(os.pathsep):
if os.path.isfile(path + "/ld.mold"):
env.Append(LINKFLAGS=["-B" + path])
found_wrapper = True
break
if not found_wrapper:
print_error(
"Couldn't locate mold installation path. Make sure it's installed in /usr, /usr/local or in PATH environment variable."
)
sys.exit(255)
else:
env.Append(LINKFLAGS=["-fuse-ld=mold"])
else:
env.Append(LINKFLAGS=["-fuse-ld=%s" % env["linker"]])
if env["use_coverage"]:
env.Append(CCFLAGS=["-ftest-coverage", "-fprofile-arcs"])
env.Append(LINKFLAGS=["-ftest-coverage", "-fprofile-arcs"])
if env["use_ubsan"] or env["use_asan"] or env["use_lsan"] or env["use_tsan"] or env["use_msan"]:
env.extra_suffix += ".san"
env.Append(CCFLAGS=["-DSANITIZERS_ENABLED"])
if env["use_ubsan"]:
env.Append(
CCFLAGS=[
"-fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin"
]
)
env.Append(LINKFLAGS=["-fsanitize=undefined"])
if env["use_llvm"]:
env.Append(
CCFLAGS=[
"-fsanitize=nullability-return,nullability-arg,function,nullability-assign,implicit-integer-sign-change"
]
)
else:
env.Append(CCFLAGS=["-fsanitize=bounds-strict"])
if env["use_asan"]:
env.Append(CCFLAGS=["-fsanitize=address,pointer-subtract,pointer-compare"])
env.Append(LINKFLAGS=["-fsanitize=address"])
if env["use_lsan"]:
env.Append(CCFLAGS=["-fsanitize=leak"])
env.Append(LINKFLAGS=["-fsanitize=leak"])
if env["use_tsan"]:
env.Append(CCFLAGS=["-fsanitize=thread"])
env.Append(LINKFLAGS=["-fsanitize=thread"])
if env["use_msan"] and env["use_llvm"]:
env.Append(CCFLAGS=["-fsanitize=memory"])
env.Append(CCFLAGS=["-fsanitize-memory-track-origins"])
env.Append(CCFLAGS=["-fsanitize-recover=memory"])
env.Append(LINKFLAGS=["-fsanitize=memory"])
env.Append(CCFLAGS=["-ffp-contract=off"])
# LTO
if env["lto"] == "auto": # Enable LTO for production.
env["lto"] = "thin" if env["use_llvm"] else "full"
if env["lto"] != "none":
if env["lto"] == "thin":
if not env["use_llvm"]:
print_error("ThinLTO is only compatible with LLVM, use `use_llvm=yes` or `lto=full`.")
sys.exit(255)
env.Append(CCFLAGS=["-flto=thin"])
env.Append(LINKFLAGS=["-flto=thin"])
elif not env["use_llvm"] and env.GetOption("num_jobs") > 1:
env.Append(CCFLAGS=["-flto"])
env.Append(LINKFLAGS=["-flto=" + str(env.GetOption("num_jobs"))])
else:
env.Append(CCFLAGS=["-flto"])
env.Append(LINKFLAGS=["-flto"])
if not env["use_llvm"]:
env["RANLIB"] = "gcc-ranlib"
env["AR"] = "gcc-ar"
env.Append(CCFLAGS=["-pipe"])
## Dependencies
if env["use_sowrap"]:
env.Append(CPPDEFINES=["SOWRAP_ENABLED"])
if env["wayland"]:
if os.system("wayland-scanner -v 2>/dev/null") != 0:
print_warning("wayland-scanner not found. Disabling Wayland support.")
env["wayland"] = False
if env["touch"]:
env.Append(CPPDEFINES=["TOUCH_ENABLED"])
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
if not env["builtin_freetype"]:
env.ParseConfig("pkg-config freetype2 --cflags --libs")
if not env["builtin_graphite"]:
env.ParseConfig("pkg-config graphite2 --cflags --libs")
if not env["builtin_icu4c"]:
env.ParseConfig("pkg-config icu-i18n icu-uc --cflags --libs")
if not env["builtin_harfbuzz"]:
env.ParseConfig("pkg-config harfbuzz harfbuzz-icu --cflags --libs")
if not env["builtin_icu4c"] or not env["builtin_harfbuzz"]:
print_warning(
"System-provided icu4c or harfbuzz cause known issues for GDExtension (see GH-91401 and GH-100301)."
)
if not env["builtin_libpng"]:
env.ParseConfig("pkg-config libpng16 --cflags --libs")
if not env["builtin_enet"]:
env.ParseConfig("pkg-config libenet --cflags --libs")
if not env["builtin_zstd"]:
env.ParseConfig("pkg-config libzstd --cflags --libs")
if env["brotli"] and not env["builtin_brotli"]:
env.ParseConfig("pkg-config libbrotlicommon libbrotlidec --cflags --libs")
# Sound and video libraries
# Keep the order as it triggers chained dependencies (ogg needed by others, etc.)
if not env["builtin_libtheora"]:
env["builtin_libogg"] = False # Needed to link against system libtheora
env["builtin_libvorbis"] = False # Needed to link against system libtheora
if env.editor_build:
env.ParseConfig("pkg-config theora theoradec theoraenc --cflags --libs")
else:
env.ParseConfig("pkg-config theora theoradec --cflags --libs")
else:
if env["arch"] in ["x86_64", "x86_32"]:
env["x86_libtheora_opt_gcc"] = True
if not env["builtin_libvorbis"]:
env["builtin_libogg"] = False # Needed to link against system libvorbis
if env.editor_build:
env.ParseConfig("pkg-config vorbis vorbisfile vorbisenc --cflags --libs")
else:
env.ParseConfig("pkg-config vorbis vorbisfile --cflags --libs")
if not env["builtin_libogg"]:
env.ParseConfig("pkg-config ogg --cflags --libs")
if not env["builtin_libwebp"]:
env.ParseConfig("pkg-config libwebp --cflags --libs")
if not env["builtin_mbedtls"]:
# mbedTLS only provides a pkgconfig file since 3.6.0, but we still support 2.28.x,
# so fallback to manually specifying LIBS if it fails.
if os.system("pkg-config --exists mbedtls") == 0: # 0 means found
env.ParseConfig("pkg-config mbedtls mbedcrypto mbedx509 --cflags --libs")
else:
env.Append(LIBS=["mbedtls", "mbedcrypto", "mbedx509"])
if not env["builtin_wslay"]:
env.ParseConfig("pkg-config libwslay --cflags --libs")
if not env["builtin_miniupnpc"]:
env.ParseConfig("pkg-config miniupnpc --cflags --libs")
# On Linux wchar_t should be 32-bits
# 16-bit library shouldn't be required due to compiler optimizations
if not env["builtin_pcre2"]:
env.ParseConfig("pkg-config libpcre2-32 --cflags --libs")
if not env["builtin_recastnavigation"]:
# No pkgconfig file so far, hardcode default paths.
env.Prepend(CPPEXTPATH=["/usr/include/recastnavigation"])
env.Append(LIBS=["Recast"])
if not env["builtin_embree"] and env["arch"] in ["x86_64", "arm64"]:
# No pkgconfig file so far, hardcode expected lib name.
env.Append(LIBS=["embree4"])
if not env["builtin_openxr"]:
env.ParseConfig("pkg-config openxr --cflags --libs")
if env["fontconfig"]:
if not env["use_sowrap"]:
if os.system("pkg-config --exists fontconfig") == 0: # 0 means found
env.ParseConfig("pkg-config fontconfig --cflags --libs")
env.Append(CPPDEFINES=["FONTCONFIG_ENABLED"])
else:
print_warning("fontconfig development libraries not found. Disabling the system fonts support.")
env["fontconfig"] = False
else:
env.Append(CPPDEFINES=["FONTCONFIG_ENABLED"])
if env["alsa"]:
if not env["use_sowrap"]:
if os.system("pkg-config --exists alsa") == 0: # 0 means found
env.ParseConfig("pkg-config alsa --cflags --libs")
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
else:
print_warning("ALSA development libraries not found. Disabling the ALSA audio driver.")
env["alsa"] = False
else:
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
if env["pulseaudio"]:
if not env["use_sowrap"]:
if os.system("pkg-config --exists libpulse") == 0: # 0 means found
env.ParseConfig("pkg-config libpulse --cflags --libs")
env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED"])
else:
print_warning("PulseAudio development libraries not found. Disabling the PulseAudio audio driver.")
env["pulseaudio"] = False
else:
env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED", "_REENTRANT"])
if env["dbus"] and env["threads"]: # D-Bus functionality expects threads.
if not env["use_sowrap"]:
if os.system("pkg-config --exists dbus-1") == 0: # 0 means found
env.ParseConfig("pkg-config dbus-1 --cflags --libs")
env.Append(CPPDEFINES=["DBUS_ENABLED"])
else:
print_warning("D-Bus development libraries not found. Disabling screensaver prevention.")
env["dbus"] = False
else:
env.Append(CPPDEFINES=["DBUS_ENABLED"])
if env["speechd"]:
if not env["use_sowrap"]:
if os.system("pkg-config --exists speech-dispatcher") == 0: # 0 means found
env.ParseConfig("pkg-config speech-dispatcher --cflags --libs")
env.Append(CPPDEFINES=["SPEECHD_ENABLED"])
else:
print_warning("speech-dispatcher development libraries not found. Disabling text to speech support.")
env["speechd"] = False
else:
env.Append(CPPDEFINES=["SPEECHD_ENABLED"])
if not env["use_sowrap"]:
if os.system("pkg-config --exists xkbcommon") == 0: # 0 means found
env.ParseConfig("pkg-config xkbcommon --cflags --libs")
env.Append(CPPDEFINES=["XKB_ENABLED"])
else:
if env["wayland"]:
print_error("libxkbcommon development libraries required by Wayland not found. Aborting.")
sys.exit(255)
else:
print_warning(
"libxkbcommon development libraries not found. Disabling dead key composition and key label support."
)
else:
env.Append(CPPDEFINES=["XKB_ENABLED"])
if platform.system() == "Linux":
if env["udev"]:
if not env["use_sowrap"]:
if os.system("pkg-config --exists libudev") == 0: # 0 means found
env.ParseConfig("pkg-config libudev --cflags --libs")
env.Append(CPPDEFINES=["UDEV_ENABLED"])
else:
print_warning("libudev development libraries not found. Disabling controller hotplugging support.")
env["udev"] = False
else:
env.Append(CPPDEFINES=["UDEV_ENABLED"])
else:
env["udev"] = False # Linux specific
if env["sdl"]:
if env["builtin_sdl"]:
env.Append(CPPDEFINES=["SDL_ENABLED"])
elif os.system("pkg-config --exists sdl3") == 0: # 0 means found
env.ParseConfig("pkg-config sdl3 --cflags --libs")
env.Append(CPPDEFINES=["SDL_ENABLED"])
else:
print_warning(
"SDL3 development libraries not found, and `builtin_sdl` was explicitly disabled. Disabling SDL input driver support."
)
env["sdl"] = False
# Linkflags below this line should typically stay the last ones
if not env["builtin_zlib"]:
env.ParseConfig("pkg-config zlib --cflags --libs")
env.Prepend(CPPPATH=["#platform/linuxbsd"])
if env["use_sowrap"]:
env.Prepend(CPPEXTPATH=["#thirdparty/linuxbsd_headers"])
env.Append(
CPPDEFINES=[
"LINUXBSD_ENABLED",
"UNIX_ENABLED",
("_FILE_OFFSET_BITS", 64),
]
)
if env["x11"]:
if not env["use_sowrap"]:
if os.system("pkg-config --exists x11"):
print_error("X11 libraries not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config x11 --cflags --libs")
if os.system("pkg-config --exists xcursor"):
print_error("Xcursor library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config xcursor --cflags --libs")
if os.system("pkg-config --exists xinerama"):
print_error("Xinerama library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config xinerama --cflags --libs")
if os.system("pkg-config --exists xext"):
print_error("Xext library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config xext --cflags --libs")
if os.system("pkg-config --exists xrandr"):
print_error("XrandR library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config xrandr --cflags --libs")
if os.system("pkg-config --exists xrender"):
print_error("XRender library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config xrender --cflags --libs")
if os.system("pkg-config --exists xi"):
print_error("Xi library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config xi --cflags --libs")
env.Append(CPPDEFINES=["X11_ENABLED"])
if env["wayland"]:
if not env["use_sowrap"]:
if os.system("pkg-config --exists libdecor-0"):
print_warning("libdecor development libraries not found. Disabling client-side decorations.")
env["libdecor"] = False
else:
env.ParseConfig("pkg-config libdecor-0 --cflags --libs")
if os.system("pkg-config --exists wayland-client"):
print_error("Wayland client library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config wayland-client --cflags --libs")
if os.system("pkg-config --exists wayland-cursor"):
print_error("Wayland cursor library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config wayland-cursor --cflags --libs")
if os.system("pkg-config --exists wayland-egl"):
print_error("Wayland EGL library not found. Aborting.")
sys.exit(255)
env.ParseConfig("pkg-config wayland-egl --cflags --libs")
else:
env.Prepend(CPPEXTPATH=["#thirdparty/linuxbsd_headers/wayland/"])
if env["libdecor"]:
env.Prepend(CPPEXTPATH=["#thirdparty/linuxbsd_headers/libdecor-0/"])
if env["libdecor"]:
env.Append(CPPDEFINES=["LIBDECOR_ENABLED"])
env.Append(CPPDEFINES=["WAYLAND_ENABLED"])
env.Append(LIBS=["rt"]) # Needed by glibc, used by _allocate_shm_file
if env["accesskit"]:
if env["accesskit_sdk_path"] != "":
env.Prepend(CPPPATH=[env["accesskit_sdk_path"] + "/include"])
if env["arch"] == "arm64":
env.Append(LIBPATH=[env["accesskit_sdk_path"] + "/lib/linux/arm64/static/"])
elif env["arch"] == "arm32":
env.Append(LIBPATH=[env["accesskit_sdk_path"] + "/lib/linux/arm32/static/"])
elif env["arch"] == "rv64":
env.Append(LIBPATH=[env["accesskit_sdk_path"] + "/lib/linux/riscv64gc/static/"])
elif env["arch"] == "x86_64":
env.Append(LIBPATH=[env["accesskit_sdk_path"] + "/lib/linux/x86_64/static/"])
elif env["arch"] == "x86_32":
env.Append(LIBPATH=[env["accesskit_sdk_path"] + "/lib/linux/x86/static/"])
env.Append(LIBS=["accesskit"])
else:
env.Append(CPPDEFINES=["ACCESSKIT_DYNAMIC"])
env.Append(CPPDEFINES=["ACCESSKIT_ENABLED"])
if env["vulkan"]:
env.Append(CPPDEFINES=["VULKAN_ENABLED", "RD_ENABLED"])
if not env["use_volk"]:
env.ParseConfig("pkg-config vulkan --cflags --libs")
if not env["builtin_glslang"]:
# No pkgconfig file so far, hardcode expected lib name.
env.Append(LIBS=["glslang", "SPIRV"])
if env["opengl3"]:
env.Append(CPPDEFINES=["GLES3_ENABLED"])
env.Append(LIBS=["pthread"])
if platform.system() == "Linux":
env.Append(LIBS=["dl"])
if platform.libc_ver()[0] != "glibc":
if env["execinfo"]:
env.Append(LIBS=["execinfo"])
env.Append(CPPDEFINES=["CRASH_HANDLER_ENABLED"])
else:
# The default crash handler depends on glibc, so if the host uses
# a different libc (BSD libc, musl), libexecinfo is required.
print_info("Using `execinfo=no` disables the crash handler on platforms where glibc is missing.")
else:
env.Append(CPPDEFINES=["CRASH_HANDLER_ENABLED"])
if platform.system() == "FreeBSD":
env.Append(LINKFLAGS=["-lkvm"])
# Link those statically for portability
if env["use_static_cpp"]:
env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
if env["use_llvm"] and platform.system() != "FreeBSD":
env["LINKCOM"] = env["LINKCOM"] + " -l:libatomic.a"
else:
if env["use_llvm"] and platform.system() != "FreeBSD":
env.Append(LIBS=["atomic"])

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorExportPlatformLinuxBSD" inherits="EditorExportPlatformPC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Exporter for Linux/BSD.
</brief_description>
<description>
</description>
<tutorials>
<link title="Exporting for Linux">$DOCS_URL/tutorials/export/exporting_for_linux.html</link>
</tutorials>
<members>
<member name="binary_format/architecture" type="String" setter="" getter="">
Application executable architecture.
Supported architectures: [code]x86_32[/code], [code]x86_64[/code], [code]arm64[/code], [code]arm32[/code], [code]rv64[/code], [code]ppc64[/code], and [code]loongarch64[/code].
Official export templates include [code]x86_32[/code], [code]x86_64[/code], [code]arm32[/code], and [code]arm64[/code] binaries only.
</member>
<member name="binary_format/embed_pck" type="bool" setter="" getter="">
If [code]true[/code], project resources are embedded into the executable.
</member>
<member name="custom_template/debug" type="String" setter="" getter="">
Path to the custom export template. If left empty, default template is used.
</member>
<member name="custom_template/release" type="String" setter="" getter="">
Path to the custom export template. If left empty, default template is used.
</member>
<member name="debug/export_console_wrapper" type="int" setter="" getter="">
If [code]true[/code], a console wrapper is exported alongside the main executable, which allows running the project with enabled console output.
</member>
<member name="shader_baker/enabled" type="bool" setter="" getter="">
If [code]true[/code], shaders will be compiled and embedded in the application. This option is only supported when using the Forward+ or Mobile renderers.
</member>
<member name="ssh_remote_deploy/cleanup_script" type="String" setter="" getter="">
Script code to execute on the remote host when app is finished.
The following variables can be used in the script:
- [code]{temp_dir}[/code] - Path of temporary folder on the remote, used to upload app and scripts to.
- [code]{archive_name}[/code] - Name of the ZIP containing uploaded application.
- [code]{exe_name}[/code] - Name of application executable.
- [code]{cmd_args}[/code] - Array of the command line argument for the application.
</member>
<member name="ssh_remote_deploy/enabled" type="bool" setter="" getter="">
Enables remote deploy using SSH/SCP.
</member>
<member name="ssh_remote_deploy/extra_args_scp" type="String" setter="" getter="">
Array of the additional command line arguments passed to the SCP.
</member>
<member name="ssh_remote_deploy/extra_args_ssh" type="String" setter="" getter="">
Array of the additional command line arguments passed to the SSH.
</member>
<member name="ssh_remote_deploy/host" type="String" setter="" getter="">
Remote host SSH user name and address, in [code]user@address[/code] format.
</member>
<member name="ssh_remote_deploy/port" type="String" setter="" getter="">
Remote host SSH port number.
</member>
<member name="ssh_remote_deploy/run_script" type="String" setter="" getter="">
Script code to execute on the remote host when running the app.
The following variables can be used in the script:
- [code]{temp_dir}[/code] - Path of temporary folder on the remote, used to upload app and scripts to.
- [code]{archive_name}[/code] - Name of the ZIP containing uploaded application.
- [code]{exe_name}[/code] - Name of application executable.
- [code]{cmd_args}[/code] - Array of the command line argument for the application.
</member>
<member name="texture_format/etc2_astc" type="bool" setter="" getter="">
If [code]true[/code], project textures are exported in the ETC2/ASTC format.
</member>
<member name="texture_format/s3tc_bptc" type="bool" setter="" getter="">
If [code]true[/code], project textures are exported in the S3TC/BPTC format.
</member>
</members>
</class>

View File

@@ -0,0 +1,49 @@
/**************************************************************************/
/* export.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "export.h"
#include "export_plugin.h"
#include "editor/export/editor_export.h"
void register_linuxbsd_exporter_types() {
GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformLinuxBSD);
}
void register_linuxbsd_exporter() {
Ref<EditorExportPlatformLinuxBSD> platform;
platform.instantiate();
platform->set_name("Linux");
platform->set_os_name("Linux");
platform->set_chmod_flags(0755);
EditorExport::get_singleton()->add_export_platform(platform);
}

View File

@@ -0,0 +1,34 @@
/**************************************************************************/
/* export.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
void register_linuxbsd_exporter_types();
void register_linuxbsd_exporter();

View File

@@ -0,0 +1,633 @@
/**************************************************************************/
/* export_plugin.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "export_plugin.h"
#include "logo_svg.gen.h"
#include "run_icon_svg.gen.h"
#include "core/config/project_settings.h"
#include "editor/editor_node.h"
#include "editor/editor_string_names.h"
#include "editor/export/editor_export.h"
#include "editor/file_system/editor_paths.h"
#include "editor/themes/editor_scale.h"
#include "modules/svg/image_loader_svg.h"
Error EditorExportPlatformLinuxBSD::_export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path) {
Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::WRITE);
if (f.is_null()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Debug Script Export"), vformat(TTR("Could not open file \"%s\"."), p_path));
return ERR_CANT_CREATE;
}
f->store_line("#!/bin/sh");
f->store_line("printf '\\033c\\033]0;%s\\a' " + p_app_name);
f->store_line("base_path=\"$(dirname \"$(realpath \"$0\")\")\"");
f->store_line("\"$base_path/" + p_pkg_name + "\" \"$@\"");
return OK;
}
Error EditorExportPlatformLinuxBSD::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags) {
String custom_debug = p_preset->get("custom_template/debug");
String custom_release = p_preset->get("custom_template/release");
String arch = p_preset->get("binary_format/architecture");
String template_path = p_debug ? custom_debug : custom_release;
template_path = template_path.strip_edges();
if (!template_path.is_empty()) {
String exe_arch = _get_exe_arch(template_path);
if (arch != exe_arch) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Templates"), vformat(TTR("Mismatching custom export template executable architecture: found \"%s\", expected \"%s\"."), exe_arch, arch));
return ERR_CANT_CREATE;
}
}
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
if (da->file_exists(template_path.get_base_dir().path_join("libaccesskit." + arch + ".so"))) {
da->copy(template_path.get_base_dir().path_join("libaccesskit." + arch + ".so"), p_path.get_base_dir().path_join("libaccesskit." + arch + ".so"), get_chmod_flags());
}
bool export_as_zip = p_path.ends_with("zip");
String pkg_name;
if (String(get_project_setting(p_preset, "application/config/name")) != "") {
pkg_name = String(get_project_setting(p_preset, "application/config/name"));
} else {
pkg_name = "Unnamed";
}
pkg_name = OS::get_singleton()->get_safe_dir_name(pkg_name);
// Setup temp folder.
String path = p_path;
String tmp_dir_path = EditorPaths::get_singleton()->get_temp_dir().path_join(pkg_name);
Ref<DirAccess> tmp_app_dir = DirAccess::create_for_path(tmp_dir_path);
if (export_as_zip) {
if (tmp_app_dir.is_null()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Templates"), vformat(TTR("Could not create and open the directory: \"%s\""), tmp_dir_path));
return ERR_CANT_CREATE;
}
if (DirAccess::exists(tmp_dir_path)) {
if (tmp_app_dir->change_dir(tmp_dir_path) == OK) {
tmp_app_dir->erase_contents_recursive();
}
}
tmp_app_dir->make_dir_recursive(tmp_dir_path);
path = tmp_dir_path.path_join(p_path.get_file().get_basename());
}
// Export project.
Error err = EditorExportPlatformPC::export_project(p_preset, p_debug, path, p_flags);
if (err != OK) {
// Message is supplied by the subroutine method.
return err;
}
// Save console wrapper.
int con_scr = p_preset->get("debug/export_console_wrapper");
if ((con_scr == 1 && p_debug) || (con_scr == 2)) {
String scr_path = path.get_basename() + ".sh";
err = _export_debug_script(p_preset, pkg_name, path.get_file(), scr_path);
FileAccess::set_unix_permissions(scr_path, 0755);
if (err != OK) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Debug Console Export"), TTR("Could not create console wrapper."));
}
}
// ZIP project.
if (export_as_zip) {
if (FileAccess::exists(p_path)) {
OS::get_singleton()->move_to_trash(p_path);
}
Ref<FileAccess> io_fa_dst;
zlib_filefunc_def io_dst = zipio_create_io(&io_fa_dst);
zipFile zip = zipOpen2(p_path.utf8().get_data(), APPEND_STATUS_CREATE, nullptr, &io_dst);
zip_folder_recursive(zip, tmp_dir_path, "", pkg_name);
zipClose(zip, nullptr);
if (tmp_app_dir->change_dir(tmp_dir_path) == OK) {
tmp_app_dir->erase_contents_recursive();
tmp_app_dir->change_dir("..");
tmp_app_dir->remove(pkg_name);
}
}
return err;
}
String EditorExportPlatformLinuxBSD::get_template_file_name(const String &p_target, const String &p_arch) const {
return "linux_" + p_target + "." + p_arch;
}
List<String> EditorExportPlatformLinuxBSD::get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
List<String> list;
list.push_back(p_preset->get("binary_format/architecture"));
list.push_back("zip");
return list;
}
bool EditorExportPlatformLinuxBSD::get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const {
if (p_preset == nullptr) {
return true;
}
bool advanced_options_enabled = p_preset->are_advanced_options_enabled();
// Hide SSH options.
bool ssh = p_preset->get("ssh_remote_deploy/enabled");
if (!ssh && p_option != "ssh_remote_deploy/enabled" && p_option.begins_with("ssh_remote_deploy/")) {
return false;
}
if (p_option == "dotnet/embed_build_outputs" ||
p_option == "custom_template/debug" ||
p_option == "custom_template/release") {
return advanced_options_enabled;
}
return true;
}
void EditorExportPlatformLinuxBSD::get_export_options(List<ExportOption> *r_options) const {
EditorExportPlatformPC::get_export_options(r_options);
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "x86_64,x86_32,arm64,arm32,rv64,ppc64,loongarch64"), "x86_64"));
String run_script = "#!/usr/bin/env bash\n"
"export DISPLAY=:0\n"
"unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"\n"
"\"{temp_dir}/{exe_name}\" {cmd_args}";
String cleanup_script = "#!/usr/bin/env bash\n"
"kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")\n"
"rm -rf \"{temp_dir}\"";
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "ssh_remote_deploy/enabled"), false, true));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/host"), "user@host_ip"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/port"), "22"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_ssh", PROPERTY_HINT_MULTILINE_TEXT), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_scp", PROPERTY_HINT_MULTILINE_TEXT), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/run_script", PROPERTY_HINT_MULTILINE_TEXT), run_script));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/cleanup_script", PROPERTY_HINT_MULTILINE_TEXT), cleanup_script));
}
bool EditorExportPlatformLinuxBSD::is_elf(const String &p_path) const {
Ref<FileAccess> fb = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_V_MSG(fb.is_null(), false, vformat("Can't open file: \"%s\".", p_path));
uint32_t magic = fb->get_32();
return (magic == 0x464c457f);
}
bool EditorExportPlatformLinuxBSD::is_shebang(const String &p_path) const {
Ref<FileAccess> fb = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_V_MSG(fb.is_null(), false, vformat("Can't open file: \"%s\".", p_path));
uint16_t magic = fb->get_16();
return (magic == 0x2123);
}
bool EditorExportPlatformLinuxBSD::is_executable(const String &p_path) const {
return is_elf(p_path) || is_shebang(p_path);
}
bool EditorExportPlatformLinuxBSD::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const {
String err;
bool valid = EditorExportPlatformPC::has_valid_export_configuration(p_preset, err, r_missing_templates, p_debug);
String custom_debug = p_preset->get("custom_template/debug").operator String().strip_edges();
String custom_release = p_preset->get("custom_template/release").operator String().strip_edges();
String arch = p_preset->get("binary_format/architecture");
if (!custom_debug.is_empty() && FileAccess::exists(custom_debug)) {
String exe_arch = _get_exe_arch(custom_debug);
if (arch != exe_arch) {
err += vformat(TTR("Mismatching custom debug export template executable architecture: found \"%s\", expected \"%s\"."), exe_arch, arch) + "\n";
}
}
if (!custom_release.is_empty() && FileAccess::exists(custom_release)) {
String exe_arch = _get_exe_arch(custom_release);
if (arch != exe_arch) {
err += vformat(TTR("Mismatching custom release export template executable architecture: found \"%s\", expected \"%s\"."), exe_arch, arch) + "\n";
}
}
if (!err.is_empty()) {
r_error = err;
}
return valid;
}
String EditorExportPlatformLinuxBSD::_get_exe_arch(const String &p_path) const {
Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ);
if (f.is_null()) {
return "invalid";
}
// Read and check ELF magic number.
{
uint32_t magic = f->get_32();
if (magic != 0x464c457f) { // 0x7F + "ELF"
return "invalid";
}
}
// Process header.
int64_t header_pos = f->get_position();
f->seek(header_pos + 14);
uint16_t machine = f->get_16();
f->close();
switch (machine) {
case 0x0003:
return "x86_32";
case 0x003e:
return "x86_64";
case 0x0015:
return "ppc64";
case 0x0028:
return "arm32";
case 0x00b7:
return "arm64";
case 0x00f3:
return "rv64";
case 0x0102:
return "loongarch64";
default:
return "unknown";
}
}
Error EditorExportPlatformLinuxBSD::fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) {
// Patch the header of the "pck" section in the ELF file so that it corresponds to the embedded data.
Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ_WRITE);
if (f.is_null()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("PCK Embedding"), vformat(TTR("Failed to open executable file \"%s\"."), p_path));
return ERR_CANT_OPEN;
}
// Read and check ELF magic number.
{
uint32_t magic = f->get_32();
if (magic != 0x464c457f) { // 0x7F + "ELF"
add_message(EXPORT_MESSAGE_ERROR, TTR("PCK Embedding"), TTR("Executable file header corrupted."));
return ERR_FILE_CORRUPT;
}
}
// Read program architecture bits from class field.
int bits = f->get_8() * 32;
if (bits == 32 && p_embedded_size >= 0x100000000) {
add_message(EXPORT_MESSAGE_ERROR, TTR("PCK Embedding"), TTR("32-bit executables cannot have embedded data >= 4 GiB."));
}
// Get info about the section header table.
int64_t section_table_pos;
int64_t section_header_size;
if (bits == 32) {
section_header_size = 40;
f->seek(0x20);
section_table_pos = f->get_32();
f->seek(0x30);
} else { // 64
section_header_size = 64;
f->seek(0x28);
section_table_pos = f->get_64();
f->seek(0x3c);
}
int num_sections = f->get_16();
int string_section_idx = f->get_16();
// Load the strings table.
uint8_t *strings;
{
// Jump to the strings section header.
f->seek(section_table_pos + string_section_idx * section_header_size);
// Read strings data size and offset.
int64_t string_data_pos;
int64_t string_data_size;
if (bits == 32) {
f->seek(f->get_position() + 0x10);
string_data_pos = f->get_32();
string_data_size = f->get_32();
} else { // 64
f->seek(f->get_position() + 0x18);
string_data_pos = f->get_64();
string_data_size = f->get_64();
}
// Read strings data.
f->seek(string_data_pos);
strings = (uint8_t *)memalloc(string_data_size);
if (!strings) {
return ERR_OUT_OF_MEMORY;
}
f->get_buffer(strings, string_data_size);
}
// Search for the "pck" section.
bool found = false;
for (int i = 0; i < num_sections; ++i) {
int64_t section_header_pos = section_table_pos + i * section_header_size;
f->seek(section_header_pos);
uint32_t name_offset = f->get_32();
if (strcmp((char *)strings + name_offset, "pck") == 0) {
// "pck" section found, let's patch!
if (bits == 32) {
f->seek(section_header_pos + 0x10);
f->store_32(p_embedded_start);
f->store_32(p_embedded_size);
} else { // 64
f->seek(section_header_pos + 0x18);
f->store_64(p_embedded_start);
f->store_64(p_embedded_size);
}
found = true;
break;
}
}
memfree(strings);
if (!found) {
add_message(EXPORT_MESSAGE_ERROR, TTR("PCK Embedding"), TTR("Executable \"pck\" section not found."));
return ERR_FILE_CORRUPT;
}
return OK;
}
Ref<Texture2D> EditorExportPlatformLinuxBSD::get_run_icon() const {
return run_icon;
}
bool EditorExportPlatformLinuxBSD::poll_export() {
Ref<EditorExportPreset> preset;
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
Ref<EditorExportPreset> ep = EditorExport::get_singleton()->get_export_preset(i);
if (ep->is_runnable() && ep->get_platform() == this) {
preset = ep;
break;
}
}
int prev = menu_options;
menu_options = (preset.is_valid() && preset->get("ssh_remote_deploy/enabled").operator bool());
if (ssh_pid != 0 || !cleanup_commands.is_empty()) {
if (menu_options == 0) {
cleanup();
} else {
menu_options += 1;
}
}
return menu_options != prev;
}
Ref<Texture2D> EditorExportPlatformLinuxBSD::get_option_icon(int p_index) const {
if (p_index == 1) {
return stop_icon;
} else {
return EditorExportPlatform::get_option_icon(p_index);
}
}
int EditorExportPlatformLinuxBSD::get_options_count() const {
return menu_options;
}
String EditorExportPlatformLinuxBSD::get_option_label(int p_index) const {
return (p_index) ? TTR("Stop and uninstall") : TTR("Run on remote Linux/BSD system");
}
String EditorExportPlatformLinuxBSD::get_option_tooltip(int p_index) const {
return (p_index) ? TTR("Stop and uninstall running project from the remote system") : TTR("Run exported project on remote Linux/BSD system");
}
void EditorExportPlatformLinuxBSD::cleanup() {
if (ssh_pid != 0 && OS::get_singleton()->is_process_running(ssh_pid)) {
print_line("Terminating connection...");
OS::get_singleton()->kill(ssh_pid);
OS::get_singleton()->delay_usec(1000);
}
if (!cleanup_commands.is_empty()) {
print_line("Stopping and deleting previous version...");
for (const SSHCleanupCommand &cmd : cleanup_commands) {
if (cmd.wait) {
ssh_run_on_remote(cmd.host, cmd.port, cmd.ssh_args, cmd.cmd_args);
} else {
ssh_run_on_remote_no_wait(cmd.host, cmd.port, cmd.ssh_args, cmd.cmd_args);
}
}
}
ssh_pid = 0;
cleanup_commands.clear();
}
Error EditorExportPlatformLinuxBSD::run(const Ref<EditorExportPreset> &p_preset, int p_device, BitField<EditorExportPlatform::DebugFlags> p_debug_flags) {
cleanup();
if (p_device) { // Stop command, cleanup only.
return OK;
}
EditorProgress ep("run", TTR("Running..."), 5);
const String dest = EditorPaths::get_singleton()->get_temp_dir().path_join("linuxbsd");
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
if (!da->dir_exists(dest)) {
Error err = da->make_dir_recursive(dest);
if (err != OK) {
EditorNode::get_singleton()->show_warning(TTR("Could not create temp directory:") + "\n" + dest);
return err;
}
}
String host = p_preset->get("ssh_remote_deploy/host").operator String();
String port = p_preset->get("ssh_remote_deploy/port").operator String();
if (port.is_empty()) {
port = "22";
}
Vector<String> extra_args_ssh = p_preset->get("ssh_remote_deploy/extra_args_ssh").operator String().split(" ", false);
Vector<String> extra_args_scp = p_preset->get("ssh_remote_deploy/extra_args_scp").operator String().split(" ", false);
const String basepath = dest.path_join("tmp_linuxbsd_export");
#define CLEANUP_AND_RETURN(m_err) \
{ \
if (da->file_exists(basepath + ".zip")) { \
da->remove(basepath + ".zip"); \
} \
if (da->file_exists(basepath + "_start.sh")) { \
da->remove(basepath + "_start.sh"); \
} \
if (da->file_exists(basepath + "_clean.sh")) { \
da->remove(basepath + "_clean.sh"); \
} \
return m_err; \
} \
((void)0)
if (ep.step(TTR("Exporting project..."), 1)) {
return ERR_SKIP;
}
Error err = export_project(p_preset, true, basepath + ".zip", p_debug_flags);
if (err != OK) {
DirAccess::remove_file_or_error(basepath + ".zip");
return err;
}
String cmd_args;
{
Vector<String> cmd_args_list = gen_export_flags(p_debug_flags);
for (int i = 0; i < cmd_args_list.size(); i++) {
if (i != 0) {
cmd_args += " ";
}
cmd_args += cmd_args_list[i];
}
}
const bool use_remote = p_debug_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG) || p_debug_flags.has_flag(DEBUG_FLAG_DUMB_CLIENT);
int dbg_port = EDITOR_GET("network/debug/remote_port");
print_line("Creating temporary directory...");
ep.step(TTR("Creating temporary directory..."), 2);
String temp_dir;
err = ssh_run_on_remote(host, port, extra_args_ssh, "mktemp -d", &temp_dir);
if (err != OK || temp_dir.is_empty()) {
CLEANUP_AND_RETURN(err);
}
print_line("Uploading archive...");
ep.step(TTR("Uploading archive..."), 3);
err = ssh_push_to_remote(host, port, extra_args_scp, basepath + ".zip", temp_dir);
if (err != OK) {
CLEANUP_AND_RETURN(err);
}
{
String run_script = p_preset->get("ssh_remote_deploy/run_script");
run_script = run_script.replace("{temp_dir}", temp_dir);
run_script = run_script.replace("{archive_name}", basepath.get_file() + ".zip");
run_script = run_script.replace("{exe_name}", basepath.get_file());
run_script = run_script.replace("{cmd_args}", cmd_args);
Ref<FileAccess> f = FileAccess::open(basepath + "_start.sh", FileAccess::WRITE);
if (f.is_null()) {
CLEANUP_AND_RETURN(err);
}
f->store_string(run_script);
}
{
String clean_script = p_preset->get("ssh_remote_deploy/cleanup_script");
clean_script = clean_script.replace("{temp_dir}", temp_dir);
clean_script = clean_script.replace("{archive_name}", basepath.get_file() + ".zip");
clean_script = clean_script.replace("{exe_name}", basepath.get_file());
clean_script = clean_script.replace("{cmd_args}", cmd_args);
Ref<FileAccess> f = FileAccess::open(basepath + "_clean.sh", FileAccess::WRITE);
if (f.is_null()) {
CLEANUP_AND_RETURN(err);
}
f->store_string(clean_script);
}
print_line("Uploading scripts...");
ep.step(TTR("Uploading scripts..."), 4);
err = ssh_push_to_remote(host, port, extra_args_scp, basepath + "_start.sh", temp_dir);
if (err != OK) {
CLEANUP_AND_RETURN(err);
}
err = ssh_run_on_remote(host, port, extra_args_ssh, vformat("chmod +x \"%s/%s\"", temp_dir, basepath.get_file() + "_start.sh"));
if (err != OK || temp_dir.is_empty()) {
CLEANUP_AND_RETURN(err);
}
err = ssh_push_to_remote(host, port, extra_args_scp, basepath + "_clean.sh", temp_dir);
if (err != OK) {
CLEANUP_AND_RETURN(err);
}
err = ssh_run_on_remote(host, port, extra_args_ssh, vformat("chmod +x \"%s/%s\"", temp_dir, basepath.get_file() + "_clean.sh"));
if (err != OK || temp_dir.is_empty()) {
CLEANUP_AND_RETURN(err);
}
print_line("Starting project...");
ep.step(TTR("Starting project..."), 5);
err = ssh_run_on_remote_no_wait(host, port, extra_args_ssh, vformat("\"%s/%s\"", temp_dir, basepath.get_file() + "_start.sh"), &ssh_pid, (use_remote) ? dbg_port : -1);
if (err != OK) {
CLEANUP_AND_RETURN(err);
}
cleanup_commands.clear();
cleanup_commands.push_back(SSHCleanupCommand(host, port, extra_args_ssh, vformat("\"%s/%s\"", temp_dir, basepath.get_file() + "_clean.sh")));
print_line("Project started.");
CLEANUP_AND_RETURN(OK);
#undef CLEANUP_AND_RETURN
}
EditorExportPlatformLinuxBSD::EditorExportPlatformLinuxBSD() {
if (EditorNode::get_singleton()) {
Ref<Image> img = memnew(Image);
const bool upsample = !Math::is_equal_approx(Math::round(EDSCALE), EDSCALE);
ImageLoaderSVG::create_image_from_string(img, _linuxbsd_logo_svg, EDSCALE, upsample, false);
set_logo(ImageTexture::create_from_image(img));
ImageLoaderSVG::create_image_from_string(img, _linuxbsd_run_icon_svg, EDSCALE, upsample, false);
run_icon = ImageTexture::create_from_image(img);
Ref<Theme> theme = EditorNode::get_singleton()->get_editor_theme();
if (theme.is_valid()) {
stop_icon = theme->get_icon(SNAME("Stop"), EditorStringName(EditorIcons));
} else {
stop_icon.instantiate();
}
}
}

View File

@@ -0,0 +1,93 @@
/**************************************************************************/
/* export_plugin.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#include "core/io/file_access.h"
#include "editor/export/editor_export_platform_pc.h"
#include "editor/settings/editor_settings.h"
#include "scene/resources/image_texture.h"
class EditorExportPlatformLinuxBSD : public EditorExportPlatformPC {
GDCLASS(EditorExportPlatformLinuxBSD, EditorExportPlatformPC);
HashMap<String, String> extensions;
struct SSHCleanupCommand {
String host;
String port;
Vector<String> ssh_args;
String cmd_args;
bool wait = false;
SSHCleanupCommand() {}
SSHCleanupCommand(const String &p_host, const String &p_port, const Vector<String> &p_ssh_arg, const String &p_cmd_args, bool p_wait = false) {
host = p_host;
port = p_port;
ssh_args = p_ssh_arg;
cmd_args = p_cmd_args;
wait = p_wait;
}
};
Ref<ImageTexture> run_icon;
Ref<ImageTexture> stop_icon;
Vector<SSHCleanupCommand> cleanup_commands;
OS::ProcessID ssh_pid = 0;
int menu_options = 0;
bool is_elf(const String &p_path) const;
bool is_shebang(const String &p_path) const;
Error _export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path);
String _get_exe_arch(const String &p_path) const;
public:
virtual void get_export_options(List<ExportOption> *r_options) const override;
virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override;
virtual bool get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const override;
virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override;
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags = 0) override;
virtual String get_template_file_name(const String &p_target, const String &p_arch) const override;
virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) override;
virtual bool is_executable(const String &p_path) const override;
virtual Ref<Texture2D> get_run_icon() const override;
virtual bool poll_export() override;
virtual Ref<Texture2D> get_option_icon(int p_index) const override;
virtual int get_options_count() const override;
virtual String get_option_label(int p_index) const override;
virtual String get_option_tooltip(int p_index) const override;
virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_device, BitField<EditorExportPlatform::DebugFlags> p_debug_flags) override;
virtual void cleanup() override;
EditorExportPlatformLinuxBSD();
};

View File

@@ -0,0 +1 @@
<svg width="32" height="32"><path fill="#fff" d="M13 31h6s3 0 6-6c2.864-5.727-6-17-6-17h-6S3.775 18.55 7 25c3 6 6 6 6 6z"/><path fill="#333" d="M15.876 28.636c-.05.322-.116.637-.204.941-.142.496-.35.993-.659 1.416.32.02.649.023.985.007a9.1 9.1 0 0 0 .985-.007c-.309-.423-.516-.92-.659-1.416a7.666 7.666 0 0 1-.203-.94l-.123.003c-.04 0-.081-.003-.122-.004z"/><path fill="#f4bb37" d="M21.693 21.916c-.629.01-.934.633-1.497.7-.694.08-1.128-.722-2.11-.123-.98.6-1.826 7.473.45 8.409 2.274.935 6.506-4.545 6.23-5.662-.275-1.116-1.146-.853-1.582-1.399-.436-.545.003-1.41-.995-1.82a1.246 1.246 0 0 0-.496-.105zm-11.461 0a1.315 1.315 0 0 0-.421.105c-.998.41-.56 1.275-.995 1.82-.436.546-1.31.283-1.586 1.4-.275 1.116 3.956 6.596 6.232 5.66 2.275-.935 1.429-7.808.448-8.408-.981-.6-1.415.204-2.11.122-.584-.068-.888-.739-1.568-.7z"/><path fill="#333" d="M15.998.99c-2.934 0-4.657 1.79-4.982 4.204-.324 2.414.198 2.856-.614 5.328-.813 2.472-4.456 6.71-4.37 10.62.026 1.217.166 2.27.41 3.192.3-.496.743-.846 1.066-.995.253-.117.375-.173.432-.194.008-.062.04-.205.098-.485.08-.386.387-.99.91-1.386-.005-.12-.01-.239-.013-.363-.06-3.033 3.073-6.318 3.65-8.236.577-1.917.326-2.114.421-2.59.096-.477.463-1.032.992-1.475a.23.23 0 0 1 .15-.06c.482-.005.965 1.75 1.898 1.752.933 0 1.419-2.141 1.956-1.692.529.443.896.998.992 1.474.095.477-.156.674.42 2.591.578 1.918 3.708 5.203 3.648 8.236-.003.123-.008.24-.014.36.526.396.834 1.002.914 1.389.058.28.09.423.098.485.057.021.18.08.432.197.323.15.764.499 1.063.995.244-.922.387-1.976.414-3.195.085-3.91-3.562-8.148-4.374-10.62-.813-2.472-.287-2.914-.611-5.328C20.659 2.78 18.933.99 15.998.99z"/></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="16" height="16"><path fill="#e0e0e0" d="M7.941 13.966a3.62 3.62 0 0 1-.096.444 2.129 2.129 0 0 1-.31.668c.15.01.305.01.464.003.16.008.314.007.465-.003a2.129 2.129 0 0 1-.31-.668 3.62 3.62 0 0 1-.097-.444zM8 .914c-1.386 0-2.2.845-2.353 1.985-.153 1.14.094 1.348-.29 2.515s-2.103 3.168-2.063 5.013c.012.575.078 1.072.194 1.507a1.25 1.25 0 0 1 .503-.47 4.37 4.37 0 0 1 .204-.09c.004-.03.019-.098.046-.23.038-.182.183-.467.43-.654a4.773 4.773 0 0 1-.006-.172c-.029-1.431 1.45-2.982 1.723-3.888.272-.905.154-.998.199-1.223.045-.225.218-.487.468-.696.253-.211.483.798.945.799.462 0 .692-1.01.945-.799.25.21.423.471.468.696.045.225-.073.318.199 1.223.272.906 1.75 2.457 1.722 3.888a4.773 4.773 0 0 0-.007.17 1.2 1.2 0 0 1 .432.656c.027.132.042.2.046.23.027.01.085.037.204.092.153.07.36.236.502.47.115-.435.183-.933.195-1.509.04-1.845-1.681-3.846-2.065-5.013-.383-1.167-.135-1.376-.288-2.515C10.2 1.759 9.385.914 7.999.914z"/><path fill="#e0e0e0" d="M10.688 10.793c-.297.005-.441.299-.707.33-.328.038-.533-.34-.996-.058-.463.283-.862 3.528.212 3.97 1.074.442 3.072-2.146 2.942-2.673-.13-.527-.542-.403-.747-.66-.206-.258 0-.666-.47-.86a.588.588 0 0 0-.234-.05zm-5.411 0a.62.62 0 0 0-.199.05c-.47.193-.264.601-.47.859-.205.257-.618.133-.748.66s1.867 3.115 2.942 2.673c1.074-.442.674-3.687.211-3.97-.463-.283-.668.096-.995.058-.277-.032-.42-.349-.741-.33z"/></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,838 @@
#ifndef DYLIBLOAD_WRAPPER_FONTCONFIG
#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 2023-01-12 10:15:54
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/fontconfig/fontconfig.h --sys-include "thirdparty/linuxbsd_headers/fontconfig/fontconfig.h" --soname libfontconfig.so.1 --init-name fontconfig --omit-prefix FcCharSetFirst --omit-prefix FcCharSetNext --output-header ./platform/linuxbsd/fontconfig-so_wrap.h --output-implementation ./platform/linuxbsd/fontconfig-so_wrap.c
//
#include <stdint.h>
#define FcBlanksCreate FcBlanksCreate_dylibloader_orig_fontconfig
#define FcBlanksDestroy FcBlanksDestroy_dylibloader_orig_fontconfig
#define FcBlanksAdd FcBlanksAdd_dylibloader_orig_fontconfig
#define FcBlanksIsMember FcBlanksIsMember_dylibloader_orig_fontconfig
#define FcCacheDir FcCacheDir_dylibloader_orig_fontconfig
#define FcCacheCopySet FcCacheCopySet_dylibloader_orig_fontconfig
#define FcCacheSubdir FcCacheSubdir_dylibloader_orig_fontconfig
#define FcCacheNumSubdir FcCacheNumSubdir_dylibloader_orig_fontconfig
#define FcCacheNumFont FcCacheNumFont_dylibloader_orig_fontconfig
#define FcDirCacheUnlink FcDirCacheUnlink_dylibloader_orig_fontconfig
#define FcDirCacheValid FcDirCacheValid_dylibloader_orig_fontconfig
#define FcDirCacheClean FcDirCacheClean_dylibloader_orig_fontconfig
#define FcCacheCreateTagFile FcCacheCreateTagFile_dylibloader_orig_fontconfig
#define FcConfigHome FcConfigHome_dylibloader_orig_fontconfig
#define FcConfigEnableHome FcConfigEnableHome_dylibloader_orig_fontconfig
#define FcConfigFilename FcConfigFilename_dylibloader_orig_fontconfig
#define FcConfigCreate FcConfigCreate_dylibloader_orig_fontconfig
#define FcConfigReference FcConfigReference_dylibloader_orig_fontconfig
#define FcConfigDestroy FcConfigDestroy_dylibloader_orig_fontconfig
#define FcConfigSetCurrent FcConfigSetCurrent_dylibloader_orig_fontconfig
#define FcConfigGetCurrent FcConfigGetCurrent_dylibloader_orig_fontconfig
#define FcConfigUptoDate FcConfigUptoDate_dylibloader_orig_fontconfig
#define FcConfigBuildFonts FcConfigBuildFonts_dylibloader_orig_fontconfig
#define FcConfigGetFontDirs FcConfigGetFontDirs_dylibloader_orig_fontconfig
#define FcConfigGetConfigDirs FcConfigGetConfigDirs_dylibloader_orig_fontconfig
#define FcConfigGetConfigFiles FcConfigGetConfigFiles_dylibloader_orig_fontconfig
#define FcConfigGetCache FcConfigGetCache_dylibloader_orig_fontconfig
#define FcConfigGetBlanks FcConfigGetBlanks_dylibloader_orig_fontconfig
#define FcConfigGetCacheDirs FcConfigGetCacheDirs_dylibloader_orig_fontconfig
#define FcConfigGetRescanInterval FcConfigGetRescanInterval_dylibloader_orig_fontconfig
#define FcConfigSetRescanInterval FcConfigSetRescanInterval_dylibloader_orig_fontconfig
#define FcConfigGetFonts FcConfigGetFonts_dylibloader_orig_fontconfig
#define FcConfigAppFontAddFile FcConfigAppFontAddFile_dylibloader_orig_fontconfig
#define FcConfigAppFontAddDir FcConfigAppFontAddDir_dylibloader_orig_fontconfig
#define FcConfigAppFontClear FcConfigAppFontClear_dylibloader_orig_fontconfig
#define FcConfigSubstituteWithPat FcConfigSubstituteWithPat_dylibloader_orig_fontconfig
#define FcConfigSubstitute FcConfigSubstitute_dylibloader_orig_fontconfig
#define FcConfigGetSysRoot FcConfigGetSysRoot_dylibloader_orig_fontconfig
#define FcConfigSetSysRoot FcConfigSetSysRoot_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
#define FcGetDefaultLangs FcGetDefaultLangs_dylibloader_orig_fontconfig
#define FcDefaultSubstitute FcDefaultSubstitute_dylibloader_orig_fontconfig
#define FcFileIsDir FcFileIsDir_dylibloader_orig_fontconfig
#define FcFileScan FcFileScan_dylibloader_orig_fontconfig
#define FcDirScan FcDirScan_dylibloader_orig_fontconfig
#define FcDirSave FcDirSave_dylibloader_orig_fontconfig
#define FcDirCacheLoad FcDirCacheLoad_dylibloader_orig_fontconfig
#define FcDirCacheRescan FcDirCacheRescan_dylibloader_orig_fontconfig
#define FcDirCacheRead FcDirCacheRead_dylibloader_orig_fontconfig
#define FcDirCacheLoadFile FcDirCacheLoadFile_dylibloader_orig_fontconfig
#define FcDirCacheUnload FcDirCacheUnload_dylibloader_orig_fontconfig
#define FcFreeTypeQuery FcFreeTypeQuery_dylibloader_orig_fontconfig
#define FcFontSetCreate FcFontSetCreate_dylibloader_orig_fontconfig
#define FcFontSetDestroy FcFontSetDestroy_dylibloader_orig_fontconfig
#define FcFontSetAdd FcFontSetAdd_dylibloader_orig_fontconfig
#define FcInitLoadConfig FcInitLoadConfig_dylibloader_orig_fontconfig
#define FcInitLoadConfigAndFonts FcInitLoadConfigAndFonts_dylibloader_orig_fontconfig
#define FcInit FcInit_dylibloader_orig_fontconfig
#define FcFini FcFini_dylibloader_orig_fontconfig
#define FcGetVersion FcGetVersion_dylibloader_orig_fontconfig
#define FcInitReinitialize FcInitReinitialize_dylibloader_orig_fontconfig
#define FcInitBringUptoDate FcInitBringUptoDate_dylibloader_orig_fontconfig
#define FcGetLangs FcGetLangs_dylibloader_orig_fontconfig
#define FcLangNormalize FcLangNormalize_dylibloader_orig_fontconfig
#define FcLangGetCharSet FcLangGetCharSet_dylibloader_orig_fontconfig
#define FcLangSetCreate FcLangSetCreate_dylibloader_orig_fontconfig
#define FcLangSetDestroy FcLangSetDestroy_dylibloader_orig_fontconfig
#define FcLangSetCopy FcLangSetCopy_dylibloader_orig_fontconfig
#define FcLangSetAdd FcLangSetAdd_dylibloader_orig_fontconfig
#define FcLangSetDel FcLangSetDel_dylibloader_orig_fontconfig
#define FcLangSetHasLang FcLangSetHasLang_dylibloader_orig_fontconfig
#define FcLangSetCompare FcLangSetCompare_dylibloader_orig_fontconfig
#define FcLangSetContains FcLangSetContains_dylibloader_orig_fontconfig
#define FcLangSetEqual FcLangSetEqual_dylibloader_orig_fontconfig
#define FcLangSetHash FcLangSetHash_dylibloader_orig_fontconfig
#define FcLangSetGetLangs FcLangSetGetLangs_dylibloader_orig_fontconfig
#define FcLangSetUnion FcLangSetUnion_dylibloader_orig_fontconfig
#define FcLangSetSubtract FcLangSetSubtract_dylibloader_orig_fontconfig
#define FcObjectSetCreate FcObjectSetCreate_dylibloader_orig_fontconfig
#define FcObjectSetAdd FcObjectSetAdd_dylibloader_orig_fontconfig
#define FcObjectSetDestroy FcObjectSetDestroy_dylibloader_orig_fontconfig
#define FcObjectSetVaBuild FcObjectSetVaBuild_dylibloader_orig_fontconfig
#define FcObjectSetBuild FcObjectSetBuild_dylibloader_orig_fontconfig
#define FcFontSetList FcFontSetList_dylibloader_orig_fontconfig
#define FcFontList FcFontList_dylibloader_orig_fontconfig
#define FcAtomicCreate FcAtomicCreate_dylibloader_orig_fontconfig
#define FcAtomicLock FcAtomicLock_dylibloader_orig_fontconfig
#define FcAtomicNewFile FcAtomicNewFile_dylibloader_orig_fontconfig
#define FcAtomicOrigFile FcAtomicOrigFile_dylibloader_orig_fontconfig
#define FcAtomicReplaceOrig FcAtomicReplaceOrig_dylibloader_orig_fontconfig
#define FcAtomicDeleteNew FcAtomicDeleteNew_dylibloader_orig_fontconfig
#define FcAtomicUnlock FcAtomicUnlock_dylibloader_orig_fontconfig
#define FcAtomicDestroy FcAtomicDestroy_dylibloader_orig_fontconfig
#define FcFontSetMatch FcFontSetMatch_dylibloader_orig_fontconfig
#define FcFontMatch FcFontMatch_dylibloader_orig_fontconfig
#define FcFontRenderPrepare FcFontRenderPrepare_dylibloader_orig_fontconfig
#define FcFontSetSort FcFontSetSort_dylibloader_orig_fontconfig
#define FcFontSort FcFontSort_dylibloader_orig_fontconfig
#define FcFontSetSortDestroy FcFontSetSortDestroy_dylibloader_orig_fontconfig
#define FcMatrixCopy FcMatrixCopy_dylibloader_orig_fontconfig
#define FcMatrixEqual FcMatrixEqual_dylibloader_orig_fontconfig
#define FcMatrixMultiply FcMatrixMultiply_dylibloader_orig_fontconfig
#define FcMatrixRotate FcMatrixRotate_dylibloader_orig_fontconfig
#define FcMatrixScale FcMatrixScale_dylibloader_orig_fontconfig
#define FcMatrixShear FcMatrixShear_dylibloader_orig_fontconfig
#define FcNameRegisterObjectTypes FcNameRegisterObjectTypes_dylibloader_orig_fontconfig
#define FcNameUnregisterObjectTypes FcNameUnregisterObjectTypes_dylibloader_orig_fontconfig
#define FcNameGetObjectType FcNameGetObjectType_dylibloader_orig_fontconfig
#define FcNameRegisterConstants FcNameRegisterConstants_dylibloader_orig_fontconfig
#define FcNameUnregisterConstants FcNameUnregisterConstants_dylibloader_orig_fontconfig
#define FcNameGetConstant FcNameGetConstant_dylibloader_orig_fontconfig
#define FcNameConstant FcNameConstant_dylibloader_orig_fontconfig
#define FcNameParse FcNameParse_dylibloader_orig_fontconfig
#define FcNameUnparse FcNameUnparse_dylibloader_orig_fontconfig
#define FcPatternCreate FcPatternCreate_dylibloader_orig_fontconfig
#define FcPatternDuplicate FcPatternDuplicate_dylibloader_orig_fontconfig
#define FcPatternReference FcPatternReference_dylibloader_orig_fontconfig
#define FcPatternFilter FcPatternFilter_dylibloader_orig_fontconfig
#define FcValueDestroy FcValueDestroy_dylibloader_orig_fontconfig
#define FcValueEqual FcValueEqual_dylibloader_orig_fontconfig
#define FcValueSave FcValueSave_dylibloader_orig_fontconfig
#define FcPatternDestroy FcPatternDestroy_dylibloader_orig_fontconfig
#define FcPatternEqual FcPatternEqual_dylibloader_orig_fontconfig
#define FcPatternEqualSubset FcPatternEqualSubset_dylibloader_orig_fontconfig
#define FcPatternHash FcPatternHash_dylibloader_orig_fontconfig
#define FcPatternAdd FcPatternAdd_dylibloader_orig_fontconfig
#define FcPatternAddWeak FcPatternAddWeak_dylibloader_orig_fontconfig
#define FcPatternGet FcPatternGet_dylibloader_orig_fontconfig
#define FcPatternGetWithBinding FcPatternGetWithBinding_dylibloader_orig_fontconfig
#define FcPatternDel FcPatternDel_dylibloader_orig_fontconfig
#define FcPatternRemove FcPatternRemove_dylibloader_orig_fontconfig
#define FcPatternAddInteger FcPatternAddInteger_dylibloader_orig_fontconfig
#define FcPatternAddDouble FcPatternAddDouble_dylibloader_orig_fontconfig
#define FcPatternAddString FcPatternAddString_dylibloader_orig_fontconfig
#define FcPatternAddMatrix FcPatternAddMatrix_dylibloader_orig_fontconfig
#define FcPatternAddCharSet FcPatternAddCharSet_dylibloader_orig_fontconfig
#define FcPatternAddBool FcPatternAddBool_dylibloader_orig_fontconfig
#define FcPatternAddLangSet FcPatternAddLangSet_dylibloader_orig_fontconfig
#define FcPatternAddRange FcPatternAddRange_dylibloader_orig_fontconfig
#define FcPatternGetInteger FcPatternGetInteger_dylibloader_orig_fontconfig
#define FcPatternGetDouble FcPatternGetDouble_dylibloader_orig_fontconfig
#define FcPatternGetString FcPatternGetString_dylibloader_orig_fontconfig
#define FcPatternGetMatrix FcPatternGetMatrix_dylibloader_orig_fontconfig
#define FcPatternGetCharSet FcPatternGetCharSet_dylibloader_orig_fontconfig
#define FcPatternGetBool FcPatternGetBool_dylibloader_orig_fontconfig
#define FcPatternGetLangSet FcPatternGetLangSet_dylibloader_orig_fontconfig
#define FcPatternGetRange FcPatternGetRange_dylibloader_orig_fontconfig
#define FcPatternVaBuild FcPatternVaBuild_dylibloader_orig_fontconfig
#define FcPatternBuild FcPatternBuild_dylibloader_orig_fontconfig
#define FcPatternFormat FcPatternFormat_dylibloader_orig_fontconfig
#define FcRangeCreateDouble FcRangeCreateDouble_dylibloader_orig_fontconfig
#define FcRangeCreateInteger FcRangeCreateInteger_dylibloader_orig_fontconfig
#define FcRangeDestroy FcRangeDestroy_dylibloader_orig_fontconfig
#define FcRangeCopy FcRangeCopy_dylibloader_orig_fontconfig
#define FcRangeGetDouble FcRangeGetDouble_dylibloader_orig_fontconfig
#define FcWeightFromOpenType FcWeightFromOpenType_dylibloader_orig_fontconfig
#define FcWeightToOpenType FcWeightToOpenType_dylibloader_orig_fontconfig
#define FcStrCopy FcStrCopy_dylibloader_orig_fontconfig
#define FcStrCopyFilename FcStrCopyFilename_dylibloader_orig_fontconfig
#define FcStrPlus FcStrPlus_dylibloader_orig_fontconfig
#define FcStrFree FcStrFree_dylibloader_orig_fontconfig
#define FcStrDowncase FcStrDowncase_dylibloader_orig_fontconfig
#define FcStrCmpIgnoreCase FcStrCmpIgnoreCase_dylibloader_orig_fontconfig
#define FcStrCmp FcStrCmp_dylibloader_orig_fontconfig
#define FcStrStrIgnoreCase FcStrStrIgnoreCase_dylibloader_orig_fontconfig
#define FcStrStr FcStrStr_dylibloader_orig_fontconfig
#define FcUtf8ToUcs4 FcUtf8ToUcs4_dylibloader_orig_fontconfig
#define FcUtf8Len FcUtf8Len_dylibloader_orig_fontconfig
#define FcUcs4ToUtf8 FcUcs4ToUtf8_dylibloader_orig_fontconfig
#define FcUtf16ToUcs4 FcUtf16ToUcs4_dylibloader_orig_fontconfig
#define FcUtf16Len FcUtf16Len_dylibloader_orig_fontconfig
#define FcStrDirname FcStrDirname_dylibloader_orig_fontconfig
#define FcStrBasename FcStrBasename_dylibloader_orig_fontconfig
#define FcStrSetCreate FcStrSetCreate_dylibloader_orig_fontconfig
#define FcStrSetMember FcStrSetMember_dylibloader_orig_fontconfig
#define FcStrSetEqual FcStrSetEqual_dylibloader_orig_fontconfig
#define FcStrSetAdd FcStrSetAdd_dylibloader_orig_fontconfig
#define FcStrSetAddFilename FcStrSetAddFilename_dylibloader_orig_fontconfig
#define FcStrSetDel FcStrSetDel_dylibloader_orig_fontconfig
#define FcStrSetDestroy FcStrSetDestroy_dylibloader_orig_fontconfig
#define FcStrListCreate FcStrListCreate_dylibloader_orig_fontconfig
#define FcStrListFirst FcStrListFirst_dylibloader_orig_fontconfig
#define FcStrListNext FcStrListNext_dylibloader_orig_fontconfig
#define FcStrListDone FcStrListDone_dylibloader_orig_fontconfig
#define FcConfigParseAndLoad FcConfigParseAndLoad_dylibloader_orig_fontconfig
#define FcConfigParseAndLoadFromMemory FcConfigParseAndLoadFromMemory_dylibloader_orig_fontconfig
#include "thirdparty/linuxbsd_headers/fontconfig/fontconfig.h"
#undef FcBlanksCreate
#undef FcBlanksDestroy
#undef FcBlanksAdd
#undef FcBlanksIsMember
#undef FcCacheDir
#undef FcCacheCopySet
#undef FcCacheSubdir
#undef FcCacheNumSubdir
#undef FcCacheNumFont
#undef FcDirCacheUnlink
#undef FcDirCacheValid
#undef FcDirCacheClean
#undef FcCacheCreateTagFile
#undef FcConfigHome
#undef FcConfigEnableHome
#undef FcConfigFilename
#undef FcConfigCreate
#undef FcConfigReference
#undef FcConfigDestroy
#undef FcConfigSetCurrent
#undef FcConfigGetCurrent
#undef FcConfigUptoDate
#undef FcConfigBuildFonts
#undef FcConfigGetFontDirs
#undef FcConfigGetConfigDirs
#undef FcConfigGetConfigFiles
#undef FcConfigGetCache
#undef FcConfigGetBlanks
#undef FcConfigGetCacheDirs
#undef FcConfigGetRescanInterval
#undef FcConfigSetRescanInterval
#undef FcConfigGetFonts
#undef FcConfigAppFontAddFile
#undef FcConfigAppFontAddDir
#undef FcConfigAppFontClear
#undef FcConfigSubstituteWithPat
#undef FcConfigSubstitute
#undef FcConfigGetSysRoot
#undef FcConfigSetSysRoot
#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
#undef FcGetDefaultLangs
#undef FcDefaultSubstitute
#undef FcFileIsDir
#undef FcFileScan
#undef FcDirScan
#undef FcDirSave
#undef FcDirCacheLoad
#undef FcDirCacheRescan
#undef FcDirCacheRead
#undef FcDirCacheLoadFile
#undef FcDirCacheUnload
#undef FcFreeTypeQuery
#undef FcFontSetCreate
#undef FcFontSetDestroy
#undef FcFontSetAdd
#undef FcInitLoadConfig
#undef FcInitLoadConfigAndFonts
#undef FcInit
#undef FcFini
#undef FcGetVersion
#undef FcInitReinitialize
#undef FcInitBringUptoDate
#undef FcGetLangs
#undef FcLangNormalize
#undef FcLangGetCharSet
#undef FcLangSetCreate
#undef FcLangSetDestroy
#undef FcLangSetCopy
#undef FcLangSetAdd
#undef FcLangSetDel
#undef FcLangSetHasLang
#undef FcLangSetCompare
#undef FcLangSetContains
#undef FcLangSetEqual
#undef FcLangSetHash
#undef FcLangSetGetLangs
#undef FcLangSetUnion
#undef FcLangSetSubtract
#undef FcObjectSetCreate
#undef FcObjectSetAdd
#undef FcObjectSetDestroy
#undef FcObjectSetVaBuild
#undef FcObjectSetBuild
#undef FcFontSetList
#undef FcFontList
#undef FcAtomicCreate
#undef FcAtomicLock
#undef FcAtomicNewFile
#undef FcAtomicOrigFile
#undef FcAtomicReplaceOrig
#undef FcAtomicDeleteNew
#undef FcAtomicUnlock
#undef FcAtomicDestroy
#undef FcFontSetMatch
#undef FcFontMatch
#undef FcFontRenderPrepare
#undef FcFontSetSort
#undef FcFontSort
#undef FcFontSetSortDestroy
#undef FcMatrixCopy
#undef FcMatrixEqual
#undef FcMatrixMultiply
#undef FcMatrixRotate
#undef FcMatrixScale
#undef FcMatrixShear
#undef FcNameRegisterObjectTypes
#undef FcNameUnregisterObjectTypes
#undef FcNameGetObjectType
#undef FcNameRegisterConstants
#undef FcNameUnregisterConstants
#undef FcNameGetConstant
#undef FcNameConstant
#undef FcNameParse
#undef FcNameUnparse
#undef FcPatternCreate
#undef FcPatternDuplicate
#undef FcPatternReference
#undef FcPatternFilter
#undef FcValueDestroy
#undef FcValueEqual
#undef FcValueSave
#undef FcPatternDestroy
#undef FcPatternEqual
#undef FcPatternEqualSubset
#undef FcPatternHash
#undef FcPatternAdd
#undef FcPatternAddWeak
#undef FcPatternGet
#undef FcPatternGetWithBinding
#undef FcPatternDel
#undef FcPatternRemove
#undef FcPatternAddInteger
#undef FcPatternAddDouble
#undef FcPatternAddString
#undef FcPatternAddMatrix
#undef FcPatternAddCharSet
#undef FcPatternAddBool
#undef FcPatternAddLangSet
#undef FcPatternAddRange
#undef FcPatternGetInteger
#undef FcPatternGetDouble
#undef FcPatternGetString
#undef FcPatternGetMatrix
#undef FcPatternGetCharSet
#undef FcPatternGetBool
#undef FcPatternGetLangSet
#undef FcPatternGetRange
#undef FcPatternVaBuild
#undef FcPatternBuild
#undef FcPatternFormat
#undef FcRangeCreateDouble
#undef FcRangeCreateInteger
#undef FcRangeDestroy
#undef FcRangeCopy
#undef FcRangeGetDouble
#undef FcWeightFromOpenType
#undef FcWeightToOpenType
#undef FcStrCopy
#undef FcStrCopyFilename
#undef FcStrPlus
#undef FcStrFree
#undef FcStrDowncase
#undef FcStrCmpIgnoreCase
#undef FcStrCmp
#undef FcStrStrIgnoreCase
#undef FcStrStr
#undef FcUtf8ToUcs4
#undef FcUtf8Len
#undef FcUcs4ToUtf8
#undef FcUtf16ToUcs4
#undef FcUtf16Len
#undef FcStrDirname
#undef FcStrBasename
#undef FcStrSetCreate
#undef FcStrSetMember
#undef FcStrSetEqual
#undef FcStrSetAdd
#undef FcStrSetAddFilename
#undef FcStrSetDel
#undef FcStrSetDestroy
#undef FcStrListCreate
#undef FcStrListFirst
#undef FcStrListNext
#undef FcStrListDone
#undef FcConfigParseAndLoad
#undef FcConfigParseAndLoadFromMemory
#ifdef __cplusplus
extern "C" {
#endif
#define FcBlanksCreate FcBlanksCreate_dylibloader_wrapper_fontconfig
#define FcBlanksDestroy FcBlanksDestroy_dylibloader_wrapper_fontconfig
#define FcBlanksAdd FcBlanksAdd_dylibloader_wrapper_fontconfig
#define FcBlanksIsMember FcBlanksIsMember_dylibloader_wrapper_fontconfig
#define FcCacheDir FcCacheDir_dylibloader_wrapper_fontconfig
#define FcCacheCopySet FcCacheCopySet_dylibloader_wrapper_fontconfig
#define FcCacheSubdir FcCacheSubdir_dylibloader_wrapper_fontconfig
#define FcCacheNumSubdir FcCacheNumSubdir_dylibloader_wrapper_fontconfig
#define FcCacheNumFont FcCacheNumFont_dylibloader_wrapper_fontconfig
#define FcDirCacheUnlink FcDirCacheUnlink_dylibloader_wrapper_fontconfig
#define FcDirCacheValid FcDirCacheValid_dylibloader_wrapper_fontconfig
#define FcDirCacheClean FcDirCacheClean_dylibloader_wrapper_fontconfig
#define FcCacheCreateTagFile FcCacheCreateTagFile_dylibloader_wrapper_fontconfig
#define FcConfigHome FcConfigHome_dylibloader_wrapper_fontconfig
#define FcConfigEnableHome FcConfigEnableHome_dylibloader_wrapper_fontconfig
#define FcConfigFilename FcConfigFilename_dylibloader_wrapper_fontconfig
#define FcConfigCreate FcConfigCreate_dylibloader_wrapper_fontconfig
#define FcConfigReference FcConfigReference_dylibloader_wrapper_fontconfig
#define FcConfigDestroy FcConfigDestroy_dylibloader_wrapper_fontconfig
#define FcConfigSetCurrent FcConfigSetCurrent_dylibloader_wrapper_fontconfig
#define FcConfigGetCurrent FcConfigGetCurrent_dylibloader_wrapper_fontconfig
#define FcConfigUptoDate FcConfigUptoDate_dylibloader_wrapper_fontconfig
#define FcConfigBuildFonts FcConfigBuildFonts_dylibloader_wrapper_fontconfig
#define FcConfigGetFontDirs FcConfigGetFontDirs_dylibloader_wrapper_fontconfig
#define FcConfigGetConfigDirs FcConfigGetConfigDirs_dylibloader_wrapper_fontconfig
#define FcConfigGetConfigFiles FcConfigGetConfigFiles_dylibloader_wrapper_fontconfig
#define FcConfigGetCache FcConfigGetCache_dylibloader_wrapper_fontconfig
#define FcConfigGetBlanks FcConfigGetBlanks_dylibloader_wrapper_fontconfig
#define FcConfigGetCacheDirs FcConfigGetCacheDirs_dylibloader_wrapper_fontconfig
#define FcConfigGetRescanInterval FcConfigGetRescanInterval_dylibloader_wrapper_fontconfig
#define FcConfigSetRescanInterval FcConfigSetRescanInterval_dylibloader_wrapper_fontconfig
#define FcConfigGetFonts FcConfigGetFonts_dylibloader_wrapper_fontconfig
#define FcConfigAppFontAddFile FcConfigAppFontAddFile_dylibloader_wrapper_fontconfig
#define FcConfigAppFontAddDir FcConfigAppFontAddDir_dylibloader_wrapper_fontconfig
#define FcConfigAppFontClear FcConfigAppFontClear_dylibloader_wrapper_fontconfig
#define FcConfigSubstituteWithPat FcConfigSubstituteWithPat_dylibloader_wrapper_fontconfig
#define FcConfigSubstitute FcConfigSubstitute_dylibloader_wrapper_fontconfig
#define FcConfigGetSysRoot FcConfigGetSysRoot_dylibloader_wrapper_fontconfig
#define FcConfigSetSysRoot FcConfigSetSysRoot_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
#define FcGetDefaultLangs FcGetDefaultLangs_dylibloader_wrapper_fontconfig
#define FcDefaultSubstitute FcDefaultSubstitute_dylibloader_wrapper_fontconfig
#define FcFileIsDir FcFileIsDir_dylibloader_wrapper_fontconfig
#define FcFileScan FcFileScan_dylibloader_wrapper_fontconfig
#define FcDirScan FcDirScan_dylibloader_wrapper_fontconfig
#define FcDirSave FcDirSave_dylibloader_wrapper_fontconfig
#define FcDirCacheLoad FcDirCacheLoad_dylibloader_wrapper_fontconfig
#define FcDirCacheRescan FcDirCacheRescan_dylibloader_wrapper_fontconfig
#define FcDirCacheRead FcDirCacheRead_dylibloader_wrapper_fontconfig
#define FcDirCacheLoadFile FcDirCacheLoadFile_dylibloader_wrapper_fontconfig
#define FcDirCacheUnload FcDirCacheUnload_dylibloader_wrapper_fontconfig
#define FcFreeTypeQuery FcFreeTypeQuery_dylibloader_wrapper_fontconfig
#define FcFontSetCreate FcFontSetCreate_dylibloader_wrapper_fontconfig
#define FcFontSetDestroy FcFontSetDestroy_dylibloader_wrapper_fontconfig
#define FcFontSetAdd FcFontSetAdd_dylibloader_wrapper_fontconfig
#define FcInitLoadConfig FcInitLoadConfig_dylibloader_wrapper_fontconfig
#define FcInitLoadConfigAndFonts FcInitLoadConfigAndFonts_dylibloader_wrapper_fontconfig
#define FcInit FcInit_dylibloader_wrapper_fontconfig
#define FcFini FcFini_dylibloader_wrapper_fontconfig
#define FcGetVersion FcGetVersion_dylibloader_wrapper_fontconfig
#define FcInitReinitialize FcInitReinitialize_dylibloader_wrapper_fontconfig
#define FcInitBringUptoDate FcInitBringUptoDate_dylibloader_wrapper_fontconfig
#define FcGetLangs FcGetLangs_dylibloader_wrapper_fontconfig
#define FcLangNormalize FcLangNormalize_dylibloader_wrapper_fontconfig
#define FcLangGetCharSet FcLangGetCharSet_dylibloader_wrapper_fontconfig
#define FcLangSetCreate FcLangSetCreate_dylibloader_wrapper_fontconfig
#define FcLangSetDestroy FcLangSetDestroy_dylibloader_wrapper_fontconfig
#define FcLangSetCopy FcLangSetCopy_dylibloader_wrapper_fontconfig
#define FcLangSetAdd FcLangSetAdd_dylibloader_wrapper_fontconfig
#define FcLangSetDel FcLangSetDel_dylibloader_wrapper_fontconfig
#define FcLangSetHasLang FcLangSetHasLang_dylibloader_wrapper_fontconfig
#define FcLangSetCompare FcLangSetCompare_dylibloader_wrapper_fontconfig
#define FcLangSetContains FcLangSetContains_dylibloader_wrapper_fontconfig
#define FcLangSetEqual FcLangSetEqual_dylibloader_wrapper_fontconfig
#define FcLangSetHash FcLangSetHash_dylibloader_wrapper_fontconfig
#define FcLangSetGetLangs FcLangSetGetLangs_dylibloader_wrapper_fontconfig
#define FcLangSetUnion FcLangSetUnion_dylibloader_wrapper_fontconfig
#define FcLangSetSubtract FcLangSetSubtract_dylibloader_wrapper_fontconfig
#define FcObjectSetCreate FcObjectSetCreate_dylibloader_wrapper_fontconfig
#define FcObjectSetAdd FcObjectSetAdd_dylibloader_wrapper_fontconfig
#define FcObjectSetDestroy FcObjectSetDestroy_dylibloader_wrapper_fontconfig
#define FcObjectSetVaBuild FcObjectSetVaBuild_dylibloader_wrapper_fontconfig
#define FcObjectSetBuild FcObjectSetBuild_dylibloader_wrapper_fontconfig
#define FcFontSetList FcFontSetList_dylibloader_wrapper_fontconfig
#define FcFontList FcFontList_dylibloader_wrapper_fontconfig
#define FcAtomicCreate FcAtomicCreate_dylibloader_wrapper_fontconfig
#define FcAtomicLock FcAtomicLock_dylibloader_wrapper_fontconfig
#define FcAtomicNewFile FcAtomicNewFile_dylibloader_wrapper_fontconfig
#define FcAtomicOrigFile FcAtomicOrigFile_dylibloader_wrapper_fontconfig
#define FcAtomicReplaceOrig FcAtomicReplaceOrig_dylibloader_wrapper_fontconfig
#define FcAtomicDeleteNew FcAtomicDeleteNew_dylibloader_wrapper_fontconfig
#define FcAtomicUnlock FcAtomicUnlock_dylibloader_wrapper_fontconfig
#define FcAtomicDestroy FcAtomicDestroy_dylibloader_wrapper_fontconfig
#define FcFontSetMatch FcFontSetMatch_dylibloader_wrapper_fontconfig
#define FcFontMatch FcFontMatch_dylibloader_wrapper_fontconfig
#define FcFontRenderPrepare FcFontRenderPrepare_dylibloader_wrapper_fontconfig
#define FcFontSetSort FcFontSetSort_dylibloader_wrapper_fontconfig
#define FcFontSort FcFontSort_dylibloader_wrapper_fontconfig
#define FcFontSetSortDestroy FcFontSetSortDestroy_dylibloader_wrapper_fontconfig
#define FcMatrixCopy FcMatrixCopy_dylibloader_wrapper_fontconfig
#define FcMatrixEqual FcMatrixEqual_dylibloader_wrapper_fontconfig
#define FcMatrixMultiply FcMatrixMultiply_dylibloader_wrapper_fontconfig
#define FcMatrixRotate FcMatrixRotate_dylibloader_wrapper_fontconfig
#define FcMatrixScale FcMatrixScale_dylibloader_wrapper_fontconfig
#define FcMatrixShear FcMatrixShear_dylibloader_wrapper_fontconfig
#define FcNameRegisterObjectTypes FcNameRegisterObjectTypes_dylibloader_wrapper_fontconfig
#define FcNameUnregisterObjectTypes FcNameUnregisterObjectTypes_dylibloader_wrapper_fontconfig
#define FcNameGetObjectType FcNameGetObjectType_dylibloader_wrapper_fontconfig
#define FcNameRegisterConstants FcNameRegisterConstants_dylibloader_wrapper_fontconfig
#define FcNameUnregisterConstants FcNameUnregisterConstants_dylibloader_wrapper_fontconfig
#define FcNameGetConstant FcNameGetConstant_dylibloader_wrapper_fontconfig
#define FcNameConstant FcNameConstant_dylibloader_wrapper_fontconfig
#define FcNameParse FcNameParse_dylibloader_wrapper_fontconfig
#define FcNameUnparse FcNameUnparse_dylibloader_wrapper_fontconfig
#define FcPatternCreate FcPatternCreate_dylibloader_wrapper_fontconfig
#define FcPatternDuplicate FcPatternDuplicate_dylibloader_wrapper_fontconfig
#define FcPatternReference FcPatternReference_dylibloader_wrapper_fontconfig
#define FcPatternFilter FcPatternFilter_dylibloader_wrapper_fontconfig
#define FcValueDestroy FcValueDestroy_dylibloader_wrapper_fontconfig
#define FcValueEqual FcValueEqual_dylibloader_wrapper_fontconfig
#define FcValueSave FcValueSave_dylibloader_wrapper_fontconfig
#define FcPatternDestroy FcPatternDestroy_dylibloader_wrapper_fontconfig
#define FcPatternEqual FcPatternEqual_dylibloader_wrapper_fontconfig
#define FcPatternEqualSubset FcPatternEqualSubset_dylibloader_wrapper_fontconfig
#define FcPatternHash FcPatternHash_dylibloader_wrapper_fontconfig
#define FcPatternAdd FcPatternAdd_dylibloader_wrapper_fontconfig
#define FcPatternAddWeak FcPatternAddWeak_dylibloader_wrapper_fontconfig
#define FcPatternGet FcPatternGet_dylibloader_wrapper_fontconfig
#define FcPatternGetWithBinding FcPatternGetWithBinding_dylibloader_wrapper_fontconfig
#define FcPatternDel FcPatternDel_dylibloader_wrapper_fontconfig
#define FcPatternRemove FcPatternRemove_dylibloader_wrapper_fontconfig
#define FcPatternAddInteger FcPatternAddInteger_dylibloader_wrapper_fontconfig
#define FcPatternAddDouble FcPatternAddDouble_dylibloader_wrapper_fontconfig
#define FcPatternAddString FcPatternAddString_dylibloader_wrapper_fontconfig
#define FcPatternAddMatrix FcPatternAddMatrix_dylibloader_wrapper_fontconfig
#define FcPatternAddCharSet FcPatternAddCharSet_dylibloader_wrapper_fontconfig
#define FcPatternAddBool FcPatternAddBool_dylibloader_wrapper_fontconfig
#define FcPatternAddLangSet FcPatternAddLangSet_dylibloader_wrapper_fontconfig
#define FcPatternAddRange FcPatternAddRange_dylibloader_wrapper_fontconfig
#define FcPatternGetInteger FcPatternGetInteger_dylibloader_wrapper_fontconfig
#define FcPatternGetDouble FcPatternGetDouble_dylibloader_wrapper_fontconfig
#define FcPatternGetString FcPatternGetString_dylibloader_wrapper_fontconfig
#define FcPatternGetMatrix FcPatternGetMatrix_dylibloader_wrapper_fontconfig
#define FcPatternGetCharSet FcPatternGetCharSet_dylibloader_wrapper_fontconfig
#define FcPatternGetBool FcPatternGetBool_dylibloader_wrapper_fontconfig
#define FcPatternGetLangSet FcPatternGetLangSet_dylibloader_wrapper_fontconfig
#define FcPatternGetRange FcPatternGetRange_dylibloader_wrapper_fontconfig
#define FcPatternVaBuild FcPatternVaBuild_dylibloader_wrapper_fontconfig
#define FcPatternBuild FcPatternBuild_dylibloader_wrapper_fontconfig
#define FcPatternFormat FcPatternFormat_dylibloader_wrapper_fontconfig
#define FcRangeCreateDouble FcRangeCreateDouble_dylibloader_wrapper_fontconfig
#define FcRangeCreateInteger FcRangeCreateInteger_dylibloader_wrapper_fontconfig
#define FcRangeDestroy FcRangeDestroy_dylibloader_wrapper_fontconfig
#define FcRangeCopy FcRangeCopy_dylibloader_wrapper_fontconfig
#define FcRangeGetDouble FcRangeGetDouble_dylibloader_wrapper_fontconfig
#define FcWeightFromOpenType FcWeightFromOpenType_dylibloader_wrapper_fontconfig
#define FcWeightToOpenType FcWeightToOpenType_dylibloader_wrapper_fontconfig
#define FcStrCopy FcStrCopy_dylibloader_wrapper_fontconfig
#define FcStrCopyFilename FcStrCopyFilename_dylibloader_wrapper_fontconfig
#define FcStrPlus FcStrPlus_dylibloader_wrapper_fontconfig
#define FcStrFree FcStrFree_dylibloader_wrapper_fontconfig
#define FcStrDowncase FcStrDowncase_dylibloader_wrapper_fontconfig
#define FcStrCmpIgnoreCase FcStrCmpIgnoreCase_dylibloader_wrapper_fontconfig
#define FcStrCmp FcStrCmp_dylibloader_wrapper_fontconfig
#define FcStrStrIgnoreCase FcStrStrIgnoreCase_dylibloader_wrapper_fontconfig
#define FcStrStr FcStrStr_dylibloader_wrapper_fontconfig
#define FcUtf8ToUcs4 FcUtf8ToUcs4_dylibloader_wrapper_fontconfig
#define FcUtf8Len FcUtf8Len_dylibloader_wrapper_fontconfig
#define FcUcs4ToUtf8 FcUcs4ToUtf8_dylibloader_wrapper_fontconfig
#define FcUtf16ToUcs4 FcUtf16ToUcs4_dylibloader_wrapper_fontconfig
#define FcUtf16Len FcUtf16Len_dylibloader_wrapper_fontconfig
#define FcStrDirname FcStrDirname_dylibloader_wrapper_fontconfig
#define FcStrBasename FcStrBasename_dylibloader_wrapper_fontconfig
#define FcStrSetCreate FcStrSetCreate_dylibloader_wrapper_fontconfig
#define FcStrSetMember FcStrSetMember_dylibloader_wrapper_fontconfig
#define FcStrSetEqual FcStrSetEqual_dylibloader_wrapper_fontconfig
#define FcStrSetAdd FcStrSetAdd_dylibloader_wrapper_fontconfig
#define FcStrSetAddFilename FcStrSetAddFilename_dylibloader_wrapper_fontconfig
#define FcStrSetDel FcStrSetDel_dylibloader_wrapper_fontconfig
#define FcStrSetDestroy FcStrSetDestroy_dylibloader_wrapper_fontconfig
#define FcStrListCreate FcStrListCreate_dylibloader_wrapper_fontconfig
#define FcStrListFirst FcStrListFirst_dylibloader_wrapper_fontconfig
#define FcStrListNext FcStrListNext_dylibloader_wrapper_fontconfig
#define FcStrListDone FcStrListDone_dylibloader_wrapper_fontconfig
#define FcConfigParseAndLoad FcConfigParseAndLoad_dylibloader_wrapper_fontconfig
#define FcConfigParseAndLoadFromMemory FcConfigParseAndLoadFromMemory_dylibloader_wrapper_fontconfig
extern FcBlanks* (*FcBlanksCreate_dylibloader_wrapper_fontconfig)( void);
extern void (*FcBlanksDestroy_dylibloader_wrapper_fontconfig)( FcBlanks*);
extern FcBool (*FcBlanksAdd_dylibloader_wrapper_fontconfig)( FcBlanks*, FcChar32);
extern FcBool (*FcBlanksIsMember_dylibloader_wrapper_fontconfig)( FcBlanks*, FcChar32);
extern const FcChar8* (*FcCacheDir_dylibloader_wrapper_fontconfig)(const FcCache*);
extern FcFontSet* (*FcCacheCopySet_dylibloader_wrapper_fontconfig)(const FcCache*);
extern const FcChar8* (*FcCacheSubdir_dylibloader_wrapper_fontconfig)(const FcCache*, int);
extern int (*FcCacheNumSubdir_dylibloader_wrapper_fontconfig)(const FcCache*);
extern int (*FcCacheNumFont_dylibloader_wrapper_fontconfig)(const FcCache*);
extern FcBool (*FcDirCacheUnlink_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*);
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 FcChar8* (*FcConfigHome_dylibloader_wrapper_fontconfig)( void);
extern FcBool (*FcConfigEnableHome_dylibloader_wrapper_fontconfig)( FcBool);
extern FcChar8* (*FcConfigFilename_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcConfig* (*FcConfigCreate_dylibloader_wrapper_fontconfig)( void);
extern FcConfig* (*FcConfigReference_dylibloader_wrapper_fontconfig)( FcConfig*);
extern void (*FcConfigDestroy_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcBool (*FcConfigSetCurrent_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcConfig* (*FcConfigGetCurrent_dylibloader_wrapper_fontconfig)( void);
extern FcBool (*FcConfigUptoDate_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcBool (*FcConfigBuildFonts_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcStrList* (*FcConfigGetFontDirs_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcStrList* (*FcConfigGetConfigDirs_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcStrList* (*FcConfigGetConfigFiles_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcChar8* (*FcConfigGetCache_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcBlanks* (*FcConfigGetBlanks_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcStrList* (*FcConfigGetCacheDirs_dylibloader_wrapper_fontconfig)(const FcConfig*);
extern int (*FcConfigGetRescanInterval_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcBool (*FcConfigSetRescanInterval_dylibloader_wrapper_fontconfig)( FcConfig*, int);
extern FcFontSet* (*FcConfigGetFonts_dylibloader_wrapper_fontconfig)( FcConfig*, FcSetName);
extern FcBool (*FcConfigAppFontAddFile_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
extern FcBool (*FcConfigAppFontAddDir_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*);
extern void (*FcConfigAppFontClear_dylibloader_wrapper_fontconfig)( FcConfig*);
extern FcBool (*FcConfigSubstituteWithPat_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcPattern*, FcMatchKind);
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 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*);
extern FcStrSet* (*FcGetDefaultLangs_dylibloader_wrapper_fontconfig)( void);
extern void (*FcDefaultSubstitute_dylibloader_wrapper_fontconfig)( FcPattern*);
extern FcBool (*FcFileIsDir_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcBool (*FcFileScan_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*, FcFileCache*, FcBlanks*,const FcChar8*, FcBool);
extern FcBool (*FcDirScan_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*, FcFileCache*, FcBlanks*,const FcChar8*, FcBool);
extern FcBool (*FcDirSave_dylibloader_wrapper_fontconfig)( FcFontSet*, FcStrSet*,const FcChar8*);
extern FcCache* (*FcDirCacheLoad_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*, FcChar8**);
extern FcCache* (*FcDirCacheRescan_dylibloader_wrapper_fontconfig)(const FcChar8*, FcConfig*);
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 FcFontSet* (*FcFontSetCreate_dylibloader_wrapper_fontconfig)( void);
extern void (*FcFontSetDestroy_dylibloader_wrapper_fontconfig)( FcFontSet*);
extern FcBool (*FcFontSetAdd_dylibloader_wrapper_fontconfig)( FcFontSet*, FcPattern*);
extern FcConfig* (*FcInitLoadConfig_dylibloader_wrapper_fontconfig)( void);
extern FcConfig* (*FcInitLoadConfigAndFonts_dylibloader_wrapper_fontconfig)( void);
extern FcBool (*FcInit_dylibloader_wrapper_fontconfig)( void);
extern void (*FcFini_dylibloader_wrapper_fontconfig)( void);
extern int (*FcGetVersion_dylibloader_wrapper_fontconfig)( void);
extern FcBool (*FcInitReinitialize_dylibloader_wrapper_fontconfig)( void);
extern FcBool (*FcInitBringUptoDate_dylibloader_wrapper_fontconfig)( void);
extern FcStrSet* (*FcGetLangs_dylibloader_wrapper_fontconfig)( void);
extern FcChar8* (*FcLangNormalize_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern const FcCharSet* (*FcLangGetCharSet_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcLangSet* (*FcLangSetCreate_dylibloader_wrapper_fontconfig)( void);
extern void (*FcLangSetDestroy_dylibloader_wrapper_fontconfig)( FcLangSet*);
extern FcLangSet* (*FcLangSetCopy_dylibloader_wrapper_fontconfig)(const FcLangSet*);
extern FcBool (*FcLangSetAdd_dylibloader_wrapper_fontconfig)( FcLangSet*,const FcChar8*);
extern FcBool (*FcLangSetDel_dylibloader_wrapper_fontconfig)( FcLangSet*,const FcChar8*);
extern FcLangResult (*FcLangSetHasLang_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcChar8*);
extern FcLangResult (*FcLangSetCompare_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
extern FcBool (*FcLangSetContains_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
extern FcBool (*FcLangSetEqual_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
extern FcChar32 (*FcLangSetHash_dylibloader_wrapper_fontconfig)(const FcLangSet*);
extern FcStrSet* (*FcLangSetGetLangs_dylibloader_wrapper_fontconfig)(const FcLangSet*);
extern FcLangSet* (*FcLangSetUnion_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
extern FcLangSet* (*FcLangSetSubtract_dylibloader_wrapper_fontconfig)(const FcLangSet*,const FcLangSet*);
extern FcObjectSet* (*FcObjectSetCreate_dylibloader_wrapper_fontconfig)( void);
extern FcBool (*FcObjectSetAdd_dylibloader_wrapper_fontconfig)( FcObjectSet*,const char*);
extern void (*FcObjectSetDestroy_dylibloader_wrapper_fontconfig)( FcObjectSet*);
extern FcObjectSet* (*FcObjectSetVaBuild_dylibloader_wrapper_fontconfig)(const char*, va_list);
extern FcObjectSet* (*FcObjectSetBuild_dylibloader_wrapper_fontconfig)(const char*,...);
extern FcFontSet* (*FcFontSetList_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcObjectSet*);
extern FcFontSet* (*FcFontList_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcObjectSet*);
extern FcAtomic* (*FcAtomicCreate_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcBool (*FcAtomicLock_dylibloader_wrapper_fontconfig)( FcAtomic*);
extern FcChar8* (*FcAtomicNewFile_dylibloader_wrapper_fontconfig)( FcAtomic*);
extern FcChar8* (*FcAtomicOrigFile_dylibloader_wrapper_fontconfig)( FcAtomic*);
extern FcBool (*FcAtomicReplaceOrig_dylibloader_wrapper_fontconfig)( FcAtomic*);
extern void (*FcAtomicDeleteNew_dylibloader_wrapper_fontconfig)( FcAtomic*);
extern void (*FcAtomicUnlock_dylibloader_wrapper_fontconfig)( FcAtomic*);
extern void (*FcAtomicDestroy_dylibloader_wrapper_fontconfig)( FcAtomic*);
extern FcPattern* (*FcFontSetMatch_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcResult*);
extern FcPattern* (*FcFontMatch_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcResult*);
extern FcPattern* (*FcFontRenderPrepare_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcPattern*);
extern FcFontSet* (*FcFontSetSort_dylibloader_wrapper_fontconfig)( FcConfig*, FcFontSet**, int, FcPattern*, FcBool, FcCharSet**, FcResult*);
extern FcFontSet* (*FcFontSort_dylibloader_wrapper_fontconfig)( FcConfig*, FcPattern*, FcBool, FcCharSet**, FcResult*);
extern void (*FcFontSetSortDestroy_dylibloader_wrapper_fontconfig)( FcFontSet*);
extern FcMatrix* (*FcMatrixCopy_dylibloader_wrapper_fontconfig)(const FcMatrix*);
extern FcBool (*FcMatrixEqual_dylibloader_wrapper_fontconfig)(const FcMatrix*,const FcMatrix*);
extern void (*FcMatrixMultiply_dylibloader_wrapper_fontconfig)( FcMatrix*,const FcMatrix*,const FcMatrix*);
extern void (*FcMatrixRotate_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
extern void (*FcMatrixScale_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
extern void (*FcMatrixShear_dylibloader_wrapper_fontconfig)( FcMatrix*, double, double);
extern FcBool (*FcNameRegisterObjectTypes_dylibloader_wrapper_fontconfig)(const FcObjectType*, int);
extern FcBool (*FcNameUnregisterObjectTypes_dylibloader_wrapper_fontconfig)(const FcObjectType*, int);
extern const FcObjectType* (*FcNameGetObjectType_dylibloader_wrapper_fontconfig)(const char*);
extern FcBool (*FcNameRegisterConstants_dylibloader_wrapper_fontconfig)(const FcConstant*, int);
extern FcBool (*FcNameUnregisterConstants_dylibloader_wrapper_fontconfig)(const FcConstant*, int);
extern const FcConstant* (*FcNameGetConstant_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcBool (*FcNameConstant_dylibloader_wrapper_fontconfig)(const FcChar8*, int*);
extern FcPattern* (*FcNameParse_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcChar8* (*FcNameUnparse_dylibloader_wrapper_fontconfig)( FcPattern*);
extern FcPattern* (*FcPatternCreate_dylibloader_wrapper_fontconfig)( void);
extern FcPattern* (*FcPatternDuplicate_dylibloader_wrapper_fontconfig)(const FcPattern*);
extern void (*FcPatternReference_dylibloader_wrapper_fontconfig)( FcPattern*);
extern FcPattern* (*FcPatternFilter_dylibloader_wrapper_fontconfig)( FcPattern*,const FcObjectSet*);
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 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*);
extern FcBool (*FcPatternAdd_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcValue, FcBool);
extern FcBool (*FcPatternAddWeak_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcValue, FcBool);
extern FcResult (*FcPatternGet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcValue*);
extern FcResult (*FcPatternGetWithBinding_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcValue*, FcValueBinding*);
extern FcBool (*FcPatternDel_dylibloader_wrapper_fontconfig)( FcPattern*,const char*);
extern FcBool (*FcPatternRemove_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, int);
extern FcBool (*FcPatternAddInteger_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, int);
extern FcBool (*FcPatternAddDouble_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, double);
extern FcBool (*FcPatternAddString_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcChar8*);
extern FcBool (*FcPatternAddMatrix_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcMatrix*);
extern FcBool (*FcPatternAddCharSet_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcCharSet*);
extern FcBool (*FcPatternAddBool_dylibloader_wrapper_fontconfig)( FcPattern*,const char*, FcBool);
extern FcBool (*FcPatternAddLangSet_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcLangSet*);
extern FcBool (*FcPatternAddRange_dylibloader_wrapper_fontconfig)( FcPattern*,const char*,const FcRange*);
extern FcResult (*FcPatternGetInteger_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, int*);
extern FcResult (*FcPatternGetDouble_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, double*);
extern FcResult (*FcPatternGetString_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcChar8**);
extern FcResult (*FcPatternGetMatrix_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcMatrix**);
extern FcResult (*FcPatternGetCharSet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcCharSet**);
extern FcResult (*FcPatternGetBool_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcBool*);
extern FcResult (*FcPatternGetLangSet_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcLangSet**);
extern FcResult (*FcPatternGetRange_dylibloader_wrapper_fontconfig)(const FcPattern*,const char*, int, FcRange**);
extern FcPattern* (*FcPatternVaBuild_dylibloader_wrapper_fontconfig)( FcPattern*, va_list);
extern FcPattern* (*FcPatternBuild_dylibloader_wrapper_fontconfig)( FcPattern*,...);
extern FcChar8* (*FcPatternFormat_dylibloader_wrapper_fontconfig)( FcPattern*,const FcChar8*);
extern FcRange* (*FcRangeCreateDouble_dylibloader_wrapper_fontconfig)( double, double);
extern FcRange* (*FcRangeCreateInteger_dylibloader_wrapper_fontconfig)( FcChar32, 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 int (*FcWeightFromOpenType_dylibloader_wrapper_fontconfig)( int);
extern int (*FcWeightToOpenType_dylibloader_wrapper_fontconfig)( int);
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*);
extern void (*FcStrFree_dylibloader_wrapper_fontconfig)( FcChar8*);
extern FcChar8* (*FcStrDowncase_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern int (*FcStrCmpIgnoreCase_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
extern int (*FcStrCmp_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
extern const FcChar8* (*FcStrStrIgnoreCase_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
extern const FcChar8* (*FcStrStr_dylibloader_wrapper_fontconfig)(const FcChar8*,const FcChar8*);
extern int (*FcUtf8ToUcs4_dylibloader_wrapper_fontconfig)(const FcChar8*, FcChar32*, int);
extern FcBool (*FcUtf8Len_dylibloader_wrapper_fontconfig)(const FcChar8*, int, int*, int*);
extern int (*FcUcs4ToUtf8_dylibloader_wrapper_fontconfig)( FcChar32, FcChar8 [6]);
extern int (*FcUtf16ToUcs4_dylibloader_wrapper_fontconfig)(const FcChar8*, FcEndian, FcChar32*, int);
extern FcBool (*FcUtf16Len_dylibloader_wrapper_fontconfig)(const FcChar8*, FcEndian, int, int*, int*);
extern FcChar8* (*FcStrDirname_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcChar8* (*FcStrBasename_dylibloader_wrapper_fontconfig)(const FcChar8*);
extern FcStrSet* (*FcStrSetCreate_dylibloader_wrapper_fontconfig)( void);
extern FcBool (*FcStrSetMember_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
extern FcBool (*FcStrSetEqual_dylibloader_wrapper_fontconfig)( FcStrSet*, FcStrSet*);
extern FcBool (*FcStrSetAdd_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
extern FcBool (*FcStrSetAddFilename_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
extern FcBool (*FcStrSetDel_dylibloader_wrapper_fontconfig)( FcStrSet*,const FcChar8*);
extern void (*FcStrSetDestroy_dylibloader_wrapper_fontconfig)( FcStrSet*);
extern FcStrList* (*FcStrListCreate_dylibloader_wrapper_fontconfig)( FcStrSet*);
extern void (*FcStrListFirst_dylibloader_wrapper_fontconfig)( FcStrList*);
extern FcChar8* (*FcStrListNext_dylibloader_wrapper_fontconfig)( FcStrList*);
extern void (*FcStrListDone_dylibloader_wrapper_fontconfig)( FcStrList*);
extern FcBool (*FcConfigParseAndLoad_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*, FcBool);
extern FcBool (*FcConfigParseAndLoadFromMemory_dylibloader_wrapper_fontconfig)( FcConfig*,const FcChar8*, FcBool);
int initialize_fontconfig(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,177 @@
/**************************************************************************/
/* freedesktop_at_spi_monitor.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "freedesktop_at_spi_monitor.h"
#ifdef DBUS_ENABLED
#include "core/os/os.h"
#ifdef SOWRAP_ENABLED
#include "dbus-so_wrap.h"
#else
#include <dbus/dbus.h>
#endif
#include <unistd.h>
#define BUS_OBJECT_NAME "org.a11y.Bus"
#define BUS_OBJECT_PATH "/org/a11y/bus"
#define BUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties"
void FreeDesktopAtSPIMonitor::monitor_thread_func(void *p_userdata) {
FreeDesktopAtSPIMonitor *mon = (FreeDesktopAtSPIMonitor *)p_userdata;
DBusError error;
dbus_error_init(&error);
DBusConnection *bus = dbus_bus_get(DBUS_BUS_SESSION, &error);
if (dbus_error_is_set(&error)) {
dbus_error_free(&error);
mon->supported.clear();
return;
}
static const char *iface = "org.a11y.Status";
static const char *member_ac = "IsEnabled";
static const char *member_sr = "ScreenReaderEnabled";
while (!mon->exit_thread.is_set()) {
DBusMessage *message = dbus_message_new_method_call(BUS_OBJECT_NAME, BUS_OBJECT_PATH, BUS_INTERFACE_PROPERTIES, "Get");
dbus_message_append_args(
message,
DBUS_TYPE_STRING, &iface,
DBUS_TYPE_STRING, &member_ac,
DBUS_TYPE_INVALID);
DBusMessage *reply = dbus_connection_send_with_reply_and_block(bus, message, 50, &error);
dbus_message_unref(message);
if (!dbus_error_is_set(&error)) {
DBusMessageIter iter, iter_variant, iter_struct;
dbus_bool_t result;
dbus_message_iter_init(reply, &iter);
dbus_message_iter_recurse(&iter, &iter_variant);
switch (dbus_message_iter_get_arg_type(&iter_variant)) {
case DBUS_TYPE_STRUCT: {
dbus_message_iter_recurse(&iter_variant, &iter_struct);
if (dbus_message_iter_get_arg_type(&iter_struct) == DBUS_TYPE_BOOLEAN) {
dbus_message_iter_get_basic(&iter_struct, &result);
if (result) {
mon->ac_enabled.set();
} else {
mon->ac_enabled.clear();
}
}
} break;
case DBUS_TYPE_BOOLEAN: {
dbus_message_iter_get_basic(&iter_variant, &result);
if (result) {
mon->ac_enabled.set();
} else {
mon->ac_enabled.clear();
}
} break;
default:
break;
}
dbus_message_unref(reply);
} else {
dbus_error_free(&error);
}
message = dbus_message_new_method_call(BUS_OBJECT_NAME, BUS_OBJECT_PATH, BUS_INTERFACE_PROPERTIES, "Get");
dbus_message_append_args(
message,
DBUS_TYPE_STRING, &iface,
DBUS_TYPE_STRING, &member_sr,
DBUS_TYPE_INVALID);
reply = dbus_connection_send_with_reply_and_block(bus, message, 50, &error);
dbus_message_unref(message);
if (!dbus_error_is_set(&error)) {
DBusMessageIter iter, iter_variant, iter_struct;
dbus_bool_t result;
dbus_message_iter_init(reply, &iter);
dbus_message_iter_recurse(&iter, &iter_variant);
switch (dbus_message_iter_get_arg_type(&iter_variant)) {
case DBUS_TYPE_STRUCT: {
dbus_message_iter_recurse(&iter_variant, &iter_struct);
if (dbus_message_iter_get_arg_type(&iter_struct) == DBUS_TYPE_BOOLEAN) {
dbus_message_iter_get_basic(&iter_struct, &result);
if (result) {
mon->sr_enabled.set();
} else {
mon->sr_enabled.clear();
}
}
} break;
case DBUS_TYPE_BOOLEAN: {
dbus_message_iter_get_basic(&iter_variant, &result);
if (result) {
mon->sr_enabled.set();
} else {
mon->sr_enabled.clear();
}
} break;
default:
break;
}
dbus_message_unref(reply);
} else {
dbus_error_free(&error);
}
usleep(50000);
}
dbus_connection_unref(bus);
}
FreeDesktopAtSPIMonitor::FreeDesktopAtSPIMonitor() {
supported.set();
sr_enabled.clear();
exit_thread.clear();
thread.start(FreeDesktopAtSPIMonitor::monitor_thread_func, this);
}
FreeDesktopAtSPIMonitor::~FreeDesktopAtSPIMonitor() {
exit_thread.set();
if (thread.is_started()) {
thread.wait_to_finish();
}
}
#endif // DBUS_ENABLED

View File

@@ -0,0 +1,57 @@
/**************************************************************************/
/* freedesktop_at_spi_monitor.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef DBUS_ENABLED
#include "core/os/thread.h"
#include "core/os/thread_safe.h"
class FreeDesktopAtSPIMonitor {
private:
Thread thread;
SafeFlag exit_thread;
SafeFlag ac_enabled;
SafeFlag sr_enabled;
SafeFlag supported;
static void monitor_thread_func(void *p_userdata);
public:
FreeDesktopAtSPIMonitor();
~FreeDesktopAtSPIMonitor();
bool is_supported() { return supported.is_set(); }
bool is_active() { return sr_enabled.is_set() && ac_enabled.is_set(); }
};
#endif // DBUS_ENABLED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,149 @@
/**************************************************************************/
/* freedesktop_portal_desktop.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef DBUS_ENABLED
#include "core/os/thread.h"
#include "core/os/thread_safe.h"
#include "servers/display_server.h"
struct DBusMessage;
struct DBusConnection;
struct DBusMessageIter;
class FreeDesktopPortalDesktop : public Object {
private:
bool unsupported = false;
enum ReadVariantType {
VAR_TYPE_UINT32, // u
VAR_TYPE_BOOL, // b
VAR_TYPE_COLOR, // (ddd)
};
static bool try_parse_variant(DBusMessage *p_reply_message, ReadVariantType p_type, void *r_value);
// Read a setting from org.freekdesktop.portal.Settings
bool read_setting(const char *p_namespace, const char *p_key, ReadVariantType p_type, void *r_value);
static void append_dbus_string(DBusMessageIter *p_iter, const String &p_string);
static void append_dbus_dict_options(DBusMessageIter *p_iter, const TypedArray<Dictionary> &p_options, HashMap<String, String> &r_ids);
static void append_dbus_dict_filters(DBusMessageIter *p_iter, const Vector<String> &p_filter_names, const Vector<String> &p_filter_exts, const Vector<String> &p_filter_mimes);
static void append_dbus_dict_string(DBusMessageIter *p_iter, const String &p_key, const String &p_value, bool p_as_byte_array = false);
static void append_dbus_dict_bool(DBusMessageIter *p_iter, const String &p_key, bool p_value);
static bool file_chooser_parse_response(DBusMessageIter *p_iter, const Vector<String> &p_names, const HashMap<String, String> &p_ids, bool &r_cancel, Vector<String> &r_urls, int &r_index, Dictionary &r_options);
static bool color_picker_parse_response(DBusMessageIter *p_iter, bool &r_cancel, Color &r_color);
struct ColorPickerData {
Callable callback;
String filter;
String path;
};
struct ColorPickerCallback {
Callable callback;
Variant status;
Variant color;
};
List<ColorPickerCallback> pending_color_cbs;
Mutex color_picker_mutex;
Vector<ColorPickerData> color_pickers;
struct FileDialogData {
Vector<String> filter_names;
HashMap<String, String> option_ids;
DisplayServer::WindowID prev_focus = DisplayServer::INVALID_WINDOW_ID;
Callable callback;
String filter;
String path;
bool opt_in_cb = false;
};
struct FileDialogCallback {
Callable callback;
Variant status;
Variant files;
Variant index;
Variant options;
bool opt_in_cb = false;
};
List<FileDialogCallback> pending_file_cbs;
Mutex file_dialog_mutex;
Vector<FileDialogData> file_dialogs;
Thread monitor_thread;
SafeFlag monitor_thread_abort;
DBusConnection *monitor_connection = nullptr;
String theme_path;
Callable system_theme_changed;
void _system_theme_changed_callback();
bool _is_interface_supported(const char *p_iface);
static void _thread_monitor(void *p_ud);
public:
FreeDesktopPortalDesktop();
~FreeDesktopPortalDesktop();
bool is_supported() { return !unsupported; }
bool is_file_chooser_supported();
bool is_settings_supported();
bool is_screenshot_supported();
// org.freedesktop.portal.FileChooser methods.
Error file_dialog_show(DisplayServer::WindowID p_window_id, const String &p_xid, const String &p_title, const String &p_current_directory, const String &p_root, const String &p_filename, DisplayServer::FileDialogMode p_mode, const Vector<String> &p_filters, const TypedArray<Dictionary> &p_options, const Callable &p_callback, bool p_options_in_cb);
void process_callbacks();
// org.freedesktop.portal.Settings methods.
// Retrieve the system's preferred color scheme.
// 0: No preference or unknown.
// 1: Prefer dark appearance.
// 2: Prefer light appearance.
uint32_t get_appearance_color_scheme();
Color get_appearance_accent_color();
void set_system_theme_change_callback(const Callable &p_system_theme_changed) {
system_theme_changed = p_system_theme_changed;
}
// Retrieve high-contrast setting.
// -1: Unknown.
// 0: Disabled.
// 1: Enabled.
uint32_t get_high_contrast();
// org.freedesktop.portal.Screenshot methods.
bool color_picker(const String &p_xid, const Callable &p_callback);
};
#endif // DBUS_ENABLED

View File

@@ -0,0 +1,136 @@
/**************************************************************************/
/* freedesktop_screensaver.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "freedesktop_screensaver.h"
#ifdef DBUS_ENABLED
#include "core/config/project_settings.h"
#ifdef SOWRAP_ENABLED
#include "dbus-so_wrap.h"
#else
#include <dbus/dbus.h>
#endif
#define BUS_OBJECT_NAME "org.freedesktop.ScreenSaver"
#define BUS_OBJECT_PATH "/org/freedesktop/ScreenSaver"
#define BUS_INTERFACE "org.freedesktop.ScreenSaver"
void FreeDesktopScreenSaver::inhibit() {
if (unsupported) {
return;
}
DBusError error;
dbus_error_init(&error);
DBusConnection *bus = dbus_bus_get(DBUS_BUS_SESSION, &error);
if (dbus_error_is_set(&error)) {
dbus_error_free(&error);
unsupported = true;
return;
}
String app_name_string = GLOBAL_GET("application/config/name");
CharString app_name_utf8 = app_name_string.utf8();
const char *app_name = app_name_string.is_empty() ? "Godot Engine" : app_name_utf8.get_data();
const char *reason = "Running Godot Engine project";
DBusMessage *message = dbus_message_new_method_call(
BUS_OBJECT_NAME, BUS_OBJECT_PATH, BUS_INTERFACE,
"Inhibit");
dbus_message_append_args(
message,
DBUS_TYPE_STRING, &app_name,
DBUS_TYPE_STRING, &reason,
DBUS_TYPE_INVALID);
DBusMessage *reply = dbus_connection_send_with_reply_and_block(bus, message, 50, &error);
dbus_message_unref(message);
if (dbus_error_is_set(&error)) {
dbus_error_free(&error);
dbus_connection_unref(bus);
unsupported = true;
return;
}
DBusMessageIter reply_iter;
dbus_message_iter_init(reply, &reply_iter);
dbus_message_iter_get_basic(&reply_iter, &cookie);
print_verbose("FreeDesktopScreenSaver: Acquired screensaver inhibition cookie: " + uitos(cookie));
dbus_message_unref(reply);
dbus_connection_unref(bus);
}
void FreeDesktopScreenSaver::uninhibit() {
if (unsupported) {
return;
}
DBusError error;
dbus_error_init(&error);
DBusConnection *bus = dbus_bus_get(DBUS_BUS_SESSION, &error);
if (dbus_error_is_set(&error)) {
dbus_error_free(&error);
unsupported = true;
return;
}
DBusMessage *message = dbus_message_new_method_call(
BUS_OBJECT_NAME, BUS_OBJECT_PATH, BUS_INTERFACE,
"UnInhibit");
dbus_message_append_args(
message,
DBUS_TYPE_UINT32, &cookie,
DBUS_TYPE_INVALID);
DBusMessage *reply = dbus_connection_send_with_reply_and_block(bus, message, 50, &error);
dbus_message_unref(message);
if (dbus_error_is_set(&error)) {
dbus_error_free(&error);
dbus_connection_unref(bus);
unsupported = true;
return;
}
print_verbose("FreeDesktopScreenSaver: Released screensaver inhibition cookie: " + uitos(cookie));
dbus_message_unref(reply);
dbus_connection_unref(bus);
}
FreeDesktopScreenSaver::FreeDesktopScreenSaver() {
}
#endif // DBUS_ENABLED

View File

@@ -0,0 +1,48 @@
/**************************************************************************/
/* freedesktop_screensaver.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef DBUS_ENABLED
#include <cstdint>
class FreeDesktopScreenSaver {
private:
uint32_t cookie = 0;
bool unsupported = false;
public:
FreeDesktopScreenSaver();
void inhibit();
void uninhibit();
};
#endif // DBUS_ENABLED

View File

@@ -0,0 +1,99 @@
/**************************************************************************/
/* godot_linuxbsd.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "os_linuxbsd.h"
#include "main/main.h"
#include <unistd.h>
#include <climits>
#include <clocale>
#include <cstdlib>
#if defined(SANITIZERS_ENABLED)
#include <sys/resource.h>
#endif
// For export templates, add a section; the exporter will patch it to enclose
// the data appended to the executable (bundled PCK).
#if !defined(TOOLS_ENABLED) && defined(__GNUC__)
static const char dummy[8] __attribute__((section("pck"), used)) = { 0 };
// Dummy function to prevent LTO from discarding "pck" section.
extern "C" const char *pck_section_dummy_call() __attribute__((used));
extern "C" const char *pck_section_dummy_call() {
return &dummy[0];
}
#endif
int main(int argc, char *argv[]) {
#if defined(SANITIZERS_ENABLED)
// Note: Set stack size to be at least 30 MB (vs 8 MB default) to avoid overflow, address sanitizer can increase stack usage up to 3 times.
struct rlimit stack_lim = { 0x1E00000, 0x1E00000 };
setrlimit(RLIMIT_STACK, &stack_lim);
#endif
OS_LinuxBSD os;
setlocale(LC_CTYPE, "");
// We must override main when testing is enabled
TEST_MAIN_OVERRIDE
char *cwd = (char *)malloc(PATH_MAX);
ERR_FAIL_NULL_V(cwd, ERR_OUT_OF_MEMORY);
char *ret = getcwd(cwd, PATH_MAX);
Error err = Main::setup(argv[0], argc - 1, &argv[1]);
if (err != OK) {
free(cwd);
if (err == ERR_HELP) { // Returned by --help and --version, so success.
return EXIT_SUCCESS;
}
return EXIT_FAILURE;
}
if (Main::start() == EXIT_SUCCESS) {
os.run();
} else {
os.set_exit_code(EXIT_FAILURE);
}
Main::cleanup();
if (ret) { // Previous getcwd was successful
if (chdir(cwd) != 0) {
ERR_PRINT("Couldn't return to previous working directory.");
}
}
free(cwd);
return os.get_exit_code();
}

11
platform/linuxbsd/msvs.py Normal file
View File

@@ -0,0 +1,11 @@
# Tuples with the name of the arch
def get_platforms():
return [("x64", "x86_64")]
def get_configurations():
return ["editor", "template_debug", "template_release"]
def get_build_prefix(env):
return []

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,148 @@
/**************************************************************************/
/* os_linuxbsd.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#include "crash_handler_linuxbsd.h"
#include "core/input/input.h"
#include "drivers/alsa/audio_driver_alsa.h"
#include "drivers/alsamidi/midi_driver_alsamidi.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
#include "drivers/unix/os_unix.h"
#include "servers/audio_server.h"
#ifdef FONTCONFIG_ENABLED
#ifdef SOWRAP_ENABLED
#include "fontconfig-so_wrap.h"
#else
#include <fontconfig/fontconfig.h>
#endif
#endif
class JoypadSDL;
class OS_LinuxBSD : public OS_Unix {
virtual void delete_main_loop() override;
#ifdef FONTCONFIG_ENABLED
bool font_config_initialized = false;
FcConfig *config = nullptr;
FcObjectSet *object_set = nullptr;
int _weight_to_fc(int p_weight) const;
int _stretch_to_fc(int p_stretch) const;
#endif
#ifdef SDL_ENABLED
JoypadSDL *joypad_sdl = nullptr;
#endif
#ifdef ALSA_ENABLED
AudioDriverALSA driver_alsa;
#endif
#ifdef ALSAMIDI_ENABLED
MIDIDriverALSAMidi driver_alsamidi;
#endif
#ifdef PULSEAUDIO_ENABLED
AudioDriverPulseAudio driver_pulseaudio;
#endif
CrashHandler crash_handler;
MainLoop *main_loop = nullptr;
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;
Vector<String> lspci_get_device_value(Vector<String> vendor_device_id_mapping, String check_column, String blacklist) const;
String system_dir_desktop_cache;
protected:
virtual void initialize() override;
virtual void finalize() override;
virtual void initialize_joypads() override;
virtual void set_main_loop(MainLoop *p_main_loop) override;
public:
virtual String get_identifier() const override;
virtual String get_name() const override;
virtual String get_distribution_name() const override;
virtual String get_version() const override;
virtual Vector<String> get_video_adapter_driver_info() const override;
virtual MainLoop *get_main_loop() const override;
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, 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;
virtual String get_cache_path() const override;
virtual String get_system_dir(SystemDir p_dir, bool p_shared_storage = true) const override;
virtual Error shell_open(const String &p_uri) override;
virtual String get_unique_id() const override;
virtual String get_processor_name() const override;
virtual bool is_sandboxed() const override;
virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override;
virtual bool _check_internal_feature_support(const String &p_feature) override;
void run();
virtual void disable_crash_handler() override;
virtual bool is_disable_crash_handler() const override;
virtual Error move_to_trash(const String &p_path) override;
virtual String get_system_ca_certificates() override;
#ifdef TOOLS_ENABLED
virtual bool _test_create_rendering_device_and_gl(const String &p_display_driver) const override;
virtual bool _test_create_rendering_device(const String &p_display_driver) const override;
#endif
OS_LinuxBSD();
~OS_LinuxBSD();
};

View File

@@ -0,0 +1,47 @@
/**************************************************************************/
/* platform_config.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef __linux__
#include <alloca.h>
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#include <cstdlib> // alloca
// FreeBSD and OpenBSD use pthread_set_name_np, while other platforms,
// include NetBSD, use pthread_setname_np. NetBSD's version however requires
// a different format, we handle this directly in thread_posix.
#ifdef __NetBSD__
#define PTHREAD_NETBSD_SET_NAME
#else
#define PTHREAD_BSD_SET_NAME
#endif
#endif

View File

@@ -0,0 +1,42 @@
/**************************************************************************/
/* platform_gl.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifndef GL_API_ENABLED
#define GL_API_ENABLED // Allow using desktop GL.
#endif
#ifndef GLES_API_ENABLED
#define GLES_API_ENABLED // Allow using GLES.
#endif
#include "thirdparty/glad/glad/egl.h"
#include "thirdparty/glad/glad/gl.h"

View File

@@ -0,0 +1,10 @@
"""Functions used to generate source files during build time"""
import os
def make_debug_linuxbsd(target, source, env):
dst = str(target[0])
os.system('objcopy --only-keep-debug "{0}" "{0}.debugsymbols"'.format(dst))
os.system('strip --strip-debug --strip-unneeded "{0}"'.format(dst))
os.system('objcopy --add-gnu-debuglink="{0}.debugsymbols" "{0}"'.format(dst))

View File

@@ -0,0 +1,848 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.3 on 2023-01-12 10:07:46
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/speechd/libspeechd.h --sys-include "thirdparty/linuxbsd_headers/speechd/libspeechd.h" --soname libspeechd.so.2 --init-name speechd --omit-prefix spd_get_client_list --output-header ./platform/linuxbsd/speechd-so_wrap.h --output-implementation ./platform/linuxbsd/speechd-so_wrap.c
//
#include <stdint.h>
#define SPDConnectionAddress__free SPDConnectionAddress__free_dylibloader_orig_speechd
#define spd_get_default_address spd_get_default_address_dylibloader_orig_speechd
#define spd_open spd_open_dylibloader_orig_speechd
#define spd_open2 spd_open2_dylibloader_orig_speechd
#define spd_close spd_close_dylibloader_orig_speechd
#define spd_say spd_say_dylibloader_orig_speechd
#define spd_sayf spd_sayf_dylibloader_orig_speechd
#define spd_stop spd_stop_dylibloader_orig_speechd
#define spd_stop_all spd_stop_all_dylibloader_orig_speechd
#define spd_stop_uid spd_stop_uid_dylibloader_orig_speechd
#define spd_cancel spd_cancel_dylibloader_orig_speechd
#define spd_cancel_all spd_cancel_all_dylibloader_orig_speechd
#define spd_cancel_uid spd_cancel_uid_dylibloader_orig_speechd
#define spd_pause spd_pause_dylibloader_orig_speechd
#define spd_pause_all spd_pause_all_dylibloader_orig_speechd
#define spd_pause_uid spd_pause_uid_dylibloader_orig_speechd
#define spd_resume spd_resume_dylibloader_orig_speechd
#define spd_resume_all spd_resume_all_dylibloader_orig_speechd
#define spd_resume_uid spd_resume_uid_dylibloader_orig_speechd
#define spd_key spd_key_dylibloader_orig_speechd
#define spd_char spd_char_dylibloader_orig_speechd
#define spd_wchar spd_wchar_dylibloader_orig_speechd
#define spd_sound_icon spd_sound_icon_dylibloader_orig_speechd
#define spd_set_voice_type spd_set_voice_type_dylibloader_orig_speechd
#define spd_set_voice_type_all spd_set_voice_type_all_dylibloader_orig_speechd
#define spd_set_voice_type_uid spd_set_voice_type_uid_dylibloader_orig_speechd
#define spd_get_voice_type spd_get_voice_type_dylibloader_orig_speechd
#define spd_set_synthesis_voice spd_set_synthesis_voice_dylibloader_orig_speechd
#define spd_set_synthesis_voice_all spd_set_synthesis_voice_all_dylibloader_orig_speechd
#define spd_set_synthesis_voice_uid spd_set_synthesis_voice_uid_dylibloader_orig_speechd
#define spd_set_data_mode spd_set_data_mode_dylibloader_orig_speechd
#define spd_set_notification_on spd_set_notification_on_dylibloader_orig_speechd
#define spd_set_notification_off spd_set_notification_off_dylibloader_orig_speechd
#define spd_set_notification spd_set_notification_dylibloader_orig_speechd
#define spd_set_voice_rate spd_set_voice_rate_dylibloader_orig_speechd
#define spd_set_voice_rate_all spd_set_voice_rate_all_dylibloader_orig_speechd
#define spd_set_voice_rate_uid spd_set_voice_rate_uid_dylibloader_orig_speechd
#define spd_get_voice_rate spd_get_voice_rate_dylibloader_orig_speechd
#define spd_set_voice_pitch spd_set_voice_pitch_dylibloader_orig_speechd
#define spd_set_voice_pitch_all spd_set_voice_pitch_all_dylibloader_orig_speechd
#define spd_set_voice_pitch_uid spd_set_voice_pitch_uid_dylibloader_orig_speechd
#define spd_get_voice_pitch spd_get_voice_pitch_dylibloader_orig_speechd
#define spd_set_volume spd_set_volume_dylibloader_orig_speechd
#define spd_set_volume_all spd_set_volume_all_dylibloader_orig_speechd
#define spd_set_volume_uid spd_set_volume_uid_dylibloader_orig_speechd
#define spd_get_volume spd_get_volume_dylibloader_orig_speechd
#define spd_set_punctuation spd_set_punctuation_dylibloader_orig_speechd
#define spd_set_punctuation_all spd_set_punctuation_all_dylibloader_orig_speechd
#define spd_set_punctuation_uid spd_set_punctuation_uid_dylibloader_orig_speechd
#define spd_set_capital_letters spd_set_capital_letters_dylibloader_orig_speechd
#define spd_set_capital_letters_all spd_set_capital_letters_all_dylibloader_orig_speechd
#define spd_set_capital_letters_uid spd_set_capital_letters_uid_dylibloader_orig_speechd
#define spd_set_spelling spd_set_spelling_dylibloader_orig_speechd
#define spd_set_spelling_all spd_set_spelling_all_dylibloader_orig_speechd
#define spd_set_spelling_uid spd_set_spelling_uid_dylibloader_orig_speechd
#define spd_set_language spd_set_language_dylibloader_orig_speechd
#define spd_set_language_all spd_set_language_all_dylibloader_orig_speechd
#define spd_set_language_uid spd_set_language_uid_dylibloader_orig_speechd
#define spd_get_language spd_get_language_dylibloader_orig_speechd
#define spd_set_output_module spd_set_output_module_dylibloader_orig_speechd
#define spd_set_output_module_all spd_set_output_module_all_dylibloader_orig_speechd
#define spd_set_output_module_uid spd_set_output_module_uid_dylibloader_orig_speechd
#define spd_get_message_list_fd spd_get_message_list_fd_dylibloader_orig_speechd
#define spd_list_modules spd_list_modules_dylibloader_orig_speechd
#define free_spd_modules free_spd_modules_dylibloader_orig_speechd
#define spd_get_output_module spd_get_output_module_dylibloader_orig_speechd
#define spd_list_voices spd_list_voices_dylibloader_orig_speechd
#define spd_list_synthesis_voices spd_list_synthesis_voices_dylibloader_orig_speechd
#define free_spd_voices free_spd_voices_dylibloader_orig_speechd
#define spd_execute_command_with_list_reply spd_execute_command_with_list_reply_dylibloader_orig_speechd
#define spd_execute_command spd_execute_command_dylibloader_orig_speechd
#define spd_execute_command_with_reply spd_execute_command_with_reply_dylibloader_orig_speechd
#define spd_execute_command_wo_mutex spd_execute_command_wo_mutex_dylibloader_orig_speechd
#define spd_send_data spd_send_data_dylibloader_orig_speechd
#define spd_send_data_wo_mutex spd_send_data_wo_mutex_dylibloader_orig_speechd
#include "thirdparty/linuxbsd_headers/speechd/libspeechd.h"
#undef SPDConnectionAddress__free
#undef spd_get_default_address
#undef spd_open
#undef spd_open2
#undef spd_close
#undef spd_say
#undef spd_sayf
#undef spd_stop
#undef spd_stop_all
#undef spd_stop_uid
#undef spd_cancel
#undef spd_cancel_all
#undef spd_cancel_uid
#undef spd_pause
#undef spd_pause_all
#undef spd_pause_uid
#undef spd_resume
#undef spd_resume_all
#undef spd_resume_uid
#undef spd_key
#undef spd_char
#undef spd_wchar
#undef spd_sound_icon
#undef spd_set_voice_type
#undef spd_set_voice_type_all
#undef spd_set_voice_type_uid
#undef spd_get_voice_type
#undef spd_set_synthesis_voice
#undef spd_set_synthesis_voice_all
#undef spd_set_synthesis_voice_uid
#undef spd_set_data_mode
#undef spd_set_notification_on
#undef spd_set_notification_off
#undef spd_set_notification
#undef spd_set_voice_rate
#undef spd_set_voice_rate_all
#undef spd_set_voice_rate_uid
#undef spd_get_voice_rate
#undef spd_set_voice_pitch
#undef spd_set_voice_pitch_all
#undef spd_set_voice_pitch_uid
#undef spd_get_voice_pitch
#undef spd_set_volume
#undef spd_set_volume_all
#undef spd_set_volume_uid
#undef spd_get_volume
#undef spd_set_punctuation
#undef spd_set_punctuation_all
#undef spd_set_punctuation_uid
#undef spd_set_capital_letters
#undef spd_set_capital_letters_all
#undef spd_set_capital_letters_uid
#undef spd_set_spelling
#undef spd_set_spelling_all
#undef spd_set_spelling_uid
#undef spd_set_language
#undef spd_set_language_all
#undef spd_set_language_uid
#undef spd_get_language
#undef spd_set_output_module
#undef spd_set_output_module_all
#undef spd_set_output_module_uid
#undef spd_get_message_list_fd
#undef spd_list_modules
#undef free_spd_modules
#undef spd_get_output_module
#undef spd_list_voices
#undef spd_list_synthesis_voices
#undef free_spd_voices
#undef spd_execute_command_with_list_reply
#undef spd_execute_command
#undef spd_execute_command_with_reply
#undef spd_execute_command_wo_mutex
#undef spd_send_data
#undef spd_send_data_wo_mutex
#include <dlfcn.h>
#include <stdio.h>
void (*SPDConnectionAddress__free_dylibloader_wrapper_speechd)( SPDConnectionAddress*);
SPDConnectionAddress* (*spd_get_default_address_dylibloader_wrapper_speechd)( char**);
SPDConnection* (*spd_open_dylibloader_wrapper_speechd)(const char*,const char*,const char*, SPDConnectionMode);
SPDConnection* (*spd_open2_dylibloader_wrapper_speechd)(const char*,const char*,const char*, SPDConnectionMode, SPDConnectionAddress*, int, char**);
void (*spd_close_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_say_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*);
int (*spd_sayf_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*,...);
int (*spd_stop_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_stop_all_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_stop_uid_dylibloader_wrapper_speechd)( SPDConnection*, int);
int (*spd_cancel_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_cancel_all_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_cancel_uid_dylibloader_wrapper_speechd)( SPDConnection*, int);
int (*spd_pause_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_pause_all_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_pause_uid_dylibloader_wrapper_speechd)( SPDConnection*, int);
int (*spd_resume_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_resume_all_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_resume_uid_dylibloader_wrapper_speechd)( SPDConnection*, int);
int (*spd_key_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*);
int (*spd_char_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*);
int (*spd_wchar_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority, wchar_t);
int (*spd_sound_icon_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*);
int (*spd_set_voice_type_dylibloader_wrapper_speechd)( SPDConnection*, SPDVoiceType);
int (*spd_set_voice_type_all_dylibloader_wrapper_speechd)( SPDConnection*, SPDVoiceType);
int (*spd_set_voice_type_uid_dylibloader_wrapper_speechd)( SPDConnection*, SPDVoiceType, unsigned int);
SPDVoiceType (*spd_get_voice_type_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_set_synthesis_voice_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
int (*spd_set_synthesis_voice_all_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
int (*spd_set_synthesis_voice_uid_dylibloader_wrapper_speechd)( SPDConnection*,const char*, unsigned int);
int (*spd_set_data_mode_dylibloader_wrapper_speechd)( SPDConnection*, SPDDataMode);
int (*spd_set_notification_on_dylibloader_wrapper_speechd)( SPDConnection*, SPDNotification);
int (*spd_set_notification_off_dylibloader_wrapper_speechd)( SPDConnection*, SPDNotification);
int (*spd_set_notification_dylibloader_wrapper_speechd)( SPDConnection*, SPDNotification,const char*);
int (*spd_set_voice_rate_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
int (*spd_set_voice_rate_all_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
int (*spd_set_voice_rate_uid_dylibloader_wrapper_speechd)( SPDConnection*, signed int, unsigned int);
int (*spd_get_voice_rate_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_set_voice_pitch_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
int (*spd_set_voice_pitch_all_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
int (*spd_set_voice_pitch_uid_dylibloader_wrapper_speechd)( SPDConnection*, signed int, unsigned int);
int (*spd_get_voice_pitch_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_set_volume_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
int (*spd_set_volume_all_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
int (*spd_set_volume_uid_dylibloader_wrapper_speechd)( SPDConnection*, signed int, unsigned int);
int (*spd_get_volume_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_set_punctuation_dylibloader_wrapper_speechd)( SPDConnection*, SPDPunctuation);
int (*spd_set_punctuation_all_dylibloader_wrapper_speechd)( SPDConnection*, SPDPunctuation);
int (*spd_set_punctuation_uid_dylibloader_wrapper_speechd)( SPDConnection*, SPDPunctuation, unsigned int);
int (*spd_set_capital_letters_dylibloader_wrapper_speechd)( SPDConnection*, SPDCapitalLetters);
int (*spd_set_capital_letters_all_dylibloader_wrapper_speechd)( SPDConnection*, SPDCapitalLetters);
int (*spd_set_capital_letters_uid_dylibloader_wrapper_speechd)( SPDConnection*, SPDCapitalLetters, unsigned int);
int (*spd_set_spelling_dylibloader_wrapper_speechd)( SPDConnection*, SPDSpelling);
int (*spd_set_spelling_all_dylibloader_wrapper_speechd)( SPDConnection*, SPDSpelling);
int (*spd_set_spelling_uid_dylibloader_wrapper_speechd)( SPDConnection*, SPDSpelling, unsigned int);
int (*spd_set_language_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
int (*spd_set_language_all_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
int (*spd_set_language_uid_dylibloader_wrapper_speechd)( SPDConnection*,const char*, unsigned int);
char* (*spd_get_language_dylibloader_wrapper_speechd)( SPDConnection*);
int (*spd_set_output_module_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
int (*spd_set_output_module_all_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
int (*spd_set_output_module_uid_dylibloader_wrapper_speechd)( SPDConnection*,const char*, unsigned int);
int (*spd_get_message_list_fd_dylibloader_wrapper_speechd)( SPDConnection*, int, int*, char**);
char** (*spd_list_modules_dylibloader_wrapper_speechd)( SPDConnection*);
void (*free_spd_modules_dylibloader_wrapper_speechd)( char**);
char* (*spd_get_output_module_dylibloader_wrapper_speechd)( SPDConnection*);
char** (*spd_list_voices_dylibloader_wrapper_speechd)( SPDConnection*);
SPDVoice** (*spd_list_synthesis_voices_dylibloader_wrapper_speechd)( SPDConnection*);
void (*free_spd_voices_dylibloader_wrapper_speechd)( SPDVoice**);
char** (*spd_execute_command_with_list_reply_dylibloader_wrapper_speechd)( SPDConnection*, char*);
int (*spd_execute_command_dylibloader_wrapper_speechd)( SPDConnection*, char*);
int (*spd_execute_command_with_reply_dylibloader_wrapper_speechd)( SPDConnection*, char*, char**);
int (*spd_execute_command_wo_mutex_dylibloader_wrapper_speechd)( SPDConnection*, char*);
char* (*spd_send_data_dylibloader_wrapper_speechd)( SPDConnection*,const char*, int);
char* (*spd_send_data_wo_mutex_dylibloader_wrapper_speechd)( SPDConnection*,const char*, int);
int initialize_speechd(int verbose) {
void *handle;
char *error;
handle = dlopen("libspeechd.so.2", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// SPDConnectionAddress__free
*(void **) (&SPDConnectionAddress__free_dylibloader_wrapper_speechd) = dlsym(handle, "SPDConnectionAddress__free");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_get_default_address
*(void **) (&spd_get_default_address_dylibloader_wrapper_speechd) = dlsym(handle, "spd_get_default_address");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_open
*(void **) (&spd_open_dylibloader_wrapper_speechd) = dlsym(handle, "spd_open");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_open2
*(void **) (&spd_open2_dylibloader_wrapper_speechd) = dlsym(handle, "spd_open2");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_close
*(void **) (&spd_close_dylibloader_wrapper_speechd) = dlsym(handle, "spd_close");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_say
*(void **) (&spd_say_dylibloader_wrapper_speechd) = dlsym(handle, "spd_say");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_sayf
*(void **) (&spd_sayf_dylibloader_wrapper_speechd) = dlsym(handle, "spd_sayf");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_stop
*(void **) (&spd_stop_dylibloader_wrapper_speechd) = dlsym(handle, "spd_stop");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_stop_all
*(void **) (&spd_stop_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_stop_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_stop_uid
*(void **) (&spd_stop_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_stop_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_cancel
*(void **) (&spd_cancel_dylibloader_wrapper_speechd) = dlsym(handle, "spd_cancel");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_cancel_all
*(void **) (&spd_cancel_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_cancel_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_cancel_uid
*(void **) (&spd_cancel_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_cancel_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_pause
*(void **) (&spd_pause_dylibloader_wrapper_speechd) = dlsym(handle, "spd_pause");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_pause_all
*(void **) (&spd_pause_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_pause_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_pause_uid
*(void **) (&spd_pause_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_pause_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_resume
*(void **) (&spd_resume_dylibloader_wrapper_speechd) = dlsym(handle, "spd_resume");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_resume_all
*(void **) (&spd_resume_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_resume_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_resume_uid
*(void **) (&spd_resume_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_resume_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_key
*(void **) (&spd_key_dylibloader_wrapper_speechd) = dlsym(handle, "spd_key");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_char
*(void **) (&spd_char_dylibloader_wrapper_speechd) = dlsym(handle, "spd_char");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_wchar
*(void **) (&spd_wchar_dylibloader_wrapper_speechd) = dlsym(handle, "spd_wchar");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_sound_icon
*(void **) (&spd_sound_icon_dylibloader_wrapper_speechd) = dlsym(handle, "spd_sound_icon");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_type
*(void **) (&spd_set_voice_type_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_type");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_type_all
*(void **) (&spd_set_voice_type_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_type_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_type_uid
*(void **) (&spd_set_voice_type_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_type_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_get_voice_type
*(void **) (&spd_get_voice_type_dylibloader_wrapper_speechd) = dlsym(handle, "spd_get_voice_type");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_synthesis_voice
*(void **) (&spd_set_synthesis_voice_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_synthesis_voice");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_synthesis_voice_all
*(void **) (&spd_set_synthesis_voice_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_synthesis_voice_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_synthesis_voice_uid
*(void **) (&spd_set_synthesis_voice_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_synthesis_voice_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_data_mode
*(void **) (&spd_set_data_mode_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_data_mode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_notification_on
*(void **) (&spd_set_notification_on_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_notification_on");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_notification_off
*(void **) (&spd_set_notification_off_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_notification_off");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_notification
*(void **) (&spd_set_notification_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_notification");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_rate
*(void **) (&spd_set_voice_rate_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_rate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_rate_all
*(void **) (&spd_set_voice_rate_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_rate_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_rate_uid
*(void **) (&spd_set_voice_rate_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_rate_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_get_voice_rate
*(void **) (&spd_get_voice_rate_dylibloader_wrapper_speechd) = dlsym(handle, "spd_get_voice_rate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_pitch
*(void **) (&spd_set_voice_pitch_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_pitch");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_pitch_all
*(void **) (&spd_set_voice_pitch_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_pitch_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_voice_pitch_uid
*(void **) (&spd_set_voice_pitch_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_voice_pitch_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_get_voice_pitch
*(void **) (&spd_get_voice_pitch_dylibloader_wrapper_speechd) = dlsym(handle, "spd_get_voice_pitch");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_volume
*(void **) (&spd_set_volume_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_volume");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_volume_all
*(void **) (&spd_set_volume_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_volume_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_volume_uid
*(void **) (&spd_set_volume_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_volume_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_get_volume
*(void **) (&spd_get_volume_dylibloader_wrapper_speechd) = dlsym(handle, "spd_get_volume");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_punctuation
*(void **) (&spd_set_punctuation_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_punctuation");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_punctuation_all
*(void **) (&spd_set_punctuation_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_punctuation_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_punctuation_uid
*(void **) (&spd_set_punctuation_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_punctuation_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_capital_letters
*(void **) (&spd_set_capital_letters_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_capital_letters");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_capital_letters_all
*(void **) (&spd_set_capital_letters_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_capital_letters_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_capital_letters_uid
*(void **) (&spd_set_capital_letters_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_capital_letters_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_spelling
*(void **) (&spd_set_spelling_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_spelling");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_spelling_all
*(void **) (&spd_set_spelling_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_spelling_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_spelling_uid
*(void **) (&spd_set_spelling_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_spelling_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_language
*(void **) (&spd_set_language_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_language");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_language_all
*(void **) (&spd_set_language_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_language_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_language_uid
*(void **) (&spd_set_language_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_language_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_get_language
*(void **) (&spd_get_language_dylibloader_wrapper_speechd) = dlsym(handle, "spd_get_language");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_output_module
*(void **) (&spd_set_output_module_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_output_module");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_output_module_all
*(void **) (&spd_set_output_module_all_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_output_module_all");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_set_output_module_uid
*(void **) (&spd_set_output_module_uid_dylibloader_wrapper_speechd) = dlsym(handle, "spd_set_output_module_uid");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_get_message_list_fd
*(void **) (&spd_get_message_list_fd_dylibloader_wrapper_speechd) = dlsym(handle, "spd_get_message_list_fd");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_list_modules
*(void **) (&spd_list_modules_dylibloader_wrapper_speechd) = dlsym(handle, "spd_list_modules");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// free_spd_modules
*(void **) (&free_spd_modules_dylibloader_wrapper_speechd) = dlsym(handle, "free_spd_modules");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_get_output_module
*(void **) (&spd_get_output_module_dylibloader_wrapper_speechd) = dlsym(handle, "spd_get_output_module");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_list_voices
*(void **) (&spd_list_voices_dylibloader_wrapper_speechd) = dlsym(handle, "spd_list_voices");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_list_synthesis_voices
*(void **) (&spd_list_synthesis_voices_dylibloader_wrapper_speechd) = dlsym(handle, "spd_list_synthesis_voices");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// free_spd_voices
*(void **) (&free_spd_voices_dylibloader_wrapper_speechd) = dlsym(handle, "free_spd_voices");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_execute_command_with_list_reply
*(void **) (&spd_execute_command_with_list_reply_dylibloader_wrapper_speechd) = dlsym(handle, "spd_execute_command_with_list_reply");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_execute_command
*(void **) (&spd_execute_command_dylibloader_wrapper_speechd) = dlsym(handle, "spd_execute_command");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_execute_command_with_reply
*(void **) (&spd_execute_command_with_reply_dylibloader_wrapper_speechd) = dlsym(handle, "spd_execute_command_with_reply");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_execute_command_wo_mutex
*(void **) (&spd_execute_command_wo_mutex_dylibloader_wrapper_speechd) = dlsym(handle, "spd_execute_command_wo_mutex");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_send_data
*(void **) (&spd_send_data_dylibloader_wrapper_speechd) = dlsym(handle, "spd_send_data");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// spd_send_data_wo_mutex
*(void **) (&spd_send_data_wo_mutex_dylibloader_wrapper_speechd) = dlsym(handle, "spd_send_data_wo_mutex");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@@ -0,0 +1,318 @@
#ifndef DYLIBLOAD_WRAPPER_SPEECHD
#define DYLIBLOAD_WRAPPER_SPEECHD
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.3 on 2023-01-12 10:07:46
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/speechd/libspeechd.h --sys-include "thirdparty/linuxbsd_headers/speechd/libspeechd.h" --soname libspeechd.so.2 --init-name speechd --omit-prefix spd_get_client_list --output-header ./platform/linuxbsd/speechd-so_wrap.h --output-implementation ./platform/linuxbsd/speechd-so_wrap.c
//
#include <stdint.h>
#define SPDConnectionAddress__free SPDConnectionAddress__free_dylibloader_orig_speechd
#define spd_get_default_address spd_get_default_address_dylibloader_orig_speechd
#define spd_open spd_open_dylibloader_orig_speechd
#define spd_open2 spd_open2_dylibloader_orig_speechd
#define spd_close spd_close_dylibloader_orig_speechd
#define spd_say spd_say_dylibloader_orig_speechd
#define spd_sayf spd_sayf_dylibloader_orig_speechd
#define spd_stop spd_stop_dylibloader_orig_speechd
#define spd_stop_all spd_stop_all_dylibloader_orig_speechd
#define spd_stop_uid spd_stop_uid_dylibloader_orig_speechd
#define spd_cancel spd_cancel_dylibloader_orig_speechd
#define spd_cancel_all spd_cancel_all_dylibloader_orig_speechd
#define spd_cancel_uid spd_cancel_uid_dylibloader_orig_speechd
#define spd_pause spd_pause_dylibloader_orig_speechd
#define spd_pause_all spd_pause_all_dylibloader_orig_speechd
#define spd_pause_uid spd_pause_uid_dylibloader_orig_speechd
#define spd_resume spd_resume_dylibloader_orig_speechd
#define spd_resume_all spd_resume_all_dylibloader_orig_speechd
#define spd_resume_uid spd_resume_uid_dylibloader_orig_speechd
#define spd_key spd_key_dylibloader_orig_speechd
#define spd_char spd_char_dylibloader_orig_speechd
#define spd_wchar spd_wchar_dylibloader_orig_speechd
#define spd_sound_icon spd_sound_icon_dylibloader_orig_speechd
#define spd_set_voice_type spd_set_voice_type_dylibloader_orig_speechd
#define spd_set_voice_type_all spd_set_voice_type_all_dylibloader_orig_speechd
#define spd_set_voice_type_uid spd_set_voice_type_uid_dylibloader_orig_speechd
#define spd_get_voice_type spd_get_voice_type_dylibloader_orig_speechd
#define spd_set_synthesis_voice spd_set_synthesis_voice_dylibloader_orig_speechd
#define spd_set_synthesis_voice_all spd_set_synthesis_voice_all_dylibloader_orig_speechd
#define spd_set_synthesis_voice_uid spd_set_synthesis_voice_uid_dylibloader_orig_speechd
#define spd_set_data_mode spd_set_data_mode_dylibloader_orig_speechd
#define spd_set_notification_on spd_set_notification_on_dylibloader_orig_speechd
#define spd_set_notification_off spd_set_notification_off_dylibloader_orig_speechd
#define spd_set_notification spd_set_notification_dylibloader_orig_speechd
#define spd_set_voice_rate spd_set_voice_rate_dylibloader_orig_speechd
#define spd_set_voice_rate_all spd_set_voice_rate_all_dylibloader_orig_speechd
#define spd_set_voice_rate_uid spd_set_voice_rate_uid_dylibloader_orig_speechd
#define spd_get_voice_rate spd_get_voice_rate_dylibloader_orig_speechd
#define spd_set_voice_pitch spd_set_voice_pitch_dylibloader_orig_speechd
#define spd_set_voice_pitch_all spd_set_voice_pitch_all_dylibloader_orig_speechd
#define spd_set_voice_pitch_uid spd_set_voice_pitch_uid_dylibloader_orig_speechd
#define spd_get_voice_pitch spd_get_voice_pitch_dylibloader_orig_speechd
#define spd_set_volume spd_set_volume_dylibloader_orig_speechd
#define spd_set_volume_all spd_set_volume_all_dylibloader_orig_speechd
#define spd_set_volume_uid spd_set_volume_uid_dylibloader_orig_speechd
#define spd_get_volume spd_get_volume_dylibloader_orig_speechd
#define spd_set_punctuation spd_set_punctuation_dylibloader_orig_speechd
#define spd_set_punctuation_all spd_set_punctuation_all_dylibloader_orig_speechd
#define spd_set_punctuation_uid spd_set_punctuation_uid_dylibloader_orig_speechd
#define spd_set_capital_letters spd_set_capital_letters_dylibloader_orig_speechd
#define spd_set_capital_letters_all spd_set_capital_letters_all_dylibloader_orig_speechd
#define spd_set_capital_letters_uid spd_set_capital_letters_uid_dylibloader_orig_speechd
#define spd_set_spelling spd_set_spelling_dylibloader_orig_speechd
#define spd_set_spelling_all spd_set_spelling_all_dylibloader_orig_speechd
#define spd_set_spelling_uid spd_set_spelling_uid_dylibloader_orig_speechd
#define spd_set_language spd_set_language_dylibloader_orig_speechd
#define spd_set_language_all spd_set_language_all_dylibloader_orig_speechd
#define spd_set_language_uid spd_set_language_uid_dylibloader_orig_speechd
#define spd_get_language spd_get_language_dylibloader_orig_speechd
#define spd_set_output_module spd_set_output_module_dylibloader_orig_speechd
#define spd_set_output_module_all spd_set_output_module_all_dylibloader_orig_speechd
#define spd_set_output_module_uid spd_set_output_module_uid_dylibloader_orig_speechd
#define spd_get_message_list_fd spd_get_message_list_fd_dylibloader_orig_speechd
#define spd_list_modules spd_list_modules_dylibloader_orig_speechd
#define free_spd_modules free_spd_modules_dylibloader_orig_speechd
#define spd_get_output_module spd_get_output_module_dylibloader_orig_speechd
#define spd_list_voices spd_list_voices_dylibloader_orig_speechd
#define spd_list_synthesis_voices spd_list_synthesis_voices_dylibloader_orig_speechd
#define free_spd_voices free_spd_voices_dylibloader_orig_speechd
#define spd_execute_command_with_list_reply spd_execute_command_with_list_reply_dylibloader_orig_speechd
#define spd_execute_command spd_execute_command_dylibloader_orig_speechd
#define spd_execute_command_with_reply spd_execute_command_with_reply_dylibloader_orig_speechd
#define spd_execute_command_wo_mutex spd_execute_command_wo_mutex_dylibloader_orig_speechd
#define spd_send_data spd_send_data_dylibloader_orig_speechd
#define spd_send_data_wo_mutex spd_send_data_wo_mutex_dylibloader_orig_speechd
#include "thirdparty/linuxbsd_headers/speechd/libspeechd.h"
#undef SPDConnectionAddress__free
#undef spd_get_default_address
#undef spd_open
#undef spd_open2
#undef spd_close
#undef spd_say
#undef spd_sayf
#undef spd_stop
#undef spd_stop_all
#undef spd_stop_uid
#undef spd_cancel
#undef spd_cancel_all
#undef spd_cancel_uid
#undef spd_pause
#undef spd_pause_all
#undef spd_pause_uid
#undef spd_resume
#undef spd_resume_all
#undef spd_resume_uid
#undef spd_key
#undef spd_char
#undef spd_wchar
#undef spd_sound_icon
#undef spd_set_voice_type
#undef spd_set_voice_type_all
#undef spd_set_voice_type_uid
#undef spd_get_voice_type
#undef spd_set_synthesis_voice
#undef spd_set_synthesis_voice_all
#undef spd_set_synthesis_voice_uid
#undef spd_set_data_mode
#undef spd_set_notification_on
#undef spd_set_notification_off
#undef spd_set_notification
#undef spd_set_voice_rate
#undef spd_set_voice_rate_all
#undef spd_set_voice_rate_uid
#undef spd_get_voice_rate
#undef spd_set_voice_pitch
#undef spd_set_voice_pitch_all
#undef spd_set_voice_pitch_uid
#undef spd_get_voice_pitch
#undef spd_set_volume
#undef spd_set_volume_all
#undef spd_set_volume_uid
#undef spd_get_volume
#undef spd_set_punctuation
#undef spd_set_punctuation_all
#undef spd_set_punctuation_uid
#undef spd_set_capital_letters
#undef spd_set_capital_letters_all
#undef spd_set_capital_letters_uid
#undef spd_set_spelling
#undef spd_set_spelling_all
#undef spd_set_spelling_uid
#undef spd_set_language
#undef spd_set_language_all
#undef spd_set_language_uid
#undef spd_get_language
#undef spd_set_output_module
#undef spd_set_output_module_all
#undef spd_set_output_module_uid
#undef spd_get_message_list_fd
#undef spd_list_modules
#undef free_spd_modules
#undef spd_get_output_module
#undef spd_list_voices
#undef spd_list_synthesis_voices
#undef free_spd_voices
#undef spd_execute_command_with_list_reply
#undef spd_execute_command
#undef spd_execute_command_with_reply
#undef spd_execute_command_wo_mutex
#undef spd_send_data
#undef spd_send_data_wo_mutex
#ifdef __cplusplus
extern "C" {
#endif
#define SPDConnectionAddress__free SPDConnectionAddress__free_dylibloader_wrapper_speechd
#define spd_get_default_address spd_get_default_address_dylibloader_wrapper_speechd
#define spd_open spd_open_dylibloader_wrapper_speechd
#define spd_open2 spd_open2_dylibloader_wrapper_speechd
#define spd_close spd_close_dylibloader_wrapper_speechd
#define spd_say spd_say_dylibloader_wrapper_speechd
#define spd_sayf spd_sayf_dylibloader_wrapper_speechd
#define spd_stop spd_stop_dylibloader_wrapper_speechd
#define spd_stop_all spd_stop_all_dylibloader_wrapper_speechd
#define spd_stop_uid spd_stop_uid_dylibloader_wrapper_speechd
#define spd_cancel spd_cancel_dylibloader_wrapper_speechd
#define spd_cancel_all spd_cancel_all_dylibloader_wrapper_speechd
#define spd_cancel_uid spd_cancel_uid_dylibloader_wrapper_speechd
#define spd_pause spd_pause_dylibloader_wrapper_speechd
#define spd_pause_all spd_pause_all_dylibloader_wrapper_speechd
#define spd_pause_uid spd_pause_uid_dylibloader_wrapper_speechd
#define spd_resume spd_resume_dylibloader_wrapper_speechd
#define spd_resume_all spd_resume_all_dylibloader_wrapper_speechd
#define spd_resume_uid spd_resume_uid_dylibloader_wrapper_speechd
#define spd_key spd_key_dylibloader_wrapper_speechd
#define spd_char spd_char_dylibloader_wrapper_speechd
#define spd_wchar spd_wchar_dylibloader_wrapper_speechd
#define spd_sound_icon spd_sound_icon_dylibloader_wrapper_speechd
#define spd_set_voice_type spd_set_voice_type_dylibloader_wrapper_speechd
#define spd_set_voice_type_all spd_set_voice_type_all_dylibloader_wrapper_speechd
#define spd_set_voice_type_uid spd_set_voice_type_uid_dylibloader_wrapper_speechd
#define spd_get_voice_type spd_get_voice_type_dylibloader_wrapper_speechd
#define spd_set_synthesis_voice spd_set_synthesis_voice_dylibloader_wrapper_speechd
#define spd_set_synthesis_voice_all spd_set_synthesis_voice_all_dylibloader_wrapper_speechd
#define spd_set_synthesis_voice_uid spd_set_synthesis_voice_uid_dylibloader_wrapper_speechd
#define spd_set_data_mode spd_set_data_mode_dylibloader_wrapper_speechd
#define spd_set_notification_on spd_set_notification_on_dylibloader_wrapper_speechd
#define spd_set_notification_off spd_set_notification_off_dylibloader_wrapper_speechd
#define spd_set_notification spd_set_notification_dylibloader_wrapper_speechd
#define spd_set_voice_rate spd_set_voice_rate_dylibloader_wrapper_speechd
#define spd_set_voice_rate_all spd_set_voice_rate_all_dylibloader_wrapper_speechd
#define spd_set_voice_rate_uid spd_set_voice_rate_uid_dylibloader_wrapper_speechd
#define spd_get_voice_rate spd_get_voice_rate_dylibloader_wrapper_speechd
#define spd_set_voice_pitch spd_set_voice_pitch_dylibloader_wrapper_speechd
#define spd_set_voice_pitch_all spd_set_voice_pitch_all_dylibloader_wrapper_speechd
#define spd_set_voice_pitch_uid spd_set_voice_pitch_uid_dylibloader_wrapper_speechd
#define spd_get_voice_pitch spd_get_voice_pitch_dylibloader_wrapper_speechd
#define spd_set_volume spd_set_volume_dylibloader_wrapper_speechd
#define spd_set_volume_all spd_set_volume_all_dylibloader_wrapper_speechd
#define spd_set_volume_uid spd_set_volume_uid_dylibloader_wrapper_speechd
#define spd_get_volume spd_get_volume_dylibloader_wrapper_speechd
#define spd_set_punctuation spd_set_punctuation_dylibloader_wrapper_speechd
#define spd_set_punctuation_all spd_set_punctuation_all_dylibloader_wrapper_speechd
#define spd_set_punctuation_uid spd_set_punctuation_uid_dylibloader_wrapper_speechd
#define spd_set_capital_letters spd_set_capital_letters_dylibloader_wrapper_speechd
#define spd_set_capital_letters_all spd_set_capital_letters_all_dylibloader_wrapper_speechd
#define spd_set_capital_letters_uid spd_set_capital_letters_uid_dylibloader_wrapper_speechd
#define spd_set_spelling spd_set_spelling_dylibloader_wrapper_speechd
#define spd_set_spelling_all spd_set_spelling_all_dylibloader_wrapper_speechd
#define spd_set_spelling_uid spd_set_spelling_uid_dylibloader_wrapper_speechd
#define spd_set_language spd_set_language_dylibloader_wrapper_speechd
#define spd_set_language_all spd_set_language_all_dylibloader_wrapper_speechd
#define spd_set_language_uid spd_set_language_uid_dylibloader_wrapper_speechd
#define spd_get_language spd_get_language_dylibloader_wrapper_speechd
#define spd_set_output_module spd_set_output_module_dylibloader_wrapper_speechd
#define spd_set_output_module_all spd_set_output_module_all_dylibloader_wrapper_speechd
#define spd_set_output_module_uid spd_set_output_module_uid_dylibloader_wrapper_speechd
#define spd_get_message_list_fd spd_get_message_list_fd_dylibloader_wrapper_speechd
#define spd_list_modules spd_list_modules_dylibloader_wrapper_speechd
#define free_spd_modules free_spd_modules_dylibloader_wrapper_speechd
#define spd_get_output_module spd_get_output_module_dylibloader_wrapper_speechd
#define spd_list_voices spd_list_voices_dylibloader_wrapper_speechd
#define spd_list_synthesis_voices spd_list_synthesis_voices_dylibloader_wrapper_speechd
#define free_spd_voices free_spd_voices_dylibloader_wrapper_speechd
#define spd_execute_command_with_list_reply spd_execute_command_with_list_reply_dylibloader_wrapper_speechd
#define spd_execute_command spd_execute_command_dylibloader_wrapper_speechd
#define spd_execute_command_with_reply spd_execute_command_with_reply_dylibloader_wrapper_speechd
#define spd_execute_command_wo_mutex spd_execute_command_wo_mutex_dylibloader_wrapper_speechd
#define spd_send_data spd_send_data_dylibloader_wrapper_speechd
#define spd_send_data_wo_mutex spd_send_data_wo_mutex_dylibloader_wrapper_speechd
extern void (*SPDConnectionAddress__free_dylibloader_wrapper_speechd)( SPDConnectionAddress*);
extern SPDConnectionAddress* (*spd_get_default_address_dylibloader_wrapper_speechd)( char**);
extern SPDConnection* (*spd_open_dylibloader_wrapper_speechd)(const char*,const char*,const char*, SPDConnectionMode);
extern SPDConnection* (*spd_open2_dylibloader_wrapper_speechd)(const char*,const char*,const char*, SPDConnectionMode, SPDConnectionAddress*, int, char**);
extern void (*spd_close_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_say_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*);
extern int (*spd_sayf_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*,...);
extern int (*spd_stop_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_stop_all_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_stop_uid_dylibloader_wrapper_speechd)( SPDConnection*, int);
extern int (*spd_cancel_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_cancel_all_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_cancel_uid_dylibloader_wrapper_speechd)( SPDConnection*, int);
extern int (*spd_pause_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_pause_all_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_pause_uid_dylibloader_wrapper_speechd)( SPDConnection*, int);
extern int (*spd_resume_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_resume_all_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_resume_uid_dylibloader_wrapper_speechd)( SPDConnection*, int);
extern int (*spd_key_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*);
extern int (*spd_char_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*);
extern int (*spd_wchar_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority, wchar_t);
extern int (*spd_sound_icon_dylibloader_wrapper_speechd)( SPDConnection*, SPDPriority,const char*);
extern int (*spd_set_voice_type_dylibloader_wrapper_speechd)( SPDConnection*, SPDVoiceType);
extern int (*spd_set_voice_type_all_dylibloader_wrapper_speechd)( SPDConnection*, SPDVoiceType);
extern int (*spd_set_voice_type_uid_dylibloader_wrapper_speechd)( SPDConnection*, SPDVoiceType, unsigned int);
extern SPDVoiceType (*spd_get_voice_type_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_set_synthesis_voice_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
extern int (*spd_set_synthesis_voice_all_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
extern int (*spd_set_synthesis_voice_uid_dylibloader_wrapper_speechd)( SPDConnection*,const char*, unsigned int);
extern int (*spd_set_data_mode_dylibloader_wrapper_speechd)( SPDConnection*, SPDDataMode);
extern int (*spd_set_notification_on_dylibloader_wrapper_speechd)( SPDConnection*, SPDNotification);
extern int (*spd_set_notification_off_dylibloader_wrapper_speechd)( SPDConnection*, SPDNotification);
extern int (*spd_set_notification_dylibloader_wrapper_speechd)( SPDConnection*, SPDNotification,const char*);
extern int (*spd_set_voice_rate_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
extern int (*spd_set_voice_rate_all_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
extern int (*spd_set_voice_rate_uid_dylibloader_wrapper_speechd)( SPDConnection*, signed int, unsigned int);
extern int (*spd_get_voice_rate_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_set_voice_pitch_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
extern int (*spd_set_voice_pitch_all_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
extern int (*spd_set_voice_pitch_uid_dylibloader_wrapper_speechd)( SPDConnection*, signed int, unsigned int);
extern int (*spd_get_voice_pitch_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_set_volume_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
extern int (*spd_set_volume_all_dylibloader_wrapper_speechd)( SPDConnection*, signed int);
extern int (*spd_set_volume_uid_dylibloader_wrapper_speechd)( SPDConnection*, signed int, unsigned int);
extern int (*spd_get_volume_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_set_punctuation_dylibloader_wrapper_speechd)( SPDConnection*, SPDPunctuation);
extern int (*spd_set_punctuation_all_dylibloader_wrapper_speechd)( SPDConnection*, SPDPunctuation);
extern int (*spd_set_punctuation_uid_dylibloader_wrapper_speechd)( SPDConnection*, SPDPunctuation, unsigned int);
extern int (*spd_set_capital_letters_dylibloader_wrapper_speechd)( SPDConnection*, SPDCapitalLetters);
extern int (*spd_set_capital_letters_all_dylibloader_wrapper_speechd)( SPDConnection*, SPDCapitalLetters);
extern int (*spd_set_capital_letters_uid_dylibloader_wrapper_speechd)( SPDConnection*, SPDCapitalLetters, unsigned int);
extern int (*spd_set_spelling_dylibloader_wrapper_speechd)( SPDConnection*, SPDSpelling);
extern int (*spd_set_spelling_all_dylibloader_wrapper_speechd)( SPDConnection*, SPDSpelling);
extern int (*spd_set_spelling_uid_dylibloader_wrapper_speechd)( SPDConnection*, SPDSpelling, unsigned int);
extern int (*spd_set_language_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
extern int (*spd_set_language_all_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
extern int (*spd_set_language_uid_dylibloader_wrapper_speechd)( SPDConnection*,const char*, unsigned int);
extern char* (*spd_get_language_dylibloader_wrapper_speechd)( SPDConnection*);
extern int (*spd_set_output_module_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
extern int (*spd_set_output_module_all_dylibloader_wrapper_speechd)( SPDConnection*,const char*);
extern int (*spd_set_output_module_uid_dylibloader_wrapper_speechd)( SPDConnection*,const char*, unsigned int);
extern int (*spd_get_message_list_fd_dylibloader_wrapper_speechd)( SPDConnection*, int, int*, char**);
extern char** (*spd_list_modules_dylibloader_wrapper_speechd)( SPDConnection*);
extern void (*free_spd_modules_dylibloader_wrapper_speechd)( char**);
extern char* (*spd_get_output_module_dylibloader_wrapper_speechd)( SPDConnection*);
extern char** (*spd_list_voices_dylibloader_wrapper_speechd)( SPDConnection*);
extern SPDVoice** (*spd_list_synthesis_voices_dylibloader_wrapper_speechd)( SPDConnection*);
extern void (*free_spd_voices_dylibloader_wrapper_speechd)( SPDVoice**);
extern char** (*spd_execute_command_with_list_reply_dylibloader_wrapper_speechd)( SPDConnection*, char*);
extern int (*spd_execute_command_dylibloader_wrapper_speechd)( SPDConnection*, char*);
extern int (*spd_execute_command_with_reply_dylibloader_wrapper_speechd)( SPDConnection*, char*, char**);
extern int (*spd_execute_command_wo_mutex_dylibloader_wrapper_speechd)( SPDConnection*, char*);
extern char* (*spd_send_data_dylibloader_wrapper_speechd)( SPDConnection*,const char*, int);
extern char* (*spd_send_data_wo_mutex_dylibloader_wrapper_speechd)( SPDConnection*,const char*, int);
int initialize_speechd(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,292 @@
/**************************************************************************/
/* tts_linux.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "tts_linux.h"
#include "core/config/project_settings.h"
#include "servers/text_server.h"
TTS_Linux *TTS_Linux::singleton = nullptr;
void TTS_Linux::speech_init_thread_func(void *p_userdata) {
TTS_Linux *tts = (TTS_Linux *)p_userdata;
if (tts) {
MutexLock thread_safe_method(tts->_thread_safe_);
#ifdef SOWRAP_ENABLED
#ifdef DEBUG_ENABLED
int dylibloader_verbose = 1;
#else
int dylibloader_verbose = 0;
#endif
if (initialize_speechd(dylibloader_verbose) != 0) {
print_verbose("Text-to-Speech: Cannot load Speech Dispatcher library!");
} else {
if (!spd_open || !spd_set_notification_on || !spd_list_synthesis_voices || !free_spd_voices || !spd_set_synthesis_voice || !spd_set_volume || !spd_set_voice_pitch || !spd_set_voice_rate || !spd_set_data_mode || !spd_say || !spd_pause || !spd_resume || !spd_cancel) {
// There's no API to check version, check if functions are available instead.
print_verbose("Text-to-Speech: Unsupported Speech Dispatcher library version!");
return;
}
#else
{
#endif
CharString class_str;
String config_name = GLOBAL_GET("application/config/name");
if (config_name.length() == 0) {
class_str = "Godot_Engine";
} else {
class_str = config_name.utf8();
}
tts->synth = spd_open(class_str.get_data(), "Godot_Engine_Speech_API", "Godot_Engine", SPD_MODE_THREADED);
if (tts->synth) {
tts->synth->callback_end = &speech_event_callback;
tts->synth->callback_cancel = &speech_event_callback;
tts->synth->callback_im = &speech_event_index_mark;
spd_set_notification_on(tts->synth, SPD_END);
spd_set_notification_on(tts->synth, SPD_CANCEL);
print_verbose("Text-to-Speech: Speech Dispatcher initialized.");
} else {
print_verbose("Text-to-Speech: Cannot initialize Speech Dispatcher synthesizer!");
}
}
}
}
void TTS_Linux::speech_event_index_mark(size_t p_msg_id, size_t p_client_id, SPDNotificationType p_type, char *p_index_mark) {
TTS_Linux *tts = TTS_Linux::get_singleton();
if (tts) {
callable_mp(tts, &TTS_Linux::_speech_index_mark).call_deferred((int)p_msg_id, (int)p_type, String::utf8(p_index_mark));
}
}
void TTS_Linux::_speech_index_mark(int p_msg_id, int p_type, const String &p_index_mark) {
_THREAD_SAFE_METHOD_
if (ids.has(p_msg_id)) {
DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_BOUNDARY, ids[p_msg_id], p_index_mark.to_int());
}
}
void TTS_Linux::speech_event_callback(size_t p_msg_id, size_t p_client_id, SPDNotificationType p_type) {
TTS_Linux *tts = TTS_Linux::get_singleton();
if (tts) {
callable_mp(tts, &TTS_Linux::_speech_event).call_deferred((int)p_msg_id, (int)p_type);
}
}
void TTS_Linux::_load_voices() const {
if (!voices_loaded) {
SPDVoice **spd_voices = spd_list_synthesis_voices(synth);
if (spd_voices != nullptr) {
SPDVoice **voices_ptr = spd_voices;
while (*voices_ptr != nullptr) {
VoiceInfo vi;
vi.language = String::utf8((*voices_ptr)->language);
vi.variant = String::utf8((*voices_ptr)->variant);
voices[String::utf8((*voices_ptr)->name)] = vi;
voices_ptr++;
}
free_spd_voices(spd_voices);
}
voices_loaded = true;
}
}
void TTS_Linux::_speech_event(int p_msg_id, int p_type) {
_THREAD_SAFE_METHOD_
if (!paused && ids.has(p_msg_id)) {
if ((SPDNotificationType)p_type == SPD_EVENT_END) {
DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_ENDED, ids[p_msg_id]);
ids.erase(p_msg_id);
last_msg_id = -1;
speaking = false;
} else if ((SPDNotificationType)p_type == SPD_EVENT_CANCEL) {
DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, ids[p_msg_id]);
ids.erase(p_msg_id);
last_msg_id = -1;
speaking = false;
}
}
if (!speaking && queue.size() > 0) {
DisplayServer::TTSUtterance &message = queue.front()->get();
// Inject index mark after each word.
String text;
String language;
_load_voices();
const VoiceInfo *voice = voices.getptr(message.voice);
if (voice) {
language = voice->language;
}
PackedInt32Array breaks = TS->string_get_word_breaks(message.text, language);
int prev_end = -1;
for (int i = 0; i < breaks.size(); i += 2) {
const int start = breaks[i];
const int end = breaks[i + 1];
if (prev_end != -1 && prev_end != start) {
text += message.text.substr(prev_end, start - prev_end);
}
text += message.text.substr(start, end - start);
text += "<mark name=\"" + String::num_int64(end, 10) + "\"/>";
prev_end = end;
}
spd_set_synthesis_voice(synth, message.voice.utf8().get_data());
spd_set_volume(synth, message.volume * 2 - 100);
spd_set_voice_pitch(synth, (message.pitch - 1) * 100);
float rate = 0;
if (message.rate > 1.f) {
rate = std::log10(MIN(message.rate, 2.5f)) / std::log10(2.5f) * 100;
} else if (message.rate < 1.f) {
rate = std::log10(MAX(message.rate, 0.5f)) / std::log10(0.5f) * -100;
}
spd_set_voice_rate(synth, rate);
spd_set_data_mode(synth, SPD_DATA_SSML);
last_msg_id = spd_say(synth, SPD_TEXT, text.utf8().get_data());
ids[last_msg_id] = message.id;
DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_STARTED, message.id);
queue.pop_front();
speaking = true;
}
}
bool TTS_Linux::is_speaking() const {
return speaking;
}
bool TTS_Linux::is_paused() const {
return paused;
}
Array TTS_Linux::get_voices() const {
_THREAD_SAFE_METHOD_
ERR_FAIL_NULL_V(synth, Array());
_load_voices();
Array list;
for (const KeyValue<String, VoiceInfo> &E : voices) {
Dictionary voice_d;
voice_d["name"] = E.key;
voice_d["id"] = E.key;
voice_d["language"] = E.value.language + "_" + E.value.variant;
list.push_back(voice_d);
}
return list;
}
void TTS_Linux::speak(const String &p_text, const String &p_voice, int p_volume, float p_pitch, float p_rate, int p_utterance_id, bool p_interrupt) {
_THREAD_SAFE_METHOD_
ERR_FAIL_NULL(synth);
if (p_interrupt) {
stop();
}
if (p_text.is_empty()) {
DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, p_utterance_id);
return;
}
DisplayServer::TTSUtterance message;
message.text = p_text;
message.voice = p_voice;
message.volume = CLAMP(p_volume, 0, 100);
message.pitch = CLAMP(p_pitch, 0.f, 2.f);
message.rate = CLAMP(p_rate, 0.1f, 10.f);
message.id = p_utterance_id;
queue.push_back(message);
if (is_paused()) {
resume();
} else {
_speech_event(0, (int)SPD_EVENT_BEGIN);
}
}
void TTS_Linux::pause() {
_THREAD_SAFE_METHOD_
ERR_FAIL_NULL(synth);
if (spd_pause(synth) == 0) {
paused = true;
}
}
void TTS_Linux::resume() {
_THREAD_SAFE_METHOD_
ERR_FAIL_NULL(synth);
spd_resume(synth);
paused = false;
}
void TTS_Linux::stop() {
_THREAD_SAFE_METHOD_
ERR_FAIL_NULL(synth);
for (DisplayServer::TTSUtterance &message : queue) {
DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, message.id);
}
if ((last_msg_id != -1) && ids.has(last_msg_id)) {
DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, ids[last_msg_id]);
}
queue.clear();
ids.clear();
last_msg_id = -1;
spd_cancel(synth);
spd_resume(synth);
speaking = false;
paused = false;
}
TTS_Linux *TTS_Linux::get_singleton() {
return singleton;
}
TTS_Linux::TTS_Linux() {
singleton = this;
// Speech Dispatcher init can be slow, it might wait for helper process to start on background, so run it in the thread.
init_thread.start(speech_init_thread_func, this);
}
TTS_Linux::~TTS_Linux() {
init_thread.wait_to_finish();
if (synth) {
spd_close(synth);
}
singleton = nullptr;
}

View File

@@ -0,0 +1,91 @@
/**************************************************************************/
/* tts_linux.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#include "core/os/thread.h"
#include "core/os/thread_safe.h"
#include "core/string/ustring.h"
#include "core/templates/hash_map.h"
#include "core/templates/list.h"
#include "core/variant/array.h"
#include "servers/display_server.h"
#ifdef SOWRAP_ENABLED
#include "speechd-so_wrap.h"
#else
#include <libspeechd.h>
#endif
class TTS_Linux : public Object {
_THREAD_SAFE_CLASS_
List<DisplayServer::TTSUtterance> queue;
SPDConnection *synth = nullptr;
bool speaking = false;
bool paused = false;
int last_msg_id = -1;
HashMap<int, int> ids;
struct VoiceInfo {
String language;
String variant;
};
mutable bool voices_loaded = false;
mutable HashMap<String, VoiceInfo> voices;
Thread init_thread;
static void speech_init_thread_func(void *p_userdata);
static void speech_event_callback(size_t p_msg_id, size_t p_client_id, SPDNotificationType p_type);
static void speech_event_index_mark(size_t p_msg_id, size_t p_client_id, SPDNotificationType p_type, char *p_index_mark);
static TTS_Linux *singleton;
protected:
void _load_voices() const;
void _speech_event(int p_msg_id, int p_type);
void _speech_index_mark(int p_msg_id, int p_type, const String &p_index_mark);
public:
static TTS_Linux *get_singleton();
bool is_speaking() const;
bool is_paused() const;
Array get_voices() const;
void speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.f, float p_rate = 1.f, int p_utterance_id = 0, bool p_interrupt = false);
void pause();
void resume();
void stop();
TTS_Linux();
~TTS_Linux();
};

View File

@@ -0,0 +1,127 @@
#!/usr/bin/env python
from misc.utility.scons_hints import *
Import("env")
# TODO: Add warning to headers and code about their autogenerated status.
if env["use_sowrap"]:
# We have to implement separate builders for so wrappers as the
# autogenerated Wayland protocol wrapper must include them instead of the
# native libraries.
WAYLAND_BUILDERS_SOWRAP = {
"WAYLAND_API_HEADER": Builder(
action=env.Run(
r"wayland-scanner -c client-header < ${SOURCE} | "
r"sed 's:wayland-client-core\.h:../dynwrappers/wayland-client-core-so_wrap\.h:' > ${TARGET}",
),
single_source=True,
),
"WAYLAND_API_CODE": Builder(
action=env.Run(
r"wayland-scanner -c private-code < ${SOURCE} | "
r"sed 's:wayland-util\.h:../dynwrappers/wayland-client-core-so_wrap\.h:' > ${TARGET}",
),
single_source=True,
),
}
env.Append(BUILDERS=WAYLAND_BUILDERS_SOWRAP)
else:
WAYLAND_BUILDERS = {
"WAYLAND_API_HEADER": Builder(
action=env.Run(r"wayland-scanner -c client-header < ${SOURCE} > ${TARGET}"),
single_source=True,
),
"WAYLAND_API_CODE": Builder(
action=env.Run(r"wayland-scanner -c private-code < ${SOURCE} > ${TARGET}"),
single_source=True,
),
}
env.Append(BUILDERS=WAYLAND_BUILDERS)
def generate_from_xml(name, path):
header = env.WAYLAND_API_HEADER(f"protocol/{name}.gen.h", path)
source = env.WAYLAND_API_CODE(f"protocol/{name}.gen.c", path)
env.NoCache(header, source)
return env.Object(f"protocol/{name}.gen.c")
objects = [
# Core protocol
generate_from_xml("wayland", "#thirdparty/wayland/protocol/wayland.xml"),
# Stable protocols
generate_from_xml("tablet", "#thirdparty/wayland-protocols/stable/tablet/tablet-v2.xml"),
generate_from_xml("viewporter", "#thirdparty/wayland-protocols/stable/viewporter/viewporter.xml"),
generate_from_xml("xdg_shell", "#thirdparty/wayland-protocols/stable/xdg-shell/xdg-shell.xml"),
# Staging protocols
generate_from_xml("cursor_shape", "#thirdparty/wayland-protocols/staging/cursor-shape/cursor-shape-v1.xml"),
generate_from_xml(
"fractional_scale", "#thirdparty/wayland-protocols/staging/fractional-scale/fractional-scale-v1.xml"
),
generate_from_xml("xdg_activation", "#thirdparty/wayland-protocols/staging/xdg-activation/xdg-activation-v1.xml"),
generate_from_xml(
"xdg_system_bell", "#thirdparty/wayland-protocols/staging/xdg-system-bell/xdg-system-bell-v1.xml"
),
# Unstable protocols
generate_from_xml(
"idle_inhibit", "#thirdparty/wayland-protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml"
),
generate_from_xml(
"pointer_constraints",
"#thirdparty/wayland-protocols/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml",
),
generate_from_xml(
"pointer_gestures", "#thirdparty/wayland-protocols/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml"
),
generate_from_xml(
"primary_selection",
"#thirdparty/wayland-protocols/unstable/primary-selection/primary-selection-unstable-v1.xml",
),
generate_from_xml(
"relative_pointer", "#thirdparty/wayland-protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml"
),
generate_from_xml("text_input", "#thirdparty/wayland-protocols/unstable/text-input/text-input-unstable-v3.xml"),
generate_from_xml(
"xdg_decoration", "#thirdparty/wayland-protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml"
),
generate_from_xml(
"xdg_foreign_v1", "#thirdparty/wayland-protocols/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml"
), # Note: deprecated
generate_from_xml(
"xdg_foreign_v2", "#thirdparty/wayland-protocols/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml"
),
]
source_files = [
"detect_prime_egl.cpp",
"display_server_wayland.cpp",
"key_mapping_xkb.cpp",
"wayland_thread.cpp",
]
if env["use_sowrap"]:
source_files.append(
[
"dynwrappers/wayland-cursor-so_wrap.c",
"dynwrappers/wayland-client-core-so_wrap.c",
"dynwrappers/wayland-egl-core-so_wrap.c",
]
)
if env["libdecor"]:
source_files.append("dynwrappers/libdecor-so_wrap.c")
if env["vulkan"]:
source_files.append("rendering_context_driver_vulkan_wayland.cpp")
if env["opengl3"]:
source_files.append("egl_manager_wayland.cpp")
source_files.append("egl_manager_wayland_gles.cpp")
for source_file in source_files:
objects.append(env.Object(source_file))
Return("objects")

View File

@@ -0,0 +1,230 @@
/**************************************************************************/
/* detect_prime_egl.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifdef GLES3_ENABLED
#ifdef EGL_ENABLED
#include "detect_prime_egl.h"
#include "core/string/print_string.h"
#include "core/string/ustring.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cstdlib>
// To prevent shadowing warnings.
#undef glGetString
// Runs inside a child. Exiting will not quit the engine.
void DetectPrimeEGL::create_context(EGLenum p_platform_enum) {
#if defined(GLAD_ENABLED)
if (!gladLoaderLoadEGL(nullptr)) {
print_verbose("Unable to load EGL, GPU detection skipped.");
quick_exit(1);
}
#endif
EGLDisplay egl_display = EGL_NO_DISPLAY;
if (GLAD_EGL_VERSION_1_5) {
egl_display = eglGetPlatformDisplay(p_platform_enum, nullptr, nullptr);
} else if (GLAD_EGL_EXT_platform_base) {
#ifdef EGL_EXT_platform_base
egl_display = eglGetPlatformDisplayEXT(p_platform_enum, nullptr, nullptr);
#endif
} else {
egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
}
EGLConfig egl_config;
EGLContext egl_context = EGL_NO_CONTEXT;
eglInitialize(egl_display, nullptr, nullptr);
#if defined(GLAD_ENABLED)
if (!gladLoaderLoadEGL(egl_display)) {
print_verbose("Unable to load EGL, GPU detection skipped.");
quick_exit(1);
}
#endif
eglBindAPI(EGL_OPENGL_API);
EGLint attribs[] = {
EGL_RED_SIZE,
1,
EGL_BLUE_SIZE,
1,
EGL_GREEN_SIZE,
1,
EGL_DEPTH_SIZE,
24,
EGL_NONE,
};
EGLint config_count = 0;
eglChooseConfig(egl_display, attribs, &egl_config, 1, &config_count);
EGLint context_attribs[] = {
EGL_CONTEXT_MAJOR_VERSION, 3,
EGL_CONTEXT_MINOR_VERSION, 3,
EGL_NONE
};
egl_context = eglCreateContext(egl_display, egl_config, EGL_NO_CONTEXT, context_attribs);
if (egl_context == EGL_NO_CONTEXT) {
print_verbose("Unable to create an EGL context, GPU detection skipped.");
quick_exit(1);
}
eglMakeCurrent(egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, egl_context);
}
int DetectPrimeEGL::detect_prime(EGLenum p_platform_enum) {
pid_t p;
int priorities[4] = {};
String vendors[4];
String renderers[4];
for (int i = 0; i < 4; ++i) {
vendors[i] = "Unknown";
renderers[i] = "Unknown";
}
for (int i = 0; i < 4; ++i) {
int fdset[2];
if (pipe(fdset) == -1) {
print_verbose("Failed to pipe(), using default GPU");
return 0;
}
// Fork so the driver initialization can crash without taking down the engine.
p = fork();
if (p > 0) {
// Main thread
int stat_loc = 0;
char string[201];
string[200] = '\0';
close(fdset[1]);
waitpid(p, &stat_loc, 0);
if (!stat_loc) {
// No need to do anything complicated here. Anything less than
// PIPE_BUF will be delivered in one read() call.
// Leave it 'Unknown' otherwise.
if (read(fdset[0], string, sizeof(string) - 1) > 0) {
vendors[i] = string;
renderers[i] = string + strlen(string) + 1;
}
}
close(fdset[0]);
} else {
// In child, exit() here will not quit the engine.
// Prevent false leak reports as we will not be properly
// cleaning up these processes, and fork() makes a copy
// of all globals.
CoreGlobals::leak_reporting_enabled = false;
char string[201];
close(fdset[0]);
setenv("DRI_PRIME", itos(i).utf8().ptr(), 1);
create_context(p_platform_enum);
PFNGLGETSTRINGPROC glGetString = (PFNGLGETSTRINGPROC)eglGetProcAddress("glGetString");
const char *vendor = (const char *)glGetString(GL_VENDOR);
const char *renderer = (const char *)glGetString(GL_RENDERER);
unsigned int vendor_len = strlen(vendor) + 1;
unsigned int renderer_len = strlen(renderer) + 1;
if (vendor_len + renderer_len >= sizeof(string)) {
renderer_len = 200 - vendor_len;
}
memcpy(&string, vendor, vendor_len);
memcpy(&string[vendor_len], renderer, renderer_len);
if (write(fdset[1], string, vendor_len + renderer_len) == -1) {
print_verbose("Couldn't write vendor/renderer string.");
}
close(fdset[1]);
// The function quick_exit() is used because exit() will call destructors on static objects copied by fork().
// These objects will be freed anyway when the process finishes execution.
quick_exit(0);
}
}
int preferred = 0;
int priority = 0;
if (vendors[0] == vendors[1]) {
print_verbose("Only one GPU found, using default.");
return 0;
}
for (int i = 3; i >= 0; --i) {
const Vendor *v = vendor_map;
while (v->glxvendor) {
if (v->glxvendor == vendors[i]) {
priorities[i] = v->priority;
if (v->priority >= priority) {
priority = v->priority;
preferred = i;
}
}
++v;
}
}
print_verbose("Found renderers:");
for (int i = 0; i < 4; ++i) {
print_verbose("Renderer " + itos(i) + ": " + renderers[i] + " with priority: " + itos(priorities[i]));
}
print_verbose("Using renderer: " + renderers[preferred]);
return preferred;
}
#endif // EGL_ENABLED
#endif // GLES3_ENABLED

View File

@@ -0,0 +1,86 @@
/**************************************************************************/
/* detect_prime_egl.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef GLES3_ENABLED
#ifdef EGL_ENABLED
#ifdef GLAD_ENABLED
#include "thirdparty/glad/glad/egl.h"
#include "thirdparty/glad/glad/gl.h"
#else
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GL/glcorearb.h>
#define GLAD_EGL_VERSION_1_5 1
#ifdef EGL_EXT_platform_base
#define GLAD_EGL_EXT_platform_base 1
#endif
#define KHRONOS_STATIC 1
extern "C" EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, const EGLint *attrib_list);
#undef KHRONOS_STATIC
#endif // GLAD_ENABLED
#ifndef EGL_EXT_platform_base
#define GLAD_EGL_EXT_platform_base 0
#endif
class DetectPrimeEGL {
private:
struct Vendor {
const char *glxvendor = nullptr;
int priority = 0;
};
static constexpr Vendor vendor_map[] = {
{ "Advanced Micro Devices, Inc.", 30 },
{ "AMD", 30 },
{ "NVIDIA Corporation", 30 },
{ "X.Org", 30 },
{ "Intel Open Source Technology Center", 20 },
{ "Intel", 20 },
{ "nouveau", 10 },
{ "Mesa Project", 0 },
{ nullptr, 0 }
};
public:
static void create_context(EGLenum p_platform_enum);
static int detect_prime(EGLenum p_platform_enum);
};
#endif // GLES3_ENABLED
#endif // EGL_ENABLED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,358 @@
/**************************************************************************/
/* display_server_wayland.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef WAYLAND_ENABLED
#include "wayland/wayland_thread.h"
#ifdef RD_ENABLED
#include "servers/rendering/rendering_device.h"
#ifdef VULKAN_ENABLED
#include "wayland/rendering_context_driver_vulkan_wayland.h"
#endif
#endif //RD_ENABLED
#ifdef GLES3_ENABLED
#include "drivers/egl/egl_manager.h"
#endif
#if defined(SPEECHD_ENABLED)
#include "tts_linux.h"
#endif
#ifdef DBUS_ENABLED
#include "freedesktop_at_spi_monitor.h"
#include "freedesktop_portal_desktop.h"
#include "freedesktop_screensaver.h"
#endif
#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "servers/display_server.h"
#include <climits>
#include <cstdio>
#undef CursorShape
class DisplayServerWayland : public DisplayServer {
GDSOFTCLASS(DisplayServerWayland, DisplayServer);
struct WindowData {
WindowID id = INVALID_WINDOW_ID;
WindowID parent_id = INVALID_WINDOW_ID;
// For popups.
WindowID root_id = INVALID_WINDOW_ID;
// For toplevels.
List<WindowID> popup_stack;
Rect2i rect;
Size2i max_size;
Size2i min_size;
Rect2i safe_rect;
bool emulate_vsync = false;
#ifdef GLES3_ENABLED
struct wl_egl_window *wl_egl_window = nullptr;
#endif
// Flags whether we have allocated a buffer through the video drivers.
bool visible = false;
DisplayServer::VSyncMode vsync_mode = VSYNC_ENABLED;
uint32_t flags = 0;
DisplayServer::WindowMode mode = WINDOW_MODE_WINDOWED;
Callable rect_changed_callback;
Callable window_event_callback;
Callable input_event_callback;
Callable drop_files_callback;
Callable input_text_callback;
String title;
ObjectID instance_id;
};
struct CustomCursor {
Ref<Resource> resource;
Point2i hotspot;
};
enum class SuspendState {
NONE, // Unsuspended.
TIMEOUT, // Legacy fallback.
CAPABILITY, // New "suspended" wm_capability flag.
};
CursorShape cursor_shape = CURSOR_ARROW;
DisplayServer::MouseMode mouse_mode = DisplayServer::MOUSE_MODE_VISIBLE;
DisplayServer::MouseMode mouse_mode_base = MOUSE_MODE_VISIBLE;
DisplayServer::MouseMode mouse_mode_override = MOUSE_MODE_VISIBLE;
bool mouse_mode_override_enabled = false;
void _mouse_update_mode();
HashMap<CursorShape, CustomCursor> custom_cursors;
HashMap<WindowID, WindowData> windows;
WindowID window_id_counter = MAIN_WINDOW_ID;
WaylandThread wayland_thread;
Context context;
bool swap_cancel_ok = false;
// NOTE: These are the based on WINDOW_FLAG_POPUP, which does NOT imply what it
// seems. It's particularly confusing for our usecase, but just know that these
// are the "take all input thx" windows while the `popup_stack` variable keeps
// track of all the generic floating window concept.
List<WindowID> popup_menu_list;
BitField<MouseButtonMask> last_mouse_monitor_mask = MouseButtonMask::NONE;
String ime_text;
Vector2i ime_selection;
SuspendState suspend_state = SuspendState::NONE;
String rendering_driver;
#ifdef RD_ENABLED
RenderingContextDriver *rendering_context = nullptr;
RenderingDevice *rendering_device = nullptr;
#endif
#ifdef GLES3_ENABLED
EGLManager *egl_manager = nullptr;
#endif
#ifdef SPEECHD_ENABLED
TTS_Linux *tts = nullptr;
#endif
NativeMenu *native_menu = nullptr;
#if DBUS_ENABLED
FreeDesktopPortalDesktop *portal_desktop = nullptr;
FreeDesktopAtSPIMonitor *atspi_monitor = nullptr;
FreeDesktopScreenSaver *screensaver = nullptr;
bool screensaver_inhibited = false;
#endif
static String _get_app_id_from_context(Context p_context);
void _send_window_event(WindowEvent p_event, WindowID p_window_id = MAIN_WINDOW_ID);
static void dispatch_input_events(const Ref<InputEvent> &p_event);
void _dispatch_input_event(const Ref<InputEvent> &p_event);
void _update_window_rect(const Rect2i &p_rect, WindowID p_window_id = MAIN_WINDOW_ID);
void try_suspend();
void initialize_tts() const;
public:
virtual bool has_feature(Feature p_feature) const override;
virtual String get_name() const override;
#ifdef SPEECHD_ENABLED
virtual bool tts_is_speaking() const override;
virtual bool tts_is_paused() const override;
virtual TypedArray<Dictionary> tts_get_voices() const override;
virtual void tts_speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.f, float p_rate = 1.f, int p_utterance_id = 0, bool p_interrupt = false) override;
virtual void tts_pause() override;
virtual void tts_resume() override;
virtual void tts_stop() override;
#endif
#ifdef DBUS_ENABLED
virtual bool is_dark_mode_supported() const override;
virtual bool is_dark_mode() const override;
virtual Color get_accent_color() const override;
virtual void set_system_theme_change_callback(const Callable &p_callable) override;
virtual Error file_dialog_show(const String &p_title, const String &p_current_directory, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const Callable &p_callback, WindowID p_window_id) override;
virtual Error file_dialog_with_options_show(const String &p_title, const String &p_current_directory, const String &p_root, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const TypedArray<Dictionary> &p_options, const Callable &p_callback, WindowID p_window_id) override;
#endif
virtual void beep() const override;
virtual void mouse_set_mode(MouseMode p_mode) override;
virtual MouseMode mouse_get_mode() const override;
virtual void mouse_set_mode_override(MouseMode p_mode) override;
virtual MouseMode mouse_get_mode_override() const override;
virtual void mouse_set_mode_override_enabled(bool p_override_enabled) override;
virtual bool mouse_is_mode_override_enabled() const override;
virtual void warp_mouse(const Point2i &p_to) override;
virtual Point2i mouse_get_position() const override;
virtual BitField<MouseButtonMask> mouse_get_button_state() const override;
virtual void clipboard_set(const String &p_text) override;
virtual String clipboard_get() const override;
virtual Ref<Image> clipboard_get_image() const override;
virtual void clipboard_set_primary(const String &p_text) override;
virtual String clipboard_get_primary() const override;
virtual int get_screen_count() const override;
virtual int get_primary_screen() const override;
virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual float screen_get_scale(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual void screen_set_keep_on(bool p_enable) override;
virtual bool screen_is_kept_on() const override;
virtual Vector<DisplayServer::WindowID> get_window_list() const override;
virtual WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i(), bool p_exclusive = false, WindowID p_transient_parent = INVALID_WINDOW_ID) override;
virtual void show_window(WindowID p_id) override;
virtual void delete_sub_window(WindowID p_id) override;
virtual WindowID window_get_active_popup() const override;
virtual void window_set_popup_safe_rect(WindowID p_window, const Rect2i &p_rect) override;
virtual Rect2i window_get_popup_safe_rect(WindowID p_window) const override;
virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override;
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const override;
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual ObjectID window_get_attached_instance_id(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual void window_set_title(const String &p_title, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_set_window_event_callback(const Callable &p_callable, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_set_input_event_callback(const Callable &p_callable, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_set_input_text_callback(const Callable &p_callable, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_set_drop_files_callback(const Callable &p_callable, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual int window_get_current_screen(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual void window_set_current_screen(int p_screen, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual Point2i window_get_position(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual Point2i window_get_position_with_decorations(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual void window_set_position(const Point2i &p_position, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_set_max_size(const Size2i p_size, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual Size2i window_get_max_size(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual void gl_window_make_current(DisplayServer::WindowID p_window_id) override;
virtual void window_set_transient(WindowID p_window_id, WindowID p_parent) override;
virtual void window_set_min_size(const Size2i p_size, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual Size2i window_get_min_size(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual void window_set_size(const Size2i p_size, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual Size2i window_get_size(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual Size2i window_get_size_with_decorations(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual void window_set_mode(WindowMode p_mode, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual WindowMode window_get_mode(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual bool window_is_maximize_allowed(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual void window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual bool window_get_flag(WindowFlags p_flag, WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual void window_request_attention(WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_move_to_foreground(WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual bool window_is_focused(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual bool window_can_draw(WindowID p_window_id = MAIN_WINDOW_ID) const override;
virtual bool can_any_window_draw() const override;
virtual void window_set_ime_active(const bool p_active, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual void window_set_ime_position(const Point2i &p_pos, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual int accessibility_should_increase_contrast() const override;
virtual int accessibility_screen_reader_active() const override;
virtual Point2i ime_get_selection() const override;
virtual String ime_get_text() const override;
virtual void window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window_id = MAIN_WINDOW_ID) override;
virtual DisplayServer::VSyncMode window_get_vsync_mode(WindowID p_window_id) const override;
virtual void window_start_drag(WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_start_resize(WindowResizeEdge p_edge, WindowID p_window) override;
virtual void cursor_set_shape(CursorShape p_shape) override;
virtual CursorShape cursor_get_shape() const override;
virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) override;
virtual bool get_swap_cancel_ok() override;
virtual int keyboard_get_layout_count() const override;
virtual int keyboard_get_current_layout() const override;
virtual void keyboard_set_current_layout(int p_index) override;
virtual String keyboard_get_layout_language(int p_index) const override;
virtual String keyboard_get_layout_name(int p_index) const override;
virtual Key keyboard_get_keycode_from_physical(Key p_keycode) const override;
virtual bool color_picker(const Callable &p_callback) override;
virtual void process_events() override;
virtual void release_rendering_thread() override;
virtual void swap_buffers() override;
virtual void set_context(Context p_context) override;
virtual bool is_window_transparency_available() const override;
static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Point2i *p_position, const Size2i &p_resolution, int p_screen, Context p_context, int64_t p_parent_window, Error &r_error);
static Vector<String> get_rendering_drivers_func();
static void register_wayland_driver();
DisplayServerWayland(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Context p_context, int64_t p_parent_window, Error &r_error);
~DisplayServerWayland();
};
#endif // WAYLAND_ENABLED

View File

@@ -0,0 +1,453 @@
// 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-12 10:55:19
// flags: ./generate-wrapper.py --include /usr/include/libdecor-0/libdecor.h --sys-include <libdecor.h> --soname libdecor-0.so.0 --init-name libdecor --output-header libdecor-so_wrap.h --output-implementation libdecor-so_wrap.c --omit-prefix wl_
//
// EDIT: This has been handpatched to properly report the pointer type of the window_state argument of libdecor_configuration_get_window_state.
#include <stdint.h>
#define libdecor_unref libdecor_unref_dylibloader_orig_libdecor
#define libdecor_new libdecor_new_dylibloader_orig_libdecor
#define libdecor_get_fd libdecor_get_fd_dylibloader_orig_libdecor
#define libdecor_dispatch libdecor_dispatch_dylibloader_orig_libdecor
#define libdecor_decorate libdecor_decorate_dylibloader_orig_libdecor
#define libdecor_frame_ref libdecor_frame_ref_dylibloader_orig_libdecor
#define libdecor_frame_unref libdecor_frame_unref_dylibloader_orig_libdecor
#define libdecor_frame_set_visibility libdecor_frame_set_visibility_dylibloader_orig_libdecor
#define libdecor_frame_is_visible libdecor_frame_is_visible_dylibloader_orig_libdecor
#define libdecor_frame_set_parent libdecor_frame_set_parent_dylibloader_orig_libdecor
#define libdecor_frame_set_title libdecor_frame_set_title_dylibloader_orig_libdecor
#define libdecor_frame_get_title libdecor_frame_get_title_dylibloader_orig_libdecor
#define libdecor_frame_set_app_id libdecor_frame_set_app_id_dylibloader_orig_libdecor
#define libdecor_frame_set_capabilities libdecor_frame_set_capabilities_dylibloader_orig_libdecor
#define libdecor_frame_unset_capabilities libdecor_frame_unset_capabilities_dylibloader_orig_libdecor
#define libdecor_frame_has_capability libdecor_frame_has_capability_dylibloader_orig_libdecor
#define libdecor_frame_show_window_menu libdecor_frame_show_window_menu_dylibloader_orig_libdecor
#define libdecor_frame_popup_grab libdecor_frame_popup_grab_dylibloader_orig_libdecor
#define libdecor_frame_popup_ungrab libdecor_frame_popup_ungrab_dylibloader_orig_libdecor
#define libdecor_frame_translate_coordinate libdecor_frame_translate_coordinate_dylibloader_orig_libdecor
#define libdecor_frame_set_min_content_size libdecor_frame_set_min_content_size_dylibloader_orig_libdecor
#define libdecor_frame_set_max_content_size libdecor_frame_set_max_content_size_dylibloader_orig_libdecor
#define libdecor_frame_resize libdecor_frame_resize_dylibloader_orig_libdecor
#define libdecor_frame_move libdecor_frame_move_dylibloader_orig_libdecor
#define libdecor_frame_commit libdecor_frame_commit_dylibloader_orig_libdecor
#define libdecor_frame_set_minimized libdecor_frame_set_minimized_dylibloader_orig_libdecor
#define libdecor_frame_set_maximized libdecor_frame_set_maximized_dylibloader_orig_libdecor
#define libdecor_frame_unset_maximized libdecor_frame_unset_maximized_dylibloader_orig_libdecor
#define libdecor_frame_set_fullscreen libdecor_frame_set_fullscreen_dylibloader_orig_libdecor
#define libdecor_frame_unset_fullscreen libdecor_frame_unset_fullscreen_dylibloader_orig_libdecor
#define libdecor_frame_is_floating libdecor_frame_is_floating_dylibloader_orig_libdecor
#define libdecor_frame_close libdecor_frame_close_dylibloader_orig_libdecor
#define libdecor_frame_map libdecor_frame_map_dylibloader_orig_libdecor
#define libdecor_frame_get_xdg_surface libdecor_frame_get_xdg_surface_dylibloader_orig_libdecor
#define libdecor_frame_get_xdg_toplevel libdecor_frame_get_xdg_toplevel_dylibloader_orig_libdecor
#define libdecor_state_new libdecor_state_new_dylibloader_orig_libdecor
#define libdecor_state_free libdecor_state_free_dylibloader_orig_libdecor
#define libdecor_configuration_get_content_size libdecor_configuration_get_content_size_dylibloader_orig_libdecor
#define libdecor_configuration_get_window_state libdecor_configuration_get_window_state_dylibloader_orig_libdecor
#include <libdecor.h>
#undef libdecor_unref
#undef libdecor_new
#undef libdecor_get_fd
#undef libdecor_dispatch
#undef libdecor_decorate
#undef libdecor_frame_ref
#undef libdecor_frame_unref
#undef libdecor_frame_set_visibility
#undef libdecor_frame_is_visible
#undef libdecor_frame_set_parent
#undef libdecor_frame_set_title
#undef libdecor_frame_get_title
#undef libdecor_frame_set_app_id
#undef libdecor_frame_set_capabilities
#undef libdecor_frame_unset_capabilities
#undef libdecor_frame_has_capability
#undef libdecor_frame_show_window_menu
#undef libdecor_frame_popup_grab
#undef libdecor_frame_popup_ungrab
#undef libdecor_frame_translate_coordinate
#undef libdecor_frame_set_min_content_size
#undef libdecor_frame_set_max_content_size
#undef libdecor_frame_resize
#undef libdecor_frame_move
#undef libdecor_frame_commit
#undef libdecor_frame_set_minimized
#undef libdecor_frame_set_maximized
#undef libdecor_frame_unset_maximized
#undef libdecor_frame_set_fullscreen
#undef libdecor_frame_unset_fullscreen
#undef libdecor_frame_is_floating
#undef libdecor_frame_close
#undef libdecor_frame_map
#undef libdecor_frame_get_xdg_surface
#undef libdecor_frame_get_xdg_toplevel
#undef libdecor_state_new
#undef libdecor_state_free
#undef libdecor_configuration_get_content_size
#undef libdecor_configuration_get_window_state
#include <dlfcn.h>
#include <stdio.h>
void (*libdecor_unref_dylibloader_wrapper_libdecor)(struct libdecor*);
struct libdecor* (*libdecor_new_dylibloader_wrapper_libdecor)(struct wl_display*,struct libdecor_interface*);
int (*libdecor_get_fd_dylibloader_wrapper_libdecor)(struct libdecor*);
int (*libdecor_dispatch_dylibloader_wrapper_libdecor)(struct libdecor*, int);
struct libdecor_frame* (*libdecor_decorate_dylibloader_wrapper_libdecor)(struct libdecor*,struct wl_surface*,struct libdecor_frame_interface*, void*);
void (*libdecor_frame_ref_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_unref_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_set_visibility_dylibloader_wrapper_libdecor)(struct libdecor_frame*, bool);
bool (*libdecor_frame_is_visible_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_set_parent_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct libdecor_frame*);
void (*libdecor_frame_set_title_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
const char* (*libdecor_frame_get_title_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_set_app_id_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
void (*libdecor_frame_set_capabilities_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
void (*libdecor_frame_unset_capabilities_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
bool (*libdecor_frame_has_capability_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
void (*libdecor_frame_show_window_menu_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t, int, int);
void (*libdecor_frame_popup_grab_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
void (*libdecor_frame_popup_ungrab_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
void (*libdecor_frame_translate_coordinate_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int, int*, int*);
void (*libdecor_frame_set_min_content_size_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int);
void (*libdecor_frame_set_max_content_size_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int);
void (*libdecor_frame_resize_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t,enum libdecor_resize_edge);
void (*libdecor_frame_move_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t);
void (*libdecor_frame_commit_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct libdecor_state*,struct libdecor_configuration*);
void (*libdecor_frame_set_minimized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_set_maximized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_unset_maximized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_set_fullscreen_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_output*);
void (*libdecor_frame_unset_fullscreen_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
bool (*libdecor_frame_is_floating_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_close_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
void (*libdecor_frame_map_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
struct xdg_surface* (*libdecor_frame_get_xdg_surface_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
struct xdg_toplevel* (*libdecor_frame_get_xdg_toplevel_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
struct libdecor_state* (*libdecor_state_new_dylibloader_wrapper_libdecor)( int, int);
void (*libdecor_state_free_dylibloader_wrapper_libdecor)(struct libdecor_state*);
bool (*libdecor_configuration_get_content_size_dylibloader_wrapper_libdecor)(struct libdecor_configuration*,struct libdecor_frame*, int*, int*);
bool (*libdecor_configuration_get_window_state_dylibloader_wrapper_libdecor)(struct libdecor_configuration*,enum libdecor_window_state*);
int initialize_libdecor(int verbose) {
void *handle;
char *error;
handle = dlopen("libdecor-0.so.0", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// libdecor_unref
*(void **) (&libdecor_unref_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_unref");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_new
*(void **) (&libdecor_new_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_new");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_get_fd
*(void **) (&libdecor_get_fd_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_get_fd");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_dispatch
*(void **) (&libdecor_dispatch_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_dispatch");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_decorate
*(void **) (&libdecor_decorate_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_decorate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_ref
*(void **) (&libdecor_frame_ref_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_ref");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_unref
*(void **) (&libdecor_frame_unref_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_unref");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_visibility
*(void **) (&libdecor_frame_set_visibility_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_visibility");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_is_visible
*(void **) (&libdecor_frame_is_visible_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_is_visible");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_parent
*(void **) (&libdecor_frame_set_parent_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_parent");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_title
*(void **) (&libdecor_frame_set_title_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_title");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_get_title
*(void **) (&libdecor_frame_get_title_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_get_title");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_app_id
*(void **) (&libdecor_frame_set_app_id_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_app_id");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_capabilities
*(void **) (&libdecor_frame_set_capabilities_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_capabilities");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_unset_capabilities
*(void **) (&libdecor_frame_unset_capabilities_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_unset_capabilities");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_has_capability
*(void **) (&libdecor_frame_has_capability_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_has_capability");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_show_window_menu
*(void **) (&libdecor_frame_show_window_menu_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_show_window_menu");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_popup_grab
*(void **) (&libdecor_frame_popup_grab_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_popup_grab");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_popup_ungrab
*(void **) (&libdecor_frame_popup_ungrab_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_popup_ungrab");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_translate_coordinate
*(void **) (&libdecor_frame_translate_coordinate_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_translate_coordinate");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_min_content_size
*(void **) (&libdecor_frame_set_min_content_size_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_min_content_size");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_max_content_size
*(void **) (&libdecor_frame_set_max_content_size_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_max_content_size");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_resize
*(void **) (&libdecor_frame_resize_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_resize");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_move
*(void **) (&libdecor_frame_move_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_move");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_commit
*(void **) (&libdecor_frame_commit_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_commit");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_minimized
*(void **) (&libdecor_frame_set_minimized_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_minimized");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_maximized
*(void **) (&libdecor_frame_set_maximized_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_maximized");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_unset_maximized
*(void **) (&libdecor_frame_unset_maximized_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_unset_maximized");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_set_fullscreen
*(void **) (&libdecor_frame_set_fullscreen_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_fullscreen");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_unset_fullscreen
*(void **) (&libdecor_frame_unset_fullscreen_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_unset_fullscreen");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_is_floating
*(void **) (&libdecor_frame_is_floating_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_is_floating");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_close
*(void **) (&libdecor_frame_close_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_close");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_map
*(void **) (&libdecor_frame_map_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_map");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_get_xdg_surface
*(void **) (&libdecor_frame_get_xdg_surface_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_get_xdg_surface");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_frame_get_xdg_toplevel
*(void **) (&libdecor_frame_get_xdg_toplevel_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_get_xdg_toplevel");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_state_new
*(void **) (&libdecor_state_new_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_state_new");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_state_free
*(void **) (&libdecor_state_free_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_state_free");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_configuration_get_content_size
*(void **) (&libdecor_configuration_get_content_size_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_configuration_get_content_size");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// libdecor_configuration_get_window_state
*(void **) (&libdecor_configuration_get_window_state_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_configuration_get_window_state");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@@ -0,0 +1,175 @@
#ifndef DYLIBLOAD_WRAPPER_LIBDECOR
#define DYLIBLOAD_WRAPPER_LIBDECOR
// 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-12 10:55:19
// flags: ./generate-wrapper.py --include /usr/include/libdecor-0/libdecor.h --sys-include <libdecor.h> --soname libdecor-0.so.0 --init-name libdecor --output-header libdecor-so_wrap.h --output-implementation libdecor-so_wrap.c --omit-prefix wl_
//
// EDIT: This has been handpatched to properly report the pointer type of the window_state argument of libdecor_configuration_get_window_state.
#include <stdint.h>
#define libdecor_unref libdecor_unref_dylibloader_orig_libdecor
#define libdecor_new libdecor_new_dylibloader_orig_libdecor
#define libdecor_get_fd libdecor_get_fd_dylibloader_orig_libdecor
#define libdecor_dispatch libdecor_dispatch_dylibloader_orig_libdecor
#define libdecor_decorate libdecor_decorate_dylibloader_orig_libdecor
#define libdecor_frame_ref libdecor_frame_ref_dylibloader_orig_libdecor
#define libdecor_frame_unref libdecor_frame_unref_dylibloader_orig_libdecor
#define libdecor_frame_set_visibility libdecor_frame_set_visibility_dylibloader_orig_libdecor
#define libdecor_frame_is_visible libdecor_frame_is_visible_dylibloader_orig_libdecor
#define libdecor_frame_set_parent libdecor_frame_set_parent_dylibloader_orig_libdecor
#define libdecor_frame_set_title libdecor_frame_set_title_dylibloader_orig_libdecor
#define libdecor_frame_get_title libdecor_frame_get_title_dylibloader_orig_libdecor
#define libdecor_frame_set_app_id libdecor_frame_set_app_id_dylibloader_orig_libdecor
#define libdecor_frame_set_capabilities libdecor_frame_set_capabilities_dylibloader_orig_libdecor
#define libdecor_frame_unset_capabilities libdecor_frame_unset_capabilities_dylibloader_orig_libdecor
#define libdecor_frame_has_capability libdecor_frame_has_capability_dylibloader_orig_libdecor
#define libdecor_frame_show_window_menu libdecor_frame_show_window_menu_dylibloader_orig_libdecor
#define libdecor_frame_popup_grab libdecor_frame_popup_grab_dylibloader_orig_libdecor
#define libdecor_frame_popup_ungrab libdecor_frame_popup_ungrab_dylibloader_orig_libdecor
#define libdecor_frame_translate_coordinate libdecor_frame_translate_coordinate_dylibloader_orig_libdecor
#define libdecor_frame_set_min_content_size libdecor_frame_set_min_content_size_dylibloader_orig_libdecor
#define libdecor_frame_set_max_content_size libdecor_frame_set_max_content_size_dylibloader_orig_libdecor
#define libdecor_frame_resize libdecor_frame_resize_dylibloader_orig_libdecor
#define libdecor_frame_move libdecor_frame_move_dylibloader_orig_libdecor
#define libdecor_frame_commit libdecor_frame_commit_dylibloader_orig_libdecor
#define libdecor_frame_set_minimized libdecor_frame_set_minimized_dylibloader_orig_libdecor
#define libdecor_frame_set_maximized libdecor_frame_set_maximized_dylibloader_orig_libdecor
#define libdecor_frame_unset_maximized libdecor_frame_unset_maximized_dylibloader_orig_libdecor
#define libdecor_frame_set_fullscreen libdecor_frame_set_fullscreen_dylibloader_orig_libdecor
#define libdecor_frame_unset_fullscreen libdecor_frame_unset_fullscreen_dylibloader_orig_libdecor
#define libdecor_frame_is_floating libdecor_frame_is_floating_dylibloader_orig_libdecor
#define libdecor_frame_close libdecor_frame_close_dylibloader_orig_libdecor
#define libdecor_frame_map libdecor_frame_map_dylibloader_orig_libdecor
#define libdecor_frame_get_xdg_surface libdecor_frame_get_xdg_surface_dylibloader_orig_libdecor
#define libdecor_frame_get_xdg_toplevel libdecor_frame_get_xdg_toplevel_dylibloader_orig_libdecor
#define libdecor_state_new libdecor_state_new_dylibloader_orig_libdecor
#define libdecor_state_free libdecor_state_free_dylibloader_orig_libdecor
#define libdecor_configuration_get_content_size libdecor_configuration_get_content_size_dylibloader_orig_libdecor
#define libdecor_configuration_get_window_state libdecor_configuration_get_window_state_dylibloader_orig_libdecor
#include <libdecor.h>
#undef libdecor_unref
#undef libdecor_new
#undef libdecor_get_fd
#undef libdecor_dispatch
#undef libdecor_decorate
#undef libdecor_frame_ref
#undef libdecor_frame_unref
#undef libdecor_frame_set_visibility
#undef libdecor_frame_is_visible
#undef libdecor_frame_set_parent
#undef libdecor_frame_set_title
#undef libdecor_frame_get_title
#undef libdecor_frame_set_app_id
#undef libdecor_frame_set_capabilities
#undef libdecor_frame_unset_capabilities
#undef libdecor_frame_has_capability
#undef libdecor_frame_show_window_menu
#undef libdecor_frame_popup_grab
#undef libdecor_frame_popup_ungrab
#undef libdecor_frame_translate_coordinate
#undef libdecor_frame_set_min_content_size
#undef libdecor_frame_set_max_content_size
#undef libdecor_frame_resize
#undef libdecor_frame_move
#undef libdecor_frame_commit
#undef libdecor_frame_set_minimized
#undef libdecor_frame_set_maximized
#undef libdecor_frame_unset_maximized
#undef libdecor_frame_set_fullscreen
#undef libdecor_frame_unset_fullscreen
#undef libdecor_frame_is_floating
#undef libdecor_frame_close
#undef libdecor_frame_map
#undef libdecor_frame_get_xdg_surface
#undef libdecor_frame_get_xdg_toplevel
#undef libdecor_state_new
#undef libdecor_state_free
#undef libdecor_configuration_get_content_size
#undef libdecor_configuration_get_window_state
#ifdef __cplusplus
extern "C" {
#endif
#define libdecor_unref libdecor_unref_dylibloader_wrapper_libdecor
#define libdecor_new libdecor_new_dylibloader_wrapper_libdecor
#define libdecor_get_fd libdecor_get_fd_dylibloader_wrapper_libdecor
#define libdecor_dispatch libdecor_dispatch_dylibloader_wrapper_libdecor
#define libdecor_decorate libdecor_decorate_dylibloader_wrapper_libdecor
#define libdecor_frame_ref libdecor_frame_ref_dylibloader_wrapper_libdecor
#define libdecor_frame_unref libdecor_frame_unref_dylibloader_wrapper_libdecor
#define libdecor_frame_set_visibility libdecor_frame_set_visibility_dylibloader_wrapper_libdecor
#define libdecor_frame_is_visible libdecor_frame_is_visible_dylibloader_wrapper_libdecor
#define libdecor_frame_set_parent libdecor_frame_set_parent_dylibloader_wrapper_libdecor
#define libdecor_frame_set_title libdecor_frame_set_title_dylibloader_wrapper_libdecor
#define libdecor_frame_get_title libdecor_frame_get_title_dylibloader_wrapper_libdecor
#define libdecor_frame_set_app_id libdecor_frame_set_app_id_dylibloader_wrapper_libdecor
#define libdecor_frame_set_capabilities libdecor_frame_set_capabilities_dylibloader_wrapper_libdecor
#define libdecor_frame_unset_capabilities libdecor_frame_unset_capabilities_dylibloader_wrapper_libdecor
#define libdecor_frame_has_capability libdecor_frame_has_capability_dylibloader_wrapper_libdecor
#define libdecor_frame_show_window_menu libdecor_frame_show_window_menu_dylibloader_wrapper_libdecor
#define libdecor_frame_popup_grab libdecor_frame_popup_grab_dylibloader_wrapper_libdecor
#define libdecor_frame_popup_ungrab libdecor_frame_popup_ungrab_dylibloader_wrapper_libdecor
#define libdecor_frame_translate_coordinate libdecor_frame_translate_coordinate_dylibloader_wrapper_libdecor
#define libdecor_frame_set_min_content_size libdecor_frame_set_min_content_size_dylibloader_wrapper_libdecor
#define libdecor_frame_set_max_content_size libdecor_frame_set_max_content_size_dylibloader_wrapper_libdecor
#define libdecor_frame_resize libdecor_frame_resize_dylibloader_wrapper_libdecor
#define libdecor_frame_move libdecor_frame_move_dylibloader_wrapper_libdecor
#define libdecor_frame_commit libdecor_frame_commit_dylibloader_wrapper_libdecor
#define libdecor_frame_set_minimized libdecor_frame_set_minimized_dylibloader_wrapper_libdecor
#define libdecor_frame_set_maximized libdecor_frame_set_maximized_dylibloader_wrapper_libdecor
#define libdecor_frame_unset_maximized libdecor_frame_unset_maximized_dylibloader_wrapper_libdecor
#define libdecor_frame_set_fullscreen libdecor_frame_set_fullscreen_dylibloader_wrapper_libdecor
#define libdecor_frame_unset_fullscreen libdecor_frame_unset_fullscreen_dylibloader_wrapper_libdecor
#define libdecor_frame_is_floating libdecor_frame_is_floating_dylibloader_wrapper_libdecor
#define libdecor_frame_close libdecor_frame_close_dylibloader_wrapper_libdecor
#define libdecor_frame_map libdecor_frame_map_dylibloader_wrapper_libdecor
#define libdecor_frame_get_xdg_surface libdecor_frame_get_xdg_surface_dylibloader_wrapper_libdecor
#define libdecor_frame_get_xdg_toplevel libdecor_frame_get_xdg_toplevel_dylibloader_wrapper_libdecor
#define libdecor_state_new libdecor_state_new_dylibloader_wrapper_libdecor
#define libdecor_state_free libdecor_state_free_dylibloader_wrapper_libdecor
#define libdecor_configuration_get_content_size libdecor_configuration_get_content_size_dylibloader_wrapper_libdecor
#define libdecor_configuration_get_window_state libdecor_configuration_get_window_state_dylibloader_wrapper_libdecor
extern void (*libdecor_unref_dylibloader_wrapper_libdecor)(struct libdecor*);
extern struct libdecor* (*libdecor_new_dylibloader_wrapper_libdecor)(struct wl_display*,struct libdecor_interface*);
extern int (*libdecor_get_fd_dylibloader_wrapper_libdecor)(struct libdecor*);
extern int (*libdecor_dispatch_dylibloader_wrapper_libdecor)(struct libdecor*, int);
extern struct libdecor_frame* (*libdecor_decorate_dylibloader_wrapper_libdecor)(struct libdecor*,struct wl_surface*,struct libdecor_frame_interface*, void*);
extern void (*libdecor_frame_ref_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_unref_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_set_visibility_dylibloader_wrapper_libdecor)(struct libdecor_frame*, bool);
extern bool (*libdecor_frame_is_visible_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_set_parent_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct libdecor_frame*);
extern void (*libdecor_frame_set_title_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
extern const char* (*libdecor_frame_get_title_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_set_app_id_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
extern void (*libdecor_frame_set_capabilities_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
extern void (*libdecor_frame_unset_capabilities_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
extern bool (*libdecor_frame_has_capability_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
extern void (*libdecor_frame_show_window_menu_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t, int, int);
extern void (*libdecor_frame_popup_grab_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
extern void (*libdecor_frame_popup_ungrab_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
extern void (*libdecor_frame_translate_coordinate_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int, int*, int*);
extern void (*libdecor_frame_set_min_content_size_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int);
extern void (*libdecor_frame_set_max_content_size_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int);
extern void (*libdecor_frame_resize_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t,enum libdecor_resize_edge);
extern void (*libdecor_frame_move_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t);
extern void (*libdecor_frame_commit_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct libdecor_state*,struct libdecor_configuration*);
extern void (*libdecor_frame_set_minimized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_set_maximized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_unset_maximized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_set_fullscreen_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_output*);
extern void (*libdecor_frame_unset_fullscreen_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern bool (*libdecor_frame_is_floating_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_close_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern void (*libdecor_frame_map_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern struct xdg_surface* (*libdecor_frame_get_xdg_surface_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern struct xdg_toplevel* (*libdecor_frame_get_xdg_toplevel_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
extern struct libdecor_state* (*libdecor_state_new_dylibloader_wrapper_libdecor)( int, int);
extern void (*libdecor_state_free_dylibloader_wrapper_libdecor)(struct libdecor_state*);
extern bool (*libdecor_configuration_get_content_size_dylibloader_wrapper_libdecor)(struct libdecor_configuration*,struct libdecor_frame*, int*, int*);
extern bool (*libdecor_configuration_get_window_state_dylibloader_wrapper_libdecor)(struct libdecor_configuration*,enum libdecor_window_state*);
int initialize_libdecor(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,607 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-25 17:36:12
// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h --sys-include "./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h" --soname libwayland-client.so.0 --init-name wayland_client --output-header platform/linuxbsd/wayland/dynwrappers/wayland-client-core-so_wrap.h --output-implementation platform/linuxbsd/wayland/dynwrappers/wayland-client-core-so_wrap.c
//
// NOTE: This has been hand-patched to workaround some issues.
#include <stdint.h>
#define wl_list_init wl_list_init_dylibloader_orig_wayland_client
#define wl_list_insert wl_list_insert_dylibloader_orig_wayland_client
#define wl_list_remove wl_list_remove_dylibloader_orig_wayland_client
#define wl_list_length wl_list_length_dylibloader_orig_wayland_client
#define wl_list_empty wl_list_empty_dylibloader_orig_wayland_client
#define wl_list_insert_list wl_list_insert_list_dylibloader_orig_wayland_client
#define wl_array_init wl_array_init_dylibloader_orig_wayland_client
#define wl_array_release wl_array_release_dylibloader_orig_wayland_client
#define wl_array_add wl_array_add_dylibloader_orig_wayland_client
#define wl_array_copy wl_array_copy_dylibloader_orig_wayland_client
#define wl_event_queue_destroy wl_event_queue_destroy_dylibloader_orig_wayland_client
#define wl_proxy_marshal_flags wl_proxy_marshal_flags_dylibloader_orig_wayland_client
#define wl_proxy_marshal_array_flags wl_proxy_marshal_array_flags_dylibloader_orig_wayland_client
#define wl_proxy_marshal wl_proxy_marshal_dylibloader_orig_wayland_client
#define wl_proxy_marshal_array wl_proxy_marshal_array_dylibloader_orig_wayland_client
#define wl_proxy_create wl_proxy_create_dylibloader_orig_wayland_client
#define wl_proxy_create_wrapper wl_proxy_create_wrapper_dylibloader_orig_wayland_client
#define wl_proxy_wrapper_destroy wl_proxy_wrapper_destroy_dylibloader_orig_wayland_client
#define wl_proxy_marshal_constructor wl_proxy_marshal_constructor_dylibloader_orig_wayland_client
#define wl_proxy_marshal_constructor_versioned wl_proxy_marshal_constructor_versioned_dylibloader_orig_wayland_client
#define wl_proxy_marshal_array_constructor wl_proxy_marshal_array_constructor_dylibloader_orig_wayland_client
#define wl_proxy_marshal_array_constructor_versioned wl_proxy_marshal_array_constructor_versioned_dylibloader_orig_wayland_client
#define wl_proxy_destroy wl_proxy_destroy_dylibloader_orig_wayland_client
#define wl_proxy_add_listener wl_proxy_add_listener_dylibloader_orig_wayland_client
#define wl_proxy_get_listener wl_proxy_get_listener_dylibloader_orig_wayland_client
#define wl_proxy_add_dispatcher wl_proxy_add_dispatcher_dylibloader_orig_wayland_client
#define wl_proxy_set_user_data wl_proxy_set_user_data_dylibloader_orig_wayland_client
#define wl_proxy_get_user_data wl_proxy_get_user_data_dylibloader_orig_wayland_client
#define wl_proxy_get_version wl_proxy_get_version_dylibloader_orig_wayland_client
#define wl_proxy_get_id wl_proxy_get_id_dylibloader_orig_wayland_client
#define wl_proxy_set_tag wl_proxy_set_tag_dylibloader_orig_wayland_client
#define wl_proxy_get_tag wl_proxy_get_tag_dylibloader_orig_wayland_client
#define wl_proxy_get_class wl_proxy_get_class_dylibloader_orig_wayland_client
#define wl_proxy_set_queue wl_proxy_set_queue_dylibloader_orig_wayland_client
#define wl_display_connect wl_display_connect_dylibloader_orig_wayland_client
#define wl_display_connect_to_fd wl_display_connect_to_fd_dylibloader_orig_wayland_client
#define wl_display_disconnect wl_display_disconnect_dylibloader_orig_wayland_client
#define wl_display_get_fd wl_display_get_fd_dylibloader_orig_wayland_client
#define wl_display_dispatch wl_display_dispatch_dylibloader_orig_wayland_client
#define wl_display_dispatch_queue wl_display_dispatch_queue_dylibloader_orig_wayland_client
#define wl_display_dispatch_queue_pending wl_display_dispatch_queue_pending_dylibloader_orig_wayland_client
#define wl_display_dispatch_pending wl_display_dispatch_pending_dylibloader_orig_wayland_client
#define wl_display_get_error wl_display_get_error_dylibloader_orig_wayland_client
#define wl_display_get_protocol_error wl_display_get_protocol_error_dylibloader_orig_wayland_client
#define wl_display_flush wl_display_flush_dylibloader_orig_wayland_client
#define wl_display_roundtrip_queue wl_display_roundtrip_queue_dylibloader_orig_wayland_client
#define wl_display_roundtrip wl_display_roundtrip_dylibloader_orig_wayland_client
#define wl_display_create_queue wl_display_create_queue_dylibloader_orig_wayland_client
#define wl_display_prepare_read_queue wl_display_prepare_read_queue_dylibloader_orig_wayland_client
#define wl_display_prepare_read wl_display_prepare_read_dylibloader_orig_wayland_client
#define wl_display_cancel_read wl_display_cancel_read_dylibloader_orig_wayland_client
#define wl_display_read_events wl_display_read_events_dylibloader_orig_wayland_client
#define wl_log_set_handler_client wl_log_set_handler_client_dylibloader_orig_wayland_client
#include "./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h"
#undef wl_list_init
#undef wl_list_insert
#undef wl_list_remove
#undef wl_list_length
#undef wl_list_empty
#undef wl_list_insert_list
#undef wl_array_init
#undef wl_array_release
#undef wl_array_add
#undef wl_array_copy
#undef wl_event_queue_destroy
#undef wl_proxy_marshal_flags
#undef wl_proxy_marshal_array_flags
#undef wl_proxy_marshal
#undef wl_proxy_marshal_array
#undef wl_proxy_create
#undef wl_proxy_create_wrapper
#undef wl_proxy_wrapper_destroy
#undef wl_proxy_marshal_constructor
#undef wl_proxy_marshal_constructor_versioned
#undef wl_proxy_marshal_array_constructor
#undef wl_proxy_marshal_array_constructor_versioned
#undef wl_proxy_destroy
#undef wl_proxy_add_listener
#undef wl_proxy_get_listener
#undef wl_proxy_add_dispatcher
#undef wl_proxy_set_user_data
#undef wl_proxy_get_user_data
#undef wl_proxy_get_version
#undef wl_proxy_get_id
#undef wl_proxy_set_tag
#undef wl_proxy_get_tag
#undef wl_proxy_get_class
#undef wl_proxy_set_queue
#undef wl_display_connect
#undef wl_display_connect_to_fd
#undef wl_display_disconnect
#undef wl_display_get_fd
#undef wl_display_dispatch
#undef wl_display_dispatch_queue
#undef wl_display_dispatch_queue_pending
#undef wl_display_dispatch_pending
#undef wl_display_get_error
#undef wl_display_get_protocol_error
#undef wl_display_flush
#undef wl_display_roundtrip_queue
#undef wl_display_roundtrip
#undef wl_display_create_queue
#undef wl_display_prepare_read_queue
#undef wl_display_prepare_read
#undef wl_display_cancel_read
#undef wl_display_read_events
#undef wl_log_set_handler_client
#include <dlfcn.h>
#include <stdio.h>
void (*wl_list_init_dylibloader_wrapper_wayland_client)(struct wl_list*);
void (*wl_list_insert_dylibloader_wrapper_wayland_client)(struct wl_list*,struct wl_list*);
void (*wl_list_remove_dylibloader_wrapper_wayland_client)(struct wl_list*);
int (*wl_list_length_dylibloader_wrapper_wayland_client)(struct wl_list*);
int (*wl_list_empty_dylibloader_wrapper_wayland_client)(struct wl_list*);
void (*wl_list_insert_list_dylibloader_wrapper_wayland_client)(struct wl_list*,struct wl_list*);
void (*wl_array_init_dylibloader_wrapper_wayland_client)(struct wl_array*);
void (*wl_array_release_dylibloader_wrapper_wayland_client)(struct wl_array*);
void* (*wl_array_add_dylibloader_wrapper_wayland_client)(struct wl_array*, size_t);
int (*wl_array_copy_dylibloader_wrapper_wayland_client)(struct wl_array*,struct wl_array*);
void (*wl_event_queue_destroy_dylibloader_wrapper_wayland_client)(struct wl_event_queue*);
struct wl_proxy* (*wl_proxy_marshal_flags_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t, uint32_t,...);
struct wl_proxy* (*wl_proxy_marshal_array_flags_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t, uint32_t,union wl_argument);
void (*wl_proxy_marshal_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,...);
void (*wl_proxy_marshal_array_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument);
struct wl_proxy* (*wl_proxy_create_dylibloader_wrapper_wayland_client)(struct wl_proxy*,const struct wl_interface*);
void* (*wl_proxy_create_wrapper_dylibloader_wrapper_wayland_client)( void*);
void (*wl_proxy_wrapper_destroy_dylibloader_wrapper_wayland_client)( void*);
struct wl_proxy* (*wl_proxy_marshal_constructor_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*,...);
struct wl_proxy* (*wl_proxy_marshal_constructor_versioned_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t,...);
struct wl_proxy* (*wl_proxy_marshal_array_constructor_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument,const struct wl_interface*);
struct wl_proxy* (*wl_proxy_marshal_array_constructor_versioned_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument,const struct wl_interface*, uint32_t);
void (*wl_proxy_destroy_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
int (*wl_proxy_add_listener_dylibloader_wrapper_wayland_client)(struct wl_proxy*, void(**)(void), void*);
const void* (*wl_proxy_get_listener_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
int (*wl_proxy_add_dispatcher_dylibloader_wrapper_wayland_client)(struct wl_proxy*, wl_dispatcher_func_t,const void*, void*);
void (*wl_proxy_set_user_data_dylibloader_wrapper_wayland_client)(struct wl_proxy*, void*);
void* (*wl_proxy_get_user_data_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
uint32_t (*wl_proxy_get_version_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
uint32_t (*wl_proxy_get_id_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
void (*wl_proxy_set_tag_dylibloader_wrapper_wayland_client)(struct wl_proxy*,const char**);
const char** (*wl_proxy_get_tag_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
const char* (*wl_proxy_get_class_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
void (*wl_proxy_set_queue_dylibloader_wrapper_wayland_client)(struct wl_proxy*,struct wl_event_queue*);
struct wl_display* (*wl_display_connect_dylibloader_wrapper_wayland_client)(const char*);
struct wl_display* (*wl_display_connect_to_fd_dylibloader_wrapper_wayland_client)( int);
void (*wl_display_disconnect_dylibloader_wrapper_wayland_client)(struct wl_display*);
int (*wl_display_get_fd_dylibloader_wrapper_wayland_client)(struct wl_display*);
int (*wl_display_dispatch_dylibloader_wrapper_wayland_client)(struct wl_display*);
int (*wl_display_dispatch_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
int (*wl_display_dispatch_queue_pending_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
int (*wl_display_dispatch_pending_dylibloader_wrapper_wayland_client)(struct wl_display*);
int (*wl_display_get_error_dylibloader_wrapper_wayland_client)(struct wl_display*);
uint32_t (*wl_display_get_protocol_error_dylibloader_wrapper_wayland_client)(struct wl_display*,const struct wl_interface**, uint32_t*);
int (*wl_display_flush_dylibloader_wrapper_wayland_client)(struct wl_display*);
int (*wl_display_roundtrip_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
int (*wl_display_roundtrip_dylibloader_wrapper_wayland_client)(struct wl_display*);
struct wl_event_queue* (*wl_display_create_queue_dylibloader_wrapper_wayland_client)(struct wl_display*);
int (*wl_display_prepare_read_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
int (*wl_display_prepare_read_dylibloader_wrapper_wayland_client)(struct wl_display*);
void (*wl_display_cancel_read_dylibloader_wrapper_wayland_client)(struct wl_display*);
int (*wl_display_read_events_dylibloader_wrapper_wayland_client)(struct wl_display*);
void (*wl_log_set_handler_client_dylibloader_wrapper_wayland_client)( wl_log_func_t);
int initialize_wayland_client(int verbose) {
void *handle;
char *error;
handle = dlopen("libwayland-client.so.0", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// wl_list_init
*(void **) (&wl_list_init_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_init");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_list_insert
*(void **) (&wl_list_insert_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_insert");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_list_remove
*(void **) (&wl_list_remove_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_remove");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_list_length
*(void **) (&wl_list_length_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_length");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_list_empty
*(void **) (&wl_list_empty_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_empty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_list_insert_list
*(void **) (&wl_list_insert_list_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_insert_list");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_array_init
*(void **) (&wl_array_init_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_array_init");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_array_release
*(void **) (&wl_array_release_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_array_release");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_array_add
*(void **) (&wl_array_add_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_array_add");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_array_copy
*(void **) (&wl_array_copy_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_array_copy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_event_queue_destroy
*(void **) (&wl_event_queue_destroy_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_event_queue_destroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_marshal_flags
*(void **) (&wl_proxy_marshal_flags_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_flags");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_marshal_array_flags
*(void **) (&wl_proxy_marshal_array_flags_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_array_flags");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_marshal
*(void **) (&wl_proxy_marshal_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_marshal_array
*(void **) (&wl_proxy_marshal_array_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_array");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_create
*(void **) (&wl_proxy_create_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_create");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_create_wrapper
*(void **) (&wl_proxy_create_wrapper_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_create_wrapper");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_wrapper_destroy
*(void **) (&wl_proxy_wrapper_destroy_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_wrapper_destroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_marshal_constructor
*(void **) (&wl_proxy_marshal_constructor_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_constructor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_marshal_constructor_versioned
*(void **) (&wl_proxy_marshal_constructor_versioned_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_constructor_versioned");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_marshal_array_constructor
*(void **) (&wl_proxy_marshal_array_constructor_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_array_constructor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_marshal_array_constructor_versioned
*(void **) (&wl_proxy_marshal_array_constructor_versioned_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_array_constructor_versioned");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_destroy
*(void **) (&wl_proxy_destroy_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_destroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_add_listener
*(void **) (&wl_proxy_add_listener_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_add_listener");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_get_listener
*(void **) (&wl_proxy_get_listener_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_listener");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_add_dispatcher
*(void **) (&wl_proxy_add_dispatcher_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_add_dispatcher");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_set_user_data
*(void **) (&wl_proxy_set_user_data_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_set_user_data");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_get_user_data
*(void **) (&wl_proxy_get_user_data_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_user_data");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_get_version
*(void **) (&wl_proxy_get_version_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_version");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_get_id
*(void **) (&wl_proxy_get_id_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_id");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_set_tag
*(void **) (&wl_proxy_set_tag_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_set_tag");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_get_tag
*(void **) (&wl_proxy_get_tag_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_tag");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_get_class
*(void **) (&wl_proxy_get_class_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_class");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_proxy_set_queue
*(void **) (&wl_proxy_set_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_set_queue");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_connect
*(void **) (&wl_display_connect_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_connect");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_connect_to_fd
*(void **) (&wl_display_connect_to_fd_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_connect_to_fd");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_disconnect
*(void **) (&wl_display_disconnect_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_disconnect");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_get_fd
*(void **) (&wl_display_get_fd_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_get_fd");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_dispatch
*(void **) (&wl_display_dispatch_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_dispatch");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_dispatch_queue
*(void **) (&wl_display_dispatch_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_dispatch_queue");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_dispatch_queue_pending
*(void **) (&wl_display_dispatch_queue_pending_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_dispatch_queue_pending");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_dispatch_pending
*(void **) (&wl_display_dispatch_pending_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_dispatch_pending");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_get_error
*(void **) (&wl_display_get_error_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_get_error");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_get_protocol_error
*(void **) (&wl_display_get_protocol_error_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_get_protocol_error");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_flush
*(void **) (&wl_display_flush_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_flush");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_roundtrip_queue
*(void **) (&wl_display_roundtrip_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_roundtrip_queue");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_roundtrip
*(void **) (&wl_display_roundtrip_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_roundtrip");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_create_queue
*(void **) (&wl_display_create_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_create_queue");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_prepare_read_queue
*(void **) (&wl_display_prepare_read_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_prepare_read_queue");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_prepare_read
*(void **) (&wl_display_prepare_read_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_prepare_read");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_cancel_read
*(void **) (&wl_display_cancel_read_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_cancel_read");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_display_read_events
*(void **) (&wl_display_read_events_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_read_events");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_log_set_handler_client
*(void **) (&wl_log_set_handler_client_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_log_set_handler_client");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@@ -0,0 +1,231 @@
#ifndef DYLIBLOAD_WRAPPER_WAYLAND_CLIENT
#define DYLIBLOAD_WRAPPER_WAYLAND_CLIENT
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-25 17:36:12
// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h --sys-include "./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h" --soname libwayland-client.so.0 --init-name wayland_client --output-header platform/linuxbsd/wayland/dynwrappers/wayland-client-core-so_wrap.h --output-implementation platform/linuxbsd/wayland/dynwrappers/wayland-client-core-so_wrap.c
//
// NOTE: This has been hand-patched to workaround some issues.
#include <stdint.h>
#define wl_list_init wl_list_init_dylibloader_orig_wayland_client
#define wl_list_insert wl_list_insert_dylibloader_orig_wayland_client
#define wl_list_remove wl_list_remove_dylibloader_orig_wayland_client
#define wl_list_length wl_list_length_dylibloader_orig_wayland_client
#define wl_list_empty wl_list_empty_dylibloader_orig_wayland_client
#define wl_list_insert_list wl_list_insert_list_dylibloader_orig_wayland_client
#define wl_array_init wl_array_init_dylibloader_orig_wayland_client
#define wl_array_release wl_array_release_dylibloader_orig_wayland_client
#define wl_array_add wl_array_add_dylibloader_orig_wayland_client
#define wl_array_copy wl_array_copy_dylibloader_orig_wayland_client
#define wl_event_queue_destroy wl_event_queue_destroy_dylibloader_orig_wayland_client
#define wl_proxy_marshal_flags wl_proxy_marshal_flags_dylibloader_orig_wayland_client
#define wl_proxy_marshal_array_flags wl_proxy_marshal_array_flags_dylibloader_orig_wayland_client
#define wl_proxy_marshal wl_proxy_marshal_dylibloader_orig_wayland_client
#define wl_proxy_marshal_array wl_proxy_marshal_array_dylibloader_orig_wayland_client
#define wl_proxy_create wl_proxy_create_dylibloader_orig_wayland_client
#define wl_proxy_create_wrapper wl_proxy_create_wrapper_dylibloader_orig_wayland_client
#define wl_proxy_wrapper_destroy wl_proxy_wrapper_destroy_dylibloader_orig_wayland_client
#define wl_proxy_marshal_constructor wl_proxy_marshal_constructor_dylibloader_orig_wayland_client
#define wl_proxy_marshal_constructor_versioned wl_proxy_marshal_constructor_versioned_dylibloader_orig_wayland_client
#define wl_proxy_marshal_array_constructor wl_proxy_marshal_array_constructor_dylibloader_orig_wayland_client
#define wl_proxy_marshal_array_constructor_versioned wl_proxy_marshal_array_constructor_versioned_dylibloader_orig_wayland_client
#define wl_proxy_destroy wl_proxy_destroy_dylibloader_orig_wayland_client
#define wl_proxy_add_listener wl_proxy_add_listener_dylibloader_orig_wayland_client
#define wl_proxy_get_listener wl_proxy_get_listener_dylibloader_orig_wayland_client
#define wl_proxy_add_dispatcher wl_proxy_add_dispatcher_dylibloader_orig_wayland_client
#define wl_proxy_set_user_data wl_proxy_set_user_data_dylibloader_orig_wayland_client
#define wl_proxy_get_user_data wl_proxy_get_user_data_dylibloader_orig_wayland_client
#define wl_proxy_get_version wl_proxy_get_version_dylibloader_orig_wayland_client
#define wl_proxy_get_id wl_proxy_get_id_dylibloader_orig_wayland_client
#define wl_proxy_set_tag wl_proxy_set_tag_dylibloader_orig_wayland_client
#define wl_proxy_get_tag wl_proxy_get_tag_dylibloader_orig_wayland_client
#define wl_proxy_get_class wl_proxy_get_class_dylibloader_orig_wayland_client
#define wl_proxy_set_queue wl_proxy_set_queue_dylibloader_orig_wayland_client
#define wl_display_connect wl_display_connect_dylibloader_orig_wayland_client
#define wl_display_connect_to_fd wl_display_connect_to_fd_dylibloader_orig_wayland_client
#define wl_display_disconnect wl_display_disconnect_dylibloader_orig_wayland_client
#define wl_display_get_fd wl_display_get_fd_dylibloader_orig_wayland_client
#define wl_display_dispatch wl_display_dispatch_dylibloader_orig_wayland_client
#define wl_display_dispatch_queue wl_display_dispatch_queue_dylibloader_orig_wayland_client
#define wl_display_dispatch_queue_pending wl_display_dispatch_queue_pending_dylibloader_orig_wayland_client
#define wl_display_dispatch_pending wl_display_dispatch_pending_dylibloader_orig_wayland_client
#define wl_display_get_error wl_display_get_error_dylibloader_orig_wayland_client
#define wl_display_get_protocol_error wl_display_get_protocol_error_dylibloader_orig_wayland_client
#define wl_display_flush wl_display_flush_dylibloader_orig_wayland_client
#define wl_display_roundtrip_queue wl_display_roundtrip_queue_dylibloader_orig_wayland_client
#define wl_display_roundtrip wl_display_roundtrip_dylibloader_orig_wayland_client
#define wl_display_create_queue wl_display_create_queue_dylibloader_orig_wayland_client
#define wl_display_prepare_read_queue wl_display_prepare_read_queue_dylibloader_orig_wayland_client
#define wl_display_prepare_read wl_display_prepare_read_dylibloader_orig_wayland_client
#define wl_display_cancel_read wl_display_cancel_read_dylibloader_orig_wayland_client
#define wl_display_read_events wl_display_read_events_dylibloader_orig_wayland_client
#define wl_log_set_handler_client wl_log_set_handler_client_dylibloader_orig_wayland_client
#include "./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h"
#undef wl_list_init
#undef wl_list_insert
#undef wl_list_remove
#undef wl_list_length
#undef wl_list_empty
#undef wl_list_insert_list
#undef wl_array_init
#undef wl_array_release
#undef wl_array_add
#undef wl_array_copy
#undef wl_event_queue_destroy
#undef wl_proxy_marshal_flags
#undef wl_proxy_marshal_array_flags
#undef wl_proxy_marshal
#undef wl_proxy_marshal_array
#undef wl_proxy_create
#undef wl_proxy_create_wrapper
#undef wl_proxy_wrapper_destroy
#undef wl_proxy_marshal_constructor
#undef wl_proxy_marshal_constructor_versioned
#undef wl_proxy_marshal_array_constructor
#undef wl_proxy_marshal_array_constructor_versioned
#undef wl_proxy_destroy
#undef wl_proxy_add_listener
#undef wl_proxy_get_listener
#undef wl_proxy_add_dispatcher
#undef wl_proxy_set_user_data
#undef wl_proxy_get_user_data
#undef wl_proxy_get_version
#undef wl_proxy_get_id
#undef wl_proxy_set_tag
#undef wl_proxy_get_tag
#undef wl_proxy_get_class
#undef wl_proxy_set_queue
#undef wl_display_connect
#undef wl_display_connect_to_fd
#undef wl_display_disconnect
#undef wl_display_get_fd
#undef wl_display_dispatch
#undef wl_display_dispatch_queue
#undef wl_display_dispatch_queue_pending
#undef wl_display_dispatch_pending
#undef wl_display_get_error
#undef wl_display_get_protocol_error
#undef wl_display_flush
#undef wl_display_roundtrip_queue
#undef wl_display_roundtrip
#undef wl_display_create_queue
#undef wl_display_prepare_read_queue
#undef wl_display_prepare_read
#undef wl_display_cancel_read
#undef wl_display_read_events
#undef wl_log_set_handler_client
#ifdef __cplusplus
extern "C" {
#endif
#define wl_list_init wl_list_init_dylibloader_wrapper_wayland_client
#define wl_list_insert wl_list_insert_dylibloader_wrapper_wayland_client
#define wl_list_remove wl_list_remove_dylibloader_wrapper_wayland_client
#define wl_list_length wl_list_length_dylibloader_wrapper_wayland_client
#define wl_list_empty wl_list_empty_dylibloader_wrapper_wayland_client
#define wl_list_insert_list wl_list_insert_list_dylibloader_wrapper_wayland_client
#define wl_array_init wl_array_init_dylibloader_wrapper_wayland_client
#define wl_array_release wl_array_release_dylibloader_wrapper_wayland_client
#define wl_array_add wl_array_add_dylibloader_wrapper_wayland_client
#define wl_array_copy wl_array_copy_dylibloader_wrapper_wayland_client
#define wl_event_queue_destroy wl_event_queue_destroy_dylibloader_wrapper_wayland_client
#define wl_proxy_marshal_flags wl_proxy_marshal_flags_dylibloader_wrapper_wayland_client
#define wl_proxy_marshal_array_flags wl_proxy_marshal_array_flags_dylibloader_wrapper_wayland_client
#define wl_proxy_marshal wl_proxy_marshal_dylibloader_wrapper_wayland_client
#define wl_proxy_marshal_array wl_proxy_marshal_array_dylibloader_wrapper_wayland_client
#define wl_proxy_create wl_proxy_create_dylibloader_wrapper_wayland_client
#define wl_proxy_create_wrapper wl_proxy_create_wrapper_dylibloader_wrapper_wayland_client
#define wl_proxy_wrapper_destroy wl_proxy_wrapper_destroy_dylibloader_wrapper_wayland_client
#define wl_proxy_marshal_constructor wl_proxy_marshal_constructor_dylibloader_wrapper_wayland_client
#define wl_proxy_marshal_constructor_versioned wl_proxy_marshal_constructor_versioned_dylibloader_wrapper_wayland_client
#define wl_proxy_marshal_array_constructor wl_proxy_marshal_array_constructor_dylibloader_wrapper_wayland_client
#define wl_proxy_marshal_array_constructor_versioned wl_proxy_marshal_array_constructor_versioned_dylibloader_wrapper_wayland_client
#define wl_proxy_destroy wl_proxy_destroy_dylibloader_wrapper_wayland_client
#define wl_proxy_add_listener wl_proxy_add_listener_dylibloader_wrapper_wayland_client
#define wl_proxy_get_listener wl_proxy_get_listener_dylibloader_wrapper_wayland_client
#define wl_proxy_add_dispatcher wl_proxy_add_dispatcher_dylibloader_wrapper_wayland_client
#define wl_proxy_set_user_data wl_proxy_set_user_data_dylibloader_wrapper_wayland_client
#define wl_proxy_get_user_data wl_proxy_get_user_data_dylibloader_wrapper_wayland_client
#define wl_proxy_get_version wl_proxy_get_version_dylibloader_wrapper_wayland_client
#define wl_proxy_get_id wl_proxy_get_id_dylibloader_wrapper_wayland_client
#define wl_proxy_set_tag wl_proxy_set_tag_dylibloader_wrapper_wayland_client
#define wl_proxy_get_tag wl_proxy_get_tag_dylibloader_wrapper_wayland_client
#define wl_proxy_get_class wl_proxy_get_class_dylibloader_wrapper_wayland_client
#define wl_proxy_set_queue wl_proxy_set_queue_dylibloader_wrapper_wayland_client
#define wl_display_connect wl_display_connect_dylibloader_wrapper_wayland_client
#define wl_display_connect_to_fd wl_display_connect_to_fd_dylibloader_wrapper_wayland_client
#define wl_display_disconnect wl_display_disconnect_dylibloader_wrapper_wayland_client
#define wl_display_get_fd wl_display_get_fd_dylibloader_wrapper_wayland_client
#define wl_display_dispatch wl_display_dispatch_dylibloader_wrapper_wayland_client
#define wl_display_dispatch_queue wl_display_dispatch_queue_dylibloader_wrapper_wayland_client
#define wl_display_dispatch_queue_pending wl_display_dispatch_queue_pending_dylibloader_wrapper_wayland_client
#define wl_display_dispatch_pending wl_display_dispatch_pending_dylibloader_wrapper_wayland_client
#define wl_display_get_error wl_display_get_error_dylibloader_wrapper_wayland_client
#define wl_display_get_protocol_error wl_display_get_protocol_error_dylibloader_wrapper_wayland_client
#define wl_display_flush wl_display_flush_dylibloader_wrapper_wayland_client
#define wl_display_roundtrip_queue wl_display_roundtrip_queue_dylibloader_wrapper_wayland_client
#define wl_display_roundtrip wl_display_roundtrip_dylibloader_wrapper_wayland_client
#define wl_display_create_queue wl_display_create_queue_dylibloader_wrapper_wayland_client
#define wl_display_prepare_read_queue wl_display_prepare_read_queue_dylibloader_wrapper_wayland_client
#define wl_display_prepare_read wl_display_prepare_read_dylibloader_wrapper_wayland_client
#define wl_display_cancel_read wl_display_cancel_read_dylibloader_wrapper_wayland_client
#define wl_display_read_events wl_display_read_events_dylibloader_wrapper_wayland_client
#define wl_log_set_handler_client wl_log_set_handler_client_dylibloader_wrapper_wayland_client
extern void (*wl_list_init_dylibloader_wrapper_wayland_client)(struct wl_list*);
extern void (*wl_list_insert_dylibloader_wrapper_wayland_client)(struct wl_list*,struct wl_list*);
extern void (*wl_list_remove_dylibloader_wrapper_wayland_client)(struct wl_list*);
extern int (*wl_list_length_dylibloader_wrapper_wayland_client)(struct wl_list*);
extern int (*wl_list_empty_dylibloader_wrapper_wayland_client)(struct wl_list*);
extern void (*wl_list_insert_list_dylibloader_wrapper_wayland_client)(struct wl_list*,struct wl_list*);
extern void (*wl_array_init_dylibloader_wrapper_wayland_client)(struct wl_array*);
extern void (*wl_array_release_dylibloader_wrapper_wayland_client)(struct wl_array*);
extern void* (*wl_array_add_dylibloader_wrapper_wayland_client)(struct wl_array*, size_t);
extern int (*wl_array_copy_dylibloader_wrapper_wayland_client)(struct wl_array*,struct wl_array*);
extern void (*wl_event_queue_destroy_dylibloader_wrapper_wayland_client)(struct wl_event_queue*);
extern struct wl_proxy* (*wl_proxy_marshal_flags_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t, uint32_t,...);
extern struct wl_proxy* (*wl_proxy_marshal_array_flags_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t, uint32_t,union wl_argument);
extern void (*wl_proxy_marshal_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,...);
extern void (*wl_proxy_marshal_array_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument);
extern struct wl_proxy* (*wl_proxy_create_dylibloader_wrapper_wayland_client)(struct wl_proxy*,const struct wl_interface*);
extern void* (*wl_proxy_create_wrapper_dylibloader_wrapper_wayland_client)( void*);
extern void (*wl_proxy_wrapper_destroy_dylibloader_wrapper_wayland_client)( void*);
extern struct wl_proxy* (*wl_proxy_marshal_constructor_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*,...);
extern struct wl_proxy* (*wl_proxy_marshal_constructor_versioned_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t,...);
extern struct wl_proxy* (*wl_proxy_marshal_array_constructor_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument,const struct wl_interface*);
extern struct wl_proxy* (*wl_proxy_marshal_array_constructor_versioned_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument,const struct wl_interface*, uint32_t);
extern void (*wl_proxy_destroy_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
extern int (*wl_proxy_add_listener_dylibloader_wrapper_wayland_client)(struct wl_proxy*, void(**)(void), void*);
extern const void* (*wl_proxy_get_listener_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
extern int (*wl_proxy_add_dispatcher_dylibloader_wrapper_wayland_client)(struct wl_proxy*, wl_dispatcher_func_t,const void*, void*);
extern void (*wl_proxy_set_user_data_dylibloader_wrapper_wayland_client)(struct wl_proxy*, void*);
extern void* (*wl_proxy_get_user_data_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
extern uint32_t (*wl_proxy_get_version_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
extern uint32_t (*wl_proxy_get_id_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
extern void (*wl_proxy_set_tag_dylibloader_wrapper_wayland_client)(struct wl_proxy*,const char**);
extern const char** (*wl_proxy_get_tag_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
extern const char* (*wl_proxy_get_class_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
extern void (*wl_proxy_set_queue_dylibloader_wrapper_wayland_client)(struct wl_proxy*,struct wl_event_queue*);
extern struct wl_display* (*wl_display_connect_dylibloader_wrapper_wayland_client)(const char*);
extern struct wl_display* (*wl_display_connect_to_fd_dylibloader_wrapper_wayland_client)( int);
extern void (*wl_display_disconnect_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern int (*wl_display_get_fd_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern int (*wl_display_dispatch_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern int (*wl_display_dispatch_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
extern int (*wl_display_dispatch_queue_pending_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
extern int (*wl_display_dispatch_pending_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern int (*wl_display_get_error_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern uint32_t (*wl_display_get_protocol_error_dylibloader_wrapper_wayland_client)(struct wl_display*,const struct wl_interface**, uint32_t*);
extern int (*wl_display_flush_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern int (*wl_display_roundtrip_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
extern int (*wl_display_roundtrip_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern struct wl_event_queue* (*wl_display_create_queue_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern int (*wl_display_prepare_read_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
extern int (*wl_display_prepare_read_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern void (*wl_display_cancel_read_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern int (*wl_display_read_events_dylibloader_wrapper_wayland_client)(struct wl_display*);
extern void (*wl_log_set_handler_client_dylibloader_wrapper_wayland_client)( wl_log_func_t);
int initialize_wayland_client(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,89 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-25 17:46:12
// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h --sys-include "./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h" --soname libwayland-cursor.so.0 --init-name wayland_cursor --output-header platform/linuxbsd/wayland/dynwrappers/wayland-cursor-so_wrap.h --output-implementation platform/linuxbsd/wayland/dynwrappers/wayland-cursor-so_wrap.c
//
#include <stdint.h>
#define wl_cursor_theme_load wl_cursor_theme_load_dylibloader_orig_wayland_cursor
#define wl_cursor_theme_destroy wl_cursor_theme_destroy_dylibloader_orig_wayland_cursor
#define wl_cursor_theme_get_cursor wl_cursor_theme_get_cursor_dylibloader_orig_wayland_cursor
#define wl_cursor_image_get_buffer wl_cursor_image_get_buffer_dylibloader_orig_wayland_cursor
#define wl_cursor_frame wl_cursor_frame_dylibloader_orig_wayland_cursor
#define wl_cursor_frame_and_duration wl_cursor_frame_and_duration_dylibloader_orig_wayland_cursor
#include "./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h"
#undef wl_cursor_theme_load
#undef wl_cursor_theme_destroy
#undef wl_cursor_theme_get_cursor
#undef wl_cursor_image_get_buffer
#undef wl_cursor_frame
#undef wl_cursor_frame_and_duration
#include <dlfcn.h>
#include <stdio.h>
struct wl_cursor_theme* (*wl_cursor_theme_load_dylibloader_wrapper_wayland_cursor)(const char*, int,struct wl_shm*);
void (*wl_cursor_theme_destroy_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_theme*);
struct wl_cursor* (*wl_cursor_theme_get_cursor_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_theme*,const char*);
struct wl_buffer* (*wl_cursor_image_get_buffer_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_image*);
int (*wl_cursor_frame_dylibloader_wrapper_wayland_cursor)(struct wl_cursor*, uint32_t);
int (*wl_cursor_frame_and_duration_dylibloader_wrapper_wayland_cursor)(struct wl_cursor*, uint32_t, uint32_t*);
int initialize_wayland_cursor(int verbose) {
void *handle;
char *error;
handle = dlopen("libwayland-cursor.so.0", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// wl_cursor_theme_load
*(void **) (&wl_cursor_theme_load_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_theme_load");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_cursor_theme_destroy
*(void **) (&wl_cursor_theme_destroy_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_theme_destroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_cursor_theme_get_cursor
*(void **) (&wl_cursor_theme_get_cursor_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_theme_get_cursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_cursor_image_get_buffer
*(void **) (&wl_cursor_image_get_buffer_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_image_get_buffer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_cursor_frame
*(void **) (&wl_cursor_frame_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_frame");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_cursor_frame_and_duration
*(void **) (&wl_cursor_frame_and_duration_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_frame_and_duration");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@@ -0,0 +1,42 @@
#ifndef DYLIBLOAD_WRAPPER_WAYLAND_CURSOR
#define DYLIBLOAD_WRAPPER_WAYLAND_CURSOR
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-25 17:46:12
// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h --sys-include "./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h" --soname libwayland-cursor.so.0 --init-name wayland_cursor --output-header platform/linuxbsd/wayland/dynwrappers/wayland-cursor-so_wrap.h --output-implementation platform/linuxbsd/wayland/dynwrappers/wayland-cursor-so_wrap.c
//
#include <stdint.h>
#define wl_cursor_theme_load wl_cursor_theme_load_dylibloader_orig_wayland_cursor
#define wl_cursor_theme_destroy wl_cursor_theme_destroy_dylibloader_orig_wayland_cursor
#define wl_cursor_theme_get_cursor wl_cursor_theme_get_cursor_dylibloader_orig_wayland_cursor
#define wl_cursor_image_get_buffer wl_cursor_image_get_buffer_dylibloader_orig_wayland_cursor
#define wl_cursor_frame wl_cursor_frame_dylibloader_orig_wayland_cursor
#define wl_cursor_frame_and_duration wl_cursor_frame_and_duration_dylibloader_orig_wayland_cursor
#include "./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h"
#undef wl_cursor_theme_load
#undef wl_cursor_theme_destroy
#undef wl_cursor_theme_get_cursor
#undef wl_cursor_image_get_buffer
#undef wl_cursor_frame
#undef wl_cursor_frame_and_duration
#ifdef __cplusplus
extern "C" {
#endif
#define wl_cursor_theme_load wl_cursor_theme_load_dylibloader_wrapper_wayland_cursor
#define wl_cursor_theme_destroy wl_cursor_theme_destroy_dylibloader_wrapper_wayland_cursor
#define wl_cursor_theme_get_cursor wl_cursor_theme_get_cursor_dylibloader_wrapper_wayland_cursor
#define wl_cursor_image_get_buffer wl_cursor_image_get_buffer_dylibloader_wrapper_wayland_cursor
#define wl_cursor_frame wl_cursor_frame_dylibloader_wrapper_wayland_cursor
#define wl_cursor_frame_and_duration wl_cursor_frame_and_duration_dylibloader_wrapper_wayland_cursor
extern struct wl_cursor_theme* (*wl_cursor_theme_load_dylibloader_wrapper_wayland_cursor)(const char*, int,struct wl_shm*);
extern void (*wl_cursor_theme_destroy_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_theme*);
extern struct wl_cursor* (*wl_cursor_theme_get_cursor_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_theme*,const char*);
extern struct wl_buffer* (*wl_cursor_image_get_buffer_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_image*);
extern int (*wl_cursor_frame_dylibloader_wrapper_wayland_cursor)(struct wl_cursor*, uint32_t);
extern int (*wl_cursor_frame_and_duration_dylibloader_wrapper_wayland_cursor)(struct wl_cursor*, uint32_t, uint32_t*);
int initialize_wayland_cursor(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,67 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-25 17:49:37
// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/wayland/wayland-egl-core.h --sys-include "./thirdparty/linuxbsd_headers/wayland/wayland-egl-core.h" --soname libwayland-egl.so.1 --init-name wayland_egl --output-header platform/linuxbsd/wayland/dynwrappers/wayland-egl-core-so_wrap.h --output-implementation platform/linuxbsd/wayland/dynwrappers/wayland-egl-core-so_wrap.c
//
#include <stdint.h>
#define wl_egl_window_create wl_egl_window_create_dylibloader_orig_wayland_egl
#define wl_egl_window_destroy wl_egl_window_destroy_dylibloader_orig_wayland_egl
#define wl_egl_window_resize wl_egl_window_resize_dylibloader_orig_wayland_egl
#define wl_egl_window_get_attached_size wl_egl_window_get_attached_size_dylibloader_orig_wayland_egl
#include "./thirdparty/linuxbsd_headers/wayland/wayland-egl-core.h"
#undef wl_egl_window_create
#undef wl_egl_window_destroy
#undef wl_egl_window_resize
#undef wl_egl_window_get_attached_size
#include <dlfcn.h>
#include <stdio.h>
struct wl_egl_window* (*wl_egl_window_create_dylibloader_wrapper_wayland_egl)(struct wl_surface*, int, int);
void (*wl_egl_window_destroy_dylibloader_wrapper_wayland_egl)(struct wl_egl_window*);
void (*wl_egl_window_resize_dylibloader_wrapper_wayland_egl)(struct wl_egl_window*, int, int, int, int);
void (*wl_egl_window_get_attached_size_dylibloader_wrapper_wayland_egl)(struct wl_egl_window*, int*, int*);
int initialize_wayland_egl(int verbose) {
void *handle;
char *error;
handle = dlopen("libwayland-egl.so.1", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// wl_egl_window_create
*(void **) (&wl_egl_window_create_dylibloader_wrapper_wayland_egl) = dlsym(handle, "wl_egl_window_create");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_egl_window_destroy
*(void **) (&wl_egl_window_destroy_dylibloader_wrapper_wayland_egl) = dlsym(handle, "wl_egl_window_destroy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_egl_window_resize
*(void **) (&wl_egl_window_resize_dylibloader_wrapper_wayland_egl) = dlsym(handle, "wl_egl_window_resize");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// wl_egl_window_get_attached_size
*(void **) (&wl_egl_window_get_attached_size_dylibloader_wrapper_wayland_egl) = dlsym(handle, "wl_egl_window_get_attached_size");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@@ -0,0 +1,34 @@
#ifndef DYLIBLOAD_WRAPPER_WAYLAND_EGL
#define DYLIBLOAD_WRAPPER_WAYLAND_EGL
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-25 17:49:37
// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/wayland/wayland-egl-core.h --sys-include "./thirdparty/linuxbsd_headers/wayland/wayland-egl-core.h" --soname libwayland-egl.so.1 --init-name wayland_egl --output-header platform/linuxbsd/wayland/dynwrappers/wayland-egl-core-so_wrap.h --output-implementation platform/linuxbsd/wayland/dynwrappers/wayland-egl-core-so_wrap.c
//
#include <stdint.h>
#define wl_egl_window_create wl_egl_window_create_dylibloader_orig_wayland_egl
#define wl_egl_window_destroy wl_egl_window_destroy_dylibloader_orig_wayland_egl
#define wl_egl_window_resize wl_egl_window_resize_dylibloader_orig_wayland_egl
#define wl_egl_window_get_attached_size wl_egl_window_get_attached_size_dylibloader_orig_wayland_egl
#include "./thirdparty/linuxbsd_headers/wayland/wayland-egl-core.h"
#undef wl_egl_window_create
#undef wl_egl_window_destroy
#undef wl_egl_window_resize
#undef wl_egl_window_get_attached_size
#ifdef __cplusplus
extern "C" {
#endif
#define wl_egl_window_create wl_egl_window_create_dylibloader_wrapper_wayland_egl
#define wl_egl_window_destroy wl_egl_window_destroy_dylibloader_wrapper_wayland_egl
#define wl_egl_window_resize wl_egl_window_resize_dylibloader_wrapper_wayland_egl
#define wl_egl_window_get_attached_size wl_egl_window_get_attached_size_dylibloader_wrapper_wayland_egl
extern struct wl_egl_window* (*wl_egl_window_create_dylibloader_wrapper_wayland_egl)(struct wl_surface*, int, int);
extern void (*wl_egl_window_destroy_dylibloader_wrapper_wayland_egl)(struct wl_egl_window*);
extern void (*wl_egl_window_resize_dylibloader_wrapper_wayland_egl)(struct wl_egl_window*, int, int, int, int);
extern void (*wl_egl_window_get_attached_size_dylibloader_wrapper_wayland_egl)(struct wl_egl_window*, int*, int*);
int initialize_wayland_egl(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,66 @@
/**************************************************************************/
/* egl_manager_wayland.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "egl_manager_wayland.h"
#ifdef WAYLAND_ENABLED
#ifdef EGL_ENABLED
#ifdef GLES3_ENABLED
const char *EGLManagerWayland::_get_platform_extension_name() const {
return "EGL_KHR_platform_wayland";
}
EGLenum EGLManagerWayland::_get_platform_extension_enum() const {
return EGL_PLATFORM_WAYLAND_KHR;
}
EGLenum EGLManagerWayland::_get_platform_api_enum() const {
return EGL_OPENGL_API;
}
Vector<EGLAttrib> EGLManagerWayland::_get_platform_display_attributes() const {
return Vector<EGLAttrib>();
}
Vector<EGLint> EGLManagerWayland::_get_platform_context_attribs() const {
Vector<EGLint> ret;
ret.push_back(EGL_CONTEXT_MAJOR_VERSION);
ret.push_back(3);
ret.push_back(EGL_CONTEXT_MINOR_VERSION);
ret.push_back(3);
ret.push_back(EGL_NONE);
return ret;
}
#endif // GLES3_ENABLED
#endif // EGL_ENABLED
#endif // WAYLAND_ENABLED

View File

@@ -0,0 +1,50 @@
/**************************************************************************/
/* egl_manager_wayland.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef WAYLAND_ENABLED
#ifdef EGL_ENABLED
#ifdef GLES3_ENABLED
#include "drivers/egl/egl_manager.h"
class EGLManagerWayland : public EGLManager {
public:
virtual const char *_get_platform_extension_name() const override;
virtual EGLenum _get_platform_extension_enum() const override;
virtual EGLenum _get_platform_api_enum() const override;
virtual Vector<EGLAttrib> _get_platform_display_attributes() const override;
virtual Vector<EGLint> _get_platform_context_attribs() const override;
};
#endif // GLES3_ENABLED
#endif // EGL_ENABLED
#endif // WAYLAND_ENABLED

View File

@@ -0,0 +1,64 @@
/**************************************************************************/
/* egl_manager_wayland_gles.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "egl_manager_wayland_gles.h"
#ifdef WAYLAND_ENABLED
#ifdef EGL_ENABLED
#ifdef GLES3_ENABLED
const char *EGLManagerWaylandGLES::_get_platform_extension_name() const {
return "EGL_KHR_platform_wayland";
}
EGLenum EGLManagerWaylandGLES::_get_platform_extension_enum() const {
return EGL_PLATFORM_WAYLAND_KHR;
}
EGLenum EGLManagerWaylandGLES::_get_platform_api_enum() const {
return EGL_OPENGL_ES_API;
}
Vector<EGLAttrib> EGLManagerWaylandGLES::_get_platform_display_attributes() const {
return Vector<EGLAttrib>();
}
Vector<EGLint> EGLManagerWaylandGLES::_get_platform_context_attribs() const {
Vector<EGLint> ret;
ret.push_back(EGL_CONTEXT_MAJOR_VERSION);
ret.push_back(3);
ret.push_back(EGL_NONE);
return ret;
}
#endif // GLES3_ENABLED
#endif // EGL_ENABLED
#endif // WAYLAND_ENABLED

View File

@@ -0,0 +1,50 @@
/**************************************************************************/
/* egl_manager_wayland_gles.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef WAYLAND_ENABLED
#ifdef EGL_ENABLED
#ifdef GLES3_ENABLED
#include "drivers/egl/egl_manager.h"
class EGLManagerWaylandGLES : public EGLManager {
public:
virtual const char *_get_platform_extension_name() const override;
virtual EGLenum _get_platform_extension_enum() const override;
virtual EGLenum _get_platform_api_enum() const override;
virtual Vector<EGLAttrib> _get_platform_display_attributes() const override;
virtual Vector<EGLint> _get_platform_context_attribs() const override;
};
#endif // GLES3_ENABLED
#endif // EGL_ENABLED
#endif // WAYLAND_ENABLED

View File

@@ -0,0 +1,411 @@
/**************************************************************************/
/* key_mapping_xkb.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "key_mapping_xkb.h"
void KeyMappingXKB::initialize() {
// XKB keycode to Godot Key map.
xkb_keycode_map[XKB_KEY_Escape] = Key::ESCAPE;
xkb_keycode_map[XKB_KEY_Tab] = Key::TAB;
xkb_keycode_map[XKB_KEY_ISO_Left_Tab] = Key::BACKTAB;
xkb_keycode_map[XKB_KEY_BackSpace] = Key::BACKSPACE;
xkb_keycode_map[XKB_KEY_Return] = Key::ENTER;
xkb_keycode_map[XKB_KEY_Insert] = Key::INSERT;
xkb_keycode_map[XKB_KEY_Delete] = Key::KEY_DELETE;
xkb_keycode_map[XKB_KEY_Clear] = Key::KEY_DELETE;
xkb_keycode_map[XKB_KEY_Pause] = Key::PAUSE;
xkb_keycode_map[XKB_KEY_Print] = Key::PRINT;
xkb_keycode_map[XKB_KEY_Home] = Key::HOME;
xkb_keycode_map[XKB_KEY_End] = Key::END;
xkb_keycode_map[XKB_KEY_Left] = Key::LEFT;
xkb_keycode_map[XKB_KEY_Up] = Key::UP;
xkb_keycode_map[XKB_KEY_Right] = Key::RIGHT;
xkb_keycode_map[XKB_KEY_Down] = Key::DOWN;
xkb_keycode_map[XKB_KEY_Prior] = Key::PAGEUP;
xkb_keycode_map[XKB_KEY_Next] = Key::PAGEDOWN;
xkb_keycode_map[XKB_KEY_Shift_L] = Key::SHIFT;
xkb_keycode_map[XKB_KEY_Shift_R] = Key::SHIFT;
xkb_keycode_map[XKB_KEY_Shift_Lock] = Key::SHIFT;
xkb_keycode_map[XKB_KEY_Control_L] = Key::CTRL;
xkb_keycode_map[XKB_KEY_Control_R] = Key::CTRL;
xkb_keycode_map[XKB_KEY_Meta_L] = Key::META;
xkb_keycode_map[XKB_KEY_Meta_R] = Key::META;
xkb_keycode_map[XKB_KEY_Alt_L] = Key::ALT;
xkb_keycode_map[XKB_KEY_Alt_R] = Key::ALT;
xkb_keycode_map[XKB_KEY_Caps_Lock] = Key::CAPSLOCK;
xkb_keycode_map[XKB_KEY_Num_Lock] = Key::NUMLOCK;
xkb_keycode_map[XKB_KEY_Scroll_Lock] = Key::SCROLLLOCK;
xkb_keycode_map[XKB_KEY_less] = Key::QUOTELEFT;
xkb_keycode_map[XKB_KEY_grave] = Key::SECTION;
xkb_keycode_map[XKB_KEY_Super_L] = Key::META;
xkb_keycode_map[XKB_KEY_Super_R] = Key::META;
xkb_keycode_map[XKB_KEY_Menu] = Key::MENU;
xkb_keycode_map[XKB_KEY_Hyper_L] = Key::HYPER;
xkb_keycode_map[XKB_KEY_Hyper_R] = Key::HYPER;
xkb_keycode_map[XKB_KEY_Help] = Key::HELP;
xkb_keycode_map[XKB_KEY_KP_Space] = Key::SPACE;
xkb_keycode_map[XKB_KEY_KP_Tab] = Key::TAB;
xkb_keycode_map[XKB_KEY_KP_Enter] = Key::KP_ENTER;
xkb_keycode_map[XKB_KEY_Home] = Key::HOME;
xkb_keycode_map[XKB_KEY_Left] = Key::LEFT;
xkb_keycode_map[XKB_KEY_Up] = Key::UP;
xkb_keycode_map[XKB_KEY_Right] = Key::RIGHT;
xkb_keycode_map[XKB_KEY_Down] = Key::DOWN;
xkb_keycode_map[XKB_KEY_Prior] = Key::PAGEUP;
xkb_keycode_map[XKB_KEY_Next] = Key::PAGEDOWN;
xkb_keycode_map[XKB_KEY_End] = Key::END;
xkb_keycode_map[XKB_KEY_Begin] = Key::CLEAR;
xkb_keycode_map[XKB_KEY_Insert] = Key::INSERT;
xkb_keycode_map[XKB_KEY_Delete] = Key::KEY_DELETE;
xkb_keycode_map[XKB_KEY_KP_Equal] = Key::EQUAL;
xkb_keycode_map[XKB_KEY_KP_Separator] = Key::COMMA;
xkb_keycode_map[XKB_KEY_KP_Decimal] = Key::KP_PERIOD;
xkb_keycode_map[XKB_KEY_KP_Multiply] = Key::KP_MULTIPLY;
xkb_keycode_map[XKB_KEY_KP_Divide] = Key::KP_DIVIDE;
xkb_keycode_map[XKB_KEY_KP_Subtract] = Key::KP_SUBTRACT;
xkb_keycode_map[XKB_KEY_KP_Add] = Key::KP_ADD;
xkb_keycode_map[XKB_KEY_KP_0] = Key::KP_0;
xkb_keycode_map[XKB_KEY_KP_1] = Key::KP_1;
xkb_keycode_map[XKB_KEY_KP_2] = Key::KP_2;
xkb_keycode_map[XKB_KEY_KP_3] = Key::KP_3;
xkb_keycode_map[XKB_KEY_KP_4] = Key::KP_4;
xkb_keycode_map[XKB_KEY_KP_5] = Key::KP_5;
xkb_keycode_map[XKB_KEY_KP_6] = Key::KP_6;
xkb_keycode_map[XKB_KEY_KP_7] = Key::KP_7;
xkb_keycode_map[XKB_KEY_KP_8] = Key::KP_8;
xkb_keycode_map[XKB_KEY_KP_9] = Key::KP_9;
// Same keys but with numlock off.
xkb_keycode_map[XKB_KEY_KP_Insert] = Key::INSERT;
xkb_keycode_map[XKB_KEY_KP_Delete] = Key::KEY_DELETE;
xkb_keycode_map[XKB_KEY_KP_End] = Key::END;
xkb_keycode_map[XKB_KEY_KP_Down] = Key::DOWN;
xkb_keycode_map[XKB_KEY_KP_Page_Down] = Key::PAGEDOWN;
xkb_keycode_map[XKB_KEY_KP_Left] = Key::LEFT;
// X11 documents this (numpad 5) as "begin of line" but no toolkit seems to interpret it this way.
// On Windows this is emitting Key::Clear so for consistency it will be mapped to Key::Clear
xkb_keycode_map[XKB_KEY_KP_Begin] = Key::CLEAR;
xkb_keycode_map[XKB_KEY_KP_Right] = Key::RIGHT;
xkb_keycode_map[XKB_KEY_KP_Home] = Key::HOME;
xkb_keycode_map[XKB_KEY_KP_Up] = Key::UP;
xkb_keycode_map[XKB_KEY_KP_Page_Up] = Key::PAGEUP;
xkb_keycode_map[XKB_KEY_F1] = Key::F1;
xkb_keycode_map[XKB_KEY_F2] = Key::F2;
xkb_keycode_map[XKB_KEY_F3] = Key::F3;
xkb_keycode_map[XKB_KEY_F4] = Key::F4;
xkb_keycode_map[XKB_KEY_F5] = Key::F5;
xkb_keycode_map[XKB_KEY_F6] = Key::F6;
xkb_keycode_map[XKB_KEY_F7] = Key::F7;
xkb_keycode_map[XKB_KEY_F8] = Key::F8;
xkb_keycode_map[XKB_KEY_F9] = Key::F9;
xkb_keycode_map[XKB_KEY_F10] = Key::F10;
xkb_keycode_map[XKB_KEY_F11] = Key::F11;
xkb_keycode_map[XKB_KEY_F12] = Key::F12;
xkb_keycode_map[XKB_KEY_F13] = Key::F13;
xkb_keycode_map[XKB_KEY_F14] = Key::F14;
xkb_keycode_map[XKB_KEY_F15] = Key::F15;
xkb_keycode_map[XKB_KEY_F16] = Key::F16;
xkb_keycode_map[XKB_KEY_F17] = Key::F17;
xkb_keycode_map[XKB_KEY_F18] = Key::F18;
xkb_keycode_map[XKB_KEY_F19] = Key::F19;
xkb_keycode_map[XKB_KEY_F20] = Key::F20;
xkb_keycode_map[XKB_KEY_F21] = Key::F21;
xkb_keycode_map[XKB_KEY_F22] = Key::F22;
xkb_keycode_map[XKB_KEY_F23] = Key::F23;
xkb_keycode_map[XKB_KEY_F24] = Key::F24;
xkb_keycode_map[XKB_KEY_F25] = Key::F25;
xkb_keycode_map[XKB_KEY_F26] = Key::F26;
xkb_keycode_map[XKB_KEY_F27] = Key::F27;
xkb_keycode_map[XKB_KEY_F28] = Key::F28;
xkb_keycode_map[XKB_KEY_F29] = Key::F29;
xkb_keycode_map[XKB_KEY_F30] = Key::F30;
xkb_keycode_map[XKB_KEY_F31] = Key::F31;
xkb_keycode_map[XKB_KEY_F32] = Key::F32;
xkb_keycode_map[XKB_KEY_F33] = Key::F33;
xkb_keycode_map[XKB_KEY_F34] = Key::F34;
xkb_keycode_map[XKB_KEY_F35] = Key::F35;
xkb_keycode_map[XKB_KEY_yen] = Key::YEN;
xkb_keycode_map[XKB_KEY_section] = Key::SECTION;
// Media keys.
xkb_keycode_map[XKB_KEY_XF86Back] = Key::BACK;
xkb_keycode_map[XKB_KEY_XF86Forward] = Key::FORWARD;
xkb_keycode_map[XKB_KEY_XF86Stop] = Key::STOP;
xkb_keycode_map[XKB_KEY_XF86Refresh] = Key::REFRESH;
xkb_keycode_map[XKB_KEY_XF86Favorites] = Key::FAVORITES;
xkb_keycode_map[XKB_KEY_XF86OpenURL] = Key::OPENURL;
xkb_keycode_map[XKB_KEY_XF86HomePage] = Key::HOMEPAGE;
xkb_keycode_map[XKB_KEY_XF86Search] = Key::SEARCH;
xkb_keycode_map[XKB_KEY_XF86AudioLowerVolume] = Key::VOLUMEDOWN;
xkb_keycode_map[XKB_KEY_XF86AudioMute] = Key::VOLUMEMUTE;
xkb_keycode_map[XKB_KEY_XF86AudioRaiseVolume] = Key::VOLUMEUP;
xkb_keycode_map[XKB_KEY_XF86AudioPlay] = Key::MEDIAPLAY;
xkb_keycode_map[XKB_KEY_XF86AudioStop] = Key::MEDIASTOP;
xkb_keycode_map[XKB_KEY_XF86AudioPrev] = Key::MEDIAPREVIOUS;
xkb_keycode_map[XKB_KEY_XF86AudioNext] = Key::MEDIANEXT;
xkb_keycode_map[XKB_KEY_XF86AudioRecord] = Key::MEDIARECORD;
xkb_keycode_map[XKB_KEY_XF86Standby] = Key::STANDBY;
// Launch keys.
xkb_keycode_map[XKB_KEY_XF86Mail] = Key::LAUNCHMAIL;
xkb_keycode_map[XKB_KEY_XF86AudioMedia] = Key::LAUNCHMEDIA;
xkb_keycode_map[XKB_KEY_XF86MyComputer] = Key::LAUNCH0;
xkb_keycode_map[XKB_KEY_XF86Calculator] = Key::LAUNCH1;
xkb_keycode_map[XKB_KEY_XF86Launch0] = Key::LAUNCH2;
xkb_keycode_map[XKB_KEY_XF86Launch1] = Key::LAUNCH3;
xkb_keycode_map[XKB_KEY_XF86Launch2] = Key::LAUNCH4;
xkb_keycode_map[XKB_KEY_XF86Launch3] = Key::LAUNCH5;
xkb_keycode_map[XKB_KEY_XF86Launch4] = Key::LAUNCH6;
xkb_keycode_map[XKB_KEY_XF86Launch5] = Key::LAUNCH7;
xkb_keycode_map[XKB_KEY_XF86Launch6] = Key::LAUNCH8;
xkb_keycode_map[XKB_KEY_XF86Launch7] = Key::LAUNCH9;
xkb_keycode_map[XKB_KEY_XF86Launch8] = Key::LAUNCHA;
xkb_keycode_map[XKB_KEY_XF86Launch9] = Key::LAUNCHB;
xkb_keycode_map[XKB_KEY_XF86LaunchA] = Key::LAUNCHC;
xkb_keycode_map[XKB_KEY_XF86LaunchB] = Key::LAUNCHD;
xkb_keycode_map[XKB_KEY_XF86LaunchC] = Key::LAUNCHE;
xkb_keycode_map[XKB_KEY_XF86LaunchD] = Key::LAUNCHF;
// Scancode to Godot Key map.
scancode_map[0x09] = Key::ESCAPE;
scancode_map[0x0A] = Key::KEY_1;
scancode_map[0x0B] = Key::KEY_2;
scancode_map[0x0C] = Key::KEY_3;
scancode_map[0x0D] = Key::KEY_4;
scancode_map[0x0E] = Key::KEY_5;
scancode_map[0x0F] = Key::KEY_6;
scancode_map[0x10] = Key::KEY_7;
scancode_map[0x11] = Key::KEY_8;
scancode_map[0x12] = Key::KEY_9;
scancode_map[0x13] = Key::KEY_0;
scancode_map[0x14] = Key::MINUS;
scancode_map[0x15] = Key::EQUAL;
scancode_map[0x16] = Key::BACKSPACE;
scancode_map[0x17] = Key::TAB;
scancode_map[0x18] = Key::Q;
scancode_map[0x19] = Key::W;
scancode_map[0x1A] = Key::E;
scancode_map[0x1B] = Key::R;
scancode_map[0x1C] = Key::T;
scancode_map[0x1D] = Key::Y;
scancode_map[0x1E] = Key::U;
scancode_map[0x1F] = Key::I;
scancode_map[0x20] = Key::O;
scancode_map[0x21] = Key::P;
scancode_map[0x22] = Key::BRACELEFT;
scancode_map[0x23] = Key::BRACERIGHT;
scancode_map[0x24] = Key::ENTER;
scancode_map[0x25] = Key::CTRL; // Left
scancode_map[0x26] = Key::A;
scancode_map[0x27] = Key::S;
scancode_map[0x28] = Key::D;
scancode_map[0x29] = Key::F;
scancode_map[0x2A] = Key::G;
scancode_map[0x2B] = Key::H;
scancode_map[0x2C] = Key::J;
scancode_map[0x2D] = Key::K;
scancode_map[0x2E] = Key::L;
scancode_map[0x2F] = Key::SEMICOLON;
scancode_map[0x30] = Key::APOSTROPHE;
scancode_map[0x31] = Key::SECTION;
scancode_map[0x32] = Key::SHIFT; // Left
scancode_map[0x33] = Key::BACKSLASH;
scancode_map[0x34] = Key::Z;
scancode_map[0x35] = Key::X;
scancode_map[0x36] = Key::C;
scancode_map[0x37] = Key::V;
scancode_map[0x38] = Key::B;
scancode_map[0x39] = Key::N;
scancode_map[0x3A] = Key::M;
scancode_map[0x3B] = Key::COMMA;
scancode_map[0x3C] = Key::PERIOD;
scancode_map[0x3D] = Key::SLASH;
scancode_map[0x3E] = Key::SHIFT; // Right
scancode_map[0x3F] = Key::KP_MULTIPLY;
scancode_map[0x40] = Key::ALT; // Left
scancode_map[0x41] = Key::SPACE;
scancode_map[0x42] = Key::CAPSLOCK;
scancode_map[0x43] = Key::F1;
scancode_map[0x44] = Key::F2;
scancode_map[0x45] = Key::F3;
scancode_map[0x46] = Key::F4;
scancode_map[0x47] = Key::F5;
scancode_map[0x48] = Key::F6;
scancode_map[0x49] = Key::F7;
scancode_map[0x4A] = Key::F8;
scancode_map[0x4B] = Key::F9;
scancode_map[0x4C] = Key::F10;
scancode_map[0x4D] = Key::NUMLOCK;
scancode_map[0x4E] = Key::SCROLLLOCK;
scancode_map[0x4F] = Key::KP_7;
scancode_map[0x50] = Key::KP_8;
scancode_map[0x51] = Key::KP_9;
scancode_map[0x52] = Key::KP_SUBTRACT;
scancode_map[0x53] = Key::KP_4;
scancode_map[0x54] = Key::KP_5;
scancode_map[0x55] = Key::KP_6;
scancode_map[0x56] = Key::KP_ADD;
scancode_map[0x57] = Key::KP_1;
scancode_map[0x58] = Key::KP_2;
scancode_map[0x59] = Key::KP_3;
scancode_map[0x5A] = Key::KP_0;
scancode_map[0x5B] = Key::KP_PERIOD;
//scancode_map[0x5C]
//scancode_map[0x5D] // Zenkaku Hankaku
scancode_map[0x5E] = Key::QUOTELEFT;
scancode_map[0x5F] = Key::F11;
scancode_map[0x60] = Key::F12;
//scancode_map[0x61] // Romaji
//scancode_map[0x62] // Katakana
//scancode_map[0x63] // Hiragana
//scancode_map[0x64] // Henkan
//scancode_map[0x65] // Hiragana Katakana
//scancode_map[0x66] // Muhenkan
scancode_map[0x67] = Key::COMMA; // KP_Separator
scancode_map[0x68] = Key::KP_ENTER;
scancode_map[0x69] = Key::CTRL; // Right
scancode_map[0x6A] = Key::KP_DIVIDE;
scancode_map[0x6B] = Key::PRINT;
scancode_map[0x6C] = Key::ALT; // Right
scancode_map[0x6D] = Key::ENTER;
scancode_map[0x6E] = Key::HOME;
scancode_map[0x6F] = Key::UP;
scancode_map[0x70] = Key::PAGEUP;
scancode_map[0x71] = Key::LEFT;
scancode_map[0x72] = Key::RIGHT;
scancode_map[0x73] = Key::END;
scancode_map[0x74] = Key::DOWN;
scancode_map[0x75] = Key::PAGEDOWN;
scancode_map[0x76] = Key::INSERT;
scancode_map[0x77] = Key::KEY_DELETE;
//scancode_map[0x78] // Macro
scancode_map[0x79] = Key::VOLUMEMUTE;
scancode_map[0x7A] = Key::VOLUMEDOWN;
scancode_map[0x7B] = Key::VOLUMEUP;
//scancode_map[0x7C] // Power
scancode_map[0x7D] = Key::EQUAL; // KP_Equal
//scancode_map[0x7E] // KP_PlusMinus
scancode_map[0x7F] = Key::PAUSE;
scancode_map[0x80] = Key::LAUNCH0;
scancode_map[0x81] = Key::COMMA; // KP_Comma
//scancode_map[0x82] // Hangul
//scancode_map[0x83] // Hangul_Hanja
scancode_map[0x84] = Key::YEN;
scancode_map[0x85] = Key::META; // Left
scancode_map[0x86] = Key::META; // Right
scancode_map[0x87] = Key::MENU;
scancode_map[0xA6] = Key::BACK; // On Chromebooks
scancode_map[0xA7] = Key::FORWARD; // On Chromebooks
scancode_map[0xB5] = Key::REFRESH; // On Chromebooks
scancode_map[0xBF] = Key::F13;
scancode_map[0xC0] = Key::F14;
scancode_map[0xC1] = Key::F15;
scancode_map[0xC2] = Key::F16;
scancode_map[0xC3] = Key::F17;
scancode_map[0xC4] = Key::F18;
scancode_map[0xC5] = Key::F19;
scancode_map[0xC6] = Key::F20;
scancode_map[0xC7] = Key::F21;
scancode_map[0xC8] = Key::F22;
scancode_map[0xC9] = Key::F23;
scancode_map[0xCA] = Key::F24;
scancode_map[0xCB] = Key::F25;
scancode_map[0xCC] = Key::F26;
scancode_map[0xCD] = Key::F27;
scancode_map[0xCE] = Key::F28;
scancode_map[0xCF] = Key::F29;
scancode_map[0xD0] = Key::F30;
scancode_map[0xD1] = Key::F31;
scancode_map[0xD2] = Key::F32;
scancode_map[0xD3] = Key::F33;
scancode_map[0xD4] = Key::F34;
scancode_map[0xD5] = Key::F35;
// Godot to scancode map.
for (const KeyValue<unsigned int, Key> &E : scancode_map) {
scancode_map_inv[E.value] = E.key;
}
// Scancode to physical location map.
// Ctrl.
location_map[0x25] = KeyLocation::LEFT;
location_map[0x69] = KeyLocation::RIGHT;
// Shift.
location_map[0x32] = KeyLocation::LEFT;
location_map[0x3E] = KeyLocation::RIGHT;
// Alt.
location_map[0x40] = KeyLocation::LEFT;
location_map[0x6C] = KeyLocation::RIGHT;
// Meta.
location_map[0x85] = KeyLocation::LEFT;
location_map[0x86] = KeyLocation::RIGHT;
}
Key KeyMappingXKB::get_keycode(xkb_keycode_t p_keysym) {
if (p_keysym >= 0x20 && p_keysym < 0x7E) { // ASCII, maps 1-1
if (p_keysym > 0x60 && p_keysym < 0x7B) { // Lowercase ASCII.
return (Key)(p_keysym - 32);
} else {
return (Key)p_keysym;
}
}
const Key *key = xkb_keycode_map.getptr(p_keysym);
if (key) {
return *key;
}
return Key::NONE;
}
Key KeyMappingXKB::get_scancode(unsigned int p_code) {
const Key *key = scancode_map.getptr(p_code);
if (key) {
return *key;
}
return Key::NONE;
}
xkb_keycode_t KeyMappingXKB::get_xkb_keycode(Key p_key) {
const unsigned int *key = scancode_map_inv.getptr(p_key);
if (key) {
return *key;
}
return 0x00;
}
KeyLocation KeyMappingXKB::get_location(unsigned int p_code) {
const KeyLocation *location = location_map.getptr(p_code);
if (location) {
return *location;
}
return KeyLocation::UNSPECIFIED;
}

View File

@@ -0,0 +1,62 @@
/**************************************************************************/
/* key_mapping_xkb.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#include "core/os/keyboard.h"
#include "core/templates/hash_map.h"
#ifdef SOWRAP_ENABLED
#include "xkbcommon-so_wrap.h"
#else
#include <xkbcommon/xkbcommon.h>
#endif // SOWRAP_ENABLED
class KeyMappingXKB {
struct HashMapHasherKeys {
static _FORCE_INLINE_ uint32_t hash(Key p_key) { return hash_fmix32(static_cast<uint32_t>(p_key)); }
static _FORCE_INLINE_ uint32_t hash(unsigned p_key) { return hash_fmix32(p_key); }
};
static inline HashMap<xkb_keycode_t, Key, HashMapHasherKeys> xkb_keycode_map;
static inline HashMap<unsigned int, Key, HashMapHasherKeys> scancode_map;
static inline HashMap<Key, unsigned int, HashMapHasherKeys> scancode_map_inv;
static inline HashMap<unsigned int, KeyLocation, HashMapHasherKeys> location_map;
KeyMappingXKB() {}
public:
static void initialize();
static Key get_keycode(xkb_keysym_t p_keysym);
static xkb_keycode_t get_xkb_keycode(Key p_keycode);
static Key get_scancode(unsigned int p_code);
static KeyLocation get_location(unsigned int p_code);
};

View File

@@ -0,0 +1,66 @@
/**************************************************************************/
/* rendering_context_driver_vulkan_wayland.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifdef VULKAN_ENABLED
#include "rendering_context_driver_vulkan_wayland.h"
#include "drivers/vulkan/godot_vulkan.h"
const char *RenderingContextDriverVulkanWayland::_get_platform_surface_extension() const {
return VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME;
}
RenderingContextDriver::SurfaceID RenderingContextDriverVulkanWayland::surface_create(const void *p_platform_data) {
const WindowPlatformData *wpd = (const WindowPlatformData *)(p_platform_data);
VkWaylandSurfaceCreateInfoKHR create_info = {};
create_info.sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR;
create_info.display = wpd->display;
create_info.surface = wpd->surface;
VkSurfaceKHR vk_surface = VK_NULL_HANDLE;
VkResult err = vkCreateWaylandSurfaceKHR(instance_get(), &create_info, get_allocation_callbacks(VK_OBJECT_TYPE_SURFACE_KHR), &vk_surface);
ERR_FAIL_COND_V(err != VK_SUCCESS, SurfaceID());
Surface *surface = memnew(Surface);
surface->vk_surface = vk_surface;
return SurfaceID(surface);
}
RenderingContextDriverVulkanWayland::RenderingContextDriverVulkanWayland() {
// Does nothing.
}
RenderingContextDriverVulkanWayland::~RenderingContextDriverVulkanWayland() {
// Does nothing.
}
#endif // VULKAN_ENABLED

View File

@@ -0,0 +1,54 @@
/**************************************************************************/
/* rendering_context_driver_vulkan_wayland.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef VULKAN_ENABLED
#include "drivers/vulkan/rendering_context_driver_vulkan.h"
class RenderingContextDriverVulkanWayland : public RenderingContextDriverVulkan {
private:
virtual const char *_get_platform_surface_extension() const override final;
protected:
SurfaceID surface_create(const void *p_platform_data) override final;
public:
struct WindowPlatformData {
struct wl_display *display;
struct wl_surface *surface;
};
RenderingContextDriverVulkanWayland();
~RenderingContextDriverVulkanWayland();
};
#endif // VULKAN_ENABLED

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env python
from misc.utility.scons_hints import *
Import("env")
source_files = [
"display_server_x11.cpp",
"key_mapping_x11.cpp",
]
if env["use_sowrap"]:
source_files.append(
[
"dynwrappers/xlib-so_wrap.c",
"dynwrappers/xcursor-so_wrap.c",
"dynwrappers/xinerama-so_wrap.c",
"dynwrappers/xinput2-so_wrap.c",
"dynwrappers/xrandr-so_wrap.c",
"dynwrappers/xrender-so_wrap.c",
"dynwrappers/xext-so_wrap.c",
]
)
if env["vulkan"]:
source_files.append("rendering_context_driver_vulkan_x11.cpp")
if env["opengl3"]:
env.Append(CPPDEFINES=["GLAD_GLX_NO_X11"])
source_files.append(
["gl_manager_x11_egl.cpp", "gl_manager_x11.cpp", "detect_prime_x11.cpp", "#thirdparty/glad/glx.c"]
)
objects = []
for source_file in source_files:
objects.append(env.Object(source_file))
Return("objects")

View File

@@ -0,0 +1,262 @@
/**************************************************************************/
/* detect_prime_x11.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
#include "detect_prime_x11.h"
#include "core/string/print_string.h"
#include "core/string/ustring.h"
#include "thirdparty/glad/glad/gl.h"
#include "thirdparty/glad/glad/glx.h"
#ifdef SOWRAP_ENABLED
#include "x11/dynwrappers/xlib-so_wrap.h"
#else
#include <X11/XKBlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#endif
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cstdlib>
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
// To prevent shadowing warnings
#undef glGetString
int silent_error_handler(Display *display, XErrorEvent *error) {
static char message[1024];
XGetErrorText(display, error->error_code, message, sizeof(message));
print_verbose(vformat("XServer error: %s"
"\n Major opcode of failed request: %d"
"\n Serial number of failed request: %d"
"\n Current serial number in output stream: %d",
String::utf8(message), (uint64_t)error->request_code, (uint64_t)error->minor_code, (uint64_t)error->serial));
quick_exit(1);
return 0;
}
// Runs inside a child. Exiting will not quit the engine.
void DetectPrimeX11::create_context() {
XSetErrorHandler(&silent_error_handler);
Display *x11_display = XOpenDisplay(nullptr);
Window x11_window;
GLXContext glx_context;
static int visual_attribs[] = {
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_DOUBLEBUFFER, true,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DEPTH_SIZE, 24,
None
};
if (gladLoaderLoadGLX(x11_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(x11_display))) == 0) {
print_verbose("Unable to load GLX, GPU detection skipped.");
quick_exit(1);
}
int fbcount;
GLXFBConfig fbconfig = nullptr;
XVisualInfo *vi = nullptr;
XSetWindowAttributes swa;
swa.event_mask = StructureNotifyMask;
swa.border_pixel = 0;
unsigned long valuemask = CWBorderPixel | CWColormap | CWEventMask;
GLXFBConfig *fbc = glXChooseFBConfig(x11_display, DefaultScreen(x11_display), visual_attribs, &fbcount);
if (!fbc) {
quick_exit(1);
}
vi = glXGetVisualFromFBConfig(x11_display, fbc[0]);
fbconfig = fbc[0];
static int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 3,
GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
None
};
glx_context = glXCreateContextAttribsARB(x11_display, fbconfig, nullptr, true, context_attribs);
swa.colormap = XCreateColormap(x11_display, RootWindow(x11_display, vi->screen), vi->visual, AllocNone);
x11_window = XCreateWindow(x11_display, RootWindow(x11_display, vi->screen), 0, 0, 10, 10, 0, vi->depth, InputOutput, vi->visual, valuemask, &swa);
if (!x11_window) {
quick_exit(1);
}
glXMakeCurrent(x11_display, x11_window, glx_context);
XFree(vi);
}
int DetectPrimeX11::detect_prime() {
pid_t p;
int priorities[2] = {};
String vendors[2];
String renderers[2];
vendors[0] = "Unknown";
vendors[1] = "Unknown";
renderers[0] = "Unknown";
renderers[1] = "Unknown";
for (int i = 0; i < 2; ++i) {
int fdset[2];
if (pipe(fdset) == -1) {
print_verbose("Failed to pipe(), using default GPU");
return 0;
}
// Fork so the driver initialization can crash without taking down the engine.
p = fork();
if (p > 0) {
// Main thread
int stat_loc = 0;
char string[201];
string[200] = '\0';
close(fdset[1]);
waitpid(p, &stat_loc, 0);
if (!stat_loc) {
// No need to do anything complicated here. Anything less than
// PIPE_BUF will be delivered in one read() call.
// Leave it 'Unknown' otherwise.
if (read(fdset[0], string, sizeof(string) - 1) > 0) {
vendors[i] = string;
renderers[i] = string + strlen(string) + 1;
}
}
close(fdset[0]);
} else {
// In child, exit() here will not quit the engine.
// Prevent false leak reports as we will not be properly
// cleaning up these processes, and fork() makes a copy
// of all globals.
CoreGlobals::leak_reporting_enabled = false;
char string[201];
close(fdset[0]);
if (i) {
setenv("DRI_PRIME", "1", 1);
}
create_context();
PFNGLGETSTRINGPROC glGetString = (PFNGLGETSTRINGPROC)glXGetProcAddressARB((GLubyte *)"glGetString");
if (!glGetString) {
print_verbose("Unable to get glGetString, GPU detection skipped.");
quick_exit(1);
}
const char *vendor = (const char *)glGetString(GL_VENDOR);
const char *renderer = (const char *)glGetString(GL_RENDERER);
unsigned int vendor_len = strlen(vendor) + 1;
unsigned int renderer_len = strlen(renderer) + 1;
if (vendor_len + renderer_len >= sizeof(string)) {
renderer_len = 200 - vendor_len;
}
memcpy(&string, vendor, vendor_len);
memcpy(&string[vendor_len], renderer, renderer_len);
if (write(fdset[1], string, vendor_len + renderer_len) == -1) {
print_verbose("Couldn't write vendor/renderer string.");
}
close(fdset[1]);
// The function quick_exit() is used because exit() will call destructors on static objects copied by fork().
// These objects will be freed anyway when the process finishes execution.
quick_exit(0);
}
}
int preferred = 0;
int priority = 0;
if (vendors[0] == vendors[1]) {
print_verbose("Only one GPU found, using default.");
return 0;
}
for (int i = 1; i >= 0; --i) {
const Vendor *v = vendor_map;
while (v->glxvendor) {
if (v->glxvendor == vendors[i]) {
priorities[i] = v->priority;
if (v->priority >= priority) {
priority = v->priority;
preferred = i;
}
}
++v;
}
}
print_verbose("Found renderers:");
for (int i = 0; i < 2; ++i) {
print_verbose("Renderer " + itos(i) + ": " + renderers[i] + " with priority: " + itos(priorities[i]));
}
print_verbose("Using renderer: " + renderers[preferred]);
return preferred;
}
#endif // X11_ENABLED && GLES3_ENABLED

View File

@@ -0,0 +1,60 @@
/**************************************************************************/
/* detect_prime_x11.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
class DetectPrimeX11 {
private:
struct Vendor {
const char *glxvendor = nullptr;
int priority = 0;
};
static constexpr Vendor vendor_map[] = {
{ "Advanced Micro Devices, Inc.", 30 },
{ "AMD", 30 },
{ "NVIDIA Corporation", 30 },
{ "X.Org", 30 },
{ "Intel Open Source Technology Center", 20 },
{ "Intel", 20 },
{ "nouveau", 10 },
{ "Mesa Project", 0 },
{ nullptr, 0 }
};
public:
static void create_context();
static int detect_prime();
};
#endif // X11_ENABLED && GLES3_ENABLED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,593 @@
/**************************************************************************/
/* display_server_x11.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef X11_ENABLED
#include "core/input/input.h"
#include "core/os/mutex.h"
#include "core/os/thread.h"
#include "core/templates/local_vector.h"
#include "drivers/alsa/audio_driver_alsa.h"
#include "drivers/alsamidi/midi_driver_alsamidi.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
#include "drivers/unix/os_unix.h"
#include "servers/audio_server.h"
#include "servers/display_server.h"
#include "servers/rendering/renderer_compositor.h"
#include "servers/rendering_server.h"
#if defined(SPEECHD_ENABLED)
#include "tts_linux.h"
#endif
#if defined(GLES3_ENABLED)
#include "x11/gl_manager_x11.h"
#include "x11/gl_manager_x11_egl.h"
#endif
#if defined(RD_ENABLED)
#include "servers/rendering/rendering_device.h"
#if defined(VULKAN_ENABLED)
#include "x11/rendering_context_driver_vulkan_x11.h"
#endif
#endif
#if defined(DBUS_ENABLED)
#include "freedesktop_at_spi_monitor.h"
#include "freedesktop_portal_desktop.h"
#include "freedesktop_screensaver.h"
#endif
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#ifdef SOWRAP_ENABLED
#include "x11/dynwrappers/xlib-so_wrap.h"
#include "x11/dynwrappers/xcursor-so_wrap.h"
#include "x11/dynwrappers/xext-so_wrap.h"
#include "x11/dynwrappers/xinerama-so_wrap.h"
#include "x11/dynwrappers/xinput2-so_wrap.h"
#include "x11/dynwrappers/xrandr-so_wrap.h"
#include "x11/dynwrappers/xrender-so_wrap.h"
#include "xkbcommon-so_wrap.h"
#else
#include <X11/XKBlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xcursor/Xcursor.h>
#include <X11/extensions/XInput2.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/Xinerama.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xrender.h>
#include <X11/extensions/shape.h>
#ifdef XKB_ENABLED
#include <xkbcommon/xkbcommon-compose.h>
#include <xkbcommon/xkbcommon-keysyms.h>
#include <xkbcommon/xkbcommon.h>
#endif
#endif
typedef struct _xrr_monitor_info {
Atom name;
Bool primary = false;
Bool automatic = false;
int noutput = 0;
int x = 0;
int y = 0;
int width = 0;
int height = 0;
int mwidth = 0;
int mheight = 0;
RROutput *outputs = nullptr;
} xrr_monitor_info;
#undef CursorShape
class DisplayServerX11 : public DisplayServer {
GDSOFTCLASS(DisplayServerX11, DisplayServer);
_THREAD_SAFE_CLASS_
Atom wm_delete;
Atom xdnd_enter;
Atom xdnd_position;
Atom xdnd_status;
Atom xdnd_action_copy;
Atom xdnd_drop;
Atom xdnd_finished;
Atom xdnd_selection;
Atom xdnd_aware;
Atom requested = None;
int xdnd_version = 5;
#if defined(GLES3_ENABLED)
GLManager_X11 *gl_manager = nullptr;
GLManagerEGL_X11 *gl_manager_egl = nullptr;
#endif
#if defined(RD_ENABLED)
RenderingContextDriver *rendering_context = nullptr;
RenderingDevice *rendering_device = nullptr;
#endif
#if defined(DBUS_ENABLED)
FreeDesktopScreenSaver *screensaver = nullptr;
bool keep_screen_on = false;
#endif
#ifdef SPEECHD_ENABLED
TTS_Linux *tts = nullptr;
#endif
NativeMenu *native_menu = nullptr;
#if defined(DBUS_ENABLED)
FreeDesktopPortalDesktop *portal_desktop = nullptr;
FreeDesktopAtSPIMonitor *atspi_monitor = nullptr;
#endif
struct WindowData {
Window x11_window;
Window x11_xim_window;
Window parent;
::XIC xic;
bool ime_active = false;
bool ime_in_progress = false;
bool ime_suppress_next_keyup = false;
#ifdef XKB_ENABLED
xkb_compose_state *xkb_state = nullptr;
#endif
Size2i min_size;
Size2i max_size;
Point2i position;
Size2i size;
Callable rect_changed_callback;
Callable event_callback;
Callable input_event_callback;
Callable input_text_callback;
Callable drop_files_callback;
Vector<Vector2> mpath;
WindowID transient_parent = INVALID_WINDOW_ID;
HashSet<WindowID> transient_children;
ObjectID instance_id;
bool no_focus = false;
//better to guess on the fly, given WM can change it
//WindowMode mode;
bool fullscreen = false; //OS can't exit from this mode
bool exclusive_fullscreen = false;
bool on_top = false;
bool borderless = false;
bool resize_disabled = false;
bool no_min_btn = false;
bool no_max_btn = false;
Vector2i last_position_before_fs;
bool focused = true;
bool minimized = false;
bool maximized = false;
bool is_popup = false;
bool layered_window = false;
bool mpass = false;
Window embed_parent = 0;
Rect2i parent_safe_rect;
unsigned int focus_order = 0;
};
Point2i im_selection;
String im_text;
#ifdef XKB_ENABLED
bool xkb_loaded_v05p = false;
bool xkb_loaded_v08p = false;
xkb_context *xkb_ctx = nullptr;
xkb_compose_table *dead_tbl = nullptr;
#endif
HashMap<WindowID, WindowData> windows;
unsigned int last_mouse_monitor_mask = 0;
uint64_t time_since_popup = 0;
List<WindowID> popup_list;
WindowID window_mouseover_id = INVALID_WINDOW_ID;
WindowID last_focused_window = INVALID_WINDOW_ID;
WindowID window_id_counter = MAIN_WINDOW_ID;
WindowID _create_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect, Window p_parent_window);
String internal_clipboard;
String internal_clipboard_primary;
Window xdnd_source_window = 0;
::Display *x11_display;
char *xmbstring = nullptr;
int xmblen = 0;
unsigned long last_timestamp = 0;
::Time last_keyrelease_time = 0;
::XIM xim;
::XIMStyle xim_style;
static int _xim_preedit_start_callback(::XIM xim, ::XPointer client_data,
::XPointer call_data);
static void _xim_preedit_done_callback(::XIM xim, ::XPointer client_data,
::XPointer call_data);
static void _xim_preedit_draw_callback(::XIM xim, ::XPointer client_data,
::XIMPreeditDrawCallbackStruct *call_data);
static void _xim_preedit_caret_callback(::XIM xim, ::XPointer client_data,
::XIMPreeditCaretCallbackStruct *call_data);
static void _xim_destroy_callback(::XIM im, ::XPointer client_data,
::XPointer call_data);
Point2i last_mouse_pos;
bool last_mouse_pos_valid = false;
Point2i last_click_pos = Point2i(-100, -100);
uint64_t last_click_ms = 0;
MouseButton last_click_button_index = MouseButton::NONE;
bool app_focused = false;
uint64_t time_since_no_focus = 0;
struct {
int opcode;
Vector<int> touch_devices;
HashMap<int, Vector2> absolute_devices;
HashMap<int, Vector2> pen_pressure_range;
HashMap<int, Vector2> pen_tilt_x_range;
HashMap<int, Vector2> pen_tilt_y_range;
HashMap<int, bool> pen_inverted_devices;
XIEventMask all_event_mask;
HashMap<int, Vector2> state;
double pressure;
bool pressure_supported;
bool pen_inverted;
Vector2 tilt;
Vector2 mouse_pos_to_filter;
Vector2 relative_motion;
Vector2 raw_pos;
Vector2 old_raw_pos;
::Time last_relative_time;
} xi;
bool _refresh_device_info();
Rect2i _screen_get_rect(int p_screen) const;
void _get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state);
void _flush_mouse_motion();
MouseMode mouse_mode = MOUSE_MODE_VISIBLE;
MouseMode mouse_mode_base = MOUSE_MODE_VISIBLE;
MouseMode mouse_mode_override = MOUSE_MODE_VISIBLE;
bool mouse_mode_override_enabled = false;
void _mouse_update_mode();
Point2i center;
void _handle_key_event(WindowID p_window, XKeyEvent *p_event, LocalVector<XEvent> &p_events, uint32_t &p_event_index, bool p_echo = false);
Atom _process_selection_request_target(Atom p_target, Window p_requestor, Atom p_property, Atom p_selection) const;
void _handle_selection_request_event(XSelectionRequestEvent *p_event) const;
void _update_window_mouse_passthrough(WindowID p_window);
String _clipboard_get_impl(Atom p_source, Window x11_window, Atom target) const;
String _clipboard_get(Atom p_source, Window x11_window) const;
Atom _clipboard_get_image_target(Atom p_source, Window x11_window) const;
void _clipboard_transfer_ownership(Atom p_source, Window x11_window) const;
bool do_mouse_warp = false;
const char *cursor_theme = nullptr;
int cursor_size = 0;
XcursorImage *cursor_img[CURSOR_MAX];
Cursor cursors[CURSOR_MAX];
Cursor null_cursor;
CursorShape current_cursor = CURSOR_ARROW;
HashMap<CursorShape, Vector<Variant>> cursors_cache;
String rendering_driver;
void set_wm_fullscreen(bool p_enabled);
void set_wm_above(bool p_enabled);
typedef xrr_monitor_info *(*xrr_get_monitors_t)(Display *dpy, Window window, Bool get_active, int *nmonitors);
typedef void (*xrr_free_monitors_t)(xrr_monitor_info *monitors);
xrr_get_monitors_t xrr_get_monitors = nullptr;
xrr_free_monitors_t xrr_free_monitors = nullptr;
void *xrandr_handle = nullptr;
bool xrandr_ext_ok = true;
bool xinerama_ext_ok = true;
bool xshaped_ext_ok = true;
bool xwayland = false;
bool kde5_embed_workaround = false; // Workaround embedded game visibility on KDE 5 (GH-102043).
struct Property {
unsigned char *data;
int format, nitems;
Atom type;
};
static Property _read_property(Display *p_display, Window p_window, Atom p_property);
void _update_real_mouse_position(const WindowData &wd);
bool _window_maximize_check(WindowID p_window, const char *p_atom_name) const;
bool _window_fullscreen_check(WindowID p_window) const;
bool _window_minimize_check(WindowID p_window) const;
void _validate_mode_on_map(WindowID p_window);
void _update_size_hints(WindowID p_window);
void _update_actions_hints(WindowID p_window);
void _set_wm_fullscreen(WindowID p_window, bool p_enabled, bool p_exclusive);
void _set_wm_maximized(WindowID p_window, bool p_enabled);
void _set_wm_minimized(WindowID p_window, bool p_enabled);
void _update_context(WindowData &wd);
Context context = CONTEXT_ENGINE;
bool swap_cancel_ok = false;
WindowID _get_focused_window_or_popup() const;
bool _window_focus_check();
void _send_window_event(const WindowData &wd, WindowEvent p_event);
static void _dispatch_input_events(const Ref<InputEvent> &p_event);
void _dispatch_input_event(const Ref<InputEvent> &p_event);
void _set_input_focus(Window p_window, int p_revert_to);
mutable Mutex events_mutex;
Thread events_thread;
SafeFlag events_thread_done;
LocalVector<XEvent> polled_events;
static void _poll_events_thread(void *ud);
bool _wait_for_events() const;
void _poll_events();
void _check_pending_events(LocalVector<XEvent> &r_events);
static Bool _predicate_all_events(Display *display, XEvent *event, XPointer arg);
static Bool _predicate_clipboard_selection(Display *display, XEvent *event, XPointer arg);
static Bool _predicate_clipboard_incr(Display *display, XEvent *event, XPointer arg);
static Bool _predicate_clipboard_save_targets(Display *display, XEvent *event, XPointer arg);
struct EmbeddedProcessData {
Window process_window = 0;
bool visible = true;
};
HashMap<OS::ProcessID, EmbeddedProcessData *> embedded_processes;
Point2i _get_window_position(Window p_window) const;
Rect2i _get_window_rect(Window p_window) const;
void _set_external_window_settings(Window p_window, Window p_parent_transient, WindowMode p_mode, uint32_t p_flags, const Rect2i &p_rect);
void _set_window_taskbar_pager_enabled(Window p_window, bool p_enabled);
Rect2i _screens_get_full_rect() const;
void initialize_tts() const;
protected:
void _window_changed(XEvent *event);
public:
bool mouse_process_popups();
void popup_open(WindowID p_window);
void popup_close(WindowID p_window);
virtual bool has_feature(Feature p_feature) const override;
virtual String get_name() const override;
#ifdef SPEECHD_ENABLED
virtual bool tts_is_speaking() const override;
virtual bool tts_is_paused() const override;
virtual TypedArray<Dictionary> tts_get_voices() const override;
virtual void tts_speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.f, float p_rate = 1.f, int p_utterance_id = 0, bool p_interrupt = false) override;
virtual void tts_pause() override;
virtual void tts_resume() override;
virtual void tts_stop() override;
#endif
#if defined(DBUS_ENABLED)
virtual bool is_dark_mode_supported() const override;
virtual bool is_dark_mode() const override;
virtual Color get_accent_color() const override;
virtual void set_system_theme_change_callback(const Callable &p_callable) override;
virtual Error file_dialog_show(const String &p_title, const String &p_current_directory, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const Callable &p_callback, WindowID p_window_id) override;
virtual Error file_dialog_with_options_show(const String &p_title, const String &p_current_directory, const String &p_root, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const TypedArray<Dictionary> &p_options, const Callable &p_callback, WindowID p_window_id) override;
#endif
virtual void beep() const override;
virtual void mouse_set_mode(MouseMode p_mode) override;
virtual MouseMode mouse_get_mode() const override;
virtual void mouse_set_mode_override(MouseMode p_mode) override;
virtual MouseMode mouse_get_mode_override() const override;
virtual void mouse_set_mode_override_enabled(bool p_override_enabled) override;
virtual bool mouse_is_mode_override_enabled() const override;
virtual void warp_mouse(const Point2i &p_position) override;
virtual Point2i mouse_get_position() const override;
virtual BitField<MouseButtonMask> mouse_get_button_state() const override;
virtual void clipboard_set(const String &p_text) override;
virtual String clipboard_get() const override;
virtual Ref<Image> clipboard_get_image() const override;
virtual bool clipboard_has_image() const override;
virtual void clipboard_set_primary(const String &p_text) override;
virtual String clipboard_get_primary() const override;
virtual int get_screen_count() const override;
virtual int get_primary_screen() const override;
virtual int get_keyboard_focus_screen() const override;
virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual Color screen_get_pixel(const Point2i &p_position) const override;
virtual Ref<Image> screen_get_image(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
#if defined(DBUS_ENABLED)
virtual void screen_set_keep_on(bool p_enable) override;
virtual bool screen_is_kept_on() const override;
#endif
virtual Vector<DisplayServer::WindowID> get_window_list() const override;
virtual WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i(), bool p_exclusive = false, WindowID p_transient_parent = INVALID_WINDOW_ID) override;
virtual void show_window(WindowID p_id) override;
virtual void delete_sub_window(WindowID p_id) override;
virtual WindowID window_get_active_popup() const override;
virtual void window_set_popup_safe_rect(WindowID p_window, const Rect2i &p_rect) override;
virtual Rect2i window_get_popup_safe_rect(WindowID p_window) const override;
virtual WindowID get_window_at_screen_position(const Point2i &p_position) const override;
virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) override;
virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_set_window_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_set_input_event_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_set_input_text_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_set_drop_files_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override;
virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID) override;
virtual Point2i window_get_position(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual Point2i window_get_position_with_decorations(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_set_position(const Point2i &p_position, WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_set_max_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
virtual Size2i window_get_max_size(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void gl_window_make_current(DisplayServer::WindowID p_window_id) override;
virtual void window_set_transient(WindowID p_window, WindowID p_parent) override;
virtual void window_set_min_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
virtual Size2i window_get_min_size(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_set_size(const Size2i p_size, WindowID p_window = MAIN_WINDOW_ID) override;
virtual Size2i window_get_size(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual Size2i window_get_size_with_decorations(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_set_mode(WindowMode p_mode, WindowID p_window = MAIN_WINDOW_ID) override;
virtual WindowMode window_get_mode(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual bool window_is_maximize_allowed(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window = MAIN_WINDOW_ID) override;
virtual bool window_get_flag(WindowFlags p_flag, WindowID p_window = MAIN_WINDOW_ID) const override;
virtual void window_request_attention(WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_move_to_foreground(WindowID p_window = MAIN_WINDOW_ID) override;
virtual bool window_is_focused(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual WindowID get_focused_window() const override;
virtual bool window_can_draw(WindowID p_window = MAIN_WINDOW_ID) const override;
virtual bool can_any_window_draw() const override;
virtual void window_set_ime_active(const bool p_active, WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_set_ime_position(const Point2i &p_pos, WindowID p_window = MAIN_WINDOW_ID) override;
virtual int accessibility_should_increase_contrast() const override;
virtual int accessibility_screen_reader_active() const override;
virtual Point2i ime_get_selection() const override;
virtual String ime_get_text() const override;
virtual void window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window = MAIN_WINDOW_ID) override;
virtual DisplayServer::VSyncMode window_get_vsync_mode(WindowID p_vsync_mode) const override;
virtual void window_start_drag(WindowID p_window = MAIN_WINDOW_ID) override;
virtual void window_start_resize(WindowResizeEdge p_edge, WindowID p_window) override;
virtual Error embed_process(WindowID p_window, OS::ProcessID p_pid, const Rect2i &p_rect, bool p_visible, bool p_grab_focus) override;
virtual Error request_close_embedded_process(OS::ProcessID p_pid) override;
virtual Error remove_embedded_process(OS::ProcessID p_pid) override;
virtual OS::ProcessID get_focused_process_id() override;
virtual void cursor_set_shape(CursorShape p_shape) override;
virtual CursorShape cursor_get_shape() const override;
virtual void cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) override;
virtual bool get_swap_cancel_ok() override;
virtual int keyboard_get_layout_count() const override;
virtual int keyboard_get_current_layout() const override;
virtual void keyboard_set_current_layout(int p_index) override;
virtual String keyboard_get_layout_language(int p_index) const override;
virtual String keyboard_get_layout_name(int p_index) const override;
virtual Key keyboard_get_keycode_from_physical(Key p_keycode) const override;
virtual Key keyboard_get_label_from_physical(Key p_keycode) const override;
virtual bool color_picker(const Callable &p_callback) override;
virtual void process_events() override;
virtual void release_rendering_thread() override;
virtual void swap_buffers() override;
virtual void set_context(Context p_context) override;
virtual bool is_window_transparency_available() const override;
virtual void set_native_icon(const String &p_filename) override;
virtual void set_icon(const Ref<Image> &p_icon) override;
static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Context p_context, int64_t p_parent_window, Error &r_error);
static Vector<String> get_rendering_drivers_func();
static void register_x11_driver();
DisplayServerX11(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Context p_context, int64_t p_parent_window, Error &r_error);
~DisplayServerX11();
};
#endif // X11_ENABLED

View File

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

View File

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

View File

@@ -0,0 +1,146 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:50:47
// flags: generate-wrapper.py --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xext.h --include ./thirdparty/linuxbsd_headers/X11/extensions/shape.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/shape.h --soname libXext.so.6 --init-name xext --output-header ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c --ignore-other --implementation-header thirdparty/linuxbsd_headers/X11/Xlib.h
//
#include <stdint.h>
#include "thirdparty/linuxbsd_headers/X11/Xlib.h"
#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
#include "thirdparty/linuxbsd_headers/X11/extensions/Xext.h"
#include "thirdparty/linuxbsd_headers/X11/extensions/shape.h"
#undef XShapeQueryExtension
#undef XShapeQueryVersion
#undef XShapeCombineRegion
#undef XShapeCombineRectangles
#undef XShapeCombineMask
#undef XShapeCombineShape
#undef XShapeOffsetShape
#undef XShapeQueryExtents
#undef XShapeSelectInput
#undef XShapeInputSelected
#undef XShapeGetRectangles
#include <dlfcn.h>
#include <stdio.h>
int (*XShapeQueryExtension_dylibloader_wrapper_xext)(Display *, int *, int *);
int (*XShapeQueryVersion_dylibloader_wrapper_xext)(Display *, int *, int *);
void (*XShapeCombineRegion_dylibloader_wrapper_xext)(Display *, Window, int, int, int, Region, int);
void (*XShapeCombineRectangles_dylibloader_wrapper_xext)(Display *, Window, int, int, int, XRectangle *, int, int, int);
void (*XShapeCombineMask_dylibloader_wrapper_xext)(Display *, Window, int, int, int, Pixmap, int);
void (*XShapeCombineShape_dylibloader_wrapper_xext)(Display *, Window, int, int, int, Window, int, int);
void (*XShapeOffsetShape_dylibloader_wrapper_xext)(Display *, Window, int, int, int);
int (*XShapeQueryExtents_dylibloader_wrapper_xext)(Display *, Window, int *, int *, int *, unsigned int *, unsigned int *, int *, int *, int *, unsigned int *, unsigned int *);
void (*XShapeSelectInput_dylibloader_wrapper_xext)(Display *, Window, unsigned long);
unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)(Display *, Window);
XRectangle *(*XShapeGetRectangles_dylibloader_wrapper_xext)(Display *, Window, int, int *, int *);
int initialize_xext(int verbose) {
void *handle;
char *error;
handle = dlopen("libXext.so.6", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XShapeQueryExtension
*(void **) (&XShapeQueryExtension_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtension");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeQueryVersion
*(void **) (&XShapeQueryVersion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryVersion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeCombineRegion
*(void **) (&XShapeCombineRegion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRegion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeCombineRectangles
*(void **) (&XShapeCombineRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRectangles");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeCombineMask
*(void **) (&XShapeCombineMask_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineMask");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeCombineShape
*(void **) (&XShapeCombineShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineShape");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeOffsetShape
*(void **) (&XShapeOffsetShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeOffsetShape");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeQueryExtents
*(void **) (&XShapeQueryExtents_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeSelectInput
*(void **) (&XShapeSelectInput_dylibloader_wrapper_xext) = dlsym(handle, "XShapeSelectInput");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeInputSelected
*(void **) (&XShapeInputSelected_dylibloader_wrapper_xext) = dlsym(handle, "XShapeInputSelected");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XShapeGetRectangles
*(void **) (&XShapeGetRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeGetRectangles");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@@ -0,0 +1,63 @@
#ifndef DYLIBLOAD_WRAPPER_XEXT
#define DYLIBLOAD_WRAPPER_XEXT
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:50:47
// flags: generate-wrapper.py --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xext.h --include ./thirdparty/linuxbsd_headers/X11/extensions/shape.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/shape.h --soname libXext.so.6 --init-name xext --output-header ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c --ignore-other --implementation-header thirdparty/linuxbsd_headers/X11/Xlib.h
//
#include <stdint.h>
#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
#include "thirdparty/linuxbsd_headers/X11/extensions/Xext.h"
#include "thirdparty/linuxbsd_headers/X11/extensions/shape.h"
#undef XShapeQueryExtension
#undef XShapeQueryVersion
#undef XShapeCombineRegion
#undef XShapeCombineRectangles
#undef XShapeCombineMask
#undef XShapeCombineShape
#undef XShapeOffsetShape
#undef XShapeQueryExtents
#undef XShapeSelectInput
#undef XShapeInputSelected
#undef XShapeGetRectangles
#ifdef __cplusplus
extern "C" {
#endif
#define XShapeQueryExtension XShapeQueryExtension_dylibloader_wrapper_xext
#define XShapeQueryVersion XShapeQueryVersion_dylibloader_wrapper_xext
#define XShapeCombineRegion XShapeCombineRegion_dylibloader_wrapper_xext
#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_wrapper_xext
#define XShapeCombineMask XShapeCombineMask_dylibloader_wrapper_xext
#define XShapeCombineShape XShapeCombineShape_dylibloader_wrapper_xext
#define XShapeOffsetShape XShapeOffsetShape_dylibloader_wrapper_xext
#define XShapeQueryExtents XShapeQueryExtents_dylibloader_wrapper_xext
#define XShapeSelectInput XShapeSelectInput_dylibloader_wrapper_xext
#define XShapeInputSelected XShapeInputSelected_dylibloader_wrapper_xext
#define XShapeGetRectangles XShapeGetRectangles_dylibloader_wrapper_xext
extern int (*XShapeQueryExtension_dylibloader_wrapper_xext)(Display *, int *, int *);
extern int (*XShapeQueryVersion_dylibloader_wrapper_xext)(Display *, int *, int *);
extern void (*XShapeCombineRegion_dylibloader_wrapper_xext)(Display *, Window, int, int, int, Region, int);
extern void (*XShapeCombineRectangles_dylibloader_wrapper_xext)(Display *, Window, int, int, int, XRectangle *, int, int, int);
extern void (*XShapeCombineMask_dylibloader_wrapper_xext)(Display *, Window, int, int, int, Pixmap, int);
extern void (*XShapeCombineShape_dylibloader_wrapper_xext)(Display *, Window, int, int, int, Window, int, int);
extern void (*XShapeOffsetShape_dylibloader_wrapper_xext)(Display *, Window, int, int, int);
extern int (*XShapeQueryExtents_dylibloader_wrapper_xext)(Display *, Window, int *, int *, int *, unsigned int *, unsigned int *, int *, int *, int *, unsigned int *, unsigned int *);
extern void (*XShapeSelectInput_dylibloader_wrapper_xext)(Display *, Window, unsigned long);
extern unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)(Display *, Window);
extern XRectangle *(*XShapeGetRectangles_dylibloader_wrapper_xext)(Display *, Window, int, int *, int *);
int initialize_xext(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,67 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:51:18
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --soname libXinerama.so.1 --init-name xinerama --output-header ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c --ignore-other
//
#include <stdint.h>
#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
#include "thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h"
#undef XineramaQueryExtension
#undef XineramaQueryVersion
#undef XineramaIsActive
#undef XineramaQueryScreens
#include <dlfcn.h>
#include <stdio.h>
int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)(Display *, int *, int *);
int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)(Display *, int *, int *);
int (*XineramaIsActive_dylibloader_wrapper_xinerama)(Display *);
XineramaScreenInfo *(*XineramaQueryScreens_dylibloader_wrapper_xinerama)(Display *, int *);
int initialize_xinerama(int verbose) {
void *handle;
char *error;
handle = dlopen("libXinerama.so.1", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XineramaQueryExtension
*(void **) (&XineramaQueryExtension_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryExtension");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XineramaQueryVersion
*(void **) (&XineramaQueryVersion_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryVersion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XineramaIsActive
*(void **) (&XineramaIsActive_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaIsActive");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XineramaQueryScreens
*(void **) (&XineramaQueryScreens_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryScreens");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@@ -0,0 +1,34 @@
#ifndef DYLIBLOAD_WRAPPER_XINERAMA
#define DYLIBLOAD_WRAPPER_XINERAMA
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:51:18
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --soname libXinerama.so.1 --init-name xinerama --output-header ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c --ignore-other
//
#include <stdint.h>
#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
#include "thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h"
#undef XineramaQueryExtension
#undef XineramaQueryVersion
#undef XineramaIsActive
#undef XineramaQueryScreens
#ifdef __cplusplus
extern "C" {
#endif
#define XineramaQueryExtension XineramaQueryExtension_dylibloader_wrapper_xinerama
#define XineramaQueryVersion XineramaQueryVersion_dylibloader_wrapper_xinerama
#define XineramaIsActive XineramaIsActive_dylibloader_wrapper_xinerama
#define XineramaQueryScreens XineramaQueryScreens_dylibloader_wrapper_xinerama
extern int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)(Display *, int *, int *);
extern int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)(Display *, int *, int *);
extern int (*XineramaIsActive_dylibloader_wrapper_xinerama)(Display *);
extern XineramaScreenInfo *(*XineramaQueryScreens_dylibloader_wrapper_xinerama)(Display *, int *);
int initialize_xinerama(int verbose);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,397 @@
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:51:34
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/XInput2.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/XInput2.h --soname libXi.so.6 --init-name xinput2 --output-header ./platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c --ignore-other
//
#include <stdint.h>
#define XIQueryPointer XIQueryPointer_dylibloader_orig_xinput2
#define XIWarpPointer XIWarpPointer_dylibloader_orig_xinput2
#define XIDefineCursor XIDefineCursor_dylibloader_orig_xinput2
#define XIUndefineCursor XIUndefineCursor_dylibloader_orig_xinput2
#define XIChangeHierarchy XIChangeHierarchy_dylibloader_orig_xinput2
#define XISetClientPointer XISetClientPointer_dylibloader_orig_xinput2
#define XIGetClientPointer XIGetClientPointer_dylibloader_orig_xinput2
#define XISelectEvents XISelectEvents_dylibloader_orig_xinput2
#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_orig_xinput2
#define XIQueryVersion XIQueryVersion_dylibloader_orig_xinput2
#define XIQueryDevice XIQueryDevice_dylibloader_orig_xinput2
#define XISetFocus XISetFocus_dylibloader_orig_xinput2
#define XIGetFocus XIGetFocus_dylibloader_orig_xinput2
#define XIGrabDevice XIGrabDevice_dylibloader_orig_xinput2
#define XIUngrabDevice XIUngrabDevice_dylibloader_orig_xinput2
#define XIAllowEvents XIAllowEvents_dylibloader_orig_xinput2
#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_orig_xinput2
#define XIGrabButton XIGrabButton_dylibloader_orig_xinput2
#define XIGrabKeycode XIGrabKeycode_dylibloader_orig_xinput2
#define XIGrabEnter XIGrabEnter_dylibloader_orig_xinput2
#define XIGrabFocusIn XIGrabFocusIn_dylibloader_orig_xinput2
#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_orig_xinput2
#define XIUngrabButton XIUngrabButton_dylibloader_orig_xinput2
#define XIUngrabKeycode XIUngrabKeycode_dylibloader_orig_xinput2
#define XIUngrabEnter XIUngrabEnter_dylibloader_orig_xinput2
#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_orig_xinput2
#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_orig_xinput2
#define XIListProperties XIListProperties_dylibloader_orig_xinput2
#define XIChangeProperty XIChangeProperty_dylibloader_orig_xinput2
#define XIDeleteProperty XIDeleteProperty_dylibloader_orig_xinput2
#define XIGetProperty XIGetProperty_dylibloader_orig_xinput2
#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_orig_xinput2
#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_orig_xinput2
#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_orig_xinput2
#include "thirdparty/linuxbsd_headers/X11/extensions/XInput2.h"
#undef XIQueryPointer
#undef XIWarpPointer
#undef XIDefineCursor
#undef XIUndefineCursor
#undef XIChangeHierarchy
#undef XISetClientPointer
#undef XIGetClientPointer
#undef XISelectEvents
#undef XIGetSelectedEvents
#undef XIQueryVersion
#undef XIQueryDevice
#undef XISetFocus
#undef XIGetFocus
#undef XIGrabDevice
#undef XIUngrabDevice
#undef XIAllowEvents
#undef XIAllowTouchEvents
#undef XIGrabButton
#undef XIGrabKeycode
#undef XIGrabEnter
#undef XIGrabFocusIn
#undef XIGrabTouchBegin
#undef XIUngrabButton
#undef XIUngrabKeycode
#undef XIUngrabEnter
#undef XIUngrabFocusIn
#undef XIUngrabTouchBegin
#undef XIListProperties
#undef XIChangeProperty
#undef XIDeleteProperty
#undef XIGetProperty
#undef XIBarrierReleasePointers
#undef XIBarrierReleasePointer
#undef XIFreeDeviceInfo
#include <dlfcn.h>
#include <stdio.h>
int (*XIQueryPointer_dylibloader_wrapper_xinput2)(Display *, int, Window, Window *, Window *, double *, double *, double *, double *, XIButtonState *, XIModifierState *, XIGroupState *);
int (*XIWarpPointer_dylibloader_wrapper_xinput2)(Display *, int, Window, Window, double, double, unsigned int, unsigned int, double, double);
int (*XIDefineCursor_dylibloader_wrapper_xinput2)(Display *, int, Window, Cursor);
int (*XIUndefineCursor_dylibloader_wrapper_xinput2)(Display *, int, Window);
int (*XIChangeHierarchy_dylibloader_wrapper_xinput2)(Display *, XIAnyHierarchyChangeInfo *, int);
int (*XISetClientPointer_dylibloader_wrapper_xinput2)(Display *, Window, int);
int (*XIGetClientPointer_dylibloader_wrapper_xinput2)(Display *, Window, int *);
int (*XISelectEvents_dylibloader_wrapper_xinput2)(Display *, Window, XIEventMask *, int);
XIEventMask *(*XIGetSelectedEvents_dylibloader_wrapper_xinput2)(Display *, Window, int *);
int (*XIQueryVersion_dylibloader_wrapper_xinput2)(Display *, int *, int *);
XIDeviceInfo *(*XIQueryDevice_dylibloader_wrapper_xinput2)(Display *, int, int *);
int (*XISetFocus_dylibloader_wrapper_xinput2)(Display *, int, Window, Time);
int (*XIGetFocus_dylibloader_wrapper_xinput2)(Display *, int, Window *);
int (*XIGrabDevice_dylibloader_wrapper_xinput2)(Display *, int, Window, Time, Cursor, int, int, int, XIEventMask *);
int (*XIUngrabDevice_dylibloader_wrapper_xinput2)(Display *, int, Time);
int (*XIAllowEvents_dylibloader_wrapper_xinput2)(Display *, int, int, Time);
int (*XIAllowTouchEvents_dylibloader_wrapper_xinput2)(Display *, int, unsigned int, Window, int);
int (*XIGrabButton_dylibloader_wrapper_xinput2)(Display *, int, int, Window, Cursor, int, int, int, XIEventMask *, int, XIGrabModifiers *);
int (*XIGrabKeycode_dylibloader_wrapper_xinput2)(Display *, int, int, Window, int, int, int, XIEventMask *, int, XIGrabModifiers *);
int (*XIGrabEnter_dylibloader_wrapper_xinput2)(Display *, int, Window, Cursor, int, int, int, XIEventMask *, int, XIGrabModifiers *);
int (*XIGrabFocusIn_dylibloader_wrapper_xinput2)(Display *, int, Window, int, int, int, XIEventMask *, int, XIGrabModifiers *);
int (*XIGrabTouchBegin_dylibloader_wrapper_xinput2)(Display *, int, Window, int, XIEventMask *, int, XIGrabModifiers *);
int (*XIUngrabButton_dylibloader_wrapper_xinput2)(Display *, int, int, Window, int, XIGrabModifiers *);
int (*XIUngrabKeycode_dylibloader_wrapper_xinput2)(Display *, int, int, Window, int, XIGrabModifiers *);
int (*XIUngrabEnter_dylibloader_wrapper_xinput2)(Display *, int, Window, int, XIGrabModifiers *);
int (*XIUngrabFocusIn_dylibloader_wrapper_xinput2)(Display *, int, Window, int, XIGrabModifiers *);
int (*XIUngrabTouchBegin_dylibloader_wrapper_xinput2)(Display *, int, Window, int, XIGrabModifiers *);
Atom *(*XIListProperties_dylibloader_wrapper_xinput2)(Display *, int, int *);
void (*XIChangeProperty_dylibloader_wrapper_xinput2)(Display *, int, Atom, Atom, int, int, unsigned char *, int);
void (*XIDeleteProperty_dylibloader_wrapper_xinput2)(Display *, int, Atom);
int (*XIGetProperty_dylibloader_wrapper_xinput2)(Display *, int, Atom, long, long, int, Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char **);
void (*XIBarrierReleasePointers_dylibloader_wrapper_xinput2)(Display *, XIBarrierReleasePointerInfo *, int);
void (*XIBarrierReleasePointer_dylibloader_wrapper_xinput2)(Display *, int, PointerBarrier, BarrierEventID);
void (*XIFreeDeviceInfo_dylibloader_wrapper_xinput2)(XIDeviceInfo *);
int initialize_xinput2(int verbose) {
void *handle;
char *error;
handle = dlopen("libXi.so.6", RTLD_LAZY);
if (!handle) {
if (verbose) {
fprintf(stderr, "%s\n", dlerror());
}
return(1);
}
dlerror();
// XIQueryPointer
*(void **) (&XIQueryPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryPointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIWarpPointer
*(void **) (&XIWarpPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIWarpPointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIDefineCursor
*(void **) (&XIDefineCursor_dylibloader_wrapper_xinput2) = dlsym(handle, "XIDefineCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUndefineCursor
*(void **) (&XIUndefineCursor_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUndefineCursor");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIChangeHierarchy
*(void **) (&XIChangeHierarchy_dylibloader_wrapper_xinput2) = dlsym(handle, "XIChangeHierarchy");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XISetClientPointer
*(void **) (&XISetClientPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XISetClientPointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGetClientPointer
*(void **) (&XIGetClientPointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetClientPointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XISelectEvents
*(void **) (&XISelectEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XISelectEvents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGetSelectedEvents
*(void **) (&XIGetSelectedEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetSelectedEvents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIQueryVersion
*(void **) (&XIQueryVersion_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryVersion");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIQueryDevice
*(void **) (&XIQueryDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIQueryDevice");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XISetFocus
*(void **) (&XISetFocus_dylibloader_wrapper_xinput2) = dlsym(handle, "XISetFocus");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGetFocus
*(void **) (&XIGetFocus_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetFocus");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabDevice
*(void **) (&XIGrabDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabDevice");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabDevice
*(void **) (&XIUngrabDevice_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabDevice");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIAllowEvents
*(void **) (&XIAllowEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIAllowEvents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIAllowTouchEvents
*(void **) (&XIAllowTouchEvents_dylibloader_wrapper_xinput2) = dlsym(handle, "XIAllowTouchEvents");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabButton
*(void **) (&XIGrabButton_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabButton");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabKeycode
*(void **) (&XIGrabKeycode_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabKeycode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabEnter
*(void **) (&XIGrabEnter_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabEnter");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabFocusIn
*(void **) (&XIGrabFocusIn_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabFocusIn");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGrabTouchBegin
*(void **) (&XIGrabTouchBegin_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGrabTouchBegin");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabButton
*(void **) (&XIUngrabButton_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabButton");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabKeycode
*(void **) (&XIUngrabKeycode_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabKeycode");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabEnter
*(void **) (&XIUngrabEnter_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabEnter");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabFocusIn
*(void **) (&XIUngrabFocusIn_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabFocusIn");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIUngrabTouchBegin
*(void **) (&XIUngrabTouchBegin_dylibloader_wrapper_xinput2) = dlsym(handle, "XIUngrabTouchBegin");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIListProperties
*(void **) (&XIListProperties_dylibloader_wrapper_xinput2) = dlsym(handle, "XIListProperties");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIChangeProperty
*(void **) (&XIChangeProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIChangeProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIDeleteProperty
*(void **) (&XIDeleteProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIDeleteProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIGetProperty
*(void **) (&XIGetProperty_dylibloader_wrapper_xinput2) = dlsym(handle, "XIGetProperty");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIBarrierReleasePointers
*(void **) (&XIBarrierReleasePointers_dylibloader_wrapper_xinput2) = dlsym(handle, "XIBarrierReleasePointers");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIBarrierReleasePointer
*(void **) (&XIBarrierReleasePointer_dylibloader_wrapper_xinput2) = dlsym(handle, "XIBarrierReleasePointer");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
// XIFreeDeviceInfo
*(void **) (&XIFreeDeviceInfo_dylibloader_wrapper_xinput2) = dlsym(handle, "XIFreeDeviceInfo");
if (verbose) {
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\n", error);
}
}
return 0;
}

View File

@@ -0,0 +1,154 @@
#ifndef DYLIBLOAD_WRAPPER_XINPUT2
#define DYLIBLOAD_WRAPPER_XINPUT2
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.7 on 2024-12-12 14:51:34
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/XInput2.h --sys-include thirdparty/linuxbsd_headers/X11/extensions/XInput2.h --soname libXi.so.6 --init-name xinput2 --output-header ./platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c --ignore-other
//
#include <stdint.h>
#define XIQueryPointer XIQueryPointer_dylibloader_orig_xinput2
#define XIWarpPointer XIWarpPointer_dylibloader_orig_xinput2
#define XIDefineCursor XIDefineCursor_dylibloader_orig_xinput2
#define XIUndefineCursor XIUndefineCursor_dylibloader_orig_xinput2
#define XIChangeHierarchy XIChangeHierarchy_dylibloader_orig_xinput2
#define XISetClientPointer XISetClientPointer_dylibloader_orig_xinput2
#define XIGetClientPointer XIGetClientPointer_dylibloader_orig_xinput2
#define XISelectEvents XISelectEvents_dylibloader_orig_xinput2
#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_orig_xinput2
#define XIQueryVersion XIQueryVersion_dylibloader_orig_xinput2
#define XIQueryDevice XIQueryDevice_dylibloader_orig_xinput2
#define XISetFocus XISetFocus_dylibloader_orig_xinput2
#define XIGetFocus XIGetFocus_dylibloader_orig_xinput2
#define XIGrabDevice XIGrabDevice_dylibloader_orig_xinput2
#define XIUngrabDevice XIUngrabDevice_dylibloader_orig_xinput2
#define XIAllowEvents XIAllowEvents_dylibloader_orig_xinput2
#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_orig_xinput2
#define XIGrabButton XIGrabButton_dylibloader_orig_xinput2
#define XIGrabKeycode XIGrabKeycode_dylibloader_orig_xinput2
#define XIGrabEnter XIGrabEnter_dylibloader_orig_xinput2
#define XIGrabFocusIn XIGrabFocusIn_dylibloader_orig_xinput2
#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_orig_xinput2
#define XIUngrabButton XIUngrabButton_dylibloader_orig_xinput2
#define XIUngrabKeycode XIUngrabKeycode_dylibloader_orig_xinput2
#define XIUngrabEnter XIUngrabEnter_dylibloader_orig_xinput2
#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_orig_xinput2
#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_orig_xinput2
#define XIListProperties XIListProperties_dylibloader_orig_xinput2
#define XIChangeProperty XIChangeProperty_dylibloader_orig_xinput2
#define XIDeleteProperty XIDeleteProperty_dylibloader_orig_xinput2
#define XIGetProperty XIGetProperty_dylibloader_orig_xinput2
#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_orig_xinput2
#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_orig_xinput2
#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_orig_xinput2
#include "thirdparty/linuxbsd_headers/X11/extensions/XInput2.h"
#undef XIQueryPointer
#undef XIWarpPointer
#undef XIDefineCursor
#undef XIUndefineCursor
#undef XIChangeHierarchy
#undef XISetClientPointer
#undef XIGetClientPointer
#undef XISelectEvents
#undef XIGetSelectedEvents
#undef XIQueryVersion
#undef XIQueryDevice
#undef XISetFocus
#undef XIGetFocus
#undef XIGrabDevice
#undef XIUngrabDevice
#undef XIAllowEvents
#undef XIAllowTouchEvents
#undef XIGrabButton
#undef XIGrabKeycode
#undef XIGrabEnter
#undef XIGrabFocusIn
#undef XIGrabTouchBegin
#undef XIUngrabButton
#undef XIUngrabKeycode
#undef XIUngrabEnter
#undef XIUngrabFocusIn
#undef XIUngrabTouchBegin
#undef XIListProperties
#undef XIChangeProperty
#undef XIDeleteProperty
#undef XIGetProperty
#undef XIBarrierReleasePointers
#undef XIBarrierReleasePointer
#undef XIFreeDeviceInfo
#ifdef __cplusplus
extern "C" {
#endif
#define XIQueryPointer XIQueryPointer_dylibloader_wrapper_xinput2
#define XIWarpPointer XIWarpPointer_dylibloader_wrapper_xinput2
#define XIDefineCursor XIDefineCursor_dylibloader_wrapper_xinput2
#define XIUndefineCursor XIUndefineCursor_dylibloader_wrapper_xinput2
#define XIChangeHierarchy XIChangeHierarchy_dylibloader_wrapper_xinput2
#define XISetClientPointer XISetClientPointer_dylibloader_wrapper_xinput2
#define XIGetClientPointer XIGetClientPointer_dylibloader_wrapper_xinput2
#define XISelectEvents XISelectEvents_dylibloader_wrapper_xinput2
#define XIGetSelectedEvents XIGetSelectedEvents_dylibloader_wrapper_xinput2
#define XIQueryVersion XIQueryVersion_dylibloader_wrapper_xinput2
#define XIQueryDevice XIQueryDevice_dylibloader_wrapper_xinput2
#define XISetFocus XISetFocus_dylibloader_wrapper_xinput2
#define XIGetFocus XIGetFocus_dylibloader_wrapper_xinput2
#define XIGrabDevice XIGrabDevice_dylibloader_wrapper_xinput2
#define XIUngrabDevice XIUngrabDevice_dylibloader_wrapper_xinput2
#define XIAllowEvents XIAllowEvents_dylibloader_wrapper_xinput2
#define XIAllowTouchEvents XIAllowTouchEvents_dylibloader_wrapper_xinput2
#define XIGrabButton XIGrabButton_dylibloader_wrapper_xinput2
#define XIGrabKeycode XIGrabKeycode_dylibloader_wrapper_xinput2
#define XIGrabEnter XIGrabEnter_dylibloader_wrapper_xinput2
#define XIGrabFocusIn XIGrabFocusIn_dylibloader_wrapper_xinput2
#define XIGrabTouchBegin XIGrabTouchBegin_dylibloader_wrapper_xinput2
#define XIUngrabButton XIUngrabButton_dylibloader_wrapper_xinput2
#define XIUngrabKeycode XIUngrabKeycode_dylibloader_wrapper_xinput2
#define XIUngrabEnter XIUngrabEnter_dylibloader_wrapper_xinput2
#define XIUngrabFocusIn XIUngrabFocusIn_dylibloader_wrapper_xinput2
#define XIUngrabTouchBegin XIUngrabTouchBegin_dylibloader_wrapper_xinput2
#define XIListProperties XIListProperties_dylibloader_wrapper_xinput2
#define XIChangeProperty XIChangeProperty_dylibloader_wrapper_xinput2
#define XIDeleteProperty XIDeleteProperty_dylibloader_wrapper_xinput2
#define XIGetProperty XIGetProperty_dylibloader_wrapper_xinput2
#define XIBarrierReleasePointers XIBarrierReleasePointers_dylibloader_wrapper_xinput2
#define XIBarrierReleasePointer XIBarrierReleasePointer_dylibloader_wrapper_xinput2
#define XIFreeDeviceInfo XIFreeDeviceInfo_dylibloader_wrapper_xinput2
extern int (*XIQueryPointer_dylibloader_wrapper_xinput2)(Display *, int, Window, Window *, Window *, double *, double *, double *, double *, XIButtonState *, XIModifierState *, XIGroupState *);
extern int (*XIWarpPointer_dylibloader_wrapper_xinput2)(Display *, int, Window, Window, double, double, unsigned int, unsigned int, double, double);
extern int (*XIDefineCursor_dylibloader_wrapper_xinput2)(Display *, int, Window, Cursor);
extern int (*XIUndefineCursor_dylibloader_wrapper_xinput2)(Display *, int, Window);
extern int (*XIChangeHierarchy_dylibloader_wrapper_xinput2)(Display *, XIAnyHierarchyChangeInfo *, int);
extern int (*XISetClientPointer_dylibloader_wrapper_xinput2)(Display *, Window, int);
extern int (*XIGetClientPointer_dylibloader_wrapper_xinput2)(Display *, Window, int *);
extern int (*XISelectEvents_dylibloader_wrapper_xinput2)(Display *, Window, XIEventMask *, int);
extern XIEventMask *(*XIGetSelectedEvents_dylibloader_wrapper_xinput2)(Display *, Window, int *);
extern int (*XIQueryVersion_dylibloader_wrapper_xinput2)(Display *, int *, int *);
extern XIDeviceInfo *(*XIQueryDevice_dylibloader_wrapper_xinput2)(Display *, int, int *);
extern int (*XISetFocus_dylibloader_wrapper_xinput2)(Display *, int, Window, Time);
extern int (*XIGetFocus_dylibloader_wrapper_xinput2)(Display *, int, Window *);
extern int (*XIGrabDevice_dylibloader_wrapper_xinput2)(Display *, int, Window, Time, Cursor, int, int, int, XIEventMask *);
extern int (*XIUngrabDevice_dylibloader_wrapper_xinput2)(Display *, int, Time);
extern int (*XIAllowEvents_dylibloader_wrapper_xinput2)(Display *, int, int, Time);
extern int (*XIAllowTouchEvents_dylibloader_wrapper_xinput2)(Display *, int, unsigned int, Window, int);
extern int (*XIGrabButton_dylibloader_wrapper_xinput2)(Display *, int, int, Window, Cursor, int, int, int, XIEventMask *, int, XIGrabModifiers *);
extern int (*XIGrabKeycode_dylibloader_wrapper_xinput2)(Display *, int, int, Window, int, int, int, XIEventMask *, int, XIGrabModifiers *);
extern int (*XIGrabEnter_dylibloader_wrapper_xinput2)(Display *, int, Window, Cursor, int, int, int, XIEventMask *, int, XIGrabModifiers *);
extern int (*XIGrabFocusIn_dylibloader_wrapper_xinput2)(Display *, int, Window, int, int, int, XIEventMask *, int, XIGrabModifiers *);
extern int (*XIGrabTouchBegin_dylibloader_wrapper_xinput2)(Display *, int, Window, int, XIEventMask *, int, XIGrabModifiers *);
extern int (*XIUngrabButton_dylibloader_wrapper_xinput2)(Display *, int, int, Window, int, XIGrabModifiers *);
extern int (*XIUngrabKeycode_dylibloader_wrapper_xinput2)(Display *, int, int, Window, int, XIGrabModifiers *);
extern int (*XIUngrabEnter_dylibloader_wrapper_xinput2)(Display *, int, Window, int, XIGrabModifiers *);
extern int (*XIUngrabFocusIn_dylibloader_wrapper_xinput2)(Display *, int, Window, int, XIGrabModifiers *);
extern int (*XIUngrabTouchBegin_dylibloader_wrapper_xinput2)(Display *, int, Window, int, XIGrabModifiers *);
extern Atom *(*XIListProperties_dylibloader_wrapper_xinput2)(Display *, int, int *);
extern void (*XIChangeProperty_dylibloader_wrapper_xinput2)(Display *, int, Atom, Atom, int, int, unsigned char *, int);
extern void (*XIDeleteProperty_dylibloader_wrapper_xinput2)(Display *, int, Atom);
extern int (*XIGetProperty_dylibloader_wrapper_xinput2)(Display *, int, Atom, long, long, int, Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char **);
extern void (*XIBarrierReleasePointers_dylibloader_wrapper_xinput2)(Display *, XIBarrierReleasePointerInfo *, int);
extern void (*XIBarrierReleasePointer_dylibloader_wrapper_xinput2)(Display *, int, PointerBarrier, BarrierEventID);
extern void (*XIFreeDeviceInfo_dylibloader_wrapper_xinput2)(XIDeviceInfo *);
int initialize_xinput2(int verbose);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,399 @@
/**************************************************************************/
/* gl_manager_x11.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "gl_manager_x11.h"
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
#include "thirdparty/glad/glad/glx.h"
#include <unistd.h>
#include <cstdio>
#include <cstdlib>
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
// To prevent shadowing warnings
#undef glXCreateContextAttribsARB
struct GLManager_X11_Private {
::GLXContext glx_context;
};
GLManager_X11::GLDisplay::~GLDisplay() {
if (context) {
//release_current();
glXDestroyContext(x11_display, context->glx_context);
memdelete(context);
context = nullptr;
}
}
static bool ctxErrorOccurred = false;
static int ctxErrorHandler(Display *dpy, XErrorEvent *ev) {
ctxErrorOccurred = true;
return 0;
}
int GLManager_X11::_find_or_create_display(Display *p_x11_display) {
for (unsigned int n = 0; n < _displays.size(); n++) {
const GLDisplay &d = _displays[n];
if (d.x11_display == p_x11_display) {
return n;
}
}
// create
GLDisplay d_temp;
d_temp.x11_display = p_x11_display;
_displays.push_back(d_temp);
int new_display_id = _displays.size() - 1;
// create context
GLDisplay &d = _displays[new_display_id];
d.context = memnew(GLManager_X11_Private);
d.context->glx_context = nullptr;
Error err = _create_context(d);
if (err != OK) {
_displays.remove_at(new_display_id);
return -1;
}
return new_display_id;
}
Error GLManager_X11::_create_context(GLDisplay &gl_display) {
// some aliases
::Display *x11_display = gl_display.x11_display;
//const char *extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display));
GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte *)"glXCreateContextAttribsARB");
ERR_FAIL_NULL_V(glXCreateContextAttribsARB, ERR_UNCONFIGURED);
static int visual_attribs[] = {
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_DOUBLEBUFFER, true,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DEPTH_SIZE, 24,
None
};
static int visual_attribs_layered[] = {
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
GLX_DOUBLEBUFFER, true,
GLX_RED_SIZE, 8,
GLX_GREEN_SIZE, 8,
GLX_BLUE_SIZE, 8,
GLX_ALPHA_SIZE, 8,
GLX_DEPTH_SIZE, 24,
None
};
int fbcount;
GLXFBConfig fbconfig = nullptr;
XVisualInfo *vi = nullptr;
if (OS::get_singleton()->is_layered_allowed()) {
GLXFBConfig *fbc = glXChooseFBConfig(x11_display, DefaultScreen(x11_display), visual_attribs_layered, &fbcount);
ERR_FAIL_NULL_V(fbc, ERR_UNCONFIGURED);
for (int i = 0; i < fbcount; i++) {
if (vi) {
XFree(vi);
vi = nullptr;
}
vi = (XVisualInfo *)glXGetVisualFromFBConfig(x11_display, fbc[i]);
if (!vi) {
continue;
}
XRenderPictFormat *pict_format = XRenderFindVisualFormat(x11_display, vi->visual);
if (!pict_format) {
XFree(vi);
vi = nullptr;
continue;
}
fbconfig = fbc[i];
if (pict_format->direct.alphaMask > 0) {
break;
}
}
XFree(fbc);
ERR_FAIL_NULL_V(fbconfig, ERR_UNCONFIGURED);
} else {
GLXFBConfig *fbc = glXChooseFBConfig(x11_display, DefaultScreen(x11_display), visual_attribs, &fbcount);
ERR_FAIL_NULL_V(fbc, ERR_UNCONFIGURED);
vi = glXGetVisualFromFBConfig(x11_display, fbc[0]);
fbconfig = fbc[0];
XFree(fbc);
}
int (*oldHandler)(Display *, XErrorEvent *) = XSetErrorHandler(&ctxErrorHandler);
switch (context_type) {
case GLES_3_0_COMPATIBLE: {
static int context_attribs[] = {
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
GLX_CONTEXT_MINOR_VERSION_ARB, 3,
GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB /*|GLX_CONTEXT_DEBUG_BIT_ARB*/,
None
};
gl_display.context->glx_context = glXCreateContextAttribsARB(x11_display, fbconfig, nullptr, true, context_attribs);
ERR_FAIL_COND_V(ctxErrorOccurred || !gl_display.context->glx_context, ERR_UNCONFIGURED);
} break;
}
XSync(x11_display, False);
XSetErrorHandler(oldHandler);
// make our own copy of the vi data
// for later creating windows using this display
if (vi) {
gl_display.x_vi = *vi;
}
XFree(vi);
return OK;
}
XVisualInfo GLManager_X11::get_vi(Display *p_display, Error &r_error) {
int display_id = _find_or_create_display(p_display);
if (display_id < 0) {
r_error = FAILED;
return XVisualInfo();
}
r_error = OK;
return _displays[display_id].x_vi;
}
Error GLManager_X11::open_display(Display *p_display) {
int gldisplay_id = _find_or_create_display(p_display);
if (gldisplay_id < 0) {
return ERR_CANT_CREATE;
} else {
return OK;
}
}
Error GLManager_X11::window_create(DisplayServer::WindowID p_window_id, ::Window p_window, Display *p_display, int p_width, int p_height) {
// make sure vector is big enough...
// we can mirror the external vector, it is simpler
// to keep the IDs identical for fast lookup
if (p_window_id >= (int)_windows.size()) {
_windows.resize(p_window_id + 1);
}
GLWindow &win = _windows[p_window_id];
win.in_use = true;
win.window_id = p_window_id;
win.width = p_width;
win.height = p_height;
win.x11_window = p_window;
win.gldisplay_id = _find_or_create_display(p_display);
if (win.gldisplay_id == -1) {
return FAILED;
}
// the display could be invalid .. check NYI
GLDisplay &gl_display = _displays[win.gldisplay_id];
::Display *x11_display = gl_display.x11_display;
::Window &x11_window = win.x11_window;
if (!glXMakeCurrent(x11_display, x11_window, gl_display.context->glx_context)) {
ERR_PRINT("glXMakeCurrent failed");
}
_internal_set_current_window(&win);
return OK;
}
void GLManager_X11::_internal_set_current_window(GLWindow *p_win) {
_current_window = p_win;
// quick access to x info
_x_windisp.x11_window = _current_window->x11_window;
const GLDisplay &disp = get_current_display();
_x_windisp.x11_display = disp.x11_display;
}
void GLManager_X11::window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) {
get_window(p_window_id).width = p_width;
get_window(p_window_id).height = p_height;
}
void GLManager_X11::window_destroy(DisplayServer::WindowID p_window_id) {
GLWindow &win = get_window(p_window_id);
win.in_use = false;
if (_current_window == &win) {
_current_window = nullptr;
_x_windisp.x11_display = nullptr;
_x_windisp.x11_window = -1;
}
}
void GLManager_X11::release_current() {
if (!_current_window) {
return;
}
if (!glXMakeCurrent(_x_windisp.x11_display, None, nullptr)) {
ERR_PRINT("glXMakeCurrent failed");
}
_current_window = nullptr;
}
void GLManager_X11::window_make_current(DisplayServer::WindowID p_window_id) {
if (p_window_id == -1) {
return;
}
GLWindow &win = _windows[p_window_id];
if (!win.in_use) {
return;
}
// noop
if (&win == _current_window) {
return;
}
const GLDisplay &disp = get_display(win.gldisplay_id);
if (!glXMakeCurrent(disp.x11_display, win.x11_window, disp.context->glx_context)) {
ERR_PRINT("glXMakeCurrent failed");
}
_internal_set_current_window(&win);
}
void GLManager_X11::swap_buffers() {
if (!_current_window) {
return;
}
if (!_current_window->in_use) {
WARN_PRINT("current window not in use!");
return;
}
// On X11, when enabled, transparency is always active, so clear alpha manually.
if (OS::get_singleton()->is_layered_allowed()) {
if (!DisplayServer::get_singleton()->window_get_flag(DisplayServer::WINDOW_FLAG_TRANSPARENT, _current_window->window_id)) {
glColorMask(false, false, false, true);
glClearColor(0, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT);
glColorMask(true, true, true, true);
}
}
glXSwapBuffers(_x_windisp.x11_display, _x_windisp.x11_window);
}
Error GLManager_X11::initialize(Display *p_display) {
if (!gladLoaderLoadGLX(p_display, XScreenNumberOfScreen(XDefaultScreenOfDisplay(p_display)))) {
return ERR_CANT_CREATE;
}
return OK;
}
void GLManager_X11::set_use_vsync(bool p_use) {
// we need an active window to get a display to set the vsync
if (!_current_window) {
return;
}
const GLDisplay &disp = get_current_display();
int val = p_use ? 1 : 0;
if (GLAD_GLX_MESA_swap_control) {
glXSwapIntervalMESA(val);
} else if (GLAD_GLX_SGI_swap_control) {
glXSwapIntervalSGI(val);
} else if (GLAD_GLX_EXT_swap_control) {
GLXDrawable drawable = glXGetCurrentDrawable();
glXSwapIntervalEXT(disp.x11_display, drawable, val);
} else {
WARN_PRINT_ONCE("Could not set V-Sync mode, as changing V-Sync mode is not supported by the graphics driver.");
return;
}
use_vsync = p_use;
}
bool GLManager_X11::is_using_vsync() const {
return use_vsync;
}
void *GLManager_X11::get_glx_context(DisplayServer::WindowID p_window_id) {
if (p_window_id == -1) {
return nullptr;
}
const GLWindow &win = _windows[p_window_id];
const GLDisplay &disp = get_display(win.gldisplay_id);
return (void *)disp.context->glx_context;
}
GLManager_X11::GLManager_X11(const Vector2i &p_size, ContextType p_context_type) {
context_type = p_context_type;
double_buffer = false;
direct_render = false;
glx_minor = glx_major = 0;
use_vsync = false;
_current_window = nullptr;
}
GLManager_X11::~GLManager_X11() {
release_current();
}
#endif // X11_ENABLED && GLES3_ENABLED

View File

@@ -0,0 +1,135 @@
/**************************************************************************/
/* gl_manager_x11.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
#include "core/os/os.h"
#include "core/templates/local_vector.h"
#include "servers/display_server.h"
#ifdef SOWRAP_ENABLED
#include "dynwrappers/xlib-so_wrap.h"
#include "dynwrappers/xext-so_wrap.h"
#include "dynwrappers/xrender-so_wrap.h"
#else
#include <X11/XKBlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/Xrender.h>
#include <X11/extensions/shape.h>
#endif
struct GLManager_X11_Private;
class GLManager_X11 {
public:
enum ContextType {
GLES_3_0_COMPATIBLE,
};
private:
// any data specific to the window
struct GLWindow {
bool in_use = false;
// the external ID .. should match the GL window number .. unused I think
DisplayServer::WindowID window_id = DisplayServer::INVALID_WINDOW_ID;
int width = 0;
int height = 0;
::Window x11_window;
int gldisplay_id = 0;
};
struct GLDisplay {
GLDisplay() {}
~GLDisplay();
GLManager_X11_Private *context = nullptr;
::Display *x11_display = nullptr;
XVisualInfo x_vi = {};
};
// just for convenience, window and display struct
struct XWinDisp {
::Window x11_window;
::Display *x11_display = nullptr;
} _x_windisp;
LocalVector<GLWindow> _windows;
LocalVector<GLDisplay> _displays;
GLWindow *_current_window = nullptr;
void _internal_set_current_window(GLWindow *p_win);
GLWindow &get_window(unsigned int id) { return _windows[id]; }
const GLWindow &get_window(unsigned int id) const { return _windows[id]; }
const GLDisplay &get_current_display() const { return _displays[_current_window->gldisplay_id]; }
const GLDisplay &get_display(unsigned int id) { return _displays[id]; }
bool double_buffer;
bool direct_render;
int glx_minor, glx_major;
bool use_vsync;
ContextType context_type;
private:
int _find_or_create_display(Display *p_x11_display);
Error _create_context(GLDisplay &gl_display);
public:
XVisualInfo get_vi(Display *p_display, Error &r_error);
Error window_create(DisplayServer::WindowID p_window_id, ::Window p_window, Display *p_display, int p_width, int p_height);
void window_destroy(DisplayServer::WindowID p_window_id);
void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height);
void release_current();
void swap_buffers();
void window_make_current(DisplayServer::WindowID p_window_id);
Error initialize(Display *p_display);
void set_use_vsync(bool p_use);
bool is_using_vsync() const;
void *get_glx_context(DisplayServer::WindowID p_window_id);
Error open_display(Display *p_display);
GLManager_X11(const Vector2i &p_size, ContextType p_context_type);
~GLManager_X11();
};
#endif // X11_ENABLED && GLES3_ENABLED

View File

@@ -0,0 +1,63 @@
/**************************************************************************/
/* gl_manager_x11_egl.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "gl_manager_x11_egl.h"
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
#include <cstdio>
#include <cstdlib>
const char *GLManagerEGL_X11::_get_platform_extension_name() const {
return "EGL_KHR_platform_x11";
}
EGLenum GLManagerEGL_X11::_get_platform_extension_enum() const {
return EGL_PLATFORM_X11_KHR;
}
Vector<EGLAttrib> GLManagerEGL_X11::_get_platform_display_attributes() const {
return Vector<EGLAttrib>();
}
EGLenum GLManagerEGL_X11::_get_platform_api_enum() const {
return EGL_OPENGL_ES_API;
}
Vector<EGLint> GLManagerEGL_X11::_get_platform_context_attribs() const {
Vector<EGLint> ret;
ret.push_back(EGL_CONTEXT_CLIENT_VERSION);
ret.push_back(3);
ret.push_back(EGL_NONE);
return ret;
}
#endif // WINDOWS_ENABLED && GLES3_ENABLED

View File

@@ -0,0 +1,57 @@
/**************************************************************************/
/* gl_manager_x11_egl.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
#include "core/os/os.h"
#include "core/templates/local_vector.h"
#include "drivers/egl/egl_manager.h"
#include "servers/display_server.h"
#include <X11/Xlib.h>
class GLManagerEGL_X11 : public EGLManager {
private:
virtual const char *_get_platform_extension_name() const override;
virtual EGLenum _get_platform_extension_enum() const override;
virtual EGLenum _get_platform_api_enum() const override;
virtual Vector<EGLAttrib> _get_platform_display_attributes() const override;
virtual Vector<EGLint> _get_platform_context_attribs() const override;
public:
void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) {}
GLManagerEGL_X11() {}
~GLManagerEGL_X11() {}
};
#endif // X11_ENABLED && GLES3_ENABLED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,69 @@
/**************************************************************************/
/* key_mapping_x11.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#include "core/os/keyboard.h"
#include "core/templates/hash_map.h"
#include <X11/XF86keysym.h>
#include <X11/Xlib.h>
#define XK_MISCELLANY
#define XK_LATIN1
#define XK_XKB_KEYS
#include <X11/keysymdef.h>
class KeyMappingX11 {
struct HashMapHasherKeys {
static _FORCE_INLINE_ uint32_t hash(const Key p_key) { return hash_fmix32(static_cast<uint32_t>(p_key)); }
static _FORCE_INLINE_ uint32_t hash(const char32_t p_uchar) { return hash_fmix32(p_uchar); }
static _FORCE_INLINE_ uint32_t hash(const unsigned p_key) { return hash_fmix32(p_key); }
static _FORCE_INLINE_ uint32_t hash(const KeySym p_key) { return hash_fmix32(p_key); }
};
static inline HashMap<KeySym, Key, HashMapHasherKeys> xkeysym_map;
static inline HashMap<unsigned int, Key, HashMapHasherKeys> scancode_map;
static inline HashMap<Key, unsigned int, HashMapHasherKeys> scancode_map_inv;
static inline HashMap<KeySym, char32_t, HashMapHasherKeys> xkeysym_unicode_map;
static inline HashMap<unsigned int, KeyLocation, HashMapHasherKeys> location_map;
KeyMappingX11() {}
public:
static void initialize();
static bool is_sym_numpad(KeySym p_keysym);
static Key get_keycode(KeySym p_keysym);
static unsigned int get_xlibcode(Key p_keysym);
static Key get_scancode(unsigned int p_code);
static char32_t get_unicode_from_keysym(KeySym p_keysym);
static KeyLocation get_location(unsigned int p_code);
};

View File

@@ -0,0 +1,66 @@
/**************************************************************************/
/* rendering_context_driver_vulkan_x11.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifdef VULKAN_ENABLED
#include "rendering_context_driver_vulkan_x11.h"
#include "drivers/vulkan/godot_vulkan.h"
const char *RenderingContextDriverVulkanX11::_get_platform_surface_extension() const {
return VK_KHR_XLIB_SURFACE_EXTENSION_NAME;
}
RenderingContextDriver::SurfaceID RenderingContextDriverVulkanX11::surface_create(const void *p_platform_data) {
const WindowPlatformData *wpd = (const WindowPlatformData *)(p_platform_data);
VkXlibSurfaceCreateInfoKHR create_info = {};
create_info.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;
create_info.dpy = wpd->display;
create_info.window = wpd->window;
VkSurfaceKHR vk_surface = VK_NULL_HANDLE;
VkResult err = vkCreateXlibSurfaceKHR(instance_get(), &create_info, get_allocation_callbacks(VK_OBJECT_TYPE_SURFACE_KHR), &vk_surface);
ERR_FAIL_COND_V(err != VK_SUCCESS, SurfaceID());
Surface *surface = memnew(Surface);
surface->vk_surface = vk_surface;
return SurfaceID(surface);
}
RenderingContextDriverVulkanX11::RenderingContextDriverVulkanX11() {
// Does nothing.
}
RenderingContextDriverVulkanX11::~RenderingContextDriverVulkanX11() {
// Does nothing.
}
#endif // VULKAN_ENABLED

View File

@@ -0,0 +1,56 @@
/**************************************************************************/
/* rendering_context_driver_vulkan_x11.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#pragma once
#ifdef VULKAN_ENABLED
#include "drivers/vulkan/rendering_context_driver_vulkan.h"
#include <X11/Xlib.h>
class RenderingContextDriverVulkanX11 : public RenderingContextDriverVulkan {
private:
virtual const char *_get_platform_surface_extension() const override final;
protected:
SurfaceID surface_create(const void *p_platform_data) override final;
public:
struct WindowPlatformData {
::Window window;
Display *display;
};
RenderingContextDriverVulkanX11();
~RenderingContextDriverVulkanX11();
};
#endif // VULKAN_ENABLED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,380 @@
#ifndef DYLIBLOAD_WRAPPER_XKBCOMMON
#define DYLIBLOAD_WRAPPER_XKBCOMMON
// This file is generated. Do not edit!
// see https://github.com/hpvb/dynload-wrapper for details
// generated by generate-wrapper.py 0.3 on 2023-01-30 10:40:26
// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.h --include ./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-compose.h --include ./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-keysyms.h --sys-include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.h" --sys-include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-compose.h" --sys-include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-keysyms.h" --soname libxkbcommon.so.0 --init-name xkbcommon --output-header ./platform/linuxbsd/xkbcommon-so_wrap.h --output-implementation ./platform/linuxbsd/xkbcommon-so_wrap.c
//
#include <stdint.h>
#define xkb_keysym_get_name xkb_keysym_get_name_dylibloader_orig_xkbcommon
#define xkb_keysym_from_name xkb_keysym_from_name_dylibloader_orig_xkbcommon
#define xkb_keysym_to_utf8 xkb_keysym_to_utf8_dylibloader_orig_xkbcommon
#define xkb_keysym_to_utf32 xkb_keysym_to_utf32_dylibloader_orig_xkbcommon
#define xkb_utf32_to_keysym xkb_utf32_to_keysym_dylibloader_orig_xkbcommon
#define xkb_keysym_to_upper xkb_keysym_to_upper_dylibloader_orig_xkbcommon
#define xkb_keysym_to_lower xkb_keysym_to_lower_dylibloader_orig_xkbcommon
#define xkb_context_new xkb_context_new_dylibloader_orig_xkbcommon
#define xkb_context_ref xkb_context_ref_dylibloader_orig_xkbcommon
#define xkb_context_unref xkb_context_unref_dylibloader_orig_xkbcommon
#define xkb_context_set_user_data xkb_context_set_user_data_dylibloader_orig_xkbcommon
#define xkb_context_get_user_data xkb_context_get_user_data_dylibloader_orig_xkbcommon
#define xkb_context_include_path_append xkb_context_include_path_append_dylibloader_orig_xkbcommon
#define xkb_context_include_path_append_default xkb_context_include_path_append_default_dylibloader_orig_xkbcommon
#define xkb_context_include_path_reset_defaults xkb_context_include_path_reset_defaults_dylibloader_orig_xkbcommon
#define xkb_context_include_path_clear xkb_context_include_path_clear_dylibloader_orig_xkbcommon
#define xkb_context_num_include_paths xkb_context_num_include_paths_dylibloader_orig_xkbcommon
#define xkb_context_include_path_get xkb_context_include_path_get_dylibloader_orig_xkbcommon
#define xkb_context_set_log_level xkb_context_set_log_level_dylibloader_orig_xkbcommon
#define xkb_context_get_log_level xkb_context_get_log_level_dylibloader_orig_xkbcommon
#define xkb_context_set_log_verbosity xkb_context_set_log_verbosity_dylibloader_orig_xkbcommon
#define xkb_context_get_log_verbosity xkb_context_get_log_verbosity_dylibloader_orig_xkbcommon
#define xkb_context_set_log_fn xkb_context_set_log_fn_dylibloader_orig_xkbcommon
#define xkb_keymap_new_from_names xkb_keymap_new_from_names_dylibloader_orig_xkbcommon
#define xkb_keymap_new_from_file xkb_keymap_new_from_file_dylibloader_orig_xkbcommon
#define xkb_keymap_new_from_string xkb_keymap_new_from_string_dylibloader_orig_xkbcommon
#define xkb_keymap_new_from_buffer xkb_keymap_new_from_buffer_dylibloader_orig_xkbcommon
#define xkb_keymap_ref xkb_keymap_ref_dylibloader_orig_xkbcommon
#define xkb_keymap_unref xkb_keymap_unref_dylibloader_orig_xkbcommon
#define xkb_keymap_get_as_string xkb_keymap_get_as_string_dylibloader_orig_xkbcommon
#define xkb_keymap_min_keycode xkb_keymap_min_keycode_dylibloader_orig_xkbcommon
#define xkb_keymap_max_keycode xkb_keymap_max_keycode_dylibloader_orig_xkbcommon
#define xkb_keymap_key_for_each xkb_keymap_key_for_each_dylibloader_orig_xkbcommon
#define xkb_keymap_key_get_name xkb_keymap_key_get_name_dylibloader_orig_xkbcommon
#define xkb_keymap_key_by_name xkb_keymap_key_by_name_dylibloader_orig_xkbcommon
#define xkb_keymap_num_mods xkb_keymap_num_mods_dylibloader_orig_xkbcommon
#define xkb_keymap_mod_get_name xkb_keymap_mod_get_name_dylibloader_orig_xkbcommon
#define xkb_keymap_mod_get_index xkb_keymap_mod_get_index_dylibloader_orig_xkbcommon
#define xkb_keymap_num_layouts xkb_keymap_num_layouts_dylibloader_orig_xkbcommon
#define xkb_keymap_layout_get_name xkb_keymap_layout_get_name_dylibloader_orig_xkbcommon
#define xkb_keymap_layout_get_index xkb_keymap_layout_get_index_dylibloader_orig_xkbcommon
#define xkb_keymap_num_leds xkb_keymap_num_leds_dylibloader_orig_xkbcommon
#define xkb_keymap_led_get_name xkb_keymap_led_get_name_dylibloader_orig_xkbcommon
#define xkb_keymap_led_get_index xkb_keymap_led_get_index_dylibloader_orig_xkbcommon
#define xkb_keymap_num_layouts_for_key xkb_keymap_num_layouts_for_key_dylibloader_orig_xkbcommon
#define xkb_keymap_num_levels_for_key xkb_keymap_num_levels_for_key_dylibloader_orig_xkbcommon
#define xkb_keymap_key_get_mods_for_level xkb_keymap_key_get_mods_for_level_dylibloader_orig_xkbcommon
#define xkb_keymap_key_get_syms_by_level xkb_keymap_key_get_syms_by_level_dylibloader_orig_xkbcommon
#define xkb_keymap_key_repeats xkb_keymap_key_repeats_dylibloader_orig_xkbcommon
#define xkb_state_new xkb_state_new_dylibloader_orig_xkbcommon
#define xkb_state_ref xkb_state_ref_dylibloader_orig_xkbcommon
#define xkb_state_unref xkb_state_unref_dylibloader_orig_xkbcommon
#define xkb_state_get_keymap xkb_state_get_keymap_dylibloader_orig_xkbcommon
#define xkb_state_update_key xkb_state_update_key_dylibloader_orig_xkbcommon
#define xkb_state_update_mask xkb_state_update_mask_dylibloader_orig_xkbcommon
#define xkb_state_key_get_syms xkb_state_key_get_syms_dylibloader_orig_xkbcommon
#define xkb_state_key_get_utf8 xkb_state_key_get_utf8_dylibloader_orig_xkbcommon
#define xkb_state_key_get_utf32 xkb_state_key_get_utf32_dylibloader_orig_xkbcommon
#define xkb_state_key_get_one_sym xkb_state_key_get_one_sym_dylibloader_orig_xkbcommon
#define xkb_state_key_get_layout xkb_state_key_get_layout_dylibloader_orig_xkbcommon
#define xkb_state_key_get_level xkb_state_key_get_level_dylibloader_orig_xkbcommon
#define xkb_state_serialize_mods xkb_state_serialize_mods_dylibloader_orig_xkbcommon
#define xkb_state_serialize_layout xkb_state_serialize_layout_dylibloader_orig_xkbcommon
#define xkb_state_mod_name_is_active xkb_state_mod_name_is_active_dylibloader_orig_xkbcommon
#define xkb_state_mod_names_are_active xkb_state_mod_names_are_active_dylibloader_orig_xkbcommon
#define xkb_state_mod_index_is_active xkb_state_mod_index_is_active_dylibloader_orig_xkbcommon
#define xkb_state_mod_indices_are_active xkb_state_mod_indices_are_active_dylibloader_orig_xkbcommon
#define xkb_state_key_get_consumed_mods2 xkb_state_key_get_consumed_mods2_dylibloader_orig_xkbcommon
#define xkb_state_key_get_consumed_mods xkb_state_key_get_consumed_mods_dylibloader_orig_xkbcommon
#define xkb_state_mod_index_is_consumed2 xkb_state_mod_index_is_consumed2_dylibloader_orig_xkbcommon
#define xkb_state_mod_index_is_consumed xkb_state_mod_index_is_consumed_dylibloader_orig_xkbcommon
#define xkb_state_mod_mask_remove_consumed xkb_state_mod_mask_remove_consumed_dylibloader_orig_xkbcommon
#define xkb_state_layout_name_is_active xkb_state_layout_name_is_active_dylibloader_orig_xkbcommon
#define xkb_state_layout_index_is_active xkb_state_layout_index_is_active_dylibloader_orig_xkbcommon
#define xkb_state_led_name_is_active xkb_state_led_name_is_active_dylibloader_orig_xkbcommon
#define xkb_state_led_index_is_active xkb_state_led_index_is_active_dylibloader_orig_xkbcommon
#define xkb_compose_table_new_from_locale xkb_compose_table_new_from_locale_dylibloader_orig_xkbcommon
#define xkb_compose_table_new_from_file xkb_compose_table_new_from_file_dylibloader_orig_xkbcommon
#define xkb_compose_table_new_from_buffer xkb_compose_table_new_from_buffer_dylibloader_orig_xkbcommon
#define xkb_compose_table_ref xkb_compose_table_ref_dylibloader_orig_xkbcommon
#define xkb_compose_table_unref xkb_compose_table_unref_dylibloader_orig_xkbcommon
#define xkb_compose_state_new xkb_compose_state_new_dylibloader_orig_xkbcommon
#define xkb_compose_state_ref xkb_compose_state_ref_dylibloader_orig_xkbcommon
#define xkb_compose_state_unref xkb_compose_state_unref_dylibloader_orig_xkbcommon
#define xkb_compose_state_get_compose_table xkb_compose_state_get_compose_table_dylibloader_orig_xkbcommon
#define xkb_compose_state_feed xkb_compose_state_feed_dylibloader_orig_xkbcommon
#define xkb_compose_state_reset xkb_compose_state_reset_dylibloader_orig_xkbcommon
#define xkb_compose_state_get_status xkb_compose_state_get_status_dylibloader_orig_xkbcommon
#define xkb_compose_state_get_utf8 xkb_compose_state_get_utf8_dylibloader_orig_xkbcommon
#define xkb_compose_state_get_one_sym xkb_compose_state_get_one_sym_dylibloader_orig_xkbcommon
#include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.h"
#include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-compose.h"
#include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-keysyms.h"
#undef xkb_keysym_get_name
#undef xkb_keysym_from_name
#undef xkb_keysym_to_utf8
#undef xkb_keysym_to_utf32
#undef xkb_utf32_to_keysym
#undef xkb_keysym_to_upper
#undef xkb_keysym_to_lower
#undef xkb_context_new
#undef xkb_context_ref
#undef xkb_context_unref
#undef xkb_context_set_user_data
#undef xkb_context_get_user_data
#undef xkb_context_include_path_append
#undef xkb_context_include_path_append_default
#undef xkb_context_include_path_reset_defaults
#undef xkb_context_include_path_clear
#undef xkb_context_num_include_paths
#undef xkb_context_include_path_get
#undef xkb_context_set_log_level
#undef xkb_context_get_log_level
#undef xkb_context_set_log_verbosity
#undef xkb_context_get_log_verbosity
#undef xkb_context_set_log_fn
#undef xkb_keymap_new_from_names
#undef xkb_keymap_new_from_file
#undef xkb_keymap_new_from_string
#undef xkb_keymap_new_from_buffer
#undef xkb_keymap_ref
#undef xkb_keymap_unref
#undef xkb_keymap_get_as_string
#undef xkb_keymap_min_keycode
#undef xkb_keymap_max_keycode
#undef xkb_keymap_key_for_each
#undef xkb_keymap_key_get_name
#undef xkb_keymap_key_by_name
#undef xkb_keymap_num_mods
#undef xkb_keymap_mod_get_name
#undef xkb_keymap_mod_get_index
#undef xkb_keymap_num_layouts
#undef xkb_keymap_layout_get_name
#undef xkb_keymap_layout_get_index
#undef xkb_keymap_num_leds
#undef xkb_keymap_led_get_name
#undef xkb_keymap_led_get_index
#undef xkb_keymap_num_layouts_for_key
#undef xkb_keymap_num_levels_for_key
#undef xkb_keymap_key_get_mods_for_level
#undef xkb_keymap_key_get_syms_by_level
#undef xkb_keymap_key_repeats
#undef xkb_state_new
#undef xkb_state_ref
#undef xkb_state_unref
#undef xkb_state_get_keymap
#undef xkb_state_update_key
#undef xkb_state_update_mask
#undef xkb_state_key_get_syms
#undef xkb_state_key_get_utf8
#undef xkb_state_key_get_utf32
#undef xkb_state_key_get_one_sym
#undef xkb_state_key_get_layout
#undef xkb_state_key_get_level
#undef xkb_state_serialize_mods
#undef xkb_state_serialize_layout
#undef xkb_state_mod_name_is_active
#undef xkb_state_mod_names_are_active
#undef xkb_state_mod_index_is_active
#undef xkb_state_mod_indices_are_active
#undef xkb_state_key_get_consumed_mods2
#undef xkb_state_key_get_consumed_mods
#undef xkb_state_mod_index_is_consumed2
#undef xkb_state_mod_index_is_consumed
#undef xkb_state_mod_mask_remove_consumed
#undef xkb_state_layout_name_is_active
#undef xkb_state_layout_index_is_active
#undef xkb_state_led_name_is_active
#undef xkb_state_led_index_is_active
#undef xkb_compose_table_new_from_locale
#undef xkb_compose_table_new_from_file
#undef xkb_compose_table_new_from_buffer
#undef xkb_compose_table_ref
#undef xkb_compose_table_unref
#undef xkb_compose_state_new
#undef xkb_compose_state_ref
#undef xkb_compose_state_unref
#undef xkb_compose_state_get_compose_table
#undef xkb_compose_state_feed
#undef xkb_compose_state_reset
#undef xkb_compose_state_get_status
#undef xkb_compose_state_get_utf8
#undef xkb_compose_state_get_one_sym
#ifdef __cplusplus
extern "C" {
#endif
#define xkb_keysym_get_name xkb_keysym_get_name_dylibloader_wrapper_xkbcommon
#define xkb_keysym_from_name xkb_keysym_from_name_dylibloader_wrapper_xkbcommon
#define xkb_keysym_to_utf8 xkb_keysym_to_utf8_dylibloader_wrapper_xkbcommon
#define xkb_keysym_to_utf32 xkb_keysym_to_utf32_dylibloader_wrapper_xkbcommon
#define xkb_utf32_to_keysym xkb_utf32_to_keysym_dylibloader_wrapper_xkbcommon
#define xkb_keysym_to_upper xkb_keysym_to_upper_dylibloader_wrapper_xkbcommon
#define xkb_keysym_to_lower xkb_keysym_to_lower_dylibloader_wrapper_xkbcommon
#define xkb_context_new xkb_context_new_dylibloader_wrapper_xkbcommon
#define xkb_context_ref xkb_context_ref_dylibloader_wrapper_xkbcommon
#define xkb_context_unref xkb_context_unref_dylibloader_wrapper_xkbcommon
#define xkb_context_set_user_data xkb_context_set_user_data_dylibloader_wrapper_xkbcommon
#define xkb_context_get_user_data xkb_context_get_user_data_dylibloader_wrapper_xkbcommon
#define xkb_context_include_path_append xkb_context_include_path_append_dylibloader_wrapper_xkbcommon
#define xkb_context_include_path_append_default xkb_context_include_path_append_default_dylibloader_wrapper_xkbcommon
#define xkb_context_include_path_reset_defaults xkb_context_include_path_reset_defaults_dylibloader_wrapper_xkbcommon
#define xkb_context_include_path_clear xkb_context_include_path_clear_dylibloader_wrapper_xkbcommon
#define xkb_context_num_include_paths xkb_context_num_include_paths_dylibloader_wrapper_xkbcommon
#define xkb_context_include_path_get xkb_context_include_path_get_dylibloader_wrapper_xkbcommon
#define xkb_context_set_log_level xkb_context_set_log_level_dylibloader_wrapper_xkbcommon
#define xkb_context_get_log_level xkb_context_get_log_level_dylibloader_wrapper_xkbcommon
#define xkb_context_set_log_verbosity xkb_context_set_log_verbosity_dylibloader_wrapper_xkbcommon
#define xkb_context_get_log_verbosity xkb_context_get_log_verbosity_dylibloader_wrapper_xkbcommon
#define xkb_context_set_log_fn xkb_context_set_log_fn_dylibloader_wrapper_xkbcommon
#define xkb_keymap_new_from_names xkb_keymap_new_from_names_dylibloader_wrapper_xkbcommon
#define xkb_keymap_new_from_file xkb_keymap_new_from_file_dylibloader_wrapper_xkbcommon
#define xkb_keymap_new_from_string xkb_keymap_new_from_string_dylibloader_wrapper_xkbcommon
#define xkb_keymap_new_from_buffer xkb_keymap_new_from_buffer_dylibloader_wrapper_xkbcommon
#define xkb_keymap_ref xkb_keymap_ref_dylibloader_wrapper_xkbcommon
#define xkb_keymap_unref xkb_keymap_unref_dylibloader_wrapper_xkbcommon
#define xkb_keymap_get_as_string xkb_keymap_get_as_string_dylibloader_wrapper_xkbcommon
#define xkb_keymap_min_keycode xkb_keymap_min_keycode_dylibloader_wrapper_xkbcommon
#define xkb_keymap_max_keycode xkb_keymap_max_keycode_dylibloader_wrapper_xkbcommon
#define xkb_keymap_key_for_each xkb_keymap_key_for_each_dylibloader_wrapper_xkbcommon
#define xkb_keymap_key_get_name xkb_keymap_key_get_name_dylibloader_wrapper_xkbcommon
#define xkb_keymap_key_by_name xkb_keymap_key_by_name_dylibloader_wrapper_xkbcommon
#define xkb_keymap_num_mods xkb_keymap_num_mods_dylibloader_wrapper_xkbcommon
#define xkb_keymap_mod_get_name xkb_keymap_mod_get_name_dylibloader_wrapper_xkbcommon
#define xkb_keymap_mod_get_index xkb_keymap_mod_get_index_dylibloader_wrapper_xkbcommon
#define xkb_keymap_num_layouts xkb_keymap_num_layouts_dylibloader_wrapper_xkbcommon
#define xkb_keymap_layout_get_name xkb_keymap_layout_get_name_dylibloader_wrapper_xkbcommon
#define xkb_keymap_layout_get_index xkb_keymap_layout_get_index_dylibloader_wrapper_xkbcommon
#define xkb_keymap_num_leds xkb_keymap_num_leds_dylibloader_wrapper_xkbcommon
#define xkb_keymap_led_get_name xkb_keymap_led_get_name_dylibloader_wrapper_xkbcommon
#define xkb_keymap_led_get_index xkb_keymap_led_get_index_dylibloader_wrapper_xkbcommon
#define xkb_keymap_num_layouts_for_key xkb_keymap_num_layouts_for_key_dylibloader_wrapper_xkbcommon
#define xkb_keymap_num_levels_for_key xkb_keymap_num_levels_for_key_dylibloader_wrapper_xkbcommon
#define xkb_keymap_key_get_mods_for_level xkb_keymap_key_get_mods_for_level_dylibloader_wrapper_xkbcommon
#define xkb_keymap_key_get_syms_by_level xkb_keymap_key_get_syms_by_level_dylibloader_wrapper_xkbcommon
#define xkb_keymap_key_repeats xkb_keymap_key_repeats_dylibloader_wrapper_xkbcommon
#define xkb_state_new xkb_state_new_dylibloader_wrapper_xkbcommon
#define xkb_state_ref xkb_state_ref_dylibloader_wrapper_xkbcommon
#define xkb_state_unref xkb_state_unref_dylibloader_wrapper_xkbcommon
#define xkb_state_get_keymap xkb_state_get_keymap_dylibloader_wrapper_xkbcommon
#define xkb_state_update_key xkb_state_update_key_dylibloader_wrapper_xkbcommon
#define xkb_state_update_mask xkb_state_update_mask_dylibloader_wrapper_xkbcommon
#define xkb_state_key_get_syms xkb_state_key_get_syms_dylibloader_wrapper_xkbcommon
#define xkb_state_key_get_utf8 xkb_state_key_get_utf8_dylibloader_wrapper_xkbcommon
#define xkb_state_key_get_utf32 xkb_state_key_get_utf32_dylibloader_wrapper_xkbcommon
#define xkb_state_key_get_one_sym xkb_state_key_get_one_sym_dylibloader_wrapper_xkbcommon
#define xkb_state_key_get_layout xkb_state_key_get_layout_dylibloader_wrapper_xkbcommon
#define xkb_state_key_get_level xkb_state_key_get_level_dylibloader_wrapper_xkbcommon
#define xkb_state_serialize_mods xkb_state_serialize_mods_dylibloader_wrapper_xkbcommon
#define xkb_state_serialize_layout xkb_state_serialize_layout_dylibloader_wrapper_xkbcommon
#define xkb_state_mod_name_is_active xkb_state_mod_name_is_active_dylibloader_wrapper_xkbcommon
#define xkb_state_mod_names_are_active xkb_state_mod_names_are_active_dylibloader_wrapper_xkbcommon
#define xkb_state_mod_index_is_active xkb_state_mod_index_is_active_dylibloader_wrapper_xkbcommon
#define xkb_state_mod_indices_are_active xkb_state_mod_indices_are_active_dylibloader_wrapper_xkbcommon
#define xkb_state_key_get_consumed_mods2 xkb_state_key_get_consumed_mods2_dylibloader_wrapper_xkbcommon
#define xkb_state_key_get_consumed_mods xkb_state_key_get_consumed_mods_dylibloader_wrapper_xkbcommon
#define xkb_state_mod_index_is_consumed2 xkb_state_mod_index_is_consumed2_dylibloader_wrapper_xkbcommon
#define xkb_state_mod_index_is_consumed xkb_state_mod_index_is_consumed_dylibloader_wrapper_xkbcommon
#define xkb_state_mod_mask_remove_consumed xkb_state_mod_mask_remove_consumed_dylibloader_wrapper_xkbcommon
#define xkb_state_layout_name_is_active xkb_state_layout_name_is_active_dylibloader_wrapper_xkbcommon
#define xkb_state_layout_index_is_active xkb_state_layout_index_is_active_dylibloader_wrapper_xkbcommon
#define xkb_state_led_name_is_active xkb_state_led_name_is_active_dylibloader_wrapper_xkbcommon
#define xkb_state_led_index_is_active xkb_state_led_index_is_active_dylibloader_wrapper_xkbcommon
#define xkb_compose_table_new_from_locale xkb_compose_table_new_from_locale_dylibloader_wrapper_xkbcommon
#define xkb_compose_table_new_from_file xkb_compose_table_new_from_file_dylibloader_wrapper_xkbcommon
#define xkb_compose_table_new_from_buffer xkb_compose_table_new_from_buffer_dylibloader_wrapper_xkbcommon
#define xkb_compose_table_ref xkb_compose_table_ref_dylibloader_wrapper_xkbcommon
#define xkb_compose_table_unref xkb_compose_table_unref_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_new xkb_compose_state_new_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_ref xkb_compose_state_ref_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_unref xkb_compose_state_unref_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_get_compose_table xkb_compose_state_get_compose_table_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_feed xkb_compose_state_feed_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_reset xkb_compose_state_reset_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_get_status xkb_compose_state_get_status_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_get_utf8 xkb_compose_state_get_utf8_dylibloader_wrapper_xkbcommon
#define xkb_compose_state_get_one_sym xkb_compose_state_get_one_sym_dylibloader_wrapper_xkbcommon
extern int (*xkb_keysym_get_name_dylibloader_wrapper_xkbcommon)( xkb_keysym_t, char*, size_t);
extern xkb_keysym_t (*xkb_keysym_from_name_dylibloader_wrapper_xkbcommon)(const char*,enum xkb_keysym_flags);
extern int (*xkb_keysym_to_utf8_dylibloader_wrapper_xkbcommon)( xkb_keysym_t, char*, size_t);
extern uint32_t (*xkb_keysym_to_utf32_dylibloader_wrapper_xkbcommon)( xkb_keysym_t);
extern xkb_keysym_t (*xkb_utf32_to_keysym_dylibloader_wrapper_xkbcommon)( uint32_t);
extern xkb_keysym_t (*xkb_keysym_to_upper_dylibloader_wrapper_xkbcommon)( xkb_keysym_t);
extern xkb_keysym_t (*xkb_keysym_to_lower_dylibloader_wrapper_xkbcommon)( xkb_keysym_t);
extern struct xkb_context* (*xkb_context_new_dylibloader_wrapper_xkbcommon)(enum xkb_context_flags);
extern struct xkb_context* (*xkb_context_ref_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern void (*xkb_context_unref_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern void (*xkb_context_set_user_data_dylibloader_wrapper_xkbcommon)(struct xkb_context*, void*);
extern void* (*xkb_context_get_user_data_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern int (*xkb_context_include_path_append_dylibloader_wrapper_xkbcommon)(struct xkb_context*,const char*);
extern int (*xkb_context_include_path_append_default_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern int (*xkb_context_include_path_reset_defaults_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern void (*xkb_context_include_path_clear_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern unsigned int (*xkb_context_num_include_paths_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern const char* (*xkb_context_include_path_get_dylibloader_wrapper_xkbcommon)(struct xkb_context*, unsigned int);
extern void (*xkb_context_set_log_level_dylibloader_wrapper_xkbcommon)(struct xkb_context*,enum xkb_log_level);
extern enum xkb_log_level (*xkb_context_get_log_level_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern void (*xkb_context_set_log_verbosity_dylibloader_wrapper_xkbcommon)(struct xkb_context*, int);
extern int (*xkb_context_get_log_verbosity_dylibloader_wrapper_xkbcommon)(struct xkb_context*);
extern void (*xkb_context_set_log_fn_dylibloader_wrapper_xkbcommon)(struct xkb_context*, void*);
extern struct xkb_keymap* (*xkb_keymap_new_from_names_dylibloader_wrapper_xkbcommon)(struct xkb_context*,struct xkb_rule_names*,enum xkb_keymap_compile_flags);
extern struct xkb_keymap* (*xkb_keymap_new_from_file_dylibloader_wrapper_xkbcommon)(struct xkb_context*, FILE*,enum xkb_keymap_format,enum xkb_keymap_compile_flags);
extern struct xkb_keymap* (*xkb_keymap_new_from_string_dylibloader_wrapper_xkbcommon)(struct xkb_context*,const char*,enum xkb_keymap_format,enum xkb_keymap_compile_flags);
extern struct xkb_keymap* (*xkb_keymap_new_from_buffer_dylibloader_wrapper_xkbcommon)(struct xkb_context*,const char*, size_t,enum xkb_keymap_format,enum xkb_keymap_compile_flags);
extern struct xkb_keymap* (*xkb_keymap_ref_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*);
extern void (*xkb_keymap_unref_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*);
extern char* (*xkb_keymap_get_as_string_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,enum xkb_keymap_format);
extern xkb_keycode_t (*xkb_keymap_min_keycode_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*);
extern xkb_keycode_t (*xkb_keymap_max_keycode_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*);
extern void (*xkb_keymap_key_for_each_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keymap_key_iter_t, void*);
extern const char* (*xkb_keymap_key_get_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t);
extern xkb_keycode_t (*xkb_keymap_key_by_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,const char*);
extern xkb_mod_index_t (*xkb_keymap_num_mods_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*);
extern const char* (*xkb_keymap_mod_get_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_mod_index_t);
extern xkb_mod_index_t (*xkb_keymap_mod_get_index_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,const char*);
extern xkb_layout_index_t (*xkb_keymap_num_layouts_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*);
extern const char* (*xkb_keymap_layout_get_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_layout_index_t);
extern xkb_layout_index_t (*xkb_keymap_layout_get_index_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,const char*);
extern xkb_led_index_t (*xkb_keymap_num_leds_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*);
extern const char* (*xkb_keymap_led_get_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_led_index_t);
extern xkb_led_index_t (*xkb_keymap_led_get_index_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,const char*);
extern xkb_layout_index_t (*xkb_keymap_num_layouts_for_key_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t);
extern xkb_level_index_t (*xkb_keymap_num_levels_for_key_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t, xkb_layout_index_t);
extern size_t (*xkb_keymap_key_get_mods_for_level_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t, xkb_layout_index_t, xkb_level_index_t, xkb_mod_mask_t*, size_t);
extern int (*xkb_keymap_key_get_syms_by_level_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t, xkb_layout_index_t, xkb_level_index_t,const xkb_keysym_t**);
extern int (*xkb_keymap_key_repeats_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t);
extern struct xkb_state* (*xkb_state_new_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*);
extern struct xkb_state* (*xkb_state_ref_dylibloader_wrapper_xkbcommon)(struct xkb_state*);
extern void (*xkb_state_unref_dylibloader_wrapper_xkbcommon)(struct xkb_state*);
extern struct xkb_keymap* (*xkb_state_get_keymap_dylibloader_wrapper_xkbcommon)(struct xkb_state*);
extern enum xkb_state_component (*xkb_state_update_key_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t,enum xkb_key_direction);
extern enum xkb_state_component (*xkb_state_update_mask_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_mod_mask_t, xkb_mod_mask_t, xkb_mod_mask_t, xkb_layout_index_t, xkb_layout_index_t, xkb_layout_index_t);
extern int (*xkb_state_key_get_syms_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t,const xkb_keysym_t**);
extern int (*xkb_state_key_get_utf8_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, char*, size_t);
extern uint32_t (*xkb_state_key_get_utf32_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t);
extern xkb_keysym_t (*xkb_state_key_get_one_sym_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t);
extern xkb_layout_index_t (*xkb_state_key_get_layout_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t);
extern xkb_level_index_t (*xkb_state_key_get_level_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, xkb_layout_index_t);
extern xkb_mod_mask_t (*xkb_state_serialize_mods_dylibloader_wrapper_xkbcommon)(struct xkb_state*,enum xkb_state_component);
extern xkb_layout_index_t (*xkb_state_serialize_layout_dylibloader_wrapper_xkbcommon)(struct xkb_state*,enum xkb_state_component);
extern int (*xkb_state_mod_name_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,const char*,enum xkb_state_component);
extern int (*xkb_state_mod_names_are_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,enum xkb_state_component,enum xkb_state_match,...);
extern int (*xkb_state_mod_index_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_mod_index_t,enum xkb_state_component);
extern int (*xkb_state_mod_indices_are_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,enum xkb_state_component,enum xkb_state_match,...);
extern xkb_mod_mask_t (*xkb_state_key_get_consumed_mods2_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t,enum xkb_consumed_mode);
extern xkb_mod_mask_t (*xkb_state_key_get_consumed_mods_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t);
extern int (*xkb_state_mod_index_is_consumed2_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, xkb_mod_index_t,enum xkb_consumed_mode);
extern int (*xkb_state_mod_index_is_consumed_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, xkb_mod_index_t);
extern xkb_mod_mask_t (*xkb_state_mod_mask_remove_consumed_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, xkb_mod_mask_t);
extern int (*xkb_state_layout_name_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,const char*,enum xkb_state_component);
extern int (*xkb_state_layout_index_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_layout_index_t,enum xkb_state_component);
extern int (*xkb_state_led_name_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,const char*);
extern int (*xkb_state_led_index_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_led_index_t);
extern struct xkb_compose_table* (*xkb_compose_table_new_from_locale_dylibloader_wrapper_xkbcommon)(struct xkb_context*,const char*,enum xkb_compose_compile_flags);
extern struct xkb_compose_table* (*xkb_compose_table_new_from_file_dylibloader_wrapper_xkbcommon)(struct xkb_context*, FILE*,const char*,enum xkb_compose_format,enum xkb_compose_compile_flags);
extern struct xkb_compose_table* (*xkb_compose_table_new_from_buffer_dylibloader_wrapper_xkbcommon)(struct xkb_context*,const char*, size_t,const char*,enum xkb_compose_format,enum xkb_compose_compile_flags);
extern struct xkb_compose_table* (*xkb_compose_table_ref_dylibloader_wrapper_xkbcommon)(struct xkb_compose_table*);
extern void (*xkb_compose_table_unref_dylibloader_wrapper_xkbcommon)(struct xkb_compose_table*);
extern struct xkb_compose_state* (*xkb_compose_state_new_dylibloader_wrapper_xkbcommon)(struct xkb_compose_table*,enum xkb_compose_state_flags);
extern struct xkb_compose_state* (*xkb_compose_state_ref_dylibloader_wrapper_xkbcommon)(struct xkb_compose_state*);
extern void (*xkb_compose_state_unref_dylibloader_wrapper_xkbcommon)(struct xkb_compose_state*);
extern struct xkb_compose_table* (*xkb_compose_state_get_compose_table_dylibloader_wrapper_xkbcommon)(struct xkb_compose_state*);
extern enum xkb_compose_feed_result (*xkb_compose_state_feed_dylibloader_wrapper_xkbcommon)(struct xkb_compose_state*, xkb_keysym_t);
extern void (*xkb_compose_state_reset_dylibloader_wrapper_xkbcommon)(struct xkb_compose_state*);
extern enum xkb_compose_status (*xkb_compose_state_get_status_dylibloader_wrapper_xkbcommon)(struct xkb_compose_state*);
extern int (*xkb_compose_state_get_utf8_dylibloader_wrapper_xkbcommon)(struct xkb_compose_state*, char*, size_t);
extern xkb_keysym_t (*xkb_compose_state_get_one_sym_dylibloader_wrapper_xkbcommon)(struct xkb_compose_state*);
int initialize_xkbcommon(int verbose);
#ifdef __cplusplus
}
#endif
#endif