-
Notifications
You must be signed in to change notification settings - Fork 89
Add accesskit_adapter crate. Upgrade accesskit_winit to winit 0.31.0-beta.2 #656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
3902cff to
8d2f3af
Compare
|
Hi @nicoburns, thank you for this. Unfortunately I don't think winit 0.31 will be released soon. We will want to bump our MSRV once we update winit, but I'd prefer a separate commit for this. Note that I would not merge it until it is required by winit. I am really unsure about introducing yet another crate. The subclassing adapters are a hack, so I'd prefer to keep their use limited to where they are needed. Depending on how the NSView is setup, there may even be more to do on macOS so it is dangerous to expose a generic API with this. Hopefully winit can give us the necessary hooks at some point and we can use the proper adapters for this library. |
|
I also disagree with breaking out the winit platform backend abstraction into an |
|
For what it's worth, the motivation for the cross-platform crate that doesn't directly depend on Winit is so that I can use it with Winit betas. For Blitz, we probably want to upgrade to Winit 0.31 while it's still in Beta, and my assumption is that y'all won't want to put out new accesskit_winit releases for every Winit beta. If you don't want it upstream, then that's fine. I'll probably just publish it as a 3rd-party crate. It's not all that much code. And I guess I'll leave this PR here, as it will probably be useful as and when you do come to upgrade to Winit 0.31. Long-term, I'd definitely be interested in learning about the more correct ways to implement things. And what would be needed for Winit and/or other backends to implement those. |
|
If your current use case is within Blitz, couldn't you just copy the necessary code over there while we wait for winit 0.31? As you said, it's not a lot of code afterall. We have good reasons to not want a generic crate as proposed here so please think twice before publishing something you might not fully understand. Thanks for the code though, it will be useful when the time to update comes. |
Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
Motivation
Changes Made
accesskit_adaptercrate that abstract accross the platform adapters without depending on Winit typesaccesskit_winita thin wrapper aroundaccesskit_adapteraccesskit_winitto Winit 0.31.0-beta.2. Notably Winit 0.31 no longer has a generic user event type. The expectation is that users of Winit will send their own events via a side channel such as astd::mpscchannel. I have therefore updatedaccesskit_winitto accept a generic callback.