/* * SPDX-FileCopyrightText: 2025 Felix Morgner * SPDX-License-Identifier: LGPL-2.1-only */ #ifndef TURNSMM_TURN_ORDER_HPP #define TURNSMM_TURN_ORDER_HPP #include "turns-turn-order.h" #include "turnsmm/participant.hpp" #include #include #include #include #include #include #include #include #include namespace Turns { class TurnOrder final : public Glib::Object, public Gio::ListModel { public: using BaseClassType = TurnsTurnOrderClass; using BaseObjectType = TurnsTurnOrder; using CppClassType = class TurnOrder_Class; using CppObjectType = TurnOrder; enum struct SortMode : guint { Descending, Ascending, }; auto static get_base_type() -> GType; auto static get_type() -> GType; TurnOrder(); [[nodiscard]] auto gobj() noexcept -> BaseObjectType *; [[nodiscard]] auto gobj() const -> BaseObjectType const *; [[nodiscard]] auto gobj_copy() noexcept -> BaseObjectType *; auto add(Glib::RefPtr const & participant) noexcept -> void; [[nodiscard]] auto get_participant_count() const noexcept -> std::size_t; [[nodiscard]] auto get_running() const noexcept -> bool; [[nodiscard]] auto get_sort_mode() const noexcept -> SortMode; auto set_sort_mode(SortMode value) noexcept -> void; [[nodiscard]] auto property_running() const noexcept -> Glib::PropertyProxy_ReadOnly; [[nodiscard]] auto property_sort_mode() noexcept -> Glib::PropertyProxy; [[nodiscard]] auto property_sort_mode() const noexcept -> Glib::PropertyProxy_ReadOnly; protected: friend TurnOrder_Class; explicit TurnOrder(BaseObjectType * gobj); }; } // namespace Turns namespace Glib { template<> class Value : public Glib ::Value_Enum { public: auto static value_type() -> GType; }; auto wrap(TurnsTurnOrder * object, bool copy = false) -> Glib::RefPtr; } // namespace Glib #endif