Expand description
Type definitions for various types of callbacks, as well as focus and scroll handling
Structs§
- Callback
- Stores a function pointer that is executed when the given UI element is hit
- Callback
Info - Information about the callback that is passed to the callback whenever a callback is invoked
- Document
Id - GlCallback
- Callbacks that returns a rendered OpenGL texture
- GlCallback
Info - Hidpi
Adjusted Bounds - Information about the bounds of a laid-out div rectangle.
- HitTest
Item - IFrame
Callback - Callback that, given a rectangle area on the screen, returns the DOM appropriate for that bounds (useful for infinite lists)
- IFrame
Callback Info - Layout
Info - Gives the
layout()
function access to theAppResources
and theWindow
(for querying images and fonts, as well as width / height) - Layout
Info Ptr - Pointer to rust-allocated
Box<LayoutInfo<'a>>
struct - Parent
Nodes Iterator - Iterator that, starting from a certain starting point, returns the parent node until it gets to the root node.
- Pipeline
Id - Ref
- The two-way binding system
- RefAny
- RefAny
Ptr - Pointer to rust-allocated
Box<RefAny>
struct - Scroll
Position - Information about a scroll frame, given to the user by the framework
- Timer
Callback - Callback that can runs on every frame on the main thread - can modify the app data model
- Timer
Callback Info
Enums§
- Focus
Target - Defines the focus_targeted node ID for the next frame
Constants§
- Dont
Redraw - The screen does not need to redraw after the callback has been called.
- Redraw
- After the callback is called, the screen needs to redraw (layout() function being called again).
Functions§
- call_
callbacks - The actual function that calls the callback in their proper hierarchy and order
Type Aliases§
- Callback
Return - Callback
Type - GlCallback
Return - GlCallback
Type - IFrame
Callback Return - IFrame
Callback Type - Layout
Callback - Callback function pointer (has to be a function pointer in order to be compatible with C APIs later on).
- Pipeline
Source Id - This type carries no valuable semantics for WR. However, it reflects the fact that
clients (Servo) may generate pipelines by different semi-independent sources.
These pipelines still belong to the same
IdNamespace
and the sameDocumentId
. Having this extra Id field enables them to generatePipelineId
without collision. - Timer
Callback Return - Timer
Callback Type - Update
Screen - A callback function has to return if the screen should be updated after the function has run.