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.
Implements #3759
Also see #99
changelog
module if knowledge of this change could be valuable to usersI split the implementation and documentation into seperate commits, because I don't know if for the branch I am targeting the way I have updated the change-log is valid and expect to be corrected. (I've written the change under the heading
0.30.4
even though that version hasn't been released yet, since theunreleased.md
was empty on thev0.30.x
branch but populated on themaster
branch)I have tested these changes on my iPad and they work exactly as expected. In an ideal world, I would like this to be released on
crates.io
in a way thatbevy
could integrate so I could use it in mybevy
application (tracking issue), which is why I was working off thev0.30.x
branch so I could seamlessly patch.Also, the public API I have chosen seems reasonable to me but I am totally open to it being tweaked or re-worked. But I would ideally want this functionality exposed in some way without me having to maintain my own fork as
bevy
releases roll around. I have intentionally included#[non_exhaustive]
in places that I or other developers may add or improve features to. Notably, this PR only handles pen double tap events since that is all I can physically test with my current hardware, but newer Apple Pencil models support squeeze actions that I know (theoretically) how to implement but haven't. The API intentionally allows for this addition later.The public API I added is also intended to be extendable by other platform implementations, but again I can't test them physically so haven't included here. Each section has
## Platform Specific \n - iOS only
documentation for that reason.This is my first contribution to
winit
(and my first major feature contribution in general using Open Source) so please tell me if I've done anything wrong! And thanks so much for this awesome crate, contributing to it has taught me a lot about objc2, UIKit and iOS development!