WIP: next #4

Draft
vinzenz wants to merge 12 commits from next into main
11 changed files with 28 additions and 17 deletions
Showing only changes of commit cf6e6385ec - Show all commits

View file

@ -82,7 +82,6 @@ pub unsafe extern "C" fn sp_cmd_cp437_grid_get_origin(
} }
} }
/// Sets the origin field of the [Cp437GridCommand]. /// Sets the origin field of the [Cp437GridCommand].
/// ///
/// Rust equivalent: `cp437_command.origin = Origin::new(origin_x, origin_y)` /// Rust equivalent: `cp437_command.origin = Origin::new(origin_x, origin_y)`

View file

@ -2,9 +2,9 @@ use crate::{
heap_clone, heap_drop, heap_move_nonnull, heap_move_ok, heap_remove, heap_clone, heap_drop, heap_move_nonnull, heap_move_ok, heap_remove,
}; };
use servicepoint::{ use servicepoint::{
BitVecCommand, BitmapCommand, BrightnessGridCommand, BitVecCommand, BitmapCommand, BrightnessGridCommand, CharGridCommand,
CharGridCommand, ClearCommand, Cp437GridCommand, FadeOutCommand, ClearCommand, Cp437GridCommand, FadeOutCommand, GlobalBrightnessCommand,
GlobalBrightnessCommand, HardResetCommand, Packet, TypedCommand, HardResetCommand, Packet, TypedCommand,
}; };
use std::ptr::{null_mut, NonNull}; use std::ptr::{null_mut, NonNull};

View file

@ -1,6 +1,10 @@
use crate::{byte_slice::ByteSlice, heap_clone, heap_drop, heap_move_nonnull, heap_move_ok, heap_move_some, heap_remove}; use crate::{
containers::ByteSlice, heap_clone, heap_drop, heap_move_nonnull,
heap_move_ok, heap_move_some, heap_remove,
};
use servicepoint::{ use servicepoint::{
Bitmap, BitmapCommand, CompressionCode, DataRef, Grid, Origin, Packet, DisplayBitVec Bitmap, BitmapCommand, CompressionCode, DataRef, DisplayBitVec, Grid,
Origin, Packet,
}; };
use std::ptr::NonNull; use std::ptr::NonNull;

View file

@ -1,5 +1,5 @@
use crate::{ use crate::{
byte_slice::ByteSlice, heap_clone, heap_drop, heap_move_nonnull, containers::ByteSlice, heap_clone, heap_drop, heap_move_nonnull,
heap_move_ok, heap_remove, heap_move_ok, heap_remove,
}; };
use servicepoint::{ use servicepoint::{

View file

@ -1,5 +1,5 @@
use crate::{ use crate::{
byte_slice::ByteSlice, heap_clone, heap_drop, heap_move_nonnull, containers::ByteSlice, heap_clone, heap_drop, heap_move_nonnull,
heap_move_ok, heap_move_some, heap_remove, heap_move_ok, heap_move_some, heap_remove,
}; };
use servicepoint::{ use servicepoint::{

View file

@ -1,5 +1,5 @@
use crate::{ use crate::{
byte_slice::ByteSlice, heap_clone, heap_drop, heap_move_nonnull, containers::ByteSlice, heap_clone, heap_drop, heap_move_nonnull,
heap_move_ok, heap_remove, heap_move_ok, heap_remove,
}; };
use servicepoint::{CharGrid, CharGridCommand, Grid, Origin, Packet}; use servicepoint::{CharGrid, CharGridCommand, Grid, Origin, Packet};

View file

@ -1,5 +1,5 @@
use crate::{ use crate::{
byte_slice::ByteSlice, heap_clone, heap_drop, heap_move_nonnull, containers::ByteSlice, heap_clone, heap_drop, heap_move_nonnull,
heap_move_ok, heap_move_some, heap_remove, heap_move_ok, heap_move_some, heap_remove,
}; };
use servicepoint::{ use servicepoint::{

13
src/containers/mod.rs Normal file
View file

@ -0,0 +1,13 @@
mod bitmap;
mod bitvec;
mod brightness_grid;
mod byte_slice;
mod char_grid;
mod cp437_grid;
pub use bitmap::*;
pub use bitvec::*;
pub use brightness_grid::*;
pub use byte_slice::*;
pub use char_grid::*;
pub use cp437_grid::*;

View file

@ -27,13 +27,8 @@
use std::ptr::NonNull; use std::ptr::NonNull;
pub mod bitmap;
pub mod bitvec;
pub mod brightness_grid;
pub mod byte_slice;
pub mod char_grid;
pub mod commands; pub mod commands;
pub mod cp437_grid; pub mod containers;
pub mod packet; pub mod packet;
pub mod udp; pub mod udp;

View file

@ -1,5 +1,5 @@
use crate::{ use crate::{
byte_slice::ByteSlice, heap_clone, heap_drop, heap_move_nonnull, containers::ByteSlice, heap_clone, heap_drop, heap_move_nonnull,
heap_move_ok, heap_move_ok,
}; };
use servicepoint::{CommandCode, Header, Packet}; use servicepoint::{CommandCode, Header, Packet};