evdevil/key_repeat.rs
1/// Key repeat settings.
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3#[repr(C)]
4pub struct KeyRepeat {
5 pub(crate) delay: u32,
6 pub(crate) period: u32,
7}
8
9impl KeyRepeat {
10 #[inline]
11 pub const fn new(delay: u32, period: u32) -> Self {
12 Self { delay, period }
13 }
14
15 #[inline]
16 pub fn delay(&self) -> u32 {
17 self.delay
18 }
19
20 #[inline]
21 pub fn period(&self) -> u32 {
22 self.period
23 }
24}