summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/TEHistory.h
authorwaspe <waspe>2004-02-22 12:57:58 (UTC)
committer waspe <waspe>2004-02-22 12:57:58 (UTC)
commit5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8 (patch) (unidiff)
treeb97f5281b807b4218f437150a4e9082694e7a642 /core/apps/embeddedkonsole/TEHistory.h
parent908f9c9f0c68d1c3e5a620a69bbf0d05684e2ab3 (diff)
downloadopie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.zip
opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.tar.gz
opie-5bc4dbd932fcfa64773b6e17fe57c665bdcd50b8.tar.bz2
merged changes form qkonsole back into opie-embeddedkonsole (most likely not bugfree !)
Diffstat (limited to 'core/apps/embeddedkonsole/TEHistory.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEHistory.h50
1 files changed, 16 insertions, 34 deletions
diff --git a/core/apps/embeddedkonsole/TEHistory.h b/core/apps/embeddedkonsole/TEHistory.h
index 11eb150..fcf6496 100644
--- a/core/apps/embeddedkonsole/TEHistory.h
+++ b/core/apps/embeddedkonsole/TEHistory.h
@@ -21,29 +21,6 @@
21 21
22#include "TECommon.h" 22#include "TECommon.h"
23 23
24/*
25 An extendable tmpfile(1) based buffer.
26*/
27class HistoryBuffer
28{
29public:
30 HistoryBuffer();
31 ~HistoryBuffer();
32
33public:
34 void setScroll(bool on);
35 bool hasScroll();
36
37public:
38 void add(const unsigned char* bytes, int len);
39 void get(unsigned char* bytes, int len, int loc);
40 int len();
41
42private:
43 int ion;
44 int length;
45};
46
47class HistoryScroll 24class HistoryScroll
48{ 25{
49public: 26public:
@@ -51,25 +28,30 @@ public:
51 ~HistoryScroll(); 28 ~HistoryScroll();
52 29
53public: 30public:
54 void setScroll(bool on); 31 void setSize(int lines, int cells);
55 bool hasScroll(); 32 void setScroll(bool on);
33 bool hasScroll();
56 34
57public: // access to history 35 int getLines();
58 int getLines(); 36 int getLineLen(int lineno);
59 int getLineLen(int lineno); 37 void getCells(int lineno, int colno, int count, ca *res);
60 void getCells(int lineno, int colno, int count, ca res[]);
61 38
62public: // backward compatibility (obsolete)
63 ca getCell(int lineno, int colno) { ca res; getCells(lineno,colno,1,&res); return res; } 39 ca getCell(int lineno, int colno) { ca res; getCells(lineno,colno,1,&res); return res; }
64 40
65public: // adding lines. 41 void addCells(ca *text, int count);
66 void addCells(ca a[], int count);
67 void addLine(); 42 void addLine();
68 43
69private: 44private:
70 int startOfLine(int lineno); 45 int startOfLine(int lineno);
71 HistoryBuffer index; // lines Row(int) 46
72 HistoryBuffer cells; // text Row(ca) 47 int m_max_lines;
48 int *m_lines;
49 int m_max_cells;
50 ca *m_cells;
51 int m_first_line;
52 int m_last_cell;
53 int m_num_lines;
54 int m_start_line;
73}; 55};
74 56
75#endif // TEHISTORY_H 57#endif // TEHISTORY_H