graphicsdeviceinterface/directgdiinterface/inc/directgdiimagetarget.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef DIRECTGDIIMAGETARGET_H
       
    17 #define DIRECTGDIIMAGETARGET_H
       
    18 
       
    19 /**
       
    20 @file
       
    21 @publishedPartner
       
    22 @prototype
       
    23 @deprecated
       
    24 */
       
    25 
       
    26 #include <e32def.h>
       
    27 
       
    28 // Forward declarations.
       
    29 //
       
    30 class CDirectGdiDriver;
       
    31 class RSgImage;
       
    32 
       
    33 /**
       
    34 RDirectGdiImageTarget is a handle to a DirectGDI adaptation-specific resource which 
       
    35 abstracts the image-based rendering target. The main intention in creating this resource 
       
    36 is to allow a global sharable image resource (RSgImage) to be used as a target of 
       
    37 DirectGDI rendering. For example, in a DirectGDI adaptation where OpenVG is used to 
       
    38 implement DirectGDI functionality, the creation of RDirectGdiImageTarget may be associated 
       
    39 with the creation of an underlying EGL surface from the given RSgImage. This handle class 
       
    40 and its DirectGDI adaptation-specific resource are non-sharable and local within the 
       
    41 creating thread.
       
    42 
       
    43 This class is part of a generic layer and will forward any request to the CDirectGdiDriver
       
    44 singleton for the calling thread.
       
    45 
       
    46 CDirectGdiContext is activated on an RDirectGdiImageTarget. This causes all subsequent
       
    47 context drawing operations to to draw to the image resource referred to by the 
       
    48 RDirectGdiImageTarget.
       
    49 
       
    50 @see CDirectGdiContext
       
    51 */
       
    52 NONSHARABLE_CLASS(RDirectGdiImageTarget)
       
    53 	{
       
    54 	friend class CDirectGdiDriver;
       
    55 	friend class CTPanicTests;
       
    56 	
       
    57 public:
       
    58 	IMPORT_C RDirectGdiImageTarget();
       
    59 	IMPORT_C RDirectGdiImageTarget(CDirectGdiDriver& aDriver);
       
    60 	IMPORT_C TInt Create(const RSgImage& aImage);
       
    61 	IMPORT_C void Close();
       
    62 	inline TInt Handle() const;
       
    63 
       
    64 private:
       
    65 	CDirectGdiDriver* iDriver;
       
    66 	TInt iHandle;
       
    67 	};
       
    68 	
       
    69 #include <graphics/directgdiimagetarget.inl>
       
    70 
       
    71 #endif //DIRECTGDIIMAGETARGET_H