]> Dogcows Code - chaz/openbox/blob - otk/rendercontrol.hh
start of new render code
[chaz/openbox] / otk / rendercontrol.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __rendercontrol_hh
3 #define __rendercontrol_hh
4
5 extern "C" {
6 #include <X11/Xlib.h>
7 }
8
9 namespace otk {
10
11 class ScreenInfo;
12
13 class RenderControl {
14 protected:
15 const ScreenInfo *_screen;
16 /*
17 Bool _dither;
18
19 int _cpc; // colors-per-channel: must be a value between [2,6]
20 int _bpp; // bits-per-pixel
21
22 unsigned int *_grad_xbuffer;
23 unsigned int *_grad_ybuffer;
24 unsigned int _grad_buffer_width;
25 unsigned int _grad_buffer_height;
26
27 unsigned long *_sqrt_table;
28
29 // These values are all determined based on a visual
30
31 int _red_bits; // the number of bits (1-255) that each shade of color
32 int _green_bits; // spans across. best case is 1, which gives 255 shades.
33 int _blue_bits;
34 unsigned char _red_color_table[256];
35 unsigned char _green_color_table[256];
36 unsigned char _blue_color_table[256];
37
38 // These are only used for TrueColor visuals
39 int _red_offset; // the offset of each color in a color mask
40 int _green_offset;
41 int _blue_offset;
42
43 // These are only used for !TrueColor visuals
44 XColor *_colors;
45 int _ncolors;
46 */
47
48 RenderControl(const ScreenInfo *screen);
49
50 public:
51 virtual ~RenderControl();
52
53 static RenderControl *getRenderControl(int screen);
54
55 virtual void render(::Drawable d) = 0;
56 };
57
58 }
59
60 #endif // __rendercontrol_hh
This page took 0.04025 seconds and 5 git commands to generate.