libnotcurses_sys/key/reimplemented.rs
1//!
2
3use crate::{
4 c_api::{NCKEY_EOF, PRETERUNICODEBASE},
5 NcKey,
6};
7
8/// Is the event a synthesized mouse event?
9#[inline]
10pub const fn nckey_mouse_p(r: u32) -> bool {
11 r >= NcKey::Motion.0 && r <= NcKey::Button11.0
12}
13
14/// Is this `u32` number a synthesized event?
15///
16/// Includes the 300 numbers from [`PRETERUNICODEBASE`] on up and `ESC`.
17pub const fn nckey_synthesized_p(num: u32) -> bool {
18 num >= PRETERUNICODEBASE && num <= NCKEY_EOF
19}