Display Nodes/Ports/Links obtained from pipewire server

This commit is contained in:
Tom A. Wagner
2021-01-03 19:01:47 +01:00
parent 438383e92f
commit b129d84fa2
8 changed files with 666 additions and 102 deletions

16
src/view/port.rs Normal file
View File

@@ -0,0 +1,16 @@
/// Graphical representation of a pipewire port.
pub struct Port {
pub(super) widget: gtk::Button,
pub id: u32,
pub direction: pipewire::port::Direction,
}
impl Port {
pub fn new(id: u32, name: &str, direction: pipewire::port::Direction) -> Self {
Self {
widget: gtk::Button::with_label(name),
id,
direction
}
}
}