os/graphics/graphicsdeviceinterface/directgdiinterface/inc/directgdiimagetarget.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/directgdiinterface/inc/directgdiimagetarget.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,71 @@
     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 +//
    1.18 +
    1.19 +#ifndef DIRECTGDIIMAGETARGET_H
    1.20 +#define DIRECTGDIIMAGETARGET_H
    1.21 +
    1.22 +/**
    1.23 +@file
    1.24 +@publishedPartner
    1.25 +@prototype
    1.26 +@deprecated
    1.27 +*/
    1.28 +
    1.29 +#include <e32def.h>
    1.30 +
    1.31 +// Forward declarations.
    1.32 +//
    1.33 +class CDirectGdiDriver;
    1.34 +class RSgImage;
    1.35 +
    1.36 +/**
    1.37 +RDirectGdiImageTarget is a handle to a DirectGDI adaptation-specific resource which 
    1.38 +abstracts the image-based rendering target. The main intention in creating this resource 
    1.39 +is to allow a global sharable image resource (RSgImage) to be used as a target of 
    1.40 +DirectGDI rendering. For example, in a DirectGDI adaptation where OpenVG is used to 
    1.41 +implement DirectGDI functionality, the creation of RDirectGdiImageTarget may be associated 
    1.42 +with the creation of an underlying EGL surface from the given RSgImage. This handle class 
    1.43 +and its DirectGDI adaptation-specific resource are non-sharable and local within the 
    1.44 +creating thread.
    1.45 +
    1.46 +This class is part of a generic layer and will forward any request to the CDirectGdiDriver
    1.47 +singleton for the calling thread.
    1.48 +
    1.49 +CDirectGdiContext is activated on an RDirectGdiImageTarget. This causes all subsequent
    1.50 +context drawing operations to to draw to the image resource referred to by the 
    1.51 +RDirectGdiImageTarget.
    1.52 +
    1.53 +@see CDirectGdiContext
    1.54 +*/
    1.55 +NONSHARABLE_CLASS(RDirectGdiImageTarget)
    1.56 +	{
    1.57 +	friend class CDirectGdiDriver;
    1.58 +	friend class CTPanicTests;
    1.59 +	
    1.60 +public:
    1.61 +	IMPORT_C RDirectGdiImageTarget();
    1.62 +	IMPORT_C RDirectGdiImageTarget(CDirectGdiDriver& aDriver);
    1.63 +	IMPORT_C TInt Create(const RSgImage& aImage);
    1.64 +	IMPORT_C void Close();
    1.65 +	inline TInt Handle() const;
    1.66 +
    1.67 +private:
    1.68 +	CDirectGdiDriver* iDriver;
    1.69 +	TInt iHandle;
    1.70 +	};
    1.71 +	
    1.72 +#include <graphics/directgdiimagetarget.inl>
    1.73 +
    1.74 +#endif //DIRECTGDIIMAGETARGET_H