Skip to main content

ferroui_headless/
lib.rs

1//! The headless platform.
2//!
3//! An application runs without a screen: its windows are sized and
4//! activated like the windows of a desktop platform, input is simulated
5//! through the extensions of a top-level ([`HeadlessWindowExtensions`]) and
6//! frames are rendered when the render timer ticks, which a test can force
7//! ([`FerroHeadlessPlatform::force_render_timer_tick`]).
8//!
9//! With the headless drawing (the default of
10//! [`FerroHeadlessPlatformOptions`]) nothing is drawn: geometries behave
11//! like their bounds and bitmaps have a size and no content. With another
12//! rendering backend the frames of a window are kept, and
13//! [`HeadlessWindowExtensions::get_last_rendered_frame`] returns the last
14//! one.
15//!
16//! An application uses the platform with
17//! [`FerroHeadlessPlatformExtensions::use_headless`] on its builder.
18
19mod ferro_headless_platform;
20mod ferro_test_application_attribute;
21mod headless_platform_render_interface;
22mod headless_platform_stubs;
23mod headless_render_timer;
24mod headless_unit_test_isolation_attribute;
25mod headless_unit_test_session;
26mod headless_window_extensions;
27mod headless_window_impl;
28mod headless_window_surface;
29mod i_headless_touch_pointer;
30mod i_headless_window;
31
32pub use ferro_headless_platform::{FerroHeadlessPlatform, FerroHeadlessPlatformExtensions, FerroHeadlessPlatformOptions};
33pub use ferro_test_application_attribute::FerroTestApplicationAttribute;
34pub use headless_unit_test_isolation_attribute::{FerroTestIsolationAttribute, FerroTestIsolationLevel};
35pub use headless_unit_test_session::{FerroTestAssembly, HeadlessUnitTestSession, HeadlessUnitTestTask};
36pub use headless_window_extensions::HeadlessWindowExtensions;
37pub use i_headless_touch_pointer::IHeadlessTouchPointer;
38
39#[cfg(feature = "testing")]
40pub mod testing;
41
42#[cfg(test)]
43mod tests;
44#[cfg(test)]
45mod unit_tests;