Extend AudioSelection width, fix mediaplayer subtitle selection key
[enigma2.git] / lib / gdi / gfbdc.h
1 #ifndef __gfbdc_h
2 #define __gfbdc_h
3
4 #include "fb.h"
5 #include "gpixmap.h"
6 #include "grc.h"
7
8 class gFBDC;
9
10 SWIG_IGNORE(gFBDC);
11 class gFBDC: public gDC
12 {
13 #ifndef SWIG
14         fbClass *fb;
15         static gFBDC *instance;
16         void exec(gOpcode *opcode);
17         unsigned char ramp[256], rampalpha[256]; // RGB ramp 0..255
18         int brightness, gamma, alpha;
19         void calcRamp();
20         void setPalette();
21         gSurface surface, surface_back;
22         int m_enable_double_buffering;
23         int m_xres, m_yres;
24 #else
25         gFBDC();
26         virtual ~gFBDC();
27 #endif
28 public:
29         void setResolution(int xres, int yres);
30 #ifndef SWIG
31         void reloadSettings();
32         void setAlpha(int alpha);
33         void setBrightness(int brightness);
34         void setGamma(int gamma);
35
36         int getAlpha() { return alpha; }
37         int getBrightness() { return brightness; }
38         int getGamma() { return gamma; }
39
40         int haveDoubleBuffering() { return m_enable_double_buffering; }
41
42         void saveSettings();
43
44         gFBDC();
45         virtual ~gFBDC();
46         static int getInstance(ePtr<gFBDC> &ptr) { if (!instance) return -1; ptr = instance; return 0; }
47         int islocked() { return fb->islocked(); }
48 #endif
49 };
50 SWIG_TEMPLATE_TYPEDEF(ePtr<gFBDC>, gFBDC);
51 SWIG_EXTEND(ePtr<gFBDC>,
52         static ePtr<gFBDC> getInstance()
53         {
54                 extern ePtr<gFBDC> NewgFBDCPtr(void);
55                 return NewgFBDCPtr();
56         }
57 );
58
59 #endif