declare wrapper types with macro
This commit is contained in:
parent
f7cb5546b3
commit
14970c0ac4
9 changed files with 44 additions and 77 deletions
|
@ -1,19 +1,9 @@
|
|||
use crate::char_grid::CharGrid;
|
||||
use servicepoint::{DataRef, Grid};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::sync::{Arc};
|
||||
use crate::macros::wrap_uniffi_object;
|
||||
|
||||
#[derive(uniffi::Object)]
|
||||
pub struct Cp437Grid {
|
||||
pub(crate) actual: RwLock<servicepoint::Cp437Grid>,
|
||||
}
|
||||
|
||||
impl Cp437Grid {
|
||||
pub(crate) fn internal_new(actual: servicepoint::Cp437Grid) -> Arc<Self> {
|
||||
Arc::new(Self {
|
||||
actual: RwLock::new(actual),
|
||||
})
|
||||
}
|
||||
}
|
||||
wrap_uniffi_object!(Cp437Grid);
|
||||
|
||||
#[uniffi::export]
|
||||
impl Cp437Grid {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue