Skip to main content

Crate libghostty_vt_sys

Crate libghostty_vt_sys 

Source

Modules§

BuildInfo
CellContentTag
CellData
CellSemanticContent
CellWide
ColorScheme
FocusEvent
FormatterFormat
Key
KeyAction
KeyEncoderOption
KittyGraphicsData
KittyGraphicsImageData
KittyGraphicsPlacementData
KittyGraphicsPlacementIteratorOption
KittyImageCompression
KittyImageFormat
KittyPlacementLayer
ModeReportState
MouseAction
MouseButton
MouseEncoderOption
MouseFormat
MouseTrackingMode
OptimizeMode
OptionAsAlt
OscCommandData
OscCommandType
PointTag
RenderStateCursorVisualStyle
RenderStateData
RenderStateDirty
RenderStateOption
RenderStateRowCellsData
RenderStateRowData
RenderStateRowOption
Result
RowData
RowSemanticPrompt
SelectionAdjust
SelectionGestureAutoscroll
SelectionGestureBehavior
SelectionGestureData
SelectionGestureEventOption
SelectionGestureEventType
SelectionOrder
SgrAttributeTag
SgrUnderline
SizeReportStyle
StyleColorTag
SysLogLevel
SysOption
TerminalCursorStyle
TerminalData
TerminalOption
TerminalScreen
TerminalScrollViewportTag

Macros§

sized
Initialize a “sized” FFI object.

Structs§

Allocator
Custom memory allocator.
AllocatorVtable
Function table for custom memory allocator operations.
Buffer
A caller-provided byte buffer.
Codepoints
A borrowed list of Unicode scalar values.
ColorRgb
RGB color value.
DeviceAttributes
Device attributes response data for all three DA levels.
DeviceAttributesPrimary
Primary device attributes (DA1) response data.
DeviceAttributesSecondary
Secondary device attributes (DA2) response data.
DeviceAttributesTertiary
Tertiary device attributes (DA3) response data.
FormatterImpl
FormatterScreenExtra
Extra screen state to include in styled output.
FormatterTerminalExtra
Extra terminal state to include in styled output.
FormatterTerminalOptions
Options for creating a terminal formatter.
GridRef
A resolved reference to a terminal cell position.
KeyEncoderImpl
KeyEventImpl
KittyGraphicsImageImpl
KittyGraphicsImpl
KittyGraphicsPlacementIteratorImpl
KittyGraphicsPlacementRenderInfo
Combined rendering geometry for a placement in a single sized struct.
MouseEncoderImpl
MouseEncoderSize
Mouse encoder size and geometry context.
MouseEventImpl
MousePosition
Mouse position in surface-space pixels.
OscCommandImpl
OscParserImpl
Point
Tagged union for a point in the terminal grid.
PointCoordinate
A coordinate in the terminal grid.
RenderStateColors
Render-state color information.
RenderStateImpl
RenderStateRowCellsImpl
RenderStateRowIteratorImpl
RenderStateRowSelection
Row-local selection range.
Selection
A snapshot selection range defined by two grid references.
SelectionGestureBehaviors
Selection behaviors for single-, double-, and triple-click gestures.
SelectionGestureEventImpl
SelectionGestureGeometry
Display geometry used to interpret selection gesture drag events.
SelectionGestureImpl
SgrAttribute
SGR attribute (tagged union).
SgrParserImpl
SgrUnknown
Unknown SGR attribute data.
SizeReportSize
Terminal size information for encoding size reports.
String
A borrowed byte string (pointer + length).
Style
Terminal cell style.
StyleColor
Style color (tagged union).
SurfacePosition
A surface-space position in pixels.
SysImage
Result of decoding an image.
TerminalImpl
TerminalOptions
Terminal initialization options.
TerminalScrollViewport
Tagged union for scroll viewport behavior.
TerminalScrollbar
Scrollbar state for the terminal viewport.
TerminalSelectLineOptions
Options for deriving a line selection from a terminal grid reference.
TerminalSelectWordBetweenOptions
Options for deriving the nearest word selection between two grid references.
TerminalSelectWordOptions
Options for deriving a word selection from a terminal grid reference.
TerminalSelectionFormatOptions
Options for one-shot formatting of a terminal selection.
TrackedGridRefImpl

Constants§

COLOR_NAMED_BLACK
COLOR_NAMED_BLUE
COLOR_NAMED_BRIGHT_BLACK
COLOR_NAMED_BRIGHT_BLUE
COLOR_NAMED_BRIGHT_CYAN
COLOR_NAMED_BRIGHT_GREEN
COLOR_NAMED_BRIGHT_MAGENTA
COLOR_NAMED_BRIGHT_RED
COLOR_NAMED_BRIGHT_WHITE
COLOR_NAMED_BRIGHT_YELLOW
COLOR_NAMED_CYAN
COLOR_NAMED_GREEN
COLOR_NAMED_MAGENTA
COLOR_NAMED_RED
COLOR_NAMED_WHITE
COLOR_NAMED_YELLOW
DA_CONFORMANCE_LEVEL_2
DA_CONFORMANCE_LEVEL_3
DA_CONFORMANCE_LEVEL_4
DA_CONFORMANCE_LEVEL_5
DA_CONFORMANCE_VT100
DA_CONFORMANCE_VT101
DA_CONFORMANCE_VT102
DA_CONFORMANCE_VT125
DA_CONFORMANCE_VT131
DA_CONFORMANCE_VT132
DA_CONFORMANCE_VT220
DA_CONFORMANCE_VT240
DA_CONFORMANCE_VT320
DA_CONFORMANCE_VT340
DA_CONFORMANCE_VT420
DA_CONFORMANCE_VT510
DA_CONFORMANCE_VT520
DA_CONFORMANCE_VT525
DA_DEVICE_TYPE_VT100
DA_DEVICE_TYPE_VT220
DA_DEVICE_TYPE_VT240
DA_DEVICE_TYPE_VT320
DA_DEVICE_TYPE_VT330
DA_DEVICE_TYPE_VT340
DA_DEVICE_TYPE_VT382
DA_DEVICE_TYPE_VT420
DA_DEVICE_TYPE_VT510
DA_DEVICE_TYPE_VT520
DA_DEVICE_TYPE_VT525
DA_FEATURE_ANSI_COLOR
DA_FEATURE_ANSI_TEXT_LOCATOR
DA_FEATURE_CLIPBOARD
DA_FEATURE_COLUMNS_132
DA_FEATURE_HORIZONTAL_SCROLLING
DA_FEATURE_LOCATOR
DA_FEATURE_NATIONAL_REPLACEMENT
DA_FEATURE_PRINTER
DA_FEATURE_RECTANGULAR_EDITING
DA_FEATURE_REGIS
DA_FEATURE_SELECTIVE_ERASE
DA_FEATURE_SIXEL
DA_FEATURE_TECHNICAL_CHARACTERS
DA_FEATURE_TERMINAL_STATE
DA_FEATURE_USER_DEFINED_KEYS
DA_FEATURE_WINDOWING
ENUM_MAX_VALUE
KITTY_KEY_ALL
KITTY_KEY_DISABLED
KITTY_KEY_DISAMBIGUATE
KITTY_KEY_REPORT_ALL
KITTY_KEY_REPORT_ALTERNATES
KITTY_KEY_REPORT_ASSOCIATED
KITTY_KEY_REPORT_EVENTS
MODS_ALT
MODS_ALT_SIDE
MODS_CAPS_LOCK
MODS_CTRL
MODS_CTRL_SIDE
MODS_NUM_LOCK
MODS_SHIFT
MODS_SHIFT_SIDE
MODS_SUPER
MODS_SUPER_SIDE

Functions§

ghostty_alloc
Allocate a buffer of len bytes.
ghostty_build_info
Query a compile-time build configuration value.
ghostty_cell_get
Get data from a cell.
ghostty_cell_get_multi
Get multiple data fields from a cell in a single call.
ghostty_color_rgb_get
Get the RGB color components.
ghostty_focus_encode
Encode a focus event into a terminal escape sequence.
ghostty_formatter_format_alloc
Run the formatter and return an allocated buffer with the output.
ghostty_formatter_format_buf
Run the formatter and produce output into the caller-provided buffer.
ghostty_formatter_free
Free a formatter instance.
ghostty_formatter_terminal_new
Create a formatter for a terminal’s active screen.
ghostty_free
Free memory that was allocated by a libghostty-vt function.
ghostty_grid_ref_cell
Get the cell from a grid reference.
ghostty_grid_ref_graphemes
Get the grapheme cluster codepoints for the cell at the grid reference’s position.
ghostty_grid_ref_hyperlink_uri
Get the hyperlink URI for the cell at the grid reference’s position.
ghostty_grid_ref_row
Get the row from a grid reference.
ghostty_grid_ref_style
Get the style of the cell at the grid reference’s position.
ghostty_key_encoder_encode
Encode a key event into a terminal escape sequence.
ghostty_key_encoder_free
Free a key encoder instance.
ghostty_key_encoder_new
Create a new key encoder instance.
ghostty_key_encoder_setopt
Set an option on the key encoder.
ghostty_key_encoder_setopt_from_terminal
Set encoder options from a terminal’s current state.
ghostty_key_event_free
Free a key event instance.
ghostty_key_event_get_action
Get the key action (press, release, repeat).
ghostty_key_event_get_composing
Get whether the key event is part of a composition sequence.
ghostty_key_event_get_consumed_mods
Get the consumed modifiers bitmask.
ghostty_key_event_get_key
Get the physical key code.
ghostty_key_event_get_mods
Get the modifier keys bitmask.
ghostty_key_event_get_unshifted_codepoint
Get the unshifted Unicode codepoint.
ghostty_key_event_get_utf8
Get the UTF-8 text generated by the key event.
ghostty_key_event_new
Create a new key event instance.
ghostty_key_event_set_action
Set the key action (press, release, repeat).
ghostty_key_event_set_composing
Set whether the key event is part of a composition sequence.
ghostty_key_event_set_consumed_mods
Set the consumed modifiers bitmask.
ghostty_key_event_set_key
Set the physical key code.
ghostty_key_event_set_mods
Set the modifier keys bitmask.
ghostty_key_event_set_unshifted_codepoint
Set the unshifted Unicode codepoint.
ghostty_key_event_set_utf8
Set the UTF-8 text generated by the key for the current keyboard layout.
ghostty_kitty_graphics_get
Get data from a kitty graphics storage instance.
ghostty_kitty_graphics_image
Look up a Kitty graphics image by its image ID.
ghostty_kitty_graphics_image_get
Get data from a Kitty graphics image.
ghostty_kitty_graphics_image_get_multi
Get multiple data fields from a Kitty graphics image in a single call.
ghostty_kitty_graphics_placement_get
Get data from the current placement in a placement iterator.
ghostty_kitty_graphics_placement_get_multi
Get multiple data fields from the current placement in a single call.
ghostty_kitty_graphics_placement_grid_size
Compute the grid cell size of the current placement.
ghostty_kitty_graphics_placement_iterator_free
Free a placement iterator.
ghostty_kitty_graphics_placement_iterator_new
Create a new placement iterator instance.
ghostty_kitty_graphics_placement_iterator_set
Set an option on a placement iterator.
ghostty_kitty_graphics_placement_next
Advance the placement iterator to the next placement.
ghostty_kitty_graphics_placement_pixel_size
Compute the rendered pixel size of the current placement.
ghostty_kitty_graphics_placement_rect
Compute the grid rectangle occupied by the current placement.
ghostty_kitty_graphics_placement_render_info
Get all rendering geometry for a placement in a single call.
ghostty_kitty_graphics_placement_source_rect
Get the resolved source rectangle for the current placement.
ghostty_kitty_graphics_placement_viewport_pos
Get the viewport-relative grid position of the current placement.
ghostty_mode_report_encode
Encode a DECRPM (DEC Private Mode Report) response sequence.
ghostty_mouse_encoder_encode
Encode a mouse event into a terminal escape sequence.
ghostty_mouse_encoder_free
Free a mouse encoder instance.
ghostty_mouse_encoder_new
Create a new mouse encoder instance.
ghostty_mouse_encoder_reset
Reset internal encoder state.
ghostty_mouse_encoder_setopt
Set an option on the mouse encoder.
ghostty_mouse_encoder_setopt_from_terminal
Set encoder options from a terminal’s current state.
ghostty_mouse_event_clear_button
Clear the event button.
ghostty_mouse_event_free
Free a mouse event instance.
ghostty_mouse_event_get_action
Get the event action.
ghostty_mouse_event_get_button
Get the event button.
ghostty_mouse_event_get_mods
Get keyboard modifiers held during the event.
ghostty_mouse_event_get_position
Get the event position in surface-space pixels.
ghostty_mouse_event_new
Create a new mouse event instance.
ghostty_mouse_event_set_action
Set the event action.
ghostty_mouse_event_set_button
Set the event button.
ghostty_mouse_event_set_mods
Set keyboard modifiers held during the event.
ghostty_mouse_event_set_position
Set the event position in surface-space pixels.
ghostty_osc_command_data
Extract data from an OSC command.
ghostty_osc_command_type
Get the type of an OSC command.
ghostty_osc_end
Finalize OSC parsing and retrieve the parsed command.
ghostty_osc_free
Free an OSC parser instance.
ghostty_osc_new
Create a new OSC parser instance.
ghostty_osc_next
Parse the next byte in an OSC sequence.
ghostty_osc_reset
Reset an OSC parser instance to its initial state.
ghostty_paste_encode
Encode paste data for writing to the terminal pty.
ghostty_paste_is_safe
Check if paste data is safe to paste into the terminal.
ghostty_render_state_colors_get
Get the current color information from a render state.
ghostty_render_state_free
Free a render state instance.
ghostty_render_state_get
Get a value from a render state.
ghostty_render_state_get_multi
Get multiple data fields from a render state in a single call.
ghostty_render_state_new
Create a new render state instance.
ghostty_render_state_row_cells_free
Free a row cells instance.
ghostty_render_state_row_cells_get
Get a value from the current cell in a render-state row cells iterator.
ghostty_render_state_row_cells_get_multi
Get multiple data fields from the current cell in a single call.
ghostty_render_state_row_cells_new
Create a new row cells instance.
ghostty_render_state_row_cells_next
Move a render-state row cells iterator to the next cell.
ghostty_render_state_row_cells_select
Move a render-state row cells iterator to a specific column.
ghostty_render_state_row_get
Get a value from the current row in a render-state row iterator.
ghostty_render_state_row_get_multi
Get multiple data fields from the current row in a single call.
ghostty_render_state_row_iterator_free
Free a render-state row iterator.
ghostty_render_state_row_iterator_new
Create a new row iterator instance.
ghostty_render_state_row_iterator_next
Move a render-state row iterator to the next row.
ghostty_render_state_row_set
Set an option on the current row in a render-state row iterator.
ghostty_render_state_set
Set an option on a render state.
ghostty_render_state_update
Update a render state instance from a terminal.
ghostty_row_get
Get data from a row.
ghostty_row_get_multi
Get multiple data fields from a row in a single call.
ghostty_selection_gesture_event
Apply a selection gesture event and return the resulting selection snapshot.
ghostty_selection_gesture_event_free
Free a selection gesture event object.
ghostty_selection_gesture_event_new
Create a reusable selection gesture event object.
ghostty_selection_gesture_event_set
Set or clear an option on a selection gesture event.
ghostty_selection_gesture_free
Free a selection gesture object.
ghostty_selection_gesture_get
Read data from a selection gesture.
ghostty_selection_gesture_get_multi
Read multiple data fields from a selection gesture in a single call.
ghostty_selection_gesture_new
Create a selection gesture object.
ghostty_selection_gesture_reset
Reset any active selection gesture state.
ghostty_sgr_attribute_tag
Get the tag from an SGR attribute.
ghostty_sgr_attribute_value
Get the value from an SGR attribute.
ghostty_sgr_free
Free an SGR parser instance.
ghostty_sgr_new
Create a new SGR parser instance.
ghostty_sgr_next
Get the next SGR attribute.
ghostty_sgr_reset
Reset an SGR parser instance to the beginning of the parameter list.
ghostty_sgr_set_params
Set SGR parameters for parsing.
ghostty_sgr_unknown_full
Get the full parameter list from an unknown SGR attribute.
ghostty_sgr_unknown_partial
Get the partial parameter list from an unknown SGR attribute.
ghostty_size_report_encode
Encode a terminal size report into an escape sequence.
ghostty_style_default
Get the default style.
ghostty_style_is_default
Check if a style is the default style.
ghostty_sys_log_stderr
Built-in log callback that writes to stderr.
ghostty_sys_set
Set a system-level option.
ghostty_terminal_free
Free a terminal instance.
ghostty_terminal_get
Get data from a terminal instance.
ghostty_terminal_get_multi
Get multiple data fields from a terminal in a single call.
ghostty_terminal_grid_ref
Resolve a point in the terminal grid to a grid reference.
ghostty_terminal_grid_ref_track
Create an owned tracked grid reference for a terminal point.
ghostty_terminal_mode_get
Get the current value of a terminal mode.
ghostty_terminal_mode_set
Set the value of a terminal mode.
ghostty_terminal_new
Create a new terminal instance.
ghostty_terminal_point_from_grid_ref
Convert a grid reference back to a point in the given coordinate system.
ghostty_terminal_reset
Perform a full reset of the terminal (RIS).
ghostty_terminal_resize
Resize the terminal to the given dimensions.
ghostty_terminal_scroll_viewport
Scroll the terminal viewport.
ghostty_terminal_select_all
Derive a selection snapshot covering all selectable terminal content.
ghostty_terminal_select_line
Derive a line selection snapshot from a terminal grid reference.
ghostty_terminal_select_output
Derive a command-output selection snapshot from a terminal grid reference.
ghostty_terminal_select_word
Derive a word selection snapshot from a terminal grid reference.
ghostty_terminal_select_word_between
Derive the nearest word selection snapshot between two terminal grid refs.
ghostty_terminal_selection_adjust
Adjust a selection snapshot using terminal selection semantics.
ghostty_terminal_selection_contains
Test whether a terminal point is inside a selection snapshot.
ghostty_terminal_selection_equal
Test whether two selection snapshots are equal.
ghostty_terminal_selection_format_alloc
Format a terminal selection into an allocated buffer.
ghostty_terminal_selection_format_buf
Format a terminal selection into a caller-provided buffer.
ghostty_terminal_selection_order
Get the current endpoint ordering of a selection snapshot.
ghostty_terminal_selection_ordered
Return a selection snapshot with endpoints ordered as requested.
ghostty_terminal_set
Set an option on the terminal.
ghostty_terminal_vt_write
Write VT-encoded data to the terminal for processing.
ghostty_tracked_grid_ref_free
Free a tracked grid reference.
ghostty_tracked_grid_ref_has_value
Return whether a tracked grid reference currently has a meaningful value.
ghostty_tracked_grid_ref_point
Convert a tracked grid reference to a point in the requested coordinate space.
ghostty_tracked_grid_ref_set
Move an existing tracked grid reference to a new terminal point.
ghostty_tracked_grid_ref_snapshot
Snapshot a tracked grid reference into a regular GhosttyGridRef.
ghostty_type_json
Return a pointer to a null-terminated JSON string describing the layout of every C API struct for the current target.

Type Aliases§

Cell
Opaque cell value.
ColorPaletteIndex
Palette color index (0-255).
Formatter
Opaque handle to a formatter instance.
KeyEncoder
Opaque handle to a key encoder instance.
KeyEvent
Opaque handle to a key event.
KittyGraphics
Opaque handle to a Kitty graphics image storage.
KittyGraphicsImage
Opaque handle to a Kitty graphics image.
KittyGraphicsPlacementIterator
Opaque handle to a Kitty graphics placement iterator.
KittyKeyFlags
Kitty keyboard protocol flags.
Mode
A packed 16-bit terminal mode.
Mods
Keyboard modifier keys bitmask.
MouseEncoder
Opaque handle to a mouse encoder instance.
MouseEvent
Opaque handle to a mouse event.
OscCommand
Opaque handle to a single OSC command.
OscParser
Opaque handle to an OSC parser instance.
RenderState
Opaque handle to a render state instance.
RenderStateRowCells
Opaque handle to render-state row cells.
RenderStateRowIterator
Opaque handle to a render-state row iterator.
Row
Opaque row value.
SelectionGesture
Opaque handle to state for interpreting terminal selection gestures.
SelectionGestureEvent
Opaque handle to reusable input data for selection gesture operations.
SgrParser
Opaque handle to an SGR parser instance.
StyleId
Style identifier type.
SysDecodePngFn
Callback type for PNG decoding.
SysLogFn
Callback type for logging.
Terminal
Opaque handle to a terminal instance.
TerminalBellFn
Callback function type for bell.
TerminalColorSchemeFn
Callback function type for color scheme queries (CSI ? 996 n).
TerminalDeviceAttributesFn
Callback function type for device attributes queries (DA1/DA2/DA3).
TerminalEnquiryFn
Callback function type for enquiry (ENQ, 0x05).
TerminalPwdChangedFn
Callback function type for pwd_changed.
TerminalSizeFn
Callback function type for size queries (XTWINOPS).
TerminalTitleChangedFn
Callback function type for title_changed.
TerminalWritePtyFn
Callback function type for write_pty.
TerminalXtversionFn
Callback function type for XTVERSION.
TrackedGridRef
Opaque handle to a tracked grid reference.

Unions§

PointValue
Point value union.
SgrAttributeValue
SGR attribute value union.
StyleColorValue
Style color value union.
TerminalScrollViewportValue
Scroll viewport value.