/* FileTools.c generated by valac 0.56.17, the Vala compiler
 * generated from FileTools.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 <gee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.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_FILE_TOOLS_0_PROPERTY,
	BIRD_FONT_FILE_TOOLS_NUM_PROPERTIES
};
static GParamSpec* bird_font_file_tools_properties[BIRD_FONT_FILE_TOOLS_NUM_PROPERTIES];
typedef struct _Block16Data Block16Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))

struct _Block16Data {
	int _ref_count_;
	BirdFontFileTools* self;
	BirdFontExpander* font_name;
	BirdFontExpander* file_tools;
	BirdFontExpander* themes;
};

static gpointer bird_font_file_tools_parent_class = NULL;
GeeArrayList* bird_font_file_tools_expanders = NULL;

static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
static void __lambda279_ (BirdFontFileTools* self,
                   BirdFontTool* _self_);
static void ___lambda279__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda280_ (BirdFontFileTools* self,
                   BirdFontTool* _self_);
static void ___lambda280__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda293_ (BirdFontFileTools* self,
                   BirdFontTool* _self_);
static void ___lambda293__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda294_ (BirdFontFileTools* self,
                   BirdFontTool* _self_);
static void ___lambda294__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
VALA_EXTERN gchar* bird_font_theme_tab_get_label_from_file_name (const gchar* theme);
static void ____lambda315_ (Block16Data* _data16_,
                     BirdFontTool* _self_);
static void _____lambda315__bird_font_tool_select_action (BirdFontTool* _sender,
                                                   BirdFontTool* selected,
                                                   gpointer self);
static GeeArrayList* bird_font_file_tools_real_get_displays (BirdFontToolCollection* base);
static GeeArrayList* bird_font_file_tools_real_get_expanders (BirdFontToolCollection* base);
static void bird_font_file_tools_finalize (GObject * obj);
static GType bird_font_file_tools_get_type_once (void);

static Block16Data*
block16_data_ref (Block16Data* _data16_)
{
	g_atomic_int_inc (&_data16_->_ref_count_);
	return _data16_;
}

static void
block16_data_unref (void * _userdata_)
{
	Block16Data* _data16_;
	_data16_ = (Block16Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data16_->_ref_count_)) {
		BirdFontFileTools* self;
		self = _data16_->self;
		_g_object_unref0 (_data16_->themes);
		_g_object_unref0 (_data16_->file_tools);
		_g_object_unref0 (_data16_->font_name);
		_g_object_unref0 (self);
		g_slice_free (Block16Data, _data16_);
	}
}

static void
__lambda279_ (BirdFontFileTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_menu_tab_new_file ();
}

static void
___lambda279__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda279_ ((BirdFontFileTools*) self, selected);
}

static void
__lambda280_ (BirdFontFileTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_menu_tab_load ();
}

static void
___lambda280__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda280_ ((BirdFontFileTools*) self, selected);
}

static void
__lambda293_ (BirdFontFileTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_menu_tab_save ();
}

static void
___lambda293__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda293_ ((BirdFontFileTools*) self, selected);
}

static void
__lambda294_ (BirdFontFileTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_menu_tab_show_settings_tab ();
}

static void
___lambda294__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda294_ ((BirdFontFileTools*) self, selected);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
____lambda315_ (Block16Data* _data16_,
                BirdFontTool* _self_)
{
	BirdFontFileTools* self;
	BirdFontLabelTool* s = NULL;
	BirdFontLabelTool* _tmp0_;
	BirdFontToolbox* toolbox = NULL;
	BirdFontToolbox* _tmp1_;
	gchar* theme_file = NULL;
	BirdFontLabelTool* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	BirdFontTabBar* tb = NULL;
	BirdFontTabBar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	BirdFontExpander* _tmp8_;
	BirdFontExpander* _tmp9_;
	BirdFontExpander* _tmp10_;
	BirdFontTabBar* _tmp11_;
	BirdFontTabBar* _tmp12_;
	BirdFontTabBar* _tmp13_;
	BirdFontExpander* _tmp34_;
	self = _data16_->self;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_self_, BIRD_FONT_TYPE_LABEL_TOOL, BirdFontLabelTool));
	s = _tmp0_;
	_tmp1_ = bird_font_main_window_get_toolbox ();
	toolbox = _tmp1_;
	_tmp2_ = s;
	_tmp3_ = _tmp2_->data;
	_tmp4_ = g_strdup (_tmp3_);
	theme_file = _tmp4_;
	_tmp5_ = bird_font_main_window_get_tab_bar ();
	tb = _tmp5_;
	_tmp6_ = theme_file;
	bird_font_preferences_set ("theme", _tmp6_);
	_tmp7_ = theme_file;
	bird_font_theme_load_theme (_tmp7_);
	bird_font_toolbox_redraw_tool_box ();
	bird_font_glyph_canvas_redraw ();
	_tmp8_ = _data16_->file_tools;
	bird_font_expander_clear_cache (_tmp8_);
	_tmp9_ = _data16_->font_name;
	bird_font_expander_clear_cache (_tmp9_);
	_tmp10_ = _data16_->themes;
	bird_font_expander_clear_cache (_tmp10_);
	_tmp11_ = tb;
	_tmp12_ = tb;
	_tmp13_ = tb;
	bird_font_tab_bar_redraw (_tmp11_, 0, 0, _tmp12_->width, _tmp13_->height);
	{
		GeeArrayList* _tc_list = NULL;
		BirdFontToolbox* _tmp14_;
		GeeArrayList* _tmp15_;
		gint _tc_size = 0;
		GeeArrayList* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		gint _tc_index = 0;
		_tmp14_ = toolbox;
		_tmp15_ = _tmp14_->tool_sets;
		_tc_list = _tmp15_;
		_tmp16_ = _tc_list;
		_tmp17_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tc_size = _tmp18_;
		_tc_index = -1;
		while (TRUE) {
			gint _tmp19_;
			gint _tmp20_;
			BirdFontToolCollection* tc = NULL;
			GeeArrayList* _tmp21_;
			gpointer _tmp22_;
			BirdFontToolCollection* _tmp23_;
			_tc_index = _tc_index + 1;
			_tmp19_ = _tc_index;
			_tmp20_ = _tc_size;
			if (!(_tmp19_ < _tmp20_)) {
				break;
			}
			_tmp21_ = _tc_list;
			_tmp22_ = gee_abstract_list_get ((GeeAbstractList*) _tmp21_, _tc_index);
			tc = (BirdFontToolCollection*) _tmp22_;
			_tmp23_ = tc;
			bird_font_tool_collection_clear_cache (_tmp23_);
			_g_object_unref0 (tc);
		}
	}
	_cairo_surface_destroy0 (bird_font_overview_item_label_background);
	bird_font_overview_item_label_background = NULL;
	_cairo_surface_destroy0 (bird_font_overview_item_selected_label_background);
	bird_font_overview_item_selected_label_background = NULL;
	_cairo_surface_destroy0 (bird_font_overview_item_label_background_no_menu);
	bird_font_overview_item_label_background_no_menu = NULL;
	_cairo_surface_destroy0 (bird_font_overview_item_selected_label_background_no_menu);
	bird_font_overview_item_selected_label_background_no_menu = NULL;
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp24_;
		GeeArrayList* _tmp25_;
		gint _t_size = 0;
		GeeArrayList* _tmp26_;
		gint _tmp27_;
		gint _tmp28_;
		gint _t_index = 0;
		_tmp24_ = _data16_->themes;
		_tmp25_ = _tmp24_->tool;
		_t_list = _tmp25_;
		_tmp26_ = _t_list;
		_tmp27_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp26_);
		_tmp28_ = _tmp27_;
		_t_size = _tmp28_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp29_;
			gint _tmp30_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp31_;
			gpointer _tmp32_;
			BirdFontTool* _tmp33_;
			_t_index = _t_index + 1;
			_tmp29_ = _t_index;
			_tmp30_ = _t_size;
			if (!(_tmp29_ < _tmp30_)) {
				break;
			}
			_tmp31_ = _t_list;
			_tmp32_ = gee_abstract_list_get ((GeeAbstractList*) _tmp31_, _t_index);
			t = (BirdFontTool*) _tmp32_;
			_tmp33_ = t;
			bird_font_tool_set_selected (_tmp33_, FALSE);
			_g_object_unref0 (t);
		}
	}
	bird_font_tool_set_selected (_self_, TRUE);
	_tmp34_ = _data16_->themes;
	bird_font_expander_clear_cache (_tmp34_);
	_g_object_unref0 (tb);
	_g_free0 (theme_file);
	_g_object_unref0 (toolbox);
	_g_object_unref0 (s);
}

static void
_____lambda315__bird_font_tool_select_action (BirdFontTool* _sender,
                                              BirdFontTool* selected,
                                              gpointer self)
{
	____lambda315_ (self, selected);
}

BirdFontFileTools*
bird_font_file_tools_construct (GType object_type)
{
	BirdFontFileTools * self = NULL;
	Block16Data* _data16_;
	GeeArrayList* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontExpander* _tmp2_;
	BirdFontFontName* _tmp3_;
	BirdFontFontName* _tmp4_;
	BirdFontExpander* _tmp5_;
	BirdFontTool* new_font = NULL;
	gchar* _tmp6_;
	gchar* _tmp7_;
	BirdFontTool* _tmp8_;
	BirdFontTool* _tmp9_;
	BirdFontTool* _tmp10_;
	BirdFontExpander* _tmp11_;
	BirdFontTool* _tmp12_;
	BirdFontTool* open_font = NULL;
	gchar* _tmp13_;
	gchar* _tmp14_;
	BirdFontTool* _tmp15_;
	BirdFontTool* _tmp16_;
	BirdFontTool* _tmp17_;
	BirdFontExpander* _tmp18_;
	BirdFontTool* _tmp19_;
	BirdFontTool* save_font = NULL;
	gchar* _tmp20_;
	gchar* _tmp21_;
	BirdFontTool* _tmp22_;
	BirdFontTool* _tmp23_;
	BirdFontTool* _tmp24_;
	BirdFontExpander* _tmp25_;
	BirdFontTool* _tmp26_;
	BirdFontTool* settings = NULL;
	gchar* _tmp27_;
	gchar* _tmp28_;
	BirdFontTool* _tmp29_;
	BirdFontTool* _tmp30_;
	BirdFontTool* _tmp31_;
	BirdFontExpander* _tmp32_;
	BirdFontTool* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	BirdFontExpander* _tmp36_;
	BirdFontExpander* _tmp37_;
	gchar* theme_in_use = NULL;
	gchar* _tmp57_;
	GeeArrayList* _tmp74_;
	BirdFontExpander* _tmp75_;
	GeeArrayList* _tmp76_;
	BirdFontExpander* _tmp77_;
	GeeArrayList* _tmp78_;
	BirdFontExpander* _tmp79_;
	_data16_ = g_slice_new0 (Block16Data);
	_data16_->_ref_count_ = 1;
	self = (BirdFontFileTools*) bird_font_tool_collection_construct (object_type);
	_data16_->self = g_object_ref (self);
	_tmp0_ = gee_array_list_new (BIRD_FONT_TYPE_EXPANDER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (bird_font_file_tools_expanders);
	bird_font_file_tools_expanders = _tmp0_;
	_tmp1_ = bird_font_expander_new (NULL);
	_data16_->font_name = _tmp1_;
	_tmp2_ = _data16_->font_name;
	_tmp3_ = bird_font_font_name_new (NULL, "");
	_tmp4_ = _tmp3_;
	bird_font_expander_add_tool (_tmp2_, (BirdFontTool*) _tmp4_, -1);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = bird_font_expander_new (NULL);
	_data16_->file_tools = _tmp5_;
	_tmp6_ = bird_font_t_ ("New font");
	_tmp7_ = _tmp6_;
	_tmp8_ = bird_font_tool_new ("new_font", _tmp7_);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp7_);
	new_font = _tmp9_;
	_tmp10_ = new_font;
	g_signal_connect_object (_tmp10_, "select-action", (GCallback) ___lambda279__bird_font_tool_select_action, self, 0);
	_tmp11_ = _data16_->file_tools;
	_tmp12_ = new_font;
	bird_font_expander_add_tool (_tmp11_, _tmp12_, -1);
	_tmp13_ = bird_font_t_ ("Open font");
	_tmp14_ = _tmp13_;
	_tmp15_ = bird_font_tool_new ("open_font", _tmp14_);
	_tmp16_ = _tmp15_;
	_g_free0 (_tmp14_);
	open_font = _tmp16_;
	_tmp17_ = open_font;
	g_signal_connect_object (_tmp17_, "select-action", (GCallback) ___lambda280__bird_font_tool_select_action, self, 0);
	_tmp18_ = _data16_->file_tools;
	_tmp19_ = open_font;
	bird_font_expander_add_tool (_tmp18_, _tmp19_, -1);
	_tmp20_ = bird_font_t_ ("Save font");
	_tmp21_ = _tmp20_;
	_tmp22_ = bird_font_tool_new ("save_font", _tmp21_);
	_tmp23_ = _tmp22_;
	_g_free0 (_tmp21_);
	save_font = _tmp23_;
	_tmp24_ = save_font;
	g_signal_connect_object (_tmp24_, "select-action", (GCallback) ___lambda293__bird_font_tool_select_action, self, 0);
	_tmp25_ = _data16_->file_tools;
	_tmp26_ = save_font;
	bird_font_expander_add_tool (_tmp25_, _tmp26_, -1);
	_tmp27_ = bird_font_t_ ("Settings");
	_tmp28_ = _tmp27_;
	_tmp29_ = bird_font_tool_new ("settings", _tmp28_);
	_tmp30_ = _tmp29_;
	_g_free0 (_tmp28_);
	settings = _tmp30_;
	_tmp31_ = settings;
	g_signal_connect_object (_tmp31_, "select-action", (GCallback) ___lambda294__bird_font_tool_select_action, self, 0);
	_tmp32_ = _data16_->file_tools;
	_tmp33_ = settings;
	bird_font_expander_add_tool (_tmp32_, _tmp33_, -1);
	_tmp34_ = bird_font_t_ ("Themes");
	_tmp35_ = _tmp34_;
	_tmp36_ = bird_font_expander_new (_tmp35_);
	_tmp37_ = _tmp36_;
	_g_free0 (_tmp35_);
	_data16_->themes = _tmp37_;
	{
		GeeArrayList* _theme_list = NULL;
		GeeArrayList* _tmp38_;
		gint _theme_size = 0;
		GeeArrayList* _tmp39_;
		gint _tmp40_;
		gint _tmp41_;
		gint _theme_index = 0;
		_tmp38_ = bird_font_theme_themes;
		_theme_list = _tmp38_;
		_tmp39_ = _theme_list;
		_tmp40_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp39_);
		_tmp41_ = _tmp40_;
		_theme_size = _tmp41_;
		_theme_index = -1;
		while (TRUE) {
			gint _tmp42_;
			gint _tmp43_;
			gchar* theme = NULL;
			GeeArrayList* _tmp44_;
			gpointer _tmp45_;
			gchar* label = NULL;
			BirdFontLabelTool* theme_label = NULL;
			const gchar* _tmp46_;
			gchar* _tmp47_;
			const gchar* _tmp48_;
			BirdFontLabelTool* _tmp49_;
			BirdFontLabelTool* _tmp50_;
			const gchar* _tmp51_;
			gchar* _tmp52_;
			BirdFontLabelTool* _tmp53_;
			const gchar* _tmp54_;
			_theme_index = _theme_index + 1;
			_tmp42_ = _theme_index;
			_tmp43_ = _theme_size;
			if (!(_tmp42_ < _tmp43_)) {
				break;
			}
			_tmp44_ = _theme_list;
			_tmp45_ = gee_abstract_list_get ((GeeAbstractList*) _tmp44_, _theme_index);
			theme = (gchar*) _tmp45_;
			_tmp46_ = theme;
			_tmp47_ = bird_font_theme_tab_get_label_from_file_name (_tmp46_);
			_g_free0 (label);
			label = _tmp47_;
			_tmp48_ = label;
			_tmp49_ = bird_font_label_tool_new (_tmp48_);
			_g_object_unref0 (theme_label);
			theme_label = _tmp49_;
			_tmp50_ = theme_label;
			_tmp51_ = theme;
			_tmp52_ = g_strdup (_tmp51_);
			_g_free0 (_tmp50_->data);
			_tmp50_->data = _tmp52_;
			_tmp53_ = theme_label;
			g_signal_connect_data ((BirdFontTool*) _tmp53_, "select-action", (GCallback) _____lambda315__bird_font_tool_select_action, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
			_tmp54_ = theme;
			if (!g_str_has_prefix (_tmp54_, "generated_")) {
				BirdFontExpander* _tmp55_;
				BirdFontLabelTool* _tmp56_;
				_tmp55_ = _data16_->themes;
				_tmp56_ = theme_label;
				bird_font_expander_add_tool (_tmp55_, (BirdFontTool*) _tmp56_, -1);
			}
			_g_object_unref0 (theme_label);
			_g_free0 (label);
			_g_free0 (theme);
		}
	}
	_tmp57_ = bird_font_preferences_get ("theme");
	theme_in_use = _tmp57_;
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp58_;
		GeeArrayList* _tmp59_;
		gint _t_size = 0;
		GeeArrayList* _tmp60_;
		gint _tmp61_;
		gint _tmp62_;
		gint _t_index = 0;
		_tmp58_ = _data16_->themes;
		_tmp59_ = _tmp58_->tool;
		_t_list = _tmp59_;
		_tmp60_ = _t_list;
		_tmp61_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp60_);
		_tmp62_ = _tmp61_;
		_t_size = _tmp62_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp63_;
			gint _tmp64_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp65_;
			gpointer _tmp66_;
			BirdFontTool* _tmp67_;
			_t_index = _t_index + 1;
			_tmp63_ = _t_index;
			_tmp64_ = _t_size;
			if (!(_tmp63_ < _tmp64_)) {
				break;
			}
			_tmp65_ = _t_list;
			_tmp66_ = gee_abstract_list_get ((GeeAbstractList*) _tmp65_, _t_index);
			t = (BirdFontTool*) _tmp66_;
			_tmp67_ = t;
			if (BIRD_FONT_IS_LABEL_TOOL (_tmp67_)) {
				BirdFontLabelTool* lt = NULL;
				BirdFontTool* _tmp68_;
				BirdFontLabelTool* _tmp69_;
				BirdFontTool* _tmp70_;
				const gchar* _tmp71_;
				BirdFontLabelTool* _tmp72_;
				const gchar* _tmp73_;
				_tmp68_ = t;
				_tmp69_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, BIRD_FONT_TYPE_LABEL_TOOL, BirdFontLabelTool));
				lt = _tmp69_;
				_tmp70_ = t;
				_tmp71_ = theme_in_use;
				_tmp72_ = lt;
				_tmp73_ = _tmp72_->data;
				bird_font_tool_set_selected (_tmp70_, g_strcmp0 (_tmp71_, _tmp73_) == 0);
				_g_object_unref0 (lt);
			}
			_g_object_unref0 (t);
		}
	}
	_tmp74_ = bird_font_file_tools_expanders;
	_tmp75_ = _data16_->font_name;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp74_, _tmp75_);
	_tmp76_ = bird_font_file_tools_expanders;
	_tmp77_ = _data16_->file_tools;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp76_, _tmp77_);
	_tmp78_ = bird_font_file_tools_expanders;
	_tmp79_ = _data16_->themes;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp78_, _tmp79_);
	_g_free0 (theme_in_use);
	_g_object_unref0 (settings);
	_g_object_unref0 (save_font);
	_g_object_unref0 (open_font);
	_g_object_unref0 (new_font);
	block16_data_unref (_data16_);
	_data16_ = NULL;
	return self;
}

BirdFontFileTools*
bird_font_file_tools_new (void)
{
	return bird_font_file_tools_construct (BIRD_FONT_TYPE_FILE_TOOLS);
}

static GeeArrayList*
bird_font_file_tools_real_get_displays (BirdFontToolCollection* base)
{
	BirdFontFileTools * self;
	GeeArrayList* d = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* result;
	self = (BirdFontFileTools*) base;
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	d = _tmp0_;
	result = d;
	return result;
}

static GeeArrayList*
bird_font_file_tools_real_get_expanders (BirdFontToolCollection* base)
{
	BirdFontFileTools * self;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* result;
	self = (BirdFontFileTools*) base;
	_tmp0_ = bird_font_file_tools_expanders;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
bird_font_file_tools_class_init (BirdFontFileToolsClass * klass,
                                 gpointer klass_data)
{
	bird_font_file_tools_parent_class = g_type_class_peek_parent (klass);
	((BirdFontToolCollectionClass *) klass)->get_displays = (GeeArrayList* (*) (BirdFontToolCollection*)) bird_font_file_tools_real_get_displays;
	((BirdFontToolCollectionClass *) klass)->get_expanders = (GeeArrayList* (*) (BirdFontToolCollection*)) bird_font_file_tools_real_get_expanders;
	G_OBJECT_CLASS (klass)->finalize = bird_font_file_tools_finalize;
}

static void
bird_font_file_tools_instance_init (BirdFontFileTools * self,
                                    gpointer klass)
{
}

static void
bird_font_file_tools_finalize (GObject * obj)
{
	BirdFontFileTools * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_FILE_TOOLS, BirdFontFileTools);
	G_OBJECT_CLASS (bird_font_file_tools_parent_class)->finalize (obj);
}

static GType
bird_font_file_tools_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontFileToolsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_file_tools_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontFileTools), 0, (GInstanceInitFunc) bird_font_file_tools_instance_init, NULL };
	GType bird_font_file_tools_type_id;
	bird_font_file_tools_type_id = g_type_register_static (BIRD_FONT_TYPE_TOOL_COLLECTION, "BirdFontFileTools", &g_define_type_info, 0);
	return bird_font_file_tools_type_id;
}

GType
bird_font_file_tools_get_type (void)
{
	static volatile gsize bird_font_file_tools_type_id__once = 0;
	if (g_once_init_enter (&bird_font_file_tools_type_id__once)) {
		GType bird_font_file_tools_type_id;
		bird_font_file_tools_type_id = bird_font_file_tools_get_type_once ();
		g_once_init_leave (&bird_font_file_tools_type_id__once, bird_font_file_tools_type_id);
	}
	return bird_font_file_tools_type_id__once;
}

