|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Cross-platform unified color detection and terminal capabilities. More...
Go to the source code of this file.
Functions | |
| bool | terminal_should_color_output (int fd) |
| Determine if color output should be used. | |
| terminal_color_mode_t | terminal_get_effective_color_mode (void) |
| Get current color mode considering all overrides. | |
| 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_is_piped_output (void) |
| bool | terminal_should_force_stderr (void) |
| bool | terminal_can_prompt_user (void) |
| int | terminal_choose_log_fd (log_level_t level) |
Cross-platform unified color detection and terminal capabilities.
Definition in file platform/terminal.c.
| bool terminal_can_prompt_user | ( | void | ) |
Definition at line 169 of file platform/terminal.c.
References terminal_is_interactive().
Referenced by prompt_unknown_host(), and server_main().
| int terminal_choose_log_fd | ( | log_level_t | level | ) |
Definition at line 190 of file platform/terminal.c.
References log_get_force_stderr(), and terminal_is_interactive().
Referenced by log_console_impl(), log_msg(), and log_plain_msg().
| terminal_color_mode_t terminal_get_effective_color_mode | ( | void | ) |
Get current color mode considering all overrides.
Determines effective color mode by checking:
Definition at line 114 of file platform/terminal.c.
References terminal_should_color_output().
| bool terminal_is_interactive | ( | void | ) |
Definition at line 148 of file platform/terminal.c.
References terminal_is_stdin_tty(), and terminal_is_stdout_tty().
Referenced by main(), server_main(), server_status_display(), server_status_display_interactive(), session_display_create(), session_display_render_frame(), session_render_loop(), splash_intro_start(), terminal_can_prompt_user(), terminal_choose_log_fd(), and threaded_send_terminal_size_with_auto_detect().
| bool terminal_is_piped_output | ( | void | ) |
Definition at line 152 of file platform/terminal.c.
References terminal_is_stdout_tty().
Referenced by asciichat_shared_init(), options_init(), and terminal_should_force_stderr().
| bool terminal_is_stderr_tty | ( | void | ) |
| bool terminal_is_stdin_tty | ( | void | ) |
Definition at line 136 of file platform/terminal.c.
References platform_isatty().
Referenced by display_init(), session_display_create(), terminal_is_interactive(), and threaded_send_terminal_size_with_auto_detect().
| bool terminal_is_stdout_tty | ( | void | ) |
Definition at line 140 of file platform/terminal.c.
References platform_isatty().
Referenced by session_client_like_run(), session_display_create(), terminal_is_interactive(), terminal_is_piped_output(), and threaded_send_terminal_size_with_auto_detect().
| bool terminal_should_color_output | ( | int | fd | ) |
Determine if color output should be used.
Priority order:
| fd | File descriptor to check (STDOUT_FILENO or STDERR_FILENO) |
Definition at line 31 of file platform/terminal.c.
References g_argc, g_argv, and platform_isatty().
Referenced by action_show_capabilities_immediate(), action_show_version(), colored_string(), colorize_log_message(), log_plain_msg(), and terminal_get_effective_color_mode().
| bool terminal_should_force_stderr | ( | void | ) |
Definition at line 156 of file platform/terminal.c.
References terminal_is_piped_output().
Referenced by main(), session_client_like_run(), and session_display_create().