|
1 // Copyright (c) 2007-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 // This class represents the body part of CDirectGdiDriver that defines the HAI. |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 #ifndef __DIRECTGDIDRIVERINTERNAL_H__ |
|
20 #define __DIRECTGDIDRIVERINTERNAL_H__ |
|
21 |
|
22 /** |
|
23 @file |
|
24 @publishedPartner |
|
25 @prototype |
|
26 */ |
|
27 |
|
28 #include <e32base.h> |
|
29 |
|
30 //forward declarations |
|
31 class RSgDrawable; |
|
32 class RSgImage; |
|
33 class MDirectGdiEngine; |
|
34 |
|
35 /** |
|
36 This class represents the body part of CDirectGdiDriver that defines the HAI. |
|
37 An adaptation must derive from this class and implement all the interfaces to |
|
38 provide the functionality required by the generic layer. |
|
39 |
|
40 @publishedPartner |
|
41 @prototype |
|
42 @deprecated |
|
43 */ |
|
44 class CDirectGdiDriverInternal : public CBase |
|
45 { |
|
46 public: |
|
47 IMPORT_C static TInt New(CDirectGdiDriverInternal*& aInternal, RLibrary aLibrary); |
|
48 inline RLibrary Library() const; |
|
49 |
|
50 /** |
|
51 @see CDirectGdiDriver::Flush() |
|
52 */ |
|
53 virtual void Flush() = 0; |
|
54 |
|
55 /** |
|
56 @see CDirectGdiDriver::Finish() |
|
57 */ |
|
58 virtual void Finish() = 0; |
|
59 |
|
60 /** |
|
61 @see CDirectGdiDriver::GetError() |
|
62 */ |
|
63 virtual TInt GetError() = 0; |
|
64 |
|
65 /** |
|
66 @see CDirectGdiDriver::SetError() |
|
67 */ |
|
68 virtual void SetError(TInt aErr) = 0; |
|
69 |
|
70 /** |
|
71 @see CDirectGdiDriver::CreateDrawableSource() |
|
72 |
|
73 @param aHandle Handle of the newly created drawable source. |
|
74 @param aRSgDrawable The RSgDrawable object to use when creating the drawable source. |
|
75 */ |
|
76 virtual TInt CreateDrawableSource(TInt& aHandle, const RSgDrawable& aRSgDrawable) = 0; |
|
77 |
|
78 /** |
|
79 @see CDirectGdiDriver::CloseDrawableSource() |
|
80 |
|
81 @param aHandle A handle to a RDirectGdiDrawableSource object to be closed. |
|
82 */ |
|
83 virtual void CloseDrawableSource(TInt& aHandle) = 0; |
|
84 |
|
85 /** |
|
86 @see CDirectGdiDriver::CreateImageTarget() |
|
87 |
|
88 @param aHandle Handle of the newly created image target. |
|
89 @param aRSgImage The RSgImage to use when creating the image target. |
|
90 */ |
|
91 virtual TInt CreateImageTarget(TInt& aHandle, const RSgImage& aRSgImage) = 0; |
|
92 |
|
93 /** |
|
94 @see CDirectGdiDriver::CloseImageTarget() |
|
95 |
|
96 @param aHandle A handle to a RDirectGdiImageTarget object to be closed. |
|
97 */ |
|
98 virtual void CloseImageTarget(TInt& aHandle) = 0; |
|
99 |
|
100 /** |
|
101 @see CDirectGdiDriver::CreateEngine() |
|
102 */ |
|
103 virtual TInt CreateEngine(MDirectGdiEngine*& aEngine) = 0; |
|
104 |
|
105 /** |
|
106 @see CDirectGdiDriver::DestroyEngine() |
|
107 */ |
|
108 virtual void DestroyEngine(MDirectGdiEngine* aEngine) = 0; |
|
109 |
|
110 /** |
|
111 @see CDirectGdiDriver::GetInterface() |
|
112 */ |
|
113 virtual TInt GetInterface(TUid aInterfaceId, TAny*& aInterface) = 0; |
|
114 |
|
115 protected: |
|
116 inline CDirectGdiDriverInternal(RLibrary aLibrary); |
|
117 private: |
|
118 /** Handle to the DirectGDI adapter DLL owned by this thread.*/ |
|
119 const RLibrary iAdapterLibrary; |
|
120 }; |
|
121 |
|
122 #include <graphics/directgdidriverinternal.inl> |
|
123 |
|
124 |
|
125 #endif //__DIRECTGDIDRIVERINTERNAL_H__ |