NativeTerminal

terminus.NativeTerminal

A Terminal implementation for Scala Native.

Attributes

Source
NativeTerminal.scala
Graph
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

Members list

Type members

Inherited classlikes

object background

Attributes

Inherited from:
Color
Source
Color.scala
Supertypes
class Object
trait Matchable
class Any
object cursor

Attributes

Inherited from:
Cursor
Source
Cursor.scala
Supertypes
class Object
trait Matchable
class Any
object erase

Attributes

Inherited from:
Erase
Source
Erase.scala
Supertypes
class Object
trait Matchable
class Any
object foreground

Attributes

Inherited from:
Color
Source
Color.scala
Supertypes
class Object
trait Matchable
class Any
object format

Attributes

Inherited from:
Format
Source
Format.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def alternateScreen[A](f: Terminal ?=> A): A

Run the given terminal program f in alternate screen mode, which means that whatever is displayed by f will not been shown when the program exits, and similarly key presses will not be saved in the history buffer.

Run the given terminal program f in alternate screen mode, which means that whatever is displayed by f will not been shown when the program exits, and similarly key presses will not be saved in the history buffer.

Attributes

Source
NativeTerminal.scala
def application[A](f: Terminal ?=> A): A

Run the given terminal program f in application mode, which changes the input sent to the program when arrow keys are pressed. See https://invisible-island.net/xterm/xterm.faq.html#xterm_arrows

Run the given terminal program f in application mode, which changes the input sent to the program when arrow keys are pressed. See https://invisible-island.net/xterm/xterm.faq.html#xterm_arrows

Attributes

Source
NativeTerminal.scala
def flush(): Unit

Flush the current output, causing it to be shown on the console.

Flush the current output, causing it to be shown on the console.

Attributes

Source
NativeTerminal.scala
def raw[A](f: Terminal ?=> A): A

Run the given terminal program f in raw mode, which means that the program can read user input a character at a time. In canonical mode, which is the default, user input is only available a line at a time.

Run the given terminal program f in raw mode, which means that the program can read user input a character at a time. In canonical mode, which is the default, user input is only available a line at a time.

Attributes

Source
NativeTerminal.scala
def read(): Eof | Char

Attributes

Source
NativeTerminal.scala
def read(duration: Duration): Timeout | Eof | Char

Attributes

Source
NativeTerminal.scala
def run[A](f: () ?=> A): A

Attributes

Source
NativeTerminal.scala
def write(char: Char): Unit

Write a character to the console.

Write a character to the console.

Attributes

Source
NativeTerminal.scala
def write(string: String): Unit

Write a string to the console.

Write a string to the console.

Attributes

Source
NativeTerminal.scala

Inherited methods

def readKey(): Eof | Key

Attributes

Inherited from:
TerminalKeyReader
Source
TerminalKeyReader.scala
protected def withEffect[A](on: String)(f: Terminal ?=> A): A

Attributes

Inherited from:
WithEffect
Source
WithEffect.scala
protected def withEffect[A](on: String, off: String)(f: Terminal ?=> A): A

Attributes

Inherited from:
WithEffect
Source
WithEffect.scala
protected def withStack[A](stack: Stack, code: String)(f: Terminal ?=> A): A

Use withStack to ensure a stack is pushed on before f is evaluated, and popped when f finishes.

Use withStack to ensure a stack is pushed on before f is evaluated, and popped when f finishes.

Attributes

Inherited from:
WithStack
Source
WithStack.scala
protected def withToggle[A](toggle: Toggle)(f: Terminal ?=> A): A

Use withToggle to ensure a toggle is turned on before f is evaluated, and turned off when f finishes.

Use withToggle to ensure a toggle is turned on before f is evaluated, and turned off when f finishes.

Attributes

Inherited from:
WithToggle
Source
WithToggle.scala

Inherited and Abstract methods

Attributes

Inherited from:
Dimensions
Source
Dimensions.scala

Attributes

Inherited from:
Peeker
Source
Peeker.scala

Attributes

Inherited from:
Dimensions
Source
Dimensions.scala