WayVR: WayVRDisplayList ui type, toggle display visibility and pause rendering of them

This commit is contained in:
Aleksander
2024-10-20 11:54:38 +02:00
committed by galister
parent 79d91e3d02
commit 07d7afa96f
10 changed files with 218 additions and 95 deletions

View File

@@ -5,13 +5,13 @@ use std::{
time::Instant,
};
#[cfg(feature = "wayvr")]
use std::sync::Arc;
use serde::Deserialize;
use crate::state::AppState;
#[cfg(feature = "wayvr")]
use crate::overlays::wayvr::WayVRAction;
use super::{
common::OverlaySelector,
overlay::{OverlayBackend, OverlayState},
@@ -52,12 +52,6 @@ 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;
@@ -69,7 +63,7 @@ pub enum TaskType {
DropOverlay(OverlaySelector),
System(SystemTask),
#[cfg(feature = "wayvr")]
WayVR(WayVRTask),
WayVR(WayVRAction),
}
#[derive(Deserialize, Clone, Copy)]