libghostty-vt 0.0.0
Loading...
Searching...
No Matches

Name a grid position in the active area, viewport, screen, or history. More...

Detailed Description

Name a grid position in the active area, viewport, screen, or history.

A GhosttyPoint names a position in the terminal grid, in one of four coordinate systems: the active area, the viewport, the full screen, or the scrollback history.

You need one to find a cell. The same row has a different number in each system, so pick the one that matches what you're asking. Resolve a point to a cell with ghostty_terminal_grid_ref().

Example

GhosttyPoint point = {
.value = { .coordinate = { .x = 4, .y = 0 } },
};
@ GHOSTTY_POINT_TAG_VIEWPORT
Definition point.h:69

Full program: c-vt-grid-traverse/src/main.c

The Grid guide shows how they line up.

Enumerations

enum  GhosttyPointTag { GHOSTTY_POINT_TAG_ACTIVE = 0 , GHOSTTY_POINT_TAG_VIEWPORT = 1 , GHOSTTY_POINT_TAG_SCREEN = 2 , GHOSTTY_POINT_TAG_HISTORY = 3 , GHOSTTY_POINT_TAG_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE }

Data Structures

struct  GhosttyPointCoordinate
union  GhosttyPointValue
struct  GhosttyPoint

Enumeration Type Documentation

◆ GhosttyPointTag

Point reference tag.

Determines which coordinate system a point uses.

Enumerator
GHOSTTY_POINT_TAG_ACTIVE 

Active area where the cursor can move.

GHOSTTY_POINT_TAG_VIEWPORT 

Visible viewport (changes when scrolled).

GHOSTTY_POINT_TAG_SCREEN 

Full screen including scrollback.

GHOSTTY_POINT_TAG_HISTORY 

Scrollback history only (before active area).

Definition at line 64 of file point.h.