sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Declaration of a Direct Graphics Device Interface (GDI) software implementation, sl@0: // this class actually implements the HAI. sl@0: // sl@0: // sl@0: sl@0: #ifndef __SWDIRECTGDIDRIVERIMPL_H__ sl@0: #define __SWDIRECTGDIDRIVERIMPL_H__ sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: */ sl@0: sl@0: #include "swdirectgdiengine.h" sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: class CFbsDrawDevice; sl@0: class CSwDirectGdiImageTargetImpl; sl@0: class CSwDirectGdiImageSourceImpl; sl@0: sl@0: /** sl@0: This class represents the body part of CDirectGdiDriver that actually implements sl@0: the HAI. It derives from the CDirectGdiDriverInternal class and implements all the sl@0: interfaces to provide the functionality required by the generic layer. sl@0: */ sl@0: NONSHARABLE_CLASS(CSwDirectGdiDriverImpl): public CDirectGdiDriverInternal sl@0: { sl@0: public: sl@0: virtual ~CSwDirectGdiDriverImpl(); sl@0: sl@0: // From CDirectGdiDriverInternal sl@0: void Flush() ; sl@0: void Finish() ; sl@0: TInt GetError(); sl@0: void SetError(TInt aErr); sl@0: TInt CreateDrawableSource(TInt& aHandleRet, const RSgDrawable& aSgDrawable); sl@0: void CloseDrawableSource(TInt& aHandle); sl@0: TInt CreateImageTarget(TInt& aHandleRet, const RSgImage& aRSgImage); sl@0: void CloseImageTarget(TInt& aHandle); sl@0: TInt CreateEngine(MDirectGdiEngine*& aMDirectGdiEngine); sl@0: void DestroyEngine(MDirectGdiEngine* aMDirectGdiEngine); sl@0: TInt GetInterface(TUid aInterfaceId, TAny*& aInterface); sl@0: sl@0: TBool ValidImageSource(TInt aHandle) const; sl@0: TBool ValidImageTarget(TInt aHandle) const; sl@0: void Deactivate(CSwDirectGdiImageTargetImpl* aRenderingTarget); sl@0: TInt RegisterSourceImage(const CSwDirectGdiImageSourceImpl& aImageSource); sl@0: TInt RegisterTargetImage(const CSwDirectGdiImageTargetImpl& aImageTarget); sl@0: TInt UnregisterTargetImage(const CSwDirectGdiImageTargetImpl& aImageTarget); sl@0: TInt UnregisterSourceImage(const CSwDirectGdiImageSourceImpl& aImageSource); sl@0: CSwDirectGdiDriverImpl(RLibrary aLibrary); sl@0: sl@0: private: sl@0: TInt iErrorCode; /**< The first error code to occur in any CSwDirectGdiEngine instance.*/ sl@0: RPointerArray iEngines; sl@0: RPointerArray iTargets; sl@0: RPointerArray iImageSources; sl@0: }; sl@0: sl@0: #endif //__SWDIRECTGDIDRIVERIMPL_H__