/* EditableLabel.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from EditableLabel.vala, do not modify */

/*
 * Copyright 2016-2024 elementary, Inc. (https://elementary.io)
 * Copyright 2016 Corentin Noël <corentin@elementary.io>
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gdk/gdk.h>
#include <pango/pango.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 TASKS_WIDGETS_TYPE_EDITABLE_LABEL (tasks_widgets_editable_label_get_type ())
#define TASKS_WIDGETS_EDITABLE_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TASKS_WIDGETS_TYPE_EDITABLE_LABEL, TasksWidgetsEditableLabel))
#define TASKS_WIDGETS_EDITABLE_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TASKS_WIDGETS_TYPE_EDITABLE_LABEL, TasksWidgetsEditableLabelClass))
#define TASKS_WIDGETS_IS_EDITABLE_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TASKS_WIDGETS_TYPE_EDITABLE_LABEL))
#define TASKS_WIDGETS_IS_EDITABLE_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TASKS_WIDGETS_TYPE_EDITABLE_LABEL))
#define TASKS_WIDGETS_EDITABLE_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TASKS_WIDGETS_TYPE_EDITABLE_LABEL, TasksWidgetsEditableLabelClass))

typedef struct _TasksWidgetsEditableLabel TasksWidgetsEditableLabel;
typedef struct _TasksWidgetsEditableLabelClass TasksWidgetsEditableLabelClass;
typedef struct _TasksWidgetsEditableLabelPrivate TasksWidgetsEditableLabelPrivate;
enum  {
	TASKS_WIDGETS_EDITABLE_LABEL_0_PROPERTY,
	TASKS_WIDGETS_EDITABLE_LABEL_TEXT_PROPERTY,
	TASKS_WIDGETS_EDITABLE_LABEL_EDITING_PROPERTY,
	TASKS_WIDGETS_EDITABLE_LABEL_NUM_PROPERTIES
};
static GParamSpec* tasks_widgets_editable_label_properties[TASKS_WIDGETS_EDITABLE_LABEL_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  {
	TASKS_WIDGETS_EDITABLE_LABEL_CHANGED_SIGNAL,
	TASKS_WIDGETS_EDITABLE_LABEL_NUM_SIGNALS
};
static guint tasks_widgets_editable_label_signals[TASKS_WIDGETS_EDITABLE_LABEL_NUM_SIGNALS] = {0};

struct _TasksWidgetsEditableLabel {
	GtkWidget parent_instance;
	TasksWidgetsEditableLabelPrivate * priv;
};

struct _TasksWidgetsEditableLabelClass {
	GtkWidgetClass parent_class;
};

struct _TasksWidgetsEditableLabelPrivate {
	GtkLabel* title;
	GtkEntry* entry;
	GtkStack* stack;
	gchar* _text;
};

static gint TasksWidgetsEditableLabel_private_offset;
static gpointer tasks_widgets_editable_label_parent_class = NULL;

VALA_EXTERN GType tasks_widgets_editable_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TasksWidgetsEditableLabel, g_object_unref)
static gboolean tasks_widgets_editable_label_real_grab_focus (GtkWidget* base);
VALA_EXTERN void tasks_widgets_editable_label_set_editing (TasksWidgetsEditableLabel* self,
                                               gboolean value);
VALA_EXTERN TasksWidgetsEditableLabel* tasks_widgets_editable_label_new (void);
VALA_EXTERN TasksWidgetsEditableLabel* tasks_widgets_editable_label_construct (GType object_type);
VALA_EXTERN const gchar* tasks_widgets_editable_label_get_text (TasksWidgetsEditableLabel* self);
VALA_EXTERN void tasks_widgets_editable_label_set_text (TasksWidgetsEditableLabel* self,
                                            const gchar* value);
VALA_EXTERN gboolean tasks_widgets_editable_label_get_editing (TasksWidgetsEditableLabel* self);
static GObject * tasks_widgets_editable_label_constructor (GType type,
                                                    guint n_construct_properties,
                                                    GObjectConstructParam * construct_properties);
static void _tasks_widgets_editable_label___lambda32_ (TasksWidgetsEditableLabel* self);
static void __tasks_widgets_editable_label___lambda32__gtk_event_controller_motion_enter (GtkEventControllerMotion* _sender,
                                                                                   gdouble x,
                                                                                   gdouble y,
                                                                                   gpointer self);
static void _tasks_widgets_editable_label___lambda33_ (TasksWidgetsEditableLabel* self);
static void __tasks_widgets_editable_label___lambda33__gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                                   gpointer self);
static void _tasks_widgets_editable_label___lambda34_ (TasksWidgetsEditableLabel* self);
static void __tasks_widgets_editable_label___lambda34__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                            gint n_press,
                                                                            gdouble x,
                                                                            gdouble y,
                                                                            gpointer self);
static void _tasks_widgets_editable_label___lambda35_ (TasksWidgetsEditableLabel* self);
static void __tasks_widgets_editable_label___lambda35__gtk_entry_activate (GtkEntry* _sender,
                                                                    gpointer self);
static void _tasks_widgets_editable_label___lambda36_ (TasksWidgetsEditableLabel* self);
static void __tasks_widgets_editable_label___lambda36__gtk_event_controller_focus_leave (GtkEventControllerFocus* _sender,
                                                                                  gpointer self);
static void tasks_widgets_editable_label_finalize (GObject * obj);
static GType tasks_widgets_editable_label_get_type_once (void);
static void _vala_tasks_widgets_editable_label_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec);
static void _vala_tasks_widgets_editable_label_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec);

static inline gpointer
tasks_widgets_editable_label_get_instance_private (TasksWidgetsEditableLabel* self)
{
	return G_STRUCT_MEMBER_P (self, TasksWidgetsEditableLabel_private_offset);
}

static gboolean
tasks_widgets_editable_label_real_grab_focus (GtkWidget* base)
{
	TasksWidgetsEditableLabel * self;
	gboolean result;
	self = (TasksWidgetsEditableLabel*) base;
	tasks_widgets_editable_label_set_editing (self, TRUE);
	result = GDK_EVENT_STOP;
	return result;
}

TasksWidgetsEditableLabel*
tasks_widgets_editable_label_construct (GType object_type)
{
	TasksWidgetsEditableLabel * self = NULL;
	self = (TasksWidgetsEditableLabel*) g_object_new (object_type, NULL);
	return self;
}

TasksWidgetsEditableLabel*
tasks_widgets_editable_label_new (void)
{
	return tasks_widgets_editable_label_construct (TASKS_WIDGETS_TYPE_EDITABLE_LABEL);
}

const gchar*
tasks_widgets_editable_label_get_text (TasksWidgetsEditableLabel* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text;
	result = _tmp0_;
	return result;
}

void
tasks_widgets_editable_label_set_text (TasksWidgetsEditableLabel* self,
                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tasks_widgets_editable_label_get_text (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_text);
		self->priv->_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tasks_widgets_editable_label_properties[TASKS_WIDGETS_EDITABLE_LABEL_TEXT_PROPERTY]);
	}
}

gboolean
tasks_widgets_editable_label_get_editing (TasksWidgetsEditableLabel* self)
{
	gboolean result;
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkEntry* _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->entry;
	result = _tmp2_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget);
	return result;
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

void
tasks_widgets_editable_label_set_editing (TasksWidgetsEditableLabel* self,
                                          gboolean value)
{
	g_return_if_fail (self != NULL);
	if (value) {
		GtkEntry* _tmp0_;
		const gchar* _tmp1_;
		GtkStack* _tmp2_;
		GtkEntry* _tmp3_;
		GtkEntry* _tmp4_;
		_tmp0_ = self->priv->entry;
		_tmp1_ = self->priv->_text;
		gtk_editable_set_text ((GtkEditable*) _tmp0_, _tmp1_);
		_tmp2_ = self->priv->stack;
		_tmp3_ = self->priv->entry;
		gtk_stack_set_visible_child (_tmp2_, (GtkWidget*) _tmp3_);
		_tmp4_ = self->priv->entry;
		gtk_widget_grab_focus ((GtkWidget*) _tmp4_);
	} else {
		gboolean _tmp5_ = FALSE;
		GtkEntry* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gboolean _tmp11_;
		GtkStack* _tmp19_;
		GtkLabel* _tmp20_;
		_tmp6_ = self->priv->entry;
		_tmp7_ = gtk_editable_get_text ((GtkEditable*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = string_strip (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = g_strcmp0 (_tmp10_, "") != 0;
		_g_free0 (_tmp10_);
		if (_tmp11_) {
			const gchar* _tmp12_;
			GtkEntry* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			_tmp12_ = self->priv->_text;
			_tmp13_ = self->priv->entry;
			_tmp14_ = gtk_editable_get_text ((GtkEditable*) _tmp13_);
			_tmp15_ = _tmp14_;
			_tmp5_ = g_strcmp0 (_tmp12_, _tmp15_) != 0;
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkEntry* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			_tmp16_ = self->priv->entry;
			_tmp17_ = gtk_editable_get_text ((GtkEditable*) _tmp16_);
			_tmp18_ = _tmp17_;
			tasks_widgets_editable_label_set_text (self, _tmp18_);
			g_signal_emit (self, tasks_widgets_editable_label_signals[TASKS_WIDGETS_EDITABLE_LABEL_CHANGED_SIGNAL], 0);
		}
		_tmp19_ = self->priv->stack;
		_tmp20_ = self->priv->title;
		gtk_stack_set_visible_child (_tmp19_, (GtkWidget*) _tmp20_);
	}
	g_object_notify_by_pspec ((GObject *) self, tasks_widgets_editable_label_properties[TASKS_WIDGETS_EDITABLE_LABEL_EDITING_PROPERTY]);
}

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

static void
_tasks_widgets_editable_label___lambda32_ (TasksWidgetsEditableLabel* self)
{
	GdkCursor* _tmp0_;
	GdkCursor* _tmp1_;
	_tmp0_ = gdk_cursor_new_from_name ("text", NULL);
	_tmp1_ = _tmp0_;
	gtk_widget_set_cursor ((GtkWidget*) self, _tmp1_);
	_g_object_unref0 (_tmp1_);
}

static void
__tasks_widgets_editable_label___lambda32__gtk_event_controller_motion_enter (GtkEventControllerMotion* _sender,
                                                                              gdouble x,
                                                                              gdouble y,
                                                                              gpointer self)
{
	_tasks_widgets_editable_label___lambda32_ ((TasksWidgetsEditableLabel*) self);
}

static void
_tasks_widgets_editable_label___lambda33_ (TasksWidgetsEditableLabel* self)
{
	GdkCursor* _tmp0_;
	GdkCursor* _tmp1_;
	_tmp0_ = gdk_cursor_new_from_name ("default", NULL);
	_tmp1_ = _tmp0_;
	gtk_widget_set_cursor ((GtkWidget*) self, _tmp1_);
	_g_object_unref0 (_tmp1_);
}

static void
__tasks_widgets_editable_label___lambda33__gtk_event_controller_motion_leave (GtkEventControllerMotion* _sender,
                                                                              gpointer self)
{
	_tasks_widgets_editable_label___lambda33_ ((TasksWidgetsEditableLabel*) self);
}

static void
_tasks_widgets_editable_label___lambda34_ (TasksWidgetsEditableLabel* self)
{
	tasks_widgets_editable_label_set_editing (self, TRUE);
}

static void
__tasks_widgets_editable_label___lambda34__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                       gint n_press,
                                                                       gdouble x,
                                                                       gdouble y,
                                                                       gpointer self)
{
	_tasks_widgets_editable_label___lambda34_ ((TasksWidgetsEditableLabel*) self);
}

static void
_tasks_widgets_editable_label___lambda35_ (TasksWidgetsEditableLabel* self)
{
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkEntry* _tmp3_;
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->entry;
	if (_tmp2_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget)) {
		tasks_widgets_editable_label_set_editing (self, FALSE);
	}
}

static void
__tasks_widgets_editable_label___lambda35__gtk_entry_activate (GtkEntry* _sender,
                                                               gpointer self)
{
	_tasks_widgets_editable_label___lambda35_ ((TasksWidgetsEditableLabel*) self);
}

static void
_tasks_widgets_editable_label___lambda36_ (TasksWidgetsEditableLabel* self)
{
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkEntry* _tmp3_;
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->entry;
	if (_tmp2_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget)) {
		tasks_widgets_editable_label_set_editing (self, FALSE);
	}
}

static void
__tasks_widgets_editable_label___lambda36__gtk_event_controller_focus_leave (GtkEventControllerFocus* _sender,
                                                                             gpointer self)
{
	_tasks_widgets_editable_label___lambda36_ ((TasksWidgetsEditableLabel*) self);
}

static GObject *
tasks_widgets_editable_label_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TasksWidgetsEditableLabel * self;
	GtkLabel* _tmp0_ = NULL;
	GtkEntry* _tmp1_ = NULL;
	GtkStack* _tmp2_ = NULL;
	GtkStack* _tmp3_;
	GtkLabel* _tmp4_;
	GtkStack* _tmp5_;
	GtkEntry* _tmp6_;
	GtkStack* _tmp7_;
	GtkLabel* _tmp8_;
	GtkEventControllerMotion* motion_controller = NULL;
	GtkEventControllerMotion* _tmp9_ = NULL;
	GtkGestureClick* click_gesture = NULL;
	GtkGestureClick* _tmp10_;
	GtkGestureClick* _tmp11_;
	GtkEventController* _tmp12_;
	GtkEventControllerMotion* _tmp13_;
	GtkEventController* _tmp14_;
	GtkEventControllerMotion* _tmp15_;
	GtkEventControllerMotion* _tmp16_;
	GtkGestureClick* _tmp17_;
	GtkEntry* _tmp18_;
	GtkEventControllerFocus* focus_controller = NULL;
	GtkEventControllerFocus* _tmp19_;
	GtkEntry* _tmp20_;
	GtkEventControllerFocus* _tmp21_;
	GtkEventController* _tmp22_;
	GtkEventControllerFocus* _tmp23_;
	parent_class = G_OBJECT_CLASS (tasks_widgets_editable_label_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TASKS_WIDGETS_TYPE_EDITABLE_LABEL, TasksWidgetsEditableLabel);
	gtk_widget_set_valign ((GtkWidget*) self, GTK_ALIGN_CENTER);
	_tmp0_ = (GtkLabel*) gtk_label_new ("");
	gtk_label_set_ellipsize (_tmp0_, PANGO_ELLIPSIZE_END);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->title);
	self->priv->title = _tmp0_;
	_tmp1_ = (GtkEntry*) gtk_entry_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->entry);
	self->priv->entry = _tmp1_;
	_tmp2_ = (GtkStack*) gtk_stack_new ();
	gtk_stack_set_hhomogeneous (_tmp2_, FALSE);
	gtk_stack_set_transition_type (_tmp2_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->stack);
	self->priv->stack = _tmp2_;
	_tmp3_ = self->priv->stack;
	_tmp4_ = self->priv->title;
	gtk_stack_add_child (_tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->stack;
	_tmp6_ = self->priv->entry;
	gtk_stack_add_child (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = self->priv->stack;
	gtk_widget_set_parent ((GtkWidget*) _tmp7_, (GtkWidget*) self);
	_tmp8_ = self->priv->title;
	g_object_bind_property_with_closures ((GObject*) self, "text", (GObject*) _tmp8_, "label", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp9_ = (GtkEventControllerMotion*) gtk_event_controller_motion_new ();
	gtk_event_controller_set_propagation_phase ((GtkEventController*) _tmp9_, GTK_PHASE_CAPTURE);
	motion_controller = _tmp9_;
	_tmp10_ = (GtkGestureClick*) gtk_gesture_click_new ();
	click_gesture = _tmp10_;
	_tmp11_ = click_gesture;
	_tmp12_ = _g_object_ref0 ((GtkEventController*) _tmp11_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp12_);
	_tmp13_ = motion_controller;
	_tmp14_ = _g_object_ref0 ((GtkEventController*) _tmp13_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp14_);
	_tmp15_ = motion_controller;
	g_signal_connect_object (_tmp15_, "enter", (GCallback) __tasks_widgets_editable_label___lambda32__gtk_event_controller_motion_enter, self, 0);
	_tmp16_ = motion_controller;
	g_signal_connect_object (_tmp16_, "leave", (GCallback) __tasks_widgets_editable_label___lambda33__gtk_event_controller_motion_leave, self, 0);
	_tmp17_ = click_gesture;
	g_signal_connect_object (_tmp17_, "released", (GCallback) __tasks_widgets_editable_label___lambda34__gtk_gesture_click_released, self, 0);
	_tmp18_ = self->priv->entry;
	g_signal_connect_object (_tmp18_, "activate", (GCallback) __tasks_widgets_editable_label___lambda35__gtk_entry_activate, self, 0);
	_tmp19_ = (GtkEventControllerFocus*) gtk_event_controller_focus_new ();
	focus_controller = _tmp19_;
	_tmp20_ = self->priv->entry;
	_tmp21_ = focus_controller;
	_tmp22_ = _g_object_ref0 ((GtkEventController*) _tmp21_);
	gtk_widget_add_controller ((GtkWidget*) _tmp20_, _tmp22_);
	_tmp23_ = focus_controller;
	g_signal_connect_object (_tmp23_, "leave", (GCallback) __tasks_widgets_editable_label___lambda36__gtk_event_controller_focus_leave, self, 0);
	_g_object_unref0 (focus_controller);
	_g_object_unref0 (click_gesture);
	_g_object_unref0 (motion_controller);
	return obj;
}

static void
tasks_widgets_editable_label_base_init (TasksWidgetsEditableLabelClass * klass)
{
	gtk_widget_class_set_layout_manager_type (GTK_WIDGET_CLASS (klass), gtk_bin_layout_get_type ());
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "editable-label");
}

static void
tasks_widgets_editable_label_class_init (TasksWidgetsEditableLabelClass * klass,
                                         gpointer klass_data)
{
	tasks_widgets_editable_label_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TasksWidgetsEditableLabel_private_offset);
	((GtkWidgetClass *) klass)->grab_focus = (gboolean (*) (GtkWidget*)) tasks_widgets_editable_label_real_grab_focus;
	G_OBJECT_CLASS (klass)->get_property = _vala_tasks_widgets_editable_label_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tasks_widgets_editable_label_set_property;
	G_OBJECT_CLASS (klass)->constructor = tasks_widgets_editable_label_constructor;
	G_OBJECT_CLASS (klass)->finalize = tasks_widgets_editable_label_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TASKS_WIDGETS_EDITABLE_LABEL_TEXT_PROPERTY, tasks_widgets_editable_label_properties[TASKS_WIDGETS_EDITABLE_LABEL_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TASKS_WIDGETS_EDITABLE_LABEL_EDITING_PROPERTY, tasks_widgets_editable_label_properties[TASKS_WIDGETS_EDITABLE_LABEL_EDITING_PROPERTY] = g_param_spec_boolean ("editing", "editing", "editing", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tasks_widgets_editable_label_signals[TASKS_WIDGETS_EDITABLE_LABEL_CHANGED_SIGNAL] = g_signal_new ("changed", TASKS_WIDGETS_TYPE_EDITABLE_LABEL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tasks_widgets_editable_label_instance_init (TasksWidgetsEditableLabel * self,
                                            gpointer klass)
{
	gchar* _tmp0_;
	self->priv = tasks_widgets_editable_label_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_text = _tmp0_;
}

static void
tasks_widgets_editable_label_finalize (GObject * obj)
{
	TasksWidgetsEditableLabel * self;
	GtkWidget* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TASKS_WIDGETS_TYPE_EDITABLE_LABEL, TasksWidgetsEditableLabel);
	_tmp0_ = gtk_widget_get_first_child ((GtkWidget*) self);
	gtk_widget_unparent (_tmp0_);
	_g_object_unref0 (self->priv->title);
	_g_object_unref0 (self->priv->entry);
	_g_object_unref0 (self->priv->stack);
	_g_free0 (self->priv->_text);
	G_OBJECT_CLASS (tasks_widgets_editable_label_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tasks_widgets_editable_label_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TasksWidgetsEditableLabelClass), (GBaseInitFunc) tasks_widgets_editable_label_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tasks_widgets_editable_label_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TasksWidgetsEditableLabel), 0, (GInstanceInitFunc) tasks_widgets_editable_label_instance_init, NULL };
	GType tasks_widgets_editable_label_type_id;
	tasks_widgets_editable_label_type_id = g_type_register_static (gtk_widget_get_type (), "TasksWidgetsEditableLabel", &g_define_type_info, 0);
	TasksWidgetsEditableLabel_private_offset = g_type_add_instance_private (tasks_widgets_editable_label_type_id, sizeof (TasksWidgetsEditableLabelPrivate));
	return tasks_widgets_editable_label_type_id;
}

GType
tasks_widgets_editable_label_get_type (void)
{
	static gsize tasks_widgets_editable_label_type_id__once = 0;
	if (g_once_init_enter (&tasks_widgets_editable_label_type_id__once)) {
		GType tasks_widgets_editable_label_type_id;
		tasks_widgets_editable_label_type_id = tasks_widgets_editable_label_get_type_once ();
		g_once_init_leave (&tasks_widgets_editable_label_type_id__once, tasks_widgets_editable_label_type_id);
	}
	return tasks_widgets_editable_label_type_id__once;
}

static void
_vala_tasks_widgets_editable_label_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec)
{
	TasksWidgetsEditableLabel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TASKS_WIDGETS_TYPE_EDITABLE_LABEL, TasksWidgetsEditableLabel);
	switch (property_id) {
		case TASKS_WIDGETS_EDITABLE_LABEL_TEXT_PROPERTY:
		g_value_set_string (value, tasks_widgets_editable_label_get_text (self));
		break;
		case TASKS_WIDGETS_EDITABLE_LABEL_EDITING_PROPERTY:
		g_value_set_boolean (value, tasks_widgets_editable_label_get_editing (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tasks_widgets_editable_label_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec)
{
	TasksWidgetsEditableLabel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TASKS_WIDGETS_TYPE_EDITABLE_LABEL, TasksWidgetsEditableLabel);
	switch (property_id) {
		case TASKS_WIDGETS_EDITABLE_LABEL_TEXT_PROPERTY:
		tasks_widgets_editable_label_set_text (self, g_value_get_string (value));
		break;
		case TASKS_WIDGETS_EDITABLE_LABEL_EDITING_PROPERTY:
		tasks_widgets_editable_label_set_editing (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

