ELinks 0.18.0
|
Terminal interface - low-level displaying implementation. More...
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include "elinks.h"
#include "bookmarks/bookmarks.h"
#include "config/options.h"
#include "main/main.h"
#include "main/module.h"
#include "main/object.h"
#include "main/select.h"
#include "osdep/osdep.h"
#include "osdep/signals.h"
#include "session/download.h"
#include "session/session.h"
#include "terminal/draw.h"
#include "terminal/event.h"
#include "terminal/hardio.h"
#include "terminal/kbd.h"
#include "terminal/screen.h"
#include "terminal/terminal.h"
#include "terminal/window.h"
#include "util/error.h"
#include "util/hash.h"
#include "util/memory.h"
#include "util/string.h"
#include "viewer/text/textarea.h"
Functions | |
static void | check_if_no_terminal (void) |
void | clean_temporary_files (void) |
long | get_number_of_temporary_files (void) |
static void | save_temporary_filename (const char *filename) |
void | redraw_terminal (struct terminal *term) |
void | redraw_terminal_cls (struct terminal *term) |
void | cls_redraw_all_terminals (void) |
struct terminal * | get_default_terminal (void) |
Get the terminal in which message boxes should be displayed, if there is no specific reason to use some other terminal. | |
struct terminal * | init_term (int fdin, int fdout) |
int | get_terminal_codepage (const struct terminal *term) |
Get the codepage of a terminal. | |
void | redraw_all_terminals (void) |
void | destroy_terminal (struct terminal *term) |
void | destroy_all_terminals (void) |
void | exec_thread (char *path, int p) |
void | close_handle (void *h) |
static void | unblock_terminal (struct terminal *term) |
void | assert_terminal_ptr_not_dangling (const struct terminal *suspect) |
static void | exec_on_master_terminal (struct terminal *term, const char *path, int plen, const char *delete_, int dlen, term_exec_T fg) |
static void | exec_on_slave_terminal (struct terminal *term, const char *path, int plen, const char *delete_, int dlen, term_exec_T fg) |
void | exec_on_terminal (struct terminal *term, const char *path, const char *delete_, term_exec_T fg) |
void | exec_shell (struct terminal *term) |
void | do_terminal_function (struct terminal *term, unsigned char code, const char *data) |
int | set_terminal_title (struct terminal *term, char *title) |
int | check_terminal_pipes (void) |
void | close_terminal_pipes (void) |
struct terminal * | attach_terminal (int in, int out, int ctl, void *info, int len) |
Variables | |
struct terminal list | terminals = { D_LIST_HEAD_EL(terminals) } |
We keep track about all the terminals in this list. | |
struct hash * | temporary_files |
static int | terminal_pipe [2] |
static struct module * | terminal_submodules [] |
struct module | terminal_module |
Terminal interface - low-level displaying implementation.
void assert_terminal_ptr_not_dangling | ( | const struct terminal * | suspect | ) |
struct terminal * attach_terminal | ( | int | in, |
int | out, | ||
int | ctl, | ||
void * | info, | ||
int | len ) |
|
static |
int check_terminal_pipes | ( | void | ) |
void clean_temporary_files | ( | void | ) |
void close_handle | ( | void * | h | ) |
void close_terminal_pipes | ( | void | ) |
void cls_redraw_all_terminals | ( | void | ) |
void destroy_all_terminals | ( | void | ) |
void destroy_terminal | ( | struct terminal * | term | ) |
void do_terminal_function | ( | struct terminal * | term, |
unsigned char | code, | ||
const char * | data ) |
|
static |
|
static |
void exec_on_terminal | ( | struct terminal * | term, |
const char * | path, | ||
const char * | delete_, | ||
term_exec_T | fg ) |
void exec_shell | ( | struct terminal * | term | ) |
void exec_thread | ( | char * | path, |
int | p ) |
struct terminal * get_default_terminal | ( | void | ) |
Get the terminal in which message boxes should be displayed, if there is no specific reason to use some other terminal.
This returns NULL if all terminals have been closed. (ELinks keeps running anyway if ui.sessions.keep_session_active is true.)
long get_number_of_temporary_files | ( | void | ) |
int get_terminal_codepage | ( | const struct terminal * | term | ) |
Get the codepage of a terminal.
The UTF-8 I/O option does not affect this.
struct terminal * init_term | ( | int | fdin, |
int | fdout ) |
void redraw_all_terminals | ( | void | ) |
void redraw_terminal | ( | struct terminal * | term | ) |
void redraw_terminal_cls | ( | struct terminal * | term | ) |
|
static |
int set_terminal_title | ( | struct terminal * | term, |
char * | title ) |
|
static |
struct hash* temporary_files |
struct module terminal_module |
|
static |
|
static |
struct terminal list terminals = { D_LIST_HEAD_EL(terminals) } |
We keep track about all the terminals in this list.
The list is sorted so that terminals.next is the terminal from which ELinks most recently got an event. But please call get_default_terminal() for that.