GPUI.Text.CaretGeometry (gpui v0.2.0-rc.1)

Copy Markdown View Source

Window-relative native pixel bounds for a text surface's primary caret.

The logical position uses zero-based UTF-16 line coordinates. Bounds are reported only while the caret is part of the currently laid-out viewport.

Summary

Functions

Decodes a protocol caret-geometry map into a typed value.

Types

t()

@type t() :: %GPUI.Text.CaretGeometry{
  height: float(),
  line: non_neg_integer(),
  utf16_offset: non_neg_integer(),
  width: float(),
  x: float(),
  y: float()
}

Functions

from_event(value)

@spec from_event(map()) :: t()

Decodes a protocol caret-geometry map into a typed value.