wrap_function without defined signature
This commit is contained in:
parent
a06c3a83aa
commit
749e224937
14 changed files with 630 additions and 519 deletions
|
@ -675,6 +675,8 @@ void sp_bitmap_free(struct Bitmap */*notnull*/ instance);
|
|||
* The provided BitVec gets consumed.
|
||||
*
|
||||
* Returns NULL in case of error.
|
||||
*
|
||||
* This function is part of the sp_bitmap module.
|
||||
*/
|
||||
struct Bitmap *sp_bitmap_from_bitvec(size_t width, BitVec */*notnull*/ bitvec);
|
||||
|
||||
|
@ -702,6 +704,8 @@ size_t sp_bitmap_height(struct Bitmap */*notnull*/ instance);
|
|||
|
||||
/**
|
||||
* Consumes the Bitmap and returns the contained BitVec.
|
||||
*
|
||||
* This function is part of the sp_bitmap module.
|
||||
*/
|
||||
BitVec */*notnull*/ sp_bitmap_into_bitvec(struct Bitmap */*notnull*/ bitmap);
|
||||
|
||||
|
@ -711,6 +715,8 @@ BitVec */*notnull*/ sp_bitmap_into_bitvec(struct Bitmap */*notnull*/ bitmap);
|
|||
* The provided [Bitmap] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the sp_bitmap module.
|
||||
*/
|
||||
struct Packet *sp_bitmap_into_packet(struct Bitmap */*notnull*/ bitmap,
|
||||
size_t x,
|
||||
|
@ -726,6 +732,8 @@ struct Packet *sp_bitmap_into_packet(struct Bitmap */*notnull*/ bitmap,
|
|||
* - `height`: size in pixels in y-direction
|
||||
*
|
||||
* returns: [Bitmap] that contains a copy of the provided data, or NULL in case of an error.
|
||||
*
|
||||
* This function is part of the sp_bitmap module.
|
||||
*/
|
||||
struct Bitmap *sp_bitmap_load(size_t width,
|
||||
size_t height,
|
||||
|
@ -755,6 +763,8 @@ struct Bitmap *sp_bitmap_load(size_t width,
|
|||
* sp_bitmap_set(grid, 0, 0, false);
|
||||
* sp_bitmap_free(grid);
|
||||
* ```
|
||||
*
|
||||
* This function is part of the sp_bitmap module.
|
||||
*/
|
||||
struct Bitmap *sp_bitmap_new(size_t width, size_t height);
|
||||
|
||||
|
@ -762,6 +772,8 @@ struct Bitmap *sp_bitmap_new(size_t width, size_t height);
|
|||
* Creates a new [Bitmap] with a size matching the screen.
|
||||
*
|
||||
* returns: [Bitmap] initialized to all pixels off.
|
||||
*
|
||||
* This function is part of the sp_bitmap module.
|
||||
*/
|
||||
struct Bitmap */*notnull*/ sp_bitmap_new_max_sized(void);
|
||||
|
||||
|
@ -845,6 +857,8 @@ bool sp_bitvec_get(BitVec */*notnull*/ instance, size_t index);
|
|||
* The provided [DisplayBitVec] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the sp_bitvec module.
|
||||
*/
|
||||
struct Packet *sp_bitvec_into_packet(BitVec */*notnull*/ bitvec,
|
||||
size_t offset,
|
||||
|
@ -869,6 +883,8 @@ size_t sp_bitvec_len(BitVec */*notnull*/ instance);
|
|||
* Interpret the data as a series of bits and load then into a new [DisplayBitVec] instance.
|
||||
*
|
||||
* returns: [DisplayBitVec] instance containing data.
|
||||
*
|
||||
* This function is part of the sp_bitvec module.
|
||||
*/
|
||||
BitVec */*notnull*/ sp_bitvec_load(struct ByteSlice data);
|
||||
|
||||
|
@ -884,6 +900,8 @@ BitVec */*notnull*/ sp_bitvec_load(struct ByteSlice data);
|
|||
* # Panics
|
||||
*
|
||||
* - when `size` is not divisible by 8.
|
||||
*
|
||||
* This function is part of the sp_bitvec module.
|
||||
*/
|
||||
BitVec */*notnull*/ sp_bitvec_new(size_t size);
|
||||
|
||||
|
@ -965,6 +983,8 @@ size_t sp_brightness_grid_height(BrightnessGrid */*notnull*/ instance);
|
|||
* The provided [BrightnessGrid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the sp_brightness_grid module.
|
||||
*/
|
||||
struct Packet *sp_brightness_grid_into_packet(BrightnessGrid */*notnull*/ grid,
|
||||
size_t x,
|
||||
|
@ -976,6 +996,8 @@ struct Packet *sp_brightness_grid_into_packet(BrightnessGrid */*notnull*/ grid,
|
|||
* Any out of range values will be set to [Brightness::MAX] or [Brightness::MIN].
|
||||
*
|
||||
* returns: new [BrightnessGrid] instance, or NULL in case of an error.
|
||||
*
|
||||
* This function is part of the sp_brightness_grid module.
|
||||
*/
|
||||
BrightnessGrid *sp_brightness_grid_load(size_t width,
|
||||
size_t height,
|
||||
|
@ -999,6 +1021,8 @@ BrightnessGrid *sp_brightness_grid_load(size_t width,
|
|||
* TypedCommand *command = sp_command_char_brightness(grid);
|
||||
* sp_udp_free(connection);
|
||||
* ```
|
||||
*
|
||||
* This function is part of the sp_brightness_grid module.
|
||||
*/
|
||||
BrightnessGrid */*notnull*/ sp_brightness_grid_new(size_t width, size_t height);
|
||||
|
||||
|
@ -1080,6 +1104,8 @@ size_t sp_char_grid_height(CharGrid */*notnull*/ instance);
|
|||
* The provided [CharGrid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the sp_char_grid module.
|
||||
*/
|
||||
struct Packet *sp_char_grid_into_packet(CharGrid */*notnull*/ grid,
|
||||
size_t x,
|
||||
|
@ -1089,6 +1115,8 @@ struct Packet *sp_char_grid_into_packet(CharGrid */*notnull*/ grid,
|
|||
* Loads a [CharGrid] with the specified dimensions from the provided data.
|
||||
*
|
||||
* returns: new CharGrid or NULL in case of an error
|
||||
*
|
||||
* This function is part of the sp_char_grid module.
|
||||
*/
|
||||
CharGrid *sp_char_grid_load(size_t width, size_t height, struct ByteSlice data);
|
||||
|
||||
|
@ -1105,6 +1133,8 @@ CharGrid *sp_char_grid_load(size_t width, size_t height, struct ByteSlice data);
|
|||
* sp_char_grid_set(grid, 0, 0, '!');
|
||||
* sp_char_grid_free(grid);
|
||||
* ```
|
||||
*
|
||||
* This function is part of the sp_char_grid module.
|
||||
*/
|
||||
CharGrid */*notnull*/ sp_char_grid_new(size_t width, size_t height);
|
||||
|
||||
|
@ -1152,6 +1182,8 @@ void sp_cmd_bitmap_free(struct BitmapCommand */*notnull*/ instance);
|
|||
* leaving other fields as their default values.
|
||||
*
|
||||
* Rust equivalent: `BitmapCommand::from(bitmap)`
|
||||
*
|
||||
* This function is part of the sp_cmd_bitmap module.
|
||||
*/
|
||||
struct BitmapCommand */*notnull*/ sp_cmd_bitmap_from_bitmap(struct Bitmap */*notnull*/ bitmap);
|
||||
|
||||
|
@ -1183,6 +1215,8 @@ void sp_cmd_bitmap_get_origin(struct BitmapCommand */*notnull*/ command,
|
|||
* The passed [Bitmap] gets consumed.
|
||||
*
|
||||
* Returns: a new [BitmapCommand] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_bitmap module.
|
||||
*/
|
||||
struct BitmapCommand */*notnull*/ sp_cmd_bitmap_new(struct Bitmap */*notnull*/ bitmap,
|
||||
size_t origin_x,
|
||||
|
@ -1212,6 +1246,8 @@ void sp_cmd_bitmap_set_origin(struct BitmapCommand */*notnull*/ command,
|
|||
* Tries to turn a [BitmapCommand] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the sp_cmd_bitmap module.
|
||||
*/
|
||||
struct Packet *sp_cmd_bitmap_try_into_packet(struct BitmapCommand */*notnull*/ command);
|
||||
|
||||
|
@ -1258,6 +1294,8 @@ BinaryOperation sp_cmd_bitvec_get_operation(struct BitVecCommand */*notnull*/ in
|
|||
* For example, [`BinaryOperation::Or`] can be used to turn on some pixels without affecting other pixels.
|
||||
*
|
||||
* The contained [`DisplayBitVec`] is always uncompressed.
|
||||
*
|
||||
* This function is part of the sp_cmd_bitvec module.
|
||||
*/
|
||||
struct BitVecCommand */*notnull*/ sp_cmd_bitvec_new(BitVec */*notnull*/ bitvec,
|
||||
size_t offset,
|
||||
|
@ -1292,6 +1330,8 @@ void sp_cmd_bitvec_set_operation(struct BitVecCommand */*notnull*/ instance,
|
|||
* Tries to turn a [BitVecCommand] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the sp_cmd_bitvec module.
|
||||
*/
|
||||
struct Packet *sp_cmd_bitvec_try_into_packet(struct BitVecCommand */*notnull*/ command);
|
||||
|
||||
|
@ -1310,12 +1350,19 @@ void sp_cmd_brightness_global_free(struct GlobalBrightnessCommand */*notnull*/ i
|
|||
*/
|
||||
Brightness sp_cmd_brightness_global_get_brightness(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Turns the command into a packet
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_global module.
|
||||
*/
|
||||
struct Packet */*notnull*/ sp_cmd_brightness_global_into_packet(struct GlobalBrightnessCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Set the brightness of all tiles to the same value.
|
||||
*
|
||||
* Returns: a new [GlobalBrightnessCommand] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_global module.
|
||||
*/
|
||||
struct GlobalBrightnessCommand */*notnull*/ sp_cmd_brightness_global_new(Brightness brightness);
|
||||
|
||||
|
@ -1338,6 +1385,8 @@ void sp_cmd_brightness_grid_free(struct BrightnessGridCommand */*notnull*/ insta
|
|||
/**
|
||||
* Moves the provided [BrightnessGrid] into a new [BrightnessGridCommand],
|
||||
* leaving other fields as their default values.
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_grid module.
|
||||
*/
|
||||
struct BrightnessGridCommand */*notnull*/ sp_cmd_brightness_grid_from_grid(BrightnessGrid */*notnull*/ grid);
|
||||
|
||||
|
@ -1357,6 +1406,8 @@ void sp_cmd_brightness_grid_get_origin(struct BrightnessGridCommand */*notnull*/
|
|||
* Tries to turn a [BrightnessGridCommand] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_grid module.
|
||||
*/
|
||||
struct Packet *sp_cmd_brightness_grid_into_packet(struct BrightnessGridCommand */*notnull*/ command);
|
||||
|
||||
|
@ -1366,6 +1417,8 @@ struct Packet *sp_cmd_brightness_grid_into_packet(struct BrightnessGridCommand *
|
|||
* The passed [BrightnessGrid] gets consumed.
|
||||
*
|
||||
* Returns: a new [BrightnessGridCommand] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_brightness_grid module.
|
||||
*/
|
||||
struct BrightnessGridCommand */*notnull*/ sp_cmd_brightness_grid_new(BrightnessGrid */*notnull*/ grid,
|
||||
size_t origin_x,
|
||||
|
@ -1397,13 +1450,15 @@ void sp_cmd_char_grid_free(struct CharGridCommand */*notnull*/ instance);
|
|||
/**
|
||||
* Moves the provided [CharGrid] into a new [CharGridCommand],
|
||||
* leaving other fields as their default values.
|
||||
*
|
||||
* This function is part of the sp_cmd_char_grid module.
|
||||
*/
|
||||
struct CharGridCommand */*notnull*/ sp_cmd_char_grid_from_grid(CharGrid */*notnull*/ grid);
|
||||
|
||||
/**
|
||||
* Returns a pointer to the [CharGrid] contained in the [CharGridCommand].
|
||||
*/
|
||||
CharGrid *sp_cmd_char_grid_get(struct CharGridCommand */*notnull*/ command);
|
||||
CharGrid */*notnull*/ sp_cmd_char_grid_get(struct CharGridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Reads the origin field of the [CharGridCommand].
|
||||
|
@ -1418,6 +1473,8 @@ void sp_cmd_char_grid_get_origin(struct CharGridCommand */*notnull*/ command,
|
|||
* The passed [CharGrid] gets consumed.
|
||||
*
|
||||
* Returns: a new [CharGridCommand] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_char_grid module.
|
||||
*/
|
||||
struct CharGridCommand */*notnull*/ sp_cmd_char_grid_new(CharGrid */*notnull*/ grid,
|
||||
size_t origin_x,
|
||||
|
@ -1440,6 +1497,8 @@ void sp_cmd_char_grid_set_origin(struct CharGridCommand */*notnull*/ command,
|
|||
* Tries to turn a [CharGridCommand] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the sp_cmd_char_grid module.
|
||||
*/
|
||||
struct Packet *sp_cmd_char_grid_try_into_packet(struct CharGridCommand */*notnull*/ command);
|
||||
|
||||
|
@ -1454,6 +1513,8 @@ void sp_cmd_clear_free(struct ClearCommand */*notnull*/ instance);
|
|||
* Does not affect brightness.
|
||||
*
|
||||
* Returns: a new [ClearCommand] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_clear module.
|
||||
*/
|
||||
struct ClearCommand */*notnull*/ sp_cmd_clear_new(void);
|
||||
|
||||
|
@ -1470,6 +1531,8 @@ void sp_cmd_cp437_grid_free(struct Cp437GridCommand */*notnull*/ instance);
|
|||
/**
|
||||
* Moves the provided [Cp437Grid] into a new [Cp437GridCommand],
|
||||
* leaving other fields as their default values.
|
||||
*
|
||||
* This function is part of the sp_cmd_cp437_grid module.
|
||||
*/
|
||||
struct Cp437GridCommand */*notnull*/ sp_cmd_cp437_grid_from_grid(Cp437Grid */*notnull*/ grid);
|
||||
|
||||
|
@ -1498,6 +1561,8 @@ void sp_cmd_cp437_grid_get_origin(struct Cp437GridCommand */*notnull*/ command,
|
|||
* The text is sent in the form of a 2D grid of [CP-437] encoded characters.
|
||||
*
|
||||
* The origin is relative to the top-left of the display.
|
||||
*
|
||||
* This function is part of the sp_cmd_cp437_grid module.
|
||||
*/
|
||||
struct Cp437GridCommand */*notnull*/ sp_cmd_cp437_grid_new(Cp437Grid */*notnull*/ grid,
|
||||
size_t origin_x,
|
||||
|
@ -1524,6 +1589,8 @@ void sp_cmd_cp437_grid_set_origin(struct Cp437GridCommand */*notnull*/ command,
|
|||
* Tries to turn a [Cp437GridCommand] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the sp_cmd_cp437_grid module.
|
||||
*/
|
||||
struct Packet *sp_cmd_cp437_grid_try_into_packet(struct Cp437GridCommand */*notnull*/ command);
|
||||
|
||||
|
@ -1536,6 +1603,8 @@ void sp_cmd_fade_out_free(struct FadeOutCommand */*notnull*/ instance);
|
|||
* A yet-to-be-tested command.
|
||||
*
|
||||
* Returns: a new [FadeOutCommand] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_fade_out module.
|
||||
*/
|
||||
struct FadeOutCommand */*notnull*/ sp_cmd_fade_out_new(void);
|
||||
|
||||
|
@ -1588,6 +1657,8 @@ void sp_cmd_hard_reset_free(struct HardResetCommand */*notnull*/ instance);
|
|||
* Please do not send this in your normal program flow.
|
||||
*
|
||||
* Returns: a new [HardResetCommand] instance.
|
||||
*
|
||||
* This function is part of the sp_cmd_hard_reset module.
|
||||
*/
|
||||
struct HardResetCommand */*notnull*/ sp_cmd_hard_reset_new(void);
|
||||
|
||||
|
@ -1650,6 +1721,8 @@ size_t sp_cp437_grid_height(Cp437Grid */*notnull*/ instance);
|
|||
* The provided [Cp437Grid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the sp_cp437_grid module.
|
||||
*/
|
||||
struct Packet *sp_cp437_grid_into_packet(Cp437Grid */*notnull*/ grid,
|
||||
size_t x,
|
||||
|
@ -1657,6 +1730,8 @@ struct Packet *sp_cp437_grid_into_packet(Cp437Grid */*notnull*/ grid,
|
|||
|
||||
/**
|
||||
* Loads a [Cp437Grid] with the specified dimensions from the provided data.
|
||||
*
|
||||
* This function is part of the sp_cp437_grid module.
|
||||
*/
|
||||
Cp437Grid *sp_cp437_grid_load(size_t width,
|
||||
size_t height,
|
||||
|
@ -1666,6 +1741,8 @@ Cp437Grid *sp_cp437_grid_load(size_t width,
|
|||
* Creates a new [Cp437Grid] with the specified dimensions.
|
||||
*
|
||||
* returns: [Cp437Grid] initialized to 0.
|
||||
*
|
||||
* This function is part of the sp_cp437_grid module.
|
||||
*/
|
||||
Cp437Grid */*notnull*/ sp_cp437_grid_new(size_t width, size_t height);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue