uiaccelerator_plat/alf_extension_api/tsrc/src/testalfbrushhandlers.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 functions for alfbrushhandlers.h
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 // [INCLUDE FILES]
       
    20 #include "testalfext.h"
       
    21 #include "testalfbrushhandlers.h"
       
    22 
       
    23 
       
    24 // CONSTANTS
       
    25 const TInt KBufSize = 64;
       
    26 _LIT8( KTest, "test" );
       
    27 // ============================ MEMBER FUNCTIONS =========================
       
    28 // --------------------------------------------------------------------------
       
    29 // CTestCAlfBrushHandler::CTestCAlfBrushHandler
       
    30 // --------------------------------------------------------------------------
       
    31 //
       
    32 CTestCAlfBrushHandler::CTestCAlfBrushHandler( MAlfInterfaceProvider& aResolver )
       
    33     :CAlfBrushHandler( aResolver )
       
    34     {
       
    35     }
       
    36 
       
    37 // --------------------------------------------------------------------------
       
    38 // CTestCAlfBrushHandler::ConstructL
       
    39 // --------------------------------------------------------------------------
       
    40 //
       
    41 void CTestCAlfBrushHandler::ConstructL()
       
    42     {
       
    43     CHuiBorderBrush* brush = CHuiBorderBrush::NewLC( 1, 1, 1, 1 );
       
    44     CAlfBrushHandler::ConstructL( brush );
       
    45     CleanupStack::Pop( brush );
       
    46     }
       
    47 // --------------------------------------------------------------------------
       
    48 // CTestCAlfBrushHandler::~CTestCAlfBrushHandler
       
    49 // --------------------------------------------------------------------------
       
    50 //
       
    51 CTestCAlfBrushHandler::~CTestCAlfBrushHandler()
       
    52     {}
       
    53 
       
    54 // --------------------------------------------------------------------------
       
    55 // CTestCAlfBrushHandler::TestBrushHandlerForMAlfExtensionL
       
    56 // --------------------------------------------------------------------------
       
    57 //
       
    58 TInt CTestCAlfBrushHandler::TestBrushHandlerForMAlfExtensionL(
       
    59         CStifItemParser& /*aItem*/ )
       
    60     {
       
    61     THuiInterfaceSupport interface = EAlfBrushHandler;
       
    62     GetInterface( interface );
       
    63     TInt cmd = EAlfBrushGetOpacity;
       
    64     TBuf8<KBufSize> input( KTest );
       
    65     TBuf8<KBufSize> response;
       
    66     HandleCmdL( cmd, input, response );
       
    67     Release();
       
    68     return KErrNone;
       
    69     }
       
    70 
       
    71 // --------------------------------------------------------------------------
       
    72 // CTestCAlfBrushHandler::TestBrushHandlerForOthers
       
    73 // --------------------------------------------------------------------------
       
    74 //
       
    75 TInt CTestCAlfBrushHandler::TestBrushHandlerForOthers( CStifItemParser& /*aItem*/ )
       
    76     {
       
    77     TUid uid = { 0x00000001 };
       
    78     TAny** extent = NULL;
       
    79     BrushHandlerExtension( uid, extent );
       
    80     return KErrNone;
       
    81     }
       
    82 
       
    83 
       
    84 // --------------------------------------------------------------------------
       
    85 // CTestCAlfBorderBrushHandler::CTestCAlfBorderBrushHandler
       
    86 // --------------------------------------------------------------------------
       
    87 //
       
    88 CTestCAlfBorderBrushHandler::CTestCAlfBorderBrushHandler( MAlfInterfaceProvider& aResolver )
       
    89     :CAlfBorderBrushHandler( aResolver )
       
    90     {
       
    91     }
       
    92 
       
    93 // --------------------------------------------------------------------------
       
    94 // CTestCAlfBorderBrushHandler::~CTestCAlfBorderBrushHandler
       
    95 // --------------------------------------------------------------------------
       
    96 //
       
    97 CTestCAlfBorderBrushHandler::~CTestCAlfBorderBrushHandler()
       
    98     {}
       
    99 
       
   100 // --------------------------------------------------------------------------
       
   101 // CTestCAlfBorderBrushHandler::TestProtectedL
       
   102 // --------------------------------------------------------------------------
       
   103 //
       
   104 TInt CTestCAlfBorderBrushHandler::TestProtectedL(
       
   105         CStifItemParser& /*aItem*/ )
       
   106     {
       
   107     THuiInterfaceSupport interface = EAlfBrushHandler;
       
   108     GetInterface( interface );
       
   109     TInt cmd = EAlfBorderBrushSetColor;
       
   110     TBuf8<KBufSize> input( KTest );
       
   111     TBuf8<KBufSize> response;
       
   112     HandleCmdL( cmd, input, response );
       
   113     TUid uid = { 0x00000001 };
       
   114     TAny** extent = NULL;
       
   115     BrushHandlerExtension( uid, extent );
       
   116     Release();
       
   117     return KErrNone;
       
   118     }
       
   119 
       
   120 // --------------------------------------------------------------------------
       
   121 // CTestCAlfImageBrushHandler::CTestCAlfImageBrushHandler
       
   122 // --------------------------------------------------------------------------
       
   123 //
       
   124 CTestCAlfImageBrushHandler::CTestCAlfImageBrushHandler( MAlfInterfaceProvider& aResolver )
       
   125     :CAlfImageBrushHandler( aResolver )
       
   126     {
       
   127     }
       
   128 
       
   129 // --------------------------------------------------------------------------
       
   130 // CTestCAlfImageBrushHandler::~CTestCAlfImageBrushHandler
       
   131 // --------------------------------------------------------------------------
       
   132 //
       
   133 CTestCAlfImageBrushHandler::~CTestCAlfImageBrushHandler()
       
   134     {}
       
   135 
       
   136 // --------------------------------------------------------------------------
       
   137 // CTestCAlfImageBrushHandler::TestProtectedL
       
   138 // --------------------------------------------------------------------------
       
   139 //
       
   140 TInt CTestCAlfImageBrushHandler::TestProtectedL(
       
   141         CStifItemParser& /*aItem*/ )
       
   142     {
       
   143     THuiInterfaceSupport interface = EAlfBrushHandler;
       
   144     GetInterface( interface );
       
   145     TInt cmd = EAlfImageBrushSetOffset;
       
   146     TBuf8<KBufSize> input( KTest );
       
   147     TBuf8<KBufSize> response;
       
   148     HandleCmdL( cmd, input, response );
       
   149     TUid uid = { 0x00000001 };
       
   150     TAny** extent = NULL;
       
   151     BrushHandlerExtension( uid, extent );
       
   152     Release();
       
   153     return KErrNone;
       
   154     }
       
   155 
       
   156 
       
   157 
       
   158 // --------------------------------------------------------------------------
       
   159 // CTestCAlfShadowBorderBrushHandler::CTestCAlfShadowBorderBrushHandler
       
   160 // --------------------------------------------------------------------------
       
   161 //
       
   162 CTestCAlfShadowBorderBrushHandler::CTestCAlfShadowBorderBrushHandler( MAlfInterfaceProvider& aResolver )
       
   163     :CAlfShadowBorderBrushHandler( aResolver )
       
   164     {
       
   165     }
       
   166 
       
   167 // --------------------------------------------------------------------------
       
   168 // CTestCAlfShadowBorderBrushHandler::~CTestCAlfShadowBorderBrushHandler
       
   169 // --------------------------------------------------------------------------
       
   170 //
       
   171 CTestCAlfShadowBorderBrushHandler::~CTestCAlfShadowBorderBrushHandler()
       
   172     {}
       
   173 
       
   174 // --------------------------------------------------------------------------
       
   175 // CTestCAlfShadowBorderBrushHandler::TestProtectedL
       
   176 // --------------------------------------------------------------------------
       
   177 //
       
   178 TInt CTestCAlfShadowBorderBrushHandler::TestProtectedL(
       
   179         CStifItemParser& /*aItem*/ )
       
   180     {
       
   181     THuiInterfaceSupport interface = EAlfBrushHandler;
       
   182     GetInterface( interface );
       
   183     TInt cmd = EAlfShadowBorderBrushSetWidth;
       
   184     TBuf8<KBufSize> input( KTest );
       
   185     TBuf8<KBufSize> response;
       
   186     HandleCmdL( cmd, input, response );
       
   187     TUid uid = { 0x00000001 };
       
   188     TAny** extent = NULL;
       
   189     BrushHandlerExtension( uid, extent );
       
   190     Release();
       
   191     return KErrNone;
       
   192     }
       
   193 
       
   194 // --------------------------------------------------------------------------
       
   195 // CTestCAlfDropShadowBrushHandler::CTestCAlfDropShadowBrushHandler
       
   196 // --------------------------------------------------------------------------
       
   197 //
       
   198 CTestCAlfDropShadowBrushHandler::CTestCAlfDropShadowBrushHandler( MAlfInterfaceProvider& aResolver )
       
   199     :CAlfDropShadowBrushHandler( aResolver )
       
   200     {
       
   201     }
       
   202 
       
   203 // --------------------------------------------------------------------------
       
   204 // CTestCAlfDropShadowBrushHandler::~CTestCAlfDropShadowBrushHandler
       
   205 // --------------------------------------------------------------------------
       
   206 //
       
   207 CTestCAlfDropShadowBrushHandler::~CTestCAlfDropShadowBrushHandler()
       
   208     {}
       
   209 
       
   210 // --------------------------------------------------------------------------
       
   211 // CTestCAlfDropShadowBrushHandler::TestProtectedL
       
   212 // --------------------------------------------------------------------------
       
   213 //
       
   214 TInt CTestCAlfDropShadowBrushHandler::TestProtectedL(
       
   215         CStifItemParser& /*aItem*/ )
       
   216     {
       
   217     THuiInterfaceSupport interface = EAlfBrushHandler;
       
   218     GetInterface( interface );
       
   219     TInt cmd = EAlfDropShadowBrushGetSoftness;
       
   220     TBuf8<KBufSize> input( KTest );
       
   221     TBuf8<KBufSize> response;
       
   222     HandleCmdL( cmd, input, response );
       
   223     TUid uid = { 0x00000001 };
       
   224     TAny** extent = NULL;
       
   225     BrushHandlerExtension( uid, extent );
       
   226     Release();
       
   227     return KErrNone;
       
   228     }
       
   229 
       
   230 
       
   231 // --------------------------------------------------------------------------
       
   232 // CTestCAlfGradientBrushHandler::CTestCAlfGradientBrushHandler
       
   233 // --------------------------------------------------------------------------
       
   234 //
       
   235 CTestCAlfGradientBrushHandler::CTestCAlfGradientBrushHandler( MAlfInterfaceProvider& aResolver )
       
   236     :CAlfGradientBrushHandler( aResolver )
       
   237     {
       
   238     }
       
   239 
       
   240 // --------------------------------------------------------------------------
       
   241 // CTestCAlfGradientBrushHandler::~CTestCAlfGradientBrushHandler
       
   242 // --------------------------------------------------------------------------
       
   243 //
       
   244 CTestCAlfGradientBrushHandler::~CTestCAlfGradientBrushHandler()
       
   245     {}
       
   246 
       
   247 // --------------------------------------------------------------------------
       
   248 // CTestCAlfGradientBrushHandler::TestProtectedL
       
   249 // --------------------------------------------------------------------------
       
   250 //
       
   251 TInt CTestCAlfGradientBrushHandler::TestProtectedL(
       
   252         CStifItemParser& /*aItem*/ )
       
   253     {
       
   254     THuiInterfaceSupport interface = EAlfBrushHandler;
       
   255     GetInterface( interface );
       
   256     TInt cmd = EAlfBrushGetOpacity;
       
   257     TBuf8<KBufSize> input( KTest );
       
   258     TBuf8<KBufSize> response;
       
   259     HandleCmdL( cmd, input, response );
       
   260     TUid uid = { 0x00000001 };
       
   261     TAny** extent = NULL;
       
   262     BrushHandlerExtension( uid, extent );
       
   263     Release();
       
   264     return KErrNone;
       
   265     }
       
   266 
       
   267 
       
   268 // --------------------------------------------------------------------------
       
   269 // CTestCAlfFrameBrushHandler::CTestCAlfFrameBrushHandler
       
   270 // --------------------------------------------------------------------------
       
   271 //
       
   272 CTestCAlfFrameBrushHandler::CTestCAlfFrameBrushHandler( MAlfInterfaceProvider& aResolver )
       
   273     :CAlfFrameBrushHandler( aResolver )
       
   274     {
       
   275     }
       
   276 
       
   277 // --------------------------------------------------------------------------
       
   278 // CTestCAlfFrameBrushHandler::~CTestCAlfFrameBrushHandler
       
   279 // --------------------------------------------------------------------------
       
   280 //
       
   281 CTestCAlfFrameBrushHandler::~CTestCAlfFrameBrushHandler()
       
   282     {}
       
   283 
       
   284 // --------------------------------------------------------------------------
       
   285 // CTestCAlfFrameBrushHandler::TestProtectedL
       
   286 // --------------------------------------------------------------------------
       
   287 //
       
   288 TInt CTestCAlfFrameBrushHandler::TestProtectedL(
       
   289         CStifItemParser& /*aItem*/ )
       
   290     {
       
   291     THuiInterfaceSupport interface = EAlfBrushHandler;
       
   292     GetInterface( interface );
       
   293     TInt cmd = EAlfFrameBrushSetEdgeOffsetMetric;
       
   294     TBuf8<KBufSize> input( KTest );
       
   295     TBuf8<KBufSize> response;
       
   296     HandleCmdL( cmd, input, response );
       
   297     TUid uid = { 0x00000001 };
       
   298     TAny** extent = NULL;
       
   299     BrushHandlerExtension( uid, extent );
       
   300     Release();
       
   301     return KErrNone;
       
   302     }
       
   303 
       
   304 // End of file
       
   305