terminal: document mode 2048 size reports

This commit is contained in:
Elias Andualem
2026-08-18 15:34:07 +03:00
parent 07af4612ba
commit 5b9a77f203

View File

@@ -86,13 +86,13 @@ extern "C" {
*
* | Option | Callback Type | Trigger |
* |-----------------------------------------|-----------------------------------|-------------------------------------------|
* | `GHOSTTY_TERMINAL_OPT_WRITE_PTY` | `GhosttyTerminalWritePtyFn` | Query responses written back to the pty |
* | `GHOSTTY_TERMINAL_OPT_WRITE_PTY` | `GhosttyTerminalWritePtyFn` | VT query and mode reports written back to the PTY |
* | `GHOSTTY_TERMINAL_OPT_BELL` | `GhosttyTerminalBellFn` | BEL character (0x07) |
* | `GHOSTTY_TERMINAL_OPT_TITLE_CHANGED` | `GhosttyTerminalTitleChangedFn` | Title change via OSC 0 / OSC 2 |
* | `GHOSTTY_TERMINAL_OPT_PWD_CHANGED` | `GhosttyTerminalPwdChangedFn` | Pwd change via OSC 7 / OSC 9 / OSC 1337 |
* | `GHOSTTY_TERMINAL_OPT_ENQUIRY` | `GhosttyTerminalEnquiryFn` | ENQ character (0x05) |
* | `GHOSTTY_TERMINAL_OPT_XTVERSION` | `GhosttyTerminalXtversionFn` | XTVERSION query (CSI > q) |
* | `GHOSTTY_TERMINAL_OPT_SIZE` | `GhosttyTerminalSizeFn` | XTWINOPS size query (CSI 14/16/18 t) |
* | `GHOSTTY_TERMINAL_OPT_SIZE` | `GhosttyTerminalSizeFn` | XTWINOPS query (CSI 14/16/18 t) or mode 2048 enable |
* | `GHOSTTY_TERMINAL_OPT_COLOR_SCHEME` | `GhosttyTerminalColorSchemeFn` | Color scheme query (CSI ? 996 n) |
* | `GHOSTTY_TERMINAL_OPT_DEVICE_ATTRIBUTES`| `GhosttyTerminalDeviceAttributesFn`| Device attributes query (CSI c / > c / = c)|
* | `GHOSTTY_TERMINAL_OPT_CLIPBOARD_WRITE` | `GhosttyTerminalClipboardWriteFn` | Clipboard write via OSC 52 / OSC 1337 |
@@ -688,16 +688,18 @@ typedef GhosttyString (*GhosttyTerminalEnquiryFn)(GhosttyTerminal terminal,
void* userdata);
/**
* Callback function type for size queries (XTWINOPS).
* Callback function type for terminal size reports.
*
* Called in response to XTWINOPS size queries (CSI 14/16/18 t).
* Called in response to XTWINOPS size queries (CSI 14/16/18 t) and when VT
* input enables in-band size reports (mode 2048).
* Return true and fill *out_size with the current terminal geometry,
* or return false to silently ignore the query.
* or return false to suppress the report.
*
* @param terminal The terminal handle
* @param userdata The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA
* @param[out] out_size Pointer to store the terminal size information
* @return true if size was filled, false to ignore the query
* @return true if size was filled, false to suppress the XTWINOPS response or
* mode 2048 report
*
* @ingroup terminal
*/
@@ -749,9 +751,9 @@ typedef void (*GhosttyTerminalPwdChangedFn)(GhosttyTerminal terminal,
* Callback function type for write_pty.
*
* Called when the terminal needs to write data back to the pty, for
* example in response to a device status report or mode query. The
* data is only valid for the duration of the call; callers must copy
* it if it needs to persist.
* example in response to a device status report, mode query, or VT-driven
* mode 2048 enable. The data is only valid for the duration of the call;
* callers must copy it if it needs to persist.
*
* @param terminal The terminal handle
* @param userdata The userdata pointer set via GHOSTTY_TERMINAL_OPT_USERDATA
@@ -818,8 +820,9 @@ typedef enum GHOSTTY_ENUM_TYPED {
/**
* Callback invoked when the terminal needs to write data back
* to the pty (e.g. in response to a DECRQM query or device
* status report). Set to NULL to ignore such sequences.
* to the pty (e.g. in response to a DECRQM query, device status
* report, or VT-driven mode 2048 enable). Set to NULL to ignore such
* sequences.
*
* Input type: GhosttyTerminalWritePtyFn
*/