|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent - Internal Symbian test code |
|
19 */ |
|
20 |
|
21 #include "TestWindows.h" |
|
22 #include <w32std.h> |
|
23 |
|
24 CTestWindow::CTestWindow(RWsSession & aWs, CTestWindowGroup & aGroup, CWindowGc& aGc) : |
|
25 iGc(aGc) |
|
26 { |
|
27 iWin = new (ELeave) RWindow(aWs); |
|
28 Window()->Construct(*aGroup.WindowGroup(), TUint32(this)); |
|
29 } |
|
30 |
|
31 CTestWindow::~CTestWindow() |
|
32 { |
|
33 iWin->Close(); |
|
34 delete iWin; |
|
35 } |
|
36 |
|
37 void CTestWindow::EventL(TWsEvent & /*aEvent*/) |
|
38 { |
|
39 } |
|
40 |
|
41 void CTestWindow::RedrawL(TWsRedrawEvent & /*aEvent*/) |
|
42 { |
|
43 Window()->BeginRedraw(); |
|
44 iGc.Activate(*Window()); |
|
45 DrawL(); |
|
46 iGc.Deactivate(); |
|
47 Window()->EndRedraw(); |
|
48 } |
|
49 |
|
50 void CTestWindow::DrawL() |
|
51 { |
|
52 } |
|
53 |
|
54 CTestWindowGroup::CTestWindowGroup(RWsSession & aWs) |
|
55 { |
|
56 iWin = new (ELeave) RWindowGroup(aWs); |
|
57 WindowGroup()->Construct(TUint32(this)); |
|
58 } |
|
59 |
|
60 CTestWindowGroup::~CTestWindowGroup() |
|
61 { |
|
62 iWin->Close(); |
|
63 delete iWin; |
|
64 } |
|
65 |
|
66 void CTestWindowGroup::EventL(TWsEvent & /*aEvent*/) |
|
67 { |
|
68 } |
|
69 |
|
70 void CTestWindowGroup::RedrawL(TWsRedrawEvent & /*aEvent*/) |
|
71 { |
|
72 } |
|
73 |