Diffstat (limited to 'noncore/apps/opie-console/emulation_layer.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/emulation_layer.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/noncore/apps/opie-console/emulation_layer.h b/noncore/apps/opie-console/emulation_layer.h index 928ad04..73e5bf6 100644 --- a/noncore/apps/opie-console/emulation_layer.h +++ b/noncore/apps/opie-console/emulation_layer.h | |||
@@ -23,25 +23,24 @@ | |||
23 | /* */ | 23 | /* */ |
24 | /* -------------------------------------------------------------------------- */ | 24 | /* -------------------------------------------------------------------------- */ |
25 | 25 | ||
26 | #ifndef EMULATION_LAYER_H | 26 | #ifndef EMULATION_LAYER_H |
27 | #define EMULATION_LAYER_H | 27 | #define EMULATION_LAYER_H |
28 | 28 | ||
29 | #include "widget_layer.h" | 29 | #include "widget_layer.h" |
30 | #include "screen.h" | 30 | #include "screen.h" |
31 | #include <qtimer.h> | 31 | #include <qtimer.h> |
32 | #include <stdio.h> | 32 | #include <stdio.h> |
33 | #include <qtextcodec.h> | 33 | #include <qtextcodec.h> |
34 | #include "keytrans.h" | 34 | #include "keytrans.h" |
35 | #include "script.h" | ||
36 | 35 | ||
37 | class EmulationLayer : public QObject | 36 | class EmulationLayer : public QObject |
38 | { Q_OBJECT | 37 | { Q_OBJECT |
39 | 38 | ||
40 | public: | 39 | public: |
41 | 40 | ||
42 | EmulationLayer( WidgetLayer* gui ); | 41 | EmulationLayer( WidgetLayer* gui ); |
43 | ~EmulationLayer(); | 42 | ~EmulationLayer(); |
44 | 43 | ||
45 | public: | 44 | public: |
46 | virtual void setHistory(bool on); | 45 | virtual void setHistory(bool on); |
47 | virtual bool history(); | 46 | virtual bool history(); |
@@ -96,40 +95,24 @@ public: | |||
96 | /** | 95 | /** |
97 | * sends a string to IOLayer | 96 | * sends a string to IOLayer |
98 | * encodes to suit emulation before | 97 | * encodes to suit emulation before |
99 | */ | 98 | */ |
100 | virtual void sendString(const QByteArray&) = 0; | 99 | virtual void sendString(const QByteArray&) = 0; |
101 | 100 | ||
102 | virtual void setConnect(bool r); | 101 | virtual void setConnect(bool r); |
103 | void setColumns(int columns); | 102 | void setColumns(int columns); |
104 | 103 | ||
105 | void setKeytrans(int no); | 104 | void setKeytrans(int no); |
106 | void setKeytrans(const char * no); | 105 | void setKeytrans(const char * no); |
107 | 106 | ||
108 | /* Scripts */ | ||
109 | |||
110 | /* Create a new script and record all typed characters */ | ||
111 | void startRecording(); | ||
112 | |||
113 | /* Return whether we are currently recording a script */ | ||
114 | bool isRecording(); | ||
115 | |||
116 | /* Return the current script (or NULL) */ | ||
117 | Script *script(); | ||
118 | |||
119 | /* Stop recording and remove the current script from memory */ | ||
120 | void clearScript(); | ||
121 | |||
122 | /* Run a script by forwarding its keys to the EmulationLayer */ | ||
123 | void runScript(const Script *); | ||
124 | protected: | 107 | protected: |
125 | 108 | ||
126 | WidgetLayer* gui; | 109 | WidgetLayer* gui; |
127 | Screen* scr; // referes to one `screen' | 110 | Screen* scr; // referes to one `screen' |
128 | Screen* screen[2]; // 0 = primary, 1 = alternate | 111 | Screen* screen[2]; // 0 = primary, 1 = alternate |
129 | void setScreen(int n); // set `scr' to `screen[n]' | 112 | void setScreen(int n); // set `scr' to `screen[n]' |
130 | 113 | ||
131 | bool connected; // communicate with widget | 114 | bool connected; // communicate with widget |
132 | 115 | ||
133 | void setCodec(int c); // codec number, 0 = locale, 1=utf8 | 116 | void setCodec(int c); // codec number, 0 = locale, 1=utf8 |
134 | 117 | ||
135 | QTextCodec* codec; | 118 | QTextCodec* codec; |
@@ -147,17 +130,16 @@ private slots: // triggered by timer | |||
147 | private: | 130 | private: |
148 | 131 | ||
149 | void bulkNewline(); | 132 | void bulkNewline(); |
150 | void bulkStart(); | 133 | void bulkStart(); |
151 | void bulkEnd(); | 134 | void bulkEnd(); |
152 | 135 | ||
153 | private: | 136 | private: |
154 | 137 | ||
155 | QTimer bulk_timer; | 138 | QTimer bulk_timer; |
156 | int bulk_nlcnt; // bulk newline counter | 139 | int bulk_nlcnt; // bulk newline counter |
157 | char* SelectedText; | 140 | char* SelectedText; |
158 | int bulk_incnt; // bulk counter | 141 | int bulk_incnt; // bulk counter |
159 | Script *m_script; | ||
160 | 142 | ||
161 | }; | 143 | }; |
162 | 144 | ||
163 | #endif // ifndef EMULATION_H | 145 | #endif // ifndef EMULATION_H |