author | ibotty <ibotty> | 2002-10-11 17:46:17 (UTC) |
---|---|---|
committer | ibotty <ibotty> | 2002-10-11 17:46:17 (UTC) |
commit | 9c59f37d6563f30318b30a1b84318d7e3e15ec7d (patch) (unidiff) | |
tree | 33965ce487377f86cd1992f2f17c0946498e94be | |
parent | 01f26248efccbd764e7c82b74372f33a4bbae303 (diff) | |
download | opie-9c59f37d6563f30318b30a1b84318d7e3e15ec7d.zip opie-9c59f37d6563f30318b30a1b84318d7e3e15ec7d.tar.gz opie-9c59f37d6563f30318b30a1b84318d7e3e15ec7d.tar.bz2 |
changed #include from widget.h to widget_layer.h
-rw-r--r-- | noncore/apps/opie-console/vt102emulation.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/vt102emulation.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/vt102emulation.cpp b/noncore/apps/opie-console/vt102emulation.cpp index 7eecef3..0ebefa0 100644 --- a/noncore/apps/opie-console/vt102emulation.cpp +++ b/noncore/apps/opie-console/vt102emulation.cpp | |||
@@ -1,123 +1,123 @@ | |||
1 | /* ------------------------------------------------------------------------- */ | 1 | /* ------------------------------------------------------------------------- */ |
2 | /* */ | 2 | /* */ |
3 | /* [vt102emulation.cpp] VT102 Terminal Emulation */ | 3 | /* [vt102emulation.cpp] VT102 Terminal Emulation */ |
4 | /* */ | 4 | /* */ |
5 | /* ------------------------------------------------------------------------- */ | 5 | /* ------------------------------------------------------------------------- */ |
6 | /* */ | 6 | /* */ |
7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ | 7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ |
8 | /* */ | 8 | /* */ |
9 | /* This file is part of Konsole - an X terminal for KDE */ | 9 | /* This file is part of Konsole - an X terminal for KDE */ |
10 | /* */ | 10 | /* */ |
11 | /* ------------------------------------------------------------------------- */ | 11 | /* ------------------------------------------------------------------------- */ |
12 | /* */ | 12 | /* */ |
13 | /* Ported Konsole to Qt/Embedded */ | 13 | /* Ported Konsole to Qt/Embedded */ |
14 | /* */ | 14 | /* */ |
15 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | 15 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ |
16 | /* */ | 16 | /* */ |
17 | /* -------------------------------------------------------------------------- */ | 17 | /* -------------------------------------------------------------------------- */ |
18 | 18 | ||
19 | /*! \class Vt102Emulation | 19 | /*! \class Vt102Emulation |
20 | 20 | ||
21 | \brief Actual Emulation for Konsole | 21 | \brief Actual Emulation for Konsole |
22 | 22 | ||
23 | \sa Widget \sa Screen \sa EmulationLayer | 23 | \sa Widget \sa Screen \sa EmulationLayer |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "vt102emulation.h" | 26 | #include "vt102emulation.h" |
27 | #include "widget.h" | 27 | #include "widget_layer.h" |
28 | #include "screen.h" | 28 | #include "screen.h" |
29 | #include "keytrans.h" | 29 | #include "keytrans.h" |
30 | 30 | ||
31 | #include <stdio.h> | 31 | #include <stdio.h> |
32 | #include <unistd.h> | 32 | #include <unistd.h> |
33 | #include <qkeycode.h> | 33 | #include <qkeycode.h> |
34 | #include <qtextcodec.h> | 34 | #include <qtextcodec.h> |
35 | 35 | ||
36 | 36 | ||
37 | /* VT102 Terminal Emulation | 37 | /* VT102 Terminal Emulation |
38 | 38 | ||
39 | This class puts together the screens, the pty and the widget to a | 39 | This class puts together the screens, the pty and the widget to a |
40 | complete terminal emulation. Beside combining it's componentes, it | 40 | complete terminal emulation. Beside combining it's componentes, it |
41 | handles the emulations's protocol. | 41 | handles the emulations's protocol. |
42 | 42 | ||
43 | This module consists of the following sections: | 43 | This module consists of the following sections: |
44 | 44 | ||
45 | - Constructor/Destructor | 45 | - Constructor/Destructor |
46 | - Incoming Bytes Event pipeline | 46 | - Incoming Bytes Event pipeline |
47 | - Outgoing Bytes | 47 | - Outgoing Bytes |
48 | - Mouse Events | 48 | - Mouse Events |
49 | - Keyboard Events | 49 | - Keyboard Events |
50 | - Modes and Charset State | 50 | - Modes and Charset State |
51 | - Diagnostics | 51 | - Diagnostics |
52 | */ | 52 | */ |
53 | 53 | ||
54 | 54 | ||
55 | /* ------------------------------------------------------------------------- */ | 55 | /* ------------------------------------------------------------------------- */ |
56 | /* */ | 56 | /* */ |
57 | /* Constructor / Destructor */ | 57 | /* Constructor / Destructor */ |
58 | /* */ | 58 | /* */ |
59 | /* ------------------------------------------------------------------------- */ | 59 | /* ------------------------------------------------------------------------- */ |
60 | 60 | ||
61 | /* | 61 | /* |
62 | Nothing really intesting happens here. | 62 | Nothing really intesting happens here. |
63 | */ | 63 | */ |
64 | 64 | ||
65 | /*! | 65 | /*! |
66 | */ | 66 | */ |
67 | 67 | ||
68 | Vt102Emulation::Vt102Emulation(WidgetLayer* gui) : EmulationLayer(gui) | 68 | Vt102Emulation::Vt102Emulation(WidgetLayer* gui) : EmulationLayer(gui) |
69 | { | 69 | { |
70 | QObject::connect(gui,SIGNAL(mouseSignal(int,int,int)), | 70 | QObject::connect(gui,SIGNAL(mouseSignal(int,int,int)), |
71 | this,SLOT(onMouse(int,int,int))); | 71 | this,SLOT(onMouse(int,int,int))); |
72 | initTokenizer(); | 72 | initTokenizer(); |
73 | reset(); | 73 | reset(); |
74 | } | 74 | } |
75 | 75 | ||
76 | /*! | 76 | /*! |
77 | */ | 77 | */ |
78 | 78 | ||
79 | Vt102Emulation::~Vt102Emulation() | 79 | Vt102Emulation::~Vt102Emulation() |
80 | { | 80 | { |
81 | } | 81 | } |
82 | 82 | ||
83 | /*! | 83 | /*! |
84 | */ | 84 | */ |
85 | 85 | ||
86 | void Vt102Emulation::reset() | 86 | void Vt102Emulation::reset() |
87 | { | 87 | { |
88 | resetToken(); | 88 | resetToken(); |
89 | resetModes(); | 89 | resetModes(); |
90 | resetCharset(0); screen[0]->reset(); | 90 | resetCharset(0); screen[0]->reset(); |
91 | resetCharset(1); screen[0]->reset(); | 91 | resetCharset(1); screen[0]->reset(); |
92 | setCodec(0); | 92 | setCodec(0); |
93 | setKeytrans("linux.keytab"); | 93 | setKeytrans("linux.keytab"); |
94 | } | 94 | } |
95 | 95 | ||
96 | /* ------------------------------------------------------------------------- */ | 96 | /* ------------------------------------------------------------------------- */ |
97 | /* */ | 97 | /* */ |
98 | /* Processing the incoming byte stream */ | 98 | /* Processing the incoming byte stream */ |
99 | /* */ | 99 | /* */ |
100 | /* ------------------------------------------------------------------------- */ | 100 | /* ------------------------------------------------------------------------- */ |
101 | 101 | ||
102 | /* Incoming Bytes Event pipeline | 102 | /* Incoming Bytes Event pipeline |
103 | 103 | ||
104 | This section deals with decoding the incoming character stream. | 104 | This section deals with decoding the incoming character stream. |
105 | Decoding means here, that the stream is first seperated into `tokens' | 105 | Decoding means here, that the stream is first seperated into `tokens' |
106 | which are then mapped to a `meaning' provided as operations by the | 106 | which are then mapped to a `meaning' provided as operations by the |
107 | `TEScreen' class or by the emulation class itself. | 107 | `TEScreen' class or by the emulation class itself. |
108 | 108 | ||
109 | The pipeline proceeds as follows: | 109 | The pipeline proceeds as follows: |
110 | 110 | ||
111 | - Tokenizing the ESC codes (onRcvChar) | 111 | - Tokenizing the ESC codes (onRcvChar) |
112 | - VT100 code page translation of plain characters (applyCharset) | 112 | - VT100 code page translation of plain characters (applyCharset) |
113 | - Interpretation of ESC codes (tau) | 113 | - Interpretation of ESC codes (tau) |
114 | 114 | ||
115 | The escape codes and their meaning are described in the | 115 | The escape codes and their meaning are described in the |
116 | technical reference of this program. | 116 | technical reference of this program. |
117 | */ | 117 | */ |
118 | 118 | ||
119 | // Tokens ------------------------------------------------------------------ -- | 119 | // Tokens ------------------------------------------------------------------ -- |
120 | 120 | ||
121 | /* | 121 | /* |
122 | Since the tokens are the central notion if this section, we've put them | 122 | Since the tokens are the central notion if this section, we've put them |
123 | in front. They provide the syntactical elements used to represent the | 123 | in front. They provide the syntactical elements used to represent the |
diff --git a/noncore/apps/opie-console/vt102emulation.h b/noncore/apps/opie-console/vt102emulation.h index de4a62f..17ab449 100644 --- a/noncore/apps/opie-console/vt102emulation.h +++ b/noncore/apps/opie-console/vt102emulation.h | |||
@@ -1,123 +1,123 @@ | |||
1 | /* -------------------------------------------------------------------------- */ | 1 | /* -------------------------------------------------------------------------- */ |
2 | /* */ | 2 | /* */ |
3 | /* [TEmuVt102.h] X Terminal Emulation */ | 3 | /* [TEmuVt102.h] X Terminal Emulation */ |
4 | /* */ | 4 | /* */ |
5 | /* -------------------------------------------------------------------------- */ | 5 | /* -------------------------------------------------------------------------- */ |
6 | /* */ | 6 | /* */ |
7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ | 7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ |
8 | /* */ | 8 | /* */ |
9 | /* This file is part of Konsole - an X terminal for KDE */ | 9 | /* This file is part of Konsole - an X terminal for KDE */ |
10 | /* */ | 10 | /* */ |
11 | /* -------------------------------------------------------------------------- */ | 11 | /* -------------------------------------------------------------------------- */ |
12 | /* */ | 12 | /* */ |
13 | /* Ported Konsole to Qt/Embedded */ | 13 | /* Ported Konsole to Qt/Embedded */ |
14 | /* */ | 14 | /* */ |
15 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | 15 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ |
16 | /* */ | 16 | /* */ |
17 | /* -------------------------------------------------------------------------- */ | 17 | /* -------------------------------------------------------------------------- */ |
18 | /* Ported embedded-konsole to opie-terminal */ | 18 | /* Ported embedded-konsole to opie-terminal */ |
19 | /* */ | 19 | /* */ |
20 | /* Copyright (C) 2002 by opie developers <opie@handhelds.org> */ | 20 | /* Copyright (C) 2002 by opie developers <opie@handhelds.org> */ |
21 | /* */ | 21 | /* */ |
22 | /* -------------------------------------------------------------------------- */ | 22 | /* -------------------------------------------------------------------------- */ |
23 | 23 | ||
24 | #ifndef VT102EMU_H | 24 | #ifndef VT102EMU_H |
25 | #define VT102EMU_H | 25 | #define VT102EMU_H |
26 | 26 | ||
27 | #include "widget.h" | 27 | #include "widget_layer.h" |
28 | #include "screen.h" | 28 | #include "screen.h" |
29 | #include "emulation_layer.h" | 29 | #include "emulation_layer.h" |
30 | #include <qtimer.h> | 30 | #include <qtimer.h> |
31 | #include <stdio.h> | 31 | #include <stdio.h> |
32 | 32 | ||
33 | // | 33 | // |
34 | 34 | ||
35 | #define MODE_AppScreen (MODES_SCREEN+0) | 35 | #define MODE_AppScreen (MODES_SCREEN+0) |
36 | #define MODE_AppCuKeys (MODES_SCREEN+1) | 36 | #define MODE_AppCuKeys (MODES_SCREEN+1) |
37 | #define MODE_AppKeyPad (MODES_SCREEN+2) | 37 | #define MODE_AppKeyPad (MODES_SCREEN+2) |
38 | #define MODE_Mouse1000 (MODES_SCREEN+3) | 38 | #define MODE_Mouse1000 (MODES_SCREEN+3) |
39 | #define MODE_Ansi (MODES_SCREEN+4) | 39 | #define MODE_Ansi (MODES_SCREEN+4) |
40 | #define MODE_total (MODES_SCREEN+5) | 40 | #define MODE_total (MODES_SCREEN+5) |
41 | 41 | ||
42 | struct DECpar | 42 | struct DECpar |
43 | { | 43 | { |
44 | BOOL mode[MODE_total]; | 44 | BOOL mode[MODE_total]; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | struct CharCodes | 47 | struct CharCodes |
48 | { | 48 | { |
49 | // coding info | 49 | // coding info |
50 | char charset[4]; // | 50 | char charset[4]; // |
51 | int cu_cs; // actual charset. | 51 | int cu_cs; // actual charset. |
52 | bool graphic; // Some VT100 tricks | 52 | bool graphic; // Some VT100 tricks |
53 | bool pound ; // Some VT100 tricks | 53 | bool pound ; // Some VT100 tricks |
54 | bool sa_graphic; // saved graphic | 54 | bool sa_graphic; // saved graphic |
55 | bool sa_pound; // saved pound | 55 | bool sa_pound; // saved pound |
56 | }; | 56 | }; |
57 | 57 | ||
58 | class Vt102Emulation: public EmulationLayer | 58 | class Vt102Emulation: public EmulationLayer |
59 | { Q_OBJECT | 59 | { Q_OBJECT |
60 | 60 | ||
61 | public: | 61 | public: |
62 | 62 | ||
63 | Vt102Emulation(WidgetLayer* gui); | 63 | Vt102Emulation(WidgetLayer* gui); |
64 | ~Vt102Emulation(); | 64 | ~Vt102Emulation(); |
65 | 65 | ||
66 | public slots: // signals incoming from Widget | 66 | public slots: // signals incoming from Widget |
67 | 67 | ||
68 | void onKeyPress(QKeyEvent*); | 68 | void onKeyPress(QKeyEvent*); |
69 | void onMouse(int cb, int cx, int cy); | 69 | void onMouse(int cb, int cx, int cy); |
70 | 70 | ||
71 | signals: | 71 | signals: |
72 | 72 | ||
73 | void changeTitle(int,const QString&); | 73 | void changeTitle(int,const QString&); |
74 | void prevSession(); | 74 | void prevSession(); |
75 | void nextSession(); | 75 | void nextSession(); |
76 | 76 | ||
77 | public: | 77 | public: |
78 | 78 | ||
79 | void reset(); | 79 | void reset(); |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * receive a char from IOLayer | 82 | * receive a char from IOLayer |
83 | */ | 83 | */ |
84 | void onRcvChar(int cc); | 84 | void onRcvChar(int cc); |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * sends a list of bytes to the IOLayer | 87 | * sends a list of bytes to the IOLayer |
88 | */ | 88 | */ |
89 | void sendString(const QByteArray&); | 89 | void sendString(const QByteArray&); |
90 | 90 | ||
91 | /** | 91 | /** |
92 | * @deprecated use QByteArray instead | 92 | * @deprecated use QByteArray instead |
93 | * see sendString() above | 93 | * see sendString() above |
94 | */ | 94 | */ |
95 | void sendString(const char *); | 95 | void sendString(const char *); |
96 | 96 | ||
97 | public: | 97 | public: |
98 | 98 | ||
99 | BOOL getMode (int m); | 99 | BOOL getMode (int m); |
100 | 100 | ||
101 | void setMode (int m); | 101 | void setMode (int m); |
102 | void resetMode (int m); | 102 | void resetMode (int m); |
103 | void saveMode (int m); | 103 | void saveMode (int m); |
104 | void restoreMode(int m); | 104 | void restoreMode(int m); |
105 | void resetModes(); | 105 | void resetModes(); |
106 | 106 | ||
107 | void setConnect(bool r); | 107 | void setConnect(bool r); |
108 | 108 | ||
109 | private: | 109 | private: |
110 | 110 | ||
111 | void resetToken(); | 111 | void resetToken(); |
112 | #define MAXPBUF 80 | 112 | #define MAXPBUF 80 |
113 | void pushToToken(int cc); | 113 | void pushToToken(int cc); |
114 | int pbuf[MAXPBUF]; //FIXME: overflow? | 114 | int pbuf[MAXPBUF]; //FIXME: overflow? |
115 | int ppos; | 115 | int ppos; |
116 | #define MAXARGS 15 | 116 | #define MAXARGS 15 |
117 | void addDigit(int dig); | 117 | void addDigit(int dig); |
118 | void addArgument(); | 118 | void addArgument(); |
119 | int argv[MAXARGS]; | 119 | int argv[MAXARGS]; |
120 | int argc; | 120 | int argc; |
121 | void initTokenizer(); | 121 | void initTokenizer(); |
122 | int tbl[256]; | 122 | int tbl[256]; |
123 | 123 | ||