1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// SPDX-FileCopyrightText: Copyright (c) 2026 Mike Li/Mikewolfli/Wei Li(mikewolfli@163.com)
// SPDX-License-Identifier: MIT
//! Platform abstraction for desktop/embedded/mobile families.
// Platform backend implementations (one per target)
/// Android platform backend (state-driven, JNI bridge behind `android-jni`).
///
/// The widget state machine is platform-independent, so the module is compiled
/// on every host to keep its unit tests executable. All JNI touch points are
/// `#[cfg(feature = "android-jni")]`-gated internally; on other hosts the
/// backend runs in pure state mode.
/// Android JNI bridge (native view creation via JNI, feature-gated).
/// iOS mobile backend (state-driven, UIKit bridge behind `ios-uikit-ffi`).
///
/// The widget state machine is platform-independent, so the module is compiled
/// on every host to keep its unit tests executable. All UIKit (`objc2`) touch
/// points are `#[cfg(feature = "ios-uikit-ffi")]`-gated internally, and that
/// feature transitively requires the iOS target (`ios = ["dep:objc2", ...]`);
/// on other hosts the backend runs in pure state mode.
/// macOS objc2 migration preview backend (state-driven).
///
/// The widget state machine is platform-independent, so the module is compiled
/// on every host to keep its unit tests executable. The real AppKit FFI lives
/// in the `native` sub-module, which is `#[cfg(all(target_os = "macos",
/// feature = "macos"))]`-gated; elsewhere the backend runs in pure state
/// mode. See BLUE14 D-1 for the precedent (`ime_windows`).
/// WASM/WebAssembly platform backend (state-driven).
/// Platform accessibility bridges (macOS, Windows, Linux).
// Internal sub-modules (split from monolithic mod.rs)
/// Rich clipboard content types and backend trait (BLUE10 R8.6).
/// Platform-specific rich clipboard stubs (BLUE10 R8.6).
/// Device class detection and adaptive layout support (BLUE8 P4-6).
/// Laser holographic keyboard detector (BLUE8 P4-5a, experimental).
/// IME bridge trait, types, and mock implementation.
/// Real Linux IME bridge (IBus integration).
/// Real macOS IME bridge (NSTextInputContext integration).
///
/// The composition/marked-text state machine is platform-independent, so the
/// module is compiled on every host to keep its unit tests executable. All
/// AppKit (`objc2` `msg_send!`) touch points are `#[cfg(all(target_os =
/// "macos", feature = "macos"))]`-gated internally; on other hosts the
/// bridge runs in pure state-machine mode.
/// Platform-specific IME stubs (macOS, Windows).
/// Real Windows IME bridge (TSF integration).
///
/// The composition/marked-text state machine is platform-independent, so the
/// module is compiled on every host to keep its unit tests executable. All TSF
/// (`msctf.dll`/`winapi`) touch points are `#[cfg(target_os = "windows")]`-gated
/// internally; on other hosts `TsfThreadMgr::try_create` reports TSF as
/// unavailable and the bridge runs in pure state-machine mode.
pub
/// Pure Win32 notification-code semantics (host-compilable, no OS calls).
/// Cross-backend behavioural contract tests.
/// Widget teardown (`Platform::destroy_widget`) regression tests.
/// Virtual keyboard controller for touch text input (BLUE8 P4-7).
// Re-exports: everything that was previously defined directly in mod.rs
pub use crate;
pub use crate;
pub use crateRuntimeGuiMode;
pub use crate;
pub use crate;
pub use crate;
pub use crateStubPlatform;
pub use crate*;
pub use wire_focus_manager_to_a11y;
/// Platform facts accessor usable in every profile, including `mini`.
///
/// Upper layers (print, GPU adaptation, menu hardware detection) need to ask the
/// backend about OS facts — total memory, battery state, spooler availability.
/// The `mini` profile is deliberately alloc-free and has **no platform
/// singleton** (`get_platform` is `not(mini)`), so a direct call would fail to
/// compile there.
///
/// `platform_facts()` closes that gap: outside `mini` it returns the real
/// backend; inside `mini` it returns a zero-sized value whose *default* trait
/// implementations report "unknown" for every capability. That is the honest
/// answer for a profile with no OS integration, and it keeps the call sites free
/// of `cfg` branching (principle #35).
/// `mini` profile: no platform singleton exists, so capabilities are all absent.
///
/// Returns a `StubPlatform`, which already implements the full `Platform`
/// surface (widget creation, menus, list/combo storage) and inherits the trait
/// defaults for every optional capability. That yields "unknown" for total
/// memory, `false` for battery and print support, and `None` for the web engine —
/// the honest answer for a profile whose whole point is to omit OS integration.