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: // sl@0: sl@0: #ifndef DIRECTGDIIMAGETARGET_H sl@0: #define DIRECTGDIIMAGETARGET_H sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @prototype sl@0: @deprecated sl@0: */ sl@0: sl@0: #include sl@0: sl@0: // Forward declarations. sl@0: // sl@0: class CDirectGdiDriver; sl@0: class RSgImage; sl@0: sl@0: /** sl@0: RDirectGdiImageTarget is a handle to a DirectGDI adaptation-specific resource which sl@0: abstracts the image-based rendering target. The main intention in creating this resource sl@0: is to allow a global sharable image resource (RSgImage) to be used as a target of sl@0: DirectGDI rendering. For example, in a DirectGDI adaptation where OpenVG is used to sl@0: implement DirectGDI functionality, the creation of RDirectGdiImageTarget may be associated sl@0: with the creation of an underlying EGL surface from the given RSgImage. This handle class sl@0: and its DirectGDI adaptation-specific resource are non-sharable and local within the sl@0: creating thread. sl@0: sl@0: This class is part of a generic layer and will forward any request to the CDirectGdiDriver sl@0: singleton for the calling thread. sl@0: sl@0: CDirectGdiContext is activated on an RDirectGdiImageTarget. This causes all subsequent sl@0: context drawing operations to to draw to the image resource referred to by the sl@0: RDirectGdiImageTarget. sl@0: sl@0: @see CDirectGdiContext sl@0: */ sl@0: NONSHARABLE_CLASS(RDirectGdiImageTarget) sl@0: { sl@0: friend class CDirectGdiDriver; sl@0: friend class CTPanicTests; sl@0: sl@0: public: sl@0: IMPORT_C RDirectGdiImageTarget(); sl@0: IMPORT_C RDirectGdiImageTarget(CDirectGdiDriver& aDriver); sl@0: IMPORT_C TInt Create(const RSgImage& aImage); sl@0: IMPORT_C void Close(); sl@0: inline TInt Handle() const; sl@0: sl@0: private: sl@0: CDirectGdiDriver* iDriver; sl@0: TInt iHandle; sl@0: }; sl@0: sl@0: #include sl@0: sl@0: #endif //DIRECTGDIIMAGETARGET_H