mirror of
https://gitlab.freedesktop.org/pipewire/helvum
synced 2026-03-15 11:36:11 +08:00
Display Nodes/Ports/Links obtained from pipewire server
This commit is contained in:
16
src/view/port.rs
Normal file
16
src/view/port.rs
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user