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