From c45004b73bb045328a724d1d860df6d1515af6d4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 23 May 2025 13:51:10 +0200 Subject: lib: split out header files --- lib/CMakeLists.txt | 45 +++---- lib/include/turns-init.h | 17 +++ lib/include/turns-participant.h | 165 ++++++++++++++++++++++++++ lib/include/turns-turn-order.h | 125 +++++++++++++++++++ lib/include/turns.h | 13 ++ lib/include/turnsmm.hpp | 13 ++ lib/include/turnsmm/enum_helpers.hpp | 39 ++++++ lib/include/turnsmm/init.hpp | 14 +++ lib/include/turnsmm/participant.hpp | 91 ++++++++++++++ lib/include/turnsmm/private/participant_p.hpp | 36 ++++++ lib/include/turnsmm/private/turn-order_p.hpp | 36 ++++++ lib/include/turnsmm/turn-order.hpp | 89 ++++++++++++++ lib/src/turns-init.h | 17 --- lib/src/turns-participant.h | 165 -------------------------- lib/src/turns-turn-order.h | 125 ------------------- lib/src/turns.h | 13 -- lib/src/turnsmm.hpp | 11 -- lib/src/turnsmm/enum_helpers.hpp | 39 ------ lib/src/turnsmm/init.hpp | 14 --- lib/src/turnsmm/participant.hpp | 91 -------------- lib/src/turnsmm/private/participant_p.hpp | 36 ------ lib/src/turnsmm/private/turn-order_p.hpp | 36 ------ lib/src/turnsmm/turn-order.hpp | 89 -------------- 23 files changed, 663 insertions(+), 656 deletions(-) create mode 100644 lib/include/turns-init.h create mode 100644 lib/include/turns-participant.h create mode 100644 lib/include/turns-turn-order.h create mode 100644 lib/include/turns.h create mode 100644 lib/include/turnsmm.hpp create mode 100644 lib/include/turnsmm/enum_helpers.hpp create mode 100644 lib/include/turnsmm/init.hpp create mode 100644 lib/include/turnsmm/participant.hpp create mode 100644 lib/include/turnsmm/private/participant_p.hpp create mode 100644 lib/include/turnsmm/private/turn-order_p.hpp create mode 100644 lib/include/turnsmm/turn-order.hpp delete mode 100644 lib/src/turns-init.h delete mode 100644 lib/src/turns-participant.h delete mode 100644 lib/src/turns-turn-order.h delete mode 100644 lib/src/turns.h delete mode 100644 lib/src/turnsmm.hpp delete mode 100644 lib/src/turnsmm/enum_helpers.hpp delete mode 100644 lib/src/turnsmm/init.hpp delete mode 100644 lib/src/turnsmm/participant.hpp delete mode 100644 lib/src/turnsmm/private/participant_p.hpp delete mode 100644 lib/src/turnsmm/private/turn-order_p.hpp delete mode 100644 lib/src/turnsmm/turn-order.hpp diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d00e804..9389743 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -50,10 +50,10 @@ include("Catch") # Library set(HEADERS - "src/turns-init.h" - "src/turns-participant.h" - "src/turns-turn-order.h" - "src/turns.h" + "include/turns-init.h" + "include/turns-participant.h" + "include/turns-turn-order.h" + "include/turns.h" ) set(SOURCES @@ -67,7 +67,7 @@ add_library("turns::lib" ALIAS "lib") target_sources("lib" PUBLIC FILE_SET HEADERS - BASE_DIRS "src" + BASE_DIRS "include" FILES ${HEADERS} ) @@ -88,7 +88,10 @@ target_compile_features("lib" PUBLIC "cxx_std_23" ) -target_include_directories("lib" PUBLIC "src") +target_include_directories("lib" PUBLIC + "$" + "$" +) target_link_libraries("lib" PUBLIC "PkgConfig::glib" @@ -100,7 +103,6 @@ set_target_properties("lib" PROPERTIES VERSION "${PROJECT_VERSION}" INTERPROCEDURAL_OPTIMIZATION "${TURNS_CAN_DO_IPO}" C_EXTENSIONS OFF - CXX_EXTENSIONS OFF ) target_add_glib_enums("lib" @@ -120,19 +122,22 @@ target_glib_generate_gir("lib" enable_coverage("lib") -install(TARGETS "lib" FILE_SET HEADERS DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/turns") +install(TARGETS "lib" + FILE_SET HEADERS + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/turns-${PROJECT_VERSION_MAJOR}.0" +) # C++ Wrapper set(CXX_HEADERS - "src/turnsmm/enum_helpers.hpp" - "src/turnsmm/init.hpp" - "src/turnsmm/participant.hpp" - "src/turnsmm/turn-order.hpp" - "src/turnsmm.hpp" + "include/turnsmm/enum_helpers.hpp" + "include/turnsmm/init.hpp" + "include/turnsmm/participant.hpp" + "include/turnsmm/turn-order.hpp" + "include/turnsmm.hpp" - "src/turnsmm/private/participant_p.hpp" - "src/turnsmm/private/turn-order_p.hpp" + "include/turnsmm/private/participant_p.hpp" + "include/turnsmm/private/turn-order_p.hpp" ) set(CXX_SOURCES @@ -146,7 +151,7 @@ add_library("turns::mm" ALIAS "libmm") target_sources("libmm" PUBLIC FILE_SET HEADERS - BASE_DIRS "src" + BASE_DIRS "include" FILES ${CXX_HEADERS} ) @@ -158,8 +163,6 @@ target_compile_options("libmm" PUBLIC "$<$:-pedantic-errors>" ) -target_include_directories("libmm" PUBLIC "src") - target_link_libraries("libmm" PUBLIC "PkgConfig::glibmm" "turns::lib" @@ -170,13 +173,15 @@ set_target_properties("libmm" PROPERTIES SOVERSION "${PROJECT_VERSION_MAJOR}" VERSION "${PROJECT_VERSION}" INTERPROCEDURAL_OPTIMIZATION "${TURNS_CAN_DO_IPO}" - C_EXTENSIONS OFF CXX_EXTENSIONS OFF ) enable_coverage("libmm") -install(TARGETS "libmm" FILE_SET HEADERS DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/turnsmm") +install(TARGETS "libmm" + FILE_SET HEADERS + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/turnsmm-${PROJECT_VERSION_MAJOR}.0" +) # Tests diff --git a/lib/include/turns-init.h b/lib/include/turns-init.h new file mode 100644 index 0000000..dc96fc5 --- /dev/null +++ b/lib/include/turns-init.h @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNS_INIT_H +#define TURNS_INIT_H + +#include + +G_BEGIN_DECLS + +void turns_init(void); + +G_END_DECLS + +#endif diff --git a/lib/include/turns-participant.h b/lib/include/turns-participant.h new file mode 100644 index 0000000..28588a7 --- /dev/null +++ b/lib/include/turns-participant.h @@ -0,0 +1,165 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNS_PARTICIPANT_H +#define TURNS_PARTICIPANT_H + +#include +#include + +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 +{ + TURNS_PARTICIPANT_DISPOSITION_NEUTRAL, + TURNS_PARTICIPANT_DISPOSITION_FRIENDLY, + TURNS_PARTICIPANT_DISPOSITION_HOSTILE, + TURNS_PARTICIPANT_DISPOSITION_SECRET, +} TurnsParticipantDisposition; + +GType turns_participant_disposition_get_type(void) G_GNUC_CONST; +#define TURNS_TYPE_PARTICIPANT_DISPOSITION (turns_participant_disposition_get_type()) + +#define TURNS_TYPE_PARTICIPANT turns_participant_get_type() +G_DECLARE_FINAL_TYPE(TurnsParticipant, turns_participant, TURNS, PARTICIPANT, GObject) + +/** + * TurnsParticipant: + * + * Represents an actor or participant in a turn order. + */ + +/** + * turns_participant_new: + * + * Creates a new participant. + * + * Returns: a new `TurnsParticipant` + */ +G_GNUC_WARN_UNUSED_RESULT +TurnsParticipant * turns_participant_new(void); + +/** + * 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. + * + * Returns: a new `TurnsParticipant` + */ +G_GNUC_WARN_UNUSED_RESULT +TurnsParticipant * turns_participant_new_with(gchar const * name, gfloat priority, TurnsParticipantDisposition disposition); + +/** + * turns_participant_get_active: (get-property active) + * @self: a participant + * + * Gets whether the participant is currently active in a turn order. + */ +G_GNUC_WARN_UNUSED_RESULT +gboolean turns_participant_get_active(TurnsParticipant const * self); + +/** + * turns_participant_get_defeated: (get-property defeated) + * @self: a participant + * + * Gets whether the participant has been defeated. + */ +G_GNUC_WARN_UNUSED_RESULT +gboolean turns_participant_get_defeated(TurnsParticipant const * self); + +/** + * turns_participant_get_disposition: (get-property disposition) + * @self: a participant + * + * Gets the disposition of the participant towards the players. + */ +G_GNUC_WARN_UNUSED_RESULT +TurnsParticipantDisposition turns_participant_get_disposition(TurnsParticipant const * self); + +/** + * turns_participant_get_id: + * @self: a participant + * + * Gets the unique id of the participant. + */ +G_GNUC_WARN_UNUSED_RESULT +gchar const * turns_participant_get_id(TurnsParticipant const * self); + +/** + * turns_participant_get_name: (get-property name) + * @self: a participant + * + * Gets the name of the participant. + */ +G_GNUC_WARN_UNUSED_RESULT +gchar const * turns_participant_get_name(TurnsParticipant const * self); + +/** + * turns_participant_get_priority: (get-property priority) + * @self: a participant + * + * Gets the priority of the participant. + */ +G_GNUC_WARN_UNUSED_RESULT +gfloat turns_participant_get_priority(TurnsParticipant const * self); + +/** + * turns_participant_set_active: (set-property active) + * @self: a participant + * + * Sets whether the participant is currently active in a turn order. + */ +void turns_participant_set_active(TurnsParticipant * self, gboolean value); + +/** + * turns_participant_set_defeated: (set-property defeated) + * @self: a participant + * + * Sets whether the participant has been defeated. + */ +void turns_participant_set_defeated(TurnsParticipant * self, gboolean value); + +/** + * turns_participant_set_disposition: (set-property disposition) + * @self: a participant + * + * Sets the disposition of the participant towards the players. + */ +void turns_participant_set_disposition(TurnsParticipant * self, TurnsParticipantDisposition value); + +/** + * turns_participant_set_name: (set-property name) + * @self: a participant + * + * Sets the name of the participant. + */ +void turns_participant_set_name(TurnsParticipant * self, gchar const * value); + +/** + * turns_participant_set_priority: (set-property priority) + * @self: a participant + * + * Sets the priority of the participant. + */ +void turns_participant_set_priority(TurnsParticipant * self, gfloat value); + +G_END_DECLS + +#endif diff --git a/lib/include/turns-turn-order.h b/lib/include/turns-turn-order.h new file mode 100644 index 0000000..5e34405 --- /dev/null +++ b/lib/include/turns-turn-order.h @@ -0,0 +1,125 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNS_TURN_ORDER_H +#define TURNS_TURN_ORDER_H + +#include "turns-participant.h" + +#include +#include + +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 +{ + TURNS_TURN_ORDER_SORT_MODE_DESCENDING, + TURNS_TURN_ORDER_SORT_MODE_ASCENDING, +} TurnsTurnOrderSortMode; + +GType turns_turn_order_sort_mode_get_type(void) G_GNUC_CONST; +#define TURNS_TYPE_TURN_ORDER_SORT_MODE (turns_turn_order_sort_mode_get_type()) + +#define TURNS_TYPE_TURN_ORDER turns_turn_order_get_type() +G_DECLARE_FINAL_TYPE(TurnsTurnOrder, turns_turn_order, TURNS, TURN_ORDER, GObject) + +/** + * TurnsTurnOrder: + * + * Manages the order of turns for a given set of `TurnsParticipant`s. + */ + +/** + * turns_turn_order_new: + * + * Creates a new turn order. + * + * Returns: (transfer full): a new `TurnsTurnOrder`. + */ +G_GNUC_WARN_UNUSED_RESULT +TurnsTurnOrder * turns_turn_order_new(void); + +/** + * turns_turn_order_add: + * @self: a turn order. + * @participant: (transfer full): A participant to be added. + * + * Adds a participant to a turn-order. + */ +void turns_turn_order_add(TurnsTurnOrder * self, TurnsParticipant * participant); + +/** + * turns_turn_order_clear: + * @self: a turn order + * + * Removes all participants from a turn order. + */ +void turns_turn_order_clear(TurnsTurnOrder * self); + +/** + * turns_turn_order_remove_at: + * @self: a turn order + * + * Removes the participant at the given position. + */ +void turns_turn_order_remove_at(TurnsTurnOrder * self, guint position); + +/** + * turns_turn_order_get_empty: (get-property empty): + * @self: a turn order. + * + * Gets whether the turn order is empty. + */ +G_GNUC_WARN_UNUSED_RESULT +gboolean turns_turn_order_get_empty(TurnsTurnOrder const * self); + +/** + * turns_turn_order_get_participant_count: + * @self: a turn order. + * + * Gets the number of participants in the turn order. + */ +G_GNUC_WARN_UNUSED_RESULT +gsize turns_turn_order_get_participant_count(TurnsTurnOrder const * self); + +/** + * turns_turn_order_get_running: (get-property running): + * @self: a turn order. + * + * Gets whether the turn order is currently running. + */ +G_GNUC_WARN_UNUSED_RESULT +gboolean turns_turn_order_get_running(TurnsTurnOrder const * self); + +/** + * turns_turn_order_get_sort_mode: (get-property sort-mode): + * @self: a turn order. + * + * Gets whether higher priority values are sorted before or after lower ones. + */ +G_GNUC_WARN_UNUSED_RESULT +TurnsTurnOrderSortMode turns_turn_order_get_sort_mode(TurnsTurnOrder const * self); + +/** + * 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. + * + * Sets whether higher priority values are sorted before or after lower ones. + */ +void turns_turn_order_set_sort_mode(TurnsTurnOrder * self, TurnsTurnOrderSortMode sort_mode); + +G_END_DECLS + +#endif diff --git a/lib/include/turns.h b/lib/include/turns.h new file mode 100644 index 0000000..ed6a0bf --- /dev/null +++ b/lib/include/turns.h @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNS_H +#define TURNS_H + +#include "turns-init.h" // IWYU pragma: export +#include "turns-participant.h" // IWYU pragma: export +#include "turns-turn-order.h" // IWYU pragma: export + +#endif diff --git a/lib/include/turnsmm.hpp b/lib/include/turnsmm.hpp new file mode 100644 index 0000000..07c6045 --- /dev/null +++ b/lib/include/turnsmm.hpp @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNSMM_HPP +#define TURNSMM_HPP + +#include "turnsmm/init.hpp" // IWYU pragma: export +#include "turnsmm/participant.hpp" // IWYU pragma: export +#include "turnsmm/turn-order.hpp" // IWYU pragma: export + +#endif \ No newline at end of file diff --git a/lib/include/turnsmm/enum_helpers.hpp b/lib/include/turnsmm/enum_helpers.hpp new file mode 100644 index 0000000..60b8cd7 --- /dev/null +++ b/lib/include/turnsmm/enum_helpers.hpp @@ -0,0 +1,39 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNSMM_ENUM_HELPERS_HPP +#define TURNSMM_ENUM_HELPERS_HPP + +#include + +#include +#include + +#include + +#define TURNS_DECLARE_ENUM_VALUE_SPECIALIZATION(Enum) \ + template<> \ + class Value<::Turns::Enum> : public Glib::Value_Enum<::Turns::Enum> \ + { \ + public: \ + auto static value_type() -> GType; \ + } + +#define TURNS_DEFINE_VALUE_SPECIALIZATION(Enum, TurnsEnumName) \ + auto Value<::Turns::Enum>::value_type() -> GType \ + { \ + return ::turns_##TurnsEnumName##_get_type(); \ + } + +namespace Turns +{ + + template + auto constexpr enum_matches = + static_cast>(Wrapped) == static_cast>(Unwrapped); + +} // namespace Turns + +#endif \ No newline at end of file diff --git a/lib/include/turnsmm/init.hpp b/lib/include/turnsmm/init.hpp new file mode 100644 index 0000000..c22b4c9 --- /dev/null +++ b/lib/include/turnsmm/init.hpp @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNSMM_INIT_HPP +#define TURNSMM_INIT_HPP + +namespace Turns +{ + void init(void); +} + +#endif diff --git a/lib/include/turnsmm/participant.hpp b/lib/include/turnsmm/participant.hpp new file mode 100644 index 0000000..6dece0e --- /dev/null +++ b/lib/include/turnsmm/participant.hpp @@ -0,0 +1,91 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNSMM_PARTICIPANT_HPP +#define TURNSMM_PARTICIPANT_HPP + +#include "turns-participant.h" +#include "turnsmm/enum_helpers.hpp" + +#include +#include +#include +#include + +#include +#include + +namespace Turns +{ + + class Participant final : public Glib::Object + { + public: + using BaseClassType = TurnsParticipantClass; + using BaseObjectType = TurnsParticipant; + using CppClassType = class Participant_Class; + using CppObjectType = Participant; + + enum struct Disposition : guint + { + Neutral, + Friendly, + Hostile, + Secret, + }; + + auto static get_base_type() -> GType; + auto static get_type() -> GType; + + auto static create() -> Glib::RefPtr; + auto static create(Glib::ustring const & name, float priority, Disposition disposition) -> Glib::RefPtr; + + Participant(); + Participant(Glib::ustring const & name, float priority, Disposition disposition); + + [[nodiscard]] auto gobj() noexcept -> BaseObjectType *; + [[nodiscard]] auto gobj() const -> BaseObjectType const *; + [[nodiscard]] auto gobj_copy() noexcept -> BaseObjectType *; + + [[nodiscard]] auto get_active() const noexcept -> bool; + [[nodiscard]] auto get_defeated() const noexcept -> bool; + [[nodiscard]] auto get_disposition() const noexcept -> Disposition; + [[nodiscard]] auto get_id() const noexcept -> Glib::ustring; + [[nodiscard]] auto get_name() const -> Glib::ustring; + [[nodiscard]] auto get_priority() const noexcept -> float; + + auto set_active(bool value) noexcept -> void; + auto set_defeated(bool value) noexcept -> void; + auto set_disposition(Disposition value) noexcept -> void; + auto set_name(Glib::ustring const & value) noexcept -> void; + auto set_priority(float value) noexcept -> void; + + [[nodiscard]] auto property_active() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_active() noexcept -> Glib::PropertyProxy; + [[nodiscard]] auto property_defeated() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_defeated() noexcept -> Glib::PropertyProxy; + [[nodiscard]] auto property_disposition() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_disposition() noexcept -> Glib::PropertyProxy; + [[nodiscard]] auto property_name() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_name() noexcept -> Glib::PropertyProxy; + [[nodiscard]] auto property_priority() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_priority() noexcept -> Glib::PropertyProxy; + + protected: + friend Participant_Class; + + explicit Participant(BaseObjectType * gobj); + }; + +} // namespace Turns + +namespace Glib +{ + TURNS_DECLARE_ENUM_VALUE_SPECIALIZATION(Participant::Disposition); + + auto wrap(TurnsParticipant * object, bool copy = false) -> Glib::RefPtr; +} // namespace Glib + +#endif \ No newline at end of file diff --git a/lib/include/turnsmm/private/participant_p.hpp b/lib/include/turnsmm/private/participant_p.hpp new file mode 100644 index 0000000..d0f4f0d --- /dev/null +++ b/lib/include/turnsmm/private/participant_p.hpp @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNSMM_PARTICIPANT_P_HPP +#define TURNSMM_PARTICIPANT_P_HPP + +#include "turns-participant.h" + +#include +#include +#include + +#include + +namespace Turns +{ + + class Participant_Class : Glib::Class + { + public: + using BaseClassParent = GObjectClass; + using BaseClassType = TurnsParticipantClass; + using BaseObjectType = TurnsParticipant; + using CppClassParent = Glib::Object_Class; + using CppObjectType = class Participant; + + auto init() -> Glib::Class const &; + auto static class_init_function(void * gclass, void * data) -> void; + auto static wrap_new(GObject * object) -> Glib::ObjectBase *; + }; + +} // namespace Turns + +#endif \ No newline at end of file diff --git a/lib/include/turnsmm/private/turn-order_p.hpp b/lib/include/turnsmm/private/turn-order_p.hpp new file mode 100644 index 0000000..d694b3e --- /dev/null +++ b/lib/include/turnsmm/private/turn-order_p.hpp @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2025 Felix Morgner + * SPDX-License-Identifier: LGPL-2.1-only + */ + +#ifndef TURNSMM_TURN_ORDER_P_HPP +#define TURNSMM_TURN_ORDER_P_HPP + +#include "turns-turn-order.h" + +#include +#include +#include + +#include + +namespace Turns +{ + + class TurnOrder_Class : Glib::Class + { + public: + using BaseClassParent = GObjectClass; + using BaseClassType = TurnsTurnOrderClass; + using BaseObjectType = TurnsTurnOrder; + using CppClassParent = Glib::Object_Class; + using CppObjectType = class TURN_ORDER; + + auto init() -> Glib::Class const &; + auto static class_init_function(void * gclass, void * data) -> void; + auto static wrap_new(GObject * object) -> Glib::ObjectBase *; + }; + +} // namespace Turns + +#endif \ No newline at end of file diff --git a/lib/include/turnsmm/turn-order.hpp b/lib/include/turnsmm/turn-order.hpp new file mode 100644 index 0000000..5b8deb9 --- /dev/null +++ b/lib/include/turnsmm/turn-order.hpp @@ -0,0 +1,89 @@ +/* + * 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; + auto clear() noexcept -> void; + auto remove_at(guint position) noexcept -> void; + + [[nodiscard]] auto get_empty() const noexcept -> bool; + [[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_empty() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[nodiscard]] auto property_participant_count() const noexcept -> Glib::PropertyProxy_ReadOnly; + [[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 \ No newline at end of file diff --git a/lib/src/turns-init.h b/lib/src/turns-init.h deleted file mode 100644 index dc96fc5..0000000 --- a/lib/src/turns-init.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNS_INIT_H -#define TURNS_INIT_H - -#include - -G_BEGIN_DECLS - -void turns_init(void); - -G_END_DECLS - -#endif diff --git a/lib/src/turns-participant.h b/lib/src/turns-participant.h deleted file mode 100644 index 28588a7..0000000 --- a/lib/src/turns-participant.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNS_PARTICIPANT_H -#define TURNS_PARTICIPANT_H - -#include -#include - -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 -{ - TURNS_PARTICIPANT_DISPOSITION_NEUTRAL, - TURNS_PARTICIPANT_DISPOSITION_FRIENDLY, - TURNS_PARTICIPANT_DISPOSITION_HOSTILE, - TURNS_PARTICIPANT_DISPOSITION_SECRET, -} TurnsParticipantDisposition; - -GType turns_participant_disposition_get_type(void) G_GNUC_CONST; -#define TURNS_TYPE_PARTICIPANT_DISPOSITION (turns_participant_disposition_get_type()) - -#define TURNS_TYPE_PARTICIPANT turns_participant_get_type() -G_DECLARE_FINAL_TYPE(TurnsParticipant, turns_participant, TURNS, PARTICIPANT, GObject) - -/** - * TurnsParticipant: - * - * Represents an actor or participant in a turn order. - */ - -/** - * turns_participant_new: - * - * Creates a new participant. - * - * Returns: a new `TurnsParticipant` - */ -G_GNUC_WARN_UNUSED_RESULT -TurnsParticipant * turns_participant_new(void); - -/** - * 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. - * - * Returns: a new `TurnsParticipant` - */ -G_GNUC_WARN_UNUSED_RESULT -TurnsParticipant * turns_participant_new_with(gchar const * name, gfloat priority, TurnsParticipantDisposition disposition); - -/** - * turns_participant_get_active: (get-property active) - * @self: a participant - * - * Gets whether the participant is currently active in a turn order. - */ -G_GNUC_WARN_UNUSED_RESULT -gboolean turns_participant_get_active(TurnsParticipant const * self); - -/** - * turns_participant_get_defeated: (get-property defeated) - * @self: a participant - * - * Gets whether the participant has been defeated. - */ -G_GNUC_WARN_UNUSED_RESULT -gboolean turns_participant_get_defeated(TurnsParticipant const * self); - -/** - * turns_participant_get_disposition: (get-property disposition) - * @self: a participant - * - * Gets the disposition of the participant towards the players. - */ -G_GNUC_WARN_UNUSED_RESULT -TurnsParticipantDisposition turns_participant_get_disposition(TurnsParticipant const * self); - -/** - * turns_participant_get_id: - * @self: a participant - * - * Gets the unique id of the participant. - */ -G_GNUC_WARN_UNUSED_RESULT -gchar const * turns_participant_get_id(TurnsParticipant const * self); - -/** - * turns_participant_get_name: (get-property name) - * @self: a participant - * - * Gets the name of the participant. - */ -G_GNUC_WARN_UNUSED_RESULT -gchar const * turns_participant_get_name(TurnsParticipant const * self); - -/** - * turns_participant_get_priority: (get-property priority) - * @self: a participant - * - * Gets the priority of the participant. - */ -G_GNUC_WARN_UNUSED_RESULT -gfloat turns_participant_get_priority(TurnsParticipant const * self); - -/** - * turns_participant_set_active: (set-property active) - * @self: a participant - * - * Sets whether the participant is currently active in a turn order. - */ -void turns_participant_set_active(TurnsParticipant * self, gboolean value); - -/** - * turns_participant_set_defeated: (set-property defeated) - * @self: a participant - * - * Sets whether the participant has been defeated. - */ -void turns_participant_set_defeated(TurnsParticipant * self, gboolean value); - -/** - * turns_participant_set_disposition: (set-property disposition) - * @self: a participant - * - * Sets the disposition of the participant towards the players. - */ -void turns_participant_set_disposition(TurnsParticipant * self, TurnsParticipantDisposition value); - -/** - * turns_participant_set_name: (set-property name) - * @self: a participant - * - * Sets the name of the participant. - */ -void turns_participant_set_name(TurnsParticipant * self, gchar const * value); - -/** - * turns_participant_set_priority: (set-property priority) - * @self: a participant - * - * Sets the priority of the participant. - */ -void turns_participant_set_priority(TurnsParticipant * self, gfloat value); - -G_END_DECLS - -#endif diff --git a/lib/src/turns-turn-order.h b/lib/src/turns-turn-order.h deleted file mode 100644 index 5e34405..0000000 --- a/lib/src/turns-turn-order.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNS_TURN_ORDER_H -#define TURNS_TURN_ORDER_H - -#include "turns-participant.h" - -#include -#include - -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 -{ - TURNS_TURN_ORDER_SORT_MODE_DESCENDING, - TURNS_TURN_ORDER_SORT_MODE_ASCENDING, -} TurnsTurnOrderSortMode; - -GType turns_turn_order_sort_mode_get_type(void) G_GNUC_CONST; -#define TURNS_TYPE_TURN_ORDER_SORT_MODE (turns_turn_order_sort_mode_get_type()) - -#define TURNS_TYPE_TURN_ORDER turns_turn_order_get_type() -G_DECLARE_FINAL_TYPE(TurnsTurnOrder, turns_turn_order, TURNS, TURN_ORDER, GObject) - -/** - * TurnsTurnOrder: - * - * Manages the order of turns for a given set of `TurnsParticipant`s. - */ - -/** - * turns_turn_order_new: - * - * Creates a new turn order. - * - * Returns: (transfer full): a new `TurnsTurnOrder`. - */ -G_GNUC_WARN_UNUSED_RESULT -TurnsTurnOrder * turns_turn_order_new(void); - -/** - * turns_turn_order_add: - * @self: a turn order. - * @participant: (transfer full): A participant to be added. - * - * Adds a participant to a turn-order. - */ -void turns_turn_order_add(TurnsTurnOrder * self, TurnsParticipant * participant); - -/** - * turns_turn_order_clear: - * @self: a turn order - * - * Removes all participants from a turn order. - */ -void turns_turn_order_clear(TurnsTurnOrder * self); - -/** - * turns_turn_order_remove_at: - * @self: a turn order - * - * Removes the participant at the given position. - */ -void turns_turn_order_remove_at(TurnsTurnOrder * self, guint position); - -/** - * turns_turn_order_get_empty: (get-property empty): - * @self: a turn order. - * - * Gets whether the turn order is empty. - */ -G_GNUC_WARN_UNUSED_RESULT -gboolean turns_turn_order_get_empty(TurnsTurnOrder const * self); - -/** - * turns_turn_order_get_participant_count: - * @self: a turn order. - * - * Gets the number of participants in the turn order. - */ -G_GNUC_WARN_UNUSED_RESULT -gsize turns_turn_order_get_participant_count(TurnsTurnOrder const * self); - -/** - * turns_turn_order_get_running: (get-property running): - * @self: a turn order. - * - * Gets whether the turn order is currently running. - */ -G_GNUC_WARN_UNUSED_RESULT -gboolean turns_turn_order_get_running(TurnsTurnOrder const * self); - -/** - * turns_turn_order_get_sort_mode: (get-property sort-mode): - * @self: a turn order. - * - * Gets whether higher priority values are sorted before or after lower ones. - */ -G_GNUC_WARN_UNUSED_RESULT -TurnsTurnOrderSortMode turns_turn_order_get_sort_mode(TurnsTurnOrder const * self); - -/** - * 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. - * - * Sets whether higher priority values are sorted before or after lower ones. - */ -void turns_turn_order_set_sort_mode(TurnsTurnOrder * self, TurnsTurnOrderSortMode sort_mode); - -G_END_DECLS - -#endif diff --git a/lib/src/turns.h b/lib/src/turns.h deleted file mode 100644 index ed6a0bf..0000000 --- a/lib/src/turns.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNS_H -#define TURNS_H - -#include "turns-init.h" // IWYU pragma: export -#include "turns-participant.h" // IWYU pragma: export -#include "turns-turn-order.h" // IWYU pragma: export - -#endif diff --git a/lib/src/turnsmm.hpp b/lib/src/turnsmm.hpp deleted file mode 100644 index e0b6d3a..0000000 --- a/lib/src/turnsmm.hpp +++ /dev/null @@ -1,11 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - - #ifndef TURNSMM_HPP -#define TURNSMM_HPP - -#include "turnsmm/participant.hpp" // IWYU pragma: export - -#endif \ No newline at end of file diff --git a/lib/src/turnsmm/enum_helpers.hpp b/lib/src/turnsmm/enum_helpers.hpp deleted file mode 100644 index 60b8cd7..0000000 --- a/lib/src/turnsmm/enum_helpers.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNSMM_ENUM_HELPERS_HPP -#define TURNSMM_ENUM_HELPERS_HPP - -#include - -#include -#include - -#include - -#define TURNS_DECLARE_ENUM_VALUE_SPECIALIZATION(Enum) \ - template<> \ - class Value<::Turns::Enum> : public Glib::Value_Enum<::Turns::Enum> \ - { \ - public: \ - auto static value_type() -> GType; \ - } - -#define TURNS_DEFINE_VALUE_SPECIALIZATION(Enum, TurnsEnumName) \ - auto Value<::Turns::Enum>::value_type() -> GType \ - { \ - return ::turns_##TurnsEnumName##_get_type(); \ - } - -namespace Turns -{ - - template - auto constexpr enum_matches = - static_cast>(Wrapped) == static_cast>(Unwrapped); - -} // namespace Turns - -#endif \ No newline at end of file diff --git a/lib/src/turnsmm/init.hpp b/lib/src/turnsmm/init.hpp deleted file mode 100644 index c22b4c9..0000000 --- a/lib/src/turnsmm/init.hpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNSMM_INIT_HPP -#define TURNSMM_INIT_HPP - -namespace Turns -{ - void init(void); -} - -#endif diff --git a/lib/src/turnsmm/participant.hpp b/lib/src/turnsmm/participant.hpp deleted file mode 100644 index 6dece0e..0000000 --- a/lib/src/turnsmm/participant.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNSMM_PARTICIPANT_HPP -#define TURNSMM_PARTICIPANT_HPP - -#include "turns-participant.h" -#include "turnsmm/enum_helpers.hpp" - -#include -#include -#include -#include - -#include -#include - -namespace Turns -{ - - class Participant final : public Glib::Object - { - public: - using BaseClassType = TurnsParticipantClass; - using BaseObjectType = TurnsParticipant; - using CppClassType = class Participant_Class; - using CppObjectType = Participant; - - enum struct Disposition : guint - { - Neutral, - Friendly, - Hostile, - Secret, - }; - - auto static get_base_type() -> GType; - auto static get_type() -> GType; - - auto static create() -> Glib::RefPtr; - auto static create(Glib::ustring const & name, float priority, Disposition disposition) -> Glib::RefPtr; - - Participant(); - Participant(Glib::ustring const & name, float priority, Disposition disposition); - - [[nodiscard]] auto gobj() noexcept -> BaseObjectType *; - [[nodiscard]] auto gobj() const -> BaseObjectType const *; - [[nodiscard]] auto gobj_copy() noexcept -> BaseObjectType *; - - [[nodiscard]] auto get_active() const noexcept -> bool; - [[nodiscard]] auto get_defeated() const noexcept -> bool; - [[nodiscard]] auto get_disposition() const noexcept -> Disposition; - [[nodiscard]] auto get_id() const noexcept -> Glib::ustring; - [[nodiscard]] auto get_name() const -> Glib::ustring; - [[nodiscard]] auto get_priority() const noexcept -> float; - - auto set_active(bool value) noexcept -> void; - auto set_defeated(bool value) noexcept -> void; - auto set_disposition(Disposition value) noexcept -> void; - auto set_name(Glib::ustring const & value) noexcept -> void; - auto set_priority(float value) noexcept -> void; - - [[nodiscard]] auto property_active() const noexcept -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_active() noexcept -> Glib::PropertyProxy; - [[nodiscard]] auto property_defeated() const noexcept -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_defeated() noexcept -> Glib::PropertyProxy; - [[nodiscard]] auto property_disposition() const noexcept -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_disposition() noexcept -> Glib::PropertyProxy; - [[nodiscard]] auto property_name() const noexcept -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_name() noexcept -> Glib::PropertyProxy; - [[nodiscard]] auto property_priority() const noexcept -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_priority() noexcept -> Glib::PropertyProxy; - - protected: - friend Participant_Class; - - explicit Participant(BaseObjectType * gobj); - }; - -} // namespace Turns - -namespace Glib -{ - TURNS_DECLARE_ENUM_VALUE_SPECIALIZATION(Participant::Disposition); - - auto wrap(TurnsParticipant * object, bool copy = false) -> Glib::RefPtr; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/lib/src/turnsmm/private/participant_p.hpp b/lib/src/turnsmm/private/participant_p.hpp deleted file mode 100644 index d0f4f0d..0000000 --- a/lib/src/turnsmm/private/participant_p.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNSMM_PARTICIPANT_P_HPP -#define TURNSMM_PARTICIPANT_P_HPP - -#include "turns-participant.h" - -#include -#include -#include - -#include - -namespace Turns -{ - - class Participant_Class : Glib::Class - { - public: - using BaseClassParent = GObjectClass; - using BaseClassType = TurnsParticipantClass; - using BaseObjectType = TurnsParticipant; - using CppClassParent = Glib::Object_Class; - using CppObjectType = class Participant; - - auto init() -> Glib::Class const &; - auto static class_init_function(void * gclass, void * data) -> void; - auto static wrap_new(GObject * object) -> Glib::ObjectBase *; - }; - -} // namespace Turns - -#endif \ No newline at end of file diff --git a/lib/src/turnsmm/private/turn-order_p.hpp b/lib/src/turnsmm/private/turn-order_p.hpp deleted file mode 100644 index d694b3e..0000000 --- a/lib/src/turnsmm/private/turn-order_p.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2025 Felix Morgner - * SPDX-License-Identifier: LGPL-2.1-only - */ - -#ifndef TURNSMM_TURN_ORDER_P_HPP -#define TURNSMM_TURN_ORDER_P_HPP - -#include "turns-turn-order.h" - -#include -#include -#include - -#include - -namespace Turns -{ - - class TurnOrder_Class : Glib::Class - { - public: - using BaseClassParent = GObjectClass; - using BaseClassType = TurnsTurnOrderClass; - using BaseObjectType = TurnsTurnOrder; - using CppClassParent = Glib::Object_Class; - using CppObjectType = class TURN_ORDER; - - auto init() -> Glib::Class const &; - auto static class_init_function(void * gclass, void * data) -> void; - auto static wrap_new(GObject * object) -> Glib::ObjectBase *; - }; - -} // namespace Turns - -#endif \ No newline at end of file diff --git a/lib/src/turnsmm/turn-order.hpp b/lib/src/turnsmm/turn-order.hpp deleted file mode 100644 index 5b8deb9..0000000 --- a/lib/src/turnsmm/turn-order.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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; - auto clear() noexcept -> void; - auto remove_at(guint position) noexcept -> void; - - [[nodiscard]] auto get_empty() const noexcept -> bool; - [[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_empty() const noexcept -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_participant_count() const noexcept -> Glib::PropertyProxy_ReadOnly; - [[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 \ No newline at end of file -- cgit v1.2.3