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

/* This file is part of Elastic. License: GPL-3.0+.*/

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.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 ELASTIC_TYPE_PROPERTY_ROW (elastic_property_row_get_type ())
#define ELASTIC_PROPERTY_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRow))
#define ELASTIC_PROPERTY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRowClass))
#define ELASTIC_IS_PROPERTY_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_PROPERTY_ROW))
#define ELASTIC_IS_PROPERTY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_PROPERTY_ROW))
#define ELASTIC_PROPERTY_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRowClass))

typedef struct _ElasticPropertyRow ElasticPropertyRow;
typedef struct _ElasticPropertyRowClass ElasticPropertyRowClass;
typedef struct _ElasticPropertyRowPrivate ElasticPropertyRowPrivate;
enum  {
	ELASTIC_PROPERTY_ROW_0_PROPERTY,
	ELASTIC_PROPERTY_ROW_TITLE_PROPERTY,
	ELASTIC_PROPERTY_ROW_DESCRIPTION_PROPERTY,
	ELASTIC_PROPERTY_ROW_DESCRIPTION_TOOLTIP_PROPERTY,
	ELASTIC_PROPERTY_ROW_DIGITS_PROPERTY,
	ELASTIC_PROPERTY_ROW_UPPER_PROPERTY,
	ELASTIC_PROPERTY_ROW_LOWER_PROPERTY,
	ELASTIC_PROPERTY_ROW_VALUE_PROPERTY,
	ELASTIC_PROPERTY_ROW_STEP_INCREMENT_PROPERTY,
	ELASTIC_PROPERTY_ROW_PAGE_INCREMENT_PROPERTY,
	ELASTIC_PROPERTY_ROW_MARK_PROPERTY,
	ELASTIC_PROPERTY_ROW_SECONDARY_MARK_PROPERTY,
	ELASTIC_PROPERTY_ROW_HAS_SECONDARY_MARK_PROPERTY,
	ELASTIC_PROPERTY_ROW_NUM_PROPERTIES
};
static GParamSpec* elastic_property_row_properties[ELASTIC_PROPERTY_ROW_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _ElasticPropertyRow {
	AdwBin parent_instance;
	ElasticPropertyRowPrivate * priv;
};

struct _ElasticPropertyRowClass {
	AdwBinClass parent_class;
};

struct _ElasticPropertyRowPrivate {
	GtkScale* scale;
	gchar* _title;
	gchar* _description;
	gchar* _description_tooltip;
	guint _digits;
	gdouble _upper;
	gdouble _lower;
	gdouble _value;
	gdouble _step_increment;
	gdouble _page_increment;
	gdouble _mark;
	gdouble _secondary_mark;
	gboolean _has_secondary_mark;
};

static gint ElasticPropertyRow_private_offset;
static gpointer elastic_property_row_parent_class = NULL;

VALA_EXTERN GType elastic_property_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticPropertyRow, g_object_unref)
static void elastic_property_row_update_marks (ElasticPropertyRow* self);
VALA_EXTERN gdouble elastic_property_row_get_mark (ElasticPropertyRow* self);
VALA_EXTERN gboolean elastic_property_row_get_has_secondary_mark (ElasticPropertyRow* self);
VALA_EXTERN gdouble elastic_property_row_get_secondary_mark (ElasticPropertyRow* self);
VALA_EXTERN ElasticPropertyRow* elastic_property_row_new (void);
VALA_EXTERN ElasticPropertyRow* elastic_property_row_construct (GType object_type);
VALA_EXTERN const gchar* elastic_property_row_get_title (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_title (ElasticPropertyRow* self,
                                     const gchar* value);
VALA_EXTERN const gchar* elastic_property_row_get_description (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_description (ElasticPropertyRow* self,
                                           const gchar* value);
VALA_EXTERN const gchar* elastic_property_row_get_description_tooltip (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_description_tooltip (ElasticPropertyRow* self,
                                                   const gchar* value);
VALA_EXTERN guint elastic_property_row_get_digits (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_digits (ElasticPropertyRow* self,
                                      guint value);
VALA_EXTERN gdouble elastic_property_row_get_upper (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_upper (ElasticPropertyRow* self,
                                     gdouble value);
VALA_EXTERN gdouble elastic_property_row_get_lower (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_lower (ElasticPropertyRow* self,
                                     gdouble value);
VALA_EXTERN gdouble elastic_property_row_get_value (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_value (ElasticPropertyRow* self,
                                     gdouble value);
VALA_EXTERN gdouble elastic_property_row_get_step_increment (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_step_increment (ElasticPropertyRow* self,
                                              gdouble value);
VALA_EXTERN gdouble elastic_property_row_get_page_increment (ElasticPropertyRow* self);
VALA_EXTERN void elastic_property_row_set_page_increment (ElasticPropertyRow* self,
                                              gdouble value);
VALA_EXTERN void elastic_property_row_set_mark (ElasticPropertyRow* self,
                                    gdouble value);
VALA_EXTERN void elastic_property_row_set_secondary_mark (ElasticPropertyRow* self,
                                              gdouble value);
VALA_EXTERN void elastic_property_row_set_has_secondary_mark (ElasticPropertyRow* self,
                                                  gboolean value);
static GObject * elastic_property_row_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties);
static void _elastic_property_row_update_marks_g_object_notify (GObject* _sender,
                                                         GParamSpec* pspec,
                                                         gpointer self);
static void elastic_property_row_finalize (GObject * obj);
static GType elastic_property_row_get_type_once (void);
static void _vala_elastic_property_row_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_elastic_property_row_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);

static inline gpointer
elastic_property_row_get_instance_private (ElasticPropertyRow* self)
{
	return G_STRUCT_MEMBER_P (self, ElasticPropertyRow_private_offset);
}

static void
elastic_property_row_update_marks (ElasticPropertyRow* self)
{
	GtkScale* _tmp0_;
	GtkScale* _tmp1_;
	gdouble _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->scale;
	gtk_scale_clear_marks (_tmp0_);
	_tmp1_ = self->priv->scale;
	_tmp2_ = self->priv->_mark;
	gtk_scale_add_mark (_tmp1_, _tmp2_, GTK_POS_BOTTOM, NULL);
	_tmp3_ = self->priv->_has_secondary_mark;
	if (_tmp3_) {
		GtkScale* _tmp4_;
		gdouble _tmp5_;
		_tmp4_ = self->priv->scale;
		_tmp5_ = self->priv->_secondary_mark;
		gtk_scale_add_mark (_tmp4_, _tmp5_, GTK_POS_BOTTOM, NULL);
	}
}

ElasticPropertyRow*
elastic_property_row_construct (GType object_type)
{
	ElasticPropertyRow * self = NULL;
	self = (ElasticPropertyRow*) g_object_new (object_type, NULL);
	return self;
}

ElasticPropertyRow*
elastic_property_row_new (void)
{
	return elastic_property_row_construct (ELASTIC_TYPE_PROPERTY_ROW);
}

const gchar*
elastic_property_row_get_title (ElasticPropertyRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

void
elastic_property_row_set_title (ElasticPropertyRow* self,
                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_TITLE_PROPERTY]);
	}
}

const gchar*
elastic_property_row_get_description (ElasticPropertyRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}

void
elastic_property_row_set_description (ElasticPropertyRow* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description);
		self->priv->_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_DESCRIPTION_PROPERTY]);
	}
}

const gchar*
elastic_property_row_get_description_tooltip (ElasticPropertyRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description_tooltip;
	result = _tmp0_;
	return result;
}

void
elastic_property_row_set_description_tooltip (ElasticPropertyRow* self,
                                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_description_tooltip (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description_tooltip);
		self->priv->_description_tooltip = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_DESCRIPTION_TOOLTIP_PROPERTY]);
	}
}

guint
elastic_property_row_get_digits (ElasticPropertyRow* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_digits;
	return result;
}

void
elastic_property_row_set_digits (ElasticPropertyRow* self,
                                 guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_digits (self);
	if (old_value != value) {
		self->priv->_digits = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_DIGITS_PROPERTY]);
	}
}

gdouble
elastic_property_row_get_upper (ElasticPropertyRow* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_upper;
	return result;
}

void
elastic_property_row_set_upper (ElasticPropertyRow* self,
                                gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_upper (self);
	if (old_value != value) {
		self->priv->_upper = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_UPPER_PROPERTY]);
	}
}

gdouble
elastic_property_row_get_lower (ElasticPropertyRow* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_lower;
	return result;
}

void
elastic_property_row_set_lower (ElasticPropertyRow* self,
                                gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_lower (self);
	if (old_value != value) {
		self->priv->_lower = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_LOWER_PROPERTY]);
	}
}

gdouble
elastic_property_row_get_value (ElasticPropertyRow* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_value;
	return result;
}

void
elastic_property_row_set_value (ElasticPropertyRow* self,
                                gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_value (self);
	if (old_value != value) {
		self->priv->_value = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_VALUE_PROPERTY]);
	}
}

gdouble
elastic_property_row_get_step_increment (ElasticPropertyRow* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_step_increment;
	return result;
}

void
elastic_property_row_set_step_increment (ElasticPropertyRow* self,
                                         gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_step_increment (self);
	if (old_value != value) {
		self->priv->_step_increment = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_STEP_INCREMENT_PROPERTY]);
	}
}

gdouble
elastic_property_row_get_page_increment (ElasticPropertyRow* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_page_increment;
	return result;
}

void
elastic_property_row_set_page_increment (ElasticPropertyRow* self,
                                         gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_page_increment (self);
	if (old_value != value) {
		self->priv->_page_increment = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_PAGE_INCREMENT_PROPERTY]);
	}
}

gdouble
elastic_property_row_get_mark (ElasticPropertyRow* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_mark;
	return result;
}

void
elastic_property_row_set_mark (ElasticPropertyRow* self,
                               gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_mark (self);
	if (old_value != value) {
		self->priv->_mark = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_MARK_PROPERTY]);
	}
}

gdouble
elastic_property_row_get_secondary_mark (ElasticPropertyRow* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_secondary_mark;
	return result;
}

void
elastic_property_row_set_secondary_mark (ElasticPropertyRow* self,
                                         gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_secondary_mark (self);
	if (old_value != value) {
		self->priv->_secondary_mark = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_SECONDARY_MARK_PROPERTY]);
	}
}

gboolean
elastic_property_row_get_has_secondary_mark (ElasticPropertyRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_has_secondary_mark;
	return result;
}

void
elastic_property_row_set_has_secondary_mark (ElasticPropertyRow* self,
                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_property_row_get_has_secondary_mark (self);
	if (old_value != value) {
		self->priv->_has_secondary_mark = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_HAS_SECONDARY_MARK_PROPERTY]);
	}
}

static void
_elastic_property_row_update_marks_g_object_notify (GObject* _sender,
                                                    GParamSpec* pspec,
                                                    gpointer self)
{
	elastic_property_row_update_marks ((ElasticPropertyRow*) self);
}

static GObject *
elastic_property_row_constructor (GType type,
                                  guint n_construct_properties,
                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ElasticPropertyRow * self;
	parent_class = G_OBJECT_CLASS (elastic_property_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRow);
	elastic_property_row_update_marks (self);
	g_signal_connect_object ((GObject*) self, "notify::mark", (GCallback) _elastic_property_row_update_marks_g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::secondary-mark", (GCallback) _elastic_property_row_update_marks_g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::has-secondary-mark", (GCallback) _elastic_property_row_update_marks_g_object_notify, self, 0);
	return obj;
}

static void
elastic_property_row_class_init (ElasticPropertyRowClass * klass,
                                 gpointer klass_data)
{
	elastic_property_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ElasticPropertyRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_elastic_property_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_elastic_property_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = elastic_property_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = elastic_property_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_TITLE_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_DESCRIPTION_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_DESCRIPTION_TOOLTIP_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_DESCRIPTION_TOOLTIP_PROPERTY] = g_param_spec_string ("description-tooltip", "description-tooltip", "description-tooltip", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_DIGITS_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_DIGITS_PROPERTY] = g_param_spec_uint ("digits", "digits", "digits", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_UPPER_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_UPPER_PROPERTY] = g_param_spec_double ("upper", "upper", "upper", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_LOWER_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_LOWER_PROPERTY] = g_param_spec_double ("lower", "lower", "lower", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_VALUE_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_VALUE_PROPERTY] = g_param_spec_double ("value", "value", "value", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_STEP_INCREMENT_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_STEP_INCREMENT_PROPERTY] = g_param_spec_double ("step-increment", "step-increment", "step-increment", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_PAGE_INCREMENT_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_PAGE_INCREMENT_PROPERTY] = g_param_spec_double ("page-increment", "page-increment", "page-increment", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_MARK_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_MARK_PROPERTY] = g_param_spec_double ("mark", "mark", "mark", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_SECONDARY_MARK_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_SECONDARY_MARK_PROPERTY] = g_param_spec_double ("secondary-mark", "secondary-mark", "secondary-mark", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_PROPERTY_ROW_HAS_SECONDARY_MARK_PROPERTY, elastic_property_row_properties[ELASTIC_PROPERTY_ROW_HAS_SECONDARY_MARK_PROPERTY] = g_param_spec_boolean ("has-secondary-mark", "has-secondary-mark", "has-secondary-mark", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/app/drey/Elastic/property-row.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scale", FALSE, ElasticPropertyRow_private_offset + G_STRUCT_OFFSET (ElasticPropertyRowPrivate, scale));
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "property-row");
}

static void
elastic_property_row_instance_init (ElasticPropertyRow * self,
                                    gpointer klass)
{
	self->priv = elastic_property_row_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
elastic_property_row_finalize (GObject * obj)
{
	ElasticPropertyRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRow);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_description);
	_g_free0 (self->priv->_description_tooltip);
	G_OBJECT_CLASS (elastic_property_row_parent_class)->finalize (obj);
}

static GType
elastic_property_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ElasticPropertyRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) elastic_property_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ElasticPropertyRow), 0, (GInstanceInitFunc) elastic_property_row_instance_init, NULL };
	GType elastic_property_row_type_id;
	elastic_property_row_type_id = g_type_register_static (adw_bin_get_type (), "ElasticPropertyRow", &g_define_type_info, 0);
	ElasticPropertyRow_private_offset = g_type_add_instance_private (elastic_property_row_type_id, sizeof (ElasticPropertyRowPrivate));
	return elastic_property_row_type_id;
}

GType
elastic_property_row_get_type (void)
{
	static volatile gsize elastic_property_row_type_id__once = 0;
	if (g_once_init_enter (&elastic_property_row_type_id__once)) {
		GType elastic_property_row_type_id;
		elastic_property_row_type_id = elastic_property_row_get_type_once ();
		g_once_init_leave (&elastic_property_row_type_id__once, elastic_property_row_type_id);
	}
	return elastic_property_row_type_id__once;
}

static void
_vala_elastic_property_row_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	ElasticPropertyRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRow);
	switch (property_id) {
		case ELASTIC_PROPERTY_ROW_TITLE_PROPERTY:
		g_value_set_string (value, elastic_property_row_get_title (self));
		break;
		case ELASTIC_PROPERTY_ROW_DESCRIPTION_PROPERTY:
		g_value_set_string (value, elastic_property_row_get_description (self));
		break;
		case ELASTIC_PROPERTY_ROW_DESCRIPTION_TOOLTIP_PROPERTY:
		g_value_set_string (value, elastic_property_row_get_description_tooltip (self));
		break;
		case ELASTIC_PROPERTY_ROW_DIGITS_PROPERTY:
		g_value_set_uint (value, elastic_property_row_get_digits (self));
		break;
		case ELASTIC_PROPERTY_ROW_UPPER_PROPERTY:
		g_value_set_double (value, elastic_property_row_get_upper (self));
		break;
		case ELASTIC_PROPERTY_ROW_LOWER_PROPERTY:
		g_value_set_double (value, elastic_property_row_get_lower (self));
		break;
		case ELASTIC_PROPERTY_ROW_VALUE_PROPERTY:
		g_value_set_double (value, elastic_property_row_get_value (self));
		break;
		case ELASTIC_PROPERTY_ROW_STEP_INCREMENT_PROPERTY:
		g_value_set_double (value, elastic_property_row_get_step_increment (self));
		break;
		case ELASTIC_PROPERTY_ROW_PAGE_INCREMENT_PROPERTY:
		g_value_set_double (value, elastic_property_row_get_page_increment (self));
		break;
		case ELASTIC_PROPERTY_ROW_MARK_PROPERTY:
		g_value_set_double (value, elastic_property_row_get_mark (self));
		break;
		case ELASTIC_PROPERTY_ROW_SECONDARY_MARK_PROPERTY:
		g_value_set_double (value, elastic_property_row_get_secondary_mark (self));
		break;
		case ELASTIC_PROPERTY_ROW_HAS_SECONDARY_MARK_PROPERTY:
		g_value_set_boolean (value, elastic_property_row_get_has_secondary_mark (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_elastic_property_row_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	ElasticPropertyRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRow);
	switch (property_id) {
		case ELASTIC_PROPERTY_ROW_TITLE_PROPERTY:
		elastic_property_row_set_title (self, g_value_get_string (value));
		break;
		case ELASTIC_PROPERTY_ROW_DESCRIPTION_PROPERTY:
		elastic_property_row_set_description (self, g_value_get_string (value));
		break;
		case ELASTIC_PROPERTY_ROW_DESCRIPTION_TOOLTIP_PROPERTY:
		elastic_property_row_set_description_tooltip (self, g_value_get_string (value));
		break;
		case ELASTIC_PROPERTY_ROW_DIGITS_PROPERTY:
		elastic_property_row_set_digits (self, g_value_get_uint (value));
		break;
		case ELASTIC_PROPERTY_ROW_UPPER_PROPERTY:
		elastic_property_row_set_upper (self, g_value_get_double (value));
		break;
		case ELASTIC_PROPERTY_ROW_LOWER_PROPERTY:
		elastic_property_row_set_lower (self, g_value_get_double (value));
		break;
		case ELASTIC_PROPERTY_ROW_VALUE_PROPERTY:
		elastic_property_row_set_value (self, g_value_get_double (value));
		break;
		case ELASTIC_PROPERTY_ROW_STEP_INCREMENT_PROPERTY:
		elastic_property_row_set_step_increment (self, g_value_get_double (value));
		break;
		case ELASTIC_PROPERTY_ROW_PAGE_INCREMENT_PROPERTY:
		elastic_property_row_set_page_increment (self, g_value_get_double (value));
		break;
		case ELASTIC_PROPERTY_ROW_MARK_PROPERTY:
		elastic_property_row_set_mark (self, g_value_get_double (value));
		break;
		case ELASTIC_PROPERTY_ROW_SECONDARY_MARK_PROPERTY:
		elastic_property_row_set_secondary_mark (self, g_value_get_double (value));
		break;
		case ELASTIC_PROPERTY_ROW_HAS_SECONDARY_MARK_PROPERTY:
		elastic_property_row_set_has_secondary_mark (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

