loom & weft
Made for Swift.

Published release 0.2.1. Unreleased PR #2 reference.

LOOM 0.2.1 / COLLECTIONS AND INTERACTION

FocusTarget

A keyboard focus destination and optional click region in absolute terminal cells.

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.

Members on this page

Feature guides and release status

FocusTarget

Structure
struct FocusTarget<ID> where ID : Hashable

Conforms to: Swift.Sendable, Swift.SendableMetatype.

A keyboard focus destination and optional click region in absolute terminal cells.

Source · FocusState.swift:2

id

Instance Property
var id: ID

Stable identity for this icon or code block.

Source · FocusState.swift:3

area

Instance Property
var area: Rect?

The available zero-based rectangle in terminal cells.

Source · FocusState.swift:4

isEnabled

Instance Property
var isEnabled: Bool

A public field of this type. Its value type and mutability are shown in the declaration.

Source · FocusState.swift:5

init(_:area:isEnabled:)

Initializer
init(_ id: ID, area: Rect? = nil, isEnabled: Bool = true)

Creates a value with the supplied arguments. Default arguments are shown in the declaration.

Parameters (3)
id
Stable entry/icon identity, not an array index.
area
Assigned absolute terminal-cell rectangle.
isEnabled
Argument type and any default are shown in the declaration; see the behavior notes above.
Source · FocusState.swift:7