|
|
|
|
|
|
| Synopsis |
|
|
|
|
| UI initialisation
|
|
| start :: IO () |
start initializes the UI and grabs the keyboard.
This function installs a handler for the SIGWINCH signal
which writes the KEY_RESIZE key to the input queue (if KEY_RESIZE and
and SIGWINCH are both available).
|
|
| end :: IO () |
| Clean up and go home.
|
|
| suspend :: IO () |
| Suspend the program.
|
|
| resizeui :: IO (Int, Int) |
| Resize the window
From Writing Programs with NCURSES, by Eric S. Raymond and
Zeyd M. Ben-Halim
|
|
| Input
|
|
| getKey :: MonadIO m => m () -> m Key |
getKey refresh reads a key.
The refresh function is used to redraw the screen when the terminal size
changes (see the documentatio of start for a discussion of the problem).
|
|
| Drawing
|
|
| drawLine :: Int -> String -> IO () |
| drawLine n s draws n characters of string s.
|
|
| drawCursor :: (Int, Int) -> (Int, Int) -> IO () |
| Draw the cursor at the given position.
|
|
| Navigation
|
|
| gotoTop :: IO () |
| Move cursor to origin of stdScr.
|
|
| Colors
|
|
| data ForegroundColor |
| Foreground colors.
| | Constructors | | BlackF | | | GreyF | | | DarkRedF | | | RedF | | | DarkGreenF | | | GreenF | | | BrownF | | | YellowF | | | DarkBlueF | | | BlueF | | | PurpleF | | | MagentaF | | | DarkCyanF | | | CyanF | | | WhiteF | | | BrightWhiteF | | | DefaultF | |
| Instances | |
|
|
| data BackgroundColor |
| Background colors.
| | Constructors | | BlackB | | | DarkRedB | | | DarkGreenB | | | BrownB | | | DarkBlueB | | | PurpleB | | | DarkCyanB | | | WhiteB | | | DefaultB | |
| Instances | |
|
|
| defaultColor :: Color |
| Basic colors.
|
|
| black :: Color |
|
| red :: Color |
|
| green :: Color |
|
| yellow :: Color |
|
| blue :: Color |
|
| magenta :: Color |
|
| cyan :: Color |
|
| white :: Color |
|
| Attributes
|
|
| data Attribute |
| Abstractions for some commonly used attributes.
| | Constructors | | Bold | | | Underline | | | Dim | | | Reverse | | | Blink | |
| Instances | |
|
|
| convertAttributes :: [Attribute] -> Attr |
| Converts an abstract attribute list into its curses representation.
|
|
| Style
|
|
| data Style |
| A humand-readable style.
| | Constructors | | Instances | |
|
|
| data CursesStyle |
| A style which uses the internal curses representations for
attributes and colors.
| Instances | |
|
|
| mkCursesStyle :: [Attribute] -> CursesStyle |
|
| changeCursesStyle :: CursesStyle -> [Attribute] -> CursesStyle |
| Changes the attributes of the given CursesStyle.
|
|
| setStyle :: CursesStyle -> IO () |
| Manipulate the current style of the standard screen
|
|
| resetStyle :: IO () |
| Reset the screen to normal values
|
|
| convertStyles :: [Style] -> IO [CursesStyle] |
Converts a list of human-readable styles into the corresponding
curses representation.
This function should be called exactly once at application startup
for all styles of the application.
|
|
| defaultStyle :: Style |
|
| defaultCursesStyle :: CursesStyle |
|
| withStyle :: MonadExcIO m => CursesStyle -> m a -> m a |
|
| Keys
|
|
| displayKey :: Key -> String |
| Converting keys to humand-readable strings
|
|
| Helpers
|
|
| withCursor :: MonadExcIO m => CursorVisibility -> m a -> m a |
Other helpers
set the cursor, and do action
|
|
| withProgram :: MonadExcIO m => m a -> m a |
|
| Produced by Haddock version 2.1.0 |