summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/vt102emulation.cpp2
-rw-r--r--noncore/apps/opie-console/vt102emulation.h2
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 @@
/* ------------------------------------------------------------------------- */
/* */
/* [vt102emulation.cpp] VT102 Terminal Emulation */
/* */
/* ------------------------------------------------------------------------- */
/* */
/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */
/* */
/* This file is part of Konsole - an X terminal for KDE */
/* */
/* ------------------------------------------------------------------------- */
/* */
/* Ported Konsole to Qt/Embedded */
/* */
/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
/* */
/* -------------------------------------------------------------------------- */
/*! \class Vt102Emulation
\brief Actual Emulation for Konsole
\sa Widget \sa Screen \sa EmulationLayer
*/
#include "vt102emulation.h"
-#include "widget.h"
+#include "widget_layer.h"
#include "screen.h"
#include "keytrans.h"
#include <stdio.h>
#include <unistd.h>
#include <qkeycode.h>
#include <qtextcodec.h>
/* VT102 Terminal Emulation
This class puts together the screens, the pty and the widget to a
complete terminal emulation. Beside combining it's componentes, it
handles the emulations's protocol.
This module consists of the following sections:
- Constructor/Destructor
- Incoming Bytes Event pipeline
- Outgoing Bytes
- Mouse Events
- Keyboard Events
- Modes and Charset State
- Diagnostics
*/
/* ------------------------------------------------------------------------- */
/* */
/* Constructor / Destructor */
/* */
/* ------------------------------------------------------------------------- */
/*
Nothing really intesting happens here.
*/
/*!
*/
Vt102Emulation::Vt102Emulation(WidgetLayer* gui) : EmulationLayer(gui)
{
QObject::connect(gui,SIGNAL(mouseSignal(int,int,int)),
this,SLOT(onMouse(int,int,int)));
initTokenizer();
reset();
}
/*!
*/
Vt102Emulation::~Vt102Emulation()
{
}
/*!
*/
void Vt102Emulation::reset()
{
resetToken();
resetModes();
resetCharset(0); screen[0]->reset();
resetCharset(1); screen[0]->reset();
setCodec(0);
setKeytrans("linux.keytab");
}
/* ------------------------------------------------------------------------- */
/* */
/* Processing the incoming byte stream */
/* */
/* ------------------------------------------------------------------------- */
/* Incoming Bytes Event pipeline
This section deals with decoding the incoming character stream.
Decoding means here, that the stream is first seperated into `tokens'
which are then mapped to a `meaning' provided as operations by the
`TEScreen' class or by the emulation class itself.
The pipeline proceeds as follows:
- Tokenizing the ESC codes (onRcvChar)
- VT100 code page translation of plain characters (applyCharset)
- Interpretation of ESC codes (tau)
The escape codes and their meaning are described in the
technical reference of this program.
*/
// Tokens ------------------------------------------------------------------ --
/*
Since the tokens are the central notion if this section, we've put them
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 @@
/* -------------------------------------------------------------------------- */
/* */
/* [TEmuVt102.h] X Terminal Emulation */
/* */
/* -------------------------------------------------------------------------- */
/* */
/* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */
/* */
/* This file is part of Konsole - an X terminal for KDE */
/* */
/* -------------------------------------------------------------------------- */
/* */
/* Ported Konsole to Qt/Embedded */
/* */
/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
/* */
/* -------------------------------------------------------------------------- */
/* Ported embedded-konsole to opie-terminal */
/* */
/* Copyright (C) 2002 by opie developers <opie@handhelds.org> */
/* */
/* -------------------------------------------------------------------------- */
#ifndef VT102EMU_H
#define VT102EMU_H
-#include "widget.h"
+#include "widget_layer.h"
#include "screen.h"
#include "emulation_layer.h"
#include <qtimer.h>
#include <stdio.h>
//
#define MODE_AppScreen (MODES_SCREEN+0)
#define MODE_AppCuKeys (MODES_SCREEN+1)
#define MODE_AppKeyPad (MODES_SCREEN+2)
#define MODE_Mouse1000 (MODES_SCREEN+3)
#define MODE_Ansi (MODES_SCREEN+4)
#define MODE_total (MODES_SCREEN+5)
struct DECpar
{
BOOL mode[MODE_total];
};
struct CharCodes
{
// coding info
char charset[4]; //
int cu_cs; // actual charset.
bool graphic; // Some VT100 tricks
bool pound ; // Some VT100 tricks
bool sa_graphic; // saved graphic
bool sa_pound; // saved pound
};
class Vt102Emulation: public EmulationLayer
{ Q_OBJECT
public:
Vt102Emulation(WidgetLayer* gui);
~Vt102Emulation();
public slots: // signals incoming from Widget
void onKeyPress(QKeyEvent*);
void onMouse(int cb, int cx, int cy);
signals:
void changeTitle(int,const QString&);
void prevSession();
void nextSession();
public:
void reset();
/**
* receive a char from IOLayer
*/
void onRcvChar(int cc);
/**
* sends a list of bytes to the IOLayer
*/
void sendString(const QByteArray&);
/**
* @deprecated use QByteArray instead
* see sendString() above
*/
void sendString(const char *);
public:
BOOL getMode (int m);
void setMode (int m);
void resetMode (int m);
void saveMode (int m);
void restoreMode(int m);
void resetModes();
void setConnect(bool r);
private:
void resetToken();
#define MAXPBUF 80
void pushToToken(int cc);
int pbuf[MAXPBUF]; //FIXME: overflow?
int ppos;
#define MAXARGS 15
void addDigit(int dig);
void addArgument();
int argv[MAXARGS];
int argc;
void initTokenizer();
int tbl[256];