Skip to main content

euv_core/platform/info/
struct.rs

1use super::*;
2
3/// Normalized hardware and OS capability flags reported by every platform backend.
4#[derive(Clone, Copy, Debug, Default, Eq, Getter, Hash, PartialEq)]
5pub struct PlatformCapabilities {
6    /// Supports opening and managing multiple independent OS windows simultaneously.
7    #[get(type(copy))]
8    pub(crate) multi_window: bool,
9    /// Supports hover pointer tracking (mouse, trackpad, Apple Pencil hover).
10    #[get(type(copy))]
11    pub(crate) hover_pointer: bool,
12    /// Supports multi-touch gestures.
13    #[get(type(copy))]
14    pub(crate) touch: bool,
15    /// Supports stylus / Apple Pencil pressure input.
16    #[get(type(copy))]
17    pub(crate) stylus: bool,
18    /// Supports physical hardware keyboard input.
19    #[get(type(copy))]
20    pub(crate) hardware_keyboard: bool,
21    /// Reports non-trivial OS safe-area cutouts or gesture bars.
22    #[get(type(copy))]
23    pub(crate) safe_area_insets: bool,
24    /// Supports native GPU hardware acceleration (Metal / Vulkan / D3D / WebGPU / WebGL2).
25    #[get(type(copy))]
26    pub(crate) hardware_gpu: bool,
27    /// Supports direct CPU framebuffer presentation.
28    #[get(type(copy))]
29    pub(crate) software_blit: bool,
30    /// Supports native system clipboard read/write.
31    #[get(type(copy))]
32    pub(crate) clipboard: bool,
33    /// Supports native IME / soft keyboard composition.
34    #[get(type(copy))]
35    pub(crate) ime: bool,
36    /// Supports Apple Dynamic Island hardware cutout presentation (`iOS`).
37    #[get(type(copy))]
38    pub(crate) dynamic_island: bool,
39    /// Supports native Live Activities / ongoing live status surfaces (`iOS`, `iPadOS`, `Android`).
40    #[get(type(copy))]
41    pub(crate) live_activities: bool,
42    /// Supports desktop system tray or menu bar status icons (`macOS`, `Windows`, `Linux`).
43    #[get(type(copy))]
44    pub(crate) system_tray: bool,
45    /// Supports OS biometric authentication (Face ID, Touch ID, BiometricPrompt, Windows Hello, Passkeys).
46    #[get(type(copy))]
47    pub(crate) biometrics: bool,
48    /// Supports tactile haptic feedback pulses.
49    #[get(type(copy))]
50    pub(crate) haptics: bool,
51    /// Supports custom URL protocol / deep link handler registration.
52    #[get(type(copy))]
53    pub(crate) protocol_handler: bool,
54    /// Supports native OS accessibility bridge (NSAccessibility, UIAccessibility, UIA, AT-SPI2, Android, ARIA).
55    #[get(type(copy))]
56    pub(crate) accessibility_bridge: bool,
57}