aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/mud/terminal
diff options
context:
space:
mode:
authorJeffrey Sharkey <jsharkey@jsharkey.org>2008-08-27 10:47:56 +0000
committerJeffrey Sharkey <jsharkey@jsharkey.org>2008-08-27 10:47:56 +0000
commitcbf1af86640c76facfc140b5dfb83f2393c02d19 (patch)
tree0af4a26136f833765cc444cbfeaa52c465c83c81 /src/de/mud/terminal
parentba0d4f5a28170e52956705fe75a6763ce79e6264 (diff)
downloadconnectbot-cbf1af86640c76facfc140b5dfb83f2393c02d19.tar.gz
connectbot-cbf1af86640c76facfc140b5dfb83f2393c02d19.tar.bz2
connectbot-cbf1af86640c76facfc140b5dfb83f2393c02d19.zip
* moved all terminal logic into a Service backend. connections are held in place by a TerminalBridge, which keeps the connection alive and renders the screen to a
bitmap if provided. a Console creates TerminalViews for each bridge while it is active, and handles panning back/forth between them. * volume up/down controls will change console font size * extended trilead library to support resizePTY() command * left/right screen gestures will pan between various open consoles * up/down screen gestures on right-half will look through scrollback buffer * up/down screen gestures on left-half will trigger pageup/down keys * broke ctrl+ keyboard mapping, will need to bring back over from older code
Diffstat (limited to 'src/de/mud/terminal')
-rw-r--r--src/de/mud/terminal/VDUBuffer.java7
-rw-r--r--src/de/mud/terminal/vt320.java11
2 files changed, 13 insertions, 5 deletions
diff --git a/src/de/mud/terminal/VDUBuffer.java b/src/de/mud/terminal/VDUBuffer.java
index 50a2268..120f093 100644
--- a/src/de/mud/terminal/VDUBuffer.java
+++ b/src/de/mud/terminal/VDUBuffer.java
@@ -339,7 +339,7 @@ public class VDUBuffer {
(topMargin > 0 ?
topMargin - 1 : 0) : bottomMargin));
- // System.out.println("l is "+l+", top is "+top+", bottom is "+bottom+", bottomargin is "+bottomMargin+", topMargin is "+topMargin);
+ System.out.println("l is "+l+", top is "+top+", bottom is "+bottom+", bottomargin is "+bottomMargin+", topMargin is "+topMargin);
if (scrollDown) {
if (n > (bottom - top)) n = (bottom - top);
@@ -617,6 +617,7 @@ public class VDUBuffer {
* @param l line that is the margin
*/
public void setTopMargin(int l) {
+ //System.out.println("trying setTopMargin " + l);
if (l > bottomMargin) {
topMargin = bottomMargin;
bottomMargin = l;
@@ -624,6 +625,7 @@ public class VDUBuffer {
topMargin = l;
if (topMargin < 0) topMargin = 0;
if (bottomMargin > height - 1) bottomMargin = height - 1;
+ //System.out.println("final setTopMargin " + topMargin);
}
/**
@@ -640,6 +642,7 @@ public class VDUBuffer {
* @param l line that is the margin
*/
public void setBottomMargin(int l) {
+ //System.out.println("trying setBottomMargin " + l);
if (l < topMargin) {
bottomMargin = topMargin;
topMargin = l;
@@ -647,6 +650,7 @@ public class VDUBuffer {
bottomMargin = l;
if (topMargin < 0) topMargin = 0;
if (bottomMargin > height - 1) bottomMargin = height - 1;
+ //System.out.println("final setBottomMargin " + bottomMargin);
}
/**
@@ -756,6 +760,7 @@ public class VDUBuffer {
bottomMargin = h - 1;
update = new boolean[h + 1];
update[0] = true;
+
/* FIXME: ???
if(resizeStrategy == RESIZE_FONT)
setBounds(getBounds());
diff --git a/src/de/mud/terminal/vt320.java b/src/de/mud/terminal/vt320.java
index 5e0f4c2..fccd56a 100644
--- a/src/de/mud/terminal/vt320.java
+++ b/src/de/mud/terminal/vt320.java
@@ -39,6 +39,7 @@ public abstract class vt320 extends VDUBuffer implements VDUInput {
/** The current version id tag.<P>
* $Id: vt320.java 507 2005-10-25 10:14:52Z marcus $
+ *
*/
public final static String ID = "$Id: vt320.java 507 2005-10-25 10:14:52Z marcus $";
@@ -1930,7 +1931,7 @@ public abstract class vt320 extends VDUBuffer implements VDUInput {
break;
case 'r': // XTERM_RESTORE
if (true || debug > 1)
- System.out.println("ESC [ ? " + DCEvars[0] + " r");
+ System.out.println("m1ESC [ ? " + DCEvars[0] + " r");
/* DEC Mode reset */
for (int i = 0; i <= DCEvar; i++) {
switch (DCEvars[i]) {
@@ -2328,7 +2329,7 @@ public abstract class vt320 extends VDUBuffer implements VDUInput {
int limit;
/* FIXME: xterm only cares about 0 and topmargin */
if (R > bm)
- limit = bm; // BUGFIX: corrects scrollback dissapearing in irssi
+ limit = bm; // BUGFIX: corrects scrollback dissapearing in irssi (?)
else if (R >= tm) {
limit = tm;
} else
@@ -2403,15 +2404,17 @@ public abstract class vt320 extends VDUBuffer implements VDUInput {
} else
R = rows - 1;
setBottomMargin(R);
+ System.out.println("setBottomMargin R="+R);
if (R >= DCEvars[0]) {
R = DCEvars[0] - 1;
if (R < 0)
R = 0;
}
setTopMargin(R);
+ System.out.println("setTopMargin R="+R);
_SetCursor(0, 0);
if (debug > 1)
- System.out.println("ESC [" + DCEvars[0] + " ; " + DCEvars[1] + " r");
+ System.out.println("m2ESC [" + DCEvars[0] + " ; " + DCEvars[1] + " r");
break;
case 'G': /* CUP / cursor absolute column */
C = DCEvars[0];
@@ -2682,7 +2685,7 @@ public abstract class vt320 extends VDUBuffer implements VDUInput {
if (debug > 3)
System.out.print("" + DCEvars[i] + ";");
}
- if (debug > 3)
+ if (debug > 4)
System.out.print(" (attributes = " + attributes + ")m \n");
break;
default: