|
1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Definition of CHuiCanvasRenderBuffer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __HUICANVASRENDERBUFFER_H__ |
|
21 #define __HUICANVASRENDERBUFFER_H__ |
|
22 |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 /* Forward declarations. */ |
|
27 class CHuiRenderPlugin; |
|
28 |
|
29 class CHuiCanvasRenderBuffer : public CBase |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Constructor. |
|
35 */ |
|
36 IMPORT_C CHuiCanvasRenderBuffer(); |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 IMPORT_C ~CHuiCanvasRenderBuffer(); |
|
42 |
|
43 /** |
|
44 * Initializes render buffer. |
|
45 */ |
|
46 IMPORT_C virtual void InitializeL(const TSize& aSize); |
|
47 |
|
48 /** |
|
49 * Releases render buffer resources. |
|
50 */ |
|
51 IMPORT_C virtual void UnInitialize(); |
|
52 |
|
53 /** |
|
54 * Binds as render target. |
|
55 */ |
|
56 IMPORT_C virtual void Bind(); |
|
57 |
|
58 /** |
|
59 * Unbinds as from being the active render target. |
|
60 */ |
|
61 IMPORT_C virtual void UnBind(); |
|
62 |
|
63 /** |
|
64 * Returns size in pixels. |
|
65 */ |
|
66 IMPORT_C TSize Size() const; |
|
67 |
|
68 /** |
|
69 * Is buffer initilized or not |
|
70 */ |
|
71 IMPORT_C TBool IsInitialized() const; |
|
72 |
|
73 /** |
|
74 * Copies content from the given buffer |
|
75 */ |
|
76 IMPORT_C virtual void Copy(const CHuiCanvasRenderBuffer& aSourceBuffer); |
|
77 |
|
78 /** |
|
79 * Copies content from the active surface. |
|
80 */ |
|
81 IMPORT_C virtual void Copy(TPoint aPoint); |
|
82 |
|
83 protected: |
|
84 |
|
85 TSize iSize; |
|
86 TBool iInitialized; |
|
87 |
|
88 }; |
|
89 |
|
90 #endif |
|
91 |