move containers to module
This commit is contained in:
		
							parent
							
								
									27d71cefe6
								
							
						
					
					
						commit
						cee4937270
					
				
					 8 changed files with 35 additions and 37 deletions
				
			
		|  | @ -1,13 +1,18 @@ | |||
| use crate::bitvec::BitVec; | ||||
| use crate::brightness_grid::BrightnessGrid; | ||||
| use crate::char_grid::CharGrid; | ||||
| use crate::compression_code::CompressionCode; | ||||
| use crate::cp437_grid::Cp437Grid; | ||||
| use crate::errors::ServicePointError; | ||||
| use servicepoint::{BitVecCommand, BrightnessGridCommand, CharGridCommand, ClearCommand, Cp437GridCommand, FadeOutCommand, GlobalBrightnessCommand, HardResetCommand, Origin}; | ||||
| use crate::{ | ||||
|     compression_code::CompressionCode, | ||||
|     containers::{ | ||||
|         bitmap::Bitmap, bitvec::BitVec, brightness_grid::BrightnessGrid, | ||||
|         char_grid::CharGrid, cp437_grid::Cp437Grid, | ||||
|     }, | ||||
|     errors::ServicePointError, | ||||
|     macros::wrap_uniffi_object, | ||||
| }; | ||||
| use servicepoint::{ | ||||
|     BitVecCommand, BrightnessGridCommand, CharGridCommand, ClearCommand, | ||||
|     Cp437GridCommand, FadeOutCommand, GlobalBrightnessCommand, | ||||
|     HardResetCommand, Origin, | ||||
| }; | ||||
| use std::sync::Arc; | ||||
| use crate::bitmap::Bitmap; | ||||
| use crate::macros::wrap_uniffi_object; | ||||
| 
 | ||||
| wrap_uniffi_object!(TypedCommand, Command); | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,7 +1,5 @@ | |||
| use crate::macros::{ | ||||
|     wrap_get_set_fill_2d, wrap_uniffi_object, wrap_width_height, | ||||
| }; | ||||
| use servicepoint::{DataRef, Grid}; | ||||
| use crate::macros::*; | ||||
| use servicepoint::Grid; | ||||
| use std::{ops::Deref, sync::Arc}; | ||||
| 
 | ||||
| wrap_uniffi_object!(Bitmap); | ||||
|  | @ -1,5 +1,5 @@ | |||
| use std::sync::{Arc}; | ||||
| use crate::macros::wrap_uniffi_object; | ||||
| use std::sync::Arc; | ||||
| 
 | ||||
| wrap_uniffi_object!(DisplayBitVec, BitVec); | ||||
| 
 | ||||
|  | @ -7,7 +7,10 @@ wrap_uniffi_object!(DisplayBitVec, BitVec); | |||
| impl BitVec { | ||||
|     #[uniffi::constructor] | ||||
|     pub fn new(size: u64) -> Arc<Self> { | ||||
|         Self::internal_new(servicepoint::DisplayBitVec::repeat(false, size as usize)) | ||||
|         Self::internal_new(servicepoint::DisplayBitVec::repeat( | ||||
|             false, | ||||
|             size as usize, | ||||
|         )) | ||||
|     } | ||||
|     #[uniffi::constructor] | ||||
|     pub fn load(data: Vec<u8>) -> Arc<Self> { | ||||
|  | @ -1,11 +1,6 @@ | |||
| use crate::macros::{ | ||||
|     wrap_get_set_fill_2d, wrap_uniffi_object, wrap_width_height, | ||||
| }; | ||||
| use servicepoint::{Brightness, DataRef, Grid}; | ||||
| use std::{ | ||||
|     ops::Deref, | ||||
|     sync::{Arc, RwLockReadGuard}, | ||||
| }; | ||||
| use crate::macros::*; | ||||
| use servicepoint::{Brightness, Grid}; | ||||
| use std::{ops::Deref, sync::Arc}; | ||||
| 
 | ||||
| wrap_uniffi_object!(BrightnessGrid); | ||||
| wrap_width_height!(BrightnessGrid); | ||||
|  | @ -1,8 +1,6 @@ | |||
| use crate::cp437_grid::Cp437Grid; | ||||
| use crate::{containers::cp437_grid::Cp437Grid, macros::*}; | ||||
| use servicepoint::{Grid, SetValueSeriesError}; | ||||
| use std::convert::Into; | ||||
| use std::sync::{Arc}; | ||||
| use crate::macros::{wrap_width_height, wrap_uniffi_object}; | ||||
| use std::{convert::Into, sync::Arc}; | ||||
| 
 | ||||
| wrap_uniffi_object!(CharGrid); | ||||
| wrap_width_height!(CharGrid); | ||||
|  | @ -1,8 +1,5 @@ | |||
| use crate::char_grid::CharGrid; | ||||
| use crate::macros::{ | ||||
|     wrap_get_set_fill_2d, wrap_uniffi_object, wrap_width_height, | ||||
| }; | ||||
| use servicepoint::{DataRef, Grid}; | ||||
| use crate::{containers::char_grid::CharGrid, macros::*}; | ||||
| use servicepoint::Grid; | ||||
| use std::{ops::Deref, sync::Arc}; | ||||
| 
 | ||||
| wrap_uniffi_object!(Cp437Grid); | ||||
							
								
								
									
										5
									
								
								src/containers/mod.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								src/containers/mod.rs
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| pub mod bitmap; | ||||
| pub mod bitvec; | ||||
| pub mod brightness_grid; | ||||
| pub mod char_grid; | ||||
| pub mod cp437_grid; | ||||
|  | @ -1,14 +1,11 @@ | |||
| uniffi::setup_scaffolding!(); | ||||
| 
 | ||||
| mod bitmap; | ||||
| mod bitvec; | ||||
| mod brightness; | ||||
| mod brightness_grid; | ||||
| mod char_grid; | ||||
| mod command; | ||||
| mod commands; | ||||
| mod compression_code; | ||||
| mod connection; | ||||
| mod constants; | ||||
| mod cp437_grid; | ||||
| mod containers; | ||||
| mod errors; | ||||
| mod macros; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vinzenz Schroeter
						Vinzenz Schroeter