mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-07 06:22:47 -05:00
Bring some order to colour palette indexing.
There are three separate indexing schemes in use by various bits of the PuTTY front ends, and _none_ of them was clearly documented, let alone all in the same place. Worse, functions that looked obviously related, like win_palette_set and win_palette_get, used different encodings. Now all the encodings are defined together in putty.h, with explanation of why there are three in the first place and clear documentation of where each one is used; terminal.c provides mapping tables that convert between them; the terminology is consistent throughout; and win_palette_set has been converted to use the sensible encoding.
This commit is contained in:
@ -91,9 +91,9 @@ static void fuzz_set_minimised(TermWin *tw, bool minimised) {}
|
||||
static void fuzz_set_maximised(TermWin *tw, bool maximised) {}
|
||||
static void fuzz_move(TermWin *tw, int x, int y) {}
|
||||
static void fuzz_set_zorder(TermWin *tw, bool top) {}
|
||||
static bool fuzz_palette_get(TermWin *tw, int n, int *r, int *g, int *b)
|
||||
static bool fuzz_palette_get(TermWin *tw, unsigned n, int *r, int *g, int *b)
|
||||
{ return false; }
|
||||
static void fuzz_palette_set(TermWin *tw, int n, int r, int g, int b) {}
|
||||
static void fuzz_palette_set(TermWin *tw, unsigned n, int r, int g, int b) {}
|
||||
static void fuzz_palette_reset(TermWin *tw) {}
|
||||
static void fuzz_get_pos(TermWin *tw, int *x, int *y) { *x = *y = 0; }
|
||||
static void fuzz_get_pixels(TermWin *tw, int *x, int *y) { *x = *y = 0; }
|
||||
|
Reference in New Issue
Block a user