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

/* SPDX-License-Identifier: GPL-3.0-or-later*/

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "graphs.h"
#include <float.h>
#include <math.h>
#include <glib-object.h>
#include <gobject/gvaluecollector.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

typedef struct _GraphsParamSpecLimits GraphsParamSpecLimits;
enum  {
	GRAPHS_FIGURE_SETTINGS_0_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY,
	GRAPHS_FIGURE_SETTINGS_NUM_PROPERTIES
};
static GParamSpec* graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _GraphsLimitsPrivate {
	gdouble* _values;
	gint _values_length1;
	gint __values_size_;
};

struct _GraphsParamSpecLimits {
	GParamSpec parent_instance;
};

struct _GraphsFigureSettingsPrivate {
	gchar* _title;
	gchar* _bottom_label;
	gchar* _left_label;
	gchar* _top_label;
	gchar* _right_label;
	GraphsScale _bottom_scale;
	GraphsScale _left_scale;
	GraphsScale _top_scale;
	GraphsScale _right_scale;
	gboolean _legend;
	GraphsLegendPosition _legend_position;
	gboolean _use_custom_style;
	gchar* _custom_style;
	gboolean _hide_unselected;
	gdouble _min_bottom;
	gdouble _max_bottom;
	gdouble _min_left;
	gdouble _max_left;
	gdouble _min_top;
	gdouble _max_top;
	gdouble _min_right;
	gdouble _max_right;
	gdouble _min_selected;
	gdouble _max_selected;
};

static gint GraphsLimits_private_offset;
static gpointer graphs_limits_parent_class = NULL;
static gint GraphsFigureSettings_private_offset;
static gpointer graphs_figure_settings_parent_class = NULL;

static gdouble* _vala_array_dup25 (gdouble* self,
                            gssize length);
static gdouble* _vala_array_dup26 (gdouble* self,
                            gssize length);
static void graphs_limits_finalize (GraphsLimits * obj);
static GType graphs_limits_get_type_once (void);
static void graphs_figure_settings_finalize (GObject * obj);
static GType graphs_figure_settings_get_type_once (void);
static void _vala_graphs_figure_settings_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_graphs_figure_settings_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

const gchar* GRAPHS_LIMIT_NAMES[8] = {"min-bottom", "max-bottom", "min-top", "max-top", "min-left", "max-left", "min-right", "max-right"};

static inline gpointer
graphs_limits_get_instance_private (GraphsLimits* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsLimits_private_offset);
}

static gdouble*
_vala_array_dup25 (gdouble* self,
                   gssize length)
{
	if (length > 0) {
		return _vala_memdup2 (self, length * sizeof (gdouble));
	}
	return NULL;
}

GraphsLimits*
graphs_limits_construct (GType object_type,
                         gdouble* values,
                         gint values_length1)
{
	GraphsLimits* self = NULL;
	gdouble* _tmp0_;
	gint _tmp0__length1;
	self = (GraphsLimits*) g_type_create_instance (object_type);
	values_length1 = 8;
	_vala_return_val_if_fail (values_length1, "values.length = 8", NULL);
	_tmp0_ = (values != NULL) ? _vala_array_dup25 (values, values_length1) : values;
	_tmp0__length1 = values_length1;
	self->priv->_values = (g_free (self->priv->_values), NULL);
	self->priv->_values = _tmp0_;
	self->priv->_values_length1 = _tmp0__length1;
	self->priv->__values_size_ = self->priv->_values_length1;
	return self;
}

GraphsLimits*
graphs_limits_new (gdouble* values,
                   gint values_length1)
{
	return graphs_limits_construct (GRAPHS_TYPE_LIMITS, values, values_length1);
}

static gdouble*
_vala_array_dup26 (gdouble* self,
                   gssize length)
{
	if (length > 0) {
		return _vala_memdup2 (self, length * sizeof (gdouble));
	}
	return NULL;
}

gdouble*
graphs_limits_values (GraphsLimits* self,
                      gint* result_length1)
{
	gdouble* _tmp0_;
	gint _tmp0__length1;
	gdouble* _tmp1_;
	gint _tmp1__length1;
	gdouble* _tmp2_;
	gint _tmp2__length1;
	gdouble* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_values;
	_tmp0__length1 = self->priv->_values_length1;
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup26 (_tmp0_, _tmp0__length1) : _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	_tmp2_ = _tmp1_;
	_tmp2__length1 = _tmp1__length1;
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}

gdouble
graphs_limits_get (GraphsLimits* self,
                   guint i)
{
	gdouble* _tmp0_;
	gint _tmp0__length1;
	gdouble _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->_values;
	_tmp0__length1 = self->priv->_values_length1;
	_tmp1_ = _tmp0_[i];
	result = _tmp1_;
	return result;
}

static void
graphs_value_limits_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
graphs_value_limits_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		graphs_limits_unref (value->data[0].v_pointer);
	}
}

static void
graphs_value_limits_copy_value (const GValue* src_value,
                                GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = graphs_limits_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
graphs_value_limits_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
graphs_value_limits_collect_value (GValue* value,
                                   guint n_collect_values,
                                   GTypeCValue* collect_values,
                                   guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		GraphsLimits * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = graphs_limits_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
graphs_value_limits_lcopy_value (const GValue* value,
                                 guint n_collect_values,
                                 GTypeCValue* collect_values,
                                 guint collect_flags)
{
	GraphsLimits ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = graphs_limits_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
graphs_param_spec_limits (const gchar* name,
                          const gchar* nick,
                          const gchar* blurb,
                          GType object_type,
                          GParamFlags flags)
{
	GraphsParamSpecLimits* spec;
	g_return_val_if_fail (g_type_is_a (object_type, GRAPHS_TYPE_LIMITS), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
graphs_value_get_limits (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAPHS_TYPE_LIMITS), NULL);
	return value->data[0].v_pointer;
}

void
graphs_value_set_limits (GValue* value,
                         gpointer v_object)
{
	GraphsLimits * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAPHS_TYPE_LIMITS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GRAPHS_TYPE_LIMITS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		graphs_limits_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		graphs_limits_unref (old);
	}
}

void
graphs_value_take_limits (GValue* value,
                          gpointer v_object)
{
	GraphsLimits * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GRAPHS_TYPE_LIMITS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GRAPHS_TYPE_LIMITS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		graphs_limits_unref (old);
	}
}

static void
graphs_limits_class_init (GraphsLimitsClass * klass,
                          gpointer klass_data)
{
	graphs_limits_parent_class = g_type_class_peek_parent (klass);
	((GraphsLimitsClass *) klass)->finalize = graphs_limits_finalize;
	g_type_class_adjust_private_offset (klass, &GraphsLimits_private_offset);
}

static void
graphs_limits_instance_init (GraphsLimits * self,
                             gpointer klass)
{
	self->priv = graphs_limits_get_instance_private (self);
	self->ref_count = 1;
}

static void
graphs_limits_finalize (GraphsLimits * obj)
{
	GraphsLimits * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_LIMITS, GraphsLimits);
	g_signal_handlers_destroy (self);
	self->priv->_values = (g_free (self->priv->_values), NULL);
}

static GType
graphs_limits_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { graphs_value_limits_init, graphs_value_limits_free_value, graphs_value_limits_copy_value, graphs_value_limits_peek_pointer, "p", graphs_value_limits_collect_value, "p", graphs_value_limits_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (GraphsLimitsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_limits_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsLimits), 0, (GInstanceInitFunc) graphs_limits_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType graphs_limits_type_id;
	graphs_limits_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GraphsLimits", &g_define_type_info, &g_define_type_fundamental_info, 0);
	GraphsLimits_private_offset = g_type_add_instance_private (graphs_limits_type_id, sizeof (GraphsLimitsPrivate));
	return graphs_limits_type_id;
}

GType
graphs_limits_get_type (void)
{
	static volatile gsize graphs_limits_type_id__once = 0;
	if (g_once_init_enter (&graphs_limits_type_id__once)) {
		GType graphs_limits_type_id;
		graphs_limits_type_id = graphs_limits_get_type_once ();
		g_once_init_leave (&graphs_limits_type_id__once, graphs_limits_type_id);
	}
	return graphs_limits_type_id__once;
}

gpointer
graphs_limits_ref (gpointer instance)
{
	GraphsLimits * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
graphs_limits_unref (gpointer instance)
{
	GraphsLimits * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		GRAPHS_LIMITS_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
graphs_figure_settings_get_instance_private (GraphsFigureSettings* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsFigureSettings_private_offset);
}

GraphsFigureSettings*
graphs_figure_settings_construct (GType object_type,
                                  GSettings* settings)
{
	GraphsFigureSettings * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	g_return_val_if_fail (settings != NULL, NULL);
	_tmp0_ = g_settings_get_string (settings, "title");
	_tmp1_ = _tmp0_;
	_tmp2_ = g_settings_get_string (settings, "bottom-label");
	_tmp3_ = _tmp2_;
	_tmp4_ = g_settings_get_string (settings, "left-label");
	_tmp5_ = _tmp4_;
	_tmp6_ = g_settings_get_string (settings, "top-label");
	_tmp7_ = _tmp6_;
	_tmp8_ = g_settings_get_string (settings, "right-label");
	_tmp9_ = _tmp8_;
	_tmp10_ = g_settings_get_string (settings, "custom-style");
	_tmp11_ = _tmp10_;
	self = (GraphsFigureSettings*) g_object_new (object_type, "bottom-scale", g_settings_get_enum (settings, "bottom-scale"), "left-scale", g_settings_get_enum (settings, "left-scale"), "right-scale", g_settings_get_enum (settings, "right-scale"), "top-scale", g_settings_get_enum (settings, "top-scale"), "title", _tmp1_, "bottom-label", _tmp3_, "left-label", _tmp5_, "top-label", _tmp7_, "right-label", _tmp9_, "legend", g_settings_get_boolean (settings, "legend"), "use-custom-style", g_settings_get_boolean (settings, "use-custom-style"), "legend-position", g_settings_get_enum (settings, "legend-position"), "custom-style", _tmp11_, NULL);
	_g_free0 (_tmp11_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	return self;
}

GraphsFigureSettings*
graphs_figure_settings_new (GSettings* settings)
{
	return graphs_figure_settings_construct (GRAPHS_TYPE_FIGURE_SETTINGS, settings);
}

GraphsLimits*
graphs_figure_settings_get_limits (GraphsFigureSettings* self)
{
	gdouble* values = NULL;
	gdouble* _tmp0_;
	gint values_length1;
	gint _values_size_;
	gdouble* _tmp6_;
	gint _tmp6__length1;
	gdouble* _tmp7_;
	gint _tmp7__length1;
	GraphsLimits* _tmp8_;
	GraphsLimits* _tmp9_;
	GraphsLimits* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (gdouble, 8);
	values = _tmp0_;
	values_length1 = 8;
	_values_size_ = values_length1;
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				gdouble limit = 0.0;
				const gchar* _tmp3_;
				gdouble _tmp4_ = 0.0;
				gdouble* _tmp5_;
				gint _tmp5__length1;
				if (!_tmp1_) {
					guint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(i < ((guint) G_N_ELEMENTS (GRAPHS_LIMIT_NAMES)))) {
					break;
				}
				_tmp3_ = GRAPHS_LIMIT_NAMES[i];
				g_object_get ((GObject*) self, _tmp3_, &_tmp4_, NULL);
				limit = _tmp4_;
				_tmp5_ = values;
				_tmp5__length1 = values_length1;
				_tmp5_[i] = limit;
			}
		}
	}
	_tmp6_ = values;
	_tmp6__length1 = values_length1;
	values = NULL;
	values_length1 = 0;
	_tmp7_ = _tmp6_;
	_tmp7__length1 = _tmp6__length1;
	_tmp8_ = graphs_limits_new (_tmp7_, _tmp6__length1);
	_tmp9_ = _tmp8_;
	_tmp7_ = (g_free (_tmp7_), NULL);
	result = _tmp9_;
	values = (g_free (values), NULL);
	return result;
}

void
graphs_figure_settings_set_limits (GraphsFigureSettings* self,
                                   GraphsLimits* limits)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (limits != NULL);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				const gchar* _tmp2_;
				if (!_tmp0_) {
					guint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(i < ((guint) G_N_ELEMENTS (GRAPHS_LIMIT_NAMES)))) {
					break;
				}
				_tmp2_ = GRAPHS_LIMIT_NAMES[i];
				g_object_set ((GObject*) self, _tmp2_, graphs_limits_get (limits, i), NULL);
			}
		}
	}
}

void
graphs_figure_settings_set_selection_range (GraphsFigureSettings* self,
                                            gdouble minimum,
                                            gdouble maximum)
{
	gdouble _tmp0_;
	gdouble _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = minimum;
	_vala_return_if_fail ((((gdouble) 0) <= _tmp0_) && (_tmp0_ <= ((gdouble) 1)), "0 <= minimum <= 1");
	_tmp1_ = maximum;
	_vala_return_if_fail ((((gdouble) 0) <= _tmp1_) && (_tmp1_ <= ((gdouble) 1)), "0 <= maximum <= 1");
	_vala_return_if_fail (minimum <= maximum, "minimum <= maximum");
	graphs_figure_settings_set_min_selected (self, minimum);
	graphs_figure_settings_set_max_selected (self, maximum);
}

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

void
graphs_figure_settings_set_title (GraphsFigureSettings* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_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, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_bottom_label (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_bottom_label;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_bottom_label (GraphsFigureSettings* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_bottom_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_bottom_label);
		self->priv->_bottom_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_left_label (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_left_label;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_left_label (GraphsFigureSettings* self,
                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_left_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_left_label);
		self->priv->_left_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_top_label (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_top_label;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_top_label (GraphsFigureSettings* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_top_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_top_label);
		self->priv->_top_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_right_label (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_right_label;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_right_label (GraphsFigureSettings* self,
                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_right_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_right_label);
		self->priv->_right_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY]);
	}
}

GraphsScale
graphs_figure_settings_get_bottom_scale (GraphsFigureSettings* self)
{
	GraphsScale result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_bottom_scale;
	return result;
}

void
graphs_figure_settings_set_bottom_scale (GraphsFigureSettings* self,
                                         GraphsScale value)
{
	GraphsScale old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_bottom_scale (self);
	if (old_value != value) {
		self->priv->_bottom_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY]);
	}
}

GraphsScale
graphs_figure_settings_get_left_scale (GraphsFigureSettings* self)
{
	GraphsScale result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_left_scale;
	return result;
}

void
graphs_figure_settings_set_left_scale (GraphsFigureSettings* self,
                                       GraphsScale value)
{
	GraphsScale old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_left_scale (self);
	if (old_value != value) {
		self->priv->_left_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY]);
	}
}

GraphsScale
graphs_figure_settings_get_top_scale (GraphsFigureSettings* self)
{
	GraphsScale result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_top_scale;
	return result;
}

void
graphs_figure_settings_set_top_scale (GraphsFigureSettings* self,
                                      GraphsScale value)
{
	GraphsScale old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_top_scale (self);
	if (old_value != value) {
		self->priv->_top_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY]);
	}
}

GraphsScale
graphs_figure_settings_get_right_scale (GraphsFigureSettings* self)
{
	GraphsScale result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_right_scale;
	return result;
}

void
graphs_figure_settings_set_right_scale (GraphsFigureSettings* self,
                                        GraphsScale value)
{
	GraphsScale old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_right_scale (self);
	if (old_value != value) {
		self->priv->_right_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY]);
	}
}

gboolean
graphs_figure_settings_get_legend (GraphsFigureSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_legend;
	return result;
}

void
graphs_figure_settings_set_legend (GraphsFigureSettings* self,
                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_legend (self);
	if (old_value != value) {
		self->priv->_legend = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY]);
	}
}

GraphsLegendPosition
graphs_figure_settings_get_legend_position (GraphsFigureSettings* self)
{
	GraphsLegendPosition result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_legend_position;
	return result;
}

void
graphs_figure_settings_set_legend_position (GraphsFigureSettings* self,
                                            GraphsLegendPosition value)
{
	GraphsLegendPosition old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_legend_position (self);
	if (old_value != value) {
		self->priv->_legend_position = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY]);
	}
}

gboolean
graphs_figure_settings_get_use_custom_style (GraphsFigureSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_use_custom_style;
	return result;
}

void
graphs_figure_settings_set_use_custom_style (GraphsFigureSettings* self,
                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_use_custom_style (self);
	if (old_value != value) {
		self->priv->_use_custom_style = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY]);
	}
}

const gchar*
graphs_figure_settings_get_custom_style (GraphsFigureSettings* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_custom_style;
	result = _tmp0_;
	return result;
}

void
graphs_figure_settings_set_custom_style (GraphsFigureSettings* self,
                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_custom_style (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_custom_style);
		self->priv->_custom_style = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY]);
	}
}

gboolean
graphs_figure_settings_get_hide_unselected (GraphsFigureSettings* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_hide_unselected;
	return result;
}

void
graphs_figure_settings_set_hide_unselected (GraphsFigureSettings* self,
                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_hide_unselected (self);
	if (old_value != value) {
		self->priv->_hide_unselected = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_bottom (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_bottom;
	return result;
}

void
graphs_figure_settings_set_min_bottom (GraphsFigureSettings* self,
                                       gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_bottom (self);
	if (old_value != value) {
		self->priv->_min_bottom = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_bottom (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_bottom;
	return result;
}

void
graphs_figure_settings_set_max_bottom (GraphsFigureSettings* self,
                                       gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_bottom (self);
	if (old_value != value) {
		self->priv->_max_bottom = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_left (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_left;
	return result;
}

void
graphs_figure_settings_set_min_left (GraphsFigureSettings* self,
                                     gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_left (self);
	if (old_value != value) {
		self->priv->_min_left = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_left (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_left;
	return result;
}

void
graphs_figure_settings_set_max_left (GraphsFigureSettings* self,
                                     gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_left (self);
	if (old_value != value) {
		self->priv->_max_left = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_top (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_top;
	return result;
}

void
graphs_figure_settings_set_min_top (GraphsFigureSettings* self,
                                    gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_top (self);
	if (old_value != value) {
		self->priv->_min_top = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_top (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_top;
	return result;
}

void
graphs_figure_settings_set_max_top (GraphsFigureSettings* self,
                                    gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_top (self);
	if (old_value != value) {
		self->priv->_max_top = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_right (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_right;
	return result;
}

void
graphs_figure_settings_set_min_right (GraphsFigureSettings* self,
                                      gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_right (self);
	if (old_value != value) {
		self->priv->_min_right = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_right (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_right;
	return result;
}

void
graphs_figure_settings_set_max_right (GraphsFigureSettings* self,
                                      gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_right (self);
	if (old_value != value) {
		self->priv->_max_right = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_min_selected (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_min_selected;
	return result;
}

void
graphs_figure_settings_set_min_selected (GraphsFigureSettings* self,
                                         gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_min_selected (self);
	if (old_value != value) {
		self->priv->_min_selected = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY]);
	}
}

gdouble
graphs_figure_settings_get_max_selected (GraphsFigureSettings* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_max_selected;
	return result;
}

void
graphs_figure_settings_set_max_selected (GraphsFigureSettings* self,
                                         gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_figure_settings_get_max_selected (self);
	if (old_value != value) {
		self->priv->_max_selected = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY]);
	}
}

static void
graphs_figure_settings_class_init (GraphsFigureSettingsClass * klass,
                                   gpointer klass_data)
{
	graphs_figure_settings_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsFigureSettings_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_figure_settings_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_figure_settings_set_property;
	G_OBJECT_CLASS (klass)->finalize = graphs_figure_settings_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_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), GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY] = g_param_spec_string ("bottom-label", "bottom-label", "bottom-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY] = g_param_spec_string ("left-label", "left-label", "left-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY] = g_param_spec_string ("top-label", "top-label", "top-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY] = g_param_spec_string ("right-label", "right-label", "right-label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY] = g_param_spec_enum ("bottom-scale", "bottom-scale", "bottom-scale", GRAPHS_TYPE_SCALE, GRAPHS_SCALE_LINEAR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY] = g_param_spec_enum ("left-scale", "left-scale", "left-scale", GRAPHS_TYPE_SCALE, GRAPHS_SCALE_LINEAR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY] = g_param_spec_enum ("top-scale", "top-scale", "top-scale", GRAPHS_TYPE_SCALE, GRAPHS_SCALE_LINEAR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY] = g_param_spec_enum ("right-scale", "right-scale", "right-scale", GRAPHS_TYPE_SCALE, GRAPHS_SCALE_LINEAR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY] = g_param_spec_boolean ("legend", "legend", "legend", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY] = g_param_spec_enum ("legend-position", "legend-position", "legend-position", GRAPHS_TYPE_LEGEND_POSITION, GRAPHS_LEGEND_POSITION_BEST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY] = g_param_spec_boolean ("use-custom-style", "use-custom-style", "use-custom-style", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY] = g_param_spec_string ("custom-style", "custom-style", "custom-style", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY] = g_param_spec_boolean ("hide-unselected", "hide-unselected", "hide-unselected", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY] = g_param_spec_double ("min-bottom", "min-bottom", "min-bottom", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY] = g_param_spec_double ("max-bottom", "max-bottom", "max-bottom", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY] = g_param_spec_double ("min-left", "min-left", "min-left", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY] = g_param_spec_double ("max-left", "max-left", "max-left", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 10, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY] = g_param_spec_double ("min-top", "min-top", "min-top", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY] = g_param_spec_double ("max-top", "max-top", "max-top", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY] = g_param_spec_double ("min-right", "min-right", "min-right", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY] = g_param_spec_double ("max-right", "max-right", "max-right", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 10, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY] = g_param_spec_double ("min-selected", "min-selected", "min-selected", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY, graphs_figure_settings_properties[GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY] = g_param_spec_double ("max-selected", "max-selected", "max-selected", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
graphs_figure_settings_instance_init (GraphsFigureSettings * self,
                                      gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	self->priv = graphs_figure_settings_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_title = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_bottom_label = _tmp1_;
	_tmp2_ = g_strdup ("");
	self->priv->_left_label = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->_top_label = _tmp3_;
	_tmp4_ = g_strdup ("");
	self->priv->_right_label = _tmp4_;
	self->priv->_bottom_scale = GRAPHS_SCALE_LINEAR;
	self->priv->_left_scale = GRAPHS_SCALE_LINEAR;
	self->priv->_top_scale = GRAPHS_SCALE_LINEAR;
	self->priv->_right_scale = GRAPHS_SCALE_LINEAR;
	self->priv->_legend = TRUE;
	self->priv->_legend_position = GRAPHS_LEGEND_POSITION_BEST;
	self->priv->_use_custom_style = FALSE;
	_tmp5_ = g_strdup ("Adwaita");
	self->priv->_custom_style = _tmp5_;
	self->priv->_hide_unselected = FALSE;
	self->priv->_min_bottom = (gdouble) 0;
	self->priv->_max_bottom = (gdouble) 1;
	self->priv->_min_left = (gdouble) 0;
	self->priv->_max_left = (gdouble) 10;
	self->priv->_min_top = (gdouble) 0;
	self->priv->_max_top = (gdouble) 1;
	self->priv->_min_right = (gdouble) 0;
	self->priv->_max_right = (gdouble) 10;
	self->priv->_min_selected = (gdouble) 0;
	self->priv->_max_selected = (gdouble) 0;
}

static void
graphs_figure_settings_finalize (GObject * obj)
{
	GraphsFigureSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_FIGURE_SETTINGS, GraphsFigureSettings);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_bottom_label);
	_g_free0 (self->priv->_left_label);
	_g_free0 (self->priv->_top_label);
	_g_free0 (self->priv->_right_label);
	_g_free0 (self->priv->_custom_style);
	G_OBJECT_CLASS (graphs_figure_settings_parent_class)->finalize (obj);
}

/**
     * Figure settings
     */
static GType
graphs_figure_settings_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsFigureSettingsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_figure_settings_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsFigureSettings), 0, (GInstanceInitFunc) graphs_figure_settings_instance_init, NULL };
	GType graphs_figure_settings_type_id;
	graphs_figure_settings_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsFigureSettings", &g_define_type_info, 0);
	GraphsFigureSettings_private_offset = g_type_add_instance_private (graphs_figure_settings_type_id, sizeof (GraphsFigureSettingsPrivate));
	return graphs_figure_settings_type_id;
}

GType
graphs_figure_settings_get_type (void)
{
	static volatile gsize graphs_figure_settings_type_id__once = 0;
	if (g_once_init_enter (&graphs_figure_settings_type_id__once)) {
		GType graphs_figure_settings_type_id;
		graphs_figure_settings_type_id = graphs_figure_settings_get_type_once ();
		g_once_init_leave (&graphs_figure_settings_type_id__once, graphs_figure_settings_type_id);
	}
	return graphs_figure_settings_type_id__once;
}

static void
_vala_graphs_figure_settings_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	GraphsFigureSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_FIGURE_SETTINGS, GraphsFigureSettings);
	switch (property_id) {
		case GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_title (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_bottom_label (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_left_label (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_top_label (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_right_label (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY:
		g_value_set_enum (value, graphs_figure_settings_get_bottom_scale (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY:
		g_value_set_enum (value, graphs_figure_settings_get_left_scale (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY:
		g_value_set_enum (value, graphs_figure_settings_get_top_scale (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY:
		g_value_set_enum (value, graphs_figure_settings_get_right_scale (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY:
		g_value_set_boolean (value, graphs_figure_settings_get_legend (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY:
		g_value_set_enum (value, graphs_figure_settings_get_legend_position (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY:
		g_value_set_boolean (value, graphs_figure_settings_get_use_custom_style (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY:
		g_value_set_string (value, graphs_figure_settings_get_custom_style (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY:
		g_value_set_boolean (value, graphs_figure_settings_get_hide_unselected (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_bottom (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_bottom (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_left (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_left (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_top (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_top (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_right (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_right (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_min_selected (self));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY:
		g_value_set_double (value, graphs_figure_settings_get_max_selected (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_figure_settings_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	GraphsFigureSettings * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_FIGURE_SETTINGS, GraphsFigureSettings);
	switch (property_id) {
		case GRAPHS_FIGURE_SETTINGS_TITLE_PROPERTY:
		graphs_figure_settings_set_title (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_BOTTOM_LABEL_PROPERTY:
		graphs_figure_settings_set_bottom_label (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEFT_LABEL_PROPERTY:
		graphs_figure_settings_set_left_label (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_TOP_LABEL_PROPERTY:
		graphs_figure_settings_set_top_label (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_RIGHT_LABEL_PROPERTY:
		graphs_figure_settings_set_right_label (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_BOTTOM_SCALE_PROPERTY:
		graphs_figure_settings_set_bottom_scale (self, g_value_get_enum (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEFT_SCALE_PROPERTY:
		graphs_figure_settings_set_left_scale (self, g_value_get_enum (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_TOP_SCALE_PROPERTY:
		graphs_figure_settings_set_top_scale (self, g_value_get_enum (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_RIGHT_SCALE_PROPERTY:
		graphs_figure_settings_set_right_scale (self, g_value_get_enum (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEGEND_PROPERTY:
		graphs_figure_settings_set_legend (self, g_value_get_boolean (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_LEGEND_POSITION_PROPERTY:
		graphs_figure_settings_set_legend_position (self, g_value_get_enum (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_USE_CUSTOM_STYLE_PROPERTY:
		graphs_figure_settings_set_use_custom_style (self, g_value_get_boolean (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_CUSTOM_STYLE_PROPERTY:
		graphs_figure_settings_set_custom_style (self, g_value_get_string (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_HIDE_UNSELECTED_PROPERTY:
		graphs_figure_settings_set_hide_unselected (self, g_value_get_boolean (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_BOTTOM_PROPERTY:
		graphs_figure_settings_set_min_bottom (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_BOTTOM_PROPERTY:
		graphs_figure_settings_set_max_bottom (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_LEFT_PROPERTY:
		graphs_figure_settings_set_min_left (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_LEFT_PROPERTY:
		graphs_figure_settings_set_max_left (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_TOP_PROPERTY:
		graphs_figure_settings_set_min_top (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_TOP_PROPERTY:
		graphs_figure_settings_set_max_top (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_RIGHT_PROPERTY:
		graphs_figure_settings_set_min_right (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_RIGHT_PROPERTY:
		graphs_figure_settings_set_max_right (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MIN_SELECTED_PROPERTY:
		graphs_figure_settings_set_min_selected (self, g_value_get_double (value));
		break;
		case GRAPHS_FIGURE_SETTINGS_MAX_SELECTED_PROPERTY:
		graphs_figure_settings_set_max_selected (self, g_value_get_double (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;
}

