termbox-bindings-c-0.1.0: termbox bindings
Safe HaskellNone
LanguageHaskell2010

Termbox.Bindings.C

Synopsis

Functions

Initialize / shutdown

tb_init :: IO CInt Source #

Initialize the termbox library.

tb_init_fd :: CInt -> IO CInt Source #

Initialize the termbox library.

tb_init = tb_init_fd(0)

tb_init_file :: CString -> IO CInt Source #

Initialize the termbox library.

tb_init = tb_init_file("/dev/tty")

tb_shutdown :: IO () Source #

Shutdown the termbox library.

Get/set input/output mode

tb_select_input_mode :: CInt -> IO CInt Source #

Get/set the input mode.

tb_select_output_mode :: CInt -> IO CInt Source #

Get/set the output mode.

Get terminal dimensions

tb_width :: IO CInt Source #

Get the terminal width.

tb_height :: IO CInt Source #

Get the terminal height.

Poll for events

tb_peek_event :: Ptr Tb_event -> CInt -> IO CInt Source #

Wait up to a number of milliseconds for an event.

tb_poll_event :: Ptr Tb_event -> IO CInt Source #

Wait for an event.

Set a cell

tb_set_cursor Source #

Arguments

:: CInt

x

-> CInt

y

-> IO () 

Set the cursor location, or hide it.

tb_put_cell Source #

Arguments

:: CInt

x

-> CInt

y

-> Ptr Tb_cell

cell

-> IO () 

Set a cell value in the back buffer.

tb_change_cell Source #

Arguments

:: CInt

x

-> CInt

y

-> Word32

ch

-> Word16

fg

-> Word16

bg

-> IO () 

Set a cell value in the back buffer.

tb_cell_buffer :: IO (Ptr Tb_cell) Source #

Get a pointer to the back buffer.

Clear and synchronize the back buffer

tb_clear :: IO () Source #

Clear the back buffer.

tb_set_clear_attributes Source #

Arguments

:: Word16

fg

-> Word16

bg

-> IO () 

Set the foreground and background attributes that tb_clear clears the back buffer with.

tb_present :: IO () Source #

Synchronize the back buffer with the terminal.

Objects

data Tb_cell Source #

A cell.

Constructors

Tb_cell 

Fields

Instances

Instances details
Storable Tb_cell Source # 
Instance details

Defined in Termbox.Bindings.C

Generic Tb_cell Source # 
Instance details

Defined in Termbox.Bindings.C

Associated Types

type Rep Tb_cell :: Type -> Type #

Methods

from :: Tb_cell -> Rep Tb_cell x #

to :: Rep Tb_cell x -> Tb_cell #

Show Tb_cell Source # 
Instance details

Defined in Termbox.Bindings.C

Eq Tb_cell Source # 
Instance details

Defined in Termbox.Bindings.C

Methods

(==) :: Tb_cell -> Tb_cell -> Bool #

(/=) :: Tb_cell -> Tb_cell -> Bool #

Ord Tb_cell Source # 
Instance details

Defined in Termbox.Bindings.C

type Rep Tb_cell Source # 
Instance details

Defined in Termbox.Bindings.C

type Rep Tb_cell = D1 ('MetaData "Tb_cell" "Termbox.Bindings.C" "termbox-bindings-c-0.1.0-EU9QD3vg80E9pR6rrLY4UE" 'False) (C1 ('MetaCons "Tb_cell" 'PrefixI 'True) (S1 ('MetaSel ('Just "ch") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "fg") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "bg") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Word16))))

data Tb_event Source #

An event.

Constructors

Tb_event 

Fields

Instances

Instances details
Storable Tb_event Source # 
Instance details

Defined in Termbox.Bindings.C

Generic Tb_event Source # 
Instance details

Defined in Termbox.Bindings.C

Associated Types

type Rep Tb_event :: Type -> Type #

Methods

from :: Tb_event -> Rep Tb_event x #

to :: Rep Tb_event x -> Tb_event #

Show Tb_event Source # 
Instance details

Defined in Termbox.Bindings.C

Eq Tb_event Source # 
Instance details

Defined in Termbox.Bindings.C

Ord Tb_event Source # 
Instance details

Defined in Termbox.Bindings.C

type Rep Tb_event Source # 
Instance details

Defined in Termbox.Bindings.C

Constants

Keys

Alt modifiers

Colors

Attributes

Event types

tb_init error codes

Hide cursor

Input modes

Output modes