diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:04:01 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:04:01 +0300 |
| commit | dcebf9c7f954a55350b68d0ead1935612c4e2e05 (patch) | |
| tree | 3eb3e9f6154c6760bcb89a565f8ddc8f8b66cb90 /src/palette.h | |
| parent | bd8222e615134c3ec5e7a07b6b1fa97c9bd4a471 (diff) | |
Rename the library to wsap_vtcore
ncurses installs <term.h> and defines struct term. In a file that
includes both headers, an ncurses TERMINAL * and this library's terminal
are silently the same type. The name wsap_vtcore avoids the clash.
The public header is now <wsap_vtcore/wsap_vtcore.h>. Every global
symbol uses the wsap_vtcore_ prefix, every macro uses WSAP_VTCORE_, and
the shared library is libwsap_vtcore.so.0. The default terminal name is
now "wsap_vtcore". The ISA override variable is WSAP_VTCORE_ISA.
No other behavior changes. The amalgamation writes wsap_vtcore.c and
wsap_vtcore.h.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/palette.h')
| -rw-r--r-- | src/palette.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/palette.h b/src/palette.h index 083ad8d..b5ac284 100644 --- a/src/palette.h +++ b/src/palette.h @@ -1,10 +1,10 @@ -#ifndef TERM_PALETTE_H -#define TERM_PALETTE_H +#ifndef WSAP_VTCORE_PALETTE_H +#define WSAP_VTCORE_PALETTE_H #include <stdbool.h> #include <stdint.h> -#include "term.h" +#include "wsap_vtcore.h" /* * The colors of one terminal. base holds the colors that the theme gives; @@ -12,18 +12,18 @@ * 10, 11, or 12. version changes whenever colors changes. */ struct palette { - uint32_t colors[TERM_PALETTE_SIZE]; - uint32_t base[TERM_PALETTE_SIZE]; - struct term_theme theme; + uint32_t colors[WSAP_VTCORE_PALETTE_SIZE]; + uint32_t base[WSAP_VTCORE_PALETTE_SIZE]; + struct wsap_vtcore_theme theme; uint64_t version; }; /* Set every entry from theme. An all-zero theme selects the built-in theme. */ -void term_palette_init(struct palette *p, const struct term_theme *theme); -/* Change one entry (0-255, TERM_PALETTE_FG, _BG, or _CURSOR). */ -void term_palette_set(struct palette *p, int slot, uint32_t argb); +void wsap_vtcore_palette_init(struct palette *p, const struct wsap_vtcore_theme *theme); +/* Change one entry (0-255, WSAP_VTCORE_PALETTE_FG, _BG, or _CURSOR). */ +void wsap_vtcore_palette_set(struct palette *p, int slot, uint32_t argb); /* Restore one entry, or all entries, to the theme color. */ -void term_palette_reset(struct palette *p, int slot); -void term_palette_reset_all(struct palette *p); +void wsap_vtcore_palette_reset(struct palette *p, int slot); +void wsap_vtcore_palette_reset_all(struct palette *p); #endif |
