Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide distinct event number for types defined by reference
Prior to this commit, message types defined by reference were exposed to Rust as type aliases, such as `type KeyReleaseEvent = KeyPressEvent;`. As a result, they shared a single implementation of `BaseEvent`, erroneously sharing the same `BaseEvent::NUMBER`. This commit updates the code generation to instead expose these types as a wrapper struct, such as `struct KeyReleaseEvent(KeyPressEvent);`. These wrapper structs expose the same methods, but have an independent implementation of `BaseEvent`. This allows these events to be constructed, such as for use in `SendEvent`. Fixes #214
- Loading branch information