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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <handy.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>

#define TOOTLE_DIALOGS_TYPE_ABOUT (tootle_dialogs_about_get_type ())
#define TOOTLE_DIALOGS_ABOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_ABOUT, TootleDialogsAbout))
#define TOOTLE_DIALOGS_ABOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_ABOUT, TootleDialogsAboutClass))
#define TOOTLE_DIALOGS_IS_ABOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_ABOUT))
#define TOOTLE_DIALOGS_IS_ABOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_ABOUT))
#define TOOTLE_DIALOGS_ABOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_ABOUT, TootleDialogsAboutClass))

typedef struct _TootleDialogsAbout TootleDialogsAbout;
typedef struct _TootleDialogsAboutClass TootleDialogsAboutClass;
typedef struct _TootleDialogsAboutPrivate TootleDialogsAboutPrivate;
enum  {
	TOOTLE_DIALOGS_ABOUT_0_PROPERTY,
	TOOTLE_DIALOGS_ABOUT_NUM_PROPERTIES
};
static GParamSpec* tootle_dialogs_about_properties[TOOTLE_DIALOGS_ABOUT_NUM_PROPERTIES];

#define TOOTLE_DIALOGS_TYPE_MAIN_WINDOW (tootle_dialogs_main_window_get_type ())
#define TOOTLE_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindow))
#define TOOTLE_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))

typedef struct _TootleDialogsMainWindow TootleDialogsMainWindow;
typedef struct _TootleDialogsMainWindowClass TootleDialogsMainWindowClass;

struct _TootleDialogsAbout {
	GtkAboutDialog parent_instance;
	TootleDialogsAboutPrivate * priv;
};

struct _TootleDialogsAboutClass {
	GtkAboutDialogClass parent_class;
};

static gpointer tootle_dialogs_about_parent_class = NULL;
extern TootleDialogsMainWindow* tootle_window;

GType tootle_dialogs_about_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsAbout, g_object_unref)
TootleDialogsAbout* tootle_dialogs_about_new (void);
TootleDialogsAbout* tootle_dialogs_about_construct (GType object_type);
GType tootle_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsMainWindow, g_object_unref)
#define BUILD_DOMAIN "com.github.bleakgrey.tootle"
#define BUILD_NAME "Tootle"
#define BUILD_VERSION "1.0.0"
#define BUILD_SUPPORT_WEBSITE "https://github.com/bleakgrey/tootle/issues"
#define BUILD_COPYRIGHT "© 2018-2020 bleak_grey"
gchar** build_get_authors (gint* result_length1);
gchar** build_get_artists (gint* result_length1);
#define BUILD_TRANSLATOR _ (" ")
static GType tootle_dialogs_about_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

TootleDialogsAbout*
tootle_dialogs_about_construct (GType object_type)
{
	TootleDialogsAbout * self = NULL;
	TootleDialogsMainWindow* _tmp0_;
	gint _tmp1_ = 0;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gint _tmp4_ = 0;
	gchar** _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	const gchar* _tmp7_ = NULL;
	_tmp0_ = tootle_window;
	self = (TootleDialogsAbout*) g_object_new (object_type, "transient-for", _tmp0_, "modal", TRUE, "logo-icon-name", BUILD_DOMAIN, "program-name", BUILD_NAME, "version", BUILD_VERSION, "website", BUILD_SUPPORT_WEBSITE, "website-label", _ ("Report an issue"), "license-type", GTK_LICENSE_GPL_3_0_ONLY, "copyright", BUILD_COPYRIGHT, NULL);
	_tmp2_ = build_get_authors (&_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	gtk_about_dialog_set_authors ((GtkAboutDialog*) self, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	_tmp5_ = build_get_artists (&_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp6__length1 = _tmp4_;
	gtk_about_dialog_set_artists ((GtkAboutDialog*) self, _tmp6_);
	_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
	if (g_strcmp0 (BUILD_TRANSLATOR, " ") != 0) {
		_tmp7_ = BUILD_TRANSLATOR;
	} else {
		_tmp7_ = NULL;
	}
	gtk_about_dialog_set_translator_credits ((GtkAboutDialog*) self, _tmp7_);
	gtk_window_present ((GtkWindow*) self);
	return self;
}

TootleDialogsAbout*
tootle_dialogs_about_new (void)
{
	return tootle_dialogs_about_construct (TOOTLE_DIALOGS_TYPE_ABOUT);
}

static void
tootle_dialogs_about_class_init (TootleDialogsAboutClass * klass,
                                 gpointer klass_data)
{
	tootle_dialogs_about_parent_class = g_type_class_peek_parent (klass);
}

static void
tootle_dialogs_about_instance_init (TootleDialogsAbout * self,
                                    gpointer klass)
{
}

static GType
tootle_dialogs_about_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleDialogsAboutClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_dialogs_about_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleDialogsAbout), 0, (GInstanceInitFunc) tootle_dialogs_about_instance_init, NULL };
	GType tootle_dialogs_about_type_id;
	tootle_dialogs_about_type_id = g_type_register_static (gtk_about_dialog_get_type (), "TootleDialogsAbout", &g_define_type_info, 0);
	return tootle_dialogs_about_type_id;
}

GType
tootle_dialogs_about_get_type (void)
{
	static volatile gsize tootle_dialogs_about_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_dialogs_about_type_id__volatile)) {
		GType tootle_dialogs_about_type_id;
		tootle_dialogs_about_type_id = tootle_dialogs_about_get_type_once ();
		g_once_init_leave (&tootle_dialogs_about_type_id__volatile, tootle_dialogs_about_type_id);
	}
	return tootle_dialogs_about_type_id__volatile;
}

static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gint i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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;
}

