LavaUI docs GitHub

enum CursorShape

Swift

enum CursorShape

The pointer image over a view.

A small set on purpose. Every shape here exists in GLFW's standard cursors and in every X11 cursor theme the compositor can load, which is the whole bar a shape has to clear: one of the two run modes drawing an arrow where the other draws a resize handle would be worse than not offering it.

The raw values cross a process boundary (SetCursor in the IDL) and are mapped to names by the compositor, so they are stable — append, never renumber.

Sources/LavaUI/Cursor.swift:13

Cases

case arrow

The default pointer. What every view has until something says otherwise.

Sources/LavaUI/Cursor.swift:15

case text

I-beam, over editable or selectable text.

Sources/LavaUI/Cursor.swift:17

case pointer

The "this activates something" hand.

Sources/LavaUI/Cursor.swift:19

case crosshair

A thin cross, for picking a point or a pixel.

Sources/LavaUI/Cursor.swift:21

case resizeLeftRight

Horizontal drag: a vertical divider, a column edge.

Sources/LavaUI/Cursor.swift:23

case resizeUpDown

Vertical drag: a horizontal divider, a row edge.

Sources/LavaUI/Cursor.swift:25

case hidden

No pointer at all, while it is over this view — a video in fullscreen once its controls have faded. Any movement that should bring it back has to be answered by the view, which changes its cursor again: the renderer hides the image, it does not stop delivering motion.

Sources/LavaUI/Cursor.swift:30