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§
- Browser
Activatable Lifetime - Activation of the application follows the visibility of the page.
- Browser
Input Handler - Turns the events of the element of a top-level into raw input events and delivers them to the top-level.
- Browser
Input Pane - 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.
- Browser
Insets Manager - 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. - Browser
Platform Options - Options of the browser backend.
- Browser
Platform Settings - The platform settings of the browser: the colour scheme, the contrast preference and the language of the page.
- Browser
Runtime Platform - The runtime platform of the browser: the kind of device comes from the page.
- Browser
Runtime Platform Services - Registers the runtime platform services of the browser.
- Browser
Screen - A screen of the page.
- Browser
Screen Key - Identifies a screen of the page by its object.
- Browser
Screens - The screens of the page: the screen of the window, and every screen once the page has been given the details of the screens.
- Browser
Single Threaded Dispatcher Impl - 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.
- Browser
Single View Lifetime - The lifetime of an application that shows one view in a web page.
- Browser
System Navigation Manager Impl - The system navigation of the page: the back navigation of the browser,
once
add_back_handlerhas made it a back request. - Browser
Text Input Method - 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.
- Browser
TopLevel Impl - The top-level of a view: a canvas inside an element of the page.
- Browser
Windowing Platform - The windowing platform of the browser. There are no windows: content is shown by a view over an element of the page.
- Clipboard
Impl - 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
cursorproperty. - CssCursor
Factory - Creates CSS cursors.
- Ferro
View - Shows content in an element of the web page.
- Icon
Loader Stub - The icon loader of a platform without window icons.
- JsObject
Control Handle - The handle of a control of the page that the framework hosts and may destroy.
- JsObject
Platform Handle - A platform handle that wraps an object of the page.
Enums§
- Browser
Renderer - The render backend a module draws with.
- Browser
Rendering Mode - How a view is rendered.
Traits§
- Browser
AppBuilder - Starts an application in a web page.