diff options
Diffstat (limited to 'platform/linuxbsd/x11')
21 files changed, 196 insertions, 1264 deletions
diff --git a/platform/linuxbsd/x11/SCsub b/platform/linuxbsd/x11/SCsub index d869ce9ecc..8b2e2aabe4 100644 --- a/platform/linuxbsd/x11/SCsub +++ b/platform/linuxbsd/x11/SCsub @@ -9,7 +9,6 @@ source_files = [ "dynwrappers/xcursor-so_wrap.c", "dynwrappers/xinerama-so_wrap.c", "dynwrappers/xinput2-so_wrap.c", - "dynwrappers/xkbcommon-so_wrap.c", "dynwrappers/xrandr-so_wrap.c", "dynwrappers/xrender-so_wrap.c", "dynwrappers/xext-so_wrap.c", diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index 9971fe8c79..c09da2f7b3 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -1324,14 +1324,20 @@ void DisplayServerX11::delete_sub_window(WindowID p_id) { } #endif - XDestroyWindow(x11_display, wd.x11_xim_window); - - XUnmapWindow(x11_display, wd.x11_window); - XDestroyWindow(x11_display, wd.x11_window); if (wd.xic) { XDestroyIC(wd.xic); wd.xic = nullptr; } + XDestroyWindow(x11_display, wd.x11_xim_window); + if (xkb_loaded) { + if (wd.xkb_state) { + xkb_compose_state_unref(wd.xkb_state); + wd.xkb_state = nullptr; + } + } + + XUnmapWindow(x11_display, wd.x11_window); + XDestroyWindow(x11_display, wd.x11_window); windows.erase(p_id); } @@ -2496,6 +2502,9 @@ void DisplayServerX11::window_set_ime_active(const bool p_active, WindowID p_win return; } if (!wd.focused) { + wd.ime_active = false; + im_text = String(); + im_selection = Vector2i(); return; } @@ -2512,7 +2521,7 @@ void DisplayServerX11::window_set_ime_active(const bool p_active, WindowID p_win XSync(x11_display, False); XGetWindowAttributes(x11_display, wd.x11_xim_window, &xwa); if (xwa.map_state == IsViewable) { - XSetInputFocus(x11_display, wd.x11_xim_window, RevertToPointerRoot, CurrentTime); + XSetInputFocus(x11_display, wd.x11_xim_window, RevertToParent, CurrentTime); } XSetICFocus(wd.xic); } else { @@ -2524,7 +2533,6 @@ void DisplayServerX11::window_set_ime_active(const bool p_active, WindowID p_win im_text = String(); im_selection = Vector2i(); } - OS_Unix::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_OS_IME_UPDATE); } void DisplayServerX11::window_set_ime_position(const Point2i &p_pos, WindowID p_window) { @@ -2931,9 +2939,10 @@ void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, xkeyevent_no_mod.state &= ~ShiftMask; xkeyevent_no_mod.state &= ~ControlMask; XLookupString(xkeyevent, str, 255, &keysym_unicode, nullptr); + XLookupString(&xkeyevent_no_mod, nullptr, 0, &keysym_keycode, nullptr); String keysym; - if (xkb_keysym_to_utf32 && xkb_keysym_to_upper) { + if (xkb_loaded) { KeySym keysym_unicode_nm = 0; // keysym used to find unicode XLookupString(&xkeyevent_no_mod, nullptr, 0, &keysym_unicode_nm, nullptr); keysym = String::chr(xkb_keysym_to_utf32(xkb_keysym_to_upper(keysym_unicode_nm))); @@ -3026,6 +3035,64 @@ void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, } } while (status == XBufferOverflow); #endif + } else if (xkeyevent->type == KeyPress && wd.xkb_state && xkb_loaded) { + xkb_compose_feed_result res = xkb_compose_state_feed(wd.xkb_state, keysym_unicode); + if (res == XKB_COMPOSE_FEED_ACCEPTED) { + if (xkb_compose_state_get_status(wd.xkb_state) == XKB_COMPOSE_COMPOSED) { + bool keypress = xkeyevent->type == KeyPress; + Key keycode = KeyMappingX11::get_keycode(keysym_keycode); + Key physical_keycode = KeyMappingX11::get_scancode(xkeyevent->keycode); + + if (keycode >= Key::A + 32 && keycode <= Key::Z + 32) { + keycode -= 'a' - 'A'; + } + + char str_xkb[256] = {}; + int str_xkb_size = xkb_compose_state_get_utf8(wd.xkb_state, str_xkb, 255); + + String tmp; + tmp.parse_utf8(str_xkb, str_xkb_size); + for (int i = 0; i < tmp.length(); i++) { + Ref<InputEventKey> k; + k.instantiate(); + if (physical_keycode == Key::NONE && keycode == Key::NONE && tmp[i] == 0) { + continue; + } + + if (keycode == Key::NONE) { + keycode = (Key)physical_keycode; + } + + _get_key_modifier_state(xkeyevent->state, k); + + k->set_window_id(p_window); + k->set_pressed(keypress); + + k->set_keycode(keycode); + k->set_physical_keycode(physical_keycode); + if (!keysym.is_empty()) { + k->set_key_label(fix_key_label(keysym[0], keycode)); + } else { + k->set_key_label(keycode); + } + if (keypress) { + k->set_unicode(fix_unicode(tmp[i])); + } + + k->set_echo(false); + + if (k->get_keycode() == Key::BACKTAB) { + //make it consistent across platforms. + k->set_keycode(Key::TAB); + k->set_physical_keycode(Key::TAB); + k->set_shift_pressed(true); + } + + Input::get_singleton()->parse_input_event(k); + } + return; + } + } } /* Phase 2, obtain a Godot keycode from the keysym */ @@ -3316,42 +3383,43 @@ void DisplayServerX11::_xim_preedit_draw_callback(::XIM xim, ::XPointer client_d WindowData &wd = ds->windows[window_id]; XIMText *xim_text = call_data->text; - if (xim_text != nullptr) { - String changed_text; - if (xim_text->encoding_is_wchar) { - changed_text = String(xim_text->string.wide_char); - } else { - changed_text.parse_utf8(xim_text->string.multi_byte); - } + if (wd.ime_active) { + if (xim_text != nullptr) { + String changed_text; + if (xim_text->encoding_is_wchar) { + changed_text = String(xim_text->string.wide_char); + } else { + changed_text.parse_utf8(xim_text->string.multi_byte); + } - if (call_data->chg_length < 0) { - ds->im_text = ds->im_text.substr(0, call_data->chg_first) + changed_text; - } else { - ds->im_text = ds->im_text.substr(0, call_data->chg_first) + changed_text + ds->im_text.substr(call_data->chg_length); - } + if (call_data->chg_length < 0) { + ds->im_text = ds->im_text.substr(0, call_data->chg_first) + changed_text; + } else { + ds->im_text = ds->im_text.substr(0, call_data->chg_first) + changed_text + ds->im_text.substr(call_data->chg_length); + } - // Find the start and end of the selection. - int start = 0, count = 0; - for (int i = 0; i < xim_text->length; i++) { - if (xim_text->feedback[i] & XIMReverse) { - if (count == 0) { - start = i; - count = 1; - } else { - count++; + // Find the start and end of the selection. + int start = 0, count = 0; + for (int i = 0; i < xim_text->length; i++) { + if (xim_text->feedback[i] & XIMReverse) { + if (count == 0) { + start = i; + count = 1; + } else { + count++; + } } } - } - if (count > 0) { - ds->im_selection = Point2i(start + call_data->chg_first, count); + if (count > 0) { + ds->im_selection = Point2i(start + call_data->chg_first, count); + } else { + ds->im_selection = Point2i(call_data->caret, 0); + } } else { - ds->im_selection = Point2i(call_data->caret, 0); + ds->im_text = String(); + ds->im_selection = Point2i(); } - } else { - ds->im_text = String(); - ds->im_selection = Point2i(); - } - if (wd.ime_active) { + OS_Unix::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_OS_IME_UPDATE); } } @@ -4856,7 +4924,15 @@ DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, V { wd.x11_window = XCreateWindow(x11_display, RootWindow(x11_display, visualInfo.screen), win_rect.position.x, win_rect.position.y, win_rect.size.width > 0 ? win_rect.size.width : 1, win_rect.size.height > 0 ? win_rect.size.height : 1, 0, visualInfo.depth, InputOutput, visualInfo.visual, valuemask, &windowAttributes); - wd.x11_xim_window = XCreateWindow(x11_display, wd.x11_window, 0, 0, 1, 1, 0, visualInfo.depth, InputOutput, visualInfo.visual, valuemask, &windowAttributes); + + XSetWindowAttributes window_attributes_ime = {}; + window_attributes_ime.event_mask = KeyPressMask | KeyReleaseMask | StructureNotifyMask | ExposureMask; + + wd.x11_xim_window = XCreateWindow(x11_display, wd.x11_window, 0, 0, 1, 1, 0, CopyFromParent, InputOnly, CopyFromParent, CWEventMask, &window_attributes_ime); + + if (dead_tbl && xkb_loaded) { + wd.xkb_state = xkb_compose_state_new(dead_tbl, XKB_COMPOSE_STATE_NO_FLAGS); + } // Enable receiving notification when the window is initialized (MapNotify) // so the focus can be set at the right time. @@ -5137,7 +5213,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode ERR_FAIL_MSG("Can't load XCursor dynamically."); } - initialize_xkbcommon(dylibloader_verbose); // Optional, used for key_label. + xkb_loaded = (initialize_xkbcommon(dylibloader_verbose) == 0); if (initialize_xext(dylibloader_verbose) != 0) { r_error = ERR_UNAVAILABLE; @@ -5164,6 +5240,23 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode ERR_FAIL_MSG("Can't load Xinput2 dynamically."); } + if (xkb_loaded) { + xkb_ctx = xkb_context_new(XKB_CONTEXT_NO_FLAGS); + if (xkb_ctx) { + const char *locale = getenv("LC_ALL"); + if (!locale || !*locale) { + locale = getenv("LC_CTYPE"); + } + if (!locale || !*locale) { + locale = getenv("LANG"); + } + if (!locale || !*locale) { + locale = "C"; + } + dead_tbl = xkb_compose_table_new_from_locale(xkb_ctx, locale, XKB_COMPOSE_COMPILE_NO_FLAGS); + } + } + Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events); r_error = OK; @@ -5604,10 +5697,26 @@ DisplayServerX11::~DisplayServerX11() { XDestroyIC(wd.xic); wd.xic = nullptr; } + XDestroyWindow(x11_display, wd.x11_xim_window); + if (xkb_loaded) { + if (wd.xkb_state) { + xkb_compose_state_unref(wd.xkb_state); + wd.xkb_state = nullptr; + } + } XUnmapWindow(x11_display, wd.x11_window); XDestroyWindow(x11_display, wd.x11_window); } + if (xkb_loaded) { + if (dead_tbl) { + xkb_compose_table_unref(dead_tbl); + } + if (xkb_ctx) { + xkb_context_unref(xkb_ctx); + } + } + //destroy drivers #if defined(VULKAN_ENABLED) if (rendering_device_vulkan) { diff --git a/platform/linuxbsd/x11/display_server_x11.h b/platform/linuxbsd/x11/display_server_x11.h index 290e3d6a5e..ea54b42262 100644 --- a/platform/linuxbsd/x11/display_server_x11.h +++ b/platform/linuxbsd/x11/display_server_x11.h @@ -75,10 +75,11 @@ #include "dynwrappers/xext-so_wrap.h" #include "dynwrappers/xinerama-so_wrap.h" #include "dynwrappers/xinput2-so_wrap.h" -#include "dynwrappers/xkbcommon-so_wrap.h" #include "dynwrappers/xrandr-so_wrap.h" #include "dynwrappers/xrender-so_wrap.h" +#include "../xkbcommon-so_wrap.h" + typedef struct _xrr_monitor_info { Atom name; Bool primary = false; @@ -141,6 +142,7 @@ class DisplayServerX11 : public DisplayServer { bool ime_active = false; bool ime_in_progress = false; bool ime_suppress_next_keyup = false; + xkb_compose_state *xkb_state = nullptr; Size2i min_size; Size2i max_size; @@ -184,6 +186,10 @@ class DisplayServerX11 : public DisplayServer { Point2i im_selection; String im_text; + bool xkb_loaded = false; + xkb_context *xkb_ctx = nullptr; + xkb_compose_table *dead_tbl = nullptr; + HashMap<WindowID, WindowData> windows; unsigned int last_mouse_monitor_mask = 0; diff --git a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c index ecd2c25662..bba21b9cb7 100644 --- a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c @@ -1,7 +1,7 @@ // This file is generated. Do not edit! // see https://github.com/hpvb/dynload-wrapper for details -// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-23 15:09:53 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:09:53 +// 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 // // NOTE: Generated from Xcursor 1.2.0. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h index dc3684ff09..9f8d8bbca2 100644 --- a/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.h @@ -2,8 +2,8 @@ #define DYLIBLOAD_WRAPPER_XCURSOR // 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-23 15:09:53 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:09:53 +// 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 // // NOTE: Generated from Xcursor 1.2.0. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c index e9af9033a3..4e3349c574 100644 --- a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c @@ -1,7 +1,7 @@ // This file is generated. Do not edit! // see https://github.com/hpvb/dynload-wrapper for details -// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-23 15:11:29 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:11:29 +// 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 // // NOTE: Generated from Xext 1.3.5. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h index bbf23fff34..e535756d82 100644 --- a/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h @@ -2,8 +2,8 @@ #define DYLIBLOAD_WRAPPER_XEXT // 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-23 15:11:29 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:11:29 +// 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 // // NOTE: Generated from Xext 1.3.5. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c index ab53b232d6..850ed1fc6b 100644 --- a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c @@ -1,7 +1,7 @@ // This file is generated. Do not edit! // see https://github.com/hpvb/dynload-wrapper for details -// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-23 15:11:35 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:11:35 +// 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 // // NOTE: Generated from Xinerama 1.1.4. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h index 48d5cc44b7..e3cedfc8ad 100644 --- a/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h @@ -2,8 +2,8 @@ #define DYLIBLOAD_WRAPPER_XINERAMA // 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-23 15:11:35 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:11:35 +// 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 // // NOTE: Generated from Xinerama 1.1.4. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c index d37f2b4d94..fc08b97e3c 100644 --- a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c @@ -1,7 +1,7 @@ // This file is generated. Do not edit! // see https://github.com/hpvb/dynload-wrapper for details -// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-23 15:12:16 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:12:16 +// 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 // // NOTE: Generated from Xi 1.7.10. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h index e39661ffb9..571072c3cd 100644 --- a/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.h @@ -2,8 +2,8 @@ #define DYLIBLOAD_WRAPPER_XINPUT2 // 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-23 15:12:16 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:12:16 +// 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 // // NOTE: Generated from Xi 1.7.10. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xkbcommon-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xkbcommon-so_wrap.c deleted file mode 100644 index 601d4c5052..0000000000 --- a/platform/linuxbsd/x11/dynwrappers/xkbcommon-so_wrap.c +++ /dev/null @@ -1,859 +0,0 @@ -// 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-23 15:14:21 -// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.h --sys-include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.h" --soname libxkbcommon.so.0 --init-name xkbcommon --output-header ./platform/linuxbsd/x11/dynwrappers/xkbcommon-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/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 -#include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.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 -#include <dlfcn.h> -#include <stdio.h> -int (*xkb_keysym_get_name_dylibloader_wrapper_xkbcommon)( xkb_keysym_t, char*, size_t); -xkb_keysym_t (*xkb_keysym_from_name_dylibloader_wrapper_xkbcommon)(const char*,enum xkb_keysym_flags); -int (*xkb_keysym_to_utf8_dylibloader_wrapper_xkbcommon)( xkb_keysym_t, char*, size_t); -uint32_t (*xkb_keysym_to_utf32_dylibloader_wrapper_xkbcommon)( xkb_keysym_t); -xkb_keysym_t (*xkb_utf32_to_keysym_dylibloader_wrapper_xkbcommon)( uint32_t); -xkb_keysym_t (*xkb_keysym_to_upper_dylibloader_wrapper_xkbcommon)( xkb_keysym_t); -xkb_keysym_t (*xkb_keysym_to_lower_dylibloader_wrapper_xkbcommon)( xkb_keysym_t); -struct xkb_context* (*xkb_context_new_dylibloader_wrapper_xkbcommon)(enum xkb_context_flags); -struct xkb_context* (*xkb_context_ref_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -void (*xkb_context_unref_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -void (*xkb_context_set_user_data_dylibloader_wrapper_xkbcommon)(struct xkb_context*, void*); -void* (*xkb_context_get_user_data_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -int (*xkb_context_include_path_append_dylibloader_wrapper_xkbcommon)(struct xkb_context*,const char*); -int (*xkb_context_include_path_append_default_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -int (*xkb_context_include_path_reset_defaults_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -void (*xkb_context_include_path_clear_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -unsigned int (*xkb_context_num_include_paths_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -const char* (*xkb_context_include_path_get_dylibloader_wrapper_xkbcommon)(struct xkb_context*, unsigned int); -void (*xkb_context_set_log_level_dylibloader_wrapper_xkbcommon)(struct xkb_context*,enum xkb_log_level); -enum xkb_log_level (*xkb_context_get_log_level_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -void (*xkb_context_set_log_verbosity_dylibloader_wrapper_xkbcommon)(struct xkb_context*, int); -int (*xkb_context_get_log_verbosity_dylibloader_wrapper_xkbcommon)(struct xkb_context*); -void (*xkb_context_set_log_fn_dylibloader_wrapper_xkbcommon)(struct xkb_context*, void*); -struct xkb_keymap* (*xkb_keymap_new_from_names_dylibloader_wrapper_xkbcommon)(struct xkb_context*,struct xkb_rule_names*,enum xkb_keymap_compile_flags); -struct xkb_keymap* (*xkb_keymap_new_from_file_dylibloader_wrapper_xkbcommon)(struct xkb_context*, FILE*,enum xkb_keymap_format,enum xkb_keymap_compile_flags); -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); -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); -struct xkb_keymap* (*xkb_keymap_ref_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*); -void (*xkb_keymap_unref_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*); -char* (*xkb_keymap_get_as_string_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,enum xkb_keymap_format); -xkb_keycode_t (*xkb_keymap_min_keycode_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*); -xkb_keycode_t (*xkb_keymap_max_keycode_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*); -void (*xkb_keymap_key_for_each_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keymap_key_iter_t, void*); -const char* (*xkb_keymap_key_get_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t); -xkb_keycode_t (*xkb_keymap_key_by_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,const char*); -xkb_mod_index_t (*xkb_keymap_num_mods_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*); -const char* (*xkb_keymap_mod_get_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_mod_index_t); -xkb_mod_index_t (*xkb_keymap_mod_get_index_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,const char*); -xkb_layout_index_t (*xkb_keymap_num_layouts_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*); -const char* (*xkb_keymap_layout_get_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_layout_index_t); -xkb_layout_index_t (*xkb_keymap_layout_get_index_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,const char*); -xkb_led_index_t (*xkb_keymap_num_leds_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*); -const char* (*xkb_keymap_led_get_name_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_led_index_t); -xkb_led_index_t (*xkb_keymap_led_get_index_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*,const char*); -xkb_layout_index_t (*xkb_keymap_num_layouts_for_key_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t); -xkb_level_index_t (*xkb_keymap_num_levels_for_key_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t, xkb_layout_index_t); -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); -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**); -int (*xkb_keymap_key_repeats_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*, xkb_keycode_t); -struct xkb_state* (*xkb_state_new_dylibloader_wrapper_xkbcommon)(struct xkb_keymap*); -struct xkb_state* (*xkb_state_ref_dylibloader_wrapper_xkbcommon)(struct xkb_state*); -void (*xkb_state_unref_dylibloader_wrapper_xkbcommon)(struct xkb_state*); -struct xkb_keymap* (*xkb_state_get_keymap_dylibloader_wrapper_xkbcommon)(struct xkb_state*); -enum xkb_state_component (*xkb_state_update_key_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t,enum xkb_key_direction); -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); -int (*xkb_state_key_get_syms_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t,const xkb_keysym_t**); -int (*xkb_state_key_get_utf8_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, char*, size_t); -uint32_t (*xkb_state_key_get_utf32_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t); -xkb_keysym_t (*xkb_state_key_get_one_sym_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t); -xkb_layout_index_t (*xkb_state_key_get_layout_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t); -xkb_level_index_t (*xkb_state_key_get_level_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, xkb_layout_index_t); -xkb_mod_mask_t (*xkb_state_serialize_mods_dylibloader_wrapper_xkbcommon)(struct xkb_state*,enum xkb_state_component); -xkb_layout_index_t (*xkb_state_serialize_layout_dylibloader_wrapper_xkbcommon)(struct xkb_state*,enum xkb_state_component); -int (*xkb_state_mod_name_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,const char*,enum xkb_state_component); -int (*xkb_state_mod_names_are_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,enum xkb_state_component,enum xkb_state_match,...); -int (*xkb_state_mod_index_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_mod_index_t,enum xkb_state_component); -int (*xkb_state_mod_indices_are_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,enum xkb_state_component,enum xkb_state_match,...); -xkb_mod_mask_t (*xkb_state_key_get_consumed_mods2_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t,enum xkb_consumed_mode); -xkb_mod_mask_t (*xkb_state_key_get_consumed_mods_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t); -int (*xkb_state_mod_index_is_consumed2_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, xkb_mod_index_t,enum xkb_consumed_mode); -int (*xkb_state_mod_index_is_consumed_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, xkb_mod_index_t); -xkb_mod_mask_t (*xkb_state_mod_mask_remove_consumed_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_keycode_t, xkb_mod_mask_t); -int (*xkb_state_layout_name_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,const char*,enum xkb_state_component); -int (*xkb_state_layout_index_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_layout_index_t,enum xkb_state_component); -int (*xkb_state_led_name_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*,const char*); -int (*xkb_state_led_index_is_active_dylibloader_wrapper_xkbcommon)(struct xkb_state*, xkb_led_index_t); -int initialize_xkbcommon(int verbose) { - void *handle; - char *error; - handle = dlopen("libxkbcommon.so.0", RTLD_LAZY); - if (!handle) { - if (verbose) { - fprintf(stderr, "%s\n", dlerror()); - } - return(1); - } - dlerror(); -// xkb_keysym_get_name - *(void **) (&xkb_keysym_get_name_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keysym_get_name"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keysym_from_name - *(void **) (&xkb_keysym_from_name_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keysym_from_name"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keysym_to_utf8 - *(void **) (&xkb_keysym_to_utf8_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keysym_to_utf8"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keysym_to_utf32 - *(void **) (&xkb_keysym_to_utf32_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keysym_to_utf32"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_utf32_to_keysym - *(void **) (&xkb_utf32_to_keysym_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_utf32_to_keysym"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keysym_to_upper - *(void **) (&xkb_keysym_to_upper_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keysym_to_upper"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keysym_to_lower - *(void **) (&xkb_keysym_to_lower_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keysym_to_lower"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_new - *(void **) (&xkb_context_new_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_new"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_ref - *(void **) (&xkb_context_ref_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_ref"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_unref - *(void **) (&xkb_context_unref_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_unref"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_set_user_data - *(void **) (&xkb_context_set_user_data_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_set_user_data"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_get_user_data - *(void **) (&xkb_context_get_user_data_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_get_user_data"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_include_path_append - *(void **) (&xkb_context_include_path_append_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_include_path_append"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_include_path_append_default - *(void **) (&xkb_context_include_path_append_default_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_include_path_append_default"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_include_path_reset_defaults - *(void **) (&xkb_context_include_path_reset_defaults_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_include_path_reset_defaults"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_include_path_clear - *(void **) (&xkb_context_include_path_clear_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_include_path_clear"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_num_include_paths - *(void **) (&xkb_context_num_include_paths_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_num_include_paths"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_include_path_get - *(void **) (&xkb_context_include_path_get_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_include_path_get"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_set_log_level - *(void **) (&xkb_context_set_log_level_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_set_log_level"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_get_log_level - *(void **) (&xkb_context_get_log_level_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_get_log_level"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_set_log_verbosity - *(void **) (&xkb_context_set_log_verbosity_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_set_log_verbosity"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_get_log_verbosity - *(void **) (&xkb_context_get_log_verbosity_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_get_log_verbosity"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_context_set_log_fn - *(void **) (&xkb_context_set_log_fn_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_context_set_log_fn"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_new_from_names - *(void **) (&xkb_keymap_new_from_names_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_new_from_names"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_new_from_file - *(void **) (&xkb_keymap_new_from_file_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_new_from_file"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_new_from_string - *(void **) (&xkb_keymap_new_from_string_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_new_from_string"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_new_from_buffer - *(void **) (&xkb_keymap_new_from_buffer_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_new_from_buffer"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_ref - *(void **) (&xkb_keymap_ref_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_ref"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_unref - *(void **) (&xkb_keymap_unref_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_unref"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_get_as_string - *(void **) (&xkb_keymap_get_as_string_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_get_as_string"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_min_keycode - *(void **) (&xkb_keymap_min_keycode_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_min_keycode"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_max_keycode - *(void **) (&xkb_keymap_max_keycode_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_max_keycode"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_key_for_each - *(void **) (&xkb_keymap_key_for_each_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_key_for_each"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_key_get_name - *(void **) (&xkb_keymap_key_get_name_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_key_get_name"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_key_by_name - *(void **) (&xkb_keymap_key_by_name_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_key_by_name"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_num_mods - *(void **) (&xkb_keymap_num_mods_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_num_mods"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_mod_get_name - *(void **) (&xkb_keymap_mod_get_name_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_mod_get_name"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_mod_get_index - *(void **) (&xkb_keymap_mod_get_index_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_mod_get_index"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_num_layouts - *(void **) (&xkb_keymap_num_layouts_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_num_layouts"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_layout_get_name - *(void **) (&xkb_keymap_layout_get_name_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_layout_get_name"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_layout_get_index - *(void **) (&xkb_keymap_layout_get_index_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_layout_get_index"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_num_leds - *(void **) (&xkb_keymap_num_leds_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_num_leds"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_led_get_name - *(void **) (&xkb_keymap_led_get_name_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_led_get_name"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_led_get_index - *(void **) (&xkb_keymap_led_get_index_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_led_get_index"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_num_layouts_for_key - *(void **) (&xkb_keymap_num_layouts_for_key_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_num_layouts_for_key"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_num_levels_for_key - *(void **) (&xkb_keymap_num_levels_for_key_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_num_levels_for_key"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_key_get_mods_for_level - *(void **) (&xkb_keymap_key_get_mods_for_level_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_key_get_mods_for_level"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_key_get_syms_by_level - *(void **) (&xkb_keymap_key_get_syms_by_level_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_key_get_syms_by_level"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_keymap_key_repeats - *(void **) (&xkb_keymap_key_repeats_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_keymap_key_repeats"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_new - *(void **) (&xkb_state_new_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_new"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_ref - *(void **) (&xkb_state_ref_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_ref"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_unref - *(void **) (&xkb_state_unref_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_unref"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_get_keymap - *(void **) (&xkb_state_get_keymap_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_get_keymap"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_update_key - *(void **) (&xkb_state_update_key_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_update_key"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_update_mask - *(void **) (&xkb_state_update_mask_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_update_mask"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_key_get_syms - *(void **) (&xkb_state_key_get_syms_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_key_get_syms"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_key_get_utf8 - *(void **) (&xkb_state_key_get_utf8_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_key_get_utf8"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_key_get_utf32 - *(void **) (&xkb_state_key_get_utf32_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_key_get_utf32"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_key_get_one_sym - *(void **) (&xkb_state_key_get_one_sym_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_key_get_one_sym"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_key_get_layout - *(void **) (&xkb_state_key_get_layout_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_key_get_layout"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_key_get_level - *(void **) (&xkb_state_key_get_level_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_key_get_level"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_serialize_mods - *(void **) (&xkb_state_serialize_mods_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_serialize_mods"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_serialize_layout - *(void **) (&xkb_state_serialize_layout_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_serialize_layout"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_mod_name_is_active - *(void **) (&xkb_state_mod_name_is_active_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_mod_name_is_active"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_mod_names_are_active - *(void **) (&xkb_state_mod_names_are_active_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_mod_names_are_active"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_mod_index_is_active - *(void **) (&xkb_state_mod_index_is_active_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_mod_index_is_active"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_mod_indices_are_active - *(void **) (&xkb_state_mod_indices_are_active_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_mod_indices_are_active"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_key_get_consumed_mods2 - *(void **) (&xkb_state_key_get_consumed_mods2_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_key_get_consumed_mods2"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_key_get_consumed_mods - *(void **) (&xkb_state_key_get_consumed_mods_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_key_get_consumed_mods"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_mod_index_is_consumed2 - *(void **) (&xkb_state_mod_index_is_consumed2_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_mod_index_is_consumed2"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_mod_index_is_consumed - *(void **) (&xkb_state_mod_index_is_consumed_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_mod_index_is_consumed"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_mod_mask_remove_consumed - *(void **) (&xkb_state_mod_mask_remove_consumed_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_mod_mask_remove_consumed"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_layout_name_is_active - *(void **) (&xkb_state_layout_name_is_active_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_layout_name_is_active"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_layout_index_is_active - *(void **) (&xkb_state_layout_index_is_active_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_layout_index_is_active"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_led_name_is_active - *(void **) (&xkb_state_led_name_is_active_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_led_name_is_active"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -// xkb_state_led_index_is_active - *(void **) (&xkb_state_led_index_is_active_dylibloader_wrapper_xkbcommon) = dlsym(handle, "xkb_state_led_index_is_active"); - if (verbose) { - error = dlerror(); - if (error != NULL) { - fprintf(stderr, "%s\n", error); - } - } -return 0; -} diff --git a/platform/linuxbsd/x11/dynwrappers/xkbcommon-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xkbcommon-so_wrap.h deleted file mode 100644 index f7e6f4c4cf..0000000000 --- a/platform/linuxbsd/x11/dynwrappers/xkbcommon-so_wrap.h +++ /dev/null @@ -1,322 +0,0 @@ -#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 ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-23 15:14:21 -// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.h --sys-include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.h" --soname libxkbcommon.so.0 --init-name xkbcommon --output-header ./platform/linuxbsd/x11/dynwrappers/xkbcommon-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/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 -#include "./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.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 -#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 -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); -int initialize_xkbcommon(int verbose); -#ifdef __cplusplus -} -#endif -#endif diff --git a/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c index a746b6c526..d2838569b0 100644 --- a/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c @@ -1,7 +1,7 @@ // This file is generated. Do not edit! // see https://github.com/hpvb/dynload-wrapper for details -// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-23 15:13:26 -// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/Xlib.h --include ./thirdparty/linuxbsd_headers/X11/Xutil.h --include ./thirdparty/linuxbsd_headers/X11/XKBlib.h --sys-include "thirdparty/linuxbsd_headers/X11/Xlib.h" --sys-include "thirdparty/linuxbsd_headers/X11/Xutil.h" --sys-include "thirdparty/linuxbsd_headers/X11/XKBlib.h" --soname libX11.so.6 --init-name xlib --omit-prefix XkbGetDeviceIndicatorState --omit-prefix XkbAddSymInterpret --output-header ./platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c~ +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:13:26 +// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/Xlib.h --include ./thirdparty/linuxbsd_headers/X11/Xutil.h --include ./thirdparty/linuxbsd_headers/X11/XKBlib.h --sys-include "thirdparty/linuxbsd_headers/X11/Xlib.h" --sys-include "thirdparty/linuxbsd_headers/X11/Xutil.h" --sys-include "thirdparty/linuxbsd_headers/X11/XKBlib.h" --soname libX11.so.6 --init-name xlib --omit-prefix XkbGetDeviceIndicatorState --omit-prefix XkbAddSymInterpret --output-header ./platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c~ // // NOTE: Generated from Xlib 1.6.9. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h index b40a25f601..5bad21002d 100644 --- a/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h @@ -2,8 +2,8 @@ #define DYLIBLOAD_WRAPPER_XLIB // 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-23 15:13:26 -// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/Xlib.h --include ./thirdparty/linuxbsd_headers/X11/Xutil.h --include ./thirdparty/linuxbsd_headers/X11/XKBlib.h --sys-include "thirdparty/linuxbsd_headers/X11/Xlib.h" --sys-include "thirdparty/linuxbsd_headers/X11/Xutil.h" --sys-include "thirdparty/linuxbsd_headers/X11/XKBlib.h" --soname libX11.so.6 --init-name xlib --omit-prefix XkbGetDeviceIndicatorState --omit-prefix XkbAddSymInterpret --output-header ./platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c~ +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:13:26 +// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/Xlib.h --include ./thirdparty/linuxbsd_headers/X11/Xutil.h --include ./thirdparty/linuxbsd_headers/X11/XKBlib.h --sys-include "thirdparty/linuxbsd_headers/X11/Xlib.h" --sys-include "thirdparty/linuxbsd_headers/X11/Xutil.h" --sys-include "thirdparty/linuxbsd_headers/X11/XKBlib.h" --soname libX11.so.6 --init-name xlib --omit-prefix XkbGetDeviceIndicatorState --omit-prefix XkbAddSymInterpret --output-header ./platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c~ // // NOTE: Generated from Xlib 1.6.9. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c index 21e30a03de..05f98d2506 100644 --- a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c @@ -1,7 +1,7 @@ // This file is generated. Do not edit! // see https://github.com/hpvb/dynload-wrapper for details -// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-23 15:13:54 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:13:54 +// 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 // // NOTE: Generated from Xrandr 1.5.2. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h index f301234b53..db5d44203d 100644 --- a/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.h @@ -2,8 +2,8 @@ #define DYLIBLOAD_WRAPPER_XRANDR // 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-23 15:13:54 -// flags: ../dynload-wrapper/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 +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:13:54 +// 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 // // NOTE: Generated from Xrandr 1.5.2. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c index 5c720bee21..7421f94601 100644 --- a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c +++ b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c @@ -1,7 +1,7 @@ // This file is generated. Do not edit! // see https://github.com/hpvb/dynload-wrapper for details -// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-23 15:14:14 -// flags: ../dynload-wrapper/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~ +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:14:14 +// 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~ // // NOTE: Generated from Xrender 0.9.10. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h index 29a8430476..5d3f695959 100644 --- a/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h +++ b/platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.h @@ -2,8 +2,8 @@ #define DYLIBLOAD_WRAPPER_XRENDER // 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-23 15:14:14 -// flags: ../dynload-wrapper/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~ +// generated by generate-wrapper.py 0.3 on 2023-01-23 15:14:14 +// 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~ // // NOTE: Generated from Xrender 0.9.10. // This has been handpatched to workaround some issues with the generator that diff --git a/platform/linuxbsd/x11/key_mapping_x11.cpp b/platform/linuxbsd/x11/key_mapping_x11.cpp index 506372292d..e5eba6ccad 100644 --- a/platform/linuxbsd/x11/key_mapping_x11.cpp +++ b/platform/linuxbsd/x11/key_mapping_x11.cpp @@ -30,20 +30,6 @@ #include "key_mapping_x11.h" -#include "core/templates/hash_map.h" - -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); } -}; - -HashMap<KeySym, Key, HashMapHasherKeys> xkeysym_map; -HashMap<unsigned int, Key, HashMapHasherKeys> scancode_map; -HashMap<Key, unsigned int, HashMapHasherKeys> scancode_map_inv; -HashMap<KeySym, char32_t, HashMapHasherKeys> xkeysym_unicode_map; - void KeyMappingX11::initialize() { // X11 Keysym to Godot Key map. diff --git a/platform/linuxbsd/x11/key_mapping_x11.h b/platform/linuxbsd/x11/key_mapping_x11.h index d4278a563c..48beefff4c 100644 --- a/platform/linuxbsd/x11/key_mapping_x11.h +++ b/platform/linuxbsd/x11/key_mapping_x11.h @@ -39,8 +39,21 @@ #include <X11/keysymdef.h> #include "core/os/keyboard.h" +#include "core/templates/hash_map.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; + KeyMappingX11() {} public: |