Documentation
¶
Overview ¶
Package csi provides CSI (Control Sequence Introducer) query functions for terminal capabilities
Index ¶
- Constants
- func QueryCharacterCellSizeInPixels() (width, height int, ok bool)
- func QueryFontSize() (fontWidth, fontHeight int, ok bool)
- func QuerySupported() bool
- func QueryTextAreaSizeInPixels() (width, height int, ok bool)
- func QueryWindowSize() (cols, rows int, err error)
- func QueryXTSMGRAPHICS() (width, height int, ok bool)
Constants ¶
const QueryTimeout = 100 * time.Millisecond
QueryTimeout is the default timeout for CSI queries
Variables ¶
This section is empty.
Functions ¶
func QueryCharacterCellSizeInPixels ¶
QueryCharacterCellSizeInPixels queries character cell size in pixels using CSI 16t returns: width and height in pixels per character, or 0,0,false if query fails
func QueryFontSize ¶
QueryFontSize queries the font size from pixel and character dimensions This is useful when combining CSI 14t and CSI 18t results
func QuerySupported ¶
func QuerySupported() bool
QuerySupported checks if a terminal likely supports CSI queries This is a heuristic based on terminal type and environment
func QueryTextAreaSizeInPixels ¶
QueryTextAreaSizeInPixels queries text area size in pixels using CSI 14t returns: width and height in pixels, or 0,0 if query fails
func QueryWindowSize ¶
QueryWindowSize queries the terminal for its current window size
func QueryXTSMGRAPHICS ¶
QueryXTSMGRAPHICS queries Sixel graphics geometry using XTSMGRAPHICS (xterm 344+) returns: width and height in pixels, and success status
Types ¶
This section is empty.