Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

screen.h File Reference

High level library for handling the terminal screen. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  screen_t
 The struct representing the current and desired screen contents. More...
struct  line_t
 A struct representing a single line of a screen. More...

Functions

void s_init (screen_t *s)
 Initialize a new screen struct.
void s_destroy (screen_t *s)
 Free all memory used by the specified screen struct.
void s_write (screen_t *s, wchar_t *prompt, wchar_t *commandline, int *colors, int *indent, int cursor_pos)
 This is the main function for the screen putput library.
void s_reset (screen_t *s, int reset_cursor)
 This function resets the screen buffers internal knowledge about the contents of the screen.


Detailed Description

High level library for handling the terminal screen.

The screen library allows the interactive reader to write its output to screen efficiently by keeping an inetrnal representation of the current screen contents and trying to find the most efficient way for transforming that to the desired screen content.


Function Documentation

void s_reset screen_t s,
int  reset_cursor
 

This function resets the screen buffers internal knowledge about the contents of the screen.

Use this function when some other function than s_write has written to the screen.

Parameters:
s the screen to reset
reset_cursor whether the line on which the curor has changed should be assumed to have changed. If reset_cursor is set to 0, the library will attempt to make sure that the screen area does not seem to move up or down on repaint.
If reset_cursor is incorreclt set to 0, this may result in screen contents being erased. If it is incorrectly set to one, it may result in one or more lines of garbage on screen on the next repaint. If this happens during a loop, such as an interactive resizing, there will be one line of garbage for every repaint, which will quicly fill the screen.

void s_write screen_t s,
wchar_t *  prompt,
wchar_t *  commandline,
int *  colors,
int *  indent,
int  cursor_pos
 

This is the main function for the screen putput library.

It is used to define the desired contents of the screen. The screen command will use it's knowlege of the current contents of the screen in order to render the desired output using as few terminal commands as possible.


Generated on Sun Jan 13 02:53:11 2008 for fish by  doxygen 1.4.4