/* delayed-setting-view.c generated by valac 0.56.3, the Vala compiler
 * generated from delayed-setting-view.vala, do not modify */

/*
  This file is part of Dconf Editor

  Dconf Editor 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.

  Dconf Editor 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 Dconf Editor.  If not, see <https://www.gnu.org/licenses/>.
*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>

#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 TYPE_OVERLAYED_LIST_ROW (overlayed_list_row_get_type ())
#define OVERLAYED_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_OVERLAYED_LIST_ROW, OverlayedListRow))
#define OVERLAYED_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_OVERLAYED_LIST_ROW, OverlayedListRowClass))
#define IS_OVERLAYED_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_OVERLAYED_LIST_ROW))
#define IS_OVERLAYED_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_OVERLAYED_LIST_ROW))
#define OVERLAYED_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_OVERLAYED_LIST_ROW, OverlayedListRowClass))

typedef struct _OverlayedListRow OverlayedListRow;
typedef struct _OverlayedListRowClass OverlayedListRowClass;
typedef struct _OverlayedListRowPrivate OverlayedListRowPrivate;

#define TYPE_DELAYED_SETTING_VIEW (delayed_setting_view_get_type ())
#define DELAYED_SETTING_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELAYED_SETTING_VIEW, DelayedSettingView))
#define DELAYED_SETTING_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELAYED_SETTING_VIEW, DelayedSettingViewClass))
#define IS_DELAYED_SETTING_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELAYED_SETTING_VIEW))
#define IS_DELAYED_SETTING_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELAYED_SETTING_VIEW))
#define DELAYED_SETTING_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELAYED_SETTING_VIEW, DelayedSettingViewClass))

typedef struct _DelayedSettingView DelayedSettingView;
typedef struct _DelayedSettingViewClass DelayedSettingViewClass;
typedef struct _DelayedSettingViewPrivate DelayedSettingViewPrivate;
enum  {
	DELAYED_SETTING_VIEW_0_PROPERTY,
	DELAYED_SETTING_VIEW_FULL_NAME_PROPERTY,
	DELAYED_SETTING_VIEW_CONTEXT_ID_PROPERTY,
	DELAYED_SETTING_VIEW_NUM_PROPERTIES
};
static GParamSpec* delayed_setting_view_properties[DELAYED_SETTING_VIEW_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

struct _OverlayedListRow {
	GtkListBoxRow parent_instance;
	OverlayedListRowPrivate * priv;
};

struct _OverlayedListRowClass {
	GtkListBoxRowClass parent_class;
	gboolean (*handle_copy_text) (OverlayedListRow* self, gchar** copy_text);
};

struct _DelayedSettingView {
	OverlayedListRow parent_instance;
	DelayedSettingViewPrivate * priv;
};

struct _DelayedSettingViewClass {
	OverlayedListRowClass parent_class;
};

struct _DelayedSettingViewPrivate {
	GtkLabel* key_name_label;
	GtkLabel* key_value_label;
	GtkLabel* key_value_default;
	GtkLabel* planned_value_label;
	GtkLabel* planned_value_default;
	GtkButton* cancel_change_button;
	gchar* _full_name;
	guint16 _context_id;
};

static gint DelayedSettingView_private_offset;
static gpointer delayed_setting_view_parent_class = NULL;

VALA_EXTERN GType overlayed_list_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (OverlayedListRow, g_object_unref)
VALA_EXTERN GType delayed_setting_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DelayedSettingView, g_object_unref)
VALA_EXTERN gboolean overlayed_list_row_handle_copy_text (OverlayedListRow* self,
                                              gchar** copy_text);
VALA_EXTERN DelayedSettingView* delayed_setting_view_new (const gchar* name,
                                              const gchar* _full_name,
                                              guint16 _context_id,
                                              gboolean has_schema_and_is_default,
                                              GVariant* key_value,
                                              const gchar* cool_planned_value,
                                              const gchar* cool_default_value);
VALA_EXTERN DelayedSettingView* delayed_setting_view_construct (GType object_type,
                                                    const gchar* name,
                                                    const gchar* _full_name,
                                                    guint16 _context_id,
                                                    gboolean has_schema_and_is_default,
                                                    GVariant* key_value,
                                                    const gchar* cool_planned_value,
                                                    const gchar* cool_default_value);
VALA_EXTERN const gchar* delayed_setting_view_get_full_name (DelayedSettingView* self);
static void _delayed_setting_view_update_dconf_key_current_value (GVariant* key_value_or_null,
                                                           GtkLabel* key_value_label,
                                                           GtkLabel* key_value_default);
static inline void _delayed_setting_view_update_dconf_key_planned_value (const gchar* cool_planned_value,
                                                           GtkLabel* planned_value_label,
                                                           GtkLabel* planned_value_default);
static void _delayed_setting_view_update_gsettings_key_current_value (GVariant* key_value,
                                                               gboolean is_default,
                                                               GtkLabel* key_value_label,
                                                               GtkLabel* key_value_default);
static inline void _delayed_setting_view_update_gsettings_key_planned_value (const gchar* cool_planned_value,
                                                               const gchar* cool_default_value,
                                                               GtkLabel* planned_value_label,
                                                               GtkLabel* planned_value_default);
static gboolean delayed_setting_view_real_handle_copy_text (OverlayedListRow* base,
                                                     gchar** copy_text);
static void delayed_setting_view_update_value_default_label (gboolean is_default,
                                                      GtkLabel* value_default);
static void delayed_setting_view_update_labels_dconf_key_erased (GtkLabel* value_label,
                                                          GtkLabel* value_default);
static void delayed_setting_view_update_labels_dconf_key_values (const gchar* key_value,
                                                          GtkLabel* value_label,
                                                          GtkLabel* value_default);
VALA_EXTERN void delayed_setting_view_update_gsettings_key_current_value (DelayedSettingView* self,
                                                              GVariant* key_value,
                                                              gboolean is_default);
VALA_EXTERN gchar* key_cool_text_value_from_variant (GVariant* variant);
VALA_EXTERN void delayed_setting_view_update_dconf_key_current_value (DelayedSettingView* self,
                                                          GVariant* key_value_or_null);
static void delayed_setting_view_set_full_name (DelayedSettingView* self,
                                         const gchar* value);
VALA_EXTERN guint16 delayed_setting_view_get_context_id (DelayedSettingView* self);
static void delayed_setting_view_set_context_id (DelayedSettingView* self,
                                          guint16 value);
static void delayed_setting_view_finalize (GObject * obj);
static GType delayed_setting_view_get_type_once (void);
static void _vala_delayed_setting_view_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_delayed_setting_view_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
delayed_setting_view_get_instance_private (DelayedSettingView* self)
{
	return G_STRUCT_MEMBER_P (self, DelayedSettingView_private_offset);
}

DelayedSettingView*
delayed_setting_view_construct (GType object_type,
                                const gchar* name,
                                const gchar* _full_name,
                                guint16 _context_id,
                                gboolean has_schema_and_is_default,
                                GVariant* key_value,
                                const gchar* cool_planned_value,
                                const gchar* cool_default_value)
{
	DelayedSettingView * self = NULL;
	GVariant* variant = NULL;
	const gchar* _tmp0_;
	GVariant* _tmp1_;
	GtkLabel* _tmp2_;
	GtkButton* _tmp3_;
	GVariant* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (_full_name != NULL, NULL);
	g_return_val_if_fail (key_value != NULL, NULL);
	self = (DelayedSettingView*) g_object_new (object_type, "full-name", _full_name, "context-id", _context_id, NULL);
	_tmp0_ = self->priv->_full_name;
	_tmp1_ = g_variant_new_string (_tmp0_);
	g_variant_ref_sink (_tmp1_);
	variant = _tmp1_;
	_tmp2_ = self->priv->key_name_label;
	gtk_label_set_label (_tmp2_, name);
	_tmp3_ = self->priv->cancel_change_button;
	_tmp4_ = variant;
	_tmp5_ = g_variant_print (_tmp4_, FALSE);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat ("ui.dismiss-change(", _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strconcat (_tmp8_, ")", NULL);
	_tmp10_ = _tmp9_;
	gtk_actionable_set_detailed_action_name ((GtkActionable*) _tmp3_, _tmp10_);
	_g_free0 (_tmp10_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	if (cool_default_value == NULL) {
		GtkLabel* _tmp11_;
		GtkLabel* _tmp12_;
		GtkLabel* _tmp13_;
		GtkLabel* _tmp14_;
		_tmp11_ = self->priv->key_value_label;
		_tmp12_ = self->priv->key_value_default;
		_delayed_setting_view_update_dconf_key_current_value (key_value, _tmp11_, _tmp12_);
		_tmp13_ = self->priv->planned_value_label;
		_tmp14_ = self->priv->planned_value_default;
		_delayed_setting_view_update_dconf_key_planned_value (cool_planned_value, _tmp13_, _tmp14_);
	} else {
		GtkLabel* _tmp15_;
		GtkLabel* _tmp16_;
		GtkLabel* _tmp17_;
		GtkLabel* _tmp18_;
		_tmp15_ = self->priv->key_value_label;
		_tmp16_ = self->priv->key_value_default;
		_delayed_setting_view_update_gsettings_key_current_value (key_value, has_schema_and_is_default, _tmp15_, _tmp16_);
		_tmp17_ = self->priv->planned_value_label;
		_tmp18_ = self->priv->planned_value_default;
		_delayed_setting_view_update_gsettings_key_planned_value (cool_planned_value, (const gchar*) cool_default_value, _tmp17_, _tmp18_);
	}
	_g_variant_unref0 (variant);
	return self;
}

DelayedSettingView*
delayed_setting_view_new (const gchar* name,
                          const gchar* _full_name,
                          guint16 _context_id,
                          gboolean has_schema_and_is_default,
                          GVariant* key_value,
                          const gchar* cool_planned_value,
                          const gchar* cool_default_value)
{
	return delayed_setting_view_construct (TYPE_DELAYED_SETTING_VIEW, name, _full_name, _context_id, has_schema_and_is_default, key_value, cool_planned_value, cool_default_value);
}

static gboolean
delayed_setting_view_real_handle_copy_text (OverlayedListRow* base,
                                            gchar** copy_text)
{
	DelayedSettingView * self;
	gchar* _vala_copy_text = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean result;
	self = (DelayedSettingView*) base;
	_tmp0_ = self->priv->_full_name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (_vala_copy_text);
	_vala_copy_text = _tmp1_;
	result = TRUE;
	if (copy_text) {
		*copy_text = _vala_copy_text;
	} else {
		_g_free0 (_vala_copy_text);
	}
	return result;
}

static inline void
_delayed_setting_view_update_gsettings_key_planned_value (const gchar* cool_planned_value,
                                                          const gchar* cool_default_value,
                                                          GtkLabel* planned_value_label,
                                                          GtkLabel* planned_value_default)
{
	gboolean is_default = FALSE;
	const gchar* _tmp0_ = NULL;
	g_return_if_fail (cool_default_value != NULL);
	g_return_if_fail (planned_value_label != NULL);
	g_return_if_fail (planned_value_default != NULL);
	is_default = cool_planned_value == NULL;
	if (is_default) {
		_tmp0_ = cool_default_value;
	} else {
		_tmp0_ = (const gchar*) cool_planned_value;
	}
	gtk_label_set_label (planned_value_label, _tmp0_);
	delayed_setting_view_update_value_default_label (is_default, planned_value_default);
}

static inline void
_delayed_setting_view_update_dconf_key_planned_value (const gchar* cool_planned_value,
                                                      GtkLabel* planned_value_label,
                                                      GtkLabel* planned_value_default)
{
	g_return_if_fail (planned_value_label != NULL);
	g_return_if_fail (planned_value_default != NULL);
	if (cool_planned_value == NULL) {
		delayed_setting_view_update_labels_dconf_key_erased (planned_value_label, planned_value_default);
	} else {
		delayed_setting_view_update_labels_dconf_key_values ((const gchar*) cool_planned_value, planned_value_label, planned_value_default);
	}
}

void
delayed_setting_view_update_gsettings_key_current_value (DelayedSettingView* self,
                                                         GVariant* key_value,
                                                         gboolean is_default)
{
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key_value != NULL);
	_tmp0_ = self->priv->key_value_label;
	_tmp1_ = self->priv->key_value_default;
	_delayed_setting_view_update_gsettings_key_current_value (key_value, is_default, _tmp0_, _tmp1_);
}

static void
_delayed_setting_view_update_gsettings_key_current_value (GVariant* key_value,
                                                          gboolean is_default,
                                                          GtkLabel* key_value_label,
                                                          GtkLabel* key_value_default)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (key_value != NULL);
	g_return_if_fail (key_value_label != NULL);
	g_return_if_fail (key_value_default != NULL);
	_tmp0_ = key_cool_text_value_from_variant (key_value);
	_tmp1_ = _tmp0_;
	gtk_label_set_label (key_value_label, _tmp1_);
	_g_free0 (_tmp1_);
	delayed_setting_view_update_value_default_label (is_default, key_value_default);
}

void
delayed_setting_view_update_dconf_key_current_value (DelayedSettingView* self,
                                                     GVariant* key_value_or_null)
{
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->key_value_label;
	_tmp1_ = self->priv->key_value_default;
	_delayed_setting_view_update_dconf_key_current_value (key_value_or_null, _tmp0_, _tmp1_);
}

static void
_delayed_setting_view_update_dconf_key_current_value (GVariant* key_value_or_null,
                                                      GtkLabel* key_value_label,
                                                      GtkLabel* key_value_default)
{
	g_return_if_fail (key_value_label != NULL);
	g_return_if_fail (key_value_default != NULL);
	if (key_value_or_null == NULL) {
		delayed_setting_view_update_labels_dconf_key_erased (key_value_label, key_value_default);
	} else {
		gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = key_cool_text_value_from_variant ((GVariant*) key_value_or_null);
		_tmp1_ = _tmp0_;
		delayed_setting_view_update_labels_dconf_key_values (_tmp1_, key_value_label, key_value_default);
		_g_free0 (_tmp1_);
	}
}

static void
delayed_setting_view_update_labels_dconf_key_erased (GtkLabel* value_label,
                                                     GtkLabel* value_default)
{
	g_return_if_fail (value_label != NULL);
	g_return_if_fail (value_default != NULL);
	gtk_widget_set_visible ((GtkWidget*) value_label, FALSE);
	gtk_label_set_label (value_default, _ ("Key erased"));
	gtk_widget_set_visible ((GtkWidget*) value_default, TRUE);
}

static void
delayed_setting_view_update_labels_dconf_key_values (const gchar* key_value,
                                                     GtkLabel* value_label,
                                                     GtkLabel* value_default)
{
	g_return_if_fail (key_value != NULL);
	g_return_if_fail (value_label != NULL);
	g_return_if_fail (value_default != NULL);
	gtk_widget_set_visible ((GtkWidget*) value_default, FALSE);
	gtk_label_set_label (value_label, key_value);
	gtk_widget_set_visible ((GtkWidget*) value_label, TRUE);
}

static void
delayed_setting_view_update_value_default_label (gboolean is_default,
                                                 GtkLabel* value_default)
{
	g_return_if_fail (value_default != NULL);
	if (is_default) {
		gtk_label_set_label (value_default, _ ("Default value"));
	}
	gtk_widget_set_visible ((GtkWidget*) value_default, is_default);
}

const gchar*
delayed_setting_view_get_full_name (DelayedSettingView* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_full_name;
	result = _tmp0_;
	return result;
}

static void
delayed_setting_view_set_full_name (DelayedSettingView* self,
                                    const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_full_name);
	self->priv->_full_name = _tmp0_;
}

guint16
delayed_setting_view_get_context_id (DelayedSettingView* self)
{
	guint16 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_context_id;
	return result;
}

static void
delayed_setting_view_set_context_id (DelayedSettingView* self,
                                     guint16 value)
{
	g_return_if_fail (self != NULL);
	self->priv->_context_id = value;
}

static void
delayed_setting_view_class_init (DelayedSettingViewClass * klass,
                                 gpointer klass_data)
{
	delayed_setting_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DelayedSettingView_private_offset);
	((OverlayedListRowClass *) klass)->handle_copy_text = (gboolean (*) (OverlayedListRow*, gchar**)) delayed_setting_view_real_handle_copy_text;
	G_OBJECT_CLASS (klass)->get_property = _vala_delayed_setting_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_delayed_setting_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = delayed_setting_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DELAYED_SETTING_VIEW_FULL_NAME_PROPERTY, delayed_setting_view_properties[DELAYED_SETTING_VIEW_FULL_NAME_PROPERTY] = g_param_spec_string ("full-name", "full-name", "full-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DELAYED_SETTING_VIEW_CONTEXT_ID_PROPERTY, delayed_setting_view_properties[DELAYED_SETTING_VIEW_CONTEXT_ID_PROPERTY] = g_param_spec_uint ("context-id", "context-id", "context-id", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_EXPLICIT_NOTIFY));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/ca/desrt/dconf-editor/ui/delayed-setting-view.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "key_name_label", FALSE, DelayedSettingView_private_offset + G_STRUCT_OFFSET (DelayedSettingViewPrivate, key_name_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "key_value_label", FALSE, DelayedSettingView_private_offset + G_STRUCT_OFFSET (DelayedSettingViewPrivate, key_value_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "key_value_default", FALSE, DelayedSettingView_private_offset + G_STRUCT_OFFSET (DelayedSettingViewPrivate, key_value_default));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "planned_value_label", FALSE, DelayedSettingView_private_offset + G_STRUCT_OFFSET (DelayedSettingViewPrivate, planned_value_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "planned_value_default", FALSE, DelayedSettingView_private_offset + G_STRUCT_OFFSET (DelayedSettingViewPrivate, planned_value_default));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cancel_change_button", FALSE, DelayedSettingView_private_offset + G_STRUCT_OFFSET (DelayedSettingViewPrivate, cancel_change_button));
}

static void
delayed_setting_view_instance_init (DelayedSettingView * self,
                                    gpointer klass)
{
	self->priv = delayed_setting_view_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
delayed_setting_view_finalize (GObject * obj)
{
	DelayedSettingView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DELAYED_SETTING_VIEW, DelayedSettingView);
	_g_free0 (self->priv->_full_name);
	G_OBJECT_CLASS (delayed_setting_view_parent_class)->finalize (obj);
}

static GType
delayed_setting_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DelayedSettingViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) delayed_setting_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DelayedSettingView), 0, (GInstanceInitFunc) delayed_setting_view_instance_init, NULL };
	GType delayed_setting_view_type_id;
	delayed_setting_view_type_id = g_type_register_static (TYPE_OVERLAYED_LIST_ROW, "DelayedSettingView", &g_define_type_info, 0);
	DelayedSettingView_private_offset = g_type_add_instance_private (delayed_setting_view_type_id, sizeof (DelayedSettingViewPrivate));
	return delayed_setting_view_type_id;
}

GType
delayed_setting_view_get_type (void)
{
	static volatile gsize delayed_setting_view_type_id__once = 0;
	if (g_once_init_enter (&delayed_setting_view_type_id__once)) {
		GType delayed_setting_view_type_id;
		delayed_setting_view_type_id = delayed_setting_view_get_type_once ();
		g_once_init_leave (&delayed_setting_view_type_id__once, delayed_setting_view_type_id);
	}
	return delayed_setting_view_type_id__once;
}

static void
_vala_delayed_setting_view_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	DelayedSettingView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DELAYED_SETTING_VIEW, DelayedSettingView);
	switch (property_id) {
		case DELAYED_SETTING_VIEW_FULL_NAME_PROPERTY:
		g_value_set_string (value, delayed_setting_view_get_full_name (self));
		break;
		case DELAYED_SETTING_VIEW_CONTEXT_ID_PROPERTY:
		g_value_set_uint (value, delayed_setting_view_get_context_id (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_delayed_setting_view_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	DelayedSettingView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DELAYED_SETTING_VIEW, DelayedSettingView);
	switch (property_id) {
		case DELAYED_SETTING_VIEW_FULL_NAME_PROPERTY:
		delayed_setting_view_set_full_name (self, g_value_get_string (value));
		break;
		case DELAYED_SETTING_VIEW_CONTEXT_ID_PROPERTY:
		delayed_setting_view_set_context_id (self, g_value_get_uint (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;
}

