Skip to main content

Crate frus_shell

Crate frus_shell 

Source
Expand description

frus-shell — frus’s framework layer.

Creates a native window (through winit), initialises the frus-gpu frus_gpu::Renderer and drives the event → frame loop for any Application. This is the only platform-dependent layer.

Macros§

main
Declares a frus application’s single entry point. Invoked exactly once (in the application’s library), it generates the entry point of every platform, all delegating to the same application:

Structs§

App
The event handler that drives an Application: it owns the window, the renderer, the last interface built and the runtime, and turns each event of the loop into messages, frames and effects. run and the other entry points build one; it is exported for a platform layer that supplies its own loop, not for an application to construct.
Command
A batch of effects to run, possibly empty: background tasks, synchronous or asynchronous, and focus and scroll requests addressed by widget key.
FrusApp
An application: a root component, and how it is dressed.
Locale
Re-export: size classes and orientation, so the application can drive its own responsive behaviour. A language, and optionally the script and the country it is written in (locale.dart).
Subscription
A set of continuous message sources, possibly empty.

Enums§

Brightness
Re-export: size classes and orientation, so the application can drive its own responsive behaviour. Whether a surface is showing a light or a dark interface.
Lifecycle
The application’s lifecycle state. The framework hands it to Application::on_lifecycle at every transition so the app can react: pause a timer or a camera in the background, write a save before being destroyed, and so on.
LocationStrategy
How a location is written in a browser’s address bar — see Application::location.
Orientation
Re-export: size classes and orientation, so the application can drive its own responsive behaviour. Display orientation, derived from the width-to-height ratio.
RemoteData
The four states of an asynchronously loaded value.
ScrollPhysics
Re-export: size classes and orientation, so the application can drive its own responsive behaviour. The behaviour of a scrollable at its edges and after a fling.
SizeClass
Re-export: size classes and orientation, so the application can drive its own responsive behaviour. A display-width band.
ThemeMode
Re-export: size classes and orientation, so the application can drive its own responsive behaviour. Which of an application’s themes is on display (app.dart:57).

Traits§

Application
What an application supplies to the framework: an Elm-style message model.

Functions§

link_among
The link among a program’s arguments, if one was passed: the first that has the shape of one. What the operating system does when a registered scheme is opened is to start the program with the link as an argument.
location_of_link
The location a link stands for, or None if link is not one: no scheme, or nothing after it.
run
Runs an application: opens the window and drives the event loop.