2 * SPDX-License-Identifier: MIT
4 * Copyright 2019 Philippe Proulx <pproulx@efficios.com>
7 #ifndef BABELTRACE_PLUGINS_TEXT_DETAILS_COLORS_H
8 #define BABELTRACE_PLUGINS_TEXT_DETAILS_COLORS_H
10 #include "common/common.h"
15 const char *color_reset(struct details_write_ctx
*ctx
)
17 const char *code
= "";
19 if (ctx
->details_comp
->cfg
.with_color
) {
20 code
= bt_common_color_reset();
27 const char *color_bold(struct details_write_ctx
*ctx
)
29 const char *code
= "";
31 if (ctx
->details_comp
->cfg
.with_color
) {
32 code
= bt_common_color_bold();
39 const char *color_fg_default(struct details_write_ctx
*ctx
)
41 const char *code
= "";
43 if (ctx
->details_comp
->cfg
.with_color
) {
44 code
= bt_common_color_fg_default();
51 const char *color_fg_red(struct details_write_ctx
*ctx
)
53 const char *code
= "";
55 if (ctx
->details_comp
->cfg
.with_color
) {
56 code
= bt_common_color_fg_red();
63 const char *color_fg_green(struct details_write_ctx
*ctx
)
65 const char *code
= "";
67 if (ctx
->details_comp
->cfg
.with_color
) {
68 code
= bt_common_color_fg_green();
75 const char *color_fg_yellow(struct details_write_ctx
*ctx
)
77 const char *code
= "";
79 if (ctx
->details_comp
->cfg
.with_color
) {
80 code
= bt_common_color_fg_yellow();
87 const char *color_fg_blue(struct details_write_ctx
*ctx
)
89 const char *code
= "";
91 if (ctx
->details_comp
->cfg
.with_color
) {
92 code
= bt_common_color_fg_blue();
99 const char *color_fg_magenta(struct details_write_ctx
*ctx
)
101 const char *code
= "";
103 if (ctx
->details_comp
->cfg
.with_color
) {
104 code
= bt_common_color_fg_magenta();
111 const char *color_fg_cyan(struct details_write_ctx
*ctx
)
113 const char *code
= "";
115 if (ctx
->details_comp
->cfg
.with_color
) {
116 code
= bt_common_color_fg_cyan();
123 const char *color_fg_light_gray(struct details_write_ctx
*ctx
)
125 const char *code
= "";
127 if (ctx
->details_comp
->cfg
.with_color
) {
128 code
= bt_common_color_fg_light_gray();
135 const char *color_fg_bright_red(struct details_write_ctx
*ctx
)
137 const char *code
= "";
139 if (ctx
->details_comp
->cfg
.with_color
) {
140 code
= bt_common_color_fg_bright_red();
147 const char *color_fg_bright_green(struct details_write_ctx
*ctx
)
149 const char *code
= "";
151 if (ctx
->details_comp
->cfg
.with_color
) {
152 code
= bt_common_color_fg_bright_green();
159 const char *color_fg_bright_yellow(struct details_write_ctx
*ctx
)
161 const char *code
= "";
163 if (ctx
->details_comp
->cfg
.with_color
) {
164 code
= bt_common_color_fg_bright_yellow();
171 const char *color_fg_bright_blue(struct details_write_ctx
*ctx
)
173 const char *code
= "";
175 if (ctx
->details_comp
->cfg
.with_color
) {
176 code
= bt_common_color_fg_bright_blue();
183 const char *color_fg_bright_magenta(struct details_write_ctx
*ctx
)
185 const char *code
= "";
187 if (ctx
->details_comp
->cfg
.with_color
) {
188 code
= bt_common_color_fg_bright_magenta();
195 const char *color_fg_bright_cyan(struct details_write_ctx
*ctx
)
197 const char *code
= "";
199 if (ctx
->details_comp
->cfg
.with_color
) {
200 code
= bt_common_color_fg_bright_cyan();
207 const char *color_fg_bright_light_gray(struct details_write_ctx
*ctx
)
209 const char *code
= "";
211 if (ctx
->details_comp
->cfg
.with_color
) {
212 code
= bt_common_color_fg_bright_light_gray();
219 const char *color_bg_default(struct details_write_ctx
*ctx
)
221 const char *code
= "";
223 if (ctx
->details_comp
->cfg
.with_color
) {
224 code
= bt_common_color_bg_default();
231 const char *color_bg_red(struct details_write_ctx
*ctx
)
233 const char *code
= "";
235 if (ctx
->details_comp
->cfg
.with_color
) {
236 code
= bt_common_color_bg_red();
243 const char *color_bg_green(struct details_write_ctx
*ctx
)
245 const char *code
= "";
247 if (ctx
->details_comp
->cfg
.with_color
) {
248 code
= bt_common_color_bg_green();
255 const char *color_bg_yellow(struct details_write_ctx
*ctx
)
257 const char *code
= "";
259 if (ctx
->details_comp
->cfg
.with_color
) {
260 code
= bt_common_color_bg_yellow();
267 const char *color_bg_blue(struct details_write_ctx
*ctx
)
269 const char *code
= "";
271 if (ctx
->details_comp
->cfg
.with_color
) {
272 code
= bt_common_color_bg_blue();
279 const char *color_bg_magenta(struct details_write_ctx
*ctx
)
281 const char *code
= "";
283 if (ctx
->details_comp
->cfg
.with_color
) {
284 code
= bt_common_color_bg_magenta();
291 const char *color_bg_cyan(struct details_write_ctx
*ctx
)
293 const char *code
= "";
295 if (ctx
->details_comp
->cfg
.with_color
) {
296 code
= bt_common_color_bg_cyan();
303 const char *color_bg_light_gray(struct details_write_ctx
*ctx
)
305 const char *code
= "";
307 if (ctx
->details_comp
->cfg
.with_color
) {
308 code
= bt_common_color_bg_light_gray();
314 #endif /* BABELTRACE_PLUGINS_TEXT_DETAILS_COLORS_H */
This page took 0.035494 seconds and 5 git commands to generate.