|
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 the License "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Test AknsLayeredBackgroundControlContext.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <aknslayeredbackgroundcontrolcontext.h> |
|
20 |
|
21 #include "testsdkskins.h" |
|
22 |
|
23 const TInt KLength = 10; |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CTestSDKSkins::TestLBCCNewL |
|
28 // ----------------------------------------------------------------------------- |
|
29 TInt CTestSDKSkins::TestLBCCNewL( CStifItemParser& /*aItem*/ ) |
|
30 { |
|
31 TAknsItemID itemID; |
|
32 TPoint pointTL( 0, 0 ); |
|
33 TPoint pointBR( KLength, KLength ); |
|
34 TRect rect( pointTL, pointBR ); |
|
35 CAknsLayeredBackgroundControlContext* context = |
|
36 CAknsLayeredBackgroundControlContext::NewL( itemID, rect, ETrue, 1 ); |
|
37 CleanupStack::PushL( context ); |
|
38 STIF_ASSERT_NOT_NULL( context ); |
|
39 |
|
40 CleanupStack::PopAndDestroy( context ); |
|
41 |
|
42 return KErrNone; |
|
43 |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CTestSDKSkins::TestLBCCSetLayerImageL |
|
48 // ----------------------------------------------------------------------------- |
|
49 TInt CTestSDKSkins::TestLBCCSetLayerImageL( CStifItemParser& /*aItem*/ ) |
|
50 { |
|
51 TAknsItemID itemID; |
|
52 TPoint pointTL( 0, 0 ); |
|
53 TPoint pointBR( KLength, KLength ); |
|
54 TRect rect( pointTL, pointBR ); |
|
55 CAknsLayeredBackgroundControlContext* context = |
|
56 CAknsLayeredBackgroundControlContext::NewL( itemID, rect, ETrue, 1 ); |
|
57 CleanupStack::PushL( context ); |
|
58 STIF_ASSERT_NOT_NULL( context ); |
|
59 |
|
60 context->SetLayerImage( 0, itemID ); |
|
61 |
|
62 CleanupStack::PopAndDestroy( context ); |
|
63 |
|
64 return KErrNone; |
|
65 |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // CTestSDKSkins::TestLBCCSetLayerRectL |
|
70 // ----------------------------------------------------------------------------- |
|
71 TInt CTestSDKSkins::TestLBCCSetLayerRectL( CStifItemParser& /*aItem*/ ) |
|
72 { |
|
73 TAknsItemID itemID; |
|
74 TPoint pointTL( 0, 0 ); |
|
75 TPoint pointBR( KLength, KLength ); |
|
76 TRect rect( pointTL, pointBR ); |
|
77 CAknsLayeredBackgroundControlContext* context = |
|
78 CAknsLayeredBackgroundControlContext::NewL( itemID, rect, ETrue, 1 ); |
|
79 CleanupStack::PushL( context ); |
|
80 STIF_ASSERT_NOT_NULL( context ); |
|
81 |
|
82 context->SetLayerRect( 0, rect ); |
|
83 |
|
84 CleanupStack::PopAndDestroy( context ); |
|
85 |
|
86 return KErrNone; |
|
87 |
|
88 } |