WayVR: Initial GUI integration

The format of the wayvr.yaml configuration file is subject to change at any time.
This commit is contained in:
Aleksander
2024-10-19 20:39:54 +02:00
committed by galister
parent edfa77e07c
commit d9dddbad11
17 changed files with 453 additions and 89 deletions

View File

@@ -5,6 +5,9 @@ use std::{
time::Instant,
};
#[cfg(feature = "wayvr")]
use std::sync::Arc;
use serde::Deserialize;
use crate::state::AppState;
@@ -49,6 +52,12 @@ pub enum SystemTask {
ShowHide,
}
#[cfg(feature = "wayvr")]
pub struct WayVRTask {
pub catalog_name: Arc<str>,
pub app_name: Arc<str>,
}
pub type OverlayTask = dyn FnOnce(&mut AppState, &mut OverlayState) + Send;
pub type CreateOverlayTask =
dyn FnOnce(&mut AppState) -> Option<(OverlayState, Box<dyn OverlayBackend>)> + Send;
@@ -59,6 +68,8 @@ pub enum TaskType {
CreateOverlay(OverlaySelector, Box<CreateOverlayTask>),
DropOverlay(OverlaySelector),
System(SystemTask),
#[cfg(feature = "wayvr")]
WayVR(WayVRTask),
}
#[derive(Deserialize, Clone, Copy)]