author | hgs |
Wed, 12 May 2010 10:34:10 +0100 | |
changeset 133 | 2a0ada0a1bf8 |
parent 90 | 947f0dc9f7a8 |
permissions | -rw-r--r-- |
0 | 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 "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". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// e32\include\e32twin.h |
|
15 |
// |
|
16 |
// WARNING: This file contains some APIs which are internal and are subject |
|
17 |
// to change without notice. Such APIs should therefore not be used |
|
18 |
// outside the Kernel and Hardware Services package. |
|
19 |
// |
|
20 |
||
21 |
#ifndef __E32TWIN_H__ |
|
22 |
#define __E32TWIN_H__ |
|
23 |
#include <e32cons.h> |
|
24 |
// |
|
25 |
||
26 |
/** @internalComponent */ |
|
27 |
_LIT(KE32WindowServer,"!E32WindowServer"); |
|
28 |
||
29 |
/** @internalTechnology */ |
|
30 |
enum TEventType |
|
31 |
{ |
|
32 |
EKeyPress, |
|
33 |
EMouseClick |
|
34 |
}; |
|
35 |
||
36 |
/** |
|
37 |
@publishedPartner |
|
38 |
@released |
|
39 |
*/ |
|
40 |
enum TVideoMode |
|
41 |
{ |
|
42 |
EMono=1, |
|
43 |
EGray4=2, |
|
44 |
EGray16=4, |
|
45 |
EColor256=8, |
|
46 |
EColor4K=12, |
|
47 |
EColor64K=16, |
|
48 |
EColor16M=24 |
|
49 |
||
50 |
}; |
|
51 |
||
52 |
/** @internalTechnology */ |
|
53 |
struct SConsoleKey |
|
54 |
{ |
|
55 |
TKeyCode iCode; |
|
56 |
TUint iModifiers; |
|
57 |
TPoint iMousePos; |
|
58 |
TInt iType; |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
59 |
TUint8 iPointerNumber; |
0 | 60 |
}; |
61 |
||
62 |
/** @internalTechnology */ |
|
63 |
class TConsoleKey : public TPckgBuf<SConsoleKey> |
|
64 |
{ |
|
65 |
public: |
|
66 |
IMPORT_C TKeyCode Code() const; |
|
67 |
IMPORT_C TInt Modifiers() const; |
|
68 |
IMPORT_C TInt Type() const; |
|
69 |
IMPORT_C TPoint MousePos() const; |
|
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
70 |
IMPORT_C TUint8 PointerNumber() const; |
0 | 71 |
}; |
72 |
||
73 |
/** @internalTechnology */ |
|
74 |
class RConsole : public RSessionBase |
|
75 |
{ |
|
76 |
public: |
|
77 |
IMPORT_C TVersion Version(); |
|
78 |
TInt Connect(); |
|
79 |
IMPORT_C TInt Create(); |
|
80 |
IMPORT_C TInt Init(const TDesC &aName,const TSize &aSize); |
|
81 |
IMPORT_C TInt Write(const TDesC &aDes); |
|
82 |
IMPORT_C TInt ClearScreen(); |
|
83 |
IMPORT_C TInt ClearToEndOfLine(); |
|
84 |
IMPORT_C TInt Destroy(); |
|
85 |
IMPORT_C TInt SetTitle(const TDesC &aName); |
|
86 |
IMPORT_C TInt SetSize(const TSize &aSize); |
|
87 |
IMPORT_C TInt SetWindowPosAbs(const TPoint &aPosition); |
|
88 |
IMPORT_C TInt SetCursorHeight(TInt aPercentage); |
|
89 |
IMPORT_C TInt SetCursorPosAbs(const TPoint &aPosition); |
|
90 |
IMPORT_C TInt SetCursorPosRel(const TPoint &aVector); |
|
91 |
IMPORT_C TInt Size(TSize &aSize) const; |
|
92 |
IMPORT_C TInt ScreenSize(TSize &aSize) const; |
|
93 |
IMPORT_C TInt CursorPos(TPoint &aPosition) const; |
|
94 |
IMPORT_C TInt Control(const TDesC &aDes); |
|
95 |
IMPORT_C TInt Read(TConsoleKey &aKeystroke); |
|
96 |
IMPORT_C void Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus); |
|
97 |
IMPORT_C TInt ReadCancel(); |
|
98 |
IMPORT_C TInt SetMode(TVideoMode aMode); |
|
99 |
IMPORT_C void SetPaletteEntry(TUint anIndex,TUint8 aRed,TUint8 aGreen,TUint8 aBlue); |
|
100 |
IMPORT_C void GetPaletteEntry(TUint anIndex,TUint8 &aRed,TUint8 &aGreen,TUint8 &aBlue); |
|
101 |
IMPORT_C void SetTextColors(TUint anFgColor,TUint aBgColor); |
|
102 |
IMPORT_C void SetUIColors(TUint aWindowBgColor,TUint aBorderColor,TUint aScreenColor); |
|
103 |
IMPORT_C void SetTextAttribute(TTextAttribute anAttribute); |
|
104 |
}; |
|
105 |
||
106 |
/** @internalComponent */ |
|
107 |
NONSHARABLE_CLASS(CConsoleTextWin) : public CConsoleBase |
|
108 |
{ |
|
109 |
public: |
|
110 |
static CConsoleTextWin *NewL(const TDesC &aTitle,TSize aSize); |
|
111 |
CConsoleTextWin(); |
|
112 |
virtual ~CConsoleTextWin(); |
|
113 |
virtual TInt Create(const TDesC &aTitle,TSize aSize); |
|
114 |
virtual void Read(TRequestStatus &aStatus); |
|
115 |
virtual void ReadCancel(); |
|
116 |
virtual void Write(const TDesC &aDes); |
|
117 |
virtual TPoint CursorPos() const; |
|
118 |
virtual void SetCursorPosAbs(const TPoint &aPoint); |
|
119 |
virtual void SetCursorPosRel(const TPoint &aPoint); |
|
120 |
virtual void SetCursorHeight(TInt aPercentage); |
|
121 |
virtual void SetTitle(const TDesC &aTitle); |
|
122 |
virtual void ClearScreen(); |
|
123 |
virtual void ClearToEndOfLine(); |
|
124 |
virtual TSize ScreenSize() const; |
|
125 |
virtual TKeyCode KeyCode() const; |
|
126 |
virtual TUint KeyModifiers() const; |
|
127 |
virtual void SetTextAttribute(TTextAttribute anAttribute); |
|
128 |
RConsole &Console(); |
|
129 |
private: |
|
130 |
TConsoleKey iKey; |
|
131 |
RConsole iConsole; |
|
132 |
}; |
|
133 |
#endif |
|
134 |