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