sl@0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Declaration of a Direct Graphics Device Interface (GDI) software implementation,
|
sl@0
|
15 |
// this class actually implements the HAI.
|
sl@0
|
16 |
//
|
sl@0
|
17 |
//
|
sl@0
|
18 |
|
sl@0
|
19 |
#ifndef __SWDIRECTGDIDRIVERIMPL_H__
|
sl@0
|
20 |
#define __SWDIRECTGDIDRIVERIMPL_H__
|
sl@0
|
21 |
|
sl@0
|
22 |
/**
|
sl@0
|
23 |
@file
|
sl@0
|
24 |
@internalComponent
|
sl@0
|
25 |
*/
|
sl@0
|
26 |
|
sl@0
|
27 |
#include "swdirectgdiengine.h"
|
sl@0
|
28 |
#include <gdi.h>
|
sl@0
|
29 |
#include <pixelformats.h>
|
sl@0
|
30 |
#include <graphics/directgdidriverinternal.h>
|
sl@0
|
31 |
|
sl@0
|
32 |
class CFbsDrawDevice;
|
sl@0
|
33 |
class CSwDirectGdiImageTargetImpl;
|
sl@0
|
34 |
class CSwDirectGdiImageSourceImpl;
|
sl@0
|
35 |
|
sl@0
|
36 |
/**
|
sl@0
|
37 |
This class represents the body part of CDirectGdiDriver that actually implements
|
sl@0
|
38 |
the HAI. It derives from the CDirectGdiDriverInternal class and implements all the
|
sl@0
|
39 |
interfaces to provide the functionality required by the generic layer.
|
sl@0
|
40 |
*/
|
sl@0
|
41 |
NONSHARABLE_CLASS(CSwDirectGdiDriverImpl): public CDirectGdiDriverInternal
|
sl@0
|
42 |
{
|
sl@0
|
43 |
public:
|
sl@0
|
44 |
virtual ~CSwDirectGdiDriverImpl();
|
sl@0
|
45 |
|
sl@0
|
46 |
// From CDirectGdiDriverInternal
|
sl@0
|
47 |
void Flush() ;
|
sl@0
|
48 |
void Finish() ;
|
sl@0
|
49 |
TInt GetError();
|
sl@0
|
50 |
void SetError(TInt aErr);
|
sl@0
|
51 |
TInt CreateDrawableSource(TInt& aHandleRet, const RSgDrawable& aSgDrawable);
|
sl@0
|
52 |
void CloseDrawableSource(TInt& aHandle);
|
sl@0
|
53 |
TInt CreateImageTarget(TInt& aHandleRet, const RSgImage& aRSgImage);
|
sl@0
|
54 |
void CloseImageTarget(TInt& aHandle);
|
sl@0
|
55 |
TInt CreateEngine(MDirectGdiEngine*& aMDirectGdiEngine);
|
sl@0
|
56 |
void DestroyEngine(MDirectGdiEngine* aMDirectGdiEngine);
|
sl@0
|
57 |
TInt GetInterface(TUid aInterfaceId, TAny*& aInterface);
|
sl@0
|
58 |
|
sl@0
|
59 |
TBool ValidImageSource(TInt aHandle) const;
|
sl@0
|
60 |
TBool ValidImageTarget(TInt aHandle) const;
|
sl@0
|
61 |
void Deactivate(CSwDirectGdiImageTargetImpl* aRenderingTarget);
|
sl@0
|
62 |
TInt RegisterSourceImage(const CSwDirectGdiImageSourceImpl& aImageSource);
|
sl@0
|
63 |
TInt RegisterTargetImage(const CSwDirectGdiImageTargetImpl& aImageTarget);
|
sl@0
|
64 |
TInt UnregisterTargetImage(const CSwDirectGdiImageTargetImpl& aImageTarget);
|
sl@0
|
65 |
TInt UnregisterSourceImage(const CSwDirectGdiImageSourceImpl& aImageSource);
|
sl@0
|
66 |
CSwDirectGdiDriverImpl(RLibrary aLibrary);
|
sl@0
|
67 |
|
sl@0
|
68 |
private:
|
sl@0
|
69 |
TInt iErrorCode; /**< The first error code to occur in any CSwDirectGdiEngine instance.*/
|
sl@0
|
70 |
RPointerArray<MDirectGdiEngine> iEngines;
|
sl@0
|
71 |
RPointerArray<CSwDirectGdiImageTargetImpl> iTargets;
|
sl@0
|
72 |
RPointerArray<CSwDirectGdiImageSourceImpl> iImageSources;
|
sl@0
|
73 |
};
|
sl@0
|
74 |
|
sl@0
|
75 |
#endif //__SWDIRECTGDIDRIVERIMPL_H__
|