uiaccelerator_plat/alf_core_toolkit_api/tsrc/src/testuiaifcoretoolkitblocksshadowbrush.cpp
branchRCL_3
changeset 19 e5af45d51884
parent 18 1801340c26a2
child 20 31fccae4f8a7
equal deleted inserted replaced
18:1801340c26a2 19:e5af45d51884
     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/huidropshadowbrush.h>
       
    28 
       
    29 #include "testuiaifcoretoolkit.h"
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CTestUiAifCoreToolkit::TestShadowBrushNewLL
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 TInt CTestUiAifCoreToolkit::TestShadowBrushNewLL( CStifItemParser& /*aItem*/ )
       
    36     {
       
    37 
       
    38     // Print to UI
       
    39     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
    40     _LIT( KTestShadowBrushNewLL, "In TestShadowBrushNewLL" );
       
    41     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestShadowBrushNewLL );
       
    42     // Print to log file 
       
    43     iLog->Log( KTestShadowBrushNewLL );
       
    44     
       
    45     THuiMetric metric;
       
    46     
       
    47     CHuiDropShadowBrush* shadowBrush = CHuiDropShadowBrush::NewL( metric );
       
    48     
       
    49     delete shadowBrush;
       
    50     
       
    51     return KErrNone;
       
    52     
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CTestUiAifCoreToolkit::TestShadowBrushNewLCL
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 TInt CTestUiAifCoreToolkit::TestShadowBrushNewLCL( CStifItemParser& /*aItem*/ )
       
    60     {
       
    61 
       
    62     // Print to UI
       
    63     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
    64     _LIT( KTestShadowBrushNewLCL, "In TestShadowBrushNewLCL" );
       
    65     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestShadowBrushNewLCL );
       
    66     // Print to log file 
       
    67     iLog->Log( KTestShadowBrushNewLCL );
       
    68     
       
    69     THuiMetric metric;
       
    70     
       
    71     CHuiDropShadowBrush* shadowBrush = CHuiDropShadowBrush::NewLC( metric );
       
    72     CleanupStack::PopAndDestroy( shadowBrush );
       
    73     
       
    74     return KErrNone;
       
    75     
       
    76     }
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // CTestUiAifCoreToolkit::TestShadowBrushNewLTIntL
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 TInt CTestUiAifCoreToolkit::TestShadowBrushNewLTIntL( CStifItemParser& /*aItem*/ )
       
    83     {
       
    84 
       
    85     // Print to UI
       
    86     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
    87     _LIT( KTestShadowBrushNewLTIntL, "In TestShadowBrushNewLTIntL" );
       
    88     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestShadowBrushNewLTIntL );
       
    89     // Print to log file 
       
    90     iLog->Log( KTestShadowBrushNewLTIntL );
       
    91     
       
    92     TInt temp = 7;
       
    93     
       
    94     CHuiDropShadowBrush* shadowBrush = CHuiDropShadowBrush::NewL( temp );
       
    95     delete shadowBrush;
       
    96     
       
    97     return KErrNone;
       
    98     
       
    99     }
       
   100 
       
   101 // -----------------------------------------------------------------------------
       
   102 // CTestUiAifCoreToolkit::TestShadowBrushNewLTIntLCL
       
   103 // -----------------------------------------------------------------------------
       
   104 //
       
   105 TInt CTestUiAifCoreToolkit::TestShadowBrushNewLTIntLCL( CStifItemParser& /*aItem*/ )
       
   106     {
       
   107 
       
   108     // Print to UI
       
   109     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   110     _LIT( KTestShadowBrushNewLTIntLCL, "In TestShadowBrushNewLTIntLCL" );
       
   111     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestShadowBrushNewLTIntLCL );
       
   112     // Print to log file 
       
   113     iLog->Log( KTestShadowBrushNewLTIntLCL );
       
   114     
       
   115     TInt temp = 7;
       
   116     
       
   117     CHuiDropShadowBrush* shadowBrush = CHuiDropShadowBrush::NewLC( temp );
       
   118     CleanupStack::PopAndDestroy( shadowBrush );
       
   119     
       
   120     return KErrNone;
       
   121     
       
   122     }
       
   123 
       
   124 // -----------------------------------------------------------------------------
       
   125 // CTestUiAifCoreToolkit::TestShadowBrushSetDepthL
       
   126 // -----------------------------------------------------------------------------
       
   127 //
       
   128 TInt CTestUiAifCoreToolkit::TestShadowBrushSetDepthL( CStifItemParser& /*aItem*/ )
       
   129     {
       
   130 
       
   131     // Print to UI
       
   132     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   133     _LIT( KTestShadowBrushSetDepthL, "In TestShadowBrushSetDepthL" );
       
   134     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestShadowBrushSetDepthL );
       
   135     // Print to log file 
       
   136     iLog->Log( KTestShadowBrushSetDepthL );
       
   137     
       
   138     THuiMetric metric;
       
   139     CHuiDropShadowBrush* shadowBrush = CHuiDropShadowBrush::NewL( metric );
       
   140     CleanupStack::PushL( shadowBrush );
       
   141     shadowBrush->SetDepth( metric );
       
   142     CleanupStack::PopAndDestroy( shadowBrush );
       
   143 
       
   144     return KErrNone;
       
   145     
       
   146     }
       
   147 
       
   148 // -----------------------------------------------------------------------------
       
   149 // CTestUiAifCoreToolkit::TestShadowSetSoftnessL
       
   150 // -----------------------------------------------------------------------------
       
   151 //
       
   152 TInt CTestUiAifCoreToolkit::TestShadowSetSoftnessL( CStifItemParser& /*aItem*/ )
       
   153     {
       
   154 
       
   155     // Print to UI
       
   156     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   157     _LIT( KTestShadowSetSoftnessL, "In TestShadowSetSoftnessL" );
       
   158     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestShadowSetSoftnessL );
       
   159     // Print to log file 
       
   160     iLog->Log( KTestShadowSetSoftnessL );
       
   161     
       
   162     THuiMetric metric;
       
   163     CHuiDropShadowBrush* shadowBrush = CHuiDropShadowBrush::NewL( metric );
       
   164     CleanupStack::PushL( shadowBrush );
       
   165     shadowBrush->SetSoftness( metric );
       
   166     CleanupStack::PopAndDestroy( shadowBrush );
       
   167 
       
   168     return KErrNone;
       
   169     
       
   170     }
       
   171 
       
   172 // -----------------------------------------------------------------------------
       
   173 // CTestUiAifCoreToolkit::TestShadowSetColorL
       
   174 // -----------------------------------------------------------------------------
       
   175 //
       
   176 TInt CTestUiAifCoreToolkit::TestShadowSetColorL( CStifItemParser& /*aItem*/ )
       
   177     {
       
   178 
       
   179     // Print to UI
       
   180     _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" );
       
   181     _LIT( KTestShadowSetColorL, "In TestShadowSetColorL" );
       
   182     TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestShadowSetColorL );
       
   183     // Print to log file 
       
   184     iLog->Log( KTestShadowSetColorL );
       
   185     
       
   186     THuiMetric metric;
       
   187     CHuiDropShadowBrush* shadowBrush = CHuiDropShadowBrush::NewL( metric );
       
   188     CleanupStack::PushL( shadowBrush );
       
   189     TRgb rgb;
       
   190     shadowBrush->SetColor( rgb );
       
   191     CleanupStack::PopAndDestroy( shadowBrush );
       
   192 
       
   193     return KErrNone;
       
   194     
       
   195     }
       
   196 //  [End of File]