os/graphics/graphicsdeviceinterface/directgdiadaptation/swsrc/swdirectgdidriverimpl.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicsdeviceinterface/directgdiadaptation/swsrc/swdirectgdidriverimpl.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,75 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Declaration of a Direct Graphics Device Interface (GDI) software implementation,
1.18 +// this class actually implements the HAI.
1.19 +//
1.20 +//
1.21 +
1.22 +#ifndef __SWDIRECTGDIDRIVERIMPL_H__
1.23 +#define __SWDIRECTGDIDRIVERIMPL_H__
1.24 +
1.25 +/**
1.26 +@file
1.27 +@internalComponent
1.28 +*/
1.29 +
1.30 +#include "swdirectgdiengine.h"
1.31 +#include <gdi.h>
1.32 +#include <pixelformats.h>
1.33 +#include <graphics/directgdidriverinternal.h>
1.34 +
1.35 +class CFbsDrawDevice;
1.36 +class CSwDirectGdiImageTargetImpl;
1.37 +class CSwDirectGdiImageSourceImpl;
1.38 +
1.39 +/**
1.40 +This class represents the body part of CDirectGdiDriver that actually implements
1.41 +the HAI. It derives from the CDirectGdiDriverInternal class and implements all the
1.42 +interfaces to provide the functionality required by the generic layer.
1.43 +*/
1.44 +NONSHARABLE_CLASS(CSwDirectGdiDriverImpl): public CDirectGdiDriverInternal
1.45 + {
1.46 +public:
1.47 + virtual ~CSwDirectGdiDriverImpl();
1.48 +
1.49 + // From CDirectGdiDriverInternal
1.50 + void Flush() ;
1.51 + void Finish() ;
1.52 + TInt GetError();
1.53 + void SetError(TInt aErr);
1.54 + TInt CreateDrawableSource(TInt& aHandleRet, const RSgDrawable& aSgDrawable);
1.55 + void CloseDrawableSource(TInt& aHandle);
1.56 + TInt CreateImageTarget(TInt& aHandleRet, const RSgImage& aRSgImage);
1.57 + void CloseImageTarget(TInt& aHandle);
1.58 + TInt CreateEngine(MDirectGdiEngine*& aMDirectGdiEngine);
1.59 + void DestroyEngine(MDirectGdiEngine* aMDirectGdiEngine);
1.60 + TInt GetInterface(TUid aInterfaceId, TAny*& aInterface);
1.61 +
1.62 + TBool ValidImageSource(TInt aHandle) const;
1.63 + TBool ValidImageTarget(TInt aHandle) const;
1.64 + void Deactivate(CSwDirectGdiImageTargetImpl* aRenderingTarget);
1.65 + TInt RegisterSourceImage(const CSwDirectGdiImageSourceImpl& aImageSource);
1.66 + TInt RegisterTargetImage(const CSwDirectGdiImageTargetImpl& aImageTarget);
1.67 + TInt UnregisterTargetImage(const CSwDirectGdiImageTargetImpl& aImageTarget);
1.68 + TInt UnregisterSourceImage(const CSwDirectGdiImageSourceImpl& aImageSource);
1.69 + CSwDirectGdiDriverImpl(RLibrary aLibrary);
1.70 +
1.71 +private:
1.72 + TInt iErrorCode; /**< The first error code to occur in any CSwDirectGdiEngine instance.*/
1.73 + RPointerArray<MDirectGdiEngine> iEngines;
1.74 + RPointerArray<CSwDirectGdiImageTargetImpl> iTargets;
1.75 + RPointerArray<CSwDirectGdiImageSourceImpl> iImageSources;
1.76 + };
1.77 +
1.78 +#endif //__SWDIRECTGDIDRIVERIMPL_H__