Skip to content

Commit

Permalink
add deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
adsr committed Jul 14, 2024
1 parent ff767c1 commit 64d8fdd
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions termbox2.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extern "C" {
#elif defined TB_OPT_ATTR_W && TB_OPT_ATTR_W == 64
#else
#undef TB_OPT_ATTR_W
#if defined TB_OPT_TRUECOLOR // Back-compat for old flag
#if defined TB_OPT_TRUECOLOR // Deprecated. Back-compat for old flag.
#define TB_OPT_ATTR_W 32
#else
#define TB_OPT_ATTR_W 16
Expand Down Expand Up @@ -347,7 +347,7 @@ extern "C" {
#define TB_ERR_SELECT TB_ERR_POLL
#define TB_ERR_RESIZE_SELECT TB_ERR_RESIZE_POLL

/* Function types to be used with tb_set_func() */
/* Deprecated. Function types to be used with tb_set_func(). */
#define TB_FUNC_EXTRACT_PRE 0
#define TB_FUNC_EXTRACT_POST 1

Expand Down Expand Up @@ -646,8 +646,8 @@ int tb_printf_ex(int x, int y, uintattr_t fg, uintattr_t bg, size_t *out_w,
int tb_send(const char *buf, size_t nbuf);
int tb_sendf(const char *fmt, ...);

/* Set custom functions. fn_type is one of TB_FUNC_* constants, fn is a
* compatible function pointer, or NULL to clear.
/* Deprecated. Set custom functions. fn_type is one of TB_FUNC_* constants, fn
* is a compatible function pointer, or NULL to clear.
*
* TB_FUNC_EXTRACT_PRE:
* If specified, invoke this function BEFORE termbox tries to extract any
Expand Down Expand Up @@ -683,12 +683,30 @@ int tb_utf8_unicode_to_char(char *out, uint32_t c);
/* Library utility functions */
int tb_last_errno(void);
const char *tb_strerror(int err);
struct tb_cell *tb_cell_buffer(void);
struct tb_cell *tb_cell_buffer(void); // Deprecated
int tb_has_truecolor(void);
int tb_has_egc(void);
int tb_attr_width(void);
const char *tb_version(void);

/* Deprecation notice!
*
* The following will be removed in version 3.x (ABI version 3):
*
* TB_256_BLACK (use TB_HI_BLACK)
* TB_OPT_TRUECOLOR (use TB_OPT_ATTR_W)
* TB_TRUECOLOR_BOLD (use TB_BOLD)
* TB_TRUECOLOR_UNDERLINE (use TB_UNDERLINE)
* TB_TRUECOLOR_REVERSE (use TB_REVERSE)
* TB_TRUECOLOR_ITALIC (use TB_ITALICe)
* TB_TRUECOLOR_BLINK (use TB_BLINK)
* TB_TRUECOLOR_BLACK (use TB_HI_BLACK)
* tb_cell_buffer
* tb_set_func
* TB_FUNC_EXTRACT_PRE
* TB_FUNC_EXTRACT_POST
*/

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 64d8fdd

Please sign in to comment.