diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-05-13 18:12:56 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-05-13 18:12:56 +0200 |
| commit | 135ce06aa89742459473829966480bbc94d4b5c6 (patch) | |
| tree | fe3e4142d8b68a7eda7227f574765b32660901e8 /lib/src/turnsmm/turn-order.cpp | |
| parent | 9513f7303ffde9fbda869e346523a23197f4ece9 (diff) | |
| download | turns-135ce06aa89742459473829966480bbc94d4b5c6.tar.xz turns-135ce06aa89742459473829966480bbc94d4b5c6.zip | |
lib: add participant-count property
Diffstat (limited to 'lib/src/turnsmm/turn-order.cpp')
| -rw-r--r-- | lib/src/turnsmm/turn-order.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/src/turnsmm/turn-order.cpp b/lib/src/turnsmm/turn-order.cpp index 8dbcd9c..8e1914d 100644 --- a/lib/src/turnsmm/turn-order.cpp +++ b/lib/src/turnsmm/turn-order.cpp @@ -14,6 +14,7 @@ #include <glib-object.h> #include <bit> +#include <cstddef> namespace Turns { @@ -66,11 +67,21 @@ namespace Turns return gobj(); } + auto TurnOrder::get_participant_count() const noexcept -> std::size_t + { + return turns_turn_order_get_participant_count(const_cast<BaseObjectType *>(unwrap(this))); + } + auto TurnOrder::get_running() const noexcept -> bool { return turns_turn_order_get_running(const_cast<BaseObjectType *>(unwrap(this))); } + auto TurnOrder::property_participant_count() const noexcept -> Glib::PropertyProxy_ReadOnly<std::size_t> + { + return {this, "participant-count"}; + } + auto TurnOrder::property_running() const noexcept -> Glib::PropertyProxy_ReadOnly<bool> { return {this, "running"}; |
