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

/*
* Copyright 2020 elementary, Inc. (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 3 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 <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS (settings_daemon_backends_keyboard_settings_get_type ())
#define SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettings))
#define SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettingsClass))
#define SETTINGS_DAEMON_BACKENDS_IS_KEYBOARD_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_IS_KEYBOARD_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettingsClass))

typedef struct _SettingsDaemonBackendsKeyboardSettings SettingsDaemonBackendsKeyboardSettings;
typedef struct _SettingsDaemonBackendsKeyboardSettingsClass SettingsDaemonBackendsKeyboardSettingsClass;
typedef struct _SettingsDaemonBackendsKeyboardSettingsPrivate SettingsDaemonBackendsKeyboardSettingsPrivate;

#define SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE (settings_daemon_accounts_service_get_type ())
#define SETTINGS_DAEMON_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE, SettingsDaemonAccountsService))
#define SETTINGS_DAEMON_IS_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE))
#define SETTINGS_DAEMON_ACCOUNTS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE, SettingsDaemonAccountsServiceIface))

typedef struct _SettingsDaemonAccountsService SettingsDaemonAccountsService;
typedef struct _SettingsDaemonAccountsServiceIface SettingsDaemonAccountsServiceIface;

#define SETTINGS_DAEMON_ACCOUNTS_SERVICE_TYPE_KEYBOARD_LAYOUT (settings_daemon_accounts_service_keyboard_layout_get_type ())
typedef struct _SettingsDaemonAccountsServiceKeyboardLayout SettingsDaemonAccountsServiceKeyboardLayout;

#define SETTINGS_DAEMON_ACCOUNTS_SERVICE_TYPE_XKB_OPTION (settings_daemon_accounts_service_xkb_option_get_type ())
typedef struct _SettingsDaemonAccountsServiceXkbOption SettingsDaemonAccountsServiceXkbOption;

#define SETTINGS_DAEMON_ACCOUNTS_SERVICE_TYPE_COORDINATES (settings_daemon_accounts_service_coordinates_get_type ())
typedef struct _SettingsDaemonAccountsServiceCoordinates SettingsDaemonAccountsServiceCoordinates;

#define SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE_PROXY (settings_daemon_accounts_service_proxy_get_type ())
enum  {
	SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_0_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_ACCOUNTS_SERVICE_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* settings_daemon_backends_keyboard_settings_properties[SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _SettingsDaemonBackendsKeyboardSettings {
	GObject parent_instance;
	SettingsDaemonBackendsKeyboardSettingsPrivate * priv;
};

struct _SettingsDaemonBackendsKeyboardSettingsClass {
	GObjectClass parent_class;
};

struct _SettingsDaemonAccountsServiceKeyboardLayout {
	gchar* backend;
	gchar* name;
};

struct _SettingsDaemonAccountsServiceXkbOption {
	gchar* option;
};

struct _SettingsDaemonAccountsServiceCoordinates {
	gdouble latitude;
	gdouble longitude;
};

struct _SettingsDaemonAccountsServiceIface {
	GTypeInterface parent_iface;
	SettingsDaemonAccountsServiceKeyboardLayout* (*get_keyboard_layouts) (SettingsDaemonAccountsService* self, gint* result_length1);
	void (*set_keyboard_layouts) (SettingsDaemonAccountsService* self, SettingsDaemonAccountsServiceKeyboardLayout* value, gint value_length1);
	guint (*get_active_keyboard_layout) (SettingsDaemonAccountsService* self);
	void (*set_active_keyboard_layout) (SettingsDaemonAccountsService* self, guint value);
	SettingsDaemonAccountsServiceXkbOption* (*get_xkb_options) (SettingsDaemonAccountsService* self, gint* result_length1);
	void (*set_xkb_options) (SettingsDaemonAccountsService* self, SettingsDaemonAccountsServiceXkbOption* value, gint value_length1);
	gboolean (*get_left_handed) (SettingsDaemonAccountsService* self);
	void (*set_left_handed) (SettingsDaemonAccountsService* self, gboolean value);
	gint (*get_accel_profile) (SettingsDaemonAccountsService* self);
	void (*set_accel_profile) (SettingsDaemonAccountsService* self, gint value);
	gboolean (*get_mouse_natural_scroll) (SettingsDaemonAccountsService* self);
	void (*set_mouse_natural_scroll) (SettingsDaemonAccountsService* self, gboolean value);
	gdouble (*get_mouse_speed) (SettingsDaemonAccountsService* self);
	void (*set_mouse_speed) (SettingsDaemonAccountsService* self, gdouble value);
	gint (*get_touchpad_click_method) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_click_method) (SettingsDaemonAccountsService* self, gint value);
	gboolean (*get_touchpad_disable_while_typing) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_disable_while_typing) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_touchpad_edge_scrolling) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_edge_scrolling) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_touchpad_natural_scroll) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_natural_scroll) (SettingsDaemonAccountsService* self, gboolean value);
	gint (*get_touchpad_send_events) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_send_events) (SettingsDaemonAccountsService* self, gint value);
	gdouble (*get_touchpad_speed) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_speed) (SettingsDaemonAccountsService* self, gdouble value);
	gboolean (*get_touchpad_tap_to_click) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_tap_to_click) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_touchpad_two_finger_scrolling) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_two_finger_scrolling) (SettingsDaemonAccountsService* self, gboolean value);
	gint (*get_accent_color) (SettingsDaemonAccountsService* self);
	void (*set_accent_color) (SettingsDaemonAccountsService* self, gint value);
	gboolean (*get_cursor_blink) (SettingsDaemonAccountsService* self);
	void (*set_cursor_blink) (SettingsDaemonAccountsService* self, gboolean value);
	gint (*get_cursor_blink_time) (SettingsDaemonAccountsService* self);
	void (*set_cursor_blink_time) (SettingsDaemonAccountsService* self, gint value);
	gint (*get_cursor_blink_timeout) (SettingsDaemonAccountsService* self);
	void (*set_cursor_blink_timeout) (SettingsDaemonAccountsService* self, gint value);
	gint (*get_cursor_size) (SettingsDaemonAccountsService* self);
	void (*set_cursor_size) (SettingsDaemonAccountsService* self, gint value);
	gboolean (*get_locate_pointer) (SettingsDaemonAccountsService* self);
	void (*set_locate_pointer) (SettingsDaemonAccountsService* self, gboolean value);
	gdouble (*get_text_scaling_factor) (SettingsDaemonAccountsService* self);
	void (*set_text_scaling_factor) (SettingsDaemonAccountsService* self, gdouble value);
	gint (*get_picture_options) (SettingsDaemonAccountsService* self);
	void (*set_picture_options) (SettingsDaemonAccountsService* self, gint value);
	gchar* (*get_primary_color) (SettingsDaemonAccountsService* self);
	void (*set_primary_color) (SettingsDaemonAccountsService* self, const gchar* value);
	gchar* (*get_document_font_name) (SettingsDaemonAccountsService* self);
	void (*set_document_font_name) (SettingsDaemonAccountsService* self, const gchar* value);
	gchar* (*get_font_name) (SettingsDaemonAccountsService* self);
	void (*set_font_name) (SettingsDaemonAccountsService* self, const gchar* value);
	gchar* (*get_monospace_font_name) (SettingsDaemonAccountsService* self);
	void (*set_monospace_font_name) (SettingsDaemonAccountsService* self, const gchar* value);
	gboolean (*get_orientation_lock) (SettingsDaemonAccountsService* self);
	void (*set_orientation_lock) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_wingpanel_use_transparency) (SettingsDaemonAccountsService* self);
	void (*set_wingpanel_use_transparency) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_wingpanel_show_percentage) (SettingsDaemonAccountsService* self);
	void (*set_wingpanel_show_percentage) (SettingsDaemonAccountsService* self, gboolean value);
	void (*get_last_coordinates) (SettingsDaemonAccountsService* self, SettingsDaemonAccountsServiceCoordinates * result);
	void (*set_last_coordinates) (SettingsDaemonAccountsService* self, SettingsDaemonAccountsServiceCoordinates * value);
	gint (*get_prefer_dark_schedule) (SettingsDaemonAccountsService* self);
	void (*set_prefer_dark_schedule) (SettingsDaemonAccountsService* self, gint value);
	gdouble (*get_prefer_dark_schedule_from) (SettingsDaemonAccountsService* self);
	void (*set_prefer_dark_schedule_from) (SettingsDaemonAccountsService* self, gdouble value);
	gdouble (*get_prefer_dark_schedule_to) (SettingsDaemonAccountsService* self);
	void (*set_prefer_dark_schedule_to) (SettingsDaemonAccountsService* self, gdouble value);
	gboolean (*get_night_light_enabled) (SettingsDaemonAccountsService* self);
	void (*set_night_light_enabled) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_night_light_schedule_automatic) (SettingsDaemonAccountsService* self);
	void (*set_night_light_schedule_automatic) (SettingsDaemonAccountsService* self, gboolean value);
	gdouble (*get_night_light_schedule_from) (SettingsDaemonAccountsService* self);
	void (*set_night_light_schedule_from) (SettingsDaemonAccountsService* self, gdouble value);
	gdouble (*get_night_light_schedule_to) (SettingsDaemonAccountsService* self);
	void (*set_night_light_schedule_to) (SettingsDaemonAccountsService* self, gdouble value);
	guint (*get_night_light_temperature) (SettingsDaemonAccountsService* self);
	void (*set_night_light_temperature) (SettingsDaemonAccountsService* self, guint value);
};

struct _SettingsDaemonBackendsKeyboardSettingsPrivate {
	SettingsDaemonAccountsService* _accounts_service;
	GSettings* keyboard_settings;
};

static gint SettingsDaemonBackendsKeyboardSettings_private_offset;
static gpointer settings_daemon_backends_keyboard_settings_parent_class = NULL;

VALA_EXTERN GType settings_daemon_backends_keyboard_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsKeyboardSettings, g_object_unref)
VALA_EXTERN GType settings_daemon_accounts_service_keyboard_layout_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SettingsDaemonAccountsServiceKeyboardLayout* settings_daemon_accounts_service_keyboard_layout_dup (const SettingsDaemonAccountsServiceKeyboardLayout* self);
VALA_EXTERN void settings_daemon_accounts_service_keyboard_layout_free (SettingsDaemonAccountsServiceKeyboardLayout* self);
VALA_EXTERN void settings_daemon_accounts_service_keyboard_layout_copy (const SettingsDaemonAccountsServiceKeyboardLayout* self,
                                                            SettingsDaemonAccountsServiceKeyboardLayout* dest);
VALA_EXTERN void settings_daemon_accounts_service_keyboard_layout_destroy (SettingsDaemonAccountsServiceKeyboardLayout* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (SettingsDaemonAccountsServiceKeyboardLayout, settings_daemon_accounts_service_keyboard_layout_destroy)
VALA_EXTERN GType settings_daemon_accounts_service_xkb_option_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SettingsDaemonAccountsServiceXkbOption* settings_daemon_accounts_service_xkb_option_dup (const SettingsDaemonAccountsServiceXkbOption* self);
VALA_EXTERN void settings_daemon_accounts_service_xkb_option_free (SettingsDaemonAccountsServiceXkbOption* self);
VALA_EXTERN void settings_daemon_accounts_service_xkb_option_copy (const SettingsDaemonAccountsServiceXkbOption* self,
                                                       SettingsDaemonAccountsServiceXkbOption* dest);
VALA_EXTERN void settings_daemon_accounts_service_xkb_option_destroy (SettingsDaemonAccountsServiceXkbOption* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (SettingsDaemonAccountsServiceXkbOption, settings_daemon_accounts_service_xkb_option_destroy)
VALA_EXTERN GType settings_daemon_accounts_service_coordinates_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SettingsDaemonAccountsServiceCoordinates* settings_daemon_accounts_service_coordinates_dup (const SettingsDaemonAccountsServiceCoordinates* self);
VALA_EXTERN void settings_daemon_accounts_service_coordinates_free (SettingsDaemonAccountsServiceCoordinates* self);
VALA_EXTERN GType settings_daemon_accounts_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonAccountsService, g_object_unref)
VALA_EXTERN GType settings_daemon_accounts_service_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint settings_daemon_accounts_service_register_object (void* object,
                                                        GDBusConnection* connection,
                                                        const gchar* path,
                                                        GError** error);
VALA_EXTERN SettingsDaemonBackendsKeyboardSettings* settings_daemon_backends_keyboard_settings_new (SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsKeyboardSettings* settings_daemon_backends_keyboard_settings_construct (GType object_type,
                                                                                              SettingsDaemonAccountsService* accounts_service);
static void settings_daemon_backends_keyboard_settings_sync_accountsservice_to_gsettings (SettingsDaemonBackendsKeyboardSettings* self);
VALA_EXTERN SettingsDaemonAccountsService* settings_daemon_backends_keyboard_settings_get_accounts_service (SettingsDaemonBackendsKeyboardSettings* self);
VALA_EXTERN SettingsDaemonAccountsServiceKeyboardLayout* settings_daemon_accounts_service_get_keyboard_layouts (SettingsDaemonAccountsService* self,
                                                                                                    gint* result_length1);
static void _vala_array_add8 (GVariant** * array,
                       gint* length,
                       gint* size,
                       GVariant* value);
static void _vala_SettingsDaemonAccountsServiceKeyboardLayout_array_free (SettingsDaemonAccountsServiceKeyboardLayout * array,
                                                                   gssize array_length);
VALA_EXTERN guint settings_daemon_accounts_service_get_active_keyboard_layout (SettingsDaemonAccountsService* self);
static GVariant* _variant_new2 (guint value);
VALA_EXTERN SettingsDaemonAccountsServiceXkbOption* settings_daemon_accounts_service_get_xkb_options (SettingsDaemonAccountsService* self,
                                                                                          gint* result_length1);
static GVariant* _variant_new3 (SettingsDaemonAccountsServiceXkbOption* value,
                         gint value_length1);
static void _vala_SettingsDaemonAccountsServiceXkbOption_array_free (SettingsDaemonAccountsServiceXkbOption * array,
                                                              gssize array_length);
static void settings_daemon_backends_keyboard_settings_sync_gsettings_to_accountsservice (SettingsDaemonBackendsKeyboardSettings* self);
static void _vala_array_add9 (SettingsDaemonAccountsServiceKeyboardLayout* * array,
                       gint* length,
                       gint* size,
                       const SettingsDaemonAccountsServiceKeyboardLayout* value);
VALA_EXTERN void settings_daemon_accounts_service_set_keyboard_layouts (SettingsDaemonAccountsService* self,
                                                            SettingsDaemonAccountsServiceKeyboardLayout* value,
                                                            gint value_length1);
VALA_EXTERN void settings_daemon_accounts_service_set_active_keyboard_layout (SettingsDaemonAccountsService* self,
                                                                  guint value);
static void _vala_array_add10 (SettingsDaemonAccountsServiceXkbOption* * array,
                        gint* length,
                        gint* size,
                        const SettingsDaemonAccountsServiceXkbOption* value);
VALA_EXTERN void settings_daemon_accounts_service_set_xkb_options (SettingsDaemonAccountsService* self,
                                                       SettingsDaemonAccountsServiceXkbOption* value,
                                                       gint value_length1);
static void settings_daemon_backends_keyboard_settings_set_accounts_service (SettingsDaemonBackendsKeyboardSettings* self,
                                                                      SettingsDaemonAccountsService* value);
static GObject * settings_daemon_backends_keyboard_settings_constructor (GType type,
                                                                  guint n_construct_properties,
                                                                  GObjectConstructParam * construct_properties);
static void _settings_daemon_backends_keyboard_settings___lambda4_ (SettingsDaemonBackendsKeyboardSettings* self,
                                                             const gchar* key);
static void __settings_daemon_backends_keyboard_settings___lambda4__g_settings_changed (GSettings* _sender,
                                                                                 const gchar* key,
                                                                                 gpointer self);
static void settings_daemon_backends_keyboard_settings_finalize (GObject * obj);
static GType settings_daemon_backends_keyboard_settings_get_type_once (void);
static void _vala_settings_daemon_backends_keyboard_settings_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec);
static void _vala_settings_daemon_backends_keyboard_settings_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec);
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 inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
settings_daemon_backends_keyboard_settings_get_instance_private (SettingsDaemonBackendsKeyboardSettings* self)
{
	return G_STRUCT_MEMBER_P (self, SettingsDaemonBackendsKeyboardSettings_private_offset);
}

SettingsDaemonBackendsKeyboardSettings*
settings_daemon_backends_keyboard_settings_construct (GType object_type,
                                                      SettingsDaemonAccountsService* accounts_service)
{
	SettingsDaemonBackendsKeyboardSettings * self = NULL;
	g_return_val_if_fail (accounts_service != NULL, NULL);
	self = (SettingsDaemonBackendsKeyboardSettings*) g_object_new (object_type, "accounts-service", accounts_service, NULL);
	return self;
}

SettingsDaemonBackendsKeyboardSettings*
settings_daemon_backends_keyboard_settings_new (SettingsDaemonAccountsService* accounts_service)
{
	return settings_daemon_backends_keyboard_settings_construct (SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, accounts_service);
}

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

static void
_vala_SettingsDaemonAccountsServiceKeyboardLayout_array_free (SettingsDaemonAccountsServiceKeyboardLayout * array,
                                                              gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			settings_daemon_accounts_service_keyboard_layout_destroy (&array[i]);
		}
	}
	g_free (array);
}

static GVariant*
_variant_new2 (guint value)
{
	return g_variant_ref_sink (g_variant_new_uint32 (value));
}

static GVariant*
_variant_new3 (SettingsDaemonAccountsServiceXkbOption* value,
               gint value_length1)
{
	SettingsDaemonAccountsServiceXkbOption* _tmp29_;
	GVariantBuilder _tmp30_;
	gint _tmp31_;
	_tmp29_ = value;
	g_variant_builder_init (&_tmp30_, G_VARIANT_TYPE ("a(s)"));
	for (_tmp31_ = 0; _tmp31_ < value_length1; _tmp31_++) {
		GVariantBuilder _tmp32_;
		g_variant_builder_init (&_tmp32_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp32_, g_variant_new_string ((*_tmp29_).option));
		g_variant_builder_add_value (&_tmp30_, g_variant_builder_end (&_tmp32_));
		_tmp29_++;
	}
	return g_variant_ref_sink (g_variant_builder_end (&_tmp30_));
}

static void
_vala_SettingsDaemonAccountsServiceXkbOption_array_free (SettingsDaemonAccountsServiceXkbOption * array,
                                                         gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			settings_daemon_accounts_service_xkb_option_destroy (&array[i]);
		}
	}
	g_free (array);
}

static void
settings_daemon_backends_keyboard_settings_sync_accountsservice_to_gsettings (SettingsDaemonBackendsKeyboardSettings* self)
{
	GVariant** entries = NULL;
	GVariant** _tmp0_;
	gint entries_length1;
	gint _entries_size_;
	SettingsDaemonAccountsService* _tmp1_;
	SettingsDaemonAccountsServiceKeyboardLayout* _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_ = 0;
	SettingsDaemonAccountsServiceKeyboardLayout* _tmp4_;
	gint _tmp4__length1;
	GVariant* sources = NULL;
	GVariantType* _tmp12_;
	GVariantType* _tmp13_;
	GVariant** _tmp14_;
	gint _tmp14__length1;
	GVariant* _tmp15_;
	GVariant* _tmp16_;
	GSettings* _tmp17_;
	GSettings* _tmp18_;
	SettingsDaemonAccountsService* _tmp19_;
	guint _tmp20_;
	guint _tmp21_;
	GVariant* _tmp22_;
	GSettings* _tmp23_;
	SettingsDaemonAccountsService* _tmp24_;
	SettingsDaemonAccountsServiceXkbOption* _tmp25_;
	gint _tmp25__length1;
	gint _tmp26_ = 0;
	SettingsDaemonAccountsServiceXkbOption* _tmp27_;
	gint _tmp27__length1;
	SettingsDaemonAccountsServiceXkbOption* _tmp28_;
	gint _tmp28__length1;
	GVariant* _tmp33_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (GVariant*, 0 + 1);
	entries = _tmp0_;
	entries_length1 = 0;
	_entries_size_ = entries_length1;
	_tmp1_ = self->priv->_accounts_service;
	_tmp2_ = settings_daemon_accounts_service_get_keyboard_layouts (_tmp1_, &_tmp3_);
	_tmp2__length1 = _tmp3_;
	_tmp4_ = _tmp2_;
	_tmp4__length1 = _tmp2__length1;
	{
		SettingsDaemonAccountsServiceKeyboardLayout* layout_collection = NULL;
		gint layout_collection_length1 = 0;
		gint _layout_collection_size_ = 0;
		gint layout_it = 0;
		layout_collection = _tmp4_;
		layout_collection_length1 = _tmp4__length1;
		for (layout_it = 0; layout_it < layout_collection_length1; layout_it = layout_it + 1) {
			SettingsDaemonAccountsServiceKeyboardLayout _tmp5_;
			SettingsDaemonAccountsServiceKeyboardLayout _tmp6_ = {0};
			SettingsDaemonAccountsServiceKeyboardLayout layout = {0};
			_tmp5_ = layout_collection[layout_it];
			settings_daemon_accounts_service_keyboard_layout_copy (&_tmp5_, &_tmp6_);
			layout = _tmp6_;
			{
				SettingsDaemonAccountsServiceKeyboardLayout _tmp7_;
				const gchar* _tmp8_;
				SettingsDaemonAccountsServiceKeyboardLayout _tmp9_;
				const gchar* _tmp10_;
				GVariant* _tmp11_;
				_tmp7_ = layout;
				_tmp8_ = _tmp7_.backend;
				_tmp9_ = layout;
				_tmp10_ = _tmp9_.name;
				_tmp11_ = g_variant_new ("(ss)", _tmp8_, _tmp10_, NULL);
				g_variant_ref_sink (_tmp11_);
				_vala_array_add8 (&entries, &entries_length1, &_entries_size_, _tmp11_);
				settings_daemon_accounts_service_keyboard_layout_destroy (&layout);
			}
		}
		layout_collection = (_vala_SettingsDaemonAccountsServiceKeyboardLayout_array_free (layout_collection, layout_collection_length1), NULL);
	}
	_tmp12_ = g_variant_type_new ("(ss)");
	_tmp13_ = _tmp12_;
	_tmp14_ = entries;
	_tmp14__length1 = entries_length1;
	_tmp15_ = g_variant_new_array (_tmp13_, _tmp14_, _tmp14__length1);
	g_variant_ref_sink (_tmp15_);
	_tmp16_ = _tmp15_;
	_g_variant_type_free0 (_tmp13_);
	sources = _tmp16_;
	_tmp17_ = self->priv->keyboard_settings;
	g_settings_set_value (_tmp17_, "sources", sources);
	_tmp18_ = self->priv->keyboard_settings;
	_tmp19_ = self->priv->_accounts_service;
	_tmp20_ = settings_daemon_accounts_service_get_active_keyboard_layout (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = _variant_new2 (_tmp21_);
	g_settings_set_value (_tmp18_, "current", _tmp22_);
	_g_variant_unref0 (_tmp22_);
	_tmp23_ = self->priv->keyboard_settings;
	_tmp24_ = self->priv->_accounts_service;
	_tmp25_ = settings_daemon_accounts_service_get_xkb_options (_tmp24_, &_tmp26_);
	_tmp25__length1 = _tmp26_;
	_tmp27_ = _tmp25_;
	_tmp27__length1 = _tmp25__length1;
	_tmp28_ = _tmp27_;
	_tmp28__length1 = _tmp27__length1;
	_tmp33_ = _variant_new3 (_tmp28_, _tmp27__length1);
	g_settings_set_value (_tmp23_, "xkb-options", _tmp33_);
	_g_variant_unref0 (_tmp33_);
	_tmp28_ = (_vala_SettingsDaemonAccountsServiceXkbOption_array_free (_tmp28_, _tmp28__length1), NULL);
	_g_variant_unref0 (sources);
	entries = (_vala_array_free (entries, entries_length1, (GDestroyNotify) g_variant_unref), NULL);
}

static void
_vala_array_add9 (SettingsDaemonAccountsServiceKeyboardLayout* * array,
                  gint* length,
                  gint* size,
                  const SettingsDaemonAccountsServiceKeyboardLayout* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (SettingsDaemonAccountsServiceKeyboardLayout, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
_vala_array_add10 (SettingsDaemonAccountsServiceXkbOption* * array,
                   gint* length,
                   gint* size,
                   const SettingsDaemonAccountsServiceXkbOption* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (SettingsDaemonAccountsServiceXkbOption, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
settings_daemon_backends_keyboard_settings_sync_gsettings_to_accountsservice (SettingsDaemonBackendsKeyboardSettings* self)
{
	SettingsDaemonAccountsServiceKeyboardLayout* act_layouts = NULL;
	SettingsDaemonAccountsServiceKeyboardLayout* _tmp0_;
	gint act_layouts_length1;
	gint _act_layouts_size_;
	GVariant* sources = NULL;
	GSettings* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	const GVariantType* _tmp4_;
	gchar** xkb_options = NULL;
	GSettings* _tmp22_;
	gchar** _tmp23_;
	gchar** _tmp24_;
	gint xkb_options_length1;
	gint _xkb_options_size_;
	SettingsDaemonAccountsServiceXkbOption* act_options = NULL;
	SettingsDaemonAccountsServiceXkbOption* _tmp25_;
	gint act_options_length1;
	gint _act_options_size_;
	SettingsDaemonAccountsService* _tmp33_;
	SettingsDaemonAccountsServiceXkbOption* _tmp34_;
	gint _tmp34__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (SettingsDaemonAccountsServiceKeyboardLayout, 0);
	act_layouts = _tmp0_;
	act_layouts_length1 = 0;
	_act_layouts_size_ = act_layouts_length1;
	_tmp1_ = self->priv->keyboard_settings;
	_tmp2_ = g_settings_get_value (_tmp1_, "sources");
	sources = _tmp2_;
	_tmp3_ = sources;
	_tmp4_ = G_VARIANT_TYPE_ARRAY;
	if (g_variant_is_of_type (_tmp3_, _tmp4_)) {
		SettingsDaemonAccountsService* _tmp18_;
		SettingsDaemonAccountsServiceKeyboardLayout* _tmp19_;
		gint _tmp19__length1;
		SettingsDaemonAccountsService* _tmp20_;
		GSettings* _tmp21_;
		{
			gsize i = 0UL;
			i = (gsize) 0;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GVariant* _tmp7_;
					gchar* backend = NULL;
					gchar* layout = NULL;
					GVariant* _tmp8_;
					GVariant* _tmp9_;
					GVariant* _tmp10_;
					gchar* _tmp11_ = NULL;
					gchar* _tmp12_ = NULL;
					const gchar* _tmp13_;
					gchar* _tmp14_;
					const gchar* _tmp15_;
					gchar* _tmp16_;
					SettingsDaemonAccountsServiceKeyboardLayout _tmp17_ = {0};
					if (!_tmp5_) {
						gsize _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					_tmp7_ = sources;
					if (!(i < g_variant_n_children (_tmp7_))) {
						break;
					}
					_tmp8_ = sources;
					_tmp9_ = g_variant_get_child_value (_tmp8_, i);
					_tmp10_ = _tmp9_;
					g_variant_get (_tmp10_, "(ss)", &_tmp11_, &_tmp12_, NULL);
					_g_free0 (backend);
					backend = _tmp11_;
					_g_free0 (layout);
					layout = _tmp12_;
					_g_variant_unref0 (_tmp10_);
					_tmp13_ = backend;
					_tmp14_ = g_strdup (_tmp13_);
					_tmp15_ = layout;
					_tmp16_ = g_strdup (_tmp15_);
					memset (&_tmp17_, 0, sizeof (SettingsDaemonAccountsServiceKeyboardLayout));
					_g_free0 (_tmp17_.backend);
					_tmp17_.backend = _tmp14_;
					_g_free0 (_tmp17_.name);
					_tmp17_.name = _tmp16_;
					_vala_array_add9 (&act_layouts, &act_layouts_length1, &_act_layouts_size_, &_tmp17_);
					_g_free0 (layout);
					_g_free0 (backend);
				}
			}
		}
		_tmp18_ = self->priv->_accounts_service;
		_tmp19_ = act_layouts;
		_tmp19__length1 = act_layouts_length1;
		settings_daemon_accounts_service_set_keyboard_layouts (_tmp18_, _tmp19_, _tmp19__length1);
		_tmp20_ = self->priv->_accounts_service;
		_tmp21_ = self->priv->keyboard_settings;
		settings_daemon_accounts_service_set_active_keyboard_layout (_tmp20_, g_settings_get_uint (_tmp21_, "current"));
	} else {
		g_warning ("KeyboardSettings.vala:82: Unknown keyboard layouts type, unable to sav" \
"e to AccountsService");
	}
	_tmp22_ = self->priv->keyboard_settings;
	_tmp24_ = _tmp23_ = g_settings_get_strv (_tmp22_, "xkb-options");
	xkb_options = _tmp24_;
	xkb_options_length1 = _vala_array_length (_tmp23_);
	_xkb_options_size_ = xkb_options_length1;
	_tmp25_ = g_new0 (SettingsDaemonAccountsServiceXkbOption, 0);
	act_options = _tmp25_;
	act_options_length1 = 0;
	_act_options_size_ = act_options_length1;
	{
		gsize i = 0UL;
		i = (gsize) 0;
		{
			gboolean _tmp26_ = FALSE;
			_tmp26_ = TRUE;
			while (TRUE) {
				gchar** _tmp28_;
				gint _tmp28__length1;
				gchar** _tmp29_;
				gint _tmp29__length1;
				const gchar* _tmp30_;
				gchar* _tmp31_;
				SettingsDaemonAccountsServiceXkbOption _tmp32_ = {0};
				if (!_tmp26_) {
					gsize _tmp27_;
					_tmp27_ = i;
					i = _tmp27_ + 1;
				}
				_tmp26_ = FALSE;
				_tmp28_ = xkb_options;
				_tmp28__length1 = xkb_options_length1;
				if (!(i < ((gsize) _tmp28__length1))) {
					break;
				}
				_tmp29_ = xkb_options;
				_tmp29__length1 = xkb_options_length1;
				_tmp30_ = _tmp29_[i];
				_tmp31_ = g_strdup (_tmp30_);
				memset (&_tmp32_, 0, sizeof (SettingsDaemonAccountsServiceXkbOption));
				_g_free0 (_tmp32_.option);
				_tmp32_.option = _tmp31_;
				_vala_array_add10 (&act_options, &act_options_length1, &_act_options_size_, &_tmp32_);
			}
		}
	}
	_tmp33_ = self->priv->_accounts_service;
	_tmp34_ = act_options;
	_tmp34__length1 = act_options_length1;
	settings_daemon_accounts_service_set_xkb_options (_tmp33_, _tmp34_, _tmp34__length1);
	act_options = (_vala_SettingsDaemonAccountsServiceXkbOption_array_free (act_options, act_options_length1), NULL);
	xkb_options = (_vala_array_free (xkb_options, xkb_options_length1, (GDestroyNotify) g_free), NULL);
	_g_variant_unref0 (sources);
	act_layouts = (_vala_SettingsDaemonAccountsServiceKeyboardLayout_array_free (act_layouts, act_layouts_length1), NULL);
}

SettingsDaemonAccountsService*
settings_daemon_backends_keyboard_settings_get_accounts_service (SettingsDaemonBackendsKeyboardSettings* self)
{
	SettingsDaemonAccountsService* result;
	SettingsDaemonAccountsService* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_accounts_service;
	result = _tmp0_;
	return result;
}

static void
settings_daemon_backends_keyboard_settings_set_accounts_service (SettingsDaemonBackendsKeyboardSettings* self,
                                                                 SettingsDaemonAccountsService* value)
{
	SettingsDaemonAccountsService* old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_daemon_backends_keyboard_settings_get_accounts_service (self);
	if (old_value != value) {
		self->priv->_accounts_service = value;
		g_object_notify_by_pspec ((GObject *) self, settings_daemon_backends_keyboard_settings_properties[SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_ACCOUNTS_SERVICE_PROPERTY]);
	}
}

static void
_settings_daemon_backends_keyboard_settings___lambda4_ (SettingsDaemonBackendsKeyboardSettings* self,
                                                        const gchar* key)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	g_return_if_fail (key != NULL);
	if (g_strcmp0 (key, "current") == 0) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = g_strcmp0 (key, "sources") == 0;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (key, "xkb-options") == 0;
	}
	if (_tmp0_) {
		settings_daemon_backends_keyboard_settings_sync_gsettings_to_accountsservice (self);
	}
}

static void
__settings_daemon_backends_keyboard_settings___lambda4__g_settings_changed (GSettings* _sender,
                                                                            const gchar* key,
                                                                            gpointer self)
{
	_settings_daemon_backends_keyboard_settings___lambda4_ ((SettingsDaemonBackendsKeyboardSettings*) self, key);
}

static GObject *
settings_daemon_backends_keyboard_settings_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SettingsDaemonBackendsKeyboardSettings * self;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	gboolean _tmp4_;
	GSettings* _tmp11_;
	parent_class = G_OBJECT_CLASS (settings_daemon_backends_keyboard_settings_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettings);
	_tmp0_ = g_settings_new ("org.gnome.desktop.input-sources");
	_g_object_unref0 (self->priv->keyboard_settings);
	self->priv->keyboard_settings = _tmp0_;
	_tmp1_ = self->priv->keyboard_settings;
	_tmp2_ = g_settings_get_user_value (_tmp1_, "sources");
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_ == NULL;
	_g_variant_unref0 (_tmp3_);
	if (_tmp4_) {
		SettingsDaemonAccountsService* _tmp5_;
		SettingsDaemonAccountsServiceKeyboardLayout* _tmp6_;
		gint _tmp6__length1;
		gint _tmp7_ = 0;
		SettingsDaemonAccountsServiceKeyboardLayout* _tmp8_;
		gint _tmp8__length1;
		SettingsDaemonAccountsServiceKeyboardLayout* _tmp9_;
		gint _tmp9__length1;
		gboolean _tmp10_;
		_tmp5_ = self->priv->_accounts_service;
		_tmp6_ = settings_daemon_accounts_service_get_keyboard_layouts (_tmp5_, &_tmp7_);
		_tmp6__length1 = _tmp7_;
		_tmp8_ = _tmp6_;
		_tmp8__length1 = _tmp6__length1;
		_tmp9_ = _tmp8_;
		_tmp9__length1 = _tmp8__length1;
		_tmp10_ = _tmp8__length1 > 0;
		_tmp9_ = (_vala_SettingsDaemonAccountsServiceKeyboardLayout_array_free (_tmp9_, _tmp9__length1), NULL);
		if (_tmp10_) {
			settings_daemon_backends_keyboard_settings_sync_accountsservice_to_gsettings (self);
		}
	}
	settings_daemon_backends_keyboard_settings_sync_gsettings_to_accountsservice (self);
	_tmp11_ = self->priv->keyboard_settings;
	g_signal_connect_object (_tmp11_, "changed", (GCallback) __settings_daemon_backends_keyboard_settings___lambda4__g_settings_changed, self, 0);
	return obj;
}

static void
settings_daemon_backends_keyboard_settings_class_init (SettingsDaemonBackendsKeyboardSettingsClass * klass,
                                                       gpointer klass_data)
{
	settings_daemon_backends_keyboard_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SettingsDaemonBackendsKeyboardSettings_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_settings_daemon_backends_keyboard_settings_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_settings_daemon_backends_keyboard_settings_set_property;
	G_OBJECT_CLASS (klass)->constructor = settings_daemon_backends_keyboard_settings_constructor;
	G_OBJECT_CLASS (klass)->finalize = settings_daemon_backends_keyboard_settings_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_ACCOUNTS_SERVICE_PROPERTY, settings_daemon_backends_keyboard_settings_properties[SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_ACCOUNTS_SERVICE_PROPERTY] = g_param_spec_object ("accounts-service", "accounts-service", "accounts-service", SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
settings_daemon_backends_keyboard_settings_instance_init (SettingsDaemonBackendsKeyboardSettings * self,
                                                          gpointer klass)
{
	self->priv = settings_daemon_backends_keyboard_settings_get_instance_private (self);
}

static void
settings_daemon_backends_keyboard_settings_finalize (GObject * obj)
{
	SettingsDaemonBackendsKeyboardSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettings);
	_g_object_unref0 (self->priv->keyboard_settings);
	G_OBJECT_CLASS (settings_daemon_backends_keyboard_settings_parent_class)->finalize (obj);
}

static GType
settings_daemon_backends_keyboard_settings_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SettingsDaemonBackendsKeyboardSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_daemon_backends_keyboard_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsDaemonBackendsKeyboardSettings), 0, (GInstanceInitFunc) settings_daemon_backends_keyboard_settings_instance_init, NULL };
	GType settings_daemon_backends_keyboard_settings_type_id;
	settings_daemon_backends_keyboard_settings_type_id = g_type_register_static (G_TYPE_OBJECT, "SettingsDaemonBackendsKeyboardSettings", &g_define_type_info, 0);
	SettingsDaemonBackendsKeyboardSettings_private_offset = g_type_add_instance_private (settings_daemon_backends_keyboard_settings_type_id, sizeof (SettingsDaemonBackendsKeyboardSettingsPrivate));
	return settings_daemon_backends_keyboard_settings_type_id;
}

GType
settings_daemon_backends_keyboard_settings_get_type (void)
{
	static volatile gsize settings_daemon_backends_keyboard_settings_type_id__once = 0;
	if (g_once_init_enter (&settings_daemon_backends_keyboard_settings_type_id__once)) {
		GType settings_daemon_backends_keyboard_settings_type_id;
		settings_daemon_backends_keyboard_settings_type_id = settings_daemon_backends_keyboard_settings_get_type_once ();
		g_once_init_leave (&settings_daemon_backends_keyboard_settings_type_id__once, settings_daemon_backends_keyboard_settings_type_id);
	}
	return settings_daemon_backends_keyboard_settings_type_id__once;
}

static void
_vala_settings_daemon_backends_keyboard_settings_get_property (GObject * object,
                                                               guint property_id,
                                                               GValue * value,
                                                               GParamSpec * pspec)
{
	SettingsDaemonBackendsKeyboardSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettings);
	switch (property_id) {
		case SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_ACCOUNTS_SERVICE_PROPERTY:
		g_value_set_object (value, settings_daemon_backends_keyboard_settings_get_accounts_service (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_settings_daemon_backends_keyboard_settings_set_property (GObject * object,
                                                               guint property_id,
                                                               const GValue * value,
                                                               GParamSpec * pspec)
{
	SettingsDaemonBackendsKeyboardSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettings);
	switch (property_id) {
		case SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_ACCOUNTS_SERVICE_PROPERTY:
		settings_daemon_backends_keyboard_settings_set_accounts_service (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

