diff --git a/crates/servicepoint/src/char_grid.rs b/crates/servicepoint/src/char_grid.rs new file mode 100644 index 0000000..1e7e80d --- /dev/null +++ b/crates/servicepoint/src/char_grid.rs @@ -0,0 +1,4 @@ +use crate::PrimitiveGrid; + +/// A grid containing UTF-8 characters. +pub type CharGrid = PrimitiveGrid; \ No newline at end of file diff --git a/crates/servicepoint/src/cp437.rs b/crates/servicepoint/src/cp437.rs index f757594..7b4d3af 100644 --- a/crates/servicepoint/src/cp437.rs +++ b/crates/servicepoint/src/cp437.rs @@ -10,9 +10,6 @@ use std::collections::HashMap; /// The encoding is currently not enforced. pub type Cp437Grid = PrimitiveGrid; -/// A grid containing UTF-8 characters. -pub type CharGrid = PrimitiveGrid; - /// Errors that can occur when loading CP-437. #[derive(Debug, PartialEq)] pub enum Cp437LoadError { @@ -91,6 +88,7 @@ pub use feature_cp437::*; #[cfg(feature = "cp437")] mod feature_cp437 { + use crate::CharGrid; use super::*; /// An array of 256 elements, mapping most of the CP437 values to UTF-8 characters @@ -248,6 +246,7 @@ mod tests { #[cfg(test)] #[cfg(feature = "cp437")] mod tests_feature_cp437 { + use crate::CharGrid; use super::*; #[test] diff --git a/crates/servicepoint/src/lib.rs b/crates/servicepoint/src/lib.rs index 3c1fc02..aee3bc3 100644 --- a/crates/servicepoint/src/lib.rs +++ b/crates/servicepoint/src/lib.rs @@ -41,10 +41,11 @@ pub use bitvec; pub use crate::bitmap::Bitmap; pub use crate::brightness::{Brightness, BrightnessGrid}; +pub use crate::char_grid::CharGrid; pub use crate::command::{Command, Offset}; pub use crate::compression_code::CompressionCode; pub use crate::connection::Connection; -pub use crate::cp437::{CharGrid, Cp437Grid}; +pub use crate::cp437::Cp437Grid; pub use crate::data_ref::DataRef; pub use crate::grid::Grid; pub use crate::origin::{Origin, Pixels, Tiles}; @@ -55,6 +56,7 @@ pub type BitVec = bitvec::prelude::BitVec; mod bitmap; mod brightness; +mod char_grid; mod command; mod command_code; mod compression;