photosgallery/viewframework/commandhandlers/tsrc/ut_commandhandlerdrm/src/t_glxdummyhuiutility.cpp
changeset 0 4e91876724a2
child 18 bcb43dc84c44
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     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 "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:    HUITK utilities
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <Alf/AlfControlGroup.h>
       
    24 //#include <Alf/AlfDisplayCoeControl.h>
       
    25 #include <Alf/AlfDisplay.h>
       
    26 #include <Alf/AlfUtil.h>
       
    27 //#include <Alf/AlfSkin.h>
       
    28 #include <Alf/AlfEnv.h>
       
    29 #include <Alf/AlfTexture.h>
       
    30 #include <Alf/AlfTextureManager.h>
       
    31 #include <Alf/AlfTextStyleManager.h>
       
    32 #include "glxtexturemanager.h"
       
    33 #include <glxsingletonstore.h>
       
    34 
       
    35 #include "glxpanic.h"
       
    36 #include "glxuiutility.h"
       
    37 #include "glxuiutilitycoecontrol.h"
       
    38 #include "glxscreenfurniture.h"
       
    39 
       
    40 #include <aknutils.h>
       
    41 #include <digia/eunit/eunitmacros.h>
       
    42 #include <digia/eunit/eunitdecorators.h>
       
    43 	
       
    44 // -----------------------------------------------------------------------------
       
    45 // UtilityL
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 EXPORT_C CGlxUiUtility* CGlxUiUtility::UtilityL()
       
    49 	{
       
    50 	return CGlxSingletonStore::InstanceL(&NewL);
       
    51 	}
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // Close
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 EXPORT_C void CGlxUiUtility::Close()
       
    58 	{
       
    59     CGlxSingletonStore::Close(this);
       
    60     //delete this;
       
    61 	}
       
    62 
       
    63 // -----------------------------------------------------------------------------
       
    64 // 2-phase constructor
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 CGlxUiUtility* CGlxUiUtility::NewL() 
       
    68     {
       
    69     EUNIT_PRINT(_L("CGlxUiUtility::NewL"));
       
    70 	CGlxUiUtility* obj = new (ELeave) CGlxUiUtility();
       
    71 	CleanupStack::PushL(obj);
       
    72 	obj->ConstructL();
       
    73 	CleanupStack::Pop(obj);
       
    74     return obj;
       
    75     }
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // Constructor
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 CGlxUiUtility::CGlxUiUtility()
       
    82 :   iNavigationDirection(EGlxNavigationForwards)
       
    83 	{
       
    84 	}
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // ConstructL
       
    88 // -----------------------------------------------------------------------------
       
    89 //
       
    90 void CGlxUiUtility::ConstructL()
       
    91 	{
       
    92 	EUNIT_PRINT(_L("Entering CGlxUiUtility::ConstructL"));
       
    93     iEnv = CAlfEnv::NewL();
       
    94     EUNIT_PRINT(_L("CGlxUiUtility::iEnv Created"));
       
    95     iGlxTextureManager = CGlxTextureManager::NewL(iEnv->TextureManager());
       
    96 	}
       
    97 
       
    98 // -----------------------------------------------------------------------------
       
    99 // Destructor
       
   100 // -----------------------------------------------------------------------------
       
   101 //
       
   102 CGlxUiUtility::~CGlxUiUtility()
       
   103 	{
       
   104 	delete iGlxTextureManager;
       
   105   
       
   106   	delete iEnv;
       
   107    	iEnv = NULL;
       
   108 	}
       
   109 
       
   110 // -----------------------------------------------------------------------------
       
   111 // Env
       
   112 // -----------------------------------------------------------------------------
       
   113 //
       
   114 EXPORT_C CAlfEnv* CGlxUiUtility::Env() const
       
   115 	{
       
   116 	return iEnv;
       
   117 	}
       
   118 
       
   119 // -----------------------------------------------------------------------------
       
   120 // Display
       
   121 // -----------------------------------------------------------------------------
       
   122 //
       
   123 EXPORT_C CAlfDisplay* CGlxUiUtility::Display() const
       
   124 	{
       
   125 	return NULL;
       
   126 	}
       
   127 
       
   128 // -----------------------------------------------------------------------------
       
   129 // ShowHuiDisplay
       
   130 // -----------------------------------------------------------------------------
       
   131 EXPORT_C void CGlxUiUtility::ShowAlfDisplayL()
       
   132 	{
       
   133 	}
       
   134 
       
   135 // -----------------------------------------------------------------------------
       
   136 // HideHuiDisplay
       
   137 // -----------------------------------------------------------------------------
       
   138 EXPORT_C void CGlxUiUtility::HideAlfDisplayL()
       
   139 	{
       
   140 	}
       
   141 
       
   142 // -----------------------------------------------------------------------------
       
   143 // ScreenFurniture
       
   144 // -----------------------------------------------------------------------------
       
   145 //
       
   146 EXPORT_C CGlxScreenFurniture* CGlxUiUtility::ScreenFurniture()
       
   147 	{
       
   148     return NULL;
       
   149 	}
       
   150 
       
   151 	
       
   152 // -----------------------------------------------------------------------------
       
   153 // GlxTextureManager
       
   154 // -----------------------------------------------------------------------------
       
   155 //
       
   156 EXPORT_C CGlxTextureManager& CGlxUiUtility::GlxTextureManager()
       
   157 	{
       
   158 	__ASSERT_ALWAYS(iGlxTextureManager, Panic(EGlxPanicLogicError));
       
   159     return *iGlxTextureManager;
       
   160 	}
       
   161 	
       
   162 
       
   163 // -----------------------------------------------------------------------------
       
   164 // ViewNavigationDirection
       
   165 // -----------------------------------------------------------------------------
       
   166 //
       
   167 EXPORT_C TGlxNavigationDirection CGlxUiUtility::ViewNavigationDirection()
       
   168     {
       
   169     return iNavigationDirection;
       
   170     }
       
   171     
       
   172 
       
   173 // -----------------------------------------------------------------------------
       
   174 // SetViewNavigationDirection
       
   175 // -----------------------------------------------------------------------------
       
   176 //
       
   177 EXPORT_C void CGlxUiUtility::SetViewNavigationDirection(TGlxNavigationDirection /*aDirection*/)
       
   178     {
       
   179     }
       
   180 
       
   181 
       
   182 
       
   183 // -----------------------------------------------------------------------------
       
   184 // DisplaySize
       
   185 // -----------------------------------------------------------------------------
       
   186 //
       
   187 EXPORT_C TSize CGlxUiUtility::DisplaySize() const
       
   188     {
       
   189     return TSize();
       
   190     }
       
   191 
       
   192 
       
   193 // -----------------------------------------------------------------------------
       
   194 // TextStyleIdL
       
   195 // -----------------------------------------------------------------------------
       
   196 //
       
   197 EXPORT_C TInt CGlxUiUtility::TextStyleIdL(TInt /*aFontId*/, TInt /*aSizeInPixels*/)
       
   198     {
       
   199     TInt id = 0;
       
   200     return id;
       
   201     }
       
   202     
       
   203 EXPORT_C void CGlxUiUtility::HandleTvStatusChangedL( TTvChangeType /*aChangeType*/ )    
       
   204     {
       
   205     
       
   206     }
       
   207     
       
   208 EXPORT_C void CGlxUiUtility:: HandleActionL (const TAlfActionCommand &aActionCommand)
       
   209     {
       
   210     
       
   211     }
       
   212 
       
   213    
       
   214 // -----------------------------------------------------------------------------
       
   215 // Destructor
       
   216 // -----------------------------------------------------------------------------
       
   217 //  
       
   218 CGlxTextureManager::~CGlxTextureManager()
       
   219     {
       
   220     }
       
   221 
       
   222 // -----------------------------------------------------------------------------
       
   223 // NewL
       
   224 // -----------------------------------------------------------------------------
       
   225 //
       
   226 EXPORT_C CGlxTextureManager* CGlxTextureManager::NewL(
       
   227                                         CAlfTextureManager& aAlfTextureManager)
       
   228     {
       
   229     CGlxTextureManager* self =  new (ELeave) CGlxTextureManager();
       
   230     CleanupStack::Pop(self);
       
   231     return self;
       
   232     }
       
   233     
       
   234 // -----------------------------------------------------------------------------
       
   235 // CreateAvkonIconTextureL
       
   236 // -----------------------------------------------------------------------------
       
   237 //
       
   238 EXPORT_C CAlfTexture& CGlxTextureManager::CreateAvkonIconTextureL(
       
   239                                                         const TAknsItemID &/*aID*/, 
       
   240                                                         TInt /*aBitmapId*/,
       
   241                                                         TSize /*aRequestedSize*/)
       
   242     {
       
   243 
       
   244     CAlfTexture* texture = NULL;
       
   245     return *texture;
       
   246     }
       
   247 
       
   248 // -----------------------------------------------------------------------------
       
   249 // CreateIconTextureL
       
   250 // -----------------------------------------------------------------------------
       
   251 //
       
   252 EXPORT_C CAlfTexture& CGlxTextureManager::CreateIconTextureL(
       
   253                                                    TInt /*aIconResourceId*/, 
       
   254                                                    TDesC& /*aFilename*/,
       
   255                                                    TSize /*aRequestedSize*/)
       
   256     {
       
   257    
       
   258     CAlfTexture* texture = NULL; //CAlfTexture::NewL(iEnv,0);       
       
   259     return *texture;
       
   260     }
       
   261 
       
   262 // -----------------------------------------------------------------------------
       
   263 // CreateThumbnailTextureL
       
   264 // -----------------------------------------------------------------------------
       
   265 //
       
   266 EXPORT_C CAlfTexture& CreateThumbnailTextureL(
       
   267                 TGlxMediaId aMediaId, TGlxIdSpaceId aIdSpaceId,
       
   268                 const TSize& aRequiredSize, MGlxTextureObserver* aObserver,
       
   269                 TInt& aTextureId )
       
   270                 
       
   271     {
       
   272     // Create empty texture (not owned)
       
   273     CAlfTexture* texture = NULL; //CAlfTexture::NewL();
       
   274     return *texture;
       
   275     }
       
   276 
       
   277 // -----------------------------------------------------------------------------
       
   278 // CreateZoomedTextureL
       
   279 // -----------------------------------------------------------------------------
       
   280 //  
       
   281 
       
   282 EXPORT_C CAlfTexture& CreateZoomedTextureL(const TGlxMedia& aMedia,
       
   283                                             const TMPXAttribute& aAttribute,
       
   284                                             TGlxIdSpaceId aIdSpaceId,
       
   285                                             TInt& aTextureId )
       
   286     {
       
   287     // Create empty texture
       
   288     CAlfTexture* texture = NULL; //CAlfTexture::NewL();
       
   289     return *texture;
       
   290     }
       
   291 
       
   292 
       
   293 // -----------------------------------------------------------------------------
       
   294 // RemoveTexture
       
   295 // -----------------------------------------------------------------------------
       
   296 //
       
   297 EXPORT_C void CGlxTextureManager::RemoveTexture(
       
   298                                    const CAlfTexture& aTexture)
       
   299     {
       
   300     }
       
   301 
       
   302 EXPORT_C void CGlxTextureManager:: HandleSkinChanged()
       
   303     {
       
   304     
       
   305     }