rust-mobile / ndk

Rust bindings to the Android NDK
Apache License 2.0
1.11k stars 110 forks source link

ndk/event: Implement `SourceClass` `bitflag` and provide `Source::class()` getter #458

Closed MarijnS95 closed 7 months ago

MarijnS95 commented 8 months ago

This enum was never pub even though it serves a slight purpose to more easily classify various event sources, which is accounted for in the bitmask-like value of AINPUT_SOURCE_XXX.

MarijnS95 commented 7 months ago

@rib good point. Since it's 0xff this could have been prevented if the type is u8. Which would you prefer, or should we do both?