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 display_list;
10#[cfg(feature = "glyphs")]
11pub mod glyphs;
12pub mod overlay;
13#[cfg(feature = "glyphs")]
14pub mod painter;
15pub mod palette;
16
17#[derive(Debug, Clone, Copy, PartialEq, Eq)]
20pub struct SelectionRange {
21 pub start: (u16, u16),
22 pub end: (u16, u16),
23 pub rectangle: bool,
24}
25
26#[derive(Debug, Clone, Copy)]
29pub struct ImageData<'a> {
30 pub width: u32,
31 pub height: u32,
32 pub format: ImageFormat,
33 pub pixels: &'a [u8],
34}
35
36pub trait ImageSource {
41 fn image_data(&self, id: ImageId) -> Option<ImageData<'_>>;
42}