File size: 646 Bytes
dcbeeb2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
pub mod apt;
pub mod calculator;
pub mod editor;
pub mod file_manager;
pub mod net_manager;
pub mod settings;
pub mod snapstore;
pub mod snake;
pub mod sysinfo;
pub mod terminal;
pub mod wifi_app;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AppType {
    Terminal,
    NetManager,
    SysInfo,
    FileManager,
    Calculator,
    Editor,
    Settings,
    Snake,
    SnapStore,
    WifiManager,
}

static LAUNCH_QUEUE: spin::Mutex<Option<AppType>> = spin::Mutex::new(None);

pub fn queue_app_launch(app: AppType) {
    *LAUNCH_QUEUE.lock() = Some(app);
}

pub fn pop_app_launch() -> Option<AppType> {
    LAUNCH_QUEUE.lock().take()
}