Home | History | Annotate | Download | only in qt
      1 /*
      2     Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
      3 
      4     This library is free software; you can redistribute it and/or
      5     modify it under the terms of the GNU Library General Public
      6     License as published by the Free Software Foundation; either
      7     version 2 of the License, or (at your option) any later version.
      8 
      9     This library is distributed in the hope that it will be useful,
     10     but WITHOUT ANY WARRANTY; without even the implied warranty of
     11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12     Library General Public License for more details.
     13 
     14     You should have received a copy of the GNU Library General Public License
     15     along with this library; see the file COPYING.LIB.  If not, write to
     16     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     17     Boston, MA 02110-1301, USA.
     18 */
     19 
     20 #ifndef GraphicsLayerQt_h
     21 #define GraphicsLayerQt_h
     22 
     23 #include "GraphicsLayer.h"
     24 #include "GraphicsLayerClient.h"
     25 
     26 namespace WebCore {
     27 
     28 class GraphicsLayerQtImpl;
     29 
     30 class GraphicsLayerQt : public GraphicsLayer {
     31     friend class GraphicsLayerQtImpl;
     32 
     33 public:
     34     GraphicsLayerQt(GraphicsLayerClient*);
     35     virtual ~GraphicsLayerQt();
     36 
     37     // reimps from GraphicsLayer.h
     38     virtual NativeLayer nativeLayer() const;
     39     virtual PlatformLayer* platformLayer() const;
     40     virtual void setNeedsDisplay();
     41     virtual void setNeedsDisplayInRect(const FloatRect&);
     42     virtual void setParent(GraphicsLayer* layer);
     43     virtual void setName(const String& name);
     44     virtual bool setChildren(const Vector<GraphicsLayer*>&);
     45     virtual void addChild(GraphicsLayer*);
     46     virtual void addChildAtIndex(GraphicsLayer*, int index);
     47     virtual void addChildAbove(GraphicsLayer* layer, GraphicsLayer* sibling);
     48     virtual void addChildBelow(GraphicsLayer* layer, GraphicsLayer* sibling);
     49     virtual bool replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild);
     50     virtual void removeFromParent();
     51     virtual void setMaskLayer(GraphicsLayer* layer);
     52     virtual void setPosition(const FloatPoint& p);
     53     virtual void setAnchorPoint(const FloatPoint3D& p);
     54     virtual void setSize(const FloatSize& size);
     55     virtual void setTransform(const TransformationMatrix& t);
     56     virtual void setChildrenTransform(const TransformationMatrix& t);
     57     virtual void setPreserves3D(bool b);
     58     virtual void setMasksToBounds(bool b);
     59     virtual void setDrawsContent(bool b);
     60     virtual void setBackgroundColor(const Color&);
     61     virtual void clearBackgroundColor();
     62     virtual void setContentsOpaque(bool b);
     63     virtual void setBackfaceVisibility(bool b);
     64     virtual void setOpacity(float opacity);
     65     virtual void setContentsRect(const IntRect& r);
     66     virtual bool addAnimation(const KeyframeValueList&, const IntSize& boxSize, const Animation*, const String& keyframesName, double timeOffset);
     67     virtual void removeAnimationsForProperty(AnimatedPropertyID);
     68     virtual void removeAnimationsForKeyframes(const String& keyframesName);
     69     virtual void pauseAnimation(const String& keyframesName, double timeOffset);
     70     virtual void suspendAnimations(double time);
     71     virtual void resumeAnimations();
     72     virtual void setContentsToImage(Image*);
     73     virtual void setContentsBackgroundColor(const Color&);
     74     virtual void setGeometryOrientation(CompositingCoordinatesOrientation orientation);
     75     virtual void setContentsOrientation(CompositingCoordinatesOrientation orientation);
     76     virtual void distributeOpacity(float);
     77     virtual float accumulatedOpacity() const;
     78     virtual void syncCompositingState();
     79 
     80 private:
     81     OwnPtr<GraphicsLayerQtImpl> m_impl;
     82 };
     83 
     84 }
     85 #endif // GraphicsLayerQt_h
     86