Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
colors.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 Roc authors
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
*/
8
9
//! @file roc_core/target_posix/roc_core/colors.h
10
//! @brief Colorization functions.
11
12
#ifndef ROC_CORE_COLORS_H_
13
#define ROC_CORE_COLORS_H_
14
15
#include "
roc_core/log.h
"
16
#include "
roc_core/stddefs.h
"
17
18
namespace
roc
{
19
namespace
core {
20
21
//! Check if current stderr is connected to a tty.
22
bool
colors_available
();
23
24
//! Fill colored str into buf according to the log level.
25
bool
format_colored
(
LogLevel
level,
const
char
* str,
char
* buf,
size_t
bufsz);
26
27
}
// namespace core
28
}
// namespace roc
29
30
#endif
// ROC_CORE_COLORS_H_
log.h
Logging.
roc::core::format_colored
bool format_colored(LogLevel level, const char *str, char *buf, size_t bufsz)
Fill colored str into buf according to the log level.
roc::core::colors_available
bool colors_available()
Check if current stderr is connected to a tty.
roc
Root namespace.
roc::LogLevel
LogLevel
Log level.
Definition:
log.h:31
stddefs.h
Commonly used types and functions.
roc_core
target_posix
roc_core
colors.h
Generated by
1.9.1