rust_widgets 2.9.2

Pure Rust cross-platform native GUI library with hardware-adaptive rendering, 180 widgets, touch/gesture support, i18n, and SVG-pipeline-accurate output
// SPDX-FileCopyrightText: Copyright (c) 2026 Mike Li/Mikewolfli/Wei Li(mikewolfli@163.com)
// SPDX-License-Identifier: MIT

//! Bridge that selects between objc2 and cocoa backend (BLUE11 R1.5, R2.5).
//! Priority: objc2 (when `macos` / the `objc2-macos` alias is enabled) → cocoa
//! (cocoa-legacy fallback).
//!
//! This module provides a unified Platform implementation that delegates
//! to the appropriate backend based on feature flags.
//!
//! # Migration Status (R2.5)
//! - objc2 backend: selected by `--features macos` (or the `objc2-macos` alias,
//!   which enables `macos`). A bare `desktop` build does **not** enable it: the
//!   `desktop` profile has neither `macos` nor `objc2-macos`, so macOS falls back
//!   to the cocoa-legacy backend below.
//! - Legacy: cocoa 0.24 backend (via `cocoa-legacy` feature)

/// Default: objc2 backend (activated by `macos` feature or `objc2-macos` alias).
#[cfg(feature = "macos")]
pub use crate::platform::macos_objc2::MacOSObjc2Platform as SelectedMacOSPlatform;

/// Legacy fallback: cocoa 0.24 backend.
///
/// Reached only when the objc2 backend is *not* selected. The condition used to
/// repeat `feature = "macos"` twice (`any(macos, macos)`), so `--features
/// macos-legacy` on its own matched neither arm and `SelectedMacOSPlatform` did
/// not exist — a build that failed to compile rather than choosing the legacy
/// backend it had just asked for.
#[cfg(all(not(feature = "macos"), feature = "cocoa-legacy"))]
pub use crate::platform::macos::MacOSPlatform as SelectedMacOSPlatform;