diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index be9b2a61a..570a801a6 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -3956,221 +3956,15 @@ API void notcurses_debug(const struct notcurses* nc, FILE* debugfp) // DEPRECATED MATERIAL, GOING AWAY IN ABI3 -__attribute__ ((deprecated)) static inline int -ncplane_align(const struct ncplane* n, ncalign_e align, int c){ - return ncplane_halign(n, align, c); -} - -__attribute__ ((deprecated)) static inline void -cell_init(nccell* c){ - nccell_init(c); -} - -__attribute__ ((deprecated)) API int cell_load(struct ncplane* n, nccell* c, const char* gcluster); -// nccell_load(), plus blast the styling with 'attr' and 'channels'. - -__attribute__ ((deprecated)) static inline int -cell_prime(struct ncplane* n, nccell* c, const char* gcluster, - uint32_t stylemask, uint64_t channels){ - return nccell_prime(n, c, gcluster, stylemask, channels); -} - __attribute__ ((deprecated)) API int cell_duplicate(struct ncplane* n, nccell* targ, const nccell* c); __attribute__ ((deprecated)) API void cell_release(struct ncplane* n, nccell* c); -__attribute__ ((deprecated)) static inline void -cell_set_styles(nccell* c, unsigned stylebits){ - nccell_set_styles(c, stylebits); -} - -// Extract the style bits from the nccell. -__attribute__ ((deprecated)) static inline unsigned -cell_styles(const nccell* c){ - return nccell_styles(c); -} - -__attribute__ ((deprecated)) static inline void -cell_on_styles(nccell* c, unsigned stylebits){ - nccell_on_styles(c, stylebits); -} - -__attribute__ ((deprecated)) static inline void -cell_off_styles(nccell* c, unsigned stylebits){ - nccell_off_styles(c, stylebits); -} - -__attribute__ ((deprecated)) static inline void -cell_set_fg_default(nccell* c){ - nccell_set_fg_default(c); -} - -__attribute__ ((deprecated)) static inline void -cell_set_bg_default(nccell* c){ - nccell_set_bg_default(c); -} - -__attribute__ ((deprecated)) static inline int -cell_set_fg_alpha(nccell* c, int alpha){ - return nccell_set_fg_alpha(c, alpha); -} - -__attribute__ ((deprecated)) static inline int -cell_set_bg_alpha(nccell* c, int alpha){ - return nccell_set_bg_alpha(c, alpha); -} - -__attribute__ ((deprecated)) static inline bool -cell_double_wide_p(const nccell* c){ - return nccell_double_wide_p(c); -} - -__attribute__ ((deprecated)) static inline bool -cell_wide_right_p(const nccell* c){ - return nccell_wide_right_p(c); -} - -__attribute__ ((deprecated)) static inline bool -cell_wide_left_p(const nccell* c){ - return nccell_wide_left_p(c); -} - -__attribute__ ((deprecated)) API const char* -cell_extended_gcluster(const struct ncplane* n, const nccell* c); - -__attribute__ ((deprecated)) ALLOC static inline char* -cell_strdup(const struct ncplane* n, const nccell* c){ - return nccell_strdup(n, c); -} - -__attribute__ ((deprecated)) static inline char* -cell_extract(const struct ncplane* n, const nccell* c, - uint16_t* stylemask, uint64_t* channels){ - return nccell_extract(n, c, stylemask, channels); -} - -__attribute__ ((deprecated)) static inline bool -cellcmp(const struct ncplane* n1, const nccell* RESTRICT c1, - const struct ncplane* n2, const nccell* RESTRICT c2){ - return nccellcmp(n1, c1, n2, c2); -} - -__attribute__ ((deprecated)) static inline int -cell_load_char(struct ncplane* n, nccell* c, char ch){ - return nccell_load_char(n, c, ch); -} - -__attribute__ ((deprecated)) static inline int -cell_load_egc32(struct ncplane* n, nccell* c, uint32_t egc){ - return nccell_load_egc32(n, c, egc); -} - // This function will be removed in ABI3 in favor of ncplane_create(). // It persists in ABI2 only for backwards compatibility. API ALLOC struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name) __attribute__ ((deprecated)); -__attribute__ ((deprecated)) static inline uint32_t -cell_fg_rgb(const nccell* cl){ - return nccell_fg_rgb(cl); -} - -__attribute__ ((deprecated)) static inline uint32_t -cell_bg_rgb(const nccell* cl){ - return nccell_bg_rgb(cl); -} - -__attribute__ ((deprecated)) static inline uint32_t -cell_fg_alpha(const nccell* cl){ - return nccell_fg_alpha(cl); -} - -__attribute__ ((deprecated)) static inline uint32_t -cell_bg_alpha(const nccell* cl){ - return nccell_bg_alpha(cl); -} - -__attribute__ ((deprecated)) static inline uint32_t -cell_fg_rgb8(const nccell* cl, unsigned* r, unsigned* g, unsigned* b){ - return nccell_fg_rgb8(cl, r, g, b); -} - -// Extract 24 bits of background RGB from 'cl', split into components. -__attribute__ ((deprecated)) static inline uint32_t -cell_bg_rgb8(const nccell* cl, unsigned* r, unsigned* g, unsigned* b){ - return nccell_bg_rgb8(cl, r, g, b); -} - -__attribute__ ((deprecated)) static inline int -cell_set_fg_rgb8(nccell* cl, int r, int g, int b){ - return nccell_set_fg_rgb8(cl, r, g, b); -} - -__attribute__ ((deprecated)) static inline void -cell_set_fg_rgb8_clipped(nccell* cl, int r, int g, int b){ - nccell_set_fg_rgb8_clipped(cl, r, g, b); -} - -__attribute__ ((deprecated)) static inline int -cell_set_fg_rgb(nccell* c, uint32_t channel){ - return nccell_set_fg_rgb(c, channel); -} - -__attribute__ ((deprecated)) static inline int -cell_set_fg_palindex(nccell* cl, int idx){ - return nccell_set_fg_palindex(cl, idx); -} - -__attribute__ ((deprecated)) static inline uint32_t -cell_fg_palindex(const nccell* cl){ - return nccell_fg_palindex(cl); -} - -__attribute__ ((deprecated)) static inline int -cell_set_bg_rgb8(nccell* cl, int r, int g, int b){ - return nccell_set_bg_rgb8(cl, r, g, b); -} - -__attribute__ ((deprecated)) static inline void -cell_set_bg_rgb8_clipped(nccell* cl, int r, int g, int b){ - nccell_set_bg_rgb8_clipped(cl, r, g, b); -} - -__attribute__ ((deprecated)) static inline int -cell_set_bg_rgb(nccell* c, uint32_t channel){ - return nccell_set_bg_rgb(c, channel); -} - -__attribute__ ((deprecated)) static inline int -cell_set_bg_palindex(nccell* cl, int idx){ - return nccell_set_bg_palindex(cl, idx); -} - -__attribute__ ((deprecated)) static inline uint32_t -cell_bg_palindex(const nccell* cl){ - return nccell_bg_palindex(cl); -} - -__attribute__ ((deprecated)) static inline bool -cell_fg_default_p(const nccell* cl){ - return nccell_fg_default_p(cl); -} - -__attribute__ ((deprecated)) static inline bool -cell_fg_palindex_p(const nccell* cl){ - return nccell_fg_palindex_p(cl); -} - -__attribute__ ((deprecated)) static inline bool -cell_bg_default_p(const nccell* cl){ - return nccell_bg_default_p(cl); -} - -__attribute__ ((deprecated)) static inline bool -cell_bg_palindex_p(const nccell* cl){ - return nccell_bg_palindex_p(cl); -} - API void ncplane_styles_set(struct ncplane* n, unsigned stylebits) __attribute__ ((deprecated)); API void ncplane_styles_on(struct ncplane* n, unsigned stylebits) @@ -4437,8 +4231,6 @@ API int notcurses_render_to_buffer(struct notcurses* nc, char** buf, size_t* buf API int notcurses_render_to_file(struct notcurses* nc, FILE* fp) __attribute__ ((deprecated)); -typedef nccell cell; // FIXME backwards-compat, remove in ABI3 - API void notcurses_debug_caps(const struct notcurses* nc, FILE* debugfp) __attribute__ ((deprecated)) __attribute__ ((nonnull (1, 2))); diff --git a/src/demo/fission.c b/src/demo/fission.c index 836f136f3..db72ed0b9 100644 --- a/src/demo/fission.c +++ b/src/demo/fission.c @@ -155,7 +155,7 @@ int fission_demo(struct notcurses* nc){ ncplane_resize_simple(n, newy, newx); continue; } - cell c = CELL_TRIVIAL_INITIALIZER; + nccell c = CELL_TRIVIAL_INITIALIZER; uint16_t smask; uint64_t channels; char* egc = ncplane_at_yx(stdn, usey, usex, &smask, &channels); diff --git a/src/lib/blit.c b/src/lib/blit.c index 1e32b0060..208189f55 100644 --- a/src/lib/blit.c +++ b/src/lib/blit.c @@ -613,7 +613,7 @@ sex_solver(const uint32_t rgbas[6], uint64_t* channels, unsigned blendcolors, } static const char* -sex_trans_check(cell* c, const uint32_t rgbas[6], unsigned blendcolors, +sex_trans_check(nccell* c, const uint32_t rgbas[6], unsigned blendcolors, uint32_t transcolor, unsigned nointerpolate){ // bit is *set* where sextant *is not* // 32: bottom right 16: bottom left diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index ef910e390..142cdd7c7 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -196,7 +196,7 @@ char* ncplane_at_cursor(ncplane* n, uint16_t* stylemask, uint64_t* channels){ char* ncplane_at_yx(const ncplane* n, int y, int x, uint16_t* stylemask, uint64_t* channels){ if(y < n->leny && x < n->lenx){ if(y >= 0 && x >= 0){ - const cell* yx = &n->fb[nfbcellidx(n, y, x)]; + const nccell* yx = &n->fb[nfbcellidx(n, y, x)]; // if we're the right side of a wide glyph, we return the main glyph if(nccell_wide_right_p(yx)){ return ncplane_at_yx(n, y, x - 1, stylemask, channels);