Skip to main content

Crate ferroui_browser

Crate ferroui_browser 

Source
Expand description

The browser platform.

An application runs on the main thread of a web page, inside the WebAssembly module the host page creates. There are no windows: content is shown by a FerroView over an element of the page, set as the main view of the single-view lifetime that BrowserAppBuilder::start_browser_app installs. The browser drives everything: dispatcher work is posted as tasks, rendering follows the animation frames, and the start-up function returns to the page.

The script side of the platform is the ferroui.js module built from webapp/. interop is the only place that crosses the boundary: it imports functions of that module and exports the callbacks the module invokes.

Modules§

interop
The boundary between the framework and the script module of the platform.
rendering
Rendering to the canvas of a view: the surface, its render targets (a WebGL context or a framebuffer copied to a 2D canvas), the render timer driven by the animation frames of the page or of a render worker, the render worker, and what the thread of the user interface and a render thread share about a canvas.
storage
The storage services of the page: the launcher, and the storage provider with the streams of its files.

Structs§

BrowserActivatableLifetime
Activation of the application follows the visibility of the page.
BrowserInputHandler
Turns the events of the element of a top-level into raw input events and delivers them to the top-level.
BrowserInputPane
The input pane of the browser: the part of a view the on-screen keyboard covers, as the virtual keyboard of the page reports it.
BrowserInsetsManager
The insets of the page: the safe area of the device (the CSS safe-area-inset-* environment variables) and the full screen, which hides the system bars.
BrowserPlatformOptions
Options of the browser backend.
BrowserPlatformSettings
The platform settings of the browser: the colour scheme, the contrast preference and the language of the page.
BrowserRuntimePlatform
The runtime platform of the browser: the kind of device comes from the page.
BrowserRuntimePlatformServices
Registers the runtime platform services of the browser.
BrowserScreen
A screen of the page.
BrowserScreenKey
Identifies a screen of the page by its object.
BrowserScreens
The screens of the page: the screen of the window, and every screen once the page has been given the details of the screens.
BrowserSingleThreadedDispatcherImpl
Dispatcher backend for the browser. The browser event loop is the only loop: wake-ups are posted as macrotasks and the dispatcher runs on the main thread, so its own state needs no locking. A module built with threads has other threads (the render worker), which wake the dispatcher through its signal handle. Pending input is deliberately not queried: the browser dispatches input between our tasks on its own, and gating low-priority jobs on a pending-input query starves them for as long as the pointer keeps moving.
BrowserSingleViewLifetime
The lifetime of an application that shows one view in a web page.
BrowserSystemNavigationManagerImpl
The system navigation of the page: the back navigation of the browser, once add_back_handler has made it a back request.
BrowserTextInputMethod
The text input method of a view: the hidden input element of the view stands in for the text the client edits, so that the input method of the browser has an element to compose into.
BrowserTopLevelImpl
The top-level of a view: a canvas inside an element of the page.
BrowserWindowingPlatform
The windowing platform of the browser. There are no windows: content is shown by a view over an element of the page.
ClipboardImpl
The clipboard of the page: the asynchronous Clipboard API, and the “paste” event in browsers without it.
CssCursor
A cursor as the value of the CSS cursor property.
CssCursorFactory
Creates CSS cursors.
FerroView
Shows content in an element of the web page.
IconLoaderStub
The icon loader of a platform without window icons.
JsObjectControlHandle
The handle of a control of the page that the framework hosts and may destroy.
JsObjectPlatformHandle
A platform handle that wraps an object of the page.

Enums§

BrowserRenderer
The render backend a module draws with.
BrowserRenderingMode
How a view is rendered.

Traits§

BrowserAppBuilder
Starts an application in a web page.