1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/wscons.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,113 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#include <e32std.h>
1.20 +#include <e32cons.h>
1.21 +
1.22 +NONSHARABLE_CLASS(CWsConsole) : public CConsoleBase
1.23 + {
1.24 +public:
1.25 +// Pure virtuals from CConsoleBase
1.26 + TInt Create(const TDesC& aTitle,TSize aSize);
1.27 + void Read(TRequestStatus& aStatus);
1.28 + void ReadCancel();
1.29 + void Write(const TDesC& aDes);
1.30 + TPoint CursorPos() const;
1.31 + void SetCursorPosAbs(const TPoint& aPoint);
1.32 + void SetCursorPosRel(const TPoint& aPoint);
1.33 + void SetCursorHeight(TInt aPercentage);
1.34 + void SetTitle(const TDesC& aTitle);
1.35 + void ClearScreen();
1.36 + void ClearToEndOfLine();
1.37 + TSize ScreenSize() const;
1.38 + TKeyCode KeyCode() const;
1.39 + TUint KeyModifiers() const;
1.40 +private:
1.41 + TRequestStatus* iStatus;
1.42 + };
1.43 +
1.44 +//
1.45 +// CWsConsole
1.46 +//
1.47 +
1.48 +TInt CWsConsole::Create(const TDesC&,TSize )
1.49 + {
1.50 + return(KErrNone);
1.51 + }
1.52 +
1.53 +void CWsConsole::Read(TRequestStatus& aStatus)
1.54 + {
1.55 + aStatus=KRequestPending;
1.56 + iStatus=&aStatus;
1.57 + User::RequestComplete(iStatus,KErrNone);
1.58 + }
1.59 +
1.60 +void CWsConsole::ReadCancel()
1.61 + {
1.62 + User::RequestComplete(iStatus,KErrCancel);
1.63 + }
1.64 +
1.65 +void CWsConsole::Write(const TDesC&)
1.66 + {
1.67 + }
1.68 +
1.69 +TPoint CWsConsole::CursorPos() const
1.70 + {
1.71 + return(TPoint());
1.72 + }
1.73 +
1.74 +void CWsConsole::SetCursorPosAbs(const TPoint&)
1.75 + {
1.76 + }
1.77 +
1.78 +void CWsConsole::SetCursorPosRel(const TPoint&)
1.79 + {
1.80 + }
1.81 +
1.82 +void CWsConsole::SetCursorHeight(TInt )
1.83 + {
1.84 + }
1.85 +
1.86 +void CWsConsole::SetTitle(const TDesC&)
1.87 + {
1.88 + }
1.89 +
1.90 +void CWsConsole::ClearScreen()
1.91 + {
1.92 + }
1.93 +
1.94 +void CWsConsole::ClearToEndOfLine()
1.95 + {
1.96 + }
1.97 +
1.98 +TSize CWsConsole::ScreenSize() const
1.99 + {
1.100 + return(TSize(32,20));
1.101 + }
1.102 +
1.103 +TKeyCode CWsConsole::KeyCode() const
1.104 + {
1.105 + return(EKeyNull);
1.106 + }
1.107 +
1.108 +TUint CWsConsole::KeyModifiers() const
1.109 + {
1.110 + return(0);
1.111 + }
1.112 +
1.113 +EXPORT_C TAny* NewConsole()
1.114 + {
1.115 + return new CWsConsole;
1.116 + }