APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.org.jline.terminal.impl.ffm

public Class NativeWinSysTerminal

extends AbstractWindowsTerminal<MemorySegment>
Class Inheritance
Imports
java.io.BufferedWriter, .IOError, .IOException, .InputStream, .Writer, java.nio.charset.Charset, java.util.function.Function, .IntConsumer, jdk.internal.org.jline.terminal.Cursor, .Size, jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal, jdk.internal.org.jline.terminal.spi.SystemStream, .TerminalProvider, jdk.internal.org.jline.utils.OSUtils

Field Summary

Modifier and TypeField and Description
private final char[]
private final char[]
Inherited from jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal:
attributescloserENABLE_ECHO_INPUTENABLE_EXTENDED_FLAGSENABLE_INSERT_MODEENABLE_LINE_INPUTENABLE_MOUSE_INPUTENABLE_PROCESSED_INPUTENABLE_QUICK_EDIT_MODEENABLE_VIRTUAL_TERMINAL_PROCESSINGENABLE_WINDOW_INPUTfocusTrackinginConsoleinputlocknativeHandlersoriginalInConsoleModeoriginalOutConsoleModeoutConsoleoutputpausedpumpreaderskipNextLfslaveInputPipetrackingTYPE_WINDOWSTYPE_WINDOWS_256_COLORTYPE_WINDOWS_CONEMUTYPE_WINDOWS_VTPwriter

Constructor Summary

AccessConstructor and Description
pack-priv
NativeWinSysTerminal(TerminalProvider provider, SystemStream systemStream, Writer writer, String name, String type, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler, MemorySegment inConsole, int inConsoleMode, MemorySegment outConsole, int outConsoleMode, Function<InputStream, InputStream> inputStreamWrapper)

Method Summary

Modifier and TypeMethod and Description
private static MemorySegment
public static NativeWinSysTerminal
createTerminal(TerminalProvider provider, SystemStream systemStream, String name, String type, boolean ansiPassThrough, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler, boolean paused, Function<InputStream, InputStream> inputStreamWrapper)

private static boolean
enableVtp(MemorySegment console, int m)

public Size
getBufferSize()

Overrides default jdk.internal.org.jline.terminal.Terminal.getBufferSize.

Retrieve the size of the window buffer.

protected int
public Cursor
public Size
getSize()

Implements jdk.internal.org.jline.terminal.Terminal.getSize.

Retrieve the size of the visible window

public static boolean
protected boolean
processConsoleInput()

Implements abstract jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal.processConsoleInput.

Read a single input event from the input buffer and process it.

private void
processFocusEvent(boolean hasFocus)

private void
protected void
Inherited from jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal:
canPauseResumectrldoClosegetAttributesgetEscapeSequencegetProvidergetRawSequencegetSystemStreamhandlehasFocusSupportinputoutputpausepausepausedprocessInputCharprocessKeyEventpumpreaderresumesetAttributessetSizetrackFocustrackMouseupdateConsoleModewriter

Field Detail

focusback to summary
private final char[] focus
mouseback to summary
private final char[] mouse

Constructor Detail

NativeWinSysTerminalback to summary
pack-priv NativeWinSysTerminal(TerminalProvider provider, SystemStream systemStream, Writer writer, String name, String type, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler, MemorySegment inConsole, int inConsoleMode, MemorySegment outConsole, int outConsoleMode, Function<InputStream, InputStream> inputStreamWrapper) throws IOException

Method Detail

allocateIntback to summary
private static MemorySegment allocateInt(Arena arena)
createTerminalback to summary
public static NativeWinSysTerminal createTerminal(TerminalProvider provider, SystemStream systemStream, String name, String type, boolean ansiPassThrough, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler, boolean paused, Function<InputStream, InputStream> inputStreamWrapper) throws IOException
enableVtpback to summary
private static boolean enableVtp(MemorySegment console, int m)
getBufferSizeback to summary
public Size getBufferSize()

Overrides default jdk.internal.org.jline.terminal.Terminal.getBufferSize.

Doc from jdk.internal.org.jline.terminal.Terminal.getBufferSize.

Retrieve the size of the window buffer. Some terminals can be configured to have a buffer size larger than the visible window size and provide scroll bars. In such cases, this method should attempt to return the size of the whole buffer. The getBufferSize() method can be used to avoid wrapping when using the terminal in a line editing mode, while the getSize() method should be used when using full screen mode.

Annotations
@Override
getConsoleModeback to summary
protected int getConsoleMode(MemorySegment console)

Implements abstract jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal.getConsoleMode.

Annotations
@Override
getCursorPositionback to summary
public Cursor getCursorPosition(IntConsumer discarded)

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.getCursorPosition.

Implements jdk.internal.org.jline.terminal.Terminal.getCursorPosition.

Doc from jdk.internal.org.jline.terminal.Terminal.getCursorPosition.

Query the terminal to report the cursor position. As the response is read from the input stream, some characters may be read before the cursor position is actually read. Those characters can be given back using org.jline.keymap.BindingReader#runMacro(String)

Annotations
@Override
getSizeback to summary
public Size getSize()

Implements jdk.internal.org.jline.terminal.Terminal.getSize.

Doc from jdk.internal.org.jline.terminal.Terminal.getSize.

Retrieve the size of the visible window

isWindowsSystemStreamback to summary
public static boolean isWindowsSystemStream(SystemStream stream)
processConsoleInputback to summary
protected boolean processConsoleInput() throws IOException

Implements abstract jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal.processConsoleInput.

Doc from jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal.processConsoleInput.

Read a single input event from the input buffer and process it.

Exceptions
IOException:
if anything wrong happens
processFocusEventback to summary
private void processFocusEvent(boolean hasFocus) throws IOException
processMouseEventback to summary
private void processMouseEvent(Kernel32.MOUSE_EVENT_RECORD mouseEvent) throws IOException
setConsoleModeback to summary
protected void setConsoleMode(MemorySegment console, int mode)

Implements abstract jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal.setConsoleMode.

Annotations
@Override