derive try_into_packet automatically
This commit is contained in:
parent
8116375fd0
commit
5ecb84ed16
9 changed files with 102 additions and 100 deletions
|
@ -906,7 +906,7 @@ void sp_bitmapcommand_set_origin(struct BitmapCommand */*notnull*/ command,
|
|||
size_t origin_y);
|
||||
|
||||
/**
|
||||
* Tries to turn a [BitmapCommand] into a [Packet].
|
||||
*Tries to turn a [`BitmapCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
|
@ -1054,7 +1054,7 @@ void sp_bitveccommand_set_operation(struct BitVecCommand */*notnull*/ instance,
|
|||
BinaryOperation value);
|
||||
|
||||
/**
|
||||
* Tries to turn a [BitVecCommand] into a [Packet].
|
||||
*Tries to turn a [`BitVecCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
|
@ -1252,15 +1252,6 @@ void sp_brightnessgridcommand_get_origin(struct BrightnessGridCommand */*notnull
|
|||
size_t */*notnull*/ origin_x,
|
||||
size_t */*notnull*/ origin_y);
|
||||
|
||||
/**
|
||||
* Tries to turn a [BrightnessGridCommand] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `brightnessgridcommand` module.
|
||||
*/
|
||||
struct Packet *sp_brightnessgridcommand_into_packet(struct BrightnessGridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Set the brightness of individual tiles in a rectangular area of the display.
|
||||
*
|
||||
|
@ -1292,6 +1283,15 @@ void sp_brightnessgridcommand_set_origin(struct BrightnessGridCommand */*notnull
|
|||
size_t origin_x,
|
||||
size_t origin_y);
|
||||
|
||||
/**
|
||||
*Tries to turn a [`BrightnessGridCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `brightnessgridcommand` module.
|
||||
*/
|
||||
struct Packet *sp_brightnessgridcommand_try_into_packet(struct BrightnessGridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
*Clones a [`CharGrid`] instance.
|
||||
*
|
||||
|
@ -1470,6 +1470,15 @@ void sp_chargridcommand_set_origin(struct CharGridCommand */*notnull*/ command,
|
|||
size_t origin_x,
|
||||
size_t origin_y);
|
||||
|
||||
/**
|
||||
*Tries to turn a [`CharGridCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `chargridcommand` module.
|
||||
*/
|
||||
struct Packet *sp_chargridcommand_try_into_packet(struct CharGridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
*Clones a [`ClearCommand`] instance.
|
||||
*
|
||||
|
@ -1495,6 +1504,15 @@ void sp_clearcommand_free(struct ClearCommand */*notnull*/ instance);
|
|||
*/
|
||||
struct ClearCommand */*notnull*/ sp_clearcommand_new(void);
|
||||
|
||||
/**
|
||||
*Tries to turn a [`ClearCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `clearcommand` module.
|
||||
*/
|
||||
struct Packet *sp_clearcommand_try_into_packet(struct ClearCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Moves the provided [CharGrid] into a new [CharGridCommand],
|
||||
* leaving other fields as their default values.
|
||||
|
@ -1516,15 +1534,6 @@ struct CharGridCommand */*notnull*/ sp_cmd_chargrid_new(CharGrid */*notnull*/ gr
|
|||
size_t origin_x,
|
||||
size_t origin_y);
|
||||
|
||||
/**
|
||||
* Tries to turn a [CharGridCommand] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `cmd_chargrid` module.
|
||||
*/
|
||||
struct Packet *sp_cmd_chargrid_try_into_packet(struct CharGridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Moves the provided [Cp437Grid] into a new [Cp437GridCommand],
|
||||
* leaving other fields as their default values.
|
||||
|
@ -1546,15 +1555,6 @@ struct Cp437GridCommand */*notnull*/ sp_cmd_cp437grid_new(Cp437Grid */*notnull*/
|
|||
size_t origin_x,
|
||||
size_t origin_y);
|
||||
|
||||
/**
|
||||
* Tries to turn a [Cp437GridCommand] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `cmd_cp437grid` module.
|
||||
*/
|
||||
struct Packet *sp_cmd_cp437grid_try_into_packet(struct Cp437GridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Clones an [SPCommand] instance.
|
||||
*
|
||||
|
@ -1780,6 +1780,15 @@ void sp_cp437gridcommand_set_origin(struct Cp437GridCommand */*notnull*/ command
|
|||
size_t origin_x,
|
||||
size_t origin_y);
|
||||
|
||||
/**
|
||||
*Tries to turn a [`Cp437GridCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `cp437gridcommand` module.
|
||||
*/
|
||||
struct Packet *sp_cp437gridcommand_try_into_packet(struct Cp437GridCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Calls method [`servicepoint::DisplayBitVec::as_raw_mut_slice`].
|
||||
*
|
||||
|
@ -1907,6 +1916,15 @@ void sp_fadeoutcommand_free(struct FadeOutCommand */*notnull*/ instance);
|
|||
*/
|
||||
struct FadeOutCommand */*notnull*/ sp_fadeoutcommand_new(void);
|
||||
|
||||
/**
|
||||
*Tries to turn a [`FadeOutCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `fadeoutcommand` module.
|
||||
*/
|
||||
struct Packet *sp_fadeoutcommand_try_into_packet(struct FadeOutCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
*Clones a [`GlobalBrightnessCommand`] instance.
|
||||
*
|
||||
|
@ -1928,13 +1946,6 @@ void sp_globalbrightnesscommand_free(struct GlobalBrightnessCommand */*notnull*/
|
|||
*/
|
||||
Brightness sp_globalbrightnesscommand_get_brightness(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Turns the command into a packet
|
||||
*
|
||||
* This function is part of the `globalbrightnesscommand` module.
|
||||
*/
|
||||
struct Packet */*notnull*/ sp_globalbrightnesscommand_into_packet(struct GlobalBrightnessCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
* Set the brightness of all tiles to the same value.
|
||||
*
|
||||
|
@ -1952,6 +1963,15 @@ struct GlobalBrightnessCommand */*notnull*/ sp_globalbrightnesscommand_new(Brigh
|
|||
void sp_globalbrightnesscommand_set_brightness(struct GlobalBrightnessCommand */*notnull*/ instance,
|
||||
Brightness value);
|
||||
|
||||
/**
|
||||
*Tries to turn a [`GlobalBrightnessCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `globalbrightnesscommand` module.
|
||||
*/
|
||||
struct Packet *sp_globalbrightnesscommand_try_into_packet(struct GlobalBrightnessCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
*Clones a [`HardResetCommand`] instance.
|
||||
*
|
||||
|
@ -1977,6 +1997,15 @@ void sp_hardresetcommand_free(struct HardResetCommand */*notnull*/ instance);
|
|||
*/
|
||||
struct HardResetCommand */*notnull*/ sp_hardresetcommand_new(void);
|
||||
|
||||
/**
|
||||
*Tries to turn a [`HardResetCommand`] into a [Packet].
|
||||
*
|
||||
* Returns: NULL or a [Packet] containing the command.
|
||||
*
|
||||
* This function is part of the `hardresetcommand` module.
|
||||
*/
|
||||
struct Packet *sp_hardresetcommand_try_into_packet(struct HardResetCommand */*notnull*/ command);
|
||||
|
||||
/**
|
||||
*Clones a [`Packet`] instance.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue