accesskit_xplat
Cross-platform AccessKit adapter similar to accesskit_winit, but without depending on Winit. This allows this crate to be used with any version of Winit without needing a version of crate that matches the version of Winit that you are using (this is particularly helpful for beta or git versions of Winit that don't usually get an accesskit_winit release).
WARNING: The AccessKit developers have noted that the approaches used by both this crates and accesskit_winit may not be the optimal way to implement AccessKit, so use this crate at your own risk. But if you would otherwise be using accesskit_winit then this crate has no additional caveats (except that it requires little bit of extra boilerplate code.)
Example usage
Based on Winit 0.31.0-beta.2's Window and WindowEvent types but could be adapted for other versions of Winit.
use Rect;
use ;
use HasWindowHandle;
use Arc;
use ;
/// State of the accessibility node tree and platform adapter.
Compatibility with async runtimes
The following only applies on Linux/Unix:
While this crate's API is purely blocking, it internally spawns asynchronous tasks on an executor.
- If you use tokio, make sure to enable the
tokiofeature of this crate. - If you use another async runtime or if you don't use one at all, the default feature will suit your needs.
License
This project is licensed under the Apache 2.0 license.