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

/*
 * Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program 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
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA
 *
 * Authored by: Alain M. <alainmh23@gmail.com>
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include "planify.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD (widgets_filter_flow_box_child_get_type ())
#define WIDGETS_FILTER_FLOW_BOX_CHILD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, WidgetsFilterFlowBoxChild))
#define WIDGETS_FILTER_FLOW_BOX_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, WidgetsFilterFlowBoxChildClass))
#define WIDGETS_IS_FILTER_FLOW_BOX_CHILD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD))
#define WIDGETS_IS_FILTER_FLOW_BOX_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD))
#define WIDGETS_FILTER_FLOW_BOX_CHILD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, WidgetsFilterFlowBoxChildClass))

typedef struct _WidgetsFilterFlowBoxChild WidgetsFilterFlowBoxChild;
typedef struct _WidgetsFilterFlowBoxChildClass WidgetsFilterFlowBoxChildClass;
typedef struct _WidgetsFilterFlowBoxChildPrivate WidgetsFilterFlowBoxChildPrivate;
enum  {
	WIDGETS_FILTER_FLOW_BOX_CHILD_0_PROPERTY,
	WIDGETS_FILTER_FLOW_BOX_CHILD_FILTER_PROPERTY,
	WIDGETS_FILTER_FLOW_BOX_CHILD_NUM_PROPERTIES
};
static GParamSpec* widgets_filter_flow_box_child_properties[WIDGETS_FILTER_FLOW_BOX_CHILD_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	WIDGETS_FILTER_FLOW_BOX_CHILD_REMOVE_FILTER_SIGNAL,
	WIDGETS_FILTER_FLOW_BOX_CHILD_NUM_SIGNALS
};
static guint widgets_filter_flow_box_child_signals[WIDGETS_FILTER_FLOW_BOX_CHILD_NUM_SIGNALS] = {0};

struct _WidgetsFilterFlowBoxChild {
	GtkFlowBoxChild parent_instance;
	WidgetsFilterFlowBoxChildPrivate * priv;
};

struct _WidgetsFilterFlowBoxChildClass {
	GtkFlowBoxChildClass parent_class;
};

struct _WidgetsFilterFlowBoxChildPrivate {
	ObjectsFiltersFilterItem* _filter;
	GtkImage* image;
	GtkLabel* title_label;
	GtkLabel* value_label;
	GtkRevealer* main_revealer;
};

static gint WidgetsFilterFlowBoxChild_private_offset;
static gpointer widgets_filter_flow_box_child_parent_class = NULL;

VALA_EXTERN GType widgets_filter_flow_box_child_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsFilterFlowBoxChild, g_object_unref)
VALA_EXTERN WidgetsFilterFlowBoxChild* widgets_filter_flow_box_child_new (ObjectsFiltersFilterItem* filter);
VALA_EXTERN WidgetsFilterFlowBoxChild* widgets_filter_flow_box_child_construct (GType object_type,
                                                                    ObjectsFiltersFilterItem* filter);
VALA_EXTERN void widgets_filter_flow_box_child_update_request (WidgetsFilterFlowBoxChild* self);
VALA_EXTERN ObjectsFiltersFilterItem* widgets_filter_flow_box_child_get_filter (WidgetsFilterFlowBoxChild* self);
VALA_EXTERN void widgets_filter_flow_box_child_hide_destroy (WidgetsFilterFlowBoxChild* self);
static gboolean __lambda600_ (WidgetsFilterFlowBoxChild* self);
static gboolean ___lambda600__gsource_func (gpointer self);
static void widgets_filter_flow_box_child_set_filter (WidgetsFilterFlowBoxChild* self,
                                               ObjectsFiltersFilterItem* value);
static GObject * widgets_filter_flow_box_child_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties);
static gboolean _widgets_filter_flow_box_child___lambda601_ (WidgetsFilterFlowBoxChild* self);
static gboolean __widgets_filter_flow_box_child___lambda601__gsource_func (gpointer self);
static void _widgets_filter_flow_box_child___lambda602_ (WidgetsFilterFlowBoxChild* self);
static void __widgets_filter_flow_box_child___lambda602__gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self);
static void widgets_filter_flow_box_child_finalize (GObject * obj);
static GType widgets_filter_flow_box_child_get_type_once (void);
static void _vala_widgets_filter_flow_box_child_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_widgets_filter_flow_box_child_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
widgets_filter_flow_box_child_get_instance_private (WidgetsFilterFlowBoxChild* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsFilterFlowBoxChild_private_offset);
}

WidgetsFilterFlowBoxChild*
widgets_filter_flow_box_child_construct (GType object_type,
                                         ObjectsFiltersFilterItem* filter)
{
	WidgetsFilterFlowBoxChild * self = NULL;
	g_return_val_if_fail (filter != NULL, NULL);
	self = (WidgetsFilterFlowBoxChild*) g_object_new (object_type, "filter", filter, "valign", GTK_ALIGN_START, "halign", GTK_ALIGN_START, NULL);
	return self;
}

WidgetsFilterFlowBoxChild*
widgets_filter_flow_box_child_new (ObjectsFiltersFilterItem* filter)
{
	return widgets_filter_flow_box_child_construct (WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, filter);
}

void
widgets_filter_flow_box_child_update_request (WidgetsFilterFlowBoxChild* self)
{
	GtkImage* _tmp0_;
	ObjectsFiltersFilterItem* _tmp1_;
	FilterItemType _tmp2_;
	FilterItemType _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkLabel* _tmp6_;
	ObjectsFiltersFilterItem* _tmp7_;
	FilterItemType _tmp8_;
	FilterItemType _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	GtkLabel* _tmp12_;
	ObjectsFiltersFilterItem* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->image;
	_tmp1_ = self->priv->_filter;
	_tmp2_ = objects_filters_filter_item_get_filter_type (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = filter_item_type_get_icon (_tmp3_);
	_tmp5_ = _tmp4_;
	g_object_set (_tmp0_, "icon-name", _tmp5_, NULL);
	_g_free0 (_tmp5_);
	_tmp6_ = self->priv->title_label;
	_tmp7_ = self->priv->_filter;
	_tmp8_ = objects_filters_filter_item_get_filter_type (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = filter_item_type_get_title (_tmp9_);
	_tmp11_ = _tmp10_;
	gtk_label_set_label (_tmp6_, _tmp11_);
	_g_free0 (_tmp11_);
	_tmp12_ = self->priv->value_label;
	_tmp13_ = self->priv->_filter;
	_tmp14_ = objects_filters_filter_item_get_name (_tmp13_);
	_tmp15_ = _tmp14_;
	gtk_label_set_label (_tmp12_, _tmp15_);
}

static gboolean
__lambda600_ (WidgetsFilterFlowBoxChild* self)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean result;
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	gtk_flow_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_flow_box_get_type (), GtkFlowBox), (GtkWidget*) self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda600__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda600_ ((WidgetsFilterFlowBoxChild*) self);
	return result;
}

void
widgets_filter_flow_box_child_hide_destroy (WidgetsFilterFlowBoxChild* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->main_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda600__gsource_func, g_object_ref (self), g_object_unref);
}

ObjectsFiltersFilterItem*
widgets_filter_flow_box_child_get_filter (WidgetsFilterFlowBoxChild* self)
{
	ObjectsFiltersFilterItem* result;
	ObjectsFiltersFilterItem* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter;
	result = _tmp0_;
	return result;
}

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

static void
widgets_filter_flow_box_child_set_filter (WidgetsFilterFlowBoxChild* self,
                                          ObjectsFiltersFilterItem* value)
{
	ObjectsFiltersFilterItem* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_filter_flow_box_child_get_filter (self);
	if (old_value != value) {
		ObjectsFiltersFilterItem* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_filter);
		self->priv->_filter = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_filter_flow_box_child_properties[WIDGETS_FILTER_FLOW_BOX_CHILD_FILTER_PROPERTY]);
	}
}

static gboolean
_widgets_filter_flow_box_child___lambda601_ (WidgetsFilterFlowBoxChild* self)
{
	GtkRevealer* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, TRUE);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__widgets_filter_flow_box_child___lambda601__gsource_func (gpointer self)
{
	gboolean result;
	result = _widgets_filter_flow_box_child___lambda601_ ((WidgetsFilterFlowBoxChild*) self);
	return result;
}

static void
_widgets_filter_flow_box_child___lambda602_ (WidgetsFilterFlowBoxChild* self)
{
	ObjectsFiltersFilterItem* _tmp0_;
	_tmp0_ = self->priv->_filter;
	g_signal_emit (self, widgets_filter_flow_box_child_signals[WIDGETS_FILTER_FLOW_BOX_CHILD_REMOVE_FILTER_SIGNAL], 0, _tmp0_);
}

static void
__widgets_filter_flow_box_child___lambda602__gtk_button_clicked (GtkButton* _sender,
                                                                 gpointer self)
{
	_widgets_filter_flow_box_child___lambda602_ ((WidgetsFilterFlowBoxChild*) self);
}

static GObject *
widgets_filter_flow_box_child_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsFilterFlowBoxChild * self;
	GtkImage* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkLabel* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar** _tmp6_;
	GtkLabel* _tmp7_ = NULL;
	GtkButton* close_button = NULL;
	gchar* _tmp8_;
	gchar** _tmp9_;
	GtkButton* _tmp10_ = NULL;
	GtkRevealer* close_revealer = NULL;
	GtkButton* _tmp11_;
	GtkWidget* _tmp12_;
	GtkRevealer* _tmp13_ = NULL;
	GtkGrid* card_grid = NULL;
	GtkGrid* _tmp14_ = NULL;
	GtkGrid* _tmp15_;
	GtkImage* _tmp16_;
	GtkGrid* _tmp17_;
	GtkLabel* _tmp18_;
	GtkGrid* _tmp19_;
	GtkLabel* _tmp20_;
	GtkGrid* _tmp21_;
	GtkRevealer* _tmp22_;
	GtkGrid* _tmp23_;
	GtkWidget* _tmp24_;
	GtkRevealer* _tmp25_ = NULL;
	GtkRevealer* _tmp26_;
	GtkRevealer* _tmp27_;
	guint _tmp28_;
	guint _tmp29_;
	GtkButton* _tmp30_;
	parent_class = G_OBJECT_CLASS (widgets_filter_flow_box_child_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, WidgetsFilterFlowBoxChild);
	gtk_widget_add_css_class ((GtkWidget*) self, "card");
	_tmp0_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->image);
	self->priv->image = _tmp0_;
	_tmp1_ = g_strdup ("title-4");
	_tmp2_ = g_strdup ("caption");
	_tmp3_ = g_new0 (gchar*, 2 + 1);
	_tmp3_[0] = _tmp1_;
	_tmp3_[1] = _tmp2_;
	_tmp4_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->title_label);
	self->priv->title_label = _tmp4_;
	_tmp5_ = g_strdup ("caption");
	_tmp6_ = g_new0 (gchar*, 1 + 1);
	_tmp6_[0] = _tmp5_;
	_tmp7_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_xalign (_tmp7_, (gfloat) 0);
	gtk_label_set_use_markup (_tmp7_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp7_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp6_);
	_tmp6_ = (_vala_array_free (_tmp6_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->value_label);
	self->priv->value_label = _tmp7_;
	_tmp8_ = g_strdup ("flat");
	_tmp9_ = g_new0 (gchar*, 1 + 1);
	_tmp9_[0] = _tmp8_;
	_tmp10_ = (GtkButton*) gtk_button_new_from_icon_name ("cross-large-circle-filled-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp10_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp10_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp10_, _tmp9_);
	_tmp9_ = (_vala_array_free (_tmp9_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp10_);
	close_button = _tmp10_;
	_tmp11_ = close_button;
	_tmp12_ = _g_object_ref0 ((GtkWidget*) _tmp11_);
	_tmp13_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp13_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	gtk_revealer_set_child (_tmp13_, _tmp12_);
	_g_object_unref0 (_tmp12_);
	gtk_revealer_set_reveal_child (_tmp13_, TRUE);
	g_object_ref_sink (_tmp13_);
	close_revealer = _tmp13_;
	_tmp14_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp14_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp14_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp14_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp14_, 3);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp14_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp14_, TRUE);
	g_object_ref_sink (_tmp14_);
	card_grid = _tmp14_;
	_tmp15_ = card_grid;
	_tmp16_ = self->priv->image;
	gtk_grid_attach (_tmp15_, (GtkWidget*) _tmp16_, 0, 0, 1, 2);
	_tmp17_ = card_grid;
	_tmp18_ = self->priv->title_label;
	gtk_grid_attach (_tmp17_, (GtkWidget*) _tmp18_, 1, 0, 1, 1);
	_tmp19_ = card_grid;
	_tmp20_ = self->priv->value_label;
	gtk_grid_attach (_tmp19_, (GtkWidget*) _tmp20_, 1, 1, 1, 1);
	_tmp21_ = card_grid;
	_tmp22_ = close_revealer;
	gtk_grid_attach (_tmp21_, (GtkWidget*) _tmp22_, 2, 0, 1, 2);
	_tmp23_ = card_grid;
	_tmp24_ = _g_object_ref0 ((GtkWidget*) _tmp23_);
	_tmp25_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp25_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	gtk_revealer_set_child (_tmp25_, _tmp24_);
	_g_object_unref0 (_tmp24_);
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp25_;
	_tmp26_ = self->priv->main_revealer;
	gtk_flow_box_child_set_child ((GtkFlowBoxChild*) self, (GtkWidget*) _tmp26_);
	widgets_filter_flow_box_child_update_request (self);
	_tmp27_ = self->priv->main_revealer;
	_tmp28_ = gtk_revealer_get_transition_duration (_tmp27_);
	_tmp29_ = _tmp28_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp29_, __widgets_filter_flow_box_child___lambda601__gsource_func, g_object_ref (self), g_object_unref);
	_tmp30_ = close_button;
	g_signal_connect_object (_tmp30_, "clicked", (GCallback) __widgets_filter_flow_box_child___lambda602__gtk_button_clicked, self, 0);
	_g_object_unref0 (card_grid);
	_g_object_unref0 (close_revealer);
	_g_object_unref0 (close_button);
	return obj;
}

static void
widgets_filter_flow_box_child_class_init (WidgetsFilterFlowBoxChildClass * klass,
                                          gpointer klass_data)
{
	widgets_filter_flow_box_child_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsFilterFlowBoxChild_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_filter_flow_box_child_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_filter_flow_box_child_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_filter_flow_box_child_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_filter_flow_box_child_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_FILTER_FLOW_BOX_CHILD_FILTER_PROPERTY, widgets_filter_flow_box_child_properties[WIDGETS_FILTER_FLOW_BOX_CHILD_FILTER_PROPERTY] = g_param_spec_object ("filter", "filter", "filter", OBJECTS_FILTERS_TYPE_FILTER_ITEM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	widgets_filter_flow_box_child_signals[WIDGETS_FILTER_FLOW_BOX_CHILD_REMOVE_FILTER_SIGNAL] = g_signal_new ("remove-filter", WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, OBJECTS_FILTERS_TYPE_FILTER_ITEM);
}

static void
widgets_filter_flow_box_child_instance_init (WidgetsFilterFlowBoxChild * self,
                                             gpointer klass)
{
	self->priv = widgets_filter_flow_box_child_get_instance_private (self);
}

static void
widgets_filter_flow_box_child_finalize (GObject * obj)
{
	WidgetsFilterFlowBoxChild * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, WidgetsFilterFlowBoxChild);
	g_debug ("FilterFlowBoxChild.vala:41: Destroying - Widgets.FilterFlowBoxChild\n");
	_g_object_unref0 (self->priv->_filter);
	_g_object_unref0 (self->priv->image);
	_g_object_unref0 (self->priv->title_label);
	_g_object_unref0 (self->priv->value_label);
	_g_object_unref0 (self->priv->main_revealer);
	G_OBJECT_CLASS (widgets_filter_flow_box_child_parent_class)->finalize (obj);
}

static GType
widgets_filter_flow_box_child_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsFilterFlowBoxChildClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_filter_flow_box_child_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsFilterFlowBoxChild), 0, (GInstanceInitFunc) widgets_filter_flow_box_child_instance_init, NULL };
	GType widgets_filter_flow_box_child_type_id;
	widgets_filter_flow_box_child_type_id = g_type_register_static (gtk_flow_box_child_get_type (), "WidgetsFilterFlowBoxChild", &g_define_type_info, 0);
	WidgetsFilterFlowBoxChild_private_offset = g_type_add_instance_private (widgets_filter_flow_box_child_type_id, sizeof (WidgetsFilterFlowBoxChildPrivate));
	return widgets_filter_flow_box_child_type_id;
}

GType
widgets_filter_flow_box_child_get_type (void)
{
	static volatile gsize widgets_filter_flow_box_child_type_id__once = 0;
	if (g_once_init_enter (&widgets_filter_flow_box_child_type_id__once)) {
		GType widgets_filter_flow_box_child_type_id;
		widgets_filter_flow_box_child_type_id = widgets_filter_flow_box_child_get_type_once ();
		g_once_init_leave (&widgets_filter_flow_box_child_type_id__once, widgets_filter_flow_box_child_type_id);
	}
	return widgets_filter_flow_box_child_type_id__once;
}

static void
_vala_widgets_filter_flow_box_child_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	WidgetsFilterFlowBoxChild * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, WidgetsFilterFlowBoxChild);
	switch (property_id) {
		case WIDGETS_FILTER_FLOW_BOX_CHILD_FILTER_PROPERTY:
		g_value_set_object (value, widgets_filter_flow_box_child_get_filter (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_filter_flow_box_child_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	WidgetsFilterFlowBoxChild * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_FILTER_FLOW_BOX_CHILD, WidgetsFilterFlowBoxChild);
	switch (property_id) {
		case WIDGETS_FILTER_FLOW_BOX_CHILD_FILTER_PROPERTY:
		widgets_filter_flow_box_child_set_filter (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

