aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-11-11 17:01:15 -0500
committerJesse Luehrs <doy@tozt.net>2021-11-11 17:01:15 -0500
commit1b445694b349bc39c7f144dd5cd946e7de85f6ba (patch)
tree77a0d9ae3c3f9a17c952b2b6d1011988574d65f1
parenta75279cbbcf8e87879b251a7dca8b7da8842a3e8 (diff)
downloadtextmode-1b445694b349bc39c7f144dd5cd946e7de85f6ba.tar.gz
textmode-1b445694b349bc39c7f144dd5cd946e7de85f6ba.zip
reexport vt100::Color
-rw-r--r--CHANGELOG.md5
-rw-r--r--src/color.rs32
-rw-r--r--src/lib.rs1
3 files changed, 22 insertions, 16 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0c150bb..7a04a0d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,11 @@
* `hard_refresh` to fully redraw the screen
+### Changed
+
+* re-export `vt100::Color` to avoid requiring users to know about the internal
+ `vt100` details (and potential version conflicts)
+
## [0.1.1] - 2021-11-10
### Changed
diff --git a/src/color.rs b/src/color.rs
index 289bed2..87e7696 100644
--- a/src/color.rs
+++ b/src/color.rs
@@ -1,18 +1,18 @@
//! Constants for the basic 16 terminal colors.
-pub const BLACK: vt100::Color = vt100::Color::Idx(0);
-pub const RED: vt100::Color = vt100::Color::Idx(1);
-pub const GREEN: vt100::Color = vt100::Color::Idx(2);
-pub const YELLOW: vt100::Color = vt100::Color::Idx(3);
-pub const BLUE: vt100::Color = vt100::Color::Idx(4);
-pub const MAGENTA: vt100::Color = vt100::Color::Idx(5);
-pub const CYAN: vt100::Color = vt100::Color::Idx(6);
-pub const LIGHTGREY: vt100::Color = vt100::Color::Idx(7);
-pub const DARKGREY: vt100::Color = vt100::Color::Idx(8);
-pub const LIGHTRED: vt100::Color = vt100::Color::Idx(9);
-pub const LIGHTGREEN: vt100::Color = vt100::Color::Idx(10);
-pub const LIGHTYELLOW: vt100::Color = vt100::Color::Idx(11);
-pub const LIGHTBLUE: vt100::Color = vt100::Color::Idx(12);
-pub const LIGHTMAGENTA: vt100::Color = vt100::Color::Idx(13);
-pub const LIGHTCYAN: vt100::Color = vt100::Color::Idx(14);
-pub const WHITE: vt100::Color = vt100::Color::Idx(15);
+pub const BLACK: crate::Color = crate::Color::Idx(0);
+pub const RED: crate::Color = crate::Color::Idx(1);
+pub const GREEN: crate::Color = crate::Color::Idx(2);
+pub const YELLOW: crate::Color = crate::Color::Idx(3);
+pub const BLUE: crate::Color = crate::Color::Idx(4);
+pub const MAGENTA: crate::Color = crate::Color::Idx(5);
+pub const CYAN: crate::Color = crate::Color::Idx(6);
+pub const LIGHTGREY: crate::Color = crate::Color::Idx(7);
+pub const DARKGREY: crate::Color = crate::Color::Idx(8);
+pub const LIGHTRED: crate::Color = crate::Color::Idx(9);
+pub const LIGHTGREEN: crate::Color = crate::Color::Idx(10);
+pub const LIGHTYELLOW: crate::Color = crate::Color::Idx(11);
+pub const LIGHTBLUE: crate::Color = crate::Color::Idx(12);
+pub const LIGHTMAGENTA: crate::Color = crate::Color::Idx(13);
+pub const LIGHTCYAN: crate::Color = crate::Color::Idx(14);
+pub const WHITE: crate::Color = crate::Color::Idx(15);
diff --git a/src/lib.rs b/src/lib.rs
index 27723fb..da0d6dc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -69,6 +69,7 @@
pub mod blocking;
pub mod color;
+pub use vt100::Color;
mod error;
pub use error::{Error, Result};
mod key;