|
1 /* |
|
2 * Copyright (c) 2008-2009 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 "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: Allows change the screen size |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 * @internal reviewed 24/08/2007 by D Holland |
|
22 */ |
|
23 |
|
24 // CLASS HEADER |
|
25 #include "glxresolutionmanager.h" |
|
26 |
|
27 // EXTERNAL INCLUDES |
|
28 |
|
29 // INTERNAL INCLUDES |
|
30 #include "glxresolutionutility.h" |
|
31 #include <glxlog.h> |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 // CGlxResolutionManager, inlined to save a few bytes of ROM |
|
35 // --------------------------------------------------------------------------- |
|
36 // |
|
37 inline CGlxResolutionManager::CGlxResolutionManager() |
|
38 { |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // CGlxResolutionManager::NewL |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 EXPORT_C CGlxResolutionManager* CGlxResolutionManager::NewL() |
|
46 { |
|
47 GLX_LOG_INFO("CGlxResolutionManager::NewL"); |
|
48 CGlxResolutionManager* self = new ( ELeave ) CGlxResolutionManager(); |
|
49 CleanupStack::PushL( self ); |
|
50 self->iResUtility = CGlxResolutionUtility::InstanceL(); |
|
51 CleanupStack::Pop( self ); |
|
52 return self; |
|
53 } |
|
54 |
|
55 // --------------------------------------------------------------------------- |
|
56 // CGlxResolutionManager |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 EXPORT_C CGlxResolutionManager::~CGlxResolutionManager() |
|
60 { |
|
61 GLX_LOG_INFO("CGlxResolutionManager::~CGlxResolutionManager"); |
|
62 if (iResUtility) |
|
63 { |
|
64 iResUtility->Close(); |
|
65 iResUtility = NULL; |
|
66 } |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // SetScreenSize |
|
71 // --------------------------------------------------------------------------- |
|
72 // |
|
73 EXPORT_C void CGlxResolutionManager::SetScreenSizeL( TSize aScreenSize ) |
|
74 { |
|
75 GLX_LOG_INFO2( |
|
76 "CGlxResolutionManager::SetScreenSize (%d,%d)", |
|
77 aScreenSize.iWidth, aScreenSize.iHeight ); |
|
78 iResUtility->SetScreenSizeL( aScreenSize ); |
|
79 } |
|
80 |
|
81 |