Skip to main content

sys_file_manager_path/dto/
app_info.rs

1use strum_macros::AsRefStr;
2
3#[derive(AsRefStr, Debug, Default)]
4pub enum Platform {
5    #[default]
6    #[strum(serialize = "unknown")]
7    Unknown,
8
9    #[strum(serialize = "windows")]
10    Windows,
11
12    #[strum(serialize = "macos")]
13    MacOS,
14}
15
16#[derive(Debug, Default)]
17pub struct AppInfo {
18    // 句柄
19    pub hwnd_id: isize,
20    // MacOS bundleId
21    pub bundle_id: String,
22    // 窗口标题
23    pub title: String,
24    // 是否激活
25    pub is_active: bool,
26    // 目录路径
27    pub dir: String,
28    // 执行程序路径
29    pub exec: String,
30    // 当前平台
31    pub platform: Platform,
32}