rlib
Convenience library for useful things
Loading...
Searching...
No Matches
rclr.h
Go to the documentation of this file.
1/* RLIB - Convenience library for useful things
2 * Copyright (C) 2015 Haakon Sporsheim <haakon.sporsheim@gmail.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 3.0 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library.
16 * See the COPYING file at the root of the source repository.
17 */
18#ifndef __R_CLR_H__
19#define __R_CLR_H__
20
27#include <rlib/rtypes.h>
28
50
53#define R_CLR_BLACK 0
54#define R_CLR_RED 1
55#define R_CLR_GREEN 2
56#define R_CLR_YELLOW 3
57#define R_CLR_BLUE 4
58#define R_CLR_MAGENTA 5
59#define R_CLR_CYAN 6
60#define R_CLR_WHITE 7
61#define R_CLR_EXT 8
62#define R_CLR_DEFAULT 9
66#define R_CLR_FG_SHIFT 0
68#define R_CLR_BG_SHIFT 4
69
101
103#define R_CLR_FG_MASK 0x000F
105#define R_CLR_BG_MASK 0x00F0
107#define R_CLR_FMT_MASK 0xFF00
108
109R_END_DECLS
110
113#endif /* __R_CLR_H__ */
114
#define R_CLR_DEFAULT
Definition rclr.h:62
#define R_CLR_BLUE
Definition rclr.h:57
#define R_CLR_GREEN
Definition rclr.h:55
#define R_CLR_YELLOW
Definition rclr.h:56
#define R_CLR_EXT
Definition rclr.h:61
#define R_CLR_FG_SHIFT
Bit shift for the foreground colour nibble.
Definition rclr.h:66
#define R_CLR_CYAN
Definition rclr.h:59
RColorFlags
Combined foreground / background / attribute flags.
Definition rclr.h:77
#define R_CLR_RED
Definition rclr.h:54
#define R_CLR_BG_SHIFT
Bit shift for the background colour nibble.
Definition rclr.h:68
#define R_CLR_MAGENTA
Definition rclr.h:58
#define R_CLR_BLACK
Definition rclr.h:53
#define R_CLR_WHITE
Definition rclr.h:60
@ R_CLR_FG_EXT
Definition rclr.h:86
@ R_CLR_BG_BLACK
Definition rclr.h:88
@ R_CLR_BG_YELLOW
Definition rclr.h:91
@ R_CLR_FG_CYAN
Definition rclr.h:84
@ R_CLR_FG_GREEN
Definition rclr.h:80
@ R_CLR_FG_RED
Definition rclr.h:79
@ R_CLR_BG_GREEN
Definition rclr.h:90
@ R_CLR_BG_RED
Definition rclr.h:89
@ R_CLR_BG_DEFAULT
Definition rclr.h:97
@ R_CLR_BG_EXT
Definition rclr.h:96
@ R_CLR_BG_MAGENTA
Definition rclr.h:93
@ R_CLR_FG_BLUE
Definition rclr.h:82
@ R_CLR_FG_MAGENTA
Definition rclr.h:83
@ R_CLR_FG_YELLOW
Definition rclr.h:81
@ R_CLR_BG_BLUE
Definition rclr.h:92
@ R_CLR_FG_WHITE
Definition rclr.h:85
@ R_CLR_BG_WHITE
Definition rclr.h:95
@ R_CLR_BG_CYAN
Definition rclr.h:94
@ R_CLR_FG_DEFAULT
Definition rclr.h:87
@ R_CLR_FMT_BOLD
Definition rclr.h:98
@ R_CLR_FG_BLACK
Definition rclr.h:78
@ R_CLR_FMT_UNDERLINE
Definition rclr.h:99
#define R_BEGIN_DECLS
Open an extern "C" block under C++ (no-op in C).
Definition rmacros.h:196
Foundational type aliases used by every rlib header.