Idris2Doc : NCurses.Core

NCurses.Core

(source)

Definitions

data Window : Type
  When you make new windows with @newWindow@
this data type stores a reference for you
to use with any function that operates on
a particular window.

Most functions operate on a window even if
they don't appear to; you get a default window
for free with @initNCurses@. You can request the
default window with @stdWindow@.

Totality: total
Visibility: export
Constructor: 
Win : AnyPtr -> Window
stdWindow : HasIO io => io Window
  Get the default standard ncurses window.

Visibility: export
newWindow : HasIO io => Nat -> Nat -> Nat -> Nat -> io Window
  Create a new ncurses window.

Visibility: export
deleteWindow : HasIO io => Window -> io Bool
  Delete an ncurses window.

Returns @True@ on success and @False@ on error.

Visibility: export
moveWindow : HasIO io => Window -> Nat -> Nat -> io Bool
  Move an ncurses window.

Returns @True@ on success and @False@ on error.

Visibility: export
getWindowPos' : HasIO io => Window -> io (Nat, Nat)
  As is normal for ncurses, returns (y, x).

Visibility: export
setWindowSize : HasIO io => Window -> Nat -> Nat -> io Bool
  Resize an ncurses window.

Returns @True@ on success and @False@ on error.

Visibility: export
getMaxSize' : HasIO io => Window -> io (Nat, Nat)
  As is normal for ncurses, returns (height, width).

Visibility: export
getYPos' : HasIO io => Window -> io Nat
Visibility: export
getYPos : HasIO io => io Nat
Visibility: export
getXPos' : HasIO io => Window -> io Nat
Visibility: export
getXPos : HasIO io => io Nat
Visibility: export
refresh : HasIO io => io ()
  Refresh the standard window.

See @refresh'@ to refresh any other window.

Visibility: export
refresh' : HasIO io => Window -> io ()
  Refresh a particular window.

Visibility: export
clear : HasIO io => io ()
  Clear the standard window.

Clearing causes NCurses to redraw the whole terminal on
the next call to refresh. See @erase@ for a less intensive
process that allows NCurses to intelligently determine how
much of the terminal view needs to be redrawn.

Clearing the standard window will require refreshing all
windows after the next call to refresh the standard window,
It probably makes sense much of the time to refresh immediately
after a call to clear.

See @clear'@ to clear any other window.

Visibility: export
clear' : HasIO io => Window -> io ()
  Clear a particular window.

Clearing causes NCurses to redraw the whole terminal on
the next call to refresh. See @erase@ for a less intensive
process that allows NCurses to intelligently determine how
much of the terminal view needs to be redrawn.

Clearing the standard window will require refreshing all
windows after the next call to refresh the standard window,
It probably makes sense much of the time to refresh immediately
after a call to clear.

Visibility: export
erase : HasIO io => io ()
  Erase the standard window.

See @erase'@ to erase any other window.

Visibility: export
erase' : HasIO io => Window -> io ()
  Erase the given window.

Visibility: export
nPutCh : HasIO io => Char -> io ()
Visibility: export
nPutCh' : HasIO io => Window -> Char -> io ()
Visibility: export
nPutStr : HasIO io => String -> io ()
Visibility: export
nPutStr' : HasIO io => Window -> String -> io ()
Visibility: export
nPutStrLn : HasIO io => String -> io ()
Visibility: export
nPutStrLn' : HasIO io => Window -> String -> io ()
Visibility: export
nPutStrAt : HasIO io => Nat -> String -> io ()
  Move the cursor and print to the standard window.

See @nPutStrLnAt'@ to print to a particular window.

Visibility: export
nPutStrAt' : HasIO io => Window -> Nat -> String -> io ()
  Move the cursor and print to the given window.

Visibility: export
nVerticalLine : HasIO io => Char -> Nat -> io ()
  Draw a vertical line comprised of the given character.

Visibility: export
nVerticalLine' : HasIO io => Window -> Char -> Nat -> io ()
  Draw a vertical line comprised of the given character in
the given window.

Visibility: export
nHorizontalLine : HasIO io => Char -> Nat -> io ()
  Draw a horizontal line comprised of the given character.

Visibility: export
nHorizontalLine' : HasIO io => Window -> Char -> Nat -> io ()
  Draw a horizontal line comprised of the given character in
the given window.

Visibility: export
data BorderChar : Type
  Border characters can either be the default or they can be specified
by you. There are different defaults for left/right, top/bottom, and corner characters.

Totality: total
Visibility: public export
Constructors:
Custom : Char -> BorderChar
Default : BorderChar
nWindowBorder : HasIO io => Window -> BorderChar -> BorderChar -> BorderChar -> BorderChar -> BorderChar -> BorderChar -> BorderChar -> BorderChar -> io ()
  Draw a border around the given window.
Use the given characters for each edge and corner of the border.
Specify @Default@ for any character for which you want to use the
default.

The border will use the current background/foreground colors.

The border will be drawn _inside_ the given window.

Visibility: export
nDefaultWindowBorder : HasIO io => Window -> io ()
  Draw the default window border for the given window. This is
equivalent to calling @nWindowBorder@ with all border characters
set to @Default@.

Visibility: export
nMoveCursor : HasIO io => Nat -> Nat -> io ()
  Move the cursor in the standard window.

Visibility: export
nMoveCursor' : HasIO io => Window -> Nat -> Nat -> io ()
  Move the cursor in the given window.

Visibility: export
initNCurses : HasIO io => io ()
  You must call @initNCurses@ before using the other
ncurses functions and you must call @deinitNCurses@
after you are done (before exiting your program).

You will actually see weird behavior in the shell
post-exit of your program if you have not deinited
ncurses.

Visibility: export
deinitNCurses : HasIO io => io ()
  Must be called after @initNCurses@ and before your
program exits.

Visibility: export