- data Vty = Vty {}
- beep :: IO ()
- mkVty :: IO Vty
- data Cursor
- newtype Attr = Attr Int
- setFG :: Color -> Attr -> Attr
- setBG :: Color -> Attr -> Attr
- setFGVivid :: Color -> Attr -> Attr
- setBGVivid :: Color -> Attr -> Attr
- setBold :: Attr -> Attr
- setBlink :: Attr -> Attr
- setRV :: Attr -> Attr
- setHalfBright :: Attr -> Attr
- setUnderline :: Attr -> Attr
- attr :: Attr
- newtype Color = Color Int
- red :: Color
- green :: Color
- yellow :: Color
- blue :: Color
- magenta :: Color
- cyan :: Color
- white :: Color
- def :: Color
- black :: Color
- data Image = Image (Int -> Ptr Int -> IO ()) !Int !Int
- imgWidth :: Image -> Int
- imgHeight :: Image -> Int
- empty :: Image
- (<|>) :: Image -> Image -> Image
- (<->) :: Image -> Image -> Image
- fillSeg :: Attr -> Char -> Ptr Int -> Ptr Int -> IO ()
- horzcat :: [Image] -> Image
- vertcat :: [Image] -> Image
- renderBS :: Attr -> ByteString -> Image
- renderChar :: Attr -> Char -> Image
- renderHFill :: Attr -> Char -> Int -> Image
- renderFill :: Attr -> Char -> Int -> Int -> Image
- data Picture = Pic {}
- pic :: Picture
- data Key
- data Modifier
- data Button
- data Event
Documentation
The main object. At most one should be created.
Vty | |
|
Set up the state object for using vty. At most one state object should be created at a time.
This type represents the visible cursor state.
setHalfBright :: Attr -> AttrSource
Set half-bright attribute of an Attr
.
setUnderline :: Attr -> AttrSource
Set underline attribute of an Attr
.
A two-dimensional array of (Char,Attr) pairs.
(<|>) :: Image -> Image -> ImageSource
Compose two images side by side. The images must of the same height, or one must be empty.
(<->) :: Image -> Image -> ImageSource
Compose two images vertically. The images must of the same width, or one must be empty.
fillSeg :: Attr -> Char -> Ptr Int -> Ptr Int -> IO ()Source
Helper - fill a buffer segment with a char/attr.
renderBS :: Attr -> ByteString -> ImageSource
Create an Image
from a ByteString
with a single uniform Attr
.
renderChar :: Attr -> Char -> ImageSource
Create a 1x1 image. Warning, this is likely to be inefficient.
renderHFill :: Attr -> Char -> Int -> ImageSource
Create an image by repeating a single character and attribute horizontally.
renderFill :: Attr -> Char -> Int -> Int -> ImageSource
Create an image by repeating a single character and attribute.
The type of images to be displayed using update
. You probably shouldn't
create this directly if you care about compatibility with future versions of
vty; instead use pic
and record update syntax.
Representations of non-modifier keys.
Modifier keys. Key codes are interpreted such that users are more likely to
have Meta than Alt; for instance on the PC Linux console, MMeta
will
generally correspond to the physical Alt key.
Mouse buttons. Not yet used.