uiaccelerator_plat/alf_core_toolkit_api/tsrc/src/testuiaifcoretoolkitblockssegmentedtexture.cpp
branchRCL_3
changeset 20 31fccae4f8a7
parent 10 7c5dd702d6d3
equal deleted inserted replaced
19:e5af45d51884 20: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:  test api of alf_core_toolkit
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // [INCLUDE FILES]
       
    20 #include <e32svr.h>
       
    21 #include <gdi.h>
       
    22 #include <stifparser.h>
       
    23 #include <stiftestinterface.h>
       
    24 #include <uiacceltk/huienv.h>
       
    25 #include <uiacceltk/huistatic.h>
       
    26 #include <uiacceltk/huidropshadow.h>
       
    27 #include <uiacceltk/huisegmentedtexture.h>
       
    28 
       
    29 #include "testuiaifcoretoolkit.h"
       
    30 #include "testuiaifblockstexturechild.h"
       
    31 #include "testuiaifblocksmanagerchild.h"
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CTestUiAifCoreToolkit::TestHuisegmentedTextureHandleL
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 TInt CTestUiAifCoreToolkit::TestHuisegmentedTextureHandleL( CStifItemParser& /*aItem*/ )
       
    38     {
       
    39 
       
    40     // Print to UI
       
    41     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
    42     _LIT( KTestHuisegmentedTextureHandleL, "In TestHuisegmentedTextureHandleL" );
       
    43     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit,
       
    44             KTestHuisegmentedTextureHandleL );
       
    45     // Print to log file 
       
    46     iLog->Log( KTestHuisegmentedTextureHandleL );
       
    47     
       
    48     CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild;
       
    49     STIF_ASSERT_NOT_NULL( managerChild );
       
    50     CleanupStack::PushL( managerChild );
       
    51     CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild );
       
    52     STIF_ASSERT_NOT_NULL( textureChild );
       
    53     
       
    54     TInt segment = 0;
       
    55     TInt number = 1;
       
    56     textureChild->SetSegmentCountL( number );
       
    57     MHuiSegmentedTexture* segmentedTeexture  = textureChild->SegmentedTexture();
       
    58     segmentedTeexture->Handle( segment );
       
    59     
       
    60     CleanupStack::PushL( textureChild );
       
    61     CleanupStack::PopAndDestroy( textureChild );
       
    62     
       
    63     return KErrNone;
       
    64     
       
    65     }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CTestUiAifCoreToolkit::TestHuisegmentedTextureBindL
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 TInt CTestUiAifCoreToolkit::TestHuisegmentedTextureBindL( CStifItemParser& /*aItem*/ )
       
    72     {
       
    73 
       
    74     // Print to UI
       
    75     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
    76     _LIT( KTestHuisegmentedTextureBindL, "In TestHuisegmentedTextureBindL" );
       
    77     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit,
       
    78             KTestHuisegmentedTextureBindL );
       
    79     // Print to log file 
       
    80     iLog->Log( KTestHuisegmentedTextureBindL );
       
    81     
       
    82     CTestUiAifBlocksManagerChild* managerChild =new ( ELeave ) CTestUiAifBlocksManagerChild;
       
    83     STIF_ASSERT_NOT_NULL( managerChild );
       
    84     CleanupStack::PushL( managerChild );
       
    85     CTestUiAifBlocksTextureChild* textureChild = CTestUiAifBlocksTextureChild::NewL( *managerChild );
       
    86     STIF_ASSERT_NOT_NULL( textureChild );
       
    87     
       
    88     TInt number = 1;
       
    89     textureChild->SetSegmentCountL( number );
       
    90     MHuiSegmentedTexture* segmentedTeexture  = textureChild->SegmentedTexture();
       
    91     segmentedTeexture->Bind();
       
    92     
       
    93     CleanupStack::PushL( textureChild );
       
    94     CleanupStack::PopAndDestroy( textureChild );
       
    95     
       
    96     return KErrNone;
       
    97     
       
    98     }
       
    99 
       
   100 //  [End of File]