generate some functions with macros, cbindgen 0.29
This commit is contained in:
parent
db94fecbb3
commit
02f629c68b
23 changed files with 195 additions and 349 deletions
|
@ -1,7 +1,7 @@
|
|||
#ifndef SERVICEPOINT_BINDINGS_C
|
||||
#define SERVICEPOINT_BINDINGS_C
|
||||
|
||||
/* Generated with cbindgen:0.28.0 */
|
||||
/* Generated with cbindgen:0.29.0 */
|
||||
|
||||
/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */
|
||||
|
||||
|
@ -640,9 +640,9 @@ extern "C" {
|
|||
void init_env_logger(void);
|
||||
|
||||
/**
|
||||
* Clones a [Bitmap].
|
||||
*Clones a [Bitmap] instance.
|
||||
*/
|
||||
struct Bitmap */*notnull*/ sp_bitmap_clone(struct Bitmap */*notnull*/ bitmap);
|
||||
struct Bitmap */*notnull*/ sp_bitmap_clone(struct Bitmap */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Sets the state of all pixels in the [Bitmap].
|
||||
|
@ -655,9 +655,9 @@ struct Bitmap */*notnull*/ sp_bitmap_clone(struct Bitmap */*notnull*/ bitmap);
|
|||
void sp_bitmap_fill(struct Bitmap */*notnull*/ bitmap, bool value);
|
||||
|
||||
/**
|
||||
* Deallocates a [Bitmap].
|
||||
*Deallocates a [Bitmap] instance.
|
||||
*/
|
||||
void sp_bitmap_free(struct Bitmap */*notnull*/ bitmap);
|
||||
void sp_bitmap_free(struct Bitmap */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Tries to convert the BitVec to a Bitmap.
|
||||
|
@ -801,9 +801,9 @@ struct ByteSlice sp_bitmap_unsafe_data_ref(struct Bitmap */*notnull*/ bitmap);
|
|||
size_t sp_bitmap_width(struct Bitmap */*notnull*/ bitmap);
|
||||
|
||||
/**
|
||||
* Clones a [DisplayBitVec].
|
||||
*Clones a [DisplayBitVec] instance.
|
||||
*/
|
||||
BitVec */*notnull*/ sp_bitvec_clone(BitVec */*notnull*/ bit_vec);
|
||||
BitVec */*notnull*/ sp_bitvec_clone(BitVec */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Sets the value of all bits in the [DisplayBitVec].
|
||||
|
@ -816,9 +816,9 @@ BitVec */*notnull*/ sp_bitvec_clone(BitVec */*notnull*/ bit_vec);
|
|||
void sp_bitvec_fill(BitVec */*notnull*/ bit_vec, bool value);
|
||||
|
||||
/**
|
||||
* Deallocates a [DisplayBitVec].
|
||||
*Deallocates a [DisplayBitVec] instance.
|
||||
*/
|
||||
void sp_bitvec_free(BitVec */*notnull*/ bit_vec);
|
||||
void sp_bitvec_free(BitVec */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Gets the value of a bit from the [DisplayBitVec].
|
||||
|
@ -915,9 +915,9 @@ void sp_bitvec_set(BitVec */*notnull*/ bit_vec, size_t index, bool value);
|
|||
struct ByteSlice sp_bitvec_unsafe_data_ref(BitVec */*notnull*/ bit_vec);
|
||||
|
||||
/**
|
||||
* Clones a [BrightnessGrid].
|
||||
*Clones a [BrightnessGrid] instance.
|
||||
*/
|
||||
BrightnessGrid */*notnull*/ sp_brightness_grid_clone(BrightnessGrid */*notnull*/ grid);
|
||||
BrightnessGrid */*notnull*/ sp_brightness_grid_clone(BrightnessGrid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Sets the value of all cells in the [BrightnessGrid].
|
||||
|
@ -931,9 +931,9 @@ void sp_brightness_grid_fill(BrightnessGrid */*notnull*/ brightness_grid,
|
|||
Brightness value);
|
||||
|
||||
/**
|
||||
* Deallocates a [BrightnessGrid].
|
||||
*Deallocates a [BrightnessGrid] instance.
|
||||
*/
|
||||
void sp_brightness_grid_free(BrightnessGrid */*notnull*/ brightness_grid);
|
||||
void sp_brightness_grid_free(BrightnessGrid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Gets the current value at the specified position.
|
||||
|
@ -1051,9 +1051,9 @@ struct ByteSlice sp_brightness_grid_unsafe_data_ref(BrightnessGrid */*notnull*/
|
|||
size_t sp_brightness_grid_width(BrightnessGrid */*notnull*/ brightness_grid);
|
||||
|
||||
/**
|
||||
* Clones a [CharGrid].
|
||||
*Clones a [CharGrid] instance.
|
||||
*/
|
||||
CharGrid */*notnull*/ sp_char_grid_clone(CharGrid */*notnull*/ grid);
|
||||
CharGrid */*notnull*/ sp_char_grid_clone(CharGrid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Sets the value of all cells in the [CharGrid].
|
||||
|
@ -1066,9 +1066,9 @@ CharGrid */*notnull*/ sp_char_grid_clone(CharGrid */*notnull*/ grid);
|
|||
void sp_char_grid_fill(CharGrid */*notnull*/ char_grid, uint32_t value);
|
||||
|
||||
/**
|
||||
* Deallocates a [CharGrid].
|
||||
*Deallocates a [CharGrid] instance.
|
||||
*/
|
||||
void sp_char_grid_free(CharGrid */*notnull*/ char_grid);
|
||||
void sp_char_grid_free(CharGrid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Returns the current value at the specified position.
|
||||
|
@ -1157,16 +1157,14 @@ void sp_char_grid_set(CharGrid */*notnull*/ char_grid,
|
|||
size_t sp_char_grid_width(CharGrid */*notnull*/ char_grid);
|
||||
|
||||
/**
|
||||
* Clones an [BitmapCommand] instance.
|
||||
*
|
||||
* returns: a new [BitmapCommand] instance.
|
||||
*Clones a [BitmapCommand] instance.
|
||||
*/
|
||||
struct BitmapCommand */*notnull*/ sp_cmd_bitmap_clone(struct BitmapCommand */*notnull*/ command);
|
||||
struct BitmapCommand */*notnull*/ sp_cmd_bitmap_clone(struct BitmapCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Deallocates a [BitmapCommand] instance.
|
||||
*Deallocates a [BitmapCommand] instance.
|
||||
*/
|
||||
void sp_cmd_bitmap_free(struct BitmapCommand */*notnull*/ command);
|
||||
void sp_cmd_bitmap_free(struct BitmapCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Move the provided [Bitmap] into a new [BitmapCommand],
|
||||
|
@ -1237,16 +1235,14 @@ void sp_cmd_bitmap_set_origin(struct BitmapCommand */*notnull*/ command,
|
|||
struct Packet *sp_cmd_bitmap_try_into_packet(struct BitmapCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Clones an [BitVecCommand] instance.
|
||||
*
|
||||
* returns: a new [BitVecCommand] instance.
|
||||
*Clones a [BitVecCommand] instance.
|
||||
*/
|
||||
struct BitVecCommand */*notnull*/ sp_cmd_bitvec_clone(struct BitVecCommand */*notnull*/ command);
|
||||
struct BitVecCommand */*notnull*/ sp_cmd_bitvec_clone(struct BitVecCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Deallocates a [BitVecCommand].
|
||||
*Deallocates a [BitVecCommand] instance.
|
||||
*/
|
||||
void sp_cmd_bitvec_free(struct BitVecCommand */*notnull*/ command);
|
||||
void sp_cmd_bitvec_free(struct BitVecCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Returns a pointer to the [BitVec] contained in the [BitVecCommand].
|
||||
|
@ -1319,13 +1315,14 @@ void sp_cmd_bitvec_set_operation(struct BitVecCommand */*notnull*/ command,
|
|||
struct Packet *sp_cmd_bitvec_try_into_packet(struct BitVecCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Clones an [GlobalBrightnessCommand] instance.
|
||||
*
|
||||
* returns: a new [GlobalBrightnessCommand] instance.
|
||||
*Clones a [GlobalBrightnessCommand] instance.
|
||||
*/
|
||||
struct GlobalBrightnessCommand */*notnull*/ sp_cmd_brightness_global_clone(struct GlobalBrightnessCommand */*notnull*/ command);
|
||||
struct GlobalBrightnessCommand */*notnull*/ sp_cmd_brightness_global_clone(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||
|
||||
void sp_cmd_brightness_global_free(struct BitmapCommand */*notnull*/ command);
|
||||
/**
|
||||
*Deallocates a [GlobalBrightnessCommand] instance.
|
||||
*/
|
||||
void sp_cmd_brightness_global_free(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||
|
||||
Brightness sp_cmd_brightness_global_get(struct GlobalBrightnessCommand */*notnull*/ command);
|
||||
|
||||
|
@ -1345,16 +1342,14 @@ void sp_cmd_brightness_global_set(struct GlobalBrightnessCommand */*notnull*/ co
|
|||
Brightness brightness);
|
||||
|
||||
/**
|
||||
* Clones an [BrightnessGridCommand] instance.
|
||||
*
|
||||
* returns: a new [BrightnessGridCommand] instance.
|
||||
*Clones a [BrightnessGridCommand] instance.
|
||||
*/
|
||||
struct BrightnessGridCommand */*notnull*/ sp_cmd_brightness_grid_clone(struct BrightnessGridCommand */*notnull*/ command);
|
||||
struct BrightnessGridCommand */*notnull*/ sp_cmd_brightness_grid_clone(struct BrightnessGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Deallocates a [BitmapCommand].
|
||||
*Deallocates a [BrightnessGridCommand] instance.
|
||||
*/
|
||||
void sp_cmd_brightness_grid_free(struct BitmapCommand */*notnull*/ command);
|
||||
void sp_cmd_brightness_grid_free(struct BrightnessGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Moves the provided [BrightnessGrid] into a new [BrightnessGridCommand],
|
||||
|
@ -1406,16 +1401,14 @@ void sp_cmd_brightness_grid_set_origin(struct BrightnessGridCommand */*notnull*/
|
|||
size_t origin_y);
|
||||
|
||||
/**
|
||||
* Clones an [CharGridCommand] instance.
|
||||
*
|
||||
* returns: a new [CharGridCommand] instance.
|
||||
*Clones a [CharGridCommand] instance.
|
||||
*/
|
||||
struct CharGridCommand */*notnull*/ sp_cmd_char_grid_clone(struct CharGridCommand */*notnull*/ command);
|
||||
struct CharGridCommand */*notnull*/ sp_cmd_char_grid_clone(struct CharGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Deallocates a [BitmapCommand].
|
||||
*Deallocates a [CharGridCommand] instance.
|
||||
*/
|
||||
void sp_cmd_char_grid_free(struct BitmapCommand */*notnull*/ command);
|
||||
void sp_cmd_char_grid_free(struct CharGridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Moves the provided [CharGrid] into a new [CharGridCommand],
|
||||
|
@ -1467,9 +1460,9 @@ void sp_cmd_char_grid_set_origin(struct CharGridCommand */*notnull*/ command,
|
|||
struct Packet *sp_cmd_char_grid_try_into_packet(struct CharGridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Deallocates a [ClearCommand].
|
||||
*Deallocates a [ClearCommand] instance.
|
||||
*/
|
||||
void sp_cmd_clear_free(struct ClearCommand */*notnull*/ command);
|
||||
void sp_cmd_clear_free(struct ClearCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Set all pixels to the off state.
|
||||
|
@ -1481,16 +1474,14 @@ void sp_cmd_clear_free(struct ClearCommand */*notnull*/ command);
|
|||
struct ClearCommand */*notnull*/ sp_cmd_clear_new(void);
|
||||
|
||||
/**
|
||||
* Clones an [Cp437GridCommand] instance.
|
||||
*
|
||||
* returns: a new [Cp437GridCommand] instance.
|
||||
*Clones a [Cp437GridCommand] instance.
|
||||
*/
|
||||
struct Cp437GridCommand */*notnull*/ sp_cmd_cp437_grid_clone(struct Cp437GridCommand */*notnull*/ command);
|
||||
struct Cp437GridCommand */*notnull*/ sp_cmd_cp437_grid_clone(struct Cp437GridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Deallocates a [Cp437GridCommand].
|
||||
*Deallocates a [Cp437GridCommand] instance.
|
||||
*/
|
||||
void sp_cmd_cp437_grid_free(struct BitmapCommand */*notnull*/ command);
|
||||
void sp_cmd_cp437_grid_free(struct Cp437GridCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Moves the provided [Cp437Grid] into a new [Cp437GridCommand],
|
||||
|
@ -1553,9 +1544,9 @@ void sp_cmd_cp437_grid_set_origin(struct Cp437GridCommand */*notnull*/ command,
|
|||
struct Packet *sp_cmd_cp437_grid_try_into_packet(struct Cp437GridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Deallocates a [FadeOutCommand].
|
||||
*Deallocates a [FadeOutCommand] instance.
|
||||
*/
|
||||
void sp_cmd_fade_out_free(struct ClearCommand */*notnull*/ command);
|
||||
void sp_cmd_fade_out_free(struct FadeOutCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* A yet-to-be-tested command.
|
||||
|
@ -1603,9 +1594,9 @@ struct Packet *sp_cmd_generic_into_packet(struct Command command);
|
|||
struct Command sp_cmd_generic_try_from_packet(struct Packet */*notnull*/ packet);
|
||||
|
||||
/**
|
||||
* Deallocates a [HardResetCommand].
|
||||
*Deallocates a [HardResetCommand] instance.
|
||||
*/
|
||||
void sp_cmd_hard_reset_free(struct ClearCommand */*notnull*/ command);
|
||||
void sp_cmd_hard_reset_free(struct HardResetCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Kills the udp daemon on the display, which usually results in a restart.
|
||||
|
@ -1617,9 +1608,9 @@ void sp_cmd_hard_reset_free(struct ClearCommand */*notnull*/ command);
|
|||
struct HardResetCommand */*notnull*/ sp_cmd_hard_reset_new(void);
|
||||
|
||||
/**
|
||||
* Clones a [Cp437Grid].
|
||||
*Clones a [Cp437Grid] instance.
|
||||
*/
|
||||
Cp437Grid */*notnull*/ sp_cp437_grid_clone(Cp437Grid */*notnull*/ grid);
|
||||
Cp437Grid */*notnull*/ sp_cp437_grid_clone(Cp437Grid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Sets the value of all cells in the [Cp437Grid].
|
||||
|
@ -1632,9 +1623,9 @@ Cp437Grid */*notnull*/ sp_cp437_grid_clone(Cp437Grid */*notnull*/ grid);
|
|||
void sp_cp437_grid_fill(Cp437Grid */*notnull*/ cp437_grid, uint8_t value);
|
||||
|
||||
/**
|
||||
* Deallocates a [Cp437Grid].
|
||||
*Deallocates a [Cp437Grid] instance.
|
||||
*/
|
||||
void sp_cp437_grid_free(Cp437Grid */*notnull*/ cp437_grid);
|
||||
void sp_cp437_grid_free(Cp437Grid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Gets the current value at the specified position.
|
||||
|
@ -1723,16 +1714,14 @@ struct ByteSlice sp_cp437_grid_unsafe_data_ref(Cp437Grid */*notnull*/ cp437_grid
|
|||
size_t sp_cp437_grid_width(Cp437Grid */*notnull*/ cp437_grid);
|
||||
|
||||
/**
|
||||
* Clones a [Packet].
|
||||
*
|
||||
* returns: a new [Packet] instance.
|
||||
*Clones a [Packet] instance.
|
||||
*/
|
||||
struct Packet */*notnull*/ sp_packet_clone(struct Packet */*notnull*/ packet);
|
||||
struct Packet */*notnull*/ sp_packet_clone(struct Packet */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Deallocates a [Packet].
|
||||
*Deallocates a [Packet] instance.
|
||||
*/
|
||||
void sp_packet_free(struct Packet */*notnull*/ packet);
|
||||
void sp_packet_free(struct Packet */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Creates a raw [Packet] from parts.
|
||||
|
@ -1792,9 +1781,9 @@ bool sp_u16_to_command_code(uint16_t code,
|
|||
CommandCode *result);
|
||||
|
||||
/**
|
||||
* Closes and deallocates a [UdpSocket].
|
||||
*Deallocates a [UdpSocket] instance.
|
||||
*/
|
||||
void sp_udp_free(struct UdpSocket */*notnull*/ connection);
|
||||
void sp_udp_free(struct UdpSocket */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Creates a new instance of [UdpSocket].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue