/* dconf-view.c generated by valac 0.25.3, the Vala compiler
 * generated from dconf-view.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
#include <cairo.h>
#include <glib/gi18n-lib.h>


#define TYPE_KEY_VALUE_RENDERER (key_value_renderer_get_type ())
#define KEY_VALUE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_VALUE_RENDERER, KeyValueRenderer))
#define KEY_VALUE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_VALUE_RENDERER, KeyValueRendererClass))
#define IS_KEY_VALUE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_VALUE_RENDERER))
#define IS_KEY_VALUE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_VALUE_RENDERER))
#define KEY_VALUE_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_VALUE_RENDERER, KeyValueRendererClass))

typedef struct _KeyValueRenderer KeyValueRenderer;
typedef struct _KeyValueRendererClass KeyValueRendererClass;
typedef struct _KeyValueRendererPrivate KeyValueRendererPrivate;

#define TYPE_DCONF_KEY_VIEW (dconf_key_view_get_type ())
#define DCONF_KEY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DCONF_KEY_VIEW, DConfKeyView))
#define DCONF_KEY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DCONF_KEY_VIEW, DConfKeyViewClass))
#define IS_DCONF_KEY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DCONF_KEY_VIEW))
#define IS_DCONF_KEY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DCONF_KEY_VIEW))
#define DCONF_KEY_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DCONF_KEY_VIEW, DConfKeyViewClass))

typedef struct _DConfKeyView DConfKeyView;
typedef struct _DConfKeyViewClass DConfKeyViewClass;

#define TYPE_KEY (key_get_type ())
#define KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY, Key))
#define KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY, KeyClass))
#define IS_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY))
#define IS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY))
#define KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY, KeyClass))

typedef struct _Key Key;
typedef struct _KeyClass KeyClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _KeyPrivate KeyPrivate;

#define TYPE_DIRECTORY (directory_get_type ())
#define DIRECTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECTORY, Directory))
#define DIRECTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECTORY, DirectoryClass))
#define IS_DIRECTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECTORY))
#define IS_DIRECTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECTORY))
#define DIRECTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECTORY, DirectoryClass))

typedef struct _Directory Directory;
typedef struct _DirectoryClass DirectoryClass;

#define TYPE_SCHEMA_KEY (schema_key_get_type ())
#define SCHEMA_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_KEY, SchemaKey))
#define SCHEMA_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_KEY, SchemaKeyClass))
#define IS_SCHEMA_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_KEY))
#define IS_SCHEMA_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_KEY))
#define SCHEMA_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_KEY, SchemaKeyClass))

typedef struct _SchemaKey SchemaKey;
typedef struct _SchemaKeyClass SchemaKeyClass;
typedef struct _SchemaKeyPrivate SchemaKeyPrivate;

#define TYPE_SCHEMA (schema_get_type ())
#define SCHEMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA, Schema))
#define SCHEMA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA, SchemaClass))
#define IS_SCHEMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA))
#define IS_SCHEMA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA))
#define SCHEMA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA, SchemaClass))

typedef struct _Schema Schema;
typedef struct _SchemaClass SchemaClass;

#define TYPE_SCHEMA_VALUE_RANGE (schema_value_range_get_type ())
#define SCHEMA_VALUE_RANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_VALUE_RANGE, SchemaValueRange))
#define SCHEMA_VALUE_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_VALUE_RANGE, SchemaValueRangeClass))
#define IS_SCHEMA_VALUE_RANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_VALUE_RANGE))
#define IS_SCHEMA_VALUE_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_VALUE_RANGE))
#define SCHEMA_VALUE_RANGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_VALUE_RANGE, SchemaValueRangeClass))

typedef struct _SchemaValueRange SchemaValueRange;
typedef struct _SchemaValueRangeClass SchemaValueRangeClass;

#define TYPE_SCHEMA_CHOICE (schema_choice_get_type ())
#define SCHEMA_CHOICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_CHOICE, SchemaChoice))
#define SCHEMA_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_CHOICE, SchemaChoiceClass))
#define IS_SCHEMA_CHOICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_CHOICE))
#define IS_SCHEMA_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_CHOICE))
#define SCHEMA_CHOICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_CHOICE, SchemaChoiceClass))

typedef struct _SchemaChoice SchemaChoice;
typedef struct _SchemaChoiceClass SchemaChoiceClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _SchemaChoicePrivate SchemaChoicePrivate;
#define _schema_choice_unref0(var) ((var == NULL) ? NULL : (var = (schema_choice_unref (var), NULL)))
typedef struct _SchemaPrivate SchemaPrivate;

#define TYPE_SCHEMA_LIST (schema_list_get_type ())
#define SCHEMA_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_LIST, SchemaList))
#define SCHEMA_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_LIST, SchemaListClass))
#define IS_SCHEMA_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_LIST))
#define IS_SCHEMA_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_LIST))
#define SCHEMA_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_LIST, SchemaListClass))

typedef struct _SchemaList SchemaList;
typedef struct _SchemaListClass SchemaListClass;
typedef struct _SchemaListPrivate SchemaListPrivate;

#define TYPE_SCHEMA_ENUM (schema_enum_get_type ())
#define SCHEMA_ENUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_ENUM, SchemaEnum))
#define SCHEMA_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_ENUM, SchemaEnumClass))
#define IS_SCHEMA_ENUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_ENUM))
#define IS_SCHEMA_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_ENUM))
#define SCHEMA_ENUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_ENUM, SchemaEnumClass))

typedef struct _SchemaEnum SchemaEnum;
typedef struct _SchemaEnumClass SchemaEnumClass;

#define TYPE_SCHEMA_FLAGS (schema_flags_get_type ())
#define SCHEMA_FLAGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_FLAGS, SchemaFlags))
#define SCHEMA_FLAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_FLAGS, SchemaFlagsClass))
#define IS_SCHEMA_FLAGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_FLAGS))
#define IS_SCHEMA_FLAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_FLAGS))
#define SCHEMA_FLAGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_FLAGS, SchemaFlagsClass))

typedef struct _SchemaFlags SchemaFlags;
typedef struct _SchemaFlagsClass SchemaFlagsClass;

#define TYPE_ENUM_MODEL (enum_model_get_type ())
#define ENUM_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ENUM_MODEL, EnumModel))
#define ENUM_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ENUM_MODEL, EnumModelClass))
#define IS_ENUM_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ENUM_MODEL))
#define IS_ENUM_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ENUM_MODEL))
#define ENUM_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ENUM_MODEL, EnumModelClass))

typedef struct _EnumModel EnumModel;
typedef struct _EnumModelClass EnumModelClass;
typedef struct _SchemaValueRangePrivate SchemaValueRangePrivate;

#define TYPE_DCONF_DIR_VIEW (dconf_dir_view_get_type ())
#define DCONF_DIR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DCONF_DIR_VIEW, DConfDirView))
#define DCONF_DIR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DCONF_DIR_VIEW, DConfDirViewClass))
#define IS_DCONF_DIR_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DCONF_DIR_VIEW))
#define IS_DCONF_DIR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DCONF_DIR_VIEW))
#define DCONF_DIR_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DCONF_DIR_VIEW, DConfDirViewClass))

typedef struct _DConfDirView DConfDirView;
typedef struct _DConfDirViewClass DConfDirViewClass;
typedef struct _DConfDirViewPrivate DConfDirViewPrivate;
typedef struct _DConfKeyViewPrivate DConfKeyViewPrivate;

struct _KeyValueRenderer {
	GtkCellRenderer parent_instance;
	KeyValueRendererPrivate * priv;
};

struct _KeyValueRendererClass {
	GtkCellRendererClass parent_class;
};

struct _KeyValueRendererPrivate {
	DConfKeyView* view;
	GtkCellRendererText* text_renderer;
	GtkCellRendererSpin* spin_renderer;
	GtkCellRendererToggle* toggle_renderer;
	GtkCellRendererCombo* combo_renderer;
	Key* _key;
};

struct _Key {
	GObject parent_instance;
	KeyPrivate * priv;
	Directory* parent;
	gchar* name;
	gchar* full_name;
	SchemaKey* schema;
};

struct _KeyClass {
	GObjectClass parent_class;
};

struct _SchemaKey {
	GTypeInstance parent_instance;
	volatile int ref_count;
	SchemaKeyPrivate * priv;
	Schema* schema;
	gchar* name;
	gchar* type;
	GVariant* default_value;
	SchemaValueRange* range;
	SchemaValueRange* type_range;
	GList* choices;
	gchar* enum_name;
	gchar* summary;
	gchar* description;
	gchar* gettext_domain;
};

struct _SchemaKeyClass {
	GTypeClass parent_class;
	void (*finalize) (SchemaKey *self);
};

struct _SchemaChoice {
	GTypeInstance parent_instance;
	volatile int ref_count;
	SchemaChoicePrivate * priv;
	gchar* name;
	GVariant* value;
};

struct _SchemaChoiceClass {
	GTypeClass parent_class;
	void (*finalize) (SchemaChoice *self);
};

struct _Schema {
	GTypeInstance parent_instance;
	volatile int ref_count;
	SchemaPrivate * priv;
	SchemaList* list;
	gchar* id;
	gchar* path;
	GHashTable* keys;
};

struct _SchemaClass {
	GTypeClass parent_class;
	void (*finalize) (Schema *self);
};

struct _SchemaList {
	GTypeInstance parent_instance;
	volatile int ref_count;
	SchemaListPrivate * priv;
	GHashTable* schemas;
	GHashTable* keys;
	GHashTable* enums;
	GHashTable* flags;
};

struct _SchemaListClass {
	GTypeClass parent_class;
	void (*finalize) (SchemaList *self);
};

struct _SchemaValueRange {
	GTypeInstance parent_instance;
	volatile int ref_count;
	SchemaValueRangePrivate * priv;
	GVariant* min;
	GVariant* max;
};

struct _SchemaValueRangeClass {
	GTypeClass parent_class;
	void (*finalize) (SchemaValueRange *self);
};

struct _DConfDirView {
	GtkTreeView parent_instance;
	DConfDirViewPrivate * priv;
};

struct _DConfDirViewClass {
	GtkTreeViewClass parent_class;
};

struct _DConfKeyView {
	GtkTreeView parent_instance;
	DConfKeyViewPrivate * priv;
};

struct _DConfKeyViewClass {
	GtkTreeViewClass parent_class;
};


static gpointer key_value_renderer_parent_class = NULL;
static gpointer dconf_dir_view_parent_class = NULL;
static gpointer dconf_key_view_parent_class = NULL;

GType key_value_renderer_get_type (void) G_GNUC_CONST;
GType dconf_key_view_get_type (void) G_GNUC_CONST;
GType key_get_type (void) G_GNUC_CONST;
#define KEY_VALUE_RENDERER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_KEY_VALUE_RENDERER, KeyValueRendererPrivate))
enum  {
	KEY_VALUE_RENDERER_DUMMY_PROPERTY,
	KEY_VALUE_RENDERER_KEY
};
static gdouble key_value_renderer_get_variant_as_double (GVariant* value);
KeyValueRenderer* key_value_renderer_new (DConfKeyView* view);
KeyValueRenderer* key_value_renderer_construct (GType object_type, DConfKeyView* view);
static void key_value_renderer_text_edited_cb (KeyValueRenderer* self, GtkCellRendererText* renderer, const gchar* path, const gchar* text);
static void _key_value_renderer_text_edited_cb_gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self);
static void key_value_renderer_spin_edited_cb (KeyValueRenderer* self, GtkCellRendererText* renderer, const gchar* path, const gchar* text);
static void _key_value_renderer_spin_edited_cb_gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self);
static void key_value_renderer_toggle_cb (KeyValueRenderer* self, GtkCellRendererToggle* renderer, const gchar* path);
static void _key_value_renderer_toggle_cb_gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender, const gchar* path, gpointer self);
static void key_value_renderer_real_get_size (GtkCellRenderer* base, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height);
static GtkCellRenderer* key_value_renderer_get_renderer (KeyValueRenderer* self);
static void key_value_renderer_real_get_preferred_width (GtkCellRenderer* base, GtkWidget* widget, gint* minimum_size, gint* natural_size);
static void key_value_renderer_real_get_preferred_height_for_width (GtkCellRenderer* base, GtkWidget* widget, gint width, gint* minimum_height, gint* natural_height);
static void key_value_renderer_real_get_preferred_height (GtkCellRenderer* base, GtkWidget* widget, gint* minimum_size, gint* natural_size);
static void key_value_renderer_real_get_preferred_width_for_height (GtkCellRenderer* base, GtkWidget* widget, gint height, gint* minimum_width, gint* natural_width);
static void key_value_renderer_real_render (GtkCellRenderer* base, cairo_t* context, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags);
static gboolean key_value_renderer_real_activate (GtkCellRenderer* base, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags);
static GtkCellEditable* key_value_renderer_real_start_editing (GtkCellRenderer* base, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags);
static Key* key_value_renderer_get_key_from_path (KeyValueRenderer* self, const gchar* path);
GVariant* key_get_value (Key* self);
void key_set_value (Key* self, GVariant* value);
const gchar* key_get_type_string (Key* self);
Key* key_value_renderer_get_key (KeyValueRenderer* self);
void key_value_renderer_set_key (KeyValueRenderer* self, Key* value);
gboolean key_get_has_schema (Key* self);
GType directory_get_type (void) G_GNUC_CONST;
gpointer schema_key_ref (gpointer instance);
void schema_key_unref (gpointer instance);
GParamSpec* param_spec_schema_key (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_key (GValue* value, gpointer v_object);
void value_take_schema_key (GValue* value, gpointer v_object);
gpointer value_get_schema_key (const GValue* value);
GType schema_key_get_type (void) G_GNUC_CONST;
gpointer schema_ref (gpointer instance);
void schema_unref (gpointer instance);
GParamSpec* param_spec_schema (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema (GValue* value, gpointer v_object);
void value_take_schema (GValue* value, gpointer v_object);
gpointer value_get_schema (const GValue* value);
GType schema_get_type (void) G_GNUC_CONST;
gpointer schema_value_range_ref (gpointer instance);
void schema_value_range_unref (gpointer instance);
GParamSpec* param_spec_schema_value_range (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_value_range (GValue* value, gpointer v_object);
void value_take_schema_value_range (GValue* value, gpointer v_object);
gpointer value_get_schema_value_range (const GValue* value);
GType schema_value_range_get_type (void) G_GNUC_CONST;
gpointer schema_choice_ref (gpointer instance);
void schema_choice_unref (gpointer instance);
GParamSpec* param_spec_schema_choice (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_choice (GValue* value, gpointer v_object);
void value_take_schema_choice (GValue* value, gpointer v_object);
gpointer value_get_schema_choice (const GValue* value);
GType schema_choice_get_type (void) G_GNUC_CONST;
gpointer schema_list_ref (gpointer instance);
void schema_list_unref (gpointer instance);
GParamSpec* param_spec_schema_list (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_list (GValue* value, gpointer v_object);
void value_take_schema_list (GValue* value, gpointer v_object);
gpointer value_get_schema_list (const GValue* value);
GType schema_list_get_type (void) G_GNUC_CONST;
gpointer schema_enum_ref (gpointer instance);
void schema_enum_unref (gpointer instance);
GParamSpec* param_spec_schema_enum (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_enum (GValue* value, gpointer v_object);
void value_take_schema_enum (GValue* value, gpointer v_object);
gpointer value_get_schema_enum (const GValue* value);
GType schema_enum_get_type (void) G_GNUC_CONST;
gpointer schema_flags_ref (gpointer instance);
void schema_flags_unref (gpointer instance);
GParamSpec* param_spec_schema_flags (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_schema_flags (GValue* value, gpointer v_object);
void value_take_schema_flags (GValue* value, gpointer v_object);
gpointer value_get_schema_flags (const GValue* value);
GType schema_flags_get_type (void) G_GNUC_CONST;
EnumModel* enum_model_new (SchemaEnum* schema_enum);
EnumModel* enum_model_construct (GType object_type, SchemaEnum* schema_enum);
GType enum_model_get_type (void) G_GNUC_CONST;
GVariant* key_get_min (Key* self);
GVariant* key_get_max (Key* self);
static void key_value_renderer_set_renderer (KeyValueRenderer* self, GtkCellRenderer* value);
static void key_value_renderer_finalize (GObject* obj);
static void _vala_key_value_renderer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_key_value_renderer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType dconf_dir_view_get_type (void) G_GNUC_CONST;
enum  {
	DCONF_DIR_VIEW_DUMMY_PROPERTY
};
DConfDirView* dconf_dir_view_new (void);
DConfDirView* dconf_dir_view_construct (GType object_type);
enum  {
	DCONF_KEY_VIEW_DUMMY_PROPERTY
};
DConfKeyView* dconf_key_view_new (void);
DConfKeyView* dconf_key_view_construct (GType object_type);


static gdouble key_value_renderer_get_variant_as_double (GVariant* value) {
	gdouble result = 0.0;
	GVariant* _tmp0_ = NULL;
	GVariant* _tmp1_ = NULL;
	GVariantClass _tmp2_ = 0;
	g_return_val_if_fail (value != NULL, 0.0);
	_tmp0_ = value;
	if (_tmp0_ == NULL) {
		result = 0.0;
		return result;
	}
	_tmp1_ = value;
	_tmp2_ = g_variant_classify (_tmp1_);
	switch (_tmp2_) {
		case G_VARIANT_CLASS_BYTE:
		{
			GVariant* _tmp3_ = NULL;
			guint8 _tmp4_ = 0U;
			_tmp3_ = value;
			_tmp4_ = g_variant_get_byte (_tmp3_);
			result = (gdouble) _tmp4_;
			return result;
		}
		case G_VARIANT_CLASS_INT16:
		{
			GVariant* _tmp5_ = NULL;
			gint16 _tmp6_ = 0;
			_tmp5_ = value;
			_tmp6_ = g_variant_get_int16 (_tmp5_);
			result = (gdouble) _tmp6_;
			return result;
		}
		case G_VARIANT_CLASS_UINT16:
		{
			GVariant* _tmp7_ = NULL;
			guint16 _tmp8_ = 0U;
			_tmp7_ = value;
			_tmp8_ = g_variant_get_uint16 (_tmp7_);
			result = (gdouble) _tmp8_;
			return result;
		}
		case G_VARIANT_CLASS_INT32:
		{
			GVariant* _tmp9_ = NULL;
			gint32 _tmp10_ = 0;
			_tmp9_ = value;
			_tmp10_ = g_variant_get_int32 (_tmp9_);
			result = (gdouble) _tmp10_;
			return result;
		}
		case G_VARIANT_CLASS_UINT32:
		{
			GVariant* _tmp11_ = NULL;
			guint32 _tmp12_ = 0U;
			_tmp11_ = value;
			_tmp12_ = g_variant_get_uint32 (_tmp11_);
			result = (gdouble) _tmp12_;
			return result;
		}
		case G_VARIANT_CLASS_INT64:
		{
			GVariant* _tmp13_ = NULL;
			gint64 _tmp14_ = 0LL;
			_tmp13_ = value;
			_tmp14_ = g_variant_get_int64 (_tmp13_);
			result = (gdouble) _tmp14_;
			return result;
		}
		case G_VARIANT_CLASS_UINT64:
		{
			GVariant* _tmp15_ = NULL;
			guint64 _tmp16_ = 0ULL;
			_tmp15_ = value;
			_tmp16_ = g_variant_get_uint64 (_tmp15_);
			result = (gdouble) _tmp16_;
			return result;
		}
		case G_VARIANT_CLASS_DOUBLE:
		{
			GVariant* _tmp17_ = NULL;
			gdouble _tmp18_ = 0.0;
			_tmp17_ = value;
			_tmp18_ = g_variant_get_double (_tmp17_);
			result = _tmp18_;
			return result;
		}
		default:
		{
			result = 0.0;
			return result;
		}
	}
}


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


static void _key_value_renderer_text_edited_cb_gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self) {
	key_value_renderer_text_edited_cb ((KeyValueRenderer*) self, _sender, path, new_text);
}


static void _key_value_renderer_spin_edited_cb_gtk_cell_renderer_text_edited (GtkCellRendererText* _sender, const gchar* path, const gchar* new_text, gpointer self) {
	key_value_renderer_spin_edited_cb ((KeyValueRenderer*) self, _sender, path, new_text);
}


static void _key_value_renderer_toggle_cb_gtk_cell_renderer_toggle_toggled (GtkCellRendererToggle* _sender, const gchar* path, gpointer self) {
	key_value_renderer_toggle_cb ((KeyValueRenderer*) self, _sender, path);
}


KeyValueRenderer* key_value_renderer_construct (GType object_type, DConfKeyView* view) {
	KeyValueRenderer * self = NULL;
	DConfKeyView* _tmp0_ = NULL;
	DConfKeyView* _tmp1_ = NULL;
	GtkCellRendererText* _tmp2_ = NULL;
	GtkCellRendererText* _tmp3_ = NULL;
	GtkCellRendererText* _tmp4_ = NULL;
	GtkCellRendererSpin* _tmp5_ = NULL;
	GtkCellRendererSpin* _tmp6_ = NULL;
	GtkCellRendererSpin* _tmp7_ = NULL;
	GtkCellRendererToggle* _tmp8_ = NULL;
	GtkCellRendererToggle* _tmp9_ = NULL;
	GtkCellRendererToggle* _tmp10_ = NULL;
	GtkCellRendererToggle* _tmp11_ = NULL;
	GtkCellRendererCombo* _tmp12_ = NULL;
	GtkCellRendererCombo* _tmp13_ = NULL;
	GtkCellRendererCombo* _tmp14_ = NULL;
	GtkCellRendererCombo* _tmp15_ = NULL;
	GtkCellRendererCombo* _tmp16_ = NULL;
	g_return_val_if_fail (view != NULL, NULL);
	self = (KeyValueRenderer*) g_object_new (object_type, NULL);
	_tmp0_ = view;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->view);
	self->priv->view = _tmp1_;
	_tmp2_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->text_renderer);
	self->priv->text_renderer = _tmp2_;
	_tmp3_ = self->priv->text_renderer;
	g_object_set (_tmp3_, "editable", TRUE, NULL);
	_tmp4_ = self->priv->text_renderer;
	g_signal_connect_object (_tmp4_, "edited", (GCallback) _key_value_renderer_text_edited_cb_gtk_cell_renderer_text_edited, self, 0);
	_tmp5_ = (GtkCellRendererSpin*) gtk_cell_renderer_spin_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->spin_renderer);
	self->priv->spin_renderer = _tmp5_;
	_tmp6_ = self->priv->spin_renderer;
	g_object_set ((GtkCellRendererText*) _tmp6_, "editable", TRUE, NULL);
	_tmp7_ = self->priv->spin_renderer;
	g_signal_connect_object ((GtkCellRendererText*) _tmp7_, "edited", (GCallback) _key_value_renderer_spin_edited_cb_gtk_cell_renderer_text_edited, self, 0);
	_tmp8_ = (GtkCellRendererToggle*) gtk_cell_renderer_toggle_new ();
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->toggle_renderer);
	self->priv->toggle_renderer = _tmp8_;
	_tmp9_ = self->priv->toggle_renderer;
	g_object_set ((GtkCellRenderer*) _tmp9_, "xalign", 0.f, NULL);
	_tmp10_ = self->priv->toggle_renderer;
	gtk_cell_renderer_toggle_set_activatable (_tmp10_, TRUE);
	_tmp11_ = self->priv->toggle_renderer;
	g_signal_connect_object (_tmp11_, "toggled", (GCallback) _key_value_renderer_toggle_cb_gtk_cell_renderer_toggle_toggled, self, 0);
	_tmp12_ = (GtkCellRendererCombo*) gtk_cell_renderer_combo_new ();
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->combo_renderer);
	self->priv->combo_renderer = _tmp12_;
	_tmp13_ = self->priv->combo_renderer;
	g_object_set (_tmp13_, "has-entry", FALSE, NULL);
	_tmp14_ = self->priv->combo_renderer;
	g_object_set (_tmp14_, "text-column", 0, NULL);
	_tmp15_ = self->priv->combo_renderer;
	g_object_set ((GtkCellRendererText*) _tmp15_, "editable", TRUE, NULL);
	_tmp16_ = self->priv->combo_renderer;
	g_signal_connect_object ((GtkCellRendererText*) _tmp16_, "edited", (GCallback) _key_value_renderer_text_edited_cb_gtk_cell_renderer_text_edited, self, 0);
	return self;
}


KeyValueRenderer* key_value_renderer_new (DConfKeyView* view) {
	return key_value_renderer_construct (TYPE_KEY_VALUE_RENDERER, view);
}


static void key_value_renderer_real_get_size (GtkCellRenderer* base, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height) {
	KeyValueRenderer * self;
	gint _vala_x_offset = 0;
	gint _vala_y_offset = 0;
	gint _vala_width = 0;
	gint _vala_height = 0;
	GtkCellRenderer* _tmp0_ = NULL;
	GtkCellRenderer* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	GdkRectangle* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	self = (KeyValueRenderer*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = key_value_renderer_get_renderer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = widget;
	_tmp3_ = cell_area;
	gtk_cell_renderer_get_size (_tmp1_, _tmp2_, _tmp3_, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_);
	_vala_x_offset = _tmp4_;
	_vala_y_offset = _tmp5_;
	_vala_width = _tmp6_;
	_vala_height = _tmp7_;
	if (x_offset) {
		*x_offset = _vala_x_offset;
	}
	if (y_offset) {
		*y_offset = _vala_y_offset;
	}
	if (width) {
		*width = _vala_width;
	}
	if (height) {
		*height = _vala_height;
	}
}


static void key_value_renderer_real_get_preferred_width (GtkCellRenderer* base, GtkWidget* widget, gint* minimum_size, gint* natural_size) {
	KeyValueRenderer * self;
	gint _vala_minimum_size = 0;
	gint _vala_natural_size = 0;
	GtkCellRenderer* _tmp0_ = NULL;
	GtkCellRenderer* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	self = (KeyValueRenderer*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = key_value_renderer_get_renderer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = widget;
	gtk_cell_renderer_get_preferred_width (_tmp1_, _tmp2_, &_tmp3_, &_tmp4_);
	_vala_minimum_size = _tmp3_;
	_vala_natural_size = _tmp4_;
	if (minimum_size) {
		*minimum_size = _vala_minimum_size;
	}
	if (natural_size) {
		*natural_size = _vala_natural_size;
	}
}


static void key_value_renderer_real_get_preferred_height_for_width (GtkCellRenderer* base, GtkWidget* widget, gint width, gint* minimum_height, gint* natural_height) {
	KeyValueRenderer * self;
	gint _vala_minimum_height = 0;
	gint _vala_natural_height = 0;
	GtkCellRenderer* _tmp0_ = NULL;
	GtkCellRenderer* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	self = (KeyValueRenderer*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = key_value_renderer_get_renderer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = widget;
	_tmp3_ = width;
	gtk_cell_renderer_get_preferred_height_for_width (_tmp1_, _tmp2_, _tmp3_, &_tmp4_, &_tmp5_);
	_vala_minimum_height = _tmp4_;
	_vala_natural_height = _tmp5_;
	if (minimum_height) {
		*minimum_height = _vala_minimum_height;
	}
	if (natural_height) {
		*natural_height = _vala_natural_height;
	}
}


static void key_value_renderer_real_get_preferred_height (GtkCellRenderer* base, GtkWidget* widget, gint* minimum_size, gint* natural_size) {
	KeyValueRenderer * self;
	gint _vala_minimum_size = 0;
	gint _vala_natural_size = 0;
	GtkCellRenderer* _tmp0_ = NULL;
	GtkCellRenderer* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	self = (KeyValueRenderer*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = key_value_renderer_get_renderer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = widget;
	gtk_cell_renderer_get_preferred_height (_tmp1_, _tmp2_, &_tmp3_, &_tmp4_);
	_vala_minimum_size = _tmp3_;
	_vala_natural_size = _tmp4_;
	if (minimum_size) {
		*minimum_size = _vala_minimum_size;
	}
	if (natural_size) {
		*natural_size = _vala_natural_size;
	}
}


static void key_value_renderer_real_get_preferred_width_for_height (GtkCellRenderer* base, GtkWidget* widget, gint height, gint* minimum_width, gint* natural_width) {
	KeyValueRenderer * self;
	gint _vala_minimum_width = 0;
	gint _vala_natural_width = 0;
	GtkCellRenderer* _tmp0_ = NULL;
	GtkCellRenderer* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	self = (KeyValueRenderer*) base;
	g_return_if_fail (widget != NULL);
	_tmp0_ = key_value_renderer_get_renderer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = widget;
	_tmp3_ = height;
	gtk_cell_renderer_get_preferred_width_for_height (_tmp1_, _tmp2_, _tmp3_, &_tmp4_, &_tmp5_);
	_vala_minimum_width = _tmp4_;
	_vala_natural_width = _tmp5_;
	if (minimum_width) {
		*minimum_width = _vala_minimum_width;
	}
	if (natural_width) {
		*natural_width = _vala_natural_width;
	}
}


static void key_value_renderer_real_render (GtkCellRenderer* base, cairo_t* context, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags) {
	KeyValueRenderer * self;
	GtkCellRenderer* _tmp0_ = NULL;
	GtkCellRenderer* _tmp1_ = NULL;
	cairo_t* _tmp2_ = NULL;
	GtkWidget* _tmp3_ = NULL;
	GdkRectangle _tmp4_ = {0};
	GdkRectangle _tmp5_ = {0};
	GtkCellRendererState _tmp6_ = 0;
	self = (KeyValueRenderer*) base;
	g_return_if_fail (context != NULL);
	g_return_if_fail (widget != NULL);
	g_return_if_fail (background_area != NULL);
	g_return_if_fail (cell_area != NULL);
	_tmp0_ = key_value_renderer_get_renderer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = context;
	_tmp3_ = widget;
	_tmp4_ = *background_area;
	_tmp5_ = *cell_area;
	_tmp6_ = flags;
	gtk_cell_renderer_render (_tmp1_, _tmp2_, _tmp3_, &_tmp4_, &_tmp5_, _tmp6_);
}


static gboolean key_value_renderer_real_activate (GtkCellRenderer* base, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags) {
	KeyValueRenderer * self;
	gboolean result = FALSE;
	GtkCellRenderer* _tmp0_ = NULL;
	GtkCellRenderer* _tmp1_ = NULL;
	GdkEvent* _tmp2_ = NULL;
	GtkWidget* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	GdkRectangle _tmp5_ = {0};
	GdkRectangle _tmp6_ = {0};
	GtkCellRendererState _tmp7_ = 0;
	gboolean _tmp8_ = FALSE;
	self = (KeyValueRenderer*) base;
	g_return_val_if_fail (event != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (path != NULL, FALSE);
	g_return_val_if_fail (background_area != NULL, FALSE);
	g_return_val_if_fail (cell_area != NULL, FALSE);
	_tmp0_ = key_value_renderer_get_renderer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = event;
	_tmp3_ = widget;
	_tmp4_ = path;
	_tmp5_ = *background_area;
	_tmp6_ = *cell_area;
	_tmp7_ = flags;
	_tmp8_ = gtk_cell_renderer_activate (_tmp1_, _tmp2_, _tmp3_, _tmp4_, &_tmp5_, &_tmp6_, _tmp7_);
	result = _tmp8_;
	return result;
}


static GtkCellEditable* key_value_renderer_real_start_editing (GtkCellRenderer* base, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags) {
	KeyValueRenderer * self;
	GtkCellEditable* result = NULL;
	GtkCellRenderer* _tmp0_ = NULL;
	GtkCellRenderer* _tmp1_ = NULL;
	GdkEvent* _tmp2_ = NULL;
	GtkWidget* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	GdkRectangle _tmp5_ = {0};
	GdkRectangle _tmp6_ = {0};
	GtkCellRendererState _tmp7_ = 0;
	GtkCellEditable* _tmp8_ = NULL;
	self = (KeyValueRenderer*) base;
	g_return_val_if_fail (event != NULL, NULL);
	g_return_val_if_fail (widget != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	g_return_val_if_fail (background_area != NULL, NULL);
	g_return_val_if_fail (cell_area != NULL, NULL);
	_tmp0_ = key_value_renderer_get_renderer (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = event;
	_tmp3_ = widget;
	_tmp4_ = path;
	_tmp5_ = *background_area;
	_tmp6_ = *cell_area;
	_tmp7_ = flags;
	_tmp8_ = gtk_cell_renderer_start_editing (_tmp1_, _tmp2_, _tmp3_, _tmp4_, &_tmp5_, &_tmp6_, _tmp7_);
	result = _tmp8_;
	return result;
}


static Key* key_value_renderer_get_key_from_path (KeyValueRenderer* self, const gchar* path) {
	Key* result = NULL;
	GtkTreeIter iter = {0};
	DConfKeyView* _tmp0_ = NULL;
	GtkTreeModel* _tmp1_ = NULL;
	GtkTreeModel* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GtkTreeIter _tmp4_ = {0};
	Key* key = NULL;
	DConfKeyView* _tmp5_ = NULL;
	GtkTreeModel* _tmp6_ = NULL;
	GtkTreeModel* _tmp7_ = NULL;
	GtkTreeIter _tmp8_ = {0};
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	_tmp0_ = self->priv->view;
	_tmp1_ = gtk_tree_view_get_model ((GtkTreeView*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = path;
	gtk_tree_model_get_iter_from_string (_tmp2_, &_tmp4_, _tmp3_);
	iter = _tmp4_;
	_tmp5_ = self->priv->view;
	_tmp6_ = gtk_tree_view_get_model ((GtkTreeView*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = iter;
	gtk_tree_model_get (_tmp7_, &_tmp8_, 0, &key, -1, -1);
	result = key;
	return result;
}


static void key_value_renderer_toggle_cb (KeyValueRenderer* self, GtkCellRendererToggle* renderer, const gchar* path) {
	Key* key = NULL;
	const gchar* _tmp0_ = NULL;
	Key* _tmp1_ = NULL;
	GVariant* _tmp2_ = NULL;
	GVariant* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	GVariant* _tmp5_ = NULL;
	GVariant* _tmp6_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (renderer != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = path;
	_tmp1_ = key_value_renderer_get_key_from_path (self, _tmp0_);
	key = _tmp1_;
	_tmp2_ = key_get_value (key);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_variant_get_boolean (_tmp3_);
	_tmp5_ = g_variant_new_boolean (!_tmp4_);
	g_variant_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	key_set_value (key, _tmp6_);
	_g_variant_unref0 (_tmp6_);
	_g_object_unref0 (key);
}


static void key_value_renderer_text_edited_cb (KeyValueRenderer* self, GtkCellRendererText* renderer, const gchar* path, const gchar* text) {
	Key* key = NULL;
	const gchar* _tmp0_ = NULL;
	Key* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	Key* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (renderer != NULL);
	g_return_if_fail (path != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = path;
	_tmp1_ = key_value_renderer_get_key_from_path (self, _tmp0_);
	key = _tmp1_;
	_tmp3_ = key;
	_tmp4_ = key_get_type_string (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp5_, "s") == 0) {
		_tmp2_ = TRUE;
	} else {
		Key* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		_tmp6_ = key;
		_tmp7_ = key_get_type_string (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp2_ = g_strcmp0 (_tmp8_, "<enum>") == 0;
	}
	if (_tmp2_) {
		Key* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		GVariant* _tmp11_ = NULL;
		GVariant* _tmp12_ = NULL;
		_tmp9_ = key;
		_tmp10_ = text;
		_tmp11_ = g_variant_new_string (_tmp10_);
		g_variant_ref_sink (_tmp11_);
		_tmp12_ = _tmp11_;
		key_set_value (_tmp9_, _tmp12_);
		_g_variant_unref0 (_tmp12_);
	} else {
		{
			GVariant* value = NULL;
			Key* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
			GVariantType* _tmp16_ = NULL;
			GVariantType* _tmp17_ = NULL;
			const gchar* _tmp18_ = NULL;
			GVariant* _tmp19_ = NULL;
			GVariant* _tmp20_ = NULL;
			Key* _tmp21_ = NULL;
			GVariant* _tmp22_ = NULL;
			_tmp13_ = key;
			_tmp14_ = key_get_type_string (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = g_variant_type_new (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = text;
			_tmp19_ = g_variant_parse (_tmp17_, _tmp18_, NULL, NULL, &_inner_error_);
			_tmp20_ = _tmp19_;
			_g_variant_type_free0 (_tmp17_);
			value = _tmp20_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				if (_inner_error_->domain == G_VARIANT_PARSE_ERROR) {
					goto __catch12_g_variant_parse_error;
				}
				_g_object_unref0 (key);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
			_tmp21_ = key;
			_tmp22_ = value;
			key_set_value (_tmp21_, _tmp22_);
			_g_variant_unref0 (value);
		}
		goto __finally12;
		__catch12_g_variant_parse_error:
		{
			GError* e = NULL;
			GtkMessageDialog* dialog = NULL;
			const gchar* _tmp23_ = NULL;
			GError* _tmp24_ = NULL;
			const gchar* _tmp25_ = NULL;
			GtkMessageDialog* _tmp26_ = NULL;
			GtkMessageDialog* _tmp27_ = NULL;
			GtkMessageDialog* _tmp28_ = NULL;
			e = _inner_error_;
			_inner_error_ = NULL;
			_tmp23_ = _ ("Error setting value: %s");
			_tmp24_ = e;
			_tmp25_ = _tmp24_->message;
			_tmp26_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, _tmp23_, _tmp25_);
			g_object_ref_sink (_tmp26_);
			dialog = _tmp26_;
			_tmp27_ = dialog;
			gtk_dialog_run ((GtkDialog*) _tmp27_);
			_tmp28_ = dialog;
			gtk_widget_destroy ((GtkWidget*) _tmp28_);
			_g_object_unref0 (dialog);
			_g_error_free0 (e);
		}
		__finally12:
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (key);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_g_object_unref0 (key);
}


static gdouble double_parse (const gchar* str) {
	gdouble result = 0.0;
	const gchar* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
	g_return_val_if_fail (str != NULL, 0.0);
	_tmp0_ = str;
	_tmp1_ = g_ascii_strtod (_tmp0_, NULL);
	result = _tmp1_;
	return result;
}


static void key_value_renderer_spin_edited_cb (KeyValueRenderer* self, GtkCellRendererText* renderer, const gchar* path, const gchar* text) {
	Key* key = NULL;
	const gchar* _tmp0_ = NULL;
	Key* _tmp1_ = NULL;
	Key* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	GQuark _tmp7_ = 0U;
	static GQuark _tmp6_label0 = 0;
	static GQuark _tmp6_label1 = 0;
	static GQuark _tmp6_label2 = 0;
	static GQuark _tmp6_label3 = 0;
	static GQuark _tmp6_label4 = 0;
	static GQuark _tmp6_label5 = 0;
	static GQuark _tmp6_label6 = 0;
	static GQuark _tmp6_label7 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (renderer != NULL);
	g_return_if_fail (path != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = path;
	_tmp1_ = key_value_renderer_get_key_from_path (self, _tmp0_);
	key = _tmp1_;
	_tmp2_ = key;
	_tmp3_ = key_get_type_string (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp7_ = (NULL == _tmp5_) ? 0 : g_quark_from_string (_tmp5_);
	if (_tmp7_ == ((0 != _tmp6_label0) ? _tmp6_label0 : (_tmp6_label0 = g_quark_from_static_string ("y")))) {
		switch (0) {
			default:
			{
				Key* _tmp8_ = NULL;
				const gchar* _tmp9_ = NULL;
				gint _tmp10_ = 0;
				GVariant* _tmp11_ = NULL;
				GVariant* _tmp12_ = NULL;
				_tmp8_ = key;
				_tmp9_ = text;
				_tmp10_ = atoi (_tmp9_);
				_tmp11_ = g_variant_new_byte ((guchar) _tmp10_);
				g_variant_ref_sink (_tmp11_);
				_tmp12_ = _tmp11_;
				key_set_value (_tmp8_, _tmp12_);
				_g_variant_unref0 (_tmp12_);
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label1) ? _tmp6_label1 : (_tmp6_label1 = g_quark_from_static_string ("n")))) {
		switch (0) {
			default:
			{
				Key* _tmp13_ = NULL;
				const gchar* _tmp14_ = NULL;
				gint _tmp15_ = 0;
				GVariant* _tmp16_ = NULL;
				GVariant* _tmp17_ = NULL;
				_tmp13_ = key;
				_tmp14_ = text;
				_tmp15_ = atoi (_tmp14_);
				_tmp16_ = g_variant_new_int16 ((gint16) _tmp15_);
				g_variant_ref_sink (_tmp16_);
				_tmp17_ = _tmp16_;
				key_set_value (_tmp13_, _tmp17_);
				_g_variant_unref0 (_tmp17_);
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label2) ? _tmp6_label2 : (_tmp6_label2 = g_quark_from_static_string ("q")))) {
		switch (0) {
			default:
			{
				Key* _tmp18_ = NULL;
				const gchar* _tmp19_ = NULL;
				gint _tmp20_ = 0;
				GVariant* _tmp21_ = NULL;
				GVariant* _tmp22_ = NULL;
				_tmp18_ = key;
				_tmp19_ = text;
				_tmp20_ = atoi (_tmp19_);
				_tmp21_ = g_variant_new_uint16 ((guint16) _tmp20_);
				g_variant_ref_sink (_tmp21_);
				_tmp22_ = _tmp21_;
				key_set_value (_tmp18_, _tmp22_);
				_g_variant_unref0 (_tmp22_);
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label3) ? _tmp6_label3 : (_tmp6_label3 = g_quark_from_static_string ("i")))) {
		switch (0) {
			default:
			{
				Key* _tmp23_ = NULL;
				const gchar* _tmp24_ = NULL;
				gint _tmp25_ = 0;
				GVariant* _tmp26_ = NULL;
				GVariant* _tmp27_ = NULL;
				_tmp23_ = key;
				_tmp24_ = text;
				_tmp25_ = atoi (_tmp24_);
				_tmp26_ = g_variant_new_int32 ((gint32) _tmp25_);
				g_variant_ref_sink (_tmp26_);
				_tmp27_ = _tmp26_;
				key_set_value (_tmp23_, _tmp27_);
				_g_variant_unref0 (_tmp27_);
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label4) ? _tmp6_label4 : (_tmp6_label4 = g_quark_from_static_string ("u")))) {
		switch (0) {
			default:
			{
				Key* _tmp28_ = NULL;
				const gchar* _tmp29_ = NULL;
				gint _tmp30_ = 0;
				GVariant* _tmp31_ = NULL;
				GVariant* _tmp32_ = NULL;
				_tmp28_ = key;
				_tmp29_ = text;
				_tmp30_ = atoi (_tmp29_);
				_tmp31_ = g_variant_new_uint32 ((guint32) _tmp30_);
				g_variant_ref_sink (_tmp31_);
				_tmp32_ = _tmp31_;
				key_set_value (_tmp28_, _tmp32_);
				_g_variant_unref0 (_tmp32_);
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label5) ? _tmp6_label5 : (_tmp6_label5 = g_quark_from_static_string ("x")))) {
		switch (0) {
			default:
			{
				Key* _tmp33_ = NULL;
				const gchar* _tmp34_ = NULL;
				gint _tmp35_ = 0;
				GVariant* _tmp36_ = NULL;
				GVariant* _tmp37_ = NULL;
				_tmp33_ = key;
				_tmp34_ = text;
				_tmp35_ = atoi (_tmp34_);
				_tmp36_ = g_variant_new_int64 ((gint64) _tmp35_);
				g_variant_ref_sink (_tmp36_);
				_tmp37_ = _tmp36_;
				key_set_value (_tmp33_, _tmp37_);
				_g_variant_unref0 (_tmp37_);
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label6) ? _tmp6_label6 : (_tmp6_label6 = g_quark_from_static_string ("t")))) {
		switch (0) {
			default:
			{
				Key* _tmp38_ = NULL;
				const gchar* _tmp39_ = NULL;
				gint _tmp40_ = 0;
				GVariant* _tmp41_ = NULL;
				GVariant* _tmp42_ = NULL;
				_tmp38_ = key;
				_tmp39_ = text;
				_tmp40_ = atoi (_tmp39_);
				_tmp41_ = g_variant_new_uint64 ((guint64) _tmp40_);
				g_variant_ref_sink (_tmp41_);
				_tmp42_ = _tmp41_;
				key_set_value (_tmp38_, _tmp42_);
				_g_variant_unref0 (_tmp42_);
				break;
			}
		}
	} else if (_tmp7_ == ((0 != _tmp6_label7) ? _tmp6_label7 : (_tmp6_label7 = g_quark_from_static_string ("d")))) {
		switch (0) {
			default:
			{
				Key* _tmp43_ = NULL;
				const gchar* _tmp44_ = NULL;
				gdouble _tmp45_ = 0.0;
				GVariant* _tmp46_ = NULL;
				GVariant* _tmp47_ = NULL;
				_tmp43_ = key;
				_tmp44_ = text;
				_tmp45_ = double_parse (_tmp44_);
				_tmp46_ = g_variant_new_double (_tmp45_);
				g_variant_ref_sink (_tmp46_);
				_tmp47_ = _tmp46_;
				key_set_value (_tmp43_, _tmp47_);
				_g_variant_unref0 (_tmp47_);
				break;
			}
		}
	}
	_g_object_unref0 (key);
}


Key* key_value_renderer_get_key (KeyValueRenderer* self) {
	Key* result;
	Key* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_key;
	result = _tmp0_;
	return result;
}


static gpointer _schema_choice_ref0 (gpointer self) {
	return self ? schema_choice_ref (self) : NULL;
}


void key_value_renderer_set_key (KeyValueRenderer* self, Key* value) {
	Key* _tmp0_ = NULL;
	Key* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	Key* _tmp3_ = NULL;
	Key* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	Key* _tmp36_ = NULL;
	Key* _tmp37_ = NULL;
	const gchar* _tmp38_ = NULL;
	const gchar* _tmp39_ = NULL;
	const gchar* _tmp40_ = NULL;
	GQuark _tmp42_ = 0U;
	static GQuark _tmp41_label0 = 0;
	static GQuark _tmp41_label1 = 0;
	static GQuark _tmp41_label2 = 0;
	static GQuark _tmp41_label3 = 0;
	static GQuark _tmp41_label4 = 0;
	static GQuark _tmp41_label5 = 0;
	static GQuark _tmp41_label6 = 0;
	static GQuark _tmp41_label7 = 0;
	static GQuark _tmp41_label8 = 0;
	static GQuark _tmp41_label9 = 0;
	static GQuark _tmp41_label10 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_key);
	self->priv->_key = _tmp1_;
	_tmp3_ = key_value_renderer_get_key (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = key_get_has_schema (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		Key* _tmp7_ = NULL;
		Key* _tmp8_ = NULL;
		SchemaKey* _tmp9_ = NULL;
		GList* _tmp10_ = NULL;
		_tmp7_ = key_value_renderer_get_key (self);
		_tmp8_ = _tmp7_;
		_tmp9_ = _tmp8_->schema;
		_tmp10_ = _tmp9_->choices;
		_tmp2_ = _tmp10_ != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkCellRendererCombo* _tmp11_ = NULL;
		Key* _tmp12_ = NULL;
		Key* _tmp13_ = NULL;
		GVariant* _tmp14_ = NULL;
		GVariant* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		GtkListStore* model = NULL;
		GtkListStore* _tmp18_ = NULL;
		Key* _tmp19_ = NULL;
		Key* _tmp20_ = NULL;
		SchemaKey* _tmp21_ = NULL;
		GList* _tmp22_ = NULL;
		GtkCellRendererCombo* _tmp34_ = NULL;
		GtkListStore* _tmp35_ = NULL;
		_tmp11_ = self->priv->combo_renderer;
		_tmp12_ = key_value_renderer_get_key (self);
		_tmp13_ = _tmp12_;
		_tmp14_ = key_get_value (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_variant_print (_tmp15_, FALSE);
		_tmp17_ = _tmp16_;
		g_object_set ((GtkCellRendererText*) _tmp11_, "text", _tmp17_, NULL);
		_g_free0 (_tmp17_);
		_tmp18_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING, -1);
		model = _tmp18_;
		_tmp19_ = key_value_renderer_get_key (self);
		_tmp20_ = _tmp19_;
		_tmp21_ = _tmp20_->schema;
		_tmp22_ = _tmp21_->choices;
		{
			GList* choice_collection = NULL;
			GList* choice_it = NULL;
			choice_collection = _tmp22_;
			for (choice_it = choice_collection; choice_it != NULL; choice_it = choice_it->next) {
				SchemaChoice* _tmp23_ = NULL;
				SchemaChoice* choice = NULL;
				_tmp23_ = _schema_choice_ref0 ((SchemaChoice*) choice_it->data);
				choice = _tmp23_;
				{
					GtkTreeIter iter = {0};
					GtkListStore* _tmp24_ = NULL;
					GtkTreeIter _tmp25_ = {0};
					GtkListStore* _tmp26_ = NULL;
					GtkTreeIter _tmp27_ = {0};
					SchemaChoice* _tmp28_ = NULL;
					const gchar* _tmp29_ = NULL;
					SchemaChoice* _tmp30_ = NULL;
					GVariant* _tmp31_ = NULL;
					gchar* _tmp32_ = NULL;
					gchar* _tmp33_ = NULL;
					_tmp24_ = model;
					gtk_list_store_append (_tmp24_, &_tmp25_);
					iter = _tmp25_;
					_tmp26_ = model;
					_tmp27_ = iter;
					_tmp28_ = choice;
					_tmp29_ = _tmp28_->name;
					_tmp30_ = choice;
					_tmp31_ = _tmp30_->value;
					_tmp32_ = g_variant_print (_tmp31_, FALSE);
					_tmp33_ = _tmp32_;
					gtk_list_store_set (_tmp26_, &_tmp27_, 0, _tmp29_, 1, _tmp33_, -1, -1);
					_g_free0 (_tmp33_);
					_schema_choice_unref0 (choice);
				}
			}
		}
		_tmp34_ = self->priv->combo_renderer;
		_tmp35_ = model;
		g_object_set (_tmp34_, "model", (GtkTreeModel*) _tmp35_, NULL);
		g_object_set ((GtkCellRenderer*) self, "mode", GTK_CELL_RENDERER_MODE_EDITABLE, NULL);
		_g_object_unref0 (model);
		return;
	}
	_tmp36_ = key_value_renderer_get_key (self);
	_tmp37_ = _tmp36_;
	_tmp38_ = key_get_type_string (_tmp37_);
	_tmp39_ = _tmp38_;
	_tmp40_ = _tmp39_;
	_tmp42_ = (NULL == _tmp40_) ? 0 : g_quark_from_string (_tmp40_);
	if (_tmp42_ == ((0 != _tmp41_label0) ? _tmp41_label0 : (_tmp41_label0 = g_quark_from_static_string ("<enum>")))) {
		switch (0) {
			default:
			{
				GtkCellRendererCombo* _tmp43_ = NULL;
				Key* _tmp44_ = NULL;
				Key* _tmp45_ = NULL;
				GVariant* _tmp46_ = NULL;
				GVariant* _tmp47_ = NULL;
				const gchar* _tmp48_ = NULL;
				GtkCellRendererCombo* _tmp49_ = NULL;
				Key* _tmp50_ = NULL;
				Key* _tmp51_ = NULL;
				SchemaKey* _tmp52_ = NULL;
				Schema* _tmp53_ = NULL;
				SchemaList* _tmp54_ = NULL;
				GHashTable* _tmp55_ = NULL;
				Key* _tmp56_ = NULL;
				Key* _tmp57_ = NULL;
				SchemaKey* _tmp58_ = NULL;
				const gchar* _tmp59_ = NULL;
				gconstpointer _tmp60_ = NULL;
				EnumModel* _tmp61_ = NULL;
				EnumModel* _tmp62_ = NULL;
				_tmp43_ = self->priv->combo_renderer;
				_tmp44_ = key_value_renderer_get_key (self);
				_tmp45_ = _tmp44_;
				_tmp46_ = key_get_value (_tmp45_);
				_tmp47_ = _tmp46_;
				_tmp48_ = g_variant_get_string (_tmp47_, NULL);
				g_object_set ((GtkCellRendererText*) _tmp43_, "text", _tmp48_, NULL);
				_tmp49_ = self->priv->combo_renderer;
				_tmp50_ = key_value_renderer_get_key (self);
				_tmp51_ = _tmp50_;
				_tmp52_ = _tmp51_->schema;
				_tmp53_ = _tmp52_->schema;
				_tmp54_ = _tmp53_->list;
				_tmp55_ = _tmp54_->enums;
				_tmp56_ = key_value_renderer_get_key (self);
				_tmp57_ = _tmp56_;
				_tmp58_ = _tmp57_->schema;
				_tmp59_ = _tmp58_->enum_name;
				_tmp60_ = g_hash_table_lookup (_tmp55_, _tmp59_);
				_tmp61_ = enum_model_new ((SchemaEnum*) _tmp60_);
				_tmp62_ = _tmp61_;
				g_object_set (_tmp49_, "model", (GtkTreeModel*) _tmp62_, NULL);
				_g_object_unref0 (_tmp62_);
				g_object_set ((GtkCellRenderer*) self, "mode", GTK_CELL_RENDERER_MODE_EDITABLE, NULL);
				break;
			}
		}
	} else if (_tmp42_ == ((0 != _tmp41_label1) ? _tmp41_label1 : (_tmp41_label1 = g_quark_from_static_string ("b")))) {
		switch (0) {
			default:
			{
				GtkCellRendererToggle* _tmp63_ = NULL;
				Key* _tmp64_ = NULL;
				Key* _tmp65_ = NULL;
				GVariant* _tmp66_ = NULL;
				GVariant* _tmp67_ = NULL;
				gboolean _tmp68_ = FALSE;
				_tmp63_ = self->priv->toggle_renderer;
				_tmp64_ = key_value_renderer_get_key (self);
				_tmp65_ = _tmp64_;
				_tmp66_ = key_get_value (_tmp65_);
				_tmp67_ = _tmp66_;
				_tmp68_ = g_variant_get_boolean (_tmp67_);
				gtk_cell_renderer_toggle_set_active (_tmp63_, _tmp68_);
				g_object_set ((GtkCellRenderer*) self, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
				break;
			}
		}
	} else if (_tmp42_ == ((0 != _tmp41_label2) ? _tmp41_label2 : (_tmp41_label2 = g_quark_from_static_string ("s")))) {
		switch (0) {
			default:
			{
				GtkCellRendererText* _tmp69_ = NULL;
				Key* _tmp70_ = NULL;
				Key* _tmp71_ = NULL;
				GVariant* _tmp72_ = NULL;
				GVariant* _tmp73_ = NULL;
				const gchar* _tmp74_ = NULL;
				_tmp69_ = self->priv->text_renderer;
				_tmp70_ = key_value_renderer_get_key (self);
				_tmp71_ = _tmp70_;
				_tmp72_ = key_get_value (_tmp71_);
				_tmp73_ = _tmp72_;
				_tmp74_ = g_variant_get_string (_tmp73_, NULL);
				g_object_set (_tmp69_, "text", _tmp74_, NULL);
				g_object_set ((GtkCellRenderer*) self, "mode", GTK_CELL_RENDERER_MODE_EDITABLE, NULL);
				break;
			}
		}
	} else if ((((((((_tmp42_ == ((0 != _tmp41_label3) ? _tmp41_label3 : (_tmp41_label3 = g_quark_from_static_string ("y")))) || (_tmp42_ == ((0 != _tmp41_label4) ? _tmp41_label4 : (_tmp41_label4 = g_quark_from_static_string ("n"))))) || (_tmp42_ == ((0 != _tmp41_label5) ? _tmp41_label5 : (_tmp41_label5 = g_quark_from_static_string ("q"))))) || (_tmp42_ == ((0 != _tmp41_label6) ? _tmp41_label6 : (_tmp41_label6 = g_quark_from_static_string ("i"))))) || (_tmp42_ == ((0 != _tmp41_label7) ? _tmp41_label7 : (_tmp41_label7 = g_quark_from_static_string ("u"))))) || (_tmp42_ == ((0 != _tmp41_label8) ? _tmp41_label8 : (_tmp41_label8 = g_quark_from_static_string ("x"))))) || (_tmp42_ == ((0 != _tmp41_label9) ? _tmp41_label9 : (_tmp41_label9 = g_quark_from_static_string ("t"))))) || (_tmp42_ == ((0 != _tmp41_label10) ? _tmp41_label10 : (_tmp41_label10 = g_quark_from_static_string ("d"))))) {
		switch (0) {
			default:
			{
				GtkCellRendererSpin* _tmp75_ = NULL;
				Key* _tmp76_ = NULL;
				Key* _tmp77_ = NULL;
				GVariant* _tmp78_ = NULL;
				GVariant* _tmp79_ = NULL;
				gchar* _tmp80_ = NULL;
				gchar* _tmp81_ = NULL;
				gdouble v = 0.0;
				Key* _tmp82_ = NULL;
				Key* _tmp83_ = NULL;
				GVariant* _tmp84_ = NULL;
				GVariant* _tmp85_ = NULL;
				gdouble _tmp86_ = 0.0;
				gdouble min = 0.0;
				gdouble max = 0.0;
				gboolean _tmp87_ = FALSE;
				Key* _tmp88_ = NULL;
				Key* _tmp89_ = NULL;
				gboolean _tmp90_ = FALSE;
				gboolean _tmp91_ = FALSE;
				GtkCellRendererSpin* _tmp118_ = NULL;
				gdouble _tmp119_ = 0.0;
				gdouble _tmp120_ = 0.0;
				gdouble _tmp121_ = 0.0;
				GtkAdjustment* _tmp122_ = NULL;
				GtkAdjustment* _tmp123_ = NULL;
				GtkCellRendererSpin* _tmp124_ = NULL;
				Key* _tmp125_ = NULL;
				Key* _tmp126_ = NULL;
				const gchar* _tmp127_ = NULL;
				const gchar* _tmp128_ = NULL;
				_tmp75_ = self->priv->spin_renderer;
				_tmp76_ = key_value_renderer_get_key (self);
				_tmp77_ = _tmp76_;
				_tmp78_ = key_get_value (_tmp77_);
				_tmp79_ = _tmp78_;
				_tmp80_ = g_variant_print (_tmp79_, FALSE);
				_tmp81_ = _tmp80_;
				g_object_set ((GtkCellRendererText*) _tmp75_, "text", _tmp81_, NULL);
				_g_free0 (_tmp81_);
				_tmp82_ = key_value_renderer_get_key (self);
				_tmp83_ = _tmp82_;
				_tmp84_ = key_get_value (_tmp83_);
				_tmp85_ = _tmp84_;
				_tmp86_ = key_value_renderer_get_variant_as_double (_tmp85_);
				v = _tmp86_;
				min = 0.0;
				max = 0.0;
				_tmp88_ = key_value_renderer_get_key (self);
				_tmp89_ = _tmp88_;
				_tmp90_ = key_get_has_schema (_tmp89_);
				_tmp91_ = _tmp90_;
				if (_tmp91_) {
					Key* _tmp92_ = NULL;
					Key* _tmp93_ = NULL;
					SchemaKey* _tmp94_ = NULL;
					SchemaValueRange* _tmp95_ = NULL;
					_tmp92_ = key_value_renderer_get_key (self);
					_tmp93_ = _tmp92_;
					_tmp94_ = _tmp93_->schema;
					_tmp95_ = _tmp94_->range;
					_tmp87_ = _tmp95_ != NULL;
				} else {
					_tmp87_ = FALSE;
				}
				if (_tmp87_) {
					Key* _tmp96_ = NULL;
					Key* _tmp97_ = NULL;
					SchemaKey* _tmp98_ = NULL;
					SchemaValueRange* _tmp99_ = NULL;
					GVariant* _tmp100_ = NULL;
					gdouble _tmp101_ = 0.0;
					Key* _tmp102_ = NULL;
					Key* _tmp103_ = NULL;
					SchemaKey* _tmp104_ = NULL;
					SchemaValueRange* _tmp105_ = NULL;
					GVariant* _tmp106_ = NULL;
					gdouble _tmp107_ = 0.0;
					_tmp96_ = key_value_renderer_get_key (self);
					_tmp97_ = _tmp96_;
					_tmp98_ = _tmp97_->schema;
					_tmp99_ = _tmp98_->range;
					_tmp100_ = _tmp99_->min;
					_tmp101_ = key_value_renderer_get_variant_as_double (_tmp100_);
					min = _tmp101_;
					_tmp102_ = key_value_renderer_get_key (self);
					_tmp103_ = _tmp102_;
					_tmp104_ = _tmp103_->schema;
					_tmp105_ = _tmp104_->range;
					_tmp106_ = _tmp105_->max;
					_tmp107_ = key_value_renderer_get_variant_as_double (_tmp106_);
					max = _tmp107_;
				} else {
					Key* _tmp108_ = NULL;
					Key* _tmp109_ = NULL;
					GVariant* _tmp110_ = NULL;
					GVariant* _tmp111_ = NULL;
					gdouble _tmp112_ = 0.0;
					Key* _tmp113_ = NULL;
					Key* _tmp114_ = NULL;
					GVariant* _tmp115_ = NULL;
					GVariant* _tmp116_ = NULL;
					gdouble _tmp117_ = 0.0;
					_tmp108_ = key_value_renderer_get_key (self);
					_tmp109_ = _tmp108_;
					_tmp110_ = key_get_min (_tmp109_);
					_tmp111_ = _tmp110_;
					_tmp112_ = key_value_renderer_get_variant_as_double (_tmp111_);
					min = _tmp112_;
					_g_variant_unref0 (_tmp111_);
					_tmp113_ = key_value_renderer_get_key (self);
					_tmp114_ = _tmp113_;
					_tmp115_ = key_get_max (_tmp114_);
					_tmp116_ = _tmp115_;
					_tmp117_ = key_value_renderer_get_variant_as_double (_tmp116_);
					max = _tmp117_;
					_g_variant_unref0 (_tmp116_);
				}
				_tmp118_ = self->priv->spin_renderer;
				_tmp119_ = v;
				_tmp120_ = min;
				_tmp121_ = max;
				_tmp122_ = gtk_adjustment_new (_tmp119_, _tmp120_, _tmp121_, (gdouble) 1, (gdouble) 0, (gdouble) 0);
				g_object_ref_sink (_tmp122_);
				_tmp123_ = _tmp122_;
				g_object_set (_tmp118_, "adjustment", _tmp123_, NULL);
				_g_object_unref0 (_tmp123_);
				_tmp124_ = self->priv->spin_renderer;
				g_object_set (_tmp124_, "digits", (guint) 0, NULL);
				_tmp125_ = key_value_renderer_get_key (self);
				_tmp126_ = _tmp125_;
				_tmp127_ = key_get_type_string (_tmp126_);
				_tmp128_ = _tmp127_;
				if (g_strcmp0 (_tmp128_, "d") == 0) {
					GtkCellRendererSpin* _tmp129_ = NULL;
					_tmp129_ = self->priv->spin_renderer;
					g_object_set (_tmp129_, "digits", (guint) 20, NULL);
				}
				g_object_set ((GtkCellRenderer*) self, "mode", GTK_CELL_RENDERER_MODE_EDITABLE, NULL);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				GtkCellRendererText* _tmp130_ = NULL;
				Key* _tmp131_ = NULL;
				Key* _tmp132_ = NULL;
				GVariant* _tmp133_ = NULL;
				GVariant* _tmp134_ = NULL;
				gchar* _tmp135_ = NULL;
				gchar* _tmp136_ = NULL;
				_tmp130_ = self->priv->text_renderer;
				_tmp131_ = key_value_renderer_get_key (self);
				_tmp132_ = _tmp131_;
				_tmp133_ = key_get_value (_tmp132_);
				_tmp134_ = _tmp133_;
				_tmp135_ = g_variant_print (_tmp134_, FALSE);
				_tmp136_ = _tmp135_;
				g_object_set (_tmp130_, "text", _tmp136_, NULL);
				_g_free0 (_tmp136_);
				g_object_set ((GtkCellRenderer*) self, "mode", GTK_CELL_RENDERER_MODE_EDITABLE, NULL);
				break;
			}
		}
	}
	g_object_notify ((GObject *) self, "key");
}


static GtkCellRenderer* key_value_renderer_get_renderer (KeyValueRenderer* self) {
	GtkCellRenderer* result;
	gboolean _tmp0_ = FALSE;
	Key* _tmp1_ = NULL;
	Key* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	Key* _tmp10_ = NULL;
	Key* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	GQuark _tmp16_ = 0U;
	static GQuark _tmp15_label0 = 0;
	static GQuark _tmp15_label1 = 0;
	static GQuark _tmp15_label2 = 0;
	static GQuark _tmp15_label3 = 0;
	static GQuark _tmp15_label4 = 0;
	static GQuark _tmp15_label5 = 0;
	static GQuark _tmp15_label6 = 0;
	static GQuark _tmp15_label7 = 0;
	static GQuark _tmp15_label8 = 0;
	static GQuark _tmp15_label9 = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = key_value_renderer_get_key (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = key_get_has_schema (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		Key* _tmp5_ = NULL;
		Key* _tmp6_ = NULL;
		SchemaKey* _tmp7_ = NULL;
		GList* _tmp8_ = NULL;
		_tmp5_ = key_value_renderer_get_key (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_->schema;
		_tmp8_ = _tmp7_->choices;
		_tmp0_ = _tmp8_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkCellRendererCombo* _tmp9_ = NULL;
		_tmp9_ = self->priv->combo_renderer;
		result = (GtkCellRenderer*) _tmp9_;
		return result;
	}
	_tmp10_ = key_value_renderer_get_key (self);
	_tmp11_ = _tmp10_;
	_tmp12_ = key_get_type_string (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_;
	_tmp16_ = (NULL == _tmp14_) ? 0 : g_quark_from_string (_tmp14_);
	if (_tmp16_ == ((0 != _tmp15_label0) ? _tmp15_label0 : (_tmp15_label0 = g_quark_from_static_string ("<enum>")))) {
		switch (0) {
			default:
			{
				GtkCellRendererCombo* _tmp17_ = NULL;
				_tmp17_ = self->priv->combo_renderer;
				result = (GtkCellRenderer*) _tmp17_;
				return result;
			}
		}
	} else if (_tmp16_ == ((0 != _tmp15_label1) ? _tmp15_label1 : (_tmp15_label1 = g_quark_from_static_string ("b")))) {
		switch (0) {
			default:
			{
				GtkCellRendererToggle* _tmp18_ = NULL;
				_tmp18_ = self->priv->toggle_renderer;
				result = (GtkCellRenderer*) _tmp18_;
				return result;
			}
		}
	} else if ((((((((_tmp16_ == ((0 != _tmp15_label2) ? _tmp15_label2 : (_tmp15_label2 = g_quark_from_static_string ("y")))) || (_tmp16_ == ((0 != _tmp15_label3) ? _tmp15_label3 : (_tmp15_label3 = g_quark_from_static_string ("n"))))) || (_tmp16_ == ((0 != _tmp15_label4) ? _tmp15_label4 : (_tmp15_label4 = g_quark_from_static_string ("q"))))) || (_tmp16_ == ((0 != _tmp15_label5) ? _tmp15_label5 : (_tmp15_label5 = g_quark_from_static_string ("i"))))) || (_tmp16_ == ((0 != _tmp15_label6) ? _tmp15_label6 : (_tmp15_label6 = g_quark_from_static_string ("u"))))) || (_tmp16_ == ((0 != _tmp15_label7) ? _tmp15_label7 : (_tmp15_label7 = g_quark_from_static_string ("x"))))) || (_tmp16_ == ((0 != _tmp15_label8) ? _tmp15_label8 : (_tmp15_label8 = g_quark_from_static_string ("t"))))) || (_tmp16_ == ((0 != _tmp15_label9) ? _tmp15_label9 : (_tmp15_label9 = g_quark_from_static_string ("d"))))) {
		switch (0) {
			default:
			{
				GtkCellRendererSpin* _tmp19_ = NULL;
				_tmp19_ = self->priv->spin_renderer;
				result = (GtkCellRenderer*) _tmp19_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				GtkCellRendererText* _tmp20_ = NULL;
				_tmp20_ = self->priv->text_renderer;
				result = (GtkCellRenderer*) _tmp20_;
				return result;
			}
		}
	}
}


static void key_value_renderer_set_renderer (KeyValueRenderer* self, GtkCellRenderer* value) {
	g_return_if_fail (self != NULL);
}


static void key_value_renderer_class_init (KeyValueRendererClass * klass) {
	key_value_renderer_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (KeyValueRendererPrivate));
	((GtkCellRendererClass *) klass)->get_size = key_value_renderer_real_get_size;
	((GtkCellRendererClass *) klass)->get_preferred_width = key_value_renderer_real_get_preferred_width;
	((GtkCellRendererClass *) klass)->get_preferred_height_for_width = key_value_renderer_real_get_preferred_height_for_width;
	((GtkCellRendererClass *) klass)->get_preferred_height = key_value_renderer_real_get_preferred_height;
	((GtkCellRendererClass *) klass)->get_preferred_width_for_height = key_value_renderer_real_get_preferred_width_for_height;
	((GtkCellRendererClass *) klass)->render = key_value_renderer_real_render;
	((GtkCellRendererClass *) klass)->activate = key_value_renderer_real_activate;
	((GtkCellRendererClass *) klass)->start_editing = key_value_renderer_real_start_editing;
	G_OBJECT_CLASS (klass)->get_property = _vala_key_value_renderer_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_key_value_renderer_set_property;
	G_OBJECT_CLASS (klass)->finalize = key_value_renderer_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_VALUE_RENDERER_KEY, g_param_spec_object ("key", "key", "key", TYPE_KEY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void key_value_renderer_instance_init (KeyValueRenderer * self) {
	self->priv = KEY_VALUE_RENDERER_GET_PRIVATE (self);
}


static void key_value_renderer_finalize (GObject* obj) {
	KeyValueRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_VALUE_RENDERER, KeyValueRenderer);
	_g_object_unref0 (self->priv->view);
	_g_object_unref0 (self->priv->text_renderer);
	_g_object_unref0 (self->priv->spin_renderer);
	_g_object_unref0 (self->priv->toggle_renderer);
	_g_object_unref0 (self->priv->combo_renderer);
	_g_object_unref0 (self->priv->_key);
	G_OBJECT_CLASS (key_value_renderer_parent_class)->finalize (obj);
}


GType key_value_renderer_get_type (void) {
	static volatile gsize key_value_renderer_type_id__volatile = 0;
	if (g_once_init_enter (&key_value_renderer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (KeyValueRendererClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_value_renderer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyValueRenderer), 0, (GInstanceInitFunc) key_value_renderer_instance_init, NULL };
		GType key_value_renderer_type_id;
		key_value_renderer_type_id = g_type_register_static (gtk_cell_renderer_get_type (), "KeyValueRenderer", &g_define_type_info, 0);
		g_once_init_leave (&key_value_renderer_type_id__volatile, key_value_renderer_type_id);
	}
	return key_value_renderer_type_id__volatile;
}


static void _vala_key_value_renderer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	KeyValueRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_KEY_VALUE_RENDERER, KeyValueRenderer);
	switch (property_id) {
		case KEY_VALUE_RENDERER_KEY:
		g_value_set_object (value, key_value_renderer_get_key (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_key_value_renderer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	KeyValueRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_KEY_VALUE_RENDERER, KeyValueRenderer);
	switch (property_id) {
		case KEY_VALUE_RENDERER_KEY:
		key_value_renderer_set_key (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


DConfDirView* dconf_dir_view_construct (GType object_type) {
	DConfDirView * self = NULL;
	GtkCellRendererText* _tmp0_ = NULL;
	GtkCellRendererText* _tmp1_ = NULL;
	self = (DConfDirView*) g_object_new (object_type, NULL);
	gtk_tree_view_set_headers_visible ((GtkTreeView*) self, FALSE);
	_tmp0_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	gtk_tree_view_insert_column_with_attributes ((GtkTreeView*) self, -1, "Key", (GtkCellRenderer*) _tmp1_, "text", 1, NULL, NULL);
	_g_object_unref0 (_tmp1_);
	return self;
}


DConfDirView* dconf_dir_view_new (void) {
	return dconf_dir_view_construct (TYPE_DCONF_DIR_VIEW);
}


static void dconf_dir_view_class_init (DConfDirViewClass * klass) {
	dconf_dir_view_parent_class = g_type_class_peek_parent (klass);
}


static void dconf_dir_view_instance_init (DConfDirView * self) {
}


GType dconf_dir_view_get_type (void) {
	static volatile gsize dconf_dir_view_type_id__volatile = 0;
	if (g_once_init_enter (&dconf_dir_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DConfDirViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dconf_dir_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DConfDirView), 0, (GInstanceInitFunc) dconf_dir_view_instance_init, NULL };
		GType dconf_dir_view_type_id;
		dconf_dir_view_type_id = g_type_register_static (gtk_tree_view_get_type (), "DConfDirView", &g_define_type_info, 0);
		g_once_init_leave (&dconf_dir_view_type_id__volatile, dconf_dir_view_type_id);
	}
	return dconf_dir_view_type_id__volatile;
}


DConfKeyView* dconf_key_view_construct (GType object_type) {
	DConfKeyView * self = NULL;
	GtkTreeViewColumn* column = NULL;
	const gchar* _tmp0_ = NULL;
	GtkCellRendererText* _tmp1_ = NULL;
	GtkCellRendererText* _tmp2_ = NULL;
	GtkTreeViewColumn* _tmp3_ = NULL;
	GtkTreeViewColumn* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	KeyValueRenderer* _tmp6_ = NULL;
	KeyValueRenderer* _tmp7_ = NULL;
	self = (DConfKeyView*) g_object_new (object_type, NULL);
	_tmp0_ = _ ("Name");
	_tmp1_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_tree_view_column_new_with_attributes (_tmp0_, (GtkCellRenderer*) _tmp2_, "text", 1, "weight", 4, NULL, NULL);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	column = _tmp4_;
	gtk_tree_view_append_column ((GtkTreeView*) self, column);
	_tmp5_ = _ ("Value");
	_tmp6_ = key_value_renderer_new (self);
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	gtk_tree_view_insert_column_with_attributes ((GtkTreeView*) self, -1, _tmp5_, (GtkCellRenderer*) _tmp7_, "key", 0, NULL, NULL);
	_g_object_unref0 (_tmp7_);
	_g_object_unref0 (column);
	return self;
}


DConfKeyView* dconf_key_view_new (void) {
	return dconf_key_view_construct (TYPE_DCONF_KEY_VIEW);
}


static void dconf_key_view_class_init (DConfKeyViewClass * klass) {
	dconf_key_view_parent_class = g_type_class_peek_parent (klass);
}


static void dconf_key_view_instance_init (DConfKeyView * self) {
}


GType dconf_key_view_get_type (void) {
	static volatile gsize dconf_key_view_type_id__volatile = 0;
	if (g_once_init_enter (&dconf_key_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DConfKeyViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dconf_key_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DConfKeyView), 0, (GInstanceInitFunc) dconf_key_view_instance_init, NULL };
		GType dconf_key_view_type_id;
		dconf_key_view_type_id = g_type_register_static (gtk_tree_view_get_type (), "DConfKeyView", &g_define_type_info, 0);
		g_once_init_leave (&dconf_key_view_type_id__volatile, dconf_key_view_type_id);
	}
	return dconf_key_view_type_id__volatile;
}



