use super::*;
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub struct MiniAppCapsuleRect {
#[get(type(copy))]
pub(crate) top: f32,
#[get(type(copy))]
pub(crate) right: f32,
#[get(type(copy))]
pub(crate) bottom: f32,
#[get(type(copy))]
pub(crate) left: f32,
#[get(type(copy))]
pub(crate) width: f32,
#[get(type(copy))]
pub(crate) height: f32,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct MiniAppSystemInfo {
#[get(type(copy))]
pub(crate) vendor: MiniAppVendor,
#[get(type(copy))]
pub(crate) window_width: u32,
#[get(type(copy))]
pub(crate) window_height: u32,
#[get(type(copy))]
pub(crate) pixel_ratio: f32,
#[get(type(copy))]
pub(crate) status_bar_height: f32,
#[get(type(copy))]
pub(crate) safe_area: SafeAreaInsets,
#[get(type(copy))]
pub(crate) capsule: MiniAppCapsuleRect,
#[get(type(copy))]
pub(crate) theme: ThemeMode,
pub(crate) language: String,
#[get(type(copy))]
pub(crate) canvas_mode: MiniAppCanvasMode,
}
#[derive(Clone, Data, Debug)]
pub struct MiniAppWindowRecord {
pub(crate) config: WindowConfig,
#[get(type(copy))]
pub(crate) state: WindowState,
#[get(type(copy))]
pub(crate) canvas_id: u32,
#[get(type(copy))]
pub(crate) canvas_mode: MiniAppCanvasMode,
pub(crate) last_frame: Framebuffer,
#[get(type(copy))]
pub(crate) present_count: u64,
}
#[derive(Clone, Data, Debug)]
pub struct MiniAppPlatform {
pub(crate) system_info: MiniAppSystemInfo,
#[get(type(copy))]
pub(crate) resolved_safe_area: SafeAreaInsets,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) next_id: u64,
#[get(skip)]
pub(crate) primary_window: Option<WindowId>,
pub(crate) windows: HashMap<WindowId, MiniAppWindowRecord>,
pub(crate) touch_tracker: TouchPointerTracker,
pub(crate) pending_events: Vec<WindowEvent>,
pub(crate) outbound_commands: Vec<MiniAppHostCommand>,
pub(crate) storage: HashMap<String, String>,
pub(crate) route_stack: Vec<String>,
#[get(skip)]
pub(crate) clipboard: Option<String>,
#[get(type(copy))]
pub(crate) pump_paused: bool,
}