]> _ Git - termbox2.git/commit
add support for more style attrs and 64-bit attrs (#56)
authorAdam Saponara <as@php.net>
Thu, 13 Jul 2023 06:57:59 +0000 (02:57 -0400)
committerAdam Saponara <as@php.net>
Thu, 13 Jul 2023 07:21:14 +0000 (03:21 -0400)
commitfcb8dc56eb75f2df0775200d1a64bff01ef23619
treedb34f9d9ece231ef633911bd636d94e4edc62d33
parentf56f23bed7913d4b3174c274f5abee4161e6fe98
add support for more style attrs and 64-bit attrs (#56)

probably should have broken this into multiple commits but it was all
inter-related:

* deprecate TB_OPT_TRUECOLOR in favor of TB_OPT_ATTR_W which defaults
  to 16, but can be 32 (truecolor) or 64 (truecolor + additional
  styles). for back compat, TB_OPT_TRUECOLOR sets TB_OPT_ATTR_W to 32
  if not already set.

* add TB_BRIGHT, available in TB_OUTPUT_NORMAL only.

* add TB_DIM and TB_INVISIBLE. TB_INVISIBLE is available only when
  TB_OPT_ATTR_W=64.

* add TB_STRIKEOUT, TB_UNDERLINE_2, TB_OVERLINE, available only when
  TB_OPT_ATTR_W=64. these are hard-coded caps because they don't
  appear to be in terminfo.

* deprecate TB_256_BLACK and TB_TRUECOLOR_BLACK in favor of
  TB_HI_BLACK which can be used in any of the hi-color modes.

* deprecate all TB_TRUECOLOR_* style attributes. users can use
  TB_BOLD, TB_UNDERLINE, etc in truecolor mode now.

* add tests for new features.

* document compile-time options.
.gitignore
codegen.sh
termbox2.h
tests/test_64bit/expected.ansi [new file with mode: 0644]
tests/test_64bit/test.php [new file with mode: 0755]
tests/test_basic/expected.ansi
tests/test_basic/test.php
tests/test_color_8bit/test.php
tests/test_color_true/test.php