Interface VtHandler
public interface VtHandler
Callback interface for VT escape sequence parser events.
All methods have default no-op implementations so that consumers only need to override the events they care about.
The parameter arrays passed to callbacks are reused between calls — consumers must copy the data if they need to retain it.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidcsiDispatch(int finalChar, int[] params, int paramCount, int[] intermediates, int intermediateCount, boolean hasSubParams) A CSI (Control Sequence Introducer) sequence was completed.default voidescDispatch(int finalChar, int[] intermediates, int intermediateCount) An escape sequence was completed.default voidexecute(int controlChar) A C0 or C1 control character was received.default voidhook(int finalChar, int[] params, int paramCount, int[] intermediates, int intermediateCount) A DCS (Device Control String) was started.default voidAn OSC (Operating System Command) string was completed.default voidprint(int codePoint) A printable character was received in the ground state.default voidput(int b) A data byte within a DCS passthrough string.default voidunhook()The DCS passthrough string has ended (ST, CAN, SUB, or ESC received).
-
Method Details
-
print
default void print(int codePoint) A printable character was received in the ground state.- Parameters:
codePoint- the character (0x20-0x7F or 0xA0-0xFF)
-
execute
default void execute(int controlChar) A C0 or C1 control character was received.- Parameters:
controlChar- the control character (0x00-0x1F, 0x80-0x9F)
-
escDispatch
default void escDispatch(int finalChar, int[] intermediates, int intermediateCount) An escape sequence was completed.Examples:
ESC M(Reverse Index),ESC ( B(Select charset).- Parameters:
finalChar- the final character of the sequenceintermediates- the intermediate characters (0x20-0x2F)intermediateCount- the number of intermediate characters
-
csiDispatch
default void csiDispatch(int finalChar, int[] params, int paramCount, int[] intermediates, int intermediateCount, boolean hasSubParams) A CSI (Control Sequence Introducer) sequence was completed.Examples:
CSI 2 J(Erase Display),CSI ? 1049 h(Alt Screen).The first intermediate may be a private marker (0x3C-0x3F:
< = > ?). Parameter value-1indicates a default (empty) parameter.- Parameters:
finalChar- the final character (0x40-0x7E)params- the parameter values (-1 = default)paramCount- the number of parametersintermediates- the intermediate/private-marker charactersintermediateCount- the number of intermediateshasSubParams- true if colon-separated subparameters were present
-
hook
default void hook(int finalChar, int[] params, int paramCount, int[] intermediates, int intermediateCount) A DCS (Device Control String) was started.The first part of the DCS has been parsed (parameters, intermediates, final character). Subsequent data arrives via
put(int)untilunhook()is called.- Parameters:
finalChar- the final character determining the control functionparams- the parameter valuesparamCount- the number of parametersintermediates- the intermediate charactersintermediateCount- the number of intermediates
-
put
default void put(int b) A data byte within a DCS passthrough string.- Parameters:
b- the data byte
-
unhook
default void unhook()The DCS passthrough string has ended (ST, CAN, SUB, or ESC received). -
oscEnd
An OSC (Operating System Command) string was completed.Examples:
OSC 0 ; title BEL(Set Title),OSC 10 ; ? BEL(Query Foreground Color).- Parameters:
data- the OSC string content (between the OSC introducer and terminator)
-