cbcd7a5c40
The GTK client becomes a relm4 component tree: AppModel owns the window, trust gate (rules 1-3), and the spawned session child's lifecycle as typed messages; the hosts page is a child component with a FactoryVecDeque of host cards — the HostsCallbacks Rc<dyn Fn> bag, the busy Cell, and the Rc<RefCell<HostsUi>> cross-page pokes are gone. Trust/settings/library dialogs stay plain GTK, invoked from update with a ComponentSender. Deleted with the in-process presenter: ui_stream.rs, video_gl.rs, ui_gamepad_library.rs, launch.rs, the khronos-egl dep, and the PUNKTFUNK_LEGACY_PRESENTER hatch. Every stream (and the console library) now runs in punktfunk-session; the shell spawns it for card connects and exec's it for --connect/--browse so the Decky wrapper keeps working. The request-access flow gains --connect-timeout + a CancelHandle that kills the child. Screenshot scenes re-pointed onto the components (verified: hosts + library self-capture; the dialog scenes present correctly and capture under a GL renderer); the gamepad-library scene is gone with the page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
39 lines
1.3 KiB
Rust
39 lines
1.3 KiB
Rust
//! `punktfunk-client` — the native Linux punktfunk/1 desktop shell (relm4/libadwaita).
|
|
//!
|
|
//! Hosts, pairing/trust, settings, and the desktop library page; every stream (and the
|
|
//! console game library) runs in the spawned `punktfunk-session` Vulkan binary — the
|
|
//! shell never touches video (punktfunk-planning `linux-client-rearchitecture.md`).
|
|
|
|
// The UI-agnostic plumbing lives in `pf-client-core`, shared with the session binary.
|
|
// Root re-exports keep every `crate::trust`-style path resolving unchanged.
|
|
#[cfg(target_os = "linux")]
|
|
pub use pf_client_core::{discovery, gamepad, library, trust, video, wol};
|
|
|
|
#[cfg(target_os = "linux")]
|
|
mod app;
|
|
#[cfg(target_os = "linux")]
|
|
mod cli;
|
|
#[cfg(target_os = "linux")]
|
|
mod spawn;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_hosts;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_library;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_settings;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_trust;
|
|
|
|
#[cfg(target_os = "linux")]
|
|
fn main() -> gtk::glib::ExitCode {
|
|
app::run()
|
|
}
|
|
|
|
/// GTK4/SDL3 are Linux turf; this stub keeps `cargo build --workspace` green on macOS
|
|
/// (the Mac client lives in clients/apple).
|
|
#[cfg(not(target_os = "linux"))]
|
|
fn main() {
|
|
eprintln!("punktfunk-client is Linux-only — the macOS client lives in clients/apple");
|
|
std::process::exit(2);
|
|
}
|