mirror of
https://gitlab.freedesktop.org/pipewire/helvum
synced 2026-03-15 11:36:11 +08:00
Turn struct View into a gtk::Application subclass.
This lets us keep multiple reference-counted copies easier, and lets us emit signals to the controller.
This commit is contained in:
@@ -41,7 +41,7 @@ enum Item {
|
||||
/// It also keeps and manages a state object that contains the current state of objects present on the remote.
|
||||
pub struct Controller {
|
||||
state: HashMap<u32, Item>,
|
||||
view: Rc<view::View>,
|
||||
view: view::View,
|
||||
}
|
||||
|
||||
impl Controller {
|
||||
@@ -53,7 +53,7 @@ impl Controller {
|
||||
/// The returned `Rc` will be the only strong reference kept to the controller, so dropping the `Rc`
|
||||
/// will also drop the controller, unless the `Rc` is cloned outside of this function.
|
||||
pub(super) fn new(
|
||||
view: Rc<view::View>,
|
||||
view: view::View,
|
||||
gtk_receiver: Receiver<PipewireMessage>,
|
||||
) -> Rc<RefCell<Controller>> {
|
||||
let result = Rc::new(RefCell::new(Controller {
|
||||
|
||||
Reference in New Issue
Block a user