pub unsafe extern "C" fn ghostty_size_report_encode(
style: GhosttySizeReportStyle,
size: GhosttySizeReportSize,
buf: *mut c_char,
buf_len: usize,
out_written: *mut usize,
) -> GhosttyResultExpand description
Encode a terminal size report into an escape sequence.
Encodes a size report in the format specified by @p style into the provided buffer.
If the buffer is too small, the function returns GHOSTTY_OUT_OF_SPACE and writes the required buffer size to @p out_written. The caller can then retry with a sufficiently sized buffer.
@param style The size report format to encode @param size Terminal size information @param buf Output buffer to write the encoded sequence into (may be NULL) @param buf_len Size of the output buffer in bytes @param[out] out_written On success, the number of bytes written. On GHOSTTY_OUT_OF_SPACE, the required buffer size. @return GHOSTTY_SUCCESS on success, GHOSTTY_OUT_OF_SPACE if the buffer is too small