bevy/crates/bevy_winit/src
Nolan Darilek 73e0ac26ca
Various accessibility API updates. (#9989)
# Objective

`bevy_a11y` was impossible to integrate into some third-party projects
in part because it insisted on managing the accessibility tree on its
own.

## Solution

The changes in this PR were necessary to get `bevy_egui` working with
Bevy's AccessKit integration. They were tested on a fork of 0.11,
developed against `bevy_egui`, then ported to main and tested against
the `ui` example.

## Changelog

### Changed

* Add `bevy_a11y::ManageAccessibilityUpdates` to indicate whether the
ECS should manage accessibility tree updates.
* Add getter/setter to `bevy_a11y::AccessibilityRequested`.
* Add `bevy_a11y::AccessibilitySystem` `SystemSet` for ordering relative
to accessibility tree updates.
* Upgrade `accesskit` to v0.12.0.

### Fixed

* Correctly set initial accessibility focus to new windows on creation.

## Migration Guide

### Change direct accesses of `AccessibilityRequested` to use
`AccessibilityRequested.::get()`/`AccessibilityRequested::set()`

#### Before

```
use std::sync::atomic::Ordering;

// To access
accessibility_requested.load(Ordering::SeqCst)
// To update
accessibility_requested.store(true, Ordering::SeqCst);
```

#### After

```
// To access
accessibility_requested.get()
// To update
accessibility_requested.set(true);
```

---------

Co-authored-by: StaffEngineer <111751109+StaffEngineer@users.noreply.github.com>
2023-10-02 21:22:52 +00:00
..
accessibility.rs Various accessibility API updates. (#9989) 2023-10-02 21:22:52 +00:00
converters.rs Add option to toggle window control buttons (#9083) 2023-07-23 01:02:40 +00:00
lib.rs Android: handle suspend / resume (#9937) 2023-10-02 13:06:13 +00:00
system.rs Rename RemovedComponents::iter/iter_with_id to read/read_with_id (#9778) 2023-09-15 12:37:20 +00:00
web_resize.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
winit_config.rs Change WinitPlugin defaults to limit game update rate when window is not visible (#7611) 2023-08-02 23:41:23 +00:00
winit_windows.rs Various accessibility API updates. (#9989) 2023-10-02 21:22:52 +00:00