ncurses
Version 0.2.16 revision 1 uploaded by HerbertValerioRiedel.
Package meta
- Synopsis
- Modernised bindings to GNU ncurses
- Description
GNU ncurses is a library for creating command-line application with pseudo-graphical interfaces. This package is a nice, modern binding to GNU ncurses.
The following example is a program that displays the message "Hello world!" until the user hits Q:
import UI.NCurses main :: IO () main = runCurses $ do setEcho False w <- defaultWindow updateWindow w $ do moveCursor 1 10 drawString "Hello world!" moveCursor 3 10 drawString "(press q to quit)" moveCursor 0 0 render waitFor w (\ev -> ev == EventCharacter 'q' || ev == EventCharacter 'Q') waitFor :: Window -> (Event -> Bool) -> Curses () waitFor w p = loop where loop = do ev <- getEvent w Nothing case ev of Nothing -> loop Just ev' -> if p ev' then return () else loop
- Author
- John Millikin <jmillikin@gmail.com>
- Bug reports
- mailto:jmillikin@gmail.com
- Category
- User Interfaces, Foreign
- Copyright
- n/a
- Homepage
- https://john-millikin.com/software/haskell-ncurses/
- Maintainer
- John Millikin <jmillikin@gmail.com>
- Package URL
- n/a
- Stability
- experimental