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.runand 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.
- Global
Shortcut - A key combination that reaches the application from anywhere, and what it does.
- 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). - Scroll
Physics - Re-export: size classes and orientation, so the application can drive its own responsive behaviour. The behaviour of a scrollable: its feel at the edges and after a fling, and whether the user may scroll it.
- Subscription
- A set of continuous message sources, possibly empty.
- Taskbar
- What the application’s taskbar button shows: a count, a progress, or neither.
- Tray
- The application’s tray icon, described: its tooltip, its icon, its menu, what a click on it does, and whether closing the window leaves the application running in it.
Enums§
- AppIcon
- What an application’s icon is.
- 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_lifecycleat 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. - Location
Strategy - 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.
- Remote
Data - The four states of an asynchronously loaded value.
- Size
Class - Re-export: size classes and orientation, so the application can drive its own responsive behaviour. A display-width band.
- Taskbar
Progress - The progress shown on the taskbar button.
- Theme
Mode - 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
Noneiflinkis not one: no scheme, or nothing after it. - run
- Runs an application: opens the window and drives the event loop.