1 /* |
|
2 * Copyright (c) 2005-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #if (!defined __T_GRAPHICS_WSERV_WINDOWGC_H__) |
|
20 #define __T_GRAPHICS_WSERV_WINDOWGC_H__ |
|
21 |
|
22 // User Includes |
|
23 #include "DataWrapperBase.h" |
|
24 #include "T_DataBitmapContext.h" |
|
25 #include "T_DataWsClientClass.h" |
|
26 |
|
27 // EPOC Includes |
|
28 #include <gdi.h> |
|
29 |
|
30 |
|
31 /** |
|
32 * Test Active Notification class |
|
33 * |
|
34 */ |
|
35 class CT_DataWindowGc : public CT_DataBitmapContext, public CT_DataWsClientClass |
|
36 { |
|
37 |
|
38 public: |
|
39 /** |
|
40 * Two phase constructor |
|
41 */ |
|
42 static CT_DataWindowGc* NewL(); |
|
43 |
|
44 /** |
|
45 * Public destructor |
|
46 */ |
|
47 ~CT_DataWindowGc(); |
|
48 |
|
49 /** |
|
50 * Return a pointer to the object that the data wraps |
|
51 * |
|
52 * \return pointer to the object that the data wraps |
|
53 */ |
|
54 virtual TAny* GetObject() { return iWindowGc; } |
|
55 |
|
56 /** |
|
57 * Set the object that the data wraps |
|
58 * |
|
59 * @param aObject object that the wrapper is testing |
|
60 * |
|
61 */ |
|
62 virtual void SetObjectL(TAny* aAny); |
|
63 |
|
64 /** |
|
65 * The object will no longer be owned by this |
|
66 * |
|
67 * @leave KErrNotSupported if the the function is not supported |
|
68 */ |
|
69 virtual void DisownObjectL(); |
|
70 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); |
|
71 |
|
72 protected: |
|
73 /** |
|
74 * Protected constructor. First phase construction |
|
75 */ |
|
76 CT_DataWindowGc(); |
|
77 |
|
78 /** |
|
79 * Second phase construction |
|
80 */ |
|
81 void ConstructL(); |
|
82 |
|
83 virtual MWsClientClass* GetClientClass() const; |
|
84 virtual CGraphicsContext* GetGraphicsContext() const; |
|
85 virtual CBitmapContext* GetBitmapContext() const; |
|
86 |
|
87 |
|
88 private: |
|
89 /** |
|
90 * Helper methods |
|
91 */ |
|
92 void DestroyData(); |
|
93 void DoCmdnewL(const TDesC& aSection); |
|
94 void DoCmdDestructor(); |
|
95 void DoCmdConstruct(); |
|
96 void DoCmdActivateL(const TDesC& aSection); |
|
97 void DoCmdDeactivate(); |
|
98 void DoCmdBitBltL(const TDesC& aCommand, const TDesC& aSection, const TInt aAsyncErrorIndex); |
|
99 void DoCmdBitBltMaskedL(const TDesC& aCommand, const TDesC& aSection, const TInt aAsyncErrorIndex); |
|
100 void DoCmdSetDitherOrigin(const TDesC& aSection); |
|
101 void DoCmdSetOpaque(const TDesC& aSection); |
|
102 void DoCmdDrawWsGraphicL(const TDesC& aSection); |
|
103 |
|
104 private: |
|
105 CWindowGc* iWindowGc; |
|
106 }; |
|
107 |
|
108 #endif /* __T_GRAPHICS_WSERV_WINDOWGC_H__ */ |
|