Godot Engine – Multi-platform 2D and 3D game engine
Update AccessKit to 0.22.3
Pāvels Nadtočajevs98284a8f10b0
diff --git a/misc/scripts/install_accesskit.py b/misc/scripts/install_accesskit.pyindex 41bb7a77065..b6b3e002848 100755--- a/misc/scripts/install_accesskit.py+++ b/misc/scripts/install_accesskit.py@@ -20,7 +20,7 @@ else:deps_folder = os.path.join("bin", "build_deps")# AccessKit-ac_version = "0.21.2"+ac_version = "0.22.3"# Create dependencies folderif not os.path.exists(deps_folder):diff --git a/thirdparty/README.md b/thirdparty/README.mdindex 954db2061f2..8f622238951 100644--- a/thirdparty/README.md+++ b/thirdparty/README.md@@ -8,7 +8,7 @@ readability.## accesskit- Upstream: https://github.com/AccessKit/accesskit-c-- Version: 0.21.2 (72460cd52d1b24492393cdf54a6f19d2fd63e258, 2026)+- Version: 0.22.3 (826d672661f9453c8b269ab3946dbcbae6300555, 2026)- License: MITFiles extracted from upstream source:diff --git a/thirdparty/accesskit/include/accesskit.h b/thirdparty/accesskit/include/accesskit.hindex eab9e353703..fb0af1ddf72 100644--- a/thirdparty/accesskit/include/accesskit.h+++ b/thirdparty/accesskit/include/accesskit.h@@ -19,6 +19,44 @@#ifdef __ANDROID__#include <jni.h>#endif+#ifdef __APPLE__+#include <TargetConditionals.h>+/* Older SDKs may not define all of these; force them to 0 so the+ value-based checks below are safe. */+#ifndef TARGET_OS_OSX+#define TARGET_OS_OSX 0+#endif+#ifndef TARGET_OS_IOS+#define TARGET_OS_IOS 0+#endif+#ifndef TARGET_OS_TV+#define TARGET_OS_TV 0+#endif+#ifndef TARGET_OS_WATCH+#define TARGET_OS_WATCH 0+#endif+#ifndef TARGET_OS_VISION+#define TARGET_OS_VISION 0+#endif+#ifndef TARGET_OS_MACCATALYST+#define TARGET_OS_MACCATALYST 0+#endif+#if TARGET_OS_OSX+#define ACCESSKIT_MACOS+#endif+#if TARGET_OS_IOS || TARGET_OS_MACCATALYST+#define ACCESSKIT_IOS+#endif+#if TARGET_OS_TV+#define ACCESSKIT_TVOS+#endif+#if TARGET_OS_WATCH+#define ACCESSKIT_WATCHOS+#endif+#if TARGET_OS_VISION+#define ACCESSKIT_VISIONOS+#endif+#endif /* __APPLE__ *//*** An action to be taken on an accessibility node.@@ -592,15 +630,31 @@ typedef struct accesskit_android_queued_events accesskit_android_queued_events;typedef struct accesskit_custom_action accesskit_custom_action;-#if defined(__APPLE__)+#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+typedef struct accesskit_ios_adapter accesskit_ios_adapter;+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+typedef struct accesskit_ios_queued_events accesskit_ios_queued_events;+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+typedef struct accesskit_ios_subclassing_adapter+ accesskit_ios_subclassing_adapter;+#endif++#if defined(ACCESSKIT_MACOS)typedef struct accesskit_macos_adapter accesskit_macos_adapter;#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)typedef struct accesskit_macos_queued_events accesskit_macos_queued_events;#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)typedef struct accesskit_macos_subclassing_adapteraccesskit_macos_subclassing_adapter;#endif@@ -2561,7 +2615,167 @@ void accesskit_android_injecting_adapter_update_if_active(void *update_factory_userdata);#endif-#if defined(__APPLE__)+#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * Memory is also freed when calling this function.+ */+void accesskit_ios_queued_events_raise(+ struct accesskit_ios_queued_events *events);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * This function must be called on the main thread.+ * All handlers will always be called on the main thread.+ *+ * # Safety+ *+ * `view` must be a valid, unreleased pointer to a `UIView`.+ */+struct accesskit_ios_adapter *accesskit_ios_adapter_new(+ void *view, accesskit_activation_handler_callback activation_handler,+ void *activation_handler_userdata,+ accesskit_action_handler_callback action_handler,+ void *action_handler_userdata,+ accesskit_deactivation_handler_callback deactivation_handler,+ void *deactivation_handler_userdata);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+void accesskit_ios_adapter_free(struct accesskit_ios_adapter *adapter);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * You must call `accesskit_ios_queued_events_raise` on the returned pointer. It+ * can be null if the adapter is not active.+ */+struct accesskit_ios_queued_events *accesskit_ios_adapter_update_if_active(+ struct accesskit_ios_adapter *adapter,+ accesskit_tree_update_factory update_factory,+ void *update_factory_userdata);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * Call this when the host view has just appeared on screen. If an+ * assistive technology is running, this proactively builds the+ * accessibility tree.+ *+ * You must call `accesskit_ios_queued_events_raise` on the returned pointer. It+ * can be null if the adapter is not active.+ */+struct accesskit_ios_queued_events *accesskit_ios_adapter_view_did_appear(+ struct accesskit_ios_adapter *adapter);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * Returns whether the view itself is an accessibility element.+ * This corresponds to `isAccessibilityElement`.+ */+bool accesskit_ios_adapter_is_accessibility_element(+ struct accesskit_ios_adapter *adapter);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * Returns a pointer to an `NSArray` of accessibility elements+ * contained in the view. Ownership of the pointer is not transferred.+ * This corresponds to `accessibilityElements`.+ */+void *accesskit_ios_adapter_accessibility_elements(+ struct accesskit_ios_adapter *adapter);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * Returns a pointer to the accessibility element at the specified point,+ * or null if none. Ownership of the pointer is not transferred.+ * This corresponds to `accessibilityHitTest:`.+ */+void *accesskit_ios_adapter_hit_test(struct accesskit_ios_adapter *adapter,+ double x, double y);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * Caller must call `accesskit_string_free` with the return value.+ */+char *accesskit_ios_adapter_debug(const struct accesskit_ios_adapter *adapter);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * All handlers will always be called on the main thread.+ *+ * # Safety+ *+ * `view` must be a valid, unreleased pointer to a `UIView`.+ */+struct accesskit_ios_subclassing_adapter *accesskit_ios_subclassing_adapter_new(+ void *view, accesskit_activation_handler_callback activation_handler,+ void *activation_handler_userdata,+ accesskit_action_handler_callback action_handler,+ void *action_handler_userdata,+ accesskit_deactivation_handler_callback deactivation_handler,+ void *deactivation_handler_userdata);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * All handlers will always be called on the main thread.+ *+ * # Safety+ *+ * `window` must be a valid, unreleased pointer to a `UIWindow`.+ *+ * # Panics+ *+ * This function panics if the specified window doesn't currently have+ * a root view controller with a view.+ */+struct accesskit_ios_subclassing_adapter *+accesskit_ios_subclassing_adapter_for_window(+ void *window, accesskit_activation_handler_callback activation_handler,+ void *activation_handler_userdata,+ accesskit_action_handler_callback action_handler,+ void *action_handler_userdata,+ accesskit_deactivation_handler_callback deactivation_handler,+ void *deactivation_handler_userdata);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+void accesskit_ios_subclassing_adapter_free(+ struct accesskit_ios_subclassing_adapter *adapter);+#endif++#if (defined(ACCESSKIT_IOS) || defined(ACCESSKIT_TVOS) || \+ defined(ACCESSKIT_VISIONOS) || defined(ACCESSKIT_WATCHOS))+/**+ * You must call `accesskit_ios_queued_events_raise` on the returned pointer. It+ * can be null if the adapter is not active.+ */+struct accesskit_ios_queued_events *+accesskit_ios_subclassing_adapter_update_if_active(+ struct accesskit_ios_subclassing_adapter *adapter,+ accesskit_tree_update_factory update_factory,+ void *update_factory_userdata);+#endif++#if defined(ACCESSKIT_MACOS)/*** Memory is also freed when calling this function.*/@@ -2569,7 +2783,7 @@ void accesskit_macos_queued_events_raise(struct accesskit_macos_queued_events *events);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** # Safety*@@ -2581,11 +2795,11 @@ struct accesskit_macos_adapter *accesskit_macos_adapter_new(void *action_handler_userdata);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)void accesskit_macos_adapter_free(struct accesskit_macos_adapter *adapter);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** You must call `accesskit_macos_queued_events_raise` on the returned pointer.* It can be null if the adapter is not active.@@ -2596,7 +2810,7 @@ struct accesskit_macos_queued_events *accesskit_macos_adapter_update_if_active(void *update_factory_userdata);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** Update the tree state based on whether the window is focused.*@@ -2608,7 +2822,7 @@ accesskit_macos_adapter_update_view_focus_state(struct accesskit_macos_adapter *adapter, bool is_focused);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** Returns a pointer to an `NSArray`. Ownership of the pointer is not* transferred.@@ -2619,7 +2833,7 @@ void *accesskit_macos_adapter_view_children(void *activation_handler_userdata);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** Returns a pointer to an `NSObject`. Ownership of the pointer is not* transferred.@@ -2630,7 +2844,7 @@ void *accesskit_macos_adapter_focus(void *activation_handler_userdata);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** Returns a pointer to an `NSObject`. Ownership of the pointer is not* transferred.@@ -2641,7 +2855,7 @@ void *accesskit_macos_adapter_hit_test(void *activation_handler_userdata);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** Caller must call `accesskit_string_free` with the return value.*/@@ -2649,7 +2863,7 @@ char *accesskit_macos_adapter_debug(const struct accesskit_macos_adapter *adapter);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** # Safety*@@ -2663,7 +2877,7 @@ accesskit_macos_subclassing_adapter_new(void *action_handler_userdata);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** # Safety*@@ -2682,12 +2896,12 @@ accesskit_macos_subclassing_adapter_for_window(void *action_handler_userdata);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)void accesskit_macos_subclassing_adapter_free(struct accesskit_macos_subclassing_adapter *adapter);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** You must call `accesskit_macos_queued_events_raise` on the returned pointer.* It can be null if the adapter is not active.@@ -2699,7 +2913,7 @@ accesskit_macos_subclassing_adapter_update_if_active(void *update_factory_userdata);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** Update the tree state based on whether the window is focused.*@@ -2711,7 +2925,7 @@ accesskit_macos_subclassing_adapter_update_view_focus_state(struct accesskit_macos_subclassing_adapter *adapter, bool is_focused);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** Modifies the specified class, which must be a subclass of `NSWindow`,* to include an `accessibilityFocusedUIElement` method that calls@@ -2732,7 +2946,7 @@ void accesskit_macos_add_focus_forwarder_to_window_class(const char *class_name);#endif-#if defined(__APPLE__)+#if defined(ACCESSKIT_MACOS)/*** Modifies the specified class, which must be a subclass of `NSWindow`,* to include an `accessibilityFocusedUIElement` method that calls