allow access to gfbdc from python to set resolution
[enigma2.git] / lib / gdi / gfbdc.h
index f975fb5fdfd4f5f3dc0675925bcf1d16502e0999..aad50f2b5d341d0e34d4490d8ccd1c6b30d3e0ed 100644 (file)
@@ -5,8 +5,13 @@
 #include "gpixmap.h"
 #include "grc.h"
 
-class gFBDC: public gPixmapDC
+class gFBDC;
+
+SWIG_TEMPLATE_TYPEDEF(ePtr<gFBDC>, gFBDCPtr);
+
+class gFBDC: public gDC
 {
+#ifndef SWIG
        fbClass *fb;
        static gFBDC *instance;
        void exec(gOpcode *opcode);
@@ -14,22 +19,30 @@ class gFBDC: public gPixmapDC
        int brightness, gamma, alpha;
        void calcRamp();
        void setPalette();
+       gSurface surface, surface_back;
+       int m_enable_double_buffering;
+       int m_xres, m_yres;
+#endif
 public:
        void reloadSettings();
        void setAlpha(int alpha);
        void setBrightness(int brightness);
        void setGamma(int gamma);
-       
+
        int getAlpha() { return alpha; }
        int getBrightness() { return brightness; }
        int getGamma() { return gamma; }
-       
+
+       int haveDoubleBuffering() { return m_enable_double_buffering; }
+
+       void setResolution(int xres, int yres);
+
        void saveSettings();
-       
+
        gFBDC();
-       ~gFBDC();
-       static gFBDC *getInstance();
+       virtual ~gFBDC();
+       static SWIG_VOID(int) getInstance(ePtr<gFBDC> &SWIG_NAMED_OUTPUT(ptr)) { if (!instance) return -1; ptr = instance; return 0; }
+       int islocked() { return fb->islocked(); }
 };
 
-
 #endif