uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksvisualfactory.cpp
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     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 functions for alfvisualfactory.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // [INCLUDE FILES]
       
    21 #include <alf/alflayout.h>
       
    22 #include <alf/alfvisual.h>
       
    23 #include <alf/alfvisualfactory.h>
       
    24 
       
    25 #include "testplatalfvisual.h"
       
    26 
       
    27 
       
    28 // ============================ MEMBER FUNCTIONS ===============================
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // CTestPlatAlfVisual::TestAlfVFNewLayoutL
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 TInt CTestPlatAlfVisual::TestAlfVFNewLayoutL( CStifItemParser& /*aItem*/ )
       
    35     {
       
    36     // Print to UI
       
    37     _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" );
       
    38     _LIT( KTestAlfVFNewLayoutL, "TestAlfVFNewLayoutL" );
       
    39     TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfVFNewLayoutL );
       
    40     // Print to log file
       
    41     iLog->Log( KTestAlfVFNewLayoutL );
       
    42     
       
    43     CAlfLayout* alfLayout = AlfVisualFactory::NewLayoutL( 
       
    44             EAlfLayoutTypeLayout, NULL, *iAlfCtl, *iAlfEnv );
       
    45     CleanupStack::PushL( alfLayout );
       
    46     STIF_ASSERT_NOT_NULL( alfLayout );
       
    47     CleanupStack::PopAndDestroy( alfLayout );
       
    48     
       
    49     return KErrNone;
       
    50     }
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // CTestPlatAlfVisual::TestAlfVFNewLayoutLCL
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 TInt CTestPlatAlfVisual::TestAlfVFNewLayoutLCL( CStifItemParser& /*aItem*/ )
       
    57     {
       
    58     // Print to UI
       
    59     _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" );
       
    60     _LIT( KTestAlfVFNewLayoutLCL, "TestAlfVFNewLayoutLCL" );
       
    61     TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfVFNewLayoutLCL );
       
    62     // Print to log file
       
    63     iLog->Log( KTestAlfVFNewLayoutLCL );
       
    64     
       
    65     CAlfLayout* alfLayout = AlfVisualFactory::NewLayoutLC(
       
    66             EAlfLayoutTypeLayout, NULL, *iAlfCtl, *iAlfEnv );
       
    67     STIF_ASSERT_NOT_NULL( alfLayout );
       
    68     CleanupStack::PopAndDestroy( alfLayout );
       
    69     
       
    70     return KErrNone;
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // CTestPlatAlfVisual::TestAlfVFNewVisualL
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 TInt CTestPlatAlfVisual::TestAlfVFNewVisualL( CStifItemParser& /*aItem*/ )
       
    78     {
       
    79     // Print to UI
       
    80     _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" );
       
    81     _LIT( KTestAlfVFNewVisualL, "TestAlfVFNewVisualL" );
       
    82     TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfVFNewVisualL );
       
    83     // Print to log file
       
    84     iLog->Log( KTestAlfVFNewVisualL );
       
    85     
       
    86     CAlfVisual* alfVisual = AlfVisualFactory::NewVisualL(
       
    87             EAlfVisualTypeVisual, NULL, *iAlfCtl, *iAlfEnv );
       
    88     CleanupStack::PushL( alfVisual );
       
    89     STIF_ASSERT_NOT_NULL( alfVisual );
       
    90     CleanupStack::PopAndDestroy( alfVisual );
       
    91     
       
    92     return KErrNone;
       
    93     }
       
    94 
       
    95 // -----------------------------------------------------------------------------
       
    96 // CTestPlatAlfVisual::TestAlfVFNewVisualLCL
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 TInt CTestPlatAlfVisual::TestAlfVFNewVisualLCL( CStifItemParser& /*aItem*/ )
       
   100     {
       
   101     // Print to UI
       
   102     _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" );
       
   103     _LIT( KTestAlfVFNewVisualLCL, "TestAlfVFNewVisualLCL" );
       
   104     TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfVFNewVisualLCL );
       
   105     // Print to log file
       
   106     iLog->Log( KTestAlfVFNewVisualLCL );
       
   107     
       
   108     CAlfVisual* alfVisual = AlfVisualFactory::NewVisualLC(
       
   109             EAlfVisualTypeVisual, NULL, *iAlfCtl, *iAlfEnv );
       
   110     STIF_ASSERT_NOT_NULL( alfVisual );
       
   111     CleanupStack::PopAndDestroy( alfVisual );
       
   112     
       
   113     return KErrNone;
       
   114     }
       
   115 
       
   116 
       
   117 //  [End of File]