graphicsdeviceinterface/directgdiinterface/inc/directgdidrawablesource.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 DIRECTGDIDRAWABLESOURCE_H
       
    17 #define DIRECTGDIDRAWABLESOURCE_H
       
    18 
       
    19 /**
       
    20 @file
       
    21 @publishedPartner
       
    22 @prototype 
       
    23 */
       
    24 
       
    25 #include <e32def.h>
       
    26 
       
    27 // Forward declarations.
       
    28 //
       
    29 class RSgDrawable;
       
    30 class CDirectGdiDriver;
       
    31 
       
    32 /**
       
    33 This class is a handle to a DirectGDI adaptation-specific resource that is bound 
       
    34 to a non-image resource (RSgDrawable). The intention of creating this class is to allow 
       
    35 a non-image resource (global and sharable between processes) to be used as a source from 
       
    36 the DirectGDI rendering API. This class and its DirectGDI adaptation-specific resource are 
       
    37 non-sharable and will be local to the calling thread.
       
    38 
       
    39 This class is part of generic code and will forward creation and deletion requests
       
    40 to the CDirectGdiDriver singleton object for the calling thread.
       
    41 
       
    42 @publishedPartner
       
    43 @prototype
       
    44 @deprecated
       
    45 */
       
    46 NONSHARABLE_CLASS(RDirectGdiDrawableSource)
       
    47 	{
       
    48 	friend class CDirectGdiDriver;
       
    49 	
       
    50 public:
       
    51 	IMPORT_C RDirectGdiDrawableSource();
       
    52 	IMPORT_C RDirectGdiDrawableSource(CDirectGdiDriver& aDriver);
       
    53 	IMPORT_C TInt Create(const RSgDrawable& aDrawable);
       
    54 	IMPORT_C void Close();
       
    55 	inline TInt Handle() const;
       
    56 	
       
    57 private:
       
    58 	CDirectGdiDriver* iDriver;
       
    59 	TInt iHandle;
       
    60 	};
       
    61 	
       
    62 #include <graphics/directgdidrawablesource.inl>
       
    63 
       
    64 #endif // DIRECTGDIDRAWABLESOURCE_H