You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/helix-view/src/extension.rs

16 lines
508 B
Rust

2 years ago
use steel::{gc::unsafe_erased_pointers::CustomReference, rvals::Custom};
2 years ago
use crate::{graphics::Rect, input::Event, Document, DocumentId, ViewId};
2 years ago
2 years ago
// Reference types along with value types - This should allow for having users
2 years ago
impl CustomReference for Event {}
impl Custom for Rect {}
impl Custom for crate::graphics::CursorKind {}
2 years ago
impl Custom for DocumentId {}
impl Custom for ViewId {}
impl CustomReference for Document {}
pub fn document_id_to_usize(doc_id: &DocumentId) -> usize {
doc_id.0.into()
}