ttx 0.1.0
Loading...
Searching...
No Matches
ttx::terminal::DarkLightModeDetectionReport Struct Reference

Dark/Light mode detection report. More...

#include <ttx/terminal/escapes/device_status.h>

Public Member Functions

auto serialize () const -> di::String
auto operator== (DarkLightModeDetectionReport const &other) const -> bool=default

Static Public Member Functions

static auto from_csi (CSI const &csi) -> di::Optional< DarkLightModeDetectionReport >

Public Attributes

ThemeMode mode { ThemeMode::Dark }

Friends

constexpr friend auto tag_invoke (di::Tag< di::reflect >, di::InPlaceType< DarkLightModeDetectionReport >)

Detailed Description

Dark/Light mode detection report.

This is requested via CSI ? 996 n, and indicates whether the user's color preference (light or dark mode). When unsolicited reports are enabled on palette changes (DEC private mode 2031), these reports are whenever the terminal's color scheme changes, or the color preference changes.

Member Function Documentation

◆ from_csi()

auto ttx::terminal::DarkLightModeDetectionReport::from_csi ( CSI const & csi) -> di::Optional< DarkLightModeDetectionReport >
static

◆ operator==()

auto ttx::terminal::DarkLightModeDetectionReport::operator== ( DarkLightModeDetectionReport const & other) const -> bool=default
default

◆ serialize()

auto ttx::terminal::DarkLightModeDetectionReport::serialize ( ) const -> di::String

◆ tag_invoke

friend auto tag_invoke ( di::Tag< di::reflect > ,
di::InPlaceType< DarkLightModeDetectionReport >  )
friend

Member Data Documentation

◆ mode

ThemeMode ttx::terminal::DarkLightModeDetectionReport::mode { ThemeMode::Dark }

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