Skip to main content

Crate drmkit_cursor

Crate drmkit_cursor 

Source
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.
PingPong
Which of two cursor buffers is live.
Placement
Where the sprite ended up in the buffer.
PlaneState
The state a cursor plane is put into for one frame.
Renderer
A cursor on a plane.
RendererConfig
How to set a renderer up.
SelectedPlane
The plane a cursor will use.
Theme
An index of the cursor themes on disk.
ThemeResolution
Where a cursor name resolved to.

Enums§

CursorError
What can go wrong finding a cursor.
PlanePath
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 frame into 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 rotation property.
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 accepts what the kernel will take.
select_plane
Pick a plane for the cursor on crtc_index.
stage
Write placement into request.