Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 NONSHARABLE_CLASS(CWsConsole) : public CConsoleBase
22 // Pure virtuals from CConsoleBase
23 TInt Create(const TDesC& aTitle,TSize aSize);
24 void Read(TRequestStatus& aStatus);
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);
33 void ClearToEndOfLine();
34 TSize ScreenSize() const;
35 TKeyCode KeyCode() const;
36 TUint KeyModifiers() const;
38 TRequestStatus* iStatus;
45 TInt CWsConsole::Create(const TDesC&,TSize )
50 void CWsConsole::Read(TRequestStatus& aStatus)
52 aStatus=KRequestPending;
54 User::RequestComplete(iStatus,KErrNone);
57 void CWsConsole::ReadCancel()
59 User::RequestComplete(iStatus,KErrCancel);
62 void CWsConsole::Write(const TDesC&)
66 TPoint CWsConsole::CursorPos() const
71 void CWsConsole::SetCursorPosAbs(const TPoint&)
75 void CWsConsole::SetCursorPosRel(const TPoint&)
79 void CWsConsole::SetCursorHeight(TInt )
83 void CWsConsole::SetTitle(const TDesC&)
87 void CWsConsole::ClearScreen()
91 void CWsConsole::ClearToEndOfLine()
95 TSize CWsConsole::ScreenSize() const
100 TKeyCode CWsConsole::KeyCode() const
105 TUint CWsConsole::KeyModifiers() const
110 EXPORT_C TAny* NewConsole()
112 return new CWsConsole;