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
//! Safe, idiomatic Rust bindings for AffineUI.
//!
//! Two operating modes, mirroring the C++ core (docs/LANGUAGE_BINDINGS.md):
//!
//! - **App-owned mode** — AffineUI owns the window and main loop:
//! [`App`] + [`View`] + [`Widget`] + [`Document`].
//! - **Embedded mode** — the host engine owns the GPU device, window,
//! loop, and input pump: [`embedded::Ui`] renders into host-provided
//! render targets and receives forwarded events.
//!
//! Contracts inherited from the core, encoded in the types:
//!
//! - *Hard to crash*: operations on widgets whose nodes are gone degrade
//! (reads return defaults, writes no-op) instead of panicking.
//! - *Thread affinity*: every handle type is `!Send + !Sync`; create and
//! use everything on one thread.
//! - *Callback safety*: closures are boxed and released exactly once via
//! the C ABI's `user_free` contract; panics inside callbacks are caught
//! at the FFI boundary and never unwind into C++.
//!
//! ```no_run
//! use affineui::{App, Config, Theme, View};
//!
//! let view = View::new(Theme::Bootstrap);
//! view.build(|v| {
//! v.heading(1, "Hello", "", "");
//! v.button("Click me", true, "go").on_click(|| println!("clicked"));
//! });
//! let app = App::new(Config::default().title("Demo"));
//! app.load_view(&view);
//! app.run();
//! ```
pub use affineui_sys as sys;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// The AffineUI core version string (e.g. `"0.0.1"`).
/// Convenience: open a native window showing `html` and run to completion.