|
1 // Copyright (c) 2006-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 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 #ifndef __WSREDIR_H__ |
|
23 #define __WSREDIR_H__ |
|
24 |
|
25 #include <w32std.h> |
|
26 |
|
27 const TUint8 KRedirectorInfoSig = 0x7e; |
|
28 |
|
29 NONSHARABLE_STRUCT(TRedirectorInfo) |
|
30 { |
|
31 TUint8 iSignature; |
|
32 TAny* iFrontBufferInterface; |
|
33 TAny* iBackBufferInterface; |
|
34 TAny* iScreenConfigInterface; |
|
35 TInt iScreenBitmapHandle; |
|
36 TInt iFlickerBitmapHandle; |
|
37 TInt iUpdateCounter; |
|
38 }; |
|
39 |
|
40 NONSHARABLE_CLASS(CWsRedir): public CWsGraphic |
|
41 { |
|
42 public: |
|
43 enum TBufferType |
|
44 { |
|
45 EFrontBuffer, |
|
46 EBackBuffer |
|
47 }; |
|
48 public: |
|
49 IMPORT_C static CWsRedir* NewL(); |
|
50 IMPORT_C static CWsRedir* NewL(TInt aScreenId); |
|
51 IMPORT_C static CWsRedir* NewL(TInt aScreenId, TBool aDisableWin); |
|
52 IMPORT_C ~CWsRedir(); |
|
53 IMPORT_C TInt Redirect(TBufferType aWhich, TBool aHow); |
|
54 IMPORT_C TInt RedirectUsingWsBackBuffer(TBool aHow); |
|
55 IMPORT_C TInt QueryPlugin(TRedirectorInfo& aInfo); |
|
56 IMPORT_C void SetCallBack(TCallBack aCallBack); |
|
57 private: |
|
58 // override CWsGraphic |
|
59 virtual void HandleMessage(const TDesC8& aData); |
|
60 virtual void OnReplace(); |
|
61 private: |
|
62 TBool iIsFrontRedirected; |
|
63 TBool iIsBackRedirected; |
|
64 TBool iIsReady; |
|
65 TRedirectorInfo* iReq; |
|
66 TCallBack iCallBack; |
|
67 }; |
|
68 |
|
69 #endif |