Expand description
Cursor themes, and the cursors in them.
Theme indexes the XCursor themes installed on a machine and resolves a
cursor name – following each theme’s Inherits= chain and the alias table
that maps modern names onto whatever legacy name a theme happens to ship –
to a file on disk. It reads no pixels, which keeps it cheap and testable
without a display.
Cursor is the other half: it reads one of those files into frames,
hotspots and timing. A cursor file is untrusted input, so the parser bounds
every length against the bytes actually present before allocating anything
– see the xcursor module for why that is not delegated to a crate.
Structs§
- Cursor
- A loaded cursor, immutable once built.
- Frame
- One frame of a cursor.
- Paused
- A cursor renderer whose device has gone away.
- Ping
Pong - Which of two cursor buffers is live.
- Placement
- Where the sprite ended up in the buffer.
- Plane
State - The state a cursor plane is put into for one frame.
- Renderer
- A cursor on a plane.
- Renderer
Config - How to set a renderer up.
- Selected
Plane - The plane a cursor will use.
- Theme
- An index of the cursor themes on disk.
- Theme
Resolution - Where a cursor name resolved to.
Enums§
- Cursor
Error - What can go wrong finding a cursor.
- Plane
Path - How the cursor reaches the screen.
- Rotation
- How the sprite is turned before it reaches the plane.
Constants§
- CURSOR_
FORMATS - The formats a cursor can be drawn in, best first.
Functions§
- compose
- Compose
frameinto a cursor plane buffer, and say where it landed. - default_
search_ paths - The default cursor search path.
- hardware_
rotation - What to write to the plane’s
rotationproperty. - plane_
origin - Where the plane’s top-left corner goes, given where the pointer is.
- preferred_
size - The size to ask for, before finding out what is accepted.
- probe_
size - Settle on a buffer size, asking
acceptswhat the kernel will take. - select_
plane - Pick a plane for the cursor on
crtc_index. - stage
- Write
placementintorequest.