Class FfmUnixSysTerminal
java.lang.Object
org.jline.terminal.impl.AbstractTerminal
org.jline.terminal.impl.AbstractUnixSysTerminal
org.jline.terminal.impl.ffm.FfmUnixSysTerminal
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, Sized, TerminalExt, Terminal
FFM-based POSIX system terminal that calls
CLibrary directly.
This implementation bypasses the PTY abstraction layer, reducing the call chain from 7 layers to 4:
Terminal ? AbstractTerminal ? AbstractUnixSysTerminal ? FfmUnixSysTerminal ? CLibrary ? syscall
-
Nested Class Summary
Nested classes/interfaces inherited from interface Terminal
Terminal.KittyKeyboardMode, Terminal.Mode, Terminal.MouseTracking, Terminal.Signal, Terminal.SignalHandler -
Field Summary
Fields inherited from class AbstractUnixSysTerminal
STDERR_FD, STDIN_FD, STDOUT_FDFields inherited from class AbstractTerminal
bools, closed, currentMouseTracking, encoding, envProvider, handlers, inputEncoding, ints, name, onClose, outputEncoding, palette, status, strings, typeFields inherited from interface Terminal
TYPE_DUMB, TYPE_DUMB_COLOR -
Method Summary
Modifier and TypeMethodDescriptionprotected IntUnaryOperatorCreates a poll function that checks stdin for input readiness usingpoll(2).protected Attributesprotected Sizeprotected voiddoSetAttributes(Attributes attr) protected voidMethods inherited from class AbstractUnixSysTerminal
doClose, getAttributes, getCursorPosition, getDefaultBackgroundColor, getDefaultForegroundColor, getProvider, getSize, getSystemStream, handle, hasPollSupport, input, output, reader, setAttributes, setSize, toString, writerMethods inherited from class AbstractTerminal
canPauseResume, checkClosed, checkInterrupted, close, detectTrueColorSupport, echo, echo, echoSignal, encoding, enterRawMode, flush, getBooleanCapability, getCurrentMouseTracking, getenv, getGraphemeClusterMode, getKind, getName, getNumericCapability, getPalette, getStatus, getStatus, getStringCapability, getType, hasFocusSupport, hasInBandResizeSupport, hasKittyKeyboardSupport, hasMouseSupport, inputEncoding, isClusterGrouped, isModeSupported, outputEncoding, parseInfoCmp, pause, pause, paused, puts, raise, readMouseEvent, readMouseEvent, readMouseEvent, readMouseEvent, resetKittyKeyboardMode, resume, setEnv, setGraphemeClusterMode, setKittyKeyboardMode, setOnClose, supportsGraphemeClusterMode, trackFocus, trackInBandResize, trackMouseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Terminal
beginSynchronizedUpdate, endSynchronizedUpdate, getBufferSize, getColumns, getHeight, getRows, getWidth, setSize, synchronizedUpdate
-
Method Details
-
createPollFunction
Description copied from class:AbstractUnixSysTerminalCreates a poll function that checks stdin for input readiness usingpoll(2).When non-null, the returned function is passed to
NonBlockingInputStream.setPollFunction(IntUnaryOperator)so the pump thread can use short-timeout polls instead of an indefinite blocking read. This prevents the pump from stealing keystrokes from subprocesses that share the same tty fd (see #2219).Subclasses should override to provide a platform-specific binding (FFM or JNI). The default returns
null, which falls back to blocking reads and preserves backward compatibility.- Overrides:
createPollFunctionin classAbstractUnixSysTerminal- Returns:
(timeoutMs) ? poll result: positive if data is ready, 0 on timeout, negative on error; ornullif poll is not available
-
doGetAttributes
- Specified by:
doGetAttributesin classAbstractUnixSysTerminal
-
doSetAttributes
- Specified by:
doSetAttributesin classAbstractUnixSysTerminal
-
doGetSize
- Specified by:
doGetSizein classAbstractUnixSysTerminal
-
doSetSize
- Specified by:
doSetSizein classAbstractUnixSysTerminal
-