Skip to content

Conversation

MarijnS95
Copy link
Member

And "correct" their ABI to match how it is used in the actual NDK getter functions. Also add missing aliases and upstream documentation where sensible.


CC @rib, I've been thinking about this to make our wrapper types more consistent, but it may be more inconvenient to use now except in the case when checking multiple flags at once...

Comment on lines -351 to -354
#[inline]
pub fn teriary(self) -> bool {
self.0 & ffi::AMOTION_EVENT_BUTTON_TERTIARY != 0
}
Copy link
Member Author

@MarijnS95 MarijnS95 Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this PR will fix the teriary -> TERTIARY typo as pointed out in rust-mobile/android-activity#168 (and a "problem" for android-activity if/when rust-mobile/android-activity#163 is merged), by freshly copying the constants from the header file.

@MarijnS95
Copy link
Member Author

We should also do this for ndk::configuration::DiffResult, which most likely benefits from the autogenerated Debug implementation too.

And "correct" their ABI to match how it is used in the actual NDK
getter functions.
@MarijnS95 MarijnS95 changed the title ndk/event: Replace open-coded bool getters with bitflags wrappers ndk: Replace open-coded bool getters with bitflags wrappers Oct 8, 2024
@MarijnS95 MarijnS95 added this to the 0.10.0 release milestone Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant