1 #ifndef _library__framebuffer_pixfmt__hpp__included__
2 #define _library__framebuffer_pixfmt__hpp__included__
10 template<bool X
> class auxpalette
;
18 virtual ~pixfmt() throw();
20 * Register the pixel format.
22 pixfmt() throw(std::bad_alloc
);
24 * Decode pixel format data into RGB data (0, R, G, B).
26 virtual void decode(uint32_t* target
, const uint8_t* src
, size_t width
)
29 * Decode pixel format data into RGB (with specified byte order).
31 virtual void decode(uint32_t* target
, const uint8_t* src
, size_t width
,
32 const auxpalette
<false>& auxp
) throw() = 0;
34 * Decode pixel format data into RGB (with specified byte order).
36 virtual void decode(uint64_t* target
, const uint8_t* src
, size_t width
,
37 const auxpalette
<true>& auxp
) throw() = 0;
41 virtual void set_palette(auxpalette
<false>& auxp
, uint8_t rshift
, uint8_t gshift
,
42 uint8_t bshift
) throw(std::bad_alloc
) = 0;
46 virtual void set_palette(auxpalette
<true>& auxp
, uint8_t rshift
, uint8_t gshift
,
47 uint8_t bshift
) throw(std::bad_alloc
) = 0;
49 * Bytes per pixel in data.
51 virtual uint8_t get_bpp() throw() = 0;
53 * Bytes per pixel in ss data.
55 virtual uint8_t get_ss_bpp() throw() = 0;
57 * Screenshot magic (0 for the old format).
59 virtual uint32_t get_magic() throw() = 0;