/* ItemLabelChild.c generated by valac 0.56.19, the Vala compiler
 * generated from ItemLabelChild.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 "planify.h"
#include <glib.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <adwaita.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  {
	WIDGETS_ITEM_LABEL_CHILD_0_PROPERTY,
	WIDGETS_ITEM_LABEL_CHILD_LABEL_PROPERTY,
	WIDGETS_ITEM_LABEL_CHILD_CLICKABLE_PROPERTY,
	WIDGETS_ITEM_LABEL_CHILD_NUM_PROPERTIES
};
static GParamSpec* widgets_item_label_child_properties[WIDGETS_ITEM_LABEL_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))

struct _WidgetsItemLabelChildPrivate {
	ObjectsLabel* _label;
	gboolean _clickable;
	GtkLabel* name_label;
	GtkRevealer* main_revealer;
	GeeHashMap* signal_map;
};

static gint WidgetsItemLabelChild_private_offset;
static gpointer widgets_item_label_child_parent_class = NULL;

static gboolean __lambda97_ (WidgetsItemLabelChild* self);
static gboolean ___lambda97__gsource_func (gpointer self);
static GObject * widgets_item_label_child_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties);
static gboolean _widgets_item_label_child___lambda98_ (WidgetsItemLabelChild* self);
static gboolean __widgets_item_label_child___lambda98__gsource_func (gpointer self);
static void _widgets_item_label_child___lambda99_ (WidgetsItemLabelChild* self);
static void __widgets_item_label_child___lambda99__objects_base_object_deleted (ObjectsBaseObject* _sender,
                                                                         gpointer self);
static void _widgets_item_label_child_update_request_objects_base_object_updated (ObjectsBaseObject* _sender,
                                                                           const gchar* update_id,
                                                                           gpointer self);
static void _widgets_item_label_child___lambda100_ (WidgetsItemLabelChild* self);
static void __widgets_item_label_child___lambda100__gtk_widget_destroy (GtkWidget* _sender,
                                                                 gpointer self);
static void widgets_item_label_child_finalize (GObject * obj);
static GType widgets_item_label_child_get_type_once (void);
static void _vala_widgets_item_label_child_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_widgets_item_label_child_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
widgets_item_label_child_get_instance_private (WidgetsItemLabelChild* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsItemLabelChild_private_offset);
}

WidgetsItemLabelChild*
widgets_item_label_child_construct (GType object_type,
                                    ObjectsLabel* label)
{
	WidgetsItemLabelChild * self = NULL;
	g_return_val_if_fail (label != NULL, NULL);
	self = (WidgetsItemLabelChild*) g_object_new (object_type, "label", label, "halign", GTK_ALIGN_START, NULL);
	return self;
}

WidgetsItemLabelChild*
widgets_item_label_child_new (ObjectsLabel* label)
{
	return widgets_item_label_child_construct (WIDGETS_TYPE_ITEM_LABEL_CHILD, label);
}

void
widgets_item_label_child_update_request (WidgetsItemLabelChild* self)
{
	GtkLabel* _tmp0_;
	ObjectsLabel* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	Util* _tmp4_;
	Util* _tmp5_;
	Util* _tmp6_;
	Util* _tmp7_;
	ObjectsLabel* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->name_label;
	_tmp1_ = self->priv->_label;
	_tmp2_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	gtk_label_set_label (_tmp0_, _tmp3_);
	_tmp4_ = util_get_default ();
	_tmp5_ = _tmp4_;
	_tmp6_ = util_get_default ();
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->_label;
	_tmp9_ = objects_base_object_get_color ((ObjectsBaseObject*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = util_get_color (_tmp7_, _tmp10_);
	_tmp12_ = _tmp11_;
	util_set_widget_color (_tmp5_, _tmp12_, (GtkWidget*) self);
	_g_free0 (_tmp12_);
	_g_object_unref0 (_tmp7_);
	_g_object_unref0 (_tmp5_);
}

static gboolean
__lambda97_ (WidgetsItemLabelChild* self)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean result;
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gtk_box_get_type ())) {
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		_tmp2_ = gtk_widget_get_parent ((GtkWidget*) self);
		_tmp3_ = _tmp2_;
		gtk_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_box_get_type (), GtkBox), (GtkWidget*) self);
	} else {
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		_tmp4_ = gtk_widget_get_parent ((GtkWidget*) self);
		_tmp5_ = _tmp4_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, adw_wrap_box_get_type ())) {
			GtkWidget* _tmp6_;
			GtkWidget* _tmp7_;
			_tmp6_ = gtk_widget_get_parent ((GtkWidget*) self);
			_tmp7_ = _tmp6_;
			adw_wrap_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, adw_wrap_box_get_type (), AdwWrapBox), (GtkWidget*) self);
		}
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda97__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda97_ ((WidgetsItemLabelChild*) self);
	return result;
}

void
widgets_item_label_child_hide_destroy (WidgetsItemLabelChild* 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_, ___lambda97__gsource_func, g_object_ref (self), g_object_unref);
}

void
widgets_item_label_child_clean_up (WidgetsItemLabelChild* self)
{
	GeeHashMap* _tmp15_;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->signal_map;
		_tmp1_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_entry_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeMapEntry* _tmp9_;
			gconstpointer _tmp10_;
			gconstpointer _tmp11_;
			GeeMapEntry* _tmp12_;
			gconstpointer _tmp13_;
			gconstpointer _tmp14_;
			_tmp6_ = _entry_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _entry_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			entry = (GeeMapEntry*) _tmp8_;
			_tmp9_ = entry;
			_tmp10_ = gee_map_entry_get_value (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = entry;
			_tmp13_ = gee_map_entry_get_key (_tmp12_);
			_tmp14_ = _tmp13_;
			g_signal_handler_disconnect ((GObject*) _tmp11_, (gulong) ((guintptr) _tmp14_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp15_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp15_);
}

ObjectsLabel*
widgets_item_label_child_get_label (WidgetsItemLabelChild* self)
{
	ObjectsLabel* result;
	ObjectsLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

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

static void
widgets_item_label_child_set_label (WidgetsItemLabelChild* self,
                                    ObjectsLabel* value)
{
	ObjectsLabel* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_item_label_child_get_label (self);
	if (old_value != value) {
		ObjectsLabel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_item_label_child_properties[WIDGETS_ITEM_LABEL_CHILD_LABEL_PROPERTY]);
	}
}

gboolean
widgets_item_label_child_get_clickable (WidgetsItemLabelChild* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_clickable;
	return result;
}

void
widgets_item_label_child_set_clickable (WidgetsItemLabelChild* self,
                                        gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_clickable = value;
	gtk_widget_set_can_focus ((GtkWidget*) self, value);
	gtk_widget_set_can_target ((GtkWidget*) self, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_item_label_child_properties[WIDGETS_ITEM_LABEL_CHILD_CLICKABLE_PROPERTY]);
}

static gboolean
_widgets_item_label_child___lambda98_ (WidgetsItemLabelChild* 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_item_label_child___lambda98__gsource_func (gpointer self)
{
	gboolean result;
	result = _widgets_item_label_child___lambda98_ ((WidgetsItemLabelChild*) self);
	return result;
}

static void
_widgets_item_label_child___lambda99_ (WidgetsItemLabelChild* self)
{
	widgets_item_label_child_hide_destroy (self);
}

static void
__widgets_item_label_child___lambda99__objects_base_object_deleted (ObjectsBaseObject* _sender,
                                                                    gpointer self)
{
	_widgets_item_label_child___lambda99_ ((WidgetsItemLabelChild*) self);
}

static void
_widgets_item_label_child_update_request_objects_base_object_updated (ObjectsBaseObject* _sender,
                                                                      const gchar* update_id,
                                                                      gpointer self)
{
	widgets_item_label_child_update_request ((WidgetsItemLabelChild*) self);
}

static void
_widgets_item_label_child___lambda100_ (WidgetsItemLabelChild* self)
{
	widgets_item_label_child_clean_up (self);
}

static void
__widgets_item_label_child___lambda100__gtk_widget_destroy (GtkWidget* _sender,
                                                            gpointer self)
{
	_widgets_item_label_child___lambda100_ ((WidgetsItemLabelChild*) self);
}

static GObject *
widgets_item_label_child_constructor (GType type,
                                      guint n_construct_properties,
                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsItemLabelChild * self;
	GtkLabel* _tmp0_ = NULL;
	GtkLabel* _tmp1_;
	AdwBin* label_container = NULL;
	GtkLabel* _tmp2_;
	GtkWidget* _tmp3_;
	AdwBin* _tmp4_ = NULL;
	AdwBin* _tmp5_;
	GtkWidget* _tmp6_;
	GtkRevealer* _tmp7_ = NULL;
	GtkRevealer* _tmp8_;
	GtkRevealer* _tmp9_;
	guint _tmp10_;
	guint _tmp11_;
	GeeHashMap* _tmp12_;
	ObjectsLabel* _tmp13_;
	gulong _tmp14_;
	ObjectsLabel* _tmp15_;
	GeeHashMap* _tmp16_;
	ObjectsLabel* _tmp17_;
	gulong _tmp18_;
	ObjectsLabel* _tmp19_;
	parent_class = G_OBJECT_CLASS (widgets_item_label_child_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_ITEM_LABEL_CHILD, WidgetsItemLabelChild);
	_tmp0_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->name_label);
	self->priv->name_label = _tmp0_;
	_tmp1_ = self->priv->name_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "caption");
	_tmp2_ = self->priv->name_label;
	_tmp3_ = _g_object_ref0 ((GtkWidget*) _tmp2_);
	_tmp4_ = (AdwBin*) adw_bin_new ();
	adw_bin_set_child (_tmp4_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	label_container = _tmp4_;
	_tmp5_ = label_container;
	_tmp6_ = _g_object_ref0 ((GtkWidget*) _tmp5_);
	_tmp7_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp7_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	gtk_revealer_set_child (_tmp7_, _tmp6_);
	_g_object_unref0 (_tmp6_);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp7_;
	_tmp8_ = self->priv->main_revealer;
	gtk_button_set_child ((GtkButton*) self, (GtkWidget*) _tmp8_);
	gtk_widget_add_css_class ((GtkWidget*) self, "item-label-child");
	widgets_item_label_child_update_request (self);
	_tmp9_ = self->priv->main_revealer;
	_tmp10_ = gtk_revealer_get_transition_duration (_tmp9_);
	_tmp11_ = _tmp10_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp11_, __widgets_item_label_child___lambda98__gsource_func, g_object_ref (self), g_object_unref);
	_tmp12_ = self->priv->signal_map;
	_tmp13_ = self->priv->_label;
	_tmp14_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp13_, "deleted", (GCallback) __widgets_item_label_child___lambda99__objects_base_object_deleted, self, 0);
	_tmp15_ = self->priv->_label;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp12_, (gpointer) ((guintptr) _tmp14_), (GObject*) _tmp15_);
	_tmp16_ = self->priv->signal_map;
	_tmp17_ = self->priv->_label;
	_tmp18_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp17_, "updated", (GCallback) _widgets_item_label_child_update_request_objects_base_object_updated, self, 0);
	_tmp19_ = self->priv->_label;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, (gpointer) ((guintptr) _tmp18_), (GObject*) _tmp19_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __widgets_item_label_child___lambda100__gtk_widget_destroy, self, 0);
	_g_object_unref0 (label_container);
	return obj;
}

static void
widgets_item_label_child_class_init (WidgetsItemLabelChildClass * klass,
                                     gpointer klass_data)
{
	widgets_item_label_child_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsItemLabelChild_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_item_label_child_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_item_label_child_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_item_label_child_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_item_label_child_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_ITEM_LABEL_CHILD_LABEL_PROPERTY, widgets_item_label_child_properties[WIDGETS_ITEM_LABEL_CHILD_LABEL_PROPERTY] = g_param_spec_object ("label", "label", "label", OBJECTS_TYPE_LABEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_ITEM_LABEL_CHILD_CLICKABLE_PROPERTY, widgets_item_label_child_properties[WIDGETS_ITEM_LABEL_CHILD_CLICKABLE_PROPERTY] = g_param_spec_boolean ("clickable", "clickable", "clickable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
widgets_item_label_child_instance_init (WidgetsItemLabelChild * self,
                                        gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = widgets_item_label_child_get_instance_private (self);
	self->priv->_clickable = TRUE;
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp0_;
}

static void
widgets_item_label_child_finalize (GObject * obj)
{
	WidgetsItemLabelChild * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_ITEM_LABEL_CHILD, WidgetsItemLabelChild);
	g_debug ("ItemLabelChild.vala:48: Destroying - Widgets.ItemLabelChild\n");
	_g_object_unref0 (self->priv->_label);
	_g_object_unref0 (self->priv->name_label);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->priv->signal_map);
	G_OBJECT_CLASS (widgets_item_label_child_parent_class)->finalize (obj);
}

static GType
widgets_item_label_child_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsItemLabelChildClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_item_label_child_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsItemLabelChild), 0, (GInstanceInitFunc) widgets_item_label_child_instance_init, NULL };
	GType widgets_item_label_child_type_id;
	widgets_item_label_child_type_id = g_type_register_static (gtk_button_get_type (), "WidgetsItemLabelChild", &g_define_type_info, 0);
	WidgetsItemLabelChild_private_offset = g_type_add_instance_private (widgets_item_label_child_type_id, sizeof (WidgetsItemLabelChildPrivate));
	return widgets_item_label_child_type_id;
}

GType
widgets_item_label_child_get_type (void)
{
	static volatile gsize widgets_item_label_child_type_id__once = 0;
	if (g_once_init_enter (&widgets_item_label_child_type_id__once)) {
		GType widgets_item_label_child_type_id;
		widgets_item_label_child_type_id = widgets_item_label_child_get_type_once ();
		g_once_init_leave (&widgets_item_label_child_type_id__once, widgets_item_label_child_type_id);
	}
	return widgets_item_label_child_type_id__once;
}

static void
_vala_widgets_item_label_child_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	WidgetsItemLabelChild * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_ITEM_LABEL_CHILD, WidgetsItemLabelChild);
	switch (property_id) {
		case WIDGETS_ITEM_LABEL_CHILD_LABEL_PROPERTY:
		g_value_set_object (value, widgets_item_label_child_get_label (self));
		break;
		case WIDGETS_ITEM_LABEL_CHILD_CLICKABLE_PROPERTY:
		g_value_set_boolean (value, widgets_item_label_child_get_clickable (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_item_label_child_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	WidgetsItemLabelChild * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_ITEM_LABEL_CHILD, WidgetsItemLabelChild);
	switch (property_id) {
		case WIDGETS_ITEM_LABEL_CHILD_LABEL_PROPERTY:
		widgets_item_label_child_set_label (self, g_value_get_object (value));
		break;
		case WIDGETS_ITEM_LABEL_CHILD_CLICKABLE_PROPERTY:
		widgets_item_label_child_set_clickable (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

