diff options
Diffstat (limited to 'lib/src/turnsmm')
| -rw-r--r-- | lib/src/turnsmm/participant.cpp | 10 | ||||
| -rw-r--r-- | lib/src/turnsmm/participant.hpp | 4 | ||||
| -rw-r--r-- | lib/src/turnsmm/turn-order.cpp | 12 | ||||
| -rw-r--r-- | lib/src/turnsmm/turn-order.hpp | 9 |
4 files changed, 34 insertions, 1 deletions
diff --git a/lib/src/turnsmm/participant.cpp b/lib/src/turnsmm/participant.cpp index 5cc3db6..2c7ca08 100644 --- a/lib/src/turnsmm/participant.cpp +++ b/lib/src/turnsmm/participant.cpp @@ -48,6 +48,16 @@ namespace Turns return new Participant(TURNS_PARTICIPANT(object)); } + auto Participant::get_base_type() -> GType + { + return turns_participant_get_type(); + } + + auto Participant::get_type() -> GType + { + return _class.init().get_type(); + } + Participant::Participant() : Glib::ObjectBase{nullptr} , Glib::Object{Glib::ConstructParams{_class.init()}} diff --git a/lib/src/turnsmm/participant.hpp b/lib/src/turnsmm/participant.hpp index b41c64b..04c4fe8 100644 --- a/lib/src/turnsmm/participant.hpp +++ b/lib/src/turnsmm/participant.hpp @@ -8,6 +8,7 @@ #include <glibmm/propertyproxy.h> #include <glibmm/refptr.h> #include <glibmm/ustring.h> +#include <glib-object.h> namespace Turns { @@ -20,6 +21,9 @@ namespace Turns using CppClassType = class Participant_Class; using CppObjectType = Participant; + auto static get_base_type() -> GType; + auto static get_type() -> GType; + Participant(); Participant(Glib::ustring const & name, float priority, Disposition disposition); diff --git a/lib/src/turnsmm/turn-order.cpp b/lib/src/turnsmm/turn-order.cpp index 8e1914d..8ff7210 100644 --- a/lib/src/turnsmm/turn-order.cpp +++ b/lib/src/turnsmm/turn-order.cpp @@ -11,6 +11,8 @@ #include <glibmm/refptr.h> #include <glibmm/wrap.h> +#include <giomm/listmodel.h> + #include <glib-object.h> #include <bit> @@ -45,6 +47,16 @@ namespace Turns return new TurnOrder(TURNS_TURN_ORDER(object)); } + auto TurnOrder::get_base_type() -> GType + { + return turns_turn_order_get_type(); + } + + auto TurnOrder::get_type() -> GType + { + return _class.init().get_type(); + } + TurnOrder::TurnOrder() : Glib::ObjectBase{nullptr} , Glib::Object{Glib::ConstructParams{_class.init()}} diff --git a/lib/src/turnsmm/turn-order.hpp b/lib/src/turnsmm/turn-order.hpp index 25fc0b5..2dfa2ca 100644 --- a/lib/src/turnsmm/turn-order.hpp +++ b/lib/src/turnsmm/turn-order.hpp @@ -8,12 +8,16 @@ #include <glibmm/refptr.h> #include <glibmm/ustring.h> +#include <giomm/listmodel.h> +#include <glib-object.h> + #include <cstddef> namespace Turns { - class TurnOrder final : public Glib::Object + class TurnOrder final : public Glib::Object, + public Gio::ListModel { public: using BaseClassType = TurnsTurnOrderClass; @@ -21,6 +25,9 @@ namespace Turns using CppClassType = class TurnOrder_Class; using CppObjectType = TurnOrder; + auto static get_base_type() -> GType; + auto static get_type() -> GType; + TurnOrder(); [[nodiscard]] auto gobj() noexcept -> BaseObjectType *; |
