]> Dogcows Code - chaz/openbox/blob - otk/truerendercontrol.hh
Added bevels
[chaz/openbox] / otk / truerendercontrol.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __truerendercontrol_hh
3 #define __truerendercontrol_hh
4
5 #include "rendercontrol.hh"
6
7 extern "C" {
8
9 #ifdef HAVE_STDINT_H
10 # include <stdint.h>
11 #else
12 # ifdef HAVE_SYS_TYPES_H
13 # include <sys/types.h>
14 # endif
15 #endif
16
17 }
18
19 #include <vector>
20
21 namespace otk {
22
23 #ifdef HAVE_STDINT_H
24 typedef uint32_t pixel32;
25 #else
26 typedef u_int32_t pixel32;
27 #endif
28
29 class TrueRenderControl : public RenderControl {
30 private:
31 // the number of bits to shift a color value (from 0-255) to the right, to
32 // fit it into the the color mask (do this before the offset)
33 int _red_shift;
34 int _green_shift;
35 int _blue_shift;
36
37 // the offset of each color in a color mask
38 int _red_offset;
39 int _green_offset;
40 int _blue_offset;
41
42 public:
43 TrueRenderControl(int screen);
44 virtual ~TrueRenderControl();
45
46 virtual void drawBackground(Surface& sf, const RenderTexture &texture) const;
47 virtual void drawGradientBackground(Surface &sf,
48 const RenderTexture &texture) const;
49
50 inline void highlight(pixel32 *x, pixel32 *y, bool raised) const;
51 };
52
53 }
54
55 #endif // __truerendercontrol_hh
This page took 0.036983 seconds and 5 git commands to generate.