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

/*
Copyright (C) 2012 Johan Mattsson

This library is free software; you can redistribute it and/or modify 
it under the terms of the GNU Lesser General Public License as 
published by the Free Software Foundation; either version 3 of the 
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but 
WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
Lesser General Public License for more details.
*/

#include "birdfont.h"
#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

enum  {
	BIRD_FONT_WIDGET_ALLOCATION_0_PROPERTY,
	BIRD_FONT_WIDGET_ALLOCATION_NUM_PROPERTIES
};
static GParamSpec* bird_font_widget_allocation_properties[BIRD_FONT_WIDGET_ALLOCATION_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

static gpointer bird_font_widget_allocation_parent_class = NULL;

static void bird_font_widget_allocation_finalize (GObject * obj);
static GType bird_font_widget_allocation_get_type_once (void);

BirdFontWidgetAllocation*
bird_font_widget_allocation_construct (GType object_type)
{
	BirdFontWidgetAllocation * self = NULL;
	self = (BirdFontWidgetAllocation*) g_object_new (object_type, NULL);
	return self;
}

BirdFontWidgetAllocation*
bird_font_widget_allocation_new (void)
{
	return bird_font_widget_allocation_construct (BIRD_FONT_TYPE_WIDGET_ALLOCATION);
}

BirdFontWidgetAllocation*
bird_font_widget_allocation_construct_for_area (GType object_type,
                                                gint x,
                                                gint y,
                                                gint width,
                                                gint height)
{
	BirdFontWidgetAllocation * self = NULL;
	self = (BirdFontWidgetAllocation*) g_object_new (object_type, NULL);
	self->x = x;
	self->y = y;
	self->width = width;
	self->height = height;
	return self;
}

BirdFontWidgetAllocation*
bird_font_widget_allocation_new_for_area (gint x,
                                          gint y,
                                          gint width,
                                          gint height)
{
	return bird_font_widget_allocation_construct_for_area (BIRD_FONT_TYPE_WIDGET_ALLOCATION, x, y, width, height);
}

BirdFontWidgetAllocation*
bird_font_widget_allocation_copy (BirdFontWidgetAllocation* self)
{
	BirdFontWidgetAllocation* w = NULL;
	BirdFontWidgetAllocation* _tmp0_;
	BirdFontWidgetAllocation* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = bird_font_widget_allocation_new ();
	w = _tmp0_;
	w->x = self->x;
	w->y = self->y;
	w->width = self->width;
	w->height = self->height;
	result = w;
	return result;
}

gchar*
bird_font_widget_allocation_to_string (BirdFontWidgetAllocation* self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup_printf ("%i", self->x);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf ("%i", self->y);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup_printf ("%i", self->width);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup_printf ("%i", self->height);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strconcat ("x: ", _tmp1_, ", y: ", _tmp3_, ", width: ", _tmp5_, ", height: ", _tmp7_, "\n", NULL);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	result = _tmp9_;
	return result;
}

static void
bird_font_widget_allocation_class_init (BirdFontWidgetAllocationClass * klass,
                                        gpointer klass_data)
{
	bird_font_widget_allocation_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = bird_font_widget_allocation_finalize;
}

static void
bird_font_widget_allocation_instance_init (BirdFontWidgetAllocation * self,
                                           gpointer klass)
{
	self->width = 0;
	self->height = 0;
	self->x = 0;
	self->y = 0;
}

static void
bird_font_widget_allocation_finalize (GObject * obj)
{
	BirdFontWidgetAllocation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_WIDGET_ALLOCATION, BirdFontWidgetAllocation);
	G_OBJECT_CLASS (bird_font_widget_allocation_parent_class)->finalize (obj);
}

static GType
bird_font_widget_allocation_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontWidgetAllocationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_widget_allocation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontWidgetAllocation), 0, (GInstanceInitFunc) bird_font_widget_allocation_instance_init, NULL };
	GType bird_font_widget_allocation_type_id;
	bird_font_widget_allocation_type_id = g_type_register_static (G_TYPE_OBJECT, "BirdFontWidgetAllocation", &g_define_type_info, 0);
	return bird_font_widget_allocation_type_id;
}

GType
bird_font_widget_allocation_get_type (void)
{
	static volatile gsize bird_font_widget_allocation_type_id__once = 0;
	if (g_once_init_enter (&bird_font_widget_allocation_type_id__once)) {
		GType bird_font_widget_allocation_type_id;
		bird_font_widget_allocation_type_id = bird_font_widget_allocation_get_type_once ();
		g_once_init_leave (&bird_font_widget_allocation_type_id__once, bird_font_widget_allocation_type_id);
	}
	return bird_font_widget_allocation_type_id__once;
}

