|
1 // Copyright (c) 2003-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 #if !defined(__OFFSCREENBITMAP_H__) |
|
17 #define __OFFSCREENBITMAP_H__ |
|
18 |
|
19 #include <e32std.h> |
|
20 #include <e32base.h> |
|
21 #include <gdi.h> |
|
22 |
|
23 #include <Graphics/WSGRAPHICDRAWERINTERFACE.H> |
|
24 |
|
25 class CFbsBitmapDevice; |
|
26 class CWsClientWindow; |
|
27 class CWsWindow; |
|
28 class CWsWindowBase; |
|
29 class CWsClient; |
|
30 class CScreen; |
|
31 class DWsBitmap; |
|
32 |
|
33 #if defined(__WINS__) && defined(_DEBUG) |
|
34 class CDebugOsbWin; |
|
35 #endif |
|
36 |
|
37 class CWsOffScreenBitmap : public CBase, public MWsBackBuffer |
|
38 { |
|
39 public: // Construction / Destruction |
|
40 static CWsOffScreenBitmap* NewL(CScreen* aScreen); |
|
41 ~CWsOffScreenBitmap(); |
|
42 protected: |
|
43 CWsOffScreenBitmap(CScreen* aScreen); |
|
44 void ConstructL(); |
|
45 public: // Bitmap |
|
46 TInt DisplayModeChanged(TBool aSwapWidthAndHeight); |
|
47 void UpdateGc(const TBool aSwapWidthAndHeight); |
|
48 public: |
|
49 CFbsBitmap* Bitmap(); |
|
50 CFbsDevice* BitmapDevice(); |
|
51 |
|
52 public: // implementing MWsObjectProvider |
|
53 TAny* ResolveObjectInterface(TUint aTypeId); |
|
54 |
|
55 public: // implementing MWsBackBuffer |
|
56 CFbsBitmap* GetBitmap(); |
|
57 CFbsBitGc* GetBitGc(); |
|
58 CFbsBitGc* GetBitGcCurrent(); |
|
59 TInt SetBitGc(CFbsBitGc* aBitGc); |
|
60 TInt RedirectTo(MWsBackBuffer* aTarget); |
|
61 void SetObserver(MWsFlickerFreeBufferObserver* aObserver); |
|
62 MWsFlickerFreeBufferObserver* Observer(); |
|
63 #if defined(__WINS__) && defined(_DEBUG) |
|
64 void Update(); |
|
65 #endif |
|
66 |
|
67 protected: // Data |
|
68 CFbsBitGc* iBitmapGc; |
|
69 CFbsBitmap* iBitmap; |
|
70 CFbsBitmapDevice* iBitmapDevice; |
|
71 CScreen* iScreen; |
|
72 |
|
73 private: // Data |
|
74 #if defined(__WINS__) && defined(_DEBUG) |
|
75 CDebugOsbWin* iOsbWin; |
|
76 #endif |
|
77 |
|
78 private: // Data |
|
79 // used by MWsBackBuffer to redirect OSB output |
|
80 CFbsBitGc* iRedirectGc; |
|
81 MWsBackBuffer* iRedirectBuffer; |
|
82 MWsFlickerFreeBufferObserver* iObserver; |
|
83 }; |
|
84 |
|
85 #endif // __OFFSCREENBITMAP__ |