use gpui_shared_string::SharedString;
use gpui_types::Keystroke;
pub type MenuCommandId = usize;
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub enum SystemMenuType {
Services,
}
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub enum OsAction {
Cut,
Copy,
Paste,
SelectAll,
Undo,
Redo,
}
#[derive(Clone, Debug)]
pub struct PlatformOsMenu {
pub name: SharedString,
pub menu_type: SystemMenuType,
}
#[derive(Clone, Debug)]
pub struct PlatformMenu {
pub name: SharedString,
pub items: Vec<PlatformMenuItem>,
pub disabled: bool,
}
#[derive(Clone, Debug)]
pub enum PlatformMenuItem {
Separator,
Submenu(PlatformMenu),
SystemMenu(PlatformOsMenu),
Action {
name: String,
command_id: MenuCommandId,
keystroke: Option<Keystroke>,
os_action: Option<OsAction>,
checked: bool,
disabled: bool,
},
}