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

/*
Copyright (C) 2014 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 <cairo-gobject.h>
#include <float.h>
#include <math.h>
#include <glib-object.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_DIALOG_0_PROPERTY,
	BIRD_FONT_DIALOG_VISIBLE_PROPERTY,
	BIRD_FONT_DIALOG_NUM_PROPERTIES
};
static GParamSpec* bird_font_dialog_properties[BIRD_FONT_DIALOG_NUM_PROPERTIES];

struct _BirdFontDialogPrivate {
	gboolean _visible;
};

static gint BirdFontDialog_private_offset;
static gpointer bird_font_dialog_parent_class = NULL;

static void bird_font_dialog_real_draw (BirdFontWidget* base,
                                 cairo_t* cr);
static gdouble bird_font_dialog_real_get_height (BirdFontWidget* base);
static gdouble bird_font_dialog_real_get_width (BirdFontWidget* base);
static void bird_font_dialog_finalize (GObject * obj);
static GType bird_font_dialog_get_type_once (void);
static void _vala_bird_font_dialog_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_bird_font_dialog_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec);

static inline gpointer
bird_font_dialog_get_instance_private (BirdFontDialog* self)
{
	return G_STRUCT_MEMBER_P (self, BirdFontDialog_private_offset);
}

BirdFontDialog*
bird_font_dialog_construct (GType object_type)
{
	BirdFontDialog * self = NULL;
	self = (BirdFontDialog*) bird_font_widget_construct (object_type);
	bird_font_dialog_set_visible (self, FALSE);
	return self;
}

BirdFontDialog*
bird_font_dialog_new (void)
{
	return bird_font_dialog_construct (BIRD_FONT_TYPE_DIALOG);
}

static void
bird_font_dialog_real_draw (BirdFontWidget* base,
                            cairo_t* cr)
{
	BirdFontDialog * self;
	self = (BirdFontDialog*) base;
	g_return_if_fail (cr != NULL);
}

static gdouble
bird_font_dialog_real_get_height (BirdFontWidget* base)
{
	BirdFontDialog * self;
	gdouble result;
	self = (BirdFontDialog*) base;
	result = (gdouble) 0;
	return result;
}

static gdouble
bird_font_dialog_real_get_width (BirdFontWidget* base)
{
	BirdFontDialog * self;
	gdouble result;
	self = (BirdFontDialog*) base;
	result = (gdouble) 0;
	return result;
}

gboolean
bird_font_dialog_get_visible (BirdFontDialog* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_visible;
	return result;
}

void
bird_font_dialog_set_visible (BirdFontDialog* self,
                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = bird_font_dialog_get_visible (self);
	if (old_value != value) {
		self->priv->_visible = value;
		g_object_notify_by_pspec ((GObject *) self, bird_font_dialog_properties[BIRD_FONT_DIALOG_VISIBLE_PROPERTY]);
	}
}

static void
bird_font_dialog_class_init (BirdFontDialogClass * klass,
                             gpointer klass_data)
{
	bird_font_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BirdFontDialog_private_offset);
	((BirdFontWidgetClass *) klass)->draw = (void (*) (BirdFontWidget*, cairo_t*)) bird_font_dialog_real_draw;
	((BirdFontWidgetClass *) klass)->get_height = (gdouble (*) (BirdFontWidget*)) bird_font_dialog_real_get_height;
	((BirdFontWidgetClass *) klass)->get_width = (gdouble (*) (BirdFontWidget*)) bird_font_dialog_real_get_width;
	G_OBJECT_CLASS (klass)->get_property = _vala_bird_font_dialog_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_bird_font_dialog_set_property;
	G_OBJECT_CLASS (klass)->finalize = bird_font_dialog_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BIRD_FONT_DIALOG_VISIBLE_PROPERTY, bird_font_dialog_properties[BIRD_FONT_DIALOG_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
bird_font_dialog_instance_init (BirdFontDialog * self,
                                gpointer klass)
{
	self->priv = bird_font_dialog_get_instance_private (self);
}

static void
bird_font_dialog_finalize (GObject * obj)
{
	BirdFontDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_DIALOG, BirdFontDialog);
	G_OBJECT_CLASS (bird_font_dialog_parent_class)->finalize (obj);
}

static GType
bird_font_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontDialog), 0, (GInstanceInitFunc) bird_font_dialog_instance_init, NULL };
	GType bird_font_dialog_type_id;
	bird_font_dialog_type_id = g_type_register_static (BIRD_FONT_TYPE_WIDGET, "BirdFontDialog", &g_define_type_info, 0);
	BirdFontDialog_private_offset = g_type_add_instance_private (bird_font_dialog_type_id, sizeof (BirdFontDialogPrivate));
	return bird_font_dialog_type_id;
}

GType
bird_font_dialog_get_type (void)
{
	static volatile gsize bird_font_dialog_type_id__once = 0;
	if (g_once_init_enter (&bird_font_dialog_type_id__once)) {
		GType bird_font_dialog_type_id;
		bird_font_dialog_type_id = bird_font_dialog_get_type_once ();
		g_once_init_leave (&bird_font_dialog_type_id__once, bird_font_dialog_type_id);
	}
	return bird_font_dialog_type_id__once;
}

static void
_vala_bird_font_dialog_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	BirdFontDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BIRD_FONT_TYPE_DIALOG, BirdFontDialog);
	switch (property_id) {
		case BIRD_FONT_DIALOG_VISIBLE_PROPERTY:
		g_value_set_boolean (value, bird_font_dialog_get_visible (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_bird_font_dialog_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	BirdFontDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BIRD_FONT_TYPE_DIALOG, BirdFontDialog);
	switch (property_id) {
		case BIRD_FONT_DIALOG_VISIBLE_PROPERTY:
		bird_font_dialog_set_visible (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

