1#![doc = include_str!("../README.md")]
2
3use felis_protocol::{ImageId, messages::ImageFormat};
4
5pub mod appearance;
6pub mod atlas;
7#[cfg(feature = "glyphs")]
8pub mod box_drawing;
9pub mod contrast;
10pub mod display_list;
11#[cfg(feature = "glyphs")]
12pub mod glyphs;
13pub mod overlay;
14#[cfg(feature = "glyphs")]
15pub mod painter;
16pub mod palette;
17
18#[derive(Debug, Clone, Copy, PartialEq, Eq)]
21pub struct SelectionRange {
22 pub start: (u16, u16),
23 pub end: (u16, u16),
24 pub rectangle: bool,
25}
26
27#[derive(Debug, Clone, Copy)]
30pub struct ImageData<'a> {
31 pub width: u32,
32 pub height: u32,
33 pub format: ImageFormat,
34 pub pixels: &'a [u8],
35}
36
37pub trait ImageSource {
42 fn image_data(&self, id: ImageId) -> Option<ImageData<'_>>;
43}