Idris2Doc : Control.NCurses.State

Control.NCurses.State

(source)

Reexports

importpublic Control.Indexed
importpublic Data.DPair
importpublic Data.List.Elem

Definitions

recordInputState : Type
Totality: total
Visibility: public export
Constructor: 
MkInput : Bool->Bool->InputState

Projections:
.cBreak : InputState->Bool
  cBreak indicates whether characters typed by the user are delivered to the
program (via @getCh@) immediately or not. If not, they are delivered when a
newline is typed (the default behavior for most terminal environments).
.echo : InputState->Bool
  echo indicates whether characters typed by the user are printed to the screen
by NCurses as well as delivered to @getCh@.

Hint: 
InWindoww (Active{_:2207}ws{_:2206}{_:2205}) =>IdentifiesWindowwws
.cBreak : InputState->Bool
  cBreak indicates whether characters typed by the user are delivered to the
program (via @getCh@) immediately or not. If not, they are delivered when a
newline is typed (the default behavior for most terminal environments).

Totality: total
Visibility: public export
cBreak : InputState->Bool
  cBreak indicates whether characters typed by the user are delivered to the
program (via @getCh@) immediately or not. If not, they are delivered when a
newline is typed (the default behavior for most terminal environments).

Totality: total
Visibility: public export
.echo : InputState->Bool
  echo indicates whether characters typed by the user are printed to the screen
by NCurses as well as delivered to @getCh@.

Totality: total
Visibility: public export
echo : InputState->Bool
  echo indicates whether characters typed by the user are printed to the screen
by NCurses as well as delivered to @getCh@.

Totality: total
Visibility: public export
initInput : InputState
Totality: total
Visibility: public export
dataWindow : Type
  Windows allow a terminal screen to be divided up and drawn to separately
with their own relative coordinates.

Totality: total
Visibility: public export
Constructor: 
MkWindow : String->Bool->Bool->Window
  The `keypad` parameter controls whether special keys are supported as single
inputs.
Set to true to receive "special keys" as single values rather than composites
of two or more Chars. For example, arrow keys are represented as two input
chars, but you will receive @Key@ values for them instead with the @keypad@
property turned on.
This is on by default.

The `noDelay` parameter controls whether @getCh@ is blocking or not.
When noDelay is False, @getCh@ will wait until the user types. Otherwise, @getCh@
returns immediately and returns @Nothing@ if the user has not input anything.

If a window has a border, it is drawn inside the window's bounds. This also means the
effective area to draw within is 1 row/column smaller all of the way around the window.
Moving to row/column 0 will position the cursor just inside the border.

Hint: 
InWindoww (Active{_:2207}ws{_:2206}{_:2205}) =>IdentifiesWindowwws
identifier : Window->String
Totality: total
Visibility: public export
.identifier : Window->String
Totality: total
Visibility: public export
.keypad : Window->Bool
Totality: total
Visibility: public export
.noDelay : Window->Bool
Totality: total
Visibility: public export
setKeypad : Bool->Window->Window
Totality: total
Visibility: public export
newKeypadSameIdentity : (on : Bool) -> (w : Window) ->identifierw=identifier (setKeypadonw)
Totality: total
Visibility: public export
setNoDelay : Bool->Window->Window
Totality: total
Visibility: public export
newNoDelaySameIdentity : (on : Bool) -> (w : Window) ->identifierw=identifier (setNoDelayonw)
Totality: total
Visibility: public export
initWindow : String->Window
Totality: total
Visibility: public export
dataCursesState : Type
  The state of NCurses.
When active:
The `input` is the state of input that applies universally.
The `windows` are the currently available windows in the session, excluding
the default (or standard) window which is always available.
The `currentWindow` is the window to be used for input & output. If Nothing,
the default window is used.
The `colors` are the currently available colors in the session.
TODO: parameterize on Eq type to use as color id? Eq a => (colors : List a)

Totality: total
Visibility: public export
Constructors:
Inactive : CursesState
Active : (0_ : InputState) -> (0windows : ListWindow) -> (0_ : (w : Window**Elemwwindows)) -> (0_ : ListString) ->CursesState

Hints:
Applicative (Consts)
Eq (ColorAttrs)
Eq (Attributes)
Functor (Consts)
HasColorcs=> {auto{conArg:2442} : HasWindowws} ->HasColorc (setWindowsw)
{auto{conArg:2664} : IsActives} ->HasColorcs=>HasColorc (addWindowsw)
InWindowws=>HasWindowws
HasWindowns=> {auto{conArg:2243} : HasWindowws} ->HasWindown (setWindowsw)
{auto{conArg:2536} : IsActives} ->HasWindowns=>HasWindown (addWindowsw)
{auto{conArg:2814} : HasWindowws} ->InWindoww (setWindowsw)
IndexedApplicativeCursesStateNCurses
IndexedFunctorCursesStateCursesStateNCurses
IndexedMonadCursesStateNCurses
IsActives=> {auto{conArg:2407} : HasWindowws} ->IsActive (setWindowsw)
{auto{conArg:2641} : IsActives} ->IsActive (addWindowsw)
Monad (Consts)
Show (ColorAttrs)
Show (Attributes)
.active : CursesState->Bool
Totality: total
Visibility: public export
0bumpWindow : (w : Window**Elemwws) -> (w : Window**Elemw (y::ws))
Totality: total
Visibility: public export
dataIsActive : CursesState->Type
Totality: total
Visibility: public export
Constructor: 
ItIsActive : IsActive (Active{_:3826}{_:3825}{_:3824}{_:3823})

Hints:
{auto{conArg:2664} : IsActives} ->HasColorcs=>HasColorc (addWindowsw)
{auto{conArg:2536} : IsActives} ->HasWindowns=>HasWindown (addWindowsw)
IsActives=> {auto{conArg:2407} : HasWindowws} ->IsActive (setWindowsw)
{auto{conArg:2641} : IsActives} ->IsActive (addWindowsw)
dataIsInactive : CursesState->Type
Totality: total
Visibility: public export
Constructor: 
ItIsInactive : IsInactiveInactive
0currentWindow : (s : CursesState) ->IsActives=>Window
Totality: total
Visibility: public export
0addWindow : (s : CursesState) ->IsActives=>String->CursesState
Totality: total
Visibility: public export
0addColor : (s : CursesState) ->IsActives=>String->CursesState
Totality: total
Visibility: public export
0setEcho : (s : CursesState) ->IsActives=>Bool->CursesState
Totality: total
Visibility: public export
0setCBreak : (s : CursesState) ->IsActives=>Bool->CursesState
Totality: total
Visibility: public export
0swapKeypad : Bool-> (ws : ListWindow) ->Elemyws->ListWindow
Totality: total
Visibility: public export
0swapKeypadPrf : (on : Bool) -> (ws : ListWindow) -> (e : Elemyws) ->Elem (setKeypadony) (swapKeypadonwse)
Totality: total
Visibility: public export
0swapNoDelay : Bool-> (ws : ListWindow) ->Elemyws->ListWindow
Totality: total
Visibility: public export
0swapNoDelayPrf : (on : Bool) -> (ws : ListWindow) -> (e : Elemyws) ->Elem (setNoDelayony) (swapNoDelayonwse)
Totality: total
Visibility: public export
0replaceWindow : InputState->ListString-> (ws' : ListWindow) ->Elemw'ws'->CursesState
Totality: total
Visibility: public export
0setKeypad : (s : CursesState) ->IsActives=>Bool->CursesState
Totality: total
Visibility: public export
0setNoDelay : (s : CursesState) ->IsActives=>Bool->CursesState
Totality: total
Visibility: public export
dataYesDelay : CursesState->Type
Totality: total
Visibility: public export
Constructor: 
ItIsDelay : YesDelay (Active{_:4218}{_:4217} (MkWindow{_:4215}{_:4214}False**{_:4216}) {_:4213})
dataNoDelay : CursesState->Type
Totality: total
Visibility: public export
Constructor: 
ItIsNoDelay : NoDelay (Active{_:4241}{_:4240} (MkWindow{_:4238}{_:4237}True**{_:4239}) {_:4236})
dataYesKeypad : CursesState->Type
Totality: total
Visibility: public export
Constructor: 
ItIsKeypad : YesKeypad (Active{_:4264}{_:4263} (MkWindow{_:4261}True{_:4260}**{_:4262}) {_:4259})
dataNoKeypad : CursesState->Type
Totality: total
Visibility: public export
Constructor: 
ItIsNoKeypad : NoKeypad (Active{_:4287}{_:4286} (MkWindow{_:4284}False{_:4283}**{_:4285}) {_:4282})
dataHasColor : (0_ : String) ->CursesState->Type
  Proof that the given color exists in the current
NCurses session.

Totality: total
Visibility: public export
Constructor: 
ItHasColor : Elemnamecs=>HasColorname (Active{_:4311}{_:4310}wcs)

Hints:
HasColorcs=> {auto{conArg:2442} : HasWindowws} ->HasColorc (setWindowsw)
{auto{conArg:2664} : IsActives} ->HasColorcs=>HasColorc (addWindowsw)
dataColorAttr : CursesState->Type
Totality: total
Visibility: public export
Constructors:
DefaultColors : ColorAttrs
Named : (name : String) ->HasColornames=>ColorAttrs

Hints:
Eq (ColorAttrs)
Show (ColorAttrs)
dataAttribute : CursesState->Type
Totality: total
Visibility: public export
Constructors:
Normal : Attributes
Underline : Attributes
Standout : Attributes
Reverse : Attributes
Dim : Attributes
Bold : Attributes
Protected : Attributes
Invisible : Attributes
Color : ColorAttrs->Attributes

Hints:
Eq (Attributes)
Show (Attributes)
dataAttrCmd : CursesState->Type
Totality: total
Visibility: public export
Constructors:
SetAttr : Attributes->AttrCmds
EnableAttr : Attributes->AttrCmds
DisableAttr : Attributes->AttrCmds
UpdateAttr : Attributes->ColorAttrs->MaybeNat->AttrCmds
SetBg : ColorAttrs->AttrCmds
recordBorder : String->Type
  A Window border.

Totality: total
Visibility: public export
Constructor: 
MkBorder : BorderChar->BorderChar->BorderChar->BorderChar->BorderChar->BorderChar->BorderChar->BorderChar->Bordercolor

Projections:
.bottom : Bordercolor->BorderChar
.bottomLeft : Bordercolor->BorderChar
.bottomRight : Bordercolor->BorderChar
.left : Bordercolor->BorderChar
.right : Bordercolor->BorderChar
.top : Bordercolor->BorderChar
.topLeft : Bordercolor->BorderChar
.topRight : Bordercolor->BorderChar
.topRight : Bordercolor->BorderChar
Totality: total
Visibility: public export
.topLeft : Bordercolor->BorderChar
Totality: total
Visibility: public export
.top : Bordercolor->BorderChar
Totality: total
Visibility: public export
.right : Bordercolor->BorderChar
Totality: total
Visibility: public export
.left : Bordercolor->BorderChar
Totality: total
Visibility: public export
.bottomRight : Bordercolor->BorderChar
Totality: total
Visibility: public export
.bottomLeft : Bordercolor->BorderChar
Totality: total
Visibility: public export
.bottom : Bordercolor->BorderChar
Totality: total
Visibility: public export
topRight : Bordercolor->BorderChar
Totality: total
Visibility: public export
topLeft : Bordercolor->BorderChar
Totality: total
Visibility: public export
top : Bordercolor->BorderChar
Totality: total
Visibility: public export
right : Bordercolor->BorderChar
Totality: total
Visibility: public export
left : Bordercolor->BorderChar
Totality: total
Visibility: public export
bottomRight : Bordercolor->BorderChar
Totality: total
Visibility: public export
bottomLeft : Bordercolor->BorderChar
Totality: total
Visibility: public export
bottom : Bordercolor->BorderChar
Totality: total
Visibility: public export
recordPosition : Type
  An NCuress Position; pass the constructor a row and a column.
Note that this means the _y position_ comes first. Position starts
at (0,0) in the upper left corner of the window.

Totality: total
Visibility: public export
Constructor: 
MkPosition : Nat->Nat->Position

Projections:
.col : Position->Nat
.row : Position->Nat
.row : Position->Nat
Totality: total
Visibility: public export
.col : Position->Nat
Totality: total
Visibility: public export
row : Position->Nat
Totality: total
Visibility: public export
col : Position->Nat
Totality: total
Visibility: public export
recordSize : Type
  An NCurses Size; pass the constructor rows and then columns.
Note that this means the _height_ comes first.

Totality: total
Visibility: public export
Constructor: 
MkSize : Nat->Nat->Size

Projections:
.cols : Size->Nat
.rows : Size->Nat
.rows : Size->Nat
Totality: total
Visibility: public export
.cols : Size->Nat
Totality: total
Visibility: public export
rows : Size->Nat
Totality: total
Visibility: public export
cols : Size->Nat
Totality: total
Visibility: public export
dataOutputCmd : CursesState->Type
Totality: total
Visibility: public export
Constructors:
PutCh : Char->OutputCmds
PutStr : Bool->String->OutputCmds
VLine : Char->Nat->OutputCmds
HLine : Char->Nat->OutputCmds
Move : Position->OutputCmds
dataIdentifiesWindow : (0_ : String) -> (0_ : ListWindow) ->Type
Totality: total
Visibility: public export
Constructors:
Here : IdentifiesWindowname (MkWindowname{_:5209}{_:5208}::windows)
There : IdentifiesWindownamewindows->IdentifiesWindowname (w::windows)

Hint: 
InWindoww (Active{_:2207}ws{_:2206}{_:2205}) =>IdentifiesWindowwws
elemWindowIdentifies : Elem (MkWindowname{_:5228}{_:5227}) ws->IdentifiesWindownamews
  Proof that an @Elem@ for a window can produce a named window identifier.

Totality: total
Visibility: public export
dataHasWindow : (0_ : String) ->CursesState->Type
Totality: total
Visibility: public export
Constructor: 
ItHasWindow : IdentifiesWindownamews=>HasWindowname (Active{_:5285}ws{_:5284}{_:5283})

Hints:
HasColorcs=> {auto{conArg:2442} : HasWindowws} ->HasColorc (setWindowsw)
InWindowws=>HasWindowws
HasWindowns=> {auto{conArg:2243} : HasWindowws} ->HasWindown (setWindowsw)
{auto{conArg:2536} : IsActives} ->HasWindowns=>HasWindown (addWindowsw)
{auto{conArg:2814} : HasWindowws} ->InWindoww (setWindowsw)
IsActives=> {auto{conArg:2407} : HasWindowws} ->IsActive (setWindowsw)
moreWindowsHasWindow : HasWindowname (Activeixs (MkWindownamekd**x) c) =>HasWindowname (Activei (y::xs) (MkWindownamekd**Therex) c)
Totality: total
Visibility: public export
DefaultWindow : String
Totality: total
Visibility: public export
0lookupWindow : (name : String) -> (ws : ListWindow) ->IdentifiesWindownamews=>Window
Totality: total
Visibility: public export
lookupFindsIdentifier : {auto{conArg:5426} : IdentifiesWindowwws} ->lookupWindowwws.identifier=w
Totality: total
Visibility: public export
0lookupWindowPrf : (name : String) -> (ws : ListWindow) -> {auto{conArg:5467} : IdentifiesWindownamews} ->Elem (lookupWindownamews) ws
  Proof that looking up a window by a name proven to identify a window in the given
list of windows will result in an element of that list of windows.

Totality: total
Visibility: public export
0setWindow : (s : CursesState) -> (name : String) ->HasWindownames=>CursesState
Totality: total
Visibility: public export
dataInWindow : (0_ : String) ->CursesState->Type
Totality: total
Visibility: public export
Constructor: 
IsCurrentWindow : InWindowname (Active{_:5556}ws (MkWindowname{_:5554}{_:5553}**{_:5555}) {_:5552})

Hints:
InWindowws=>HasWindowws
InWindoww (Active{_:2207}ws{_:2206}{_:2205}) =>IdentifiesWindowwws
{auto{conArg:2814} : HasWindowws} ->InWindoww (setWindowsw)
initWindows : ListWindow
Totality: total
Visibility: public export
initState : CursesState
Totality: total
Visibility: public export