servicepoint_binding_c 0.15.0

C bindings for the servicepoint crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::macros::wrap;
use servicepoint::{Brightness, GlobalBrightnessCommand};
use std::ptr::NonNull;

wrap!(
    GlobalBrightnessCommand {
    derives: crate::commands::derive_command[GlobalBrightness];
    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)
        };
    }
);