|
1 // nullcons.cpp |
|
2 // |
|
3 // Copyright (c) 2008 - 2010 Accenture. All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of the "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 // Accenture - Initial contribution |
|
11 // |
|
12 |
|
13 #include <e32std.h> |
|
14 #include <e32cons.h> |
|
15 #include <e32keys.h> |
|
16 |
|
17 NONSHARABLE_CLASS(CNullConsole) : public CConsoleBase |
|
18 { |
|
19 public: |
|
20 CNullConsole(); |
|
21 virtual ~CNullConsole(); |
|
22 virtual TInt Create(const TDesC &aTitle,TSize aSize); |
|
23 virtual void Read(TRequestStatus &aStatus); |
|
24 virtual void ReadCancel(); |
|
25 virtual void Write(const TDesC &aDes); |
|
26 virtual TPoint CursorPos() const; |
|
27 virtual void SetCursorPosAbs(const TPoint &aPoint); |
|
28 virtual void SetCursorPosRel(const TPoint &aPoint); |
|
29 virtual void SetCursorHeight(TInt aPercentage); |
|
30 virtual void SetTitle(const TDesC &aTitle); |
|
31 virtual void ClearScreen(); |
|
32 virtual void ClearToEndOfLine(); |
|
33 virtual TSize ScreenSize() const; |
|
34 virtual TKeyCode KeyCode() const; |
|
35 virtual TUint KeyModifiers() const; |
|
36 }; |
|
37 |
|
38 CNullConsole::CNullConsole() |
|
39 { |
|
40 } |
|
41 |
|
42 CNullConsole::~CNullConsole() |
|
43 { |
|
44 } |
|
45 |
|
46 TInt CNullConsole::Create(const TDesC& /*aTitle*/, TSize /*aSize*/) |
|
47 { |
|
48 return(KErrNone); |
|
49 } |
|
50 |
|
51 void CNullConsole::Read(TRequestStatus &aStatus) |
|
52 { |
|
53 TRequestStatus *pS=(&aStatus); |
|
54 User::RequestComplete(pS, KErrNotSupported); |
|
55 } |
|
56 |
|
57 void CNullConsole::ReadCancel() |
|
58 { |
|
59 } |
|
60 |
|
61 void CNullConsole::Write(const TDesC& /*aDes*/) |
|
62 { |
|
63 } |
|
64 |
|
65 TPoint CNullConsole::CursorPos() const |
|
66 { |
|
67 return TPoint(0,0); |
|
68 } |
|
69 |
|
70 void CNullConsole::SetCursorPosAbs(const TPoint& /*aPoint*/) |
|
71 { |
|
72 } |
|
73 |
|
74 void CNullConsole::SetCursorPosRel(const TPoint& /*aPoint*/) |
|
75 { |
|
76 } |
|
77 |
|
78 void CNullConsole::SetCursorHeight(TInt /*aPercentage*/) |
|
79 { |
|
80 } |
|
81 |
|
82 void CNullConsole::SetTitle(const TDesC& /*aTitle*/) |
|
83 { |
|
84 } |
|
85 |
|
86 void CNullConsole::ClearScreen() |
|
87 { |
|
88 } |
|
89 |
|
90 void CNullConsole::ClearToEndOfLine() |
|
91 { |
|
92 } |
|
93 |
|
94 TSize CNullConsole::ScreenSize() const |
|
95 { |
|
96 return TSize(10,10); |
|
97 } |
|
98 |
|
99 TKeyCode CNullConsole::KeyCode() const |
|
100 { |
|
101 return EKeyNull; |
|
102 } |
|
103 |
|
104 TUint CNullConsole::KeyModifiers() const |
|
105 { |
|
106 return 0; |
|
107 } |
|
108 |
|
109 extern "C" EXPORT_C TAny *NewConsole() |
|
110 { |
|
111 return(new CNullConsole); |
|
112 } |