application: forward a handler's native controls to the Surface - #6
Merged
Conversation
A Handler that implements the new NativeControlProvider — NativeControls() []toolkit.NativeControl — has them wired onto toolkit.Surface.Controls in bind, the exact parallel to how an Accessible handler's A11yElements reach Surface.Elements. A back-end that can host native controls (go-widgets/window's cocoa syncNative, from window v0.59.0) then embeds and reconciles them over the framebuffer; one that cannot ignores the field. This is what lets a self-rendering application — one built on a toolkit.Surface, with no walkable widget tree — put real OS controls (a secure text field, a button) over its pixels: it describes them each frame the same way it describes its accessibility. Bumps toolkit to v0.299.0 (NativeControl) and window to v0.59.0 (Surface.Controls).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A `Handler` that implements the new `NativeControlProvider` (`NativeControls() []toolkit.NativeControl`) has them wired onto `toolkit.Surface.Controls` in `bind` — the exact parallel to how an `Accessible` handler's `A11yElements` reach `Surface.Elements`. A back-end that can host native controls (go-widgets/window cocoa `syncNative`, v0.59.0) embeds and reconciles them over the framebuffer; one that cannot ignores the field.
This is what lets a self-rendering application — built on a `toolkit.Surface`, with no walkable widget tree, like the news reader — put real OS controls over its pixels: it describes them each frame the way it describes its accessibility.
Bumps toolkit → v0.299.0, window → v0.59.0. 100% coverage outside the native run loop; race clean.