Skip to main content

Crate ferroui_headless

Crate ferroui_headless 

Source
Expand description

The headless platform.

An application runs without a screen: its windows are sized and activated like the windows of a desktop platform, input is simulated through the extensions of a top-level (HeadlessWindowExtensions) and frames are rendered when the render timer ticks, which a test can force (FerroHeadlessPlatform::force_render_timer_tick).

With the headless drawing (the default of FerroHeadlessPlatformOptions) nothing is drawn: geometries behave like their bounds and bitmaps have a size and no content. With another rendering backend the frames of a window are kept, and HeadlessWindowExtensions::get_last_rendered_frame returns the last one.

An application uses the platform with FerroHeadlessPlatformExtensions::use_headless on its builder.

Structs§

FerroHeadlessPlatform
The headless platform.
FerroHeadlessPlatformOptions
Options for configuring the headless platform.
FerroTestApplicationAttribute
Sets up global test framework using the application builder passed as a parameter.
FerroTestAssembly
A test assembly as the session sees it: its name, by which HeadlessUnitTestSession::get_or_start_for_assembly keeps one session per assembly, and the two assembly attributes of the original. A test crate declares one as a static.
FerroTestIsolationAttribute
Specifies how headless unit tests should be isolated from each other, defining when the test runtime should recreate the application and dispatcher instances.
HeadlessUnitTestSession
Headless unit test session that needs to be used by the actual testing framework. All UI tests are supposed to be executed from one of the dispatch methods to keep execution flow on the UI thread. Disposing unit test session stops internal dispatcher loop.
HeadlessUnitTestTask
The outcome of an action dispatched to a HeadlessUnitTestSession; what the original returns as a task object.

Enums§

FerroTestIsolationLevel
Defines the isolation level for headless unit tests, controlling how the application and its associated dispatcher are managed between test runs.

Traits§

FerroHeadlessPlatformExtensions
The use_headless extension of the application builder.
HeadlessWindowExtensions
Set of extension methods to simplify usage of headless windows in the headless scenarios.
IHeadlessTouchPointer
Represents an active touch contact simulated on a headless window/toplevel. Use touch_move and touch_end to drive the contact.