1
0
Fork 0
forked from wry/wry

config: add on_idle

This commit is contained in:
Julian Orth 2022-07-21 20:25:23 +02:00
parent ce567b9999
commit 0e5b1b5e35
5 changed files with 25 additions and 0 deletions

View file

@ -132,3 +132,8 @@ impl Display for PciId {
write!(f, "{:04x}:{:04x}", self.vendor, self.model)
}
}
/// Sets the callback to be called when the display goes idle.
pub fn on_idle<F: Fn() + 'static>(f: F) {
get!().on_idle(f)
}