gd-wireportal-full/rust/src/pipewire/mod.rs
2025-03-18 12:01:33 +01:00

28 lines
586 B
Rust

use std::thread;
use godot::prelude::*;
#[derive(GodotClass)]
#[class(base=Node)]
/// Node for interacting with Pipewire
/// Intended to not be spawned manually, as the plugin will create a
struct Pipewire {
base: Base<Node>,
/// Handle for the thread running the pipewire main loop
thread_handle: Option<thread::Thread>,
}
#[godot_api]
impl INode for Pipewire {
fn init(base: Base<Node>) -> Self {
Self {
base,
thread_handle: None,
}
}
}
#[godot_api]
impl Pipewire {
pub const SINGLETON: &'static str = "Pipewire";
}