diff options
Diffstat (limited to 'lib/src/turns-participant.h')
| -rw-r--r-- | lib/src/turns-participant.h | 129 |
1 files changed, 59 insertions, 70 deletions
diff --git a/lib/src/turns-participant.h b/lib/src/turns-participant.h index 1d9950b..28588a7 100644 --- a/lib/src/turns-participant.h +++ b/lib/src/turns-participant.h @@ -11,30 +11,23 @@ G_BEGIN_DECLS +/** + * TurnsParticipantDisposition: + * @TURNS_PARTICIPANT_DISPOSITION_NEUTRAL: The participant is neutral towards the player characters + * @TURNS_PARTICIPANT_DISPOSITION_FRIENDLY: The participant is friendly towards the player characters + * @TURNS_PARTICIPANT_DISPOSITION_HOSTILE: The participant is hostile towards the player characters + * @TURNS_PARTICIPANT_DISPOSITION_SECRET: The participants disposition towards the player characters is unknown to the players + * + * Orderings that can be applied to the turn order. + * + * See [property@Turns.TurnOrder.sort-mode] + */ + typedef enum { - /** - * @brief The participant is neutral towards the player characters. - * @since 1.0.0 - */ TURNS_PARTICIPANT_DISPOSITION_NEUTRAL, - - /** - * @brief The participant is friendly towards the player characters. - * @since 1.0.0 - */ TURNS_PARTICIPANT_DISPOSITION_FRIENDLY, - - /** - * @brief The participant is hostile towards the player characters. - * @since 1.0.0 - */ TURNS_PARTICIPANT_DISPOSITION_HOSTILE, - - /** - * @brief The participants disposition towards the player characters is unknown to the players. - * @since 1.0.0 - */ TURNS_PARTICIPANT_DISPOSITION_SECRET, } TurnsParticipantDisposition; @@ -45,132 +38,128 @@ GType turns_participant_disposition_get_type(void) G_GNUC_CONST; G_DECLARE_FINAL_TYPE(TurnsParticipant, turns_participant, TURNS, PARTICIPANT, GObject) /** - * @class TurnsParticipant turns-participant.h "turns-participant.h" - * @since 1.0.0 - * @brief Represents an actor or participant in a turn order. + * TurnsParticipant: + * + * Represents an actor or participant in a turn order. */ /** - * @brief Creates a new participant. - * @since 1.0.0 + * turns_participant_new: * - * This functions constructs a default initialized instance, meaning: - * - @p name is the empty string - * - @p priority is 0.0f - * - @p disposition is Disposition.Neutral. + * Creates a new participant. * - * @return A new @p Turns.Participant + * Returns: a new `TurnsParticipant` */ G_GNUC_WARN_UNUSED_RESULT TurnsParticipant * turns_participant_new(void); /** - * @brief Creates a new participant with the given property values. - * @since 1.0.0 + * turns_participant_new_with: + * @name: The name of the new instance. + * @priority: The priority of the new instance. + * @disposition: The disposition of the new instance. + * + * Creates a new participant with the given name, priority, and disposition. * - * @param name The name of the new instance. - (transfer none) - The data is owned by the caller of the function. - The value is a NUL terminated UTF-8 string. - * @param priority The priority of the new instance. - * @param disposition The disposition of the new instance. + * Returns: a new `TurnsParticipant` */ G_GNUC_WARN_UNUSED_RESULT TurnsParticipant * turns_participant_new_with(gchar const * name, gfloat priority, TurnsParticipantDisposition disposition); /** - * @brief Gets whether the participant is currently active in a turn order. - * @since 1.0.0 + * turns_participant_get_active: (get-property active) + * @self: a participant * - * @return The current value of the @p Turns.Participant:active property. + * Gets whether the participant is currently active in a turn order. */ G_GNUC_WARN_UNUSED_RESULT gboolean turns_participant_get_active(TurnsParticipant const * self); /** - * @brief Gets whether the participant has been defeated. - * @since 1.0.0 + * turns_participant_get_defeated: (get-property defeated) + * @self: a participant * - * @return The current value of the @p Turns.Participant:defeated property. + * Gets whether the participant has been defeated. */ G_GNUC_WARN_UNUSED_RESULT gboolean turns_participant_get_defeated(TurnsParticipant const * self); /** - * @brief Gets the disposition of the participant. - * @since 1.0.0 + * turns_participant_get_disposition: (get-property disposition) + * @self: a participant * - * @return The current value of the @p Turns.Participant:disposition property. + * Gets the disposition of the participant towards the players. */ G_GNUC_WARN_UNUSED_RESULT TurnsParticipantDisposition turns_participant_get_disposition(TurnsParticipant const * self); /** - * @brief Gets the id of the participant. - * @since 1.0.0 + * turns_participant_get_id: + * @self: a participant * - * @return (transfer none) - The id of the participant. + * Gets the unique id of the participant. */ G_GNUC_WARN_UNUSED_RESULT gchar const * turns_participant_get_id(TurnsParticipant const * self); /** - * @brief Gets the name of the participant. - * @since 1.0.0 + * turns_participant_get_name: (get-property name) + * @self: a participant * - * @return (transfer none) - The current value of the @p Turns.Participant:name property. + * Gets the name of the participant. */ G_GNUC_WARN_UNUSED_RESULT gchar const * turns_participant_get_name(TurnsParticipant const * self); /** - * @brief Get the priority of the participant. - * @since 1.0.0 + * turns_participant_get_priority: (get-property priority) + * @self: a participant * - * @return The current value of the @p Turns.Participant:priority property. + * Gets the priority of the participant. */ G_GNUC_WARN_UNUSED_RESULT gfloat turns_participant_get_priority(TurnsParticipant const * self); /** - * @brief Sets whether the participant is currently active in a turn order. - * @since 1.0.0 + * turns_participant_set_active: (set-property active) + * @self: a participant * - * @param value The new value of the @p Turns.Participant:active property. + * Sets whether the participant is currently active in a turn order. */ void turns_participant_set_active(TurnsParticipant * self, gboolean value); /** - * @brief Set whether the participant has been defeated. - * @since 1.0.0 + * turns_participant_set_defeated: (set-property defeated) + * @self: a participant * - * @param value The new value of the @p Turns.Participant:defeated property. + * Sets whether the participant has been defeated. */ void turns_participant_set_defeated(TurnsParticipant * self, gboolean value); /** - * @brief Sets the disposition of the participant. - * @since 1.0.0 + * turns_participant_set_disposition: (set-property disposition) + * @self: a participant * - * @param value The new value of the @p Turns.Participant:disposition property. + * Sets the disposition of the participant towards the players. */ void turns_participant_set_disposition(TurnsParticipant * self, TurnsParticipantDisposition value); /** - * @brief Sets the name of the participant. - * @since 1.0.0 + * turns_participant_set_name: (set-property name) + * @self: a participant * - * @param value (transfer none) - The new value of the @p Turns.Participant:active property. + * Sets the name of the participant. */ void turns_participant_set_name(TurnsParticipant * self, gchar const * value); /** - * @brief Sets the priority of the participant. - * @since 1.0.0 + * turns_participant_set_priority: (set-property priority) + * @self: a participant * - * @param value The new value of the @p Turns.Participant:priority property. + * Sets the priority of the participant. */ void turns_participant_set_priority(TurnsParticipant * self, gfloat value); G_END_DECLS -#endif
\ No newline at end of file +#endif |
