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

/*
Copyright (C) 2013 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 <glib-object.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_OVER_WRITE_DIALOG_LISTENER_0_PROPERTY,
	BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_NUM_PROPERTIES
};
static GParamSpec* bird_font_over_write_dialog_listener_properties[BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_OVERWRITE_SIGNAL_SIGNAL,
	BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_CANCEL_SIGNAL_SIGNAL,
	BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_NUM_SIGNALS
};
static guint bird_font_over_write_dialog_listener_signals[BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_NUM_SIGNALS] = {0};

static gpointer bird_font_over_write_dialog_listener_parent_class = NULL;
gboolean bird_font_over_write_dialog_listener_dont_ask_again = FALSE;

static void bird_font_over_write_dialog_listener_finalize (GObject * obj);
static GType bird_font_over_write_dialog_listener_get_type_once (void);

BirdFontOverWriteDialogListener*
bird_font_over_write_dialog_listener_construct (GType object_type)
{
	BirdFontOverWriteDialogListener * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self = (BirdFontOverWriteDialogListener*) g_object_new (object_type, NULL);
	_tmp0_ = bird_font_t_ ("Overwrite TTF file?");
	_g_free0 (self->message);
	self->message = _tmp0_;
	_tmp1_ = bird_font_t_ ("Overwrite");
	_g_free0 (self->overwrite_message);
	self->overwrite_message = _tmp1_;
	_tmp2_ = bird_font_t_ ("Cancel");
	_g_free0 (self->cancel_message);
	self->cancel_message = _tmp2_;
	_tmp3_ = bird_font_t_ ("Yes, don't ask again.");
	_g_free0 (self->dont_ask_again_message);
	self->dont_ask_again_message = _tmp3_;
	return self;
}

BirdFontOverWriteDialogListener*
bird_font_over_write_dialog_listener_new (void)
{
	return bird_font_over_write_dialog_listener_construct (BIRD_FONT_TYPE_OVER_WRITE_DIALOG_LISTENER);
}

void
bird_font_over_write_dialog_listener_overwrite (BirdFontOverWriteDialogListener* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, bird_font_over_write_dialog_listener_signals[BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_OVERWRITE_SIGNAL_SIGNAL], 0);
}

void
bird_font_over_write_dialog_listener_cancel (BirdFontOverWriteDialogListener* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, bird_font_over_write_dialog_listener_signals[BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_CANCEL_SIGNAL_SIGNAL], 0);
}

void
bird_font_over_write_dialog_listener_overwrite_dont_ask_again (BirdFontOverWriteDialogListener* self)
{
	g_return_if_fail (self != NULL);
	bird_font_over_write_dialog_listener_dont_ask_again = TRUE;
	bird_font_over_write_dialog_listener_overwrite (self);
}

static void
bird_font_over_write_dialog_listener_class_init (BirdFontOverWriteDialogListenerClass * klass,
                                                 gpointer klass_data)
{
	bird_font_over_write_dialog_listener_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = bird_font_over_write_dialog_listener_finalize;
	bird_font_over_write_dialog_listener_signals[BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_OVERWRITE_SIGNAL_SIGNAL] = g_signal_new ("overwrite-signal", BIRD_FONT_TYPE_OVER_WRITE_DIALOG_LISTENER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	bird_font_over_write_dialog_listener_signals[BIRD_FONT_OVER_WRITE_DIALOG_LISTENER_CANCEL_SIGNAL_SIGNAL] = g_signal_new ("cancel-signal", BIRD_FONT_TYPE_OVER_WRITE_DIALOG_LISTENER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
bird_font_over_write_dialog_listener_instance_init (BirdFontOverWriteDialogListener * self,
                                                    gpointer klass)
{
}

static void
bird_font_over_write_dialog_listener_finalize (GObject * obj)
{
	BirdFontOverWriteDialogListener * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_OVER_WRITE_DIALOG_LISTENER, BirdFontOverWriteDialogListener);
	_g_free0 (self->message);
	_g_free0 (self->overwrite_message);
	_g_free0 (self->cancel_message);
	_g_free0 (self->dont_ask_again_message);
	G_OBJECT_CLASS (bird_font_over_write_dialog_listener_parent_class)->finalize (obj);
}

static GType
bird_font_over_write_dialog_listener_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontOverWriteDialogListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_over_write_dialog_listener_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontOverWriteDialogListener), 0, (GInstanceInitFunc) bird_font_over_write_dialog_listener_instance_init, NULL };
	GType bird_font_over_write_dialog_listener_type_id;
	bird_font_over_write_dialog_listener_type_id = g_type_register_static (G_TYPE_OBJECT, "BirdFontOverWriteDialogListener", &g_define_type_info, 0);
	return bird_font_over_write_dialog_listener_type_id;
}

GType
bird_font_over_write_dialog_listener_get_type (void)
{
	static volatile gsize bird_font_over_write_dialog_listener_type_id__once = 0;
	if (g_once_init_enter (&bird_font_over_write_dialog_listener_type_id__once)) {
		GType bird_font_over_write_dialog_listener_type_id;
		bird_font_over_write_dialog_listener_type_id = bird_font_over_write_dialog_listener_get_type_once ();
		g_once_init_leave (&bird_font_over_write_dialog_listener_type_id__once, bird_font_over_write_dialog_listener_type_id);
	}
	return bird_font_over_write_dialog_listener_type_id__once;
}

