declare wrapper types with macro

This commit is contained in:
Vinzenz Schroeter 2025-06-13 01:09:31 +02:00
parent f7cb5546b3
commit 14970c0ac4
9 changed files with 44 additions and 77 deletions

View file

@ -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 {