os/graphics/graphicsdeviceinterface/directgdiinterface/inc/directgdidrawablesource.h
First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef DIRECTGDIDRAWABLESOURCE_H
17 #define DIRECTGDIDRAWABLESOURCE_H
27 // Forward declarations.
30 class CDirectGdiDriver;
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.
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.
46 NONSHARABLE_CLASS(RDirectGdiDrawableSource)
48 friend class CDirectGdiDriver;
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;
58 CDirectGdiDriver* iDriver;
62 #include <graphics/directgdidrawablesource.inl>
64 #endif // DIRECTGDIDRAWABLESOURCE_H