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
158
159
160
161
162
163
164
165
166
167
168
169
// 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).
///
/// The widget state machine is platform-independent, so the module is compiled
/// on every host to keep its unit tests executable. The only UIKit (`objc2`)
/// touch point left is the window the library paints into, which is
/// `#[cfg(feature = "ios-uikit-ffi")]`-gated internally; that feature
/// transitively requires the iOS target (`ios = ["dep:objc2", ...]`), so 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).
/// Linux-kernel system probes (`/proc`, `/sys`) shared by the backends that sit
/// on a Linux kernel: Android, HarmonyOS, Linux/GTK, Wayland and mobile.
/// The portable host backend — a drawing surface with no operating system behind it.
///
/// This is the build target for `mini`, for `embedded` on a host without a
/// backend, and for any target that has no backend module. Those three are one
/// fact ("a surface, no OS controls"), which is why they share one backend
/// instead of three `cfg` branches. See the module docs for the reasoning.
/// Compile-time runtime-profile facts — the single gating entry point.
///
/// This is the only module in `src/` permitted to read the `mini` / `embedded`
/// feature names; everything else asks it a semantic question. See BLUE15
/// principles #57/#58 and the module docs for the reasoning.
// 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 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.
///
/// Every build's platform-facts accessor, 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-frugal and has **no platform
/// singleton** (`get_platform` is `not(alloc_frugal)`), so a direct call would
/// fail to compile there.
///
/// Both arms return the *same kind* of value: a host that reports, for every
/// capability it does not have, the honest absence (`None` / `false` / empty)
/// rather than a made-up figure (principle #37). Outside `mini` that is whichever
/// OS backend this target has; inside `mini` it is the portable host. Call sites
/// stay free of `cfg` branching (principle #35).