Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef SURFACECONFIGURATION_H
17 #define SURFACECONFIGURATION_H
20 #include <graphics/surface.h>
24 The base class for the surface configuration containing the size of the surface configuration.
25 Provides a Size function to help identify which attributes are available.
30 class TSurfaceConfigurationSize
33 inline TInt Size() const;
35 inline TSurfaceConfigurationSize(TInt aSize);
36 template <class Member> TBool MemberAccessible (const Member& aMember) const
38 return iSize>=sizeof(Member)+TInt(&aMember)-TInt(this);
40 inline TBool operator == (const TSurfaceConfigurationSize& aRhs)const;
42 inline TSurfaceConfigurationSize();
43 inline TSurfaceConfigurationSize(const TSurfaceConfigurationSize& /*aSurfaceConfigurationSize*/);
44 inline TSurfaceConfigurationSize operator = (const TSurfaceConfigurationSize& /*aRhs*/)const;
50 The first set of surface configuration attributes containing the surface id, viewport, extent
51 and orientation of the surface, along with a SupportsAllMembers function to help identify which
52 attributes are available.
57 class TSurfaceConfiguration1: public TSurfaceConfigurationSize
60 inline TSurfaceConfiguration1();
61 inline TInt SetSurfaceId (const TSurfaceId& aSurfaceId);
62 inline void GetSurfaceId (TSurfaceId& aSurfaceId) const;
63 inline TInt SetViewport (const TRect& aViewport);
64 inline void GetViewport (TRect& aViewport) const;
65 inline TInt SetOrientation (CFbsBitGc::TGraphicsOrientation aOrientation);
66 inline CFbsBitGc::TGraphicsOrientation Orientation() const;
67 inline TInt SetExtent(const TRect& aExtent);
68 inline void GetExtent(TRect& aExtent) const;
69 inline TBool SupportsAllMembers();
71 inline TSurfaceConfiguration1(TInt aSize);
72 inline TBool operator == (const TSurfaceConfiguration1& aRhs)const;
74 inline TSurfaceConfiguration1(const TSurfaceConfiguration1& /*aSurfaceConfiguration1*/);
75 inline TSurfaceConfiguration1 operator = (const TSurfaceConfiguration1& /*aRhs*/)const;
77 TSurfaceId iSurfaceId;
78 CFbsBitGc::TGraphicsOrientation iOrientation;
84 The second set of surface configuration attributes containing the flip attribute of the surface, along with a SupportsAllMembers function to help identify which
85 attributes are available.
90 class TSurfaceConfiguration2: public TSurfaceConfiguration1
93 inline TSurfaceConfiguration2();
94 inline TInt SetFlip(TBool aFlip);
95 inline TBool Flip()const;
96 inline TBool SupportsAllMembers();
98 inline TSurfaceConfiguration2(TInt aSize);
99 inline TBool operator == (const TSurfaceConfiguration2& aRhs)const;
101 inline TSurfaceConfiguration2(const TSurfaceConfiguration2& /*aSurfaceConfiguration2*/);
102 inline TSurfaceConfiguration2 operator = (const TSurfaceConfiguration2& /*aRhs*/)const;
103 //iFlip is a x-axis flip
108 TSurfaceConfiguration is provided as a chain of derived classes representing the growing
109 history of the class.
114 class TSurfaceConfiguration: public TSurfaceConfiguration2
116 typedef TSurfaceConfiguration2 TBiggestConfiguration;
118 inline TSurfaceConfiguration();
119 inline TSurfaceConfiguration(const TSurfaceConfiguration& aSurfaceConfiguration);
120 inline TSurfaceConfiguration(TInt aPreferredMaxSize);
121 inline TBool operator == (const TSurfaceConfiguration& aRhs)const
123 return TSurfaceConfiguration2::operator==(aRhs);
126 inline TSurfaceConfiguration operator = (const TSurfaceConfiguration& /*aRhs*/);
128 #include <graphics/surfaceconfiguration.inl>
129 #endif // SURFACECONFIGURATION_H