Logo Search packages:      
Sourcecode: d-conf version File versions  Download package

dconf-model.c

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


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <gtk/gtk.h>
#include <dconf.h>
#include <pango/pango.h>
#include <gio/gio.h>


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

#define TYPE_SETTINGS_MODEL (settings_model_get_type ())
#define SETTINGS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SETTINGS_MODEL, SettingsModel))
#define SETTINGS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SETTINGS_MODEL, SettingsModelClass))
#define IS_SETTINGS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SETTINGS_MODEL))
#define IS_SETTINGS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SETTINGS_MODEL))
#define SETTINGS_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SETTINGS_MODEL, SettingsModelClass))

typedef struct _SettingsModel SettingsModel;
typedef struct _SettingsModelClass SettingsModelClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _schema_key_unref0(var) ((var == NULL) ? NULL : (var = (schema_key_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _SettingsModelPrivate SettingsModelPrivate;

#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 (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_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 _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SchemaKeyPrivate SchemaKeyPrivate;

#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;
typedef struct _DirectoryPrivate DirectoryPrivate;

#define TYPE_KEY_MODEL (key_model_get_type ())
#define KEY_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_MODEL, KeyModel))
#define KEY_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_MODEL, KeyModelClass))
#define IS_KEY_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_MODEL))
#define IS_KEY_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_MODEL))
#define KEY_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_MODEL, KeyModelClass))

typedef struct _KeyModel KeyModel;
typedef struct _KeyModelClass KeyModelClass;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _SchemaPrivate SchemaPrivate;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _KeyModelPrivate KeyModelPrivate;
#define _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))

#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 _EnumModelPrivate EnumModelPrivate;
#define _schema_enum_unref0(var) ((var == NULL) ? NULL : (var = (schema_enum_unref (var), NULL)))

#define TYPE_SCHEMA_VALUE (schema_value_get_type ())
#define SCHEMA_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCHEMA_VALUE, SchemaValue))
#define SCHEMA_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCHEMA_VALUE, SchemaValueClass))
#define IS_SCHEMA_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCHEMA_VALUE))
#define IS_SCHEMA_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCHEMA_VALUE))
#define SCHEMA_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCHEMA_VALUE, SchemaValueClass))

typedef struct _SchemaValue SchemaValue;
typedef struct _SchemaValueClass SchemaValueClass;
typedef struct _SchemaValuePrivate SchemaValuePrivate;
typedef struct _SchemaEnumPrivate SchemaEnumPrivate;
#define _schema_list_unref0(var) ((var == NULL) ? NULL : (var = (schema_list_unref (var), NULL)))
#define _schema_unref0(var) ((var == NULL) ? NULL : (var = (schema_unref (var), NULL)))

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

struct _KeyClass {
      GObjectClass parent_class;
};

00182 struct _KeyPrivate {
      SettingsModel* model;
      GVariant* _value;
};

00187 struct _SettingsModel {
      GObject parent_instance;
      SettingsModelPrivate * priv;
      SchemaList* schemas;
      DConfClient* client;
};

00194 struct _SettingsModelClass {
      GObjectClass parent_class;
};

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

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

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

00235 struct _Directory {
      GObject parent_instance;
      DirectoryPrivate * priv;
      gchar* name;
      gchar* full_name;
      Directory* parent;
      GHashTable* _child_map;
      GList* _children;
      GHashTable* _key_map;
};

00246 struct _DirectoryClass {
      GObjectClass parent_class;
};

00250 struct _DirectoryPrivate {
      SettingsModel* model;
      KeyModel* _key_model;
      GList* _keys;
      gboolean have_children;
};

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

00272 struct _KeyModel {
      GObject parent_instance;
      KeyModelPrivate * priv;
};

00277 struct _KeyModelClass {
      GObjectClass parent_class;
};

00281 struct _KeyModelPrivate {
      Directory* directory;
};

00285 struct _EnumModel {
      GObject parent_instance;
      EnumModelPrivate * priv;
};

00290 struct _EnumModelClass {
      GObjectClass parent_class;
};

00294 struct _EnumModelPrivate {
      SchemaEnum* schema_enum;
};

00298 struct _SchemaValue {
      GObject parent_instance;
      SchemaValuePrivate * priv;
      guint index;
      gchar* nick;
      gint value;
};

00306 struct _SchemaValueClass {
      GObjectClass parent_class;
};

00310 struct _SchemaEnum {
      GTypeInstance parent_instance;
      volatile int ref_count;
      SchemaEnumPrivate * priv;
      SchemaList* list;
      gchar* id;
      GList* values;
};

00319 struct _SchemaEnumClass {
      GTypeClass parent_class;
      void (*finalize) (SchemaEnum *self);
};

00324 struct _SettingsModelPrivate {
      Directory* root;
};


static gpointer key_parent_class = NULL;
static gpointer directory_parent_class = NULL;
static gpointer key_model_parent_class = NULL;
static GtkTreeModelIface* key_model_gtk_tree_model_parent_iface = NULL;
static gpointer enum_model_parent_class = NULL;
static GtkTreeModelIface* enum_model_gtk_tree_model_parent_iface = NULL;
static gpointer settings_model_parent_class = NULL;
static GtkTreeModelIface* settings_model_gtk_tree_model_parent_iface = NULL;

GType key_get_type (void) G_GNUC_CONST;
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;
GType settings_model_get_type (void) G_GNUC_CONST;
#define KEY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_KEY, KeyPrivate))
enum  {
      KEY_DUMMY_PROPERTY,
      KEY_HAS_SCHEMA,
      KEY_INDEX,
      KEY_TYPE_STRING,
      KEY_VALUE,
      KEY_IS_DEFAULT
};
GVariant* key_get_min (Key* self);
GVariant* key_get_value (Key* self);
GVariant* key_get_max (Key* self);
static void key_item_changed (Key* self, const gchar* key);
Key* key_new (SettingsModel* model, Directory* parent, const gchar* name, const gchar* full_name);
Key* key_construct (GType object_type, SettingsModel* model, Directory* parent, const gchar* name, const gchar* full_name);
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_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_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;
static void _key_item_changed_settings_model_item_changed (SettingsModel* _sender, const gchar* key, gpointer self);
void key_set_to_default (Key* self);
gboolean key_get_has_schema (Key* self);
static void key_update_value (Key* self);
gint key_get_index (Key* self);
GList* directory_get_keys (Directory* self);
const gchar* key_get_type_string (Key* self);
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;
static void key_set_type_string (Key* self, const gchar* value);
void key_set_value (Key* self, GVariant* value);
gboolean key_get_is_default (Key* self);
static void key_finalize (GObject* obj);
static void _vala_key_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_key_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType key_model_get_type (void) G_GNUC_CONST;
#define DIRECTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECTORY, DirectoryPrivate))
enum  {
      DIRECTORY_DUMMY_PROPERTY,
      DIRECTORY_KEY_MODEL,
      DIRECTORY_INDEX,
      DIRECTORY_CHILDREN,
      DIRECTORY_KEYS
};
static void _g_free0_ (gpointer var);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
Directory* directory_new (SettingsModel* model, Directory* parent, const gchar* name, const gchar* full_name);
Directory* directory_construct (GType object_type, SettingsModel* model, Directory* parent, const gchar* name, const gchar* full_name);
Directory* directory_get_child (Directory* self, const gchar* name);
static gint directory_compare_directories (Directory* a, Directory* b);
static gint _directory_compare_directories_gcompare_func (gconstpointer a, gconstpointer b);
Key* directory_get_key (Directory* self, const gchar* name);
gint directory_compare_keys (Key* a, Key* b);
static gint _directory_compare_keys_gcompare_func (gconstpointer a, gconstpointer b);
void directory_load_schema (Directory* self, Schema* schema, const gchar* path);
static void directory_update_children (Directory* self);
KeyModel* directory_get_key_model (Directory* self);
KeyModel* key_model_new (Directory* directory);
KeyModel* key_model_construct (GType object_type, Directory* directory);
static void directory_set_key_model (Directory* self, KeyModel* value);
gint directory_get_index (Directory* self);
GList* directory_get_children (Directory* self);
static void directory_set_children (Directory* self, GList* value);
static void directory_set_keys (Directory* self, GList* value);
static void directory_finalize (GObject* obj);
static void _vala_directory_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_directory_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define KEY_MODEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_KEY_MODEL, KeyModelPrivate))
enum  {
      KEY_MODEL_DUMMY_PROPERTY
};
static void key_model_key_changed_cb (KeyModel* self, Key* key);
static void _key_model_key_changed_cb_key_value_changed (Key* _sender, gpointer self);
Key* key_model_get_key (KeyModel* self, GtkTreeIter* iter);
static GtkTreeModelFlags key_model_real_get_flags (GtkTreeModel* base);
static gint key_model_real_get_n_columns (GtkTreeModel* base);
static GType key_model_real_get_column_type (GtkTreeModel* base, gint index);
static void key_model_set_iter (KeyModel* self, GtkTreeIter* iter, Key* key);
static gboolean key_model_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path);
static GtkTreePath* key_model_real_get_path (GtkTreeModel* base, GtkTreeIter* iter);
static void key_model_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value);
static gboolean key_model_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter);
static gboolean key_model_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent);
static gboolean key_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter);
static gint key_model_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter);
static gboolean key_model_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n);
static gboolean key_model_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child);
static void key_model_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter);
static void key_model_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter);
static void key_model_finalize (GObject* obj);
GType enum_model_get_type (void) G_GNUC_CONST;
#define ENUM_MODEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ENUM_MODEL, EnumModelPrivate))
enum  {
      ENUM_MODEL_DUMMY_PROPERTY
};
EnumModel* enum_model_new (SchemaEnum* schema_enum);
EnumModel* enum_model_construct (GType object_type, SchemaEnum* schema_enum);
static GtkTreeModelFlags enum_model_real_get_flags (GtkTreeModel* base);
static gint enum_model_real_get_n_columns (GtkTreeModel* base);
static GType enum_model_real_get_column_type (GtkTreeModel* base, gint index);
GType schema_value_get_type (void) G_GNUC_CONST;
static void enum_model_set_iter (EnumModel* self, GtkTreeIter* iter, SchemaValue* value);
SchemaValue* enum_model_get_enum_value (EnumModel* self, GtkTreeIter* iter);
static gboolean enum_model_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path);
static GtkTreePath* enum_model_real_get_path (GtkTreeModel* base, GtkTreeIter* iter);
static void enum_model_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value);
static gboolean enum_model_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter);
static gboolean enum_model_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent);
static gboolean enum_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter);
static gint enum_model_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter);
static gboolean enum_model_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n);
static gboolean enum_model_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child);
static void enum_model_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter);
static void enum_model_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter);
static void enum_model_finalize (GObject* obj);
#define SETTINGS_MODEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SETTINGS_MODEL, SettingsModelPrivate))
enum  {
      SETTINGS_MODEL_DUMMY_PROPERTY
};
static void settings_model_watch_func (SettingsModel* self, DConfClient* client, const gchar* path, gchar** items, int items_length1, const gchar* tag);
SettingsModel* settings_model_new (void);
SettingsModel* settings_model_construct (GType object_type);
static void _settings_model_watch_func_dconf_watch_func (DConfClient* client, const gchar* path, gchar** items, int items_length1, const gchar* tag, gpointer self);
SchemaList* schema_list_new (void);
SchemaList* schema_list_construct (GType object_type);
void schema_list_load_directory (SchemaList* self, const gchar* dir, GError** error);
static GtkTreeModelFlags settings_model_real_get_flags (GtkTreeModel* base);
static gint settings_model_real_get_n_columns (GtkTreeModel* base);
static GType settings_model_real_get_column_type (GtkTreeModel* base, gint index);
static void settings_model_set_iter (SettingsModel* self, GtkTreeIter* iter, Directory* directory);
Directory* settings_model_get_directory (SettingsModel* self, GtkTreeIter* iter);
static gboolean settings_model_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path);
static GtkTreePath* settings_model_real_get_path (GtkTreeModel* base, GtkTreeIter* iter);
static void settings_model_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value);
static gboolean settings_model_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter);
static gboolean settings_model_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent);
static gboolean settings_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter);
static gint settings_model_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter);
static gboolean settings_model_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n);
static gboolean settings_model_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child);
static void settings_model_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter);
static void settings_model_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter);
static void settings_model_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


GVariant* key_get_min (Key* self) {
      GVariant* result = NULL;
      GVariant* _tmp0_ = NULL;
      GVariantClass _tmp1_;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = key_get_value (self);
      _tmp1_ = g_variant_classify (_tmp0_);
      switch (_tmp1_) {
            case G_VARIANT_CLASS_BYTE:
            {
                  GVariant* _tmp2_ = NULL;
                  _tmp2_ = g_variant_new_byte ((guchar) 0);
                  result = g_variant_ref_sink (_tmp2_);
                  return result;
            }
            case G_VARIANT_CLASS_INT16:
            {
                  GVariant* _tmp3_ = NULL;
                  _tmp3_ = g_variant_new_int16 (G_MININT16);
                  result = g_variant_ref_sink (_tmp3_);
                  return result;
            }
            case G_VARIANT_CLASS_UINT16:
            {
                  GVariant* _tmp4_ = NULL;
                  _tmp4_ = g_variant_new_uint16 (0U);
                  result = g_variant_ref_sink (_tmp4_);
                  return result;
            }
            case G_VARIANT_CLASS_INT32:
            {
                  GVariant* _tmp5_ = NULL;
                  _tmp5_ = g_variant_new_int32 (G_MININT32);
                  result = g_variant_ref_sink (_tmp5_);
                  return result;
            }
            case G_VARIANT_CLASS_UINT32:
            {
                  GVariant* _tmp6_ = NULL;
                  _tmp6_ = g_variant_new_uint32 (0U);
                  result = g_variant_ref_sink (_tmp6_);
                  return result;
            }
            case G_VARIANT_CLASS_INT64:
            {
                  GVariant* _tmp7_ = NULL;
                  _tmp7_ = g_variant_new_int64 (G_MININT64);
                  result = g_variant_ref_sink (_tmp7_);
                  return result;
            }
            case G_VARIANT_CLASS_UINT64:
            {
                  GVariant* _tmp8_ = NULL;
                  _tmp8_ = g_variant_new_uint64 (0ULL);
                  result = g_variant_ref_sink (_tmp8_);
                  return result;
            }
            case G_VARIANT_CLASS_DOUBLE:
            {
                  GVariant* _tmp9_ = NULL;
                  _tmp9_ = g_variant_new_double (DBL_MIN);
                  result = g_variant_ref_sink (_tmp9_);
                  return result;
            }
            default:
            {
                  result = NULL;
                  return result;
            }
      }
}


GVariant* key_get_max (Key* self) {
      GVariant* result = NULL;
      GVariant* _tmp0_ = NULL;
      GVariantClass _tmp1_;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = key_get_value (self);
      _tmp1_ = g_variant_classify (_tmp0_);
      switch (_tmp1_) {
            case G_VARIANT_CLASS_BYTE:
            {
                  GVariant* _tmp2_ = NULL;
                  _tmp2_ = g_variant_new_byte ((guchar) 255);
                  result = g_variant_ref_sink (_tmp2_);
                  return result;
            }
            case G_VARIANT_CLASS_INT16:
            {
                  GVariant* _tmp3_ = NULL;
                  _tmp3_ = g_variant_new_int16 (G_MAXINT16);
                  result = g_variant_ref_sink (_tmp3_);
                  return result;
            }
            case G_VARIANT_CLASS_UINT16:
            {
                  GVariant* _tmp4_ = NULL;
                  _tmp4_ = g_variant_new_uint16 (G_MAXUINT16);
                  result = g_variant_ref_sink (_tmp4_);
                  return result;
            }
            case G_VARIANT_CLASS_INT32:
            {
                  GVariant* _tmp5_ = NULL;
                  _tmp5_ = g_variant_new_int32 (G_MAXINT32);
                  result = g_variant_ref_sink (_tmp5_);
                  return result;
            }
            case G_VARIANT_CLASS_UINT32:
            {
                  GVariant* _tmp6_ = NULL;
                  _tmp6_ = g_variant_new_uint32 (G_MAXUINT32);
                  result = g_variant_ref_sink (_tmp6_);
                  return result;
            }
            case G_VARIANT_CLASS_INT64:
            {
                  GVariant* _tmp7_ = NULL;
                  _tmp7_ = g_variant_new_int64 (G_MAXINT64);
                  result = g_variant_ref_sink (_tmp7_);
                  return result;
            }
            case G_VARIANT_CLASS_UINT64:
            {
                  GVariant* _tmp8_ = NULL;
                  _tmp8_ = g_variant_new_uint64 (G_MAXUINT64);
                  result = g_variant_ref_sink (_tmp8_);
                  return result;
            }
            case G_VARIANT_CLASS_DOUBLE:
            {
                  GVariant* _tmp9_ = NULL;
                  _tmp9_ = g_variant_new_double (DBL_MAX);
                  result = g_variant_ref_sink (_tmp9_);
                  return result;
            }
            default:
            {
                  result = NULL;
                  return result;
            }
      }
}


static void key_item_changed (Key* self, const gchar* key) {
      gboolean _tmp0_ = FALSE;
      gboolean _tmp1_ = FALSE;
      gboolean _tmp2_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (key != NULL);
      _tmp2_ = g_str_has_suffix (key, "/");
      if (_tmp2_) {
            gboolean _tmp3_;
            _tmp3_ = g_str_has_prefix (self->full_name, key);
            _tmp1_ = _tmp3_;
      } else {
            _tmp1_ = FALSE;
      }
      if (_tmp1_) {
            _tmp0_ = TRUE;
      } else {
            _tmp0_ = g_strcmp0 (key, self->full_name) == 0;
      }
      if (_tmp0_) {
            g_signal_emit_by_name (self, "value-changed");
      }
}


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


static gpointer _schema_key_ref0 (gpointer self) {
      return self ? schema_key_ref (self) : NULL;
}


static void _key_item_changed_settings_model_item_changed (SettingsModel* _sender, const gchar* key, gpointer self) {
      key_item_changed (self, key);
}


Key* key_construct (GType object_type, SettingsModel* model, Directory* parent, const gchar* name, const gchar* full_name) {
      Key * self = NULL;
      SettingsModel* _tmp0_;
      Directory* _tmp1_;
      gchar* _tmp2_;
      gchar* _tmp3_;
      gconstpointer _tmp4_ = NULL;
      SchemaKey* _tmp5_;
      g_return_val_if_fail (model != NULL, NULL);
      g_return_val_if_fail (parent != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      g_return_val_if_fail (full_name != NULL, NULL);
      self = (Key*) g_object_new (object_type, NULL);
      _tmp0_ = _g_object_ref0 (model);
      _g_object_unref0 (self->priv->model);
      self->priv->model = _tmp0_;
      _tmp1_ = _g_object_ref0 (parent);
      _g_object_unref0 (self->parent);
      self->parent = _tmp1_;
      _tmp2_ = g_strdup (name);
      _g_free0 (self->name);
      self->name = _tmp2_;
      _tmp3_ = g_strdup (full_name);
      _g_free0 (self->full_name);
      self->full_name = _tmp3_;
      _tmp4_ = g_hash_table_lookup (model->schemas->keys, full_name);
      _tmp5_ = _schema_key_ref0 ((SchemaKey*) _tmp4_);
      _schema_key_unref0 (self->schema);
      self->schema = _tmp5_;
      g_signal_connect_object (model, "item-changed", (GCallback) _key_item_changed_settings_model_item_changed, self, 0);
      return self;
}


Key* key_new (SettingsModel* model, Directory* parent, const gchar* name, const gchar* full_name) {
      return key_construct (TYPE_KEY, model, parent, name, full_name);
}


void key_set_to_default (Key* self) {
      gboolean _tmp0_;
      GError * _inner_error_ = NULL;
      g_return_if_fail (self != NULL);
      _tmp0_ = key_get_has_schema (self);
      if (!_tmp0_) {
            return;
      }
      _g_variant_unref0 (self->priv->_value);
      self->priv->_value = NULL;
      dconf_client_write (self->priv->model->client, self->full_name, NULL, NULL, NULL, &_inner_error_);
      if (_inner_error_ != NULL) {
            goto __catch1_g_error;
      }
      goto __finally1;
      __catch1_g_error:
      {
            GError * e;
            e = _inner_error_;
            _inner_error_ = NULL;
            _g_error_free0 (e);
      }
      __finally1:
      if (_inner_error_ != NULL) {
            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_signal_emit_by_name (self, "value-changed");
}


static void key_update_value (Key* self) {
      GVariant* _tmp0_ = NULL;
      g_return_if_fail (self != NULL);
      _tmp0_ = dconf_client_read (self->priv->model->client, self->full_name);
      _g_variant_unref0 (self->priv->_value);
      self->priv->_value = _tmp0_;
}


gboolean key_get_has_schema (Key* self) {
      gboolean result;
      g_return_val_if_fail (self != NULL, FALSE);
      result = self->schema != NULL;
      return result;
}


gint key_get_index (Key* self) {
      gint result;
      GList* _tmp0_ = NULL;
      gint _tmp1_;
      g_return_val_if_fail (self != NULL, 0);
      _tmp0_ = directory_get_keys (self->parent);
      _tmp1_ = g_list_index (_tmp0_, self);
      result = _tmp1_;
      return result;
}


const gchar* key_get_type_string (Key* self) {
      const gchar* result;
      GVariant* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = key_get_value (self);
      if (_tmp0_ != NULL) {
            gboolean _tmp1_ = FALSE;
            gboolean _tmp2_ = FALSE;
            GVariant* _tmp3_ = NULL;
            gboolean _tmp4_;
            _tmp3_ = key_get_value (self);
            _tmp4_ = g_variant_is_of_type (_tmp3_, G_VARIANT_TYPE_STRING);
            if (_tmp4_) {
                  gboolean _tmp5_;
                  _tmp5_ = key_get_has_schema (self);
                  _tmp2_ = _tmp5_;
            } else {
                  _tmp2_ = FALSE;
            }
            if (_tmp2_) {
                  _tmp1_ = self->schema->enum_name != NULL;
            } else {
                  _tmp1_ = FALSE;
            }
            if (_tmp1_) {
                  result = "<enum>";
                  return result;
            } else {
                  GVariant* _tmp6_ = NULL;
                  const gchar* _tmp7_ = NULL;
                  _tmp6_ = key_get_value (self);
                  _tmp7_ = g_variant_get_type_string (_tmp6_);
                  result = _tmp7_;
                  return result;
            }
      } else {
            result = self->schema->type;
            return result;
      }
}


static void key_set_type_string (Key* self, const gchar* value) {
      g_return_if_fail (self != NULL);
      g_object_notify ((GObject *) self, "type-string");
}


GVariant* key_get_value (Key* self) {
      GVariant* result;
      g_return_val_if_fail (self != NULL, NULL);
      key_update_value (self);
      if (self->priv->_value != NULL) {
            result = self->priv->_value;
            return result;
      } else {
            result = self->schema->default_value;
            return result;
      }
}


static gpointer _g_variant_ref0 (gpointer self) {
      return self ? g_variant_ref (self) : NULL;
}


void key_set_value (Key* self, GVariant* value) {
      GVariant* _tmp0_;
      GError * _inner_error_ = NULL;
      g_return_if_fail (self != NULL);
      _tmp0_ = _g_variant_ref0 (value);
      _g_variant_unref0 (self->priv->_value);
      self->priv->_value = _tmp0_;
      dconf_client_write (self->priv->model->client, self->full_name, value, NULL, NULL, &_inner_error_);
      if (_inner_error_ != NULL) {
            goto __catch2_g_error;
      }
      goto __finally2;
      __catch2_g_error:
      {
            GError * e;
            e = _inner_error_;
            _inner_error_ = NULL;
            _g_error_free0 (e);
      }
      __finally2:
      if (_inner_error_ != NULL) {
            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_signal_emit_by_name (self, "value-changed");
      g_object_notify ((GObject *) self, "value");
}


gboolean key_get_is_default (Key* self) {
      gboolean result;
      g_return_val_if_fail (self != NULL, FALSE);
      key_update_value (self);
      result = self->priv->_value == NULL;
      return result;
}


static void key_class_init (KeyClass * klass) {
      key_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (KeyPrivate));
      G_OBJECT_CLASS (klass)->get_property = _vala_key_get_property;
      G_OBJECT_CLASS (klass)->set_property = _vala_key_set_property;
      G_OBJECT_CLASS (klass)->finalize = key_finalize;
      g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_HAS_SCHEMA, g_param_spec_boolean ("has-schema", "has-schema", "has-schema", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_INDEX, g_param_spec_int ("index", "index", "index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_TYPE_STRING, g_param_spec_string ("type-string", "type-string", "type-string", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_VALUE, g_param_spec_variant ("value", "value", "value", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), KEY_IS_DEFAULT, g_param_spec_boolean ("is-default", "is-default", "is-default", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_signal_new ("value_changed", TYPE_KEY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void key_instance_init (Key * self) {
      self->priv = KEY_GET_PRIVATE (self);
}


static void key_finalize (GObject* obj) {
      Key * self;
      self = KEY (obj);
      _g_object_unref0 (self->priv->model);
      _g_object_unref0 (self->parent);
      _g_free0 (self->name);
      _g_free0 (self->full_name);
      _schema_key_unref0 (self->schema);
      _g_variant_unref0 (self->priv->_value);
      G_OBJECT_CLASS (key_parent_class)->finalize (obj);
}


GType key_get_type (void) {
      static volatile gsize key_type_id__volatile = 0;
      if (g_once_init_enter (&key_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (KeyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Key), 0, (GInstanceInitFunc) key_instance_init, NULL };
            GType key_type_id;
            key_type_id = g_type_register_static (G_TYPE_OBJECT, "Key", &g_define_type_info, 0);
            g_once_init_leave (&key_type_id__volatile, key_type_id);
      }
      return key_type_id__volatile;
}


static void _vala_key_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
      Key * self;
      self = KEY (object);
      switch (property_id) {
            case KEY_HAS_SCHEMA:
            g_value_set_boolean (value, key_get_has_schema (self));
            break;
            case KEY_INDEX:
            g_value_set_int (value, key_get_index (self));
            break;
            case KEY_TYPE_STRING:
            g_value_set_string (value, key_get_type_string (self));
            break;
            case KEY_VALUE:
            g_value_set_variant (value, key_get_value (self));
            break;
            case KEY_IS_DEFAULT:
            g_value_set_boolean (value, key_get_is_default (self));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static void _vala_key_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
      Key * self;
      self = KEY (object);
      switch (property_id) {
            case KEY_TYPE_STRING:
            key_set_type_string (self, g_value_get_string (value));
            break;
            case KEY_VALUE:
            key_set_value (self, g_value_get_variant (value));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static void _g_free0_ (gpointer var) {
      var = (g_free (var), NULL);
}


static void _g_object_unref0_ (gpointer var) {
      (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
      g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
      g_list_free (self);
}


Directory* directory_construct (GType object_type, SettingsModel* model, Directory* parent, const gchar* name, const gchar* full_name) {
      Directory * self = NULL;
      SettingsModel* _tmp0_;
      Directory* _tmp1_;
      gchar* _tmp2_;
      gchar* _tmp3_;
      g_return_val_if_fail (model != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      g_return_val_if_fail (full_name != NULL, NULL);
      self = (Directory*) g_object_new (object_type, NULL);
      _tmp0_ = _g_object_ref0 (model);
      _g_object_unref0 (self->priv->model);
      self->priv->model = _tmp0_;
      _tmp1_ = _g_object_ref0 (parent);
      _g_object_unref0 (self->parent);
      self->parent = _tmp1_;
      _tmp2_ = g_strdup (name);
      _g_free0 (self->name);
      self->name = _tmp2_;
      _tmp3_ = g_strdup (full_name);
      _g_free0 (self->full_name);
      self->full_name = _tmp3_;
      return self;
}


Directory* directory_new (SettingsModel* model, Directory* parent, const gchar* name, const gchar* full_name) {
      return directory_construct (TYPE_DIRECTORY, model, parent, name, full_name);
}


static gint _directory_compare_directories_gcompare_func (gconstpointer a, gconstpointer b) {
      gint result;
      result = directory_compare_directories (a, b);
      return result;
}


Directory* directory_get_child (Directory* self, const gchar* name) {
      Directory* result = NULL;
      gconstpointer _tmp0_ = NULL;
      Directory* _tmp1_;
      Directory* directory;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      _tmp0_ = g_hash_table_lookup (self->_child_map, name);
      _tmp1_ = _g_object_ref0 ((Directory*) _tmp0_);
      directory = _tmp1_;
      if (directory == NULL) {
            gchar* _tmp2_;
            gchar* _tmp3_;
            gchar* _tmp4_;
            gchar* _tmp5_;
            Directory* _tmp6_ = NULL;
            Directory* _tmp7_;
            gchar* _tmp8_;
            Directory* _tmp9_;
            _tmp2_ = g_strconcat (self->full_name, name, NULL);
            _tmp3_ = _tmp2_;
            _tmp4_ = g_strconcat (_tmp3_, "/", NULL);
            _tmp5_ = _tmp4_;
            _tmp6_ = directory_new (self->priv->model, self, name, _tmp5_);
            _g_object_unref0 (directory);
            directory = _tmp6_;
            _g_free0 (_tmp5_);
            _g_free0 (_tmp3_);
            _tmp7_ = _g_object_ref0 (directory);
            self->_children = g_list_insert_sorted (self->_children, _tmp7_, _directory_compare_directories_gcompare_func);
            _tmp8_ = g_strdup (name);
            _tmp9_ = _g_object_ref0 (directory);
            g_hash_table_insert (self->_child_map, _tmp8_, _tmp9_);
      }
      result = directory;
      return result;
}


static gint directory_compare_directories (Directory* a, Directory* b) {
      gint result = 0;
      gint _tmp0_;
      g_return_val_if_fail (a != NULL, 0);
      g_return_val_if_fail (b != NULL, 0);
      _tmp0_ = g_strcmp0 (a->name, b->name);
      result = _tmp0_;
      return result;
}


static gint _directory_compare_keys_gcompare_func (gconstpointer a, gconstpointer b) {
      gint result;
      result = directory_compare_keys (a, b);
      return result;
}


Key* directory_get_key (Directory* self, const gchar* name) {
      Key* result = NULL;
      gconstpointer _tmp0_ = NULL;
      Key* _tmp1_;
      Key* key;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      _tmp0_ = g_hash_table_lookup (self->_key_map, name);
      _tmp1_ = _g_object_ref0 ((Key*) _tmp0_);
      key = _tmp1_;
      if (key == NULL) {
            gchar* _tmp2_;
            gchar* _tmp3_;
            Key* _tmp4_ = NULL;
            Key* _tmp5_;
            gchar* _tmp6_;
            Key* _tmp7_;
            _tmp2_ = g_strconcat (self->full_name, name, NULL);
            _tmp3_ = _tmp2_;
            _tmp4_ = key_new (self->priv->model, self, name, _tmp3_);
            _g_object_unref0 (key);
            key = _tmp4_;
            _g_free0 (_tmp3_);
            _tmp5_ = _g_object_ref0 (key);
            self->priv->_keys = g_list_insert_sorted (self->priv->_keys, _tmp5_, _directory_compare_keys_gcompare_func);
            _tmp6_ = g_strdup (name);
            _tmp7_ = _g_object_ref0 (key);
            g_hash_table_insert (self->_key_map, _tmp6_, _tmp7_);
      }
      result = key;
      return result;
}


gint directory_compare_keys (Key* a, Key* b) {
      gint result = 0;
      gint _tmp0_;
      g_return_val_if_fail (a != NULL, 0);
      g_return_val_if_fail (b != NULL, 0);
      _tmp0_ = g_strcmp0 (a->name, b->name);
      result = _tmp0_;
      return result;
}


void directory_load_schema (Directory* self, Schema* schema, const gchar* path) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (schema != NULL);
      g_return_if_fail (path != NULL);
      if (g_strcmp0 (path, "") == 0) {
            GList* _tmp0_ = NULL;
            _tmp0_ = g_hash_table_get_values (schema->keys);
            {
                  GList* schema_key_collection;
                  GList* schema_key_it;
                  schema_key_collection = _tmp0_;
                  for (schema_key_it = schema_key_collection; schema_key_it != NULL; schema_key_it = schema_key_it->next) {
                        SchemaKey* schema_key;
                        schema_key = (SchemaKey*) schema_key_it->data;
                        {
                              Key* _tmp1_ = NULL;
                              Key* _tmp2_;
                              _tmp1_ = directory_get_key (self, schema_key->name);
                              _tmp2_ = _tmp1_;
                              _g_object_unref0 (_tmp2_);
                        }
                  }
                  _g_list_free0 (schema_key_collection);
            }
      } else {
            gchar** _tmp3_;
            gchar** _tmp4_ = NULL;
            gchar** tokens;
            gint tokens_length1;
            gint _tokens_size_;
            gchar* _tmp5_;
            gchar* name;
            Directory* _tmp6_ = NULL;
            Directory* directory;
            _tmp4_ = _tmp3_ = g_strsplit (path, "/", 2);
            tokens = _tmp4_;
            tokens_length1 = _vala_array_length (_tmp3_);
            _tokens_size_ = _vala_array_length (_tmp3_);
            _tmp5_ = g_strdup (tokens[0]);
            name = _tmp5_;
            _tmp6_ = directory_get_child (self, name);
            directory = _tmp6_;
            directory_load_schema (directory, schema, tokens[1]);
            _g_object_unref0 (directory);
            _g_free0 (name);
            tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
      }
}


static gchar* string_slice (const gchar* self, glong start, glong end) {
      gchar* result = NULL;
      gint _tmp0_;
      glong string_length;
      gboolean _tmp1_ = FALSE;
      gboolean _tmp2_ = FALSE;
      gchar* _tmp3_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = strlen (self);
      string_length = (glong) _tmp0_;
      if (start < 0) {
            start = string_length + start;
      }
      if (end < 0) {
            end = string_length + end;
      }
      if (start >= 0) {
            _tmp1_ = start <= string_length;
      } else {
            _tmp1_ = FALSE;
      }
      g_return_val_if_fail (_tmp1_, NULL);
      if (end >= 0) {
            _tmp2_ = end <= string_length;
      } else {
            _tmp2_ = FALSE;
      }
      g_return_val_if_fail (_tmp2_, NULL);
      g_return_val_if_fail (start <= end, NULL);
      _tmp3_ = g_strndup (((gchar*) self) + start, (gsize) (end - start));
      result = _tmp3_;
      return result;
}


static void directory_update_children (Directory* self) {
      gint _tmp0_;
      gchar** _tmp1_ = NULL;
      gchar** items;
      gint items_length1;
      gint _items_size_;
      g_return_if_fail (self != NULL);
      if (self->priv->have_children) {
            return;
      }
      self->priv->have_children = TRUE;
      _tmp1_ = dconf_client_list (self->priv->model->client, self->full_name, &_tmp0_);
      items = _tmp1_;
      items_length1 = _tmp0_;
      _items_size_ = _tmp0_;
      {
            gint i;
            i = 0;
            {
                  gboolean _tmp2_;
                  _tmp2_ = TRUE;
                  while (TRUE) {
                        gchar* _tmp3_;
                        gchar* item_name;
                        gboolean _tmp4_;
                        if (!_tmp2_) {
                              i++;
                        }
                        _tmp2_ = FALSE;
                        if (!(i < items_length1)) {
                              break;
                        }
                        _tmp3_ = g_strconcat (self->full_name, items[i], NULL);
                        item_name = _tmp3_;
                        _tmp4_ = dconf_is_dir (item_name, NULL);
                        if (_tmp4_) {
                              gchar* _tmp5_ = NULL;
                              gchar* dir_name;
                              Directory* _tmp6_ = NULL;
                              Directory* _tmp7_;
                              _tmp5_ = string_slice (items[i], (glong) 0, (glong) (-1));
                              dir_name = _tmp5_;
                              _tmp6_ = directory_get_child (self, dir_name);
                              _tmp7_ = _tmp6_;
                              _g_object_unref0 (_tmp7_);
                              _g_free0 (dir_name);
                        } else {
                              Key* _tmp8_ = NULL;
                              Key* _tmp9_;
                              _tmp8_ = directory_get_key (self, items[i]);
                              _tmp9_ = _tmp8_;
                              _g_object_unref0 (_tmp9_);
                        }
                        _g_free0 (item_name);
                  }
            }
      }
      items = (_vala_array_free (items, items_length1, (GDestroyNotify) g_free), NULL);
}


KeyModel* directory_get_key_model (Directory* self) {
      KeyModel* result;
      g_return_val_if_fail (self != NULL, NULL);
      directory_update_children (self);
      if (self->priv->_key_model == NULL) {
            KeyModel* _tmp0_ = NULL;
            _tmp0_ = key_model_new (self);
            _g_object_unref0 (self->priv->_key_model);
            self->priv->_key_model = _tmp0_;
      }
      result = self->priv->_key_model;
      return result;
}


static void directory_set_key_model (Directory* self, KeyModel* value) {
      g_return_if_fail (self != NULL);
      g_object_notify ((GObject *) self, "key-model");
}


gint directory_get_index (Directory* self) {
      gint result;
      GList* _tmp0_ = NULL;
      gint _tmp1_;
      g_return_val_if_fail (self != NULL, 0);
      _tmp0_ = directory_get_children (self->parent);
      _tmp1_ = g_list_index (_tmp0_, self);
      result = _tmp1_;
      return result;
}


GList* directory_get_children (Directory* self) {
      GList* result;
      g_return_val_if_fail (self != NULL, NULL);
      directory_update_children (self);
      result = self->_children;
      return result;
}


static void directory_set_children (Directory* self, GList* value) {
      g_return_if_fail (self != NULL);
      g_object_notify ((GObject *) self, "children");
}


GList* directory_get_keys (Directory* self) {
      GList* result;
      g_return_val_if_fail (self != NULL, NULL);
      directory_update_children (self);
      result = self->priv->_keys;
      return result;
}


static void directory_set_keys (Directory* self, GList* value) {
      g_return_if_fail (self != NULL);
      g_object_notify ((GObject *) self, "keys");
}


static void directory_class_init (DirectoryClass * klass) {
      directory_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (DirectoryPrivate));
      G_OBJECT_CLASS (klass)->get_property = _vala_directory_get_property;
      G_OBJECT_CLASS (klass)->set_property = _vala_directory_set_property;
      G_OBJECT_CLASS (klass)->finalize = directory_finalize;
      g_object_class_install_property (G_OBJECT_CLASS (klass), DIRECTORY_KEY_MODEL, g_param_spec_object ("key-model", "key-model", "key-model", TYPE_KEY_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), DIRECTORY_INDEX, g_param_spec_int ("index", "index", "index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), DIRECTORY_CHILDREN, g_param_spec_pointer ("children", "children", "children", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), DIRECTORY_KEYS, g_param_spec_pointer ("keys", "keys", "keys", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void directory_instance_init (Directory * self) {
      GHashTable* _tmp0_ = NULL;
      GHashTable* _tmp1_ = NULL;
      self->priv = DIRECTORY_GET_PRIVATE (self);
      _tmp0_ = g_hash_table_new_full (g_str_hash, g_str_equal, _g_free0_, _g_object_unref0_);
      self->_child_map = _tmp0_;
      self->_children = NULL;
      _tmp1_ = g_hash_table_new_full (g_str_hash, g_str_equal, _g_free0_, _g_object_unref0_);
      self->_key_map = _tmp1_;
      self->priv->_keys = NULL;
}


static void directory_finalize (GObject* obj) {
      Directory * self;
      self = DIRECTORY (obj);
      _g_object_unref0 (self->priv->model);
      _g_free0 (self->name);
      _g_free0 (self->full_name);
      _g_object_unref0 (self->parent);
      _g_object_unref0 (self->priv->_key_model);
      _g_hash_table_unref0 (self->_child_map);
      __g_list_free__g_object_unref0_0 (self->_children);
      _g_hash_table_unref0 (self->_key_map);
      __g_list_free__g_object_unref0_0 (self->priv->_keys);
      G_OBJECT_CLASS (directory_parent_class)->finalize (obj);
}


GType directory_get_type (void) {
      static volatile gsize directory_type_id__volatile = 0;
      if (g_once_init_enter (&directory_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (DirectoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) directory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Directory), 0, (GInstanceInitFunc) directory_instance_init, NULL };
            GType directory_type_id;
            directory_type_id = g_type_register_static (G_TYPE_OBJECT, "Directory", &g_define_type_info, 0);
            g_once_init_leave (&directory_type_id__volatile, directory_type_id);
      }
      return directory_type_id__volatile;
}


static void _vala_directory_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
      Directory * self;
      self = DIRECTORY (object);
      switch (property_id) {
            case DIRECTORY_KEY_MODEL:
            g_value_set_object (value, directory_get_key_model (self));
            break;
            case DIRECTORY_INDEX:
            g_value_set_int (value, directory_get_index (self));
            break;
            case DIRECTORY_CHILDREN:
            g_value_set_pointer (value, directory_get_children (self));
            break;
            case DIRECTORY_KEYS:
            g_value_set_pointer (value, directory_get_keys (self));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static void _vala_directory_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
      Directory * self;
      self = DIRECTORY (object);
      switch (property_id) {
            case DIRECTORY_KEY_MODEL:
            directory_set_key_model (self, g_value_get_object (value));
            break;
            case DIRECTORY_CHILDREN:
            directory_set_children (self, g_value_get_pointer (value));
            break;
            case DIRECTORY_KEYS:
            directory_set_keys (self, g_value_get_pointer (value));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static void _key_model_key_changed_cb_key_value_changed (Key* _sender, gpointer self) {
      key_model_key_changed_cb (self, _sender);
}


KeyModel* key_model_construct (GType object_type, Directory* directory) {
      KeyModel * self = NULL;
      Directory* _tmp0_;
      GList* _tmp1_ = NULL;
      g_return_val_if_fail (directory != NULL, NULL);
      self = (KeyModel*) g_object_new (object_type, NULL);
      _tmp0_ = _g_object_ref0 (directory);
      _g_object_unref0 (self->priv->directory);
      self->priv->directory = _tmp0_;
      _tmp1_ = directory_get_keys (directory);
      {
            GList* key_collection;
            GList* key_it;
            key_collection = _tmp1_;
            for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
                  Key* _tmp2_;
                  Key* key;
                  _tmp2_ = _g_object_ref0 ((Key*) key_it->data);
                  key = _tmp2_;
                  {
                        g_signal_connect_object (key, "value-changed", (GCallback) _key_model_key_changed_cb_key_value_changed, self, 0);
                        _g_object_unref0 (key);
                  }
            }
      }
      return self;
}


KeyModel* key_model_new (Directory* directory) {
      return key_model_construct (TYPE_KEY_MODEL, directory);
}


static void key_model_key_changed_cb (KeyModel* self, Key* key) {
      GtkTreeIter iter = {0};
      GtkTreeIter _tmp0_ = {0};
      gboolean _tmp1_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (key != NULL);
      _tmp1_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) self, &_tmp0_);
      iter = _tmp0_;
      if (!_tmp1_) {
            return;
      }
      {
            gboolean _tmp2_;
            _tmp2_ = TRUE;
            while (TRUE) {
                  Key* _tmp4_ = NULL;
                  Key* _tmp5_;
                  gboolean _tmp6_;
                  if (!_tmp2_) {
                        gboolean _tmp3_;
                        _tmp3_ = gtk_tree_model_iter_next ((GtkTreeModel*) self, &iter);
                        if (!_tmp3_) {
                              break;
                        }
                  }
                  _tmp2_ = FALSE;
                  _tmp4_ = key_model_get_key (self, &iter);
                  _tmp5_ = _tmp4_;
                  _tmp6_ = _tmp5_ == key;
                  _g_object_unref0 (_tmp5_);
                  if (_tmp6_) {
                        GtkTreePath* _tmp7_ = NULL;
                        GtkTreePath* _tmp8_;
                        _tmp7_ = gtk_tree_model_get_path ((GtkTreeModel*) self, &iter);
                        _tmp8_ = _tmp7_;
                        gtk_tree_model_row_changed ((GtkTreeModel*) self, _tmp8_, &iter);
                        _gtk_tree_path_free0 (_tmp8_);
                        return;
                  }
            }
      }
}


static GtkTreeModelFlags key_model_real_get_flags (GtkTreeModel* base) {
      KeyModel * self;
      GtkTreeModelFlags result = 0;
      self = (KeyModel*) base;
      result = GTK_TREE_MODEL_LIST_ONLY;
      return result;
}


static gint key_model_real_get_n_columns (GtkTreeModel* base) {
      KeyModel * self;
      gint result = 0;
      self = (KeyModel*) base;
      result = 3;
      return result;
}


static GType key_model_real_get_column_type (GtkTreeModel* base, gint index) {
      KeyModel * self;
      GType result = 0UL;
      self = (KeyModel*) base;
      if (index == 0) {
            result = TYPE_KEY;
            return result;
      } else {
            result = G_TYPE_STRING;
            return result;
      }
}


static void key_model_set_iter (KeyModel* self, GtkTreeIter* iter, Key* key) {
      GtkTreeIter _iter = {0};
      g_return_if_fail (self != NULL);
      g_return_if_fail (key != NULL);
      _iter.stamp = 0;
      _iter.user_data = key;
      _iter.user_data2 = key;
      _iter.user_data3 = key;
      if (iter) {
            *iter = _iter;
      }
}


Key* key_model_get_key (KeyModel* self, GtkTreeIter* iter) {
      Key* result = NULL;
      Key* _tmp0_;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = _g_object_ref0 (KEY ((*iter).user_data));
      result = _tmp0_;
      return result;
}


static gboolean key_model_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path) {
      KeyModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      gint _tmp0_;
      gint _tmp1_;
      gint* _tmp2_ = NULL;
      GtkTreeIter _tmp3_ = {0};
      gboolean _tmp4_;
      self = (KeyModel*) base;
      g_return_val_if_fail (path != NULL, FALSE);
      _tmp0_ = gtk_tree_path_get_depth (path);
      if (_tmp0_ != 1) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp2_ = gtk_tree_path_get_indices_with_depth (path, &_tmp1_);
      _tmp4_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) self, &_tmp3_, NULL, _tmp2_[0]);
      _iter = _tmp3_;
      result = _tmp4_;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static GtkTreePath* key_model_real_get_path (GtkTreeModel* base, GtkTreeIter* iter) {
      KeyModel * self;
      GtkTreePath* result = NULL;
      GtkTreePath* _tmp0_ = NULL;
      GtkTreePath* path;
      Key* _tmp1_ = NULL;
      Key* _tmp2_;
      gint _tmp3_;
      self = (KeyModel*) base;
      _tmp0_ = gtk_tree_path_new ();
      path = _tmp0_;
      _tmp1_ = key_model_get_key (self, iter);
      _tmp2_ = _tmp1_;
      _tmp3_ = key_get_index (_tmp2_);
      gtk_tree_path_append_index (path, _tmp3_);
      _g_object_unref0 (_tmp2_);
      result = path;
      return result;
}


static void key_model_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value) {
      KeyModel * self;
      GValue _value = {0};
      Key* _tmp0_ = NULL;
      Key* key;
      self = (KeyModel*) base;
      _tmp0_ = key_model_get_key (self, iter);
      key = _tmp0_;
      if (column == 0) {
            GValue _tmp1_ = {0};
            g_value_init (&_tmp1_, TYPE_KEY);
            g_value_set_object (&_tmp1_, key);
            G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
            _value = _tmp1_;
      } else {
            if (column == 1) {
                  GValue _tmp2_ = {0};
                  g_value_init (&_tmp2_, G_TYPE_STRING);
                  g_value_set_string (&_tmp2_, key->name);
                  G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
                  _value = _tmp2_;
            } else {
                  if (column == 2) {
                        GVariant* _tmp3_ = NULL;
                        _tmp3_ = key_get_value (key);
                        if (_tmp3_ != NULL) {
                              GVariant* _tmp4_ = NULL;
                              gchar* _tmp5_ = NULL;
                              GValue _tmp6_ = {0};
                              _tmp4_ = key_get_value (key);
                              _tmp5_ = g_variant_print (_tmp4_, FALSE);
                              g_value_init (&_tmp6_, G_TYPE_STRING);
                              g_value_take_string (&_tmp6_, _tmp5_);
                              G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
                              _value = _tmp6_;
                        } else {
                              GValue _tmp7_ = {0};
                              g_value_init (&_tmp7_, G_TYPE_STRING);
                              g_value_set_string (&_tmp7_, "");
                              G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
                              _value = _tmp7_;
                        }
                  } else {
                        if (column == 4) {
                              gboolean _tmp8_;
                              _tmp8_ = key_get_is_default (key);
                              if (_tmp8_) {
                                    GValue _tmp9_ = {0};
                                    g_value_init (&_tmp9_, PANGO_TYPE_WEIGHT);
                                    g_value_set_enum (&_tmp9_, PANGO_WEIGHT_NORMAL);
                                    G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
                                    _value = _tmp9_;
                              } else {
                                    GValue _tmp10_ = {0};
                                    g_value_init (&_tmp10_, PANGO_TYPE_WEIGHT);
                                    g_value_set_enum (&_tmp10_, PANGO_WEIGHT_BOLD);
                                    G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
                                    _value = _tmp10_;
                              }
                        }
                  }
            }
      }
      _g_object_unref0 (key);
      if (value) {
            *value = _value;
      } else {
            G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
      }
}


static gboolean key_model_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter) {
      KeyModel * self;
      gboolean result = FALSE;
      Key* _tmp0_ = NULL;
      Key* _tmp1_;
      gint _tmp2_;
      gint _tmp3_;
      gint index;
      GList* _tmp4_ = NULL;
      guint _tmp5_;
      GList* _tmp6_ = NULL;
      gconstpointer _tmp7_ = NULL;
      GtkTreeIter _tmp8_ = {0};
      self = (KeyModel*) base;
      _tmp0_ = key_model_get_key (self, iter);
      _tmp1_ = _tmp0_;
      _tmp2_ = key_get_index (_tmp1_);
      _tmp3_ = _tmp2_;
      _g_object_unref0 (_tmp1_);
      index = _tmp3_;
      _tmp4_ = directory_get_keys (self->priv->directory);
      _tmp5_ = g_list_length (_tmp4_);
      if (index >= (_tmp5_ - 1)) {
            result = FALSE;
            return result;
      }
      _tmp6_ = directory_get_keys (self->priv->directory);
      _tmp7_ = g_list_nth_data (_tmp6_, (guint) (index + 1));
      key_model_set_iter (self, &_tmp8_, (Key*) _tmp7_);
      *iter = _tmp8_;
      result = TRUE;
      return result;
}


static gboolean key_model_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent) {
      KeyModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      gboolean _tmp0_ = FALSE;
      GList* _tmp3_ = NULL;
      gconstpointer _tmp4_ = NULL;
      GtkTreeIter _tmp5_ = {0};
      self = (KeyModel*) base;
      if (parent != NULL) {
            _tmp0_ = TRUE;
      } else {
            GList* _tmp1_ = NULL;
            guint _tmp2_;
            _tmp1_ = directory_get_keys (self->priv->directory);
            _tmp2_ = g_list_length (_tmp1_);
            _tmp0_ = _tmp2_ == 0;
      }
      if (_tmp0_) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp3_ = directory_get_keys (self->priv->directory);
      _tmp4_ = g_list_nth_data (_tmp3_, (guint) 0);
      key_model_set_iter (self, &_tmp5_, (Key*) _tmp4_);
      _iter = _tmp5_;
      result = TRUE;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static gboolean key_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter) {
      KeyModel * self;
      gboolean result = FALSE;
      self = (KeyModel*) base;
      result = FALSE;
      return result;
}


static gint key_model_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter) {
      KeyModel * self;
      gint result = 0;
      self = (KeyModel*) base;
      if (iter == NULL) {
            GList* _tmp0_ = NULL;
            guint _tmp1_;
            _tmp0_ = directory_get_keys (self->priv->directory);
            _tmp1_ = g_list_length (_tmp0_);
            result = (gint) _tmp1_;
            return result;
      } else {
            result = 0;
            return result;
      }
}


static gboolean key_model_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n) {
      KeyModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      GList* _tmp0_ = NULL;
      guint _tmp1_;
      GList* _tmp2_ = NULL;
      gconstpointer _tmp3_ = NULL;
      GtkTreeIter _tmp4_ = {0};
      self = (KeyModel*) base;
      if (parent != NULL) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp0_ = directory_get_keys (self->priv->directory);
      _tmp1_ = g_list_length (_tmp0_);
      if (n >= _tmp1_) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp2_ = directory_get_keys (self->priv->directory);
      _tmp3_ = g_list_nth_data (_tmp2_, (guint) n);
      key_model_set_iter (self, &_tmp4_, (Key*) _tmp3_);
      _iter = _tmp4_;
      result = TRUE;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static gboolean key_model_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child) {
      KeyModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      self = (KeyModel*) base;
      result = FALSE;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static void key_model_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter) {
      KeyModel * self;
      Key* _tmp0_ = NULL;
      Key* _tmp1_;
      self = (KeyModel*) base;
      _tmp0_ = key_model_get_key (self, iter);
      _tmp1_ = _tmp0_;
      g_object_ref ((GObject*) _tmp1_);
      _g_object_unref0 (_tmp1_);
}


static void key_model_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter) {
      KeyModel * self;
      Key* _tmp0_ = NULL;
      Key* _tmp1_;
      self = (KeyModel*) base;
      _tmp0_ = key_model_get_key (self, iter);
      _tmp1_ = _tmp0_;
      g_object_unref ((GObject*) _tmp1_);
      _g_object_unref0 (_tmp1_);
}


static void key_model_class_init (KeyModelClass * klass) {
      key_model_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (KeyModelPrivate));
      G_OBJECT_CLASS (klass)->finalize = key_model_finalize;
}


static void key_model_gtk_tree_model_interface_init (GtkTreeModelIface * iface) {
      key_model_gtk_tree_model_parent_iface = g_type_interface_peek_parent (iface);
      iface->get_flags = (GtkTreeModelFlags (*)(GtkTreeModel*)) key_model_real_get_flags;
      iface->get_n_columns = (gint (*)(GtkTreeModel*)) key_model_real_get_n_columns;
      iface->get_column_type = (GType (*)(GtkTreeModel* ,gint)) key_model_real_get_column_type;
      iface->get_iter = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreePath*)) key_model_real_get_iter;
      iface->get_path = (GtkTreePath* (*)(GtkTreeModel* ,GtkTreeIter*)) key_model_real_get_path;
      iface->get_value = (void (*)(GtkTreeModel* ,GtkTreeIter* ,gint ,GValue*)) key_model_real_get_value;
      iface->iter_next = (gboolean (*)(GtkTreeModel* ,GtkTreeIter*)) key_model_real_iter_next;
      iface->iter_children = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter*)) key_model_real_iter_children;
      iface->iter_has_child = (gboolean (*)(GtkTreeModel* ,GtkTreeIter*)) key_model_real_iter_has_child;
      iface->iter_n_children = (gint (*)(GtkTreeModel* ,GtkTreeIter*)) key_model_real_iter_n_children;
      iface->iter_nth_child = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter* ,gint)) key_model_real_iter_nth_child;
      iface->iter_parent = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter*)) key_model_real_iter_parent;
      iface->ref_node = (void (*)(GtkTreeModel* ,GtkTreeIter*)) key_model_real_ref_node;
      iface->unref_node = (void (*)(GtkTreeModel* ,GtkTreeIter*)) key_model_real_unref_node;
}


static void key_model_instance_init (KeyModel * self) {
      self->priv = KEY_MODEL_GET_PRIVATE (self);
}


static void key_model_finalize (GObject* obj) {
      KeyModel * self;
      self = KEY_MODEL (obj);
      _g_object_unref0 (self->priv->directory);
      G_OBJECT_CLASS (key_model_parent_class)->finalize (obj);
}


GType key_model_get_type (void) {
      static volatile gsize key_model_type_id__volatile = 0;
      if (g_once_init_enter (&key_model_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (KeyModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyModel), 0, (GInstanceInitFunc) key_model_instance_init, NULL };
            static const GInterfaceInfo gtk_tree_model_info = { (GInterfaceInitFunc) key_model_gtk_tree_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
            GType key_model_type_id;
            key_model_type_id = g_type_register_static (G_TYPE_OBJECT, "KeyModel", &g_define_type_info, 0);
            g_type_add_interface_static (key_model_type_id, GTK_TYPE_TREE_MODEL, &gtk_tree_model_info);
            g_once_init_leave (&key_model_type_id__volatile, key_model_type_id);
      }
      return key_model_type_id__volatile;
}


static gpointer _schema_enum_ref0 (gpointer self) {
      return self ? schema_enum_ref (self) : NULL;
}


EnumModel* enum_model_construct (GType object_type, SchemaEnum* schema_enum) {
      EnumModel * self = NULL;
      SchemaEnum* _tmp0_;
      g_return_val_if_fail (schema_enum != NULL, NULL);
      self = (EnumModel*) g_object_new (object_type, NULL);
      _tmp0_ = _schema_enum_ref0 (schema_enum);
      _schema_enum_unref0 (self->priv->schema_enum);
      self->priv->schema_enum = _tmp0_;
      return self;
}


EnumModel* enum_model_new (SchemaEnum* schema_enum) {
      return enum_model_construct (TYPE_ENUM_MODEL, schema_enum);
}


static GtkTreeModelFlags enum_model_real_get_flags (GtkTreeModel* base) {
      EnumModel * self;
      GtkTreeModelFlags result = 0;
      self = (EnumModel*) base;
      result = GTK_TREE_MODEL_LIST_ONLY;
      return result;
}


static gint enum_model_real_get_n_columns (GtkTreeModel* base) {
      EnumModel * self;
      gint result = 0;
      self = (EnumModel*) base;
      result = 2;
      return result;
}


static GType enum_model_real_get_column_type (GtkTreeModel* base, gint index) {
      EnumModel * self;
      GType result = 0UL;
      self = (EnumModel*) base;
      if (index == 0) {
            result = G_TYPE_STRING;
            return result;
      } else {
            result = G_TYPE_INT;
            return result;
      }
}


static void enum_model_set_iter (EnumModel* self, GtkTreeIter* iter, SchemaValue* value) {
      GtkTreeIter _iter = {0};
      g_return_if_fail (self != NULL);
      g_return_if_fail (value != NULL);
      _iter.stamp = 0;
      _iter.user_data = value;
      _iter.user_data2 = value;
      _iter.user_data3 = value;
      if (iter) {
            *iter = _iter;
      }
}


SchemaValue* enum_model_get_enum_value (EnumModel* self, GtkTreeIter* iter) {
      SchemaValue* result = NULL;
      SchemaValue* _tmp0_;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = _g_object_ref0 (SCHEMA_VALUE ((*iter).user_data));
      result = _tmp0_;
      return result;
}


static gboolean enum_model_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path) {
      EnumModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      gint _tmp0_;
      gint _tmp1_;
      gint* _tmp2_ = NULL;
      GtkTreeIter _tmp3_ = {0};
      gboolean _tmp4_;
      self = (EnumModel*) base;
      g_return_val_if_fail (path != NULL, FALSE);
      _tmp0_ = gtk_tree_path_get_depth (path);
      if (_tmp0_ != 1) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp2_ = gtk_tree_path_get_indices_with_depth (path, &_tmp1_);
      _tmp4_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) self, &_tmp3_, NULL, _tmp2_[0]);
      _iter = _tmp3_;
      result = _tmp4_;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static GtkTreePath* enum_model_real_get_path (GtkTreeModel* base, GtkTreeIter* iter) {
      EnumModel * self;
      GtkTreePath* result = NULL;
      GtkTreePath* _tmp0_ = NULL;
      GtkTreePath* path;
      SchemaValue* _tmp1_ = NULL;
      SchemaValue* _tmp2_;
      self = (EnumModel*) base;
      _tmp0_ = gtk_tree_path_new ();
      path = _tmp0_;
      _tmp1_ = enum_model_get_enum_value (self, iter);
      _tmp2_ = _tmp1_;
      gtk_tree_path_append_index (path, (gint) _tmp2_->index);
      _g_object_unref0 (_tmp2_);
      result = path;
      return result;
}


static void enum_model_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value) {
      EnumModel * self;
      GValue _value = {0};
      self = (EnumModel*) base;
      if (column == 0) {
            SchemaValue* _tmp0_ = NULL;
            SchemaValue* _tmp1_;
            GValue _tmp2_ = {0};
            _tmp0_ = enum_model_get_enum_value (self, iter);
            _tmp1_ = _tmp0_;
            g_value_init (&_tmp2_, G_TYPE_STRING);
            g_value_set_string (&_tmp2_, _tmp1_->nick);
            G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
            _value = _tmp2_;
            _g_object_unref0 (_tmp1_);
      } else {
            if (column == 1) {
                  SchemaValue* _tmp3_ = NULL;
                  SchemaValue* _tmp4_;
                  GValue _tmp5_ = {0};
                  _tmp3_ = enum_model_get_enum_value (self, iter);
                  _tmp4_ = _tmp3_;
                  g_value_init (&_tmp5_, G_TYPE_INT);
                  g_value_set_int (&_tmp5_, _tmp4_->value);
                  G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
                  _value = _tmp5_;
                  _g_object_unref0 (_tmp4_);
            }
      }
      if (value) {
            *value = _value;
      } else {
            G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
      }
}


static gboolean enum_model_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter) {
      EnumModel * self;
      gboolean result = FALSE;
      SchemaValue* _tmp0_ = NULL;
      SchemaValue* _tmp1_;
      guint _tmp2_;
      guint index;
      guint _tmp3_;
      gconstpointer _tmp4_ = NULL;
      GtkTreeIter _tmp5_ = {0};
      self = (EnumModel*) base;
      _tmp0_ = enum_model_get_enum_value (self, iter);
      _tmp1_ = _tmp0_;
      _tmp2_ = _tmp1_->index;
      _g_object_unref0 (_tmp1_);
      index = _tmp2_;
      _tmp3_ = g_list_length (self->priv->schema_enum->values);
      if (index >= (_tmp3_ - 1)) {
            result = FALSE;
            return result;
      }
      _tmp4_ = g_list_nth_data (self->priv->schema_enum->values, index + 1);
      enum_model_set_iter (self, &_tmp5_, (SchemaValue*) _tmp4_);
      *iter = _tmp5_;
      result = TRUE;
      return result;
}


static gboolean enum_model_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent) {
      EnumModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      gboolean _tmp0_ = FALSE;
      gconstpointer _tmp2_ = NULL;
      GtkTreeIter _tmp3_ = {0};
      self = (EnumModel*) base;
      if (parent != NULL) {
            _tmp0_ = TRUE;
      } else {
            guint _tmp1_;
            _tmp1_ = g_list_length (self->priv->schema_enum->values);
            _tmp0_ = _tmp1_ == 0;
      }
      if (_tmp0_) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp2_ = g_list_nth_data (self->priv->schema_enum->values, (guint) 0);
      enum_model_set_iter (self, &_tmp3_, (SchemaValue*) _tmp2_);
      _iter = _tmp3_;
      result = TRUE;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static gboolean enum_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter) {
      EnumModel * self;
      gboolean result = FALSE;
      self = (EnumModel*) base;
      result = FALSE;
      return result;
}


static gint enum_model_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter) {
      EnumModel * self;
      gint result = 0;
      self = (EnumModel*) base;
      if (iter == NULL) {
            guint _tmp0_;
            _tmp0_ = g_list_length (self->priv->schema_enum->values);
            result = (gint) _tmp0_;
            return result;
      } else {
            result = 0;
            return result;
      }
}


static gboolean enum_model_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n) {
      EnumModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      guint _tmp0_;
      gconstpointer _tmp1_ = NULL;
      GtkTreeIter _tmp2_ = {0};
      self = (EnumModel*) base;
      if (parent != NULL) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp0_ = g_list_length (self->priv->schema_enum->values);
      if (n >= _tmp0_) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp1_ = g_list_nth_data (self->priv->schema_enum->values, (guint) n);
      enum_model_set_iter (self, &_tmp2_, (SchemaValue*) _tmp1_);
      _iter = _tmp2_;
      result = TRUE;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static gboolean enum_model_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child) {
      EnumModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      self = (EnumModel*) base;
      result = FALSE;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static void enum_model_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter) {
      EnumModel * self;
      SchemaValue* _tmp0_ = NULL;
      SchemaValue* _tmp1_;
      self = (EnumModel*) base;
      _tmp0_ = enum_model_get_enum_value (self, iter);
      _tmp1_ = _tmp0_;
      g_object_ref ((GObject*) _tmp1_);
      _g_object_unref0 (_tmp1_);
}


static void enum_model_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter) {
      EnumModel * self;
      SchemaValue* _tmp0_ = NULL;
      SchemaValue* _tmp1_;
      self = (EnumModel*) base;
      _tmp0_ = enum_model_get_enum_value (self, iter);
      _tmp1_ = _tmp0_;
      g_object_unref ((GObject*) _tmp1_);
      _g_object_unref0 (_tmp1_);
}


static void enum_model_class_init (EnumModelClass * klass) {
      enum_model_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (EnumModelPrivate));
      G_OBJECT_CLASS (klass)->finalize = enum_model_finalize;
}


static void enum_model_gtk_tree_model_interface_init (GtkTreeModelIface * iface) {
      enum_model_gtk_tree_model_parent_iface = g_type_interface_peek_parent (iface);
      iface->get_flags = (GtkTreeModelFlags (*)(GtkTreeModel*)) enum_model_real_get_flags;
      iface->get_n_columns = (gint (*)(GtkTreeModel*)) enum_model_real_get_n_columns;
      iface->get_column_type = (GType (*)(GtkTreeModel* ,gint)) enum_model_real_get_column_type;
      iface->get_iter = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreePath*)) enum_model_real_get_iter;
      iface->get_path = (GtkTreePath* (*)(GtkTreeModel* ,GtkTreeIter*)) enum_model_real_get_path;
      iface->get_value = (void (*)(GtkTreeModel* ,GtkTreeIter* ,gint ,GValue*)) enum_model_real_get_value;
      iface->iter_next = (gboolean (*)(GtkTreeModel* ,GtkTreeIter*)) enum_model_real_iter_next;
      iface->iter_children = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter*)) enum_model_real_iter_children;
      iface->iter_has_child = (gboolean (*)(GtkTreeModel* ,GtkTreeIter*)) enum_model_real_iter_has_child;
      iface->iter_n_children = (gint (*)(GtkTreeModel* ,GtkTreeIter*)) enum_model_real_iter_n_children;
      iface->iter_nth_child = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter* ,gint)) enum_model_real_iter_nth_child;
      iface->iter_parent = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter*)) enum_model_real_iter_parent;
      iface->ref_node = (void (*)(GtkTreeModel* ,GtkTreeIter*)) enum_model_real_ref_node;
      iface->unref_node = (void (*)(GtkTreeModel* ,GtkTreeIter*)) enum_model_real_unref_node;
}


static void enum_model_instance_init (EnumModel * self) {
      self->priv = ENUM_MODEL_GET_PRIVATE (self);
}


static void enum_model_finalize (GObject* obj) {
      EnumModel * self;
      self = ENUM_MODEL (obj);
      _schema_enum_unref0 (self->priv->schema_enum);
      G_OBJECT_CLASS (enum_model_parent_class)->finalize (obj);
}


GType enum_model_get_type (void) {
      static volatile gsize enum_model_type_id__volatile = 0;
      if (g_once_init_enter (&enum_model_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (EnumModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) enum_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EnumModel), 0, (GInstanceInitFunc) enum_model_instance_init, NULL };
            static const GInterfaceInfo gtk_tree_model_info = { (GInterfaceInitFunc) enum_model_gtk_tree_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
            GType enum_model_type_id;
            enum_model_type_id = g_type_register_static (G_TYPE_OBJECT, "EnumModel", &g_define_type_info, 0);
            g_type_add_interface_static (enum_model_type_id, GTK_TYPE_TREE_MODEL, &gtk_tree_model_info);
            g_once_init_leave (&enum_model_type_id__volatile, enum_model_type_id);
      }
      return enum_model_type_id__volatile;
}


static void settings_model_watch_func (SettingsModel* self, DConfClient* client, const gchar* path, gchar** items, int items_length1, const gchar* tag) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (client != NULL);
      g_return_if_fail (path != NULL);
      g_return_if_fail (tag != NULL);
      if (items_length1 == 0) {
            g_signal_emit_by_name (self, "item-changed", path);
      } else {
            {
                  gchar** item_collection;
                  int item_collection_length1;
                  int item_it;
                  item_collection = items;
                  item_collection_length1 = items_length1;
                  for (item_it = 0; item_it < items_length1; item_it = item_it + 1) {
                        gchar* _tmp0_;
                        gchar* item;
                        _tmp0_ = g_strdup (item_collection[item_it]);
                        item = _tmp0_;
                        {
                              gchar* _tmp1_;
                              gchar* _tmp2_;
                              _tmp1_ = g_strconcat (path, item, NULL);
                              _tmp2_ = _tmp1_;
                              g_signal_emit_by_name (self, "item-changed", _tmp2_);
                              _g_free0 (_tmp2_);
                              _g_free0 (item);
                        }
                  }
            }
      }
}


static void _settings_model_watch_func_dconf_watch_func (DConfClient* client, const gchar* path, gchar** items, int items_length1, const gchar* tag, gpointer self) {
      settings_model_watch_func (self, client, path, items, items_length1, tag);
}


static gpointer _schema_ref0 (gpointer self) {
      return self ? schema_ref (self) : NULL;
}


SettingsModel* settings_model_construct (GType object_type) {
      SettingsModel * self = NULL;
      DConfClient* _tmp0_ = NULL;
      Directory* _tmp1_ = NULL;
      SchemaList* _tmp2_ = NULL;
      gchar** _tmp3_;
      gchar** _tmp4_ = NULL;
      const gchar* _tmp11_ = NULL;
      gchar* _tmp12_;
      gchar* dir;
      GError * _inner_error_ = NULL;
      self = (SettingsModel*) g_object_new (object_type, NULL);
      _tmp0_ = dconf_client_new (NULL, _settings_model_watch_func_dconf_watch_func, g_object_ref (self), g_object_unref);
      _g_object_unref0 (self->client);
      self->client = _tmp0_;
      _tmp1_ = directory_new (self, NULL, "/", "/");
      _g_object_unref0 (self->priv->root);
      self->priv->root = _tmp1_;
      dconf_client_watch (self->client, "/", NULL, &_inner_error_);
      if (_inner_error_ != NULL) {
            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 NULL;
      }
      _tmp2_ = schema_list_new ();
      _schema_list_unref0 (self->schemas);
      self->schemas = _tmp2_;
      _tmp4_ = _tmp3_ = g_get_system_data_dirs ();
      {
            gchar** dir_collection;
            int dir_collection_length1;
            int dir_it;
            dir_collection = _tmp4_;
            dir_collection_length1 = _vala_array_length (_tmp3_);
            for (dir_it = 0; dir_it < _vala_array_length (_tmp3_); dir_it = dir_it + 1) {
                  gchar* _tmp5_;
                  gchar* dir;
                  _tmp5_ = g_strdup (dir_collection[dir_it]);
                  dir = _tmp5_;
                  {
                        gchar* _tmp6_ = NULL;
                        gchar* path;
                        GFile* _tmp7_ = NULL;
                        GFile* _tmp8_;
                        gboolean _tmp9_;
                        gboolean _tmp10_;
                        _tmp6_ = g_build_filename (dir, "glib-2.0", "schemas", NULL, NULL);
                        path = _tmp6_;
                        _tmp7_ = g_file_new_for_path (path);
                        _tmp8_ = _tmp7_;
                        _tmp9_ = g_file_query_exists (_tmp8_, NULL);
                        _tmp10_ = _tmp9_;
                        _g_object_unref0 (_tmp8_);
                        if (_tmp10_) {
                              schema_list_load_directory (self->schemas, path, &_inner_error_);
                              if (_inner_error_ != NULL) {
                                    _g_free0 (path);
                                    _g_free0 (dir);
                                    goto __catch3_g_error;
                              }
                        }
                        _g_free0 (path);
                        _g_free0 (dir);
                  }
            }
      }
      _tmp11_ = g_getenv ("GSETTINGS_SCHEMA_DIR");
      _tmp12_ = g_strdup (_tmp11_);
      dir = _tmp12_;
      if (dir != NULL) {
            schema_list_load_directory (self->schemas, dir, &_inner_error_);
            if (_inner_error_ != NULL) {
                  _g_free0 (dir);
                  goto __catch3_g_error;
            }
      }
      _g_free0 (dir);
      goto __finally3;
      __catch3_g_error:
      {
            GError * e;
            e = _inner_error_;
            _inner_error_ = NULL;
            g_warning ("dconf-model.vala:607: Failed to parse schemas: %s", e->message);
            _g_error_free0 (e);
      }
      __finally3:
      if (_inner_error_ != NULL) {
            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 NULL;
      }
      {
            GList* schema_collection;
            GList* schema_it;
            schema_collection = self->schemas->schemas;
            for (schema_it = schema_collection; schema_it != NULL; schema_it = schema_it->next) {
                  Schema* _tmp13_;
                  Schema* schema;
                  _tmp13_ = _schema_ref0 ((Schema*) schema_it->data);
                  schema = _tmp13_;
                  {
                        gint _tmp14_;
                        gchar* _tmp15_ = NULL;
                        gchar* _tmp16_;
                        _tmp14_ = strlen (schema->path);
                        _tmp15_ = string_slice (schema->path, (glong) 1, (glong) _tmp14_);
                        _tmp16_ = _tmp15_;
                        directory_load_schema (self->priv->root, schema, _tmp16_);
                        _g_free0 (_tmp16_);
                        _schema_unref0 (schema);
                  }
            }
      }
      return self;
}


SettingsModel* settings_model_new (void) {
      return settings_model_construct (TYPE_SETTINGS_MODEL);
}


static GtkTreeModelFlags settings_model_real_get_flags (GtkTreeModel* base) {
      SettingsModel * self;
      GtkTreeModelFlags result = 0;
      self = (SettingsModel*) base;
      result = 0;
      return result;
}


static gint settings_model_real_get_n_columns (GtkTreeModel* base) {
      SettingsModel * self;
      gint result = 0;
      self = (SettingsModel*) base;
      result = 2;
      return result;
}


static GType settings_model_real_get_column_type (GtkTreeModel* base, gint index) {
      SettingsModel * self;
      GType result = 0UL;
      self = (SettingsModel*) base;
      if (index == 0) {
            result = TYPE_DIRECTORY;
            return result;
      } else {
            result = G_TYPE_STRING;
            return result;
      }
}


static void settings_model_set_iter (SettingsModel* self, GtkTreeIter* iter, Directory* directory) {
      GtkTreeIter _iter = {0};
      g_return_if_fail (self != NULL);
      g_return_if_fail (directory != NULL);
      _iter.stamp = 0;
      _iter.user_data = directory;
      _iter.user_data2 = directory;
      _iter.user_data3 = directory;
      if (iter) {
            *iter = _iter;
      }
}


Directory* settings_model_get_directory (SettingsModel* self, GtkTreeIter* iter) {
      Directory* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (iter == NULL) {
            Directory* _tmp0_;
            _tmp0_ = _g_object_ref0 (self->priv->root);
            result = _tmp0_;
            return result;
      } else {
            Directory* _tmp1_;
            _tmp1_ = _g_object_ref0 (DIRECTORY ((*iter).user_data));
            result = _tmp1_;
            return result;
      }
}


static gboolean settings_model_real_get_iter (GtkTreeModel* base, GtkTreeIter* iter, GtkTreePath* path) {
      SettingsModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      gint _tmp0_;
      gint* _tmp1_ = NULL;
      GtkTreeIter _tmp2_ = {0};
      gboolean _tmp3_;
      self = (SettingsModel*) base;
      g_return_val_if_fail (path != NULL, FALSE);
      _tmp1_ = gtk_tree_path_get_indices_with_depth (path, &_tmp0_);
      _tmp3_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) self, &_tmp2_, NULL, _tmp1_[0]);
      _iter = _tmp2_;
      if (!_tmp3_) {
            result = FALSE;
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      {
            gint i;
            i = 1;
            {
                  gboolean _tmp4_;
                  _tmp4_ = TRUE;
                  while (TRUE) {
                        gint _tmp5_;
                        GtkTreeIter parent;
                        gint _tmp6_;
                        gint* _tmp7_ = NULL;
                        GtkTreeIter _tmp8_ = {0};
                        gboolean _tmp9_;
                        if (!_tmp4_) {
                              i++;
                        }
                        _tmp4_ = FALSE;
                        _tmp5_ = gtk_tree_path_get_depth (path);
                        if (!(i < _tmp5_)) {
                              break;
                        }
                        parent = _iter;
                        _tmp7_ = gtk_tree_path_get_indices_with_depth (path, &_tmp6_);
                        _tmp9_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) self, &_tmp8_, &parent, _tmp7_[i]);
                        _iter = _tmp8_;
                        if (!_tmp9_) {
                              result = FALSE;
                              if (iter) {
                                    *iter = _iter;
                              }
                              return result;
                        }
                  }
            }
      }
      result = TRUE;
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static GtkTreePath* settings_model_real_get_path (GtkTreeModel* base, GtkTreeIter* iter) {
      SettingsModel * self;
      GtkTreePath* result = NULL;
      GtkTreePath* _tmp0_ = NULL;
      GtkTreePath* path;
      self = (SettingsModel*) base;
      _tmp0_ = gtk_tree_path_new ();
      path = _tmp0_;
      {
            Directory* _tmp1_ = NULL;
            Directory* d;
            _tmp1_ = settings_model_get_directory (self, iter);
            d = _tmp1_;
            {
                  gboolean _tmp2_;
                  _tmp2_ = TRUE;
                  while (TRUE) {
                        gint _tmp4_;
                        if (!_tmp2_) {
                              Directory* _tmp3_;
                              _tmp3_ = _g_object_ref0 (d->parent);
                              _g_object_unref0 (d);
                              d = _tmp3_;
                        }
                        _tmp2_ = FALSE;
                        if (!(d != self->priv->root)) {
                              break;
                        }
                        _tmp4_ = directory_get_index (d);
                        gtk_tree_path_prepend_index (path, (gint) _tmp4_);
                  }
            }
            _g_object_unref0 (d);
      }
      result = path;
      return result;
}


static void settings_model_real_get_value (GtkTreeModel* base, GtkTreeIter* iter, gint column, GValue* value) {
      SettingsModel * self;
      GValue _value = {0};
      self = (SettingsModel*) base;
      if (column == 0) {
            Directory* _tmp0_ = NULL;
            GValue _tmp1_ = {0};
            _tmp0_ = settings_model_get_directory (self, iter);
            g_value_init (&_tmp1_, TYPE_DIRECTORY);
            g_value_take_object (&_tmp1_, _tmp0_);
            G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
            _value = _tmp1_;
      } else {
            Directory* _tmp2_ = NULL;
            Directory* _tmp3_;
            GValue _tmp4_ = {0};
            _tmp2_ = settings_model_get_directory (self, iter);
            _tmp3_ = _tmp2_;
            g_value_init (&_tmp4_, G_TYPE_STRING);
            g_value_set_string (&_tmp4_, _tmp3_->name);
            G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
            _value = _tmp4_;
            _g_object_unref0 (_tmp3_);
      }
      if (value) {
            *value = _value;
      } else {
            G_IS_VALUE (&_value) ? (g_value_unset (&_value), NULL) : NULL;
      }
}


static gboolean settings_model_real_iter_next (GtkTreeModel* base, GtkTreeIter* iter) {
      SettingsModel * self;
      gboolean result = FALSE;
      Directory* _tmp0_ = NULL;
      Directory* directory;
      gint _tmp1_;
      GList* _tmp2_ = NULL;
      guint _tmp3_;
      GList* _tmp4_ = NULL;
      gint _tmp5_;
      gconstpointer _tmp6_ = NULL;
      GtkTreeIter _tmp7_ = {0};
      self = (SettingsModel*) base;
      _tmp0_ = settings_model_get_directory (self, iter);
      directory = _tmp0_;
      _tmp1_ = directory_get_index (directory);
      _tmp2_ = directory_get_children (directory->parent);
      _tmp3_ = g_list_length (_tmp2_);
      if (_tmp1_ >= (_tmp3_ - 1)) {
            result = FALSE;
            _g_object_unref0 (directory);
            return result;
      }
      _tmp4_ = directory_get_children (directory->parent);
      _tmp5_ = directory_get_index (directory);
      _tmp6_ = g_list_nth_data (_tmp4_, (guint) (_tmp5_ + 1));
      settings_model_set_iter (self, &_tmp7_, (Directory*) _tmp6_);
      *iter = _tmp7_;
      result = TRUE;
      _g_object_unref0 (directory);
      return result;
}


static gboolean settings_model_real_iter_children (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent) {
      SettingsModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      Directory* _tmp0_ = NULL;
      Directory* directory;
      GList* _tmp1_ = NULL;
      guint _tmp2_;
      GList* _tmp3_ = NULL;
      gconstpointer _tmp4_ = NULL;
      GtkTreeIter _tmp5_ = {0};
      self = (SettingsModel*) base;
      _tmp0_ = settings_model_get_directory (self, parent);
      directory = _tmp0_;
      _tmp1_ = directory_get_children (directory);
      _tmp2_ = g_list_length (_tmp1_);
      if (_tmp2_ == 0) {
            result = FALSE;
            _g_object_unref0 (directory);
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp3_ = directory_get_children (directory);
      _tmp4_ = g_list_nth_data (_tmp3_, (guint) 0);
      settings_model_set_iter (self, &_tmp5_, (Directory*) _tmp4_);
      _iter = _tmp5_;
      result = TRUE;
      _g_object_unref0 (directory);
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static gboolean settings_model_real_iter_has_child (GtkTreeModel* base, GtkTreeIter* iter) {
      SettingsModel * self;
      gboolean result = FALSE;
      Directory* _tmp0_ = NULL;
      Directory* _tmp1_;
      GList* _tmp2_ = NULL;
      guint _tmp3_;
      gboolean _tmp4_;
      self = (SettingsModel*) base;
      _tmp0_ = settings_model_get_directory (self, iter);
      _tmp1_ = _tmp0_;
      _tmp2_ = directory_get_children (_tmp1_);
      _tmp3_ = g_list_length (_tmp2_);
      _tmp4_ = _tmp3_ > 0;
      _g_object_unref0 (_tmp1_);
      result = _tmp4_;
      return result;
}


static gint settings_model_real_iter_n_children (GtkTreeModel* base, GtkTreeIter* iter) {
      SettingsModel * self;
      gint result = 0;
      Directory* _tmp0_ = NULL;
      Directory* _tmp1_;
      GList* _tmp2_ = NULL;
      guint _tmp3_;
      gint _tmp4_;
      self = (SettingsModel*) base;
      _tmp0_ = settings_model_get_directory (self, iter);
      _tmp1_ = _tmp0_;
      _tmp2_ = directory_get_children (_tmp1_);
      _tmp3_ = g_list_length (_tmp2_);
      _tmp4_ = (gint) _tmp3_;
      _g_object_unref0 (_tmp1_);
      result = _tmp4_;
      return result;
}


static gboolean settings_model_real_iter_nth_child (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* parent, gint n) {
      SettingsModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      Directory* _tmp0_ = NULL;
      Directory* directory;
      GList* _tmp1_ = NULL;
      guint _tmp2_;
      GList* _tmp3_ = NULL;
      gconstpointer _tmp4_ = NULL;
      GtkTreeIter _tmp5_ = {0};
      self = (SettingsModel*) base;
      _tmp0_ = settings_model_get_directory (self, parent);
      directory = _tmp0_;
      _tmp1_ = directory_get_children (directory);
      _tmp2_ = g_list_length (_tmp1_);
      if (n >= _tmp2_) {
            result = FALSE;
            _g_object_unref0 (directory);
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      _tmp3_ = directory_get_children (directory);
      _tmp4_ = g_list_nth_data (_tmp3_, (guint) n);
      settings_model_set_iter (self, &_tmp5_, (Directory*) _tmp4_);
      _iter = _tmp5_;
      result = TRUE;
      _g_object_unref0 (directory);
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static gboolean settings_model_real_iter_parent (GtkTreeModel* base, GtkTreeIter* iter, GtkTreeIter* child) {
      SettingsModel * self;
      GtkTreeIter _iter = {0};
      gboolean result = FALSE;
      Directory* _tmp0_ = NULL;
      Directory* directory;
      GtkTreeIter _tmp1_ = {0};
      self = (SettingsModel*) base;
      _tmp0_ = settings_model_get_directory (self, child);
      directory = _tmp0_;
      if (directory->parent == self->priv->root) {
            result = FALSE;
            _g_object_unref0 (directory);
            if (iter) {
                  *iter = _iter;
            }
            return result;
      }
      settings_model_set_iter (self, &_tmp1_, directory->parent);
      _iter = _tmp1_;
      result = TRUE;
      _g_object_unref0 (directory);
      if (iter) {
            *iter = _iter;
      }
      return result;
}


static void settings_model_real_ref_node (GtkTreeModel* base, GtkTreeIter* iter) {
      SettingsModel * self;
      Directory* _tmp0_ = NULL;
      Directory* _tmp1_;
      self = (SettingsModel*) base;
      _tmp0_ = settings_model_get_directory (self, iter);
      _tmp1_ = _tmp0_;
      g_object_ref ((GObject*) _tmp1_);
      _g_object_unref0 (_tmp1_);
}


static void settings_model_real_unref_node (GtkTreeModel* base, GtkTreeIter* iter) {
      SettingsModel * self;
      Directory* _tmp0_ = NULL;
      Directory* _tmp1_;
      self = (SettingsModel*) base;
      _tmp0_ = settings_model_get_directory (self, iter);
      _tmp1_ = _tmp0_;
      g_object_unref ((GObject*) _tmp1_);
      _g_object_unref0 (_tmp1_);
}


static void settings_model_class_init (SettingsModelClass * klass) {
      settings_model_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (SettingsModelPrivate));
      G_OBJECT_CLASS (klass)->finalize = settings_model_finalize;
      g_signal_new ("item_changed", TYPE_SETTINGS_MODEL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}


static void settings_model_gtk_tree_model_interface_init (GtkTreeModelIface * iface) {
      settings_model_gtk_tree_model_parent_iface = g_type_interface_peek_parent (iface);
      iface->get_flags = (GtkTreeModelFlags (*)(GtkTreeModel*)) settings_model_real_get_flags;
      iface->get_n_columns = (gint (*)(GtkTreeModel*)) settings_model_real_get_n_columns;
      iface->get_column_type = (GType (*)(GtkTreeModel* ,gint)) settings_model_real_get_column_type;
      iface->get_iter = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreePath*)) settings_model_real_get_iter;
      iface->get_path = (GtkTreePath* (*)(GtkTreeModel* ,GtkTreeIter*)) settings_model_real_get_path;
      iface->get_value = (void (*)(GtkTreeModel* ,GtkTreeIter* ,gint ,GValue*)) settings_model_real_get_value;
      iface->iter_next = (gboolean (*)(GtkTreeModel* ,GtkTreeIter*)) settings_model_real_iter_next;
      iface->iter_children = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter*)) settings_model_real_iter_children;
      iface->iter_has_child = (gboolean (*)(GtkTreeModel* ,GtkTreeIter*)) settings_model_real_iter_has_child;
      iface->iter_n_children = (gint (*)(GtkTreeModel* ,GtkTreeIter*)) settings_model_real_iter_n_children;
      iface->iter_nth_child = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter* ,gint)) settings_model_real_iter_nth_child;
      iface->iter_parent = (gboolean (*)(GtkTreeModel* ,GtkTreeIter* ,GtkTreeIter*)) settings_model_real_iter_parent;
      iface->ref_node = (void (*)(GtkTreeModel* ,GtkTreeIter*)) settings_model_real_ref_node;
      iface->unref_node = (void (*)(GtkTreeModel* ,GtkTreeIter*)) settings_model_real_unref_node;
}


static void settings_model_instance_init (SettingsModel * self) {
      self->priv = SETTINGS_MODEL_GET_PRIVATE (self);
}


static void settings_model_finalize (GObject* obj) {
      SettingsModel * self;
      self = SETTINGS_MODEL (obj);
      _schema_list_unref0 (self->schemas);
      _g_object_unref0 (self->client);
      _g_object_unref0 (self->priv->root);
      G_OBJECT_CLASS (settings_model_parent_class)->finalize (obj);
}


GType settings_model_get_type (void) {
      static volatile gsize settings_model_type_id__volatile = 0;
      if (g_once_init_enter (&settings_model_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (SettingsModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsModel), 0, (GInstanceInitFunc) settings_model_instance_init, NULL };
            static const GInterfaceInfo gtk_tree_model_info = { (GInterfaceInitFunc) settings_model_gtk_tree_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
            GType settings_model_type_id;
            settings_model_type_id = g_type_register_static (G_TYPE_OBJECT, "SettingsModel", &g_define_type_info, 0);
            g_type_add_interface_static (settings_model_type_id, GTK_TYPE_TREE_MODEL, &gtk_tree_model_info);
            g_once_init_leave (&settings_model_type_id__volatile, settings_model_type_id);
      }
      return settings_model_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
      if ((array != NULL) && (destroy_func != NULL)) {
            int i;
            for (i = 0; i < array_length; i = i + 1) {
                  if (((gpointer*) array)[i] != NULL) {
                        destroy_func (((gpointer*) array)[i]);
                  }
            }
      }
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
      _vala_array_destroy (array, array_length, destroy_func);
      g_free (array);
}


static gint _vala_array_length (gpointer array) {
      int length;
      length = 0;
      if (array) {
            while (((gpointer*) array)[length]) {
                  length++;
            }
      }
      return length;
}




Generated by  Doxygen 1.6.0   Back to index