mirror of https://github.com/helix-editor/helix
add feature flag
parent
81243247c6
commit
279f5eddb3
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
|||||||
|
#[cfg(feature = "steel")]
|
||||||
|
mod steel_implementations {
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
compositor::Component,
|
||||||
|
ui::{Popup, Text},
|
||||||
|
};
|
||||||
|
|
||||||
|
impl steel::rvals::Custom for Text {}
|
||||||
|
impl<T: steel::rvals::IntoSteelVal + Component> steel::rvals::Custom for Popup<T> {}
|
||||||
|
}
|
@ -1,7 +1,11 @@
|
|||||||
use crate::{buffer::Buffer, widgets::Widget};
|
#[cfg(feature = "steel")]
|
||||||
|
mod steel_implementations {
|
||||||
|
|
||||||
use steel::{gc::unsafe_erased_pointers::CustomReference, rvals::Custom};
|
use crate::{buffer::Buffer, widgets::Widget};
|
||||||
|
|
||||||
impl CustomReference for Buffer {}
|
use steel::{gc::unsafe_erased_pointers::CustomReference, rvals::Custom};
|
||||||
|
|
||||||
steel::custom_reference!(Buffer);
|
impl CustomReference for Buffer {}
|
||||||
|
|
||||||
|
steel::custom_reference!(Buffer);
|
||||||
|
}
|
||||||
|
@ -1,15 +1,29 @@
|
|||||||
use steel::{gc::unsafe_erased_pointers::CustomReference, rvals::Custom};
|
use crate::DocumentId;
|
||||||
|
|
||||||
use crate::{graphics::Rect, input::Event, Document, DocumentId, ViewId};
|
|
||||||
|
|
||||||
// Reference types along with value types - This should allow for having users
|
|
||||||
impl CustomReference for Event {}
|
|
||||||
impl Custom for Rect {}
|
|
||||||
impl Custom for crate::graphics::CursorKind {}
|
|
||||||
impl Custom for DocumentId {}
|
|
||||||
impl Custom for ViewId {}
|
|
||||||
impl CustomReference for Document {}
|
|
||||||
|
|
||||||
pub fn document_id_to_usize(doc_id: &DocumentId) -> usize {
|
pub fn document_id_to_usize(doc_id: &DocumentId) -> usize {
|
||||||
doc_id.0.into()
|
doc_id.0.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "steel")]
|
||||||
|
mod steel_implementations {
|
||||||
|
|
||||||
|
use steel::{gc::unsafe_erased_pointers::CustomReference, rvals::Custom};
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
document::Mode, graphics::Rect, input::Event, Document, DocumentId, Editor, ViewId,
|
||||||
|
};
|
||||||
|
|
||||||
|
impl steel::gc::unsafe_erased_pointers::CustomReference for Editor {}
|
||||||
|
steel::custom_reference!(Editor);
|
||||||
|
|
||||||
|
impl steel::rvals::Custom for Mode {}
|
||||||
|
impl steel::rvals::Custom for Event {}
|
||||||
|
|
||||||
|
// Reference types along with value types - This should allow for having users
|
||||||
|
impl CustomReference for Event {}
|
||||||
|
impl Custom for Rect {}
|
||||||
|
impl Custom for crate::graphics::CursorKind {}
|
||||||
|
impl Custom for DocumentId {}
|
||||||
|
impl Custom for ViewId {}
|
||||||
|
impl CustomReference for Document {}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue