ANSITerm

Handles ANSI escape codes from stdin.

actor tag ANSITerm

Constructors

create

new tag create(
  notify: ANSINotify iso,
  source: DisposableActor tag,
  timers: Timers tag = seq)
: ANSITerm tag^

Parameters

Returns


Public Behaviours

apply

Receives input from stdin.

be apply(
  data: Array[U8 val] iso)

Parameters


prompt

Pass a prompt along to the notifier.

be prompt(
  value: String val)

Parameters


size

be size()

dispose

Stop accepting input, inform the notifier we have closed, and dispose of our source.

be dispose()

Private Behaviours

_timeout

Our timer since receiving an ESC has expired. Send the buffered data as if it was not an escape sequence.

be _timeout()

Private Functions

_size

Pass the window size to the notifier.

fun ref _size()
: None val

Returns


_mod

Set the modifier bools.

fun ref _mod()
: (Bool val , Bool val , Bool val)

Returns


_keypad

An extended key.

fun ref _keypad()
: None val

Returns


_up

Up arrow.

fun ref _up()
: None val

Returns


_down

Down arrow.

fun ref _down()
: None val

Returns


_left

Left arrow.

fun ref _left()
: None val

Returns


_right

Right arrow.

fun ref _right()
: None val

Returns


_delete

Delete key.

fun ref _delete()
: None val

Returns


_insert

Insert key.

fun ref _insert()
: None val

Returns


_home

Home key.

fun ref _home()
: None val

Returns


_end

End key.

fun ref _end()
: None val

Returns


_page_up

Page up key.

fun ref _page_up()
: None val

Returns


_page_down

Page down key.

fun ref _page_down()
: None val

Returns


_fn_key

Function key.

fun ref _fn_key(
  i: U8 val)
: None val

Parameters

  • i: U8 val

Returns


_esc_flush

Pass a partial or unrecognised escape sequence to the notifier.

fun ref _esc_flush()
: None val

Returns


_esc_clear

Clear the escape state.

fun ref _esc_clear()
: None val

Returns