uiacceltk/hitchcock/coretoolkit/src/HuiThemeManager.cpp
changeset 0 15bf7259bb7c
child 60 5dafecb0892a
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:   Implementation of CHuiThemeManager class, the class
       
    15 *                which is an interface to the ThemeManager component
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include "uiacceltk/HuiThemeManager.h"
       
    21 
       
    22 #include <utf.h>
       
    23 #include "uiacceltk/HuiUtil.h"
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // Constructor
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 CHuiThemeManager::CHuiThemeManager()
       
    30     {
       
    31     }
       
    32 
       
    33 // ---------------------------------------------------------------------------
       
    34 // Destructor
       
    35 // ---------------------------------------------------------------------------
       
    36 //
       
    37 CHuiThemeManager::~CHuiThemeManager()
       
    38     {
       
    39 
       
    40     }
       
    41 
       
    42 
       
    43 // ---------------------------------------------------------------------------
       
    44 // Constructor
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 CHuiThemeManager* CHuiThemeManager::NewL()
       
    48     {
       
    49     CHuiThemeManager* self = CHuiThemeManager::NewLC();
       
    50     CleanupStack::Pop();
       
    51     return self;        
       
    52     }
       
    53     
       
    54     
       
    55 // ---------------------------------------------------------------------------
       
    56 // Constructor
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 CHuiThemeManager* CHuiThemeManager::NewLC()
       
    60     {
       
    61     CHuiThemeManager* self = new (ELeave) CHuiThemeManager();
       
    62     self->ConstructL();
       
    63     CleanupStack::PushL(self);
       
    64     return self;        
       
    65     }
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // Two phase constructor
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 void CHuiThemeManager::ConstructL()
       
    72 	{
       
    73 	iThemeManager = NULL;
       
    74 	}
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // Get Item ID from ThemeManager
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 EXPORT_C void CHuiThemeManager::GetItemID(const TDesC& aColorTable, TAknsItemID& aItemID)
       
    81     {
       
    82     HUI_DEBUG(_L("CHuiThemeManager::GetItemID DO NOT USE THIS FUNCTION"));
       
    83     TRAPD( err, GetItemIdL( aColorTable, aItemID ) );
       
    84     if ( err != KErrNone )
       
    85         {
       
    86         HUI_DEBUG1(_L("CHuiThemeManager::GetItemID error ignored %d" ), err);
       
    87         }
       
    88     }
       
    89 
       
    90 // ---------------------------------------------------------------------------
       
    91 // DEPRECATED
       
    92 // ---------------------------------------------------------------------------
       
    93 //
       
    94 EXPORT_C void CHuiThemeManager::GetItemIdL(const TDesC& /*aColorTable*/, TAknsItemID& /*aItemID*/)
       
    95 	{
       
    96 	// Create ThemeManager instance
       
    97 	HUI_DEBUG(_L("CHuiThemeManager::GetItemIDL FUNCTIONALITY REMOVED. REFER TO ANTRIKSH PROJECT"));
       
    98 	}
       
    99 
       
   100 
       
   101 // ---------------------------------------------------------------------------
       
   102 // Get Skin Image parameters
       
   103 // ---------------------------------------------------------------------------
       
   104 //
       
   105 EXPORT_C THuiThemeImageparams CHuiThemeManager::GetSkinImageParams(const TDesC& aSkinLogicalName)
       
   106     {
       
   107     THuiThemeImageparams result;
       
   108     
       
   109     HUI_DEBUG(_L("CHuiThemeManager::GetSkinImageParams DO NOT USE THIS FUNCTION"));
       
   110     TRAPD( err, result = GetSkinImageParamsL( aSkinLogicalName ) );
       
   111     if ( err != KErrNone )
       
   112         {
       
   113         HUI_DEBUG1(_L("CHuiThemeManager::GetSkinImageParams error ignored %d" ), err);
       
   114         }
       
   115     return result;
       
   116     }
       
   117     
       
   118     
       
   119     
       
   120 // ---------------------------------------------------------------------------
       
   121 // Get Skin Image parameters
       
   122 // ---------------------------------------------------------------------------
       
   123 //    
       
   124 EXPORT_C THuiThemeImageparams CHuiThemeManager::GetSkinImageParamsL(const TDesC& aSkinLogicalName)
       
   125 	{
       
   126 	
       
   127 	THuiThemeImageparams themeImageParams;
       
   128 	themeImageParams.iSkinLogicalName= aSkinLogicalName;
       
   129 
       
   130 	return themeImageParams;	
       
   131 	}
       
   132