1 // Copyright (c) 1995-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\include\e32twin.h
23 /** @internalComponent */
24 _LIT(KE32WindowServer,"!E32WindowServer");
26 /** @internalTechnology */
49 /** @internalTechnology */
58 /** @internalTechnology */
59 class TConsoleKey : public TPckgBuf<SConsoleKey>
62 IMPORT_C TKeyCode Code() const;
63 IMPORT_C TInt Modifiers() const;
64 IMPORT_C TInt Type() const;
65 IMPORT_C TPoint MousePos() const;
68 /** @internalTechnology */
69 class RConsole : public RSessionBase
72 IMPORT_C TVersion Version();
74 IMPORT_C TInt Create();
75 IMPORT_C TInt Init(const TDesC &aName,const TSize &aSize);
76 IMPORT_C TInt Write(const TDesC &aDes);
77 IMPORT_C TInt ClearScreen();
78 IMPORT_C TInt ClearToEndOfLine();
79 IMPORT_C TInt Destroy();
80 IMPORT_C TInt SetTitle(const TDesC &aName);
81 IMPORT_C TInt SetSize(const TSize &aSize);
82 IMPORT_C TInt SetWindowPosAbs(const TPoint &aPosition);
83 IMPORT_C TInt SetCursorHeight(TInt aPercentage);
84 IMPORT_C TInt SetCursorPosAbs(const TPoint &aPosition);
85 IMPORT_C TInt SetCursorPosRel(const TPoint &aVector);
86 IMPORT_C TInt Size(TSize &aSize) const;
87 IMPORT_C TInt ScreenSize(TSize &aSize) const;
88 IMPORT_C TInt CursorPos(TPoint &aPosition) const;
89 IMPORT_C TInt Control(const TDesC &aDes);
90 IMPORT_C TInt Read(TConsoleKey &aKeystroke);
91 IMPORT_C void Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus);
92 IMPORT_C TInt ReadCancel();
93 IMPORT_C TInt SetMode(TVideoMode aMode);
94 IMPORT_C void SetPaletteEntry(TUint anIndex,TUint8 aRed,TUint8 aGreen,TUint8 aBlue);
95 IMPORT_C void GetPaletteEntry(TUint anIndex,TUint8 &aRed,TUint8 &aGreen,TUint8 &aBlue);
96 IMPORT_C void SetTextColors(TUint anFgColor,TUint aBgColor);
97 IMPORT_C void SetUIColors(TUint aWindowBgColor,TUint aBorderColor,TUint aScreenColor);
98 IMPORT_C void SetTextAttribute(TTextAttribute anAttribute);
101 /** @internalComponent */
102 NONSHARABLE_CLASS(CConsoleTextWin) : public CConsoleBase
105 static CConsoleTextWin *NewL(const TDesC &aTitle,TSize aSize);
107 virtual ~CConsoleTextWin();
108 virtual TInt Create(const TDesC &aTitle,TSize aSize);
109 virtual void Read(TRequestStatus &aStatus);
110 virtual void ReadCancel();
111 virtual void Write(const TDesC &aDes);
112 virtual TPoint CursorPos() const;
113 virtual void SetCursorPosAbs(const TPoint &aPoint);
114 virtual void SetCursorPosRel(const TPoint &aPoint);
115 virtual void SetCursorHeight(TInt aPercentage);
116 virtual void SetTitle(const TDesC &aTitle);
117 virtual void ClearScreen();
118 virtual void ClearToEndOfLine();
119 virtual TSize ScreenSize() const;
120 virtual TKeyCode KeyCode() const;
121 virtual TUint KeyModifiers() const;
122 virtual void SetTextAttribute(TTextAttribute anAttribute);