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 | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/emulation_layer.h b/noncore/apps/opie-console/emulation_layer.h index 91a4856..928ad04 100644 --- a/noncore/apps/opie-console/emulation_layer.h +++ b/noncore/apps/opie-console/emulation_layer.h | |||
@@ -29,12 +29,13 @@ | |||
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" | ||
35 | 36 | ||
36 | class EmulationLayer : public QObject | 37 | class EmulationLayer : public QObject |
37 | { Q_OBJECT | 38 | { Q_OBJECT |
38 | 39 | ||
39 | public: | 40 | public: |
40 | 41 | ||
@@ -101,12 +102,28 @@ public: | |||
101 | virtual void setConnect(bool r); | 102 | virtual void setConnect(bool r); |
102 | void setColumns(int columns); | 103 | void setColumns(int columns); |
103 | 104 | ||
104 | void setKeytrans(int no); | 105 | void setKeytrans(int no); |
105 | void setKeytrans(const char * no); | 106 | void setKeytrans(const char * no); |
106 | 107 | ||
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 *); | ||
107 | protected: | 124 | protected: |
108 | 125 | ||
109 | WidgetLayer* gui; | 126 | WidgetLayer* gui; |
110 | Screen* scr; // referes to one `screen' | 127 | Screen* scr; // referes to one `screen' |
111 | Screen* screen[2]; // 0 = primary, 1 = alternate | 128 | Screen* screen[2]; // 0 = primary, 1 = alternate |
112 | void setScreen(int n); // set `scr' to `screen[n]' | 129 | void setScreen(int n); // set `scr' to `screen[n]' |
@@ -136,11 +153,11 @@ private: | |||
136 | private: | 153 | private: |
137 | 154 | ||
138 | QTimer bulk_timer; | 155 | QTimer bulk_timer; |
139 | int bulk_nlcnt; // bulk newline counter | 156 | int bulk_nlcnt; // bulk newline counter |
140 | char* SelectedText; | 157 | char* SelectedText; |
141 | int bulk_incnt; // bulk counter | 158 | int bulk_incnt; // bulk counter |
142 | 159 | Script *m_script; | |
143 | 160 | ||
144 | }; | 161 | }; |
145 | 162 | ||
146 | #endif // ifndef EMULATION_H | 163 | #endif // ifndef EMULATION_H |