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

/*
Copyright (C) 2015 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.h>
#include <float.h>
#include <math.h>
#include <glib-object.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_STOP_0_PROPERTY,
	BIRD_FONT_STOP_NUM_PROPERTIES
};
static GParamSpec* bird_font_stop_properties[BIRD_FONT_STOP_NUM_PROPERTIES];
#define _bird_font_color_unref0(var) ((var == NULL) ? NULL : (var = (bird_font_color_unref (var), NULL)))

static gpointer bird_font_stop_parent_class = NULL;

static void bird_font_stop_finalize (GObject * obj);
static GType bird_font_stop_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

BirdFontStop*
bird_font_stop_construct (GType object_type)
{
	BirdFontStop * self = NULL;
	self = (BirdFontStop*) g_object_new (object_type, NULL);
	return self;
}

BirdFontStop*
bird_font_stop_new (void)
{
	return bird_font_stop_construct (BIRD_FONT_TYPE_STOP);
}

BirdFontStop*
bird_font_stop_copy (BirdFontStop* self)
{
	BirdFontStop* s = NULL;
	BirdFontStop* _tmp0_;
	BirdFontColor* _tmp1_;
	BirdFontColor* _tmp2_;
	BirdFontStop* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = bird_font_stop_new ();
	s = _tmp0_;
	_tmp1_ = self->color;
	_tmp2_ = bird_font_color_copy (_tmp1_);
	_bird_font_color_unref0 (s->color);
	s->color = _tmp2_;
	s->offset = self->offset;
	result = s;
	return result;
}

static void
bird_font_stop_class_init (BirdFontStopClass * klass,
                           gpointer klass_data)
{
	bird_font_stop_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = bird_font_stop_finalize;
}

static void
bird_font_stop_instance_init (BirdFontStop * self,
                              gpointer klass)
{
	BirdFontColor* _tmp0_;
	_tmp0_ = bird_font_color_black ();
	self->color = _tmp0_;
	self->offset = (gdouble) 0;
}

static void
bird_font_stop_finalize (GObject * obj)
{
	BirdFontStop * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_STOP, BirdFontStop);
	_bird_font_color_unref0 (self->color);
	G_OBJECT_CLASS (bird_font_stop_parent_class)->finalize (obj);
}

static GType
bird_font_stop_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontStopClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_stop_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontStop), 0, (GInstanceInitFunc) bird_font_stop_instance_init, NULL };
	GType bird_font_stop_type_id;
	bird_font_stop_type_id = g_type_register_static (G_TYPE_OBJECT, "BirdFontStop", &g_define_type_info, 0);
	return bird_font_stop_type_id;
}

GType
bird_font_stop_get_type (void)
{
	static volatile gsize bird_font_stop_type_id__once = 0;
	if (g_once_init_enter (&bird_font_stop_type_id__once)) {
		GType bird_font_stop_type_id;
		bird_font_stop_type_id = bird_font_stop_get_type_once ();
		g_once_init_leave (&bird_font_stop_type_id__once, bird_font_stop_type_id);
	}
	return bird_font_stop_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

