-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-export everything from top-level for nicer docs
- Loading branch information
1 parent
e97418b
commit eddeb2e
Showing
12 changed files
with
93 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,55 @@ | ||
//! C API wrapper for the `servicepoint` crate. | ||
pub use crate::c_slice::SPByteSlice; | ||
|
||
pub mod bit_vec; | ||
|
||
pub mod brightness_grid; | ||
|
||
pub mod command; | ||
|
||
pub mod connection; | ||
|
||
pub mod packet; | ||
|
||
pub mod pixel_grid; | ||
|
||
pub mod c_slice; | ||
|
||
pub mod cp437_grid; | ||
|
||
pub mod constants; | ||
|
||
/// Type alias for documenting the meaning of the variable in enum values | ||
pub type SPOffset = usize; | ||
//! C API wrapper for the [servicepoint](https://docs.rs/servicepoint/latest/servicepoint/) crate. | ||
//! | ||
//! # Examples | ||
//! | ||
//! Make sure to check out [this GitHub repo](https://github.com/arfst23/ServicePoint) as well! | ||
//! | ||
//! ```C | ||
//! #include <stdio.h> | ||
//! #include "servicepoint.h" | ||
//! | ||
//! int main(void) { | ||
//! SPConnection *connection = sp_connection_open("172.23.42.29:2342"); | ||
//! if (connection == NULL) | ||
//! return 1; | ||
//! | ||
//! SPPixelGrid *pixels = sp_pixel_grid_new(SP_PIXEL_WIDTH, SP_PIXEL_HEIGHT); | ||
//! sp_pixel_grid_fill(pixels, true); | ||
//! | ||
//! SPCommand *command = sp_command_bitmap_linear_win(0, 0, pixels, Uncompressed); | ||
//! SPPacket *packet = sp_packet_from_command(command); | ||
//! while (sp_connection_send(connection, sp_packet_clone(packet))); | ||
//! | ||
//! sp_packet_dealloc(packet); | ||
//! sp_connection_dealloc(connection); | ||
//! return 0; | ||
//! } | ||
//! ``` | ||
pub use bit_vec::*; | ||
pub use brightness_grid::*; | ||
pub use byte_slice::*; | ||
pub use command::*; | ||
pub use connection::*; | ||
pub use constants::*; | ||
pub use cp437_grid::*; | ||
pub use packet::*; | ||
pub use pixel_grid::*; | ||
|
||
mod bit_vec; | ||
|
||
mod brightness_grid; | ||
|
||
mod command; | ||
|
||
mod connection; | ||
|
||
mod packet; | ||
|
||
mod pixel_grid; | ||
|
||
mod byte_slice; | ||
|
||
mod cp437_grid; | ||
|
||
mod constants; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters