TermiosAccess

terminus.TermiosAccess
trait TermiosAccess[T]

Typeclass for handling the messiness of reading, updating, and writing termios structs in a platform specific way.

Unfortunately, while all POSIX operating systems have termios.h defined, there termios structure is inconsistent in the size of the bitflags used to hold the terminal settings. As an example, Linux uses CInt to hold bitflags while OSX uses CLong.

At the time of this writing, the Scala Native implementation does not currently handle OS specific differences in

Type parameters

T

The type of the termios structure, should be on of either TermiosStruct.cint_flags or TermiosStruct.clong_flags. At the time of writing this documentation, these are the only known variants of the termios struct. If more are found in the future, they should be added.

Attributes

See also
Source
TermiosAccess.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type FlagType <: CInt | CLong

The flag value used by the termios struct the typeclass is defined for, is either a CInt or CLong

The flag value used by the termios struct the typeclass is defined for, is either a CInt or CLong

Attributes

Source
TermiosAccess.scala

Value members

Abstract methods

def addControlFlags(attrs: Ptr[T], flags: CInt): Unit

Add flags to termios c_cflag struct member

Add flags to termios c_cflag struct member

Attributes

Source
TermiosAccess.scala
def addInputFlags(attrs: Ptr[T], flags: CInt): Unit

Add flags to termios c_iflag struct member

Add flags to termios c_iflag struct member

Attributes

Source
TermiosAccess.scala
def addLocalFlags(attrs: Ptr[T], flags: CInt): Unit

Add flags to termios c_lflag struct member

Add flags to termios c_lflag struct member

Attributes

Source
TermiosAccess.scala
def addOutputFlags(attrs: Ptr[T], flags: CInt): Unit

Add flags to termios c_oflag struct member

Add flags to termios c_oflag struct member

Attributes

Source
TermiosAccess.scala
def get(using Zone): Ptr[T]

Allocates a new termios structure defined by T, in the given Zone and copies the current terminal settings into it, returning a pointer in memory to this structure.

Allocates a new termios structure defined by T, in the given Zone and copies the current terminal settings into it, returning a pointer in memory to this structure.

Attributes

Source
TermiosAccess.scala
def removeControlFlags(attrs: Ptr[T], flags: CInt): Unit

Remove flags from termios c_cflag struct member

Remove flags from termios c_cflag struct member

Attributes

Source
TermiosAccess.scala
def removeInputFlags(attrs: Ptr[T], flags: CInt): Unit

Remove flags from termios c_iflag struct member

Remove flags from termios c_iflag struct member

Attributes

Source
TermiosAccess.scala
def removeLocalFlags(attrs: Ptr[T], flags: CInt): Unit

Remove flags from termios c_lflag struct member

Remove flags from termios c_lflag struct member

Attributes

Source
TermiosAccess.scala
def removeOutputFlags(attrs: Ptr[T], flags: CInt): Unit

Remove flags from termios c_oflag struct member

Remove flags from termios c_oflag struct member

Attributes

Source
TermiosAccess.scala
def set(ptr: Ptr[T]): Unit

Sets the terminal settings to the attributes defined by the termios structure stored at the pointer specified by the ptr argument.

Sets the terminal settings to the attributes defined by the termios structure stored at the pointer specified by the ptr argument.

Attributes

Source
TermiosAccess.scala
def setSpecialCharacter(attrs: Ptr[T], idx: CInt, value: CChar): Unit

Set the value at the given index of the termios c_cc struct member. Valid indices are defined as constants such as VMIN and VTIME in scala.scalanative.posix.termios

Set the value at the given index of the termios c_cc struct member. Valid indices are defined as constants such as VMIN and VTIME in scala.scalanative.posix.termios

Attributes

Source
TermiosAccess.scala