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

/*
 * Copyright 2026 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Authored by: Leonhard Kargl <leo.kargl@proton.me>
 */

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

#define GALA_DAEMON_KEY_ACTION_GROUP_PREFIX "keyboard"
#define GALA_DAEMON_KEY_ACTION_PREFIX GALA_DAEMON_KEY_ACTION_GROUP_PREFIX "."
#define GALA_DAEMON_KEY_ACTION_TYPE_KEY_VAL "keyval"
#define GALA_DAEMON_KEY_ACTION_PRESS_KEY_VAL "keyval-press"
#define GALA_DAEMON_KEY_ACTION_RELEASE_KEY_VAL "keyval-release"
#define GALA_DAEMON_KEY_ACTION_LATCH_VIEW "latch-view"
#define GALA_DAEMON_KEY_ACTION_SET_VIEW "set-view"
#define GALA_DAEMON_KEY_ACTION_HIDE "hide"
#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 GALA_DAEMON_TYPE_KEY (gala_daemon_key_get_type ())
#define GALA_DAEMON_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_DAEMON_TYPE_KEY, GalaDaemonKey))
#define GALA_DAEMON_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_DAEMON_TYPE_KEY, GalaDaemonKeyClass))
#define GALA_DAEMON_IS_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_DAEMON_TYPE_KEY))
#define GALA_DAEMON_IS_KEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_DAEMON_TYPE_KEY))
#define GALA_DAEMON_KEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_DAEMON_TYPE_KEY, GalaDaemonKeyClass))

typedef struct _GalaDaemonKey GalaDaemonKey;
typedef struct _GalaDaemonKeyClass GalaDaemonKeyClass;
typedef struct _GalaDaemonKeyPrivate GalaDaemonKeyPrivate;
enum  {
	GALA_DAEMON_KEY_0_PROPERTY,
	GALA_DAEMON_KEY_LEFT_OFFSET_PROPERTY,
	GALA_DAEMON_KEY_WIDTH_PROPERTY,
	GALA_DAEMON_KEY_HEIGHT_PROPERTY,
	GALA_DAEMON_KEY_DETAILED_ACTION_NAME_PROPERTY,
	GALA_DAEMON_KEY_PRESS_DETAILED_ACTION_NAME_PROPERTY,
	GALA_DAEMON_KEY_POPUP_KEYS_PROPERTY,
	GALA_DAEMON_KEY_LABEL_PROPERTY,
	GALA_DAEMON_KEY_ICON_PROPERTY,
	GALA_DAEMON_KEY_NUM_PROPERTIES
};
static GParamSpec* gala_daemon_key_properties[GALA_DAEMON_KEY_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _GalaDaemonKey {
	GObject parent_instance;
	GalaDaemonKeyPrivate * priv;
};

struct _GalaDaemonKeyClass {
	GObjectClass parent_class;
};

struct _GalaDaemonKeyPrivate {
	gdouble _left_offset;
	gdouble _width;
	gdouble _height;
	gchar* _detailed_action_name;
	gchar* _press_detailed_action_name;
	GListModel* _popup_keys;
	gchar* _label;
	GIcon* _icon;
};

static gint GalaDaemonKey_private_offset;
static gpointer gala_daemon_key_parent_class = NULL;

VALA_EXTERN GType gala_daemon_key_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaDaemonKey, g_object_unref)
VALA_EXTERN GalaDaemonKey* gala_daemon_key_new (gdouble left_offset,
                                    gdouble width,
                                    gdouble height,
                                    const gchar* detailed_action_name,
                                    const gchar* press_detailed_action_name,
                                    GListModel* popup_keys,
                                    const gchar* label,
                                    GIcon* icon);
VALA_EXTERN GalaDaemonKey* gala_daemon_key_construct (GType object_type,
                                          gdouble left_offset,
                                          gdouble width,
                                          gdouble height,
                                          const gchar* detailed_action_name,
                                          const gchar* press_detailed_action_name,
                                          GListModel* popup_keys,
                                          const gchar* label,
                                          GIcon* icon);
VALA_EXTERN gdouble gala_daemon_key_get_left_offset (GalaDaemonKey* self);
static void gala_daemon_key_set_left_offset (GalaDaemonKey* self,
                                      gdouble value);
VALA_EXTERN gdouble gala_daemon_key_get_width (GalaDaemonKey* self);
static void gala_daemon_key_set_width (GalaDaemonKey* self,
                                gdouble value);
VALA_EXTERN gdouble gala_daemon_key_get_height (GalaDaemonKey* self);
static void gala_daemon_key_set_height (GalaDaemonKey* self,
                                 gdouble value);
VALA_EXTERN const gchar* gala_daemon_key_get_detailed_action_name (GalaDaemonKey* self);
static void gala_daemon_key_set_detailed_action_name (GalaDaemonKey* self,
                                               const gchar* value);
VALA_EXTERN const gchar* gala_daemon_key_get_press_detailed_action_name (GalaDaemonKey* self);
static void gala_daemon_key_set_press_detailed_action_name (GalaDaemonKey* self,
                                                     const gchar* value);
VALA_EXTERN GListModel* gala_daemon_key_get_popup_keys (GalaDaemonKey* self);
static void gala_daemon_key_set_popup_keys (GalaDaemonKey* self,
                                     GListModel* value);
VALA_EXTERN const gchar* gala_daemon_key_get_label (GalaDaemonKey* self);
static void gala_daemon_key_set_label (GalaDaemonKey* self,
                                const gchar* value);
VALA_EXTERN GIcon* gala_daemon_key_get_icon (GalaDaemonKey* self);
static void gala_daemon_key_set_icon (GalaDaemonKey* self,
                               GIcon* value);
static void gala_daemon_key_finalize (GObject * obj);
static GType gala_daemon_key_get_type_once (void);
static void _vala_gala_daemon_key_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);
static void _vala_gala_daemon_key_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec);

static inline gpointer
gala_daemon_key_get_instance_private (GalaDaemonKey* self)
{
	return G_STRUCT_MEMBER_P (self, GalaDaemonKey_private_offset);
}

GalaDaemonKey*
gala_daemon_key_construct (GType object_type,
                           gdouble left_offset,
                           gdouble width,
                           gdouble height,
                           const gchar* detailed_action_name,
                           const gchar* press_detailed_action_name,
                           GListModel* popup_keys,
                           const gchar* label,
                           GIcon* icon)
{
	GalaDaemonKey * self = NULL;
	g_return_val_if_fail (detailed_action_name != NULL, NULL);
	g_return_val_if_fail (popup_keys != NULL, NULL);
	self = (GalaDaemonKey*) g_object_new (object_type, "left-offset", left_offset, "width", width, "height", height, "detailed-action-name", detailed_action_name, "press-detailed-action-name", press_detailed_action_name, "popup-keys", popup_keys, "label", label, "icon", icon, NULL);
	return self;
}

GalaDaemonKey*
gala_daemon_key_new (gdouble left_offset,
                     gdouble width,
                     gdouble height,
                     const gchar* detailed_action_name,
                     const gchar* press_detailed_action_name,
                     GListModel* popup_keys,
                     const gchar* label,
                     GIcon* icon)
{
	return gala_daemon_key_construct (GALA_DAEMON_TYPE_KEY, left_offset, width, height, detailed_action_name, press_detailed_action_name, popup_keys, label, icon);
}

gdouble
gala_daemon_key_get_left_offset (GalaDaemonKey* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_left_offset;
	return result;
}

static void
gala_daemon_key_set_left_offset (GalaDaemonKey* self,
                                 gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_key_get_left_offset (self);
	if (old_value != value) {
		self->priv->_left_offset = value;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_key_properties[GALA_DAEMON_KEY_LEFT_OFFSET_PROPERTY]);
	}
}

gdouble
gala_daemon_key_get_width (GalaDaemonKey* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_width;
	return result;
}

static void
gala_daemon_key_set_width (GalaDaemonKey* self,
                           gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_key_get_width (self);
	if (old_value != value) {
		self->priv->_width = value;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_key_properties[GALA_DAEMON_KEY_WIDTH_PROPERTY]);
	}
}

gdouble
gala_daemon_key_get_height (GalaDaemonKey* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_height;
	return result;
}

static void
gala_daemon_key_set_height (GalaDaemonKey* self,
                            gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_key_get_height (self);
	if (old_value != value) {
		self->priv->_height = value;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_key_properties[GALA_DAEMON_KEY_HEIGHT_PROPERTY]);
	}
}

const gchar*
gala_daemon_key_get_detailed_action_name (GalaDaemonKey* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_detailed_action_name;
	result = _tmp0_;
	return result;
}

static void
gala_daemon_key_set_detailed_action_name (GalaDaemonKey* self,
                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_key_get_detailed_action_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_detailed_action_name);
		self->priv->_detailed_action_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_key_properties[GALA_DAEMON_KEY_DETAILED_ACTION_NAME_PROPERTY]);
	}
}

const gchar*
gala_daemon_key_get_press_detailed_action_name (GalaDaemonKey* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_press_detailed_action_name;
	result = _tmp0_;
	return result;
}

static void
gala_daemon_key_set_press_detailed_action_name (GalaDaemonKey* self,
                                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_key_get_press_detailed_action_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_press_detailed_action_name);
		self->priv->_press_detailed_action_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_key_properties[GALA_DAEMON_KEY_PRESS_DETAILED_ACTION_NAME_PROPERTY]);
	}
}

GListModel*
gala_daemon_key_get_popup_keys (GalaDaemonKey* self)
{
	GListModel* result;
	GListModel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_popup_keys;
	result = _tmp0_;
	return result;
}

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

static void
gala_daemon_key_set_popup_keys (GalaDaemonKey* self,
                                GListModel* value)
{
	GListModel* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_key_get_popup_keys (self);
	if (old_value != value) {
		GListModel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_popup_keys);
		self->priv->_popup_keys = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_key_properties[GALA_DAEMON_KEY_POPUP_KEYS_PROPERTY]);
	}
}

const gchar*
gala_daemon_key_get_label (GalaDaemonKey* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

static void
gala_daemon_key_set_label (GalaDaemonKey* self,
                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_key_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_key_properties[GALA_DAEMON_KEY_LABEL_PROPERTY]);
	}
}

GIcon*
gala_daemon_key_get_icon (GalaDaemonKey* self)
{
	GIcon* result;
	GIcon* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_icon;
	result = _tmp0_;
	return result;
}

static void
gala_daemon_key_set_icon (GalaDaemonKey* self,
                          GIcon* value)
{
	GIcon* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_daemon_key_get_icon (self);
	if (old_value != value) {
		GIcon* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_icon);
		self->priv->_icon = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_daemon_key_properties[GALA_DAEMON_KEY_ICON_PROPERTY]);
	}
}

static void
gala_daemon_key_class_init (GalaDaemonKeyClass * klass,
                            gpointer klass_data)
{
	gala_daemon_key_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GalaDaemonKey_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gala_daemon_key_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gala_daemon_key_set_property;
	G_OBJECT_CLASS (klass)->finalize = gala_daemon_key_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_KEY_LEFT_OFFSET_PROPERTY, gala_daemon_key_properties[GALA_DAEMON_KEY_LEFT_OFFSET_PROPERTY] = g_param_spec_double ("left-offset", "left-offset", "left-offset", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_KEY_WIDTH_PROPERTY, gala_daemon_key_properties[GALA_DAEMON_KEY_WIDTH_PROPERTY] = g_param_spec_double ("width", "width", "width", -G_MAXDOUBLE, G_MAXDOUBLE, 1.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_KEY_HEIGHT_PROPERTY, gala_daemon_key_properties[GALA_DAEMON_KEY_HEIGHT_PROPERTY] = g_param_spec_double ("height", "height", "height", -G_MAXDOUBLE, G_MAXDOUBLE, 1.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	/**
	     * Action triggered on release.
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_KEY_DETAILED_ACTION_NAME_PROPERTY, gala_daemon_key_properties[GALA_DAEMON_KEY_DETAILED_ACTION_NAME_PROPERTY] = g_param_spec_string ("detailed-action-name", "detailed-action-name", "detailed-action-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	/**
	     * Additional optional action triggered on press.
	     */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_KEY_PRESS_DETAILED_ACTION_NAME_PROPERTY, gala_daemon_key_properties[GALA_DAEMON_KEY_PRESS_DETAILED_ACTION_NAME_PROPERTY] = g_param_spec_string ("press-detailed-action-name", "press-detailed-action-name", "press-detailed-action-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_KEY_POPUP_KEYS_PROPERTY, gala_daemon_key_properties[GALA_DAEMON_KEY_POPUP_KEYS_PROPERTY] = g_param_spec_object ("popup-keys", "popup-keys", "popup-keys", g_list_model_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_KEY_LABEL_PROPERTY, gala_daemon_key_properties[GALA_DAEMON_KEY_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DAEMON_KEY_ICON_PROPERTY, gala_daemon_key_properties[GALA_DAEMON_KEY_ICON_PROPERTY] = g_param_spec_object ("icon", "icon", "icon", g_icon_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
gala_daemon_key_instance_init (GalaDaemonKey * self,
                               gpointer klass)
{
	self->priv = gala_daemon_key_get_instance_private (self);
	self->priv->_left_offset = 0.0;
	self->priv->_width = 1.0;
	self->priv->_height = 1.0;
}

static void
gala_daemon_key_finalize (GObject * obj)
{
	GalaDaemonKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_DAEMON_TYPE_KEY, GalaDaemonKey);
	_g_free0 (self->priv->_detailed_action_name);
	_g_free0 (self->priv->_press_detailed_action_name);
	_g_object_unref0 (self->priv->_popup_keys);
	_g_free0 (self->priv->_label);
	_g_object_unref0 (self->priv->_icon);
	G_OBJECT_CLASS (gala_daemon_key_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gala_daemon_key_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaDaemonKeyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_daemon_key_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaDaemonKey), 0, (GInstanceInitFunc) gala_daemon_key_instance_init, NULL };
	GType gala_daemon_key_type_id;
	gala_daemon_key_type_id = g_type_register_static (G_TYPE_OBJECT, "GalaDaemonKey", &g_define_type_info, G_TYPE_FLAG_NONE);
	GalaDaemonKey_private_offset = g_type_add_instance_private (gala_daemon_key_type_id, sizeof (GalaDaemonKeyPrivate));
	return gala_daemon_key_type_id;
}

GType
gala_daemon_key_get_type (void)
{
	static gsize gala_daemon_key_type_id__once = 0;
	if (g_once_init_enter (&gala_daemon_key_type_id__once)) {
		GType gala_daemon_key_type_id;
		gala_daemon_key_type_id = gala_daemon_key_get_type_once ();
		g_once_init_leave (&gala_daemon_key_type_id__once, gala_daemon_key_type_id);
	}
	return gala_daemon_key_type_id__once;
}

static void
_vala_gala_daemon_key_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	GalaDaemonKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_DAEMON_TYPE_KEY, GalaDaemonKey);
	switch (property_id) {
		case GALA_DAEMON_KEY_LEFT_OFFSET_PROPERTY:
		g_value_set_double (value, gala_daemon_key_get_left_offset (self));
		break;
		case GALA_DAEMON_KEY_WIDTH_PROPERTY:
		g_value_set_double (value, gala_daemon_key_get_width (self));
		break;
		case GALA_DAEMON_KEY_HEIGHT_PROPERTY:
		g_value_set_double (value, gala_daemon_key_get_height (self));
		break;
		case GALA_DAEMON_KEY_DETAILED_ACTION_NAME_PROPERTY:
		g_value_set_string (value, gala_daemon_key_get_detailed_action_name (self));
		break;
		case GALA_DAEMON_KEY_PRESS_DETAILED_ACTION_NAME_PROPERTY:
		g_value_set_string (value, gala_daemon_key_get_press_detailed_action_name (self));
		break;
		case GALA_DAEMON_KEY_POPUP_KEYS_PROPERTY:
		g_value_set_object (value, gala_daemon_key_get_popup_keys (self));
		break;
		case GALA_DAEMON_KEY_LABEL_PROPERTY:
		g_value_set_string (value, gala_daemon_key_get_label (self));
		break;
		case GALA_DAEMON_KEY_ICON_PROPERTY:
		g_value_set_object (value, gala_daemon_key_get_icon (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gala_daemon_key_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec)
{
	GalaDaemonKey * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_DAEMON_TYPE_KEY, GalaDaemonKey);
	switch (property_id) {
		case GALA_DAEMON_KEY_LEFT_OFFSET_PROPERTY:
		gala_daemon_key_set_left_offset (self, g_value_get_double (value));
		break;
		case GALA_DAEMON_KEY_WIDTH_PROPERTY:
		gala_daemon_key_set_width (self, g_value_get_double (value));
		break;
		case GALA_DAEMON_KEY_HEIGHT_PROPERTY:
		gala_daemon_key_set_height (self, g_value_get_double (value));
		break;
		case GALA_DAEMON_KEY_DETAILED_ACTION_NAME_PROPERTY:
		gala_daemon_key_set_detailed_action_name (self, g_value_get_string (value));
		break;
		case GALA_DAEMON_KEY_PRESS_DETAILED_ACTION_NAME_PROPERTY:
		gala_daemon_key_set_press_detailed_action_name (self, g_value_get_string (value));
		break;
		case GALA_DAEMON_KEY_POPUP_KEYS_PROPERTY:
		gala_daemon_key_set_popup_keys (self, g_value_get_object (value));
		break;
		case GALA_DAEMON_KEY_LABEL_PROPERTY:
		gala_daemon_key_set_label (self, g_value_get_string (value));
		break;
		case GALA_DAEMON_KEY_ICON_PROPERTY:
		gala_daemon_key_set_icon (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

