create separate types per command

This commit is contained in:
Vinzenz Schroeter 2025-06-16 11:32:12 +02:00
parent c29482ac56
commit bffc905261
19 changed files with 306 additions and 200 deletions

View file

@ -2,7 +2,7 @@ use crate::macros::*;
use servicepoint::{Brightness, Grid};
use std::{ops::Deref, sync::Arc};
wrap_uniffi_object!(BrightnessGrid);
wrap_object!(BrightnessGrid);
wrap_width_height!(BrightnessGrid);
wrap_get_set_fill_2d!(BrightnessGrid, Brightness);
@ -29,12 +29,12 @@ impl BrightnessGrid {
}
pub fn equals(&self, other: &BrightnessGrid) -> bool {
let a = self.actual.read().unwrap();
let b = other.actual.read().unwrap();
let a = self.read();
let b = other.read();
*a == *b
}
pub fn copy_raw(&self) -> Vec<u8> {
self.actual.read().unwrap().deref().into()
self.read().deref().into()
}
}