Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- tb_init :: IO (Either Tb_init_error ())
- tb_init_fd :: Fd -> IO (Either Tb_init_error ())
- tb_init_file :: FilePath -> IO (Either Tb_init_error ())
- tb_shutdown :: IO ()
- tb_select_input_mode :: Tb_input_mode -> IO Tb_input_mode
- tb_select_output_mode :: Tb_output_mode -> IO Tb_output_mode
- tb_width :: IO Int
- tb_height :: IO Int
- tb_peek_event :: Int -> IO (Either () (Maybe Tb_event))
- tb_poll_event :: IO (Either () Tb_event)
- tb_attr :: Tb_attr -> Tb_color -> Tb_color
- tb_set_cursor :: Maybe (Int, Int) -> IO ()
- tb_put_cell :: Int -> Int -> Tb_cell -> IO ()
- tb_change_cell :: Int -> Int -> Char -> Tb_color -> Tb_color -> IO ()
- tb_clear :: IO ()
- tb_set_clear_attributes :: Tb_color -> Tb_color -> IO ()
- tb_present :: IO ()
- newtype Tb_attr where
- Tb_attr Word16
- pattern TB_BOLD :: Tb_attr
- pattern TB_REVERSE :: Tb_attr
- pattern TB_UNDERLINE :: Tb_attr
- data Tb_cell = Tb_cell {}
- newtype Tb_color where
- data Tb_event = Tb_event {}
- newtype Tb_event_mod where
- Tb_event_mod Word8
- pattern TB_MOD_ALT :: Tb_event_mod
- pattern TB_MOD_MOTION :: Tb_event_mod
- data Tb_event_type where
- pattern TB_EVENT_KEY :: Tb_event_type
- pattern TB_EVENT_MOUSE :: Tb_event_type
- pattern TB_EVENT_RESIZE :: Tb_event_type
- data Tb_init_error where
- pattern TB_EFAILED_TO_OPEN_TTY :: Tb_init_error
- pattern TB_EPIPE_TRAP_ERROR :: Tb_init_error
- pattern TB_EUNSUPPORTED_TERMINAL :: Tb_init_error
- data Tb_input_mode where
- pattern TB_INPUT_CURRENT :: Tb_input_mode
- pattern TB_INPUT_ALT :: Tb_input_mode
- pattern TB_INPUT_ESC :: Tb_input_mode
- pattern TB_INPUT_MOUSE :: Tb_input_mode
- data Tb_key where
- pattern TB_KEY_ARROW_DOWN :: Tb_key
- pattern TB_KEY_ARROW_LEFT :: Tb_key
- pattern TB_KEY_ARROW_RIGHT :: Tb_key
- pattern TB_KEY_ARROW_UP :: Tb_key
- pattern TB_KEY_BACKSPACE :: Tb_key
- pattern TB_KEY_BACKSPACE2 :: Tb_key
- pattern TB_KEY_CTRL_2 :: Tb_key
- pattern TB_KEY_CTRL_3 :: Tb_key
- pattern TB_KEY_CTRL_4 :: Tb_key
- pattern TB_KEY_CTRL_5 :: Tb_key
- pattern TB_KEY_CTRL_6 :: Tb_key
- pattern TB_KEY_CTRL_7 :: Tb_key
- pattern TB_KEY_CTRL_8 :: Tb_key
- pattern TB_KEY_CTRL_A :: Tb_key
- pattern TB_KEY_CTRL_B :: Tb_key
- pattern TB_KEY_CTRL_BACKSLASH :: Tb_key
- pattern TB_KEY_CTRL_C :: Tb_key
- pattern TB_KEY_CTRL_D :: Tb_key
- pattern TB_KEY_CTRL_E :: Tb_key
- pattern TB_KEY_CTRL_F :: Tb_key
- pattern TB_KEY_CTRL_G :: Tb_key
- pattern TB_KEY_CTRL_H :: Tb_key
- pattern TB_KEY_CTRL_I :: Tb_key
- pattern TB_KEY_CTRL_J :: Tb_key
- pattern TB_KEY_CTRL_K :: Tb_key
- pattern TB_KEY_CTRL_L :: Tb_key
- pattern TB_KEY_CTRL_LSQ_BRACKET :: Tb_key
- pattern TB_KEY_CTRL_M :: Tb_key
- pattern TB_KEY_CTRL_N :: Tb_key
- pattern TB_KEY_CTRL_O :: Tb_key
- pattern TB_KEY_CTRL_P :: Tb_key
- pattern TB_KEY_CTRL_Q :: Tb_key
- pattern TB_KEY_CTRL_R :: Tb_key
- pattern TB_KEY_CTRL_RSQ_BRACKET :: Tb_key
- pattern TB_KEY_CTRL_S :: Tb_key
- pattern TB_KEY_CTRL_SLASH :: Tb_key
- pattern TB_KEY_CTRL_T :: Tb_key
- pattern TB_KEY_CTRL_TILDE :: Tb_key
- pattern TB_KEY_CTRL_U :: Tb_key
- pattern TB_KEY_CTRL_UNDERSCORE :: Tb_key
- pattern TB_KEY_CTRL_V :: Tb_key
- pattern TB_KEY_CTRL_W :: Tb_key
- pattern TB_KEY_CTRL_X :: Tb_key
- pattern TB_KEY_CTRL_Y :: Tb_key
- pattern TB_KEY_CTRL_Z :: Tb_key
- pattern TB_KEY_DELETE :: Tb_key
- pattern TB_KEY_END :: Tb_key
- pattern TB_KEY_ENTER :: Tb_key
- pattern TB_KEY_ESC :: Tb_key
- pattern TB_KEY_F1 :: Tb_key
- pattern TB_KEY_F10 :: Tb_key
- pattern TB_KEY_F11 :: Tb_key
- pattern TB_KEY_F12 :: Tb_key
- pattern TB_KEY_F2 :: Tb_key
- pattern TB_KEY_F3 :: Tb_key
- pattern TB_KEY_F4 :: Tb_key
- pattern TB_KEY_F5 :: Tb_key
- pattern TB_KEY_F6 :: Tb_key
- pattern TB_KEY_F7 :: Tb_key
- pattern TB_KEY_F8 :: Tb_key
- pattern TB_KEY_F9 :: Tb_key
- pattern TB_KEY_HOME :: Tb_key
- pattern TB_KEY_INSERT :: Tb_key
- pattern TB_KEY_MOUSE_LEFT :: Tb_key
- pattern TB_KEY_MOUSE_MIDDLE :: Tb_key
- pattern TB_KEY_MOUSE_RELEASE :: Tb_key
- pattern TB_KEY_MOUSE_RIGHT :: Tb_key
- pattern TB_KEY_MOUSE_WHEEL_DOWN :: Tb_key
- pattern TB_KEY_MOUSE_WHEEL_UP :: Tb_key
- pattern TB_KEY_PGDN :: Tb_key
- pattern TB_KEY_PGUP :: Tb_key
- pattern TB_KEY_SPACE :: Tb_key
- pattern TB_KEY_TAB :: Tb_key
- data Tb_output_mode where
- pattern TB_OUTPUT_CURRENT :: Tb_output_mode
- pattern TB_OUTPUT_216 :: Tb_output_mode
- pattern TB_OUTPUT_256 :: Tb_output_mode
- pattern TB_OUTPUT_GRAYSCALE :: Tb_output_mode
- pattern TB_OUTPUT_NORMAL :: Tb_output_mode
Functions
Initialize / shutdown
tb_init_fd :: Fd -> IO (Either Tb_init_error ()) Source #
Initialize the termbox
library.
tb_init = tb_init_fd(0)
tb_init_file :: FilePath -> IO (Either Tb_init_error ()) Source #
Initialize the termbox
library.
tb_init = tb_init_file("/dev/tty")
tb_shutdown :: IO () #
Shutdown the termbox
library.
Get/set input/output mode
tb_select_input_mode :: Tb_input_mode -> IO Tb_input_mode Source #
Get/set the input mode.
tb_select_output_mode :: Tb_output_mode -> IO Tb_output_mode Source #
Get/set the output mode.
Get terminal dimensions
Poll for events
tb_peek_event :: Int -> IO (Either () (Maybe Tb_event)) Source #
Wait up to a number of milliseconds for an event.
Style a color
Set a cell
Set a cell value in the back buffer.
Clear and synchronize the back buffer
tb_set_clear_attributes Source #
Set the foreground and background attributes that tb_clear
clears the back buffer with.
tb_present :: IO () #
Synchronize the back buffer with the terminal.
Types
An attribute.
pattern TB_BOLD :: Tb_attr | |
pattern TB_REVERSE :: Tb_attr | |
pattern TB_UNDERLINE :: Tb_attr |
A cell.
Instances
Generic Tb_cell Source # | |
Show Tb_cell Source # | |
Eq Tb_cell Source # | |
Ord Tb_cell Source # | |
type Rep Tb_cell Source # | |
Defined in Termbox.Bindings.Hs type Rep Tb_cell = D1 ('MetaData "Tb_cell" "Termbox.Bindings.Hs" "termbox-bindings-hs-0.1.0-CJcumylTzjB9BTM52ZYmH0" 'False) (C1 ('MetaCons "Tb_cell" 'PrefixI 'True) (S1 ('MetaSel ('Just "ch") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Char) :*: (S1 ('MetaSel ('Just "fg") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Tb_attr) :*: S1 ('MetaSel ('Just "bg") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Tb_attr)))) |
A color.
pattern TB_DEFAULT :: Tb_color | |
pattern TB_BLACK :: Tb_color | |
pattern TB_BLUE :: Tb_color | |
pattern TB_CYAN :: Tb_color | |
pattern TB_GREEN :: Tb_color | |
pattern TB_MAGENTA :: Tb_color | |
pattern TB_RED :: Tb_color | |
pattern TB_WHITE :: Tb_color | |
pattern TB_YELLOW :: Tb_color |
An event.
Instances
newtype Tb_event_mod Source #
An event modifier.
pattern TB_MOD_ALT :: Tb_event_mod | |
pattern TB_MOD_MOTION :: Tb_event_mod |
Instances
Show Tb_event_mod Source # | |
Defined in Termbox.Bindings.Hs showsPrec :: Int -> Tb_event_mod -> ShowS # show :: Tb_event_mod -> String # showList :: [Tb_event_mod] -> ShowS # | |
Eq Tb_event_mod Source # | |
Defined in Termbox.Bindings.Hs (==) :: Tb_event_mod -> Tb_event_mod -> Bool # (/=) :: Tb_event_mod -> Tb_event_mod -> Bool # | |
Ord Tb_event_mod Source # | |
Defined in Termbox.Bindings.Hs compare :: Tb_event_mod -> Tb_event_mod -> Ordering # (<) :: Tb_event_mod -> Tb_event_mod -> Bool # (<=) :: Tb_event_mod -> Tb_event_mod -> Bool # (>) :: Tb_event_mod -> Tb_event_mod -> Bool # (>=) :: Tb_event_mod -> Tb_event_mod -> Bool # max :: Tb_event_mod -> Tb_event_mod -> Tb_event_mod # min :: Tb_event_mod -> Tb_event_mod -> Tb_event_mod # |
data Tb_event_type where Source #
An event type.
pattern TB_EVENT_KEY :: Tb_event_type | |
pattern TB_EVENT_MOUSE :: Tb_event_type | |
pattern TB_EVENT_RESIZE :: Tb_event_type |
Instances
Show Tb_event_type Source # | |
Defined in Termbox.Bindings.Hs showsPrec :: Int -> Tb_event_type -> ShowS # show :: Tb_event_type -> String # showList :: [Tb_event_type] -> ShowS # | |
Eq Tb_event_type Source # | |
Defined in Termbox.Bindings.Hs (==) :: Tb_event_type -> Tb_event_type -> Bool # (/=) :: Tb_event_type -> Tb_event_type -> Bool # | |
Ord Tb_event_type Source # | |
Defined in Termbox.Bindings.Hs compare :: Tb_event_type -> Tb_event_type -> Ordering # (<) :: Tb_event_type -> Tb_event_type -> Bool # (<=) :: Tb_event_type -> Tb_event_type -> Bool # (>) :: Tb_event_type -> Tb_event_type -> Bool # (>=) :: Tb_event_type -> Tb_event_type -> Bool # max :: Tb_event_type -> Tb_event_type -> Tb_event_type # min :: Tb_event_type -> Tb_event_type -> Tb_event_type # |
data Tb_init_error where Source #
A tb_init
error.
pattern TB_EFAILED_TO_OPEN_TTY :: Tb_init_error | |
pattern TB_EPIPE_TRAP_ERROR :: Tb_init_error | |
pattern TB_EUNSUPPORTED_TERMINAL :: Tb_init_error |
Instances
Show Tb_init_error Source # | |
Defined in Termbox.Bindings.Hs showsPrec :: Int -> Tb_init_error -> ShowS # show :: Tb_init_error -> String # showList :: [Tb_init_error] -> ShowS # | |
Eq Tb_init_error Source # | |
Defined in Termbox.Bindings.Hs (==) :: Tb_init_error -> Tb_init_error -> Bool # (/=) :: Tb_init_error -> Tb_init_error -> Bool # | |
Ord Tb_init_error Source # | |
Defined in Termbox.Bindings.Hs compare :: Tb_init_error -> Tb_init_error -> Ordering # (<) :: Tb_init_error -> Tb_init_error -> Bool # (<=) :: Tb_init_error -> Tb_init_error -> Bool # (>) :: Tb_init_error -> Tb_init_error -> Bool # (>=) :: Tb_init_error -> Tb_init_error -> Bool # max :: Tb_init_error -> Tb_init_error -> Tb_init_error # min :: Tb_init_error -> Tb_init_error -> Tb_init_error # |
data Tb_input_mode where Source #
The input mode.
pattern TB_INPUT_CURRENT :: Tb_input_mode | |
pattern TB_INPUT_ALT :: Tb_input_mode | |
pattern TB_INPUT_ESC :: Tb_input_mode | |
pattern TB_INPUT_MOUSE :: Tb_input_mode |
Instances
Show Tb_input_mode Source # | |
Defined in Termbox.Bindings.Hs showsPrec :: Int -> Tb_input_mode -> ShowS # show :: Tb_input_mode -> String # showList :: [Tb_input_mode] -> ShowS # | |
Eq Tb_input_mode Source # | |
Defined in Termbox.Bindings.Hs (==) :: Tb_input_mode -> Tb_input_mode -> Bool # (/=) :: Tb_input_mode -> Tb_input_mode -> Bool # | |
Ord Tb_input_mode Source # | |
Defined in Termbox.Bindings.Hs compare :: Tb_input_mode -> Tb_input_mode -> Ordering # (<) :: Tb_input_mode -> Tb_input_mode -> Bool # (<=) :: Tb_input_mode -> Tb_input_mode -> Bool # (>) :: Tb_input_mode -> Tb_input_mode -> Bool # (>=) :: Tb_input_mode -> Tb_input_mode -> Bool # max :: Tb_input_mode -> Tb_input_mode -> Tb_input_mode # min :: Tb_input_mode -> Tb_input_mode -> Tb_input_mode # |
data Tb_output_mode where Source #
The output mode.
pattern TB_OUTPUT_CURRENT :: Tb_output_mode | |
pattern TB_OUTPUT_216 :: Tb_output_mode | |
pattern TB_OUTPUT_256 :: Tb_output_mode | |
pattern TB_OUTPUT_GRAYSCALE :: Tb_output_mode | |
pattern TB_OUTPUT_NORMAL :: Tb_output_mode |
Instances
Show Tb_output_mode Source # | |
Defined in Termbox.Bindings.Hs showsPrec :: Int -> Tb_output_mode -> ShowS # show :: Tb_output_mode -> String # showList :: [Tb_output_mode] -> ShowS # | |
Eq Tb_output_mode Source # | |
Defined in Termbox.Bindings.Hs (==) :: Tb_output_mode -> Tb_output_mode -> Bool # (/=) :: Tb_output_mode -> Tb_output_mode -> Bool # | |
Ord Tb_output_mode Source # | |
Defined in Termbox.Bindings.Hs compare :: Tb_output_mode -> Tb_output_mode -> Ordering # (<) :: Tb_output_mode -> Tb_output_mode -> Bool # (<=) :: Tb_output_mode -> Tb_output_mode -> Bool # (>) :: Tb_output_mode -> Tb_output_mode -> Bool # (>=) :: Tb_output_mode -> Tb_output_mode -> Bool # max :: Tb_output_mode -> Tb_output_mode -> Tb_output_mode # min :: Tb_output_mode -> Tb_output_mode -> Tb_output_mode # |