|
1 // Copyright (c) 1994-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Screen Mode Size Data |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef SIZEMODE_H |
|
19 #define SIZEMODE_H |
|
20 |
|
21 /** Screen Mode Size Data |
|
22 |
|
23 @publishedAll |
|
24 @released |
|
25 */ |
|
26 class TSizeMode |
|
27 { |
|
28 public: |
|
29 inline TSizeMode(){} |
|
30 inline TSizeMode(TSize& aSize); |
|
31 static inline TInt ScaledCord(TInt aOrigin,TInt aScale); |
|
32 inline TPoint ScaledOrigin() const; |
|
33 public: |
|
34 CFbsBitGc::TGraphicsOrientation iRotation; |
|
35 TPoint iOrigin; |
|
36 TSize iScreenSize; |
|
37 TSize iScreenTwipsSize; |
|
38 TUint iAlternativeRotations; |
|
39 TRect iPointerCursorArea; |
|
40 TSize iScreenScale; |
|
41 TDisplayMode iDefaultDisplayMode; |
|
42 }; |
|
43 |
|
44 inline TSizeMode::TSizeMode(TSize& aSize) : |
|
45 iOrigin(0, 0), iScreenSize(aSize) |
|
46 {} |
|
47 |
|
48 inline TInt TSizeMode::ScaledCord(TInt aOrigin,TInt aScale) |
|
49 {return (aOrigin+aScale-1)/aScale;} |
|
50 |
|
51 inline TPoint TSizeMode::ScaledOrigin() const |
|
52 {return TPoint(ScaledCord(iOrigin.iX,iScreenScale.iWidth),ScaledCord(iOrigin.iY,iScreenScale.iHeight));} |
|
53 |
|
54 #endif // SIZEMODE_H |