lingxia-platform 0.10.0

Platform abstraction layer for LingXia framework (Android, iOS, HarmonyOS)
Documentation
#![allow(clippy::manual_async_fn)]

//! Windows platform implementation for LingXia.

mod app;
mod device;
mod file;
mod location;
mod media;
mod media_preview;
mod mouse;
mod network;
mod pull_to_refresh;
mod screenshot;
mod secure_store;
mod surface;
mod ui_update;
mod update;
mod update_callout;
mod update_card;
mod user_feedback;
mod video_compress;
mod video_info;
mod video_player;
mod wifi;

pub(crate) use app::request_windows_app_exit;
pub use app::{
    Platform, set_windows_app_exit_handler, set_windows_open_url_handler,
    set_windows_tray_click_intercept_handler, set_windows_tray_menu_handler,
};
pub use media_preview::{
    WindowsMediaPreviewCancel, WindowsMediaPreviewOpen, register_windows_media_preview_host,
};
pub use pull_to_refresh::set_windows_pull_to_refresh_handler;
pub use surface::{
    WindowsUrlSurfaceWebTag, set_windows_managed_surface_toggle_handler,
    set_windows_managed_surface_visible_handler, set_windows_page_visibility_handler,
    set_windows_surface_closed_handler, set_windows_surface_dispose_handler,
    set_windows_url_surface_handler,
};
pub use ui_update::set_windows_ui_update_handler;
pub use update::apply_staged_windows_update;
pub use video_player::{WindowsVideoCommandDispatcher, register_windows_video_command_dispatcher};

use crate::error::PlatformError;

pub(crate) fn not_supported<T>(name: &str) -> Result<T, PlatformError> {
    Err(PlatformError::NotSupported(format!(
        "{name} is not supported on Windows yet"
    )))
}