/* annotations_description.c generated by valac, the Vala compiler
 * generated from annotations_description.vala, do not modify */

#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_FOO (foo_get_type ())
#define FOO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FOO, Foo))
#define FOO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FOO, FooClass))
#define IS_FOO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FOO))
#define IS_FOO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FOO))
#define FOO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FOO, FooClass))

typedef struct _Foo Foo;
typedef struct _FooClass FooClass;
typedef struct _FooPrivate FooPrivate;
enum  {
	FOO_0_PROPERTY,
	FOO_FOO_PROPERTY,
	FOO_NUM_PROPERTIES
};
static GParamSpec* foo_properties[FOO_NUM_PROPERTIES];
typedef enum  {
	BAR_FOO
} Bar;

#define TYPE_BAR (bar_get_type ())
#define _g_type_class_unref0(var) ((var == NULL) ? NULL : (var = (g_type_class_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _Foo {
	GObject parent_instance;
	FooPrivate * priv;
};

struct _FooClass {
	GObjectClass parent_class;
};

struct _FooPrivate {
	gint _foo;
};

static gint Foo_private_offset;
static gpointer foo_parent_class = NULL;

VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Foo, g_object_unref)
VALA_EXTERN Foo* foo_new (void);
VALA_EXTERN Foo* foo_construct (GType object_type);
VALA_EXTERN gint foo_get_foo (Foo* self);
VALA_EXTERN void foo_set_foo (Foo* self,
                  gint value);
static void foo_finalize (GObject * obj);
static GType foo_get_type_once (void);
static void _vala_foo_get_property (GObject * object,
                             guint property_id,
                             GValue * value,
                             GParamSpec * pspec);
static void _vala_foo_set_property (GObject * object,
                             guint property_id,
                             const GValue * value,
                             GParamSpec * pspec);
VALA_EXTERN GType bar_get_type (void) G_GNUC_CONST ;
static void _vala_main (void);

static inline gpointer
foo_get_instance_private (Foo* self)
{
	return G_STRUCT_MEMBER_P (self, Foo_private_offset);
}

Foo*
foo_construct (GType object_type)
{
	Foo * self = NULL;
	self = (Foo*) g_object_new (object_type, NULL);
	return self;
}

Foo*
foo_new (void)
{
	return foo_construct (TYPE_FOO);
}

gint
foo_get_foo (Foo* self)
{
	gint result;
	g_return_val_if_fail (IS_FOO (self), -1);
	result = self->priv->_foo;
	return result;
}

void
foo_set_foo (Foo* self,
             gint value)
{
	gint old_value;
	g_return_if_fail (IS_FOO (self));
	old_value = foo_get_foo (self);
	if (old_value != value) {
		self->priv->_foo = value;
		g_object_notify_by_pspec ((GObject *) self, foo_properties[FOO_FOO_PROPERTY]);
	}
}

static void
foo_class_init (FooClass * klass,
                gpointer klass_data)
{
	foo_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &Foo_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_foo_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_foo_set_property;
	G_OBJECT_CLASS (klass)->finalize = foo_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOO_FOO_PROPERTY, foo_properties[FOO_FOO_PROPERTY] = g_param_spec_int ("foo", "foo's nick", "foo's blurb", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
foo_instance_init (Foo * self,
                   gpointer klass)
{
	self->priv = foo_get_instance_private (self);
}

static void
foo_finalize (GObject * obj)
{
	Foo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FOO, Foo);
	G_OBJECT_CLASS (foo_parent_class)->finalize (obj);
}

static GType
foo_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FooClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) foo_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Foo), 0, (GInstanceInitFunc) foo_instance_init, NULL };
	GType foo_type_id;
	foo_type_id = g_type_register_static (G_TYPE_OBJECT, "Foo", &g_define_type_info, 0);
	Foo_private_offset = g_type_add_instance_private (foo_type_id, sizeof (FooPrivate));
	return foo_type_id;
}

GType
foo_get_type (void)
{
	static volatile gsize foo_type_id__once = 0;
	if (g_once_init_enter (&foo_type_id__once)) {
		GType foo_type_id;
		foo_type_id = foo_get_type_once ();
		g_once_init_leave (&foo_type_id__once, foo_type_id);
	}
	return foo_type_id__once;
}

static void
_vala_foo_get_property (GObject * object,
                        guint property_id,
                        GValue * value,
                        GParamSpec * pspec)
{
	Foo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_FOO, Foo);
	switch (property_id) {
		case FOO_FOO_PROPERTY:
		g_value_set_int (value, foo_get_foo (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_foo_set_property (GObject * object,
                        guint property_id,
                        const GValue * value,
                        GParamSpec * pspec)
{
	Foo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_FOO, Foo);
	switch (property_id) {
		case FOO_FOO_PROPERTY:
		foo_set_foo (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static GType
bar_get_type_once (void)
{
	static const GEnumValue values[] = {{BAR_FOO, "BAR_FOO", "foo's nick"}, {0, NULL, NULL}};
	GType bar_type_id;
	bar_type_id = g_enum_register_static ("Bar", values);
	return bar_type_id;
}

GType
bar_get_type (void)
{
	static volatile gsize bar_type_id__once = 0;
	if (g_once_init_enter (&bar_type_id__once)) {
		GType bar_type_id;
		bar_type_id = bar_get_type_once ();
		g_once_init_leave (&bar_type_id__once, bar_type_id);
	}
	return bar_type_id__once;
}

static void
_vala_main (void)
{
	Foo* foo = NULL;
	Foo* _tmp0_;
	GParamSpec** properties = NULL;
	Foo* _tmp1_;
	GObjectClass* _tmp2_;
	guint _tmp3_ = 0;
	GParamSpec** _tmp4_;
	gint properties_length1;
	gint _properties_size_;
	GParamSpec** _tmp5_;
	gint _tmp5__length1;
	GTypeClass* _tmp12_;
	GEnumClass* _tmp13_;
	GEnumValue* _tmp14_;
	const gchar* _tmp15_;
	_tmp0_ = foo_new ();
	foo = _tmp0_;
	_tmp1_ = foo;
	_tmp2_ = G_OBJECT_GET_CLASS (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G_TYPE_OBJECT, GObject));
	_tmp4_ = g_object_class_list_properties (_tmp2_, &_tmp3_);
	properties = _tmp4_;
	properties_length1 = _tmp3_;
	_properties_size_ = properties_length1;
	_tmp5_ = properties;
	_tmp5__length1 = properties_length1;
	{
		GParamSpec** p_collection = NULL;
		gint p_collection_length1 = 0;
		gint _p_collection_size_ = 0;
		gint p_it = 0;
		p_collection = _tmp5_;
		p_collection_length1 = _tmp5__length1;
		for (p_it = 0; p_it < p_collection_length1; p_it = p_it + 1) {
			GParamSpec* p = NULL;
			p = p_collection[p_it];
			{
				GParamSpec* _tmp6_;
				const gchar* _tmp7_;
				GParamSpec* _tmp8_;
				const gchar* _tmp9_;
				GParamSpec* _tmp10_;
				const gchar* _tmp11_;
				_tmp6_ = p;
				_tmp7_ = g_param_spec_get_name (_tmp6_);
				_vala_assert (g_strcmp0 (_tmp7_, "foo") == 0, "p.get_name () == \"foo\"");
				_tmp8_ = p;
				_tmp9_ = g_param_spec_get_nick (_tmp8_);
				_vala_assert (g_strcmp0 (_tmp9_, "foo's nick") == 0, "p.get_nick () == \"foo's nick\"");
				_tmp10_ = p;
				_tmp11_ = g_param_spec_get_blurb (_tmp10_);
				_vala_assert (g_strcmp0 (_tmp11_, "foo's blurb") == 0, "p.get_blurb () == \"foo's blurb\"");
			}
		}
	}
	_tmp12_ = g_type_class_ref (TYPE_BAR);
	_tmp13_ = (GEnumClass*) _tmp12_;
	_tmp14_ = g_enum_get_value (g_type_class_ref (TYPE_BAR), BAR_FOO);
	_tmp15_ = (*g_enum_get_value_by_name (_tmp13_, (_tmp14_ != NULL) ? _tmp14_->value_name : NULL)).value_nick;
	_vala_assert (g_strcmp0 (_tmp15_, "foo's nick") == 0, "((EnumClass) typeof (Bar).class_ref ()).get_value_by_name (Bar.FOO.to_string ()).value_nick == \"foo's nick\"");
	_g_type_class_unref0 (_tmp13_);
	properties = (g_free (properties), NULL);
	_g_object_unref0 (foo);
}

int
main (int argc,
      char ** argv)
{
	_vala_main ();
	return 0;
}

