Expand description
Client-side window decorations.
Port of src/csd/. Title bars, shadows, rounded corners and the buttons
on them — drawn by the client rather than by a compositor, which is what
makes them client-side.
Drawing is CPU work over a pixel buffer. The one part that touches a DRM
device is Surface, which allocates, maps and exports the dumb buffer a
decoration is drawn into. The presenters only compute the property writes
that put those pixels on screen; committing them is the caller’s business.
Structs§
- Blit
Item - One decoration to blend in.
- Button
- One button’s two states.
- Buttons
- The three window buttons.
- Canvas
- Where a decoration is being drawn.
- Color
- An 8-bit-per-channel color with alpha.
- Colors
- Every color a decoration uses.
- Damage
Rect - A rectangle of the canvas that has to be repainted.
- Damage
Slot - One decoration’s footprint on the canvas, as of some frame.
- Decoration
Geometry - Where everything sits inside a decoration of a given size.
- Dirty
- What changed since the decoration was last drawn.
- FbTarget
- The framebuffer being composited into.
- Overlay
Reservation - Overlay planes claimed for decorations, per CRTC.
- Plane
Slot - The property ids for one reserved plane, and what to write to the ones whose values do not come from the surface.
- Property
Write - One property write, as
compute_writesandcompute_canvas_writesproduce them. - Renderer
- Draws decorations.
- Renderer
Config - How to build a renderer.
- Shadow
Cache - Rendered shadows, most recently used last.
- Shadow
Dest - Where a shadow is being blitted to.
- Shadow
Key - What identifies one cached shadow.
- Surface
- A decoration’s pixels, and the framebuffer they scan out through.
- Surface
Config - How big a decoration surface is.
- Surface
Ref - A decoration surface and where it goes.
- Theme
- A complete decoration theme.
- Title
Bar - The title bar’s geometry and type.
- Window
Anim - The animations one decorated window is running.
- Window
State - A decorated window, as the renderer sees it.
Enums§
- Color
Error - Why a color could not be read.
- Draw
Error - Why a decoration could not be drawn.
- Elevation
- How much shadow a window casts.
- Hover
Button - Which window button the pointer is over.
- Plane
Error - Why the writes could not be computed.
- Reserve
Error - Why a reservation could not be made.
- Surface
Error - Why a surface could not be created or used.
- Theme
Error - Why a theme could not be read.
- Tier
- Which way a decoration reaches the screen.
Constants§
- DEFAULT_
CAPACITY - How many shadows to keep when the caller does not say.
- PROGRESS_
UNSET - The progress value a state carries before an animator has written one.
- SURFACE_
FOURCC - The one format a decoration is ever drawn in.
Functions§
- choose_
presenter_ tier - Pick a tier from what the hardware can offer.
- compose_
into_ framebuffer - Blend
itemsintotargetoverdamage. - compute_
canvas_ writes - The property writes that arm the canvas plane.
- compute_
damage - What changed between two frames’ worth of slots.
- compute_
writes - Convert
surfacesto a full set of property writes overslots. - decoration_
geometry - Lay out a decoration
deco_wbydeco_hundertheme. - ease_
out_ cubic - Ease-out cubic, clamped to
0..=1. - fb_
fourcc_ for - Pick a
FourCCfrom what fbdev reports about the framebuffer. - glass_
default - The reference theme.
- glass_
lite - The same look, cheaper to draw.
- glass_
minimal - No shadow, no animation, no noise.
- intersect_
rect - The overlap between a rectangle and a damage region.
- load_
theme_ file - Load a theme from a file, filling anything absent from
base. - load_
theme_ str - Load a theme from TOML text, filling anything absent from
base. - theme_
id - A hash of the theme fields that affect a decoration’s pixels.
- union_
rect - The smallest rectangle covering both.