summaryrefslogtreecommitdiff
path: root/include/ncurses/colors.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/ncurses/colors.hpp')
-rw-r--r--include/ncurses/colors.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/ncurses/colors.hpp b/include/ncurses/colors.hpp
index a0622a9..e045ebb 100644
--- a/include/ncurses/colors.hpp
+++ b/include/ncurses/colors.hpp
@@ -8,6 +8,7 @@
namespace NCURSES_CPP_NAMESPACE {
+// TODO: there is no usage for this for now
enum class curs_color {
black = COLOR_BLACK,
red = COLOR_RED,
@@ -25,17 +26,19 @@ struct rgb_color {
unsigned char b;
};
-NCURSES_CPP_CONSTEXPR static int
+NCURSES_CPP_CONSTEXPR_INLINE static int
rgb_to_curses(unsigned char c) NCURSES_CPP_NOEXCEPT {
return static_cast<int>(c) * 1000 / 255;
}
-NCURSES_CPP_CONSTEXPR static unsigned char
+NCURSES_CPP_CONSTEXPR_INLINE static unsigned char
curses_to_rgb(int c) NCURSES_CPP_NOEXCEPT {
return static_cast<unsigned char>((c * 255 / 1000) +
(c * 255 % 1000 == 0 ? 0 : 1));
}
+// TODO: start_color maybe needs to be defined somewhere else
+
inline bool has_colors() { return static_cast<bool>(::has_colors()); }
inline bool can_change_color() {