add width and height macro
This commit is contained in:
parent
9fa09fe33e
commit
3c27917afa
5 changed files with 28 additions and 36 deletions
|
@ -1,8 +1,9 @@
|
|||
use servicepoint::{Brightness, DataRef, Grid};
|
||||
use std::sync::{Arc};
|
||||
use crate::macros::wrap_uniffi_object;
|
||||
use crate::macros::{wrap_width_height, wrap_uniffi_object};
|
||||
|
||||
wrap_uniffi_object!(BrightnessGrid);
|
||||
wrap_width_height!(BrightnessGrid);
|
||||
|
||||
#[uniffi::export]
|
||||
impl BrightnessGrid {
|
||||
|
@ -45,13 +46,6 @@ impl BrightnessGrid {
|
|||
.unwrap()
|
||||
.fill(Brightness::saturating_from(value))
|
||||
}
|
||||
pub fn width(&self) -> u64 {
|
||||
self.actual.read().unwrap().width() as u64
|
||||
}
|
||||
|
||||
pub fn height(&self) -> u64 {
|
||||
self.actual.read().unwrap().height() as u64
|
||||
}
|
||||
|
||||
pub fn equals(&self, other: &BrightnessGrid) -> bool {
|
||||
let a = self.actual.read().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue