ghostty_vte_flutter
library
Functions
-
ghostty_cell_get(DartGhosttyCell cell, GhosttyCellData data, Pointer<Void> out)
→ GhosttyResult
-
-
ghostty_color_rgb_get(GhosttyColorRgb color, Pointer<Uint8> r, Pointer<Uint8> g, Pointer<Uint8> b)
→ void
-
Get the RGB color components.
-
ghostty_focus_encode(GhosttyFocusEvent event, Pointer<Char> buf, int buf_len, Pointer<Size> out_written)
→ GhosttyResult
-
-
ghostty_formatter_format_alloc(GhosttyFormatter formatter, Pointer<GhosttyAllocator> allocator, Pointer<Pointer<Uint8>> out_ptr, Pointer<Size> out_len)
→ GhosttyResult
-
-
ghostty_formatter_format_buf(GhosttyFormatter formatter, Pointer<Uint8> buf, int buf_len, Pointer<Size> out_written)
→ GhosttyResult
-
-
ghostty_formatter_free(GhosttyFormatter formatter)
→ void
-
Free a formatter instance.
-
ghostty_formatter_terminal_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyFormatter> formatter, GhosttyTerminal terminal, GhosttyFormatterTerminalOptions options)
→ GhosttyResult
-
-
ghostty_grid_ref_cell(Pointer<GhosttyGridRef> ref, Pointer<GhosttyCell> out_cell)
→ GhosttyResult
-
-
ghostty_grid_ref_graphemes(Pointer<GhosttyGridRef> ref, Pointer<Uint32> buf, int buf_len, Pointer<Size> out_len)
→ GhosttyResult
-
-
ghostty_grid_ref_row(Pointer<GhosttyGridRef> ref, Pointer<GhosttyRow> out_row)
→ GhosttyResult
-
-
ghostty_grid_ref_style(Pointer<GhosttyGridRef> ref, Pointer<GhosttyStyle> out_style)
→ GhosttyResult
-
-
ghostty_key_encoder_encode(GhosttyKeyEncoder encoder, GhosttyKeyEvent event, Pointer<Char> out_buf, int out_buf_size, Pointer<Size> out_len)
→ GhosttyResult
-
-
ghostty_key_encoder_free(GhosttyKeyEncoder encoder)
→ void
-
Free a key encoder instance.
-
ghostty_key_encoder_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyKeyEncoder> encoder)
→ GhosttyResult
-
-
ghostty_key_encoder_setopt(GhosttyKeyEncoder encoder, GhosttyKeyEncoderOption option, Pointer<Void> value)
→ void
-
-
ghostty_key_encoder_setopt_from_terminal(GhosttyKeyEncoder encoder, GhosttyTerminal terminal)
→ void
-
Set encoder options from a terminal's current state.
-
ghostty_key_event_free(GhosttyKeyEvent event)
→ void
-
Free a key event instance.
-
ghostty_key_event_get_action(GhosttyKeyEvent event)
→ GhosttyKeyAction
-
-
ghostty_key_event_get_composing(GhosttyKeyEvent event)
→ bool
-
Get whether the key event is part of a composition sequence.
-
ghostty_key_event_get_consumed_mods(GhosttyKeyEvent event)
→ int
-
Get the consumed modifiers bitmask.
-
ghostty_key_event_get_key(GhosttyKeyEvent event)
→ GhosttyKey
-
-
ghostty_key_event_get_mods(GhosttyKeyEvent event)
→ int
-
Get the modifier keys bitmask.
-
ghostty_key_event_get_unshifted_codepoint(GhosttyKeyEvent event)
→ int
-
Get the unshifted Unicode codepoint.
-
ghostty_key_event_get_utf8(GhosttyKeyEvent event, Pointer<Size> len)
→ Pointer<Char>
-
Get the UTF-8 text generated by the key event.
-
ghostty_key_event_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyKeyEvent> event)
→ GhosttyResult
-
-
ghostty_key_event_set_action(GhosttyKeyEvent event, GhosttyKeyAction action)
→ void
-
-
ghostty_key_event_set_composing(GhosttyKeyEvent event, bool composing)
→ void
-
Set whether the key event is part of a composition sequence.
-
ghostty_key_event_set_consumed_mods(GhosttyKeyEvent event, int consumed_mods)
→ void
-
Set the consumed modifiers bitmask.
-
ghostty_key_event_set_key(GhosttyKeyEvent event, GhosttyKey key)
→ void
-
-
ghostty_key_event_set_mods(GhosttyKeyEvent event, int mods)
→ void
-
Set the modifier keys bitmask.
-
ghostty_key_event_set_unshifted_codepoint(GhosttyKeyEvent event, int codepoint)
→ void
-
Set the unshifted Unicode codepoint.
-
ghostty_key_event_set_utf8(GhosttyKeyEvent event, Pointer<Char> utf8, int len)
→ void
-
Set the UTF-8 text generated by the key event.
-
ghostty_mode_report_encode(DartGhosttyMode mode, GhosttyModeReportState state, Pointer<Char> buf, int buf_len, Pointer<Size> out_written)
→ GhosttyResult
-
-
ghostty_mouse_encoder_encode(GhosttyMouseEncoder encoder, GhosttyMouseEvent event, Pointer<Char> out_buf, int out_buf_size, Pointer<Size> out_len)
→ GhosttyResult
-
-
ghostty_mouse_encoder_free(GhosttyMouseEncoder encoder)
→ void
-
Free a mouse encoder instance.
-
ghostty_mouse_encoder_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyMouseEncoder> encoder)
→ GhosttyResult
-
-
ghostty_mouse_encoder_reset(GhosttyMouseEncoder encoder)
→ void
-
Reset internal encoder state.
-
ghostty_mouse_encoder_setopt(GhosttyMouseEncoder encoder, GhosttyMouseEncoderOption option, Pointer<Void> value)
→ void
-
-
ghostty_mouse_encoder_setopt_from_terminal(GhosttyMouseEncoder encoder, GhosttyTerminal terminal)
→ void
-
Set encoder options from a terminal's current state.
-
ghostty_mouse_event_clear_button(GhosttyMouseEvent event)
→ void
-
Clear the event button.
-
ghostty_mouse_event_free(GhosttyMouseEvent event)
→ void
-
Free a mouse event instance.
-
ghostty_mouse_event_get_action(GhosttyMouseEvent event)
→ GhosttyMouseAction
-
-
ghostty_mouse_event_get_button(GhosttyMouseEvent event, Pointer<UnsignedInt> out_button)
→ bool
-
Get the event button.
-
ghostty_mouse_event_get_mods(GhosttyMouseEvent event)
→ int
-
Get keyboard modifiers held during the event.
-
ghostty_mouse_event_get_position(GhosttyMouseEvent event)
→ GhosttyMousePosition
-
Get the event position in surface-space pixels.
-
ghostty_mouse_event_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyMouseEvent> event)
→ GhosttyResult
-
-
ghostty_mouse_event_set_action(GhosttyMouseEvent event, GhosttyMouseAction action)
→ void
-
-
ghostty_mouse_event_set_button(GhosttyMouseEvent event, GhosttyMouseButton button)
→ void
-
-
ghostty_mouse_event_set_mods(GhosttyMouseEvent event, int mods)
→ void
-
Set keyboard modifiers held during the event.
-
ghostty_mouse_event_set_position(GhosttyMouseEvent event, GhosttyMousePosition position)
→ void
-
Set the event position in surface-space pixels.
-
ghostty_osc_command_data(GhosttyOscCommand command, GhosttyOscCommandData data, Pointer<Void> out)
→ bool
-
-
ghostty_osc_command_type(GhosttyOscCommand command)
→ GhosttyOscCommandType
-
-
ghostty_osc_end(GhosttyOscParser parser, int terminator)
→ GhosttyOscCommand
-
Finalize OSC parsing and retrieve the parsed command.
-
ghostty_osc_free(GhosttyOscParser parser)
→ void
-
Free an OSC parser instance.
-
ghostty_osc_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyOscParser> parser)
→ GhosttyResult
-
-
ghostty_osc_next(GhosttyOscParser parser, int byte)
→ void
-
Parse the next byte in an OSC sequence.
-
ghostty_osc_reset(GhosttyOscParser parser)
→ void
-
Reset an OSC parser instance to its initial state.
-
ghostty_paste_is_safe(Pointer<Char> data, int len)
→ bool
-
Check if paste data is safe to paste into the terminal.
-
ghostty_render_state_colors_get(GhosttyRenderState state, Pointer<GhosttyRenderStateColors> out_colors)
→ GhosttyResult
-
-
ghostty_render_state_free(GhosttyRenderState state)
→ void
-
Free a render state instance.
-
ghostty_render_state_get(GhosttyRenderState state, GhosttyRenderStateData data, Pointer<Void> out)
→ GhosttyResult
-
-
ghostty_render_state_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyRenderState> state)
→ GhosttyResult
-
-
ghostty_render_state_row_cells_free(GhosttyRenderStateRowCells cells)
→ void
-
Free a row cells instance.
-
ghostty_render_state_row_cells_get(GhosttyRenderStateRowCells cells, GhosttyRenderStateRowCellsData data, Pointer<Void> out)
→ GhosttyResult
-
-
ghostty_render_state_row_cells_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyRenderStateRowCells> out_cells)
→ GhosttyResult
-
-
ghostty_render_state_row_cells_next(GhosttyRenderStateRowCells cells)
→ bool
-
Move a render-state row cells iterator to the next cell.
-
ghostty_render_state_row_cells_select(GhosttyRenderStateRowCells cells, int x)
→ GhosttyResult
-
-
ghostty_render_state_row_get(GhosttyRenderStateRowIterator iterator, GhosttyRenderStateRowData data, Pointer<Void> out)
→ GhosttyResult
-
-
ghostty_render_state_row_iterator_free(GhosttyRenderStateRowIterator iterator)
→ void
-
Free a render-state row iterator.
-
ghostty_render_state_row_iterator_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyRenderStateRowIterator> out_iterator)
→ GhosttyResult
-
-
ghostty_render_state_row_iterator_next(GhosttyRenderStateRowIterator iterator)
→ bool
-
Move a render-state row iterator to the next row.
-
ghostty_render_state_row_set(GhosttyRenderStateRowIterator iterator, GhosttyRenderStateRowOption option, Pointer<Void> value)
→ GhosttyResult
-
-
ghostty_render_state_set(GhosttyRenderState state, GhosttyRenderStateOption option, Pointer<Void> value)
→ GhosttyResult
-
-
ghostty_render_state_update(GhosttyRenderState state, GhosttyTerminal terminal)
→ GhosttyResult
-
-
ghostty_row_get(DartGhosttyRow row, GhosttyRowData data, Pointer<Void> out)
→ GhosttyResult
-
-
ghostty_sgr_attribute_tag(GhosttySgrAttribute attr)
→ GhosttySgrAttributeTag
-
-
ghostty_sgr_attribute_value(Pointer<GhosttySgrAttribute> attr)
→ Pointer<GhosttySgrAttributeValue>
-
Get the value from an SGR attribute.
-
ghostty_sgr_free(GhosttySgrParser parser)
→ void
-
Free an SGR parser instance.
-
ghostty_sgr_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttySgrParser> parser)
→ GhosttyResult
-
-
ghostty_sgr_next(GhosttySgrParser parser, Pointer<GhosttySgrAttribute> attr)
→ bool
-
Get the next SGR attribute.
-
ghostty_sgr_reset(GhosttySgrParser parser)
→ void
-
Reset an SGR parser instance to the beginning of the parameter list.
-
ghostty_sgr_set_params(GhosttySgrParser parser, Pointer<Uint16> params, Pointer<Char> separators, int len)
→ GhosttyResult
-
-
ghostty_sgr_unknown_full(GhosttySgrUnknown unknown, Pointer<Pointer<Uint16>> ptr)
→ int
-
Get the full parameter list from an unknown SGR attribute.
-
ghostty_sgr_unknown_partial(GhosttySgrUnknown unknown, Pointer<Pointer<Uint16>> ptr)
→ int
-
Get the partial parameter list from an unknown SGR attribute.
-
ghostty_size_report_encode(GhosttySizeReportStyle style, GhosttySizeReportSize size, Pointer<Char> buf, int buf_len, Pointer<Size> out_written)
→ GhosttyResult
-
-
ghostty_style_default(Pointer<GhosttyStyle> style)
→ void
-
Get the default style.
-
ghostty_style_is_default(Pointer<GhosttyStyle> style)
→ bool
-
Check if a style is the default style.
-
ghostty_terminal_free(GhosttyTerminal terminal)
→ void
-
Free a terminal instance.
-
ghostty_terminal_get(GhosttyTerminal terminal, GhosttyTerminalData data, Pointer<Void> out)
→ GhosttyResult
-
-
ghostty_terminal_grid_ref(GhosttyTerminal terminal, GhosttyPoint point, Pointer<GhosttyGridRef> out_ref)
→ GhosttyResult
-
-
ghostty_terminal_mode_get(GhosttyTerminal terminal, DartGhosttyMode mode, Pointer<Bool> out_value)
→ GhosttyResult
-
-
ghostty_terminal_mode_set(GhosttyTerminal terminal, DartGhosttyMode mode, bool value)
→ GhosttyResult
-
-
ghostty_terminal_new(Pointer<GhosttyAllocator> allocator, Pointer<GhosttyTerminal> terminal, GhosttyTerminalOptions options)
→ GhosttyResult
-
-
ghostty_terminal_reset(GhosttyTerminal terminal)
→ void
-
Perform a full reset of the terminal (RIS).
-
ghostty_terminal_resize(GhosttyTerminal terminal, int cols, int rows)
→ GhosttyResult
-
-
ghostty_terminal_scroll_viewport(GhosttyTerminal terminal, GhosttyTerminalScrollViewport behavior)
→ void
-
Scroll the terminal viewport.
-
ghostty_terminal_vt_write(GhosttyTerminal terminal, Pointer<Uint8> data, int len)
→ void
-
Write VT-encoded data to the terminal for processing.
-
ghosttyTerminalClearHoveredLink<SelectionT>({required GhosttyTerminalSelectionSession<SelectionT> session})
→ bool
-
Clears hovered hyperlink state and reports whether the state changed.
-
ghosttyTerminalCopyText(String text, {Future<void> onCopySelection(String text)?})
→ Future<void>
-
Copies terminal text using a host callback when provided.
-
ghosttyTerminalLogicalKey(LogicalKeyboardKey key)
→ GhosttyKey?
-
Resolves a Flutter logical key to a Ghostty key enum when it should be
encoded as a terminal special key.
-
ghosttyTerminalMatchesClearSelectionShortcut(LogicalKeyboardKey key, {required GhosttyTerminalModifierState modifiers})
→ bool
-
Whether the current key press should clear terminal selection state.
-
ghosttyTerminalMatchesCopyShortcut(LogicalKeyboardKey key, {required GhosttyTerminalModifierState modifiers, required TargetPlatform platform})
→ bool
-
Whether the current key chord should trigger terminal copy.
-
ghosttyTerminalMatchesHalfPageScrollShortcut(LogicalKeyboardKey key, {required GhosttyTerminalModifierState modifiers, required bool upward})
→ bool
-
Whether the current key press should scroll the terminal by half a page.
-
ghosttyTerminalMatchesPasteShortcut(LogicalKeyboardKey key, {required GhosttyTerminalModifierState modifiers, required TargetPlatform platform})
→ bool
-
Whether the current key chord should trigger terminal paste.
-
ghosttyTerminalMatchesSelectAllShortcut(LogicalKeyboardKey key, {required GhosttyTerminalModifierState modifiers, required TargetPlatform platform})
→ bool
-
Whether the current key chord should trigger terminal select-all.
-
ghosttyTerminalNormalizedHyperlink(String? uri)
→ String?
-
Normalizes terminal hyperlink text to null when it is absent or empty.
-
ghosttyTerminalNotifySelectionChange<SelectionT>({required SelectionT? previousSelection, required SelectionT? nextSelection, required String resolveText(SelectionT selection), required void onSelectionChanged(SelectionT? selection)?, required void onSelectionContentChanged(GhosttyTerminalSelectionContent<SelectionT>? content)?})
→ void
-
Emits shared terminal selection callbacks and derived content payloads.
-
ghosttyTerminalNotifySelectionContent<SelectionT>({required SelectionT? selection, required String resolveText(SelectionT selection), required void onSelectionContentChanged(GhosttyTerminalSelectionContent<SelectionT>? content)?})
→ void
-
Emits shared terminal selection-content callbacks using a text resolver.
-
ghosttyTerminalOpenHyperlink(String uri, {Future<void> onOpenHyperlink(String uri)?})
→ Future<void>
-
Opens a terminal hyperlink using a host callback when provided.
-
ghosttyTerminalPlatformEnvironment()
→ Map<String, String>
-
Returns the current process environment on native platforms and an empty map
on web.
-
ghosttyTerminalPrintableText(KeyEvent event, {required GhosttyTerminalModifierState modifiers})
→ String
-
Resolves printable terminal text for a Flutter key event.
-
ghosttyTerminalReadPasteText({Future<String?> onPasteRequest()?})
→ Future<String?>
-
Reads paste text using a host callback when provided.
-
ghosttyTerminalResolveHyperlinkAt<PositionT>(PositionT? position, {required String? resolveUri(PositionT position)})
→ String?
-
Resolves terminal hyperlink text for an optional position.
-
ghosttyTerminalResolveTap<PositionT, SelectionT>({required GhosttyTerminalSelectionSession<SelectionT> session, required SelectionT? selection, required PositionT? position, required String? resolveUri(PositionT position)})
→ GhosttyTerminalTapResolution
-
Resolves the shared tap behavior for a terminal view.
-
ghosttyTerminalSelectionContentFor<SelectionT>(SelectionT? selection, {required String resolveText(SelectionT selection)})
→ GhosttyTerminalSelectionContent<SelectionT>?
-
Builds shared selection callback payloads from terminal text extraction.
-
ghosttyTerminalShellEnvironment({required Map<String, String> platformEnvironment, Map<String, String> overrides = const <String, String>{}, GhosttyTerminalShellEnvironmentOptions options = const GhosttyTerminalShellEnvironmentOptions()})
→ Map<String, String>
-
Builds a shell-friendly environment from a platform environment map.
-
ghosttyTerminalShellLaunches({required GhosttyTerminalShellProfile profile, Map<String, String>? platformEnvironment, Map<String, String> environmentOverrides = const <String, String>{'TERM' : 'xterm-256color'}, GhosttyTerminalShellEnvironmentOptions environmentOptions = const GhosttyTerminalShellEnvironmentOptions(), bool includeSetupCommands = true})
→ List<GhosttyTerminalShellLaunch>
-
Resolves one or more native shell launch plans for a given profile.
-
ghosttyTerminalUpdateHoveredLink<PositionT, SelectionT>({required GhosttyTerminalSelectionSession<SelectionT> session, required PositionT? position, required String? resolveUri(PositionT position)})
→ bool
-
Resolves the hyperlink hover state for an optional terminal position.
-
initializeGhosttyVteWeb({String assetPath = 'packages/ghostty_vte_flutter/assets/ghostty-vt.wasm'})
→ Future<void>
-
Package-level setup and lightweight terminal widgets for Flutter.
Exceptions / Errors
-
GhosttyVtError
-
Exception thrown for libghostty-vt operation failures.