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::Grid;
use std::{ops::Deref, sync::Arc};
wrap_uniffi_object!(Bitmap);
wrap_object!(Bitmap);
wrap_width_height!(Bitmap);
wrap_get_set_fill_2d!(Bitmap, bool);
@ -29,12 +29,12 @@ impl Bitmap {
}
pub fn equals(&self, other: &Bitmap) -> 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()
}
}