add prefix centrally

This commit is contained in:
Vinzenz Schroeter 2025-06-21 23:51:10 +02:00
parent 1eb59d986a
commit 500cbbc872
20 changed files with 195 additions and 195 deletions

View file

@ -8,14 +8,14 @@ use std::ptr::NonNull;
wrap_command!(Bitmap);
wrap_fields!(sp_cmd_bitmap::BitmapCommand;
wrap_fields!(cmd_bitmap::BitmapCommand;
prop bitmap: Bitmap { mut get(); move set(value); };
prop compression: CompressionCode { get(); set(value); };
);
wrap_origin_accessors!(sp_cmd_bitmap::BitmapCommand);
wrap_origin_accessors!(cmd_bitmap::BitmapCommand);
wrap_functions!(sp_cmd_bitmap;
wrap_functions!(cmd_bitmap;
/// Sets a window of pixels to the specified values.
///
/// The passed [Bitmap] gets consumed.

View file

@ -11,14 +11,14 @@ use std::ptr::NonNull;
wrap_command!(BitVec);
wrap_fields!(sp_cmd_bitvec::BitVecCommand;
wrap_fields!(cmd_bitvec::BitVecCommand;
prop bitvec: DisplayBitVec { mut get(); move set(value); };
prop offset: Offset { get(); set(value); };
prop operation: BinaryOperation { get(); set(value); };
prop compression: CompressionCode { get(); set(value); };
);
wrap_functions!(sp_cmd_bitvec;
wrap_functions!(cmd_bitvec;
/// Set pixel data starting at the pixel offset on screen.
///

View file

@ -8,13 +8,13 @@ use std::ptr::NonNull;
wrap_command!(BrightnessGrid);
wrap_fields!(sp_cmd_brightness_grid::BrightnessGridCommand;
wrap_fields!(cmd_brightness_grid::BrightnessGridCommand;
prop grid: BrightnessGrid { mut get(); move set(grid); };
);
wrap_origin_accessors!(sp_cmd_brightness_grid::BrightnessGridCommand);
wrap_origin_accessors!(cmd_brightness_grid::BrightnessGridCommand);
wrap_functions!(sp_cmd_brightness_grid;
wrap_functions!(cmd_brightness_grid;
/// Set the brightness of individual tiles in a rectangular area of the display.
///

View file

@ -20,7 +20,7 @@ macro_rules! wrap_cc_only {
($(#[$meta:meta])* $command:ident) => {
::paste::paste!{
wrap_cc_only!($(#[$meta])*; $command, [< sp_cmd_ $command:lower >], [< $command Command >]);
wrap_cc_only!($(#[$meta])*; $command, [< cmd_ $command:lower >], [< $command Command >]);
}
};
}

View file

@ -8,13 +8,13 @@ use std::ptr::NonNull;
wrap_command!(CharGrid);
wrap_fields!(sp_cmd_char_grid::CharGridCommand;
wrap_fields!(cmd_char_grid::CharGridCommand;
prop grid: CharGrid { mut get(); move set(grid); };
);
wrap_origin_accessors!(sp_cmd_char_grid::CharGridCommand);
wrap_origin_accessors!(cmd_char_grid::CharGridCommand);
wrap_functions!(sp_cmd_char_grid;
wrap_functions!(cmd_char_grid;
/// Show UTF-8 encoded text on the screen.
///

View file

@ -8,13 +8,13 @@ use std::ptr::NonNull;
wrap_command!(Cp437Grid);
wrap_fields!(sp_cmd_cp437_grid::Cp437GridCommand;
wrap_fields!(cmd_cp437_grid::Cp437GridCommand;
prop grid: Cp437Grid { mut get(); move set(grid); };
);
wrap_origin_accessors!(sp_cmd_cp437_grid::Cp437GridCommand);
wrap_origin_accessors!(cmd_cp437_grid::Cp437GridCommand);
wrap_functions!(sp_cmd_cp437_grid;
wrap_functions!(cmd_cp437_grid;
/// Show text on the screen.
///

View file

@ -69,7 +69,7 @@ impl SPCommand {
};
}
wrap_functions!(sp_cmd_generic;
wrap_functions!(cmd_generic;
/// Tries to turn a [Packet] into a [SPCommand].
///

View file

@ -6,7 +6,7 @@ use crate::{
use servicepoint::{Brightness, GlobalBrightnessCommand, Packet};
use std::ptr::NonNull;
wrap_functions!(sp_cmd_brightness_global;
wrap_functions!(cmd_brightness_global;
/// Set the brightness of all tiles to the same value.
///
@ -25,7 +25,7 @@ wrap_functions!(sp_cmd_brightness_global;
wrap_command!(GlobalBrightness);
wrap_fields!(
sp_cmd_brightness_global::GlobalBrightnessCommand;
cmd_brightness_global::GlobalBrightnessCommand;
prop brightness: Brightness {
get();
set(value);

View file

@ -70,7 +70,7 @@ macro_rules! wrap_command {
};
($command:ident) => {
::paste::paste!{
wrap_command!($command, [< sp_cmd_ $command:lower >], [< $command Command >]);
wrap_command!($command, [< cmd_ $command:lower >], [< $command Command >]);
}
};
}