Class LinuxNativePty
java.lang.Object
org.jline.terminal.impl.AbstractPty
org.jline.terminal.impl.jna.JnaNativePty
org.jline.terminal.impl.jna.linux.LinuxNativePty
- All Implemented Interfaces:
Closeable, AutoCloseable, Pty
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class AbstractPty
provider, systemStream -
Constructor Summary
ConstructorsConstructorDescriptionLinuxNativePty(TerminalProvider provider, SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name) LinuxNativePty(TerminalProvider provider, SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name) -
Method Summary
Modifier and TypeMethodDescriptionstatic LinuxNativePtycurrent(TerminalProvider provider, SystemStream systemStream) protected voiddoSetAttr(Attributes attr) getAttr()Returns the current terminal attributes for this PTY.getSize()Returns the current size (dimensions) of this PTY.static intisatty(int fd) static LinuxNativePtyopen(TerminalProvider provider, Attributes attr, Size size) voidSets the size (dimensions) of this PTY.static Stringttyname(int slave) Methods inherited from class JnaNativePty
close, doGetSlaveInput, getMaster, getMasterFD, getMasterInput, getMasterOutput, getName, getSlave, getSlaveFD, getSlaveOut, getSlaveOutFD, getSlaveOutput, isPosixSystemStream, posixSystemStreamName, toStringMethods inherited from class AbstractPty
checkInterrupted, getProvider, getSlaveInput, getSystemStream, newDescriptor, setAttrMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Pty
getProvider, getSlaveInput, getSystemStream, setAttr
-
Constructor Details
-
LinuxNativePty
public LinuxNativePty(TerminalProvider provider, SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name) -
LinuxNativePty
public LinuxNativePty(TerminalProvider provider, SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name)
-
-
Method Details
-
current
public static LinuxNativePty current(TerminalProvider provider, SystemStream systemStream) throws IOException - Throws:
IOException
-
open
public static LinuxNativePty open(TerminalProvider provider, Attributes attr, Size size) throws IOException - Throws:
IOException
-
getAttr
Description copied from interface:PtyReturns the current terminal attributes for this PTY.Terminal attributes control various aspects of terminal behavior, such as echo settings, line discipline, and control characters.
- Returns:
- the current terminal attributes
- Throws:
IOException- if an I/O error occurs- See Also:
-
doSetAttr
- Specified by:
doSetAttrin classAbstractPty- Throws:
IOException
-
getSize
Description copied from interface:PtyReturns the current size (dimensions) of this PTY.The size includes the number of rows and columns in the terminal window.
- Returns:
- the current terminal size
- Throws:
IOException- if an I/O error occurs- See Also:
-
setSize
Description copied from interface:PtySets the size (dimensions) of this PTY.This method changes the number of rows and columns in the terminal window. When the size changes, a SIGWINCH signal is typically sent to processes running in the terminal.
- Parameters:
size- the new terminal size to set- Throws:
IOException- if an I/O error occurs- See Also:
-
isatty
public static int isatty(int fd) -
ttyname
-