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
#![forbid(unsafe_code)]
#![warn(
clippy::cargo,
missing_docs,
clippy::pedantic,
future_incompatible,
rust_2018_idioms
)]
#![allow(
clippy::if_not_else,
clippy::module_name_repetitions,
clippy::multiple_crate_versions,
)]
#![cfg_attr(doc, warn(rustdoc::all))]
pub mod frontends {
#[cfg(feature = "frontend-browser")]
#[doc(inline)]
pub use gooey_browser as browser;
#[cfg(feature = "gooey-rasterizer")]
#[doc(inline)]
pub use gooey_rasterizer as rasterizer;
pub mod renderers {
#[cfg(all(feature = "frontend-kludgine", not(target_arch = "wasm32")))]
#[doc(inline)]
pub use gooey_kludgine as kludgine;
}
}
use cfg_if::cfg_if;
#[doc(inline)]
pub use gooey_core as core;
#[cfg(feature = "fluent")]
#[doc(inline)]
pub use gooey_fluent as fluent;
#[doc(inline)]
pub use gooey_renderer as renderer;
#[doc(inline)]
pub use gooey_text as text;
#[doc(inline)]
pub use gooey_widgets as widgets;
#[cfg(all(feature = "frontend-kludgine", not(target_arch = "wasm32")))]
mod headless;
#[cfg(all(feature = "frontend-kludgine", not(target_arch = "wasm32")))]
pub use headless::{Headless, HeadlessError, Recorder};
#[cfg(all(feature = "frontend-kludgine", not(target_arch = "wasm32")))]
mod kludgine;
#[cfg(all(feature = "frontend-kludgine", not(target_arch = "wasm32")))]
pub use crate::kludgine::{kludgine_app, kludgine_main, kludgine_main_with, kludgine_run};
#[cfg(feature = "frontend-browser")]
mod browser;
#[cfg(feature = "frontend-browser")]
pub use browser::{browser_app, browser_main, browser_main_with, browser_run};
cfg_if! {
if #[cfg(all(target_arch = "wasm32", feature = "frontend-browser"))] {
pub use browser_main as main;
pub use browser_main_with as main_with;
pub use browser_app as app;
pub use browser_run as run;
pub type ActiveFrontend = gooey_browser::WebSys;
} else if #[cfg(feature = "frontend-kludgine")] {
pub use kludgine_main as main;
pub use kludgine_main_with as main_with;
pub use kludgine_app as app;
pub use kludgine_run as run;
pub type ActiveFrontend = gooey_rasterizer::Rasterizer<gooey_kludgine::Kludgine>;
}
}
mod app;
pub use app::App;
pub mod style;