loom & weft
Made for Swift.

Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.

LOOM Unreleased (PR #2) / TERMINAL ALIASES FROM WEFT

MouseKind

Mouse-down/up, drag, unpressed movement, and vertical wheel directions. Hit testing and action dispatch remain application decisions.

loom.MouseKind is an alias for weft.MouseKind. It is available through import loom. The underlying type’s members are documented here.

Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.

Example

let action: MouseKind = .wheelDown
_ = MouseEvent(kind: action, position: Point(x: 0, y: 0))
Members on this page

Feature guides and release status

MouseKind

Type Alias
typealias MouseKind = weft.weft.MouseKind

Mouse-down/up, drag, unpressed movement, and vertical wheel directions. Hit testing and action dispatch remain application decisions.

Source · TerminalExports.swift:17

Underlying weft API

MouseKind

Enumeration
enum MouseKind

Conforms to: Swift.Equatable, Swift.Hashable, Swift.Sendable, Swift.SendableMetatype.

A mouse action reported by the terminal.

Source · MouseEvent.swift:2

move

Case
case move

Pointer motion without a pressed button, when explicitly enabled.

Source · MouseEvent.swift:4

down

Case
case down

The down case. Associated values, if any, are shown in the declaration.

Source · MouseEvent.swift:5

drag

Case
case drag

The drag case. Associated values, if any, are shown in the declaration.

Source · MouseEvent.swift:6

up

Case
case up

The up case. Associated values, if any, are shown in the declaration.

Source · MouseEvent.swift:7

wheelUp

Case
case wheelUp

The wheel up case. Associated values, if any, are shown in the declaration.

Source · MouseEvent.swift:8

wheelDown

Case
case wheelDown

The wheel down case. Associated values, if any, are shown in the declaration.

Source · MouseEvent.swift:9

wheelLeft

Case
case wheelLeft

The wheel left case. Associated values, if any, are shown in the declaration.

Source · MouseEvent.swift:10

wheelRight

Case
case wheelRight

The wheel right case. Associated values, if any, are shown in the declaration.

Source · MouseEvent.swift:11