1.1 --- a/epoc32/include/e32twin.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,128 +0,0 @@
1.4 -// Copyright (c) 1995-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 -// e32\include\e32twin.h
1.18 -//
1.19 -//
1.20 -
1.21 -#ifndef __E32TWIN_H__
1.22 -#define __E32TWIN_H__
1.23 -#include <e32cons.h>
1.24 -//
1.25 -
1.26 -/** @internalComponent */
1.27 -_LIT(KE32WindowServer,"!E32WindowServer");
1.28 -
1.29 -/** @internalTechnology */
1.30 -enum TEventType
1.31 - {
1.32 - EKeyPress,
1.33 - EMouseClick
1.34 - };
1.35 -
1.36 -/**
1.37 -@publishedPartner
1.38 -@released
1.39 -*/
1.40 -enum TVideoMode
1.41 - {
1.42 - EMono=1,
1.43 - EGray4=2,
1.44 - EGray16=4,
1.45 - EColor256=8,
1.46 - EColor4K=12,
1.47 - EColor64K=16,
1.48 - EColor16M=24
1.49 -
1.50 - };
1.51 -
1.52 -/** @internalTechnology */
1.53 -struct SConsoleKey
1.54 - {
1.55 - TKeyCode iCode;
1.56 - TUint iModifiers;
1.57 - TPoint iMousePos;
1.58 - TInt iType;
1.59 - };
1.60 -
1.61 -/** @internalTechnology */
1.62 -class TConsoleKey : public TPckgBuf<SConsoleKey>
1.63 - {
1.64 -public:
1.65 - IMPORT_C TKeyCode Code() const;
1.66 - IMPORT_C TInt Modifiers() const;
1.67 - IMPORT_C TInt Type() const;
1.68 - IMPORT_C TPoint MousePos() const;
1.69 - };
1.70 -
1.71 -/** @internalTechnology */
1.72 -class RConsole : public RSessionBase
1.73 - {
1.74 -public:
1.75 - IMPORT_C TVersion Version();
1.76 - TInt Connect();
1.77 - IMPORT_C TInt Create();
1.78 - IMPORT_C TInt Init(const TDesC &aName,const TSize &aSize);
1.79 - IMPORT_C TInt Write(const TDesC &aDes);
1.80 - IMPORT_C TInt ClearScreen();
1.81 - IMPORT_C TInt ClearToEndOfLine();
1.82 - IMPORT_C TInt Destroy();
1.83 - IMPORT_C TInt SetTitle(const TDesC &aName);
1.84 - IMPORT_C TInt SetSize(const TSize &aSize);
1.85 - IMPORT_C TInt SetWindowPosAbs(const TPoint &aPosition);
1.86 - IMPORT_C TInt SetCursorHeight(TInt aPercentage);
1.87 - IMPORT_C TInt SetCursorPosAbs(const TPoint &aPosition);
1.88 - IMPORT_C TInt SetCursorPosRel(const TPoint &aVector);
1.89 - IMPORT_C TInt Size(TSize &aSize) const;
1.90 - IMPORT_C TInt ScreenSize(TSize &aSize) const;
1.91 - IMPORT_C TInt CursorPos(TPoint &aPosition) const;
1.92 - IMPORT_C TInt Control(const TDesC &aDes);
1.93 - IMPORT_C TInt Read(TConsoleKey &aKeystroke);
1.94 - IMPORT_C void Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus);
1.95 - IMPORT_C TInt ReadCancel();
1.96 - IMPORT_C TInt SetMode(TVideoMode aMode);
1.97 - IMPORT_C void SetPaletteEntry(TUint anIndex,TUint8 aRed,TUint8 aGreen,TUint8 aBlue);
1.98 - IMPORT_C void GetPaletteEntry(TUint anIndex,TUint8 &aRed,TUint8 &aGreen,TUint8 &aBlue);
1.99 - IMPORT_C void SetTextColors(TUint anFgColor,TUint aBgColor);
1.100 - IMPORT_C void SetUIColors(TUint aWindowBgColor,TUint aBorderColor,TUint aScreenColor);
1.101 - IMPORT_C void SetTextAttribute(TTextAttribute anAttribute);
1.102 - };
1.103 -
1.104 -/** @internalComponent */
1.105 -NONSHARABLE_CLASS(CConsoleTextWin) : public CConsoleBase
1.106 - {
1.107 -public:
1.108 - static CConsoleTextWin *NewL(const TDesC &aTitle,TSize aSize);
1.109 - CConsoleTextWin();
1.110 - virtual ~CConsoleTextWin();
1.111 - virtual TInt Create(const TDesC &aTitle,TSize aSize);
1.112 - virtual void Read(TRequestStatus &aStatus);
1.113 - virtual void ReadCancel();
1.114 - virtual void Write(const TDesC &aDes);
1.115 - virtual TPoint CursorPos() const;
1.116 - virtual void SetCursorPosAbs(const TPoint &aPoint);
1.117 - virtual void SetCursorPosRel(const TPoint &aPoint);
1.118 - virtual void SetCursorHeight(TInt aPercentage);
1.119 - virtual void SetTitle(const TDesC &aTitle);
1.120 - virtual void ClearScreen();
1.121 - virtual void ClearToEndOfLine();
1.122 - virtual TSize ScreenSize() const;
1.123 - virtual TKeyCode KeyCode() const;
1.124 - virtual TUint KeyModifiers() const;
1.125 - virtual void SetTextAttribute(TTextAttribute anAttribute);
1.126 - RConsole &Console();
1.127 -private:
1.128 - TConsoleKey iKey;
1.129 - RConsole iConsole;
1.130 - };
1.131 -#endif