1#ifndef __NCPP_PALETTE_HH
2#define __NCPP_PALETTE_HH
18 if (palette ==
nullptr)
19 throw init_error (
"Notcurses failed to create a new palette");
39 return error_guard (ncpalette_set_rgb8 (palette,
idx,
r, g, b), -1);
44 return error_guard (ncpalette_set (palette,
idx, rgb), -1);
47 bool get (
int idx,
unsigned *
r,
unsigned *g,
unsigned *b)
const
56 return get (
idx, *
r, *g, *b);
61 return error_guard (ncpalette_get_rgb8 (palette,
idx, &
r, &g, &b), -1);
bool set(int idx, int r, int g, int b) const NOEXCEPT_MAYBE
Palette(NotCurses *ncinst=nullptr)
bool get(int idx, unsigned *r, unsigned *g, unsigned *b) const
bool get(int idx, unsigned &r, unsigned &g, unsigned &b) const NOEXCEPT_MAYBE
bool set(int idx, unsigned rgb) const NOEXCEPT_MAYBE
void ncpalette_free(ncpalette *p)
ncpalette * ncpalette_new(notcurses *nc)