ELinks 0.18.0
Data Structures | Functions | Variables
screen.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  terminal_screen
 The terminal's screen manages. More...
 

Functions

void set_screen_dirty (struct terminal_screen *screen, int from, int to)
 Mark the screen ready for redrawing.
 
struct terminal_screen * init_screen (void)
 Initializes a screen.
 
void done_screen (struct terminal_screen *screen)
 Cleans up after the screen.
 
void resize_screen (struct terminal *term, int x, int y)
 Update the size of the previous and the current screen image to hold x time y chars.
 
void redraw_screen (struct terminal *term)
 Updates the terminal screen.
 
void erase_screen (struct terminal *term)
 Erases the entire screen and moves the cursor to the upper left corner.
 
void beep_terminal (struct terminal *term)
 Meeep!
 
struct string * add_cursor_move_to_string (struct string *screen, int y, int x)
 Adds the term code for positioning the cursor at x and y to string.
 

Variables

struct module terminal_screen_module
 

Function Documentation

◆ add_cursor_move_to_string()

struct string * add_cursor_move_to_string ( struct string *  screen,
int  y,
int  x 
)

Adds the term code for positioning the cursor at x and y to string.

The template term code is: "\033[<y>;<x>H"

◆ beep_terminal()

void beep_terminal ( struct terminal *  term)

Meeep!

◆ done_screen()

void done_screen ( struct terminal_screen *  screen)

Cleans up after the screen.

◆ erase_screen()

void erase_screen ( struct terminal *  term)

Erases the entire screen and moves the cursor to the upper left corner.

◆ init_screen()

struct terminal_screen * init_screen ( void  )

Initializes a screen.

Returns NULL upon allocation failure.

◆ redraw_screen()

void redraw_screen ( struct terminal *  term)

Updates the terminal screen.

Updating of the terminal screen is done by checking what needs to be updated using the last screen.

◆ resize_screen()

void resize_screen ( struct terminal *  term,
int  width,
int  height 
)

Update the size of the previous and the current screen image to hold x time y chars.

The two images are allocated in one chunk.

Todo:
TODO: It seems allocation failure here is fatal. We should do something!

◆ set_screen_dirty()

void set_screen_dirty ( struct terminal_screen *  screen,
int  from,
int  to 
)

Mark the screen ready for redrawing.

Variable Documentation

◆ terminal_screen_module

struct module terminal_screen_module
extern