2011-12-22 15:19:25 +00:00
|
|
|
/*
|
|
|
|
* \brief Character-screen interface
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2011-06-06
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2011-2017 Genode Labs GmbH
|
2011-12-22 15:19:25 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2011-12-22 15:19:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _TERMINAL__CHARACTER_SCREEN_H_
|
|
|
|
#define _TERMINAL__CHARACTER_SCREEN_H_
|
|
|
|
|
|
|
|
#include <terminal/types.h>
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
namespace Terminal { struct Character_screen; }
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Character-screen interface called by input-stream decoder
|
|
|
|
*/
|
2018-02-06 20:32:02 +00:00
|
|
|
struct Terminal::Character_screen : Genode::Interface
|
2015-03-04 20:12:14 +00:00
|
|
|
{
|
|
|
|
virtual void output(Character c) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/*******************
|
|
|
|
** VT Operations **
|
|
|
|
*******************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The VT operations are named according to the command names used by
|
|
|
|
* their respective terminfo definitions. See 'man 5 terminfo' for a
|
|
|
|
* thorough description of these commands.
|
|
|
|
*/
|
|
|
|
|
2018-04-03 14:46:04 +00:00
|
|
|
/**
|
|
|
|
* Back tab
|
|
|
|
*/
|
|
|
|
virtual void cbt() = 0;
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
/**
|
|
|
|
* Make cursor invisible
|
|
|
|
*/
|
|
|
|
virtual void civis() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Make cursor normal
|
|
|
|
*/
|
|
|
|
virtual void cnorm() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Make cursor very visible
|
|
|
|
*/
|
|
|
|
virtual void cvvis() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Change region to line #1 ... line #2
|
|
|
|
*/
|
|
|
|
virtual void csr(int, int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Move cursor backwards
|
|
|
|
*/
|
|
|
|
virtual void cub(int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Non-destructive space - move right #1 spaces
|
|
|
|
*/
|
|
|
|
virtual void cuf(int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Move cursor to row #1 column #2
|
|
|
|
*/
|
|
|
|
virtual void cup(int, int) = 0;
|
|
|
|
|
2018-04-03 14:46:04 +00:00
|
|
|
/**
|
|
|
|
* Down #1 lines
|
|
|
|
*/
|
|
|
|
virtual void cud(int) = 0;
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
/**
|
|
|
|
* Move cursor up one line
|
|
|
|
*/
|
|
|
|
virtual void cuu1() = 0;
|
|
|
|
|
2018-04-03 14:46:04 +00:00
|
|
|
/**
|
|
|
|
* Up #1 lines
|
|
|
|
*/
|
|
|
|
virtual void cuu(int) = 0;
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
/**
|
|
|
|
* Delete #1 characters
|
|
|
|
*/
|
|
|
|
virtual void dch(int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete #1 lines
|
|
|
|
*/
|
|
|
|
virtual void dl(int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Clear to end of screen
|
|
|
|
*/
|
|
|
|
virtual void ed() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Clear to end of line
|
|
|
|
*/
|
|
|
|
virtual void el() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Clear to beginning of line
|
|
|
|
*/
|
|
|
|
virtual void el1() = 0;
|
|
|
|
|
|
|
|
/**
|
2018-04-03 14:46:04 +00:00
|
|
|
* Enable alternative character set
|
2015-03-04 20:12:14 +00:00
|
|
|
*/
|
2018-04-03 14:46:04 +00:00
|
|
|
virtual void enacs() = 0;
|
2015-03-04 20:12:14 +00:00
|
|
|
|
|
|
|
/**
|
2018-04-03 14:46:04 +00:00
|
|
|
* Visible bell
|
2015-03-04 20:12:14 +00:00
|
|
|
*/
|
2018-04-03 14:46:04 +00:00
|
|
|
virtual void flash() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Home cursor
|
|
|
|
*/
|
|
|
|
virtual void home() = 0;
|
2015-03-04 20:12:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a tab in every row, current column
|
|
|
|
*/
|
|
|
|
virtual void hts() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Insert #1 characters
|
|
|
|
*/
|
|
|
|
virtual void ich(int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Insert #1 lines
|
|
|
|
*/
|
|
|
|
virtual void il(int) = 0;
|
|
|
|
|
|
|
|
/**
|
2018-04-03 14:46:04 +00:00
|
|
|
* Initialization string
|
|
|
|
*/
|
|
|
|
virtual void is2() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Newline
|
2015-03-04 20:12:14 +00:00
|
|
|
*/
|
2018-04-03 14:46:04 +00:00
|
|
|
virtual void nel() = 0;
|
2015-03-04 20:12:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set default pair to its original value
|
|
|
|
*/
|
|
|
|
virtual void op() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Restore cursor to position of last save_cursor
|
|
|
|
*/
|
|
|
|
virtual void rc() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reset string
|
|
|
|
*/
|
2018-04-03 14:46:04 +00:00
|
|
|
virtual void rs2() = 0;
|
2015-03-04 20:12:14 +00:00
|
|
|
|
|
|
|
/**
|
2018-04-03 14:46:04 +00:00
|
|
|
* Leave cup mode
|
2015-03-04 20:12:14 +00:00
|
|
|
*/
|
2018-04-03 14:46:04 +00:00
|
|
|
virtual void rmcup() = 0;
|
2015-03-04 20:12:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Exit insert mode
|
|
|
|
*/
|
|
|
|
virtual void rmir() = 0;
|
|
|
|
|
2018-04-03 14:46:04 +00:00
|
|
|
/**
|
|
|
|
* Exit keyboard transmission mode
|
|
|
|
*/
|
|
|
|
virtual void rmkx() = 0;
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
/**
|
|
|
|
* Set background color to #1, using ANSI escape
|
|
|
|
*/
|
|
|
|
virtual void setab(int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set foreground color to #1, using ANSI escape
|
|
|
|
*/
|
|
|
|
virtual void setaf(int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set attribute
|
|
|
|
*/
|
|
|
|
virtual void sgr(int) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Turn of all attributes
|
|
|
|
*/
|
|
|
|
virtual void sgr0() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Save current cursor position
|
|
|
|
*/
|
|
|
|
virtual void sc() = 0;
|
|
|
|
|
|
|
|
/**
|
2018-04-03 14:46:04 +00:00
|
|
|
* Enter cup mode
|
2015-03-04 20:12:14 +00:00
|
|
|
*/
|
2018-04-03 14:46:04 +00:00
|
|
|
virtual void smcup() = 0;
|
2015-03-04 20:12:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Enter insert mode
|
|
|
|
*/
|
|
|
|
virtual void smir() = 0;
|
|
|
|
|
|
|
|
/**
|
2018-04-03 14:46:04 +00:00
|
|
|
* Enter keyboard transmission mode
|
2015-03-04 20:12:14 +00:00
|
|
|
*/
|
2018-04-03 14:46:04 +00:00
|
|
|
virtual void smkx() = 0;
|
2015-03-04 20:12:14 +00:00
|
|
|
|
|
|
|
/**
|
2018-04-03 14:46:04 +00:00
|
|
|
* Clear all tab stops
|
2015-03-04 20:12:14 +00:00
|
|
|
*/
|
2018-04-03 14:46:04 +00:00
|
|
|
virtual void tbc() = 0;
|
2015-03-04 20:12:14 +00:00
|
|
|
};
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#endif /* _TERMINAL__CHARACTER_SCREEN_H_ */
|