Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
console.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Roc Streaming 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_pc/roc_core/console.h
10//! @brief Console functions.
11
12#ifndef ROC_CORE_CONSOLE_H_
13#define ROC_CORE_CONSOLE_H_
14
15#include "roc_core/attributes.h"
16
17namespace roc {
18namespace core {
19
20//! Color ID.
21enum Color {
22 Color_None,
23 Color_White,
24 Color_Gray,
25 Color_Red,
26 Color_Green,
27 Color_Yellow,
28 Color_Blue,
29 Color_Magenta,
30 Color_Cyan
31};
32
33//! Check if colors can be used.
35
36//! Print line.
37ROC_ATTR_PRINTF(1, 2) void console_println(const char* format, ...);
38
39//! Print line (with color).
40ROC_ATTR_PRINTF(2, 3) void console_println(Color color, const char* format, ...);
41
42} // namespace core
43} // namespace roc
44
45#endif // ROC_CORE_CONSOLE_H_
Compiler attributes.
#define ROC_ATTR_PRINTF(fmt_pos, args_pos)
Function gets printf-like arguments.
Definition attributes.h:35
void console_println(const char *format,...)
Print line.
bool console_supports_colors()
Check if colors can be used.
Color
Color ID.
Definition console.h:21
Root namespace.