|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Terminal abstraction for WASM/Emscripten via EM_JS bridge to xterm.js. More...
Go to the source code of this file.
Functions | |
| EM_JS (int, js_get_terminal_cols,(), { return Module.xterm ? Module.xterm.cols :80;}) | |
| EM_JS (int, js_get_terminal_rows,(), { return Module.xterm ? Module.xterm.rows :24;}) | |
| EM_JS (void, js_terminal_write,(const char *data, int len), { if(Module.xterm) { Module.xterm.write(UTF8ToString(data, len));} }) | |
| int | platform_get_terminal_size (int *cols, int *rows) |
| int | platform_write_terminal (const char *data, size_t len) |
| int | platform_set_terminal_raw_mode (bool enable) |
| int | platform_read_keyboard (char *buffer, size_t len) |
| bool | platform_is_terminal (int fd) |
| int | platform_get_cursor_position (int *row, int *col) |
| int | platform_set_cursor_position (int row, int col) |
| asciichat_error_t | get_terminal_size (unsigned short int *width, unsigned short int *height) |
| bool | terminal_supports_utf8 (void) |
| bool | terminal_is_piped_output (void) |
| bool | terminal_should_color_output (int fd) |
| bool | terminal_is_stdin_tty (void) |
| bool | terminal_is_stdout_tty (void) |
| bool | terminal_is_stderr_tty (void) |
| bool | terminal_is_interactive (void) |
| bool | terminal_should_force_stderr (void) |
| bool | terminal_can_prompt_user (void) |
| bool | terminal_has_dark_background (void) |
| asciichat_error_t | terminal_flush (int fd) |
| terminal_capabilities_t | detect_terminal_capabilities (void) |
| bool | terminal_query_background_color (uint8_t *bg_r, uint8_t *bg_g, uint8_t *bg_b) |
Terminal abstraction for WASM/Emscripten via EM_JS bridge to xterm.js.
Definition in file platform/wasm/terminal.c.
| terminal_capabilities_t detect_terminal_capabilities | ( | void | ) |
Definition at line 146 of file platform/wasm/terminal.c.
References platform_strlcpy().
Referenced by action_show_capabilities_immediate(), log_redetect_terminal_capabilities(), main(), session_display_create(), and threaded_send_terminal_size_with_auto_detect().
| EM_JS | ( | int | , |
| js_get_terminal_cols | , | ||
| () | , | ||
| { return Module.xterm ? Module.xterm.cols :80;} | |||
| ) |
| EM_JS | ( | int | , |
| js_get_terminal_rows | , | ||
| () | , | ||
| { return Module.xterm ? Module.xterm.rows :24;} | |||
| ) |
| EM_JS | ( | void | , |
| js_terminal_write | , | ||
| (const char *data, int len) | , | ||
| { if(Module.xterm) { Module.xterm.write(UTF8ToString(data, len));} } | |||
| ) |
| asciichat_error_t get_terminal_size | ( | unsigned short int * | width, |
| unsigned short int * | height | ||
| ) |
Definition at line 80 of file platform/wasm/terminal.c.
References platform_get_terminal_size().
Referenced by session_display_create(), update_dimensions_for_full_height(), and update_dimensions_to_terminal_size().
| int platform_get_cursor_position | ( | int * | row, |
| int * | col | ||
| ) |
Definition at line 67 of file platform/wasm/terminal.c.
| int platform_get_terminal_size | ( | int * | cols, |
| int * | rows | ||
| ) |
Definition at line 33 of file platform/wasm/terminal.c.
Referenced by get_terminal_size().
| bool platform_is_terminal | ( | int | fd | ) |
Definition at line 62 of file platform/wasm/terminal.c.
| int platform_read_keyboard | ( | char * | buffer, |
| size_t | len | ||
| ) |
Definition at line 56 of file platform/wasm/terminal.c.
| int platform_set_cursor_position | ( | int | row, |
| int | col | ||
| ) |
Definition at line 73 of file platform/wasm/terminal.c.
| int platform_set_terminal_raw_mode | ( | bool | enable | ) |
Definition at line 51 of file platform/wasm/terminal.c.
| int platform_write_terminal | ( | const char * | data, |
| size_t | len | ||
| ) |
Definition at line 45 of file platform/wasm/terminal.c.
| bool terminal_can_prompt_user | ( | void | ) |
Definition at line 130 of file platform/wasm/terminal.c.
| asciichat_error_t terminal_flush | ( | int | fd | ) |
Definition at line 140 of file platform/wasm/terminal.c.
Referenced by ascii_write(), config_create_default(), session_display_render_frame(), session_display_render_help(), session_display_reset(), and session_display_write_raw().
| bool terminal_has_dark_background | ( | void | ) |
Definition at line 135 of file platform/wasm/terminal.c.
Referenced by detect_terminal_background().
| bool terminal_is_interactive | ( | void | ) |
Definition at line 122 of file platform/wasm/terminal.c.
| bool terminal_is_piped_output | ( | void | ) |
Definition at line 99 of file platform/wasm/terminal.c.
| bool terminal_is_stderr_tty | ( | void | ) |
Definition at line 118 of file platform/wasm/terminal.c.
| bool terminal_is_stdin_tty | ( | void | ) |
Definition at line 110 of file platform/wasm/terminal.c.
| bool terminal_is_stdout_tty | ( | void | ) |
Definition at line 114 of file platform/wasm/terminal.c.
| bool terminal_query_background_color | ( | uint8_t * | bg_r, |
| uint8_t * | bg_g, | ||
| uint8_t * | bg_b | ||
| ) |
Definition at line 164 of file platform/wasm/terminal.c.
| bool terminal_should_color_output | ( | int | fd | ) |
Definition at line 104 of file platform/wasm/terminal.c.
| bool terminal_should_force_stderr | ( | void | ) |
Definition at line 126 of file platform/wasm/terminal.c.
| bool terminal_supports_utf8 | ( | void | ) |
Definition at line 94 of file platform/wasm/terminal.c.
Referenced by detect_client_utf8_support(), and options_init().