uiaccelerator_plat/alf_core_toolkit_api/tsrc/src/testuialfcoretoolkithuigifanimationtexture.cpp
branchRCL_3
changeset 52 31fccae4f8a7
parent 22 7c5dd702d6d3
equal deleted inserted replaced
51:e5af45d51884 52:31fccae4f8a7
       
     1 /*
       
     2 * Copyright (c) 2002 - 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:  For test alf core toolkit api modules
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <uiacceltk/huigifanimationtexture.h>
       
    20 #include <alf/alfconstants.h>
       
    21 
       
    22 #include "testuiaifcoretoolkit.h"
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // Ctestplatalfcoretoolkit::TestHuiGifAnimationTextureNewLL
       
    26 // -----------------------------------------------------------------------------
       
    27 //
       
    28 TInt CTestUiAifCoreToolkit::TestHuiGifAnimationTextureNewLL( CStifItemParser& /*aItem*/ )
       
    29     {
       
    30 
       
    31     // Print to UI
       
    32     _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" );
       
    33     _LIT( KTestHuiGifAnimationTextureNewLL, "TestHuiGifAnimationTextureNewLL" );
       
    34     TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiGifAnimationTextureNewLL );
       
    35     // Print to log file
       
    36     iLog->Log( KTestHuiGifAnimationTextureNewLL );
       
    37 
       
    38 //    RMessage2 message;
       
    39     TAlfCreateTextureAnimatedParams params;
       
    40     TPckg<TAlfCreateTextureAnimatedParams> paramsPckg(params);
       
    41 //    message.Read(1,paramsPckg);
       
    42     CHuiGifAnimationTexture* animtext = CHuiGifAnimationTexture::NewL(params.iFilename,iHuiEnv->TextureManager(),params.iId, (THuiTextureUploadFlags)(params.iFlags));
       
    43     CleanupStack::PushL( animtext );
       
    44     STIF_ASSERT_NOT_NULL( animtext );
       
    45     CleanupStack::PopAndDestroy( animtext );
       
    46     
       
    47     return KErrNone;
       
    48 
       
    49     }
       
    50 // -----------------------------------------------------------------------------
       
    51 // Ctestplatalfcoretoolkit::TestHuiGifAnimationTextureIdL
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 TInt CTestUiAifCoreToolkit::TestHuiGifAnimationTextureIdL( CStifItemParser& /*aItem*/ )
       
    55     {
       
    56 
       
    57     // Print to UI
       
    58     _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" );
       
    59     _LIT( KTestHuiGifAnimationTextureIdL, "TestHuiGifAnimationTextureIdL" );
       
    60     TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiGifAnimationTextureIdL );
       
    61     // Print to log file
       
    62     iLog->Log( KTestHuiGifAnimationTextureIdL );
       
    63 
       
    64 //    RMessage2 message;
       
    65     TAlfCreateTextureAnimatedParams params;
       
    66     TPckg<TAlfCreateTextureAnimatedParams> paramsPckg(params);
       
    67 //    message.Read(1,paramsPckg);
       
    68     CHuiGifAnimationTexture* animtext = CHuiGifAnimationTexture::NewL(params.iFilename,iHuiEnv->TextureManager(),params.iId, (THuiTextureUploadFlags)(params.iFlags));
       
    69     CleanupStack::PushL( animtext );
       
    70     STIF_ASSERT_NOT_NULL( animtext );
       
    71     TInt id = animtext->Id();
       
    72     CleanupStack::PopAndDestroy( animtext );
       
    73     
       
    74     return KErrNone;
       
    75 
       
    76     }
       
    77 // -----------------------------------------------------------------------------
       
    78 // Ctestplatalfcoretoolkit::TestHuiGifAnimationTextureStartL
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 TInt CTestUiAifCoreToolkit::TestHuiGifAnimationTextureStartL( CStifItemParser& /*aItem*/ )
       
    82     {
       
    83 
       
    84     // Print to UI
       
    85     _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" );
       
    86     _LIT( KTestHuiGifAnimationTextureStartL, "TestHuiGifAnimationTextureStartL" );
       
    87     TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiGifAnimationTextureStartL );
       
    88     // Print to log file
       
    89     iLog->Log( KTestHuiGifAnimationTextureStartL );
       
    90 
       
    91 //    RMessage2 message;
       
    92     TAlfCreateTextureAnimatedParams params;
       
    93     TPckg<TAlfCreateTextureAnimatedParams> paramsPckg(params);
       
    94 //    message.Read(1,paramsPckg);
       
    95     CHuiGifAnimationTexture* animtext = CHuiGifAnimationTexture::NewL(params.iFilename,iHuiEnv->TextureManager(),params.iId, (THuiTextureUploadFlags)(params.iFlags));
       
    96     CleanupStack::PushL( animtext );
       
    97     STIF_ASSERT_NOT_NULL( animtext );
       
    98     animtext->Start();
       
    99     CleanupStack::PopAndDestroy( animtext );
       
   100     
       
   101     return KErrNone;
       
   102 
       
   103     }
       
   104 // -----------------------------------------------------------------------------
       
   105 // Ctestplatalfcoretoolkit::TestHuiGifAnimationTextureStopL
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 TInt CTestUiAifCoreToolkit::TestHuiGifAnimationTextureStopL( CStifItemParser& /*aItem*/ )
       
   109     {
       
   110 
       
   111     // Print to UI
       
   112     _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" );
       
   113     _LIT( KTestHuiGifAnimationTextureStopL, "TestHuiGifAnimationTextureStopL" );
       
   114     TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiGifAnimationTextureStopL );
       
   115     // Print to log file
       
   116     iLog->Log( KTestHuiGifAnimationTextureStopL );
       
   117 
       
   118 //    RMessage2 message;
       
   119     TAlfCreateTextureAnimatedParams params;
       
   120     TPckg<TAlfCreateTextureAnimatedParams> paramsPckg(params);
       
   121 //    message.Read(1,paramsPckg);
       
   122     CHuiGifAnimationTexture* animtext = CHuiGifAnimationTexture::NewL(params.iFilename,iHuiEnv->TextureManager(),params.iId, (THuiTextureUploadFlags)(params.iFlags));
       
   123     CleanupStack::PushL( animtext );
       
   124     STIF_ASSERT_NOT_NULL( animtext );
       
   125     animtext->Stop();
       
   126     CleanupStack::PopAndDestroy( animtext );
       
   127     
       
   128     return KErrNone;
       
   129 
       
   130     }
       
   131 // -----------------------------------------------------------------------------
       
   132 // Ctestplatalfcoretoolkit::TestHuiGifAnimationTextureEnableAnimationL
       
   133 // -----------------------------------------------------------------------------
       
   134 //
       
   135 TInt CTestUiAifCoreToolkit::TestHuiGifAnimationTextureEnableAnimationL( CStifItemParser& /*aItem*/ )
       
   136     {
       
   137 
       
   138     // Print to UI
       
   139     _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" );
       
   140     _LIT( KTestHuiGifAnimationTextureEnableAnimationL, "TestHuiGifAnimationTextureEnableAnimationL" );
       
   141     TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiGifAnimationTextureEnableAnimationL );
       
   142     // Print to log file
       
   143     iLog->Log( KTestHuiGifAnimationTextureEnableAnimationL );
       
   144 
       
   145 //    RMessage2 message;
       
   146     TAlfCreateTextureAnimatedParams params;
       
   147     TPckg<TAlfCreateTextureAnimatedParams> paramsPckg(params);
       
   148 //    message.Read(1,paramsPckg);
       
   149     CHuiGifAnimationTexture* animtext = CHuiGifAnimationTexture::NewL(params.iFilename,iHuiEnv->TextureManager(),params.iId, (THuiTextureUploadFlags)(params.iFlags));
       
   150     CleanupStack::PushL( animtext );
       
   151     STIF_ASSERT_NOT_NULL( animtext );
       
   152     animtext->EnableAnimation( EFalse );
       
   153     CleanupStack::PopAndDestroy( animtext );
       
   154     
       
   155     return KErrNone;
       
   156 
       
   157     }
       
   158 
       
   159 
       
   160 //End of file.