servicepoint-binding-c/src/commands/global_brightness_command.rs
Vinzenz Schroeter c65b735f57
Some checks failed
Rust / build-gnu-apt (pull_request) Successful in 2m4s
Rust / build-size-gnu-unstable (pull_request) Failing after 2m44s
generic wrap
2025-06-26 22:36:57 +02:00

20 lines
583 B
Rust

use crate::{commands::wrap_command, macros::wrap};
use servicepoint::{Brightness, GlobalBrightnessCommand};
use std::ptr::NonNull;
wrap_command!(GlobalBrightness);
wrap!(
GlobalBrightnessCommand {
properties:
prop brightness: Brightness { get; set; };
functions:
/// Set the brightness of all tiles to the same value.
///
/// Returns: a new [GlobalBrightnessCommand] instance.
fn new(brightness: val Brightness) -> move NonNull<GlobalBrightnessCommand> {
GlobalBrightnessCommand::from(brightness)
};
}
);