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

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

#include "graphs.h"
#include <gee.h>
#include <glib-object.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	GRAPHS_ITEM_LIST_0_PROPERTY,
	GRAPHS_ITEM_LIST_NUM_PROPERTIES
};
static GParamSpec* graphs_item_list_properties[GRAPHS_ITEM_LIST_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	GRAPHS_ITEM_FACTORY_0_PROPERTY,
	GRAPHS_ITEM_FACTORY_NUM_PROPERTIES
};
static GParamSpec* graphs_item_factory_properties[GRAPHS_ITEM_FACTORY_NUM_PROPERTIES];
enum  {
	GRAPHS_ITEM_FACTORY_DATA_ITEM_REQUEST_SIGNAL,
	GRAPHS_ITEM_FACTORY_GENERATED_DATA_ITEM_REQUEST_SIGNAL,
	GRAPHS_ITEM_FACTORY_EQUATION_ITEM_REQUEST_SIGNAL,
	GRAPHS_ITEM_FACTORY_TEXT_ITEM_REQUEST_SIGNAL,
	GRAPHS_ITEM_FACTORY_NUM_SIGNALS
};
static guint graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_NUM_SIGNALS] = {0};
enum  {
	GRAPHS_ITEM_0_PROPERTY,
	GRAPHS_ITEM_TYPENAME_PROPERTY,
	GRAPHS_ITEM_NAME_PROPERTY,
	GRAPHS_ITEM_COLOR_PROPERTY,
	GRAPHS_ITEM_ALPHA_PROPERTY,
	GRAPHS_ITEM_SELECTED_PROPERTY,
	GRAPHS_ITEM_XLABEL_PROPERTY,
	GRAPHS_ITEM_YLABEL_PROPERTY,
	GRAPHS_ITEM_XPOSITION_PROPERTY,
	GRAPHS_ITEM_YPOSITION_PROPERTY,
	GRAPHS_ITEM_NUM_PROPERTIES
};
static GParamSpec* graphs_item_properties[GRAPHS_ITEM_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	GRAPHS_DATA_HOLDER_0_PROPERTY,
	GRAPHS_DATA_HOLDER_NUM_PROPERTIES
};
static GParamSpec* graphs_data_holder_properties[GRAPHS_DATA_HOLDER_NUM_PROPERTIES];
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
enum  {
	GRAPHS_DATA_ITEM_0_PROPERTY,
	GRAPHS_DATA_ITEM_DATA_PROPERTY,
	GRAPHS_DATA_ITEM_ERRBARSABOVE_PROPERTY,
	GRAPHS_DATA_ITEM_ERRCAPSIZE_PROPERTY,
	GRAPHS_DATA_ITEM_ERRCAPTHICK_PROPERTY,
	GRAPHS_DATA_ITEM_ERRCOLOR_PROPERTY,
	GRAPHS_DATA_ITEM_ERRLINEWIDTH_PROPERTY,
	GRAPHS_DATA_ITEM_LINESTYLE_PROPERTY,
	GRAPHS_DATA_ITEM_LINEWIDTH_PROPERTY,
	GRAPHS_DATA_ITEM_MARKERSTYLE_PROPERTY,
	GRAPHS_DATA_ITEM_MARKERSIZE_PROPERTY,
	GRAPHS_DATA_ITEM_SHOWXERR_PROPERTY,
	GRAPHS_DATA_ITEM_SHOWYERR_PROPERTY,
	GRAPHS_DATA_ITEM_NUM_PROPERTIES
};
static GParamSpec* graphs_data_item_properties[GRAPHS_DATA_ITEM_NUM_PROPERTIES];
enum  {
	GRAPHS_GENERATED_DATA_ITEM_0_PROPERTY,
	GRAPHS_GENERATED_DATA_ITEM_XSTART_PROPERTY,
	GRAPHS_GENERATED_DATA_ITEM_XSTOP_PROPERTY,
	GRAPHS_GENERATED_DATA_ITEM_STEPS_PROPERTY,
	GRAPHS_GENERATED_DATA_ITEM_SCALE_PROPERTY,
	GRAPHS_GENERATED_DATA_ITEM_EQUATION_PROPERTY,
	GRAPHS_GENERATED_DATA_ITEM_NUM_PROPERTIES
};
static GParamSpec* graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_NUM_PROPERTIES];
enum  {
	GRAPHS_EQUATION_ITEM_0_PROPERTY,
	GRAPHS_EQUATION_ITEM_LINESTYLE_PROPERTY,
	GRAPHS_EQUATION_ITEM_LINEWIDTH_PROPERTY,
	GRAPHS_EQUATION_ITEM_EQUATION_PROPERTY,
	GRAPHS_EQUATION_ITEM_NUM_PROPERTIES
};
static GParamSpec* graphs_equation_item_properties[GRAPHS_EQUATION_ITEM_NUM_PROPERTIES];
enum  {
	GRAPHS_TEXT_ITEM_0_PROPERTY,
	GRAPHS_TEXT_ITEM_XANCHOR_PROPERTY,
	GRAPHS_TEXT_ITEM_YANCHOR_PROPERTY,
	GRAPHS_TEXT_ITEM_TEXT_PROPERTY,
	GRAPHS_TEXT_ITEM_SIZE_PROPERTY,
	GRAPHS_TEXT_ITEM_ROTATION_PROPERTY,
	GRAPHS_TEXT_ITEM_NUM_PROPERTIES
};
static GParamSpec* graphs_text_item_properties[GRAPHS_TEXT_ITEM_NUM_PROPERTIES];
enum  {
	GRAPHS_FILL_ITEM_0_PROPERTY,
	GRAPHS_FILL_ITEM_NUM_PROPERTIES
};
static GParamSpec* graphs_fill_item_properties[GRAPHS_FILL_ITEM_NUM_PROPERTIES];

struct _GraphsItemListPrivate {
	GeeList* _items;
};

struct _GraphsItemPrivate {
	gchar* _typename;
	gchar* _name;
	gchar* _color;
	gfloat _alpha;
	gboolean _selected;
	gchar* _xlabel;
	gchar* _ylabel;
	GraphsXPosition _xposition;
	GraphsYPosition _yposition;
};

struct _GraphsDataHolderPrivate {
	gdouble* _xdata;
	gint _xdata_length1;
	gint __xdata_size_;
	gdouble* _ydata;
	gint _ydata_length1;
	gint __ydata_size_;
	gdouble* _xerr;
	gint _xerr_length1;
	gint __xerr_size_;
	gdouble* _yerr;
	gint _yerr_length1;
	gint __yerr_size_;
};

struct _GraphsDataItemPrivate {
	GraphsDataHolder* _data;
	gboolean _errbarsabove;
	gdouble _errcapsize;
	gdouble _errcapthick;
	gchar* _errcolor;
	gdouble _errlinewidth;
	gint _linestyle;
	gdouble _linewidth;
	gint _markerstyle;
	gdouble _markersize;
	gboolean _showxerr;
	gboolean _showyerr;
};

struct _GraphsGeneratedDataItemPrivate {
	gchar* _xstart;
	gchar* _xstop;
	gint _steps;
	GraphsScale _scale;
	gchar* _equation;
	gchar* _preprocessed_equation;
};

struct _GraphsEquationItemPrivate {
	gint _linestyle;
	gdouble _linewidth;
	gchar* _equation;
	gchar* _preprocessed_equation;
};

struct _GraphsTextItemPrivate {
	gdouble _xanchor;
	gdouble _yanchor;
	gchar* _text;
	gdouble _size;
	gint _rotation;
};

static gint GraphsItemList_private_offset;
static gpointer graphs_item_list_parent_class = NULL;
static gpointer graphs_item_factory_parent_class = NULL;
static GraphsItemFactory* graphs_item_factory_instance;
static GraphsItemFactory* graphs_item_factory_instance = NULL;
static gint GraphsItem_private_offset;
static gpointer graphs_item_parent_class = NULL;
static gint GraphsDataHolder_private_offset;
static gpointer graphs_data_holder_parent_class = NULL;
static gint GraphsDataItem_private_offset;
static gpointer graphs_data_item_parent_class = NULL;
static gint GraphsGeneratedDataItem_private_offset;
static gpointer graphs_generated_data_item_parent_class = NULL;
static GraphsEquationBasedItemIface * graphs_generated_data_item_graphs_equation_based_item_parent_iface = NULL;
static gint GraphsEquationItem_private_offset;
static gpointer graphs_equation_item_parent_class = NULL;
static GraphsEquationBasedItemIface * graphs_equation_item_graphs_equation_based_item_parent_iface = NULL;
static gint GraphsTextItem_private_offset;
static gpointer graphs_text_item_parent_class = NULL;
static gpointer graphs_fill_item_parent_class = NULL;

static void graphs_item_list_finalize (GObject * obj);
static GType graphs_item_list_get_type_once (void);
static void g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data);
static void g_cclosure_user_marshal_OBJECT__OBJECT_STRING_STRING_STRING_INT_ENUM (GClosure * closure,
                                                                           GValue * return_value,
                                                                           guint n_param_values,
                                                                           const GValue * param_values,
                                                                           gpointer invocation_hint,
                                                                           gpointer marshal_data);
static void g_cclosure_user_marshal_OBJECT__OBJECT_STRING (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data);
static void g_cclosure_user_marshal_OBJECT__OBJECT_DOUBLE_DOUBLE_STRING (GClosure * closure,
                                                                  GValue * return_value,
                                                                  guint n_param_values,
                                                                  const GValue * param_values,
                                                                  gpointer invocation_hint,
                                                                  gpointer marshal_data);
static GObject * graphs_item_factory_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
static void graphs_item_factory_finalize (GObject * obj);
static GType graphs_item_factory_get_type_once (void);
static void graphs_item_finalize (GObject * obj);
static GType graphs_item_get_type_once (void);
static void _vala_graphs_item_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec);
static void _vala_graphs_item_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec);
static GType graphs_equation_based_item_get_type_once (void);
static gdouble* _vala_array_dup27 (gdouble* self,
                            gssize length);
static gdouble* _vala_array_dup28 (gdouble* self,
                            gssize length);
static gdouble* _vala_array_dup29 (gdouble* self,
                            gssize length);
static gdouble* _vala_array_dup30 (gdouble* self,
                            gssize length);
static void graphs_data_holder_finalize (GObject * obj);
static GType graphs_data_holder_get_type_once (void);
static GObject * graphs_data_item_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
static void graphs_data_item_finalize (GObject * obj);
static GType graphs_data_item_get_type_once (void);
static void _vala_graphs_data_item_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_graphs_data_item_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec);
static void graphs_generated_data_item_regenerate (GraphsGeneratedDataItem* self);
static GObject * graphs_generated_data_item_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties);
static void _graphs_generated_data_item_regenerate_g_object_notify (GObject* _sender,
                                                             GParamSpec* pspec,
                                                             gpointer self);
static void graphs_generated_data_item_finalize (GObject * obj);
static GType graphs_generated_data_item_get_type_once (void);
static void _vala_graphs_generated_data_item_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_graphs_generated_data_item_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static GObject * graphs_equation_item_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties);
static void graphs_equation_item_finalize (GObject * obj);
static GType graphs_equation_item_get_type_once (void);
static void _vala_graphs_equation_item_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_graphs_equation_item_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
static GObject * graphs_text_item_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
static void graphs_text_item_finalize (GObject * obj);
static GType graphs_text_item_get_type_once (void);
static void _vala_graphs_text_item_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_graphs_text_item_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec);
static GObject * graphs_fill_item_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
static GType graphs_fill_item_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
graphs_item_list_get_instance_private (GraphsItemList* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsItemList_private_offset);
}

void
graphs_item_list_add (GraphsItemList* self,
                      GraphsItem* item)
{
	GeeList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->_items;
	gee_collection_add ((GeeCollection*) _tmp0_, item);
}

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

void
graphs_item_list_add_all (GraphsItemList* self,
                          GraphsItem** items,
                          gint items_length1)
{
	g_return_if_fail (self != NULL);
	{
		GraphsItem** item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = items;
		item_collection_length1 = items_length1;
		for (item_it = 0; item_it < item_collection_length1; item_it = item_it + 1) {
			GraphsItem* _tmp0_;
			GraphsItem* item = NULL;
			_tmp0_ = _g_object_ref0 (item_collection[item_it]);
			item = _tmp0_;
			{
				GeeList* _tmp1_;
				GraphsItem* _tmp2_;
				_tmp1_ = self->priv->_items;
				_tmp2_ = item;
				gee_collection_add ((GeeCollection*) _tmp1_, _tmp2_);
				_g_object_unref0 (item);
			}
		}
	}
}

GraphsItem**
graphs_item_list_to_array (GraphsItemList* self,
                           gint* result_length1)
{
	GeeList* _tmp0_;
	gint _tmp1_ = 0;
	gpointer* _tmp2_;
	GraphsItem** _tmp3_;
	gint _tmp3__length1;
	GraphsItem** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_items;
	_tmp2_ = gee_collection_to_array ((GeeCollection*) _tmp0_, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

GraphsItemList*
graphs_item_list_construct (GType object_type)
{
	GraphsItemList * self = NULL;
	self = (GraphsItemList*) g_object_new (object_type, NULL);
	return self;
}

GraphsItemList*
graphs_item_list_new (void)
{
	return graphs_item_list_construct (GRAPHS_TYPE_ITEM_LIST);
}

static void
graphs_item_list_class_init (GraphsItemListClass * klass,
                             gpointer klass_data)
{
	graphs_item_list_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsItemList_private_offset);
	G_OBJECT_CLASS (klass)->finalize = graphs_item_list_finalize;
}

static void
graphs_item_list_instance_init (GraphsItemList * self,
                                gpointer klass)
{
	GeeArrayList* _tmp0_;
	self->priv = graphs_item_list_get_instance_private (self);
	_tmp0_ = gee_array_list_new (GRAPHS_TYPE_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->priv->_items = (GeeList*) _tmp0_;
}

static void
graphs_item_list_finalize (GObject * obj)
{
	GraphsItemList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_ITEM_LIST, GraphsItemList);
	_g_object_unref0 (self->priv->_items);
	G_OBJECT_CLASS (graphs_item_list_parent_class)->finalize (obj);
}

/**
     * Small list class
     */
static GType
graphs_item_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsItemListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_item_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsItemList), 0, (GInstanceInitFunc) graphs_item_list_instance_init, NULL };
	GType graphs_item_list_type_id;
	graphs_item_list_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsItemList", &g_define_type_info, 0);
	GraphsItemList_private_offset = g_type_add_instance_private (graphs_item_list_type_id, sizeof (GraphsItemListPrivate));
	return graphs_item_list_type_id;
}

GType
graphs_item_list_get_type (void)
{
	static volatile gsize graphs_item_list_type_id__once = 0;
	if (g_once_init_enter (&graphs_item_list_type_id__once)) {
		GType graphs_item_list_type_id;
		graphs_item_list_type_id = graphs_item_list_get_type_once ();
		g_once_init_leave (&graphs_item_list_type_id__once, graphs_item_list_type_id);
	}
	return graphs_item_list_type_id__once;
}

GraphsDataItem*
graphs_item_factory_new_data_item (GraphsData* data,
                                   gdouble* xdata,
                                   gint xdata_length1,
                                   gdouble* ydata,
                                   gint ydata_length1,
                                   gdouble* xerr,
                                   gint xerr_length1,
                                   gdouble* yerr,
                                   gint yerr_length1)
{
	GraphsItemFactory* _tmp0_;
	GraphsDataHolder* _tmp1_;
	GraphsDataHolder* _tmp2_;
	GraphsDataItem* _tmp3_ = NULL;
	GraphsDataItem* _tmp4_;
	GraphsDataItem* result;
	g_return_val_if_fail (data != NULL, NULL);
	_tmp0_ = graphs_item_factory_instance;
	_tmp1_ = graphs_data_holder_new (xdata, xdata_length1, ydata, ydata_length1, xerr, xerr_length1, yerr, yerr_length1);
	_tmp2_ = _tmp1_;
	g_signal_emit (_tmp0_, graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_DATA_ITEM_REQUEST_SIGNAL], 0, data, _tmp2_, &_tmp3_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	result = _tmp4_;
	return result;
}

GraphsGeneratedDataItem*
graphs_item_factory_new_generated_data_item (GraphsData* data,
                                             const gchar* equation,
                                             const gchar* xstart,
                                             const gchar* xstop,
                                             gint steps,
                                             GraphsScale scale)
{
	GraphsItemFactory* _tmp0_;
	GraphsGeneratedDataItem* _tmp1_ = NULL;
	GraphsGeneratedDataItem* result;
	g_return_val_if_fail (data != NULL, NULL);
	g_return_val_if_fail (equation != NULL, NULL);
	g_return_val_if_fail (xstart != NULL, NULL);
	g_return_val_if_fail (xstop != NULL, NULL);
	_tmp0_ = graphs_item_factory_instance;
	g_signal_emit (_tmp0_, graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_GENERATED_DATA_ITEM_REQUEST_SIGNAL], 0, data, equation, xstart, xstop, steps, scale, &_tmp1_);
	result = _tmp1_;
	return result;
}

GraphsEquationItem*
graphs_item_factory_new_equation_item (GraphsData* data,
                                       const gchar* equation)
{
	GraphsItemFactory* _tmp0_;
	GraphsEquationItem* _tmp1_ = NULL;
	GraphsEquationItem* result;
	g_return_val_if_fail (data != NULL, NULL);
	g_return_val_if_fail (equation != NULL, NULL);
	_tmp0_ = graphs_item_factory_instance;
	g_signal_emit (_tmp0_, graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_EQUATION_ITEM_REQUEST_SIGNAL], 0, data, equation, &_tmp1_);
	result = _tmp1_;
	return result;
}

GraphsTextItem*
graphs_item_factory_new_text_item (GraphsData* data,
                                   gdouble xanchor,
                                   gdouble yanchor,
                                   const gchar* text)
{
	GraphsItemFactory* _tmp0_;
	GraphsTextItem* _tmp1_ = NULL;
	GraphsTextItem* result;
	g_return_val_if_fail (data != NULL, NULL);
	g_return_val_if_fail (text != NULL, NULL);
	_tmp0_ = graphs_item_factory_instance;
	g_signal_emit (_tmp0_, graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_TEXT_ITEM_REQUEST_SIGNAL], 0, data, xanchor, yanchor, text, &_tmp1_);
	result = _tmp1_;
	return result;
}

GraphsItemFactory*
graphs_item_factory_construct (GType object_type)
{
	GraphsItemFactory * self = NULL;
	self = (GraphsItemFactory*) g_object_new (object_type, NULL);
	return self;
}

GraphsItemFactory*
graphs_item_factory_new (void)
{
	return graphs_item_factory_construct (GRAPHS_TYPE_ITEM_FACTORY);
}

static void
g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data)
{
	typedef gpointer (*GMarshalFunc_OBJECT__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_OBJECT__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_OBJECT__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
	g_value_take_object (return_value, v_return);
}

static void
g_cclosure_user_marshal_OBJECT__OBJECT_STRING_STRING_STRING_INT_ENUM (GClosure * closure,
                                                                      GValue * return_value,
                                                                      guint n_param_values,
                                                                      const GValue * param_values,
                                                                      gpointer invocation_hint,
                                                                      gpointer marshal_data)
{
	typedef gpointer (*GMarshalFunc_OBJECT__OBJECT_STRING_STRING_STRING_INT_ENUM) (gpointer data1, gpointer arg_1, const char* arg_2, const char* arg_3, const char* arg_4, gint arg_5, gint arg_6, gpointer data2);
	register GMarshalFunc_OBJECT__OBJECT_STRING_STRING_STRING_INT_ENUM callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 7);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_OBJECT__OBJECT_STRING_STRING_STRING_INT_ENUM) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), g_value_get_string (param_values + 4), g_value_get_int (param_values + 5), g_value_get_enum (param_values + 6), data2);
	g_value_take_object (return_value, v_return);
}

static void
g_cclosure_user_marshal_OBJECT__OBJECT_STRING (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data)
{
	typedef gpointer (*GMarshalFunc_OBJECT__OBJECT_STRING) (gpointer data1, gpointer arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_OBJECT__OBJECT_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_OBJECT__OBJECT_STRING) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), g_value_get_string (param_values + 2), data2);
	g_value_take_object (return_value, v_return);
}

static void
g_cclosure_user_marshal_OBJECT__OBJECT_DOUBLE_DOUBLE_STRING (GClosure * closure,
                                                             GValue * return_value,
                                                             guint n_param_values,
                                                             const GValue * param_values,
                                                             gpointer invocation_hint,
                                                             gpointer marshal_data)
{
	typedef gpointer (*GMarshalFunc_OBJECT__OBJECT_DOUBLE_DOUBLE_STRING) (gpointer data1, gpointer arg_1, gdouble arg_2, gdouble arg_3, const char* arg_4, gpointer data2);
	register GMarshalFunc_OBJECT__OBJECT_DOUBLE_DOUBLE_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 5);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_OBJECT__OBJECT_DOUBLE_DOUBLE_STRING) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), g_value_get_double (param_values + 2), g_value_get_double (param_values + 3), g_value_get_string (param_values + 4), data2);
	g_value_take_object (return_value, v_return);
}

static GObject *
graphs_item_factory_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GraphsItemFactory * self;
	GraphsItemFactory* _tmp0_;
	parent_class = G_OBJECT_CLASS (graphs_item_factory_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_ITEM_FACTORY, GraphsItemFactory);
	_tmp0_ = _g_object_ref0 (self);
	_g_object_unref0 (graphs_item_factory_instance);
	graphs_item_factory_instance = _tmp0_;
	return obj;
}

static void
graphs_item_factory_class_init (GraphsItemFactoryClass * klass,
                                gpointer klass_data)
{
	graphs_item_factory_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = graphs_item_factory_constructor;
	G_OBJECT_CLASS (klass)->finalize = graphs_item_factory_finalize;
	graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_DATA_ITEM_REQUEST_SIGNAL] = g_signal_new ("data-item-request", GRAPHS_TYPE_ITEM_FACTORY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__OBJECT_OBJECT, GRAPHS_TYPE_DATA_ITEM, 2, GRAPHS_TYPE_DATA, GRAPHS_TYPE_DATA_HOLDER);
	graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_GENERATED_DATA_ITEM_REQUEST_SIGNAL] = g_signal_new ("generated-data-item-request", GRAPHS_TYPE_ITEM_FACTORY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__OBJECT_STRING_STRING_STRING_INT_ENUM, GRAPHS_TYPE_GENERATED_DATA_ITEM, 6, GRAPHS_TYPE_DATA, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, GRAPHS_TYPE_SCALE);
	graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_EQUATION_ITEM_REQUEST_SIGNAL] = g_signal_new ("equation-item-request", GRAPHS_TYPE_ITEM_FACTORY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__OBJECT_STRING, GRAPHS_TYPE_EQUATION_ITEM, 2, GRAPHS_TYPE_DATA, G_TYPE_STRING);
	graphs_item_factory_signals[GRAPHS_ITEM_FACTORY_TEXT_ITEM_REQUEST_SIGNAL] = g_signal_new ("text-item-request", GRAPHS_TYPE_ITEM_FACTORY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__OBJECT_DOUBLE_DOUBLE_STRING, GRAPHS_TYPE_TEXT_ITEM, 4, GRAPHS_TYPE_DATA, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_STRING);
}

static void
graphs_item_factory_instance_init (GraphsItemFactory * self,
                                   gpointer klass)
{
}

static void
graphs_item_factory_finalize (GObject * obj)
{
	GraphsItemFactory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_ITEM_FACTORY, GraphsItemFactory);
	G_OBJECT_CLASS (graphs_item_factory_parent_class)->finalize (obj);
}

/**
     * Item factory for creating Python items.
     */
static GType
graphs_item_factory_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsItemFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_item_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsItemFactory), 0, (GInstanceInitFunc) graphs_item_factory_instance_init, NULL };
	GType graphs_item_factory_type_id;
	graphs_item_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsItemFactory", &g_define_type_info, 0);
	return graphs_item_factory_type_id;
}

GType
graphs_item_factory_get_type (void)
{
	static volatile gsize graphs_item_factory_type_id__once = 0;
	if (g_once_init_enter (&graphs_item_factory_type_id__once)) {
		GType graphs_item_factory_type_id;
		graphs_item_factory_type_id = graphs_item_factory_get_type_once ();
		g_once_init_leave (&graphs_item_factory_type_id__once, graphs_item_factory_type_id);
	}
	return graphs_item_factory_type_id__once;
}

static inline gpointer
graphs_item_get_instance_private (GraphsItem* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsItem_private_offset);
}

void
graphs_item_get_rgba (GraphsItem* self,
                      GdkRGBA* result)
{
	GdkRGBA rgba = {0};
	const gchar* _tmp0_;
	GdkRGBA _tmp1_ = {0};
	gfloat _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_color;
	graphs_tools_hex_to_rgba (_tmp0_, &_tmp1_);
	rgba = _tmp1_;
	_tmp2_ = self->priv->_alpha;
	rgba.alpha = _tmp2_;
	*result = rgba;
	return;
}

void
graphs_item_set_rgba (GraphsItem* self,
                      GdkRGBA* rgba)
{
	GdkRGBA _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GdkRGBA _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (rgba != NULL);
	_tmp0_ = *rgba;
	_tmp1_ = graphs_tools_rgba_to_hex (&_tmp0_);
	_tmp2_ = _tmp1_;
	graphs_item_set_color (self, _tmp2_);
	_g_free0 (_tmp2_);
	_tmp3_ = *rgba;
	graphs_item_set_alpha (self, _tmp3_.alpha);
}

GraphsItem*
graphs_item_construct (GType object_type)
{
	GraphsItem * self = NULL;
	self = (GraphsItem*) g_object_new (object_type, NULL);
	return self;
}

GraphsItem*
graphs_item_new (void)
{
	return graphs_item_construct (GRAPHS_TYPE_ITEM);
}

const gchar*
graphs_item_get_typename (GraphsItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_typename;
	result = _tmp0_;
	return result;
}

void
graphs_item_set_typename (GraphsItem* self,
                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_typename (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_typename);
		self->priv->_typename = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_TYPENAME_PROPERTY]);
	}
}

const gchar*
graphs_item_get_name (GraphsItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
graphs_item_set_name (GraphsItem* self,
                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_NAME_PROPERTY]);
	}
}

const gchar*
graphs_item_get_color (GraphsItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_color;
	result = _tmp0_;
	return result;
}

void
graphs_item_set_color (GraphsItem* self,
                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_color (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_color);
		self->priv->_color = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_COLOR_PROPERTY]);
	}
}

gfloat
graphs_item_get_alpha (GraphsItem* self)
{
	gfloat result;
	g_return_val_if_fail (self != NULL, -1.0F);
	result = self->priv->_alpha;
	return result;
}

void
graphs_item_set_alpha (GraphsItem* self,
                       gfloat value)
{
	gfloat old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_alpha (self);
	if (old_value != value) {
		self->priv->_alpha = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_ALPHA_PROPERTY]);
	}
}

gboolean
graphs_item_get_selected (GraphsItem* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_selected;
	return result;
}

void
graphs_item_set_selected (GraphsItem* self,
                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_selected (self);
	if (old_value != value) {
		self->priv->_selected = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_SELECTED_PROPERTY]);
	}
}

const gchar*
graphs_item_get_xlabel (GraphsItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_xlabel;
	result = _tmp0_;
	return result;
}

void
graphs_item_set_xlabel (GraphsItem* self,
                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_xlabel (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_xlabel);
		self->priv->_xlabel = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_XLABEL_PROPERTY]);
	}
}

const gchar*
graphs_item_get_ylabel (GraphsItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ylabel;
	result = _tmp0_;
	return result;
}

void
graphs_item_set_ylabel (GraphsItem* self,
                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_ylabel (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_ylabel);
		self->priv->_ylabel = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_YLABEL_PROPERTY]);
	}
}

GraphsXPosition
graphs_item_get_xposition (GraphsItem* self)
{
	GraphsXPosition result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_xposition;
	return result;
}

void
graphs_item_set_xposition (GraphsItem* self,
                           GraphsXPosition value)
{
	GraphsXPosition old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_xposition (self);
	if (old_value != value) {
		self->priv->_xposition = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_XPOSITION_PROPERTY]);
	}
}

GraphsYPosition
graphs_item_get_yposition (GraphsItem* self)
{
	GraphsYPosition result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_yposition;
	return result;
}

void
graphs_item_set_yposition (GraphsItem* self,
                           GraphsYPosition value)
{
	GraphsYPosition old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_item_get_yposition (self);
	if (old_value != value) {
		self->priv->_yposition = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_item_properties[GRAPHS_ITEM_YPOSITION_PROPERTY]);
	}
}

static void
graphs_item_class_init (GraphsItemClass * klass,
                        gpointer klass_data)
{
	graphs_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsItem_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_item_set_property;
	G_OBJECT_CLASS (klass)->finalize = graphs_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_TYPENAME_PROPERTY, graphs_item_properties[GRAPHS_ITEM_TYPENAME_PROPERTY] = g_param_spec_string ("typename", "typename", "typename", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_NAME_PROPERTY, graphs_item_properties[GRAPHS_ITEM_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_COLOR_PROPERTY, graphs_item_properties[GRAPHS_ITEM_COLOR_PROPERTY] = g_param_spec_string ("color", "color", "color", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_ALPHA_PROPERTY, graphs_item_properties[GRAPHS_ITEM_ALPHA_PROPERTY] = g_param_spec_float ("alpha", "alpha", "alpha", -G_MAXFLOAT, G_MAXFLOAT, (gfloat) 1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_SELECTED_PROPERTY, graphs_item_properties[GRAPHS_ITEM_SELECTED_PROPERTY] = g_param_spec_boolean ("selected", "selected", "selected", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_XLABEL_PROPERTY, graphs_item_properties[GRAPHS_ITEM_XLABEL_PROPERTY] = g_param_spec_string ("xlabel", "xlabel", "xlabel", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_YLABEL_PROPERTY, graphs_item_properties[GRAPHS_ITEM_YLABEL_PROPERTY] = g_param_spec_string ("ylabel", "ylabel", "ylabel", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_XPOSITION_PROPERTY, graphs_item_properties[GRAPHS_ITEM_XPOSITION_PROPERTY] = g_param_spec_enum ("xposition", "xposition", "xposition", GRAPHS_TYPE_XPOSITION, GRAPHS_XPOSITION_BOTTOM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_ITEM_YPOSITION_PROPERTY, graphs_item_properties[GRAPHS_ITEM_YPOSITION_PROPERTY] = g_param_spec_enum ("yposition", "yposition", "yposition", GRAPHS_TYPE_YPOSITION, GRAPHS_YPOSITION_LEFT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
graphs_item_instance_init (GraphsItem * self,
                           gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self->priv = graphs_item_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_name = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_color = _tmp1_;
	self->priv->_alpha = (gfloat) 1;
	self->priv->_selected = TRUE;
	_tmp2_ = g_strdup ("");
	self->priv->_xlabel = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->_ylabel = _tmp3_;
	self->priv->_xposition = GRAPHS_XPOSITION_BOTTOM;
	self->priv->_yposition = GRAPHS_YPOSITION_LEFT;
}

static void
graphs_item_finalize (GObject * obj)
{
	GraphsItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_ITEM, GraphsItem);
	_g_free0 (self->priv->_typename);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_color);
	_g_free0 (self->priv->_xlabel);
	_g_free0 (self->priv->_ylabel);
	G_OBJECT_CLASS (graphs_item_parent_class)->finalize (obj);
}

/**
     * Base item class
     */
static GType
graphs_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsItem), 0, (GInstanceInitFunc) graphs_item_instance_init, NULL };
	GType graphs_item_type_id;
	graphs_item_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsItem", &g_define_type_info, 0);
	GraphsItem_private_offset = g_type_add_instance_private (graphs_item_type_id, sizeof (GraphsItemPrivate));
	return graphs_item_type_id;
}

GType
graphs_item_get_type (void)
{
	static volatile gsize graphs_item_type_id__once = 0;
	if (g_once_init_enter (&graphs_item_type_id__once)) {
		GType graphs_item_type_id;
		graphs_item_type_id = graphs_item_get_type_once ();
		g_once_init_leave (&graphs_item_type_id__once, graphs_item_type_id);
	}
	return graphs_item_type_id__once;
}

static void
_vala_graphs_item_get_property (GObject * object,
                                guint property_id,
                                GValue * value,
                                GParamSpec * pspec)
{
	GraphsItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_ITEM, GraphsItem);
	switch (property_id) {
		case GRAPHS_ITEM_TYPENAME_PROPERTY:
		g_value_set_string (value, graphs_item_get_typename (self));
		break;
		case GRAPHS_ITEM_NAME_PROPERTY:
		g_value_set_string (value, graphs_item_get_name (self));
		break;
		case GRAPHS_ITEM_COLOR_PROPERTY:
		g_value_set_string (value, graphs_item_get_color (self));
		break;
		case GRAPHS_ITEM_ALPHA_PROPERTY:
		g_value_set_float (value, graphs_item_get_alpha (self));
		break;
		case GRAPHS_ITEM_SELECTED_PROPERTY:
		g_value_set_boolean (value, graphs_item_get_selected (self));
		break;
		case GRAPHS_ITEM_XLABEL_PROPERTY:
		g_value_set_string (value, graphs_item_get_xlabel (self));
		break;
		case GRAPHS_ITEM_YLABEL_PROPERTY:
		g_value_set_string (value, graphs_item_get_ylabel (self));
		break;
		case GRAPHS_ITEM_XPOSITION_PROPERTY:
		g_value_set_enum (value, graphs_item_get_xposition (self));
		break;
		case GRAPHS_ITEM_YPOSITION_PROPERTY:
		g_value_set_enum (value, graphs_item_get_yposition (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_item_set_property (GObject * object,
                                guint property_id,
                                const GValue * value,
                                GParamSpec * pspec)
{
	GraphsItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_ITEM, GraphsItem);
	switch (property_id) {
		case GRAPHS_ITEM_TYPENAME_PROPERTY:
		graphs_item_set_typename (self, g_value_get_string (value));
		break;
		case GRAPHS_ITEM_NAME_PROPERTY:
		graphs_item_set_name (self, g_value_get_string (value));
		break;
		case GRAPHS_ITEM_COLOR_PROPERTY:
		graphs_item_set_color (self, g_value_get_string (value));
		break;
		case GRAPHS_ITEM_ALPHA_PROPERTY:
		graphs_item_set_alpha (self, g_value_get_float (value));
		break;
		case GRAPHS_ITEM_SELECTED_PROPERTY:
		graphs_item_set_selected (self, g_value_get_boolean (value));
		break;
		case GRAPHS_ITEM_XLABEL_PROPERTY:
		graphs_item_set_xlabel (self, g_value_get_string (value));
		break;
		case GRAPHS_ITEM_YLABEL_PROPERTY:
		graphs_item_set_ylabel (self, g_value_get_string (value));
		break;
		case GRAPHS_ITEM_XPOSITION_PROPERTY:
		graphs_item_set_xposition (self, g_value_get_enum (value));
		break;
		case GRAPHS_ITEM_YPOSITION_PROPERTY:
		graphs_item_set_yposition (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

const gchar*
graphs_equation_based_item_get_equation (GraphsEquationBasedItem* self)
{
	GraphsEquationBasedItemIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GRAPHS_EQUATION_BASED_ITEM_GET_INTERFACE (self);
	if (_iface_->get_equation) {
		return _iface_->get_equation (self);
	}
	return NULL;
}

void
graphs_equation_based_item_set_equation (GraphsEquationBasedItem* self,
                                         const gchar* value)
{
	GraphsEquationBasedItemIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GRAPHS_EQUATION_BASED_ITEM_GET_INTERFACE (self);
	if (_iface_->set_equation) {
		_iface_->set_equation (self, value);
	}
}

static void
graphs_equation_based_item_default_init (GraphsEquationBasedItemIface * iface,
                                         gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_string ("equation", "equation", "equation", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static GType
graphs_equation_based_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsEquationBasedItemIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_equation_based_item_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType graphs_equation_based_item_type_id;
	graphs_equation_based_item_type_id = g_type_register_static (G_TYPE_INTERFACE, "GraphsEquationBasedItem", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (graphs_equation_based_item_type_id, GRAPHS_TYPE_ITEM);
	return graphs_equation_based_item_type_id;
}

GType
graphs_equation_based_item_get_type (void)
{
	static volatile gsize graphs_equation_based_item_type_id__once = 0;
	if (g_once_init_enter (&graphs_equation_based_item_type_id__once)) {
		GType graphs_equation_based_item_type_id;
		graphs_equation_based_item_type_id = graphs_equation_based_item_get_type_once ();
		g_once_init_leave (&graphs_equation_based_item_type_id__once, graphs_equation_based_item_type_id);
	}
	return graphs_equation_based_item_type_id__once;
}

static inline gpointer
graphs_data_holder_get_instance_private (GraphsDataHolder* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsDataHolder_private_offset);
}

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

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

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

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

GraphsDataHolder*
graphs_data_holder_construct (GType object_type,
                              gdouble* xdata,
                              gint xdata_length1,
                              gdouble* ydata,
                              gint ydata_length1,
                              gdouble* xerr,
                              gint xerr_length1,
                              gdouble* yerr,
                              gint yerr_length1)
{
	GraphsDataHolder * self = NULL;
	gdouble* _tmp0_;
	gint _tmp0__length1;
	gdouble* _tmp1_;
	gint _tmp1__length1;
	gdouble* _tmp2_;
	gint _tmp2__length1;
	gdouble* _tmp3_;
	gint _tmp3__length1;
	self = (GraphsDataHolder*) g_object_new (object_type, NULL);
	_tmp0_ = (xdata != NULL) ? _vala_array_dup27 (xdata, xdata_length1) : xdata;
	_tmp0__length1 = xdata_length1;
	self->priv->_xdata = (g_free (self->priv->_xdata), NULL);
	self->priv->_xdata = _tmp0_;
	self->priv->_xdata_length1 = _tmp0__length1;
	self->priv->__xdata_size_ = self->priv->_xdata_length1;
	_tmp1_ = (ydata != NULL) ? _vala_array_dup28 (ydata, ydata_length1) : ydata;
	_tmp1__length1 = ydata_length1;
	self->priv->_ydata = (g_free (self->priv->_ydata), NULL);
	self->priv->_ydata = _tmp1_;
	self->priv->_ydata_length1 = _tmp1__length1;
	self->priv->__ydata_size_ = self->priv->_ydata_length1;
	_tmp2_ = (xerr != NULL) ? _vala_array_dup29 (xerr, xerr_length1) : xerr;
	_tmp2__length1 = xerr_length1;
	self->priv->_xerr = (g_free (self->priv->_xerr), NULL);
	self->priv->_xerr = _tmp2_;
	self->priv->_xerr_length1 = _tmp2__length1;
	self->priv->__xerr_size_ = self->priv->_xerr_length1;
	_tmp3_ = (yerr != NULL) ? _vala_array_dup30 (yerr, yerr_length1) : yerr;
	_tmp3__length1 = yerr_length1;
	self->priv->_yerr = (g_free (self->priv->_yerr), NULL);
	self->priv->_yerr = _tmp3_;
	self->priv->_yerr_length1 = _tmp3__length1;
	self->priv->__yerr_size_ = self->priv->_yerr_length1;
	return self;
}

GraphsDataHolder*
graphs_data_holder_new (gdouble* xdata,
                        gint xdata_length1,
                        gdouble* ydata,
                        gint ydata_length1,
                        gdouble* xerr,
                        gint xerr_length1,
                        gdouble* yerr,
                        gint yerr_length1)
{
	return graphs_data_holder_construct (GRAPHS_TYPE_DATA_HOLDER, xdata, xdata_length1, ydata, ydata_length1, xerr, xerr_length1, yerr, yerr_length1);
}

GraphsDataHolder*
graphs_data_holder_construct_empty (GType object_type)
{
	GraphsDataHolder * self = NULL;
	gdouble* _tmp0_;
	gdouble* _tmp1_;
	self = (GraphsDataHolder*) g_object_new (object_type, NULL);
	_tmp0_ = g_new0 (gdouble, 0);
	self->priv->_xdata = (g_free (self->priv->_xdata), NULL);
	self->priv->_xdata = _tmp0_;
	self->priv->_xdata_length1 = 0;
	self->priv->__xdata_size_ = self->priv->_xdata_length1;
	_tmp1_ = g_new0 (gdouble, 0);
	self->priv->_ydata = (g_free (self->priv->_ydata), NULL);
	self->priv->_ydata = _tmp1_;
	self->priv->_ydata_length1 = 0;
	self->priv->__ydata_size_ = self->priv->_ydata_length1;
	self->priv->_xerr = (g_free (self->priv->_xerr), NULL);
	self->priv->_xerr = NULL;
	self->priv->_xerr_length1 = 0;
	self->priv->__xerr_size_ = self->priv->_xerr_length1;
	self->priv->_yerr = (g_free (self->priv->_yerr), NULL);
	self->priv->_yerr = NULL;
	self->priv->_yerr_length1 = 0;
	self->priv->__yerr_size_ = self->priv->_yerr_length1;
	return self;
}

GraphsDataHolder*
graphs_data_holder_new_empty (void)
{
	return graphs_data_holder_construct_empty (GRAPHS_TYPE_DATA_HOLDER);
}

gdouble*
graphs_data_holder_get_xdata (GraphsDataHolder* self,
                              gint* result_length1)
{
	gdouble* _tmp0_;
	gint _tmp0__length1;
	gdouble* _tmp1_;
	gint _tmp1__length1;
	gdouble* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_xdata;
	_tmp0__length1 = self->priv->_xdata_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

gdouble*
graphs_data_holder_get_ydata (GraphsDataHolder* self,
                              gint* result_length1)
{
	gdouble* _tmp0_;
	gint _tmp0__length1;
	gdouble* _tmp1_;
	gint _tmp1__length1;
	gdouble* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ydata;
	_tmp0__length1 = self->priv->_ydata_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

gdouble*
graphs_data_holder_get_xerr (GraphsDataHolder* self,
                             gint* result_length1)
{
	gdouble* _tmp0_;
	gint _tmp0__length1;
	gdouble* _tmp1_;
	gint _tmp1__length1;
	gdouble* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_xerr;
	_tmp0__length1 = self->priv->_xerr_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

gdouble*
graphs_data_holder_get_yerr (GraphsDataHolder* self,
                             gint* result_length1)
{
	gdouble* _tmp0_;
	gint _tmp0__length1;
	gdouble* _tmp1_;
	gint _tmp1__length1;
	gdouble* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_yerr;
	_tmp0__length1 = self->priv->_yerr_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

GBytes*
graphs_data_holder_get_xdata_b (GraphsDataHolder* self)
{
	gdouble* _tmp0_;
	gint _tmp0__length1;
	GBytes* _tmp1_;
	GBytes* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_xdata;
	_tmp0__length1 = self->priv->_xdata_length1;
	_tmp1_ = g_bytes_new ((guint8*) _tmp0_, (_tmp0__length1 * sizeof (gdouble)) / sizeof (guint8));
	result = _tmp1_;
	return result;
}

GBytes*
graphs_data_holder_get_ydata_b (GraphsDataHolder* self)
{
	gdouble* _tmp0_;
	gint _tmp0__length1;
	GBytes* _tmp1_;
	GBytes* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ydata;
	_tmp0__length1 = self->priv->_ydata_length1;
	_tmp1_ = g_bytes_new ((guint8*) _tmp0_, (_tmp0__length1 * sizeof (gdouble)) / sizeof (guint8));
	result = _tmp1_;
	return result;
}

GBytes*
graphs_data_holder_get_xerr_b (GraphsDataHolder* self)
{
	GBytes* _tmp0_ = NULL;
	gdouble* _tmp1_;
	gint _tmp1__length1;
	GBytes* _tmp4_;
	GBytes* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_xerr;
	_tmp1__length1 = self->priv->_xerr_length1;
	if (_tmp1_ == NULL) {
		_g_bytes_unref0 (_tmp0_);
		_tmp0_ = NULL;
	} else {
		gdouble* _tmp2_;
		gint _tmp2__length1;
		GBytes* _tmp3_;
		_tmp2_ = self->priv->_xerr;
		_tmp2__length1 = self->priv->_xerr_length1;
		_tmp3_ = g_bytes_new ((guint8*) _tmp2_, (_tmp2__length1 * sizeof (gdouble)) / sizeof (guint8));
		_g_bytes_unref0 (_tmp0_);
		_tmp0_ = _tmp3_;
	}
	_tmp4_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp4_;
	_g_bytes_unref0 (_tmp0_);
	return result;
}

GBytes*
graphs_data_holder_get_yerr_b (GraphsDataHolder* self)
{
	GBytes* _tmp0_ = NULL;
	gdouble* _tmp1_;
	gint _tmp1__length1;
	GBytes* _tmp4_;
	GBytes* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_yerr;
	_tmp1__length1 = self->priv->_yerr_length1;
	if (_tmp1_ == NULL) {
		_g_bytes_unref0 (_tmp0_);
		_tmp0_ = NULL;
	} else {
		gdouble* _tmp2_;
		gint _tmp2__length1;
		GBytes* _tmp3_;
		_tmp2_ = self->priv->_yerr;
		_tmp2__length1 = self->priv->_yerr_length1;
		_tmp3_ = g_bytes_new ((guint8*) _tmp2_, (_tmp2__length1 * sizeof (gdouble)) / sizeof (guint8));
		_g_bytes_unref0 (_tmp0_);
		_tmp0_ = _tmp3_;
	}
	_tmp4_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp4_;
	_g_bytes_unref0 (_tmp0_);
	return result;
}

static void
graphs_data_holder_class_init (GraphsDataHolderClass * klass,
                               gpointer klass_data)
{
	graphs_data_holder_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsDataHolder_private_offset);
	G_OBJECT_CLASS (klass)->finalize = graphs_data_holder_finalize;
}

static void
graphs_data_holder_instance_init (GraphsDataHolder * self,
                                  gpointer klass)
{
	self->priv = graphs_data_holder_get_instance_private (self);
}

static void
graphs_data_holder_finalize (GObject * obj)
{
	GraphsDataHolder * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_DATA_HOLDER, GraphsDataHolder);
	self->priv->_xdata = (g_free (self->priv->_xdata), NULL);
	self->priv->_ydata = (g_free (self->priv->_ydata), NULL);
	self->priv->_xerr = (g_free (self->priv->_xerr), NULL);
	self->priv->_yerr = (g_free (self->priv->_yerr), NULL);
	G_OBJECT_CLASS (graphs_data_holder_parent_class)->finalize (obj);
}

static GType
graphs_data_holder_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsDataHolderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_data_holder_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsDataHolder), 0, (GInstanceInitFunc) graphs_data_holder_instance_init, NULL };
	GType graphs_data_holder_type_id;
	graphs_data_holder_type_id = g_type_register_static (G_TYPE_OBJECT, "GraphsDataHolder", &g_define_type_info, 0);
	GraphsDataHolder_private_offset = g_type_add_instance_private (graphs_data_holder_type_id, sizeof (GraphsDataHolderPrivate));
	return graphs_data_holder_type_id;
}

GType
graphs_data_holder_get_type (void)
{
	static volatile gsize graphs_data_holder_type_id__once = 0;
	if (g_once_init_enter (&graphs_data_holder_type_id__once)) {
		GType graphs_data_holder_type_id;
		graphs_data_holder_type_id = graphs_data_holder_get_type_once ();
		g_once_init_leave (&graphs_data_holder_type_id__once, graphs_data_holder_type_id);
	}
	return graphs_data_holder_type_id__once;
}

static inline gpointer
graphs_data_item_get_instance_private (GraphsDataItem* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsDataItem_private_offset);
}

gboolean
graphs_data_item_has_xerr (GraphsDataItem* self)
{
	GraphsDataHolder* _tmp0_;
	gint _tmp1_ = 0;
	gdouble* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_data;
	_tmp2_ = graphs_data_holder_get_xerr (_tmp0_, &_tmp1_);
	result = _tmp2_ != NULL;
	return result;
}

gboolean
graphs_data_item_has_yerr (GraphsDataItem* self)
{
	GraphsDataHolder* _tmp0_;
	gint _tmp1_ = 0;
	gdouble* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_data;
	_tmp2_ = graphs_data_holder_get_yerr (_tmp0_, &_tmp1_);
	result = _tmp2_ != NULL;
	return result;
}

GraphsDataItem*
graphs_data_item_construct (GType object_type)
{
	GraphsDataItem * self = NULL;
	self = (GraphsDataItem*) graphs_item_construct (object_type);
	return self;
}

GraphsDataItem*
graphs_data_item_new (void)
{
	return graphs_data_item_construct (GRAPHS_TYPE_DATA_ITEM);
}

GraphsDataHolder*
graphs_data_item_get_data (GraphsDataItem* self)
{
	GraphsDataHolder* result;
	GraphsDataHolder* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_data;
	result = _tmp0_;
	return result;
}

void
graphs_data_item_set_data (GraphsDataItem* self,
                           GraphsDataHolder* value)
{
	GraphsDataHolder* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_data (self);
	if (old_value != value) {
		GraphsDataHolder* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_data);
		self->priv->_data = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_DATA_PROPERTY]);
	}
}

gboolean
graphs_data_item_get_errbarsabove (GraphsDataItem* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_errbarsabove;
	return result;
}

void
graphs_data_item_set_errbarsabove (GraphsDataItem* self,
                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_errbarsabove (self);
	if (old_value != value) {
		self->priv->_errbarsabove = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRBARSABOVE_PROPERTY]);
	}
}

gdouble
graphs_data_item_get_errcapsize (GraphsDataItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_errcapsize;
	return result;
}

void
graphs_data_item_set_errcapsize (GraphsDataItem* self,
                                 gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_errcapsize (self);
	if (old_value != value) {
		self->priv->_errcapsize = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRCAPSIZE_PROPERTY]);
	}
}

gdouble
graphs_data_item_get_errcapthick (GraphsDataItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_errcapthick;
	return result;
}

void
graphs_data_item_set_errcapthick (GraphsDataItem* self,
                                  gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_errcapthick (self);
	if (old_value != value) {
		self->priv->_errcapthick = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRCAPTHICK_PROPERTY]);
	}
}

const gchar*
graphs_data_item_get_errcolor (GraphsDataItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_errcolor;
	result = _tmp0_;
	return result;
}

void
graphs_data_item_set_errcolor (GraphsDataItem* self,
                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_errcolor (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_errcolor);
		self->priv->_errcolor = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRCOLOR_PROPERTY]);
	}
}

gdouble
graphs_data_item_get_errlinewidth (GraphsDataItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_errlinewidth;
	return result;
}

void
graphs_data_item_set_errlinewidth (GraphsDataItem* self,
                                   gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_errlinewidth (self);
	if (old_value != value) {
		self->priv->_errlinewidth = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRLINEWIDTH_PROPERTY]);
	}
}

gint
graphs_data_item_get_linestyle (GraphsDataItem* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_linestyle;
	return result;
}

void
graphs_data_item_set_linestyle (GraphsDataItem* self,
                                gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_linestyle (self);
	if (old_value != value) {
		self->priv->_linestyle = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_LINESTYLE_PROPERTY]);
	}
}

gdouble
graphs_data_item_get_linewidth (GraphsDataItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_linewidth;
	return result;
}

void
graphs_data_item_set_linewidth (GraphsDataItem* self,
                                gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_linewidth (self);
	if (old_value != value) {
		self->priv->_linewidth = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_LINEWIDTH_PROPERTY]);
	}
}

gint
graphs_data_item_get_markerstyle (GraphsDataItem* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_markerstyle;
	return result;
}

void
graphs_data_item_set_markerstyle (GraphsDataItem* self,
                                  gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_markerstyle (self);
	if (old_value != value) {
		self->priv->_markerstyle = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_MARKERSTYLE_PROPERTY]);
	}
}

gdouble
graphs_data_item_get_markersize (GraphsDataItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_markersize;
	return result;
}

void
graphs_data_item_set_markersize (GraphsDataItem* self,
                                 gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_markersize (self);
	if (old_value != value) {
		self->priv->_markersize = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_MARKERSIZE_PROPERTY]);
	}
}

gboolean
graphs_data_item_get_showxerr (GraphsDataItem* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_showxerr;
	return result;
}

void
graphs_data_item_set_showxerr (GraphsDataItem* self,
                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_showxerr (self);
	if (old_value != value) {
		self->priv->_showxerr = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_SHOWXERR_PROPERTY]);
	}
}

gboolean
graphs_data_item_get_showyerr (GraphsDataItem* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_showyerr;
	return result;
}

void
graphs_data_item_set_showyerr (GraphsDataItem* self,
                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_data_item_get_showyerr (self);
	if (old_value != value) {
		self->priv->_showyerr = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_data_item_properties[GRAPHS_DATA_ITEM_SHOWYERR_PROPERTY]);
	}
}

static GObject *
graphs_data_item_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GraphsDataItem * self;
	parent_class = G_OBJECT_CLASS (graphs_data_item_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_DATA_ITEM, GraphsDataItem);
	graphs_item_set_typename ((GraphsItem*) self, _ ("Dataset"));
	return obj;
}

static void
graphs_data_item_class_init (GraphsDataItemClass * klass,
                             gpointer klass_data)
{
	graphs_data_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsDataItem_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_data_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_data_item_set_property;
	G_OBJECT_CLASS (klass)->constructor = graphs_data_item_constructor;
	G_OBJECT_CLASS (klass)->finalize = graphs_data_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_DATA_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_DATA_PROPERTY] = g_param_spec_object ("data", "data", "data", GRAPHS_TYPE_DATA_HOLDER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_ERRBARSABOVE_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRBARSABOVE_PROPERTY] = g_param_spec_boolean ("errbarsabove", "errbarsabove", "errbarsabove", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_ERRCAPSIZE_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRCAPSIZE_PROPERTY] = g_param_spec_double ("errcapsize", "errcapsize", "errcapsize", -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_DATA_ITEM_ERRCAPTHICK_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRCAPTHICK_PROPERTY] = g_param_spec_double ("errcapthick", "errcapthick", "errcapthick", -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_DATA_ITEM_ERRCOLOR_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRCOLOR_PROPERTY] = g_param_spec_string ("errcolor", "errcolor", "errcolor", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_ERRLINEWIDTH_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_ERRLINEWIDTH_PROPERTY] = g_param_spec_double ("errlinewidth", "errlinewidth", "errlinewidth", -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_DATA_ITEM_LINESTYLE_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_LINESTYLE_PROPERTY] = g_param_spec_int ("linestyle", "linestyle", "linestyle", G_MININT, G_MAXINT, 1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_LINEWIDTH_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_LINEWIDTH_PROPERTY] = g_param_spec_double ("linewidth", "linewidth", "linewidth", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 3, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_MARKERSTYLE_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_MARKERSTYLE_PROPERTY] = g_param_spec_int ("markerstyle", "markerstyle", "markerstyle", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_MARKERSIZE_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_MARKERSIZE_PROPERTY] = g_param_spec_double ("markersize", "markersize", "markersize", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 7, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_SHOWXERR_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_SHOWXERR_PROPERTY] = g_param_spec_boolean ("showxerr", "showxerr", "showxerr", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_DATA_ITEM_SHOWYERR_PROPERTY, graphs_data_item_properties[GRAPHS_DATA_ITEM_SHOWYERR_PROPERTY] = g_param_spec_boolean ("showyerr", "showyerr", "showyerr", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
graphs_data_item_instance_init (GraphsDataItem * self,
                                gpointer klass)
{
	GraphsDataHolder* _tmp0_;
	gchar* _tmp1_;
	self->priv = graphs_data_item_get_instance_private (self);
	_tmp0_ = graphs_data_holder_new_empty ();
	self->priv->_data = _tmp0_;
	self->priv->_errbarsabove = FALSE;
	self->priv->_errcapsize = (gdouble) 0;
	self->priv->_errcapthick = (gdouble) 1;
	_tmp1_ = g_strdup ("");
	self->priv->_errcolor = _tmp1_;
	self->priv->_errlinewidth = (gdouble) 1;
	self->priv->_linestyle = 1;
	self->priv->_linewidth = (gdouble) 3;
	self->priv->_markerstyle = 0;
	self->priv->_markersize = (gdouble) 7;
	self->priv->_showxerr = TRUE;
	self->priv->_showyerr = TRUE;
}

static void
graphs_data_item_finalize (GObject * obj)
{
	GraphsDataItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_DATA_ITEM, GraphsDataItem);
	_g_object_unref0 (self->priv->_data);
	_g_free0 (self->priv->_errcolor);
	G_OBJECT_CLASS (graphs_data_item_parent_class)->finalize (obj);
}

static GType
graphs_data_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsDataItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_data_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsDataItem), 0, (GInstanceInitFunc) graphs_data_item_instance_init, NULL };
	GType graphs_data_item_type_id;
	graphs_data_item_type_id = g_type_register_static (GRAPHS_TYPE_ITEM, "GraphsDataItem", &g_define_type_info, 0);
	GraphsDataItem_private_offset = g_type_add_instance_private (graphs_data_item_type_id, sizeof (GraphsDataItemPrivate));
	return graphs_data_item_type_id;
}

GType
graphs_data_item_get_type (void)
{
	static volatile gsize graphs_data_item_type_id__once = 0;
	if (g_once_init_enter (&graphs_data_item_type_id__once)) {
		GType graphs_data_item_type_id;
		graphs_data_item_type_id = graphs_data_item_get_type_once ();
		g_once_init_leave (&graphs_data_item_type_id__once, graphs_data_item_type_id);
	}
	return graphs_data_item_type_id__once;
}

static void
_vala_graphs_data_item_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	GraphsDataItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_DATA_ITEM, GraphsDataItem);
	switch (property_id) {
		case GRAPHS_DATA_ITEM_DATA_PROPERTY:
		g_value_set_object (value, graphs_data_item_get_data (self));
		break;
		case GRAPHS_DATA_ITEM_ERRBARSABOVE_PROPERTY:
		g_value_set_boolean (value, graphs_data_item_get_errbarsabove (self));
		break;
		case GRAPHS_DATA_ITEM_ERRCAPSIZE_PROPERTY:
		g_value_set_double (value, graphs_data_item_get_errcapsize (self));
		break;
		case GRAPHS_DATA_ITEM_ERRCAPTHICK_PROPERTY:
		g_value_set_double (value, graphs_data_item_get_errcapthick (self));
		break;
		case GRAPHS_DATA_ITEM_ERRCOLOR_PROPERTY:
		g_value_set_string (value, graphs_data_item_get_errcolor (self));
		break;
		case GRAPHS_DATA_ITEM_ERRLINEWIDTH_PROPERTY:
		g_value_set_double (value, graphs_data_item_get_errlinewidth (self));
		break;
		case GRAPHS_DATA_ITEM_LINESTYLE_PROPERTY:
		g_value_set_int (value, graphs_data_item_get_linestyle (self));
		break;
		case GRAPHS_DATA_ITEM_LINEWIDTH_PROPERTY:
		g_value_set_double (value, graphs_data_item_get_linewidth (self));
		break;
		case GRAPHS_DATA_ITEM_MARKERSTYLE_PROPERTY:
		g_value_set_int (value, graphs_data_item_get_markerstyle (self));
		break;
		case GRAPHS_DATA_ITEM_MARKERSIZE_PROPERTY:
		g_value_set_double (value, graphs_data_item_get_markersize (self));
		break;
		case GRAPHS_DATA_ITEM_SHOWXERR_PROPERTY:
		g_value_set_boolean (value, graphs_data_item_get_showxerr (self));
		break;
		case GRAPHS_DATA_ITEM_SHOWYERR_PROPERTY:
		g_value_set_boolean (value, graphs_data_item_get_showyerr (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_data_item_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	GraphsDataItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_DATA_ITEM, GraphsDataItem);
	switch (property_id) {
		case GRAPHS_DATA_ITEM_DATA_PROPERTY:
		graphs_data_item_set_data (self, g_value_get_object (value));
		break;
		case GRAPHS_DATA_ITEM_ERRBARSABOVE_PROPERTY:
		graphs_data_item_set_errbarsabove (self, g_value_get_boolean (value));
		break;
		case GRAPHS_DATA_ITEM_ERRCAPSIZE_PROPERTY:
		graphs_data_item_set_errcapsize (self, g_value_get_double (value));
		break;
		case GRAPHS_DATA_ITEM_ERRCAPTHICK_PROPERTY:
		graphs_data_item_set_errcapthick (self, g_value_get_double (value));
		break;
		case GRAPHS_DATA_ITEM_ERRCOLOR_PROPERTY:
		graphs_data_item_set_errcolor (self, g_value_get_string (value));
		break;
		case GRAPHS_DATA_ITEM_ERRLINEWIDTH_PROPERTY:
		graphs_data_item_set_errlinewidth (self, g_value_get_double (value));
		break;
		case GRAPHS_DATA_ITEM_LINESTYLE_PROPERTY:
		graphs_data_item_set_linestyle (self, g_value_get_int (value));
		break;
		case GRAPHS_DATA_ITEM_LINEWIDTH_PROPERTY:
		graphs_data_item_set_linewidth (self, g_value_get_double (value));
		break;
		case GRAPHS_DATA_ITEM_MARKERSTYLE_PROPERTY:
		graphs_data_item_set_markerstyle (self, g_value_get_int (value));
		break;
		case GRAPHS_DATA_ITEM_MARKERSIZE_PROPERTY:
		graphs_data_item_set_markersize (self, g_value_get_double (value));
		break;
		case GRAPHS_DATA_ITEM_SHOWXERR_PROPERTY:
		graphs_data_item_set_showxerr (self, g_value_get_boolean (value));
		break;
		case GRAPHS_DATA_ITEM_SHOWYERR_PROPERTY:
		graphs_data_item_set_showyerr (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
graphs_generated_data_item_get_instance_private (GraphsGeneratedDataItem* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsGeneratedDataItem_private_offset);
}

static void
graphs_generated_data_item_regenerate (GraphsGeneratedDataItem* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		gdouble _tmp0_ = 0.0;
		const gchar* _tmp1_;
		gdouble _tmp2_ = 0.0;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gint _tmp5_;
		GraphsScale _tmp6_;
		GraphsDataHolder* _tmp7_;
		GraphsDataHolder* _tmp8_;
		_tmp1_ = self->priv->_xstart;
		_tmp0_ = graphs_evaluate_string (_tmp1_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == GRAPHS_MATH_ERROR) {
				goto __catch0_graphs_math_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_tmp3_ = self->priv->_xstop;
		_tmp2_ = graphs_evaluate_string (_tmp3_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == GRAPHS_MATH_ERROR) {
				goto __catch0_graphs_math_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_tmp4_ = self->priv->_preprocessed_equation;
		_tmp5_ = self->priv->_steps;
		_tmp6_ = self->priv->_scale;
		_tmp7_ = graphs_python_helper_equation_to_data (_tmp4_, _tmp0_, _tmp2_, _tmp5_, _tmp6_);
		_tmp8_ = _tmp7_;
		graphs_data_item_set_data ((GraphsDataItem*) self, _tmp8_);
		_g_object_unref0 (_tmp8_);
	}
	goto __finally0;
	__catch0_graphs_math_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

GraphsGeneratedDataItem*
graphs_generated_data_item_construct (GType object_type)
{
	GraphsGeneratedDataItem * self = NULL;
	self = (GraphsGeneratedDataItem*) graphs_data_item_construct (object_type);
	return self;
}

GraphsGeneratedDataItem*
graphs_generated_data_item_new (void)
{
	return graphs_generated_data_item_construct (GRAPHS_TYPE_GENERATED_DATA_ITEM);
}

const gchar*
graphs_generated_data_item_get_xstart (GraphsGeneratedDataItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_xstart;
	result = _tmp0_;
	return result;
}

void
graphs_generated_data_item_set_xstart (GraphsGeneratedDataItem* self,
                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_generated_data_item_get_xstart (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_xstart);
		self->priv->_xstart = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_XSTART_PROPERTY]);
	}
}

const gchar*
graphs_generated_data_item_get_xstop (GraphsGeneratedDataItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_xstop;
	result = _tmp0_;
	return result;
}

void
graphs_generated_data_item_set_xstop (GraphsGeneratedDataItem* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_generated_data_item_get_xstop (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_xstop);
		self->priv->_xstop = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_XSTOP_PROPERTY]);
	}
}

gint
graphs_generated_data_item_get_steps (GraphsGeneratedDataItem* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_steps;
	return result;
}

void
graphs_generated_data_item_set_steps (GraphsGeneratedDataItem* self,
                                      gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_generated_data_item_get_steps (self);
	if (old_value != value) {
		self->priv->_steps = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_STEPS_PROPERTY]);
	}
}

GraphsScale
graphs_generated_data_item_get_scale (GraphsGeneratedDataItem* self)
{
	GraphsScale result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_scale;
	return result;
}

void
graphs_generated_data_item_set_scale (GraphsGeneratedDataItem* self,
                                      GraphsScale value)
{
	GraphsScale old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_generated_data_item_get_scale (self);
	if (old_value != value) {
		self->priv->_scale = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_SCALE_PROPERTY]);
	}
}

static const gchar*
graphs_generated_data_item_real_get_equation (GraphsEquationBasedItem* base)
{
	const gchar* result;
	GraphsGeneratedDataItem* self;
	const gchar* _tmp0_;
	self = (GraphsGeneratedDataItem*) base;
	_tmp0_ = self->priv->_equation;
	result = _tmp0_;
	return result;
}

static void
graphs_generated_data_item_real_set_equation (GraphsEquationBasedItem* base,
                                              const gchar* value)
{
	GraphsGeneratedDataItem* self;
	gchar* old_equation = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gboolean _tmp12_;
	GError* _inner_error0_ = NULL;
	self = (GraphsGeneratedDataItem*) base;
	_tmp0_ = self->priv->_equation;
	_tmp1_ = g_strdup (_tmp0_);
	old_equation = _tmp1_;
	_tmp2_ = old_equation;
	if (g_strcmp0 (_tmp2_, value) == 0) {
		_g_free0 (old_equation);
		return;
	}
	_tmp3_ = g_strdup (value);
	_g_free0 (self->priv->_equation);
	self->priv->_equation = _tmp3_;
	{
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = graphs_preprocess_equation (value, &_inner_error0_);
		_tmp4_ = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == GRAPHS_MATH_ERROR) {
				goto __catch0_graphs_math_error;
			}
			_g_free0 (old_equation);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_tmp6_ = _tmp4_;
		_tmp4_ = NULL;
		_g_free0 (self->priv->_preprocessed_equation);
		self->priv->_preprocessed_equation = _tmp6_;
		_g_free0 (_tmp4_);
	}
	goto __finally0;
	__catch0_graphs_math_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (old_equation);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp7_ = old_equation;
	_tmp8_ = g_strconcat ("Y = ", _tmp7_, NULL);
	_tmp9_ = _tmp8_;
	_tmp10_ = graphs_item_get_name ((GraphsItem*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strcmp0 (_tmp9_, _tmp11_) == 0;
	_g_free0 (_tmp9_);
	if (_tmp12_) {
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp13_ = g_strconcat ("Y = ", value, NULL);
		_tmp14_ = _tmp13_;
		graphs_item_set_name ((GraphsItem*) self, _tmp14_);
		_g_free0 (_tmp14_);
	}
	graphs_generated_data_item_regenerate (self);
	_g_free0 (old_equation);
	g_object_notify_by_pspec ((GObject *) self, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_EQUATION_PROPERTY]);
}

static void
_graphs_generated_data_item_regenerate_g_object_notify (GObject* _sender,
                                                        GParamSpec* pspec,
                                                        gpointer self)
{
	graphs_generated_data_item_regenerate ((GraphsGeneratedDataItem*) self);
}

static GObject *
graphs_generated_data_item_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GraphsGeneratedDataItem * self;
	static const gchar* PROPS[4] = {"xstart", "xstop", "steps", "scale"};
	parent_class = G_OBJECT_CLASS (graphs_generated_data_item_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_GENERATED_DATA_ITEM, GraphsGeneratedDataItem);
	graphs_item_set_typename ((GraphsItem*) self, _ ("Generated Dataset"));
	{
		const gchar** prop_collection = NULL;
		gint prop_collection_length1 = 0;
		gint _prop_collection_size_ = 0;
		gint prop_it = 0;
		prop_collection = PROPS;
		prop_collection_length1 = G_N_ELEMENTS (PROPS);
		for (prop_it = 0; prop_it < prop_collection_length1; prop_it = prop_it + 1) {
			gchar* _tmp0_;
			gchar* prop = NULL;
			_tmp0_ = g_strdup (prop_collection[prop_it]);
			prop = _tmp0_;
			{
				const gchar* _tmp1_;
				gchar* _tmp2_;
				_tmp1_ = prop;
				_tmp2_ = g_strconcat ("notify::", _tmp1_, NULL);
				g_signal_connect_object ((GObject*) self, _tmp2_, (GCallback) _graphs_generated_data_item_regenerate_g_object_notify, self, 0);
				_g_free0 (_tmp2_);
				_g_free0 (prop);
			}
		}
	}
	return obj;
}

static void
graphs_generated_data_item_class_init (GraphsGeneratedDataItemClass * klass,
                                       gpointer klass_data)
{
	graphs_generated_data_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsGeneratedDataItem_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_generated_data_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_generated_data_item_set_property;
	G_OBJECT_CLASS (klass)->constructor = graphs_generated_data_item_constructor;
	G_OBJECT_CLASS (klass)->finalize = graphs_generated_data_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_GENERATED_DATA_ITEM_XSTART_PROPERTY, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_XSTART_PROPERTY] = g_param_spec_string ("xstart", "xstart", "xstart", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_GENERATED_DATA_ITEM_XSTOP_PROPERTY, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_XSTOP_PROPERTY] = g_param_spec_string ("xstop", "xstop", "xstop", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_GENERATED_DATA_ITEM_STEPS_PROPERTY, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_STEPS_PROPERTY] = g_param_spec_int ("steps", "steps", "steps", G_MININT, G_MAXINT, 100, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_GENERATED_DATA_ITEM_SCALE_PROPERTY, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_SCALE_PROPERTY] = g_param_spec_enum ("scale", "scale", "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_GENERATED_DATA_ITEM_EQUATION_PROPERTY, graphs_generated_data_item_properties[GRAPHS_GENERATED_DATA_ITEM_EQUATION_PROPERTY] = g_param_spec_string ("equation", "equation", "equation", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
graphs_generated_data_item_graphs_equation_based_item_interface_init (GraphsEquationBasedItemIface * iface,
                                                                      gpointer iface_data)
{
	graphs_generated_data_item_graphs_equation_based_item_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_equation = graphs_generated_data_item_real_get_equation;
	iface->set_equation = graphs_generated_data_item_real_set_equation;
}

static void
graphs_generated_data_item_instance_init (GraphsGeneratedDataItem * self,
                                          gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self->priv = graphs_generated_data_item_get_instance_private (self);
	_tmp0_ = g_strdup ("0");
	self->priv->_xstart = _tmp0_;
	_tmp1_ = g_strdup ("10");
	self->priv->_xstop = _tmp1_;
	self->priv->_steps = 100;
	self->priv->_scale = GRAPHS_SCALE_LINEAR;
	_tmp2_ = g_strdup ("");
	self->priv->_equation = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->_preprocessed_equation = _tmp3_;
}

static void
graphs_generated_data_item_finalize (GObject * obj)
{
	GraphsGeneratedDataItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_GENERATED_DATA_ITEM, GraphsGeneratedDataItem);
	_g_free0 (self->priv->_xstart);
	_g_free0 (self->priv->_xstop);
	_g_free0 (self->priv->_equation);
	_g_free0 (self->priv->_preprocessed_equation);
	G_OBJECT_CLASS (graphs_generated_data_item_parent_class)->finalize (obj);
}

static GType
graphs_generated_data_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsGeneratedDataItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_generated_data_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsGeneratedDataItem), 0, (GInstanceInitFunc) graphs_generated_data_item_instance_init, NULL };
	static const GInterfaceInfo graphs_equation_based_item_info = { (GInterfaceInitFunc) graphs_generated_data_item_graphs_equation_based_item_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType graphs_generated_data_item_type_id;
	graphs_generated_data_item_type_id = g_type_register_static (GRAPHS_TYPE_DATA_ITEM, "GraphsGeneratedDataItem", &g_define_type_info, 0);
	g_type_add_interface_static (graphs_generated_data_item_type_id, GRAPHS_TYPE_EQUATION_BASED_ITEM, &graphs_equation_based_item_info);
	GraphsGeneratedDataItem_private_offset = g_type_add_instance_private (graphs_generated_data_item_type_id, sizeof (GraphsGeneratedDataItemPrivate));
	return graphs_generated_data_item_type_id;
}

GType
graphs_generated_data_item_get_type (void)
{
	static volatile gsize graphs_generated_data_item_type_id__once = 0;
	if (g_once_init_enter (&graphs_generated_data_item_type_id__once)) {
		GType graphs_generated_data_item_type_id;
		graphs_generated_data_item_type_id = graphs_generated_data_item_get_type_once ();
		g_once_init_leave (&graphs_generated_data_item_type_id__once, graphs_generated_data_item_type_id);
	}
	return graphs_generated_data_item_type_id__once;
}

static void
_vala_graphs_generated_data_item_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	GraphsGeneratedDataItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_GENERATED_DATA_ITEM, GraphsGeneratedDataItem);
	switch (property_id) {
		case GRAPHS_GENERATED_DATA_ITEM_XSTART_PROPERTY:
		g_value_set_string (value, graphs_generated_data_item_get_xstart (self));
		break;
		case GRAPHS_GENERATED_DATA_ITEM_XSTOP_PROPERTY:
		g_value_set_string (value, graphs_generated_data_item_get_xstop (self));
		break;
		case GRAPHS_GENERATED_DATA_ITEM_STEPS_PROPERTY:
		g_value_set_int (value, graphs_generated_data_item_get_steps (self));
		break;
		case GRAPHS_GENERATED_DATA_ITEM_SCALE_PROPERTY:
		g_value_set_enum (value, graphs_generated_data_item_get_scale (self));
		break;
		case GRAPHS_GENERATED_DATA_ITEM_EQUATION_PROPERTY:
		g_value_set_string (value, graphs_equation_based_item_get_equation ((GraphsEquationBasedItem*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_generated_data_item_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	GraphsGeneratedDataItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_GENERATED_DATA_ITEM, GraphsGeneratedDataItem);
	switch (property_id) {
		case GRAPHS_GENERATED_DATA_ITEM_XSTART_PROPERTY:
		graphs_generated_data_item_set_xstart (self, g_value_get_string (value));
		break;
		case GRAPHS_GENERATED_DATA_ITEM_XSTOP_PROPERTY:
		graphs_generated_data_item_set_xstop (self, g_value_get_string (value));
		break;
		case GRAPHS_GENERATED_DATA_ITEM_STEPS_PROPERTY:
		graphs_generated_data_item_set_steps (self, g_value_get_int (value));
		break;
		case GRAPHS_GENERATED_DATA_ITEM_SCALE_PROPERTY:
		graphs_generated_data_item_set_scale (self, g_value_get_enum (value));
		break;
		case GRAPHS_GENERATED_DATA_ITEM_EQUATION_PROPERTY:
		graphs_equation_based_item_set_equation ((GraphsEquationBasedItem*) self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
graphs_equation_item_get_instance_private (GraphsEquationItem* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsEquationItem_private_offset);
}

gchar*
graphs_equation_item_get_preprocessed_equation (GraphsEquationItem* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_preprocessed_equation;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

GraphsEquationItem*
graphs_equation_item_construct (GType object_type)
{
	GraphsEquationItem * self = NULL;
	self = (GraphsEquationItem*) graphs_item_construct (object_type);
	return self;
}

GraphsEquationItem*
graphs_equation_item_new (void)
{
	return graphs_equation_item_construct (GRAPHS_TYPE_EQUATION_ITEM);
}

gint
graphs_equation_item_get_linestyle (GraphsEquationItem* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_linestyle;
	return result;
}

void
graphs_equation_item_set_linestyle (GraphsEquationItem* self,
                                    gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_equation_item_get_linestyle (self);
	if (old_value != value) {
		self->priv->_linestyle = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_equation_item_properties[GRAPHS_EQUATION_ITEM_LINESTYLE_PROPERTY]);
	}
}

gdouble
graphs_equation_item_get_linewidth (GraphsEquationItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_linewidth;
	return result;
}

void
graphs_equation_item_set_linewidth (GraphsEquationItem* self,
                                    gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_equation_item_get_linewidth (self);
	if (old_value != value) {
		self->priv->_linewidth = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_equation_item_properties[GRAPHS_EQUATION_ITEM_LINEWIDTH_PROPERTY]);
	}
}

static const gchar*
graphs_equation_item_real_get_equation (GraphsEquationBasedItem* base)
{
	const gchar* result;
	GraphsEquationItem* self;
	const gchar* _tmp0_;
	self = (GraphsEquationItem*) base;
	_tmp0_ = self->priv->_equation;
	result = _tmp0_;
	return result;
}

static void
graphs_equation_item_real_set_equation (GraphsEquationBasedItem* base,
                                        const gchar* value)
{
	GraphsEquationItem* self;
	gchar* old_equation = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gboolean _tmp12_;
	GError* _inner_error0_ = NULL;
	self = (GraphsEquationItem*) base;
	_tmp0_ = self->priv->_equation;
	_tmp1_ = g_strdup (_tmp0_);
	old_equation = _tmp1_;
	_tmp2_ = old_equation;
	if (g_strcmp0 (_tmp2_, value) == 0) {
		_g_free0 (old_equation);
		return;
	}
	_tmp3_ = g_strdup (value);
	_g_free0 (self->priv->_equation);
	self->priv->_equation = _tmp3_;
	{
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = graphs_preprocess_equation (value, &_inner_error0_);
		_tmp4_ = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == GRAPHS_MATH_ERROR) {
				goto __catch0_graphs_math_error;
			}
			_g_free0 (old_equation);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_tmp6_ = _tmp4_;
		_tmp4_ = NULL;
		_g_free0 (self->priv->_preprocessed_equation);
		self->priv->_preprocessed_equation = _tmp6_;
		_g_free0 (_tmp4_);
	}
	goto __finally0;
	__catch0_graphs_math_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (old_equation);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_tmp7_ = old_equation;
	_tmp8_ = g_strconcat ("Y = ", _tmp7_, NULL);
	_tmp9_ = _tmp8_;
	_tmp10_ = graphs_item_get_name ((GraphsItem*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = g_strcmp0 (_tmp9_, _tmp11_) == 0;
	_g_free0 (_tmp9_);
	if (_tmp12_) {
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp13_ = g_strconcat ("Y = ", value, NULL);
		_tmp14_ = _tmp13_;
		graphs_item_set_name ((GraphsItem*) self, _tmp14_);
		_g_free0 (_tmp14_);
	}
	_g_free0 (old_equation);
	g_object_notify_by_pspec ((GObject *) self, graphs_equation_item_properties[GRAPHS_EQUATION_ITEM_EQUATION_PROPERTY]);
}

static GObject *
graphs_equation_item_constructor (GType type,
                                  guint n_construct_properties,
                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GraphsEquationItem * self;
	parent_class = G_OBJECT_CLASS (graphs_equation_item_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_EQUATION_ITEM, GraphsEquationItem);
	graphs_item_set_typename ((GraphsItem*) self, _ ("Equation"));
	return obj;
}

static void
graphs_equation_item_class_init (GraphsEquationItemClass * klass,
                                 gpointer klass_data)
{
	graphs_equation_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsEquationItem_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_equation_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_equation_item_set_property;
	G_OBJECT_CLASS (klass)->constructor = graphs_equation_item_constructor;
	G_OBJECT_CLASS (klass)->finalize = graphs_equation_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_EQUATION_ITEM_LINESTYLE_PROPERTY, graphs_equation_item_properties[GRAPHS_EQUATION_ITEM_LINESTYLE_PROPERTY] = g_param_spec_int ("linestyle", "linestyle", "linestyle", G_MININT, G_MAXINT, 1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_EQUATION_ITEM_LINEWIDTH_PROPERTY, graphs_equation_item_properties[GRAPHS_EQUATION_ITEM_LINEWIDTH_PROPERTY] = g_param_spec_double ("linewidth", "linewidth", "linewidth", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 3, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_EQUATION_ITEM_EQUATION_PROPERTY, graphs_equation_item_properties[GRAPHS_EQUATION_ITEM_EQUATION_PROPERTY] = g_param_spec_string ("equation", "equation", "equation", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
graphs_equation_item_graphs_equation_based_item_interface_init (GraphsEquationBasedItemIface * iface,
                                                                gpointer iface_data)
{
	graphs_equation_item_graphs_equation_based_item_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_equation = graphs_equation_item_real_get_equation;
	iface->set_equation = graphs_equation_item_real_set_equation;
}

static void
graphs_equation_item_instance_init (GraphsEquationItem * self,
                                    gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = graphs_equation_item_get_instance_private (self);
	self->priv->_linestyle = 1;
	self->priv->_linewidth = (gdouble) 3;
	_tmp0_ = g_strdup ("");
	self->priv->_equation = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->priv->_preprocessed_equation = _tmp1_;
}

static void
graphs_equation_item_finalize (GObject * obj)
{
	GraphsEquationItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_EQUATION_ITEM, GraphsEquationItem);
	_g_free0 (self->priv->_equation);
	_g_free0 (self->priv->_preprocessed_equation);
	G_OBJECT_CLASS (graphs_equation_item_parent_class)->finalize (obj);
}

static GType
graphs_equation_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsEquationItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_equation_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsEquationItem), 0, (GInstanceInitFunc) graphs_equation_item_instance_init, NULL };
	static const GInterfaceInfo graphs_equation_based_item_info = { (GInterfaceInitFunc) graphs_equation_item_graphs_equation_based_item_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType graphs_equation_item_type_id;
	graphs_equation_item_type_id = g_type_register_static (GRAPHS_TYPE_ITEM, "GraphsEquationItem", &g_define_type_info, 0);
	g_type_add_interface_static (graphs_equation_item_type_id, GRAPHS_TYPE_EQUATION_BASED_ITEM, &graphs_equation_based_item_info);
	GraphsEquationItem_private_offset = g_type_add_instance_private (graphs_equation_item_type_id, sizeof (GraphsEquationItemPrivate));
	return graphs_equation_item_type_id;
}

GType
graphs_equation_item_get_type (void)
{
	static volatile gsize graphs_equation_item_type_id__once = 0;
	if (g_once_init_enter (&graphs_equation_item_type_id__once)) {
		GType graphs_equation_item_type_id;
		graphs_equation_item_type_id = graphs_equation_item_get_type_once ();
		g_once_init_leave (&graphs_equation_item_type_id__once, graphs_equation_item_type_id);
	}
	return graphs_equation_item_type_id__once;
}

static void
_vala_graphs_equation_item_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	GraphsEquationItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_EQUATION_ITEM, GraphsEquationItem);
	switch (property_id) {
		case GRAPHS_EQUATION_ITEM_LINESTYLE_PROPERTY:
		g_value_set_int (value, graphs_equation_item_get_linestyle (self));
		break;
		case GRAPHS_EQUATION_ITEM_LINEWIDTH_PROPERTY:
		g_value_set_double (value, graphs_equation_item_get_linewidth (self));
		break;
		case GRAPHS_EQUATION_ITEM_EQUATION_PROPERTY:
		g_value_set_string (value, graphs_equation_based_item_get_equation ((GraphsEquationBasedItem*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_equation_item_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	GraphsEquationItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_EQUATION_ITEM, GraphsEquationItem);
	switch (property_id) {
		case GRAPHS_EQUATION_ITEM_LINESTYLE_PROPERTY:
		graphs_equation_item_set_linestyle (self, g_value_get_int (value));
		break;
		case GRAPHS_EQUATION_ITEM_LINEWIDTH_PROPERTY:
		graphs_equation_item_set_linewidth (self, g_value_get_double (value));
		break;
		case GRAPHS_EQUATION_ITEM_EQUATION_PROPERTY:
		graphs_equation_based_item_set_equation ((GraphsEquationBasedItem*) self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
graphs_text_item_get_instance_private (GraphsTextItem* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsTextItem_private_offset);
}

GraphsTextItem*
graphs_text_item_construct (GType object_type)
{
	GraphsTextItem * self = NULL;
	self = (GraphsTextItem*) graphs_item_construct (object_type);
	return self;
}

GraphsTextItem*
graphs_text_item_new (void)
{
	return graphs_text_item_construct (GRAPHS_TYPE_TEXT_ITEM);
}

gdouble
graphs_text_item_get_xanchor (GraphsTextItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_xanchor;
	return result;
}

void
graphs_text_item_set_xanchor (GraphsTextItem* self,
                              gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_text_item_get_xanchor (self);
	if (old_value != value) {
		self->priv->_xanchor = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_text_item_properties[GRAPHS_TEXT_ITEM_XANCHOR_PROPERTY]);
	}
}

gdouble
graphs_text_item_get_yanchor (GraphsTextItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_yanchor;
	return result;
}

void
graphs_text_item_set_yanchor (GraphsTextItem* self,
                              gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_text_item_get_yanchor (self);
	if (old_value != value) {
		self->priv->_yanchor = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_text_item_properties[GRAPHS_TEXT_ITEM_YANCHOR_PROPERTY]);
	}
}

const gchar*
graphs_text_item_get_text (GraphsTextItem* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text;
	result = _tmp0_;
	return result;
}

void
graphs_text_item_set_text (GraphsTextItem* self,
                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_text_item_get_text (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_text);
		self->priv->_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_text_item_properties[GRAPHS_TEXT_ITEM_TEXT_PROPERTY]);
	}
}

gdouble
graphs_text_item_get_size (GraphsTextItem* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_size;
	return result;
}

void
graphs_text_item_set_size (GraphsTextItem* self,
                           gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_text_item_get_size (self);
	if (old_value != value) {
		self->priv->_size = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_text_item_properties[GRAPHS_TEXT_ITEM_SIZE_PROPERTY]);
	}
}

gint
graphs_text_item_get_rotation (GraphsTextItem* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_rotation;
	return result;
}

void
graphs_text_item_set_rotation (GraphsTextItem* self,
                               gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_text_item_get_rotation (self);
	if (old_value != value) {
		self->priv->_rotation = value;
		g_object_notify_by_pspec ((GObject *) self, graphs_text_item_properties[GRAPHS_TEXT_ITEM_ROTATION_PROPERTY]);
	}
}

static GObject *
graphs_text_item_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GraphsTextItem * self;
	parent_class = G_OBJECT_CLASS (graphs_text_item_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_TEXT_ITEM, GraphsTextItem);
	graphs_item_set_typename ((GraphsItem*) self, _ ("Label"));
	return obj;
}

static void
graphs_text_item_class_init (GraphsTextItemClass * klass,
                             gpointer klass_data)
{
	graphs_text_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsTextItem_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_text_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_text_item_set_property;
	G_OBJECT_CLASS (klass)->constructor = graphs_text_item_constructor;
	G_OBJECT_CLASS (klass)->finalize = graphs_text_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_TEXT_ITEM_XANCHOR_PROPERTY, graphs_text_item_properties[GRAPHS_TEXT_ITEM_XANCHOR_PROPERTY] = g_param_spec_double ("xanchor", "xanchor", "xanchor", -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_TEXT_ITEM_YANCHOR_PROPERTY, graphs_text_item_properties[GRAPHS_TEXT_ITEM_YANCHOR_PROPERTY] = g_param_spec_double ("yanchor", "yanchor", "yanchor", -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_TEXT_ITEM_TEXT_PROPERTY, graphs_text_item_properties[GRAPHS_TEXT_ITEM_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_TEXT_ITEM_SIZE_PROPERTY, graphs_text_item_properties[GRAPHS_TEXT_ITEM_SIZE_PROPERTY] = g_param_spec_double ("size", "size", "size", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 12, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_TEXT_ITEM_ROTATION_PROPERTY, graphs_text_item_properties[GRAPHS_TEXT_ITEM_ROTATION_PROPERTY] = g_param_spec_int ("rotation", "rotation", "rotation", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
graphs_text_item_instance_init (GraphsTextItem * self,
                                gpointer klass)
{
	gchar* _tmp0_;
	self->priv = graphs_text_item_get_instance_private (self);
	self->priv->_xanchor = (gdouble) 0;
	self->priv->_yanchor = (gdouble) 0;
	_tmp0_ = g_strdup ("");
	self->priv->_text = _tmp0_;
	self->priv->_size = (gdouble) 12;
	self->priv->_rotation = 0;
}

static void
graphs_text_item_finalize (GObject * obj)
{
	GraphsTextItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_TEXT_ITEM, GraphsTextItem);
	_g_free0 (self->priv->_text);
	G_OBJECT_CLASS (graphs_text_item_parent_class)->finalize (obj);
}

static GType
graphs_text_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsTextItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_text_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsTextItem), 0, (GInstanceInitFunc) graphs_text_item_instance_init, NULL };
	GType graphs_text_item_type_id;
	graphs_text_item_type_id = g_type_register_static (GRAPHS_TYPE_ITEM, "GraphsTextItem", &g_define_type_info, 0);
	GraphsTextItem_private_offset = g_type_add_instance_private (graphs_text_item_type_id, sizeof (GraphsTextItemPrivate));
	return graphs_text_item_type_id;
}

GType
graphs_text_item_get_type (void)
{
	static volatile gsize graphs_text_item_type_id__once = 0;
	if (g_once_init_enter (&graphs_text_item_type_id__once)) {
		GType graphs_text_item_type_id;
		graphs_text_item_type_id = graphs_text_item_get_type_once ();
		g_once_init_leave (&graphs_text_item_type_id__once, graphs_text_item_type_id);
	}
	return graphs_text_item_type_id__once;
}

static void
_vala_graphs_text_item_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	GraphsTextItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_TEXT_ITEM, GraphsTextItem);
	switch (property_id) {
		case GRAPHS_TEXT_ITEM_XANCHOR_PROPERTY:
		g_value_set_double (value, graphs_text_item_get_xanchor (self));
		break;
		case GRAPHS_TEXT_ITEM_YANCHOR_PROPERTY:
		g_value_set_double (value, graphs_text_item_get_yanchor (self));
		break;
		case GRAPHS_TEXT_ITEM_TEXT_PROPERTY:
		g_value_set_string (value, graphs_text_item_get_text (self));
		break;
		case GRAPHS_TEXT_ITEM_SIZE_PROPERTY:
		g_value_set_double (value, graphs_text_item_get_size (self));
		break;
		case GRAPHS_TEXT_ITEM_ROTATION_PROPERTY:
		g_value_set_int (value, graphs_text_item_get_rotation (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_text_item_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	GraphsTextItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_TEXT_ITEM, GraphsTextItem);
	switch (property_id) {
		case GRAPHS_TEXT_ITEM_XANCHOR_PROPERTY:
		graphs_text_item_set_xanchor (self, g_value_get_double (value));
		break;
		case GRAPHS_TEXT_ITEM_YANCHOR_PROPERTY:
		graphs_text_item_set_yanchor (self, g_value_get_double (value));
		break;
		case GRAPHS_TEXT_ITEM_TEXT_PROPERTY:
		graphs_text_item_set_text (self, g_value_get_string (value));
		break;
		case GRAPHS_TEXT_ITEM_SIZE_PROPERTY:
		graphs_text_item_set_size (self, g_value_get_double (value));
		break;
		case GRAPHS_TEXT_ITEM_ROTATION_PROPERTY:
		graphs_text_item_set_rotation (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

GraphsFillItem*
graphs_fill_item_construct (GType object_type)
{
	GraphsFillItem * self = NULL;
	self = (GraphsFillItem*) graphs_item_construct (object_type);
	return self;
}

GraphsFillItem*
graphs_fill_item_new (void)
{
	return graphs_fill_item_construct (GRAPHS_TYPE_FILL_ITEM);
}

static GObject *
graphs_fill_item_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GraphsFillItem * self;
	parent_class = G_OBJECT_CLASS (graphs_fill_item_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_FILL_ITEM, GraphsFillItem);
	graphs_item_set_typename ((GraphsItem*) self, _ ("Fill"));
	return obj;
}

static void
graphs_fill_item_class_init (GraphsFillItemClass * klass,
                             gpointer klass_data)
{
	graphs_fill_item_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->constructor = graphs_fill_item_constructor;
}

static void
graphs_fill_item_instance_init (GraphsFillItem * self,
                                gpointer klass)
{
}

static GType
graphs_fill_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsFillItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_fill_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsFillItem), 0, (GInstanceInitFunc) graphs_fill_item_instance_init, NULL };
	GType graphs_fill_item_type_id;
	graphs_fill_item_type_id = g_type_register_static (GRAPHS_TYPE_ITEM, "GraphsFillItem", &g_define_type_info, 0);
	return graphs_fill_item_type_id;
}

GType
graphs_fill_item_get_type (void)
{
	static volatile gsize graphs_fill_item_type_id__once = 0;
	if (g_once_init_enter (&graphs_fill_item_type_id__once)) {
		GType graphs_fill_item_type_id;
		graphs_fill_item_type_id = graphs_fill_item_get_type_once ();
		g_once_init_leave (&graphs_fill_item_type_id__once, graphs_fill_item_type_id);
	}
	return graphs_fill_item_type_id__once;
}

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;
}

