/* Settings.c generated by valac 0.56.19, the Vala compiler
 * generated from Settings.vala, do not modify */

/*
* Copyright (c) 2017 elementary, LLC. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

#include "keyboard.h"
#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define KEYBOARD_SHORTCUTS_TYPE_SETTINGS (keyboard_shortcuts_settings_get_type ())
#define KEYBOARD_SHORTCUTS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), KEYBOARD_SHORTCUTS_TYPE_SETTINGS, KeyboardShortcutsSettings))
#define KEYBOARD_SHORTCUTS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), KEYBOARD_SHORTCUTS_TYPE_SETTINGS, KeyboardShortcutsSettingsClass))
#define KEYBOARD_SHORTCUTS_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), KEYBOARD_SHORTCUTS_TYPE_SETTINGS))
#define KEYBOARD_SHORTCUTS_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), KEYBOARD_SHORTCUTS_TYPE_SETTINGS))
#define KEYBOARD_SHORTCUTS_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), KEYBOARD_SHORTCUTS_TYPE_SETTINGS, KeyboardShortcutsSettingsClass))

typedef struct _KeyboardShortcutsSettings KeyboardShortcutsSettings;
typedef struct _KeyboardShortcutsSettingsClass KeyboardShortcutsSettingsClass;
typedef struct _KeyboardShortcutsSettingsPrivate KeyboardShortcutsSettingsPrivate;
enum  {
	KEYBOARD_SHORTCUTS_SETTINGS_0_PROPERTY,
	KEYBOARD_SHORTCUTS_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* keyboard_shortcuts_settings_properties[KEYBOARD_SHORTCUTS_SETTINGS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_settings_schema_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_settings_schema_key_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_key_unref (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_settings_schema_source_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_source_unref (var), NULL)))

struct _KeyboardShortcutsSettings {
	GObject parent_instance;
	KeyboardShortcutsSettingsPrivate * priv;
	GSettings** schemas;
	gint schemas_length1;
	gint _schemas_size_;
};

struct _KeyboardShortcutsSettingsClass {
	GObjectClass parent_class;
};

struct _KeyboardShortcutsSettingsPrivate {
	gchar** schema_names;
	gint schema_names_length1;
	gint _schema_names_size_;
};

static gint KeyboardShortcutsSettings_private_offset;
static gpointer keyboard_shortcuts_settings_parent_class = NULL;
static GOnce keyboard_shortcuts_settings_instance;
static GOnce keyboard_shortcuts_settings_instance = G_ONCE_INIT;

VALA_EXTERN GType keyboard_shortcuts_settings_get_type (void) G_GNUC_CONST ;
VALA_EXTERN KeyboardShortcutsSettings* keyboard_shortcuts_settings_get_default (void);
static KeyboardShortcutsSettings* __lambda58_ (void);
static KeyboardShortcutsSettings* keyboard_shortcuts_settings_new (void);
static KeyboardShortcutsSettings* keyboard_shortcuts_settings_construct (GType object_type);
static gpointer ___lambda58__gthread_func (gpointer self);
VALA_EXTERN gboolean keyboard_shortcuts_settings_valid (KeyboardShortcutsSettings* self,
                                            KeyboardShortcutsSchema schema,
                                            const gchar* key);
VALA_EXTERN KeyboardShortcutsShortcut* keyboard_shortcuts_settings_get_val (KeyboardShortcutsSettings* self,
                                                                KeyboardShortcutsSchema schema,
                                                                const gchar* key);
static GObject * keyboard_shortcuts_settings_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties);
static void _vala_array_add14 (GSettings** * array,
                        gint* length,
                        gint* size,
                        GSettings* value);
static void _vala_array_add15 (GSettings** * array,
                        gint* length,
                        gint* size,
                        GSettings* value);
static void keyboard_shortcuts_settings_finalize (GObject * obj);
static GType keyboard_shortcuts_settings_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static GType
keyboard_shortcuts_schema_get_type_once (void)
{
	static const GEnumValue values[] = {{KEYBOARD_SHORTCUTS_SCHEMA_WM, "KEYBOARD_SHORTCUTS_SCHEMA_WM", "wm"}, {KEYBOARD_SHORTCUTS_SCHEMA_MUTTER, "KEYBOARD_SHORTCUTS_SCHEMA_MUTTER", "mutter"}, {KEYBOARD_SHORTCUTS_SCHEMA_GALA, "KEYBOARD_SHORTCUTS_SCHEMA_GALA", "gala"}, {KEYBOARD_SHORTCUTS_SCHEMA_MEDIA, "KEYBOARD_SHORTCUTS_SCHEMA_MEDIA", "media"}, {KEYBOARD_SHORTCUTS_SCHEMA_SOUND_INDICATOR, "KEYBOARD_SHORTCUTS_SCHEMA_SOUND_INDICATOR", "sound-indicator"}, {KEYBOARD_SHORTCUTS_SCHEMA_IBUS, "KEYBOARD_SHORTCUTS_SCHEMA_IBUS", "ibus"}, {KEYBOARD_SHORTCUTS_SCHEMA_DOCK, "KEYBOARD_SHORTCUTS_SCHEMA_DOCK", "dock"}, {KEYBOARD_SHORTCUTS_SCHEMA_COUNT, "KEYBOARD_SHORTCUTS_SCHEMA_COUNT", "count"}, {0, NULL, NULL}};
	GType keyboard_shortcuts_schema_type_id;
	keyboard_shortcuts_schema_type_id = g_enum_register_static ("KeyboardShortcutsSchema", values);
	return keyboard_shortcuts_schema_type_id;
}

GType
keyboard_shortcuts_schema_get_type (void)
{
	static volatile gsize keyboard_shortcuts_schema_type_id__once = 0;
	if (g_once_init_enter (&keyboard_shortcuts_schema_type_id__once)) {
		GType keyboard_shortcuts_schema_type_id;
		keyboard_shortcuts_schema_type_id = keyboard_shortcuts_schema_get_type_once ();
		g_once_init_leave (&keyboard_shortcuts_schema_type_id__once, keyboard_shortcuts_schema_type_id);
	}
	return keyboard_shortcuts_schema_type_id__once;
}

static inline gpointer
keyboard_shortcuts_settings_get_instance_private (KeyboardShortcutsSettings* self)
{
	return G_STRUCT_MEMBER_P (self, KeyboardShortcutsSettings_private_offset);
}

static KeyboardShortcutsSettings*
__lambda58_ (void)
{
	KeyboardShortcutsSettings* _tmp0_;
	KeyboardShortcutsSettings* result;
	_tmp0_ = keyboard_shortcuts_settings_new ();
	result = _tmp0_;
	return result;
}

static gpointer
___lambda58__gthread_func (gpointer self)
{
	gpointer result;
	result = __lambda58_ ();
	return result;
}

KeyboardShortcutsSettings*
keyboard_shortcuts_settings_get_default (void)
{
	gconstpointer _tmp0_;
	KeyboardShortcutsSettings* result;
	_tmp0_ = g_once (&keyboard_shortcuts_settings_instance, ___lambda58__gthread_func, NULL);
	result = (KeyboardShortcutsSettings*) _tmp0_;
	return result;
}

static KeyboardShortcutsSettings*
keyboard_shortcuts_settings_construct (GType object_type)
{
	KeyboardShortcutsSettings * self = NULL;
	self = (KeyboardShortcutsSettings*) g_object_new (object_type, NULL);
	return self;
}

static KeyboardShortcutsSettings*
keyboard_shortcuts_settings_new (void)
{
	return keyboard_shortcuts_settings_construct (KEYBOARD_SHORTCUTS_TYPE_SETTINGS);
}

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

gboolean
keyboard_shortcuts_settings_valid (KeyboardShortcutsSettings* self,
                                   KeyboardShortcutsSchema schema,
                                   const gchar* key)
{
	gboolean _tmp0_ = FALSE;
	GSettings* gsettings = NULL;
	GSettings** _tmp1_;
	gint _tmp1__length1;
	GSettings* _tmp2_;
	GSettings* _tmp3_;
	GSettings* _tmp4_;
	GSettings* _tmp5_;
	GSettingsSchema* _tmp6_;
	GSettingsSchema* _tmp7_;
	GSettingsSchema* _tmp8_;
	gchar** _tmp9_;
	gchar** _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	if (schema < 0) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = schema >= KEYBOARD_SHORTCUTS_SCHEMA_COUNT;
	}
	if (_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->schemas;
	_tmp1__length1 = self->schemas_length1;
	_tmp2_ = _tmp1_[schema];
	_tmp3_ = _g_object_ref0 (_tmp2_);
	gsettings = _tmp3_;
	_tmp4_ = gsettings;
	if (_tmp4_ == NULL) {
		result = FALSE;
		_g_object_unref0 (gsettings);
		return result;
	}
	_tmp5_ = gsettings;
	g_object_get (_tmp5_, "settings-schema", &_tmp6_, NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp10_ = _tmp9_ = g_settings_schema_list_keys (_tmp8_);
	_tmp11_ = _tmp10_;
	_tmp11__length1 = _vala_array_length (_tmp9_);
	_g_settings_schema_unref0 (_tmp8_);
	{
		gchar** tmp_key_collection = NULL;
		gint tmp_key_collection_length1 = 0;
		gint _tmp_key_collection_size_ = 0;
		gint tmp_key_it = 0;
		tmp_key_collection = _tmp11_;
		tmp_key_collection_length1 = _tmp11__length1;
		for (tmp_key_it = 0; tmp_key_it < tmp_key_collection_length1; tmp_key_it = tmp_key_it + 1) {
			gchar* _tmp12_;
			gchar* tmp_key = NULL;
			_tmp12_ = g_strdup (tmp_key_collection[tmp_key_it]);
			tmp_key = _tmp12_;
			{
				const gchar* _tmp13_;
				_tmp13_ = tmp_key;
				if (g_strcmp0 (key, _tmp13_) == 0) {
					result = TRUE;
					_g_free0 (tmp_key);
					tmp_key_collection = (_vala_array_free (tmp_key_collection, tmp_key_collection_length1, (GDestroyNotify) g_free), NULL);
					_g_object_unref0 (gsettings);
					return result;
				}
				_g_free0 (tmp_key);
			}
		}
		tmp_key_collection = (_vala_array_free (tmp_key_collection, tmp_key_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	result = FALSE;
	_g_object_unref0 (gsettings);
	return result;
}

static gpointer
_g_variant_type_copy0 (gpointer self)
{
	return self ? g_variant_type_copy (self) : NULL;
}

KeyboardShortcutsShortcut*
keyboard_shortcuts_settings_get_val (KeyboardShortcutsSettings* self,
                                     KeyboardShortcutsSchema schema,
                                     const gchar* key)
{
	GSettings* gsettings = NULL;
	GSettings** _tmp1_;
	gint _tmp1__length1;
	GSettings* _tmp2_;
	GSettings* _tmp3_;
	GVariantType* key_type = NULL;
	GSettings* _tmp4_;
	GSettingsSchema* _tmp5_;
	GSettingsSchema* _tmp6_;
	GSettingsSchema* _tmp7_;
	GSettingsSchemaKey* _tmp8_;
	GSettingsSchemaKey* _tmp9_;
	const GVariantType* _tmp10_;
	GVariantType* _tmp11_;
	GVariantType* _tmp12_;
	gchar* str = NULL;
	const GVariantType* _tmp13_;
	const GVariantType* _tmp14_;
	const gchar* _tmp25_;
	KeyboardShortcutsShortcut* _tmp26_;
	KeyboardShortcutsShortcut* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	if (!keyboard_shortcuts_settings_valid (self, schema, key)) {
		KeyboardShortcutsShortcut* _tmp0_;
		_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (NULL, KEYBOARD_SHORTCUTS_TYPE_SHORTCUT, KeyboardShortcutsShortcut));
		result = _tmp0_;
		return result;
	}
	_tmp1_ = self->schemas;
	_tmp1__length1 = self->schemas_length1;
	_tmp2_ = _tmp1_[schema];
	_tmp3_ = _g_object_ref0 (_tmp2_);
	gsettings = _tmp3_;
	_tmp4_ = gsettings;
	g_object_get (_tmp4_, "settings-schema", &_tmp5_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	_tmp8_ = g_settings_schema_get_key (_tmp7_, key);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_settings_schema_key_get_value_type (_tmp9_);
	_tmp11_ = _g_variant_type_copy0 (_tmp10_);
	_tmp12_ = _tmp11_;
	_g_settings_schema_key_unref0 (_tmp9_);
	_g_settings_schema_unref0 (_tmp7_);
	key_type = _tmp12_;
	str = NULL;
	_tmp13_ = key_type;
	_tmp14_ = G_VARIANT_TYPE_STRING;
	if (g_variant_type_equal (_tmp13_, _tmp14_)) {
		GSettings* _tmp15_;
		gchar* _tmp16_;
		_tmp15_ = gsettings;
		_tmp16_ = g_settings_get_string (_tmp15_, key);
		_g_free0 (str);
		str = _tmp16_;
	} else {
		const GVariantType* _tmp17_;
		const GVariantType* _tmp18_;
		_tmp17_ = key_type;
		_tmp18_ = G_VARIANT_TYPE_STRING_ARRAY;
		if (g_variant_type_equal (_tmp17_, _tmp18_)) {
			GSettings* _tmp19_;
			gchar** _tmp20_;
			gchar** _tmp21_;
			gchar** _tmp22_;
			gint _tmp22__length1;
			const gchar* _tmp23_;
			gchar* _tmp24_;
			_tmp19_ = gsettings;
			_tmp21_ = _tmp20_ = g_settings_get_strv (_tmp19_, key);
			_tmp22_ = _tmp21_;
			_tmp22__length1 = _vala_array_length (_tmp20_);
			_tmp23_ = _tmp22_[0];
			_tmp24_ = g_strdup (_tmp23_);
			_g_free0 (str);
			str = _tmp24_;
			_tmp22_ = (_vala_array_free (_tmp22_, _tmp22__length1, (GDestroyNotify) g_free), NULL);
		}
	}
	_tmp25_ = str;
	_tmp26_ = keyboard_shortcuts_shortcut_new_parse (_tmp25_);
	result = _tmp26_;
	_g_free0 (str);
	_g_variant_type_free0 (key_type);
	_g_object_unref0 (gsettings);
	return result;
}

static gpointer
_g_settings_schema_source_ref0 (gpointer self)
{
	return self ? g_settings_schema_source_ref (self) : NULL;
}

static void
_vala_array_add14 (GSettings** * array,
                   gint* length,
                   gint* size,
                   GSettings* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GSettings*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add15 (GSettings** * array,
                   gint* length,
                   gint* size,
                   GSettings* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GSettings*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static GObject *
keyboard_shortcuts_settings_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	KeyboardShortcutsSettings * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	parent_class = G_OBJECT_CLASS (keyboard_shortcuts_settings_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, KEYBOARD_SHORTCUTS_TYPE_SETTINGS, KeyboardShortcutsSettings);
	_tmp0_ = g_strdup ("org.gnome.desktop.wm.keybindings");
	_tmp1_ = g_strdup ("org.gnome.mutter.keybindings");
	_tmp2_ = g_strdup ("io.elementary.desktop.wm.keybindings");
	_tmp3_ = g_strdup ("org.gnome.settings-daemon.plugins.media-keys");
	_tmp4_ = g_strdup ("io.elementary.desktop.wingpanel.sound");
	_tmp5_ = g_strdup ("org.freedesktop.ibus.panel.emoji");
	_tmp6_ = g_strdup ("io.elementary.dock.keybindings");
	_tmp7_ = g_new0 (gchar*, 7 + 1);
	_tmp7_[0] = _tmp0_;
	_tmp7_[1] = _tmp1_;
	_tmp7_[2] = _tmp2_;
	_tmp7_[3] = _tmp3_;
	_tmp7_[4] = _tmp4_;
	_tmp7_[5] = _tmp5_;
	_tmp7_[6] = _tmp6_;
	self->priv->schema_names = (_vala_array_free (self->priv->schema_names, self->priv->schema_names_length1, (GDestroyNotify) g_free), NULL);
	self->priv->schema_names = _tmp7_;
	self->priv->schema_names_length1 = 7;
	self->priv->_schema_names_size_ = self->priv->schema_names_length1;
	_tmp8_ = self->priv->schema_names;
	_tmp8__length1 = self->priv->schema_names_length1;
	{
		gchar** name_collection = NULL;
		gint name_collection_length1 = 0;
		gint _name_collection_size_ = 0;
		gint name_it = 0;
		name_collection = _tmp8_;
		name_collection_length1 = _tmp8__length1;
		for (name_it = 0; name_it < name_collection_length1; name_it = name_it + 1) {
			gchar* _tmp9_;
			gchar* name = NULL;
			_tmp9_ = g_strdup (name_collection[name_it]);
			name = _tmp9_;
			{
				GSettingsSchemaSource* schema_source = NULL;
				GSettingsSchemaSource* _tmp10_;
				GSettingsSchemaSource* _tmp11_;
				GSettingsSchema* schema = NULL;
				GSettingsSchemaSource* _tmp12_;
				const gchar* _tmp13_;
				GSettingsSchema* _tmp14_;
				GSettingsSchema* _tmp15_;
				_tmp10_ = g_settings_schema_source_get_default ();
				_tmp11_ = _g_settings_schema_source_ref0 (_tmp10_);
				schema_source = _tmp11_;
				_tmp12_ = schema_source;
				_tmp13_ = name;
				_tmp14_ = g_settings_schema_source_lookup (_tmp12_, _tmp13_, TRUE);
				schema = _tmp14_;
				_tmp15_ = schema;
				if (_tmp15_ == NULL) {
					GSettings* _tmp16_;
					_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (NULL, g_settings_get_type (), GSettings));
					_vala_array_add14 (&self->schemas, &self->schemas_length1, &self->_schemas_size_, _tmp16_);
				} else {
					GSettingsSchema* _tmp17_;
					GSettings* _tmp18_;
					_tmp17_ = schema;
					_tmp18_ = g_settings_new_full (_tmp17_, NULL, NULL);
					_vala_array_add15 (&self->schemas, &self->schemas_length1, &self->_schemas_size_, _tmp18_);
				}
				_g_settings_schema_unref0 (schema);
				_g_settings_schema_source_unref0 (schema_source);
				_g_free0 (name);
			}
		}
	}
	return obj;
}

static void
keyboard_shortcuts_settings_class_init (KeyboardShortcutsSettingsClass * klass,
                                        gpointer klass_data)
{
	keyboard_shortcuts_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyboardShortcutsSettings_private_offset);
	G_OBJECT_CLASS (klass)->constructor = keyboard_shortcuts_settings_constructor;
	G_OBJECT_CLASS (klass)->finalize = keyboard_shortcuts_settings_finalize;
}

static void
keyboard_shortcuts_settings_instance_init (KeyboardShortcutsSettings * self,
                                           gpointer klass)
{
	self->priv = keyboard_shortcuts_settings_get_instance_private (self);
}

static void
keyboard_shortcuts_settings_finalize (GObject * obj)
{
	KeyboardShortcutsSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, KEYBOARD_SHORTCUTS_TYPE_SETTINGS, KeyboardShortcutsSettings);
	self->schemas = (_vala_array_free (self->schemas, self->schemas_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->schema_names = (_vala_array_free (self->priv->schema_names, self->priv->schema_names_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (keyboard_shortcuts_settings_parent_class)->finalize (obj);
}

static GType
keyboard_shortcuts_settings_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyboardShortcutsSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) keyboard_shortcuts_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyboardShortcutsSettings), 0, (GInstanceInitFunc) keyboard_shortcuts_settings_instance_init, NULL };
	GType keyboard_shortcuts_settings_type_id;
	keyboard_shortcuts_settings_type_id = g_type_register_static (G_TYPE_OBJECT, "KeyboardShortcutsSettings", &g_define_type_info, 0);
	KeyboardShortcutsSettings_private_offset = g_type_add_instance_private (keyboard_shortcuts_settings_type_id, sizeof (KeyboardShortcutsSettingsPrivate));
	return keyboard_shortcuts_settings_type_id;
}

GType
keyboard_shortcuts_settings_get_type (void)
{
	static volatile gsize keyboard_shortcuts_settings_type_id__once = 0;
	if (g_once_init_enter (&keyboard_shortcuts_settings_type_id__once)) {
		GType keyboard_shortcuts_settings_type_id;
		keyboard_shortcuts_settings_type_id = keyboard_shortcuts_settings_get_type_once ();
		g_once_init_leave (&keyboard_shortcuts_settings_type_id__once, keyboard_shortcuts_settings_type_id);
	}
	return keyboard_shortcuts_settings_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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

