|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <../bidi.h> |
|
20 #include "config.h" |
|
21 #include "Screen.h" |
|
22 |
|
23 #include "IntRect.h" |
|
24 #include "FloatRect.h" |
|
25 #include "Widget.h" |
|
26 #include <e32std.h> |
|
27 #include <e32base.h> |
|
28 #include <w32std.h> |
|
29 #include <coemain.h> |
|
30 |
|
31 namespace WebCore { |
|
32 |
|
33 FloatRect screenRect(Widget* page) |
|
34 { |
|
35 // Taken from KGlobalSettings::desktopGeometry |
|
36 TSize s( CCoeEnv::Static()->SystemGc().Device()->SizeInPixels() ); |
|
37 return FloatRect( 0, 0, s.iWidth, s.iHeight ); |
|
38 } |
|
39 |
|
40 int screenDepth(Widget* page) |
|
41 { |
|
42 TDisplayMode dm = CCoeEnv::Static()->SystemGc().Device()->DisplayMode(); |
|
43 switch( dm ) |
|
44 { |
|
45 case ENone: return 0; |
|
46 case EGray2: return 1; |
|
47 case EGray4: return 2; |
|
48 case EGray16: return 4; |
|
49 case EGray256: return 8; |
|
50 case EColor16: return 4; |
|
51 case EColor256: return 8; |
|
52 case EColor64K: return 16; |
|
53 case EColor16M: return 24; |
|
54 case EColor4K: return 12; |
|
55 default: return 16; |
|
56 } |
|
57 |
|
58 } |
|
59 |
|
60 |
|
61 FloatRect screenAvailableRect(Widget* page) |
|
62 { |
|
63 // FIXME |
|
64 return screenRect(page); |
|
65 } |
|
66 |
|
67 float scaleFactor(Widget* page) |
|
68 { |
|
69 return 1.0f; |
|
70 } |
|
71 |
|
72 bool screenIsMonochrome(Widget*) |
|
73 { |
|
74 return false; |
|
75 } |
|
76 |
|
77 int screenDepthPerComponent(Widget*) |
|
78 { |
|
79 return 8; |
|
80 } |
|
81 |
|
82 } |