1
0
Fork 0
forked from wry/wry

backend: add DevicesEnumerated event

This commit is contained in:
Julian Orth 2022-11-13 13:23:15 +01:00
parent dddd68ba06
commit c6c87bdaa1
11 changed files with 65 additions and 4 deletions

View file

@ -139,3 +139,11 @@ impl Display for PciId {
pub fn on_idle<F: Fn() + 'static>(f: F) {
get!().on_idle(f)
}
/// Sets the callback to be called when all devices have been enumerated.
///
/// This callback is only invoked once during the lifetime of the compositor. This is a
/// good place to select the DRM device used for rendering.
pub fn on_devices_enumerated<F: FnOnce() + 'static>(f: F) {
get!().on_devices_enumerated(f)
}