Add abstract class gMainDC as an interface for gFBDC and gSDLDC
[enigma2.git] / lib / gdi / gmaindc.h
1 #ifndef __lib_gdi_gmaindc_h
2 #define __lib_gdi_gmaindc_h
3
4 #include "grc.h"
5
6 class gMainDC;
7
8 SWIG_IGNORE(gMainDC);
9 class gMainDC: public gDC
10 {
11 protected:
12         static gMainDC *m_instance;
13
14         gMainDC();
15         gMainDC(gPixmap *pixmap);
16         virtual ~gMainDC();
17 public:
18         virtual void setResolution(int xres, int yres) = 0;
19 #ifndef SWIG
20         static int getInstance(ePtr<gMainDC> &ptr) { if (!m_instance) return -1; ptr = m_instance; return 0; }
21 #endif
22 };
23
24 SWIG_TEMPLATE_TYPEDEF(ePtr<gMainDC>, gMainDC);
25 SWIG_EXTEND(ePtr<gMainDC>,
26        static ePtr<gMainDC> getInstance()
27        {
28                extern ePtr<gMainDC> NewgMainDCPtr(void);
29                return NewgMainDCPtr();
30        }
31 );
32
33 #endif