terminus

package terminus

Members list

Packages

package terminus.effect

Type members

Classlikes

Attributes

Source
AlternateScreenMode.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal

Attributes

Source
ApplicationMode.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal
trait Color

Attributes

Source
Color.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal
trait Cursor

Attributes

Source
Cursor.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal
trait Dimensions

Functionalities related to the dimensions of the terminal

Functionalities related to the dimensions of the terminal

Attributes

Source
Dimensions.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal
sealed trait Eof

Attributes

Companion
object
Source
Types.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Eof
object Eof extends Eof

Attributes

Companion
trait
Source
Types.scala
Supertypes
trait Sum
trait Mirror
trait Eof
class Object
trait Matchable
class Any
Show all
Self type
Eof.type
trait Erase

Attributes

Source
Erase.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal
trait Format

Attributes

Source
Format.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal
class JLineTerminal(terminal: Terminal) extends Terminal, TerminalKeyReader

Attributes

Companion
object
Source
JLineTerminal.scala
Supertypes
trait Terminal
trait Reader
trait RawMode[Terminal]
trait Peeker
trait KeyReader
trait Erase
trait Dimensions
trait Format[Terminal]
trait Cursor
trait Writer
trait Effect
trait Color[Terminal]
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
JLineTerminal.scala
Supertypes
trait Writer
trait Reader
trait RawMode
trait Erase
trait Dimensions
trait Format
trait Cursor
trait Color
class Object
trait Matchable
class Any
Show all
Self type
final case class Key(modifiers: KeyModifier, code: KeyCode)

Represents a key press. The information is split between the key code and any modifiers that were pressed. We only interpret modifiers if the terminal passes that information to us. So, for example, 'A' is not represented as Shift + 'a' as the terminal does not send that information.

Represents a key press. The information is split between the key code and any modifiers that were pressed. We only interpret modifiers if the terminal passes that information to us. So, for example, 'A' is not represented as Shift + 'a' as the terminal does not send that information.

The majority of special keys (up as arrow keys and function keys) as defined as constants on the companion object.

Attributes

Companion
object
Source
Key.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Key

Attributes

Companion
class
Source
Key.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Key.type
enum KeyCode

Attributes

Source
KeyCode.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object KeyModifier

Attributes

Source
KeyModifier.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait KeyReader

Attributes

Source
KeyReader.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Terminal

A Terminal implementation for Scala Native.

A Terminal implementation for Scala Native.

Attributes

Source
NativeTerminal.scala
Supertypes
trait Terminal
trait Reader
trait RawMode[Terminal]
trait Peeker
trait KeyReader
trait Erase
trait Dimensions
trait Format[Terminal]
trait Cursor
trait Writer
trait Effect
trait Color[Terminal]
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Source
NonBlockingReader.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Terminal
trait Peeker

Attributes

Source
Peeker.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Terminal
trait RawMode

Attributes

Source
RawMode.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal
trait Reader

Attributes

Source
Reader.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal

Attributes

Companion
object
Source
StringBuilderTerminal.scala
Supertypes
trait Erase
trait Cursor
trait Writer
trait Effect
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
StringBuilderTerminal.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Source
Terminal.scala
Supertypes
trait Reader
trait RawMode[Terminal]
trait Peeker
trait KeyReader
trait Erase
trait Dimensions
trait Format[Terminal]
trait Cursor
trait Writer
trait Effect
trait Color[Terminal]
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Companion
trait
Source
Terminal.scala
Supertypes
trait Writer
trait Reader
trait RawMode
trait Peeker
trait KeyReader
trait Format
trait Erase
trait Dimensions
trait Cursor
trait Color
class Object
trait Matchable
class Any
Show all
Self type
Terminal.type
class Termios[T](using accessor: TermiosAccess[T])

An abstraction over the c termios library that contains only the functionality that we need, hiding the details of reading, updating, and writing terminal settings from the caller. The details are handled by a TermiosAccess typeclass instance.

An abstraction over the c termios library that contains only the functionality that we need, hiding the details of reading, updating, and writing terminal settings from the caller. The details are handled by a TermiosAccess typeclass instance.

Type parameters

T

The termios structure type a Termios instance uses. See TermiosStruct for more details

Value parameters

accessor

An instance of TermiosAccess used to handle the actual reading, updating, and writing of terminal settings.

Attributes

See also

TermiosAccess

TermiosStruct

Source
Termios.scala
Supertypes
class Object
trait Matchable
class Any
trait TermiosAccess[T]

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

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
Supertypes
class Object
trait Matchable
class Any
object TermiosStruct

Type aliases for the two possible termios structures, one with CInt bitflags and one with CLong bitflags. CLong types are the default in scala-native, however linux (and probably more operating systems) use CInt bitflags. Each of these types has a terminus.TermiosAccess instance to handle access and manipulation of termios structures in a platform specific manner.

Type aliases for the two possible termios structures, one with CInt bitflags and one with CLong bitflags. CLong types are the default in scala-native, however linux (and probably more operating systems) use CInt bitflags. Each of these types has a terminus.TermiosAccess instance to handle access and manipulation of termios structures in a platform specific manner.

Attributes

See also
Source
TermiosStruct.scala
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Timeout

Attributes

Companion
object
Source
Types.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Timeout
object Timeout extends Timeout

Attributes

Companion
trait
Source
Types.scala
Supertypes
trait Sum
trait Mirror
trait Timeout
class Object
trait Matchable
class Any
Show all
Self type
Timeout.type
trait Writer

Interface for writing to a console.

Interface for writing to a console.

Attributes

Source
Writer.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JLineTerminal
object Terminal
final class prompt

Attributes

Source
Prompt.scala
Supertypes
class Object
trait Matchable
class Any

Types

opaque type KeyModifier

Attributes

Source
KeyModifier.scala
type Program[A] = Terminal ?=> A

Attributes

Source
Terminal.scala

Value members

Concrete methods

def prompt(): Unit

Attributes

Source
Prompt.scala

Givens

Givens

TermiosAccess instance for structs with CInt bitflags

TermiosAccess instance for structs with CInt bitflags

Attributes

Source
TermiosAccess.scala

TermiosAccess instance for structs with CLong bitflags

TermiosAccess instance for structs with CLong bitflags

Attributes

Source
TermiosAccess.scala

Extensions

Extensions

extension (modifier: KeyModifier)

Attributes

Source
KeyModifier.scala

Attributes

Source
KeyModifier.scala

Attributes

Source
KeyModifier.scala

Attributes

Source
KeyModifier.scala

Attributes

Source
KeyModifier.scala

Attributes

Source
KeyModifier.scala

Attributes

Source
KeyModifier.scala
extension [T](ptr: Ptr[T])(using au: TermiosAccess[T])
def addControlFlags(flags: CInt): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala
def addInputFlags(flags: CInt): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala
def addLocalFlags(flags: CInt): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala
def addOutputFlags(flags: CInt): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala
def removeControlFlags(flags: CInt): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala
def removeInputFlags(flags: CInt): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala
def removeLocalFlags(flags: CInt): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala
def removeOutputFlags(flags: CInt): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala
def setSpecialCharacter(idx: CInt, value: CChar): Unit

Extension methods to simplify modifying a termios struct

Extension methods to simplify modifying a termios struct

Attributes

Source
TermiosAccess.scala