/* ProjectContainerRow.c generated by valac 0.56.19, the Vala compiler
 * generated from ProjectContainerRow.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>

#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 LAYOUTS_TYPE_PROJECT_CONTAINER_ROW (layouts_project_container_row_get_type ())
#define LAYOUTS_PROJECT_CONTAINER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_PROJECT_CONTAINER_ROW, LayoutsProjectContainerRow))
#define LAYOUTS_PROJECT_CONTAINER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_PROJECT_CONTAINER_ROW, LayoutsProjectContainerRowClass))
#define LAYOUTS_IS_PROJECT_CONTAINER_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_PROJECT_CONTAINER_ROW))
#define LAYOUTS_IS_PROJECT_CONTAINER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_PROJECT_CONTAINER_ROW))
#define LAYOUTS_PROJECT_CONTAINER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_PROJECT_CONTAINER_ROW, LayoutsProjectContainerRowClass))

typedef struct _LayoutsProjectContainerRow LayoutsProjectContainerRow;
typedef struct _LayoutsProjectContainerRowClass LayoutsProjectContainerRowClass;
typedef struct _LayoutsProjectContainerRowPrivate LayoutsProjectContainerRowPrivate;
enum  {
	LAYOUTS_PROJECT_CONTAINER_ROW_0_PROPERTY,
	LAYOUTS_PROJECT_CONTAINER_ROW_PROJECT_PROPERTY,
	LAYOUTS_PROJECT_CONTAINER_ROW_SHOW_SUBPROJECTS_PROPERTY,
	LAYOUTS_PROJECT_CONTAINER_ROW_DRAG_N_DROP_PROPERTY,
	LAYOUTS_PROJECT_CONTAINER_ROW_NUM_PROPERTIES
};
static GParamSpec* layouts_project_container_row_properties[LAYOUTS_PROJECT_CONTAINER_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define LAYOUTS_TYPE_PROJECT_ROW (layouts_project_row_get_type ())
#define LAYOUTS_PROJECT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow))
#define LAYOUTS_PROJECT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRowClass))
#define LAYOUTS_IS_PROJECT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_PROJECT_ROW))
#define LAYOUTS_IS_PROJECT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_PROJECT_ROW))
#define LAYOUTS_PROJECT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRowClass))

typedef struct _LayoutsProjectRow LayoutsProjectRow;
typedef struct _LayoutsProjectRowClass LayoutsProjectRowClass;

struct _LayoutsProjectContainerRow {
	GtkListBoxRow parent_instance;
	LayoutsProjectContainerRowPrivate * priv;
};

struct _LayoutsProjectContainerRowClass {
	GtkListBoxRowClass parent_class;
};

struct _LayoutsProjectContainerRowPrivate {
	ObjectsProject* _project;
	gboolean _show_subprojects;
	gboolean _drag_n_drop;
	GtkRevealer* main_revealer;
};

static gint LayoutsProjectContainerRow_private_offset;
static gpointer layouts_project_container_row_parent_class = NULL;

VALA_EXTERN GType layouts_project_container_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsProjectContainerRow, g_object_unref)
VALA_EXTERN LayoutsProjectContainerRow* layouts_project_container_row_new (ObjectsProject* project,
                                                               gboolean show_subprojects,
                                                               gboolean drag_n_drop);
VALA_EXTERN LayoutsProjectContainerRow* layouts_project_container_row_construct (GType object_type,
                                                                     ObjectsProject* project,
                                                                     gboolean show_subprojects,
                                                                     gboolean drag_n_drop);
VALA_EXTERN void layouts_project_container_row_hide_destroy (LayoutsProjectContainerRow* self);
static gboolean __lambda989_ (LayoutsProjectContainerRow* self);
static gboolean ___lambda989__gsource_func (gpointer self);
VALA_EXTERN ObjectsProject* layouts_project_container_row_get_project (LayoutsProjectContainerRow* self);
static void layouts_project_container_row_set_project (LayoutsProjectContainerRow* self,
                                                ObjectsProject* value);
VALA_EXTERN gboolean layouts_project_container_row_get_show_subprojects (LayoutsProjectContainerRow* self);
static void layouts_project_container_row_set_show_subprojects (LayoutsProjectContainerRow* self,
                                                         gboolean value);
VALA_EXTERN gboolean layouts_project_container_row_get_drag_n_drop (LayoutsProjectContainerRow* self);
static void layouts_project_container_row_set_drag_n_drop (LayoutsProjectContainerRow* self,
                                                    gboolean value);
static GObject * layouts_project_container_row_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties);
VALA_EXTERN LayoutsProjectRow* layouts_project_row_new (ObjectsProject* project,
                                            gboolean show_subprojects,
                                            gboolean drag_n_drop);
VALA_EXTERN LayoutsProjectRow* layouts_project_row_construct (GType object_type,
                                                  ObjectsProject* project,
                                                  gboolean show_subprojects,
                                                  gboolean drag_n_drop);
VALA_EXTERN GType layouts_project_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsProjectRow, g_object_unref)
static gboolean _layouts_project_container_row___lambda990_ (LayoutsProjectContainerRow* self);
static gboolean __layouts_project_container_row___lambda990__gsource_func (gpointer self);
static void layouts_project_container_row_finalize (GObject * obj);
static GType layouts_project_container_row_get_type_once (void);
static void _vala_layouts_project_container_row_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_layouts_project_container_row_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
layouts_project_container_row_get_instance_private (LayoutsProjectContainerRow* self)
{
	return G_STRUCT_MEMBER_P (self, LayoutsProjectContainerRow_private_offset);
}

LayoutsProjectContainerRow*
layouts_project_container_row_construct (GType object_type,
                                         ObjectsProject* project,
                                         gboolean show_subprojects,
                                         gboolean drag_n_drop)
{
	LayoutsProjectContainerRow * self = NULL;
	g_return_val_if_fail (project != NULL, NULL);
	self = (LayoutsProjectContainerRow*) g_object_new (object_type, "project", project, "show-subprojects", show_subprojects, "drag-n-drop", drag_n_drop, NULL);
	return self;
}

LayoutsProjectContainerRow*
layouts_project_container_row_new (ObjectsProject* project,
                                   gboolean show_subprojects,
                                   gboolean drag_n_drop)
{
	return layouts_project_container_row_construct (LAYOUTS_TYPE_PROJECT_CONTAINER_ROW, project, show_subprojects, drag_n_drop);
}

static gboolean
__lambda989_ (LayoutsProjectContainerRow* self)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean result;
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	gtk_list_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_list_box_get_type (), GtkListBox), (GtkWidget*) self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda989__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda989_ ((LayoutsProjectContainerRow*) self);
	return result;
}

void
layouts_project_container_row_hide_destroy (LayoutsProjectContainerRow* 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_, ___lambda989__gsource_func, g_object_ref (self), g_object_unref);
}

ObjectsProject*
layouts_project_container_row_get_project (LayoutsProjectContainerRow* self)
{
	ObjectsProject* result;
	ObjectsProject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_project;
	result = _tmp0_;
	return result;
}

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

static void
layouts_project_container_row_set_project (LayoutsProjectContainerRow* self,
                                           ObjectsProject* value)
{
	ObjectsProject* old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_project_container_row_get_project (self);
	if (old_value != value) {
		ObjectsProject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_project);
		self->priv->_project = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, layouts_project_container_row_properties[LAYOUTS_PROJECT_CONTAINER_ROW_PROJECT_PROPERTY]);
	}
}

gboolean
layouts_project_container_row_get_show_subprojects (LayoutsProjectContainerRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_subprojects;
	return result;
}

static void
layouts_project_container_row_set_show_subprojects (LayoutsProjectContainerRow* self,
                                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_project_container_row_get_show_subprojects (self);
	if (old_value != value) {
		self->priv->_show_subprojects = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_project_container_row_properties[LAYOUTS_PROJECT_CONTAINER_ROW_SHOW_SUBPROJECTS_PROPERTY]);
	}
}

gboolean
layouts_project_container_row_get_drag_n_drop (LayoutsProjectContainerRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_drag_n_drop;
	return result;
}

static void
layouts_project_container_row_set_drag_n_drop (LayoutsProjectContainerRow* self,
                                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_project_container_row_get_drag_n_drop (self);
	if (old_value != value) {
		self->priv->_drag_n_drop = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_project_container_row_properties[LAYOUTS_PROJECT_CONTAINER_ROW_DRAG_N_DROP_PROPERTY]);
	}
}

static gboolean
_layouts_project_container_row___lambda990_ (LayoutsProjectContainerRow* 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
__layouts_project_container_row___lambda990__gsource_func (gpointer self)
{
	gboolean result;
	result = _layouts_project_container_row___lambda990_ ((LayoutsProjectContainerRow*) self);
	return result;
}

static GObject *
layouts_project_container_row_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	LayoutsProjectContainerRow * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	GtkListBox* listbox = NULL;
	gchar* _tmp4_;
	gchar** _tmp5_;
	GtkListBox* _tmp6_ = NULL;
	GtkListBox* _tmp7_;
	ObjectsProject* _tmp8_;
	gboolean _tmp9_;
	LayoutsProjectRow* _tmp10_;
	LayoutsProjectRow* _tmp11_;
	GtkListBox* _tmp12_;
	GtkWidget* _tmp13_;
	GtkRevealer* _tmp14_ = NULL;
	GtkRevealer* _tmp15_;
	GtkRevealer* _tmp16_;
	guint _tmp17_;
	guint _tmp18_;
	parent_class = G_OBJECT_CLASS (layouts_project_container_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_PROJECT_CONTAINER_ROW, LayoutsProjectContainerRow);
	_tmp0_ = g_strdup ("no-selectable");
	_tmp1_ = g_strdup ("no-padding");
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 2;
	gtk_widget_set_css_classes ((GtkWidget*) self, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	_tmp4_ = g_strdup ("listbox-background");
	_tmp5_ = g_new0 (gchar*, 1 + 1);
	_tmp5_[0] = _tmp4_;
	_tmp6_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp6_, _tmp5_);
	_tmp5_ = (_vala_array_free (_tmp5_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp6_);
	listbox = _tmp6_;
	_tmp7_ = listbox;
	_tmp8_ = self->priv->_project;
	_tmp9_ = self->priv->_drag_n_drop;
	_tmp10_ = layouts_project_row_new (_tmp8_, _tmp9_, TRUE);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	gtk_list_box_append (_tmp7_, (GtkWidget*) _tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = listbox;
	_tmp13_ = _g_object_ref0 ((GtkWidget*) _tmp12_);
	_tmp14_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp14_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp14_, _tmp13_);
	_g_object_unref0 (_tmp13_);
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp14_;
	_tmp15_ = self->priv->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp15_);
	_tmp16_ = self->priv->main_revealer;
	_tmp17_ = gtk_revealer_get_transition_duration (_tmp16_);
	_tmp18_ = _tmp17_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp18_, __layouts_project_container_row___lambda990__gsource_func, g_object_ref (self), g_object_unref);
	_g_object_unref0 (listbox);
	return obj;
}

static void
layouts_project_container_row_class_init (LayoutsProjectContainerRowClass * klass,
                                          gpointer klass_data)
{
	layouts_project_container_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LayoutsProjectContainerRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_layouts_project_container_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_layouts_project_container_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = layouts_project_container_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = layouts_project_container_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_PROJECT_CONTAINER_ROW_PROJECT_PROPERTY, layouts_project_container_row_properties[LAYOUTS_PROJECT_CONTAINER_ROW_PROJECT_PROPERTY] = g_param_spec_object ("project", "project", "project", OBJECTS_TYPE_PROJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_PROJECT_CONTAINER_ROW_SHOW_SUBPROJECTS_PROPERTY, layouts_project_container_row_properties[LAYOUTS_PROJECT_CONTAINER_ROW_SHOW_SUBPROJECTS_PROPERTY] = g_param_spec_boolean ("show-subprojects", "show-subprojects", "show-subprojects", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_PROJECT_CONTAINER_ROW_DRAG_N_DROP_PROPERTY, layouts_project_container_row_properties[LAYOUTS_PROJECT_CONTAINER_ROW_DRAG_N_DROP_PROPERTY] = g_param_spec_boolean ("drag-n-drop", "drag-n-drop", "drag-n-drop", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
layouts_project_container_row_instance_init (LayoutsProjectContainerRow * self,
                                             gpointer klass)
{
	self->priv = layouts_project_container_row_get_instance_private (self);
}

static void
layouts_project_container_row_finalize (GObject * obj)
{
	LayoutsProjectContainerRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_PROJECT_CONTAINER_ROW, LayoutsProjectContainerRow);
	g_debug ("ProjectContainerRow.vala:38: Destroying Layouts.ProjectContainerRow\n");
	_g_object_unref0 (self->priv->_project);
	_g_object_unref0 (self->priv->main_revealer);
	G_OBJECT_CLASS (layouts_project_container_row_parent_class)->finalize (obj);
}

static GType
layouts_project_container_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LayoutsProjectContainerRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) layouts_project_container_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LayoutsProjectContainerRow), 0, (GInstanceInitFunc) layouts_project_container_row_instance_init, NULL };
	GType layouts_project_container_row_type_id;
	layouts_project_container_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "LayoutsProjectContainerRow", &g_define_type_info, 0);
	LayoutsProjectContainerRow_private_offset = g_type_add_instance_private (layouts_project_container_row_type_id, sizeof (LayoutsProjectContainerRowPrivate));
	return layouts_project_container_row_type_id;
}

GType
layouts_project_container_row_get_type (void)
{
	static volatile gsize layouts_project_container_row_type_id__once = 0;
	if (g_once_init_enter (&layouts_project_container_row_type_id__once)) {
		GType layouts_project_container_row_type_id;
		layouts_project_container_row_type_id = layouts_project_container_row_get_type_once ();
		g_once_init_leave (&layouts_project_container_row_type_id__once, layouts_project_container_row_type_id);
	}
	return layouts_project_container_row_type_id__once;
}

static void
_vala_layouts_project_container_row_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	LayoutsProjectContainerRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LAYOUTS_TYPE_PROJECT_CONTAINER_ROW, LayoutsProjectContainerRow);
	switch (property_id) {
		case LAYOUTS_PROJECT_CONTAINER_ROW_PROJECT_PROPERTY:
		g_value_set_object (value, layouts_project_container_row_get_project (self));
		break;
		case LAYOUTS_PROJECT_CONTAINER_ROW_SHOW_SUBPROJECTS_PROPERTY:
		g_value_set_boolean (value, layouts_project_container_row_get_show_subprojects (self));
		break;
		case LAYOUTS_PROJECT_CONTAINER_ROW_DRAG_N_DROP_PROPERTY:
		g_value_set_boolean (value, layouts_project_container_row_get_drag_n_drop (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_layouts_project_container_row_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	LayoutsProjectContainerRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LAYOUTS_TYPE_PROJECT_CONTAINER_ROW, LayoutsProjectContainerRow);
	switch (property_id) {
		case LAYOUTS_PROJECT_CONTAINER_ROW_PROJECT_PROPERTY:
		layouts_project_container_row_set_project (self, g_value_get_object (value));
		break;
		case LAYOUTS_PROJECT_CONTAINER_ROW_SHOW_SUBPROJECTS_PROPERTY:
		layouts_project_container_row_set_show_subprojects (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_PROJECT_CONTAINER_ROW_DRAG_N_DROP_PROPERTY:
		layouts_project_container_row_set_drag_n_drop (self, g_value_get_boolean (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);
}

