- hopefully fixed some python/refcount stuff (__deref__ is still evil!)
[enigma2.git] / lib / gdi / grc.h
index a02068aea2c6cb0f631f14ee9b0c3fc72be69180..f6829902b9f66f17fa71087f1aa06117dc2958d1 100644 (file)
@@ -29,7 +29,7 @@ struct gOpcode
                renderPara,
                setFont,
                
-               fill, clear,
+               fill, fillRegion, clear,
                blit,
 
                setPalette,
@@ -55,6 +55,11 @@ struct gOpcode
                        eRect area;
                } *fill;
 
+               struct pfillRegion
+               {
+                       gRegion region;
+               } *fillRegion;
+
                struct prenderText
                {
                        eRect area;
@@ -119,7 +124,7 @@ struct gOpcode
                /* gRC is the singleton which controls the fifo and dispatches commands */
 class gRC: public iObject
 {
-DECLARE_REF;
+DECLARE_REF(gRC);
 private:
        static gRC *instance;
        
@@ -169,10 +174,21 @@ public:
        void setForegroundColor(const gColor &color);
 
        void setFont(gFont *font);
+               /* flags only THESE: */
+       enum
+       {
+                       // todo, make mask. you cannot align both right AND center AND block ;)
+               RT_HALIGN_RIGHT = 1,
+               RT_HALIGN_CENTER = 2,
+               RT_HALIGN_BLOCK = 4,
+               RT_VALIGN_CENTER = 8
+       };
        void renderText(const eRect &position, const std::string &string, int flags=0);
+       
        void renderPara(eTextPara *para, ePoint offset=ePoint(0, 0));
 
        void fill(const eRect &area);
+       void fill(const gRegion &area);
        
        void clear();
        
@@ -196,7 +212,7 @@ public:
 
 class gDC: public iObject
 {
-DECLARE_REF;
+DECLARE_REF(gDC);
 protected:
        ePtr<gPixmap> m_pixmap;