summaryrefslogtreecommitdiff
path: root/lib/src/turns-turn-order.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/turns-turn-order.h')
-rw-r--r--lib/src/turns-turn-order.h69
1 files changed, 34 insertions, 35 deletions
diff --git a/lib/src/turns-turn-order.h b/lib/src/turns-turn-order.h
index cc524c6..ce4d992 100644
--- a/lib/src/turns-turn-order.h
+++ b/lib/src/turns-turn-order.h
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/
- #ifndef TURNS_TURN_ORDER_H
+#ifndef TURNS_TURN_ORDER_H
#define TURNS_TURN_ORDER_H
#include "turns-participant.h"
@@ -13,18 +13,18 @@
G_BEGIN_DECLS
+/**
+ * TurnsTurnOrderSortMode:
+ * @TURNS_TURN_ORDER_SORT_MODE_DESCENDING: Sort higher priorities before lower ones
+ * @TURNS_TURN_ORDER_SORT_MODE_ASCENDING: Sort higher priorities after lower ones
+ *
+ * Orderings that can be applied to the turn order.
+ *
+ * See [property@Turns.TurnOrder.sort-mode]
+ */
typedef enum
{
- /**
- * @brief Sorting is in descending order.
- * @since 1.0.0
- */
TURNS_TURN_ORDER_SORT_MODE_DESCENDING,
-
- /**
- * @brief Sorting is in ascending order.
- * @since 1.0.0
- */
TURNS_TURN_ORDER_SORT_MODE_ASCENDING,
} TurnsTurnOrderSortMode;
@@ -35,60 +35,59 @@ GType turns_turn_order_sort_mode_get_type(void) G_GNUC_CONST;
G_DECLARE_FINAL_TYPE(TurnsTurnOrder, turns_turn_order, TURNS, TURN_ORDER, GObject)
/**
- * @class TurnsTurnOrder turns-turn-order.h "turns-turn-order.h"
- * @since 1.0.0
- * @brief Manages the order of turns for a given set of participants.
+ * TurnsTurnOrder:
+ *
+ * Manages the order of turns for a given set of `TurnsParticipant`s.
*/
/**
- * @brief Creates a new turn order.
- * @since 1.0.0
+ * turns_turn_order_new:
+ *
+ * Creates a new turn order.
*
- * @return A new @p Turns.TurnOrder
+ * Returns: (transfer full): a new `TurnsTurnOrder`.
*/
TurnsTurnOrder * turns_turn_order_new(void) G_GNUC_WARN_UNUSED_RESULT;
/**
- * @brief Adds a participant to the turn order.
- * @since 1.0.0
+ * turns_turn_order_add:
+ * @self: a turn order.
+ * @participant: (transfer full): A participant to be added.
*
- * @param participant The participant to be added.
- *
- * @note (transfer none) - The data is owned by the caller of the method.
+ * Adds a participant to a turn-order.
*/
void turns_turn_order_add(TurnsTurnOrder * self, TurnsParticipant * participant);
/**
- * @brief Gets the number of participants in the turn order.
- * @since 1.0.0
+ * turns_turn_order_get_participant_count:
+ * @self: a turn order.
*
- * @return The current number of participants in the turn order.
+ * Gets the number of participants in the turn order.
*/
gsize turns_turn_order_get_participant_count(TurnsTurnOrder const * self) G_GNUC_WARN_UNUSED_RESULT;
/**
- * @brief Gets whether the turn order is currently running.
- * @since 1.0.0
+ * turns_turn_order_get_running: (get-property running):
+ * @self: a turn order.
*
- * @return The current value of the @p Turns.TurnOrder:running property.
+ * Gets whether the turn order is currently running.
*/
gboolean turns_turn_order_get_running(TurnsTurnOrder const * self) G_GNUC_WARN_UNUSED_RESULT;
/**
- * @brief Gets the current sort mode of the turn order.
- * @since 1.0.0
+ * turns_turn_order_get_sort_mode: (get-property sort-mode):
+ * @self: a turn order.
*
- * @return The current value of the @p Turns.TurnOrder:sort-mode property.
+ * Gets whether higher priority values are sorted before or after lower ones.
*/
TurnsTurnOrderSortMode turns_turn_order_get_sort_mode(TurnsTurnOrder const * self) G_GNUC_WARN_UNUSED_RESULT;
/**
- * @brief Sets whether to sort lower priorities before larger ones.
- * @since 1.0.0
- *
- * Sets property @p Turns.TurnOrder:sort-mode
+ * turns_turn_order_set_sort_mode: (set-property sort-mode):
+ * @self: a turn order.
+ * @sort_mode: whether higher priorities should be sorted before or after lower ones.
*
- * @param sort_mode Whether to sort smaller priorities first.
+ * Sets whether higher priority values are sorted before or after lower ones.
*/
void turns_turn_order_set_sort_mode(TurnsTurnOrder * self, TurnsTurnOrderSortMode sort_mode);