Skip to content

Commit

Permalink
delete a few not-very-useful termbox2 functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellwrosen committed Nov 7, 2023
1 parent 5cf6994 commit d981cff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
12 changes: 1 addition & 11 deletions termbox2-bindings-c/src/Termbox2/Bindings/C.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ module Termbox2.Bindings.C
tb_last_errno,
tb_strerror,

-- ** Query compile-time constants
tb_attr_width,
tb_has_egc,
tb_has_truecolor,
tb_version,

-- * Objects
Tb_cell (..),
Tb_event (..),
Expand Down Expand Up @@ -362,13 +356,10 @@ import Termbox2.Bindings.C.Internal.Constants
)
import Termbox2.Bindings.C.Internal.Event (Tb_event (..))
import Termbox2.Bindings.C.Internal.Functions
( tb_attr_width,
tb_cell_buffer,
( tb_cell_buffer,
tb_clear,
tb_extend_cell,
tb_get_fds,
tb_has_egc,
tb_has_truecolor,
tb_height,
tb_hide_cursor,
tb_init,
Expand All @@ -392,6 +383,5 @@ import Termbox2.Bindings.C.Internal.Functions
tb_set_output_mode,
tb_shutdown,
tb_strerror,
tb_version,
tb_width,
)
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
module Termbox2.Bindings.C.Internal.Functions
( tb_attr_width,
tb_cell_buffer,
( tb_cell_buffer,
tb_clear,
tb_extend_cell,
tb_get_fds,
tb_has_egc,
tb_has_truecolor,
tb_height,
tb_hide_cursor,
tb_init,
Expand All @@ -29,7 +26,6 @@ module Termbox2.Bindings.C.Internal.Functions
tb_set_output_mode,
tb_shutdown,
tb_strerror,
tb_version,
tb_width,
)
where
Expand All @@ -41,10 +37,6 @@ import Foreign.Ptr (FunPtr, Ptr)
import Termbox2.Bindings.C.Internal.Cell (Tb_cell)
import Termbox2.Bindings.C.Internal.Event (Tb_event)

-- | Get how many bits wide attributes are.
foreign import capi unsafe "termbox2.h tb_attr_width"
tb_attr_width :: CInt

-- | Get a pointer to the back buffer.
foreign import capi unsafe "termbox2.h tb_cell_buffer"
tb_cell_buffer :: IO (Ptr Tb_cell)
Expand All @@ -61,14 +53,6 @@ foreign import capi unsafe "termbox2.h tb_extend_cell"
foreign import capi unsafe "termbox2.h tb_get_fds"
tb_get_fds :: Ptr CInt -> Ptr CInt -> IO CInt

-- | Get whether the library was compiled with extended grapheme cluster support (it was).
foreign import capi unsafe "termbox2.h tb_has_egc"
tb_has_egc :: CInt

-- | Get whether the library was compiled with truecolor support (it was).
foreign import capi unsafe "termbox2.h tb_has_truecolor"
tb_has_truecolor :: CInt

-- | Get the terminal height.
foreign import capi unsafe "termbox2.h tb_height"
tb_height :: IO CInt
Expand Down Expand Up @@ -167,10 +151,6 @@ foreign import capi unsafe "termbox2.h tb_shutdown"
foreign import capi unsafe "termbox2.h tb_strerror"
tb_strerror :: CInt -> IO (ConstPtr CChar)

-- | Get the @termbox2@ version string.
foreign import capi unsafe "termbox2.h tb_version"
tb_version :: ConstPtr CChar

-- | Get the terminal height.
foreign import capi unsafe "termbox2.h tb_width"
tb_width :: IO CInt

0 comments on commit d981cff

Please sign in to comment.