summaryrefslogtreecommitdiff
path: root/lib/src/turnsmm/init.cpp
blob: 3104b1dd66abd51c145cf4b00be40a4d8a247850 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "turnsmm/init.hpp"

#include "turns-init.h"
#include "turnsmm/participant.hpp"
#include "turnsmm/private/participant_p.hpp"  // IWYU pragma: keep
#include "turnsmm/private/turn-order_p.hpp"   // IWYU pragma: keep
#include "turnsmm/turn-order.hpp"

#include <glibmm/value.h>
#include <glibmm/wrap.h>

#include <glib-object.h>

#define WRAP_CLASS(Name, name) Glib::wrap_register(turns_##name##_get_type(), &Name##_Class::wrap_new)
#define ENSURE_TYPE(Name) g_type_ensure(Name::get_type())

namespace Turns
{

  auto init() -> void
  {
    turns_init();

    WRAP_CLASS(Participant, participant);
    WRAP_CLASS(TurnOrder, turn_order);

    ENSURE_TYPE(Participant);
    ENSURE_TYPE(TurnOrder);
  }

}  // namespace Turns