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 DIRECTGDIDRAWABLESOURCE_H sl@0: #define DIRECTGDIDRAWABLESOURCE_H sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @prototype sl@0: */ sl@0: sl@0: #include sl@0: sl@0: // Forward declarations. sl@0: // sl@0: class RSgDrawable; sl@0: class CDirectGdiDriver; sl@0: sl@0: /** sl@0: This class is a handle to a DirectGDI adaptation-specific resource that is bound sl@0: to a non-image resource (RSgDrawable). The intention of creating this class is to allow sl@0: a non-image resource (global and sharable between processes) to be used as a source from sl@0: the DirectGDI rendering API. This class and its DirectGDI adaptation-specific resource are sl@0: non-sharable and will be local to the calling thread. sl@0: sl@0: This class is part of generic code and will forward creation and deletion requests sl@0: to the CDirectGdiDriver singleton object for the calling thread. sl@0: sl@0: @publishedPartner sl@0: @prototype sl@0: @deprecated sl@0: */ sl@0: NONSHARABLE_CLASS(RDirectGdiDrawableSource) sl@0: { sl@0: friend class CDirectGdiDriver; sl@0: sl@0: public: sl@0: IMPORT_C RDirectGdiDrawableSource(); sl@0: IMPORT_C RDirectGdiDrawableSource(CDirectGdiDriver& aDriver); sl@0: IMPORT_C TInt Create(const RSgDrawable& aDrawable); 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 // DIRECTGDIDRAWABLESOURCE_H