dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::tty Struct Reference

the terminal behind a file descriptor: its presence, its raw mode and its background colour More...

#include <dx_ansi_colors.h>

Public Member Functions

bool operator ()(uint32_t fd) const noexcept
 true where the descriptor is a terminal

Static Public Member Functions

static uint8_t brightness(uint32_t color)
static uint32_t color(bool background)
 the terminal's foreground or background colour as 0xRRGGBB, asked with OSC 10/11 and read back from the answer; 0 where nothing answers within 150 ms
static bool dark()
 the terminal's background, probed once at the first themed output
static void raw(bool enable)
 line buffering and echo off, so a terminal's answer can be read back character by character

Static Public Attributes

static bool headless{}

Detailed Description

the terminal behind a file descriptor: its presence, its raw mode and its background colour

Member Function Documentation

◆ brightness()

uint8_t dx::tty::brightness(uint32_t color)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ color()

uint32_t dx::tty::color(bool background)
inlinestatic

the terminal's foreground or background colour as 0xRRGGBB, asked with OSC 10/11 and read back from the answer; 0 where nothing answers within 150 ms

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dark()

bool dx::tty::dark()
inlinestatic

the terminal's background, probed once at the first themed output

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator ()()

bool dx::tty::operator ()(uint32_t fd) const
inlinenoexcept

true where the descriptor is a terminal

◆ raw()

void dx::tty::raw(bool enable)
inlinestatic

line buffering and echo off, so a terminal's answer can be read back character by character

Here is the caller graph for this function:

Member Data Documentation

◆ headless

bool dx::tty::headless{}
inlinestatic

the terminal is the host's (dx::process::initialize(true)): it is never queried


The documentation for this struct was generated from the following file: