Expand description
Foundation types shared by every RavenRS crate.
ravenrs-core has no dependencies. It defines logical-pixel geometry, colors,
platform-neutral input events, Scene (the display list that widgets
produce and renderers consume) and AccessTree (what assistive technology
sees). Keeping them here lets widgets stay independent of any GPU or
operating-system API. csv is here because the grid and the report
exporters share nothing else lower down.
Modules§
- csv
- CSV fields (RFC 4180), written the same way by every engine that exports CSV.
Structs§
- Access
Node - One node of the accessibility tree.
- Access
Tree - The whole accessibility tree of one window, as of the latest frame.
- Adapter
Report - One GPU as the graphics API describes it.
- Border
- A solid stroke drawn inside a shape’s edge.
- Build
Causes - How many builds each
BuildCausecaused. - Color
- A non-premultiplied RGBA color with components in
0.0..=1.0, in the sRGB color space (the space design tokens are written in). - Color
Stop - A color along a gradient, from
0.0to1.0. - Diagnostic
Report - Everything known about where an app runs, to read or to paste into a bug report.
- Effect
- A visual change applied to painted content without touching layout: what a compositor would do to a layer, here done to the display list.
- File
Storage - Pieces of data kept as files in a folder on the desktop, one file per name. A write goes to a draft first and then takes the file’s place, so a crash never leaves half a file.
- FontRef
- Font bytes plus a stable identity used as a cache key by the glyph atlas.
- Frame
Log - The latest frames an app drew. Recording one is a push into a fixed buffer, so it can stay on while nobody is looking.
- Frame
Sample - What one frame cost. All durations are time on the CPU: waiting for a busy
GPU shows up in
Self::acquireandSelf::present, not inSelf::render. - Frame
Summary - The recent frames of a
FrameLog, summed up. - Frame
Work - What the UI runtime did for one frame.
- Glyph
Run - Shaped glyphs sharing one font, size and color.
- GpuReport
- The GPU an app ended up on and the ones it could have used.
- Image
Data - Decoded pixels: RGBA8, straight (not premultiplied) alpha, sRGB, row-major.
Cloning is cheap; the renderer caches the GPU texture by
id. - Image
Quad - An image drawn into a rectangle, with optional rounded corners.
- Insets
- Distances from each edge, used for padding.
- Linear
Gradient - A two-stop linear gradient.
startandendare relative to the shape’s rectangle:(0, 0)is its top-left corner and(1, 1)its bottom-right. - Memory
Storage - Pieces of data kept in memory, gone when the program ends: for tests and previews.
- Modifiers
- Modifier keys held during a key event.
- Numeric
Value - A numeric value with its range (sliders, spin buttons, progress).
- Path
Clip - What a
PathFillis seen through, in the same coordinates: another outline. - Path
Fill - A shape made of curves, filled with exact coverage at each pixel, so it stays sharp at any size. A stroke is a fill of its expanded outline.
- Percentiles
- The median and the 95th percentile of a duration.
- Performance
Result - What redrawing the window nonstop for a few seconds showed.
- Phase
Times - Time spent in each phase of the UI runtime, once a clock was given to it.
- Point
- A point in logical pixels, origin at the top-left corner.
- Positioned
Glyph - One shaped glyph and its pen position.
- Quad
- A rounded rectangle with optional border and shadow. The renderer draws it with a signed-distance function, so corners stay crisp at any scale factor.
- Rect
- An axis-aligned rectangle in logical pixels.
- Render
Work - What the renderer’s resources looked like after a frame.
- Scene
- An ordered display list. Reused between frames to avoid reallocating.
- Shadow
- A soft drop shadow.
bluris the Gaussian standard deviation times two, matching what CSSbox-shadowcalls the blur radius. - Size
- A size in logical pixels.
- Surface
Report - How frames reach the window.
- System
Report - The machine and the build around the GPU.
- View
Cost - What a type of view cost in the latest build, not counting the views inside it.
Enums§
- Access
Action - What assistive technology can ask a node to do.
- Bottleneck
- Where the time of a slow frame goes.
- Brush
- How a shape is filled.
- Build
Cause - Why the views ran again. It is the first question about a slow screen: every rebuild costs in proportion to the whole screen.
- Cursor
Icon - Cursor the UI asks the platform to show.
- Diagnostic
Finding - Something in a
DiagnosticReportthat explains a slow or broken app. - Event
- Platform-neutral input event, already converted to logical pixels.
- Fill
Rule - Which parts of a self-crossing outline count as inside.
- Key
- The subset of keys the framework itself reacts to; everything else is
forwarded as
CharacterorOtherfor widgets to interpret. - Path
Element - One step of a
PathFill’s outline. - Path
Paint - What fills a
PathFill, in the coordinates of its outline. - Performance
Verdict - How a
PerformanceResultfeels to the person using the app. - Pointer
Button - Mouse button or equivalent touch/pen action.
- Primitive
- One entry of the display list.
- Role
- What kind of control or content a node is, as assistive technology names it.
- Toggled
- State of a check box, switch or toggle button.
Constants§
- MAX_
ISSUE_ URL - The longest URL
new_issue_urlbuilds. Servers answer longer ones with an error instead of the page, and GitHub’s limit is not documented, so this stays well under the 8 KB many servers allow.
Traits§
- Storage
- Named pieces of data kept between runs.
Functions§
- monotone_
slopes - The slope at each of
points(in order, with growingx) of a curve that never swings past them: Fritsch-Carlson, with a harmonic mean. Charts and curve editors share it so that a curve reads the same in both. Fewer than two points have no slope to speak of, so they get zeros. - new_
issue_ url - The URL of a new issue with
introand thenreportin a code block as its body, for the person to review and send on the page it opens. It never passesMAX_ISSUE_URL: a report that would make it longer loses its last lines, whole where possible, andtruncated_notesays so after the block. - redact_
user_ paths textwith every path inside a person’s own folder replaced, since those paths usually carry the person’s name. A path can have spaces, so what follows goes up to the end of the line or a quote or list separator: too much hidden is better than a surname left behind.