Skip to content

Commit 41aa278

Browse files
committed
move cell_sized to backend
1 parent 5e0a856 commit 41aa278

6 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/backend/canvas.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ use std::io::{Error as IoError, Result as IoResult};
44

55
use crate::{
66
backend::{
7+
cell_sized::CellSized,
78
color::{actual_bg_color, actual_fg_color},
89
event_callback::{
910
create_mouse_event, EventCallback, MouseConfig, KEY_EVENT_TYPES, MOUSE_EVENT_TYPES,
1011
},
1112
utils::*,
1213
},
13-
cell_sized::CellSized,
1414
error::Error,
1515
event::{KeyEvent, MouseEvent},
1616
render::WebEventHandler,

src/backend/dom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ use unicode_width::UnicodeWidthStr;
1616

1717
use crate::{
1818
backend::{
19+
cell_sized::CellSized,
1920
event_callback::{
2021
create_mouse_event, EventCallback, MouseConfig, KEY_EVENT_TYPES, MOUSE_EVENT_TYPES,
2122
},
2223
utils::*,
2324
},
24-
cell_sized::CellSized,
2525
error::Error,
2626
event::{KeyEvent, MouseEvent},
2727
render::WebEventHandler,

src/backend/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,7 @@ pub(super) mod event_callback;
7777
/// Backend utilities.
7878
pub(crate) mod utils;
7979

80+
/// Cell size metrics for backends.
81+
pub mod cell_sized;
8082
/// Cursor shapes.
8183
pub mod cursor;

src/backend/webgl2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::{
44
event_callback::{EventCallback, KEY_EVENT_TYPES},
55
utils::*,
66
},
7-
cell_sized::CellSized,
87
error::Error,
98
event::{KeyEvent, MouseEvent},
109
render::WebEventHandler,
@@ -30,6 +29,7 @@ use std::{
3029
};
3130
use web_sys::{wasm_bindgen::JsCast, Element};
3231

32+
use crate::backend::cell_sized::CellSized;
3333
/// Re-export beamterm's atlas data type. Used by [`FontAtlasConfig::Static`].
3434
pub use beamterm_renderer::FontAtlasData;
3535

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ pub mod backend;
1919
/// Rendering.
2020
mod render;
2121

22-
/// Cell size metrics for backends.
23-
mod cell_sized;
24-
2522
// Re-export ratatui crate.
2623
pub use ratatui;
2724

@@ -30,9 +27,9 @@ pub use web_sys;
3027

3128
pub use backend::{
3229
canvas::CanvasBackend,
30+
cell_sized::CellSized,
3331
cursor::CursorShape,
3432
dom::DomBackend,
3533
webgl2::{FontAtlasConfig, SelectionMode, WebGl2Backend},
3634
};
37-
pub use cell_sized::CellSized;
3835
pub use render::{WebEventHandler, WebRenderer};

0 commit comments

Comments
 (0)