]> icculus.org git repositories - dana/openbox.git/blob - otk/pseudorendercontrol.hh
start of pseudo init
[dana/openbox.git] / otk / pseudorendercontrol.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __pseudorendercontrol_hh
3 #define __pseudorendercontrol_hh
4
5 #include "rendercontrol.hh"
6
7 namespace otk {
8
9 class PseudoRenderControl : public RenderControl {
10 private:
11   // color tables, meaning, 256 (possibly) different shades of each color,
12   // based on the number of bits there are available for each color in the
13   // visual
14   unsigned char _red_color_table[256];
15   unsigned char _green_color_table[256];
16   unsigned char _blue_color_table[256];
17
18   int _cpc; // colors-per-channel: must be a value between [2,6]
19   int _bpp; // bits-per-pixel
20   int _ncolors; // number of allocated colors, size of the XColor array
21
22   XColor *_colors;
23   
24   virtual void reduceDepth(Surface &sf, XImage *im) const;
25   
26 public:
27   PseudoRenderControl(int screen);
28   virtual ~PseudoRenderControl();
29
30 };
31
32 }
33
34 #endif // __pseudorendercontrol_hh