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