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

/*
 * Copyright 2015-2025 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */
/* Cannot subclass Gtk.ModelButton so put it in a Bin*/

#include "keyboard.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <wingpanel-9.h>
#include <gtk/gtk.h>
#include <granite-7.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

enum  {
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_0_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_LABEL_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_NAME_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_TARGET_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTIVE_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_INDEX_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_LANGUAGE_CODE_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_LAYOUT_VARIANT_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_MANAGER_TYPE_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_SOURCE_PROPERTY,
	KEYBOARD_WIDGETS_LAYOUT_BUTTON_NUM_PROPERTIES
};
static GParamSpec* keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _KeyboardWidgetsLayoutButtonPrivate {
	gchar* _label;
	gchar* _action_name;
	GVariant* _action_target;
	gboolean _active;
	guint32 _index;
	gchar* _language_code;
	gchar* _layout_variant;
	gchar* _manager_type;
	gchar* _source;
};

static gint KeyboardWidgetsLayoutButton_private_offset;
static gpointer keyboard_widgets_layout_button_parent_class = NULL;

static GObject * keyboard_widgets_layout_button_constructor (GType type,
                                                      guint n_construct_properties,
                                                      GObjectConstructParam * construct_properties);
static void keyboard_widgets_layout_button_finalize (GObject * obj);
static GType keyboard_widgets_layout_button_get_type_once (void);
static void _vala_keyboard_widgets_layout_button_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec);
static void _vala_keyboard_widgets_layout_button_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec);

static inline gpointer
keyboard_widgets_layout_button_get_instance_private (KeyboardWidgetsLayoutButton* self)
{
	return G_STRUCT_MEMBER_P (self, KeyboardWidgetsLayoutButton_private_offset);
}

KeyboardWidgetsLayoutButton*
keyboard_widgets_layout_button_construct (GType object_type,
                                          const gchar* _label,
                                          const gchar* _action_name,
                                          GVariant* _action_target)
{
	KeyboardWidgetsLayoutButton * self = NULL;
	g_return_val_if_fail (_label != NULL, NULL);
	g_return_val_if_fail (_action_name != NULL, NULL);
	g_return_val_if_fail (_action_target != NULL, NULL);
	self = (KeyboardWidgetsLayoutButton*) g_object_new (object_type, "label", _label, "action-name", _action_name, "action-target", _action_target, NULL);
	return self;
}

KeyboardWidgetsLayoutButton*
keyboard_widgets_layout_button_new (const gchar* _label,
                                    const gchar* _action_name,
                                    GVariant* _action_target)
{
	return keyboard_widgets_layout_button_construct (KEYBOARD_WIDGETS_TYPE_LAYOUT_BUTTON, _label, _action_name, _action_target);
}

const gchar*
keyboard_widgets_layout_button_get_label (KeyboardWidgetsLayoutButton* 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
keyboard_widgets_layout_button_set_label (KeyboardWidgetsLayoutButton* self,
                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_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, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_LABEL_PROPERTY]);
	}
}

const gchar*
keyboard_widgets_layout_button_get_action_name (KeyboardWidgetsLayoutButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_action_name;
	result = _tmp0_;
	return result;
}

static void
keyboard_widgets_layout_button_set_action_name (KeyboardWidgetsLayoutButton* self,
                                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_get_action_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_action_name);
		self->priv->_action_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_NAME_PROPERTY]);
	}
}

GVariant*
keyboard_widgets_layout_button_get_action_target (KeyboardWidgetsLayoutButton* self)
{
	GVariant* result;
	GVariant* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_action_target;
	result = _tmp0_;
	return result;
}

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

static void
keyboard_widgets_layout_button_set_action_target (KeyboardWidgetsLayoutButton* self,
                                                  GVariant* value)
{
	GVariant* old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_get_action_target (self);
	if (old_value != value) {
		GVariant* _tmp0_;
		_tmp0_ = _g_variant_ref0 (value);
		_g_variant_unref0 (self->priv->_action_target);
		self->priv->_action_target = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_TARGET_PROPERTY]);
	}
}

gboolean
keyboard_widgets_layout_button_get_active (KeyboardWidgetsLayoutButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_active;
	return result;
}

void
keyboard_widgets_layout_button_set_active (KeyboardWidgetsLayoutButton* self,
                                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_get_active (self);
	if (old_value != value) {
		self->priv->_active = value;
		g_object_notify_by_pspec ((GObject *) self, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTIVE_PROPERTY]);
	}
}

guint32
keyboard_widgets_layout_button_get_index (KeyboardWidgetsLayoutButton* self)
{
	guint32 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_index;
	return result;
}

void
keyboard_widgets_layout_button_set_index (KeyboardWidgetsLayoutButton* self,
                                          guint32 value)
{
	guint32 old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_get_index (self);
	if (old_value != value) {
		self->priv->_index = value;
		g_object_notify_by_pspec ((GObject *) self, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_INDEX_PROPERTY]);
	}
}

const gchar*
keyboard_widgets_layout_button_get_language_code (KeyboardWidgetsLayoutButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_language_code;
	result = _tmp0_;
	return result;
}

void
keyboard_widgets_layout_button_set_language_code (KeyboardWidgetsLayoutButton* self,
                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_get_language_code (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_language_code);
		self->priv->_language_code = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_LANGUAGE_CODE_PROPERTY]);
	}
}

const gchar*
keyboard_widgets_layout_button_get_layout_variant (KeyboardWidgetsLayoutButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_layout_variant;
	result = _tmp0_;
	return result;
}

void
keyboard_widgets_layout_button_set_layout_variant (KeyboardWidgetsLayoutButton* self,
                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_get_layout_variant (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_layout_variant);
		self->priv->_layout_variant = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_LAYOUT_VARIANT_PROPERTY]);
	}
}

const gchar*
keyboard_widgets_layout_button_get_manager_type (KeyboardWidgetsLayoutButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_manager_type;
	result = _tmp0_;
	return result;
}

void
keyboard_widgets_layout_button_set_manager_type (KeyboardWidgetsLayoutButton* self,
                                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_get_manager_type (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_manager_type);
		self->priv->_manager_type = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_MANAGER_TYPE_PROPERTY]);
	}
}

const gchar*
keyboard_widgets_layout_button_get_source (KeyboardWidgetsLayoutButton* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source;
	result = _tmp0_;
	return result;
}

void
keyboard_widgets_layout_button_set_source (KeyboardWidgetsLayoutButton* self,
                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = keyboard_widgets_layout_button_get_source (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_source);
		self->priv->_source = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_SOURCE_PROPERTY]);
	}
}

static GObject *
keyboard_widgets_layout_button_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	KeyboardWidgetsLayoutButton * self;
	WingpanelPopoverMenuItem* button = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GVariant* _tmp4_;
	GVariant* _tmp5_;
	WingpanelPopoverMenuItem* _tmp6_ = NULL;
	WingpanelPopoverMenuItem* _tmp7_;
	WingpanelPopoverMenuItem* _tmp8_;
	parent_class = G_OBJECT_CLASS (keyboard_widgets_layout_button_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, KEYBOARD_WIDGETS_TYPE_LAYOUT_BUTTON, KeyboardWidgetsLayoutButton);
	_tmp0_ = self->priv->_label;
	_tmp1_ = g_strdup (_tmp0_);
	_tmp2_ = self->priv->_action_name;
	_tmp3_ = g_strdup (_tmp2_);
	_tmp4_ = self->priv->_action_target;
	_tmp5_ = _g_variant_ref0 (_tmp4_);
	_tmp6_ = wingpanel_popover_menu_item_new ();
	wingpanel_popover_menu_item_set_text (_tmp6_, _tmp1_);
	_g_free0 (_tmp1_);
	gtk_actionable_set_action_name ((GtkActionable*) _tmp6_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_set ((GtkActionable*) _tmp6_, "action-target", _tmp5_, NULL);
	_g_variant_unref0 (_tmp5_);
	g_object_ref_sink (_tmp6_);
	button = _tmp6_;
	_tmp7_ = button;
	granite_bin_set_child ((GraniteBin*) self, (GtkWidget*) _tmp7_);
	_tmp8_ = button;
	g_object_bind_property_with_closures ((GObject*) self, "active", (GObject*) _tmp8_, "active", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_g_object_unref0 (button);
	return obj;
}

static void
keyboard_widgets_layout_button_class_init (KeyboardWidgetsLayoutButtonClass * klass,
                                           gpointer klass_data)
{
	keyboard_widgets_layout_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &KeyboardWidgetsLayoutButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_keyboard_widgets_layout_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_keyboard_widgets_layout_button_set_property;
	G_OBJECT_CLASS (klass)->constructor = keyboard_widgets_layout_button_constructor;
	G_OBJECT_CLASS (klass)->finalize = keyboard_widgets_layout_button_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEYBOARD_WIDGETS_LAYOUT_BUTTON_LABEL_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_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), KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_NAME_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_NAME_PROPERTY] = g_param_spec_string ("action-name", "action-name", "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), KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_TARGET_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_TARGET_PROPERTY] = g_param_spec_variant ("action-target", "action-target", "action-target", G_VARIANT_TYPE_ANY, NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTIVE_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEYBOARD_WIDGETS_LAYOUT_BUTTON_INDEX_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_INDEX_PROPERTY] = g_param_spec_uint ("index", "index", "index", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEYBOARD_WIDGETS_LAYOUT_BUTTON_LANGUAGE_CODE_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_LANGUAGE_CODE_PROPERTY] = g_param_spec_string ("language-code", "language-code", "language-code", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEYBOARD_WIDGETS_LAYOUT_BUTTON_LAYOUT_VARIANT_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_LAYOUT_VARIANT_PROPERTY] = g_param_spec_string ("layout-variant", "layout-variant", "layout-variant", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEYBOARD_WIDGETS_LAYOUT_BUTTON_MANAGER_TYPE_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_MANAGER_TYPE_PROPERTY] = g_param_spec_string ("manager-type", "manager-type", "manager-type", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), KEYBOARD_WIDGETS_LAYOUT_BUTTON_SOURCE_PROPERTY, keyboard_widgets_layout_button_properties[KEYBOARD_WIDGETS_LAYOUT_BUTTON_SOURCE_PROPERTY] = g_param_spec_string ("source", "source", "source", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
keyboard_widgets_layout_button_instance_init (KeyboardWidgetsLayoutButton * self,
                                              gpointer klass)
{
	self->priv = keyboard_widgets_layout_button_get_instance_private (self);
}

static void
keyboard_widgets_layout_button_finalize (GObject * obj)
{
	KeyboardWidgetsLayoutButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, KEYBOARD_WIDGETS_TYPE_LAYOUT_BUTTON, KeyboardWidgetsLayoutButton);
	_g_free0 (self->priv->_label);
	_g_free0 (self->priv->_action_name);
	_g_variant_unref0 (self->priv->_action_target);
	_g_free0 (self->priv->_language_code);
	_g_free0 (self->priv->_layout_variant);
	_g_free0 (self->priv->_manager_type);
	_g_free0 (self->priv->_source);
	G_OBJECT_CLASS (keyboard_widgets_layout_button_parent_class)->finalize (obj);
}

static GType
keyboard_widgets_layout_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (KeyboardWidgetsLayoutButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) keyboard_widgets_layout_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyboardWidgetsLayoutButton), 0, (GInstanceInitFunc) keyboard_widgets_layout_button_instance_init, NULL };
	GType keyboard_widgets_layout_button_type_id;
	keyboard_widgets_layout_button_type_id = g_type_register_static (GRANITE_TYPE_BIN, "KeyboardWidgetsLayoutButton", &g_define_type_info, 0);
	KeyboardWidgetsLayoutButton_private_offset = g_type_add_instance_private (keyboard_widgets_layout_button_type_id, sizeof (KeyboardWidgetsLayoutButtonPrivate));
	return keyboard_widgets_layout_button_type_id;
}

GType
keyboard_widgets_layout_button_get_type (void)
{
	static volatile gsize keyboard_widgets_layout_button_type_id__once = 0;
	if (g_once_init_enter (&keyboard_widgets_layout_button_type_id__once)) {
		GType keyboard_widgets_layout_button_type_id;
		keyboard_widgets_layout_button_type_id = keyboard_widgets_layout_button_get_type_once ();
		g_once_init_leave (&keyboard_widgets_layout_button_type_id__once, keyboard_widgets_layout_button_type_id);
	}
	return keyboard_widgets_layout_button_type_id__once;
}

static void
_vala_keyboard_widgets_layout_button_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec)
{
	KeyboardWidgetsLayoutButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, KEYBOARD_WIDGETS_TYPE_LAYOUT_BUTTON, KeyboardWidgetsLayoutButton);
	switch (property_id) {
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_LABEL_PROPERTY:
		g_value_set_string (value, keyboard_widgets_layout_button_get_label (self));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_NAME_PROPERTY:
		g_value_set_string (value, keyboard_widgets_layout_button_get_action_name (self));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_TARGET_PROPERTY:
		g_value_set_variant (value, keyboard_widgets_layout_button_get_action_target (self));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTIVE_PROPERTY:
		g_value_set_boolean (value, keyboard_widgets_layout_button_get_active (self));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_INDEX_PROPERTY:
		g_value_set_uint (value, keyboard_widgets_layout_button_get_index (self));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_LANGUAGE_CODE_PROPERTY:
		g_value_set_string (value, keyboard_widgets_layout_button_get_language_code (self));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_LAYOUT_VARIANT_PROPERTY:
		g_value_set_string (value, keyboard_widgets_layout_button_get_layout_variant (self));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_MANAGER_TYPE_PROPERTY:
		g_value_set_string (value, keyboard_widgets_layout_button_get_manager_type (self));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_SOURCE_PROPERTY:
		g_value_set_string (value, keyboard_widgets_layout_button_get_source (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_keyboard_widgets_layout_button_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec)
{
	KeyboardWidgetsLayoutButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, KEYBOARD_WIDGETS_TYPE_LAYOUT_BUTTON, KeyboardWidgetsLayoutButton);
	switch (property_id) {
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_LABEL_PROPERTY:
		keyboard_widgets_layout_button_set_label (self, g_value_get_string (value));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_NAME_PROPERTY:
		keyboard_widgets_layout_button_set_action_name (self, g_value_get_string (value));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTION_TARGET_PROPERTY:
		keyboard_widgets_layout_button_set_action_target (self, g_value_get_variant (value));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_ACTIVE_PROPERTY:
		keyboard_widgets_layout_button_set_active (self, g_value_get_boolean (value));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_INDEX_PROPERTY:
		keyboard_widgets_layout_button_set_index (self, g_value_get_uint (value));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_LANGUAGE_CODE_PROPERTY:
		keyboard_widgets_layout_button_set_language_code (self, g_value_get_string (value));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_LAYOUT_VARIANT_PROPERTY:
		keyboard_widgets_layout_button_set_layout_variant (self, g_value_get_string (value));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_MANAGER_TYPE_PROPERTY:
		keyboard_widgets_layout_button_set_manager_type (self, g_value_get_string (value));
		break;
		case KEYBOARD_WIDGETS_LAYOUT_BUTTON_SOURCE_PROPERTY:
		keyboard_widgets_layout_button_set_source (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

