103
|
1 |
// Copyright (c) 2007-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 |
#include <e32std.h>
|
|
17 |
#include <e32cons.h>
|
|
18 |
|
|
19 |
NONSHARABLE_CLASS(CWsConsole) : public CConsoleBase
|
|
20 |
{
|
|
21 |
public:
|
|
22 |
// Pure virtuals from CConsoleBase
|
|
23 |
TInt Create(const TDesC& aTitle,TSize aSize);
|
|
24 |
void Read(TRequestStatus& aStatus);
|
|
25 |
void ReadCancel();
|
|
26 |
void Write(const TDesC& aDes);
|
|
27 |
TPoint CursorPos() const;
|
|
28 |
void SetCursorPosAbs(const TPoint& aPoint);
|
|
29 |
void SetCursorPosRel(const TPoint& aPoint);
|
|
30 |
void SetCursorHeight(TInt aPercentage);
|
|
31 |
void SetTitle(const TDesC& aTitle);
|
|
32 |
void ClearScreen();
|
|
33 |
void ClearToEndOfLine();
|
|
34 |
TSize ScreenSize() const;
|
|
35 |
TKeyCode KeyCode() const;
|
|
36 |
TUint KeyModifiers() const;
|
|
37 |
private:
|
|
38 |
TRequestStatus* iStatus;
|
|
39 |
};
|
|
40 |
|
|
41 |
//
|
|
42 |
// CWsConsole
|
|
43 |
//
|
|
44 |
|
|
45 |
TInt CWsConsole::Create(const TDesC&,TSize )
|
|
46 |
{
|
|
47 |
return(KErrNone);
|
|
48 |
}
|
|
49 |
|
|
50 |
void CWsConsole::Read(TRequestStatus& aStatus)
|
|
51 |
{
|
|
52 |
aStatus=KRequestPending;
|
|
53 |
iStatus=&aStatus;
|
|
54 |
User::RequestComplete(iStatus,KErrNone);
|
|
55 |
}
|
|
56 |
|
|
57 |
void CWsConsole::ReadCancel()
|
|
58 |
{
|
|
59 |
User::RequestComplete(iStatus,KErrCancel);
|
|
60 |
}
|
|
61 |
|
|
62 |
void CWsConsole::Write(const TDesC&)
|
|
63 |
{
|
|
64 |
}
|
|
65 |
|
|
66 |
TPoint CWsConsole::CursorPos() const
|
|
67 |
{
|
|
68 |
return(TPoint());
|
|
69 |
}
|
|
70 |
|
|
71 |
void CWsConsole::SetCursorPosAbs(const TPoint&)
|
|
72 |
{
|
|
73 |
}
|
|
74 |
|
|
75 |
void CWsConsole::SetCursorPosRel(const TPoint&)
|
|
76 |
{
|
|
77 |
}
|
|
78 |
|
|
79 |
void CWsConsole::SetCursorHeight(TInt )
|
|
80 |
{
|
|
81 |
}
|
|
82 |
|
|
83 |
void CWsConsole::SetTitle(const TDesC&)
|
|
84 |
{
|
|
85 |
}
|
|
86 |
|
|
87 |
void CWsConsole::ClearScreen()
|
|
88 |
{
|
|
89 |
}
|
|
90 |
|
|
91 |
void CWsConsole::ClearToEndOfLine()
|
|
92 |
{
|
|
93 |
}
|
|
94 |
|
|
95 |
TSize CWsConsole::ScreenSize() const
|
|
96 |
{
|
|
97 |
return(TSize(32,20));
|
|
98 |
}
|
|
99 |
|
|
100 |
TKeyCode CWsConsole::KeyCode() const
|
|
101 |
{
|
|
102 |
return(EKeyNull);
|
|
103 |
}
|
|
104 |
|
|
105 |
TUint CWsConsole::KeyModifiers() const
|
|
106 |
{
|
|
107 |
return(0);
|
|
108 |
}
|
|
109 |
|
|
110 |
EXPORT_C TAny* NewConsole()
|
|
111 |
{
|
|
112 |
return new CWsConsole;
|
|
113 |
}
|