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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.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 TYPE_SETTINGS_STATE_SNAPSHOT (settings_state_snapshot_get_type ())
#define SETTINGS_STATE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SETTINGS_STATE_SNAPSHOT, SettingsStateSnapshot))
#define SETTINGS_STATE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SETTINGS_STATE_SNAPSHOT, SettingsStateSnapshotClass))
#define IS_SETTINGS_STATE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SETTINGS_STATE_SNAPSHOT))
#define IS_SETTINGS_STATE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SETTINGS_STATE_SNAPSHOT))
#define SETTINGS_STATE_SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SETTINGS_STATE_SNAPSHOT, SettingsStateSnapshotClass))

typedef struct _SettingsStateSnapshot SettingsStateSnapshot;
typedef struct _SettingsStateSnapshotClass SettingsStateSnapshotClass;
typedef struct _SettingsStateSnapshotPrivate SettingsStateSnapshotPrivate;
enum  {
	SETTINGS_STATE_SNAPSHOT_0_PROPERTY,
	SETTINGS_STATE_SNAPSHOT_LAYOUTS_CSV_PROPERTY,
	SETTINGS_STATE_SNAPSHOT_OPTION_PROPERTY,
	SETTINGS_STATE_SNAPSHOT_NUM_PROPERTIES
};
static GParamSpec* settings_state_snapshot_properties[SETTINGS_STATE_SNAPSHOT_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _SettingsStateSnapshot {
	GObject parent_instance;
	SettingsStateSnapshotPrivate * priv;
};

struct _SettingsStateSnapshotClass {
	GObjectClass parent_class;
};

struct _SettingsStateSnapshotPrivate {
	gchar* _layouts_csv;
	gchar* _option;
};

static gint SettingsStateSnapshot_private_offset;
static gpointer settings_state_snapshot_parent_class = NULL;

VALA_EXTERN GType settings_state_snapshot_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsStateSnapshot, g_object_unref)
VALA_EXTERN SettingsStateSnapshot* settings_state_snapshot_new (const gchar* layouts_csv,
                                                    const gchar* option);
VALA_EXTERN SettingsStateSnapshot* settings_state_snapshot_construct (GType object_type,
                                                          const gchar* layouts_csv,
                                                          const gchar* option);
VALA_EXTERN void settings_state_snapshot_set_layouts_csv (SettingsStateSnapshot* self,
                                              const gchar* value);
VALA_EXTERN void settings_state_snapshot_set_option (SettingsStateSnapshot* self,
                                         const gchar* value);
VALA_EXTERN void settings_state_snapshot_restore_from (SettingsStateSnapshot* self,
                                           SettingsStateSnapshot* other);
VALA_EXTERN const gchar* settings_state_snapshot_get_layouts_csv (SettingsStateSnapshot* self);
VALA_EXTERN const gchar* settings_state_snapshot_get_option (SettingsStateSnapshot* self);
static void settings_state_snapshot_finalize (GObject * obj);
static GType settings_state_snapshot_get_type_once (void);
static void _vala_settings_state_snapshot_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_settings_state_snapshot_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static inline gpointer
settings_state_snapshot_get_instance_private (SettingsStateSnapshot* self)
{
	return G_STRUCT_MEMBER_P (self, SettingsStateSnapshot_private_offset);
}

SettingsStateSnapshot*
settings_state_snapshot_construct (GType object_type,
                                   const gchar* layouts_csv,
                                   const gchar* option)
{
	SettingsStateSnapshot * self = NULL;
	g_return_val_if_fail (layouts_csv != NULL, NULL);
	g_return_val_if_fail (option != NULL, NULL);
	self = (SettingsStateSnapshot*) g_object_new (object_type, NULL);
	settings_state_snapshot_set_layouts_csv (self, layouts_csv);
	settings_state_snapshot_set_option (self, option);
	return self;
}

SettingsStateSnapshot*
settings_state_snapshot_new (const gchar* layouts_csv,
                             const gchar* option)
{
	return settings_state_snapshot_construct (TYPE_SETTINGS_STATE_SNAPSHOT, layouts_csv, option);
}

void
settings_state_snapshot_restore_from (SettingsStateSnapshot* self,
                                      SettingsStateSnapshot* other)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (other != NULL);
	_tmp0_ = other->priv->_layouts_csv;
	settings_state_snapshot_set_layouts_csv (self, _tmp0_);
	_tmp1_ = other->priv->_option;
	settings_state_snapshot_set_option (self, _tmp1_);
}

const gchar*
settings_state_snapshot_get_layouts_csv (SettingsStateSnapshot* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_layouts_csv;
	result = _tmp0_;
	return result;
}

void
settings_state_snapshot_set_layouts_csv (SettingsStateSnapshot* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_state_snapshot_get_layouts_csv (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_layouts_csv);
		self->priv->_layouts_csv = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, settings_state_snapshot_properties[SETTINGS_STATE_SNAPSHOT_LAYOUTS_CSV_PROPERTY]);
	}
}

const gchar*
settings_state_snapshot_get_option (SettingsStateSnapshot* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_option;
	result = _tmp0_;
	return result;
}

void
settings_state_snapshot_set_option (SettingsStateSnapshot* self,
                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_state_snapshot_get_option (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_option);
		self->priv->_option = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, settings_state_snapshot_properties[SETTINGS_STATE_SNAPSHOT_OPTION_PROPERTY]);
	}
}

static void
settings_state_snapshot_class_init (SettingsStateSnapshotClass * klass,
                                    gpointer klass_data)
{
	settings_state_snapshot_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SettingsStateSnapshot_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_settings_state_snapshot_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_settings_state_snapshot_set_property;
	G_OBJECT_CLASS (klass)->finalize = settings_state_snapshot_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_STATE_SNAPSHOT_LAYOUTS_CSV_PROPERTY, settings_state_snapshot_properties[SETTINGS_STATE_SNAPSHOT_LAYOUTS_CSV_PROPERTY] = g_param_spec_string ("layouts-csv", "layouts-csv", "layouts-csv", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_STATE_SNAPSHOT_OPTION_PROPERTY, settings_state_snapshot_properties[SETTINGS_STATE_SNAPSHOT_OPTION_PROPERTY] = g_param_spec_string ("option", "option", "option", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
settings_state_snapshot_instance_init (SettingsStateSnapshot * self,
                                       gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = settings_state_snapshot_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_layouts_csv = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_option = _tmp1_;
}

static void
settings_state_snapshot_finalize (GObject * obj)
{
	SettingsStateSnapshot * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SETTINGS_STATE_SNAPSHOT, SettingsStateSnapshot);
	_g_free0 (self->priv->_layouts_csv);
	_g_free0 (self->priv->_option);
	G_OBJECT_CLASS (settings_state_snapshot_parent_class)->finalize (obj);
}

static GType
settings_state_snapshot_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SettingsStateSnapshotClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_state_snapshot_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsStateSnapshot), 0, (GInstanceInitFunc) settings_state_snapshot_instance_init, NULL };
	GType settings_state_snapshot_type_id;
	settings_state_snapshot_type_id = g_type_register_static (G_TYPE_OBJECT, "SettingsStateSnapshot", &g_define_type_info, 0);
	SettingsStateSnapshot_private_offset = g_type_add_instance_private (settings_state_snapshot_type_id, sizeof (SettingsStateSnapshotPrivate));
	return settings_state_snapshot_type_id;
}

GType
settings_state_snapshot_get_type (void)
{
	static volatile gsize settings_state_snapshot_type_id__once = 0;
	if (g_once_init_enter (&settings_state_snapshot_type_id__once)) {
		GType settings_state_snapshot_type_id;
		settings_state_snapshot_type_id = settings_state_snapshot_get_type_once ();
		g_once_init_leave (&settings_state_snapshot_type_id__once, settings_state_snapshot_type_id);
	}
	return settings_state_snapshot_type_id__once;
}

static void
_vala_settings_state_snapshot_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	SettingsStateSnapshot * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_SETTINGS_STATE_SNAPSHOT, SettingsStateSnapshot);
	switch (property_id) {
		case SETTINGS_STATE_SNAPSHOT_LAYOUTS_CSV_PROPERTY:
		g_value_set_string (value, settings_state_snapshot_get_layouts_csv (self));
		break;
		case SETTINGS_STATE_SNAPSHOT_OPTION_PROPERTY:
		g_value_set_string (value, settings_state_snapshot_get_option (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_settings_state_snapshot_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	SettingsStateSnapshot * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_SETTINGS_STATE_SNAPSHOT, SettingsStateSnapshot);
	switch (property_id) {
		case SETTINGS_STATE_SNAPSHOT_LAYOUTS_CSV_PROPERTY:
		settings_state_snapshot_set_layouts_csv (self, g_value_get_string (value));
		break;
		case SETTINGS_STATE_SNAPSHOT_OPTION_PROPERTY:
		settings_state_snapshot_set_option (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

