public interface Terminal extends Closeable, Flushable
Closeable.close() method
in order to restore their original state.| Modifier and Type | Interface and Description |
|---|---|
static class |
Terminal.MouseTracking |
static class |
Terminal.Signal |
static interface |
Terminal.SignalHandler |
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_DUMB
Type used for dumb terminals.
|
static final String TYPE_DUMB
String getName()
Terminal.SignalHandler handle(Terminal.Signal signal, Terminal.SignalHandler handler)
void raise(Terminal.Signal signal)
NonBlockingReader reader()
PrintWriter writer()
InputStream input()
OutputStream output()
Attributes enterRawMode()
boolean echo()
boolean echo(boolean echo)
Attributes getAttributes()
void setAttributes(Attributes attr)
Size getSize()
void setSize(Size size)
default int getWidth()
default int getHeight()
String getType()
boolean puts(InfoCmp.Capability capability, Object... params)
boolean getBooleanCapability(InfoCmp.Capability capability)
Integer getNumericCapability(InfoCmp.Capability capability)
String getStringCapability(InfoCmp.Capability capability)
Cursor getCursorPosition(IntConsumer discarded)
org.jline.keymap.BindingReader#runMacro(String).discarded - a consumer receiving discarded charactersnull if cursor position reporting
is not supported or a valid cursor positionboolean hasMouseSupport()
true if the terminal has support for mouse.trackMouse(MouseTracking)boolean trackMouse(Terminal.MouseTracking tracking)
InfoCmp.Capability.key_mouse to the input stream.
When this character sequence is detected, the readMouseEvent() method can be
called to actually read the corresponding mouse event.tracking - the mouse tracking modetrue if mouse tracking is supportedMouseEvent readMouseEvent()
InfoCmp.Capability.key_mouse
in the stream immediately before reading the event.trackMouse(MouseTracking)MouseEvent readMouseEvent(IntSupplier reader)
reader - the input supplierCopyright © 2020. All rights reserved.