all repos — openbox @ 515f8d8760f614b127b4435dca7881a32b5b6207

openbox fork - make it a bit more like ryudo

otk/pseudorendercontrol.hh (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifndef __pseudorendercontrol_hh
#define __pseudorendercontrol_hh

#include "rendercontrol.hh"

namespace otk {

class PseudoRenderControl : public RenderControl {
private:
  int _bpc;        // number of bits per color
  int _ncolors;    // number of allocated colors, size of the XColor array
  XColor *_colors; // the valid allocated colors
  
  virtual void reduceDepth(Surface &sf, XImage *im) const;

  const XColor *pickColor(int r, int g, int b) const;
  
public:
  PseudoRenderControl(int screen);
  virtual ~PseudoRenderControl();

  virtual void allocateColor(XColor *color) const;
};

}

#endif // __pseudorendercontrol_hh