state: Store layout override

Not used for any externally observable effects
This commit is contained in:
Dorota Czaplejewicz
2022-06-03 16:32:42 +00:00
parent 8ff72f312a
commit 590cd71f49
11 changed files with 101 additions and 38 deletions

15
src/receiver.rs Normal file
View File

@ -0,0 +1,15 @@
/*! Defines the application-wide message bus for updating state.*/
use crate::event_loop::driver::Threaded;
pub mod c {
use super::*;
use crate::util::c::Wrapped;
pub type State = Wrapped<Threaded>;
}
// The state receiver is an endpoint of a channel, so it's safely cloneable.
// There's no need to keep it in a Rc.
// The C version uses Wrapped with an underlying Rc,
// because Wrapped is well-tested already.
pub type State = Threaded;