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

/*
 * Copyright 2021 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
 * Authored by: Marius Meisenzahl <mariusmeisenzahl@gmail.com>
 */

#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_MOUSE_SETTINGS (settings_daemon_backends_mouse_settings_get_type ())
#define SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettings))
#define SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettingsClass))
#define SETTINGS_DAEMON_BACKENDS_IS_MOUSE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_IS_MOUSE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettingsClass))

typedef struct _SettingsDaemonBackendsMouseSettings SettingsDaemonBackendsMouseSettings;
typedef struct _SettingsDaemonBackendsMouseSettingsClass SettingsDaemonBackendsMouseSettingsClass;
typedef struct _SettingsDaemonBackendsMouseSettingsPrivate SettingsDaemonBackendsMouseSettingsPrivate;

#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_MOUSE_SETTINGS_0_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_ACCOUNTS_SERVICE_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* settings_daemon_backends_mouse_settings_properties[SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _SettingsDaemonBackendsMouseSettings {
	GObject parent_instance;
	SettingsDaemonBackendsMouseSettingsPrivate * priv;
};

struct _SettingsDaemonBackendsMouseSettingsClass {
	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 _SettingsDaemonBackendsMouseSettingsPrivate {
	SettingsDaemonAccountsService* _accounts_service;
	GSettings* mouse_settings;
	GSettings* touchpad_settings;
};

static gint SettingsDaemonBackendsMouseSettings_private_offset;
static gpointer settings_daemon_backends_mouse_settings_parent_class = NULL;

VALA_EXTERN GType settings_daemon_backends_mouse_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsMouseSettings, 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 SettingsDaemonBackendsMouseSettings* settings_daemon_backends_mouse_settings_new (SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsMouseSettings* settings_daemon_backends_mouse_settings_construct (GType object_type,
                                                                                        SettingsDaemonAccountsService* accounts_service);
static void settings_daemon_backends_mouse_settings_sync_gsettings_to_accountsservice (SettingsDaemonBackendsMouseSettings* self);
VALA_EXTERN SettingsDaemonAccountsService* settings_daemon_backends_mouse_settings_get_accounts_service (SettingsDaemonBackendsMouseSettings* self);
VALA_EXTERN void settings_daemon_accounts_service_set_left_handed (SettingsDaemonAccountsService* self,
                                                       gboolean value);
VALA_EXTERN void settings_daemon_accounts_service_set_accel_profile (SettingsDaemonAccountsService* self,
                                                         gint value);
VALA_EXTERN void settings_daemon_accounts_service_set_mouse_natural_scroll (SettingsDaemonAccountsService* self,
                                                                gboolean value);
VALA_EXTERN void settings_daemon_accounts_service_set_mouse_speed (SettingsDaemonAccountsService* self,
                                                       gdouble value);
VALA_EXTERN void settings_daemon_accounts_service_set_touchpad_click_method (SettingsDaemonAccountsService* self,
                                                                 gint value);
VALA_EXTERN void settings_daemon_accounts_service_set_touchpad_disable_while_typing (SettingsDaemonAccountsService* self,
                                                                         gboolean value);
VALA_EXTERN void settings_daemon_accounts_service_set_touchpad_edge_scrolling (SettingsDaemonAccountsService* self,
                                                                   gboolean value);
VALA_EXTERN void settings_daemon_accounts_service_set_touchpad_natural_scroll (SettingsDaemonAccountsService* self,
                                                                   gboolean value);
VALA_EXTERN void settings_daemon_accounts_service_set_touchpad_send_events (SettingsDaemonAccountsService* self,
                                                                gint value);
VALA_EXTERN void settings_daemon_accounts_service_set_touchpad_speed (SettingsDaemonAccountsService* self,
                                                          gdouble value);
VALA_EXTERN void settings_daemon_accounts_service_set_touchpad_tap_to_click (SettingsDaemonAccountsService* self,
                                                                 gboolean value);
VALA_EXTERN void settings_daemon_accounts_service_set_touchpad_two_finger_scrolling (SettingsDaemonAccountsService* self,
                                                                         gboolean value);
static void settings_daemon_backends_mouse_settings_set_accounts_service (SettingsDaemonBackendsMouseSettings* self,
                                                                   SettingsDaemonAccountsService* value);
static GObject * settings_daemon_backends_mouse_settings_constructor (GType type,
                                                               guint n_construct_properties,
                                                               GObjectConstructParam * construct_properties);
VALA_EXTERN gboolean settings_daemon_accounts_service_get_left_handed (SettingsDaemonAccountsService* self);
static void _settings_daemon_backends_mouse_settings___lambda5_ (SettingsDaemonBackendsMouseSettings* self,
                                                          const gchar* key);
static void __settings_daemon_backends_mouse_settings___lambda5__g_settings_changed (GSettings* _sender,
                                                                              const gchar* key,
                                                                              gpointer self);
static void _settings_daemon_backends_mouse_settings___lambda6_ (SettingsDaemonBackendsMouseSettings* self,
                                                          const gchar* key);
static void __settings_daemon_backends_mouse_settings___lambda6__g_settings_changed (GSettings* _sender,
                                                                              const gchar* key,
                                                                              gpointer self);
static void settings_daemon_backends_mouse_settings_finalize (GObject * obj);
static GType settings_daemon_backends_mouse_settings_get_type_once (void);
static void _vala_settings_daemon_backends_mouse_settings_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec);
static void _vala_settings_daemon_backends_mouse_settings_set_property (GObject * object,
                                                                 guint property_id,
                                                                 const GValue * value,
                                                                 GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
settings_daemon_backends_mouse_settings_get_instance_private (SettingsDaemonBackendsMouseSettings* self)
{
	return G_STRUCT_MEMBER_P (self, SettingsDaemonBackendsMouseSettings_private_offset);
}

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

SettingsDaemonBackendsMouseSettings*
settings_daemon_backends_mouse_settings_new (SettingsDaemonAccountsService* accounts_service)
{
	return settings_daemon_backends_mouse_settings_construct (SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, accounts_service);
}

static void
settings_daemon_backends_mouse_settings_sync_gsettings_to_accountsservice (SettingsDaemonBackendsMouseSettings* self)
{
	SettingsDaemonAccountsService* _tmp0_;
	GSettings* _tmp1_;
	SettingsDaemonAccountsService* _tmp2_;
	GSettings* _tmp3_;
	SettingsDaemonAccountsService* _tmp4_;
	GSettings* _tmp5_;
	SettingsDaemonAccountsService* _tmp6_;
	GSettings* _tmp7_;
	SettingsDaemonAccountsService* _tmp8_;
	GSettings* _tmp9_;
	SettingsDaemonAccountsService* _tmp10_;
	GSettings* _tmp11_;
	SettingsDaemonAccountsService* _tmp12_;
	GSettings* _tmp13_;
	SettingsDaemonAccountsService* _tmp14_;
	GSettings* _tmp15_;
	SettingsDaemonAccountsService* _tmp16_;
	GSettings* _tmp17_;
	SettingsDaemonAccountsService* _tmp18_;
	GSettings* _tmp19_;
	SettingsDaemonAccountsService* _tmp20_;
	GSettings* _tmp21_;
	SettingsDaemonAccountsService* _tmp22_;
	GSettings* _tmp23_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_accounts_service;
	_tmp1_ = self->priv->mouse_settings;
	settings_daemon_accounts_service_set_left_handed (_tmp0_, g_settings_get_boolean (_tmp1_, "left-handed"));
	_tmp2_ = self->priv->_accounts_service;
	_tmp3_ = self->priv->mouse_settings;
	settings_daemon_accounts_service_set_accel_profile (_tmp2_, g_settings_get_enum (_tmp3_, "accel-profile"));
	_tmp4_ = self->priv->_accounts_service;
	_tmp5_ = self->priv->mouse_settings;
	settings_daemon_accounts_service_set_mouse_natural_scroll (_tmp4_, g_settings_get_boolean (_tmp5_, "natural-scroll"));
	_tmp6_ = self->priv->_accounts_service;
	_tmp7_ = self->priv->mouse_settings;
	settings_daemon_accounts_service_set_mouse_speed (_tmp6_, g_settings_get_double (_tmp7_, "speed"));
	_tmp8_ = self->priv->_accounts_service;
	_tmp9_ = self->priv->touchpad_settings;
	settings_daemon_accounts_service_set_touchpad_click_method (_tmp8_, g_settings_get_enum (_tmp9_, "click-method"));
	_tmp10_ = self->priv->_accounts_service;
	_tmp11_ = self->priv->touchpad_settings;
	settings_daemon_accounts_service_set_touchpad_disable_while_typing (_tmp10_, g_settings_get_boolean (_tmp11_, "disable-while-typing"));
	_tmp12_ = self->priv->_accounts_service;
	_tmp13_ = self->priv->touchpad_settings;
	settings_daemon_accounts_service_set_touchpad_edge_scrolling (_tmp12_, g_settings_get_boolean (_tmp13_, "edge-scrolling-enabled"));
	_tmp14_ = self->priv->_accounts_service;
	_tmp15_ = self->priv->touchpad_settings;
	settings_daemon_accounts_service_set_touchpad_natural_scroll (_tmp14_, g_settings_get_boolean (_tmp15_, "natural-scroll"));
	_tmp16_ = self->priv->_accounts_service;
	_tmp17_ = self->priv->touchpad_settings;
	settings_daemon_accounts_service_set_touchpad_send_events (_tmp16_, g_settings_get_enum (_tmp17_, "send-events"));
	_tmp18_ = self->priv->_accounts_service;
	_tmp19_ = self->priv->touchpad_settings;
	settings_daemon_accounts_service_set_touchpad_speed (_tmp18_, g_settings_get_double (_tmp19_, "speed"));
	_tmp20_ = self->priv->_accounts_service;
	_tmp21_ = self->priv->touchpad_settings;
	settings_daemon_accounts_service_set_touchpad_tap_to_click (_tmp20_, g_settings_get_boolean (_tmp21_, "tap-to-click"));
	_tmp22_ = self->priv->_accounts_service;
	_tmp23_ = self->priv->touchpad_settings;
	settings_daemon_accounts_service_set_touchpad_two_finger_scrolling (_tmp22_, g_settings_get_boolean (_tmp23_, "two-finger-scrolling-enabled"));
}

SettingsDaemonAccountsService*
settings_daemon_backends_mouse_settings_get_accounts_service (SettingsDaemonBackendsMouseSettings* 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_mouse_settings_set_accounts_service (SettingsDaemonBackendsMouseSettings* self,
                                                              SettingsDaemonAccountsService* value)
{
	SettingsDaemonAccountsService* old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_daemon_backends_mouse_settings_get_accounts_service (self);
	if (old_value != value) {
		self->priv->_accounts_service = value;
		g_object_notify_by_pspec ((GObject *) self, settings_daemon_backends_mouse_settings_properties[SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_ACCOUNTS_SERVICE_PROPERTY]);
	}
}

static void
_settings_daemon_backends_mouse_settings___lambda5_ (SettingsDaemonBackendsMouseSettings* self,
                                                     const gchar* key)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (key != NULL);
	if (g_strcmp0 (key, "accel-profile") == 0) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = g_strcmp0 (key, "left-handed") == 0;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = g_strcmp0 (key, "natural-scroll") == 0;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (key, "speed") == 0;
	}
	if (_tmp0_) {
		settings_daemon_backends_mouse_settings_sync_gsettings_to_accountsservice (self);
	}
}

static void
__settings_daemon_backends_mouse_settings___lambda5__g_settings_changed (GSettings* _sender,
                                                                         const gchar* key,
                                                                         gpointer self)
{
	_settings_daemon_backends_mouse_settings___lambda5_ ((SettingsDaemonBackendsMouseSettings*) self, key);
}

static void
_settings_daemon_backends_mouse_settings___lambda6_ (SettingsDaemonBackendsMouseSettings* self,
                                                     const gchar* key)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	g_return_if_fail (key != NULL);
	if (g_strcmp0 (key, "click-method") == 0) {
		_tmp6_ = TRUE;
	} else {
		_tmp6_ = g_strcmp0 (key, "disable-while-typing") == 0;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		_tmp5_ = g_strcmp0 (key, "edge-scrolling-enabled") == 0;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		_tmp4_ = g_strcmp0 (key, "natural-scroll") == 0;
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = g_strcmp0 (key, "send-events") == 0;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = g_strcmp0 (key, "speed") == 0;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = g_strcmp0 (key, "tap-to-click") == 0;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (key, "two-finger-scrolling-enabled") == 0;
	}
	if (_tmp0_) {
		settings_daemon_backends_mouse_settings_sync_gsettings_to_accountsservice (self);
	}
}

static void
__settings_daemon_backends_mouse_settings___lambda6__g_settings_changed (GSettings* _sender,
                                                                         const gchar* key,
                                                                         gpointer self)
{
	_settings_daemon_backends_mouse_settings___lambda6_ ((SettingsDaemonBackendsMouseSettings*) self, key);
}

static GObject *
settings_daemon_backends_mouse_settings_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SettingsDaemonBackendsMouseSettings * self;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	SettingsDaemonAccountsService* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GSettings* _tmp5_;
	GSettings* _tmp10_;
	GSettings* _tmp11_;
	parent_class = G_OBJECT_CLASS (settings_daemon_backends_mouse_settings_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettings);
	_tmp0_ = g_settings_new ("org.gnome.desktop.peripherals.mouse");
	_g_object_unref0 (self->priv->mouse_settings);
	self->priv->mouse_settings = _tmp0_;
	_tmp1_ = g_settings_new ("org.gnome.desktop.peripherals.touchpad");
	_g_object_unref0 (self->priv->touchpad_settings);
	self->priv->touchpad_settings = _tmp1_;
	_tmp2_ = self->priv->_accounts_service;
	_tmp3_ = settings_daemon_accounts_service_get_left_handed (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->mouse_settings;
	if (_tmp4_ != g_settings_get_boolean (_tmp5_, "left-handed")) {
		GSettings* _tmp6_;
		SettingsDaemonAccountsService* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp6_ = self->priv->mouse_settings;
		_tmp7_ = self->priv->_accounts_service;
		_tmp8_ = settings_daemon_accounts_service_get_left_handed (_tmp7_);
		_tmp9_ = _tmp8_;
		g_settings_set_boolean (_tmp6_, "left-handed", _tmp9_);
	}
	settings_daemon_backends_mouse_settings_sync_gsettings_to_accountsservice (self);
	_tmp10_ = self->priv->mouse_settings;
	g_signal_connect_object (_tmp10_, "changed", (GCallback) __settings_daemon_backends_mouse_settings___lambda5__g_settings_changed, self, 0);
	_tmp11_ = self->priv->touchpad_settings;
	g_signal_connect_object (_tmp11_, "changed", (GCallback) __settings_daemon_backends_mouse_settings___lambda6__g_settings_changed, self, 0);
	return obj;
}

static void
settings_daemon_backends_mouse_settings_class_init (SettingsDaemonBackendsMouseSettingsClass * klass,
                                                    gpointer klass_data)
{
	settings_daemon_backends_mouse_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SettingsDaemonBackendsMouseSettings_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_settings_daemon_backends_mouse_settings_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_settings_daemon_backends_mouse_settings_set_property;
	G_OBJECT_CLASS (klass)->constructor = settings_daemon_backends_mouse_settings_constructor;
	G_OBJECT_CLASS (klass)->finalize = settings_daemon_backends_mouse_settings_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_ACCOUNTS_SERVICE_PROPERTY, settings_daemon_backends_mouse_settings_properties[SETTINGS_DAEMON_BACKENDS_MOUSE_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_mouse_settings_instance_init (SettingsDaemonBackendsMouseSettings * self,
                                                       gpointer klass)
{
	self->priv = settings_daemon_backends_mouse_settings_get_instance_private (self);
}

static void
settings_daemon_backends_mouse_settings_finalize (GObject * obj)
{
	SettingsDaemonBackendsMouseSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettings);
	_g_object_unref0 (self->priv->mouse_settings);
	_g_object_unref0 (self->priv->touchpad_settings);
	G_OBJECT_CLASS (settings_daemon_backends_mouse_settings_parent_class)->finalize (obj);
}

static GType
settings_daemon_backends_mouse_settings_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SettingsDaemonBackendsMouseSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_daemon_backends_mouse_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsDaemonBackendsMouseSettings), 0, (GInstanceInitFunc) settings_daemon_backends_mouse_settings_instance_init, NULL };
	GType settings_daemon_backends_mouse_settings_type_id;
	settings_daemon_backends_mouse_settings_type_id = g_type_register_static (G_TYPE_OBJECT, "SettingsDaemonBackendsMouseSettings", &g_define_type_info, 0);
	SettingsDaemonBackendsMouseSettings_private_offset = g_type_add_instance_private (settings_daemon_backends_mouse_settings_type_id, sizeof (SettingsDaemonBackendsMouseSettingsPrivate));
	return settings_daemon_backends_mouse_settings_type_id;
}

GType
settings_daemon_backends_mouse_settings_get_type (void)
{
	static volatile gsize settings_daemon_backends_mouse_settings_type_id__once = 0;
	if (g_once_init_enter (&settings_daemon_backends_mouse_settings_type_id__once)) {
		GType settings_daemon_backends_mouse_settings_type_id;
		settings_daemon_backends_mouse_settings_type_id = settings_daemon_backends_mouse_settings_get_type_once ();
		g_once_init_leave (&settings_daemon_backends_mouse_settings_type_id__once, settings_daemon_backends_mouse_settings_type_id);
	}
	return settings_daemon_backends_mouse_settings_type_id__once;
}

static void
_vala_settings_daemon_backends_mouse_settings_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec)
{
	SettingsDaemonBackendsMouseSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettings);
	switch (property_id) {
		case SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_ACCOUNTS_SERVICE_PROPERTY:
		g_value_set_object (value, settings_daemon_backends_mouse_settings_get_accounts_service (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_settings_daemon_backends_mouse_settings_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec)
{
	SettingsDaemonBackendsMouseSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettings);
	switch (property_id) {
		case SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_ACCOUNTS_SERVICE_PROPERTY:
		settings_daemon_backends_mouse_settings_set_accounts_service (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

