equal
deleted
inserted
replaced
|
1 // Copyright (c) 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 #ifndef ACTIVECALLBACKCONSOLE_H |
|
17 #define ACTIVECALLBACKCONSOLE_H |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <e32cons.h> |
|
21 |
|
22 |
|
23 |
|
24 class CActiveCallBackConsole : public CActive |
|
25 { |
|
26 public: |
|
27 static CActiveCallBackConsole* NewL(TInt(*aFunction)(TAny *aPtr, TChar aKey), TAny* aPtr, const TDesC& aTitle,const TSize& aSize); |
|
28 void RequestKey(); |
|
29 |
|
30 inline CConsoleBase& Console() const |
|
31 { |
|
32 return *iConsole; |
|
33 }; |
|
34 |
|
35 ~CActiveCallBackConsole(); |
|
36 |
|
37 private: |
|
38 void RunL(); |
|
39 TInt RunError(TInt aError); |
|
40 void DoCancel(); |
|
41 void DrawCursor(); |
|
42 CActiveCallBackConsole(TInt(*aFunction)(TAny *aPtr, TChar aKey), TAny* aPtr); |
|
43 void ConstructL(const TDesC& aTitle,const TSize& aSize); |
|
44 |
|
45 private: |
|
46 CConsoleBase* iConsole; |
|
47 TInt(*iFunction)(TAny *aPtr, TChar aKey); |
|
48 TAny* iPtr; |
|
49 }; |
|
50 |
|
51 #endif //ACTIVECALLBACKCONSOLE_H |