From c4b2a0502018beb4f043d096bbfdabc9c305fe81 Mon Sep 17 00:00:00 2001 From: karthikmurakonda Date: Wed, 19 Oct 2022 16:55:48 +0530 Subject: [PATCH] added live-chart library --- iPDC/Makefile | 4 +- iPDC/lib/liblivechart_static.a.p/area.c | 409 ++++ iPDC/lib/liblivechart_static.a.p/axis.c | 1795 ++++++++++++++++ iPDC/lib/liblivechart_static.a.p/background.c | 559 +++++ iPDC/lib/liblivechart_static.a.p/bar.c | 329 +++ iPDC/lib/liblivechart_static.a.p/bezier.c | 534 +++++ iPDC/lib/liblivechart_static.a.p/bounds.c | 350 ++++ iPDC/lib/liblivechart_static.a.p/chart.c | 1103 ++++++++++ iPDC/lib/liblivechart_static.a.p/config.c | 1046 ++++++++++ iPDC/lib/liblivechart_static.a.p/drawable.c | 222 ++ iPDC/lib/liblivechart_static.a.p/font.c | 544 +++++ iPDC/lib/liblivechart_static.a.p/geometry.c | 213 ++ iPDC/lib/liblivechart_static.a.p/grid.c | 1286 ++++++++++++ .../liblivechart_static.a.p/intersections.c | 800 +++++++ .../liblivechart_static.a.p/intersectors.c | 726 +++++++ iPDC/lib/liblivechart_static.a.p/labels.c | 485 +++++ iPDC/lib/liblivechart_static.a.p/legend.c | 1051 ++++++++++ iPDC/lib/liblivechart_static.a.p/line.c | 375 ++++ iPDC/lib/liblivechart_static.a.p/line_area.c | 308 +++ .../liblivechart_static.a.p/max_bound_line.c | 249 +++ .../liblivechart_static.a.p/min_bound_line.c | 260 +++ iPDC/lib/liblivechart_static.a.p/path.c | 586 ++++++ iPDC/lib/liblivechart_static.a.p/points.c | 739 +++++++ iPDC/lib/liblivechart_static.a.p/region.c | 1158 +++++++++++ iPDC/lib/liblivechart_static.a.p/serie.c | 679 ++++++ .../liblivechart_static.a.p/serie_renderer.c | 549 +++++ iPDC/lib/liblivechart_static.a.p/series.c | 491 +++++ .../lib/liblivechart_static.a.p/smooth_line.c | 887 ++++++++ .../smooth_line_area.c | 564 +++++ .../static/static_chart.c | 672 ++++++ .../static/static_grid.c | 1270 ++++++++++++ .../static/static_line.c | 404 ++++ .../static/static_points.c | 821 ++++++++ .../static/static_serie.c | 619 ++++++ .../static/static_serie_renderer.c | 483 +++++ .../static/static_series.c | 415 ++++ .../static/static_values.c | 348 ++++ .../liblivechart_static.a.p/threshold_line.c | 303 +++ iPDC/lib/liblivechart_static.a.p/utils.c | 392 ++++ iPDC/lib/liblivechart_static.a.p/values.c | 341 +++ iPDC/lib/livechart.h | 1846 +++++++++++++++++ iPDC/lib/livechart.vapi | 507 +++++ iPDC/lib/livechart_static.h | 1846 +++++++++++++++++ iPDC/lib/livechart_static.vapi | 507 +++++ iPDC/src/map_vis.c | 3 +- 45 files changed, 29074 insertions(+), 4 deletions(-) create mode 100644 iPDC/lib/liblivechart_static.a.p/area.c create mode 100644 iPDC/lib/liblivechart_static.a.p/axis.c create mode 100644 iPDC/lib/liblivechart_static.a.p/background.c create mode 100644 iPDC/lib/liblivechart_static.a.p/bar.c create mode 100644 iPDC/lib/liblivechart_static.a.p/bezier.c create mode 100644 iPDC/lib/liblivechart_static.a.p/bounds.c create mode 100644 iPDC/lib/liblivechart_static.a.p/chart.c create mode 100644 iPDC/lib/liblivechart_static.a.p/config.c create mode 100644 iPDC/lib/liblivechart_static.a.p/drawable.c create mode 100644 iPDC/lib/liblivechart_static.a.p/font.c create mode 100644 iPDC/lib/liblivechart_static.a.p/geometry.c create mode 100644 iPDC/lib/liblivechart_static.a.p/grid.c create mode 100644 iPDC/lib/liblivechart_static.a.p/intersections.c create mode 100644 iPDC/lib/liblivechart_static.a.p/intersectors.c create mode 100644 iPDC/lib/liblivechart_static.a.p/labels.c create mode 100644 iPDC/lib/liblivechart_static.a.p/legend.c create mode 100644 iPDC/lib/liblivechart_static.a.p/line.c create mode 100644 iPDC/lib/liblivechart_static.a.p/line_area.c create mode 100644 iPDC/lib/liblivechart_static.a.p/max_bound_line.c create mode 100644 iPDC/lib/liblivechart_static.a.p/min_bound_line.c create mode 100644 iPDC/lib/liblivechart_static.a.p/path.c create mode 100644 iPDC/lib/liblivechart_static.a.p/points.c create mode 100644 iPDC/lib/liblivechart_static.a.p/region.c create mode 100644 iPDC/lib/liblivechart_static.a.p/serie.c create mode 100644 iPDC/lib/liblivechart_static.a.p/serie_renderer.c create mode 100644 iPDC/lib/liblivechart_static.a.p/series.c create mode 100644 iPDC/lib/liblivechart_static.a.p/smooth_line.c create mode 100644 iPDC/lib/liblivechart_static.a.p/smooth_line_area.c create mode 100644 iPDC/lib/liblivechart_static.a.p/static/static_chart.c create mode 100644 iPDC/lib/liblivechart_static.a.p/static/static_grid.c create mode 100644 iPDC/lib/liblivechart_static.a.p/static/static_line.c create mode 100644 iPDC/lib/liblivechart_static.a.p/static/static_points.c create mode 100644 iPDC/lib/liblivechart_static.a.p/static/static_serie.c create mode 100644 iPDC/lib/liblivechart_static.a.p/static/static_serie_renderer.c create mode 100644 iPDC/lib/liblivechart_static.a.p/static/static_series.c create mode 100644 iPDC/lib/liblivechart_static.a.p/static/static_values.c create mode 100644 iPDC/lib/liblivechart_static.a.p/threshold_line.c create mode 100644 iPDC/lib/liblivechart_static.a.p/utils.c create mode 100644 iPDC/lib/liblivechart_static.a.p/values.c create mode 100644 iPDC/lib/livechart.h create mode 100644 iPDC/lib/livechart.vapi create mode 100644 iPDC/lib/livechart_static.h create mode 100644 iPDC/lib/livechart_static.vapi diff --git a/iPDC/Makefile b/iPDC/Makefile index bcd0144..28810af 100755 --- a/iPDC/Makefile +++ b/iPDC/Makefile @@ -46,8 +46,8 @@ FILE6 = iPDC.desktop CC = gcc LIBS = -lpthread -LDLIBS=`pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0` -CFLAGS=-g -I./inc -fcommon `pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0` +LDLIBS=`pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0 gee-0.8` +CFLAGS=-g -I./inc -I./lib -fcommon `pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0 gee-0.8` PROGRAM = iPDC SOURCE_FILES = $(wildcard src/*.c) diff --git a/iPDC/lib/liblivechart_static.a.p/area.c b/iPDC/lib/liblivechart_static.a.p/area.c new file mode 100644 index 0000000..c3b2185 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/area.c @@ -0,0 +1,409 @@ +/* area.c generated by valac 0.56.0, the Vala compiler + * generated from area.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_AREA_0_PROPERTY, + LIVE_CHART_AREA_VISIBLE_PROPERTY, + LIVE_CHART_AREA_NUM_PROPERTIES +}; +static GParamSpec* live_chart_area_properties[LIVE_CHART_AREA_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +struct _LiveChartAreaPrivate { + LiveChartPoints* points; + GdkRGBA color; + LiveChartBoundingBox bounding_box; + gdouble alpha; + gboolean _visible; +}; + +static gint LiveChartArea_private_offset; +static gpointer live_chart_area_parent_class = NULL; +static LiveChartDrawableIface * live_chart_area_live_chart_drawable_parent_iface = NULL; + +static void live_chart_area_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_area_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static void live_chart_area_finalize (GObject * obj); +static GType live_chart_area_get_type_once (void); +static void _vala_live_chart_area_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_area_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +static inline gpointer +live_chart_area_get_instance_private (LiveChartArea* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartArea_private_offset); +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 17 "../src/area.vala" + return self ? g_object_ref (self) : NULL; +#line 61 "area.c" +} + +LiveChartArea* +live_chart_area_construct (GType object_type, + LiveChartPoints* points, + GdkRGBA* color, + gdouble alpha) +{ + LiveChartArea * self = NULL; + LiveChartPoints* _tmp0_; + GdkRGBA _tmp1_; +#line 16 "../src/area.vala" + g_return_val_if_fail (points != NULL, NULL); +#line 16 "../src/area.vala" + g_return_val_if_fail (color != NULL, NULL); +#line 16 "../src/area.vala" + self = (LiveChartArea*) g_object_new (object_type, NULL); +#line 17 "../src/area.vala" + _tmp0_ = _g_object_ref0 (points); +#line 17 "../src/area.vala" + _g_object_unref0 (self->priv->points); +#line 17 "../src/area.vala" + self->priv->points = _tmp0_; +#line 18 "../src/area.vala" + _tmp1_ = *color; +#line 18 "../src/area.vala" + self->priv->color = _tmp1_; +#line 19 "../src/area.vala" + self->priv->alpha = alpha; +#line 16 "../src/area.vala" + return self; +#line 93 "area.c" +} + +LiveChartArea* +live_chart_area_new (LiveChartPoints* points, + GdkRGBA* color, + gdouble alpha) +{ +#line 16 "../src/area.vala" + return live_chart_area_construct (LIVE_CHART_TYPE_AREA, points, color, alpha); +#line 103 "area.c" +} + +static void +live_chart_area_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartArea * self; + LiveChartPoints* _tmp0_; + gint _tmp1_; + gint _tmp2_; +#line 22 "../src/area.vala" + self = (LiveChartArea*) base; +#line 22 "../src/area.vala" + g_return_if_fail (ctx != NULL); +#line 22 "../src/area.vala" + g_return_if_fail (config != NULL); +#line 23 "../src/area.vala" + _tmp0_ = self->priv->points; +#line 23 "../src/area.vala" + _tmp1_ = live_chart_points_get_size (_tmp0_); +#line 23 "../src/area.vala" + _tmp2_ = _tmp1_; +#line 23 "../src/area.vala" + if (_tmp2_ > 0) { +#line 129 "area.c" + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp3_ = {0}; + LiveChartPoint first_point = {0}; + LiveChartPoints* _tmp4_; + LiveChartPoint _tmp5_ = {0}; + LiveChartPoint last_point = {0}; + LiveChartPoints* _tmp6_; + LiveChartPoint _tmp7_ = {0}; + GdkRGBA _tmp8_; + GdkRGBA _tmp9_; + GdkRGBA _tmp10_; + LiveChartPoint _tmp11_; + LiveChartPoint _tmp12_; + LiveChartPoint _tmp13_; + LiveChartBoundaries _tmp14_; + LiveChartBoundary _tmp15_; + LiveChartPoint _tmp16_; + LiveChartBoundaries _tmp17_; + LiveChartBoundary _tmp18_; + LiveChartPoint _tmp19_; + LiveChartPoint _tmp20_; +#line 24 "../src/area.vala" + live_chart_config_boundaries (config, &_tmp3_); +#line 24 "../src/area.vala" + boundaries = _tmp3_; +#line 25 "../src/area.vala" + _tmp4_ = self->priv->points; +#line 25 "../src/area.vala" + live_chart_points_first (_tmp4_, &_tmp5_); +#line 25 "../src/area.vala" + first_point = _tmp5_; +#line 26 "../src/area.vala" + _tmp6_ = self->priv->points; +#line 26 "../src/area.vala" + live_chart_points_last (_tmp6_, &_tmp7_); +#line 26 "../src/area.vala" + last_point = _tmp7_; +#line 28 "../src/area.vala" + _tmp8_ = self->priv->color; +#line 28 "../src/area.vala" + _tmp9_ = self->priv->color; +#line 28 "../src/area.vala" + _tmp10_ = self->priv->color; +#line 28 "../src/area.vala" + cairo_set_source_rgba (ctx, _tmp8_.red, _tmp9_.green, _tmp10_.blue, self->priv->alpha); +#line 29 "../src/area.vala" + _tmp11_ = last_point; +#line 29 "../src/area.vala" + _tmp12_ = last_point; +#line 29 "../src/area.vala" + cairo_line_to (ctx, _tmp11_.x, _tmp12_.y); +#line 30 "../src/area.vala" + _tmp13_ = last_point; +#line 30 "../src/area.vala" + _tmp14_ = boundaries; +#line 30 "../src/area.vala" + _tmp15_ = _tmp14_.y; +#line 30 "../src/area.vala" + cairo_line_to (ctx, _tmp13_.x, (gdouble) _tmp15_.max); +#line 31 "../src/area.vala" + _tmp16_ = first_point; +#line 31 "../src/area.vala" + _tmp17_ = boundaries; +#line 31 "../src/area.vala" + _tmp18_ = _tmp17_.y; +#line 31 "../src/area.vala" + cairo_line_to (ctx, _tmp16_.x, (gdouble) _tmp18_.max); +#line 32 "../src/area.vala" + _tmp19_ = first_point; +#line 32 "../src/area.vala" + _tmp20_ = first_point; +#line 32 "../src/area.vala" + cairo_line_to (ctx, _tmp19_.x, _tmp20_.y); +#line 33 "../src/area.vala" + cairo_close_path (ctx); +#line 205 "area.c" + } +} + +static void +live_chart_area_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartArea * self; + LiveChartBoundingBox _tmp0_; +#line 37 "../src/area.vala" + self = (LiveChartArea*) base; +#line 38 "../src/area.vala" + _tmp0_ = self->priv->bounding_box; +#line 38 "../src/area.vala" + *result = _tmp0_; +#line 38 "../src/area.vala" + return; +#line 223 "area.c" +} + +static gboolean +live_chart_area_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartArea* self; +#line 14 "../src/area.vala" + self = (LiveChartArea*) base; +#line 14 "../src/area.vala" + result = self->priv->_visible; +#line 14 "../src/area.vala" + return result; +#line 237 "area.c" +} + +static void +live_chart_area_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartArea* self; + gboolean old_value; +#line 14 "../src/area.vala" + self = (LiveChartArea*) base; +#line 14 "../src/area.vala" + old_value = live_chart_area_real_get_visible (base); +#line 14 "../src/area.vala" + if (old_value != value) { +#line 14 "../src/area.vala" + self->priv->_visible = value; +#line 14 "../src/area.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_area_properties[LIVE_CHART_AREA_VISIBLE_PROPERTY]); +#line 256 "area.c" + } +} + +static void +live_chart_area_class_init (LiveChartAreaClass * klass, + gpointer klass_data) +{ +#line 4 "../src/area.vala" + live_chart_area_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/area.vala" + g_type_class_adjust_private_offset (klass, &LiveChartArea_private_offset); +#line 4 "../src/area.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_area_get_property; +#line 4 "../src/area.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_area_set_property; +#line 4 "../src/area.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_area_finalize; +#line 4 "../src/area.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_AREA_VISIBLE_PROPERTY, live_chart_area_properties[LIVE_CHART_AREA_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 276 "area.c" +} + +static void +live_chart_area_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 4 "../src/area.vala" + live_chart_area_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 4 "../src/area.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_area_real_draw; +#line 4 "../src/area.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_area_real_get_bounding_box; +#line 4 "../src/area.vala" + iface->get_visible = live_chart_area_real_get_visible; +#line 4 "../src/area.vala" + iface->set_visible = live_chart_area_real_set_visible; +#line 293 "area.c" +} + +static void +live_chart_area_instance_init (LiveChartArea * self, + gpointer klass) +{ + LiveChartBoundingBox _tmp0_ = {0}; +#line 4 "../src/area.vala" + self->priv = live_chart_area_get_instance_private (self); +#line 7 "../src/area.vala" + memset (&_tmp0_, 0, sizeof (LiveChartBoundingBox)); +#line 7 "../src/area.vala" + _tmp0_.x = (gdouble) 0; +#line 7 "../src/area.vala" + _tmp0_.y = (gdouble) 0; +#line 7 "../src/area.vala" + _tmp0_.width = (gdouble) 0; +#line 7 "../src/area.vala" + _tmp0_.height = (gdouble) 0; +#line 7 "../src/area.vala" + self->priv->bounding_box = _tmp0_; +#line 13 "../src/area.vala" + self->priv->alpha = 0.3; +#line 14 "../src/area.vala" + self->priv->_visible = TRUE; +#line 319 "area.c" +} + +static void +live_chart_area_finalize (GObject * obj) +{ + LiveChartArea * self; +#line 4 "../src/area.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_AREA, LiveChartArea); +#line 5 "../src/area.vala" + _g_object_unref0 (self->priv->points); +#line 4 "../src/area.vala" + G_OBJECT_CLASS (live_chart_area_parent_class)->finalize (obj); +#line 332 "area.c" +} + +static GType +live_chart_area_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartAreaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_area_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartArea), 0, (GInstanceInitFunc) live_chart_area_instance_init, NULL }; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_area_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_area_type_id; + live_chart_area_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartArea", &g_define_type_info, 0); + g_type_add_interface_static (live_chart_area_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartArea_private_offset = g_type_add_instance_private (live_chart_area_type_id, sizeof (LiveChartAreaPrivate)); + return live_chart_area_type_id; +} + +GType +live_chart_area_get_type (void) +{ + static volatile gsize live_chart_area_type_id__once = 0; + if (g_once_init_enter (&live_chart_area_type_id__once)) { + GType live_chart_area_type_id; + live_chart_area_type_id = live_chart_area_get_type_once (); + g_once_init_leave (&live_chart_area_type_id__once, live_chart_area_type_id); + } + return live_chart_area_type_id__once; +} + +static void +_vala_live_chart_area_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartArea * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_AREA, LiveChartArea); +#line 4 "../src/area.vala" + switch (property_id) { +#line 4 "../src/area.vala" + case LIVE_CHART_AREA_VISIBLE_PROPERTY: +#line 4 "../src/area.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 4 "../src/area.vala" + break; +#line 375 "area.c" + default: +#line 4 "../src/area.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/area.vala" + break; +#line 381 "area.c" + } +} + +static void +_vala_live_chart_area_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartArea * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_AREA, LiveChartArea); +#line 4 "../src/area.vala" + switch (property_id) { +#line 4 "../src/area.vala" + case LIVE_CHART_AREA_VISIBLE_PROPERTY: +#line 4 "../src/area.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 4 "../src/area.vala" + break; +#line 401 "area.c" + default: +#line 4 "../src/area.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/area.vala" + break; +#line 407 "area.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/axis.c b/iPDC/lib/liblivechart_static.a.p/axis.c new file mode 100644 index 0000000..ca0c01c --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/axis.c @@ -0,0 +1,1795 @@ +/* axis.c generated by valac 0.56.0, the Vala compiler + * generated from axis.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _live_chart_labels_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_labels_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +typedef struct _LiveChartParamSpecXAxis LiveChartParamSpecXAxis; +#define _g_free0(var) (var = (g_free (var), NULL)) +typedef struct _LiveChartParamSpecYAxis LiveChartParamSpecYAxis; + +struct _LiveChartXAxisPrivate { + gfloat _tick_interval; + gfloat _tick_length; + gboolean _visible; +}; + +struct _LiveChartParamSpecXAxis { + GParamSpec parent_instance; +}; + +struct _LiveChartYAxisPrivate { + LiveChartBounds* bounds; + gdouble ratio; + gfloat _ratio_threshold; + gfloat _tick_interval; + gboolean _visible; + gfloat _tick_length; + gchar* _unit; +}; + +struct _LiveChartParamSpecYAxis { + GParamSpec parent_instance; +}; + +static gint LiveChartXAxis_private_offset; +static gpointer live_chart_xaxis_parent_class = NULL; +static gint LiveChartYAxis_private_offset; +static gpointer live_chart_yaxis_parent_class = NULL; + +static void live_chart_xaxis_finalize (LiveChartXAxis * obj); +static GType live_chart_xaxis_get_type_once (void); +static gfloat* _float_dup (gfloat* self); +static void __lambda5_ (LiveChartYAxis* self); +static void ___lambda5__g_object_notify (GObject* _sender, + GParamSpec* pspec, + gpointer self); +static void live_chart_yaxis_finalize (LiveChartYAxis * obj); +static GType live_chart_yaxis_get_type_once (void); + +static inline gpointer +live_chart_xaxis_get_instance_private (LiveChartXAxis* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartXAxis_private_offset); +} + +LiveChartXAxis* +live_chart_xaxis_construct (GType object_type) +{ + LiveChartXAxis* self = NULL; + LiveChartPath* _tmp0_; + GdkRGBA _tmp1_ = {0}; + LiveChartPath* _tmp2_; + GdkRGBA _tmp3_ = {0}; +#line 12 "../src/axis.vala" + self = (LiveChartXAxis*) g_type_create_instance (object_type); +#line 13 "../src/axis.vala" + _tmp0_ = self->axis; +#line 13 "../src/axis.vala" + _tmp1_.red = 0.5; +#line 13 "../src/axis.vala" + _tmp1_.green = 0.5; +#line 13 "../src/axis.vala" + _tmp1_.blue = 0.5; +#line 13 "../src/axis.vala" + _tmp1_.alpha = 0.5; +#line 13 "../src/axis.vala" + live_chart_path_set_color (_tmp0_, &_tmp1_); +#line 14 "../src/axis.vala" + _tmp2_ = self->lines; +#line 14 "../src/axis.vala" + _tmp3_.red = 0.5; +#line 14 "../src/axis.vala" + _tmp3_.green = 0.5; +#line 14 "../src/axis.vala" + _tmp3_.blue = 0.5; +#line 14 "../src/axis.vala" + _tmp3_.alpha = 0.2; +#line 14 "../src/axis.vala" + live_chart_path_set_color (_tmp2_, &_tmp3_); +#line 12 "../src/axis.vala" + return self; +#line 103 "axis.c" +} + +LiveChartXAxis* +live_chart_xaxis_new (void) +{ +#line 12 "../src/axis.vala" + return live_chart_xaxis_construct (LIVE_CHART_TYPE_XAXIS); +#line 111 "axis.c" +} + +gdouble +live_chart_xaxis_get_ratio (LiveChartXAxis* self) +{ + gfloat _tmp0_; + gfloat _tmp1_; + gdouble result; +#line 17 "../src/axis.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 18 "../src/axis.vala" + _tmp0_ = self->priv->_tick_length; +#line 18 "../src/axis.vala" + _tmp1_ = self->priv->_tick_interval; +#line 18 "../src/axis.vala" + result = (gdouble) (_tmp0_ / _tmp1_); +#line 18 "../src/axis.vala" + return result; +#line 130 "axis.c" +} + +gfloat +live_chart_xaxis_get_tick_interval (LiveChartXAxis* self) +{ + gfloat result; +#line 5 "../src/axis.vala" + g_return_val_if_fail (self != NULL, 0.0F); +#line 5 "../src/axis.vala" + result = self->priv->_tick_interval; +#line 5 "../src/axis.vala" + return result; +#line 143 "axis.c" +} + +void +live_chart_xaxis_set_tick_interval (LiveChartXAxis* self, + gfloat value) +{ +#line 5 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 5 "../src/axis.vala" + self->priv->_tick_interval = value; +#line 154 "axis.c" +} + +gfloat +live_chart_xaxis_get_tick_length (LiveChartXAxis* self) +{ + gfloat result; +#line 6 "../src/axis.vala" + g_return_val_if_fail (self != NULL, 0.0F); +#line 6 "../src/axis.vala" + result = self->priv->_tick_length; +#line 6 "../src/axis.vala" + return result; +#line 167 "axis.c" +} + +void +live_chart_xaxis_set_tick_length (LiveChartXAxis* self, + gfloat value) +{ +#line 6 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 6 "../src/axis.vala" + self->priv->_tick_length = value; +#line 178 "axis.c" +} + +gboolean +live_chart_xaxis_get_visible (LiveChartXAxis* self) +{ + gboolean result; +#line 7 "../src/axis.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 7 "../src/axis.vala" + result = self->priv->_visible; +#line 7 "../src/axis.vala" + return result; +#line 191 "axis.c" +} + +void +live_chart_xaxis_set_visible (LiveChartXAxis* self, + gboolean value) +{ +#line 7 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 7 "../src/axis.vala" + self->priv->_visible = value; +#line 202 "axis.c" +} + +static void +live_chart_value_xaxis_init (GValue* value) +{ +#line 3 "../src/axis.vala" + value->data[0].v_pointer = NULL; +#line 210 "axis.c" +} + +static void +live_chart_value_xaxis_free_value (GValue* value) +{ +#line 3 "../src/axis.vala" + if (value->data[0].v_pointer) { +#line 3 "../src/axis.vala" + live_chart_xaxis_unref (value->data[0].v_pointer); +#line 220 "axis.c" + } +} + +static void +live_chart_value_xaxis_copy_value (const GValue* src_value, + GValue* dest_value) +{ +#line 3 "../src/axis.vala" + if (src_value->data[0].v_pointer) { +#line 3 "../src/axis.vala" + dest_value->data[0].v_pointer = live_chart_xaxis_ref (src_value->data[0].v_pointer); +#line 232 "axis.c" + } else { +#line 3 "../src/axis.vala" + dest_value->data[0].v_pointer = NULL; +#line 236 "axis.c" + } +} + +static gpointer +live_chart_value_xaxis_peek_pointer (const GValue* value) +{ +#line 3 "../src/axis.vala" + return value->data[0].v_pointer; +#line 245 "axis.c" +} + +static gchar* +live_chart_value_xaxis_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ +#line 3 "../src/axis.vala" + if (collect_values[0].v_pointer) { +#line 256 "axis.c" + LiveChartXAxis * object; + object = collect_values[0].v_pointer; +#line 3 "../src/axis.vala" + if (object->parent_instance.g_class == NULL) { +#line 3 "../src/axis.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 263 "axis.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 3 "../src/axis.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 267 "axis.c" + } +#line 3 "../src/axis.vala" + value->data[0].v_pointer = live_chart_xaxis_ref (object); +#line 271 "axis.c" + } else { +#line 3 "../src/axis.vala" + value->data[0].v_pointer = NULL; +#line 275 "axis.c" + } +#line 3 "../src/axis.vala" + return NULL; +#line 279 "axis.c" +} + +static gchar* +live_chart_value_xaxis_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ + LiveChartXAxis ** object_p; + object_p = collect_values[0].v_pointer; +#line 3 "../src/axis.vala" + if (!object_p) { +#line 3 "../src/axis.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 294 "axis.c" + } +#line 3 "../src/axis.vala" + if (!value->data[0].v_pointer) { +#line 3 "../src/axis.vala" + *object_p = NULL; +#line 300 "axis.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 3 "../src/axis.vala" + *object_p = value->data[0].v_pointer; +#line 304 "axis.c" + } else { +#line 3 "../src/axis.vala" + *object_p = live_chart_xaxis_ref (value->data[0].v_pointer); +#line 308 "axis.c" + } +#line 3 "../src/axis.vala" + return NULL; +#line 312 "axis.c" +} + +GParamSpec* +live_chart_param_spec_xaxis (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ + LiveChartParamSpecXAxis* spec; +#line 3 "../src/axis.vala" + g_return_val_if_fail (g_type_is_a (object_type, LIVE_CHART_TYPE_XAXIS), NULL); +#line 3 "../src/axis.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 3 "../src/axis.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 3 "../src/axis.vala" + return G_PARAM_SPEC (spec); +#line 331 "axis.c" +} + +gpointer +live_chart_value_get_xaxis (const GValue* value) +{ +#line 3 "../src/axis.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_XAXIS), NULL); +#line 3 "../src/axis.vala" + return value->data[0].v_pointer; +#line 341 "axis.c" +} + +void +live_chart_value_set_xaxis (GValue* value, + gpointer v_object) +{ + LiveChartXAxis * old; +#line 3 "../src/axis.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_XAXIS)); +#line 3 "../src/axis.vala" + old = value->data[0].v_pointer; +#line 3 "../src/axis.vala" + if (v_object) { +#line 3 "../src/axis.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_XAXIS)); +#line 3 "../src/axis.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 3 "../src/axis.vala" + value->data[0].v_pointer = v_object; +#line 3 "../src/axis.vala" + live_chart_xaxis_ref (value->data[0].v_pointer); +#line 363 "axis.c" + } else { +#line 3 "../src/axis.vala" + value->data[0].v_pointer = NULL; +#line 367 "axis.c" + } +#line 3 "../src/axis.vala" + if (old) { +#line 3 "../src/axis.vala" + live_chart_xaxis_unref (old); +#line 373 "axis.c" + } +} + +void +live_chart_value_take_xaxis (GValue* value, + gpointer v_object) +{ + LiveChartXAxis * old; +#line 3 "../src/axis.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_XAXIS)); +#line 3 "../src/axis.vala" + old = value->data[0].v_pointer; +#line 3 "../src/axis.vala" + if (v_object) { +#line 3 "../src/axis.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_XAXIS)); +#line 3 "../src/axis.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 3 "../src/axis.vala" + value->data[0].v_pointer = v_object; +#line 394 "axis.c" + } else { +#line 3 "../src/axis.vala" + value->data[0].v_pointer = NULL; +#line 398 "axis.c" + } +#line 3 "../src/axis.vala" + if (old) { +#line 3 "../src/axis.vala" + live_chart_xaxis_unref (old); +#line 404 "axis.c" + } +} + +static void +live_chart_xaxis_class_init (LiveChartXAxisClass * klass, + gpointer klass_data) +{ +#line 3 "../src/axis.vala" + live_chart_xaxis_parent_class = g_type_class_peek_parent (klass); +#line 3 "../src/axis.vala" + ((LiveChartXAxisClass *) klass)->finalize = live_chart_xaxis_finalize; +#line 3 "../src/axis.vala" + g_type_class_adjust_private_offset (klass, &LiveChartXAxis_private_offset); +#line 418 "axis.c" +} + +static void +live_chart_xaxis_instance_init (LiveChartXAxis * self, + gpointer klass) +{ + LiveChartLabels* _tmp0_; + GdkRGBA _tmp1_ = {0}; + LiveChartPath* _tmp2_; + GdkRGBA _tmp3_ = {0}; + LiveChartPath* _tmp4_; +#line 3 "../src/axis.vala" + self->priv = live_chart_xaxis_get_instance_private (self); +#line 5 "../src/axis.vala" + self->priv->_tick_interval = (gfloat) 10; +#line 6 "../src/axis.vala" + self->priv->_tick_length = (gfloat) 60; +#line 7 "../src/axis.vala" + self->priv->_visible = TRUE; +#line 8 "../src/axis.vala" + _tmp0_ = live_chart_labels_new (); +#line 8 "../src/axis.vala" + self->labels = _tmp0_; +#line 9 "../src/axis.vala" + _tmp1_.red = 1.0; +#line 9 "../src/axis.vala" + _tmp1_.green = 1.0; +#line 9 "../src/axis.vala" + _tmp1_.blue = 1.0; +#line 9 "../src/axis.vala" + _tmp1_.alpha = 1.0; +#line 9 "../src/axis.vala" + _tmp2_ = live_chart_path_new (0.5, &_tmp1_, TRUE, NULL); +#line 9 "../src/axis.vala" + self->axis = _tmp2_; +#line 10 "../src/axis.vala" + _tmp3_.red = 1.0; +#line 10 "../src/axis.vala" + _tmp3_.green = 1.0; +#line 10 "../src/axis.vala" + _tmp3_.blue = 1.0; +#line 10 "../src/axis.vala" + _tmp3_.alpha = 1.0; +#line 10 "../src/axis.vala" + _tmp4_ = live_chart_path_new (0.5, &_tmp3_, TRUE, NULL); +#line 10 "../src/axis.vala" + self->lines = _tmp4_; +#line 3 "../src/axis.vala" + self->ref_count = 1; +#line 468 "axis.c" +} + +static void +live_chart_xaxis_finalize (LiveChartXAxis * obj) +{ + LiveChartXAxis * self; +#line 3 "../src/axis.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_XAXIS, LiveChartXAxis); +#line 3 "../src/axis.vala" + g_signal_handlers_destroy (self); +#line 8 "../src/axis.vala" + _live_chart_labels_unref0 (self->labels); +#line 9 "../src/axis.vala" + _g_object_unref0 (self->axis); +#line 10 "../src/axis.vala" + _g_object_unref0 (self->lines); +#line 485 "axis.c" +} + +static GType +live_chart_xaxis_get_type_once (void) +{ + static const GTypeValueTable g_define_type_value_table = { live_chart_value_xaxis_init, live_chart_value_xaxis_free_value, live_chart_value_xaxis_copy_value, live_chart_value_xaxis_peek_pointer, "p", live_chart_value_xaxis_collect_value, "p", live_chart_value_xaxis_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (LiveChartXAxisClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_xaxis_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartXAxis), 0, (GInstanceInitFunc) live_chart_xaxis_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType live_chart_xaxis_type_id; + live_chart_xaxis_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LiveChartXAxis", &g_define_type_info, &g_define_type_fundamental_info, 0); + LiveChartXAxis_private_offset = g_type_add_instance_private (live_chart_xaxis_type_id, sizeof (LiveChartXAxisPrivate)); + return live_chart_xaxis_type_id; +} + +GType +live_chart_xaxis_get_type (void) +{ + static volatile gsize live_chart_xaxis_type_id__once = 0; + if (g_once_init_enter (&live_chart_xaxis_type_id__once)) { + GType live_chart_xaxis_type_id; + live_chart_xaxis_type_id = live_chart_xaxis_get_type_once (); + g_once_init_leave (&live_chart_xaxis_type_id__once, live_chart_xaxis_type_id); + } + return live_chart_xaxis_type_id__once; +} + +gpointer +live_chart_xaxis_ref (gpointer instance) +{ + LiveChartXAxis * self; + self = instance; +#line 3 "../src/axis.vala" + g_atomic_int_inc (&self->ref_count); +#line 3 "../src/axis.vala" + return instance; +#line 521 "axis.c" +} + +void +live_chart_xaxis_unref (gpointer instance) +{ + LiveChartXAxis * self; + self = instance; +#line 3 "../src/axis.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 3 "../src/axis.vala" + LIVE_CHART_XAXIS_GET_CLASS (self)->finalize (self); +#line 3 "../src/axis.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 535 "axis.c" + } +} + +static gfloat* +_float_dup (gfloat* self) +{ + gfloat* dup; +#line 25 "../src/axis.vala" + dup = g_new0 (gfloat, 1); +#line 25 "../src/axis.vala" + memcpy (dup, self, sizeof (gfloat)); +#line 25 "../src/axis.vala" + return dup; +#line 549 "axis.c" +} + +void +live_chart_ticks_init (LiveChartTicks *self) +{ + GeeArrayList* _tmp0_; +#line 24 "../src/axis.vala" + memset (self, 0, sizeof (LiveChartTicks)); +#line 25 "../src/axis.vala" + _tmp0_ = gee_array_list_new (G_TYPE_FLOAT, (GBoxedCopyFunc) _float_dup, (GDestroyNotify) g_free, NULL, NULL, NULL); +#line 25 "../src/axis.vala" + _g_object_unref0 ((*self).values); +#line 25 "../src/axis.vala" + (*self).values = (GeeList*) _tmp0_; +#line 564 "axis.c" +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 22 "../src/axis.vala" + return self ? g_object_ref (self) : NULL; +#line 572 "axis.c" +} + +void +live_chart_ticks_copy (const LiveChartTicks* self, + LiveChartTicks* dest) +{ + GeeList* _tmp0_; + GeeList* _tmp1_; +#line 22 "../src/axis.vala" + _tmp0_ = (*self).values; +#line 22 "../src/axis.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 22 "../src/axis.vala" + _g_object_unref0 ((*dest).values); +#line 22 "../src/axis.vala" + (*dest).values = _tmp1_; +#line 589 "axis.c" +} + +void +live_chart_ticks_destroy (LiveChartTicks* self) +{ +#line 23 "../src/axis.vala" + _g_object_unref0 ((*self).values); +#line 597 "axis.c" +} + +LiveChartTicks* +live_chart_ticks_dup (const LiveChartTicks* self) +{ + LiveChartTicks* dup; +#line 22 "../src/axis.vala" + dup = g_new0 (LiveChartTicks, 1); +#line 22 "../src/axis.vala" + live_chart_ticks_copy (self, dup); +#line 22 "../src/axis.vala" + return dup; +#line 610 "axis.c" +} + +void +live_chart_ticks_free (LiveChartTicks* self) +{ +#line 22 "../src/axis.vala" + live_chart_ticks_destroy (self); +#line 22 "../src/axis.vala" + g_free (self); +#line 620 "axis.c" +} + +static GType +live_chart_ticks_get_type_once (void) +{ + GType live_chart_ticks_type_id; + live_chart_ticks_type_id = g_boxed_type_register_static ("LiveChartTicks", (GBoxedCopyFunc) live_chart_ticks_dup, (GBoxedFreeFunc) live_chart_ticks_free); + return live_chart_ticks_type_id; +} + +GType +live_chart_ticks_get_type (void) +{ + static volatile gsize live_chart_ticks_type_id__once = 0; + if (g_once_init_enter (&live_chart_ticks_type_id__once)) { + GType live_chart_ticks_type_id; + live_chart_ticks_type_id = live_chart_ticks_get_type_once (); + g_once_init_leave (&live_chart_ticks_type_id__once, live_chart_ticks_type_id); + } + return live_chart_ticks_type_id__once; +} + +static inline gpointer +live_chart_yaxis_get_instance_private (LiveChartYAxis* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartYAxis_private_offset); +} + +static void +__lambda5_ (LiveChartYAxis* self) +{ + LiveChartTicks _tmp0_ = {0}; +#line 57 "../src/axis.vala" + live_chart_yaxis_get_ticks (self, &_tmp0_); +#line 57 "../src/axis.vala" + live_chart_ticks_destroy (&self->ticks); +#line 57 "../src/axis.vala" + self->ticks = _tmp0_; +#line 659 "axis.c" +} + +static void +___lambda5__g_object_notify (GObject* _sender, + GParamSpec* pspec, + gpointer self) +{ +#line 56 "../src/axis.vala" + __lambda5_ ((LiveChartYAxis*) self); +#line 669 "axis.c" +} + +LiveChartYAxis* +live_chart_yaxis_construct (GType object_type, + const gchar* unit) +{ + LiveChartYAxis* self = NULL; + LiveChartTicks _tmp0_ = {0}; + LiveChartPath* _tmp1_; + GdkRGBA _tmp2_ = {0}; + LiveChartPath* _tmp3_; + GdkRGBA _tmp4_ = {0}; + LiveChartBounds* _tmp5_; +#line 51 "../src/axis.vala" + g_return_val_if_fail (unit != NULL, NULL); +#line 51 "../src/axis.vala" + self = (LiveChartYAxis*) g_type_create_instance (object_type); +#line 52 "../src/axis.vala" + live_chart_yaxis_set_unit (self, unit); +#line 53 "../src/axis.vala" + live_chart_yaxis_get_ticks (self, &_tmp0_); +#line 53 "../src/axis.vala" + live_chart_ticks_destroy (&self->ticks); +#line 53 "../src/axis.vala" + self->ticks = _tmp0_; +#line 54 "../src/axis.vala" + _tmp1_ = self->axis; +#line 54 "../src/axis.vala" + _tmp2_.red = 0.5; +#line 54 "../src/axis.vala" + _tmp2_.green = 0.5; +#line 54 "../src/axis.vala" + _tmp2_.blue = 0.5; +#line 54 "../src/axis.vala" + _tmp2_.alpha = 0.5; +#line 54 "../src/axis.vala" + live_chart_path_set_color (_tmp1_, &_tmp2_); +#line 55 "../src/axis.vala" + _tmp3_ = self->lines; +#line 55 "../src/axis.vala" + _tmp4_.red = 0.5; +#line 55 "../src/axis.vala" + _tmp4_.green = 0.5; +#line 55 "../src/axis.vala" + _tmp4_.blue = 0.5; +#line 55 "../src/axis.vala" + _tmp4_.alpha = 0.2; +#line 55 "../src/axis.vala" + live_chart_path_set_color (_tmp3_, &_tmp4_); +#line 56 "../src/axis.vala" + _tmp5_ = self->priv->bounds; +#line 56 "../src/axis.vala" + g_signal_connect ((GObject*) _tmp5_, "notify::upper", (GCallback) ___lambda5__g_object_notify, self); +#line 51 "../src/axis.vala" + return self; +#line 725 "axis.c" +} + +LiveChartYAxis* +live_chart_yaxis_new (const gchar* unit) +{ +#line 51 "../src/axis.vala" + return live_chart_yaxis_construct (LIVE_CHART_TYPE_YAXIS, unit); +#line 733 "axis.c" +} + +gdouble +live_chart_yaxis_get_ratio (LiveChartYAxis* self) +{ + gdouble result; +#line 61 "../src/axis.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 62 "../src/axis.vala" + result = self->priv->ratio; +#line 62 "../src/axis.vala" + return result; +#line 746 "axis.c" +} + +LiveChartBounds* +live_chart_yaxis_get_bounds (LiveChartYAxis* self) +{ + LiveChartBounds* _tmp0_; + gdouble _tmp1_; + gdouble _tmp2_; + LiveChartBounds* _tmp3_; + gdouble _tmp4_; + gdouble _tmp5_; + LiveChartBounds* _tmp6_; + LiveChartBounds* result; +#line 65 "../src/axis.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 66 "../src/axis.vala" + _tmp0_ = self->priv->bounds; +#line 66 "../src/axis.vala" + _tmp1_ = live_chart_bounds_get_lower (_tmp0_); +#line 66 "../src/axis.vala" + _tmp2_ = _tmp1_; +#line 66 "../src/axis.vala" + _tmp3_ = self->priv->bounds; +#line 66 "../src/axis.vala" + _tmp4_ = live_chart_bounds_get_upper (_tmp3_); +#line 66 "../src/axis.vala" + _tmp5_ = _tmp4_; +#line 66 "../src/axis.vala" + _tmp6_ = live_chart_bounds_new (_tmp2_, _tmp5_); +#line 66 "../src/axis.vala" + result = _tmp6_; +#line 66 "../src/axis.vala" + return result; +#line 780 "axis.c" +} + +gboolean +live_chart_yaxis_update_bounds (LiveChartYAxis* self, + gdouble value) +{ + LiveChartBounds* _tmp0_; + gboolean result; +#line 69 "../src/axis.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 70 "../src/axis.vala" + _tmp0_ = self->priv->bounds; +#line 70 "../src/axis.vala" + result = live_chart_bounds_update (_tmp0_, value); +#line 70 "../src/axis.vala" + return result; +#line 797 "axis.c" +} + +void +live_chart_yaxis_update (LiveChartYAxis* self, + gint area_height) +{ + gboolean _tmp0_ = FALSE; + LiveChartBounds* _tmp1_; + gdouble* _tmp7_; +#line 73 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 74 "../src/axis.vala" + _tmp1_ = self->priv->bounds; +#line 74 "../src/axis.vala" + if (live_chart_bounds_has_upper (_tmp1_)) { +#line 813 "axis.c" + gdouble* _tmp2_; +#line 74 "../src/axis.vala" + _tmp2_ = self->fixed_max; +#line 74 "../src/axis.vala" + _tmp0_ = _tmp2_ == NULL; +#line 819 "axis.c" + } else { +#line 74 "../src/axis.vala" + _tmp0_ = FALSE; +#line 823 "axis.c" + } +#line 74 "../src/axis.vala" + if (_tmp0_) { +#line 827 "axis.c" + LiveChartBounds* _tmp3_; + gdouble _tmp4_; + gdouble _tmp5_; + gfloat _tmp6_; +#line 75 "../src/axis.vala" + _tmp3_ = self->priv->bounds; +#line 75 "../src/axis.vala" + _tmp4_ = live_chart_bounds_get_upper (_tmp3_); +#line 75 "../src/axis.vala" + _tmp5_ = _tmp4_; +#line 75 "../src/axis.vala" + _tmp6_ = self->priv->_ratio_threshold; +#line 75 "../src/axis.vala" + self->priv->ratio = ((gdouble) area_height) / (((gdouble) _tmp5_) * _tmp6_); +#line 842 "axis.c" + } +#line 78 "../src/axis.vala" + _tmp7_ = self->fixed_max; +#line 78 "../src/axis.vala" + if (_tmp7_ != NULL) { +#line 848 "axis.c" + gdouble* _tmp8_; +#line 79 "../src/axis.vala" + _tmp8_ = self->fixed_max; +#line 79 "../src/axis.vala" + self->priv->ratio = ((gdouble) area_height) / ((gdouble) (*_tmp8_)); +#line 854 "axis.c" + } +} + +gchar* +live_chart_yaxis_get_max_displayed_value (LiveChartYAxis* self) +{ + LiveChartTicks _tmp0_; + GeeList* _tmp1_; + gint _tmp2_; + gint _tmp3_; + const gchar* _tmp32_; + gchar* _tmp33_; + gchar* result; +#line 83 "../src/axis.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 84 "../src/axis.vala" + _tmp0_ = self->ticks; +#line 84 "../src/axis.vala" + _tmp1_ = _tmp0_.values; +#line 84 "../src/axis.vala" + _tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_); +#line 84 "../src/axis.vala" + _tmp3_ = _tmp2_; +#line 84 "../src/axis.vala" + if (_tmp3_ > 0) { +#line 880 "axis.c" + gchar* max_displayed_value = NULL; + const gchar* _tmp4_; + LiveChartTicks _tmp5_; + GeeList* _tmp6_; + gpointer _tmp7_; + gfloat* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; +#line 85 "../src/axis.vala" + _tmp4_ = self->priv->_unit; +#line 85 "../src/axis.vala" + _tmp5_ = self->ticks; +#line 85 "../src/axis.vala" + _tmp6_ = _tmp5_.values; +#line 85 "../src/axis.vala" + _tmp7_ = gee_list_first (_tmp6_); +#line 85 "../src/axis.vala" + _tmp8_ = (gfloat*) _tmp7_; +#line 85 "../src/axis.vala" + _tmp9_ = live_chart_format_for_y_axis (_tmp4_, *_tmp8_); +#line 85 "../src/axis.vala" + _tmp10_ = _tmp9_; +#line 85 "../src/axis.vala" + _g_free0 (_tmp8_); +#line 85 "../src/axis.vala" + max_displayed_value = _tmp10_; +#line 907 "axis.c" + { + GeeList* _value_list = NULL; + LiveChartTicks _tmp11_; + GeeList* _tmp12_; + gint _value_size = 0; + GeeList* _tmp13_; + gint _tmp14_; + gint _tmp15_; + gint _value_index = 0; +#line 86 "../src/axis.vala" + _tmp11_ = self->ticks; +#line 86 "../src/axis.vala" + _tmp12_ = _tmp11_.values; +#line 86 "../src/axis.vala" + _value_list = _tmp12_; +#line 86 "../src/axis.vala" + _tmp13_ = _value_list; +#line 86 "../src/axis.vala" + _tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_); +#line 86 "../src/axis.vala" + _tmp15_ = _tmp14_; +#line 86 "../src/axis.vala" + _value_size = _tmp15_; +#line 86 "../src/axis.vala" + _value_index = -1; +#line 86 "../src/axis.vala" + while (TRUE) { +#line 935 "axis.c" + gint _tmp16_; + gint _tmp17_; + gfloat value = 0.0F; + GeeList* _tmp18_; + gpointer _tmp19_; + gfloat* _tmp20_; + gfloat _tmp21_; + gchar* formatted_value = NULL; + const gchar* _tmp22_; + gchar* _tmp23_; + const gchar* _tmp24_; + gint _tmp25_; + gint _tmp26_; + const gchar* _tmp27_; + gint _tmp28_; + gint _tmp29_; +#line 86 "../src/axis.vala" + _value_index = _value_index + 1; +#line 86 "../src/axis.vala" + _tmp16_ = _value_index; +#line 86 "../src/axis.vala" + _tmp17_ = _value_size; +#line 86 "../src/axis.vala" + if (!(_tmp16_ < _tmp17_)) { +#line 86 "../src/axis.vala" + break; +#line 962 "axis.c" + } +#line 86 "../src/axis.vala" + _tmp18_ = _value_list; +#line 86 "../src/axis.vala" + _tmp19_ = gee_list_get (_tmp18_, _value_index); +#line 86 "../src/axis.vala" + _tmp20_ = (gfloat*) _tmp19_; +#line 86 "../src/axis.vala" + _tmp21_ = *_tmp20_; +#line 86 "../src/axis.vala" + _g_free0 (_tmp20_); +#line 86 "../src/axis.vala" + value = _tmp21_; +#line 87 "../src/axis.vala" + _tmp22_ = self->priv->_unit; +#line 87 "../src/axis.vala" + _tmp23_ = live_chart_format_for_y_axis (_tmp22_, value); +#line 87 "../src/axis.vala" + formatted_value = _tmp23_; +#line 88 "../src/axis.vala" + _tmp24_ = formatted_value; +#line 88 "../src/axis.vala" + _tmp25_ = strlen (_tmp24_); +#line 88 "../src/axis.vala" + _tmp26_ = _tmp25_; +#line 88 "../src/axis.vala" + _tmp27_ = max_displayed_value; +#line 88 "../src/axis.vala" + _tmp28_ = strlen (_tmp27_); +#line 88 "../src/axis.vala" + _tmp29_ = _tmp28_; +#line 88 "../src/axis.vala" + if (_tmp26_ >= _tmp29_) { +#line 996 "axis.c" + const gchar* _tmp30_; + gchar* _tmp31_; +#line 89 "../src/axis.vala" + _tmp30_ = formatted_value; +#line 89 "../src/axis.vala" + _tmp31_ = g_strdup (_tmp30_); +#line 89 "../src/axis.vala" + _g_free0 (max_displayed_value); +#line 89 "../src/axis.vala" + max_displayed_value = _tmp31_; +#line 1007 "axis.c" + } +#line 86 "../src/axis.vala" + _g_free0 (formatted_value); +#line 1011 "axis.c" + } + } +#line 92 "../src/axis.vala" + result = max_displayed_value; +#line 92 "../src/axis.vala" + return result; +#line 1018 "axis.c" + } +#line 95 "../src/axis.vala" + _tmp32_ = self->priv->_unit; +#line 95 "../src/axis.vala" + _tmp33_ = g_strdup (_tmp32_); +#line 95 "../src/axis.vala" + result = _tmp33_; +#line 95 "../src/axis.vala" + return result; +#line 1028 "axis.c" +} + +void +live_chart_yaxis_get_ticks (LiveChartYAxis* self, + LiveChartTicks* result) +{ + LiveChartTicks ticks = {0}; + gdouble* _tmp0_; + LiveChartBounds* _tmp6_; +#line 98 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 99 "../src/axis.vala" + live_chart_ticks_init (&ticks); +#line 100 "../src/axis.vala" + _tmp0_ = self->fixed_max; +#line 100 "../src/axis.vala" + if (_tmp0_ != NULL) { +#line 1046 "axis.c" + { + gfloat value = 0.0F; +#line 101 "../src/axis.vala" + value = 0.f; +#line 1051 "axis.c" + { + gboolean _tmp1_ = FALSE; +#line 101 "../src/axis.vala" + _tmp1_ = TRUE; +#line 101 "../src/axis.vala" + while (TRUE) { +#line 1058 "axis.c" + gdouble* _tmp3_; + LiveChartTicks _tmp4_; + GeeList* _tmp5_; +#line 101 "../src/axis.vala" + if (!_tmp1_) { +#line 1064 "axis.c" + gfloat _tmp2_; +#line 101 "../src/axis.vala" + _tmp2_ = self->priv->_tick_interval; +#line 101 "../src/axis.vala" + value += _tmp2_; +#line 1070 "axis.c" + } +#line 101 "../src/axis.vala" + _tmp1_ = FALSE; +#line 101 "../src/axis.vala" + _tmp3_ = self->fixed_max; +#line 101 "../src/axis.vala" + if (!(((gdouble) value) <= (*_tmp3_))) { +#line 101 "../src/axis.vala" + break; +#line 1080 "axis.c" + } +#line 102 "../src/axis.vala" + _tmp4_ = ticks; +#line 102 "../src/axis.vala" + _tmp5_ = _tmp4_.values; +#line 102 "../src/axis.vala" + gee_collection_add ((GeeCollection*) _tmp5_, &value); +#line 1088 "axis.c" + } + } + } +#line 105 "../src/axis.vala" + *result = ticks; +#line 105 "../src/axis.vala" + return; +#line 1096 "axis.c" + } +#line 107 "../src/axis.vala" + _tmp6_ = self->priv->bounds; +#line 107 "../src/axis.vala" + if (live_chart_bounds_has_upper (_tmp6_)) { +#line 1102 "axis.c" + gfloat upper = 0.0F; + LiveChartBounds* _tmp7_; + gdouble _tmp8_; + gdouble _tmp9_; + GeeList* divs = NULL; + GeeList* _tmp10_; + GeeList* _tmp11_; + gint _tmp12_; + gint _tmp13_; +#line 108 "../src/axis.vala" + _tmp7_ = self->priv->bounds; +#line 108 "../src/axis.vala" + _tmp8_ = live_chart_bounds_get_upper (_tmp7_); +#line 108 "../src/axis.vala" + _tmp9_ = _tmp8_; +#line 108 "../src/axis.vala" + upper = live_chart_cap ((gfloat) _tmp9_); +#line 109 "../src/axis.vala" + _tmp10_ = live_chart_golden_divisors (upper); +#line 109 "../src/axis.vala" + divs = _tmp10_; +#line 111 "../src/axis.vala" + _tmp11_ = divs; +#line 111 "../src/axis.vala" + _tmp12_ = gee_collection_get_size ((GeeCollection*) _tmp11_); +#line 111 "../src/axis.vala" + _tmp13_ = _tmp12_; +#line 111 "../src/axis.vala" + if (_tmp13_ > 0) { +#line 1132 "axis.c" + gfloat interval = 0.0F; + GeeList* _tmp14_; + gpointer _tmp15_; + gfloat* _tmp16_; + gfloat _tmp17_; + gdouble _tmp29_ = 0.0; + LiveChartBounds* _tmp30_; + gdouble _tmp31_; + gdouble _tmp32_; + gdouble limit = 0.0; +#line 112 "../src/axis.vala" + _tmp14_ = divs; +#line 112 "../src/axis.vala" + _tmp15_ = gee_list_get (_tmp14_, 0); +#line 112 "../src/axis.vala" + _tmp16_ = (gfloat*) _tmp15_; +#line 112 "../src/axis.vala" + _tmp17_ = upper / (*_tmp16_); +#line 112 "../src/axis.vala" + _g_free0 (_tmp16_); +#line 112 "../src/axis.vala" + interval = _tmp17_; +#line 1155 "axis.c" + { + GeeList* _div_list = NULL; + GeeList* _tmp18_; + gint _div_size = 0; + GeeList* _tmp19_; + gint _tmp20_; + gint _tmp21_; + gint _div_index = 0; +#line 113 "../src/axis.vala" + _tmp18_ = divs; +#line 113 "../src/axis.vala" + _div_list = _tmp18_; +#line 113 "../src/axis.vala" + _tmp19_ = _div_list; +#line 113 "../src/axis.vala" + _tmp20_ = gee_collection_get_size ((GeeCollection*) _tmp19_); +#line 113 "../src/axis.vala" + _tmp21_ = _tmp20_; +#line 113 "../src/axis.vala" + _div_size = _tmp21_; +#line 113 "../src/axis.vala" + _div_index = -1; +#line 113 "../src/axis.vala" + while (TRUE) { +#line 1180 "axis.c" + gint _tmp22_; + gint _tmp23_; + gfloat div = 0.0F; + GeeList* _tmp24_; + gpointer _tmp25_; + gfloat* _tmp26_; + gfloat _tmp27_; + gboolean _tmp28_ = FALSE; +#line 113 "../src/axis.vala" + _div_index = _div_index + 1; +#line 113 "../src/axis.vala" + _tmp22_ = _div_index; +#line 113 "../src/axis.vala" + _tmp23_ = _div_size; +#line 113 "../src/axis.vala" + if (!(_tmp22_ < _tmp23_)) { +#line 113 "../src/axis.vala" + break; +#line 1199 "axis.c" + } +#line 113 "../src/axis.vala" + _tmp24_ = _div_list; +#line 113 "../src/axis.vala" + _tmp25_ = gee_list_get (_tmp24_, _div_index); +#line 113 "../src/axis.vala" + _tmp26_ = (gfloat*) _tmp25_; +#line 113 "../src/axis.vala" + _tmp27_ = *_tmp26_; +#line 113 "../src/axis.vala" + _g_free0 (_tmp26_); +#line 113 "../src/axis.vala" + div = _tmp27_; +#line 114 "../src/axis.vala" + interval = upper / div; +#line 115 "../src/axis.vala" + if (div > 3.f) { +#line 115 "../src/axis.vala" + _tmp28_ = div < 7.f; +#line 1219 "axis.c" + } else { +#line 115 "../src/axis.vala" + _tmp28_ = FALSE; +#line 1223 "axis.c" + } +#line 115 "../src/axis.vala" + if (_tmp28_) { +#line 116 "../src/axis.vala" + break; +#line 1229 "axis.c" + } + } + } +#line 119 "../src/axis.vala" + _tmp30_ = self->priv->bounds; +#line 119 "../src/axis.vala" + _tmp31_ = live_chart_bounds_get_upper (_tmp30_); +#line 119 "../src/axis.vala" + _tmp32_ = _tmp31_; +#line 119 "../src/axis.vala" + if (_tmp32_ == ((gdouble) upper)) { +#line 119 "../src/axis.vala" + _tmp29_ = (gdouble) upper; +#line 1243 "axis.c" + } else { + LiveChartBounds* _tmp33_; + gdouble _tmp34_; + gdouble _tmp35_; +#line 119 "../src/axis.vala" + _tmp33_ = self->priv->bounds; +#line 119 "../src/axis.vala" + _tmp34_ = live_chart_bounds_get_upper (_tmp33_); +#line 119 "../src/axis.vala" + _tmp35_ = _tmp34_; +#line 119 "../src/axis.vala" + _tmp29_ = _tmp35_ + interval; +#line 1256 "axis.c" + } +#line 119 "../src/axis.vala" + limit = _tmp29_; +#line 1260 "axis.c" + { + gfloat value = 0.0F; +#line 120 "../src/axis.vala" + value = 0.f; +#line 1265 "axis.c" + { + gboolean _tmp36_ = FALSE; +#line 120 "../src/axis.vala" + _tmp36_ = TRUE; +#line 120 "../src/axis.vala" + while (TRUE) { +#line 1272 "axis.c" + LiveChartTicks _tmp37_; + GeeList* _tmp38_; +#line 120 "../src/axis.vala" + if (!_tmp36_) { +#line 120 "../src/axis.vala" + value += interval; +#line 1279 "axis.c" + } +#line 120 "../src/axis.vala" + _tmp36_ = FALSE; +#line 120 "../src/axis.vala" + if (!(((gdouble) value) <= limit)) { +#line 120 "../src/axis.vala" + break; +#line 1287 "axis.c" + } +#line 121 "../src/axis.vala" + _tmp37_ = ticks; +#line 121 "../src/axis.vala" + _tmp38_ = _tmp37_.values; +#line 121 "../src/axis.vala" + gee_collection_add ((GeeCollection*) _tmp38_, &value); +#line 1295 "axis.c" + } + } + } + } +#line 107 "../src/axis.vala" + _g_object_unref0 (divs); +#line 1302 "axis.c" + } +#line 126 "../src/axis.vala" + *result = ticks; +#line 126 "../src/axis.vala" + return; +#line 1308 "axis.c" +} + +gfloat +live_chart_yaxis_get_ratio_threshold (LiveChartYAxis* self) +{ + gfloat result; +#line 33 "../src/axis.vala" + g_return_val_if_fail (self != NULL, 0.0F); +#line 33 "../src/axis.vala" + result = self->priv->_ratio_threshold; +#line 33 "../src/axis.vala" + return result; +#line 1321 "axis.c" +} + +void +live_chart_yaxis_set_ratio_threshold (LiveChartYAxis* self, + gfloat value) +{ +#line 33 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 33 "../src/axis.vala" + self->priv->_ratio_threshold = value; +#line 1332 "axis.c" +} + +gfloat +live_chart_yaxis_get_tick_interval (LiveChartYAxis* self) +{ + gfloat result; +#line 34 "../src/axis.vala" + g_return_val_if_fail (self != NULL, 0.0F); +#line 34 "../src/axis.vala" + result = self->priv->_tick_interval; +#line 34 "../src/axis.vala" + return result; +#line 1345 "axis.c" +} + +void +live_chart_yaxis_set_tick_interval (LiveChartYAxis* self, + gfloat value) +{ +#line 34 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 34 "../src/axis.vala" + self->priv->_tick_interval = value; +#line 1356 "axis.c" +} + +gboolean +live_chart_yaxis_get_visible (LiveChartYAxis* self) +{ + gboolean result; +#line 35 "../src/axis.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 35 "../src/axis.vala" + result = self->priv->_visible; +#line 35 "../src/axis.vala" + return result; +#line 1369 "axis.c" +} + +void +live_chart_yaxis_set_visible (LiveChartYAxis* self, + gboolean value) +{ +#line 35 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 35 "../src/axis.vala" + self->priv->_visible = value; +#line 1380 "axis.c" +} + +gfloat +live_chart_yaxis_get_tick_length (LiveChartYAxis* self) +{ + gfloat result; +#line 42 "../src/axis.vala" + g_return_val_if_fail (self != NULL, 0.0F); +#line 42 "../src/axis.vala" + result = self->priv->_tick_length; +#line 42 "../src/axis.vala" + return result; +#line 1393 "axis.c" +} + +void +live_chart_yaxis_set_tick_length (LiveChartYAxis* self, + gfloat value) +{ +#line 42 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 42 "../src/axis.vala" + self->priv->_tick_length = value; +#line 1404 "axis.c" +} + +const gchar* +live_chart_yaxis_get_unit (LiveChartYAxis* self) +{ + const gchar* result; + const gchar* _tmp0_; +#line 43 "../src/axis.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 43 "../src/axis.vala" + _tmp0_ = self->priv->_unit; +#line 43 "../src/axis.vala" + result = _tmp0_; +#line 43 "../src/axis.vala" + return result; +#line 1420 "axis.c" +} + +void +live_chart_yaxis_set_unit (LiveChartYAxis* self, + const gchar* value) +{ + gchar* _tmp0_; +#line 43 "../src/axis.vala" + g_return_if_fail (self != NULL); +#line 43 "../src/axis.vala" + _tmp0_ = g_strdup (value); +#line 43 "../src/axis.vala" + _g_free0 (self->priv->_unit); +#line 43 "../src/axis.vala" + self->priv->_unit = _tmp0_; +#line 1436 "axis.c" +} + +static void +live_chart_value_yaxis_init (GValue* value) +{ +#line 29 "../src/axis.vala" + value->data[0].v_pointer = NULL; +#line 1444 "axis.c" +} + +static void +live_chart_value_yaxis_free_value (GValue* value) +{ +#line 29 "../src/axis.vala" + if (value->data[0].v_pointer) { +#line 29 "../src/axis.vala" + live_chart_yaxis_unref (value->data[0].v_pointer); +#line 1454 "axis.c" + } +} + +static void +live_chart_value_yaxis_copy_value (const GValue* src_value, + GValue* dest_value) +{ +#line 29 "../src/axis.vala" + if (src_value->data[0].v_pointer) { +#line 29 "../src/axis.vala" + dest_value->data[0].v_pointer = live_chart_yaxis_ref (src_value->data[0].v_pointer); +#line 1466 "axis.c" + } else { +#line 29 "../src/axis.vala" + dest_value->data[0].v_pointer = NULL; +#line 1470 "axis.c" + } +} + +static gpointer +live_chart_value_yaxis_peek_pointer (const GValue* value) +{ +#line 29 "../src/axis.vala" + return value->data[0].v_pointer; +#line 1479 "axis.c" +} + +static gchar* +live_chart_value_yaxis_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ +#line 29 "../src/axis.vala" + if (collect_values[0].v_pointer) { +#line 1490 "axis.c" + LiveChartYAxis * object; + object = collect_values[0].v_pointer; +#line 29 "../src/axis.vala" + if (object->parent_instance.g_class == NULL) { +#line 29 "../src/axis.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1497 "axis.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 29 "../src/axis.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 1501 "axis.c" + } +#line 29 "../src/axis.vala" + value->data[0].v_pointer = live_chart_yaxis_ref (object); +#line 1505 "axis.c" + } else { +#line 29 "../src/axis.vala" + value->data[0].v_pointer = NULL; +#line 1509 "axis.c" + } +#line 29 "../src/axis.vala" + return NULL; +#line 1513 "axis.c" +} + +static gchar* +live_chart_value_yaxis_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ + LiveChartYAxis ** object_p; + object_p = collect_values[0].v_pointer; +#line 29 "../src/axis.vala" + if (!object_p) { +#line 29 "../src/axis.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 1528 "axis.c" + } +#line 29 "../src/axis.vala" + if (!value->data[0].v_pointer) { +#line 29 "../src/axis.vala" + *object_p = NULL; +#line 1534 "axis.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 29 "../src/axis.vala" + *object_p = value->data[0].v_pointer; +#line 1538 "axis.c" + } else { +#line 29 "../src/axis.vala" + *object_p = live_chart_yaxis_ref (value->data[0].v_pointer); +#line 1542 "axis.c" + } +#line 29 "../src/axis.vala" + return NULL; +#line 1546 "axis.c" +} + +GParamSpec* +live_chart_param_spec_yaxis (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ + LiveChartParamSpecYAxis* spec; +#line 29 "../src/axis.vala" + g_return_val_if_fail (g_type_is_a (object_type, LIVE_CHART_TYPE_YAXIS), NULL); +#line 29 "../src/axis.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 29 "../src/axis.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 29 "../src/axis.vala" + return G_PARAM_SPEC (spec); +#line 1565 "axis.c" +} + +gpointer +live_chart_value_get_yaxis (const GValue* value) +{ +#line 29 "../src/axis.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_YAXIS), NULL); +#line 29 "../src/axis.vala" + return value->data[0].v_pointer; +#line 1575 "axis.c" +} + +void +live_chart_value_set_yaxis (GValue* value, + gpointer v_object) +{ + LiveChartYAxis * old; +#line 29 "../src/axis.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_YAXIS)); +#line 29 "../src/axis.vala" + old = value->data[0].v_pointer; +#line 29 "../src/axis.vala" + if (v_object) { +#line 29 "../src/axis.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_YAXIS)); +#line 29 "../src/axis.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 29 "../src/axis.vala" + value->data[0].v_pointer = v_object; +#line 29 "../src/axis.vala" + live_chart_yaxis_ref (value->data[0].v_pointer); +#line 1597 "axis.c" + } else { +#line 29 "../src/axis.vala" + value->data[0].v_pointer = NULL; +#line 1601 "axis.c" + } +#line 29 "../src/axis.vala" + if (old) { +#line 29 "../src/axis.vala" + live_chart_yaxis_unref (old); +#line 1607 "axis.c" + } +} + +void +live_chart_value_take_yaxis (GValue* value, + gpointer v_object) +{ + LiveChartYAxis * old; +#line 29 "../src/axis.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_YAXIS)); +#line 29 "../src/axis.vala" + old = value->data[0].v_pointer; +#line 29 "../src/axis.vala" + if (v_object) { +#line 29 "../src/axis.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_YAXIS)); +#line 29 "../src/axis.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 29 "../src/axis.vala" + value->data[0].v_pointer = v_object; +#line 1628 "axis.c" + } else { +#line 29 "../src/axis.vala" + value->data[0].v_pointer = NULL; +#line 1632 "axis.c" + } +#line 29 "../src/axis.vala" + if (old) { +#line 29 "../src/axis.vala" + live_chart_yaxis_unref (old); +#line 1638 "axis.c" + } +} + +static void +live_chart_yaxis_class_init (LiveChartYAxisClass * klass, + gpointer klass_data) +{ +#line 29 "../src/axis.vala" + live_chart_yaxis_parent_class = g_type_class_peek_parent (klass); +#line 29 "../src/axis.vala" + ((LiveChartYAxisClass *) klass)->finalize = live_chart_yaxis_finalize; +#line 29 "../src/axis.vala" + g_type_class_adjust_private_offset (klass, &LiveChartYAxis_private_offset); +#line 1652 "axis.c" +} + +static void +live_chart_yaxis_instance_init (LiveChartYAxis * self, + gpointer klass) +{ + LiveChartBounds* _tmp0_; + LiveChartLabels* _tmp1_; + GdkRGBA _tmp2_ = {0}; + LiveChartPath* _tmp3_; + GdkRGBA _tmp4_ = {0}; + LiveChartPath* _tmp5_; + gchar* _tmp6_; +#line 29 "../src/axis.vala" + self->priv = live_chart_yaxis_get_instance_private (self); +#line 30 "../src/axis.vala" + _tmp0_ = live_chart_bounds_new (((double) NAN), ((double) NAN)); +#line 30 "../src/axis.vala" + self->priv->bounds = _tmp0_; +#line 31 "../src/axis.vala" + self->priv->ratio = (gdouble) 1; +#line 33 "../src/axis.vala" + self->priv->_ratio_threshold = 1.118f; +#line 34 "../src/axis.vala" + self->priv->_tick_interval = (gfloat) 60; +#line 35 "../src/axis.vala" + self->priv->_visible = TRUE; +#line 37 "../src/axis.vala" + _tmp1_ = live_chart_labels_new (); +#line 37 "../src/axis.vala" + self->labels = _tmp1_; +#line 38 "../src/axis.vala" + _tmp2_.red = 1.0; +#line 38 "../src/axis.vala" + _tmp2_.green = 1.0; +#line 38 "../src/axis.vala" + _tmp2_.blue = 1.0; +#line 38 "../src/axis.vala" + _tmp2_.alpha = 1.0; +#line 38 "../src/axis.vala" + _tmp3_ = live_chart_path_new (0.5, &_tmp2_, TRUE, NULL); +#line 38 "../src/axis.vala" + self->axis = _tmp3_; +#line 39 "../src/axis.vala" + _tmp4_.red = 1.0; +#line 39 "../src/axis.vala" + _tmp4_.green = 1.0; +#line 39 "../src/axis.vala" + _tmp4_.blue = 1.0; +#line 39 "../src/axis.vala" + _tmp4_.alpha = 1.0; +#line 39 "../src/axis.vala" + _tmp5_ = live_chart_path_new (0.5, &_tmp4_, TRUE, NULL); +#line 39 "../src/axis.vala" + self->lines = _tmp5_; +#line 42 "../src/axis.vala" + self->priv->_tick_length = (gfloat) 60; +#line 43 "../src/axis.vala" + _tmp6_ = g_strdup (""); +#line 43 "../src/axis.vala" + self->priv->_unit = _tmp6_; +#line 46 "../src/axis.vala" + self->smart_ratio = FALSE; +#line 29 "../src/axis.vala" + self->ref_count = 1; +#line 1718 "axis.c" +} + +static void +live_chart_yaxis_finalize (LiveChartYAxis * obj) +{ + LiveChartYAxis * self; +#line 29 "../src/axis.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_YAXIS, LiveChartYAxis); +#line 29 "../src/axis.vala" + g_signal_handlers_destroy (self); +#line 30 "../src/axis.vala" + _g_object_unref0 (self->priv->bounds); +#line 37 "../src/axis.vala" + _live_chart_labels_unref0 (self->labels); +#line 38 "../src/axis.vala" + _g_object_unref0 (self->axis); +#line 39 "../src/axis.vala" + _g_object_unref0 (self->lines); +#line 43 "../src/axis.vala" + _g_free0 (self->priv->_unit); +#line 48 "../src/axis.vala" + _g_free0 (self->fixed_max); +#line 49 "../src/axis.vala" + live_chart_ticks_destroy (&self->ticks); +#line 1743 "axis.c" +} + +static GType +live_chart_yaxis_get_type_once (void) +{ + static const GTypeValueTable g_define_type_value_table = { live_chart_value_yaxis_init, live_chart_value_yaxis_free_value, live_chart_value_yaxis_copy_value, live_chart_value_yaxis_peek_pointer, "p", live_chart_value_yaxis_collect_value, "p", live_chart_value_yaxis_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (LiveChartYAxisClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_yaxis_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartYAxis), 0, (GInstanceInitFunc) live_chart_yaxis_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType live_chart_yaxis_type_id; + live_chart_yaxis_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LiveChartYAxis", &g_define_type_info, &g_define_type_fundamental_info, 0); + LiveChartYAxis_private_offset = g_type_add_instance_private (live_chart_yaxis_type_id, sizeof (LiveChartYAxisPrivate)); + return live_chart_yaxis_type_id; +} + +GType +live_chart_yaxis_get_type (void) +{ + static volatile gsize live_chart_yaxis_type_id__once = 0; + if (g_once_init_enter (&live_chart_yaxis_type_id__once)) { + GType live_chart_yaxis_type_id; + live_chart_yaxis_type_id = live_chart_yaxis_get_type_once (); + g_once_init_leave (&live_chart_yaxis_type_id__once, live_chart_yaxis_type_id); + } + return live_chart_yaxis_type_id__once; +} + +gpointer +live_chart_yaxis_ref (gpointer instance) +{ + LiveChartYAxis * self; + self = instance; +#line 29 "../src/axis.vala" + g_atomic_int_inc (&self->ref_count); +#line 29 "../src/axis.vala" + return instance; +#line 1779 "axis.c" +} + +void +live_chart_yaxis_unref (gpointer instance) +{ + LiveChartYAxis * self; + self = instance; +#line 29 "../src/axis.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 29 "../src/axis.vala" + LIVE_CHART_YAXIS_GET_CLASS (self)->finalize (self); +#line 29 "../src/axis.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1793 "axis.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/background.c b/iPDC/lib/liblivechart_static.a.p/background.c new file mode 100644 index 0000000..6f2df92 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/background.c @@ -0,0 +1,559 @@ +/* background.c generated by valac 0.56.0, the Vala compiler + * generated from background.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_BACKGROUND_0_PROPERTY, + LIVE_CHART_BACKGROUND_VISIBLE_PROPERTY, + LIVE_CHART_BACKGROUND_COLOR_PROPERTY, + LIVE_CHART_BACKGROUND_MAIN_COLOR_PROPERTY, + LIVE_CHART_BACKGROUND_NUM_PROPERTIES +}; +static GParamSpec* live_chart_background_properties[LIVE_CHART_BACKGROUND_NUM_PROPERTIES]; + +struct _LiveChartBackgroundPrivate { + LiveChartBoundingBox bounding_box; + gboolean _visible; + GdkRGBA _main_color; +}; + +static gint LiveChartBackground_private_offset; +static gpointer live_chart_background_parent_class = NULL; +static LiveChartDrawableIface * live_chart_background_live_chart_drawable_parent_iface = NULL; + +static void live_chart_background_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_background_update_bounding_box (LiveChartBackground* self, + LiveChartConfig* config); +static void live_chart_background_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static gboolean _gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2); +static void live_chart_background_finalize (GObject * obj); +static GType live_chart_background_get_type_once (void); +static void _vala_live_chart_background_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_background_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +static inline gpointer +live_chart_background_get_instance_private (LiveChartBackground* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartBackground_private_offset); +} + +static void +live_chart_background_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartBackground * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 33 "../src/background.vala" + self = (LiveChartBackground*) base; +#line 33 "../src/background.vala" + g_return_if_fail (ctx != NULL); +#line 33 "../src/background.vala" + g_return_if_fail (config != NULL); +#line 34 "../src/background.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 34 "../src/background.vala" + _tmp1_ = _tmp0_; +#line 34 "../src/background.vala" + if (_tmp1_) { +#line 79 "background.c" + gint _tmp2_; + gint _tmp3_; + gint _tmp4_; + gint _tmp5_; + GdkRGBA _tmp6_ = {0}; + GdkRGBA _tmp7_; + GdkRGBA _tmp8_ = {0}; + GdkRGBA _tmp9_; + GdkRGBA _tmp10_ = {0}; + GdkRGBA _tmp11_; + GdkRGBA _tmp12_ = {0}; + GdkRGBA _tmp13_; +#line 35 "../src/background.vala" + live_chart_background_update_bounding_box (self, config); +#line 36 "../src/background.vala" + _tmp2_ = live_chart_config_get_width (config); +#line 36 "../src/background.vala" + _tmp3_ = _tmp2_; +#line 36 "../src/background.vala" + _tmp4_ = live_chart_config_get_height (config); +#line 36 "../src/background.vala" + _tmp5_ = _tmp4_; +#line 36 "../src/background.vala" + cairo_rectangle (ctx, (gdouble) 0, (gdouble) 0, (gdouble) _tmp3_, (gdouble) _tmp5_); +#line 37 "../src/background.vala" + live_chart_background_get_color (self, &_tmp6_); +#line 37 "../src/background.vala" + _tmp7_ = _tmp6_; +#line 37 "../src/background.vala" + live_chart_background_get_color (self, &_tmp8_); +#line 37 "../src/background.vala" + _tmp9_ = _tmp8_; +#line 37 "../src/background.vala" + live_chart_background_get_color (self, &_tmp10_); +#line 37 "../src/background.vala" + _tmp11_ = _tmp10_; +#line 37 "../src/background.vala" + live_chart_background_get_color (self, &_tmp12_); +#line 37 "../src/background.vala" + _tmp13_ = _tmp12_; +#line 37 "../src/background.vala" + cairo_set_source_rgba (ctx, _tmp7_.red, _tmp9_.green, _tmp11_.blue, _tmp13_.alpha); +#line 38 "../src/background.vala" + cairo_fill (ctx); +#line 124 "background.c" + } +} + +static void +live_chart_background_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartBackground * self; + LiveChartBoundingBox _tmp0_; +#line 42 "../src/background.vala" + self = (LiveChartBackground*) base; +#line 43 "../src/background.vala" + _tmp0_ = self->priv->bounding_box; +#line 43 "../src/background.vala" + *result = _tmp0_; +#line 43 "../src/background.vala" + return; +#line 142 "background.c" +} + +static void +live_chart_background_update_bounding_box (LiveChartBackground* self, + LiveChartConfig* config) +{ + gint _tmp0_; + gint _tmp1_; + gint _tmp2_; + gint _tmp3_; + LiveChartBoundingBox _tmp4_ = {0}; +#line 46 "../src/background.vala" + g_return_if_fail (self != NULL); +#line 46 "../src/background.vala" + g_return_if_fail (config != NULL); +#line 47 "../src/background.vala" + _tmp0_ = live_chart_config_get_width (config); +#line 47 "../src/background.vala" + _tmp1_ = _tmp0_; +#line 47 "../src/background.vala" + _tmp2_ = live_chart_config_get_height (config); +#line 47 "../src/background.vala" + _tmp3_ = _tmp2_; +#line 47 "../src/background.vala" + memset (&_tmp4_, 0, sizeof (LiveChartBoundingBox)); +#line 47 "../src/background.vala" + _tmp4_.x = (gdouble) 0; +#line 47 "../src/background.vala" + _tmp4_.y = (gdouble) 0; +#line 47 "../src/background.vala" + _tmp4_.width = (gdouble) _tmp1_; +#line 47 "../src/background.vala" + _tmp4_.height = (gdouble) _tmp3_; +#line 47 "../src/background.vala" + self->priv->bounding_box = _tmp4_; +#line 178 "background.c" +} + +LiveChartBackground* +live_chart_background_construct (GType object_type) +{ + LiveChartBackground * self = NULL; +#line 4 "../src/background.vala" + self = (LiveChartBackground*) g_object_new (object_type, NULL); +#line 4 "../src/background.vala" + return self; +#line 189 "background.c" +} + +LiveChartBackground* +live_chart_background_new (void) +{ +#line 4 "../src/background.vala" + return live_chart_background_construct (LIVE_CHART_TYPE_BACKGROUND); +#line 197 "background.c" +} + +static gboolean +live_chart_background_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartBackground* self; +#line 12 "../src/background.vala" + self = (LiveChartBackground*) base; +#line 12 "../src/background.vala" + result = self->priv->_visible; +#line 12 "../src/background.vala" + return result; +#line 211 "background.c" +} + +static void +live_chart_background_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartBackground* self; + gboolean old_value; +#line 12 "../src/background.vala" + self = (LiveChartBackground*) base; +#line 12 "../src/background.vala" + old_value = live_chart_background_real_get_visible (base); +#line 12 "../src/background.vala" + if (old_value != value) { +#line 12 "../src/background.vala" + self->priv->_visible = value; +#line 12 "../src/background.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_background_properties[LIVE_CHART_BACKGROUND_VISIBLE_PROPERTY]); +#line 230 "background.c" + } +} + +void +live_chart_background_get_color (LiveChartBackground* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 15 "../src/background.vala" + g_return_if_fail (self != NULL); +#line 16 "../src/background.vala" + _tmp0_ = self->priv->_main_color; +#line 16 "../src/background.vala" + *result = _tmp0_; +#line 16 "../src/background.vala" + return; +#line 247 "background.c" +} + +void +live_chart_background_set_color (LiveChartBackground* self, + GdkRGBA * value) +{ + GdkRGBA _tmp0_; +#line 18 "../src/background.vala" + g_return_if_fail (self != NULL); +#line 19 "../src/background.vala" + _tmp0_ = *value; +#line 19 "../src/background.vala" + live_chart_background_set_main_color (self, &_tmp0_); +#line 18 "../src/background.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_background_properties[LIVE_CHART_BACKGROUND_COLOR_PROPERTY]); +#line 263 "background.c" +} + +void +live_chart_background_get_main_color (LiveChartBackground* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 25 "../src/background.vala" + g_return_if_fail (self != NULL); +#line 25 "../src/background.vala" + _tmp0_ = self->priv->_main_color; +#line 25 "../src/background.vala" + *result = _tmp0_; +#line 25 "../src/background.vala" + return; +#line 279 "background.c" +} + +static gboolean +_gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2) +{ +#line 25 "../src/background.vala" + if (s1 == s2) { +#line 25 "../src/background.vala" + return TRUE; +#line 290 "background.c" + } +#line 25 "../src/background.vala" + if (s1 == NULL) { +#line 25 "../src/background.vala" + return FALSE; +#line 296 "background.c" + } +#line 25 "../src/background.vala" + if (s2 == NULL) { +#line 25 "../src/background.vala" + return FALSE; +#line 302 "background.c" + } +#line 25 "../src/background.vala" + if (s1->red != s2->red) { +#line 25 "../src/background.vala" + return FALSE; +#line 308 "background.c" + } +#line 25 "../src/background.vala" + if (s1->green != s2->green) { +#line 25 "../src/background.vala" + return FALSE; +#line 314 "background.c" + } +#line 25 "../src/background.vala" + if (s1->blue != s2->blue) { +#line 25 "../src/background.vala" + return FALSE; +#line 320 "background.c" + } +#line 25 "../src/background.vala" + if (s1->alpha != s2->alpha) { +#line 25 "../src/background.vala" + return FALSE; +#line 326 "background.c" + } +#line 25 "../src/background.vala" + return TRUE; +#line 330 "background.c" +} + +void +live_chart_background_set_main_color (LiveChartBackground* self, + GdkRGBA * value) +{ + GdkRGBA old_value; +#line 25 "../src/background.vala" + g_return_if_fail (self != NULL); +#line 25 "../src/background.vala" + live_chart_background_get_main_color (self, &old_value); +#line 25 "../src/background.vala" + if (_gdk_rgba_equal (value, &old_value) != TRUE) { +#line 344 "background.c" + GdkRGBA _tmp0_; +#line 25 "../src/background.vala" + _tmp0_ = *value; +#line 25 "../src/background.vala" + self->priv->_main_color = _tmp0_; +#line 25 "../src/background.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_background_properties[LIVE_CHART_BACKGROUND_MAIN_COLOR_PROPERTY]); +#line 352 "background.c" + } +} + +static void +live_chart_background_class_init (LiveChartBackgroundClass * klass, + gpointer klass_data) +{ +#line 4 "../src/background.vala" + live_chart_background_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/background.vala" + g_type_class_adjust_private_offset (klass, &LiveChartBackground_private_offset); +#line 4 "../src/background.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_background_get_property; +#line 4 "../src/background.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_background_set_property; +#line 4 "../src/background.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_background_finalize; +#line 4 "../src/background.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_BACKGROUND_VISIBLE_PROPERTY, live_chart_background_properties[LIVE_CHART_BACKGROUND_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 4 "../src/background.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_BACKGROUND_COLOR_PROPERTY, live_chart_background_properties[LIVE_CHART_BACKGROUND_COLOR_PROPERTY] = g_param_spec_boxed ("color", "color", "color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 4 "../src/background.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_BACKGROUND_MAIN_COLOR_PROPERTY, live_chart_background_properties[LIVE_CHART_BACKGROUND_MAIN_COLOR_PROPERTY] = g_param_spec_boxed ("main-color", "main-color", "main-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_DEPRECATED)); +#line 376 "background.c" +} + +static void +live_chart_background_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 4 "../src/background.vala" + live_chart_background_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 4 "../src/background.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_background_real_draw; +#line 4 "../src/background.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_background_real_get_bounding_box; +#line 4 "../src/background.vala" + iface->get_visible = live_chart_background_real_get_visible; +#line 4 "../src/background.vala" + iface->set_visible = live_chart_background_real_set_visible; +#line 393 "background.c" +} + +static void +live_chart_background_instance_init (LiveChartBackground * self, + gpointer klass) +{ + LiveChartBoundingBox _tmp0_ = {0}; + GdkRGBA _tmp1_ = {0}; +#line 4 "../src/background.vala" + self->priv = live_chart_background_get_instance_private (self); +#line 5 "../src/background.vala" + memset (&_tmp0_, 0, sizeof (LiveChartBoundingBox)); +#line 5 "../src/background.vala" + _tmp0_.x = (gdouble) 0; +#line 5 "../src/background.vala" + _tmp0_.y = (gdouble) 0; +#line 5 "../src/background.vala" + _tmp0_.width = (gdouble) 0; +#line 5 "../src/background.vala" + _tmp0_.height = (gdouble) 0; +#line 5 "../src/background.vala" + self->priv->bounding_box = _tmp0_; +#line 12 "../src/background.vala" + self->priv->_visible = TRUE; +#line 24 "../src/background.vala" + memset (&_tmp1_, 0, sizeof (GdkRGBA)); +#line 24 "../src/background.vala" + _tmp1_.red = 0.1; +#line 24 "../src/background.vala" + _tmp1_.green = 0.1; +#line 24 "../src/background.vala" + _tmp1_.blue = 0.1; +#line 24 "../src/background.vala" + _tmp1_.alpha = 1.0; +#line 24 "../src/background.vala" + self->priv->_main_color = _tmp1_; +#line 430 "background.c" +} + +static void +live_chart_background_finalize (GObject * obj) +{ + LiveChartBackground * self; +#line 4 "../src/background.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_BACKGROUND, LiveChartBackground); +#line 4 "../src/background.vala" + G_OBJECT_CLASS (live_chart_background_parent_class)->finalize (obj); +#line 441 "background.c" +} + +static GType +live_chart_background_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartBackgroundClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_background_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartBackground), 0, (GInstanceInitFunc) live_chart_background_instance_init, NULL }; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_background_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_background_type_id; + live_chart_background_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartBackground", &g_define_type_info, 0); + g_type_add_interface_static (live_chart_background_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartBackground_private_offset = g_type_add_instance_private (live_chart_background_type_id, sizeof (LiveChartBackgroundPrivate)); + return live_chart_background_type_id; +} + +GType +live_chart_background_get_type (void) +{ + static volatile gsize live_chart_background_type_id__once = 0; + if (g_once_init_enter (&live_chart_background_type_id__once)) { + GType live_chart_background_type_id; + live_chart_background_type_id = live_chart_background_get_type_once (); + g_once_init_leave (&live_chart_background_type_id__once, live_chart_background_type_id); + } + return live_chart_background_type_id__once; +} + +static void +_vala_live_chart_background_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartBackground * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_BACKGROUND, LiveChartBackground); +#line 4 "../src/background.vala" + switch (property_id) { +#line 4 "../src/background.vala" + case LIVE_CHART_BACKGROUND_VISIBLE_PROPERTY: +#line 4 "../src/background.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 4 "../src/background.vala" + break; +#line 4 "../src/background.vala" + case LIVE_CHART_BACKGROUND_COLOR_PROPERTY: +#line 486 "background.c" + { + GdkRGBA boxed; +#line 4 "../src/background.vala" + live_chart_background_get_color (self, &boxed); +#line 4 "../src/background.vala" + g_value_set_boxed (value, &boxed); +#line 493 "background.c" + } +#line 4 "../src/background.vala" + break; +#line 4 "../src/background.vala" + case LIVE_CHART_BACKGROUND_MAIN_COLOR_PROPERTY: +#line 499 "background.c" + { + GdkRGBA boxed; +#line 4 "../src/background.vala" + live_chart_background_get_main_color (self, &boxed); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#line 505 "background.c" + g_value_set_boxed (value, &boxed); +G_GNUC_END_IGNORE_DEPRECATIONS + } +#line 4 "../src/background.vala" + break; +#line 511 "background.c" + default: +#line 4 "../src/background.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/background.vala" + break; +#line 517 "background.c" + } +} + +static void +_vala_live_chart_background_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartBackground * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_BACKGROUND, LiveChartBackground); +#line 4 "../src/background.vala" + switch (property_id) { +#line 4 "../src/background.vala" + case LIVE_CHART_BACKGROUND_VISIBLE_PROPERTY: +#line 4 "../src/background.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 4 "../src/background.vala" + break; +#line 4 "../src/background.vala" + case LIVE_CHART_BACKGROUND_COLOR_PROPERTY: +#line 4 "../src/background.vala" + live_chart_background_set_color (self, g_value_get_boxed (value)); +#line 4 "../src/background.vala" + break; +#line 4 "../src/background.vala" + case LIVE_CHART_BACKGROUND_MAIN_COLOR_PROPERTY: +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#line 546 "background.c" + live_chart_background_set_main_color (self, g_value_get_boxed (value)); +G_GNUC_END_IGNORE_DEPRECATIONS +#line 4 "../src/background.vala" + break; +#line 551 "background.c" + default: +#line 4 "../src/background.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/background.vala" + break; +#line 557 "background.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/bar.c b/iPDC/lib/liblivechart_static.a.p/bar.c new file mode 100644 index 0000000..57eeb48 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/bar.c @@ -0,0 +1,329 @@ +/* bar.c generated by valac 0.56.0, the Vala compiler + * generated from bar.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_BAR_0_PROPERTY, + LIVE_CHART_BAR_NUM_PROPERTIES +}; +static GParamSpec* live_chart_bar_properties[LIVE_CHART_BAR_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +static gpointer live_chart_bar_parent_class = NULL; + +static void live_chart_bar_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_bar_update_bounding_box (LiveChartBar* self, + LiveChartPoints* points, + LiveChartConfig* config); +static GType live_chart_bar_get_type_once (void); + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 7 "../src/bar.vala" + return self ? g_object_ref (self) : NULL; +#line 34 "bar.c" +} + +LiveChartBar* +live_chart_bar_construct (GType object_type, + LiveChartValues* values) +{ + LiveChartBar * self = NULL; + LiveChartValues* _tmp0_; +#line 5 "../src/bar.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 6 "../src/bar.vala" + self = (LiveChartBar*) live_chart_serie_renderer_construct (object_type); +#line 7 "../src/bar.vala" + _tmp0_ = _g_object_ref0 (values); +#line 7 "../src/bar.vala" + _g_object_unref0 (((LiveChartSerieRenderer*) self)->values); +#line 7 "../src/bar.vala" + ((LiveChartSerieRenderer*) self)->values = _tmp0_; +#line 5 "../src/bar.vala" + return self; +#line 55 "bar.c" +} + +LiveChartBar* +live_chart_bar_new (LiveChartValues* values) +{ +#line 5 "../src/bar.vala" + return live_chart_bar_construct (LIVE_CHART_TYPE_BAR, values); +#line 63 "bar.c" +} + +static void +live_chart_bar_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartBar * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 10 "../src/bar.vala" + self = (LiveChartBar*) base; +#line 10 "../src/bar.vala" + g_return_if_fail (ctx != NULL); +#line 10 "../src/bar.vala" + g_return_if_fail (config != NULL); +#line 11 "../src/bar.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 11 "../src/bar.vala" + _tmp1_ = _tmp0_; +#line 11 "../src/bar.vala" + if (_tmp1_) { +#line 86 "bar.c" + LiveChartPoints* points = NULL; + LiveChartValues* _tmp2_; + LiveChartPoints* _tmp3_; + LiveChartPoints* _tmp4_; + gint _tmp5_; + gint _tmp6_; +#line 12 "../src/bar.vala" + _tmp2_ = ((LiveChartSerieRenderer*) self)->values; +#line 12 "../src/bar.vala" + _tmp3_ = live_chart_points_create (_tmp2_, config); +#line 12 "../src/bar.vala" + points = _tmp3_; +#line 13 "../src/bar.vala" + _tmp4_ = points; +#line 13 "../src/bar.vala" + _tmp5_ = live_chart_points_get_size (_tmp4_); +#line 13 "../src/bar.vala" + _tmp6_ = _tmp5_; +#line 13 "../src/bar.vala" + if (_tmp6_ > 0) { +#line 107 "bar.c" + LiveChartPath* _tmp7_; + LiveChartPath* _tmp8_; + LiveChartPoints* _tmp9_; +#line 14 "../src/bar.vala" + _tmp7_ = live_chart_serie_renderer_get_line ((LiveChartSerieRenderer*) self); +#line 14 "../src/bar.vala" + _tmp8_ = _tmp7_; +#line 14 "../src/bar.vala" + live_chart_path_configure (_tmp8_, ctx); +#line 16 "../src/bar.vala" + _tmp9_ = points; +#line 16 "../src/bar.vala" + live_chart_bar_update_bounding_box (self, _tmp9_, config); +#line 17 "../src/bar.vala" + live_chart_serie_renderer_debug ((LiveChartSerieRenderer*) self, ctx); +#line 123 "bar.c" + { + gint pos = 0; +#line 19 "../src/bar.vala" + pos = 0; +#line 128 "bar.c" + { + gboolean _tmp10_ = FALSE; +#line 19 "../src/bar.vala" + _tmp10_ = TRUE; +#line 19 "../src/bar.vala" + while (TRUE) { +#line 135 "bar.c" + LiveChartPoints* _tmp12_; + gint _tmp13_; + gint _tmp14_; + LiveChartPoint current_point = {0}; + LiveChartPoints* _tmp15_; + LiveChartPoint _tmp16_ = {0}; + LiveChartPoint next_point = {0}; + LiveChartPoints* _tmp17_; + LiveChartPoint _tmp18_ = {0}; + LiveChartPoint _tmp19_; + LiveChartPadding _tmp20_; + gdouble bar_width = 0.0; + LiveChartPoint _tmp21_; + LiveChartPoint _tmp22_; + LiveChartPoint _tmp23_; + LiveChartPoint _tmp24_; + LiveChartPoint _tmp25_; +#line 19 "../src/bar.vala" + if (!_tmp10_) { +#line 155 "bar.c" + gint _tmp11_; +#line 19 "../src/bar.vala" + _tmp11_ = pos; +#line 19 "../src/bar.vala" + pos = _tmp11_ + 1; +#line 161 "bar.c" + } +#line 19 "../src/bar.vala" + _tmp10_ = FALSE; +#line 19 "../src/bar.vala" + _tmp12_ = points; +#line 19 "../src/bar.vala" + _tmp13_ = live_chart_points_get_size (_tmp12_); +#line 19 "../src/bar.vala" + _tmp14_ = _tmp13_; +#line 19 "../src/bar.vala" + if (!(pos <= (_tmp14_ - 1))) { +#line 19 "../src/bar.vala" + break; +#line 175 "bar.c" + } +#line 20 "../src/bar.vala" + _tmp15_ = points; +#line 20 "../src/bar.vala" + live_chart_points_get (_tmp15_, pos, &_tmp16_); +#line 20 "../src/bar.vala" + current_point = _tmp16_; +#line 21 "../src/bar.vala" + _tmp17_ = points; +#line 21 "../src/bar.vala" + live_chart_points_after (_tmp17_, pos, &_tmp18_); +#line 21 "../src/bar.vala" + next_point = _tmp18_; +#line 23 "../src/bar.vala" + _tmp19_ = current_point; +#line 23 "../src/bar.vala" + _tmp20_ = config->padding; +#line 23 "../src/bar.vala" + if (_tmp19_.x < ((gdouble) _tmp20_.left)) { +#line 24 "../src/bar.vala" + continue; +#line 197 "bar.c" + } +#line 26 "../src/bar.vala" + _tmp21_ = current_point; +#line 26 "../src/bar.vala" + _tmp22_ = next_point; +#line 26 "../src/bar.vala" + bar_width = (_tmp21_.x - _tmp22_.x) / 1.2; +#line 27 "../src/bar.vala" + _tmp23_ = next_point; +#line 27 "../src/bar.vala" + _tmp24_ = next_point; +#line 27 "../src/bar.vala" + _tmp25_ = next_point; +#line 27 "../src/bar.vala" + cairo_rectangle (ctx, _tmp23_.x, _tmp24_.y, bar_width, _tmp25_.height); +#line 213 "bar.c" + } + } + } +#line 30 "../src/bar.vala" + cairo_fill (ctx); +#line 219 "bar.c" + } +#line 11 "../src/bar.vala" + _g_object_unref0 (points); +#line 223 "bar.c" + } +} + +static void +live_chart_bar_update_bounding_box (LiveChartBar* self, + LiveChartPoints* points, + LiveChartConfig* config) +{ + LiveChartPoint _tmp0_ = {0}; + LiveChartBounds* _tmp1_; + LiveChartBounds* _tmp2_; + gdouble _tmp3_; + gdouble _tmp4_; + LiveChartPoint _tmp5_ = {0}; + LiveChartPoint _tmp6_ = {0}; + LiveChartBoundaries _tmp7_ = {0}; + LiveChartBoundary _tmp8_; + LiveChartBounds* _tmp9_; + LiveChartBounds* _tmp10_; + gdouble _tmp11_; + gdouble _tmp12_; + LiveChartBoundingBox _tmp13_ = {0}; +#line 35 "../src/bar.vala" + g_return_if_fail (self != NULL); +#line 35 "../src/bar.vala" + g_return_if_fail (points != NULL); +#line 35 "../src/bar.vala" + g_return_if_fail (config != NULL); +#line 36 "../src/bar.vala" + live_chart_points_first (points, &_tmp0_); +#line 36 "../src/bar.vala" + _tmp1_ = live_chart_points_get_bounds (points); +#line 36 "../src/bar.vala" + _tmp2_ = _tmp1_; +#line 36 "../src/bar.vala" + _tmp3_ = live_chart_bounds_get_lower (_tmp2_); +#line 36 "../src/bar.vala" + _tmp4_ = _tmp3_; +#line 36 "../src/bar.vala" + live_chart_points_last (points, &_tmp5_); +#line 36 "../src/bar.vala" + live_chart_points_first (points, &_tmp6_); +#line 36 "../src/bar.vala" + live_chart_config_boundaries (config, &_tmp7_); +#line 36 "../src/bar.vala" + _tmp8_ = _tmp7_.y; +#line 36 "../src/bar.vala" + _tmp9_ = live_chart_points_get_bounds (points); +#line 36 "../src/bar.vala" + _tmp10_ = _tmp9_; +#line 36 "../src/bar.vala" + _tmp11_ = live_chart_bounds_get_lower (_tmp10_); +#line 36 "../src/bar.vala" + _tmp12_ = _tmp11_; +#line 36 "../src/bar.vala" + memset (&_tmp13_, 0, sizeof (LiveChartBoundingBox)); +#line 36 "../src/bar.vala" + _tmp13_.x = _tmp0_.x; +#line 36 "../src/bar.vala" + _tmp13_.y = _tmp4_; +#line 36 "../src/bar.vala" + _tmp13_.width = _tmp5_.x - _tmp6_.x; +#line 36 "../src/bar.vala" + _tmp13_.height = _tmp8_.max - _tmp12_; +#line 36 "../src/bar.vala" + ((LiveChartSerieRenderer*) self)->bounding_box = _tmp13_; +#line 290 "bar.c" +} + +static void +live_chart_bar_class_init (LiveChartBarClass * klass, + gpointer klass_data) +{ +#line 4 "../src/bar.vala" + live_chart_bar_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/bar.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_bar_real_draw; +#line 301 "bar.c" +} + +static void +live_chart_bar_instance_init (LiveChartBar * self, + gpointer klass) +{ +} + +static GType +live_chart_bar_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartBarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_bar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartBar), 0, (GInstanceInitFunc) live_chart_bar_instance_init, NULL }; + GType live_chart_bar_type_id; + live_chart_bar_type_id = g_type_register_static (LIVE_CHART_TYPE_SERIE_RENDERER, "LiveChartBar", &g_define_type_info, 0); + return live_chart_bar_type_id; +} + +GType +live_chart_bar_get_type (void) +{ + static volatile gsize live_chart_bar_type_id__once = 0; + if (g_once_init_enter (&live_chart_bar_type_id__once)) { + GType live_chart_bar_type_id; + live_chart_bar_type_id = live_chart_bar_get_type_once (); + g_once_init_leave (&live_chart_bar_type_id__once, live_chart_bar_type_id); + } + return live_chart_bar_type_id__once; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/bezier.c b/iPDC/lib/liblivechart_static.a.p/bezier.c new file mode 100644 index 0000000..7a890a7 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/bezier.c @@ -0,0 +1,534 @@ +/* bezier.c generated by valac 0.56.0, the Vala compiler + * generated from bezier.vala, do not modify */ + +#include +#include +#include +#include "livechart_static.h" +#include +#include +#include + +#define LIVE_CHART_POLYNOMIAL_TOLERANCE 1e-6 + +#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +VALA_EXTERN GeeList* live_chart_get_cubic_roots (gdouble C3, + gdouble C2, + gdouble C1, + gdouble C0); +static gdouble* _double_dup (gdouble* self); + +GeeList* +live_chart_find_intersections_between (LiveChartSegment* segment, + LiveChartBezierCurve* bezier) +{ + gdouble ax = 0.0; + LiveChartBezierCurve _tmp0_; + LiveChartCoord _tmp1_; + LiveChartBezierCurve _tmp2_; + LiveChartCoord _tmp3_; + LiveChartBezierCurve _tmp4_; + LiveChartCoord _tmp5_; + LiveChartBezierCurve _tmp6_; + LiveChartCoord _tmp7_; + gdouble ay = 0.0; + LiveChartBezierCurve _tmp8_; + LiveChartCoord _tmp9_; + LiveChartBezierCurve _tmp10_; + LiveChartCoord _tmp11_; + LiveChartBezierCurve _tmp12_; + LiveChartCoord _tmp13_; + LiveChartBezierCurve _tmp14_; + LiveChartCoord _tmp15_; + gdouble bx = 0.0; + LiveChartBezierCurve _tmp16_; + LiveChartCoord _tmp17_; + LiveChartBezierCurve _tmp18_; + LiveChartCoord _tmp19_; + LiveChartBezierCurve _tmp20_; + LiveChartCoord _tmp21_; + gdouble by = 0.0; + LiveChartBezierCurve _tmp22_; + LiveChartCoord _tmp23_; + LiveChartBezierCurve _tmp24_; + LiveChartCoord _tmp25_; + LiveChartBezierCurve _tmp26_; + LiveChartCoord _tmp27_; + gdouble cx = 0.0; + LiveChartBezierCurve _tmp28_; + LiveChartCoord _tmp29_; + LiveChartBezierCurve _tmp30_; + LiveChartCoord _tmp31_; + gdouble cy = 0.0; + LiveChartBezierCurve _tmp32_; + LiveChartCoord _tmp33_; + LiveChartBezierCurve _tmp34_; + LiveChartCoord _tmp35_; + gdouble dx = 0.0; + LiveChartBezierCurve _tmp36_; + LiveChartCoord _tmp37_; + gdouble dy = 0.0; + LiveChartBezierCurve _tmp38_; + LiveChartCoord _tmp39_; + gdouble vx = 0.0; + LiveChartSegment _tmp40_; + LiveChartCoord _tmp41_; + LiveChartSegment _tmp42_; + LiveChartCoord _tmp43_; + gdouble vy = 0.0; + LiveChartSegment _tmp44_; + LiveChartCoord _tmp45_; + LiveChartSegment _tmp46_; + LiveChartCoord _tmp47_; + gdouble d = 0.0; + LiveChartSegment _tmp48_; + LiveChartCoord _tmp49_; + LiveChartSegment _tmp50_; + LiveChartCoord _tmp51_; + GeeList* roots = NULL; + GeeList* _tmp52_; + GeeArrayList* results = NULL; + GeeArrayList* _tmp53_; + GeeList* result; +#line 6 "../src/bezier.vala" + g_return_val_if_fail (segment != NULL, NULL); +#line 6 "../src/bezier.vala" + g_return_val_if_fail (bezier != NULL, NULL); +#line 8 "../src/bezier.vala" + _tmp0_ = *bezier; +#line 8 "../src/bezier.vala" + _tmp1_ = _tmp0_.c1; +#line 8 "../src/bezier.vala" + _tmp2_ = *bezier; +#line 8 "../src/bezier.vala" + _tmp3_ = _tmp2_.c2; +#line 8 "../src/bezier.vala" + _tmp4_ = *bezier; +#line 8 "../src/bezier.vala" + _tmp5_ = _tmp4_.c3; +#line 8 "../src/bezier.vala" + _tmp6_ = *bezier; +#line 8 "../src/bezier.vala" + _tmp7_ = _tmp6_.c0; +#line 8 "../src/bezier.vala" + ax = ((3 * (_tmp1_.x - _tmp3_.x)) + _tmp5_.x) - _tmp7_.x; +#line 9 "../src/bezier.vala" + _tmp8_ = *bezier; +#line 9 "../src/bezier.vala" + _tmp9_ = _tmp8_.c1; +#line 9 "../src/bezier.vala" + _tmp10_ = *bezier; +#line 9 "../src/bezier.vala" + _tmp11_ = _tmp10_.c2; +#line 9 "../src/bezier.vala" + _tmp12_ = *bezier; +#line 9 "../src/bezier.vala" + _tmp13_ = _tmp12_.c3; +#line 9 "../src/bezier.vala" + _tmp14_ = *bezier; +#line 9 "../src/bezier.vala" + _tmp15_ = _tmp14_.c0; +#line 9 "../src/bezier.vala" + ay = ((3 * (_tmp9_.y - _tmp11_.y)) + _tmp13_.y) - _tmp15_.y; +#line 11 "../src/bezier.vala" + _tmp16_ = *bezier; +#line 11 "../src/bezier.vala" + _tmp17_ = _tmp16_.c0; +#line 11 "../src/bezier.vala" + _tmp18_ = *bezier; +#line 11 "../src/bezier.vala" + _tmp19_ = _tmp18_.c1; +#line 11 "../src/bezier.vala" + _tmp20_ = *bezier; +#line 11 "../src/bezier.vala" + _tmp21_ = _tmp20_.c2; +#line 11 "../src/bezier.vala" + bx = 3 * ((_tmp17_.x - (2 * _tmp19_.x)) + _tmp21_.x); +#line 12 "../src/bezier.vala" + _tmp22_ = *bezier; +#line 12 "../src/bezier.vala" + _tmp23_ = _tmp22_.c0; +#line 12 "../src/bezier.vala" + _tmp24_ = *bezier; +#line 12 "../src/bezier.vala" + _tmp25_ = _tmp24_.c1; +#line 12 "../src/bezier.vala" + _tmp26_ = *bezier; +#line 12 "../src/bezier.vala" + _tmp27_ = _tmp26_.c2; +#line 12 "../src/bezier.vala" + by = 3 * ((_tmp23_.y - (2 * _tmp25_.y)) + _tmp27_.y); +#line 14 "../src/bezier.vala" + _tmp28_ = *bezier; +#line 14 "../src/bezier.vala" + _tmp29_ = _tmp28_.c1; +#line 14 "../src/bezier.vala" + _tmp30_ = *bezier; +#line 14 "../src/bezier.vala" + _tmp31_ = _tmp30_.c0; +#line 14 "../src/bezier.vala" + cx = 3 * (_tmp29_.x - _tmp31_.x); +#line 15 "../src/bezier.vala" + _tmp32_ = *bezier; +#line 15 "../src/bezier.vala" + _tmp33_ = _tmp32_.c1; +#line 15 "../src/bezier.vala" + _tmp34_ = *bezier; +#line 15 "../src/bezier.vala" + _tmp35_ = _tmp34_.c0; +#line 15 "../src/bezier.vala" + cy = 3 * (_tmp33_.y - _tmp35_.y); +#line 17 "../src/bezier.vala" + _tmp36_ = *bezier; +#line 17 "../src/bezier.vala" + _tmp37_ = _tmp36_.c0; +#line 17 "../src/bezier.vala" + dx = _tmp37_.x; +#line 18 "../src/bezier.vala" + _tmp38_ = *bezier; +#line 18 "../src/bezier.vala" + _tmp39_ = _tmp38_.c0; +#line 18 "../src/bezier.vala" + dy = _tmp39_.y; +#line 20 "../src/bezier.vala" + _tmp40_ = *segment; +#line 20 "../src/bezier.vala" + _tmp41_ = _tmp40_.to; +#line 20 "../src/bezier.vala" + _tmp42_ = *segment; +#line 20 "../src/bezier.vala" + _tmp43_ = _tmp42_.from; +#line 20 "../src/bezier.vala" + vx = _tmp41_.y - _tmp43_.y; +#line 21 "../src/bezier.vala" + _tmp44_ = *segment; +#line 21 "../src/bezier.vala" + _tmp45_ = _tmp44_.from; +#line 21 "../src/bezier.vala" + _tmp46_ = *segment; +#line 21 "../src/bezier.vala" + _tmp47_ = _tmp46_.to; +#line 21 "../src/bezier.vala" + vy = _tmp45_.x - _tmp47_.x; +#line 23 "../src/bezier.vala" + _tmp48_ = *segment; +#line 23 "../src/bezier.vala" + _tmp49_ = _tmp48_.from; +#line 23 "../src/bezier.vala" + _tmp50_ = *segment; +#line 23 "../src/bezier.vala" + _tmp51_ = _tmp50_.from; +#line 23 "../src/bezier.vala" + d = (_tmp49_.x * vx) + (_tmp51_.y * vy); +#line 25 "../src/bezier.vala" + _tmp52_ = live_chart_get_cubic_roots ((vx * ax) + (vy * ay), (vx * bx) + (vy * by), (vx * cx) + (vy * cy), ((vx * dx) + (vy * dy)) - d); +#line 25 "../src/bezier.vala" + roots = _tmp52_; +#line 32 "../src/bezier.vala" + _tmp53_ = gee_array_list_new (LIVE_CHART_TYPE_COORD, (GBoxedCopyFunc) live_chart_coord_dup, (GDestroyNotify) live_chart_coord_free, NULL, NULL, NULL); +#line 32 "../src/bezier.vala" + results = _tmp53_; +#line 234 "bezier.c" + { + gint i = 0; +#line 33 "../src/bezier.vala" + i = 0; +#line 239 "bezier.c" + { + gboolean _tmp54_ = FALSE; +#line 33 "../src/bezier.vala" + _tmp54_ = TRUE; +#line 33 "../src/bezier.vala" + while (TRUE) { +#line 246 "bezier.c" + GeeList* _tmp56_; + gint _tmp57_; + gint _tmp58_; + gdouble* root = NULL; + GeeList* _tmp59_; + gpointer _tmp60_; + gboolean _tmp61_ = FALSE; + gdouble* _tmp62_; + GeeArrayList* _tmp64_; + gdouble* _tmp65_; + gdouble* _tmp66_; + gdouble* _tmp67_; + gdouble* _tmp68_; + gdouble* _tmp69_; + gdouble* _tmp70_; + LiveChartCoord _tmp71_ = {0}; +#line 33 "../src/bezier.vala" + if (!_tmp54_) { +#line 265 "bezier.c" + gint _tmp55_; +#line 33 "../src/bezier.vala" + _tmp55_ = i; +#line 33 "../src/bezier.vala" + i = _tmp55_ + 1; +#line 271 "bezier.c" + } +#line 33 "../src/bezier.vala" + _tmp54_ = FALSE; +#line 33 "../src/bezier.vala" + _tmp56_ = roots; +#line 33 "../src/bezier.vala" + _tmp57_ = gee_collection_get_size ((GeeCollection*) _tmp56_); +#line 33 "../src/bezier.vala" + _tmp58_ = _tmp57_; +#line 33 "../src/bezier.vala" + if (!(i < _tmp58_)) { +#line 33 "../src/bezier.vala" + break; +#line 285 "bezier.c" + } +#line 34 "../src/bezier.vala" + _tmp59_ = roots; +#line 34 "../src/bezier.vala" + _tmp60_ = gee_list_get (_tmp59_, i); +#line 34 "../src/bezier.vala" + root = (gdouble*) _tmp60_; +#line 35 "../src/bezier.vala" + _tmp62_ = root; +#line 35 "../src/bezier.vala" + if (((gdouble) 0) > (*_tmp62_)) { +#line 35 "../src/bezier.vala" + _tmp61_ = TRUE; +#line 299 "bezier.c" + } else { + gdouble* _tmp63_; +#line 35 "../src/bezier.vala" + _tmp63_ = root; +#line 35 "../src/bezier.vala" + _tmp61_ = (*_tmp63_) > ((gdouble) 1); +#line 306 "bezier.c" + } +#line 35 "../src/bezier.vala" + if (_tmp61_) { +#line 35 "../src/bezier.vala" + _g_free0 (root); +#line 35 "../src/bezier.vala" + continue; +#line 314 "bezier.c" + } +#line 36 "../src/bezier.vala" + _tmp64_ = results; +#line 36 "../src/bezier.vala" + _tmp65_ = root; +#line 36 "../src/bezier.vala" + _tmp66_ = root; +#line 36 "../src/bezier.vala" + _tmp67_ = root; +#line 36 "../src/bezier.vala" + _tmp68_ = root; +#line 36 "../src/bezier.vala" + _tmp69_ = root; +#line 36 "../src/bezier.vala" + _tmp70_ = root; +#line 36 "../src/bezier.vala" + _tmp71_.x = (((((ax * (*_tmp65_)) + bx) * (*_tmp66_)) + cx) * (*_tmp67_)) + dx; +#line 36 "../src/bezier.vala" + _tmp71_.y = (((((ay * (*_tmp68_)) + by) * (*_tmp69_)) + cy) * (*_tmp70_)) + dy; +#line 36 "../src/bezier.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp64_, &_tmp71_); +#line 33 "../src/bezier.vala" + _g_free0 (root); +#line 338 "bezier.c" + } + } + } +#line 42 "../src/bezier.vala" + result = (GeeList*) results; +#line 42 "../src/bezier.vala" + _g_object_unref0 (roots); +#line 42 "../src/bezier.vala" + return result; +#line 348 "bezier.c" +} + +static gdouble* +_double_dup (gdouble* self) +{ + gdouble* dup; +#line 47 "../src/bezier.vala" + dup = g_new0 (gdouble, 1); +#line 47 "../src/bezier.vala" + memcpy (dup, self, sizeof (gdouble)); +#line 47 "../src/bezier.vala" + return dup; +#line 361 "bezier.c" +} + +GeeList* +live_chart_get_cubic_roots (gdouble C3, + gdouble C2, + gdouble C1, + gdouble C0) +{ + GeeArrayList* roots = NULL; + GeeArrayList* _tmp0_; + gdouble c3 = 0.0; + gdouble c2 = 0.0; + gdouble c1 = 0.0; + gdouble c0 = 0.0; + gdouble a = 0.0; + gdouble b = 0.0; + gdouble offset = 0.0; + gdouble discrim = 0.0; + gdouble halfB = 0.0; + gdouble tmp = 0.0; + gdouble root = 0.0; + GeeList* result; +#line 47 "../src/bezier.vala" + _tmp0_ = gee_array_list_new (G_TYPE_DOUBLE, (GBoxedCopyFunc) _double_dup, (GDestroyNotify) g_free, NULL, NULL, NULL); +#line 47 "../src/bezier.vala" + roots = _tmp0_; +#line 50 "../src/bezier.vala" + c3 = C3; +#line 51 "../src/bezier.vala" + c2 = C2 / c3; +#line 52 "../src/bezier.vala" + c1 = C1 / c3; +#line 53 "../src/bezier.vala" + c0 = C0 / c3; +#line 55 "../src/bezier.vala" + a = ((3 * c1) - (c2 * c2)) / 3; +#line 56 "../src/bezier.vala" + b = (((((2 * c2) * c2) * c2) - ((9 * c1) * c2)) + (27 * c0)) / 27; +#line 57 "../src/bezier.vala" + offset = c2 / 3; +#line 58 "../src/bezier.vala" + discrim = ((b * b) / 4) + (((a * a) * a) / 27); +#line 59 "../src/bezier.vala" + halfB = b / 2; +#line 61 "../src/bezier.vala" + tmp = (gdouble) 0; +#line 62 "../src/bezier.vala" + root = (gdouble) 0; +#line 64 "../src/bezier.vala" + if (fabs (discrim) <= LIVE_CHART_POLYNOMIAL_TOLERANCE) { +#line 64 "../src/bezier.vala" + discrim = (gdouble) 0; +#line 414 "bezier.c" + } +#line 66 "../src/bezier.vala" + if (discrim > ((gdouble) 0)) { +#line 418 "bezier.c" + gdouble e = 0.0; + GeeArrayList* _tmp1_; + gdouble _tmp2_; +#line 67 "../src/bezier.vala" + e = sqrt (discrim); +#line 69 "../src/bezier.vala" + tmp = (-halfB) + e; +#line 70 "../src/bezier.vala" + if (tmp >= ((gdouble) 0)) { +#line 70 "../src/bezier.vala" + root = pow (tmp, (gdouble) (1 / 3)); +#line 430 "bezier.c" + } else { +#line 71 "../src/bezier.vala" + root = -pow (-tmp, (gdouble) (1 / 3)); +#line 434 "bezier.c" + } +#line 73 "../src/bezier.vala" + tmp = (-halfB) - e; +#line 74 "../src/bezier.vala" + if (tmp >= ((gdouble) 0)) { +#line 74 "../src/bezier.vala" + root += pow (tmp, (gdouble) (1 / 3)); +#line 442 "bezier.c" + } else { +#line 75 "../src/bezier.vala" + root -= pow (-tmp, (gdouble) (1 / 3)); +#line 446 "bezier.c" + } +#line 77 "../src/bezier.vala" + _tmp1_ = roots; +#line 77 "../src/bezier.vala" + _tmp2_ = root - offset; +#line 77 "../src/bezier.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, &_tmp2_); +#line 454 "bezier.c" + } else { +#line 78 "../src/bezier.vala" + if (discrim < ((gdouble) 0)) { +#line 458 "bezier.c" + gdouble distance = 0.0; + gdouble angle = 0.0; + gdouble _cos = 0.0; + gdouble _sin = 0.0; + gdouble sqrt3 = 0.0; + GeeArrayList* _tmp3_; + gdouble _tmp4_; + GeeArrayList* _tmp5_; + gdouble _tmp6_; + GeeArrayList* _tmp7_; + gdouble _tmp8_; +#line 79 "../src/bezier.vala" + distance = sqrt ((-a) / 3); +#line 80 "../src/bezier.vala" + angle = atan2 (sqrt (-discrim), -halfB) / 3; +#line 81 "../src/bezier.vala" + _cos = cos (angle); +#line 82 "../src/bezier.vala" + _sin = sin (angle); +#line 83 "../src/bezier.vala" + sqrt3 = sqrt ((gdouble) 3); +#line 85 "../src/bezier.vala" + _tmp3_ = roots; +#line 85 "../src/bezier.vala" + _tmp4_ = ((2 * distance) * _cos) - offset; +#line 85 "../src/bezier.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, &_tmp4_); +#line 86 "../src/bezier.vala" + _tmp5_ = roots; +#line 86 "../src/bezier.vala" + _tmp6_ = ((-distance) * (_cos + (sqrt3 * _sin))) - offset; +#line 86 "../src/bezier.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp5_, &_tmp6_); +#line 87 "../src/bezier.vala" + _tmp7_ = roots; +#line 87 "../src/bezier.vala" + _tmp8_ = ((-distance) * (_cos - (sqrt3 * _sin))) - offset; +#line 87 "../src/bezier.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, &_tmp8_); +#line 498 "bezier.c" + } else { + GeeArrayList* _tmp9_; + gdouble _tmp10_; + GeeArrayList* _tmp11_; + gdouble _tmp12_; +#line 89 "../src/bezier.vala" + if (halfB >= ((gdouble) 0)) { +#line 89 "../src/bezier.vala" + tmp = -pow (halfB, (gdouble) (1 / 3)); +#line 508 "bezier.c" + } else { +#line 90 "../src/bezier.vala" + tmp = pow (-halfB, (gdouble) (1 / 3)); +#line 512 "bezier.c" + } +#line 92 "../src/bezier.vala" + _tmp9_ = roots; +#line 92 "../src/bezier.vala" + _tmp10_ = (2 * tmp) - offset; +#line 92 "../src/bezier.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, &_tmp10_); +#line 94 "../src/bezier.vala" + _tmp11_ = roots; +#line 94 "../src/bezier.vala" + _tmp12_ = (-tmp) - offset; +#line 94 "../src/bezier.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, &_tmp12_); +#line 526 "bezier.c" + } + } +#line 97 "../src/bezier.vala" + result = (GeeList*) roots; +#line 97 "../src/bezier.vala" + return result; +#line 533 "bezier.c" +} + diff --git a/iPDC/lib/liblivechart_static.a.p/bounds.c b/iPDC/lib/liblivechart_static.a.p/bounds.c new file mode 100644 index 0000000..b31addb --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/bounds.c @@ -0,0 +1,350 @@ +/* bounds.c generated by valac 0.56.0, the Vala compiler + * generated from bounds.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include + +enum { + LIVE_CHART_BOUNDS_0_PROPERTY, + LIVE_CHART_BOUNDS_LOWER_PROPERTY, + LIVE_CHART_BOUNDS_UPPER_PROPERTY, + LIVE_CHART_BOUNDS_NUM_PROPERTIES +}; +static GParamSpec* live_chart_bounds_properties[LIVE_CHART_BOUNDS_NUM_PROPERTIES]; + +struct _LiveChartBoundsPrivate { + gdouble _lower; + gdouble _upper; +}; + +static gint LiveChartBounds_private_offset; +static gpointer live_chart_bounds_parent_class = NULL; + +static void live_chart_bounds_set_lower (LiveChartBounds* self, + gdouble value); +static void live_chart_bounds_set_upper (LiveChartBounds* self, + gdouble value); +static void live_chart_bounds_finalize (GObject * obj); +static GType live_chart_bounds_get_type_once (void); +static void _vala_live_chart_bounds_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_bounds_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +static inline gpointer +live_chart_bounds_get_instance_private (LiveChartBounds* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartBounds_private_offset); +} + +LiveChartBounds* +live_chart_bounds_construct (GType object_type, + gdouble lower, + gdouble upper) +{ + LiveChartBounds * self = NULL; +#line 12 "../src/bounds.vala" + self = (LiveChartBounds*) g_object_new (object_type, NULL); +#line 13 "../src/bounds.vala" + live_chart_bounds_set_lower (self, lower); +#line 14 "../src/bounds.vala" + live_chart_bounds_set_upper (self, upper); +#line 12 "../src/bounds.vala" + return self; +#line 62 "bounds.c" +} + +LiveChartBounds* +live_chart_bounds_new (gdouble lower, + gdouble upper) +{ +#line 12 "../src/bounds.vala" + return live_chart_bounds_construct (LIVE_CHART_TYPE_BOUNDS, lower, upper); +#line 71 "bounds.c" +} + +gboolean +live_chart_bounds_has_lower (LiveChartBounds* self) +{ + gdouble _tmp0_; + gboolean result; +#line 17 "../src/bounds.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 18 "../src/bounds.vala" + _tmp0_ = self->priv->_lower; +#line 18 "../src/bounds.vala" + result = !isnan (_tmp0_); +#line 18 "../src/bounds.vala" + return result; +#line 87 "bounds.c" +} + +gboolean +live_chart_bounds_has_upper (LiveChartBounds* self) +{ + gdouble _tmp0_; + gboolean result; +#line 21 "../src/bounds.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 22 "../src/bounds.vala" + _tmp0_ = self->priv->_upper; +#line 22 "../src/bounds.vala" + result = !isnan (_tmp0_); +#line 22 "../src/bounds.vala" + return result; +#line 103 "bounds.c" +} + +gboolean +live_chart_bounds_update (LiveChartBounds* self, + gdouble value) +{ + gboolean updated = FALSE; + gdouble _tmp0_; + gdouble _tmp1_; + gboolean result; +#line 25 "../src/bounds.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 26 "../src/bounds.vala" + updated = FALSE; +#line 27 "../src/bounds.vala" + if (!live_chart_bounds_has_lower (self)) { +#line 28 "../src/bounds.vala" + live_chart_bounds_set_lower (self, value); +#line 29 "../src/bounds.vala" + updated = TRUE; +#line 124 "bounds.c" + } +#line 32 "../src/bounds.vala" + if (!live_chart_bounds_has_upper (self)) { +#line 33 "../src/bounds.vala" + live_chart_bounds_set_upper (self, value); +#line 34 "../src/bounds.vala" + updated = TRUE; +#line 132 "bounds.c" + } +#line 36 "../src/bounds.vala" + _tmp0_ = self->priv->_lower; +#line 36 "../src/bounds.vala" + if (value < _tmp0_) { +#line 37 "../src/bounds.vala" + live_chart_bounds_set_lower (self, value); +#line 38 "../src/bounds.vala" + updated = TRUE; +#line 142 "bounds.c" + } +#line 40 "../src/bounds.vala" + _tmp1_ = self->priv->_upper; +#line 40 "../src/bounds.vala" + if (value > _tmp1_) { +#line 41 "../src/bounds.vala" + live_chart_bounds_set_upper (self, value); +#line 42 "../src/bounds.vala" + updated = TRUE; +#line 152 "bounds.c" + } +#line 44 "../src/bounds.vala" + result = updated; +#line 44 "../src/bounds.vala" + return result; +#line 158 "bounds.c" +} + +gdouble +live_chart_bounds_get_lower (LiveChartBounds* self) +{ + gdouble result; +#line 6 "../src/bounds.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 6 "../src/bounds.vala" + result = self->priv->_lower; +#line 6 "../src/bounds.vala" + return result; +#line 171 "bounds.c" +} + +static void +live_chart_bounds_set_lower (LiveChartBounds* self, + gdouble value) +{ + gdouble old_value; +#line 6 "../src/bounds.vala" + g_return_if_fail (self != NULL); +#line 6 "../src/bounds.vala" + old_value = live_chart_bounds_get_lower (self); +#line 6 "../src/bounds.vala" + if (old_value != value) { +#line 6 "../src/bounds.vala" + self->priv->_lower = value; +#line 6 "../src/bounds.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_bounds_properties[LIVE_CHART_BOUNDS_LOWER_PROPERTY]); +#line 189 "bounds.c" + } +} + +gdouble +live_chart_bounds_get_upper (LiveChartBounds* self) +{ + gdouble result; +#line 9 "../src/bounds.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 9 "../src/bounds.vala" + result = self->priv->_upper; +#line 9 "../src/bounds.vala" + return result; +#line 203 "bounds.c" +} + +static void +live_chart_bounds_set_upper (LiveChartBounds* self, + gdouble value) +{ + gdouble old_value; +#line 9 "../src/bounds.vala" + g_return_if_fail (self != NULL); +#line 9 "../src/bounds.vala" + old_value = live_chart_bounds_get_upper (self); +#line 9 "../src/bounds.vala" + if (old_value != value) { +#line 9 "../src/bounds.vala" + self->priv->_upper = value; +#line 9 "../src/bounds.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_bounds_properties[LIVE_CHART_BOUNDS_UPPER_PROPERTY]); +#line 221 "bounds.c" + } +} + +static void +live_chart_bounds_class_init (LiveChartBoundsClass * klass, + gpointer klass_data) +{ +#line 3 "../src/bounds.vala" + live_chart_bounds_parent_class = g_type_class_peek_parent (klass); +#line 3 "../src/bounds.vala" + g_type_class_adjust_private_offset (klass, &LiveChartBounds_private_offset); +#line 3 "../src/bounds.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_bounds_get_property; +#line 3 "../src/bounds.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_bounds_set_property; +#line 3 "../src/bounds.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_bounds_finalize; +#line 3 "../src/bounds.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_BOUNDS_LOWER_PROPERTY, live_chart_bounds_properties[LIVE_CHART_BOUNDS_LOWER_PROPERTY] = g_param_spec_double ("lower", "lower", "lower", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); +#line 3 "../src/bounds.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_BOUNDS_UPPER_PROPERTY, live_chart_bounds_properties[LIVE_CHART_BOUNDS_UPPER_PROPERTY] = g_param_spec_double ("upper", "upper", "upper", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); +#line 243 "bounds.c" +} + +static void +live_chart_bounds_instance_init (LiveChartBounds * self, + gpointer klass) +{ +#line 3 "../src/bounds.vala" + self->priv = live_chart_bounds_get_instance_private (self); +#line 252 "bounds.c" +} + +static void +live_chart_bounds_finalize (GObject * obj) +{ + LiveChartBounds * self; +#line 3 "../src/bounds.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_BOUNDS, LiveChartBounds); +#line 3 "../src/bounds.vala" + G_OBJECT_CLASS (live_chart_bounds_parent_class)->finalize (obj); +#line 263 "bounds.c" +} + +static GType +live_chart_bounds_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartBoundsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_bounds_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartBounds), 0, (GInstanceInitFunc) live_chart_bounds_instance_init, NULL }; + GType live_chart_bounds_type_id; + live_chart_bounds_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartBounds", &g_define_type_info, 0); + LiveChartBounds_private_offset = g_type_add_instance_private (live_chart_bounds_type_id, sizeof (LiveChartBoundsPrivate)); + return live_chart_bounds_type_id; +} + +GType +live_chart_bounds_get_type (void) +{ + static volatile gsize live_chart_bounds_type_id__once = 0; + if (g_once_init_enter (&live_chart_bounds_type_id__once)) { + GType live_chart_bounds_type_id; + live_chart_bounds_type_id = live_chart_bounds_get_type_once (); + g_once_init_leave (&live_chart_bounds_type_id__once, live_chart_bounds_type_id); + } + return live_chart_bounds_type_id__once; +} + +static void +_vala_live_chart_bounds_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartBounds * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_BOUNDS, LiveChartBounds); +#line 3 "../src/bounds.vala" + switch (property_id) { +#line 3 "../src/bounds.vala" + case LIVE_CHART_BOUNDS_LOWER_PROPERTY: +#line 3 "../src/bounds.vala" + g_value_set_double (value, live_chart_bounds_get_lower (self)); +#line 3 "../src/bounds.vala" + break; +#line 3 "../src/bounds.vala" + case LIVE_CHART_BOUNDS_UPPER_PROPERTY: +#line 3 "../src/bounds.vala" + g_value_set_double (value, live_chart_bounds_get_upper (self)); +#line 3 "../src/bounds.vala" + break; +#line 310 "bounds.c" + default: +#line 3 "../src/bounds.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 3 "../src/bounds.vala" + break; +#line 316 "bounds.c" + } +} + +static void +_vala_live_chart_bounds_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartBounds * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_BOUNDS, LiveChartBounds); +#line 3 "../src/bounds.vala" + switch (property_id) { +#line 3 "../src/bounds.vala" + case LIVE_CHART_BOUNDS_LOWER_PROPERTY: +#line 3 "../src/bounds.vala" + live_chart_bounds_set_lower (self, g_value_get_double (value)); +#line 3 "../src/bounds.vala" + break; +#line 3 "../src/bounds.vala" + case LIVE_CHART_BOUNDS_UPPER_PROPERTY: +#line 3 "../src/bounds.vala" + live_chart_bounds_set_upper (self, g_value_get_double (value)); +#line 3 "../src/bounds.vala" + break; +#line 342 "bounds.c" + default: +#line 3 "../src/bounds.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 3 "../src/bounds.vala" + break; +#line 348 "bounds.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/chart.c b/iPDC/lib/liblivechart_static.a.p/chart.c new file mode 100644 index 0000000..b00c6e8 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/chart.c @@ -0,0 +1,1103 @@ +/* chart.c generated by valac 0.56.0, the Vala compiler + * generated from chart.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_CHART_0_PROPERTY, + LIVE_CHART_CHART_GRID_PROPERTY, + LIVE_CHART_CHART_BACKGROUND_PROPERTY, + LIVE_CHART_CHART_LEGEND_PROPERTY, + LIVE_CHART_CHART_NUM_PROPERTIES +}; +static GParamSpec* live_chart_chart_properties[LIVE_CHART_CHART_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _live_chart_config_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_config_unref (var), NULL))) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +typedef struct _Block1Data Block1Data; +#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL))) + +struct _LiveChartChartPrivate { + LiveChartGrid* _grid; + LiveChartBackground* _background; + LiveChartLegend* _legend; + guint source_timeout; +}; + +struct _Block1Data { + int _ref_count_; + LiveChartChart* self; + gint64 ts; + LiveChartValues* values; + gint timespan_between_value; +}; + +static gint LiveChartChart_private_offset; +static gpointer live_chart_chart_parent_class = NULL; + +static void __lambda9_ (LiveChartChart* self, + GtkAllocation* allocation); +static void ___lambda9__gtk_widget_size_allocate (GtkWidget* _sender, + GtkAllocation* allocation, + gpointer self); +static gboolean live_chart_chart_render (LiveChartChart* self, + GtkWidget* _, + cairo_t* ctx); +static gboolean _live_chart_chart_render_gtk_widget_draw (GtkWidget* _sender, + cairo_t* cr, + gpointer self); +static Block1Data* block1_data_ref (Block1Data* _data1_); +static void block1_data_unref (void * _userdata_); +static gboolean __lambda11_ (Block1Data* _data1_, + gdouble* value); +static gboolean ___lambda11__gee_forall_func (gpointer g, + gpointer self); +static gboolean __lambda10_ (LiveChartChart* self); +static gboolean ___lambda10__gsource_func (gpointer self); +static void live_chart_chart_finalize (GObject * obj); +static GType live_chart_chart_get_type_once (void); +static void _vala_live_chart_chart_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_chart_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +GQuark +live_chart_chart_error_quark (void) +{ + return g_quark_from_static_string ("live-chart-chart-error-quark"); +} + +static GType +live_chart_chart_error_get_type_once (void) +{ + static const GEnumValue values[] = {{LIVE_CHART_CHART_ERROR_EXPORT_ERROR, "LIVE_CHART_CHART_ERROR_EXPORT_ERROR", "export-error"}, {LIVE_CHART_CHART_ERROR_SERIE_NOT_FOUND, "LIVE_CHART_CHART_ERROR_SERIE_NOT_FOUND", "serie-not-found"}, {0, NULL, NULL}}; + GType live_chart_chart_error_type_id; + live_chart_chart_error_type_id = g_enum_register_static ("LiveChartChartError", values); + return live_chart_chart_error_type_id; +} + +GType +live_chart_chart_error_get_type (void) +{ + static volatile gsize live_chart_chart_error_type_id__once = 0; + if (g_once_init_enter (&live_chart_chart_error_type_id__once)) { + GType live_chart_chart_error_type_id; + live_chart_chart_error_type_id = live_chart_chart_error_get_type_once (); + g_once_init_leave (&live_chart_chart_error_type_id__once, live_chart_chart_error_type_id); + } + return live_chart_chart_error_type_id__once; +} + +static inline gpointer +live_chart_chart_get_instance_private (LiveChartChart* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartChart_private_offset); +} + +static gpointer +_live_chart_config_ref0 (gpointer self) +{ +#line 22 "../src/chart.vala" + return self ? live_chart_config_ref (self) : NULL; +#line 118 "chart.c" +} + +static void +__lambda9_ (LiveChartChart* self, + GtkAllocation* allocation) +{ + LiveChartConfig* _tmp0_; + GtkAllocation _tmp1_; + LiveChartConfig* _tmp2_; + GtkAllocation _tmp3_; +#line 23 "../src/chart.vala" + g_return_if_fail (allocation != NULL); +#line 24 "../src/chart.vala" + _tmp0_ = self->config; +#line 24 "../src/chart.vala" + _tmp1_ = *allocation; +#line 24 "../src/chart.vala" + live_chart_config_set_height (_tmp0_, _tmp1_.height); +#line 25 "../src/chart.vala" + _tmp2_ = self->config; +#line 25 "../src/chart.vala" + _tmp3_ = *allocation; +#line 25 "../src/chart.vala" + live_chart_config_set_width (_tmp2_, _tmp3_.width); +#line 143 "chart.c" +} + +static void +___lambda9__gtk_widget_size_allocate (GtkWidget* _sender, + GtkAllocation* allocation, + gpointer self) +{ +#line 23 "../src/chart.vala" + __lambda9_ ((LiveChartChart*) self, allocation); +#line 153 "chart.c" +} + +static gboolean +_live_chart_chart_render_gtk_widget_draw (GtkWidget* _sender, + cairo_t* cr, + gpointer self) +{ + gboolean result; + result = live_chart_chart_render ((LiveChartChart*) self, _sender, cr); +#line 28 "../src/chart.vala" + return result; +#line 165 "chart.c" +} + +LiveChartChart* +live_chart_chart_construct (GType object_type, + LiveChartConfig* config) +{ + LiveChartChart * self = NULL; + LiveChartConfig* _tmp0_; + LiveChartSeries* _tmp1_; +#line 21 "../src/chart.vala" + g_return_val_if_fail (config != NULL, NULL); +#line 21 "../src/chart.vala" + self = (LiveChartChart*) g_object_new (object_type, NULL); +#line 22 "../src/chart.vala" + _tmp0_ = _live_chart_config_ref0 (config); +#line 22 "../src/chart.vala" + _live_chart_config_unref0 (self->config); +#line 22 "../src/chart.vala" + self->config = _tmp0_; +#line 23 "../src/chart.vala" + g_signal_connect_object ((GtkWidget*) self, "size-allocate", (GCallback) ___lambda9__gtk_widget_size_allocate, self, 0); +#line 28 "../src/chart.vala" + g_signal_connect_object ((GtkWidget*) self, "draw", (GCallback) _live_chart_chart_render_gtk_widget_draw, self, 0); +#line 30 "../src/chart.vala" + live_chart_chart_refresh_every (self, 100); +#line 32 "../src/chart.vala" + _tmp1_ = live_chart_series_new (self); +#line 32 "../src/chart.vala" + _g_object_unref0 (self->series); +#line 32 "../src/chart.vala" + self->series = _tmp1_; +#line 21 "../src/chart.vala" + return self; +#line 199 "chart.c" +} + +LiveChartChart* +live_chart_chart_new (LiveChartConfig* config) +{ +#line 21 "../src/chart.vala" + return live_chart_chart_construct (LIVE_CHART_TYPE_CHART, config); +#line 207 "chart.c" +} + +void +live_chart_chart_add_serie (LiveChartChart* self, + LiveChartSerie* serie) +{ + LiveChartSeries* _tmp0_; + LiveChartSerie* _tmp1_; + LiveChartSerie* _tmp2_; +#line 35 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 35 "../src/chart.vala" + g_return_if_fail (serie != NULL); +#line 36 "../src/chart.vala" + _tmp0_ = self->series; +#line 36 "../src/chart.vala" + _tmp1_ = live_chart_series_register (_tmp0_, serie); +#line 36 "../src/chart.vala" + _tmp2_ = _tmp1_; +#line 36 "../src/chart.vala" + _g_object_unref0 (_tmp2_); +#line 229 "chart.c" +} + +void +live_chart_chart_add_value (LiveChartChart* self, + LiveChartSerie* serie, + gdouble value) +{ +#line 40 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 40 "../src/chart.vala" + g_return_if_fail (serie != NULL); +#line 41 "../src/chart.vala" + live_chart_serie_add (serie, value); +#line 243 "chart.c" +} + +static gpointer +_g_error_copy0 (gpointer self) +{ +#line 50 "../src/chart.vala" + return self ? g_error_copy (self) : NULL; +#line 251 "chart.c" +} + +void +live_chart_chart_add_value_by_index (LiveChartChart* self, + gint serie_index, + gdouble value, + GError** error) +{ + GError* _inner_error0_ = NULL; +#line 45 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 263 "chart.c" + { + LiveChartSerie* serie = NULL; + LiveChartSeries* _tmp0_; + LiveChartSerie* _tmp1_; + LiveChartSerie* _tmp2_; +#line 47 "../src/chart.vala" + _tmp0_ = self->series; +#line 47 "../src/chart.vala" + _tmp1_ = live_chart_series_get (_tmp0_, serie_index, &_inner_error0_); +#line 47 "../src/chart.vala" + serie = _tmp1_; +#line 47 "../src/chart.vala" + if (G_UNLIKELY (_inner_error0_ != NULL)) { +#line 47 "../src/chart.vala" + if (_inner_error0_->domain == LIVE_CHART_CHART_ERROR) { +#line 279 "chart.c" + goto __catch0_live_chart_chart_error; + } +#line 47 "../src/chart.vala" + 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); +#line 47 "../src/chart.vala" + g_clear_error (&_inner_error0_); +#line 47 "../src/chart.vala" + return; +#line 288 "chart.c" + } +#line 48 "../src/chart.vala" + _tmp2_ = serie; +#line 48 "../src/chart.vala" + live_chart_chart_add_value (self, _tmp2_, value); +#line 46 "../src/chart.vala" + _g_object_unref0 (serie); +#line 296 "chart.c" + } + goto __finally0; + __catch0_live_chart_chart_error: + { + GError* e = NULL; + GError* _tmp3_; + GError* _tmp4_; +#line 46 "../src/chart.vala" + e = _inner_error0_; +#line 46 "../src/chart.vala" + _inner_error0_ = NULL; +#line 50 "../src/chart.vala" + _tmp3_ = e; +#line 50 "../src/chart.vala" + _tmp4_ = _g_error_copy0 (_tmp3_); +#line 50 "../src/chart.vala" + _inner_error0_ = _tmp4_; +#line 50 "../src/chart.vala" + _g_error_free0 (e); +#line 316 "chart.c" + goto __finally0; + } + __finally0: +#line 46 "../src/chart.vala" + if (G_UNLIKELY (_inner_error0_ != NULL)) { +#line 46 "../src/chart.vala" + if (_inner_error0_->domain == LIVE_CHART_CHART_ERROR) { +#line 46 "../src/chart.vala" + g_propagate_error (error, _inner_error0_); +#line 46 "../src/chart.vala" + return; +#line 328 "chart.c" + } else { +#line 46 "../src/chart.vala" + 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); +#line 46 "../src/chart.vala" + g_clear_error (&_inner_error0_); +#line 46 "../src/chart.vala" + return; +#line 336 "chart.c" + } + } +} + +static Block1Data* +block1_data_ref (Block1Data* _data1_) +{ +#line 54 "../src/chart.vala" + g_atomic_int_inc (&_data1_->_ref_count_); +#line 54 "../src/chart.vala" + return _data1_; +#line 348 "chart.c" +} + +static void +block1_data_unref (void * _userdata_) +{ + Block1Data* _data1_; + _data1_ = (Block1Data*) _userdata_; +#line 54 "../src/chart.vala" + if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { +#line 358 "chart.c" + LiveChartChart* self; +#line 54 "../src/chart.vala" + self = _data1_->self; +#line 54 "../src/chart.vala" + _g_object_unref0 (_data1_->values); +#line 54 "../src/chart.vala" + _g_object_unref0 (self); +#line 54 "../src/chart.vala" + g_slice_free (Block1Data, _data1_); +#line 368 "chart.c" + } +} + +static gboolean +__lambda11_ (Block1Data* _data1_, + gdouble* value) +{ + LiveChartChart* self; + LiveChartTimestampedValue _tmp0_ = {0}; + LiveChartConfig* _tmp1_; + LiveChartYAxis* _tmp2_; + gboolean result; +#line 57 "../src/chart.vala" + self = _data1_->self; +#line 58 "../src/chart.vala" + _data1_->ts += (gint64) _data1_->timespan_between_value; +#line 59 "../src/chart.vala" + _tmp0_.timestamp = (gdouble) _data1_->ts; +#line 59 "../src/chart.vala" + _tmp0_.value = *value; +#line 59 "../src/chart.vala" + live_chart_values_add (_data1_->values, &_tmp0_); +#line 60 "../src/chart.vala" + _tmp1_ = self->config; +#line 60 "../src/chart.vala" + _tmp2_ = _tmp1_->y_axis; +#line 60 "../src/chart.vala" + live_chart_yaxis_update_bounds (_tmp2_, *value); +#line 61 "../src/chart.vala" + result = TRUE; +#line 61 "../src/chart.vala" + _g_free0 (value); +#line 61 "../src/chart.vala" + return result; +#line 403 "chart.c" +} + +static gboolean +___lambda11__gee_forall_func (gpointer g, + gpointer self) +{ + gboolean result; + result = __lambda11_ (self, (gdouble*) g); +#line 57 "../src/chart.vala" + return result; +#line 414 "chart.c" +} + +void +live_chart_chart_add_unaware_timestamp_collection (LiveChartChart* self, + LiveChartSerie* serie, + GeeCollection* collection, + gint timespan_between_value) +{ + Block1Data* _data1_; + gint _tmp0_; + gint _tmp1_; + LiveChartValues* _tmp2_; +#line 54 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 54 "../src/chart.vala" + g_return_if_fail (serie != NULL); +#line 54 "../src/chart.vala" + g_return_if_fail (collection != NULL); +#line 54 "../src/chart.vala" + _data1_ = g_slice_new0 (Block1Data); +#line 54 "../src/chart.vala" + _data1_->_ref_count_ = 1; +#line 54 "../src/chart.vala" + _data1_->self = g_object_ref (self); +#line 54 "../src/chart.vala" + _data1_->timespan_between_value = timespan_between_value; +#line 55 "../src/chart.vala" + _tmp0_ = gee_collection_get_size (collection); +#line 55 "../src/chart.vala" + _tmp1_ = _tmp0_; +#line 55 "../src/chart.vala" + _data1_->ts = (g_get_real_time () / 1000) - (_tmp1_ * _data1_->timespan_between_value); +#line 56 "../src/chart.vala" + _tmp2_ = live_chart_serie_get_values (serie); +#line 56 "../src/chart.vala" + _data1_->values = _tmp2_; +#line 57 "../src/chart.vala" + gee_traversable_foreach ((GeeTraversable*) collection, ___lambda11__gee_forall_func, _data1_); +#line 54 "../src/chart.vala" + block1_data_unref (_data1_); +#line 54 "../src/chart.vala" + _data1_ = NULL; +#line 457 "chart.c" +} + +void +live_chart_chart_add_unaware_timestamp_collection_by_index (LiveChartChart* self, + gint serie_index, + GeeCollection* collection, + gint timespan_between_value, + GError** error) +{ + GError* _inner_error0_ = NULL; +#line 65 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 65 "../src/chart.vala" + g_return_if_fail (collection != NULL); +#line 472 "chart.c" + { + LiveChartSerie* serie = NULL; + LiveChartSeries* _tmp0_; + LiveChartSerie* _tmp1_; + LiveChartSerie* _tmp2_; +#line 67 "../src/chart.vala" + _tmp0_ = self->series; +#line 67 "../src/chart.vala" + _tmp1_ = live_chart_series_get (_tmp0_, serie_index, &_inner_error0_); +#line 67 "../src/chart.vala" + serie = _tmp1_; +#line 67 "../src/chart.vala" + if (G_UNLIKELY (_inner_error0_ != NULL)) { +#line 67 "../src/chart.vala" + if (_inner_error0_->domain == LIVE_CHART_CHART_ERROR) { +#line 488 "chart.c" + goto __catch0_live_chart_chart_error; + } +#line 67 "../src/chart.vala" + 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); +#line 67 "../src/chart.vala" + g_clear_error (&_inner_error0_); +#line 67 "../src/chart.vala" + return; +#line 497 "chart.c" + } +#line 68 "../src/chart.vala" + _tmp2_ = serie; +#line 68 "../src/chart.vala" + live_chart_chart_add_unaware_timestamp_collection (self, _tmp2_, collection, timespan_between_value); +#line 66 "../src/chart.vala" + _g_object_unref0 (serie); +#line 505 "chart.c" + } + goto __finally0; + __catch0_live_chart_chart_error: + { + GError* e = NULL; + GError* _tmp3_; + GError* _tmp4_; +#line 66 "../src/chart.vala" + e = _inner_error0_; +#line 66 "../src/chart.vala" + _inner_error0_ = NULL; +#line 70 "../src/chart.vala" + _tmp3_ = e; +#line 70 "../src/chart.vala" + _tmp4_ = _g_error_copy0 (_tmp3_); +#line 70 "../src/chart.vala" + _inner_error0_ = _tmp4_; +#line 70 "../src/chart.vala" + _g_error_free0 (e); +#line 525 "chart.c" + goto __finally0; + } + __finally0: +#line 66 "../src/chart.vala" + if (G_UNLIKELY (_inner_error0_ != NULL)) { +#line 66 "../src/chart.vala" + if (_inner_error0_->domain == LIVE_CHART_CHART_ERROR) { +#line 66 "../src/chart.vala" + g_propagate_error (error, _inner_error0_); +#line 66 "../src/chart.vala" + return; +#line 537 "chart.c" + } else { +#line 66 "../src/chart.vala" + 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); +#line 66 "../src/chart.vala" + g_clear_error (&_inner_error0_); +#line 66 "../src/chart.vala" + return; +#line 545 "chart.c" + } + } +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 75 "../src/chart.vala" + return self ? g_object_ref (self) : NULL; +#line 555 "chart.c" +} + +void +live_chart_chart_to_png (LiveChartChart* self, + const gchar* filename, + GError** error) +{ + GdkWindow* window = NULL; + GdkWindow* _tmp0_; + GdkWindow* _tmp1_; + GdkPixbuf* pixbuff = NULL; + GdkPixbuf* _tmp3_; + GdkPixbuf* _tmp4_; + GError* _inner_error0_ = NULL; +#line 74 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 74 "../src/chart.vala" + g_return_if_fail (filename != NULL); +#line 75 "../src/chart.vala" + _tmp0_ = gtk_widget_get_window ((GtkWidget*) self); +#line 75 "../src/chart.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 75 "../src/chart.vala" + window = _tmp1_; +#line 76 "../src/chart.vala" + if (window == NULL) { +#line 582 "chart.c" + GError* _tmp2_; +#line 77 "../src/chart.vala" + _tmp2_ = g_error_new_literal (LIVE_CHART_CHART_ERROR, LIVE_CHART_CHART_ERROR_EXPORT_ERROR, "Chart is not realized yet"); +#line 77 "../src/chart.vala" + _inner_error0_ = _tmp2_; +#line 77 "../src/chart.vala" + g_propagate_error (error, _inner_error0_); +#line 77 "../src/chart.vala" + _g_object_unref0 (window); +#line 77 "../src/chart.vala" + return; +#line 594 "chart.c" + } +#line 79 "../src/chart.vala" + _tmp3_ = gdk_pixbuf_get_from_window (window, 0, 0, gdk_window_get_width (window), gdk_window_get_height (window)); +#line 79 "../src/chart.vala" + pixbuff = _tmp3_; +#line 80 "../src/chart.vala" + _tmp4_ = pixbuff; +#line 80 "../src/chart.vala" + if (_tmp4_ != NULL) { +#line 604 "chart.c" + GdkPixbuf* _tmp5_; +#line 81 "../src/chart.vala" + _tmp5_ = pixbuff; +#line 81 "../src/chart.vala" + gdk_pixbuf_save (_tmp5_, filename, "png", &_inner_error0_, NULL); +#line 81 "../src/chart.vala" + if (G_UNLIKELY (_inner_error0_ != NULL)) { +#line 81 "../src/chart.vala" + g_propagate_error (error, _inner_error0_); +#line 81 "../src/chart.vala" + _g_object_unref0 (pixbuff); +#line 81 "../src/chart.vala" + _g_object_unref0 (window); +#line 81 "../src/chart.vala" + return; +#line 620 "chart.c" + } + } +#line 74 "../src/chart.vala" + _g_object_unref0 (pixbuff); +#line 74 "../src/chart.vala" + _g_object_unref0 (window); +#line 627 "chart.c" +} + +static gboolean +__lambda10_ (LiveChartChart* self) +{ + gboolean result; +#line 90 "../src/chart.vala" + gtk_widget_queue_draw ((GtkWidget*) self); +#line 91 "../src/chart.vala" + result = TRUE; +#line 91 "../src/chart.vala" + return result; +#line 640 "chart.c" +} + +static gboolean +___lambda10__gsource_func (gpointer self) +{ + gboolean result; + result = __lambda10_ ((LiveChartChart*) self); +#line 89 "../src/chart.vala" + return result; +#line 650 "chart.c" +} + +void +live_chart_chart_refresh_every (LiveChartChart* self, + gint ms) +{ +#line 85 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 86 "../src/chart.vala" + if (self->priv->source_timeout != ((guint) 0)) { +#line 87 "../src/chart.vala" + g_source_remove (self->priv->source_timeout); +#line 663 "chart.c" + } +#line 89 "../src/chart.vala" + self->priv->source_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) ms, ___lambda10__gsource_func, g_object_ref (self), g_object_unref); +#line 667 "chart.c" +} + +static gboolean +live_chart_chart_render (LiveChartChart* self, + GtkWidget* _, + cairo_t* ctx) +{ + LiveChartConfig* _tmp0_; + LiveChartLegend* _tmp1_; + LiveChartBackground* _tmp2_; + LiveChartConfig* _tmp3_; + LiveChartGrid* _tmp4_; + LiveChartConfig* _tmp5_; + LiveChartLegend* _tmp6_; + LiveChartBoundaries boundaries = {0}; + LiveChartConfig* _tmp9_; + LiveChartBoundaries _tmp10_ = {0}; + gboolean result; +#line 95 "../src/chart.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 95 "../src/chart.vala" + g_return_val_if_fail (_ != NULL, FALSE); +#line 95 "../src/chart.vala" + g_return_val_if_fail (ctx != NULL, FALSE); +#line 97 "../src/chart.vala" + _tmp0_ = self->config; +#line 97 "../src/chart.vala" + _tmp1_ = self->priv->_legend; +#line 97 "../src/chart.vala" + live_chart_config_configure (_tmp0_, ctx, _tmp1_); +#line 99 "../src/chart.vala" + _tmp2_ = self->priv->_background; +#line 99 "../src/chart.vala" + _tmp3_ = self->config; +#line 99 "../src/chart.vala" + live_chart_drawable_draw ((LiveChartDrawable*) _tmp2_, ctx, _tmp3_); +#line 100 "../src/chart.vala" + _tmp4_ = self->priv->_grid; +#line 100 "../src/chart.vala" + _tmp5_ = self->config; +#line 100 "../src/chart.vala" + live_chart_drawable_draw ((LiveChartDrawable*) _tmp4_, ctx, _tmp5_); +#line 101 "../src/chart.vala" + _tmp6_ = self->priv->_legend; +#line 101 "../src/chart.vala" + if (_tmp6_ != NULL) { +#line 714 "chart.c" + LiveChartLegend* _tmp7_; + LiveChartConfig* _tmp8_; +#line 101 "../src/chart.vala" + _tmp7_ = self->priv->_legend; +#line 101 "../src/chart.vala" + _tmp8_ = self->config; +#line 101 "../src/chart.vala" + live_chart_legend_draw (_tmp7_, ctx, _tmp8_); +#line 723 "chart.c" + } +#line 103 "../src/chart.vala" + _tmp9_ = self->config; +#line 103 "../src/chart.vala" + live_chart_config_boundaries (_tmp9_, &_tmp10_); +#line 103 "../src/chart.vala" + boundaries = _tmp10_; +#line 731 "chart.c" + { + GeeIterator* _serie_it = NULL; + LiveChartSeries* _tmp11_; + GeeIterator* _tmp12_; +#line 104 "../src/chart.vala" + _tmp11_ = self->series; +#line 104 "../src/chart.vala" + _tmp12_ = live_chart_series_iterator (_tmp11_); +#line 104 "../src/chart.vala" + _serie_it = _tmp12_; +#line 104 "../src/chart.vala" + while (TRUE) { +#line 744 "chart.c" + GeeIterator* _tmp13_; + LiveChartDrawable* serie = NULL; + GeeIterator* _tmp14_; + gpointer _tmp15_; + LiveChartBoundaries _tmp16_; + LiveChartBoundary _tmp17_; + LiveChartBoundaries _tmp18_; + LiveChartBoundary _tmp19_; + LiveChartBoundaries _tmp20_; + LiveChartBoundary _tmp21_; + LiveChartBoundaries _tmp22_; + LiveChartBoundary _tmp23_; + LiveChartDrawable* _tmp24_; + LiveChartConfig* _tmp25_; +#line 104 "../src/chart.vala" + _tmp13_ = _serie_it; +#line 104 "../src/chart.vala" + if (!gee_iterator_next (_tmp13_)) { +#line 104 "../src/chart.vala" + break; +#line 765 "chart.c" + } +#line 104 "../src/chart.vala" + _tmp14_ = _serie_it; +#line 104 "../src/chart.vala" + _tmp15_ = gee_iterator_get (_tmp14_); +#line 104 "../src/chart.vala" + serie = (LiveChartDrawable*) ((LiveChartSerie*) _tmp15_); +#line 105 "../src/chart.vala" + _tmp16_ = boundaries; +#line 105 "../src/chart.vala" + _tmp17_ = _tmp16_.x; +#line 105 "../src/chart.vala" + _tmp18_ = boundaries; +#line 105 "../src/chart.vala" + _tmp19_ = _tmp18_.y; +#line 105 "../src/chart.vala" + _tmp20_ = boundaries; +#line 105 "../src/chart.vala" + _tmp21_ = _tmp20_.x; +#line 105 "../src/chart.vala" + _tmp22_ = boundaries; +#line 105 "../src/chart.vala" + _tmp23_ = _tmp22_.y; +#line 105 "../src/chart.vala" + cairo_rectangle (ctx, (gdouble) _tmp17_.min, (gdouble) _tmp19_.min, (gdouble) _tmp21_.max, (gdouble) _tmp23_.max); +#line 106 "../src/chart.vala" + cairo_clip (ctx); +#line 107 "../src/chart.vala" + _tmp24_ = serie; +#line 107 "../src/chart.vala" + _tmp25_ = self->config; +#line 107 "../src/chart.vala" + live_chart_drawable_draw (_tmp24_, ctx, _tmp25_); +#line 104 "../src/chart.vala" + _g_object_unref0 (serie); +#line 801 "chart.c" + } +#line 104 "../src/chart.vala" + _g_object_unref0 (_serie_it); +#line 805 "chart.c" + } +#line 110 "../src/chart.vala" + result = TRUE; +#line 110 "../src/chart.vala" + return result; +#line 811 "chart.c" +} + +LiveChartGrid* +live_chart_chart_get_grid (LiveChartChart* self) +{ + LiveChartGrid* result; + LiveChartGrid* _tmp0_; +#line 13 "../src/chart.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 13 "../src/chart.vala" + _tmp0_ = self->priv->_grid; +#line 13 "../src/chart.vala" + result = _tmp0_; +#line 13 "../src/chart.vala" + return result; +#line 827 "chart.c" +} + +void +live_chart_chart_set_grid (LiveChartChart* self, + LiveChartGrid* value) +{ + LiveChartGrid* old_value; +#line 13 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 13 "../src/chart.vala" + old_value = live_chart_chart_get_grid (self); +#line 13 "../src/chart.vala" + if (old_value != value) { +#line 841 "chart.c" + LiveChartGrid* _tmp0_; +#line 13 "../src/chart.vala" + _tmp0_ = _g_object_ref0 (value); +#line 13 "../src/chart.vala" + _g_object_unref0 (self->priv->_grid); +#line 13 "../src/chart.vala" + self->priv->_grid = _tmp0_; +#line 13 "../src/chart.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_chart_properties[LIVE_CHART_CHART_GRID_PROPERTY]); +#line 851 "chart.c" + } +} + +LiveChartBackground* +live_chart_chart_get_background (LiveChartChart* self) +{ + LiveChartBackground* result; + LiveChartBackground* _tmp0_; +#line 14 "../src/chart.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 14 "../src/chart.vala" + _tmp0_ = self->priv->_background; +#line 14 "../src/chart.vala" + result = _tmp0_; +#line 14 "../src/chart.vala" + return result; +#line 868 "chart.c" +} + +void +live_chart_chart_set_background (LiveChartChart* self, + LiveChartBackground* value) +{ + LiveChartBackground* old_value; +#line 14 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 14 "../src/chart.vala" + old_value = live_chart_chart_get_background (self); +#line 14 "../src/chart.vala" + if (old_value != value) { +#line 882 "chart.c" + LiveChartBackground* _tmp0_; +#line 14 "../src/chart.vala" + _tmp0_ = _g_object_ref0 (value); +#line 14 "../src/chart.vala" + _g_object_unref0 (self->priv->_background); +#line 14 "../src/chart.vala" + self->priv->_background = _tmp0_; +#line 14 "../src/chart.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_chart_properties[LIVE_CHART_CHART_BACKGROUND_PROPERTY]); +#line 892 "chart.c" + } +} + +LiveChartLegend* +live_chart_chart_get_legend (LiveChartChart* self) +{ + LiveChartLegend* result; + LiveChartLegend* _tmp0_; +#line 15 "../src/chart.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 15 "../src/chart.vala" + _tmp0_ = self->priv->_legend; +#line 15 "../src/chart.vala" + result = _tmp0_; +#line 15 "../src/chart.vala" + return result; +#line 909 "chart.c" +} + +void +live_chart_chart_set_legend (LiveChartChart* self, + LiveChartLegend* value) +{ + LiveChartLegend* old_value; +#line 15 "../src/chart.vala" + g_return_if_fail (self != NULL); +#line 15 "../src/chart.vala" + old_value = live_chart_chart_get_legend (self); +#line 15 "../src/chart.vala" + if (old_value != value) { +#line 923 "chart.c" + LiveChartLegend* _tmp0_; +#line 15 "../src/chart.vala" + _tmp0_ = _g_object_ref0 (value); +#line 15 "../src/chart.vala" + _g_object_unref0 (self->priv->_legend); +#line 15 "../src/chart.vala" + self->priv->_legend = _tmp0_; +#line 15 "../src/chart.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_chart_properties[LIVE_CHART_CHART_LEGEND_PROPERTY]); +#line 933 "chart.c" + } +} + +static void +live_chart_chart_class_init (LiveChartChartClass * klass, + gpointer klass_data) +{ +#line 11 "../src/chart.vala" + live_chart_chart_parent_class = g_type_class_peek_parent (klass); +#line 11 "../src/chart.vala" + g_type_class_adjust_private_offset (klass, &LiveChartChart_private_offset); +#line 11 "../src/chart.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_chart_get_property; +#line 11 "../src/chart.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_chart_set_property; +#line 11 "../src/chart.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_chart_finalize; +#line 11 "../src/chart.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_CHART_GRID_PROPERTY, live_chart_chart_properties[LIVE_CHART_CHART_GRID_PROPERTY] = g_param_spec_object ("grid", "grid", "grid", LIVE_CHART_TYPE_GRID, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 11 "../src/chart.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_CHART_BACKGROUND_PROPERTY, live_chart_chart_properties[LIVE_CHART_CHART_BACKGROUND_PROPERTY] = g_param_spec_object ("background", "background", "background", LIVE_CHART_TYPE_BACKGROUND, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 11 "../src/chart.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_CHART_LEGEND_PROPERTY, live_chart_chart_properties[LIVE_CHART_CHART_LEGEND_PROPERTY] = g_param_spec_object ("legend", "legend", "legend", LIVE_CHART_TYPE_LEGEND, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 957 "chart.c" +} + +static void +live_chart_chart_instance_init (LiveChartChart * self, + gpointer klass) +{ + LiveChartGrid* _tmp0_; + LiveChartBackground* _tmp1_; + LiveChartHorizontalLegend* _tmp2_; +#line 11 "../src/chart.vala" + self->priv = live_chart_chart_get_instance_private (self); +#line 13 "../src/chart.vala" + _tmp0_ = live_chart_grid_new (); +#line 13 "../src/chart.vala" + self->priv->_grid = _tmp0_; +#line 14 "../src/chart.vala" + _tmp1_ = live_chart_background_new (); +#line 14 "../src/chart.vala" + self->priv->_background = _tmp1_; +#line 15 "../src/chart.vala" + _tmp2_ = live_chart_horizontal_legend_new (); +#line 15 "../src/chart.vala" + self->priv->_legend = (LiveChartLegend*) _tmp2_; +#line 19 "../src/chart.vala" + self->priv->source_timeout = (guint) 0; +#line 983 "chart.c" +} + +static void +live_chart_chart_finalize (GObject * obj) +{ + LiveChartChart * self; +#line 11 "../src/chart.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_CHART, LiveChartChart); +#line 13 "../src/chart.vala" + _g_object_unref0 (self->priv->_grid); +#line 14 "../src/chart.vala" + _g_object_unref0 (self->priv->_background); +#line 15 "../src/chart.vala" + _g_object_unref0 (self->priv->_legend); +#line 16 "../src/chart.vala" + _live_chart_config_unref0 (self->config); +#line 17 "../src/chart.vala" + _g_object_unref0 (self->series); +#line 11 "../src/chart.vala" + G_OBJECT_CLASS (live_chart_chart_parent_class)->finalize (obj); +#line 1004 "chart.c" +} + +static GType +live_chart_chart_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartChartClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_chart_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartChart), 0, (GInstanceInitFunc) live_chart_chart_instance_init, NULL }; + GType live_chart_chart_type_id; + live_chart_chart_type_id = g_type_register_static (gtk_drawing_area_get_type (), "LiveChartChart", &g_define_type_info, 0); + LiveChartChart_private_offset = g_type_add_instance_private (live_chart_chart_type_id, sizeof (LiveChartChartPrivate)); + return live_chart_chart_type_id; +} + +GType +live_chart_chart_get_type (void) +{ + static volatile gsize live_chart_chart_type_id__once = 0; + if (g_once_init_enter (&live_chart_chart_type_id__once)) { + GType live_chart_chart_type_id; + live_chart_chart_type_id = live_chart_chart_get_type_once (); + g_once_init_leave (&live_chart_chart_type_id__once, live_chart_chart_type_id); + } + return live_chart_chart_type_id__once; +} + +static void +_vala_live_chart_chart_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartChart * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_CHART, LiveChartChart); +#line 11 "../src/chart.vala" + switch (property_id) { +#line 11 "../src/chart.vala" + case LIVE_CHART_CHART_GRID_PROPERTY: +#line 11 "../src/chart.vala" + g_value_set_object (value, live_chart_chart_get_grid (self)); +#line 11 "../src/chart.vala" + break; +#line 11 "../src/chart.vala" + case LIVE_CHART_CHART_BACKGROUND_PROPERTY: +#line 11 "../src/chart.vala" + g_value_set_object (value, live_chart_chart_get_background (self)); +#line 11 "../src/chart.vala" + break; +#line 11 "../src/chart.vala" + case LIVE_CHART_CHART_LEGEND_PROPERTY: +#line 11 "../src/chart.vala" + g_value_set_object (value, live_chart_chart_get_legend (self)); +#line 11 "../src/chart.vala" + break; +#line 1057 "chart.c" + default: +#line 11 "../src/chart.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 11 "../src/chart.vala" + break; +#line 1063 "chart.c" + } +} + +static void +_vala_live_chart_chart_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartChart * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_CHART, LiveChartChart); +#line 11 "../src/chart.vala" + switch (property_id) { +#line 11 "../src/chart.vala" + case LIVE_CHART_CHART_GRID_PROPERTY: +#line 11 "../src/chart.vala" + live_chart_chart_set_grid (self, g_value_get_object (value)); +#line 11 "../src/chart.vala" + break; +#line 11 "../src/chart.vala" + case LIVE_CHART_CHART_BACKGROUND_PROPERTY: +#line 11 "../src/chart.vala" + live_chart_chart_set_background (self, g_value_get_object (value)); +#line 11 "../src/chart.vala" + break; +#line 11 "../src/chart.vala" + case LIVE_CHART_CHART_LEGEND_PROPERTY: +#line 11 "../src/chart.vala" + live_chart_chart_set_legend (self, g_value_get_object (value)); +#line 11 "../src/chart.vala" + break; +#line 1095 "chart.c" + default: +#line 11 "../src/chart.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 11 "../src/chart.vala" + break; +#line 1101 "chart.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/config.c b/iPDC/lib/liblivechart_static.a.p/config.c new file mode 100644 index 0000000..77981ef --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/config.c @@ -0,0 +1,1046 @@ +/* config.c generated by valac 0.56.0, the Vala compiler + * generated from config.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include + +#define _live_chart_yaxis_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_yaxis_unref (var), NULL))) +#define _live_chart_xaxis_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_xaxis_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) +typedef struct _LiveChartParamSpecConfig LiveChartParamSpecConfig; + +struct _LiveChartConfigPrivate { + gint _width; + gint _height; +}; + +struct _LiveChartParamSpecConfig { + GParamSpec parent_instance; +}; + +static gint LiveChartConfig_private_offset; +static gpointer live_chart_config_parent_class = NULL; + +static void live_chart_config_configure_y_max_labels_extents (LiveChartConfig* self, + cairo_t* ctx); +static void live_chart_config_configure_x_max_labels_extents (LiveChartConfig* self, + cairo_t* ctx); +static void live_chart_config_finalize (LiveChartConfig * obj); +static GType live_chart_config_get_type_once (void); + +static GType +live_chart_auto_padding_get_type_once (void) +{ + static const GFlagsValue values[] = {{LIVE_CHART_AUTO_PADDING_NONE, "LIVE_CHART_AUTO_PADDING_NONE", "none"}, {LIVE_CHART_AUTO_PADDING_TOP, "LIVE_CHART_AUTO_PADDING_TOP", "top"}, {LIVE_CHART_AUTO_PADDING_RIGHT, "LIVE_CHART_AUTO_PADDING_RIGHT", "right"}, {LIVE_CHART_AUTO_PADDING_BOTTOM, "LIVE_CHART_AUTO_PADDING_BOTTOM", "bottom"}, {LIVE_CHART_AUTO_PADDING_LEFT, "LIVE_CHART_AUTO_PADDING_LEFT", "left"}, {0, NULL, NULL}}; + GType live_chart_auto_padding_type_id; + live_chart_auto_padding_type_id = g_flags_register_static ("LiveChartAutoPadding", values); + return live_chart_auto_padding_type_id; +} + +GType +live_chart_auto_padding_get_type (void) +{ + static volatile gsize live_chart_auto_padding_type_id__once = 0; + if (g_once_init_enter (&live_chart_auto_padding_type_id__once)) { + GType live_chart_auto_padding_type_id; + live_chart_auto_padding_type_id = live_chart_auto_padding_get_type_once (); + g_once_init_leave (&live_chart_auto_padding_type_id__once, live_chart_auto_padding_type_id); + } + return live_chart_auto_padding_type_id__once; +} + +void +live_chart_padding_init (LiveChartPadding *self) +{ +#line 21 "../src/config.vala" + memset (self, 0, sizeof (LiveChartPadding)); +#line 22 "../src/config.vala" + (*self).smart = ((LIVE_CHART_AUTO_PADDING_TOP | LIVE_CHART_AUTO_PADDING_RIGHT) | LIVE_CHART_AUTO_PADDING_BOTTOM) | LIVE_CHART_AUTO_PADDING_LEFT; +#line 23 "../src/config.vala" + (*self).top = 20; +#line 24 "../src/config.vala" + (*self).right = 20; +#line 25 "../src/config.vala" + (*self).bottom = 20; +#line 26 "../src/config.vala" + (*self).left = 20; +#line 73 "config.c" +} + +LiveChartPadding* +live_chart_padding_dup (const LiveChartPadding* self) +{ + LiveChartPadding* dup; +#line 14 "../src/config.vala" + dup = g_new0 (LiveChartPadding, 1); +#line 14 "../src/config.vala" + memcpy (dup, self, sizeof (LiveChartPadding)); +#line 14 "../src/config.vala" + return dup; +#line 86 "config.c" +} + +void +live_chart_padding_free (LiveChartPadding* self) +{ +#line 14 "../src/config.vala" + g_free (self); +#line 94 "config.c" +} + +static GType +live_chart_padding_get_type_once (void) +{ + GType live_chart_padding_type_id; + live_chart_padding_type_id = g_boxed_type_register_static ("LiveChartPadding", (GBoxedCopyFunc) live_chart_padding_dup, (GBoxedFreeFunc) live_chart_padding_free); + return live_chart_padding_type_id; +} + +GType +live_chart_padding_get_type (void) +{ + static volatile gsize live_chart_padding_type_id__once = 0; + if (g_once_init_enter (&live_chart_padding_type_id__once)) { + GType live_chart_padding_type_id; + live_chart_padding_type_id = live_chart_padding_get_type_once (); + g_once_init_leave (&live_chart_padding_type_id__once, live_chart_padding_type_id); + } + return live_chart_padding_type_id__once; +} + +LiveChartBoundary* +live_chart_boundary_dup (const LiveChartBoundary* self) +{ + LiveChartBoundary* dup; +#line 30 "../src/config.vala" + dup = g_new0 (LiveChartBoundary, 1); +#line 30 "../src/config.vala" + memcpy (dup, self, sizeof (LiveChartBoundary)); +#line 30 "../src/config.vala" + return dup; +#line 127 "config.c" +} + +void +live_chart_boundary_free (LiveChartBoundary* self) +{ +#line 30 "../src/config.vala" + g_free (self); +#line 135 "config.c" +} + +static GType +live_chart_boundary_get_type_once (void) +{ + GType live_chart_boundary_type_id; + live_chart_boundary_type_id = g_boxed_type_register_static ("LiveChartBoundary", (GBoxedCopyFunc) live_chart_boundary_dup, (GBoxedFreeFunc) live_chart_boundary_free); + return live_chart_boundary_type_id; +} + +GType +live_chart_boundary_get_type (void) +{ + static volatile gsize live_chart_boundary_type_id__once = 0; + if (g_once_init_enter (&live_chart_boundary_type_id__once)) { + GType live_chart_boundary_type_id; + live_chart_boundary_type_id = live_chart_boundary_get_type_once (); + g_once_init_leave (&live_chart_boundary_type_id__once, live_chart_boundary_type_id); + } + return live_chart_boundary_type_id__once; +} + +LiveChartBoundaries* +live_chart_boundaries_dup (const LiveChartBoundaries* self) +{ + LiveChartBoundaries* dup; +#line 35 "../src/config.vala" + dup = g_new0 (LiveChartBoundaries, 1); +#line 35 "../src/config.vala" + memcpy (dup, self, sizeof (LiveChartBoundaries)); +#line 35 "../src/config.vala" + return dup; +#line 168 "config.c" +} + +void +live_chart_boundaries_free (LiveChartBoundaries* self) +{ +#line 35 "../src/config.vala" + g_free (self); +#line 176 "config.c" +} + +static GType +live_chart_boundaries_get_type_once (void) +{ + GType live_chart_boundaries_type_id; + live_chart_boundaries_type_id = g_boxed_type_register_static ("LiveChartBoundaries", (GBoxedCopyFunc) live_chart_boundaries_dup, (GBoxedFreeFunc) live_chart_boundaries_free); + return live_chart_boundaries_type_id; +} + +GType +live_chart_boundaries_get_type (void) +{ + static volatile gsize live_chart_boundaries_type_id__once = 0; + if (g_once_init_enter (&live_chart_boundaries_type_id__once)) { + GType live_chart_boundaries_type_id; + live_chart_boundaries_type_id = live_chart_boundaries_get_type_once (); + g_once_init_leave (&live_chart_boundaries_type_id__once, live_chart_boundaries_type_id); + } + return live_chart_boundaries_type_id__once; +} + +static inline gpointer +live_chart_config_get_instance_private (LiveChartConfig* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartConfig_private_offset); +} + +void +live_chart_config_boundaries (LiveChartConfig* self, + LiveChartBoundaries* result) +{ + LiveChartPadding _tmp0_; + gint _tmp1_; + LiveChartPadding _tmp2_; + LiveChartBoundary _tmp3_ = {0}; + LiveChartPadding _tmp4_; + gint _tmp5_; + LiveChartPadding _tmp6_; + LiveChartBoundary _tmp7_ = {0}; + gint _tmp8_; + LiveChartPadding _tmp9_; + LiveChartPadding _tmp10_; + gint _tmp11_; + LiveChartPadding _tmp12_; + LiveChartPadding _tmp13_; + LiveChartBoundaries _tmp14_ = {0}; +#line 59 "../src/config.vala" + g_return_if_fail (self != NULL); +#line 60 "../src/config.vala" + _tmp0_ = self->padding; +#line 60 "../src/config.vala" + _tmp1_ = self->priv->_width; +#line 60 "../src/config.vala" + _tmp2_ = self->padding; +#line 60 "../src/config.vala" + _tmp3_.min = _tmp0_.left; +#line 60 "../src/config.vala" + _tmp3_.max = _tmp1_ - _tmp2_.right; +#line 60 "../src/config.vala" + _tmp4_ = self->padding; +#line 60 "../src/config.vala" + _tmp5_ = self->priv->_height; +#line 60 "../src/config.vala" + _tmp6_ = self->padding; +#line 60 "../src/config.vala" + _tmp7_.min = _tmp4_.top; +#line 60 "../src/config.vala" + _tmp7_.max = _tmp5_ - _tmp6_.bottom; +#line 60 "../src/config.vala" + _tmp8_ = self->priv->_width; +#line 60 "../src/config.vala" + _tmp9_ = self->padding; +#line 60 "../src/config.vala" + _tmp10_ = self->padding; +#line 60 "../src/config.vala" + _tmp11_ = self->priv->_height; +#line 60 "../src/config.vala" + _tmp12_ = self->padding; +#line 60 "../src/config.vala" + _tmp13_ = self->padding; +#line 60 "../src/config.vala" + memset (&_tmp14_, 0, sizeof (LiveChartBoundaries)); +#line 60 "../src/config.vala" + _tmp14_.x = _tmp3_; +#line 60 "../src/config.vala" + _tmp14_.y = _tmp7_; +#line 60 "../src/config.vala" + _tmp14_.width = (_tmp8_ - _tmp9_.right) - _tmp10_.left; +#line 60 "../src/config.vala" + _tmp14_.height = (_tmp11_ - _tmp12_.bottom) - _tmp13_.top; +#line 60 "../src/config.vala" + *result = _tmp14_; +#line 60 "../src/config.vala" + return; +#line 272 "config.c" +} + +void +live_chart_config_configure (LiveChartConfig* self, + cairo_t* ctx, + LiveChartLegend* legend) +{ + LiveChartPadding _tmp0_; + LiveChartPadding _tmp5_; + LiveChartPadding _tmp10_; + LiveChartPadding _tmp15_; + gboolean _tmp16_ = FALSE; + LiveChartYAxis* _tmp20_; + LiveChartBoundaries _tmp21_ = {0}; +#line 68 "../src/config.vala" + g_return_if_fail (self != NULL); +#line 68 "../src/config.vala" + g_return_if_fail (ctx != NULL); +#line 69 "../src/config.vala" + live_chart_config_configure_y_max_labels_extents (self, ctx); +#line 70 "../src/config.vala" + live_chart_config_configure_x_max_labels_extents (self, ctx); +#line 72 "../src/config.vala" + _tmp0_ = self->padding; +#line 72 "../src/config.vala" + if ((_tmp0_.smart & LIVE_CHART_AUTO_PADDING_RIGHT) == LIVE_CHART_AUTO_PADDING_RIGHT) { +#line 299 "config.c" + LiveChartXAxis* _tmp1_; + LiveChartLabels* _tmp2_; + cairo_text_extents_t _tmp3_ = {0}; + cairo_text_extents_t _tmp4_; +#line 72 "../src/config.vala" + _tmp1_ = self->x_axis; +#line 72 "../src/config.vala" + _tmp2_ = _tmp1_->labels; +#line 72 "../src/config.vala" + live_chart_labels_get_extents (_tmp2_, &_tmp3_); +#line 72 "../src/config.vala" + _tmp4_ = _tmp3_; +#line 72 "../src/config.vala" + self->padding.right = 10 + (((gint) _tmp4_.width) / 2); +#line 314 "config.c" + } +#line 73 "../src/config.vala" + _tmp5_ = self->padding; +#line 73 "../src/config.vala" + if ((_tmp5_.smart & LIVE_CHART_AUTO_PADDING_LEFT) == LIVE_CHART_AUTO_PADDING_LEFT) { +#line 320 "config.c" + LiveChartYAxis* _tmp6_; + LiveChartLabels* _tmp7_; + cairo_text_extents_t _tmp8_ = {0}; + cairo_text_extents_t _tmp9_; +#line 73 "../src/config.vala" + _tmp6_ = self->y_axis; +#line 73 "../src/config.vala" + _tmp7_ = _tmp6_->labels; +#line 73 "../src/config.vala" + live_chart_labels_get_extents (_tmp7_, &_tmp8_); +#line 73 "../src/config.vala" + _tmp9_ = _tmp8_; +#line 73 "../src/config.vala" + self->padding.left = (gint) _tmp9_.width; +#line 335 "config.c" + } +#line 74 "../src/config.vala" + _tmp10_ = self->padding; +#line 74 "../src/config.vala" + if ((_tmp10_.smart & LIVE_CHART_AUTO_PADDING_BOTTOM) == LIVE_CHART_AUTO_PADDING_BOTTOM) { +#line 341 "config.c" + LiveChartXAxis* _tmp11_; + LiveChartLabels* _tmp12_; + cairo_text_extents_t _tmp13_ = {0}; + cairo_text_extents_t _tmp14_; +#line 74 "../src/config.vala" + _tmp11_ = self->x_axis; +#line 74 "../src/config.vala" + _tmp12_ = _tmp11_->labels; +#line 74 "../src/config.vala" + live_chart_labels_get_extents (_tmp12_, &_tmp13_); +#line 74 "../src/config.vala" + _tmp14_ = _tmp13_; +#line 74 "../src/config.vala" + self->padding.bottom = 15 + ((gint) _tmp14_.height); +#line 356 "config.c" + } +#line 75 "../src/config.vala" + _tmp15_ = self->padding; +#line 75 "../src/config.vala" + if ((_tmp15_.smart & LIVE_CHART_AUTO_PADDING_TOP) == LIVE_CHART_AUTO_PADDING_TOP) { +#line 75 "../src/config.vala" + self->padding.top = 10; +#line 364 "config.c" + } +#line 77 "../src/config.vala" + if (legend != NULL) { +#line 368 "config.c" + LiveChartPadding _tmp17_; +#line 77 "../src/config.vala" + _tmp17_ = self->padding; +#line 77 "../src/config.vala" + _tmp16_ = (_tmp17_.smart & LIVE_CHART_AUTO_PADDING_BOTTOM) == LIVE_CHART_AUTO_PADDING_BOTTOM; +#line 374 "config.c" + } else { +#line 77 "../src/config.vala" + _tmp16_ = FALSE; +#line 378 "config.c" + } +#line 77 "../src/config.vala" + if (_tmp16_) { +#line 382 "config.c" + LiveChartPadding _tmp18_; + LiveChartBoundingBox _tmp19_ = {0}; +#line 77 "../src/config.vala" + _tmp18_ = self->padding; +#line 77 "../src/config.vala" + live_chart_drawable_get_bounding_box ((LiveChartDrawable*) legend, &_tmp19_); +#line 77 "../src/config.vala" + self->padding.bottom = (_tmp18_.bottom + ((gint) _tmp19_.height)) + 5; +#line 391 "config.c" + } +#line 79 "../src/config.vala" + _tmp20_ = self->y_axis; +#line 79 "../src/config.vala" + live_chart_config_boundaries (self, &_tmp21_); +#line 79 "../src/config.vala" + live_chart_yaxis_update (_tmp20_, _tmp21_.height); +#line 399 "config.c" +} + +static void +live_chart_config_configure_y_max_labels_extents (LiveChartConfig* self, + cairo_t* ctx) +{ + cairo_text_extents_t extents = {0}; + gboolean _tmp0_ = FALSE; + LiveChartYAxis* _tmp1_; + gboolean _tmp2_; + gboolean _tmp3_; + LiveChartYAxis* _tmp29_; + LiveChartLabels* _tmp30_; + cairo_text_extents_t _tmp31_; +#line 82 "../src/config.vala" + g_return_if_fail (self != NULL); +#line 82 "../src/config.vala" + g_return_if_fail (ctx != NULL); +#line 84 "../src/config.vala" + _tmp1_ = self->y_axis; +#line 84 "../src/config.vala" + _tmp2_ = live_chart_yaxis_get_visible (_tmp1_); +#line 84 "../src/config.vala" + _tmp3_ = _tmp2_; +#line 84 "../src/config.vala" + if (_tmp3_) { +#line 426 "config.c" + LiveChartYAxis* _tmp4_; + LiveChartLabels* _tmp5_; + gboolean _tmp6_; + gboolean _tmp7_; +#line 84 "../src/config.vala" + _tmp4_ = self->y_axis; +#line 84 "../src/config.vala" + _tmp5_ = _tmp4_->labels; +#line 84 "../src/config.vala" + _tmp6_ = live_chart_labels_get_visible (_tmp5_); +#line 84 "../src/config.vala" + _tmp7_ = _tmp6_; +#line 84 "../src/config.vala" + _tmp0_ = _tmp7_; +#line 441 "config.c" + } else { +#line 84 "../src/config.vala" + _tmp0_ = FALSE; +#line 445 "config.c" + } +#line 84 "../src/config.vala" + if (_tmp0_) { +#line 449 "config.c" + LiveChartYAxis* _tmp8_; + LiveChartLabels* _tmp9_; + LiveChartFont* _tmp10_; + LiveChartFont* _tmp11_; + const gchar* _tmp12_ = NULL; + LiveChartYAxis* _tmp13_; + const gchar* _tmp14_; + const gchar* _tmp15_; + gint _tmp16_; + gint _tmp17_; + gchar* spaces = NULL; + gchar* _tmp21_; + LiveChartYAxis* _tmp22_; + gchar* _tmp23_; + gchar* _tmp24_; + const gchar* _tmp25_; + gchar* _tmp26_; + gchar* _tmp27_; + cairo_text_extents_t _tmp28_ = {0}; +#line 85 "../src/config.vala" + _tmp8_ = self->y_axis; +#line 85 "../src/config.vala" + _tmp9_ = _tmp8_->labels; +#line 85 "../src/config.vala" + _tmp10_ = live_chart_labels_get_font (_tmp9_); +#line 85 "../src/config.vala" + _tmp11_ = _tmp10_; +#line 85 "../src/config.vala" + live_chart_font_configure (_tmp11_, ctx); +#line 87 "../src/config.vala" + _tmp13_ = self->y_axis; +#line 87 "../src/config.vala" + _tmp14_ = live_chart_yaxis_get_unit (_tmp13_); +#line 87 "../src/config.vala" + _tmp15_ = _tmp14_; +#line 87 "../src/config.vala" + _tmp16_ = strlen (_tmp15_); +#line 87 "../src/config.vala" + _tmp17_ = _tmp16_; +#line 87 "../src/config.vala" + if (_tmp17_ == 0) { +#line 87 "../src/config.vala" + _tmp12_ = "__"; +#line 493 "config.c" + } else { + LiveChartYAxis* _tmp18_; + const gchar* _tmp19_; + const gchar* _tmp20_; +#line 87 "../src/config.vala" + _tmp18_ = self->y_axis; +#line 87 "../src/config.vala" + _tmp19_ = live_chart_yaxis_get_unit (_tmp18_); +#line 87 "../src/config.vala" + _tmp20_ = _tmp19_; +#line 87 "../src/config.vala" + _tmp12_ = _tmp20_; +#line 506 "config.c" + } +#line 87 "../src/config.vala" + _tmp21_ = g_strdup (_tmp12_); +#line 87 "../src/config.vala" + spaces = _tmp21_; +#line 88 "../src/config.vala" + _tmp22_ = self->y_axis; +#line 88 "../src/config.vala" + _tmp23_ = live_chart_yaxis_get_max_displayed_value (_tmp22_); +#line 88 "../src/config.vala" + _tmp24_ = _tmp23_; +#line 88 "../src/config.vala" + _tmp25_ = spaces; +#line 88 "../src/config.vala" + _tmp26_ = g_strconcat (_tmp24_, _tmp25_, NULL); +#line 88 "../src/config.vala" + _tmp27_ = _tmp26_; +#line 88 "../src/config.vala" + cairo_text_extents (ctx, _tmp27_, &_tmp28_); +#line 88 "../src/config.vala" + extents = _tmp28_; +#line 88 "../src/config.vala" + _g_free0 (_tmp27_); +#line 88 "../src/config.vala" + _g_free0 (_tmp24_); +#line 84 "../src/config.vala" + _g_free0 (spaces); +#line 534 "config.c" + } else { +#line 90 "../src/config.vala" + memset (&extents, 0, sizeof (cairo_text_extents_t)); +#line 91 "../src/config.vala" + extents.height = 0.0; +#line 92 "../src/config.vala" + extents.width = 0.0; +#line 93 "../src/config.vala" + extents.x_advance = 0.0; +#line 94 "../src/config.vala" + extents.x_bearing = 0.0; +#line 95 "../src/config.vala" + extents.y_advance = 0.0; +#line 96 "../src/config.vala" + extents.y_bearing = 0.0; +#line 550 "config.c" + } +#line 99 "../src/config.vala" + _tmp29_ = self->y_axis; +#line 99 "../src/config.vala" + _tmp30_ = _tmp29_->labels; +#line 99 "../src/config.vala" + _tmp31_ = extents; +#line 99 "../src/config.vala" + live_chart_labels_set_extents (_tmp30_, &_tmp31_); +#line 560 "config.c" +} + +static void +live_chart_config_configure_x_max_labels_extents (LiveChartConfig* self, + cairo_t* ctx) +{ + cairo_text_extents_t extents = {0}; + gboolean _tmp0_ = FALSE; + LiveChartXAxis* _tmp1_; + gboolean _tmp2_; + gboolean _tmp3_; + LiveChartXAxis* _tmp15_; + LiveChartLabels* _tmp16_; + cairo_text_extents_t _tmp17_; +#line 102 "../src/config.vala" + g_return_if_fail (self != NULL); +#line 102 "../src/config.vala" + g_return_if_fail (ctx != NULL); +#line 104 "../src/config.vala" + _tmp1_ = self->x_axis; +#line 104 "../src/config.vala" + _tmp2_ = live_chart_xaxis_get_visible (_tmp1_); +#line 104 "../src/config.vala" + _tmp3_ = _tmp2_; +#line 104 "../src/config.vala" + if (_tmp3_) { +#line 587 "config.c" + LiveChartXAxis* _tmp4_; + LiveChartLabels* _tmp5_; + gboolean _tmp6_; + gboolean _tmp7_; +#line 104 "../src/config.vala" + _tmp4_ = self->x_axis; +#line 104 "../src/config.vala" + _tmp5_ = _tmp4_->labels; +#line 104 "../src/config.vala" + _tmp6_ = live_chart_labels_get_visible (_tmp5_); +#line 104 "../src/config.vala" + _tmp7_ = _tmp6_; +#line 104 "../src/config.vala" + _tmp0_ = _tmp7_; +#line 602 "config.c" + } else { +#line 104 "../src/config.vala" + _tmp0_ = FALSE; +#line 606 "config.c" + } +#line 104 "../src/config.vala" + if (_tmp0_) { +#line 610 "config.c" + LiveChartXAxis* _tmp8_; + LiveChartLabels* _tmp9_; + LiveChartFont* _tmp10_; + LiveChartFont* _tmp11_; + gchar* time_format = NULL; + gchar* _tmp12_; + const gchar* _tmp13_; + cairo_text_extents_t _tmp14_ = {0}; +#line 105 "../src/config.vala" + _tmp8_ = self->x_axis; +#line 105 "../src/config.vala" + _tmp9_ = _tmp8_->labels; +#line 105 "../src/config.vala" + _tmp10_ = live_chart_labels_get_font (_tmp9_); +#line 105 "../src/config.vala" + _tmp11_ = _tmp10_; +#line 105 "../src/config.vala" + live_chart_font_configure (_tmp11_, ctx); +#line 106 "../src/config.vala" + _tmp12_ = g_strdup ("00:00:00"); +#line 106 "../src/config.vala" + time_format = _tmp12_; +#line 107 "../src/config.vala" + _tmp13_ = time_format; +#line 107 "../src/config.vala" + cairo_text_extents (ctx, _tmp13_, &_tmp14_); +#line 107 "../src/config.vala" + extents = _tmp14_; +#line 104 "../src/config.vala" + _g_free0 (time_format); +#line 641 "config.c" + } else { +#line 109 "../src/config.vala" + memset (&extents, 0, sizeof (cairo_text_extents_t)); +#line 110 "../src/config.vala" + extents.height = 0.0; +#line 111 "../src/config.vala" + extents.width = 0.0; +#line 112 "../src/config.vala" + extents.x_advance = 0.0; +#line 113 "../src/config.vala" + extents.x_bearing = 0.0; +#line 114 "../src/config.vala" + extents.y_advance = 0.0; +#line 115 "../src/config.vala" + extents.y_bearing = 0.0; +#line 657 "config.c" + } +#line 118 "../src/config.vala" + _tmp15_ = self->x_axis; +#line 118 "../src/config.vala" + _tmp16_ = _tmp15_->labels; +#line 118 "../src/config.vala" + _tmp17_ = extents; +#line 118 "../src/config.vala" + live_chart_labels_set_extents (_tmp16_, &_tmp17_); +#line 667 "config.c" +} + +LiveChartConfig* +live_chart_config_construct (GType object_type) +{ + LiveChartConfig* self = NULL; +#line 42 "../src/config.vala" + self = (LiveChartConfig*) g_type_create_instance (object_type); +#line 42 "../src/config.vala" + return self; +#line 678 "config.c" +} + +LiveChartConfig* +live_chart_config_new (void) +{ +#line 42 "../src/config.vala" + return live_chart_config_construct (LIVE_CHART_TYPE_CONFIG); +#line 686 "config.c" +} + +gint +live_chart_config_get_width (LiveChartConfig* self) +{ + gint result; +#line 45 "../src/config.vala" + g_return_val_if_fail (self != NULL, 0); +#line 45 "../src/config.vala" + result = self->priv->_width; +#line 45 "../src/config.vala" + return result; +#line 699 "config.c" +} + +void +live_chart_config_set_width (LiveChartConfig* self, + gint value) +{ +#line 45 "../src/config.vala" + g_return_if_fail (self != NULL); +#line 45 "../src/config.vala" + self->priv->_width = value; +#line 710 "config.c" +} + +gint +live_chart_config_get_height (LiveChartConfig* self) +{ + gint result; +#line 49 "../src/config.vala" + g_return_val_if_fail (self != NULL, 0); +#line 49 "../src/config.vala" + result = self->priv->_height; +#line 49 "../src/config.vala" + return result; +#line 723 "config.c" +} + +void +live_chart_config_set_height (LiveChartConfig* self, + gint value) +{ +#line 49 "../src/config.vala" + g_return_if_fail (self != NULL); +#line 49 "../src/config.vala" + self->priv->_height = value; +#line 734 "config.c" +} + +static void +live_chart_value_config_init (GValue* value) +{ +#line 42 "../src/config.vala" + value->data[0].v_pointer = NULL; +#line 742 "config.c" +} + +static void +live_chart_value_config_free_value (GValue* value) +{ +#line 42 "../src/config.vala" + if (value->data[0].v_pointer) { +#line 42 "../src/config.vala" + live_chart_config_unref (value->data[0].v_pointer); +#line 752 "config.c" + } +} + +static void +live_chart_value_config_copy_value (const GValue* src_value, + GValue* dest_value) +{ +#line 42 "../src/config.vala" + if (src_value->data[0].v_pointer) { +#line 42 "../src/config.vala" + dest_value->data[0].v_pointer = live_chart_config_ref (src_value->data[0].v_pointer); +#line 764 "config.c" + } else { +#line 42 "../src/config.vala" + dest_value->data[0].v_pointer = NULL; +#line 768 "config.c" + } +} + +static gpointer +live_chart_value_config_peek_pointer (const GValue* value) +{ +#line 42 "../src/config.vala" + return value->data[0].v_pointer; +#line 777 "config.c" +} + +static gchar* +live_chart_value_config_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ +#line 42 "../src/config.vala" + if (collect_values[0].v_pointer) { +#line 788 "config.c" + LiveChartConfig * object; + object = collect_values[0].v_pointer; +#line 42 "../src/config.vala" + if (object->parent_instance.g_class == NULL) { +#line 42 "../src/config.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 795 "config.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 42 "../src/config.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 799 "config.c" + } +#line 42 "../src/config.vala" + value->data[0].v_pointer = live_chart_config_ref (object); +#line 803 "config.c" + } else { +#line 42 "../src/config.vala" + value->data[0].v_pointer = NULL; +#line 807 "config.c" + } +#line 42 "../src/config.vala" + return NULL; +#line 811 "config.c" +} + +static gchar* +live_chart_value_config_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ + LiveChartConfig ** object_p; + object_p = collect_values[0].v_pointer; +#line 42 "../src/config.vala" + if (!object_p) { +#line 42 "../src/config.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 826 "config.c" + } +#line 42 "../src/config.vala" + if (!value->data[0].v_pointer) { +#line 42 "../src/config.vala" + *object_p = NULL; +#line 832 "config.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 42 "../src/config.vala" + *object_p = value->data[0].v_pointer; +#line 836 "config.c" + } else { +#line 42 "../src/config.vala" + *object_p = live_chart_config_ref (value->data[0].v_pointer); +#line 840 "config.c" + } +#line 42 "../src/config.vala" + return NULL; +#line 844 "config.c" +} + +GParamSpec* +live_chart_param_spec_config (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ + LiveChartParamSpecConfig* spec; +#line 42 "../src/config.vala" + g_return_val_if_fail (g_type_is_a (object_type, LIVE_CHART_TYPE_CONFIG), NULL); +#line 42 "../src/config.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 42 "../src/config.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 42 "../src/config.vala" + return G_PARAM_SPEC (spec); +#line 863 "config.c" +} + +gpointer +live_chart_value_get_config (const GValue* value) +{ +#line 42 "../src/config.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_CONFIG), NULL); +#line 42 "../src/config.vala" + return value->data[0].v_pointer; +#line 873 "config.c" +} + +void +live_chart_value_set_config (GValue* value, + gpointer v_object) +{ + LiveChartConfig * old; +#line 42 "../src/config.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_CONFIG)); +#line 42 "../src/config.vala" + old = value->data[0].v_pointer; +#line 42 "../src/config.vala" + if (v_object) { +#line 42 "../src/config.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_CONFIG)); +#line 42 "../src/config.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 42 "../src/config.vala" + value->data[0].v_pointer = v_object; +#line 42 "../src/config.vala" + live_chart_config_ref (value->data[0].v_pointer); +#line 895 "config.c" + } else { +#line 42 "../src/config.vala" + value->data[0].v_pointer = NULL; +#line 899 "config.c" + } +#line 42 "../src/config.vala" + if (old) { +#line 42 "../src/config.vala" + live_chart_config_unref (old); +#line 905 "config.c" + } +} + +void +live_chart_value_take_config (GValue* value, + gpointer v_object) +{ + LiveChartConfig * old; +#line 42 "../src/config.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_CONFIG)); +#line 42 "../src/config.vala" + old = value->data[0].v_pointer; +#line 42 "../src/config.vala" + if (v_object) { +#line 42 "../src/config.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_CONFIG)); +#line 42 "../src/config.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 42 "../src/config.vala" + value->data[0].v_pointer = v_object; +#line 926 "config.c" + } else { +#line 42 "../src/config.vala" + value->data[0].v_pointer = NULL; +#line 930 "config.c" + } +#line 42 "../src/config.vala" + if (old) { +#line 42 "../src/config.vala" + live_chart_config_unref (old); +#line 936 "config.c" + } +} + +static void +live_chart_config_class_init (LiveChartConfigClass * klass, + gpointer klass_data) +{ +#line 42 "../src/config.vala" + live_chart_config_parent_class = g_type_class_peek_parent (klass); +#line 42 "../src/config.vala" + ((LiveChartConfigClass *) klass)->finalize = live_chart_config_finalize; +#line 42 "../src/config.vala" + g_type_class_adjust_private_offset (klass, &LiveChartConfig_private_offset); +#line 950 "config.c" +} + +static void +live_chart_config_instance_init (LiveChartConfig * self, + gpointer klass) +{ + LiveChartYAxis* _tmp0_; + LiveChartXAxis* _tmp1_; +#line 42 "../src/config.vala" + self->priv = live_chart_config_get_instance_private (self); +#line 44 "../src/config.vala" + self->priv->_width = 0; +#line 48 "../src/config.vala" + self->priv->_height = 0; +#line 52 "../src/config.vala" + live_chart_padding_init (&self->padding); +#line 54 "../src/config.vala" + _tmp0_ = live_chart_yaxis_new (""); +#line 54 "../src/config.vala" + self->y_axis = _tmp0_; +#line 55 "../src/config.vala" + _tmp1_ = live_chart_xaxis_new (); +#line 55 "../src/config.vala" + self->x_axis = _tmp1_; +#line 42 "../src/config.vala" + self->ref_count = 1; +#line 977 "config.c" +} + +static void +live_chart_config_finalize (LiveChartConfig * obj) +{ + LiveChartConfig * self; +#line 42 "../src/config.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_CONFIG, LiveChartConfig); +#line 42 "../src/config.vala" + g_signal_handlers_destroy (self); +#line 54 "../src/config.vala" + _live_chart_yaxis_unref0 (self->y_axis); +#line 55 "../src/config.vala" + _live_chart_xaxis_unref0 (self->x_axis); +#line 57 "../src/config.vala" + _g_object_unref0 (self->categories); +#line 994 "config.c" +} + +static GType +live_chart_config_get_type_once (void) +{ + static const GTypeValueTable g_define_type_value_table = { live_chart_value_config_init, live_chart_value_config_free_value, live_chart_value_config_copy_value, live_chart_value_config_peek_pointer, "p", live_chart_value_config_collect_value, "p", live_chart_value_config_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (LiveChartConfigClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_config_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartConfig), 0, (GInstanceInitFunc) live_chart_config_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType live_chart_config_type_id; + live_chart_config_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LiveChartConfig", &g_define_type_info, &g_define_type_fundamental_info, 0); + LiveChartConfig_private_offset = g_type_add_instance_private (live_chart_config_type_id, sizeof (LiveChartConfigPrivate)); + return live_chart_config_type_id; +} + +GType +live_chart_config_get_type (void) +{ + static volatile gsize live_chart_config_type_id__once = 0; + if (g_once_init_enter (&live_chart_config_type_id__once)) { + GType live_chart_config_type_id; + live_chart_config_type_id = live_chart_config_get_type_once (); + g_once_init_leave (&live_chart_config_type_id__once, live_chart_config_type_id); + } + return live_chart_config_type_id__once; +} + +gpointer +live_chart_config_ref (gpointer instance) +{ + LiveChartConfig * self; + self = instance; +#line 42 "../src/config.vala" + g_atomic_int_inc (&self->ref_count); +#line 42 "../src/config.vala" + return instance; +#line 1030 "config.c" +} + +void +live_chart_config_unref (gpointer instance) +{ + LiveChartConfig * self; + self = instance; +#line 42 "../src/config.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 42 "../src/config.vala" + LIVE_CHART_CONFIG_GET_CLASS (self)->finalize (self); +#line 42 "../src/config.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1044 "config.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/drawable.c b/iPDC/lib/liblivechart_static.a.p/drawable.c new file mode 100644 index 0000000..0296a50 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/drawable.c @@ -0,0 +1,222 @@ +/* drawable.c generated by valac 0.56.0, the Vala compiler + * generated from drawable.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include + +static GType live_chart_drawable_get_type_once (void); +static GType live_chart_colorable_get_type_once (void); + +LiveChartBoundingBox* +live_chart_bounding_box_dup (const LiveChartBoundingBox* self) +{ + LiveChartBoundingBox* dup; +#line 4 "../src/drawable.vala" + dup = g_new0 (LiveChartBoundingBox, 1); +#line 4 "../src/drawable.vala" + memcpy (dup, self, sizeof (LiveChartBoundingBox)); +#line 4 "../src/drawable.vala" + return dup; +#line 23 "drawable.c" +} + +void +live_chart_bounding_box_free (LiveChartBoundingBox* self) +{ +#line 4 "../src/drawable.vala" + g_free (self); +#line 31 "drawable.c" +} + +static GType +live_chart_bounding_box_get_type_once (void) +{ + GType live_chart_bounding_box_type_id; + live_chart_bounding_box_type_id = g_boxed_type_register_static ("LiveChartBoundingBox", (GBoxedCopyFunc) live_chart_bounding_box_dup, (GBoxedFreeFunc) live_chart_bounding_box_free); + return live_chart_bounding_box_type_id; +} + +GType +live_chart_bounding_box_get_type (void) +{ + static volatile gsize live_chart_bounding_box_type_id__once = 0; + if (g_once_init_enter (&live_chart_bounding_box_type_id__once)) { + GType live_chart_bounding_box_type_id; + live_chart_bounding_box_type_id = live_chart_bounding_box_get_type_once (); + g_once_init_leave (&live_chart_bounding_box_type_id__once, live_chart_bounding_box_type_id); + } + return live_chart_bounding_box_type_id__once; +} + +void +live_chart_drawable_draw (LiveChartDrawable* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartDrawableIface* _iface_; +#line 13 "../src/drawable.vala" + g_return_if_fail (self != NULL); +#line 13 "../src/drawable.vala" + _iface_ = LIVE_CHART_DRAWABLE_GET_INTERFACE (self); +#line 13 "../src/drawable.vala" + if (_iface_->draw) { +#line 13 "../src/drawable.vala" + _iface_->draw (self, ctx, config); +#line 68 "drawable.c" + } +} + +void +live_chart_drawable_get_bounding_box (LiveChartDrawable* self, + LiveChartBoundingBox* result) +{ + LiveChartDrawableIface* _iface_; +#line 15 "../src/drawable.vala" + g_return_if_fail (self != NULL); +#line 15 "../src/drawable.vala" + _iface_ = LIVE_CHART_DRAWABLE_GET_INTERFACE (self); +#line 15 "../src/drawable.vala" + if (_iface_->get_bounding_box) { +#line 15 "../src/drawable.vala" + _iface_->get_bounding_box (self, result); +#line 85 "drawable.c" + } +} + +gboolean +live_chart_drawable_get_visible (LiveChartDrawable* self) +{ + LiveChartDrawableIface* _iface_; +#line 11 "../src/drawable.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 11 "../src/drawable.vala" + _iface_ = LIVE_CHART_DRAWABLE_GET_INTERFACE (self); +#line 11 "../src/drawable.vala" + if (_iface_->get_visible) { +#line 11 "../src/drawable.vala" + return _iface_->get_visible (self); +#line 101 "drawable.c" + } +#line 11 "../src/drawable.vala" + return FALSE; +#line 105 "drawable.c" +} + +void +live_chart_drawable_set_visible (LiveChartDrawable* self, + gboolean value) +{ + LiveChartDrawableIface* _iface_; +#line 11 "../src/drawable.vala" + g_return_if_fail (self != NULL); +#line 11 "../src/drawable.vala" + _iface_ = LIVE_CHART_DRAWABLE_GET_INTERFACE (self); +#line 11 "../src/drawable.vala" + if (_iface_->set_visible) { +#line 11 "../src/drawable.vala" + _iface_->set_visible (self, value); +#line 121 "drawable.c" + } +} + +static void +live_chart_drawable_default_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 10 "../src/drawable.vala" + g_object_interface_install_property (iface, g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 131 "drawable.c" +} + +static GType +live_chart_drawable_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartDrawableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_drawable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType live_chart_drawable_type_id; + live_chart_drawable_type_id = g_type_register_static (G_TYPE_INTERFACE, "LiveChartDrawable", &g_define_type_info, 0); + g_type_interface_add_prerequisite (live_chart_drawable_type_id, G_TYPE_OBJECT); + return live_chart_drawable_type_id; +} + +GType +live_chart_drawable_get_type (void) +{ + static volatile gsize live_chart_drawable_type_id__once = 0; + if (g_once_init_enter (&live_chart_drawable_type_id__once)) { + GType live_chart_drawable_type_id; + live_chart_drawable_type_id = live_chart_drawable_get_type_once (); + g_once_init_leave (&live_chart_drawable_type_id__once, live_chart_drawable_type_id); + } + return live_chart_drawable_type_id__once; +} + +void +live_chart_colorable_get_main_color (LiveChartColorable* self, + GdkRGBA * result) +{ + LiveChartColorableIface* _iface_; +#line 22 "../src/drawable.vala" + g_return_if_fail (self != NULL); +#line 22 "../src/drawable.vala" + _iface_ = LIVE_CHART_COLORABLE_GET_INTERFACE (self); +#line 22 "../src/drawable.vala" + if (_iface_->get_main_color) { +#line 22 "../src/drawable.vala" + _iface_->get_main_color (self, result); +#line 169 "drawable.c" + } +#line 22 "../src/drawable.vala" + return; +#line 173 "drawable.c" +} + +void +live_chart_colorable_set_main_color (LiveChartColorable* self, + GdkRGBA * value) +{ + LiveChartColorableIface* _iface_; +#line 22 "../src/drawable.vala" + g_return_if_fail (self != NULL); +#line 22 "../src/drawable.vala" + _iface_ = LIVE_CHART_COLORABLE_GET_INTERFACE (self); +#line 22 "../src/drawable.vala" + if (_iface_->set_main_color) { +#line 22 "../src/drawable.vala" + _iface_->set_main_color (self, value); +#line 189 "drawable.c" + } +} + +static void +live_chart_colorable_default_init (LiveChartColorableIface * iface, + gpointer iface_data) +{ +#line 20 "../src/drawable.vala" + g_object_interface_install_property (iface, g_param_spec_boxed ("main-color", "main-color", "main-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_DEPRECATED)); +#line 199 "drawable.c" +} + +static GType +live_chart_colorable_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartColorableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_colorable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType live_chart_colorable_type_id; + live_chart_colorable_type_id = g_type_register_static (G_TYPE_INTERFACE, "LiveChartColorable", &g_define_type_info, 0); + g_type_interface_add_prerequisite (live_chart_colorable_type_id, G_TYPE_OBJECT); + return live_chart_colorable_type_id; +} + +GType +live_chart_colorable_get_type (void) +{ + static volatile gsize live_chart_colorable_type_id__once = 0; + if (g_once_init_enter (&live_chart_colorable_type_id__once)) { + GType live_chart_colorable_type_id; + live_chart_colorable_type_id = live_chart_colorable_get_type_once (); + g_once_init_leave (&live_chart_colorable_type_id__once, live_chart_colorable_type_id); + } + return live_chart_colorable_type_id__once; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/font.c b/iPDC/lib/liblivechart_static.a.p/font.c new file mode 100644 index 0000000..1fb7719 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/font.c @@ -0,0 +1,544 @@ +/* font.c generated by valac 0.56.0, the Vala compiler + * generated from font.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#define _g_free0(var) (var = (g_free (var), NULL)) +typedef struct _LiveChartParamSpecFont LiveChartParamSpecFont; + +struct _LiveChartFontPrivate { + guint8 _size; + gchar* _face; + cairo_font_slant_t _slant; + cairo_font_weight_t _weight; + GdkRGBA _color; +}; + +struct _LiveChartParamSpecFont { + GParamSpec parent_instance; +}; + +static gint LiveChartFont_private_offset; +static gpointer live_chart_font_parent_class = NULL; + +static void live_chart_font_finalize (LiveChartFont * obj); +static GType live_chart_font_get_type_once (void); + +static inline gpointer +live_chart_font_get_instance_private (LiveChartFont* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartFont_private_offset); +} + +LiveChartFont* +live_chart_font_construct (GType object_type) +{ + LiveChartFont* self = NULL; + GdkRGBA _tmp0_ = {0}; +#line 12 "../src/font.vala" + self = (LiveChartFont*) g_type_create_instance (object_type); +#line 13 "../src/font.vala" + live_chart_font_set_size (self, (guint8) 10); +#line 14 "../src/font.vala" + live_chart_font_set_face (self, "Sans serif"); +#line 15 "../src/font.vala" + live_chart_font_set_slant (self, CAIRO_FONT_SLANT_NORMAL); +#line 16 "../src/font.vala" + live_chart_font_set_weight (self, CAIRO_FONT_WEIGHT_NORMAL); +#line 17 "../src/font.vala" + _tmp0_.red = 0.4; +#line 17 "../src/font.vala" + _tmp0_.green = 0.4; +#line 17 "../src/font.vala" + _tmp0_.blue = 0.4; +#line 17 "../src/font.vala" + _tmp0_.alpha = 1.0; +#line 17 "../src/font.vala" + live_chart_font_set_color (self, &_tmp0_); +#line 12 "../src/font.vala" + return self; +#line 69 "font.c" +} + +LiveChartFont* +live_chart_font_new (void) +{ +#line 12 "../src/font.vala" + return live_chart_font_construct (LIVE_CHART_TYPE_FONT); +#line 77 "font.c" +} + +void +live_chart_font_configure (LiveChartFont* self, + cairo_t* ctx) +{ + const gchar* _tmp0_; + cairo_font_slant_t _tmp1_; + cairo_font_weight_t _tmp2_; + guint8 _tmp3_; + GdkRGBA _tmp4_; + GdkRGBA _tmp5_; + GdkRGBA _tmp6_; + GdkRGBA _tmp7_; +#line 20 "../src/font.vala" + g_return_if_fail (self != NULL); +#line 20 "../src/font.vala" + g_return_if_fail (ctx != NULL); +#line 21 "../src/font.vala" + _tmp0_ = self->priv->_face; +#line 21 "../src/font.vala" + _tmp1_ = self->priv->_slant; +#line 21 "../src/font.vala" + _tmp2_ = self->priv->_weight; +#line 21 "../src/font.vala" + cairo_select_font_face (ctx, _tmp0_, _tmp1_, _tmp2_); +#line 22 "../src/font.vala" + _tmp3_ = self->priv->_size; +#line 22 "../src/font.vala" + cairo_set_font_size (ctx, (gdouble) _tmp3_); +#line 23 "../src/font.vala" + _tmp4_ = self->priv->_color; +#line 23 "../src/font.vala" + _tmp5_ = self->priv->_color; +#line 23 "../src/font.vala" + _tmp6_ = self->priv->_color; +#line 23 "../src/font.vala" + _tmp7_ = self->priv->_color; +#line 23 "../src/font.vala" + cairo_set_source_rgba (ctx, _tmp4_.red, _tmp5_.green, _tmp6_.blue, _tmp7_.alpha); +#line 118 "font.c" +} + +guint8 +live_chart_font_get_size (LiveChartFont* self) +{ + guint8 result; +#line 6 "../src/font.vala" + g_return_val_if_fail (self != NULL, 0U); +#line 6 "../src/font.vala" + result = self->priv->_size; +#line 6 "../src/font.vala" + return result; +#line 131 "font.c" +} + +void +live_chart_font_set_size (LiveChartFont* self, + guint8 value) +{ +#line 6 "../src/font.vala" + g_return_if_fail (self != NULL); +#line 6 "../src/font.vala" + self->priv->_size = value; +#line 142 "font.c" +} + +const gchar* +live_chart_font_get_face (LiveChartFont* self) +{ + const gchar* result; + const gchar* _tmp0_; +#line 7 "../src/font.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 7 "../src/font.vala" + _tmp0_ = self->priv->_face; +#line 7 "../src/font.vala" + result = _tmp0_; +#line 7 "../src/font.vala" + return result; +#line 158 "font.c" +} + +void +live_chart_font_set_face (LiveChartFont* self, + const gchar* value) +{ + gchar* _tmp0_; +#line 7 "../src/font.vala" + g_return_if_fail (self != NULL); +#line 7 "../src/font.vala" + _tmp0_ = g_strdup (value); +#line 7 "../src/font.vala" + _g_free0 (self->priv->_face); +#line 7 "../src/font.vala" + self->priv->_face = _tmp0_; +#line 174 "font.c" +} + +cairo_font_slant_t +live_chart_font_get_slant (LiveChartFont* self) +{ + cairo_font_slant_t result; +#line 8 "../src/font.vala" + g_return_val_if_fail (self != NULL, 0); +#line 8 "../src/font.vala" + result = self->priv->_slant; +#line 8 "../src/font.vala" + return result; +#line 187 "font.c" +} + +void +live_chart_font_set_slant (LiveChartFont* self, + cairo_font_slant_t value) +{ +#line 8 "../src/font.vala" + g_return_if_fail (self != NULL); +#line 8 "../src/font.vala" + self->priv->_slant = value; +#line 198 "font.c" +} + +cairo_font_weight_t +live_chart_font_get_weight (LiveChartFont* self) +{ + cairo_font_weight_t result; +#line 9 "../src/font.vala" + g_return_val_if_fail (self != NULL, 0); +#line 9 "../src/font.vala" + result = self->priv->_weight; +#line 9 "../src/font.vala" + return result; +#line 211 "font.c" +} + +void +live_chart_font_set_weight (LiveChartFont* self, + cairo_font_weight_t value) +{ +#line 9 "../src/font.vala" + g_return_if_fail (self != NULL); +#line 9 "../src/font.vala" + self->priv->_weight = value; +#line 222 "font.c" +} + +void +live_chart_font_get_color (LiveChartFont* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 10 "../src/font.vala" + g_return_if_fail (self != NULL); +#line 10 "../src/font.vala" + _tmp0_ = self->priv->_color; +#line 10 "../src/font.vala" + *result = _tmp0_; +#line 10 "../src/font.vala" + return; +#line 238 "font.c" +} + +void +live_chart_font_set_color (LiveChartFont* self, + GdkRGBA * value) +{ + GdkRGBA _tmp0_; +#line 10 "../src/font.vala" + g_return_if_fail (self != NULL); +#line 10 "../src/font.vala" + _tmp0_ = *value; +#line 10 "../src/font.vala" + self->priv->_color = _tmp0_; +#line 252 "font.c" +} + +static void +live_chart_value_font_init (GValue* value) +{ +#line 5 "../src/font.vala" + value->data[0].v_pointer = NULL; +#line 260 "font.c" +} + +static void +live_chart_value_font_free_value (GValue* value) +{ +#line 5 "../src/font.vala" + if (value->data[0].v_pointer) { +#line 5 "../src/font.vala" + live_chart_font_unref (value->data[0].v_pointer); +#line 270 "font.c" + } +} + +static void +live_chart_value_font_copy_value (const GValue* src_value, + GValue* dest_value) +{ +#line 5 "../src/font.vala" + if (src_value->data[0].v_pointer) { +#line 5 "../src/font.vala" + dest_value->data[0].v_pointer = live_chart_font_ref (src_value->data[0].v_pointer); +#line 282 "font.c" + } else { +#line 5 "../src/font.vala" + dest_value->data[0].v_pointer = NULL; +#line 286 "font.c" + } +} + +static gpointer +live_chart_value_font_peek_pointer (const GValue* value) +{ +#line 5 "../src/font.vala" + return value->data[0].v_pointer; +#line 295 "font.c" +} + +static gchar* +live_chart_value_font_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ +#line 5 "../src/font.vala" + if (collect_values[0].v_pointer) { +#line 306 "font.c" + LiveChartFont * object; + object = collect_values[0].v_pointer; +#line 5 "../src/font.vala" + if (object->parent_instance.g_class == NULL) { +#line 5 "../src/font.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 313 "font.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 5 "../src/font.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 317 "font.c" + } +#line 5 "../src/font.vala" + value->data[0].v_pointer = live_chart_font_ref (object); +#line 321 "font.c" + } else { +#line 5 "../src/font.vala" + value->data[0].v_pointer = NULL; +#line 325 "font.c" + } +#line 5 "../src/font.vala" + return NULL; +#line 329 "font.c" +} + +static gchar* +live_chart_value_font_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ + LiveChartFont ** object_p; + object_p = collect_values[0].v_pointer; +#line 5 "../src/font.vala" + if (!object_p) { +#line 5 "../src/font.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 344 "font.c" + } +#line 5 "../src/font.vala" + if (!value->data[0].v_pointer) { +#line 5 "../src/font.vala" + *object_p = NULL; +#line 350 "font.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 5 "../src/font.vala" + *object_p = value->data[0].v_pointer; +#line 354 "font.c" + } else { +#line 5 "../src/font.vala" + *object_p = live_chart_font_ref (value->data[0].v_pointer); +#line 358 "font.c" + } +#line 5 "../src/font.vala" + return NULL; +#line 362 "font.c" +} + +GParamSpec* +live_chart_param_spec_font (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ + LiveChartParamSpecFont* spec; +#line 5 "../src/font.vala" + g_return_val_if_fail (g_type_is_a (object_type, LIVE_CHART_TYPE_FONT), NULL); +#line 5 "../src/font.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 5 "../src/font.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 5 "../src/font.vala" + return G_PARAM_SPEC (spec); +#line 381 "font.c" +} + +gpointer +live_chart_value_get_font (const GValue* value) +{ +#line 5 "../src/font.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_FONT), NULL); +#line 5 "../src/font.vala" + return value->data[0].v_pointer; +#line 391 "font.c" +} + +void +live_chart_value_set_font (GValue* value, + gpointer v_object) +{ + LiveChartFont * old; +#line 5 "../src/font.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_FONT)); +#line 5 "../src/font.vala" + old = value->data[0].v_pointer; +#line 5 "../src/font.vala" + if (v_object) { +#line 5 "../src/font.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_FONT)); +#line 5 "../src/font.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 5 "../src/font.vala" + value->data[0].v_pointer = v_object; +#line 5 "../src/font.vala" + live_chart_font_ref (value->data[0].v_pointer); +#line 413 "font.c" + } else { +#line 5 "../src/font.vala" + value->data[0].v_pointer = NULL; +#line 417 "font.c" + } +#line 5 "../src/font.vala" + if (old) { +#line 5 "../src/font.vala" + live_chart_font_unref (old); +#line 423 "font.c" + } +} + +void +live_chart_value_take_font (GValue* value, + gpointer v_object) +{ + LiveChartFont * old; +#line 5 "../src/font.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_FONT)); +#line 5 "../src/font.vala" + old = value->data[0].v_pointer; +#line 5 "../src/font.vala" + if (v_object) { +#line 5 "../src/font.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_FONT)); +#line 5 "../src/font.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 5 "../src/font.vala" + value->data[0].v_pointer = v_object; +#line 444 "font.c" + } else { +#line 5 "../src/font.vala" + value->data[0].v_pointer = NULL; +#line 448 "font.c" + } +#line 5 "../src/font.vala" + if (old) { +#line 5 "../src/font.vala" + live_chart_font_unref (old); +#line 454 "font.c" + } +} + +static void +live_chart_font_class_init (LiveChartFontClass * klass, + gpointer klass_data) +{ +#line 5 "../src/font.vala" + live_chart_font_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/font.vala" + ((LiveChartFontClass *) klass)->finalize = live_chart_font_finalize; +#line 5 "../src/font.vala" + g_type_class_adjust_private_offset (klass, &LiveChartFont_private_offset); +#line 468 "font.c" +} + +static void +live_chart_font_instance_init (LiveChartFont * self, + gpointer klass) +{ +#line 5 "../src/font.vala" + self->priv = live_chart_font_get_instance_private (self); +#line 5 "../src/font.vala" + self->ref_count = 1; +#line 479 "font.c" +} + +static void +live_chart_font_finalize (LiveChartFont * obj) +{ + LiveChartFont * self; +#line 5 "../src/font.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_FONT, LiveChartFont); +#line 5 "../src/font.vala" + g_signal_handlers_destroy (self); +#line 7 "../src/font.vala" + _g_free0 (self->priv->_face); +#line 492 "font.c" +} + +static GType +live_chart_font_get_type_once (void) +{ + static const GTypeValueTable g_define_type_value_table = { live_chart_value_font_init, live_chart_value_font_free_value, live_chart_value_font_copy_value, live_chart_value_font_peek_pointer, "p", live_chart_value_font_collect_value, "p", live_chart_value_font_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (LiveChartFontClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_font_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartFont), 0, (GInstanceInitFunc) live_chart_font_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType live_chart_font_type_id; + live_chart_font_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LiveChartFont", &g_define_type_info, &g_define_type_fundamental_info, 0); + LiveChartFont_private_offset = g_type_add_instance_private (live_chart_font_type_id, sizeof (LiveChartFontPrivate)); + return live_chart_font_type_id; +} + +GType +live_chart_font_get_type (void) +{ + static volatile gsize live_chart_font_type_id__once = 0; + if (g_once_init_enter (&live_chart_font_type_id__once)) { + GType live_chart_font_type_id; + live_chart_font_type_id = live_chart_font_get_type_once (); + g_once_init_leave (&live_chart_font_type_id__once, live_chart_font_type_id); + } + return live_chart_font_type_id__once; +} + +gpointer +live_chart_font_ref (gpointer instance) +{ + LiveChartFont * self; + self = instance; +#line 5 "../src/font.vala" + g_atomic_int_inc (&self->ref_count); +#line 5 "../src/font.vala" + return instance; +#line 528 "font.c" +} + +void +live_chart_font_unref (gpointer instance) +{ + LiveChartFont * self; + self = instance; +#line 5 "../src/font.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 5 "../src/font.vala" + LIVE_CHART_FONT_GET_CLASS (self)->finalize (self); +#line 5 "../src/font.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 542 "font.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/geometry.c b/iPDC/lib/liblivechart_static.a.p/geometry.c new file mode 100644 index 0000000..091dcd1 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/geometry.c @@ -0,0 +1,213 @@ +/* geometry.c generated by valac 0.56.0, the Vala compiler + * generated from geometry.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include + +LiveChartCoord* +live_chart_coord_dup (const LiveChartCoord* self) +{ + LiveChartCoord* dup; +#line 2 "../src/geometry.vala" + dup = g_new0 (LiveChartCoord, 1); +#line 2 "../src/geometry.vala" + memcpy (dup, self, sizeof (LiveChartCoord)); +#line 2 "../src/geometry.vala" + return dup; +#line 21 "geometry.c" +} + +void +live_chart_coord_free (LiveChartCoord* self) +{ +#line 2 "../src/geometry.vala" + g_free (self); +#line 29 "geometry.c" +} + +static GType +live_chart_coord_get_type_once (void) +{ + GType live_chart_coord_type_id; + live_chart_coord_type_id = g_boxed_type_register_static ("LiveChartCoord", (GBoxedCopyFunc) live_chart_coord_dup, (GBoxedFreeFunc) live_chart_coord_free); + return live_chart_coord_type_id; +} + +GType +live_chart_coord_get_type (void) +{ + static volatile gsize live_chart_coord_type_id__once = 0; + if (g_once_init_enter (&live_chart_coord_type_id__once)) { + GType live_chart_coord_type_id; + live_chart_coord_type_id = live_chart_coord_get_type_once (); + g_once_init_leave (&live_chart_coord_type_id__once, live_chart_coord_type_id); + } + return live_chart_coord_type_id__once; +} + +LiveChartSegment* +live_chart_segment_dup (const LiveChartSegment* self) +{ + LiveChartSegment* dup; +#line 7 "../src/geometry.vala" + dup = g_new0 (LiveChartSegment, 1); +#line 7 "../src/geometry.vala" + memcpy (dup, self, sizeof (LiveChartSegment)); +#line 7 "../src/geometry.vala" + return dup; +#line 62 "geometry.c" +} + +void +live_chart_segment_free (LiveChartSegment* self) +{ +#line 7 "../src/geometry.vala" + g_free (self); +#line 70 "geometry.c" +} + +static GType +live_chart_segment_get_type_once (void) +{ + GType live_chart_segment_type_id; + live_chart_segment_type_id = g_boxed_type_register_static ("LiveChartSegment", (GBoxedCopyFunc) live_chart_segment_dup, (GBoxedFreeFunc) live_chart_segment_free); + return live_chart_segment_type_id; +} + +GType +live_chart_segment_get_type (void) +{ + static volatile gsize live_chart_segment_type_id__once = 0; + if (g_once_init_enter (&live_chart_segment_type_id__once)) { + GType live_chart_segment_type_id; + live_chart_segment_type_id = live_chart_segment_get_type_once (); + g_once_init_leave (&live_chart_segment_type_id__once, live_chart_segment_type_id); + } + return live_chart_segment_type_id__once; +} + +LiveChartBezierCurve* +live_chart_bezier_curve_dup (const LiveChartBezierCurve* self) +{ + LiveChartBezierCurve* dup; +#line 11 "../src/geometry.vala" + dup = g_new0 (LiveChartBezierCurve, 1); +#line 11 "../src/geometry.vala" + memcpy (dup, self, sizeof (LiveChartBezierCurve)); +#line 11 "../src/geometry.vala" + return dup; +#line 103 "geometry.c" +} + +void +live_chart_bezier_curve_free (LiveChartBezierCurve* self) +{ +#line 11 "../src/geometry.vala" + g_free (self); +#line 111 "geometry.c" +} + +static GType +live_chart_bezier_curve_get_type_once (void) +{ + GType live_chart_bezier_curve_type_id; + live_chart_bezier_curve_type_id = g_boxed_type_register_static ("LiveChartBezierCurve", (GBoxedCopyFunc) live_chart_bezier_curve_dup, (GBoxedFreeFunc) live_chart_bezier_curve_free); + return live_chart_bezier_curve_type_id; +} + +GType +live_chart_bezier_curve_get_type (void) +{ + static volatile gsize live_chart_bezier_curve_type_id__once = 0; + if (g_once_init_enter (&live_chart_bezier_curve_type_id__once)) { + GType live_chart_bezier_curve_type_id; + live_chart_bezier_curve_type_id = live_chart_bezier_curve_get_type_once (); + g_once_init_leave (&live_chart_bezier_curve_type_id__once, live_chart_bezier_curve_type_id); + } + return live_chart_bezier_curve_type_id__once; +} + +void +live_chart_build_bezier_curve_from_points (LiveChartPoint* previous, + LiveChartPoint* target, + LiveChartBezierCurve* result) +{ + gdouble pressure = 0.0; + LiveChartPoint _tmp0_; + LiveChartPoint _tmp1_; + LiveChartBezierCurve bezier = {0}; + LiveChartPoint _tmp2_; + LiveChartPoint _tmp3_; + LiveChartCoord _tmp4_ = {0}; + LiveChartPoint _tmp5_; + LiveChartPoint _tmp6_; + LiveChartCoord _tmp7_ = {0}; + LiveChartPoint _tmp8_; + LiveChartPoint _tmp9_; + LiveChartCoord _tmp10_ = {0}; + LiveChartPoint _tmp11_; + LiveChartPoint _tmp12_; + LiveChartCoord _tmp13_ = {0}; + LiveChartBezierCurve _tmp14_ = {0}; +#line 18 "../src/geometry.vala" + g_return_if_fail (previous != NULL); +#line 18 "../src/geometry.vala" + g_return_if_fail (target != NULL); +#line 19 "../src/geometry.vala" + _tmp0_ = *target; +#line 19 "../src/geometry.vala" + _tmp1_ = *previous; +#line 19 "../src/geometry.vala" + pressure = (_tmp0_.x - _tmp1_.x) / 2.0; +#line 20 "../src/geometry.vala" + _tmp2_ = *previous; +#line 20 "../src/geometry.vala" + _tmp3_ = *previous; +#line 20 "../src/geometry.vala" + _tmp4_.x = _tmp2_.x; +#line 20 "../src/geometry.vala" + _tmp4_.y = _tmp3_.y; +#line 20 "../src/geometry.vala" + _tmp5_ = *previous; +#line 20 "../src/geometry.vala" + _tmp6_ = *previous; +#line 20 "../src/geometry.vala" + _tmp7_.x = _tmp5_.x + pressure; +#line 20 "../src/geometry.vala" + _tmp7_.y = _tmp6_.y; +#line 20 "../src/geometry.vala" + _tmp8_ = *target; +#line 20 "../src/geometry.vala" + _tmp9_ = *target; +#line 20 "../src/geometry.vala" + _tmp10_.x = _tmp8_.x - pressure; +#line 20 "../src/geometry.vala" + _tmp10_.y = _tmp9_.y; +#line 20 "../src/geometry.vala" + _tmp11_ = *target; +#line 20 "../src/geometry.vala" + _tmp12_ = *target; +#line 20 "../src/geometry.vala" + _tmp13_.x = _tmp11_.x; +#line 20 "../src/geometry.vala" + _tmp13_.y = _tmp12_.y; +#line 20 "../src/geometry.vala" + _tmp14_.c0 = _tmp4_; +#line 20 "../src/geometry.vala" + _tmp14_.c1 = _tmp7_; +#line 20 "../src/geometry.vala" + _tmp14_.c2 = _tmp10_; +#line 20 "../src/geometry.vala" + _tmp14_.c3 = _tmp13_; +#line 20 "../src/geometry.vala" + bezier = _tmp14_; +#line 39 "../src/geometry.vala" + *result = bezier; +#line 39 "../src/geometry.vala" + return; +#line 212 "geometry.c" +} + diff --git a/iPDC/lib/liblivechart_static.a.p/grid.c b/iPDC/lib/liblivechart_static.a.p/grid.c new file mode 100644 index 0000000..1762abb --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/grid.c @@ -0,0 +1,1286 @@ +/* grid.c generated by valac 0.56.0, the Vala compiler + * generated from grid.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_GRID_0_PROPERTY, + LIVE_CHART_GRID_VISIBLE_PROPERTY, + LIVE_CHART_GRID_MAIN_COLOR_PROPERTY, + LIVE_CHART_GRID_NUM_PROPERTIES +}; +static GParamSpec* live_chart_grid_properties[LIVE_CHART_GRID_NUM_PROPERTIES]; +#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL))) +#define _g_time_zone_unref0(var) ((var == NULL) ? NULL : (var = (g_time_zone_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _LiveChartGridPrivate { + gboolean _visible; + GdkRGBA _main_color; +}; + +static gint LiveChartGrid_private_offset; +static gpointer live_chart_grid_parent_class = NULL; +static LiveChartDrawableIface * live_chart_grid_live_chart_drawable_parent_iface = NULL; + +static void live_chart_grid_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_grid_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static gboolean _gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2); +static void live_chart_grid_finalize (GObject * obj); +static GType live_chart_grid_get_type_once (void); +static void _vala_live_chart_grid_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_grid_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +static inline gpointer +live_chart_grid_get_instance_private (LiveChartGrid* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartGrid_private_offset); +} + +static void +live_chart_grid_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartGrid * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 24 "../src/grid.vala" + self = (LiveChartGrid*) base; +#line 24 "../src/grid.vala" + g_return_if_fail (ctx != NULL); +#line 24 "../src/grid.vala" + g_return_if_fail (config != NULL); +#line 25 "../src/grid.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 25 "../src/grid.vala" + _tmp1_ = _tmp0_; +#line 25 "../src/grid.vala" + if (_tmp1_) { +#line 26 "../src/grid.vala" + live_chart_grid_render_abscissa (self, ctx, config); +#line 27 "../src/grid.vala" + live_chart_grid_render_ordinate (self, ctx, config); +#line 28 "../src/grid.vala" + live_chart_grid_render_grid (self, ctx, config); +#line 29 "../src/grid.vala" + live_chart_grid_update_bounding_box (self, config); +#line 30 "../src/grid.vala" + live_chart_grid_debug (self, ctx); +#line 90 "grid.c" + } +} + +static void +live_chart_grid_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartGrid * self; + LiveChartBoundingBox _tmp0_; +#line 34 "../src/grid.vala" + self = (LiveChartGrid*) base; +#line 35 "../src/grid.vala" + _tmp0_ = self->bounding_box; +#line 35 "../src/grid.vala" + *result = _tmp0_; +#line 35 "../src/grid.vala" + return; +#line 108 "grid.c" +} + +void +live_chart_grid_restore (LiveChartGrid* self, + cairo_t* ctx) +{ + GdkRGBA _tmp0_; + GdkRGBA _tmp1_; + GdkRGBA _tmp2_; + GdkRGBA _tmp3_; +#line 38 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 38 "../src/grid.vala" + g_return_if_fail (ctx != NULL); +#line 39 "../src/grid.vala" + _tmp0_ = self->priv->_main_color; +#line 39 "../src/grid.vala" + _tmp1_ = self->priv->_main_color; +#line 39 "../src/grid.vala" + _tmp2_ = self->priv->_main_color; +#line 39 "../src/grid.vala" + _tmp3_ = self->priv->_main_color; +#line 39 "../src/grid.vala" + cairo_set_source_rgba (ctx, _tmp0_.red, _tmp1_.green, _tmp2_.blue, _tmp3_.alpha); +#line 40 "../src/grid.vala" + cairo_set_line_width (ctx, 0.5); +#line 41 "../src/grid.vala" + cairo_set_dash (ctx, NULL, (gint) 0, 0.0); +#line 137 "grid.c" +} + +void +live_chart_grid_render_abscissa (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + gboolean _tmp0_ = FALSE; + LiveChartXAxis* _tmp1_; + gboolean _tmp2_; + gboolean _tmp3_; +#line 44 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 44 "../src/grid.vala" + g_return_if_fail (ctx != NULL); +#line 44 "../src/grid.vala" + g_return_if_fail (config != NULL); +#line 45 "../src/grid.vala" + _tmp1_ = config->x_axis; +#line 45 "../src/grid.vala" + _tmp2_ = live_chart_xaxis_get_visible (_tmp1_); +#line 45 "../src/grid.vala" + _tmp3_ = _tmp2_; +#line 45 "../src/grid.vala" + if (_tmp3_) { +#line 163 "grid.c" + LiveChartXAxis* _tmp4_; + LiveChartPath* _tmp5_; + gboolean _tmp6_; + gboolean _tmp7_; +#line 45 "../src/grid.vala" + _tmp4_ = config->x_axis; +#line 45 "../src/grid.vala" + _tmp5_ = _tmp4_->axis; +#line 45 "../src/grid.vala" + _tmp6_ = live_chart_path_get_visible (_tmp5_); +#line 45 "../src/grid.vala" + _tmp7_ = _tmp6_; +#line 45 "../src/grid.vala" + _tmp0_ = _tmp7_; +#line 178 "grid.c" + } else { +#line 45 "../src/grid.vala" + _tmp0_ = FALSE; +#line 182 "grid.c" + } +#line 45 "../src/grid.vala" + if (_tmp0_) { +#line 186 "grid.c" + LiveChartXAxis* _tmp8_; + LiveChartPath* _tmp9_; + LiveChartPadding _tmp10_; + gint _tmp11_; + gint _tmp12_; + LiveChartPadding _tmp13_; + gint _tmp14_; + gint _tmp15_; + LiveChartPadding _tmp16_; + gint _tmp17_; + gint _tmp18_; + LiveChartPadding _tmp19_; +#line 46 "../src/grid.vala" + _tmp8_ = config->x_axis; +#line 46 "../src/grid.vala" + _tmp9_ = _tmp8_->axis; +#line 46 "../src/grid.vala" + live_chart_path_configure (_tmp9_, ctx); +#line 47 "../src/grid.vala" + _tmp10_ = config->padding; +#line 47 "../src/grid.vala" + _tmp11_ = live_chart_config_get_height (config); +#line 47 "../src/grid.vala" + _tmp12_ = _tmp11_; +#line 47 "../src/grid.vala" + _tmp13_ = config->padding; +#line 47 "../src/grid.vala" + cairo_move_to (ctx, _tmp10_.left + 0.5, (_tmp12_ - _tmp13_.bottom) + 0.5); +#line 48 "../src/grid.vala" + _tmp14_ = live_chart_config_get_width (config); +#line 48 "../src/grid.vala" + _tmp15_ = _tmp14_; +#line 48 "../src/grid.vala" + _tmp16_ = config->padding; +#line 48 "../src/grid.vala" + _tmp17_ = live_chart_config_get_height (config); +#line 48 "../src/grid.vala" + _tmp18_ = _tmp17_; +#line 48 "../src/grid.vala" + _tmp19_ = config->padding; +#line 48 "../src/grid.vala" + cairo_line_to (ctx, (_tmp15_ - _tmp16_.right) + 0.5, (_tmp18_ - _tmp19_.bottom) + 0.5); +#line 49 "../src/grid.vala" + cairo_stroke (ctx); +#line 50 "../src/grid.vala" + live_chart_grid_restore (self, ctx); +#line 233 "grid.c" + } +} + +void +live_chart_grid_render_ordinate (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + gboolean _tmp0_ = FALSE; + LiveChartYAxis* _tmp1_; + gboolean _tmp2_; + gboolean _tmp3_; +#line 54 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 54 "../src/grid.vala" + g_return_if_fail (ctx != NULL); +#line 54 "../src/grid.vala" + g_return_if_fail (config != NULL); +#line 55 "../src/grid.vala" + _tmp1_ = config->y_axis; +#line 55 "../src/grid.vala" + _tmp2_ = live_chart_yaxis_get_visible (_tmp1_); +#line 55 "../src/grid.vala" + _tmp3_ = _tmp2_; +#line 55 "../src/grid.vala" + if (_tmp3_) { +#line 260 "grid.c" + LiveChartYAxis* _tmp4_; + LiveChartPath* _tmp5_; + gboolean _tmp6_; + gboolean _tmp7_; +#line 55 "../src/grid.vala" + _tmp4_ = config->y_axis; +#line 55 "../src/grid.vala" + _tmp5_ = _tmp4_->axis; +#line 55 "../src/grid.vala" + _tmp6_ = live_chart_path_get_visible (_tmp5_); +#line 55 "../src/grid.vala" + _tmp7_ = _tmp6_; +#line 55 "../src/grid.vala" + _tmp0_ = _tmp7_; +#line 275 "grid.c" + } else { +#line 55 "../src/grid.vala" + _tmp0_ = FALSE; +#line 279 "grid.c" + } +#line 55 "../src/grid.vala" + if (_tmp0_) { +#line 283 "grid.c" + LiveChartYAxis* _tmp8_; + LiveChartPath* _tmp9_; + LiveChartPadding _tmp10_; + gint _tmp11_; + gint _tmp12_; + LiveChartPadding _tmp13_; + LiveChartPadding _tmp14_; + LiveChartPadding _tmp15_; +#line 56 "../src/grid.vala" + _tmp8_ = config->y_axis; +#line 56 "../src/grid.vala" + _tmp9_ = _tmp8_->axis; +#line 56 "../src/grid.vala" + live_chart_path_configure (_tmp9_, ctx); +#line 57 "../src/grid.vala" + _tmp10_ = config->padding; +#line 57 "../src/grid.vala" + _tmp11_ = live_chart_config_get_height (config); +#line 57 "../src/grid.vala" + _tmp12_ = _tmp11_; +#line 57 "../src/grid.vala" + _tmp13_ = config->padding; +#line 57 "../src/grid.vala" + cairo_move_to (ctx, _tmp10_.left + 0.5, (_tmp12_ - _tmp13_.bottom) + 0.5); +#line 58 "../src/grid.vala" + _tmp14_ = config->padding; +#line 58 "../src/grid.vala" + _tmp15_ = config->padding; +#line 58 "../src/grid.vala" + cairo_line_to (ctx, _tmp14_.left + 0.5, _tmp15_.top + 0.5); +#line 59 "../src/grid.vala" + cairo_stroke (ctx); +#line 60 "../src/grid.vala" + live_chart_grid_restore (self, ctx); +#line 318 "grid.c" + } +} + +void +live_chart_grid_render_grid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ +#line 64 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 64 "../src/grid.vala" + g_return_if_fail (ctx != NULL); +#line 64 "../src/grid.vala" + g_return_if_fail (config != NULL); +#line 65 "../src/grid.vala" + live_chart_grid_render_hgrid (self, ctx, config); +#line 66 "../src/grid.vala" + live_chart_grid_render_vgrid (self, ctx, config); +#line 337 "grid.c" +} + +void +live_chart_grid_render_vgrid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + gint64 time = 0LL; + GTimeZone* _tmp0_; + GTimeZone* _tmp1_; + GDateTime* _tmp2_; + GDateTime* _tmp3_; + gint64 _tmp4_; +#line 69 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 69 "../src/grid.vala" + g_return_if_fail (ctx != NULL); +#line 69 "../src/grid.vala" + g_return_if_fail (config != NULL); +#line 70 "../src/grid.vala" + _tmp0_ = g_time_zone_new_local (); +#line 70 "../src/grid.vala" + _tmp1_ = _tmp0_; +#line 70 "../src/grid.vala" + _tmp2_ = g_date_time_new_now (_tmp1_); +#line 70 "../src/grid.vala" + _tmp3_ = _tmp2_; +#line 70 "../src/grid.vala" + _tmp4_ = g_date_time_to_unix (_tmp3_); +#line 70 "../src/grid.vala" + _g_date_time_unref0 (_tmp3_); +#line 70 "../src/grid.vala" + _g_time_zone_unref0 (_tmp1_); +#line 70 "../src/grid.vala" + time = _tmp4_; +#line 373 "grid.c" + { + gdouble i = 0.0; + gint _tmp5_; + gint _tmp6_; + LiveChartPadding _tmp7_; +#line 71 "../src/grid.vala" + _tmp5_ = live_chart_config_get_width (config); +#line 71 "../src/grid.vala" + _tmp6_ = _tmp5_; +#line 71 "../src/grid.vala" + _tmp7_ = config->padding; +#line 71 "../src/grid.vala" + i = (gdouble) (_tmp6_ - _tmp7_.right); +#line 387 "grid.c" + { + gboolean _tmp8_ = FALSE; +#line 71 "../src/grid.vala" + _tmp8_ = TRUE; +#line 71 "../src/grid.vala" + while (TRUE) { +#line 394 "grid.c" + LiveChartPadding _tmp12_; + LiveChartXAxis* _tmp13_; + LiveChartPath* _tmp14_; + gboolean _tmp15_; + gboolean _tmp16_; + gboolean _tmp23_ = FALSE; + LiveChartXAxis* _tmp24_; + gboolean _tmp25_; + gboolean _tmp26_; + LiveChartXAxis* _tmp50_; + gfloat _tmp51_; + gfloat _tmp52_; +#line 71 "../src/grid.vala" + if (!_tmp8_) { +#line 409 "grid.c" + LiveChartXAxis* _tmp9_; + gfloat _tmp10_; + gfloat _tmp11_; +#line 71 "../src/grid.vala" + _tmp9_ = config->x_axis; +#line 71 "../src/grid.vala" + _tmp10_ = live_chart_xaxis_get_tick_length (_tmp9_); +#line 71 "../src/grid.vala" + _tmp11_ = _tmp10_; +#line 71 "../src/grid.vala" + i -= (gdouble) _tmp11_; +#line 421 "grid.c" + } +#line 71 "../src/grid.vala" + _tmp8_ = FALSE; +#line 71 "../src/grid.vala" + _tmp12_ = config->padding; +#line 71 "../src/grid.vala" + if (!(i > ((gdouble) _tmp12_.left))) { +#line 71 "../src/grid.vala" + break; +#line 431 "grid.c" + } +#line 72 "../src/grid.vala" + _tmp13_ = config->x_axis; +#line 72 "../src/grid.vala" + _tmp14_ = _tmp13_->lines; +#line 72 "../src/grid.vala" + _tmp15_ = live_chart_path_get_visible (_tmp14_); +#line 72 "../src/grid.vala" + _tmp16_ = _tmp15_; +#line 72 "../src/grid.vala" + if (_tmp16_) { +#line 443 "grid.c" + LiveChartXAxis* _tmp17_; + LiveChartPath* _tmp18_; + gint _tmp19_; + gint _tmp20_; + LiveChartPadding _tmp21_; + LiveChartPadding _tmp22_; +#line 73 "../src/grid.vala" + _tmp17_ = config->x_axis; +#line 73 "../src/grid.vala" + _tmp18_ = _tmp17_->lines; +#line 73 "../src/grid.vala" + live_chart_path_configure (_tmp18_, ctx); +#line 74 "../src/grid.vala" + _tmp19_ = live_chart_config_get_height (config); +#line 74 "../src/grid.vala" + _tmp20_ = _tmp19_; +#line 74 "../src/grid.vala" + _tmp21_ = config->padding; +#line 74 "../src/grid.vala" + cairo_move_to (ctx, ((gint) i) + 0.5, (0.5 + _tmp20_) - _tmp21_.bottom); +#line 75 "../src/grid.vala" + _tmp22_ = config->padding; +#line 75 "../src/grid.vala" + cairo_line_to (ctx, ((gint) i) + 0.5, 0.5 + _tmp22_.top); +#line 76 "../src/grid.vala" + cairo_stroke (ctx); +#line 77 "../src/grid.vala" + live_chart_grid_restore (self, ctx); +#line 472 "grid.c" + } +#line 81 "../src/grid.vala" + _tmp24_ = config->x_axis; +#line 81 "../src/grid.vala" + _tmp25_ = live_chart_xaxis_get_visible (_tmp24_); +#line 81 "../src/grid.vala" + _tmp26_ = _tmp25_; +#line 81 "../src/grid.vala" + if (_tmp26_) { +#line 482 "grid.c" + LiveChartXAxis* _tmp27_; + LiveChartLabels* _tmp28_; + gboolean _tmp29_; + gboolean _tmp30_; +#line 81 "../src/grid.vala" + _tmp27_ = config->x_axis; +#line 81 "../src/grid.vala" + _tmp28_ = _tmp27_->labels; +#line 81 "../src/grid.vala" + _tmp29_ = live_chart_labels_get_visible (_tmp28_); +#line 81 "../src/grid.vala" + _tmp30_ = _tmp29_; +#line 81 "../src/grid.vala" + _tmp23_ = _tmp30_; +#line 497 "grid.c" + } else { +#line 81 "../src/grid.vala" + _tmp23_ = FALSE; +#line 501 "grid.c" + } +#line 81 "../src/grid.vala" + if (_tmp23_) { +#line 505 "grid.c" + LiveChartXAxis* _tmp31_; + LiveChartLabels* _tmp32_; + LiveChartFont* _tmp33_; + LiveChartFont* _tmp34_; + gchar* text = NULL; + GDateTime* _tmp35_; + GDateTime* _tmp36_; + gchar* _tmp37_; + gchar* _tmp38_; + cairo_text_extents_t extents = {0}; + const gchar* _tmp39_; + cairo_text_extents_t _tmp40_ = {0}; + cairo_text_extents_t _tmp41_; + gint _tmp42_; + gint _tmp43_; + LiveChartPadding _tmp44_; + LiveChartXAxis* _tmp45_; + LiveChartLabels* _tmp46_; + cairo_text_extents_t _tmp47_ = {0}; + cairo_text_extents_t _tmp48_; + const gchar* _tmp49_; +#line 82 "../src/grid.vala" + _tmp31_ = config->x_axis; +#line 82 "../src/grid.vala" + _tmp32_ = _tmp31_->labels; +#line 82 "../src/grid.vala" + _tmp33_ = live_chart_labels_get_font (_tmp32_); +#line 82 "../src/grid.vala" + _tmp34_ = _tmp33_; +#line 82 "../src/grid.vala" + live_chart_font_configure (_tmp34_, ctx); +#line 83 "../src/grid.vala" + _tmp35_ = g_date_time_new_from_unix_local (time); +#line 83 "../src/grid.vala" + _tmp36_ = _tmp35_; +#line 83 "../src/grid.vala" + _tmp37_ = g_date_time_format (_tmp36_, "%H:%M:%S"); +#line 83 "../src/grid.vala" + _tmp38_ = _tmp37_; +#line 83 "../src/grid.vala" + _g_date_time_unref0 (_tmp36_); +#line 83 "../src/grid.vala" + text = _tmp38_; +#line 85 "../src/grid.vala" + _tmp39_ = text; +#line 85 "../src/grid.vala" + cairo_text_extents (ctx, _tmp39_, &_tmp40_); +#line 85 "../src/grid.vala" + extents = _tmp40_; +#line 87 "../src/grid.vala" + _tmp41_ = extents; +#line 87 "../src/grid.vala" + _tmp42_ = live_chart_config_get_height (config); +#line 87 "../src/grid.vala" + _tmp43_ = _tmp42_; +#line 87 "../src/grid.vala" + _tmp44_ = config->padding; +#line 87 "../src/grid.vala" + _tmp45_ = config->x_axis; +#line 87 "../src/grid.vala" + _tmp46_ = _tmp45_->labels; +#line 87 "../src/grid.vala" + live_chart_labels_get_extents (_tmp46_, &_tmp47_); +#line 87 "../src/grid.vala" + _tmp48_ = _tmp47_; +#line 87 "../src/grid.vala" + cairo_move_to (ctx, (i + 0.5) - (_tmp41_.width / 2), (((0.5 + _tmp43_) - _tmp44_.bottom) + _tmp48_.height) + LIVE_CHART_GRID_ABSCISSA_TIME_PADDING); +#line 88 "../src/grid.vala" + _tmp49_ = text; +#line 88 "../src/grid.vala" + cairo_show_text (ctx, _tmp49_); +#line 89 "../src/grid.vala" + cairo_stroke (ctx); +#line 81 "../src/grid.vala" + _g_free0 (text); +#line 581 "grid.c" + } +#line 91 "../src/grid.vala" + _tmp50_ = config->x_axis; +#line 91 "../src/grid.vala" + _tmp51_ = live_chart_xaxis_get_tick_interval (_tmp50_); +#line 91 "../src/grid.vala" + _tmp52_ = _tmp51_; +#line 91 "../src/grid.vala" + time -= (gint64) ((gint) _tmp52_); +#line 591 "grid.c" + } + } + } +} + +void +live_chart_grid_render_hgrid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; +#line 95 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 95 "../src/grid.vala" + g_return_if_fail (ctx != NULL); +#line 95 "../src/grid.vala" + g_return_if_fail (config != NULL); +#line 97 "../src/grid.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 97 "../src/grid.vala" + boundaries = _tmp0_; +#line 614 "grid.c" + { + GeeList* _position_list = NULL; + LiveChartYAxis* _tmp1_; + LiveChartTicks _tmp2_; + GeeList* _tmp3_; + gint _position_size = 0; + GeeList* _tmp4_; + gint _tmp5_; + gint _tmp6_; + gint _position_index = 0; +#line 98 "../src/grid.vala" + _tmp1_ = config->y_axis; +#line 98 "../src/grid.vala" + _tmp2_ = _tmp1_->ticks; +#line 98 "../src/grid.vala" + _tmp3_ = _tmp2_.values; +#line 98 "../src/grid.vala" + _position_list = _tmp3_; +#line 98 "../src/grid.vala" + _tmp4_ = _position_list; +#line 98 "../src/grid.vala" + _tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_); +#line 98 "../src/grid.vala" + _tmp6_ = _tmp5_; +#line 98 "../src/grid.vala" + _position_size = _tmp6_; +#line 98 "../src/grid.vala" + _position_index = -1; +#line 98 "../src/grid.vala" + while (TRUE) { +#line 645 "grid.c" + gint _tmp7_; + gint _tmp8_; + gfloat position = 0.0F; + GeeList* _tmp9_; + gpointer _tmp10_; + gfloat* _tmp11_; + gfloat _tmp12_; + gdouble y = 0.0; + LiveChartBoundaries _tmp13_; + LiveChartBoundaries _tmp14_; + LiveChartBoundary _tmp15_; + LiveChartYAxis* _tmp16_; + LiveChartBoundaries _tmp17_; + LiveChartBoundary _tmp18_; + LiveChartYAxis* _tmp19_; + LiveChartPath* _tmp20_; + gboolean _tmp21_; + gboolean _tmp22_; + gboolean _tmp29_ = FALSE; + LiveChartYAxis* _tmp30_; + gboolean _tmp31_; + gboolean _tmp32_; +#line 98 "../src/grid.vala" + _position_index = _position_index + 1; +#line 98 "../src/grid.vala" + _tmp7_ = _position_index; +#line 98 "../src/grid.vala" + _tmp8_ = _position_size; +#line 98 "../src/grid.vala" + if (!(_tmp7_ < _tmp8_)) { +#line 98 "../src/grid.vala" + break; +#line 678 "grid.c" + } +#line 98 "../src/grid.vala" + _tmp9_ = _position_list; +#line 98 "../src/grid.vala" + _tmp10_ = gee_list_get (_tmp9_, _position_index); +#line 98 "../src/grid.vala" + _tmp11_ = (gfloat*) _tmp10_; +#line 98 "../src/grid.vala" + _tmp12_ = *_tmp11_; +#line 98 "../src/grid.vala" + _g_free0 (_tmp11_); +#line 98 "../src/grid.vala" + position = _tmp12_; +#line 100 "../src/grid.vala" + _tmp13_ = boundaries; +#line 100 "../src/grid.vala" + _tmp14_ = boundaries; +#line 100 "../src/grid.vala" + _tmp15_ = _tmp14_.y; +#line 100 "../src/grid.vala" + _tmp16_ = config->y_axis; +#line 100 "../src/grid.vala" + y = (_tmp13_.height + _tmp15_.min) - (position * live_chart_yaxis_get_ratio (_tmp16_)); +#line 101 "../src/grid.vala" + _tmp17_ = boundaries; +#line 101 "../src/grid.vala" + _tmp18_ = _tmp17_.y; +#line 101 "../src/grid.vala" + if (y < ((gdouble) _tmp18_.min)) { +#line 102 "../src/grid.vala" + break; +#line 710 "grid.c" + } +#line 104 "../src/grid.vala" + _tmp19_ = config->y_axis; +#line 104 "../src/grid.vala" + _tmp20_ = _tmp19_->lines; +#line 104 "../src/grid.vala" + _tmp21_ = live_chart_path_get_visible (_tmp20_); +#line 104 "../src/grid.vala" + _tmp22_ = _tmp21_; +#line 104 "../src/grid.vala" + if (_tmp22_) { +#line 722 "grid.c" + LiveChartYAxis* _tmp23_; + LiveChartPath* _tmp24_; + LiveChartBoundaries _tmp25_; + LiveChartBoundary _tmp26_; + LiveChartBoundaries _tmp27_; + LiveChartBoundary _tmp28_; +#line 105 "../src/grid.vala" + _tmp23_ = config->y_axis; +#line 105 "../src/grid.vala" + _tmp24_ = _tmp23_->lines; +#line 105 "../src/grid.vala" + live_chart_path_configure (_tmp24_, ctx); +#line 106 "../src/grid.vala" + _tmp25_ = boundaries; +#line 106 "../src/grid.vala" + _tmp26_ = _tmp25_.x; +#line 106 "../src/grid.vala" + cairo_move_to (ctx, 0.5 + _tmp26_.max, ((gint) y) + 0.5); +#line 107 "../src/grid.vala" + _tmp27_ = boundaries; +#line 107 "../src/grid.vala" + _tmp28_ = _tmp27_.x; +#line 107 "../src/grid.vala" + cairo_line_to (ctx, _tmp28_.min + 0.5, ((gint) y) + 0.5); +#line 108 "../src/grid.vala" + cairo_stroke (ctx); +#line 109 "../src/grid.vala" + live_chart_grid_restore (self, ctx); +#line 751 "grid.c" + } +#line 113 "../src/grid.vala" + _tmp30_ = config->y_axis; +#line 113 "../src/grid.vala" + _tmp31_ = live_chart_yaxis_get_visible (_tmp30_); +#line 113 "../src/grid.vala" + _tmp32_ = _tmp31_; +#line 113 "../src/grid.vala" + if (_tmp32_) { +#line 761 "grid.c" + LiveChartYAxis* _tmp33_; + LiveChartLabels* _tmp34_; + gboolean _tmp35_; + gboolean _tmp36_; +#line 113 "../src/grid.vala" + _tmp33_ = config->y_axis; +#line 113 "../src/grid.vala" + _tmp34_ = _tmp33_->labels; +#line 113 "../src/grid.vala" + _tmp35_ = live_chart_labels_get_visible (_tmp34_); +#line 113 "../src/grid.vala" + _tmp36_ = _tmp35_; +#line 113 "../src/grid.vala" + _tmp29_ = _tmp36_; +#line 776 "grid.c" + } else { +#line 113 "../src/grid.vala" + _tmp29_ = FALSE; +#line 780 "grid.c" + } +#line 113 "../src/grid.vala" + if (_tmp29_) { +#line 784 "grid.c" + LiveChartYAxis* _tmp37_; + LiveChartLabels* _tmp38_; + LiveChartFont* _tmp39_; + LiveChartFont* _tmp40_; + gchar* value = NULL; + LiveChartYAxis* _tmp41_; + const gchar* _tmp42_; + const gchar* _tmp43_; + gchar* _tmp44_; + cairo_text_extents_t extents = {0}; + const gchar* _tmp45_; + cairo_text_extents_t _tmp46_ = {0}; + LiveChartBoundaries _tmp47_; + LiveChartBoundary _tmp48_; + cairo_text_extents_t _tmp49_; + cairo_text_extents_t _tmp50_; + const gchar* _tmp51_; +#line 114 "../src/grid.vala" + _tmp37_ = config->y_axis; +#line 114 "../src/grid.vala" + _tmp38_ = _tmp37_->labels; +#line 114 "../src/grid.vala" + _tmp39_ = live_chart_labels_get_font (_tmp38_); +#line 114 "../src/grid.vala" + _tmp40_ = _tmp39_; +#line 114 "../src/grid.vala" + live_chart_font_configure (_tmp40_, ctx); +#line 115 "../src/grid.vala" + _tmp41_ = config->y_axis; +#line 115 "../src/grid.vala" + _tmp42_ = live_chart_yaxis_get_unit (_tmp41_); +#line 115 "../src/grid.vala" + _tmp43_ = _tmp42_; +#line 115 "../src/grid.vala" + _tmp44_ = live_chart_format_for_y_axis (_tmp43_, position); +#line 115 "../src/grid.vala" + value = _tmp44_; +#line 118 "../src/grid.vala" + _tmp45_ = value; +#line 118 "../src/grid.vala" + cairo_text_extents (ctx, _tmp45_, &_tmp46_); +#line 118 "../src/grid.vala" + extents = _tmp46_; +#line 119 "../src/grid.vala" + _tmp47_ = boundaries; +#line 119 "../src/grid.vala" + _tmp48_ = _tmp47_.x; +#line 119 "../src/grid.vala" + _tmp49_ = extents; +#line 119 "../src/grid.vala" + _tmp50_ = extents; +#line 119 "../src/grid.vala" + cairo_move_to (ctx, (_tmp48_.min - _tmp49_.width) - 5, (y + (_tmp50_.height / 2)) + 0.5); +#line 120 "../src/grid.vala" + _tmp51_ = value; +#line 120 "../src/grid.vala" + cairo_show_text (ctx, _tmp51_); +#line 121 "../src/grid.vala" + cairo_stroke (ctx); +#line 113 "../src/grid.vala" + _g_free0 (value); +#line 846 "grid.c" + } + } + } +} + +void +live_chart_grid_update_bounding_box (LiveChartGrid* self, + LiveChartConfig* config) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; + LiveChartBoundaries _tmp1_; + LiveChartBoundary _tmp2_; + LiveChartBoundaries _tmp3_; + LiveChartBoundary _tmp4_; + LiveChartBoundaries _tmp5_; + LiveChartBoundary _tmp6_; + LiveChartBoundaries _tmp7_; + LiveChartBoundary _tmp8_; + LiveChartBoundaries _tmp9_; + LiveChartBoundary _tmp10_; + LiveChartBoundaries _tmp11_; + LiveChartBoundary _tmp12_; + LiveChartBoundingBox _tmp13_ = {0}; +#line 126 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 126 "../src/grid.vala" + g_return_if_fail (config != NULL); +#line 127 "../src/grid.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 127 "../src/grid.vala" + boundaries = _tmp0_; +#line 128 "../src/grid.vala" + _tmp1_ = boundaries; +#line 128 "../src/grid.vala" + _tmp2_ = _tmp1_.x; +#line 128 "../src/grid.vala" + _tmp3_ = boundaries; +#line 128 "../src/grid.vala" + _tmp4_ = _tmp3_.y; +#line 128 "../src/grid.vala" + _tmp5_ = boundaries; +#line 128 "../src/grid.vala" + _tmp6_ = _tmp5_.x; +#line 128 "../src/grid.vala" + _tmp7_ = boundaries; +#line 128 "../src/grid.vala" + _tmp8_ = _tmp7_.x; +#line 128 "../src/grid.vala" + _tmp9_ = boundaries; +#line 128 "../src/grid.vala" + _tmp10_ = _tmp9_.y; +#line 128 "../src/grid.vala" + _tmp11_ = boundaries; +#line 128 "../src/grid.vala" + _tmp12_ = _tmp11_.y; +#line 128 "../src/grid.vala" + memset (&_tmp13_, 0, sizeof (LiveChartBoundingBox)); +#line 128 "../src/grid.vala" + _tmp13_.x = (gdouble) _tmp2_.min; +#line 128 "../src/grid.vala" + _tmp13_.y = (gdouble) _tmp4_.min; +#line 128 "../src/grid.vala" + _tmp13_.width = (gdouble) (_tmp6_.max - _tmp8_.min); +#line 128 "../src/grid.vala" + _tmp13_.height = (gdouble) ((_tmp10_.max - _tmp12_.min) + LIVE_CHART_GRID_ABSCISSA_TIME_PADDING); +#line 128 "../src/grid.vala" + self->bounding_box = _tmp13_; +#line 915 "grid.c" +} + +void +live_chart_grid_debug (LiveChartGrid* self, + cairo_t* ctx) +{ + gchar* debug = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; +#line 136 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 136 "../src/grid.vala" + g_return_if_fail (ctx != NULL); +#line 137 "../src/grid.vala" + _tmp0_ = g_getenv ("LIVE_CHART_DEBUG"); +#line 137 "../src/grid.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 137 "../src/grid.vala" + debug = _tmp1_; +#line 138 "../src/grid.vala" + _tmp2_ = debug; +#line 138 "../src/grid.vala" + if (_tmp2_ != NULL) { +#line 940 "grid.c" + LiveChartBoundingBox _tmp3_; + LiveChartBoundingBox _tmp4_; + LiveChartBoundingBox _tmp5_; + LiveChartBoundingBox _tmp6_; +#line 139 "../src/grid.vala" + _tmp3_ = self->bounding_box; +#line 139 "../src/grid.vala" + _tmp4_ = self->bounding_box; +#line 139 "../src/grid.vala" + _tmp5_ = self->bounding_box; +#line 139 "../src/grid.vala" + _tmp6_ = self->bounding_box; +#line 139 "../src/grid.vala" + cairo_rectangle (ctx, _tmp3_.x, _tmp4_.y, _tmp5_.width, _tmp6_.height); +#line 140 "../src/grid.vala" + cairo_stroke (ctx); +#line 957 "grid.c" + } +#line 136 "../src/grid.vala" + _g_free0 (debug); +#line 961 "grid.c" +} + +LiveChartGrid* +live_chart_grid_construct (GType object_type) +{ + LiveChartGrid * self = NULL; +#line 5 "../src/grid.vala" + self = (LiveChartGrid*) g_object_new (object_type, NULL); +#line 5 "../src/grid.vala" + return self; +#line 972 "grid.c" +} + +LiveChartGrid* +live_chart_grid_new (void) +{ +#line 5 "../src/grid.vala" + return live_chart_grid_construct (LIVE_CHART_TYPE_GRID); +#line 980 "grid.c" +} + +static gboolean +live_chart_grid_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartGrid* self; +#line 14 "../src/grid.vala" + self = (LiveChartGrid*) base; +#line 14 "../src/grid.vala" + result = self->priv->_visible; +#line 14 "../src/grid.vala" + return result; +#line 994 "grid.c" +} + +static void +live_chart_grid_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartGrid* self; + gboolean old_value; +#line 14 "../src/grid.vala" + self = (LiveChartGrid*) base; +#line 14 "../src/grid.vala" + old_value = live_chart_grid_real_get_visible (base); +#line 14 "../src/grid.vala" + if (old_value != value) { +#line 14 "../src/grid.vala" + self->priv->_visible = value; +#line 14 "../src/grid.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_grid_properties[LIVE_CHART_GRID_VISIBLE_PROPERTY]); +#line 1013 "grid.c" + } +} + +void +live_chart_grid_get_main_color (LiveChartGrid* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 16 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 16 "../src/grid.vala" + _tmp0_ = self->priv->_main_color; +#line 16 "../src/grid.vala" + *result = _tmp0_; +#line 16 "../src/grid.vala" + return; +#line 1030 "grid.c" +} + +static gboolean +_gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2) +{ +#line 16 "../src/grid.vala" + if (s1 == s2) { +#line 16 "../src/grid.vala" + return TRUE; +#line 1041 "grid.c" + } +#line 16 "../src/grid.vala" + if (s1 == NULL) { +#line 16 "../src/grid.vala" + return FALSE; +#line 1047 "grid.c" + } +#line 16 "../src/grid.vala" + if (s2 == NULL) { +#line 16 "../src/grid.vala" + return FALSE; +#line 1053 "grid.c" + } +#line 16 "../src/grid.vala" + if (s1->red != s2->red) { +#line 16 "../src/grid.vala" + return FALSE; +#line 1059 "grid.c" + } +#line 16 "../src/grid.vala" + if (s1->green != s2->green) { +#line 16 "../src/grid.vala" + return FALSE; +#line 1065 "grid.c" + } +#line 16 "../src/grid.vala" + if (s1->blue != s2->blue) { +#line 16 "../src/grid.vala" + return FALSE; +#line 1071 "grid.c" + } +#line 16 "../src/grid.vala" + if (s1->alpha != s2->alpha) { +#line 16 "../src/grid.vala" + return FALSE; +#line 1077 "grid.c" + } +#line 16 "../src/grid.vala" + return TRUE; +#line 1081 "grid.c" +} + +void +live_chart_grid_set_main_color (LiveChartGrid* self, + GdkRGBA * value) +{ + GdkRGBA old_value; +#line 16 "../src/grid.vala" + g_return_if_fail (self != NULL); +#line 16 "../src/grid.vala" + live_chart_grid_get_main_color (self, &old_value); +#line 16 "../src/grid.vala" + if (_gdk_rgba_equal (value, &old_value) != TRUE) { +#line 1095 "grid.c" + GdkRGBA _tmp0_; +#line 16 "../src/grid.vala" + _tmp0_ = *value; +#line 16 "../src/grid.vala" + self->priv->_main_color = _tmp0_; +#line 16 "../src/grid.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_grid_properties[LIVE_CHART_GRID_MAIN_COLOR_PROPERTY]); +#line 1103 "grid.c" + } +} + +static void +live_chart_grid_class_init (LiveChartGridClass * klass, + gpointer klass_data) +{ +#line 5 "../src/grid.vala" + live_chart_grid_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/grid.vala" + g_type_class_adjust_private_offset (klass, &LiveChartGrid_private_offset); +#line 5 "../src/grid.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_grid_get_property; +#line 5 "../src/grid.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_grid_set_property; +#line 5 "../src/grid.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_grid_finalize; +#line 5 "../src/grid.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_GRID_VISIBLE_PROPERTY, live_chart_grid_properties[LIVE_CHART_GRID_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 5 "../src/grid.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_GRID_MAIN_COLOR_PROPERTY, live_chart_grid_properties[LIVE_CHART_GRID_MAIN_COLOR_PROPERTY] = g_param_spec_boxed ("main-color", "main-color", "main-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 1125 "grid.c" +} + +static void +live_chart_grid_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 5 "../src/grid.vala" + live_chart_grid_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 5 "../src/grid.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_grid_real_draw; +#line 5 "../src/grid.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_grid_real_get_bounding_box; +#line 5 "../src/grid.vala" + iface->get_visible = live_chart_grid_real_get_visible; +#line 5 "../src/grid.vala" + iface->set_visible = live_chart_grid_real_set_visible; +#line 1142 "grid.c" +} + +static void +live_chart_grid_instance_init (LiveChartGrid * self, + gpointer klass) +{ + LiveChartBoundingBox _tmp0_ = {0}; + GdkRGBA _tmp1_ = {0}; +#line 5 "../src/grid.vala" + self->priv = live_chart_grid_get_instance_private (self); +#line 7 "../src/grid.vala" + memset (&_tmp0_, 0, sizeof (LiveChartBoundingBox)); +#line 7 "../src/grid.vala" + _tmp0_.x = (gdouble) 0; +#line 7 "../src/grid.vala" + _tmp0_.y = (gdouble) 0; +#line 7 "../src/grid.vala" + _tmp0_.width = (gdouble) 0; +#line 7 "../src/grid.vala" + _tmp0_.height = (gdouble) 0; +#line 7 "../src/grid.vala" + self->bounding_box = _tmp0_; +#line 14 "../src/grid.vala" + self->priv->_visible = TRUE; +#line 15 "../src/grid.vala" + memset (&_tmp1_, 0, sizeof (GdkRGBA)); +#line 15 "../src/grid.vala" + _tmp1_.red = 0.4; +#line 15 "../src/grid.vala" + _tmp1_.green = 0.4; +#line 15 "../src/grid.vala" + _tmp1_.blue = 0.4; +#line 15 "../src/grid.vala" + _tmp1_.alpha = 1.0; +#line 15 "../src/grid.vala" + self->priv->_main_color = _tmp1_; +#line 1179 "grid.c" +} + +static void +live_chart_grid_finalize (GObject * obj) +{ + LiveChartGrid * self; +#line 5 "../src/grid.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_GRID, LiveChartGrid); +#line 5 "../src/grid.vala" + G_OBJECT_CLASS (live_chart_grid_parent_class)->finalize (obj); +#line 1190 "grid.c" +} + +static GType +live_chart_grid_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartGridClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_grid_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartGrid), 0, (GInstanceInitFunc) live_chart_grid_instance_init, NULL }; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_grid_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_grid_type_id; + live_chart_grid_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartGrid", &g_define_type_info, 0); + g_type_add_interface_static (live_chart_grid_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartGrid_private_offset = g_type_add_instance_private (live_chart_grid_type_id, sizeof (LiveChartGridPrivate)); + return live_chart_grid_type_id; +} + +GType +live_chart_grid_get_type (void) +{ + static volatile gsize live_chart_grid_type_id__once = 0; + if (g_once_init_enter (&live_chart_grid_type_id__once)) { + GType live_chart_grid_type_id; + live_chart_grid_type_id = live_chart_grid_get_type_once (); + g_once_init_leave (&live_chart_grid_type_id__once, live_chart_grid_type_id); + } + return live_chart_grid_type_id__once; +} + +static void +_vala_live_chart_grid_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartGrid * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_GRID, LiveChartGrid); +#line 5 "../src/grid.vala" + switch (property_id) { +#line 5 "../src/grid.vala" + case LIVE_CHART_GRID_VISIBLE_PROPERTY: +#line 5 "../src/grid.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 5 "../src/grid.vala" + break; +#line 5 "../src/grid.vala" + case LIVE_CHART_GRID_MAIN_COLOR_PROPERTY: +#line 1235 "grid.c" + { + GdkRGBA boxed; +#line 5 "../src/grid.vala" + live_chart_grid_get_main_color (self, &boxed); +#line 5 "../src/grid.vala" + g_value_set_boxed (value, &boxed); +#line 1242 "grid.c" + } +#line 5 "../src/grid.vala" + break; +#line 1246 "grid.c" + default: +#line 5 "../src/grid.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 5 "../src/grid.vala" + break; +#line 1252 "grid.c" + } +} + +static void +_vala_live_chart_grid_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartGrid * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_GRID, LiveChartGrid); +#line 5 "../src/grid.vala" + switch (property_id) { +#line 5 "../src/grid.vala" + case LIVE_CHART_GRID_VISIBLE_PROPERTY: +#line 5 "../src/grid.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 5 "../src/grid.vala" + break; +#line 5 "../src/grid.vala" + case LIVE_CHART_GRID_MAIN_COLOR_PROPERTY: +#line 5 "../src/grid.vala" + live_chart_grid_set_main_color (self, g_value_get_boxed (value)); +#line 5 "../src/grid.vala" + break; +#line 1278 "grid.c" + default: +#line 5 "../src/grid.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 5 "../src/grid.vala" + break; +#line 1284 "grid.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/intersections.c b/iPDC/lib/liblivechart_static.a.p/intersections.c new file mode 100644 index 0000000..78553d1 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/intersections.c @@ -0,0 +1,800 @@ +/* intersections.c generated by valac 0.56.0, the Vala compiler + * generated from intersections.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_INTERSECTIONS_0_PROPERTY, + LIVE_CHART_INTERSECTIONS_NUM_PROPERTIES +}; +static GParamSpec* live_chart_intersections_properties[LIVE_CHART_INTERSECTIONS_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +enum { + LIVE_CHART_INTERSECTION_0_PROPERTY, + LIVE_CHART_INTERSECTION_REGION_PROPERTY, + LIVE_CHART_INTERSECTION_START_X_PROPERTY, + LIVE_CHART_INTERSECTION_END_X_PROPERTY, + LIVE_CHART_INTERSECTION_NUM_PROPERTIES +}; +static GParamSpec* live_chart_intersection_properties[LIVE_CHART_INTERSECTION_NUM_PROPERTIES]; +#define _live_chart_region_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_region_unref (var), NULL))) +#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL))) + +struct _LiveChartIntersectionsPrivate { + GeeList* intersections; +}; + +struct _LiveChartIntersectionPrivate { + LiveChartRegion* _region; + gdouble _start_x; + gdouble _end_x; +}; + +static gint LiveChartIntersections_private_offset; +static gpointer live_chart_intersections_parent_class = NULL; +static gint LiveChartIntersection_private_offset; +static gpointer live_chart_intersection_parent_class = NULL; + +static void live_chart_intersections_finalize (GObject * obj); +static GType live_chart_intersections_get_type_once (void); +static void live_chart_intersection_set_start_x (LiveChartIntersection* self, + gdouble value); +static void live_chart_intersection_set_end_x (LiveChartIntersection* self, + gdouble value); +static gdouble* _double_dup (gdouble* self); +static void live_chart_intersection_finalize (GObject * obj); +static GType live_chart_intersection_get_type_once (void); +static void _vala_live_chart_intersection_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_intersection_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +static inline gpointer +live_chart_intersections_get_instance_private (LiveChartIntersections* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartIntersections_private_offset); +} + +void +live_chart_intersections_close (LiveChartIntersections* self, + gdouble x, + gdouble exited_at) +{ + GeeList* _tmp0_; + gpointer _tmp1_; + LiveChartIntersection* _tmp2_; +#line 5 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 6 "../src/intersections.vala" + _tmp0_ = self->priv->intersections; +#line 6 "../src/intersections.vala" + _tmp1_ = gee_list_last (_tmp0_); +#line 6 "../src/intersections.vala" + _tmp2_ = (LiveChartIntersection*) _tmp1_; +#line 6 "../src/intersections.vala" + live_chart_intersection_close (_tmp2_, x, exited_at); +#line 6 "../src/intersections.vala" + _g_object_unref0 (_tmp2_); +#line 89 "intersections.c" +} + +void +live_chart_intersections_update (LiveChartIntersections* self, + gdouble x) +{ + GeeList* _tmp0_; + gpointer _tmp1_; + LiveChartIntersection* _tmp2_; +#line 9 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 10 "../src/intersections.vala" + _tmp0_ = self->priv->intersections; +#line 10 "../src/intersections.vala" + _tmp1_ = gee_list_last (_tmp0_); +#line 10 "../src/intersections.vala" + _tmp2_ = (LiveChartIntersection*) _tmp1_; +#line 10 "../src/intersections.vala" + live_chart_intersection_update (_tmp2_, x); +#line 10 "../src/intersections.vala" + _g_object_unref0 (_tmp2_); +#line 111 "intersections.c" +} + +void +live_chart_intersections_open (LiveChartIntersections* self, + LiveChartRegion* region, + gdouble x, + gdouble entered_at) +{ + LiveChartIntersection* intersection = NULL; + LiveChartIntersection* _tmp0_; + GeeList* _tmp1_; +#line 13 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 13 "../src/intersections.vala" + g_return_if_fail (region != NULL); +#line 14 "../src/intersections.vala" + _tmp0_ = live_chart_intersection_new (region, x, entered_at); +#line 14 "../src/intersections.vala" + intersection = _tmp0_; +#line 15 "../src/intersections.vala" + _tmp1_ = self->priv->intersections; +#line 15 "../src/intersections.vala" + gee_collection_add ((GeeCollection*) _tmp1_, intersection); +#line 13 "../src/intersections.vala" + _g_object_unref0 (intersection); +#line 137 "intersections.c" +} + +void +live_chart_intersections_open_without_entrypoint (LiveChartIntersections* self, + LiveChartRegion* region, + gdouble x) +{ + LiveChartIntersection* intersection = NULL; + LiveChartIntersection* _tmp0_; + GeeList* _tmp1_; +#line 18 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 18 "../src/intersections.vala" + g_return_if_fail (region != NULL); +#line 19 "../src/intersections.vala" + _tmp0_ = live_chart_intersection_new_without_entry_point (region, x); +#line 19 "../src/intersections.vala" + intersection = _tmp0_; +#line 20 "../src/intersections.vala" + _tmp1_ = self->priv->intersections; +#line 20 "../src/intersections.vala" + gee_collection_add ((GeeCollection*) _tmp1_, intersection); +#line 18 "../src/intersections.vala" + _g_object_unref0 (intersection); +#line 162 "intersections.c" +} + +void +live_chart_intersections_foreach (LiveChartIntersections* self, + GeeForallFunc f, + gpointer f_target) +{ + GeeList* _tmp0_; +#line 23 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 24 "../src/intersections.vala" + _tmp0_ = self->priv->intersections; +#line 24 "../src/intersections.vala" + gee_traversable_foreach ((GeeTraversable*) _tmp0_, f, f_target); +#line 177 "intersections.c" +} + +gboolean +live_chart_intersections_has_an_opened_intersection (LiveChartIntersections* self) +{ + gboolean _tmp0_ = FALSE; + GeeList* _tmp1_; + gint _tmp2_; + gint _tmp3_; + gboolean result; +#line 27 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 28 "../src/intersections.vala" + _tmp1_ = self->priv->intersections; +#line 28 "../src/intersections.vala" + _tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_); +#line 28 "../src/intersections.vala" + _tmp3_ = _tmp2_; +#line 28 "../src/intersections.vala" + if (_tmp3_ > 0) { +#line 198 "intersections.c" + GeeList* _tmp4_; + gpointer _tmp5_; + LiveChartIntersection* _tmp6_; +#line 28 "../src/intersections.vala" + _tmp4_ = self->priv->intersections; +#line 28 "../src/intersections.vala" + _tmp5_ = gee_list_last (_tmp4_); +#line 28 "../src/intersections.vala" + _tmp6_ = (LiveChartIntersection*) _tmp5_; +#line 28 "../src/intersections.vala" + _tmp0_ = live_chart_intersection_is_open (_tmp6_); +#line 28 "../src/intersections.vala" + _g_object_unref0 (_tmp6_); +#line 212 "intersections.c" + } else { +#line 28 "../src/intersections.vala" + _tmp0_ = FALSE; +#line 216 "intersections.c" + } +#line 28 "../src/intersections.vala" + result = _tmp0_; +#line 28 "../src/intersections.vala" + return result; +#line 222 "intersections.c" +} + +static gpointer +_live_chart_region_ref0 (gpointer self) +{ +#line 31 "../src/intersections.vala" + return self ? live_chart_region_ref (self) : NULL; +#line 230 "intersections.c" +} + +LiveChartRegion* +live_chart_intersections_get_current_region (LiveChartIntersections* self) +{ + GeeList* _tmp0_; + gpointer _tmp1_; + LiveChartIntersection* _tmp2_; + LiveChartRegion* _tmp3_; + LiveChartRegion* _tmp4_; + LiveChartRegion* _tmp5_; + LiveChartRegion* _tmp6_; + LiveChartRegion* result; +#line 30 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 31 "../src/intersections.vala" + _tmp0_ = self->priv->intersections; +#line 31 "../src/intersections.vala" + _tmp1_ = gee_list_last (_tmp0_); +#line 31 "../src/intersections.vala" + _tmp2_ = (LiveChartIntersection*) _tmp1_; +#line 31 "../src/intersections.vala" + _tmp3_ = live_chart_intersection_get_region (_tmp2_); +#line 31 "../src/intersections.vala" + _tmp4_ = _tmp3_; +#line 31 "../src/intersections.vala" + _tmp5_ = _live_chart_region_ref0 (_tmp4_); +#line 31 "../src/intersections.vala" + _tmp6_ = _tmp5_; +#line 31 "../src/intersections.vala" + _g_object_unref0 (_tmp2_); +#line 31 "../src/intersections.vala" + result = _tmp6_; +#line 31 "../src/intersections.vala" + return result; +#line 266 "intersections.c" +} + +gint +live_chart_intersections_size (LiveChartIntersections* self) +{ + GeeList* _tmp0_; + gint _tmp1_; + gint _tmp2_; + gint result; +#line 34 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, 0); +#line 35 "../src/intersections.vala" + _tmp0_ = self->priv->intersections; +#line 35 "../src/intersections.vala" + _tmp1_ = gee_collection_get_size ((GeeCollection*) _tmp0_); +#line 35 "../src/intersections.vala" + _tmp2_ = _tmp1_; +#line 35 "../src/intersections.vala" + result = _tmp2_; +#line 35 "../src/intersections.vala" + return result; +#line 288 "intersections.c" +} + +LiveChartIntersection* +live_chart_intersections_get (LiveChartIntersections* self, + gint index) +{ + GeeList* _tmp0_; + gpointer _tmp1_; + LiveChartIntersection* result; +#line 38 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 39 "../src/intersections.vala" + _tmp0_ = self->priv->intersections; +#line 39 "../src/intersections.vala" + _tmp1_ = gee_list_get (_tmp0_, index); +#line 39 "../src/intersections.vala" + result = (LiveChartIntersection*) _tmp1_; +#line 39 "../src/intersections.vala" + return result; +#line 308 "intersections.c" +} + +LiveChartIntersections* +live_chart_intersections_construct (GType object_type) +{ + LiveChartIntersections * self = NULL; +#line 2 "../src/intersections.vala" + self = (LiveChartIntersections*) g_object_new (object_type, NULL); +#line 2 "../src/intersections.vala" + return self; +#line 319 "intersections.c" +} + +LiveChartIntersections* +live_chart_intersections_new (void) +{ +#line 2 "../src/intersections.vala" + return live_chart_intersections_construct (LIVE_CHART_TYPE_INTERSECTIONS); +#line 327 "intersections.c" +} + +static void +live_chart_intersections_class_init (LiveChartIntersectionsClass * klass, + gpointer klass_data) +{ +#line 2 "../src/intersections.vala" + live_chart_intersections_parent_class = g_type_class_peek_parent (klass); +#line 2 "../src/intersections.vala" + g_type_class_adjust_private_offset (klass, &LiveChartIntersections_private_offset); +#line 2 "../src/intersections.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_intersections_finalize; +#line 340 "intersections.c" +} + +static void +live_chart_intersections_instance_init (LiveChartIntersections * self, + gpointer klass) +{ + GeeArrayList* _tmp0_; +#line 2 "../src/intersections.vala" + self->priv = live_chart_intersections_get_instance_private (self); +#line 3 "../src/intersections.vala" + _tmp0_ = gee_array_list_new (LIVE_CHART_TYPE_INTERSECTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); +#line 3 "../src/intersections.vala" + self->priv->intersections = (GeeList*) _tmp0_; +#line 354 "intersections.c" +} + +static void +live_chart_intersections_finalize (GObject * obj) +{ + LiveChartIntersections * self; +#line 2 "../src/intersections.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_INTERSECTIONS, LiveChartIntersections); +#line 3 "../src/intersections.vala" + _g_object_unref0 (self->priv->intersections); +#line 2 "../src/intersections.vala" + G_OBJECT_CLASS (live_chart_intersections_parent_class)->finalize (obj); +#line 367 "intersections.c" +} + +static GType +live_chart_intersections_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartIntersectionsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_intersections_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartIntersections), 0, (GInstanceInitFunc) live_chart_intersections_instance_init, NULL }; + GType live_chart_intersections_type_id; + live_chart_intersections_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartIntersections", &g_define_type_info, 0); + LiveChartIntersections_private_offset = g_type_add_instance_private (live_chart_intersections_type_id, sizeof (LiveChartIntersectionsPrivate)); + return live_chart_intersections_type_id; +} + +GType +live_chart_intersections_get_type (void) +{ + static volatile gsize live_chart_intersections_type_id__once = 0; + if (g_once_init_enter (&live_chart_intersections_type_id__once)) { + GType live_chart_intersections_type_id; + live_chart_intersections_type_id = live_chart_intersections_get_type_once (); + g_once_init_leave (&live_chart_intersections_type_id__once, live_chart_intersections_type_id); + } + return live_chart_intersections_type_id__once; +} + +static inline gpointer +live_chart_intersection_get_instance_private (LiveChartIntersection* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartIntersection_private_offset); +} + +static gdouble* +_double_dup (gdouble* self) +{ + gdouble* dup; +#line 54 "../src/intersections.vala" + dup = g_new0 (gdouble, 1); +#line 54 "../src/intersections.vala" + memcpy (dup, self, sizeof (gdouble)); +#line 54 "../src/intersections.vala" + return dup; +#line 408 "intersections.c" +} + +static gpointer +__double_dup0 (gpointer self) +{ +#line 54 "../src/intersections.vala" + return self ? _double_dup (self) : NULL; +#line 416 "intersections.c" +} + +LiveChartIntersection* +live_chart_intersection_construct (GType object_type, + LiveChartRegion* region, + gdouble start_x, + gdouble entered_at) +{ + LiveChartIntersection * self = NULL; + gdouble* _tmp0_; +#line 50 "../src/intersections.vala" + g_return_val_if_fail (region != NULL, NULL); +#line 50 "../src/intersections.vala" + self = (LiveChartIntersection*) g_object_new (object_type, NULL); +#line 51 "../src/intersections.vala" + live_chart_intersection_set_region (self, region); +#line 52 "../src/intersections.vala" + live_chart_intersection_set_start_x (self, start_x); +#line 53 "../src/intersections.vala" + live_chart_intersection_set_end_x (self, start_x); +#line 54 "../src/intersections.vala" + _tmp0_ = __double_dup0 (&entered_at); +#line 54 "../src/intersections.vala" + _g_free0 (self->entered_at); +#line 54 "../src/intersections.vala" + self->entered_at = _tmp0_; +#line 50 "../src/intersections.vala" + return self; +#line 445 "intersections.c" +} + +LiveChartIntersection* +live_chart_intersection_new (LiveChartRegion* region, + gdouble start_x, + gdouble entered_at) +{ +#line 50 "../src/intersections.vala" + return live_chart_intersection_construct (LIVE_CHART_TYPE_INTERSECTION, region, start_x, entered_at); +#line 455 "intersections.c" +} + +LiveChartIntersection* +live_chart_intersection_construct_without_entry_point (GType object_type, + LiveChartRegion* region, + gdouble start_x) +{ + LiveChartIntersection * self = NULL; +#line 56 "../src/intersections.vala" + g_return_val_if_fail (region != NULL, NULL); +#line 56 "../src/intersections.vala" + self = (LiveChartIntersection*) g_object_new (object_type, NULL); +#line 57 "../src/intersections.vala" + live_chart_intersection_set_region (self, region); +#line 58 "../src/intersections.vala" + live_chart_intersection_set_start_x (self, start_x); +#line 59 "../src/intersections.vala" + live_chart_intersection_set_end_x (self, start_x); +#line 56 "../src/intersections.vala" + return self; +#line 476 "intersections.c" +} + +LiveChartIntersection* +live_chart_intersection_new_without_entry_point (LiveChartRegion* region, + gdouble start_x) +{ +#line 56 "../src/intersections.vala" + return live_chart_intersection_construct_without_entry_point (LIVE_CHART_TYPE_INTERSECTION, region, start_x); +#line 485 "intersections.c" +} + +void +live_chart_intersection_update (LiveChartIntersection* self, + gdouble x) +{ +#line 62 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 63 "../src/intersections.vala" + live_chart_intersection_set_end_x (self, x); +#line 496 "intersections.c" +} + +void +live_chart_intersection_close (LiveChartIntersection* self, + gdouble x, + gdouble exited_at) +{ + gdouble* _tmp0_; +#line 66 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 67 "../src/intersections.vala" + live_chart_intersection_set_end_x (self, x); +#line 68 "../src/intersections.vala" + _tmp0_ = __double_dup0 (&exited_at); +#line 68 "../src/intersections.vala" + _g_free0 (self->exited_at); +#line 68 "../src/intersections.vala" + self->exited_at = _tmp0_; +#line 515 "intersections.c" +} + +gboolean +live_chart_intersection_is_open (LiveChartIntersection* self) +{ + gdouble* _tmp0_; + gboolean result; +#line 71 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 72 "../src/intersections.vala" + _tmp0_ = self->exited_at; +#line 72 "../src/intersections.vala" + result = _tmp0_ == NULL; +#line 72 "../src/intersections.vala" + return result; +#line 531 "intersections.c" +} + +gboolean +live_chart_intersection_is_closed (LiveChartIntersection* self) +{ + gdouble* _tmp0_; + gboolean result; +#line 75 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 76 "../src/intersections.vala" + _tmp0_ = self->exited_at; +#line 76 "../src/intersections.vala" + result = _tmp0_ != NULL; +#line 76 "../src/intersections.vala" + return result; +#line 547 "intersections.c" +} + +LiveChartRegion* +live_chart_intersection_get_region (LiveChartIntersection* self) +{ + LiveChartRegion* result; + LiveChartRegion* _tmp0_; +#line 44 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 44 "../src/intersections.vala" + _tmp0_ = self->priv->_region; +#line 44 "../src/intersections.vala" + result = _tmp0_; +#line 44 "../src/intersections.vala" + return result; +#line 563 "intersections.c" +} + +void +live_chart_intersection_set_region (LiveChartIntersection* self, + LiveChartRegion* value) +{ + LiveChartRegion* old_value; +#line 44 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 44 "../src/intersections.vala" + old_value = live_chart_intersection_get_region (self); +#line 44 "../src/intersections.vala" + if (old_value != value) { +#line 577 "intersections.c" + LiveChartRegion* _tmp0_; +#line 44 "../src/intersections.vala" + _tmp0_ = _live_chart_region_ref0 (value); +#line 44 "../src/intersections.vala" + _live_chart_region_unref0 (self->priv->_region); +#line 44 "../src/intersections.vala" + self->priv->_region = _tmp0_; +#line 44 "../src/intersections.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_intersection_properties[LIVE_CHART_INTERSECTION_REGION_PROPERTY]); +#line 587 "intersections.c" + } +} + +gdouble +live_chart_intersection_get_start_x (LiveChartIntersection* self) +{ + gdouble result; +#line 45 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 45 "../src/intersections.vala" + result = self->priv->_start_x; +#line 45 "../src/intersections.vala" + return result; +#line 601 "intersections.c" +} + +static void +live_chart_intersection_set_start_x (LiveChartIntersection* self, + gdouble value) +{ + gdouble old_value; +#line 45 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 45 "../src/intersections.vala" + old_value = live_chart_intersection_get_start_x (self); +#line 45 "../src/intersections.vala" + if (old_value != value) { +#line 45 "../src/intersections.vala" + self->priv->_start_x = value; +#line 45 "../src/intersections.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_intersection_properties[LIVE_CHART_INTERSECTION_START_X_PROPERTY]); +#line 619 "intersections.c" + } +} + +gdouble +live_chart_intersection_get_end_x (LiveChartIntersection* self) +{ + gdouble result; +#line 46 "../src/intersections.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 46 "../src/intersections.vala" + result = self->priv->_end_x; +#line 46 "../src/intersections.vala" + return result; +#line 633 "intersections.c" +} + +static void +live_chart_intersection_set_end_x (LiveChartIntersection* self, + gdouble value) +{ + gdouble old_value; +#line 46 "../src/intersections.vala" + g_return_if_fail (self != NULL); +#line 46 "../src/intersections.vala" + old_value = live_chart_intersection_get_end_x (self); +#line 46 "../src/intersections.vala" + if (old_value != value) { +#line 46 "../src/intersections.vala" + self->priv->_end_x = value; +#line 46 "../src/intersections.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_intersection_properties[LIVE_CHART_INTERSECTION_END_X_PROPERTY]); +#line 651 "intersections.c" + } +} + +static void +live_chart_intersection_class_init (LiveChartIntersectionClass * klass, + gpointer klass_data) +{ +#line 43 "../src/intersections.vala" + live_chart_intersection_parent_class = g_type_class_peek_parent (klass); +#line 43 "../src/intersections.vala" + g_type_class_adjust_private_offset (klass, &LiveChartIntersection_private_offset); +#line 43 "../src/intersections.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_intersection_get_property; +#line 43 "../src/intersections.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_intersection_set_property; +#line 43 "../src/intersections.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_intersection_finalize; +#line 43 "../src/intersections.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_INTERSECTION_REGION_PROPERTY, live_chart_intersection_properties[LIVE_CHART_INTERSECTION_REGION_PROPERTY] = live_chart_param_spec_region ("region", "region", "region", LIVE_CHART_TYPE_REGION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); +#line 43 "../src/intersections.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_INTERSECTION_START_X_PROPERTY, live_chart_intersection_properties[LIVE_CHART_INTERSECTION_START_X_PROPERTY] = g_param_spec_double ("start-x", "start-x", "start-x", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); +#line 43 "../src/intersections.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_INTERSECTION_END_X_PROPERTY, live_chart_intersection_properties[LIVE_CHART_INTERSECTION_END_X_PROPERTY] = g_param_spec_double ("end-x", "end-x", "end-x", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); +#line 675 "intersections.c" +} + +static void +live_chart_intersection_instance_init (LiveChartIntersection * self, + gpointer klass) +{ +#line 43 "../src/intersections.vala" + self->priv = live_chart_intersection_get_instance_private (self); +#line 684 "intersections.c" +} + +static void +live_chart_intersection_finalize (GObject * obj) +{ + LiveChartIntersection * self; +#line 43 "../src/intersections.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersection); +#line 44 "../src/intersections.vala" + _live_chart_region_unref0 (self->priv->_region); +#line 47 "../src/intersections.vala" + _g_free0 (self->entered_at); +#line 48 "../src/intersections.vala" + _g_free0 (self->exited_at); +#line 43 "../src/intersections.vala" + G_OBJECT_CLASS (live_chart_intersection_parent_class)->finalize (obj); +#line 701 "intersections.c" +} + +static GType +live_chart_intersection_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartIntersectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_intersection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartIntersection), 0, (GInstanceInitFunc) live_chart_intersection_instance_init, NULL }; + GType live_chart_intersection_type_id; + live_chart_intersection_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartIntersection", &g_define_type_info, 0); + LiveChartIntersection_private_offset = g_type_add_instance_private (live_chart_intersection_type_id, sizeof (LiveChartIntersectionPrivate)); + return live_chart_intersection_type_id; +} + +GType +live_chart_intersection_get_type (void) +{ + static volatile gsize live_chart_intersection_type_id__once = 0; + if (g_once_init_enter (&live_chart_intersection_type_id__once)) { + GType live_chart_intersection_type_id; + live_chart_intersection_type_id = live_chart_intersection_get_type_once (); + g_once_init_leave (&live_chart_intersection_type_id__once, live_chart_intersection_type_id); + } + return live_chart_intersection_type_id__once; +} + +static void +_vala_live_chart_intersection_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartIntersection * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersection); +#line 43 "../src/intersections.vala" + switch (property_id) { +#line 43 "../src/intersections.vala" + case LIVE_CHART_INTERSECTION_REGION_PROPERTY: +#line 43 "../src/intersections.vala" + live_chart_value_set_region (value, live_chart_intersection_get_region (self)); +#line 43 "../src/intersections.vala" + break; +#line 43 "../src/intersections.vala" + case LIVE_CHART_INTERSECTION_START_X_PROPERTY: +#line 43 "../src/intersections.vala" + g_value_set_double (value, live_chart_intersection_get_start_x (self)); +#line 43 "../src/intersections.vala" + break; +#line 43 "../src/intersections.vala" + case LIVE_CHART_INTERSECTION_END_X_PROPERTY: +#line 43 "../src/intersections.vala" + g_value_set_double (value, live_chart_intersection_get_end_x (self)); +#line 43 "../src/intersections.vala" + break; +#line 754 "intersections.c" + default: +#line 43 "../src/intersections.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 43 "../src/intersections.vala" + break; +#line 760 "intersections.c" + } +} + +static void +_vala_live_chart_intersection_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartIntersection * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersection); +#line 43 "../src/intersections.vala" + switch (property_id) { +#line 43 "../src/intersections.vala" + case LIVE_CHART_INTERSECTION_REGION_PROPERTY: +#line 43 "../src/intersections.vala" + live_chart_intersection_set_region (self, live_chart_value_get_region (value)); +#line 43 "../src/intersections.vala" + break; +#line 43 "../src/intersections.vala" + case LIVE_CHART_INTERSECTION_START_X_PROPERTY: +#line 43 "../src/intersections.vala" + live_chart_intersection_set_start_x (self, g_value_get_double (value)); +#line 43 "../src/intersections.vala" + break; +#line 43 "../src/intersections.vala" + case LIVE_CHART_INTERSECTION_END_X_PROPERTY: +#line 43 "../src/intersections.vala" + live_chart_intersection_set_end_x (self, g_value_get_double (value)); +#line 43 "../src/intersections.vala" + break; +#line 792 "intersections.c" + default: +#line 43 "../src/intersections.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 43 "../src/intersections.vala" + break; +#line 798 "intersections.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/intersectors.c b/iPDC/lib/liblivechart_static.a.p/intersectors.c new file mode 100644 index 0000000..94b5b8e --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/intersectors.c @@ -0,0 +1,726 @@ +/* intersectors.c generated by valac 0.56.0, the Vala compiler + * generated from intersectors.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +#define _live_chart_region_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_region_unref (var), NULL))) +#define _live_chart_config_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_config_unref (var), NULL))) +#define _live_chart_bezier_curve_free0(var) ((var == NULL) ? NULL : (var = (live_chart_bezier_curve_free (var), NULL))) +typedef struct _Block2Data Block2Data; +#define _live_chart_bezier_intersector_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_bezier_intersector_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +typedef struct _LiveChartParamSpecBezierIntersector LiveChartParamSpecBezierIntersector; + +struct _LiveChartBezierIntersectorPrivate { + LiveChartRegion* region; + LiveChartConfig* config; +}; + +struct _Block2Data { + int _ref_count_; + LiveChartBezierIntersector* self; + LiveChartBezierCurve* path; +}; + +struct _LiveChartParamSpecBezierIntersector { + GParamSpec parent_instance; +}; + +static gint LiveChartBezierIntersector_private_offset; +static gpointer live_chart_bezier_intersector_parent_class = NULL; +static LiveChartIntersectorIface * live_chart_bezier_intersector_live_chart_intersector_parent_iface = NULL; + +static GType live_chart_intersector_get_type_once (void); +static void live_chart_bezier_intersector_real_intersect (LiveChartIntersector* base, + LiveChartIntersections* intersections, + LiveChartPoint* previous, + LiveChartPoint* current, + LiveChartBezierCurve* path); +static Block2Data* block2_data_ref (Block2Data* _data2_); +static void block2_data_unref (void * _userdata_); +static LiveChartCoord* __lambda12_ (Block2Data* _data2_, + gdouble value); +static LiveChartCoord* live_chart_bezier_intersector_intersect_at (LiveChartBezierIntersector* self, + LiveChartConfig* config, + LiveChartBezierCurve* curve, + gdouble at_value); +static LiveChartCoord* ___lambda12__live_chart_get_intersection (gdouble at_value, + gpointer self); +static void live_chart_bezier_intersector_create_intersection_segment_at (LiveChartBezierIntersector* self, + LiveChartConfig* config, + gdouble at_y, + LiveChartSegment* result); +static void live_chart_bezier_intersector_finalize (LiveChartBezierIntersector * obj); +static GType live_chart_bezier_intersector_get_type_once (void); + +void +live_chart_intersector_intersect (LiveChartIntersector* self, + LiveChartIntersections* intersections, + LiveChartPoint* previous, + LiveChartPoint* current, + gconstpointer path) +{ + LiveChartIntersectorIface* _iface_; +#line 3 "../src/intersectors.vala" + g_return_if_fail (self != NULL); +#line 3 "../src/intersectors.vala" + _iface_ = LIVE_CHART_INTERSECTOR_GET_INTERFACE (self); +#line 3 "../src/intersectors.vala" + if (_iface_->intersect) { +#line 3 "../src/intersectors.vala" + _iface_->intersect (self, intersections, previous, current, path); +#line 79 "intersectors.c" + } +} + +static void +live_chart_intersector_default_init (LiveChartIntersectorIface * iface, + gpointer iface_data) +{ +} + +static GType +live_chart_intersector_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartIntersectorIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_intersector_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; + GType live_chart_intersector_type_id; + live_chart_intersector_type_id = g_type_register_static (G_TYPE_INTERFACE, "LiveChartIntersector", &g_define_type_info, 0); + return live_chart_intersector_type_id; +} + +GType +live_chart_intersector_get_type (void) +{ + static volatile gsize live_chart_intersector_type_id__once = 0; + if (g_once_init_enter (&live_chart_intersector_type_id__once)) { + GType live_chart_intersector_type_id; + live_chart_intersector_type_id = live_chart_intersector_get_type_once (); + g_once_init_leave (&live_chart_intersector_type_id__once, live_chart_intersector_type_id); + } + return live_chart_intersector_type_id__once; +} + +static inline gpointer +live_chart_bezier_intersector_get_instance_private (LiveChartBezierIntersector* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartBezierIntersector_private_offset); +} + +static gpointer +_live_chart_region_ref0 (gpointer self) +{ +#line 11 "../src/intersectors.vala" + return self ? live_chart_region_ref (self) : NULL; +#line 121 "intersectors.c" +} + +static gpointer +_live_chart_config_ref0 (gpointer self) +{ +#line 12 "../src/intersectors.vala" + return self ? live_chart_config_ref (self) : NULL; +#line 129 "intersectors.c" +} + +LiveChartBezierIntersector* +live_chart_bezier_intersector_construct (GType object_type, + LiveChartRegion* region, + LiveChartConfig* config) +{ + LiveChartBezierIntersector* self = NULL; + LiveChartRegion* _tmp0_; + LiveChartConfig* _tmp1_; +#line 10 "../src/intersectors.vala" + g_return_val_if_fail (region != NULL, NULL); +#line 10 "../src/intersectors.vala" + g_return_val_if_fail (config != NULL, NULL); +#line 10 "../src/intersectors.vala" + self = (LiveChartBezierIntersector*) g_type_create_instance (object_type); +#line 11 "../src/intersectors.vala" + _tmp0_ = _live_chart_region_ref0 (region); +#line 11 "../src/intersectors.vala" + _live_chart_region_unref0 (self->priv->region); +#line 11 "../src/intersectors.vala" + self->priv->region = _tmp0_; +#line 12 "../src/intersectors.vala" + _tmp1_ = _live_chart_config_ref0 (config); +#line 12 "../src/intersectors.vala" + _live_chart_config_unref0 (self->priv->config); +#line 12 "../src/intersectors.vala" + self->priv->config = _tmp1_; +#line 10 "../src/intersectors.vala" + return self; +#line 160 "intersectors.c" +} + +LiveChartBezierIntersector* +live_chart_bezier_intersector_new (LiveChartRegion* region, + LiveChartConfig* config) +{ +#line 10 "../src/intersectors.vala" + return live_chart_bezier_intersector_construct (LIVE_CHART_TYPE_BEZIER_INTERSECTOR, region, config); +#line 169 "intersectors.c" +} + +static gpointer +_live_chart_bezier_curve_dup0 (gpointer self) +{ +#line 15 "../src/intersectors.vala" + return self ? live_chart_bezier_curve_dup (self) : NULL; +#line 177 "intersectors.c" +} + +static Block2Data* +block2_data_ref (Block2Data* _data2_) +{ +#line 15 "../src/intersectors.vala" + g_atomic_int_inc (&_data2_->_ref_count_); +#line 15 "../src/intersectors.vala" + return _data2_; +#line 187 "intersectors.c" +} + +static void +block2_data_unref (void * _userdata_) +{ + Block2Data* _data2_; + _data2_ = (Block2Data*) _userdata_; +#line 15 "../src/intersectors.vala" + if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) { +#line 197 "intersectors.c" + LiveChartBezierIntersector* self; +#line 15 "../src/intersectors.vala" + self = _data2_->self; +#line 15 "../src/intersectors.vala" + _live_chart_bezier_curve_free0 (_data2_->path); +#line 15 "../src/intersectors.vala" + _live_chart_bezier_intersector_unref0 (self); +#line 15 "../src/intersectors.vala" + g_slice_free (Block2Data, _data2_); +#line 207 "intersectors.c" + } +} + +static LiveChartCoord* +__lambda12_ (Block2Data* _data2_, + gdouble value) +{ + LiveChartBezierIntersector* self; + LiveChartConfig* _tmp0_; + LiveChartBezierCurve _tmp1_; + LiveChartCoord* _tmp2_; + LiveChartCoord* result; +#line 16 "../src/intersectors.vala" + self = _data2_->self; +#line 17 "../src/intersectors.vala" + _tmp0_ = self->priv->config; +#line 17 "../src/intersectors.vala" + _tmp1_ = *_data2_->path; +#line 17 "../src/intersectors.vala" + _tmp2_ = live_chart_bezier_intersector_intersect_at (self, _tmp0_, &_tmp1_, value); +#line 17 "../src/intersectors.vala" + result = _tmp2_; +#line 17 "../src/intersectors.vala" + return result; +#line 232 "intersectors.c" +} + +static LiveChartCoord* +___lambda12__live_chart_get_intersection (gdouble at_value, + gpointer self) +{ + LiveChartCoord* result; + result = __lambda12_ (self, at_value); +#line 16 "../src/intersectors.vala" + return result; +#line 243 "intersectors.c" +} + +static void +live_chart_bezier_intersector_real_intersect (LiveChartIntersector* base, + LiveChartIntersections* intersections, + LiveChartPoint* previous, + LiveChartPoint* current, + LiveChartBezierCurve* path) +{ + LiveChartBezierIntersector * self; + Block2Data* _data2_; + LiveChartBezierCurve* _tmp0_; + LiveChartRegion* _tmp1_; + LiveChartPoint _tmp2_; + LiveChartPoint _tmp3_; +#line 15 "../src/intersectors.vala" + self = (LiveChartBezierIntersector*) base; +#line 15 "../src/intersectors.vala" + g_return_if_fail (intersections != NULL); +#line 15 "../src/intersectors.vala" + g_return_if_fail (previous != NULL); +#line 15 "../src/intersectors.vala" + g_return_if_fail (current != NULL); +#line 15 "../src/intersectors.vala" + _data2_ = g_slice_new0 (Block2Data); +#line 15 "../src/intersectors.vala" + _data2_->_ref_count_ = 1; +#line 15 "../src/intersectors.vala" + _data2_->self = live_chart_bezier_intersector_ref (self); +#line 15 "../src/intersectors.vala" + _tmp0_ = _live_chart_bezier_curve_dup0 (path); +#line 15 "../src/intersectors.vala" + _live_chart_bezier_curve_free0 (_data2_->path); +#line 15 "../src/intersectors.vala" + _data2_->path = _tmp0_; +#line 16 "../src/intersectors.vala" + _tmp1_ = self->priv->region; +#line 16 "../src/intersectors.vala" + _tmp2_ = *previous; +#line 16 "../src/intersectors.vala" + _tmp3_ = *current; +#line 16 "../src/intersectors.vala" + live_chart_region_handle (_tmp1_, intersections, &_tmp2_, &_tmp3_, ___lambda12__live_chart_get_intersection, _data2_); +#line 15 "../src/intersectors.vala" + block2_data_unref (_data2_); +#line 15 "../src/intersectors.vala" + _data2_ = NULL; +#line 291 "intersectors.c" +} + +static LiveChartCoord* +live_chart_bezier_intersector_intersect_at (LiveChartBezierIntersector* self, + LiveChartConfig* config, + LiveChartBezierCurve* curve, + gdouble at_value) +{ + LiveChartSegment intersection_segment = {0}; + LiveChartSegment _tmp0_ = {0}; + GeeList* intersections = NULL; + LiveChartSegment _tmp1_; + LiveChartBezierCurve _tmp2_; + GeeList* _tmp3_; + GeeList* _tmp4_; + gint _tmp5_; + gint _tmp6_; + LiveChartCoord* result; +#line 21 "../src/intersectors.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 21 "../src/intersectors.vala" + g_return_val_if_fail (config != NULL, NULL); +#line 21 "../src/intersectors.vala" + g_return_val_if_fail (curve != NULL, NULL); +#line 22 "../src/intersectors.vala" + live_chart_bezier_intersector_create_intersection_segment_at (self, config, at_value, &_tmp0_); +#line 22 "../src/intersectors.vala" + intersection_segment = _tmp0_; +#line 23 "../src/intersectors.vala" + _tmp1_ = intersection_segment; +#line 23 "../src/intersectors.vala" + _tmp2_ = *curve; +#line 23 "../src/intersectors.vala" + _tmp3_ = live_chart_find_intersections_between (&_tmp1_, &_tmp2_); +#line 23 "../src/intersectors.vala" + intersections = _tmp3_; +#line 24 "../src/intersectors.vala" + _tmp4_ = intersections; +#line 24 "../src/intersectors.vala" + _tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_); +#line 24 "../src/intersectors.vala" + _tmp6_ = _tmp5_; +#line 24 "../src/intersectors.vala" + if (_tmp6_ > 0) { +#line 336 "intersectors.c" + GeeList* _tmp7_; + gpointer _tmp8_; +#line 25 "../src/intersectors.vala" + _tmp7_ = intersections; +#line 25 "../src/intersectors.vala" + _tmp8_ = gee_list_first (_tmp7_); +#line 25 "../src/intersectors.vala" + result = (LiveChartCoord*) _tmp8_; +#line 25 "../src/intersectors.vala" + _g_object_unref0 (intersections); +#line 25 "../src/intersectors.vala" + return result; +#line 349 "intersectors.c" + } +#line 27 "../src/intersectors.vala" + result = NULL; +#line 27 "../src/intersectors.vala" + _g_object_unref0 (intersections); +#line 27 "../src/intersectors.vala" + return result; +#line 357 "intersectors.c" +} + +static void +live_chart_bezier_intersector_create_intersection_segment_at (LiveChartBezierIntersector* self, + LiveChartConfig* config, + gdouble at_y, + LiveChartSegment* result) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; + gdouble y = 0.0; + LiveChartBoundaries _tmp1_; + LiveChartBoundary _tmp2_; + LiveChartYAxis* _tmp3_; + LiveChartBoundaries _tmp4_; + LiveChartBoundary _tmp5_; + LiveChartCoord _tmp6_ = {0}; + LiveChartBoundaries _tmp7_; + LiveChartBoundary _tmp8_; + LiveChartCoord _tmp9_ = {0}; + LiveChartSegment _tmp10_ = {0}; +#line 30 "../src/intersectors.vala" + g_return_if_fail (self != NULL); +#line 30 "../src/intersectors.vala" + g_return_if_fail (config != NULL); +#line 31 "../src/intersectors.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 31 "../src/intersectors.vala" + boundaries = _tmp0_; +#line 32 "../src/intersectors.vala" + _tmp1_ = boundaries; +#line 32 "../src/intersectors.vala" + _tmp2_ = _tmp1_.y; +#line 32 "../src/intersectors.vala" + _tmp3_ = config->y_axis; +#line 32 "../src/intersectors.vala" + y = _tmp2_.max - (at_y * live_chart_yaxis_get_ratio (_tmp3_)); +#line 33 "../src/intersectors.vala" + _tmp4_ = boundaries; +#line 33 "../src/intersectors.vala" + _tmp5_ = _tmp4_.x; +#line 33 "../src/intersectors.vala" + _tmp6_.x = (gdouble) _tmp5_.min; +#line 33 "../src/intersectors.vala" + _tmp6_.y = y; +#line 33 "../src/intersectors.vala" + _tmp7_ = boundaries; +#line 33 "../src/intersectors.vala" + _tmp8_ = _tmp7_.x; +#line 33 "../src/intersectors.vala" + _tmp9_.x = (gdouble) _tmp8_.max; +#line 33 "../src/intersectors.vala" + _tmp9_.y = y; +#line 33 "../src/intersectors.vala" + _tmp10_.from = _tmp6_; +#line 33 "../src/intersectors.vala" + _tmp10_.to = _tmp9_; +#line 33 "../src/intersectors.vala" + *result = _tmp10_; +#line 33 "../src/intersectors.vala" + return; +#line 419 "intersectors.c" +} + +static void +live_chart_value_bezier_intersector_init (GValue* value) +{ +#line 6 "../src/intersectors.vala" + value->data[0].v_pointer = NULL; +#line 427 "intersectors.c" +} + +static void +live_chart_value_bezier_intersector_free_value (GValue* value) +{ +#line 6 "../src/intersectors.vala" + if (value->data[0].v_pointer) { +#line 6 "../src/intersectors.vala" + live_chart_bezier_intersector_unref (value->data[0].v_pointer); +#line 437 "intersectors.c" + } +} + +static void +live_chart_value_bezier_intersector_copy_value (const GValue* src_value, + GValue* dest_value) +{ +#line 6 "../src/intersectors.vala" + if (src_value->data[0].v_pointer) { +#line 6 "../src/intersectors.vala" + dest_value->data[0].v_pointer = live_chart_bezier_intersector_ref (src_value->data[0].v_pointer); +#line 449 "intersectors.c" + } else { +#line 6 "../src/intersectors.vala" + dest_value->data[0].v_pointer = NULL; +#line 453 "intersectors.c" + } +} + +static gpointer +live_chart_value_bezier_intersector_peek_pointer (const GValue* value) +{ +#line 6 "../src/intersectors.vala" + return value->data[0].v_pointer; +#line 462 "intersectors.c" +} + +static gchar* +live_chart_value_bezier_intersector_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ +#line 6 "../src/intersectors.vala" + if (collect_values[0].v_pointer) { +#line 473 "intersectors.c" + LiveChartBezierIntersector * object; + object = collect_values[0].v_pointer; +#line 6 "../src/intersectors.vala" + if (object->parent_instance.g_class == NULL) { +#line 6 "../src/intersectors.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 480 "intersectors.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 6 "../src/intersectors.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 484 "intersectors.c" + } +#line 6 "../src/intersectors.vala" + value->data[0].v_pointer = live_chart_bezier_intersector_ref (object); +#line 488 "intersectors.c" + } else { +#line 6 "../src/intersectors.vala" + value->data[0].v_pointer = NULL; +#line 492 "intersectors.c" + } +#line 6 "../src/intersectors.vala" + return NULL; +#line 496 "intersectors.c" +} + +static gchar* +live_chart_value_bezier_intersector_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ + LiveChartBezierIntersector ** object_p; + object_p = collect_values[0].v_pointer; +#line 6 "../src/intersectors.vala" + if (!object_p) { +#line 6 "../src/intersectors.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 511 "intersectors.c" + } +#line 6 "../src/intersectors.vala" + if (!value->data[0].v_pointer) { +#line 6 "../src/intersectors.vala" + *object_p = NULL; +#line 517 "intersectors.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 6 "../src/intersectors.vala" + *object_p = value->data[0].v_pointer; +#line 521 "intersectors.c" + } else { +#line 6 "../src/intersectors.vala" + *object_p = live_chart_bezier_intersector_ref (value->data[0].v_pointer); +#line 525 "intersectors.c" + } +#line 6 "../src/intersectors.vala" + return NULL; +#line 529 "intersectors.c" +} + +GParamSpec* +live_chart_param_spec_bezier_intersector (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ + LiveChartParamSpecBezierIntersector* spec; +#line 6 "../src/intersectors.vala" + g_return_val_if_fail (g_type_is_a (object_type, LIVE_CHART_TYPE_BEZIER_INTERSECTOR), NULL); +#line 6 "../src/intersectors.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 6 "../src/intersectors.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 6 "../src/intersectors.vala" + return G_PARAM_SPEC (spec); +#line 548 "intersectors.c" +} + +gpointer +live_chart_value_get_bezier_intersector (const GValue* value) +{ +#line 6 "../src/intersectors.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_BEZIER_INTERSECTOR), NULL); +#line 6 "../src/intersectors.vala" + return value->data[0].v_pointer; +#line 558 "intersectors.c" +} + +void +live_chart_value_set_bezier_intersector (GValue* value, + gpointer v_object) +{ + LiveChartBezierIntersector * old; +#line 6 "../src/intersectors.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_BEZIER_INTERSECTOR)); +#line 6 "../src/intersectors.vala" + old = value->data[0].v_pointer; +#line 6 "../src/intersectors.vala" + if (v_object) { +#line 6 "../src/intersectors.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_BEZIER_INTERSECTOR)); +#line 6 "../src/intersectors.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 6 "../src/intersectors.vala" + value->data[0].v_pointer = v_object; +#line 6 "../src/intersectors.vala" + live_chart_bezier_intersector_ref (value->data[0].v_pointer); +#line 580 "intersectors.c" + } else { +#line 6 "../src/intersectors.vala" + value->data[0].v_pointer = NULL; +#line 584 "intersectors.c" + } +#line 6 "../src/intersectors.vala" + if (old) { +#line 6 "../src/intersectors.vala" + live_chart_bezier_intersector_unref (old); +#line 590 "intersectors.c" + } +} + +void +live_chart_value_take_bezier_intersector (GValue* value, + gpointer v_object) +{ + LiveChartBezierIntersector * old; +#line 6 "../src/intersectors.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_BEZIER_INTERSECTOR)); +#line 6 "../src/intersectors.vala" + old = value->data[0].v_pointer; +#line 6 "../src/intersectors.vala" + if (v_object) { +#line 6 "../src/intersectors.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_BEZIER_INTERSECTOR)); +#line 6 "../src/intersectors.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 6 "../src/intersectors.vala" + value->data[0].v_pointer = v_object; +#line 611 "intersectors.c" + } else { +#line 6 "../src/intersectors.vala" + value->data[0].v_pointer = NULL; +#line 615 "intersectors.c" + } +#line 6 "../src/intersectors.vala" + if (old) { +#line 6 "../src/intersectors.vala" + live_chart_bezier_intersector_unref (old); +#line 621 "intersectors.c" + } +} + +static void +live_chart_bezier_intersector_class_init (LiveChartBezierIntersectorClass * klass, + gpointer klass_data) +{ +#line 6 "../src/intersectors.vala" + live_chart_bezier_intersector_parent_class = g_type_class_peek_parent (klass); +#line 6 "../src/intersectors.vala" + ((LiveChartBezierIntersectorClass *) klass)->finalize = live_chart_bezier_intersector_finalize; +#line 6 "../src/intersectors.vala" + g_type_class_adjust_private_offset (klass, &LiveChartBezierIntersector_private_offset); +#line 635 "intersectors.c" +} + +static void +live_chart_bezier_intersector_live_chart_intersector_interface_init (LiveChartIntersectorIface * iface, + gpointer iface_data) +{ +#line 6 "../src/intersectors.vala" + live_chart_bezier_intersector_live_chart_intersector_parent_iface = g_type_interface_peek_parent (iface); +#line 6 "../src/intersectors.vala" + iface->intersect = (void (*) (LiveChartIntersector*, LiveChartIntersections*, LiveChartPoint*, LiveChartPoint*, gconstpointer)) live_chart_bezier_intersector_real_intersect; +#line 646 "intersectors.c" +} + +static void +live_chart_bezier_intersector_instance_init (LiveChartBezierIntersector * self, + gpointer klass) +{ +#line 6 "../src/intersectors.vala" + self->priv = live_chart_bezier_intersector_get_instance_private (self); +#line 6 "../src/intersectors.vala" + self->ref_count = 1; +#line 657 "intersectors.c" +} + +static void +live_chart_bezier_intersector_finalize (LiveChartBezierIntersector * obj) +{ + LiveChartBezierIntersector * self; +#line 6 "../src/intersectors.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_BEZIER_INTERSECTOR, LiveChartBezierIntersector); +#line 6 "../src/intersectors.vala" + g_signal_handlers_destroy (self); +#line 7 "../src/intersectors.vala" + _live_chart_region_unref0 (self->priv->region); +#line 8 "../src/intersectors.vala" + _live_chart_config_unref0 (self->priv->config); +#line 672 "intersectors.c" +} + +static GType +live_chart_bezier_intersector_get_type_once (void) +{ + static const GTypeValueTable g_define_type_value_table = { live_chart_value_bezier_intersector_init, live_chart_value_bezier_intersector_free_value, live_chart_value_bezier_intersector_copy_value, live_chart_value_bezier_intersector_peek_pointer, "p", live_chart_value_bezier_intersector_collect_value, "p", live_chart_value_bezier_intersector_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (LiveChartBezierIntersectorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_bezier_intersector_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartBezierIntersector), 0, (GInstanceInitFunc) live_chart_bezier_intersector_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + static const GInterfaceInfo live_chart_intersector_info = { (GInterfaceInitFunc) live_chart_bezier_intersector_live_chart_intersector_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_bezier_intersector_type_id; + live_chart_bezier_intersector_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LiveChartBezierIntersector", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_type_add_interface_static (live_chart_bezier_intersector_type_id, LIVE_CHART_TYPE_INTERSECTOR, &live_chart_intersector_info); + LiveChartBezierIntersector_private_offset = g_type_add_instance_private (live_chart_bezier_intersector_type_id, sizeof (LiveChartBezierIntersectorPrivate)); + return live_chart_bezier_intersector_type_id; +} + +GType +live_chart_bezier_intersector_get_type (void) +{ + static volatile gsize live_chart_bezier_intersector_type_id__once = 0; + if (g_once_init_enter (&live_chart_bezier_intersector_type_id__once)) { + GType live_chart_bezier_intersector_type_id; + live_chart_bezier_intersector_type_id = live_chart_bezier_intersector_get_type_once (); + g_once_init_leave (&live_chart_bezier_intersector_type_id__once, live_chart_bezier_intersector_type_id); + } + return live_chart_bezier_intersector_type_id__once; +} + +gpointer +live_chart_bezier_intersector_ref (gpointer instance) +{ + LiveChartBezierIntersector * self; + self = instance; +#line 6 "../src/intersectors.vala" + g_atomic_int_inc (&self->ref_count); +#line 6 "../src/intersectors.vala" + return instance; +#line 710 "intersectors.c" +} + +void +live_chart_bezier_intersector_unref (gpointer instance) +{ + LiveChartBezierIntersector * self; + self = instance; +#line 6 "../src/intersectors.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 6 "../src/intersectors.vala" + LIVE_CHART_BEZIER_INTERSECTOR_GET_CLASS (self)->finalize (self); +#line 6 "../src/intersectors.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 724 "intersectors.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/labels.c b/iPDC/lib/liblivechart_static.a.p/labels.c new file mode 100644 index 0000000..a14803f --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/labels.c @@ -0,0 +1,485 @@ +/* labels.c generated by valac 0.56.0, the Vala compiler + * generated from labels.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include + +#define _live_chart_font_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_font_unref (var), NULL))) +typedef struct _LiveChartParamSpecLabels LiveChartParamSpecLabels; + +struct _LiveChartLabelsPrivate { + gboolean _visible; + cairo_text_extents_t _extents; + LiveChartFont* _font; +}; + +struct _LiveChartParamSpecLabels { + GParamSpec parent_instance; +}; + +static gint LiveChartLabels_private_offset; +static gpointer live_chart_labels_parent_class = NULL; + +static void live_chart_labels_finalize (LiveChartLabels * obj); +static GType live_chart_labels_get_type_once (void); + +static inline gpointer +live_chart_labels_get_instance_private (LiveChartLabels* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartLabels_private_offset); +} + +LiveChartLabels* +live_chart_labels_construct (GType object_type) +{ + LiveChartLabels* self = NULL; + cairo_text_extents_t _tmp0_ = {0}; + LiveChartFont* _tmp1_; + LiveChartFont* _tmp2_; + cairo_text_extents_t _tmp3_; + cairo_text_extents_t _tmp4_; + cairo_text_extents_t _tmp5_; + cairo_text_extents_t _tmp6_; + cairo_text_extents_t _tmp7_; + cairo_text_extents_t _tmp8_; +#line 11 "../src/labels.vala" + self = (LiveChartLabels*) g_type_create_instance (object_type); +#line 13 "../src/labels.vala" + live_chart_labels_set_visible (self, TRUE); +#line 14 "../src/labels.vala" + memset (&_tmp0_, 0, sizeof (cairo_text_extents_t)); +#line 14 "../src/labels.vala" + live_chart_labels_set_extents (self, &_tmp0_); +#line 15 "../src/labels.vala" + _tmp1_ = live_chart_font_new (); +#line 15 "../src/labels.vala" + _tmp2_ = _tmp1_; +#line 15 "../src/labels.vala" + live_chart_labels_set_font (self, _tmp2_); +#line 15 "../src/labels.vala" + _live_chart_font_unref0 (_tmp2_); +#line 17 "../src/labels.vala" + _tmp3_ = self->priv->_extents; +#line 17 "../src/labels.vala" + _tmp3_.height = 0.0; +#line 18 "../src/labels.vala" + _tmp4_ = self->priv->_extents; +#line 18 "../src/labels.vala" + _tmp4_.width = 0.0; +#line 19 "../src/labels.vala" + _tmp5_ = self->priv->_extents; +#line 19 "../src/labels.vala" + _tmp5_.x_advance = 0.0; +#line 20 "../src/labels.vala" + _tmp6_ = self->priv->_extents; +#line 20 "../src/labels.vala" + _tmp6_.x_bearing = 0.0; +#line 21 "../src/labels.vala" + _tmp7_ = self->priv->_extents; +#line 21 "../src/labels.vala" + _tmp7_.y_advance = 0.0; +#line 22 "../src/labels.vala" + _tmp8_ = self->priv->_extents; +#line 22 "../src/labels.vala" + _tmp8_.y_bearing = 0.0; +#line 11 "../src/labels.vala" + return self; +#line 91 "labels.c" +} + +LiveChartLabels* +live_chart_labels_new (void) +{ +#line 11 "../src/labels.vala" + return live_chart_labels_construct (LIVE_CHART_TYPE_LABELS); +#line 99 "labels.c" +} + +gboolean +live_chart_labels_get_visible (LiveChartLabels* self) +{ + gboolean result; +#line 7 "../src/labels.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 7 "../src/labels.vala" + result = self->priv->_visible; +#line 7 "../src/labels.vala" + return result; +#line 112 "labels.c" +} + +void +live_chart_labels_set_visible (LiveChartLabels* self, + gboolean value) +{ +#line 7 "../src/labels.vala" + g_return_if_fail (self != NULL); +#line 7 "../src/labels.vala" + self->priv->_visible = value; +#line 123 "labels.c" +} + +void +live_chart_labels_get_extents (LiveChartLabels* self, + cairo_text_extents_t * result) +{ + cairo_text_extents_t _tmp0_; +#line 8 "../src/labels.vala" + g_return_if_fail (self != NULL); +#line 8 "../src/labels.vala" + _tmp0_ = self->priv->_extents; +#line 8 "../src/labels.vala" + *result = _tmp0_; +#line 8 "../src/labels.vala" + return; +#line 139 "labels.c" +} + +void +live_chart_labels_set_extents (LiveChartLabels* self, + cairo_text_extents_t * value) +{ + cairo_text_extents_t _tmp0_; +#line 8 "../src/labels.vala" + g_return_if_fail (self != NULL); +#line 8 "../src/labels.vala" + _tmp0_ = *value; +#line 8 "../src/labels.vala" + self->priv->_extents = _tmp0_; +#line 153 "labels.c" +} + +LiveChartFont* +live_chart_labels_get_font (LiveChartLabels* self) +{ + LiveChartFont* result; + LiveChartFont* _tmp0_; +#line 9 "../src/labels.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 9 "../src/labels.vala" + _tmp0_ = self->priv->_font; +#line 9 "../src/labels.vala" + result = _tmp0_; +#line 9 "../src/labels.vala" + return result; +#line 169 "labels.c" +} + +static gpointer +_live_chart_font_ref0 (gpointer self) +{ +#line 9 "../src/labels.vala" + return self ? live_chart_font_ref (self) : NULL; +#line 177 "labels.c" +} + +void +live_chart_labels_set_font (LiveChartLabels* self, + LiveChartFont* value) +{ + LiveChartFont* _tmp0_; +#line 9 "../src/labels.vala" + g_return_if_fail (self != NULL); +#line 9 "../src/labels.vala" + _tmp0_ = _live_chart_font_ref0 (value); +#line 9 "../src/labels.vala" + _live_chart_font_unref0 (self->priv->_font); +#line 9 "../src/labels.vala" + self->priv->_font = _tmp0_; +#line 193 "labels.c" +} + +static void +live_chart_value_labels_init (GValue* value) +{ +#line 5 "../src/labels.vala" + value->data[0].v_pointer = NULL; +#line 201 "labels.c" +} + +static void +live_chart_value_labels_free_value (GValue* value) +{ +#line 5 "../src/labels.vala" + if (value->data[0].v_pointer) { +#line 5 "../src/labels.vala" + live_chart_labels_unref (value->data[0].v_pointer); +#line 211 "labels.c" + } +} + +static void +live_chart_value_labels_copy_value (const GValue* src_value, + GValue* dest_value) +{ +#line 5 "../src/labels.vala" + if (src_value->data[0].v_pointer) { +#line 5 "../src/labels.vala" + dest_value->data[0].v_pointer = live_chart_labels_ref (src_value->data[0].v_pointer); +#line 223 "labels.c" + } else { +#line 5 "../src/labels.vala" + dest_value->data[0].v_pointer = NULL; +#line 227 "labels.c" + } +} + +static gpointer +live_chart_value_labels_peek_pointer (const GValue* value) +{ +#line 5 "../src/labels.vala" + return value->data[0].v_pointer; +#line 236 "labels.c" +} + +static gchar* +live_chart_value_labels_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ +#line 5 "../src/labels.vala" + if (collect_values[0].v_pointer) { +#line 247 "labels.c" + LiveChartLabels * object; + object = collect_values[0].v_pointer; +#line 5 "../src/labels.vala" + if (object->parent_instance.g_class == NULL) { +#line 5 "../src/labels.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 254 "labels.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 5 "../src/labels.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 258 "labels.c" + } +#line 5 "../src/labels.vala" + value->data[0].v_pointer = live_chart_labels_ref (object); +#line 262 "labels.c" + } else { +#line 5 "../src/labels.vala" + value->data[0].v_pointer = NULL; +#line 266 "labels.c" + } +#line 5 "../src/labels.vala" + return NULL; +#line 270 "labels.c" +} + +static gchar* +live_chart_value_labels_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ + LiveChartLabels ** object_p; + object_p = collect_values[0].v_pointer; +#line 5 "../src/labels.vala" + if (!object_p) { +#line 5 "../src/labels.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 285 "labels.c" + } +#line 5 "../src/labels.vala" + if (!value->data[0].v_pointer) { +#line 5 "../src/labels.vala" + *object_p = NULL; +#line 291 "labels.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 5 "../src/labels.vala" + *object_p = value->data[0].v_pointer; +#line 295 "labels.c" + } else { +#line 5 "../src/labels.vala" + *object_p = live_chart_labels_ref (value->data[0].v_pointer); +#line 299 "labels.c" + } +#line 5 "../src/labels.vala" + return NULL; +#line 303 "labels.c" +} + +GParamSpec* +live_chart_param_spec_labels (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ + LiveChartParamSpecLabels* spec; +#line 5 "../src/labels.vala" + g_return_val_if_fail (g_type_is_a (object_type, LIVE_CHART_TYPE_LABELS), NULL); +#line 5 "../src/labels.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 5 "../src/labels.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 5 "../src/labels.vala" + return G_PARAM_SPEC (spec); +#line 322 "labels.c" +} + +gpointer +live_chart_value_get_labels (const GValue* value) +{ +#line 5 "../src/labels.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_LABELS), NULL); +#line 5 "../src/labels.vala" + return value->data[0].v_pointer; +#line 332 "labels.c" +} + +void +live_chart_value_set_labels (GValue* value, + gpointer v_object) +{ + LiveChartLabels * old; +#line 5 "../src/labels.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_LABELS)); +#line 5 "../src/labels.vala" + old = value->data[0].v_pointer; +#line 5 "../src/labels.vala" + if (v_object) { +#line 5 "../src/labels.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_LABELS)); +#line 5 "../src/labels.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 5 "../src/labels.vala" + value->data[0].v_pointer = v_object; +#line 5 "../src/labels.vala" + live_chart_labels_ref (value->data[0].v_pointer); +#line 354 "labels.c" + } else { +#line 5 "../src/labels.vala" + value->data[0].v_pointer = NULL; +#line 358 "labels.c" + } +#line 5 "../src/labels.vala" + if (old) { +#line 5 "../src/labels.vala" + live_chart_labels_unref (old); +#line 364 "labels.c" + } +} + +void +live_chart_value_take_labels (GValue* value, + gpointer v_object) +{ + LiveChartLabels * old; +#line 5 "../src/labels.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_LABELS)); +#line 5 "../src/labels.vala" + old = value->data[0].v_pointer; +#line 5 "../src/labels.vala" + if (v_object) { +#line 5 "../src/labels.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_LABELS)); +#line 5 "../src/labels.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 5 "../src/labels.vala" + value->data[0].v_pointer = v_object; +#line 385 "labels.c" + } else { +#line 5 "../src/labels.vala" + value->data[0].v_pointer = NULL; +#line 389 "labels.c" + } +#line 5 "../src/labels.vala" + if (old) { +#line 5 "../src/labels.vala" + live_chart_labels_unref (old); +#line 395 "labels.c" + } +} + +static void +live_chart_labels_class_init (LiveChartLabelsClass * klass, + gpointer klass_data) +{ +#line 5 "../src/labels.vala" + live_chart_labels_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/labels.vala" + ((LiveChartLabelsClass *) klass)->finalize = live_chart_labels_finalize; +#line 5 "../src/labels.vala" + g_type_class_adjust_private_offset (klass, &LiveChartLabels_private_offset); +#line 409 "labels.c" +} + +static void +live_chart_labels_instance_init (LiveChartLabels * self, + gpointer klass) +{ +#line 5 "../src/labels.vala" + self->priv = live_chart_labels_get_instance_private (self); +#line 5 "../src/labels.vala" + self->ref_count = 1; +#line 420 "labels.c" +} + +static void +live_chart_labels_finalize (LiveChartLabels * obj) +{ + LiveChartLabels * self; +#line 5 "../src/labels.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_LABELS, LiveChartLabels); +#line 5 "../src/labels.vala" + g_signal_handlers_destroy (self); +#line 9 "../src/labels.vala" + _live_chart_font_unref0 (self->priv->_font); +#line 433 "labels.c" +} + +static GType +live_chart_labels_get_type_once (void) +{ + static const GTypeValueTable g_define_type_value_table = { live_chart_value_labels_init, live_chart_value_labels_free_value, live_chart_value_labels_copy_value, live_chart_value_labels_peek_pointer, "p", live_chart_value_labels_collect_value, "p", live_chart_value_labels_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (LiveChartLabelsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_labels_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartLabels), 0, (GInstanceInitFunc) live_chart_labels_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType live_chart_labels_type_id; + live_chart_labels_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LiveChartLabels", &g_define_type_info, &g_define_type_fundamental_info, 0); + LiveChartLabels_private_offset = g_type_add_instance_private (live_chart_labels_type_id, sizeof (LiveChartLabelsPrivate)); + return live_chart_labels_type_id; +} + +GType +live_chart_labels_get_type (void) +{ + static volatile gsize live_chart_labels_type_id__once = 0; + if (g_once_init_enter (&live_chart_labels_type_id__once)) { + GType live_chart_labels_type_id; + live_chart_labels_type_id = live_chart_labels_get_type_once (); + g_once_init_leave (&live_chart_labels_type_id__once, live_chart_labels_type_id); + } + return live_chart_labels_type_id__once; +} + +gpointer +live_chart_labels_ref (gpointer instance) +{ + LiveChartLabels * self; + self = instance; +#line 5 "../src/labels.vala" + g_atomic_int_inc (&self->ref_count); +#line 5 "../src/labels.vala" + return instance; +#line 469 "labels.c" +} + +void +live_chart_labels_unref (gpointer instance) +{ + LiveChartLabels * self; + self = instance; +#line 5 "../src/labels.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 5 "../src/labels.vala" + LIVE_CHART_LABELS_GET_CLASS (self)->finalize (self); +#line 5 "../src/labels.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 483 "labels.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/legend.c b/iPDC/lib/liblivechart_static.a.p/legend.c new file mode 100644 index 0000000..df67be3 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/legend.c @@ -0,0 +1,1051 @@ +/* legend.c generated by valac 0.56.0, the Vala compiler + * generated from legend.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define LIVE_CHART_HORIZONTAL_LEGEND_COLOR_BLOCK_WIDTH 15 +#define LIVE_CHART_HORIZONTAL_LEGEND_COLOR_BLOCK_HEIGHT 10 + +enum { + LIVE_CHART_LEGEND_0_PROPERTY, + LIVE_CHART_LEGEND_VISIBLE_PROPERTY, + LIVE_CHART_LEGEND_MAIN_COLOR_PROPERTY, + LIVE_CHART_LEGEND_NUM_PROPERTIES +}; +static GParamSpec* live_chart_legend_properties[LIVE_CHART_LEGEND_NUM_PROPERTIES]; +#define _live_chart_labels_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_labels_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +enum { + LIVE_CHART_HORIZONTAL_LEGEND_0_PROPERTY, + LIVE_CHART_HORIZONTAL_LEGEND_NUM_PROPERTIES +}; +static GParamSpec* live_chart_horizontal_legend_properties[LIVE_CHART_HORIZONTAL_LEGEND_NUM_PROPERTIES]; +#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) +typedef struct _Block3Data Block3Data; +typedef struct _Block4Data Block4Data; +#define _g_free0(var) (var = (g_free (var), NULL)) +enum { + LIVE_CHART_NOOP_LEGEND_0_PROPERTY, + LIVE_CHART_NOOP_LEGEND_NUM_PROPERTIES +}; +static GParamSpec* live_chart_noop_legend_properties[LIVE_CHART_NOOP_LEGEND_NUM_PROPERTIES]; + +struct _LiveChartLegendPrivate { + gboolean _visible; + GdkRGBA _main_color; +}; + +struct _Block3Data { + int _ref_count_; + LiveChartHorizontalLegend* self; + cairo_t* ctx; +}; + +struct _Block4Data { + int _ref_count_; + Block3Data * _data3_; + gint y_padding; + LiveChartBoundaries boundaries; + gint pos; +}; + +static gint LiveChartLegend_private_offset; +static gpointer live_chart_legend_parent_class = NULL; +static LiveChartDrawableIface * live_chart_legend_live_chart_drawable_parent_iface = NULL; +static gpointer live_chart_horizontal_legend_parent_class = NULL; +static gpointer live_chart_noop_legend_parent_class = NULL; + +static void live_chart_legend_real_draw (LiveChartLegend* self, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_legend_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static gboolean _gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2); +static void live_chart_legend_finalize (GObject * obj); +static GType live_chart_legend_get_type_once (void); +static void _vala_live_chart_legend_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_legend_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static void live_chart_horizontal_legend_real_draw (LiveChartLegend* base, + cairo_t* ctx, + LiveChartConfig* config); +static Block3Data* block3_data_ref (Block3Data* _data3_); +static void block3_data_unref (void * _userdata_); +static Block4Data* block4_data_ref (Block4Data* _data4_); +static void block4_data_unref (void * _userdata_); +static gint live_chart_horizontal_legend_get_y_padding (LiveChartHorizontalLegend* self, + LiveChartConfig* config); +static gboolean ___lambda6_ (Block4Data* _data4_, + LiveChartSerie* serie); +static void live_chart_horizontal_legend_name_extents (LiveChartHorizontalLegend* self, + const gchar* name, + cairo_t* ctx, + cairo_text_extents_t* result); +static gboolean ____lambda6__gee_forall_func (gpointer g, + gpointer self); +static void live_chart_horizontal_legend_update_bounding_box (LiveChartHorizontalLegend* self, + LiveChartConfig* config, + gint width); +static GType live_chart_horizontal_legend_get_type_once (void); +static void live_chart_noop_legend_real_draw (LiveChartLegend* base, + cairo_t* ctx, + LiveChartConfig* config); +static GType live_chart_noop_legend_get_type_once (void); + +static inline gpointer +live_chart_legend_get_instance_private (LiveChartLegend* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartLegend_private_offset); +} + +void +live_chart_legend_add_legend (LiveChartLegend* self, + LiveChartSerie* serie) +{ + GeeArrayList* _tmp0_; +#line 25 "../src/legend.vala" + g_return_if_fail (self != NULL); +#line 25 "../src/legend.vala" + g_return_if_fail (serie != NULL); +#line 26 "../src/legend.vala" + _tmp0_ = self->series; +#line 26 "../src/legend.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, serie); +#line 130 "legend.c" +} + +static void +live_chart_legend_real_draw (LiveChartLegend* self, + cairo_t* ctx, + LiveChartConfig* config) +{ +#line 29 "../src/legend.vala" + g_critical ("Type `%s' does not implement abstract method `live_chart_legend_draw'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 29 "../src/legend.vala" + return; +#line 142 "legend.c" +} + +void +live_chart_legend_draw (LiveChartLegend* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartLegendClass* _klass_; +#line 29 "../src/legend.vala" + g_return_if_fail (self != NULL); +#line 29 "../src/legend.vala" + _klass_ = LIVE_CHART_LEGEND_GET_CLASS (self); +#line 29 "../src/legend.vala" + if (_klass_->draw) { +#line 29 "../src/legend.vala" + _klass_->draw (self, ctx, config); +#line 159 "legend.c" + } +} + +static void +live_chart_legend_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartLegend * self; + LiveChartBoundingBox _tmp0_; +#line 30 "../src/legend.vala" + self = (LiveChartLegend*) base; +#line 31 "../src/legend.vala" + _tmp0_ = self->bounding_box; +#line 31 "../src/legend.vala" + *result = _tmp0_; +#line 31 "../src/legend.vala" + return; +#line 177 "legend.c" +} + +LiveChartLegend* +live_chart_legend_construct (GType object_type) +{ + LiveChartLegend * self = NULL; +#line 5 "../src/legend.vala" + self = (LiveChartLegend*) g_object_new (object_type, NULL); +#line 5 "../src/legend.vala" + return self; +#line 188 "legend.c" +} + +static gboolean +live_chart_legend_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartLegend* self; +#line 7 "../src/legend.vala" + self = (LiveChartLegend*) base; +#line 7 "../src/legend.vala" + result = self->priv->_visible; +#line 7 "../src/legend.vala" + return result; +#line 202 "legend.c" +} + +static void +live_chart_legend_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartLegend* self; + gboolean old_value; +#line 7 "../src/legend.vala" + self = (LiveChartLegend*) base; +#line 7 "../src/legend.vala" + old_value = live_chart_legend_real_get_visible (base); +#line 7 "../src/legend.vala" + if (old_value != value) { +#line 7 "../src/legend.vala" + self->priv->_visible = value; +#line 7 "../src/legend.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_legend_properties[LIVE_CHART_LEGEND_VISIBLE_PROPERTY]); +#line 221 "legend.c" + } +} + +void +live_chart_legend_get_main_color (LiveChartLegend* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 18 "../src/legend.vala" + g_return_if_fail (self != NULL); +#line 18 "../src/legend.vala" + _tmp0_ = self->priv->_main_color; +#line 18 "../src/legend.vala" + *result = _tmp0_; +#line 18 "../src/legend.vala" + return; +#line 238 "legend.c" +} + +static gboolean +_gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2) +{ +#line 18 "../src/legend.vala" + if (s1 == s2) { +#line 18 "../src/legend.vala" + return TRUE; +#line 249 "legend.c" + } +#line 18 "../src/legend.vala" + if (s1 == NULL) { +#line 18 "../src/legend.vala" + return FALSE; +#line 255 "legend.c" + } +#line 18 "../src/legend.vala" + if (s2 == NULL) { +#line 18 "../src/legend.vala" + return FALSE; +#line 261 "legend.c" + } +#line 18 "../src/legend.vala" + if (s1->red != s2->red) { +#line 18 "../src/legend.vala" + return FALSE; +#line 267 "legend.c" + } +#line 18 "../src/legend.vala" + if (s1->green != s2->green) { +#line 18 "../src/legend.vala" + return FALSE; +#line 273 "legend.c" + } +#line 18 "../src/legend.vala" + if (s1->blue != s2->blue) { +#line 18 "../src/legend.vala" + return FALSE; +#line 279 "legend.c" + } +#line 18 "../src/legend.vala" + if (s1->alpha != s2->alpha) { +#line 18 "../src/legend.vala" + return FALSE; +#line 285 "legend.c" + } +#line 18 "../src/legend.vala" + return TRUE; +#line 289 "legend.c" +} + +void +live_chart_legend_set_main_color (LiveChartLegend* self, + GdkRGBA * value) +{ + GdkRGBA old_value; +#line 18 "../src/legend.vala" + g_return_if_fail (self != NULL); +#line 18 "../src/legend.vala" + live_chart_legend_get_main_color (self, &old_value); +#line 18 "../src/legend.vala" + if (_gdk_rgba_equal (value, &old_value) != TRUE) { +#line 303 "legend.c" + GdkRGBA _tmp0_; +#line 18 "../src/legend.vala" + _tmp0_ = *value; +#line 18 "../src/legend.vala" + self->priv->_main_color = _tmp0_; +#line 18 "../src/legend.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_legend_properties[LIVE_CHART_LEGEND_MAIN_COLOR_PROPERTY]); +#line 311 "legend.c" + } +} + +static void +live_chart_legend_class_init (LiveChartLegendClass * klass, + gpointer klass_data) +{ +#line 5 "../src/legend.vala" + live_chart_legend_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/legend.vala" + g_type_class_adjust_private_offset (klass, &LiveChartLegend_private_offset); +#line 5 "../src/legend.vala" + ((LiveChartLegendClass *) klass)->draw = (void (*) (LiveChartLegend*, cairo_t*, LiveChartConfig*)) live_chart_legend_real_draw; +#line 5 "../src/legend.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_legend_get_property; +#line 5 "../src/legend.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_legend_set_property; +#line 5 "../src/legend.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_legend_finalize; +#line 5 "../src/legend.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_LEGEND_VISIBLE_PROPERTY, live_chart_legend_properties[LIVE_CHART_LEGEND_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 5 "../src/legend.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_LEGEND_MAIN_COLOR_PROPERTY, live_chart_legend_properties[LIVE_CHART_LEGEND_MAIN_COLOR_PROPERTY] = g_param_spec_boxed ("main-color", "main-color", "main-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 335 "legend.c" +} + +static void +live_chart_legend_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 5 "../src/legend.vala" + live_chart_legend_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 5 "../src/legend.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_legend_draw; +#line 5 "../src/legend.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_legend_real_get_bounding_box; +#line 5 "../src/legend.vala" + iface->get_visible = live_chart_legend_real_get_visible; +#line 5 "../src/legend.vala" + iface->set_visible = live_chart_legend_real_set_visible; +#line 352 "legend.c" +} + +static void +live_chart_legend_instance_init (LiveChartLegend * self, + gpointer klass) +{ + LiveChartLabels* _tmp0_; + GeeArrayList* _tmp1_; + LiveChartBoundingBox _tmp2_ = {0}; + GdkRGBA _tmp3_ = {0}; +#line 5 "../src/legend.vala" + self->priv = live_chart_legend_get_instance_private (self); +#line 7 "../src/legend.vala" + self->priv->_visible = TRUE; +#line 8 "../src/legend.vala" + _tmp0_ = live_chart_labels_new (); +#line 8 "../src/legend.vala" + self->labels = _tmp0_; +#line 10 "../src/legend.vala" + _tmp1_ = gee_array_list_new (LIVE_CHART_TYPE_SERIE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); +#line 10 "../src/legend.vala" + self->series = _tmp1_; +#line 11 "../src/legend.vala" + memset (&_tmp2_, 0, sizeof (LiveChartBoundingBox)); +#line 11 "../src/legend.vala" + _tmp2_.x = (gdouble) 0; +#line 11 "../src/legend.vala" + _tmp2_.y = (gdouble) 0; +#line 11 "../src/legend.vala" + _tmp2_.width = (gdouble) 0; +#line 11 "../src/legend.vala" + _tmp2_.height = (gdouble) 0; +#line 11 "../src/legend.vala" + self->bounding_box = _tmp2_; +#line 17 "../src/legend.vala" + memset (&_tmp3_, 0, sizeof (GdkRGBA)); +#line 17 "../src/legend.vala" + _tmp3_.red = 1.0; +#line 17 "../src/legend.vala" + _tmp3_.green = 1.0; +#line 17 "../src/legend.vala" + _tmp3_.blue = 1.0; +#line 17 "../src/legend.vala" + _tmp3_.alpha = 1.0; +#line 17 "../src/legend.vala" + self->priv->_main_color = _tmp3_; +#line 399 "legend.c" +} + +static void +live_chart_legend_finalize (GObject * obj) +{ + LiveChartLegend * self; +#line 5 "../src/legend.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_LEGEND, LiveChartLegend); +#line 8 "../src/legend.vala" + _live_chart_labels_unref0 (self->labels); +#line 10 "../src/legend.vala" + _g_object_unref0 (self->series); +#line 5 "../src/legend.vala" + G_OBJECT_CLASS (live_chart_legend_parent_class)->finalize (obj); +#line 414 "legend.c" +} + +static GType +live_chart_legend_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartLegendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_legend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartLegend), 0, (GInstanceInitFunc) live_chart_legend_instance_init, NULL }; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_legend_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_legend_type_id; + live_chart_legend_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartLegend", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_type_add_interface_static (live_chart_legend_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartLegend_private_offset = g_type_add_instance_private (live_chart_legend_type_id, sizeof (LiveChartLegendPrivate)); + return live_chart_legend_type_id; +} + +GType +live_chart_legend_get_type (void) +{ + static volatile gsize live_chart_legend_type_id__once = 0; + if (g_once_init_enter (&live_chart_legend_type_id__once)) { + GType live_chart_legend_type_id; + live_chart_legend_type_id = live_chart_legend_get_type_once (); + g_once_init_leave (&live_chart_legend_type_id__once, live_chart_legend_type_id); + } + return live_chart_legend_type_id__once; +} + +static void +_vala_live_chart_legend_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartLegend * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_LEGEND, LiveChartLegend); +#line 5 "../src/legend.vala" + switch (property_id) { +#line 5 "../src/legend.vala" + case LIVE_CHART_LEGEND_VISIBLE_PROPERTY: +#line 5 "../src/legend.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 5 "../src/legend.vala" + break; +#line 5 "../src/legend.vala" + case LIVE_CHART_LEGEND_MAIN_COLOR_PROPERTY: +#line 459 "legend.c" + { + GdkRGBA boxed; +#line 5 "../src/legend.vala" + live_chart_legend_get_main_color (self, &boxed); +#line 5 "../src/legend.vala" + g_value_set_boxed (value, &boxed); +#line 466 "legend.c" + } +#line 5 "../src/legend.vala" + break; +#line 470 "legend.c" + default: +#line 5 "../src/legend.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 5 "../src/legend.vala" + break; +#line 476 "legend.c" + } +} + +static void +_vala_live_chart_legend_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartLegend * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_LEGEND, LiveChartLegend); +#line 5 "../src/legend.vala" + switch (property_id) { +#line 5 "../src/legend.vala" + case LIVE_CHART_LEGEND_VISIBLE_PROPERTY: +#line 5 "../src/legend.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 5 "../src/legend.vala" + break; +#line 5 "../src/legend.vala" + case LIVE_CHART_LEGEND_MAIN_COLOR_PROPERTY: +#line 5 "../src/legend.vala" + live_chart_legend_set_main_color (self, g_value_get_boxed (value)); +#line 5 "../src/legend.vala" + break; +#line 502 "legend.c" + default: +#line 5 "../src/legend.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 5 "../src/legend.vala" + break; +#line 508 "legend.c" + } +} + +static gpointer +_cairo_reference0 (gpointer self) +{ +#line 40 "../src/legend.vala" + return self ? cairo_reference (self) : NULL; +#line 517 "legend.c" +} + +static Block3Data* +block3_data_ref (Block3Data* _data3_) +{ +#line 40 "../src/legend.vala" + g_atomic_int_inc (&_data3_->_ref_count_); +#line 40 "../src/legend.vala" + return _data3_; +#line 527 "legend.c" +} + +static void +block3_data_unref (void * _userdata_) +{ + Block3Data* _data3_; + _data3_ = (Block3Data*) _userdata_; +#line 40 "../src/legend.vala" + if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) { +#line 537 "legend.c" + LiveChartHorizontalLegend* self; +#line 40 "../src/legend.vala" + self = _data3_->self; +#line 40 "../src/legend.vala" + _cairo_destroy0 (_data3_->ctx); +#line 40 "../src/legend.vala" + _g_object_unref0 (self); +#line 40 "../src/legend.vala" + g_slice_free (Block3Data, _data3_); +#line 547 "legend.c" + } +} + +static Block4Data* +block4_data_ref (Block4Data* _data4_) +{ +#line 41 "../src/legend.vala" + g_atomic_int_inc (&_data4_->_ref_count_); +#line 41 "../src/legend.vala" + return _data4_; +#line 558 "legend.c" +} + +static void +block4_data_unref (void * _userdata_) +{ + Block4Data* _data4_; + _data4_ = (Block4Data*) _userdata_; +#line 41 "../src/legend.vala" + if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) { +#line 568 "legend.c" + LiveChartHorizontalLegend* self; +#line 41 "../src/legend.vala" + self = _data4_->_data3_->self; +#line 41 "../src/legend.vala" + block3_data_unref (_data4_->_data3_); +#line 41 "../src/legend.vala" + _data4_->_data3_ = NULL; +#line 41 "../src/legend.vala" + g_slice_free (Block4Data, _data4_); +#line 578 "legend.c" + } +} + +static gboolean +___lambda6_ (Block4Data* _data4_, + LiveChartSerie* serie) +{ + Block3Data* _data3_; + LiveChartHorizontalLegend* self; + GdkRGBA _tmp0_ = {0}; + GdkRGBA _tmp1_; + GdkRGBA _tmp2_ = {0}; + GdkRGBA _tmp3_; + GdkRGBA _tmp4_ = {0}; + GdkRGBA _tmp5_; + LiveChartBoundaries _tmp6_; + LiveChartBoundary _tmp7_; + LiveChartBoundaries _tmp8_; + LiveChartBoundary _tmp9_; + LiveChartLabels* _tmp10_; + LiveChartFont* _tmp11_; + LiveChartFont* _tmp12_; + cairo_text_extents_t extents = {0}; + const gchar* _tmp13_; + const gchar* _tmp14_; + cairo_text_extents_t _tmp15_ = {0}; + LiveChartBoundaries _tmp16_; + LiveChartBoundary _tmp17_; + LiveChartBoundaries _tmp18_; + LiveChartBoundary _tmp19_; + cairo_text_extents_t _tmp20_; + cairo_text_extents_t _tmp21_; + const gchar* _tmp22_; + const gchar* _tmp23_; + cairo_text_extents_t _tmp24_; + gboolean result; +#line 46 "../src/legend.vala" + _data3_ = _data4_->_data3_; +#line 46 "../src/legend.vala" + self = _data3_->self; +#line 46 "../src/legend.vala" + g_return_val_if_fail (serie != NULL, FALSE); +#line 47 "../src/legend.vala" + live_chart_colorable_get_main_color ((LiveChartColorable*) serie, &_tmp0_); +#line 47 "../src/legend.vala" + _tmp1_ = _tmp0_; +#line 47 "../src/legend.vala" + live_chart_colorable_get_main_color ((LiveChartColorable*) serie, &_tmp2_); +#line 47 "../src/legend.vala" + _tmp3_ = _tmp2_; +#line 47 "../src/legend.vala" + live_chart_colorable_get_main_color ((LiveChartColorable*) serie, &_tmp4_); +#line 47 "../src/legend.vala" + _tmp5_ = _tmp4_; +#line 47 "../src/legend.vala" + cairo_set_source_rgba (_data3_->ctx, _tmp1_.red, _tmp3_.green, _tmp5_.blue, (gdouble) 1); +#line 48 "../src/legend.vala" + _tmp6_ = _data4_->boundaries; +#line 48 "../src/legend.vala" + _tmp7_ = _tmp6_.x; +#line 48 "../src/legend.vala" + _tmp8_ = _data4_->boundaries; +#line 48 "../src/legend.vala" + _tmp9_ = _tmp8_.y; +#line 48 "../src/legend.vala" + cairo_rectangle (_data3_->ctx, (gdouble) (_tmp7_.min + _data4_->pos), (gdouble) (_tmp9_.max + _data4_->y_padding), (gdouble) LIVE_CHART_HORIZONTAL_LEGEND_COLOR_BLOCK_WIDTH, (gdouble) LIVE_CHART_HORIZONTAL_LEGEND_COLOR_BLOCK_HEIGHT); +#line 49 "../src/legend.vala" + cairo_fill (_data3_->ctx); +#line 51 "../src/legend.vala" + _tmp10_ = ((LiveChartLegend*) self)->labels; +#line 51 "../src/legend.vala" + _tmp11_ = live_chart_labels_get_font (_tmp10_); +#line 51 "../src/legend.vala" + _tmp12_ = _tmp11_; +#line 51 "../src/legend.vala" + live_chart_font_configure (_tmp12_, _data3_->ctx); +#line 52 "../src/legend.vala" + _tmp13_ = live_chart_serie_get_name (serie); +#line 52 "../src/legend.vala" + _tmp14_ = _tmp13_; +#line 52 "../src/legend.vala" + live_chart_horizontal_legend_name_extents (self, _tmp14_, _data3_->ctx, &_tmp15_); +#line 52 "../src/legend.vala" + extents = _tmp15_; +#line 53 "../src/legend.vala" + _tmp16_ = _data4_->boundaries; +#line 53 "../src/legend.vala" + _tmp17_ = _tmp16_.x; +#line 53 "../src/legend.vala" + _tmp18_ = _data4_->boundaries; +#line 53 "../src/legend.vala" + _tmp19_ = _tmp18_.y; +#line 53 "../src/legend.vala" + _tmp20_ = extents; +#line 53 "../src/legend.vala" + _tmp21_ = extents; +#line 53 "../src/legend.vala" + cairo_move_to (_data3_->ctx, (gdouble) (((_tmp17_.min + _data4_->pos) + LIVE_CHART_HORIZONTAL_LEGEND_COLOR_BLOCK_WIDTH) + 3), ((_tmp19_.max + _data4_->y_padding) + _tmp20_.height) + ((LIVE_CHART_HORIZONTAL_LEGEND_COLOR_BLOCK_HEIGHT - _tmp21_.height) / 2)); +#line 54 "../src/legend.vala" + _tmp22_ = live_chart_serie_get_name (serie); +#line 54 "../src/legend.vala" + _tmp23_ = _tmp22_; +#line 54 "../src/legend.vala" + cairo_show_text (_data3_->ctx, _tmp23_); +#line 56 "../src/legend.vala" + _tmp24_ = extents; +#line 56 "../src/legend.vala" + _data4_->pos += (LIVE_CHART_HORIZONTAL_LEGEND_COLOR_BLOCK_WIDTH + ((gint) _tmp24_.width)) + 20; +#line 58 "../src/legend.vala" + result = TRUE; +#line 58 "../src/legend.vala" + _g_object_unref0 (serie); +#line 58 "../src/legend.vala" + return result; +#line 693 "legend.c" +} + +static gboolean +____lambda6__gee_forall_func (gpointer g, + gpointer self) +{ + gboolean result; + result = ___lambda6_ (self, (LiveChartSerie*) g); +#line 46 "../src/legend.vala" + return result; +#line 704 "legend.c" +} + +static void +live_chart_horizontal_legend_real_draw (LiveChartLegend* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartHorizontalLegend * self; + Block3Data* _data3_; + cairo_t* _tmp0_; + gboolean _tmp1_; + gboolean _tmp2_; +#line 40 "../src/legend.vala" + self = (LiveChartHorizontalLegend*) base; +#line 40 "../src/legend.vala" + g_return_if_fail (ctx != NULL); +#line 40 "../src/legend.vala" + g_return_if_fail (config != NULL); +#line 40 "../src/legend.vala" + _data3_ = g_slice_new0 (Block3Data); +#line 40 "../src/legend.vala" + _data3_->_ref_count_ = 1; +#line 40 "../src/legend.vala" + _data3_->self = g_object_ref (self); +#line 40 "../src/legend.vala" + _tmp0_ = _cairo_reference0 (ctx); +#line 40 "../src/legend.vala" + _cairo_destroy0 (_data3_->ctx); +#line 40 "../src/legend.vala" + _data3_->ctx = _tmp0_; +#line 41 "../src/legend.vala" + _tmp1_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 41 "../src/legend.vala" + _tmp2_ = _tmp1_; +#line 41 "../src/legend.vala" + if (_tmp2_) { +#line 741 "legend.c" + Block4Data* _data4_; + LiveChartBoundaries _tmp3_ = {0}; + GeeArrayList* _tmp4_; +#line 41 "../src/legend.vala" + _data4_ = g_slice_new0 (Block4Data); +#line 41 "../src/legend.vala" + _data4_->_ref_count_ = 1; +#line 41 "../src/legend.vala" + _data4_->_data3_ = block3_data_ref (_data3_); +#line 43 "../src/legend.vala" + _data4_->y_padding = live_chart_horizontal_legend_get_y_padding (self, config); +#line 44 "../src/legend.vala" + live_chart_config_boundaries (config, &_tmp3_); +#line 44 "../src/legend.vala" + _data4_->boundaries = _tmp3_; +#line 45 "../src/legend.vala" + _data4_->pos = 0; +#line 46 "../src/legend.vala" + _tmp4_ = ((LiveChartLegend*) self)->series; +#line 46 "../src/legend.vala" + gee_abstract_collection_foreach ((GeeAbstractCollection*) _tmp4_, ____lambda6__gee_forall_func, _data4_); +#line 60 "../src/legend.vala" + cairo_stroke (_data3_->ctx); +#line 61 "../src/legend.vala" + live_chart_horizontal_legend_update_bounding_box (self, config, _data4_->pos); +#line 62 "../src/legend.vala" + live_chart_horizontal_legend_debug (self, _data3_->ctx); +#line 41 "../src/legend.vala" + block4_data_unref (_data4_); +#line 41 "../src/legend.vala" + _data4_ = NULL; +#line 773 "legend.c" + } +#line 40 "../src/legend.vala" + block3_data_unref (_data3_); +#line 40 "../src/legend.vala" + _data3_ = NULL; +#line 779 "legend.c" +} + +static gint +live_chart_horizontal_legend_get_y_padding (LiveChartHorizontalLegend* self, + LiveChartConfig* config) +{ + LiveChartXAxis* _tmp0_; + LiveChartLabels* _tmp1_; + cairo_text_extents_t _tmp2_ = {0}; + cairo_text_extents_t _tmp3_; + gint result; +#line 66 "../src/legend.vala" + g_return_val_if_fail (self != NULL, 0); +#line 66 "../src/legend.vala" + g_return_val_if_fail (config != NULL, 0); +#line 67 "../src/legend.vala" + _tmp0_ = config->x_axis; +#line 67 "../src/legend.vala" + _tmp1_ = _tmp0_->labels; +#line 67 "../src/legend.vala" + live_chart_labels_get_extents (_tmp1_, &_tmp2_); +#line 67 "../src/legend.vala" + _tmp3_ = _tmp2_; +#line 67 "../src/legend.vala" + result = (gint) ((LIVE_CHART_GRID_ABSCISSA_TIME_PADDING * 2) + _tmp3_.height); +#line 67 "../src/legend.vala" + return result; +#line 807 "legend.c" +} + +static void +live_chart_horizontal_legend_name_extents (LiveChartHorizontalLegend* self, + const gchar* name, + cairo_t* ctx, + cairo_text_extents_t* result) +{ + cairo_text_extents_t name_extents = {0}; + cairo_text_extents_t _tmp0_ = {0}; +#line 70 "../src/legend.vala" + g_return_if_fail (self != NULL); +#line 70 "../src/legend.vala" + g_return_if_fail (name != NULL); +#line 70 "../src/legend.vala" + g_return_if_fail (ctx != NULL); +#line 72 "../src/legend.vala" + cairo_text_extents (ctx, name, &_tmp0_); +#line 72 "../src/legend.vala" + name_extents = _tmp0_; +#line 74 "../src/legend.vala" + *result = name_extents; +#line 74 "../src/legend.vala" + return; +#line 832 "legend.c" +} + +static void +live_chart_horizontal_legend_update_bounding_box (LiveChartHorizontalLegend* self, + LiveChartConfig* config, + gint width) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; + LiveChartBoundaries _tmp1_; + LiveChartBoundary _tmp2_; + LiveChartBoundaries _tmp3_; + LiveChartBoundary _tmp4_; + LiveChartBoundingBox _tmp5_ = {0}; +#line 77 "../src/legend.vala" + g_return_if_fail (self != NULL); +#line 77 "../src/legend.vala" + g_return_if_fail (config != NULL); +#line 78 "../src/legend.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 78 "../src/legend.vala" + boundaries = _tmp0_; +#line 79 "../src/legend.vala" + _tmp1_ = boundaries; +#line 79 "../src/legend.vala" + _tmp2_ = _tmp1_.x; +#line 79 "../src/legend.vala" + _tmp3_ = boundaries; +#line 79 "../src/legend.vala" + _tmp4_ = _tmp3_.y; +#line 79 "../src/legend.vala" + memset (&_tmp5_, 0, sizeof (LiveChartBoundingBox)); +#line 79 "../src/legend.vala" + _tmp5_.x = (gdouble) _tmp2_.min; +#line 79 "../src/legend.vala" + _tmp5_.y = (gdouble) (_tmp4_.max + live_chart_horizontal_legend_get_y_padding (self, config)); +#line 79 "../src/legend.vala" + _tmp5_.width = (gdouble) width; +#line 79 "../src/legend.vala" + _tmp5_.height = (gdouble) 10; +#line 79 "../src/legend.vala" + ((LiveChartLegend*) self)->bounding_box = _tmp5_; +#line 875 "legend.c" +} + +void +live_chart_horizontal_legend_debug (LiveChartHorizontalLegend* self, + cairo_t* ctx) +{ + gchar* debug = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; +#line 87 "../src/legend.vala" + g_return_if_fail (self != NULL); +#line 87 "../src/legend.vala" + g_return_if_fail (ctx != NULL); +#line 88 "../src/legend.vala" + _tmp0_ = g_getenv ("LIVE_CHART_DEBUG"); +#line 88 "../src/legend.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 88 "../src/legend.vala" + debug = _tmp1_; +#line 89 "../src/legend.vala" + _tmp2_ = debug; +#line 89 "../src/legend.vala" + if (_tmp2_ != NULL) { +#line 900 "legend.c" + LiveChartBoundingBox _tmp3_; + LiveChartBoundingBox _tmp4_; + LiveChartBoundingBox _tmp5_; + LiveChartBoundingBox _tmp6_; +#line 90 "../src/legend.vala" + _tmp3_ = ((LiveChartLegend*) self)->bounding_box; +#line 90 "../src/legend.vala" + _tmp4_ = ((LiveChartLegend*) self)->bounding_box; +#line 90 "../src/legend.vala" + _tmp5_ = ((LiveChartLegend*) self)->bounding_box; +#line 90 "../src/legend.vala" + _tmp6_ = ((LiveChartLegend*) self)->bounding_box; +#line 90 "../src/legend.vala" + cairo_rectangle (ctx, _tmp3_.x, _tmp4_.y, _tmp5_.width, _tmp6_.height); +#line 91 "../src/legend.vala" + cairo_stroke (ctx); +#line 917 "legend.c" + } +#line 87 "../src/legend.vala" + _g_free0 (debug); +#line 921 "legend.c" +} + +LiveChartHorizontalLegend* +live_chart_horizontal_legend_construct (GType object_type) +{ + LiveChartHorizontalLegend * self = NULL; +#line 35 "../src/legend.vala" + self = (LiveChartHorizontalLegend*) live_chart_legend_construct (object_type); +#line 35 "../src/legend.vala" + return self; +#line 932 "legend.c" +} + +LiveChartHorizontalLegend* +live_chart_horizontal_legend_new (void) +{ +#line 35 "../src/legend.vala" + return live_chart_horizontal_legend_construct (LIVE_CHART_TYPE_HORIZONTAL_LEGEND); +#line 940 "legend.c" +} + +static void +live_chart_horizontal_legend_class_init (LiveChartHorizontalLegendClass * klass, + gpointer klass_data) +{ +#line 35 "../src/legend.vala" + live_chart_horizontal_legend_parent_class = g_type_class_peek_parent (klass); +#line 35 "../src/legend.vala" + ((LiveChartLegendClass *) klass)->draw = (void (*) (LiveChartLegend*, cairo_t*, LiveChartConfig*)) live_chart_horizontal_legend_real_draw; +#line 951 "legend.c" +} + +static void +live_chart_horizontal_legend_instance_init (LiveChartHorizontalLegend * self, + gpointer klass) +{ +} + +static GType +live_chart_horizontal_legend_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartHorizontalLegendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_horizontal_legend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartHorizontalLegend), 0, (GInstanceInitFunc) live_chart_horizontal_legend_instance_init, NULL }; + GType live_chart_horizontal_legend_type_id; + live_chart_horizontal_legend_type_id = g_type_register_static (LIVE_CHART_TYPE_LEGEND, "LiveChartHorizontalLegend", &g_define_type_info, 0); + return live_chart_horizontal_legend_type_id; +} + +GType +live_chart_horizontal_legend_get_type (void) +{ + static volatile gsize live_chart_horizontal_legend_type_id__once = 0; + if (g_once_init_enter (&live_chart_horizontal_legend_type_id__once)) { + GType live_chart_horizontal_legend_type_id; + live_chart_horizontal_legend_type_id = live_chart_horizontal_legend_get_type_once (); + g_once_init_leave (&live_chart_horizontal_legend_type_id__once, live_chart_horizontal_legend_type_id); + } + return live_chart_horizontal_legend_type_id__once; +} + +static void +live_chart_noop_legend_real_draw (LiveChartLegend* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartNoopLegend * self; +#line 97 "../src/legend.vala" + self = (LiveChartNoopLegend*) base; +#line 97 "../src/legend.vala" + g_return_if_fail (ctx != NULL); +#line 97 "../src/legend.vala" + g_return_if_fail (config != NULL); +#line 993 "legend.c" +} + +LiveChartNoopLegend* +live_chart_noop_legend_construct (GType object_type) +{ + LiveChartNoopLegend * self = NULL; +#line 96 "../src/legend.vala" + self = (LiveChartNoopLegend*) live_chart_legend_construct (object_type); +#line 96 "../src/legend.vala" + return self; +#line 1004 "legend.c" +} + +LiveChartNoopLegend* +live_chart_noop_legend_new (void) +{ +#line 96 "../src/legend.vala" + return live_chart_noop_legend_construct (LIVE_CHART_TYPE_NOOP_LEGEND); +#line 1012 "legend.c" +} + +static void +live_chart_noop_legend_class_init (LiveChartNoopLegendClass * klass, + gpointer klass_data) +{ +#line 96 "../src/legend.vala" + live_chart_noop_legend_parent_class = g_type_class_peek_parent (klass); +#line 96 "../src/legend.vala" + ((LiveChartLegendClass *) klass)->draw = (void (*) (LiveChartLegend*, cairo_t*, LiveChartConfig*)) live_chart_noop_legend_real_draw; +#line 1023 "legend.c" +} + +static void +live_chart_noop_legend_instance_init (LiveChartNoopLegend * self, + gpointer klass) +{ +} + +static GType +live_chart_noop_legend_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartNoopLegendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_noop_legend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartNoopLegend), 0, (GInstanceInitFunc) live_chart_noop_legend_instance_init, NULL }; + GType live_chart_noop_legend_type_id; + live_chart_noop_legend_type_id = g_type_register_static (LIVE_CHART_TYPE_LEGEND, "LiveChartNoopLegend", &g_define_type_info, 0); + return live_chart_noop_legend_type_id; +} + +GType +live_chart_noop_legend_get_type (void) +{ + static volatile gsize live_chart_noop_legend_type_id__once = 0; + if (g_once_init_enter (&live_chart_noop_legend_type_id__once)) { + GType live_chart_noop_legend_type_id; + live_chart_noop_legend_type_id = live_chart_noop_legend_get_type_once (); + g_once_init_leave (&live_chart_noop_legend_type_id__once, live_chart_noop_legend_type_id); + } + return live_chart_noop_legend_type_id__once; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/line.c b/iPDC/lib/liblivechart_static.a.p/line.c new file mode 100644 index 0000000..5b5446a --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/line.c @@ -0,0 +1,375 @@ +/* line.c generated by valac 0.56.0, the Vala compiler + * generated from line.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_LINE_0_PROPERTY, + LIVE_CHART_LINE_NUM_PROPERTIES +}; +static GParamSpec* live_chart_line_properties[LIVE_CHART_LINE_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +static gpointer live_chart_line_parent_class = NULL; + +static void live_chart_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_line_update_bounding_box (LiveChartLine* self, + LiveChartPoints* points, + LiveChartConfig* config); +static GType live_chart_line_get_type_once (void); + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 8 "../src/line.vala" + return self ? g_object_ref (self) : NULL; +#line 34 "line.c" +} + +LiveChartLine* +live_chart_line_construct (GType object_type, + LiveChartValues* values) +{ + LiveChartLine * self = NULL; + LiveChartValues* _tmp0_; +#line 6 "../src/line.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 7 "../src/line.vala" + self = (LiveChartLine*) live_chart_serie_renderer_construct (object_type); +#line 8 "../src/line.vala" + _tmp0_ = _g_object_ref0 (values); +#line 8 "../src/line.vala" + _g_object_unref0 (((LiveChartSerieRenderer*) self)->values); +#line 8 "../src/line.vala" + ((LiveChartSerieRenderer*) self)->values = _tmp0_; +#line 6 "../src/line.vala" + return self; +#line 55 "line.c" +} + +LiveChartLine* +live_chart_line_new (LiveChartValues* values) +{ +#line 6 "../src/line.vala" + return live_chart_line_construct (LIVE_CHART_TYPE_LINE, values); +#line 63 "line.c" +} + +static void +live_chart_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartLine * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 11 "../src/line.vala" + self = (LiveChartLine*) base; +#line 11 "../src/line.vala" + g_return_if_fail (ctx != NULL); +#line 11 "../src/line.vala" + g_return_if_fail (config != NULL); +#line 12 "../src/line.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 12 "../src/line.vala" + _tmp1_ = _tmp0_; +#line 12 "../src/line.vala" + if (_tmp1_) { +#line 86 "line.c" + LiveChartPoints* points = NULL; + LiveChartValues* _tmp2_; + LiveChartPoints* _tmp3_; + LiveChartPoints* _tmp4_; + gint _tmp5_; + gint _tmp6_; +#line 13 "../src/line.vala" + _tmp2_ = ((LiveChartSerieRenderer*) self)->values; +#line 13 "../src/line.vala" + _tmp3_ = live_chart_points_create (_tmp2_, config); +#line 13 "../src/line.vala" + points = _tmp3_; +#line 14 "../src/line.vala" + _tmp4_ = points; +#line 14 "../src/line.vala" + _tmp5_ = live_chart_points_get_size (_tmp4_); +#line 14 "../src/line.vala" + _tmp6_ = _tmp5_; +#line 14 "../src/line.vala" + if (_tmp6_ > 0) { +#line 107 "line.c" + LiveChartPoints* _tmp7_; + LiveChartPoints* _tmp8_; + LiveChartPoints* _tmp9_; +#line 15 "../src/line.vala" + _tmp7_ = points; +#line 15 "../src/line.vala" + _tmp8_ = live_chart_line_draw_line (self, _tmp7_, ctx, config); +#line 15 "../src/line.vala" + _tmp9_ = _tmp8_; +#line 15 "../src/line.vala" + _g_object_unref0 (_tmp9_); +#line 16 "../src/line.vala" + cairo_stroke (ctx); +#line 121 "line.c" + } +#line 12 "../src/line.vala" + _g_object_unref0 (points); +#line 125 "line.c" + } +} + +LiveChartPoints* +live_chart_line_draw_line (LiveChartLine* self, + LiveChartPoints* points, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartPath* _tmp0_; + LiveChartPath* _tmp1_; + LiveChartPoint first_point = {0}; + LiveChartPoint _tmp2_ = {0}; + LiveChartPath* _tmp3_; + LiveChartPath* _tmp4_; + LiveChartPoint _tmp5_; + LiveChartPoint _tmp6_; + LiveChartPoints* _tmp18_; + LiveChartPoints* result; +#line 21 "../src/line.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 21 "../src/line.vala" + g_return_val_if_fail (points != NULL, NULL); +#line 21 "../src/line.vala" + g_return_val_if_fail (ctx != NULL, NULL); +#line 21 "../src/line.vala" + g_return_val_if_fail (config != NULL, NULL); +#line 22 "../src/line.vala" + _tmp0_ = live_chart_serie_renderer_get_line ((LiveChartSerieRenderer*) self); +#line 22 "../src/line.vala" + _tmp1_ = _tmp0_; +#line 22 "../src/line.vala" + live_chart_path_configure (_tmp1_, ctx); +#line 24 "../src/line.vala" + live_chart_points_first (points, &_tmp2_); +#line 24 "../src/line.vala" + first_point = _tmp2_; +#line 26 "../src/line.vala" + live_chart_line_update_bounding_box (self, points, config); +#line 27 "../src/line.vala" + live_chart_serie_renderer_debug ((LiveChartSerieRenderer*) self, ctx); +#line 29 "../src/line.vala" + _tmp3_ = live_chart_serie_renderer_get_line ((LiveChartSerieRenderer*) self); +#line 29 "../src/line.vala" + _tmp4_ = _tmp3_; +#line 29 "../src/line.vala" + live_chart_path_configure (_tmp4_, ctx); +#line 31 "../src/line.vala" + _tmp5_ = first_point; +#line 31 "../src/line.vala" + _tmp6_ = first_point; +#line 31 "../src/line.vala" + cairo_move_to (ctx, _tmp5_.x, _tmp6_.y); +#line 179 "line.c" + { + gint pos = 0; +#line 32 "../src/line.vala" + pos = 0; +#line 184 "line.c" + { + gboolean _tmp7_ = FALSE; +#line 32 "../src/line.vala" + _tmp7_ = TRUE; +#line 32 "../src/line.vala" + while (TRUE) { +#line 191 "line.c" + gint _tmp9_; + gint _tmp10_; + LiveChartPoint current_point = {0}; + LiveChartPoint _tmp11_ = {0}; + LiveChartPoint next_point = {0}; + LiveChartPoint _tmp12_ = {0}; + LiveChartPoint _tmp13_; + LiveChartPoint _tmp16_; + LiveChartPoint _tmp17_; +#line 32 "../src/line.vala" + if (!_tmp7_) { +#line 203 "line.c" + gint _tmp8_; +#line 32 "../src/line.vala" + _tmp8_ = pos; +#line 32 "../src/line.vala" + pos = _tmp8_ + 1; +#line 209 "line.c" + } +#line 32 "../src/line.vala" + _tmp7_ = FALSE; +#line 32 "../src/line.vala" + _tmp9_ = live_chart_points_get_size (points); +#line 32 "../src/line.vala" + _tmp10_ = _tmp9_; +#line 32 "../src/line.vala" + if (!(pos < (_tmp10_ - 1))) { +#line 32 "../src/line.vala" + break; +#line 221 "line.c" + } +#line 33 "../src/line.vala" + live_chart_points_get (points, pos, &_tmp11_); +#line 33 "../src/line.vala" + current_point = _tmp11_; +#line 34 "../src/line.vala" + live_chart_points_after (points, pos, &_tmp12_); +#line 34 "../src/line.vala" + next_point = _tmp12_; +#line 35 "../src/line.vala" + _tmp13_ = current_point; +#line 35 "../src/line.vala" + if (live_chart_serie_renderer_is_out_of_area ((LiveChartSerieRenderer*) self, &_tmp13_)) { +#line 235 "line.c" + LiveChartPoint _tmp14_; + LiveChartPoint _tmp15_; +#line 36 "../src/line.vala" + _tmp14_ = current_point; +#line 36 "../src/line.vala" + _tmp15_ = current_point; +#line 36 "../src/line.vala" + cairo_move_to (ctx, _tmp14_.x, _tmp15_.y); +#line 37 "../src/line.vala" + continue; +#line 246 "line.c" + } +#line 40 "../src/line.vala" + _tmp16_ = next_point; +#line 40 "../src/line.vala" + _tmp17_ = next_point; +#line 40 "../src/line.vala" + cairo_line_to (ctx, _tmp16_.x, _tmp17_.y); +#line 254 "line.c" + } + } + } +#line 43 "../src/line.vala" + _tmp18_ = _g_object_ref0 (points); +#line 43 "../src/line.vala" + result = _tmp18_; +#line 43 "../src/line.vala" + return result; +#line 264 "line.c" +} + +static void +live_chart_line_update_bounding_box (LiveChartLine* self, + LiveChartPoints* points, + LiveChartConfig* config) +{ + LiveChartPoint _tmp0_ = {0}; + LiveChartBounds* _tmp1_; + LiveChartBounds* _tmp2_; + gdouble _tmp3_; + gdouble _tmp4_; + LiveChartPoint _tmp5_ = {0}; + LiveChartPoint _tmp6_ = {0}; + LiveChartBounds* _tmp7_; + LiveChartBounds* _tmp8_; + gdouble _tmp9_; + gdouble _tmp10_; + LiveChartBounds* _tmp11_; + LiveChartBounds* _tmp12_; + gdouble _tmp13_; + gdouble _tmp14_; + LiveChartBoundingBox _tmp15_ = {0}; +#line 46 "../src/line.vala" + g_return_if_fail (self != NULL); +#line 46 "../src/line.vala" + g_return_if_fail (points != NULL); +#line 46 "../src/line.vala" + g_return_if_fail (config != NULL); +#line 47 "../src/line.vala" + live_chart_points_first (points, &_tmp0_); +#line 47 "../src/line.vala" + _tmp1_ = live_chart_points_get_bounds (points); +#line 47 "../src/line.vala" + _tmp2_ = _tmp1_; +#line 47 "../src/line.vala" + _tmp3_ = live_chart_bounds_get_lower (_tmp2_); +#line 47 "../src/line.vala" + _tmp4_ = _tmp3_; +#line 47 "../src/line.vala" + live_chart_points_last (points, &_tmp5_); +#line 47 "../src/line.vala" + live_chart_points_first (points, &_tmp6_); +#line 47 "../src/line.vala" + _tmp7_ = live_chart_points_get_bounds (points); +#line 47 "../src/line.vala" + _tmp8_ = _tmp7_; +#line 47 "../src/line.vala" + _tmp9_ = live_chart_bounds_get_upper (_tmp8_); +#line 47 "../src/line.vala" + _tmp10_ = _tmp9_; +#line 47 "../src/line.vala" + _tmp11_ = live_chart_points_get_bounds (points); +#line 47 "../src/line.vala" + _tmp12_ = _tmp11_; +#line 47 "../src/line.vala" + _tmp13_ = live_chart_bounds_get_lower (_tmp12_); +#line 47 "../src/line.vala" + _tmp14_ = _tmp13_; +#line 47 "../src/line.vala" + memset (&_tmp15_, 0, sizeof (LiveChartBoundingBox)); +#line 47 "../src/line.vala" + _tmp15_.x = _tmp0_.x; +#line 47 "../src/line.vala" + _tmp15_.y = _tmp4_; +#line 47 "../src/line.vala" + _tmp15_.width = _tmp5_.x - _tmp6_.x; +#line 47 "../src/line.vala" + _tmp15_.height = _tmp10_ - _tmp14_; +#line 47 "../src/line.vala" + ((LiveChartSerieRenderer*) self)->bounding_box = _tmp15_; +#line 336 "line.c" +} + +static void +live_chart_line_class_init (LiveChartLineClass * klass, + gpointer klass_data) +{ +#line 4 "../src/line.vala" + live_chart_line_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/line.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_line_real_draw; +#line 347 "line.c" +} + +static void +live_chart_line_instance_init (LiveChartLine * self, + gpointer klass) +{ +} + +static GType +live_chart_line_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartLineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_line_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartLine), 0, (GInstanceInitFunc) live_chart_line_instance_init, NULL }; + GType live_chart_line_type_id; + live_chart_line_type_id = g_type_register_static (LIVE_CHART_TYPE_SERIE_RENDERER, "LiveChartLine", &g_define_type_info, 0); + return live_chart_line_type_id; +} + +GType +live_chart_line_get_type (void) +{ + static volatile gsize live_chart_line_type_id__once = 0; + if (g_once_init_enter (&live_chart_line_type_id__once)) { + GType live_chart_line_type_id; + live_chart_line_type_id = live_chart_line_get_type_once (); + g_once_init_leave (&live_chart_line_type_id__once, live_chart_line_type_id); + } + return live_chart_line_type_id__once; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/line_area.c b/iPDC/lib/liblivechart_static.a.p/line_area.c new file mode 100644 index 0000000..fb26625 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/line_area.c @@ -0,0 +1,308 @@ +/* line_area.c generated by valac 0.56.0, the Vala compiler + * generated from line_area.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_LINE_AREA_0_PROPERTY, + LIVE_CHART_LINE_AREA_AREA_ALPHA_PROPERTY, + LIVE_CHART_LINE_AREA_NUM_PROPERTIES +}; +static GParamSpec* live_chart_line_area_properties[LIVE_CHART_LINE_AREA_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +struct _LiveChartLineAreaPrivate { + gdouble _area_alpha; +}; + +static gint LiveChartLineArea_private_offset; +static gpointer live_chart_line_area_parent_class = NULL; + +static void live_chart_line_area_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_line_area_finalize (GObject * obj); +static GType live_chart_line_area_get_type_once (void); +static void _vala_live_chart_line_area_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_line_area_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +static inline gpointer +live_chart_line_area_get_instance_private (LiveChartLineArea* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartLineArea_private_offset); +} + +LiveChartLineArea* +live_chart_line_area_construct (GType object_type, + LiveChartValues* values) +{ + LiveChartLineArea * self = NULL; +#line 8 "../src/line_area.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 9 "../src/line_area.vala" + self = (LiveChartLineArea*) live_chart_line_construct (object_type, values); +#line 8 "../src/line_area.vala" + return self; +#line 58 "line_area.c" +} + +LiveChartLineArea* +live_chart_line_area_new (LiveChartValues* values) +{ +#line 8 "../src/line_area.vala" + return live_chart_line_area_construct (LIVE_CHART_TYPE_LINE_AREA, values); +#line 66 "line_area.c" +} + +static void +live_chart_line_area_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartLineArea * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 12 "../src/line_area.vala" + self = (LiveChartLineArea*) base; +#line 12 "../src/line_area.vala" + g_return_if_fail (ctx != NULL); +#line 12 "../src/line_area.vala" + g_return_if_fail (config != NULL); +#line 13 "../src/line_area.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 13 "../src/line_area.vala" + _tmp1_ = _tmp0_; +#line 13 "../src/line_area.vala" + if (_tmp1_) { +#line 89 "line_area.c" + LiveChartPoints* points = NULL; + LiveChartValues* _tmp2_; + LiveChartPoints* _tmp3_; + LiveChartPoints* _tmp4_; + gint _tmp5_; + gint _tmp6_; +#line 14 "../src/line_area.vala" + _tmp2_ = ((LiveChartSerieRenderer*) self)->values; +#line 14 "../src/line_area.vala" + _tmp3_ = live_chart_points_create (_tmp2_, config); +#line 14 "../src/line_area.vala" + points = _tmp3_; +#line 15 "../src/line_area.vala" + _tmp4_ = points; +#line 15 "../src/line_area.vala" + _tmp5_ = live_chart_points_get_size (_tmp4_); +#line 15 "../src/line_area.vala" + _tmp6_ = _tmp5_; +#line 15 "../src/line_area.vala" + if (_tmp6_ > 0) { +#line 110 "line_area.c" + LiveChartPoints* _tmp7_; + LiveChartPoints* _tmp8_; + LiveChartPoints* _tmp9_; + LiveChartArea* area = NULL; + LiveChartPoints* _tmp10_; + GdkRGBA _tmp11_ = {0}; + GdkRGBA _tmp12_; + gdouble _tmp13_; + LiveChartArea* _tmp14_; + LiveChartArea* _tmp15_; +#line 16 "../src/line_area.vala" + _tmp7_ = points; +#line 16 "../src/line_area.vala" + _tmp8_ = live_chart_line_draw_line ((LiveChartLine*) self, _tmp7_, ctx, config); +#line 16 "../src/line_area.vala" + _tmp9_ = _tmp8_; +#line 16 "../src/line_area.vala" + _g_object_unref0 (_tmp9_); +#line 17 "../src/line_area.vala" + cairo_stroke_preserve (ctx); +#line 19 "../src/line_area.vala" + _tmp10_ = points; +#line 19 "../src/line_area.vala" + live_chart_serie_renderer_get_main_color ((LiveChartSerieRenderer*) self, &_tmp11_); +#line 19 "../src/line_area.vala" + _tmp12_ = _tmp11_; +#line 19 "../src/line_area.vala" + _tmp13_ = self->priv->_area_alpha; +#line 19 "../src/line_area.vala" + _tmp14_ = live_chart_area_new (_tmp10_, &_tmp12_, _tmp13_); +#line 19 "../src/line_area.vala" + area = _tmp14_; +#line 20 "../src/line_area.vala" + _tmp15_ = area; +#line 20 "../src/line_area.vala" + live_chart_drawable_draw ((LiveChartDrawable*) _tmp15_, ctx, config); +#line 21 "../src/line_area.vala" + cairo_fill (ctx); +#line 15 "../src/line_area.vala" + _g_object_unref0 (area); +#line 151 "line_area.c" + } +#line 24 "../src/line_area.vala" + cairo_stroke (ctx); +#line 13 "../src/line_area.vala" + _g_object_unref0 (points); +#line 157 "line_area.c" + } +} + +gdouble +live_chart_line_area_get_area_alpha (LiveChartLineArea* self) +{ + gdouble result; +#line 6 "../src/line_area.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 6 "../src/line_area.vala" + result = self->priv->_area_alpha; +#line 6 "../src/line_area.vala" + return result; +#line 171 "line_area.c" +} + +void +live_chart_line_area_set_area_alpha (LiveChartLineArea* self, + gdouble value) +{ + gdouble old_value; +#line 6 "../src/line_area.vala" + g_return_if_fail (self != NULL); +#line 6 "../src/line_area.vala" + old_value = live_chart_line_area_get_area_alpha (self); +#line 6 "../src/line_area.vala" + if (old_value != value) { +#line 6 "../src/line_area.vala" + self->priv->_area_alpha = value; +#line 6 "../src/line_area.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_line_area_properties[LIVE_CHART_LINE_AREA_AREA_ALPHA_PROPERTY]); +#line 189 "line_area.c" + } +} + +static void +live_chart_line_area_class_init (LiveChartLineAreaClass * klass, + gpointer klass_data) +{ +#line 4 "../src/line_area.vala" + live_chart_line_area_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/line_area.vala" + g_type_class_adjust_private_offset (klass, &LiveChartLineArea_private_offset); +#line 4 "../src/line_area.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_line_area_real_draw; +#line 4 "../src/line_area.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_line_area_get_property; +#line 4 "../src/line_area.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_line_area_set_property; +#line 4 "../src/line_area.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_line_area_finalize; +#line 4 "../src/line_area.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_LINE_AREA_AREA_ALPHA_PROPERTY, live_chart_line_area_properties[LIVE_CHART_LINE_AREA_AREA_ALPHA_PROPERTY] = g_param_spec_double ("area-alpha", "area-alpha", "area-alpha", -G_MAXDOUBLE, G_MAXDOUBLE, 0.1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 211 "line_area.c" +} + +static void +live_chart_line_area_instance_init (LiveChartLineArea * self, + gpointer klass) +{ +#line 4 "../src/line_area.vala" + self->priv = live_chart_line_area_get_instance_private (self); +#line 6 "../src/line_area.vala" + self->priv->_area_alpha = 0.1; +#line 222 "line_area.c" +} + +static void +live_chart_line_area_finalize (GObject * obj) +{ + LiveChartLineArea * self; +#line 4 "../src/line_area.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_LINE_AREA, LiveChartLineArea); +#line 4 "../src/line_area.vala" + G_OBJECT_CLASS (live_chart_line_area_parent_class)->finalize (obj); +#line 233 "line_area.c" +} + +static GType +live_chart_line_area_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartLineAreaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_line_area_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartLineArea), 0, (GInstanceInitFunc) live_chart_line_area_instance_init, NULL }; + GType live_chart_line_area_type_id; + live_chart_line_area_type_id = g_type_register_static (LIVE_CHART_TYPE_LINE, "LiveChartLineArea", &g_define_type_info, 0); + LiveChartLineArea_private_offset = g_type_add_instance_private (live_chart_line_area_type_id, sizeof (LiveChartLineAreaPrivate)); + return live_chart_line_area_type_id; +} + +GType +live_chart_line_area_get_type (void) +{ + static volatile gsize live_chart_line_area_type_id__once = 0; + if (g_once_init_enter (&live_chart_line_area_type_id__once)) { + GType live_chart_line_area_type_id; + live_chart_line_area_type_id = live_chart_line_area_get_type_once (); + g_once_init_leave (&live_chart_line_area_type_id__once, live_chart_line_area_type_id); + } + return live_chart_line_area_type_id__once; +} + +static void +_vala_live_chart_line_area_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartLineArea * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_LINE_AREA, LiveChartLineArea); +#line 4 "../src/line_area.vala" + switch (property_id) { +#line 4 "../src/line_area.vala" + case LIVE_CHART_LINE_AREA_AREA_ALPHA_PROPERTY: +#line 4 "../src/line_area.vala" + g_value_set_double (value, live_chart_line_area_get_area_alpha (self)); +#line 4 "../src/line_area.vala" + break; +#line 274 "line_area.c" + default: +#line 4 "../src/line_area.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/line_area.vala" + break; +#line 280 "line_area.c" + } +} + +static void +_vala_live_chart_line_area_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartLineArea * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_LINE_AREA, LiveChartLineArea); +#line 4 "../src/line_area.vala" + switch (property_id) { +#line 4 "../src/line_area.vala" + case LIVE_CHART_LINE_AREA_AREA_ALPHA_PROPERTY: +#line 4 "../src/line_area.vala" + live_chart_line_area_set_area_alpha (self, g_value_get_double (value)); +#line 4 "../src/line_area.vala" + break; +#line 300 "line_area.c" + default: +#line 4 "../src/line_area.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/line_area.vala" + break; +#line 306 "line_area.c" + } +} + diff --git a/iPDC/lib/liblivechart_static.a.p/max_bound_line.c b/iPDC/lib/liblivechart_static.a.p/max_bound_line.c new file mode 100644 index 0000000..75e31fa --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/max_bound_line.c @@ -0,0 +1,249 @@ +/* max_bound_line.c generated by valac 0.56.0, the Vala compiler + * generated from max_bound_line.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_MAX_BOUND_LINE_0_PROPERTY, + LIVE_CHART_MAX_BOUND_LINE_NUM_PROPERTIES +}; +static GParamSpec* live_chart_max_bound_line_properties[LIVE_CHART_MAX_BOUND_LINE_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +static gpointer live_chart_max_bound_line_parent_class = NULL; + +static void live_chart_max_bound_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static GType live_chart_max_bound_line_get_type_once (void); + +LiveChartMaxBoundLine* +live_chart_max_bound_line_construct (GType object_type) +{ + LiveChartMaxBoundLine * self = NULL; + LiveChartValues* _tmp0_; +#line 8 "../src/max_bound_line.vala" + self = (LiveChartMaxBoundLine*) live_chart_serie_renderer_construct (object_type); +#line 9 "../src/max_bound_line.vala" + _tmp0_ = live_chart_values_new (1000); +#line 9 "../src/max_bound_line.vala" + _g_object_unref0 (((LiveChartSerieRenderer*) self)->values); +#line 9 "../src/max_bound_line.vala" + ((LiveChartSerieRenderer*) self)->values = _tmp0_; +#line 7 "../src/max_bound_line.vala" + return self; +#line 42 "max_bound_line.c" +} + +LiveChartMaxBoundLine* +live_chart_max_bound_line_new (void) +{ +#line 7 "../src/max_bound_line.vala" + return live_chart_max_bound_line_construct (LIVE_CHART_TYPE_MAX_BOUND_LINE); +#line 50 "max_bound_line.c" +} + +LiveChartMaxBoundLine* +live_chart_max_bound_line_construct_from_serie (GType object_type, + LiveChartSerie* serie) +{ + LiveChartMaxBoundLine * self = NULL; + LiveChartValues* _tmp0_; +#line 12 "../src/max_bound_line.vala" + g_return_val_if_fail (serie != NULL, NULL); +#line 12 "../src/max_bound_line.vala" + self = (LiveChartMaxBoundLine*) live_chart_serie_renderer_construct (object_type); +#line 13 "../src/max_bound_line.vala" + _tmp0_ = live_chart_serie_get_values (serie); +#line 13 "../src/max_bound_line.vala" + _g_object_unref0 (((LiveChartSerieRenderer*) self)->values); +#line 13 "../src/max_bound_line.vala" + ((LiveChartSerieRenderer*) self)->values = _tmp0_; +#line 12 "../src/max_bound_line.vala" + return self; +#line 71 "max_bound_line.c" +} + +LiveChartMaxBoundLine* +live_chart_max_bound_line_new_from_serie (LiveChartSerie* serie) +{ +#line 12 "../src/max_bound_line.vala" + return live_chart_max_bound_line_construct_from_serie (LIVE_CHART_TYPE_MAX_BOUND_LINE, serie); +#line 79 "max_bound_line.c" +} + +static void +live_chart_max_bound_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartMaxBoundLine * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 16 "../src/max_bound_line.vala" + self = (LiveChartMaxBoundLine*) base; +#line 16 "../src/max_bound_line.vala" + g_return_if_fail (ctx != NULL); +#line 16 "../src/max_bound_line.vala" + g_return_if_fail (config != NULL); +#line 17 "../src/max_bound_line.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 17 "../src/max_bound_line.vala" + _tmp1_ = _tmp0_; +#line 17 "../src/max_bound_line.vala" + if (_tmp1_) { +#line 102 "max_bound_line.c" + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp2_ = {0}; + gdouble _tmp3_ = 0.0; + LiveChartValues* _tmp4_; + gint _tmp5_; + gint _tmp6_; + gdouble y = 0.0; + LiveChartPath* _tmp19_; + LiveChartPath* _tmp20_; + LiveChartBoundaries _tmp21_; + LiveChartBoundary _tmp22_; + LiveChartBoundaries _tmp23_; + LiveChartBoundary _tmp24_; + LiveChartBoundaries _tmp25_; + LiveChartBoundary _tmp26_; + LiveChartBoundaries _tmp27_; + LiveChartBoundary _tmp28_; +#line 18 "../src/max_bound_line.vala" + live_chart_config_boundaries (config, &_tmp2_); +#line 18 "../src/max_bound_line.vala" + boundaries = _tmp2_; +#line 19 "../src/max_bound_line.vala" + _tmp4_ = ((LiveChartSerieRenderer*) self)->values; +#line 19 "../src/max_bound_line.vala" + _tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_); +#line 19 "../src/max_bound_line.vala" + _tmp6_ = _tmp5_; +#line 19 "../src/max_bound_line.vala" + if (_tmp6_ == 0) { +#line 132 "max_bound_line.c" + LiveChartYAxis* _tmp7_; + LiveChartBounds* _tmp8_; + LiveChartBounds* _tmp9_; + gdouble _tmp10_; + gdouble _tmp11_; + LiveChartYAxis* _tmp12_; +#line 19 "../src/max_bound_line.vala" + _tmp7_ = config->y_axis; +#line 19 "../src/max_bound_line.vala" + _tmp8_ = live_chart_yaxis_get_bounds (_tmp7_); +#line 19 "../src/max_bound_line.vala" + _tmp9_ = _tmp8_; +#line 19 "../src/max_bound_line.vala" + _tmp10_ = live_chart_bounds_get_upper (_tmp9_); +#line 19 "../src/max_bound_line.vala" + _tmp11_ = _tmp10_; +#line 19 "../src/max_bound_line.vala" + _tmp12_ = config->y_axis; +#line 19 "../src/max_bound_line.vala" + _tmp3_ = _tmp11_ * live_chart_yaxis_get_ratio (_tmp12_); +#line 19 "../src/max_bound_line.vala" + _g_object_unref0 (_tmp9_); +#line 155 "max_bound_line.c" + } else { + LiveChartValues* _tmp13_; + LiveChartBounds* _tmp14_; + LiveChartBounds* _tmp15_; + gdouble _tmp16_; + gdouble _tmp17_; + LiveChartYAxis* _tmp18_; +#line 19 "../src/max_bound_line.vala" + _tmp13_ = ((LiveChartSerieRenderer*) self)->values; +#line 19 "../src/max_bound_line.vala" + _tmp14_ = live_chart_values_get_bounds (_tmp13_); +#line 19 "../src/max_bound_line.vala" + _tmp15_ = _tmp14_; +#line 19 "../src/max_bound_line.vala" + _tmp16_ = live_chart_bounds_get_upper (_tmp15_); +#line 19 "../src/max_bound_line.vala" + _tmp17_ = _tmp16_; +#line 19 "../src/max_bound_line.vala" + _tmp18_ = config->y_axis; +#line 19 "../src/max_bound_line.vala" + _tmp3_ = _tmp17_ * live_chart_yaxis_get_ratio (_tmp18_); +#line 177 "max_bound_line.c" + } +#line 19 "../src/max_bound_line.vala" + y = _tmp3_; +#line 20 "../src/max_bound_line.vala" + _tmp19_ = live_chart_serie_renderer_get_line ((LiveChartSerieRenderer*) self); +#line 20 "../src/max_bound_line.vala" + _tmp20_ = _tmp19_; +#line 20 "../src/max_bound_line.vala" + live_chart_path_configure (_tmp20_, ctx); +#line 21 "../src/max_bound_line.vala" + _tmp21_ = boundaries; +#line 21 "../src/max_bound_line.vala" + _tmp22_ = _tmp21_.x; +#line 21 "../src/max_bound_line.vala" + _tmp23_ = boundaries; +#line 21 "../src/max_bound_line.vala" + _tmp24_ = _tmp23_.y; +#line 21 "../src/max_bound_line.vala" + cairo_move_to (ctx, (gdouble) _tmp22_.min, _tmp24_.max - y); +#line 22 "../src/max_bound_line.vala" + _tmp25_ = boundaries; +#line 22 "../src/max_bound_line.vala" + _tmp26_ = _tmp25_.x; +#line 22 "../src/max_bound_line.vala" + _tmp27_ = boundaries; +#line 22 "../src/max_bound_line.vala" + _tmp28_ = _tmp27_.y; +#line 22 "../src/max_bound_line.vala" + cairo_line_to (ctx, (gdouble) _tmp26_.max, _tmp28_.max - y); +#line 23 "../src/max_bound_line.vala" + cairo_stroke (ctx); +#line 209 "max_bound_line.c" + } +} + +static void +live_chart_max_bound_line_class_init (LiveChartMaxBoundLineClass * klass, + gpointer klass_data) +{ +#line 5 "../src/max_bound_line.vala" + live_chart_max_bound_line_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/max_bound_line.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_max_bound_line_real_draw; +#line 221 "max_bound_line.c" +} + +static void +live_chart_max_bound_line_instance_init (LiveChartMaxBoundLine * self, + gpointer klass) +{ +} + +static GType +live_chart_max_bound_line_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartMaxBoundLineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_max_bound_line_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartMaxBoundLine), 0, (GInstanceInitFunc) live_chart_max_bound_line_instance_init, NULL }; + GType live_chart_max_bound_line_type_id; + live_chart_max_bound_line_type_id = g_type_register_static (LIVE_CHART_TYPE_SERIE_RENDERER, "LiveChartMaxBoundLine", &g_define_type_info, 0); + return live_chart_max_bound_line_type_id; +} + +GType +live_chart_max_bound_line_get_type (void) +{ + static volatile gsize live_chart_max_bound_line_type_id__once = 0; + if (g_once_init_enter (&live_chart_max_bound_line_type_id__once)) { + GType live_chart_max_bound_line_type_id; + live_chart_max_bound_line_type_id = live_chart_max_bound_line_get_type_once (); + g_once_init_leave (&live_chart_max_bound_line_type_id__once, live_chart_max_bound_line_type_id); + } + return live_chart_max_bound_line_type_id__once; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/min_bound_line.c b/iPDC/lib/liblivechart_static.a.p/min_bound_line.c new file mode 100644 index 0000000..cf122f9 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/min_bound_line.c @@ -0,0 +1,260 @@ +/* min_bound_line.c generated by valac 0.56.0, the Vala compiler + * generated from min_bound_line.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_MIN_BOUND_LINE_0_PROPERTY, + LIVE_CHART_MIN_BOUND_LINE_NUM_PROPERTIES +}; +static GParamSpec* live_chart_min_bound_line_properties[LIVE_CHART_MIN_BOUND_LINE_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +static gpointer live_chart_min_bound_line_parent_class = NULL; + +static void live_chart_min_bound_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static GType live_chart_min_bound_line_get_type_once (void); + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 9 "../src/min_bound_line.vala" + return self ? g_object_ref (self) : NULL; +#line 32 "min_bound_line.c" +} + +LiveChartMinBoundLine* +live_chart_min_bound_line_construct (GType object_type, + LiveChartValues* values) +{ + LiveChartMinBoundLine * self = NULL; + LiveChartValues* _tmp0_; +#line 7 "../src/min_bound_line.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 8 "../src/min_bound_line.vala" + self = (LiveChartMinBoundLine*) live_chart_serie_renderer_construct (object_type); +#line 9 "../src/min_bound_line.vala" + _tmp0_ = _g_object_ref0 (values); +#line 9 "../src/min_bound_line.vala" + _g_object_unref0 (((LiveChartSerieRenderer*) self)->values); +#line 9 "../src/min_bound_line.vala" + ((LiveChartSerieRenderer*) self)->values = _tmp0_; +#line 7 "../src/min_bound_line.vala" + return self; +#line 53 "min_bound_line.c" +} + +LiveChartMinBoundLine* +live_chart_min_bound_line_new (LiveChartValues* values) +{ +#line 7 "../src/min_bound_line.vala" + return live_chart_min_bound_line_construct (LIVE_CHART_TYPE_MIN_BOUND_LINE, values); +#line 61 "min_bound_line.c" +} + +LiveChartMinBoundLine* +live_chart_min_bound_line_construct_from_serie (GType object_type, + LiveChartSerie* serie) +{ + LiveChartMinBoundLine * self = NULL; + LiveChartValues* _tmp0_; +#line 12 "../src/min_bound_line.vala" + g_return_val_if_fail (serie != NULL, NULL); +#line 12 "../src/min_bound_line.vala" + self = (LiveChartMinBoundLine*) live_chart_serie_renderer_construct (object_type); +#line 13 "../src/min_bound_line.vala" + _tmp0_ = live_chart_serie_get_values (serie); +#line 13 "../src/min_bound_line.vala" + _g_object_unref0 (((LiveChartSerieRenderer*) self)->values); +#line 13 "../src/min_bound_line.vala" + ((LiveChartSerieRenderer*) self)->values = _tmp0_; +#line 12 "../src/min_bound_line.vala" + return self; +#line 82 "min_bound_line.c" +} + +LiveChartMinBoundLine* +live_chart_min_bound_line_new_from_serie (LiveChartSerie* serie) +{ +#line 12 "../src/min_bound_line.vala" + return live_chart_min_bound_line_construct_from_serie (LIVE_CHART_TYPE_MIN_BOUND_LINE, serie); +#line 90 "min_bound_line.c" +} + +static void +live_chart_min_bound_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartMinBoundLine * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 16 "../src/min_bound_line.vala" + self = (LiveChartMinBoundLine*) base; +#line 16 "../src/min_bound_line.vala" + g_return_if_fail (ctx != NULL); +#line 16 "../src/min_bound_line.vala" + g_return_if_fail (config != NULL); +#line 17 "../src/min_bound_line.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 17 "../src/min_bound_line.vala" + _tmp1_ = _tmp0_; +#line 17 "../src/min_bound_line.vala" + if (_tmp1_) { +#line 113 "min_bound_line.c" + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp2_ = {0}; + gdouble _tmp3_ = 0.0; + LiveChartValues* _tmp4_; + gint _tmp5_; + gint _tmp6_; + gdouble y = 0.0; + LiveChartPath* _tmp19_; + LiveChartPath* _tmp20_; + LiveChartBoundaries _tmp21_; + LiveChartBoundary _tmp22_; + LiveChartBoundaries _tmp23_; + LiveChartBoundary _tmp24_; + LiveChartBoundaries _tmp25_; + LiveChartBoundary _tmp26_; + LiveChartBoundaries _tmp27_; + LiveChartBoundary _tmp28_; +#line 18 "../src/min_bound_line.vala" + live_chart_config_boundaries (config, &_tmp2_); +#line 18 "../src/min_bound_line.vala" + boundaries = _tmp2_; +#line 19 "../src/min_bound_line.vala" + _tmp4_ = ((LiveChartSerieRenderer*) self)->values; +#line 19 "../src/min_bound_line.vala" + _tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_); +#line 19 "../src/min_bound_line.vala" + _tmp6_ = _tmp5_; +#line 19 "../src/min_bound_line.vala" + if (_tmp6_ == 0) { +#line 143 "min_bound_line.c" + LiveChartYAxis* _tmp7_; + LiveChartBounds* _tmp8_; + LiveChartBounds* _tmp9_; + gdouble _tmp10_; + gdouble _tmp11_; + LiveChartYAxis* _tmp12_; +#line 19 "../src/min_bound_line.vala" + _tmp7_ = config->y_axis; +#line 19 "../src/min_bound_line.vala" + _tmp8_ = live_chart_yaxis_get_bounds (_tmp7_); +#line 19 "../src/min_bound_line.vala" + _tmp9_ = _tmp8_; +#line 19 "../src/min_bound_line.vala" + _tmp10_ = live_chart_bounds_get_lower (_tmp9_); +#line 19 "../src/min_bound_line.vala" + _tmp11_ = _tmp10_; +#line 19 "../src/min_bound_line.vala" + _tmp12_ = config->y_axis; +#line 19 "../src/min_bound_line.vala" + _tmp3_ = _tmp11_ * live_chart_yaxis_get_ratio (_tmp12_); +#line 19 "../src/min_bound_line.vala" + _g_object_unref0 (_tmp9_); +#line 166 "min_bound_line.c" + } else { + LiveChartValues* _tmp13_; + LiveChartBounds* _tmp14_; + LiveChartBounds* _tmp15_; + gdouble _tmp16_; + gdouble _tmp17_; + LiveChartYAxis* _tmp18_; +#line 19 "../src/min_bound_line.vala" + _tmp13_ = ((LiveChartSerieRenderer*) self)->values; +#line 19 "../src/min_bound_line.vala" + _tmp14_ = live_chart_values_get_bounds (_tmp13_); +#line 19 "../src/min_bound_line.vala" + _tmp15_ = _tmp14_; +#line 19 "../src/min_bound_line.vala" + _tmp16_ = live_chart_bounds_get_lower (_tmp15_); +#line 19 "../src/min_bound_line.vala" + _tmp17_ = _tmp16_; +#line 19 "../src/min_bound_line.vala" + _tmp18_ = config->y_axis; +#line 19 "../src/min_bound_line.vala" + _tmp3_ = _tmp17_ * live_chart_yaxis_get_ratio (_tmp18_); +#line 188 "min_bound_line.c" + } +#line 19 "../src/min_bound_line.vala" + y = _tmp3_; +#line 20 "../src/min_bound_line.vala" + _tmp19_ = live_chart_serie_renderer_get_line ((LiveChartSerieRenderer*) self); +#line 20 "../src/min_bound_line.vala" + _tmp20_ = _tmp19_; +#line 20 "../src/min_bound_line.vala" + live_chart_path_configure (_tmp20_, ctx); +#line 21 "../src/min_bound_line.vala" + _tmp21_ = boundaries; +#line 21 "../src/min_bound_line.vala" + _tmp22_ = _tmp21_.x; +#line 21 "../src/min_bound_line.vala" + _tmp23_ = boundaries; +#line 21 "../src/min_bound_line.vala" + _tmp24_ = _tmp23_.y; +#line 21 "../src/min_bound_line.vala" + cairo_move_to (ctx, (gdouble) _tmp22_.min, _tmp24_.max - y); +#line 22 "../src/min_bound_line.vala" + _tmp25_ = boundaries; +#line 22 "../src/min_bound_line.vala" + _tmp26_ = _tmp25_.x; +#line 22 "../src/min_bound_line.vala" + _tmp27_ = boundaries; +#line 22 "../src/min_bound_line.vala" + _tmp28_ = _tmp27_.y; +#line 22 "../src/min_bound_line.vala" + cairo_line_to (ctx, (gdouble) _tmp26_.max, _tmp28_.max - y); +#line 23 "../src/min_bound_line.vala" + cairo_stroke (ctx); +#line 220 "min_bound_line.c" + } +} + +static void +live_chart_min_bound_line_class_init (LiveChartMinBoundLineClass * klass, + gpointer klass_data) +{ +#line 5 "../src/min_bound_line.vala" + live_chart_min_bound_line_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/min_bound_line.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_min_bound_line_real_draw; +#line 232 "min_bound_line.c" +} + +static void +live_chart_min_bound_line_instance_init (LiveChartMinBoundLine * self, + gpointer klass) +{ +} + +static GType +live_chart_min_bound_line_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartMinBoundLineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_min_bound_line_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartMinBoundLine), 0, (GInstanceInitFunc) live_chart_min_bound_line_instance_init, NULL }; + GType live_chart_min_bound_line_type_id; + live_chart_min_bound_line_type_id = g_type_register_static (LIVE_CHART_TYPE_SERIE_RENDERER, "LiveChartMinBoundLine", &g_define_type_info, 0); + return live_chart_min_bound_line_type_id; +} + +GType +live_chart_min_bound_line_get_type (void) +{ + static volatile gsize live_chart_min_bound_line_type_id__once = 0; + if (g_once_init_enter (&live_chart_min_bound_line_type_id__once)) { + GType live_chart_min_bound_line_type_id; + live_chart_min_bound_line_type_id = live_chart_min_bound_line_get_type_once (); + g_once_init_leave (&live_chart_min_bound_line_type_id__once, live_chart_min_bound_line_type_id); + } + return live_chart_min_bound_line_type_id__once; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/path.c b/iPDC/lib/liblivechart_static.a.p/path.c new file mode 100644 index 0000000..2c2523f --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/path.c @@ -0,0 +1,586 @@ +/* path.c generated by valac 0.56.0, the Vala compiler + * generated from path.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_PATH_0_PROPERTY, + LIVE_CHART_PATH_WIDTH_PROPERTY, + LIVE_CHART_PATH_COLOR_PROPERTY, + LIVE_CHART_PATH_VISIBLE_PROPERTY, + LIVE_CHART_PATH_NUM_PROPERTIES +}; +static GParamSpec* live_chart_path_properties[LIVE_CHART_PATH_NUM_PROPERTIES]; +#define _live_chart_dash_free0(var) ((var == NULL) ? NULL : (var = (live_chart_dash_free (var), NULL))) + +struct _LiveChartPathPrivate { + gdouble _width; + GdkRGBA _color; + gboolean _visible; +}; + +static gint LiveChartPath_private_offset; +static gpointer live_chart_path_parent_class = NULL; + +static gdouble* _vala_array_dup1 (gdouble* self, + gssize length); +static gboolean _gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2); +static void live_chart_path_finalize (GObject * obj); +static GType live_chart_path_get_type_once (void); +static void _vala_live_chart_path_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_path_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +void +live_chart_dash_init (LiveChartDash *self) +{ +#line 8 "../src/path.vala" + memset (self, 0, sizeof (LiveChartDash)); +#line 9 "../src/path.vala" + (*self).offset = (gdouble) 0; +#line 57 "path.c" +} + +static gdouble* +_vala_array_dup1 (gdouble* self, + gssize length) +{ +#line 5 "../src/path.vala" + if (length > 0) { +#line 5 "../src/path.vala" + return _vala_memdup2 (self, length * sizeof (gdouble)); +#line 68 "path.c" + } +#line 5 "../src/path.vala" + return NULL; +#line 72 "path.c" +} + +void +live_chart_dash_copy (const LiveChartDash* self, + LiveChartDash* dest) +{ + gdouble* _tmp0_; + gint _tmp0__length1; + gdouble* _tmp1_; + gint _tmp1__length1; +#line 5 "../src/path.vala" + _tmp0_ = (*self).dashes; +#line 5 "../src/path.vala" + _tmp0__length1 = (*self).dashes_length1; +#line 5 "../src/path.vala" + _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup1 (_tmp0_, _tmp0__length1) : _tmp0_; +#line 5 "../src/path.vala" + _tmp1__length1 = _tmp0__length1; +#line 5 "../src/path.vala" + (*dest).dashes = (g_free ((*dest).dashes), NULL); +#line 5 "../src/path.vala" + (*dest).dashes = _tmp1_; +#line 5 "../src/path.vala" + (*dest).dashes_length1 = _tmp1__length1; +#line 5 "../src/path.vala" + (*dest).offset = (*self).offset; +#line 99 "path.c" +} + +void +live_chart_dash_destroy (LiveChartDash* self) +{ +#line 6 "../src/path.vala" + (*self).dashes = (g_free ((*self).dashes), NULL); +#line 107 "path.c" +} + +LiveChartDash* +live_chart_dash_dup (const LiveChartDash* self) +{ + LiveChartDash* dup; +#line 5 "../src/path.vala" + dup = g_new0 (LiveChartDash, 1); +#line 5 "../src/path.vala" + live_chart_dash_copy (self, dup); +#line 5 "../src/path.vala" + return dup; +#line 120 "path.c" +} + +void +live_chart_dash_free (LiveChartDash* self) +{ +#line 5 "../src/path.vala" + live_chart_dash_destroy (self); +#line 5 "../src/path.vala" + g_free (self); +#line 130 "path.c" +} + +static GType +live_chart_dash_get_type_once (void) +{ + GType live_chart_dash_type_id; + live_chart_dash_type_id = g_boxed_type_register_static ("LiveChartDash", (GBoxedCopyFunc) live_chart_dash_dup, (GBoxedFreeFunc) live_chart_dash_free); + return live_chart_dash_type_id; +} + +GType +live_chart_dash_get_type (void) +{ + static volatile gsize live_chart_dash_type_id__once = 0; + if (g_once_init_enter (&live_chart_dash_type_id__once)) { + GType live_chart_dash_type_id; + live_chart_dash_type_id = live_chart_dash_get_type_once (); + g_once_init_leave (&live_chart_dash_type_id__once, live_chart_dash_type_id); + } + return live_chart_dash_type_id__once; +} + +static inline gpointer +live_chart_path_get_instance_private (LiveChartPath* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartPath_private_offset); +} + +static gpointer +_live_chart_dash_dup0 (gpointer self) +{ +#line 23 "../src/path.vala" + return self ? live_chart_dash_dup (self) : NULL; +#line 164 "path.c" +} + +LiveChartPath* +live_chart_path_construct (GType object_type, + gdouble width, + GdkRGBA* color, + gboolean visible, + LiveChartDash* dash) +{ + LiveChartPath * self = NULL; + GdkRGBA _tmp0_; + LiveChartDash* _tmp1_; +#line 19 "../src/path.vala" + g_return_val_if_fail (color != NULL, NULL); +#line 19 "../src/path.vala" + self = (LiveChartPath*) g_object_new (object_type, NULL); +#line 20 "../src/path.vala" + live_chart_path_set_width (self, width); +#line 21 "../src/path.vala" + _tmp0_ = *color; +#line 21 "../src/path.vala" + live_chart_path_set_color (self, &_tmp0_); +#line 22 "../src/path.vala" + live_chart_path_set_visible (self, TRUE); +#line 23 "../src/path.vala" + _tmp1_ = _live_chart_dash_dup0 (dash); +#line 23 "../src/path.vala" + _live_chart_dash_free0 (self->dash); +#line 23 "../src/path.vala" + self->dash = _tmp1_; +#line 19 "../src/path.vala" + return self; +#line 197 "path.c" +} + +LiveChartPath* +live_chart_path_new (gdouble width, + GdkRGBA* color, + gboolean visible, + LiveChartDash* dash) +{ +#line 19 "../src/path.vala" + return live_chart_path_construct (LIVE_CHART_TYPE_PATH, width, color, visible, dash); +#line 208 "path.c" +} + +void +live_chart_path_configure (LiveChartPath* self, + cairo_t* ctx) +{ + gboolean _tmp0_; +#line 26 "../src/path.vala" + g_return_if_fail (self != NULL); +#line 26 "../src/path.vala" + g_return_if_fail (ctx != NULL); +#line 27 "../src/path.vala" + _tmp0_ = self->priv->_visible; +#line 27 "../src/path.vala" + if (_tmp0_) { +#line 224 "path.c" + LiveChartDash* _tmp1_; + GdkRGBA _tmp5_; + GdkRGBA _tmp6_; + GdkRGBA _tmp7_; + GdkRGBA _tmp8_; + gdouble _tmp9_; +#line 28 "../src/path.vala" + _tmp1_ = self->dash; +#line 28 "../src/path.vala" + if (_tmp1_ != NULL) { +#line 235 "path.c" + LiveChartDash* _tmp2_; + gdouble* _tmp3_; + gint _tmp3__length1; + LiveChartDash* _tmp4_; +#line 29 "../src/path.vala" + _tmp2_ = self->dash; +#line 29 "../src/path.vala" + _tmp3_ = (*_tmp2_).dashes; +#line 29 "../src/path.vala" + _tmp3__length1 = (*_tmp2_).dashes_length1; +#line 29 "../src/path.vala" + _tmp4_ = self->dash; +#line 29 "../src/path.vala" + cairo_set_dash (ctx, _tmp3_, (gint) _tmp3__length1, (*_tmp4_).offset); +#line 250 "path.c" + } +#line 31 "../src/path.vala" + _tmp5_ = self->priv->_color; +#line 31 "../src/path.vala" + _tmp6_ = self->priv->_color; +#line 31 "../src/path.vala" + _tmp7_ = self->priv->_color; +#line 31 "../src/path.vala" + _tmp8_ = self->priv->_color; +#line 31 "../src/path.vala" + cairo_set_source_rgba (ctx, _tmp5_.red, _tmp6_.green, _tmp7_.blue, _tmp8_.alpha); +#line 32 "../src/path.vala" + _tmp9_ = self->priv->_width; +#line 32 "../src/path.vala" + cairo_set_line_width (ctx, _tmp9_); +#line 266 "path.c" + } +} + +gdouble +live_chart_path_get_width (LiveChartPath* self) +{ + gdouble result; +#line 14 "../src/path.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 14 "../src/path.vala" + result = self->priv->_width; +#line 14 "../src/path.vala" + return result; +#line 280 "path.c" +} + +void +live_chart_path_set_width (LiveChartPath* self, + gdouble value) +{ + gdouble old_value; +#line 14 "../src/path.vala" + g_return_if_fail (self != NULL); +#line 14 "../src/path.vala" + old_value = live_chart_path_get_width (self); +#line 14 "../src/path.vala" + if (old_value != value) { +#line 14 "../src/path.vala" + self->priv->_width = value; +#line 14 "../src/path.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_path_properties[LIVE_CHART_PATH_WIDTH_PROPERTY]); +#line 298 "path.c" + } +} + +void +live_chart_path_get_color (LiveChartPath* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 16 "../src/path.vala" + g_return_if_fail (self != NULL); +#line 16 "../src/path.vala" + _tmp0_ = self->priv->_color; +#line 16 "../src/path.vala" + *result = _tmp0_; +#line 16 "../src/path.vala" + return; +#line 315 "path.c" +} + +static gboolean +_gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2) +{ +#line 16 "../src/path.vala" + if (s1 == s2) { +#line 16 "../src/path.vala" + return TRUE; +#line 326 "path.c" + } +#line 16 "../src/path.vala" + if (s1 == NULL) { +#line 16 "../src/path.vala" + return FALSE; +#line 332 "path.c" + } +#line 16 "../src/path.vala" + if (s2 == NULL) { +#line 16 "../src/path.vala" + return FALSE; +#line 338 "path.c" + } +#line 16 "../src/path.vala" + if (s1->red != s2->red) { +#line 16 "../src/path.vala" + return FALSE; +#line 344 "path.c" + } +#line 16 "../src/path.vala" + if (s1->green != s2->green) { +#line 16 "../src/path.vala" + return FALSE; +#line 350 "path.c" + } +#line 16 "../src/path.vala" + if (s1->blue != s2->blue) { +#line 16 "../src/path.vala" + return FALSE; +#line 356 "path.c" + } +#line 16 "../src/path.vala" + if (s1->alpha != s2->alpha) { +#line 16 "../src/path.vala" + return FALSE; +#line 362 "path.c" + } +#line 16 "../src/path.vala" + return TRUE; +#line 366 "path.c" +} + +void +live_chart_path_set_color (LiveChartPath* self, + GdkRGBA * value) +{ + GdkRGBA old_value; +#line 16 "../src/path.vala" + g_return_if_fail (self != NULL); +#line 16 "../src/path.vala" + live_chart_path_get_color (self, &old_value); +#line 16 "../src/path.vala" + if (_gdk_rgba_equal (value, &old_value) != TRUE) { +#line 380 "path.c" + GdkRGBA _tmp0_; +#line 16 "../src/path.vala" + _tmp0_ = *value; +#line 16 "../src/path.vala" + self->priv->_color = _tmp0_; +#line 16 "../src/path.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_path_properties[LIVE_CHART_PATH_COLOR_PROPERTY]); +#line 388 "path.c" + } +} + +gboolean +live_chart_path_get_visible (LiveChartPath* self) +{ + gboolean result; +#line 17 "../src/path.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 17 "../src/path.vala" + result = self->priv->_visible; +#line 17 "../src/path.vala" + return result; +#line 402 "path.c" +} + +void +live_chart_path_set_visible (LiveChartPath* self, + gboolean value) +{ + gboolean old_value; +#line 17 "../src/path.vala" + g_return_if_fail (self != NULL); +#line 17 "../src/path.vala" + old_value = live_chart_path_get_visible (self); +#line 17 "../src/path.vala" + if (old_value != value) { +#line 17 "../src/path.vala" + self->priv->_visible = value; +#line 17 "../src/path.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_path_properties[LIVE_CHART_PATH_VISIBLE_PROPERTY]); +#line 420 "path.c" + } +} + +static void +live_chart_path_class_init (LiveChartPathClass * klass, + gpointer klass_data) +{ +#line 13 "../src/path.vala" + live_chart_path_parent_class = g_type_class_peek_parent (klass); +#line 13 "../src/path.vala" + g_type_class_adjust_private_offset (klass, &LiveChartPath_private_offset); +#line 13 "../src/path.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_path_get_property; +#line 13 "../src/path.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_path_set_property; +#line 13 "../src/path.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_path_finalize; +#line 13 "../src/path.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_PATH_WIDTH_PROPERTY, live_chart_path_properties[LIVE_CHART_PATH_WIDTH_PROPERTY] = g_param_spec_double ("width", "width", "width", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 13 "../src/path.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_PATH_COLOR_PROPERTY, live_chart_path_properties[LIVE_CHART_PATH_COLOR_PROPERTY] = g_param_spec_boxed ("color", "color", "color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 13 "../src/path.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_PATH_VISIBLE_PROPERTY, live_chart_path_properties[LIVE_CHART_PATH_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 444 "path.c" +} + +static void +live_chart_path_instance_init (LiveChartPath * self, + gpointer klass) +{ +#line 13 "../src/path.vala" + self->priv = live_chart_path_get_instance_private (self); +#line 453 "path.c" +} + +static void +live_chart_path_finalize (GObject * obj) +{ + LiveChartPath * self; +#line 13 "../src/path.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_PATH, LiveChartPath); +#line 15 "../src/path.vala" + _live_chart_dash_free0 (self->dash); +#line 13 "../src/path.vala" + G_OBJECT_CLASS (live_chart_path_parent_class)->finalize (obj); +#line 466 "path.c" +} + +static GType +live_chart_path_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartPathClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_path_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartPath), 0, (GInstanceInitFunc) live_chart_path_instance_init, NULL }; + GType live_chart_path_type_id; + live_chart_path_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartPath", &g_define_type_info, 0); + LiveChartPath_private_offset = g_type_add_instance_private (live_chart_path_type_id, sizeof (LiveChartPathPrivate)); + return live_chart_path_type_id; +} + +GType +live_chart_path_get_type (void) +{ + static volatile gsize live_chart_path_type_id__once = 0; + if (g_once_init_enter (&live_chart_path_type_id__once)) { + GType live_chart_path_type_id; + live_chart_path_type_id = live_chart_path_get_type_once (); + g_once_init_leave (&live_chart_path_type_id__once, live_chart_path_type_id); + } + return live_chart_path_type_id__once; +} + +static void +_vala_live_chart_path_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartPath * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_PATH, LiveChartPath); +#line 13 "../src/path.vala" + switch (property_id) { +#line 13 "../src/path.vala" + case LIVE_CHART_PATH_WIDTH_PROPERTY: +#line 13 "../src/path.vala" + g_value_set_double (value, live_chart_path_get_width (self)); +#line 13 "../src/path.vala" + break; +#line 13 "../src/path.vala" + case LIVE_CHART_PATH_COLOR_PROPERTY: +#line 509 "path.c" + { + GdkRGBA boxed; +#line 13 "../src/path.vala" + live_chart_path_get_color (self, &boxed); +#line 13 "../src/path.vala" + g_value_set_boxed (value, &boxed); +#line 516 "path.c" + } +#line 13 "../src/path.vala" + break; +#line 13 "../src/path.vala" + case LIVE_CHART_PATH_VISIBLE_PROPERTY: +#line 13 "../src/path.vala" + g_value_set_boolean (value, live_chart_path_get_visible (self)); +#line 13 "../src/path.vala" + break; +#line 526 "path.c" + default: +#line 13 "../src/path.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 13 "../src/path.vala" + break; +#line 532 "path.c" + } +} + +static void +_vala_live_chart_path_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartPath * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_PATH, LiveChartPath); +#line 13 "../src/path.vala" + switch (property_id) { +#line 13 "../src/path.vala" + case LIVE_CHART_PATH_WIDTH_PROPERTY: +#line 13 "../src/path.vala" + live_chart_path_set_width (self, g_value_get_double (value)); +#line 13 "../src/path.vala" + break; +#line 13 "../src/path.vala" + case LIVE_CHART_PATH_COLOR_PROPERTY: +#line 13 "../src/path.vala" + live_chart_path_set_color (self, g_value_get_boxed (value)); +#line 13 "../src/path.vala" + break; +#line 13 "../src/path.vala" + case LIVE_CHART_PATH_VISIBLE_PROPERTY: +#line 13 "../src/path.vala" + live_chart_path_set_visible (self, g_value_get_boolean (value)); +#line 13 "../src/path.vala" + break; +#line 564 "path.c" + default: +#line 13 "../src/path.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 13 "../src/path.vala" + break; +#line 570 "path.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/points.c b/iPDC/lib/liblivechart_static.a.p/points.c new file mode 100644 index 0000000..3ee0412 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/points.c @@ -0,0 +1,739 @@ +/* points.c generated by valac 0.56.0, the Vala compiler + * generated from points.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_POINTS_0_PROPERTY, + LIVE_CHART_POINTS_BOUNDS_PROPERTY, + LIVE_CHART_POINTS_SIZE_PROPERTY, + LIVE_CHART_POINTS_REALTIME_DELTA_PROPERTY, + LIVE_CHART_POINTS_NUM_PROPERTIES +}; +static GParamSpec* live_chart_points_properties[LIVE_CHART_POINTS_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _live_chart_point_free0(var) ((var == NULL) ? NULL : (var = (live_chart_point_free (var), NULL))) +#define _live_chart_timestamped_value_free0(var) ((var == NULL) ? NULL : (var = (live_chart_timestamped_value_free (var), NULL))) + +struct _LiveChartPointsPrivate { + GeeArrayList* points; + LiveChartBounds* _bounds; + gdouble _realtime_delta; +}; + +static gint LiveChartPoints_private_offset; +static gpointer live_chart_points_parent_class = NULL; + +static void live_chart_points_value_to_point (LiveChartTimestampedValue* last_value, + LiveChartTimestampedValue* current_value, + LiveChartConfig* config, + LiveChartBoundaries* boundaries, + gdouble realtime_delta, + LiveChartPoint* result); +static void live_chart_points_finalize (GObject * obj); +static GType live_chart_points_get_type_once (void); +static void _vala_live_chart_points_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_points_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +LiveChartPoint* +live_chart_point_dup (const LiveChartPoint* self) +{ + LiveChartPoint* dup; +#line 4 "../src/points.vala" + dup = g_new0 (LiveChartPoint, 1); +#line 4 "../src/points.vala" + memcpy (dup, self, sizeof (LiveChartPoint)); +#line 4 "../src/points.vala" + return dup; +#line 63 "points.c" +} + +void +live_chart_point_free (LiveChartPoint* self) +{ +#line 4 "../src/points.vala" + g_free (self); +#line 71 "points.c" +} + +static GType +live_chart_point_get_type_once (void) +{ + GType live_chart_point_type_id; + live_chart_point_type_id = g_boxed_type_register_static ("LiveChartPoint", (GBoxedCopyFunc) live_chart_point_dup, (GBoxedFreeFunc) live_chart_point_free); + return live_chart_point_type_id; +} + +GType +live_chart_point_get_type (void) +{ + static volatile gsize live_chart_point_type_id__once = 0; + if (g_once_init_enter (&live_chart_point_type_id__once)) { + GType live_chart_point_type_id; + live_chart_point_type_id = live_chart_point_get_type_once (); + g_once_init_leave (&live_chart_point_type_id__once, live_chart_point_type_id); + } + return live_chart_point_type_id__once; +} + +static inline gpointer +live_chart_points_get_instance_private (LiveChartPoints* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartPoints_private_offset); +} + +LiveChartPoints* +live_chart_points_construct (GType object_type) +{ + LiveChartPoints * self = NULL; + LiveChartBounds* _tmp0_; + LiveChartBounds* _tmp1_; +#line 17 "../src/points.vala" + self = (LiveChartPoints*) g_object_new (object_type, NULL); +#line 18 "../src/points.vala" + _tmp0_ = live_chart_bounds_new (((double) NAN), ((double) NAN)); +#line 18 "../src/points.vala" + _tmp1_ = _tmp0_; +#line 18 "../src/points.vala" + live_chart_points_set_bounds (self, _tmp1_); +#line 18 "../src/points.vala" + _g_object_unref0 (_tmp1_); +#line 17 "../src/points.vala" + return self; +#line 118 "points.c" +} + +LiveChartPoints* +live_chart_points_new (void) +{ +#line 17 "../src/points.vala" + return live_chart_points_construct (LIVE_CHART_TYPE_POINTS); +#line 126 "points.c" +} + +void +live_chart_points_add (LiveChartPoints* self, + LiveChartPoint* point) +{ + LiveChartBounds* _tmp0_; + LiveChartPoint _tmp1_; + GeeArrayList* _tmp2_; + LiveChartPoint _tmp3_; +#line 21 "../src/points.vala" + g_return_if_fail (self != NULL); +#line 21 "../src/points.vala" + g_return_if_fail (point != NULL); +#line 22 "../src/points.vala" + _tmp0_ = self->priv->_bounds; +#line 22 "../src/points.vala" + _tmp1_ = *point; +#line 22 "../src/points.vala" + live_chart_bounds_update (_tmp0_, _tmp1_.y); +#line 23 "../src/points.vala" + _tmp2_ = self->priv->points; +#line 23 "../src/points.vala" + _tmp3_ = *point; +#line 23 "../src/points.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, &_tmp3_); +#line 153 "points.c" +} + +void +live_chart_points_get (LiveChartPoints* self, + gint at, + LiveChartPoint* result) +{ + GeeArrayList* _tmp0_; + gpointer _tmp1_; + LiveChartPoint* _tmp2_; + LiveChartPoint _tmp3_; +#line 36 "../src/points.vala" + g_return_if_fail (self != NULL); +#line 37 "../src/points.vala" + _tmp0_ = self->priv->points; +#line 37 "../src/points.vala" + _tmp1_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, at); +#line 37 "../src/points.vala" + _tmp2_ = (LiveChartPoint*) _tmp1_; +#line 37 "../src/points.vala" + _tmp3_ = *_tmp2_; +#line 37 "../src/points.vala" + _live_chart_point_free0 (_tmp2_); +#line 37 "../src/points.vala" + *result = _tmp3_; +#line 37 "../src/points.vala" + return; +#line 181 "points.c" +} + +void +live_chart_points_after (LiveChartPoints* self, + gint at, + LiveChartPoint* result) +{ + gint _tmp0_; + gint _tmp1_; + LiveChartPoint _tmp5_ = {0}; +#line 40 "../src/points.vala" + g_return_if_fail (self != NULL); +#line 41 "../src/points.vala" + _tmp0_ = live_chart_points_get_size (self); +#line 41 "../src/points.vala" + _tmp1_ = _tmp0_; +#line 41 "../src/points.vala" + if ((at + 1) >= _tmp1_) { +#line 200 "points.c" + gint _tmp2_; + gint _tmp3_; + LiveChartPoint _tmp4_ = {0}; +#line 41 "../src/points.vala" + _tmp2_ = live_chart_points_get_size (self); +#line 41 "../src/points.vala" + _tmp3_ = _tmp2_; +#line 41 "../src/points.vala" + live_chart_points_get (self, _tmp3_ - 1, &_tmp4_); +#line 41 "../src/points.vala" + *result = _tmp4_; +#line 41 "../src/points.vala" + return; +#line 214 "points.c" + } +#line 42 "../src/points.vala" + live_chart_points_get (self, at + 1, &_tmp5_); +#line 42 "../src/points.vala" + *result = _tmp5_; +#line 42 "../src/points.vala" + return; +#line 222 "points.c" +} + +void +live_chart_points_first (LiveChartPoints* self, + LiveChartPoint* result) +{ + LiveChartPoint _tmp0_ = {0}; +#line 45 "../src/points.vala" + g_return_if_fail (self != NULL); +#line 46 "../src/points.vala" + live_chart_points_get (self, 0, &_tmp0_); +#line 46 "../src/points.vala" + *result = _tmp0_; +#line 46 "../src/points.vala" + return; +#line 238 "points.c" +} + +void +live_chart_points_last (LiveChartPoints* self, + LiveChartPoint* result) +{ + gint _tmp0_; + gint _tmp1_; + LiveChartPoint _tmp2_ = {0}; +#line 49 "../src/points.vala" + g_return_if_fail (self != NULL); +#line 50 "../src/points.vala" + _tmp0_ = live_chart_points_get_size (self); +#line 50 "../src/points.vala" + _tmp1_ = _tmp0_; +#line 50 "../src/points.vala" + live_chart_points_get (self, _tmp1_ - 1, &_tmp2_); +#line 50 "../src/points.vala" + *result = _tmp2_; +#line 50 "../src/points.vala" + return; +#line 260 "points.c" +} + +LiveChartPoints* +live_chart_points_create (LiveChartValues* values, + LiveChartConfig* config) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; + LiveChartPoints* points = NULL; + LiveChartPoints* _tmp1_; + gint _tmp2_; + gint _tmp3_; + LiveChartPoints* result; +#line 53 "../src/points.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 53 "../src/points.vala" + g_return_val_if_fail (config != NULL, NULL); +#line 54 "../src/points.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 54 "../src/points.vala" + boundaries = _tmp0_; +#line 56 "../src/points.vala" + _tmp1_ = live_chart_points_new (); +#line 56 "../src/points.vala" + points = _tmp1_; +#line 57 "../src/points.vala" + _tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) values); +#line 57 "../src/points.vala" + _tmp3_ = _tmp2_; +#line 57 "../src/points.vala" + if (_tmp3_ > 0) { +#line 292 "points.c" + LiveChartTimestampedValue* last_value = NULL; + gpointer _tmp4_; + LiveChartPoints* _tmp5_; + LiveChartTimestampedValue* _tmp6_; + LiveChartXAxis* _tmp7_; +#line 58 "../src/points.vala" + _tmp4_ = gee_linked_list_last ((GeeLinkedList*) values); +#line 58 "../src/points.vala" + last_value = (LiveChartTimestampedValue*) _tmp4_; +#line 59 "../src/points.vala" + _tmp5_ = points; +#line 59 "../src/points.vala" + _tmp6_ = last_value; +#line 59 "../src/points.vala" + _tmp7_ = config->x_axis; +#line 59 "../src/points.vala" + live_chart_points_set_realtime_delta (_tmp5_, (((g_get_real_time () / 1000) - (*_tmp6_).timestamp) * live_chart_xaxis_get_ratio (_tmp7_)) / 1000); +#line 310 "points.c" + { + LiveChartValues* _value_list = NULL; + gint _value_size = 0; + LiveChartValues* _tmp8_; + gint _tmp9_; + gint _tmp10_; + gint _value_index = 0; +#line 61 "../src/points.vala" + _value_list = values; +#line 61 "../src/points.vala" + _tmp8_ = _value_list; +#line 61 "../src/points.vala" + _tmp9_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp8_); +#line 61 "../src/points.vala" + _tmp10_ = _tmp9_; +#line 61 "../src/points.vala" + _value_size = _tmp10_; +#line 61 "../src/points.vala" + _value_index = -1; +#line 61 "../src/points.vala" + while (TRUE) { +#line 332 "points.c" + gint _tmp11_; + gint _tmp12_; + LiveChartTimestampedValue value = {0}; + LiveChartValues* _tmp13_; + gpointer _tmp14_; + LiveChartTimestampedValue* _tmp15_; + LiveChartTimestampedValue _tmp16_; + LiveChartPoint point = {0}; + LiveChartTimestampedValue* _tmp17_; + LiveChartTimestampedValue _tmp18_; + LiveChartBoundaries _tmp19_; + LiveChartPoints* _tmp20_; + gdouble _tmp21_; + LiveChartTimestampedValue _tmp22_; + LiveChartPoint _tmp23_ = {0}; + LiveChartPoints* _tmp24_; + LiveChartPoint _tmp25_; +#line 61 "../src/points.vala" + _value_index = _value_index + 1; +#line 61 "../src/points.vala" + _tmp11_ = _value_index; +#line 61 "../src/points.vala" + _tmp12_ = _value_size; +#line 61 "../src/points.vala" + if (!(_tmp11_ < _tmp12_)) { +#line 61 "../src/points.vala" + break; +#line 360 "points.c" + } +#line 61 "../src/points.vala" + _tmp13_ = _value_list; +#line 61 "../src/points.vala" + _tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, _value_index); +#line 61 "../src/points.vala" + _tmp15_ = (LiveChartTimestampedValue*) _tmp14_; +#line 61 "../src/points.vala" + _tmp16_ = *_tmp15_; +#line 61 "../src/points.vala" + _live_chart_timestamped_value_free0 (_tmp15_); +#line 61 "../src/points.vala" + value = _tmp16_; +#line 62 "../src/points.vala" + _tmp17_ = last_value; +#line 62 "../src/points.vala" + _tmp18_ = value; +#line 62 "../src/points.vala" + _tmp19_ = boundaries; +#line 62 "../src/points.vala" + _tmp20_ = points; +#line 62 "../src/points.vala" + _tmp21_ = _tmp20_->priv->_realtime_delta; +#line 62 "../src/points.vala" + _tmp22_ = *_tmp17_; +#line 62 "../src/points.vala" + live_chart_points_value_to_point (&_tmp22_, &_tmp18_, config, &_tmp19_, _tmp21_, &_tmp23_); +#line 62 "../src/points.vala" + point = _tmp23_; +#line 63 "../src/points.vala" + _tmp24_ = points; +#line 63 "../src/points.vala" + _tmp25_ = point; +#line 63 "../src/points.vala" + live_chart_points_add (_tmp24_, &_tmp25_); +#line 396 "points.c" + } + } +#line 57 "../src/points.vala" + _live_chart_timestamped_value_free0 (last_value); +#line 401 "points.c" + } +#line 67 "../src/points.vala" + result = points; +#line 67 "../src/points.vala" + return result; +#line 407 "points.c" +} + +static void +live_chart_points_value_to_point (LiveChartTimestampedValue* last_value, + LiveChartTimestampedValue* current_value, + LiveChartConfig* config, + LiveChartBoundaries* boundaries, + gdouble realtime_delta, + LiveChartPoint* result) +{ + LiveChartBoundaries _tmp0_; + LiveChartBoundary _tmp1_; + LiveChartTimestampedValue _tmp2_; + LiveChartTimestampedValue _tmp3_; + LiveChartXAxis* _tmp4_; + LiveChartBoundaries _tmp5_; + LiveChartBoundary _tmp6_; + LiveChartTimestampedValue _tmp7_; + LiveChartYAxis* _tmp8_; + LiveChartTimestampedValue _tmp9_; + LiveChartYAxis* _tmp10_; + LiveChartTimestampedValue _tmp11_; + LiveChartPoint _tmp12_ = {0}; +#line 70 "../src/points.vala" + g_return_if_fail (last_value != NULL); +#line 70 "../src/points.vala" + g_return_if_fail (current_value != NULL); +#line 70 "../src/points.vala" + g_return_if_fail (config != NULL); +#line 70 "../src/points.vala" + g_return_if_fail (boundaries != NULL); +#line 71 "../src/points.vala" + _tmp0_ = *boundaries; +#line 71 "../src/points.vala" + _tmp1_ = _tmp0_.x; +#line 71 "../src/points.vala" + _tmp2_ = *last_value; +#line 71 "../src/points.vala" + _tmp3_ = *current_value; +#line 71 "../src/points.vala" + _tmp4_ = config->x_axis; +#line 71 "../src/points.vala" + _tmp5_ = *boundaries; +#line 71 "../src/points.vala" + _tmp6_ = _tmp5_.y; +#line 71 "../src/points.vala" + _tmp7_ = *current_value; +#line 71 "../src/points.vala" + _tmp8_ = config->y_axis; +#line 71 "../src/points.vala" + _tmp9_ = *current_value; +#line 71 "../src/points.vala" + _tmp10_ = config->y_axis; +#line 71 "../src/points.vala" + _tmp11_ = *current_value; +#line 71 "../src/points.vala" + memset (&_tmp12_, 0, sizeof (LiveChartPoint)); +#line 71 "../src/points.vala" + _tmp12_.x = (_tmp1_.max - (((_tmp2_.timestamp - _tmp3_.timestamp) / 1000) * live_chart_xaxis_get_ratio (_tmp4_))) - realtime_delta; +#line 71 "../src/points.vala" + _tmp12_.y = _tmp6_.max - (_tmp7_.value * live_chart_yaxis_get_ratio (_tmp8_)); +#line 71 "../src/points.vala" + _tmp12_.height = _tmp9_.value * live_chart_yaxis_get_ratio (_tmp10_); +#line 71 "../src/points.vala" + _tmp12_.data = _tmp11_; +#line 71 "../src/points.vala" + *result = _tmp12_; +#line 71 "../src/points.vala" + return; +#line 477 "points.c" +} + +LiveChartBounds* +live_chart_points_get_bounds (LiveChartPoints* self) +{ + LiveChartBounds* result; + LiveChartBounds* _tmp0_; +#line 14 "../src/points.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 14 "../src/points.vala" + _tmp0_ = self->priv->_bounds; +#line 14 "../src/points.vala" + result = _tmp0_; +#line 14 "../src/points.vala" + return result; +#line 493 "points.c" +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 14 "../src/points.vala" + return self ? g_object_ref (self) : NULL; +#line 501 "points.c" +} + +void +live_chart_points_set_bounds (LiveChartPoints* self, + LiveChartBounds* value) +{ + LiveChartBounds* old_value; +#line 14 "../src/points.vala" + g_return_if_fail (self != NULL); +#line 14 "../src/points.vala" + old_value = live_chart_points_get_bounds (self); +#line 14 "../src/points.vala" + if (old_value != value) { +#line 515 "points.c" + LiveChartBounds* _tmp0_; +#line 14 "../src/points.vala" + _tmp0_ = _g_object_ref0 (value); +#line 14 "../src/points.vala" + _g_object_unref0 (self->priv->_bounds); +#line 14 "../src/points.vala" + self->priv->_bounds = _tmp0_; +#line 14 "../src/points.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_points_properties[LIVE_CHART_POINTS_BOUNDS_PROPERTY]); +#line 525 "points.c" + } +} + +gint +live_chart_points_get_size (LiveChartPoints* self) +{ + gint result; + GeeArrayList* _tmp0_; + gint _tmp1_; + gint _tmp2_; +#line 27 "../src/points.vala" + g_return_val_if_fail (self != NULL, 0); +#line 28 "../src/points.vala" + _tmp0_ = self->priv->points; +#line 28 "../src/points.vala" + _tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_); +#line 28 "../src/points.vala" + _tmp2_ = _tmp1_; +#line 28 "../src/points.vala" + result = _tmp2_; +#line 28 "../src/points.vala" + return result; +#line 548 "points.c" +} + +gdouble +live_chart_points_get_realtime_delta (LiveChartPoints* self) +{ + gdouble result; +#line 33 "../src/points.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 33 "../src/points.vala" + result = self->priv->_realtime_delta; +#line 33 "../src/points.vala" + return result; +#line 561 "points.c" +} + +void +live_chart_points_set_realtime_delta (LiveChartPoints* self, + gdouble value) +{ + gdouble old_value; +#line 33 "../src/points.vala" + g_return_if_fail (self != NULL); +#line 33 "../src/points.vala" + old_value = live_chart_points_get_realtime_delta (self); +#line 33 "../src/points.vala" + if (old_value != value) { +#line 33 "../src/points.vala" + self->priv->_realtime_delta = value; +#line 33 "../src/points.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_points_properties[LIVE_CHART_POINTS_REALTIME_DELTA_PROPERTY]); +#line 579 "points.c" + } +} + +static void +live_chart_points_class_init (LiveChartPointsClass * klass, + gpointer klass_data) +{ +#line 10 "../src/points.vala" + live_chart_points_parent_class = g_type_class_peek_parent (klass); +#line 10 "../src/points.vala" + g_type_class_adjust_private_offset (klass, &LiveChartPoints_private_offset); +#line 10 "../src/points.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_points_get_property; +#line 10 "../src/points.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_points_set_property; +#line 10 "../src/points.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_points_finalize; +#line 10 "../src/points.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_POINTS_BOUNDS_PROPERTY, live_chart_points_properties[LIVE_CHART_POINTS_BOUNDS_PROPERTY] = g_param_spec_object ("bounds", "bounds", "bounds", LIVE_CHART_TYPE_BOUNDS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); +#line 10 "../src/points.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_POINTS_SIZE_PROPERTY, live_chart_points_properties[LIVE_CHART_POINTS_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); +#line 10 "../src/points.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_POINTS_REALTIME_DELTA_PROPERTY, live_chart_points_properties[LIVE_CHART_POINTS_REALTIME_DELTA_PROPERTY] = g_param_spec_double ("realtime-delta", "realtime-delta", "realtime-delta", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 603 "points.c" +} + +static void +live_chart_points_instance_init (LiveChartPoints * self, + gpointer klass) +{ + GeeArrayList* _tmp0_; +#line 10 "../src/points.vala" + self->priv = live_chart_points_get_instance_private (self); +#line 12 "../src/points.vala" + _tmp0_ = gee_array_list_new (LIVE_CHART_TYPE_POINT, (GBoxedCopyFunc) live_chart_point_dup, (GDestroyNotify) live_chart_point_free, NULL, NULL, NULL); +#line 12 "../src/points.vala" + self->priv->points = _tmp0_; +#line 617 "points.c" +} + +static void +live_chart_points_finalize (GObject * obj) +{ + LiveChartPoints * self; +#line 10 "../src/points.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_POINTS, LiveChartPoints); +#line 12 "../src/points.vala" + _g_object_unref0 (self->priv->points); +#line 13 "../src/points.vala" + _g_object_unref0 (self->priv->_bounds); +#line 10 "../src/points.vala" + G_OBJECT_CLASS (live_chart_points_parent_class)->finalize (obj); +#line 632 "points.c" +} + +static GType +live_chart_points_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartPointsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_points_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartPoints), 0, (GInstanceInitFunc) live_chart_points_instance_init, NULL }; + GType live_chart_points_type_id; + live_chart_points_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartPoints", &g_define_type_info, 0); + LiveChartPoints_private_offset = g_type_add_instance_private (live_chart_points_type_id, sizeof (LiveChartPointsPrivate)); + return live_chart_points_type_id; +} + +GType +live_chart_points_get_type (void) +{ + static volatile gsize live_chart_points_type_id__once = 0; + if (g_once_init_enter (&live_chart_points_type_id__once)) { + GType live_chart_points_type_id; + live_chart_points_type_id = live_chart_points_get_type_once (); + g_once_init_leave (&live_chart_points_type_id__once, live_chart_points_type_id); + } + return live_chart_points_type_id__once; +} + +static void +_vala_live_chart_points_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartPoints * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_POINTS, LiveChartPoints); +#line 10 "../src/points.vala" + switch (property_id) { +#line 10 "../src/points.vala" + case LIVE_CHART_POINTS_BOUNDS_PROPERTY: +#line 10 "../src/points.vala" + g_value_set_object (value, live_chart_points_get_bounds (self)); +#line 10 "../src/points.vala" + break; +#line 10 "../src/points.vala" + case LIVE_CHART_POINTS_SIZE_PROPERTY: +#line 10 "../src/points.vala" + g_value_set_int (value, live_chart_points_get_size (self)); +#line 10 "../src/points.vala" + break; +#line 10 "../src/points.vala" + case LIVE_CHART_POINTS_REALTIME_DELTA_PROPERTY: +#line 10 "../src/points.vala" + g_value_set_double (value, live_chart_points_get_realtime_delta (self)); +#line 10 "../src/points.vala" + break; +#line 685 "points.c" + default: +#line 10 "../src/points.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 10 "../src/points.vala" + break; +#line 691 "points.c" + } +} + +static void +_vala_live_chart_points_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartPoints * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_POINTS, LiveChartPoints); +#line 10 "../src/points.vala" + switch (property_id) { +#line 10 "../src/points.vala" + case LIVE_CHART_POINTS_BOUNDS_PROPERTY: +#line 10 "../src/points.vala" + live_chart_points_set_bounds (self, g_value_get_object (value)); +#line 10 "../src/points.vala" + break; +#line 10 "../src/points.vala" + case LIVE_CHART_POINTS_REALTIME_DELTA_PROPERTY: +#line 10 "../src/points.vala" + live_chart_points_set_realtime_delta (self, g_value_get_double (value)); +#line 10 "../src/points.vala" + break; +#line 717 "points.c" + default: +#line 10 "../src/points.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 10 "../src/points.vala" + break; +#line 723 "points.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/region.c b/iPDC/lib/liblivechart_static.a.p/region.c new file mode 100644 index 0000000..e6febd8 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/region.c @@ -0,0 +1,1158 @@ +/* region.c generated by valac 0.56.0, the Vala compiler + * generated from region.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +#define _live_chart_coord_free0(var) ((var == NULL) ? NULL : (var = (live_chart_coord_free (var), NULL))) +typedef struct _LiveChartParamSpecRegion LiveChartParamSpecRegion; + +struct _LiveChartRegionPrivate { + gdouble ceil; + gdouble floor; + GdkRGBA _line_color; + GdkRGBA _area_color; +}; + +struct _LiveChartParamSpecRegion { + GParamSpec parent_instance; +}; + +static gint LiveChartRegion_private_offset; +static gpointer live_chart_region_parent_class = NULL; + +static gboolean live_chart_region_enter_by_the_bottom (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current); +static gboolean live_chart_region_enter_by_the_top (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current); +static gboolean live_chart_region_leaving_by_the_top (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current); +static gboolean live_chart_region_leaving_by_the_bottom (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current); +static gboolean live_chart_region_is_within (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current); +static void live_chart_region_finalize (LiveChartRegion * obj); +static GType live_chart_region_get_type_once (void); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static GType +live_chart_region_handle_status_get_type_once (void) +{ + static const GEnumValue values[] = {{LIVE_CHART_REGION_HANDLE_STATUS_ENTER, "LIVE_CHART_REGION_HANDLE_STATUS_ENTER", "enter"}, {LIVE_CHART_REGION_HANDLE_STATUS_EXIT, "LIVE_CHART_REGION_HANDLE_STATUS_EXIT", "exit"}, {LIVE_CHART_REGION_HANDLE_STATUS_WITHIN, "LIVE_CHART_REGION_HANDLE_STATUS_WITHIN", "within"}, {LIVE_CHART_REGION_HANDLE_STATUS_OUT, "LIVE_CHART_REGION_HANDLE_STATUS_OUT", "out"}, {0, NULL, NULL}}; + GType live_chart_region_handle_status_type_id; + live_chart_region_handle_status_type_id = g_enum_register_static ("LiveChartRegionHandleStatus", values); + return live_chart_region_handle_status_type_id; +} + +GType +live_chart_region_handle_status_get_type (void) +{ + static volatile gsize live_chart_region_handle_status_type_id__once = 0; + if (g_once_init_enter (&live_chart_region_handle_status_type_id__once)) { + GType live_chart_region_handle_status_type_id; + live_chart_region_handle_status_type_id = live_chart_region_handle_status_get_type_once (); + g_once_init_leave (&live_chart_region_handle_status_type_id__once, live_chart_region_handle_status_type_id); + } + return live_chart_region_handle_status_type_id__once; +} + +LiveChartRegionHandleResult* +live_chart_region_handle_result_dup (const LiveChartRegionHandleResult* self) +{ + LiveChartRegionHandleResult* dup; +#line 11 "../src/region.vala" + dup = g_new0 (LiveChartRegionHandleResult, 1); +#line 11 "../src/region.vala" + memcpy (dup, self, sizeof (LiveChartRegionHandleResult)); +#line 11 "../src/region.vala" + return dup; +#line 81 "region.c" +} + +void +live_chart_region_handle_result_free (LiveChartRegionHandleResult* self) +{ +#line 11 "../src/region.vala" + g_free (self); +#line 89 "region.c" +} + +static GType +live_chart_region_handle_result_get_type_once (void) +{ + GType live_chart_region_handle_result_type_id; + live_chart_region_handle_result_type_id = g_boxed_type_register_static ("LiveChartRegionHandleResult", (GBoxedCopyFunc) live_chart_region_handle_result_dup, (GBoxedFreeFunc) live_chart_region_handle_result_free); + return live_chart_region_handle_result_type_id; +} + +GType +live_chart_region_handle_result_get_type (void) +{ + static volatile gsize live_chart_region_handle_result_type_id__once = 0; + if (g_once_init_enter (&live_chart_region_handle_result_type_id__once)) { + GType live_chart_region_handle_result_type_id; + live_chart_region_handle_result_type_id = live_chart_region_handle_result_get_type_once (); + g_once_init_leave (&live_chart_region_handle_result_type_id__once, live_chart_region_handle_result_type_id); + } + return live_chart_region_handle_result_type_id__once; +} + +static inline gpointer +live_chart_region_get_instance_private (LiveChartRegion* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartRegion_private_offset); +} + +LiveChartRegion* +live_chart_region_construct (GType object_type, + gdouble floor, + gdouble ceil) +{ + LiveChartRegion* self = NULL; +#line 25 "../src/region.vala" + self = (LiveChartRegion*) g_type_create_instance (object_type); +#line 26 "../src/region.vala" + self->priv->floor = floor; +#line 27 "../src/region.vala" + self->priv->ceil = ceil; +#line 25 "../src/region.vala" + return self; +#line 132 "region.c" +} + +LiveChartRegion* +live_chart_region_new (gdouble floor, + gdouble ceil) +{ +#line 25 "../src/region.vala" + return live_chart_region_construct (LIVE_CHART_TYPE_REGION, floor, ceil); +#line 141 "region.c" +} + +LiveChartRegion* +live_chart_region_construct_between (GType object_type, + gdouble above, + gdouble below) +{ + LiveChartRegion* self = NULL; +#line 38 "../src/region.vala" + self = (LiveChartRegion*) live_chart_region_construct (object_type, above, below); +#line 37 "../src/region.vala" + return self; +#line 154 "region.c" +} + +LiveChartRegion* +live_chart_region_new_between (gdouble above, + gdouble below) +{ +#line 37 "../src/region.vala" + return live_chart_region_construct_between (LIVE_CHART_TYPE_REGION, above, below); +#line 163 "region.c" +} + +static gpointer +_live_chart_region_ref0 (gpointer self) +{ +#line 43 "../src/region.vala" + return self ? live_chart_region_ref (self) : NULL; +#line 171 "region.c" +} + +LiveChartRegion* +live_chart_region_with_line_color (LiveChartRegion* self, + GdkRGBA* color) +{ + GdkRGBA _tmp0_; + LiveChartRegion* _tmp1_; + LiveChartRegion* result; +#line 41 "../src/region.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 41 "../src/region.vala" + g_return_val_if_fail (color != NULL, NULL); +#line 42 "../src/region.vala" + _tmp0_ = *color; +#line 42 "../src/region.vala" + live_chart_region_set_line_color (self, &_tmp0_); +#line 43 "../src/region.vala" + _tmp1_ = _live_chart_region_ref0 (self); +#line 43 "../src/region.vala" + result = _tmp1_; +#line 43 "../src/region.vala" + return result; +#line 195 "region.c" +} + +LiveChartRegion* +live_chart_region_with_area_color (LiveChartRegion* self, + GdkRGBA* color) +{ + GdkRGBA _tmp0_; + LiveChartRegion* _tmp1_; + LiveChartRegion* result; +#line 45 "../src/region.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 45 "../src/region.vala" + g_return_val_if_fail (color != NULL, NULL); +#line 46 "../src/region.vala" + _tmp0_ = *color; +#line 46 "../src/region.vala" + live_chart_region_set_area_color (self, &_tmp0_); +#line 47 "../src/region.vala" + _tmp1_ = _live_chart_region_ref0 (self); +#line 47 "../src/region.vala" + result = _tmp1_; +#line 47 "../src/region.vala" + return result; +#line 219 "region.c" +} + +gboolean +live_chart_region_has_at_least_one_point_within (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current) +{ + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + LiveChartPoint _tmp2_; + LiveChartTimestampedValue _tmp3_; + gboolean result; +#line 50 "../src/region.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 50 "../src/region.vala" + g_return_val_if_fail (previous != NULL, FALSE); +#line 50 "../src/region.vala" + g_return_val_if_fail (current != NULL, FALSE); +#line 51 "../src/region.vala" + _tmp2_ = *previous; +#line 51 "../src/region.vala" + _tmp3_ = _tmp2_.data; +#line 51 "../src/region.vala" + if (_tmp3_.value > self->priv->floor) { +#line 244 "region.c" + LiveChartPoint _tmp4_; + LiveChartTimestampedValue _tmp5_; +#line 51 "../src/region.vala" + _tmp4_ = *previous; +#line 51 "../src/region.vala" + _tmp5_ = _tmp4_.data; +#line 51 "../src/region.vala" + _tmp1_ = _tmp5_.value <= self->priv->ceil; +#line 253 "region.c" + } else { +#line 51 "../src/region.vala" + _tmp1_ = FALSE; +#line 257 "region.c" + } +#line 51 "../src/region.vala" + if (_tmp1_) { +#line 51 "../src/region.vala" + _tmp0_ = TRUE; +#line 263 "region.c" + } else { + gboolean _tmp6_ = FALSE; + LiveChartPoint _tmp7_; + LiveChartTimestampedValue _tmp8_; +#line 51 "../src/region.vala" + _tmp7_ = *current; +#line 51 "../src/region.vala" + _tmp8_ = _tmp7_.data; +#line 51 "../src/region.vala" + if (_tmp8_.value > self->priv->floor) { +#line 274 "region.c" + LiveChartPoint _tmp9_; + LiveChartTimestampedValue _tmp10_; +#line 51 "../src/region.vala" + _tmp9_ = *current; +#line 51 "../src/region.vala" + _tmp10_ = _tmp9_.data; +#line 51 "../src/region.vala" + _tmp6_ = _tmp10_.value <= self->priv->ceil; +#line 283 "region.c" + } else { +#line 51 "../src/region.vala" + _tmp6_ = FALSE; +#line 287 "region.c" + } +#line 51 "../src/region.vala" + _tmp0_ = _tmp6_; +#line 291 "region.c" + } +#line 51 "../src/region.vala" + result = _tmp0_; +#line 51 "../src/region.vala" + return result; +#line 297 "region.c" +} + +void +live_chart_region_handle (LiveChartRegion* self, + LiveChartIntersections* intersections, + LiveChartPoint* previous, + LiveChartPoint* current, + LiveChartGetIntersection get_intersection, + gpointer get_intersection_target) +{ + LiveChartPoint _tmp0_; + LiveChartPoint _tmp1_; +#line 54 "../src/region.vala" + g_return_if_fail (self != NULL); +#line 54 "../src/region.vala" + g_return_if_fail (intersections != NULL); +#line 54 "../src/region.vala" + g_return_if_fail (previous != NULL); +#line 54 "../src/region.vala" + g_return_if_fail (current != NULL); +#line 55 "../src/region.vala" + _tmp0_ = *previous; +#line 55 "../src/region.vala" + _tmp1_ = *current; +#line 55 "../src/region.vala" + if (live_chart_region_has_at_least_one_point_within (self, &_tmp0_, &_tmp1_)) { +#line 324 "region.c" + LiveChartPoint _tmp2_; + LiveChartPoint _tmp3_; + LiveChartPoint _tmp7_; + LiveChartPoint _tmp8_; + LiveChartPoint _tmp12_; + LiveChartPoint _tmp13_; + LiveChartPoint _tmp18_; + LiveChartPoint _tmp19_; + LiveChartPoint _tmp24_; + LiveChartPoint _tmp25_; +#line 56 "../src/region.vala" + _tmp2_ = *previous; +#line 56 "../src/region.vala" + _tmp3_ = *current; +#line 56 "../src/region.vala" + if (live_chart_region_enter_by_the_bottom (self, &_tmp2_, &_tmp3_)) { +#line 341 "region.c" + gdouble entered_at = 0.0; + LiveChartCoord* coords = NULL; + LiveChartCoord* _tmp4_; +#line 57 "../src/region.vala" + entered_at = self->priv->floor; +#line 58 "../src/region.vala" + _tmp4_ = get_intersection (entered_at, get_intersection_target); +#line 58 "../src/region.vala" + coords = _tmp4_; +#line 59 "../src/region.vala" + if (live_chart_intersections_has_an_opened_intersection (intersections)) { +#line 353 "region.c" + LiveChartPoint _tmp5_; +#line 60 "../src/region.vala" + _tmp5_ = *current; +#line 60 "../src/region.vala" + live_chart_intersections_update (intersections, _tmp5_.x); +#line 359 "region.c" + } else { + LiveChartCoord* _tmp6_; +#line 62 "../src/region.vala" + _tmp6_ = coords; +#line 62 "../src/region.vala" + live_chart_intersections_open (intersections, self, (*_tmp6_).x, entered_at); +#line 366 "region.c" + } +#line 56 "../src/region.vala" + _live_chart_coord_free0 (coords); +#line 370 "region.c" + } +#line 65 "../src/region.vala" + _tmp7_ = *previous; +#line 65 "../src/region.vala" + _tmp8_ = *current; +#line 65 "../src/region.vala" + if (live_chart_region_enter_by_the_top (self, &_tmp7_, &_tmp8_)) { +#line 378 "region.c" + gdouble entered_at = 0.0; + LiveChartCoord* coords = NULL; + LiveChartCoord* _tmp9_; +#line 67 "../src/region.vala" + entered_at = self->priv->ceil; +#line 68 "../src/region.vala" + _tmp9_ = get_intersection (entered_at, get_intersection_target); +#line 68 "../src/region.vala" + coords = _tmp9_; +#line 70 "../src/region.vala" + if (live_chart_intersections_has_an_opened_intersection (intersections)) { +#line 390 "region.c" + LiveChartPoint _tmp10_; +#line 71 "../src/region.vala" + _tmp10_ = *current; +#line 71 "../src/region.vala" + live_chart_intersections_update (intersections, _tmp10_.x); +#line 396 "region.c" + } else { + LiveChartCoord* _tmp11_; +#line 73 "../src/region.vala" + _tmp11_ = coords; +#line 73 "../src/region.vala" + live_chart_intersections_open (intersections, self, (*_tmp11_).x, entered_at); +#line 403 "region.c" + } +#line 65 "../src/region.vala" + _live_chart_coord_free0 (coords); +#line 407 "region.c" + } +#line 77 "../src/region.vala" + _tmp12_ = *previous; +#line 77 "../src/region.vala" + _tmp13_ = *current; +#line 77 "../src/region.vala" + if (live_chart_region_leaving_by_the_top (self, &_tmp12_, &_tmp13_)) { +#line 415 "region.c" + gdouble exited_at = 0.0; + LiveChartCoord* coords = NULL; + LiveChartCoord* _tmp14_; +#line 78 "../src/region.vala" + exited_at = self->priv->ceil; +#line 79 "../src/region.vala" + _tmp14_ = get_intersection (exited_at, get_intersection_target); +#line 79 "../src/region.vala" + coords = _tmp14_; +#line 81 "../src/region.vala" + if (live_chart_intersections_has_an_opened_intersection (intersections)) { +#line 427 "region.c" + LiveChartCoord* _tmp15_; +#line 82 "../src/region.vala" + _tmp15_ = coords; +#line 82 "../src/region.vala" + live_chart_intersections_close (intersections, (*_tmp15_).x, exited_at); +#line 433 "region.c" + } else { + LiveChartPoint _tmp16_; + LiveChartCoord* _tmp17_; +#line 84 "../src/region.vala" + _tmp16_ = *previous; +#line 84 "../src/region.vala" + live_chart_intersections_open_without_entrypoint (intersections, self, _tmp16_.x); +#line 85 "../src/region.vala" + _tmp17_ = coords; +#line 85 "../src/region.vala" + live_chart_intersections_close (intersections, (*_tmp17_).x, exited_at); +#line 445 "region.c" + } +#line 77 "../src/region.vala" + _live_chart_coord_free0 (coords); +#line 449 "region.c" + } +#line 88 "../src/region.vala" + _tmp18_ = *previous; +#line 88 "../src/region.vala" + _tmp19_ = *current; +#line 88 "../src/region.vala" + if (live_chart_region_leaving_by_the_bottom (self, &_tmp18_, &_tmp19_)) { +#line 457 "region.c" + gdouble exited_at = 0.0; + LiveChartCoord* coords = NULL; + LiveChartCoord* _tmp20_; +#line 89 "../src/region.vala" + exited_at = self->priv->floor; +#line 90 "../src/region.vala" + _tmp20_ = get_intersection (exited_at, get_intersection_target); +#line 90 "../src/region.vala" + coords = _tmp20_; +#line 92 "../src/region.vala" + if (live_chart_intersections_has_an_opened_intersection (intersections)) { +#line 469 "region.c" + LiveChartCoord* _tmp21_; +#line 93 "../src/region.vala" + _tmp21_ = coords; +#line 93 "../src/region.vala" + live_chart_intersections_close (intersections, (*_tmp21_).x, exited_at); +#line 475 "region.c" + } else { + LiveChartPoint _tmp22_; + LiveChartCoord* _tmp23_; +#line 95 "../src/region.vala" + _tmp22_ = *previous; +#line 95 "../src/region.vala" + live_chart_intersections_open_without_entrypoint (intersections, self, _tmp22_.x); +#line 96 "../src/region.vala" + _tmp23_ = coords; +#line 96 "../src/region.vala" + live_chart_intersections_close (intersections, (*_tmp23_).x, exited_at); +#line 487 "region.c" + } +#line 88 "../src/region.vala" + _live_chart_coord_free0 (coords); +#line 491 "region.c" + } +#line 99 "../src/region.vala" + _tmp24_ = *previous; +#line 99 "../src/region.vala" + _tmp25_ = *current; +#line 99 "../src/region.vala" + if (live_chart_region_is_within (self, &_tmp24_, &_tmp25_)) { +#line 100 "../src/region.vala" + if (!live_chart_intersections_has_an_opened_intersection (intersections)) { +#line 501 "region.c" + LiveChartPoint _tmp26_; +#line 101 "../src/region.vala" + _tmp26_ = *previous; +#line 101 "../src/region.vala" + live_chart_intersections_open_without_entrypoint (intersections, self, _tmp26_.x); +#line 507 "region.c" + } else { + LiveChartPoint _tmp27_; +#line 103 "../src/region.vala" + _tmp27_ = *current; +#line 103 "../src/region.vala" + live_chart_intersections_update (intersections, _tmp27_.x); +#line 514 "region.c" + } + } + } +} + +static gboolean +live_chart_region_enter_by_the_bottom (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current) +{ + gboolean _tmp0_ = FALSE; + LiveChartPoint _tmp1_; + LiveChartTimestampedValue _tmp2_; + gboolean result; +#line 109 "../src/region.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 109 "../src/region.vala" + g_return_val_if_fail (previous != NULL, FALSE); +#line 109 "../src/region.vala" + g_return_val_if_fail (current != NULL, FALSE); +#line 110 "../src/region.vala" + _tmp1_ = *previous; +#line 110 "../src/region.vala" + _tmp2_ = _tmp1_.data; +#line 110 "../src/region.vala" + if (_tmp2_.value <= self->priv->floor) { +#line 541 "region.c" + LiveChartPoint _tmp3_; + LiveChartTimestampedValue _tmp4_; +#line 110 "../src/region.vala" + _tmp3_ = *current; +#line 110 "../src/region.vala" + _tmp4_ = _tmp3_.data; +#line 110 "../src/region.vala" + _tmp0_ = _tmp4_.value > self->priv->floor; +#line 550 "region.c" + } else { +#line 110 "../src/region.vala" + _tmp0_ = FALSE; +#line 554 "region.c" + } +#line 110 "../src/region.vala" + result = _tmp0_; +#line 110 "../src/region.vala" + return result; +#line 560 "region.c" +} + +static gboolean +live_chart_region_enter_by_the_top (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current) +{ + gboolean _tmp0_ = FALSE; + LiveChartPoint _tmp1_; + LiveChartTimestampedValue _tmp2_; + gboolean result; +#line 113 "../src/region.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 113 "../src/region.vala" + g_return_val_if_fail (previous != NULL, FALSE); +#line 113 "../src/region.vala" + g_return_val_if_fail (current != NULL, FALSE); +#line 114 "../src/region.vala" + _tmp1_ = *previous; +#line 114 "../src/region.vala" + _tmp2_ = _tmp1_.data; +#line 114 "../src/region.vala" + if (_tmp2_.value >= self->priv->ceil) { +#line 584 "region.c" + LiveChartPoint _tmp3_; + LiveChartTimestampedValue _tmp4_; +#line 114 "../src/region.vala" + _tmp3_ = *current; +#line 114 "../src/region.vala" + _tmp4_ = _tmp3_.data; +#line 114 "../src/region.vala" + _tmp0_ = _tmp4_.value < self->priv->ceil; +#line 593 "region.c" + } else { +#line 114 "../src/region.vala" + _tmp0_ = FALSE; +#line 597 "region.c" + } +#line 114 "../src/region.vala" + result = _tmp0_; +#line 114 "../src/region.vala" + return result; +#line 603 "region.c" +} + +static gboolean +live_chart_region_leaving_by_the_top (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current) +{ + gboolean _tmp0_ = FALSE; + LiveChartPoint _tmp1_; + LiveChartTimestampedValue _tmp2_; + gboolean result; +#line 117 "../src/region.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 117 "../src/region.vala" + g_return_val_if_fail (previous != NULL, FALSE); +#line 117 "../src/region.vala" + g_return_val_if_fail (current != NULL, FALSE); +#line 118 "../src/region.vala" + _tmp1_ = *previous; +#line 118 "../src/region.vala" + _tmp2_ = _tmp1_.data; +#line 118 "../src/region.vala" + if (_tmp2_.value >= self->priv->floor) { +#line 627 "region.c" + LiveChartPoint _tmp3_; + LiveChartTimestampedValue _tmp4_; +#line 118 "../src/region.vala" + _tmp3_ = *current; +#line 118 "../src/region.vala" + _tmp4_ = _tmp3_.data; +#line 118 "../src/region.vala" + _tmp0_ = _tmp4_.value > self->priv->ceil; +#line 636 "region.c" + } else { +#line 118 "../src/region.vala" + _tmp0_ = FALSE; +#line 640 "region.c" + } +#line 118 "../src/region.vala" + result = _tmp0_; +#line 118 "../src/region.vala" + return result; +#line 646 "region.c" +} + +static gboolean +live_chart_region_leaving_by_the_bottom (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current) +{ + gboolean _tmp0_ = FALSE; + LiveChartPoint _tmp1_; + LiveChartTimestampedValue _tmp2_; + gboolean result; +#line 121 "../src/region.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 121 "../src/region.vala" + g_return_val_if_fail (previous != NULL, FALSE); +#line 121 "../src/region.vala" + g_return_val_if_fail (current != NULL, FALSE); +#line 122 "../src/region.vala" + _tmp1_ = *previous; +#line 122 "../src/region.vala" + _tmp2_ = _tmp1_.data; +#line 122 "../src/region.vala" + if (_tmp2_.value >= self->priv->floor) { +#line 670 "region.c" + LiveChartPoint _tmp3_; + LiveChartTimestampedValue _tmp4_; +#line 122 "../src/region.vala" + _tmp3_ = *current; +#line 122 "../src/region.vala" + _tmp4_ = _tmp3_.data; +#line 122 "../src/region.vala" + _tmp0_ = _tmp4_.value < self->priv->floor; +#line 679 "region.c" + } else { +#line 122 "../src/region.vala" + _tmp0_ = FALSE; +#line 683 "region.c" + } +#line 122 "../src/region.vala" + result = _tmp0_; +#line 122 "../src/region.vala" + return result; +#line 689 "region.c" +} + +static gboolean +live_chart_region_is_within (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current) +{ + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; + LiveChartPoint _tmp3_; + LiveChartTimestampedValue _tmp4_; + gboolean result; +#line 125 "../src/region.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 125 "../src/region.vala" + g_return_val_if_fail (previous != NULL, FALSE); +#line 125 "../src/region.vala" + g_return_val_if_fail (current != NULL, FALSE); +#line 126 "../src/region.vala" + _tmp3_ = *previous; +#line 126 "../src/region.vala" + _tmp4_ = _tmp3_.data; +#line 126 "../src/region.vala" + if (_tmp4_.value >= self->priv->floor) { +#line 715 "region.c" + LiveChartPoint _tmp5_; + LiveChartTimestampedValue _tmp6_; +#line 126 "../src/region.vala" + _tmp5_ = *current; +#line 126 "../src/region.vala" + _tmp6_ = _tmp5_.data; +#line 126 "../src/region.vala" + _tmp2_ = _tmp6_.value > self->priv->floor; +#line 724 "region.c" + } else { +#line 126 "../src/region.vala" + _tmp2_ = FALSE; +#line 728 "region.c" + } +#line 126 "../src/region.vala" + if (_tmp2_) { +#line 732 "region.c" + LiveChartPoint _tmp7_; + LiveChartTimestampedValue _tmp8_; +#line 126 "../src/region.vala" + _tmp7_ = *previous; +#line 126 "../src/region.vala" + _tmp8_ = _tmp7_.data; +#line 126 "../src/region.vala" + _tmp1_ = _tmp8_.value < self->priv->ceil; +#line 741 "region.c" + } else { +#line 126 "../src/region.vala" + _tmp1_ = FALSE; +#line 745 "region.c" + } +#line 126 "../src/region.vala" + if (_tmp1_) { +#line 749 "region.c" + LiveChartPoint _tmp9_; + LiveChartTimestampedValue _tmp10_; +#line 126 "../src/region.vala" + _tmp9_ = *current; +#line 126 "../src/region.vala" + _tmp10_ = _tmp9_.data; +#line 126 "../src/region.vala" + _tmp0_ = _tmp10_.value < self->priv->ceil; +#line 758 "region.c" + } else { +#line 126 "../src/region.vala" + _tmp0_ = FALSE; +#line 762 "region.c" + } +#line 126 "../src/region.vala" + result = _tmp0_; +#line 126 "../src/region.vala" + return result; +#line 768 "region.c" +} + +void +live_chart_region_get_line_color (LiveChartRegion* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 22 "../src/region.vala" + g_return_if_fail (self != NULL); +#line 22 "../src/region.vala" + _tmp0_ = self->priv->_line_color; +#line 22 "../src/region.vala" + *result = _tmp0_; +#line 22 "../src/region.vala" + return; +#line 784 "region.c" +} + +void +live_chart_region_set_line_color (LiveChartRegion* self, + GdkRGBA * value) +{ + GdkRGBA _tmp0_; +#line 22 "../src/region.vala" + g_return_if_fail (self != NULL); +#line 22 "../src/region.vala" + _tmp0_ = *value; +#line 22 "../src/region.vala" + self->priv->_line_color = _tmp0_; +#line 798 "region.c" +} + +void +live_chart_region_get_area_color (LiveChartRegion* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 23 "../src/region.vala" + g_return_if_fail (self != NULL); +#line 23 "../src/region.vala" + _tmp0_ = self->priv->_area_color; +#line 23 "../src/region.vala" + *result = _tmp0_; +#line 23 "../src/region.vala" + return; +#line 814 "region.c" +} + +void +live_chart_region_set_area_color (LiveChartRegion* self, + GdkRGBA * value) +{ + GdkRGBA _tmp0_; +#line 23 "../src/region.vala" + g_return_if_fail (self != NULL); +#line 23 "../src/region.vala" + _tmp0_ = *value; +#line 23 "../src/region.vala" + self->priv->_area_color = _tmp0_; +#line 828 "region.c" +} + +static void +live_chart_value_region_init (GValue* value) +{ +#line 18 "../src/region.vala" + value->data[0].v_pointer = NULL; +#line 836 "region.c" +} + +static void +live_chart_value_region_free_value (GValue* value) +{ +#line 18 "../src/region.vala" + if (value->data[0].v_pointer) { +#line 18 "../src/region.vala" + live_chart_region_unref (value->data[0].v_pointer); +#line 846 "region.c" + } +} + +static void +live_chart_value_region_copy_value (const GValue* src_value, + GValue* dest_value) +{ +#line 18 "../src/region.vala" + if (src_value->data[0].v_pointer) { +#line 18 "../src/region.vala" + dest_value->data[0].v_pointer = live_chart_region_ref (src_value->data[0].v_pointer); +#line 858 "region.c" + } else { +#line 18 "../src/region.vala" + dest_value->data[0].v_pointer = NULL; +#line 862 "region.c" + } +} + +static gpointer +live_chart_value_region_peek_pointer (const GValue* value) +{ +#line 18 "../src/region.vala" + return value->data[0].v_pointer; +#line 871 "region.c" +} + +static gchar* +live_chart_value_region_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ +#line 18 "../src/region.vala" + if (collect_values[0].v_pointer) { +#line 882 "region.c" + LiveChartRegion * object; + object = collect_values[0].v_pointer; +#line 18 "../src/region.vala" + if (object->parent_instance.g_class == NULL) { +#line 18 "../src/region.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 889 "region.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 18 "../src/region.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 893 "region.c" + } +#line 18 "../src/region.vala" + value->data[0].v_pointer = live_chart_region_ref (object); +#line 897 "region.c" + } else { +#line 18 "../src/region.vala" + value->data[0].v_pointer = NULL; +#line 901 "region.c" + } +#line 18 "../src/region.vala" + return NULL; +#line 905 "region.c" +} + +static gchar* +live_chart_value_region_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ + LiveChartRegion ** object_p; + object_p = collect_values[0].v_pointer; +#line 18 "../src/region.vala" + if (!object_p) { +#line 18 "../src/region.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 920 "region.c" + } +#line 18 "../src/region.vala" + if (!value->data[0].v_pointer) { +#line 18 "../src/region.vala" + *object_p = NULL; +#line 926 "region.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 18 "../src/region.vala" + *object_p = value->data[0].v_pointer; +#line 930 "region.c" + } else { +#line 18 "../src/region.vala" + *object_p = live_chart_region_ref (value->data[0].v_pointer); +#line 934 "region.c" + } +#line 18 "../src/region.vala" + return NULL; +#line 938 "region.c" +} + +GParamSpec* +live_chart_param_spec_region (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ + LiveChartParamSpecRegion* spec; +#line 18 "../src/region.vala" + g_return_val_if_fail (g_type_is_a (object_type, LIVE_CHART_TYPE_REGION), NULL); +#line 18 "../src/region.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 18 "../src/region.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 18 "../src/region.vala" + return G_PARAM_SPEC (spec); +#line 957 "region.c" +} + +gpointer +live_chart_value_get_region (const GValue* value) +{ +#line 18 "../src/region.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_REGION), NULL); +#line 18 "../src/region.vala" + return value->data[0].v_pointer; +#line 967 "region.c" +} + +void +live_chart_value_set_region (GValue* value, + gpointer v_object) +{ + LiveChartRegion * old; +#line 18 "../src/region.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_REGION)); +#line 18 "../src/region.vala" + old = value->data[0].v_pointer; +#line 18 "../src/region.vala" + if (v_object) { +#line 18 "../src/region.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_REGION)); +#line 18 "../src/region.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 18 "../src/region.vala" + value->data[0].v_pointer = v_object; +#line 18 "../src/region.vala" + live_chart_region_ref (value->data[0].v_pointer); +#line 989 "region.c" + } else { +#line 18 "../src/region.vala" + value->data[0].v_pointer = NULL; +#line 993 "region.c" + } +#line 18 "../src/region.vala" + if (old) { +#line 18 "../src/region.vala" + live_chart_region_unref (old); +#line 999 "region.c" + } +} + +void +live_chart_value_take_region (GValue* value, + gpointer v_object) +{ + LiveChartRegion * old; +#line 18 "../src/region.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_REGION)); +#line 18 "../src/region.vala" + old = value->data[0].v_pointer; +#line 18 "../src/region.vala" + if (v_object) { +#line 18 "../src/region.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_REGION)); +#line 18 "../src/region.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 18 "../src/region.vala" + value->data[0].v_pointer = v_object; +#line 1020 "region.c" + } else { +#line 18 "../src/region.vala" + value->data[0].v_pointer = NULL; +#line 1024 "region.c" + } +#line 18 "../src/region.vala" + if (old) { +#line 18 "../src/region.vala" + live_chart_region_unref (old); +#line 1030 "region.c" + } +} + +static void +live_chart_region_class_init (LiveChartRegionClass * klass, + gpointer klass_data) +{ +#line 18 "../src/region.vala" + live_chart_region_parent_class = g_type_class_peek_parent (klass); +#line 18 "../src/region.vala" + ((LiveChartRegionClass *) klass)->finalize = live_chart_region_finalize; +#line 18 "../src/region.vala" + g_type_class_adjust_private_offset (klass, &LiveChartRegion_private_offset); +#line 1044 "region.c" +} + +static void +live_chart_region_instance_init (LiveChartRegion * self, + gpointer klass) +{ + GdkRGBA _tmp0_ = {0}; + GdkRGBA _tmp1_ = {0}; +#line 18 "../src/region.vala" + self->priv = live_chart_region_get_instance_private (self); +#line 22 "../src/region.vala" + memset (&_tmp0_, 0, sizeof (GdkRGBA)); +#line 22 "../src/region.vala" + _tmp0_.red = (gdouble) 1; +#line 22 "../src/region.vala" + _tmp0_.green = (gdouble) 1; +#line 22 "../src/region.vala" + _tmp0_.blue = (gdouble) 1; +#line 22 "../src/region.vala" + _tmp0_.alpha = (gdouble) 1; +#line 22 "../src/region.vala" + self->priv->_line_color = _tmp0_; +#line 23 "../src/region.vala" + memset (&_tmp1_, 0, sizeof (GdkRGBA)); +#line 23 "../src/region.vala" + _tmp1_.red = (gdouble) 1; +#line 23 "../src/region.vala" + _tmp1_.green = (gdouble) 1; +#line 23 "../src/region.vala" + _tmp1_.blue = (gdouble) 1; +#line 23 "../src/region.vala" + _tmp1_.alpha = 0.5; +#line 23 "../src/region.vala" + self->priv->_area_color = _tmp1_; +#line 18 "../src/region.vala" + self->ref_count = 1; +#line 1081 "region.c" +} + +static void +live_chart_region_finalize (LiveChartRegion * obj) +{ + LiveChartRegion * self; +#line 18 "../src/region.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_REGION, LiveChartRegion); +#line 18 "../src/region.vala" + g_signal_handlers_destroy (self); +#line 1092 "region.c" +} + +static GType +live_chart_region_get_type_once (void) +{ + static const GTypeValueTable g_define_type_value_table = { live_chart_value_region_init, live_chart_value_region_free_value, live_chart_value_region_copy_value, live_chart_value_region_peek_pointer, "p", live_chart_value_region_collect_value, "p", live_chart_value_region_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (LiveChartRegionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_region_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartRegion), 0, (GInstanceInitFunc) live_chart_region_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType live_chart_region_type_id; + live_chart_region_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LiveChartRegion", &g_define_type_info, &g_define_type_fundamental_info, 0); + LiveChartRegion_private_offset = g_type_add_instance_private (live_chart_region_type_id, sizeof (LiveChartRegionPrivate)); + return live_chart_region_type_id; +} + +GType +live_chart_region_get_type (void) +{ + static volatile gsize live_chart_region_type_id__once = 0; + if (g_once_init_enter (&live_chart_region_type_id__once)) { + GType live_chart_region_type_id; + live_chart_region_type_id = live_chart_region_get_type_once (); + g_once_init_leave (&live_chart_region_type_id__once, live_chart_region_type_id); + } + return live_chart_region_type_id__once; +} + +gpointer +live_chart_region_ref (gpointer instance) +{ + LiveChartRegion * self; + self = instance; +#line 18 "../src/region.vala" + g_atomic_int_inc (&self->ref_count); +#line 18 "../src/region.vala" + return instance; +#line 1128 "region.c" +} + +void +live_chart_region_unref (gpointer instance) +{ + LiveChartRegion * self; + self = instance; +#line 18 "../src/region.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 18 "../src/region.vala" + LIVE_CHART_REGION_GET_CLASS (self)->finalize (self); +#line 18 "../src/region.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 1142 "region.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/serie.c b/iPDC/lib/liblivechart_static.a.p/serie.c new file mode 100644 index 0000000..bb030a9 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/serie.c @@ -0,0 +1,679 @@ +/* serie.c generated by valac 0.56.0, the Vala compiler + * generated from serie.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_SERIE_0_PROPERTY, + LIVE_CHART_SERIE_NAME_PROPERTY, + LIVE_CHART_SERIE_MAIN_COLOR_PROPERTY, + LIVE_CHART_SERIE_LINE_PROPERTY, + LIVE_CHART_SERIE_VISIBLE_PROPERTY, + LIVE_CHART_SERIE_NUM_PROPERTIES +}; +static GParamSpec* live_chart_serie_properties[LIVE_CHART_SERIE_NUM_PROPERTIES]; +#define _g_free0(var) (var = (g_free (var), NULL)) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +enum { + LIVE_CHART_SERIE_VALUE_ADDED_SIGNAL, + LIVE_CHART_SERIE_NUM_SIGNALS +}; +static guint live_chart_serie_signals[LIVE_CHART_SERIE_NUM_SIGNALS] = {0}; + +struct _LiveChartSeriePrivate { + gchar* _name; + gboolean _visible; + LiveChartSerieRenderer* renderer; +}; + +static gint LiveChartSerie_private_offset; +static gpointer live_chart_serie_parent_class = NULL; +static LiveChartColorableIface * live_chart_serie_live_chart_colorable_parent_iface = NULL; +static LiveChartDrawableIface * live_chart_serie_live_chart_drawable_parent_iface = NULL; + +static void live_chart_serie_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_serie_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static void live_chart_serie_finalize (GObject * obj); +static GType live_chart_serie_get_type_once (void); +static void _vala_live_chart_serie_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_serie_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_serie_get_instance_private (LiveChartSerie* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartSerie_private_offset); +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 38 "../src/serie.vala" + return self ? g_object_ref (self) : NULL; +#line 73 "serie.c" +} + +LiveChartSerie* +live_chart_serie_construct (GType object_type, + const gchar* name, + LiveChartSerieRenderer* renderer) +{ + LiveChartSerie * self = NULL; + LiveChartSerieRenderer* _tmp0_; +#line 36 "../src/serie.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 36 "../src/serie.vala" + g_return_val_if_fail (renderer != NULL, NULL); +#line 36 "../src/serie.vala" + self = (LiveChartSerie*) g_object_new (object_type, NULL); +#line 37 "../src/serie.vala" + live_chart_serie_set_name (self, name); +#line 38 "../src/serie.vala" + _tmp0_ = _g_object_ref0 (renderer); +#line 38 "../src/serie.vala" + _g_object_unref0 (self->priv->renderer); +#line 38 "../src/serie.vala" + self->priv->renderer = _tmp0_; +#line 36 "../src/serie.vala" + return self; +#line 99 "serie.c" +} + +LiveChartSerie* +live_chart_serie_new (const gchar* name, + LiveChartSerieRenderer* renderer) +{ +#line 36 "../src/serie.vala" + return live_chart_serie_construct (LIVE_CHART_TYPE_SERIE, name, renderer); +#line 108 "serie.c" +} + +static void +live_chart_serie_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartSerie * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 41 "../src/serie.vala" + self = (LiveChartSerie*) base; +#line 41 "../src/serie.vala" + g_return_if_fail (ctx != NULL); +#line 41 "../src/serie.vala" + g_return_if_fail (config != NULL); +#line 42 "../src/serie.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 42 "../src/serie.vala" + _tmp1_ = _tmp0_; +#line 42 "../src/serie.vala" + if (_tmp1_) { +#line 131 "serie.c" + LiveChartSerieRenderer* _tmp2_; +#line 43 "../src/serie.vala" + _tmp2_ = self->priv->renderer; +#line 43 "../src/serie.vala" + live_chart_serie_renderer_draw (_tmp2_, ctx, config); +#line 137 "serie.c" + } +} + +void +live_chart_serie_add (LiveChartSerie* self, + gdouble value) +{ + LiveChartSerieRenderer* _tmp0_; + LiveChartValues* _tmp1_; + LiveChartValues* _tmp2_; + LiveChartTimestampedValue _tmp3_ = {0}; +#line 47 "../src/serie.vala" + g_return_if_fail (self != NULL); +#line 48 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 48 "../src/serie.vala" + _tmp1_ = live_chart_serie_renderer_get_values (_tmp0_); +#line 48 "../src/serie.vala" + _tmp2_ = _tmp1_; +#line 48 "../src/serie.vala" + _tmp3_.timestamp = (gdouble) (g_get_real_time () / 1000); +#line 48 "../src/serie.vala" + _tmp3_.value = value; +#line 48 "../src/serie.vala" + live_chart_values_add (_tmp2_, &_tmp3_); +#line 48 "../src/serie.vala" + _g_object_unref0 (_tmp2_); +#line 49 "../src/serie.vala" + g_signal_emit (self, live_chart_serie_signals[LIVE_CHART_SERIE_VALUE_ADDED_SIGNAL], 0, value); +#line 167 "serie.c" +} + +void +live_chart_serie_add_with_timestamp (LiveChartSerie* self, + gdouble value, + gint64 timestamp) +{ + LiveChartSerieRenderer* _tmp0_; + LiveChartValues* _tmp1_; + LiveChartValues* _tmp2_; + LiveChartTimestampedValue _tmp3_ = {0}; +#line 52 "../src/serie.vala" + g_return_if_fail (self != NULL); +#line 53 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 53 "../src/serie.vala" + _tmp1_ = live_chart_serie_renderer_get_values (_tmp0_); +#line 53 "../src/serie.vala" + _tmp2_ = _tmp1_; +#line 53 "../src/serie.vala" + _tmp3_.timestamp = (gdouble) timestamp; +#line 53 "../src/serie.vala" + _tmp3_.value = value; +#line 53 "../src/serie.vala" + live_chart_values_add (_tmp2_, &_tmp3_); +#line 53 "../src/serie.vala" + _g_object_unref0 (_tmp2_); +#line 54 "../src/serie.vala" + g_signal_emit (self, live_chart_serie_signals[LIVE_CHART_SERIE_VALUE_ADDED_SIGNAL], 0, value); +#line 197 "serie.c" +} + +void +live_chart_serie_set_main_color (LiveChartSerie* self, + GdkRGBA* color) +{ + GdkRGBA _tmp0_; +#line 58 "../src/serie.vala" + g_return_if_fail (self != NULL); +#line 58 "../src/serie.vala" + g_return_if_fail (color != NULL); +#line 59 "../src/serie.vala" + _tmp0_ = *color; +#line 59 "../src/serie.vala" + live_chart_colorable_set_main_color ((LiveChartColorable*) self, &_tmp0_); +#line 213 "serie.c" +} + +void +live_chart_serie_get_main_color (LiveChartSerie* self, + GdkRGBA* result) +{ + GdkRGBA _tmp0_ = {0}; + GdkRGBA _tmp1_; +#line 63 "../src/serie.vala" + g_return_if_fail (self != NULL); +#line 64 "../src/serie.vala" + live_chart_colorable_get_main_color ((LiveChartColorable*) self, &_tmp0_); +#line 64 "../src/serie.vala" + _tmp1_ = _tmp0_; +#line 64 "../src/serie.vala" + *result = _tmp1_; +#line 64 "../src/serie.vala" + return; +#line 232 "serie.c" +} + +LiveChartValues* +live_chart_serie_get_values (LiveChartSerie* self) +{ + LiveChartSerieRenderer* _tmp0_; + LiveChartValues* _tmp1_; + LiveChartValues* result; +#line 67 "../src/serie.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 68 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 68 "../src/serie.vala" + _tmp1_ = live_chart_serie_renderer_get_values (_tmp0_); +#line 68 "../src/serie.vala" + result = _tmp1_; +#line 68 "../src/serie.vala" + return result; +#line 251 "serie.c" +} + +void +live_chart_serie_clear (LiveChartSerie* self) +{ + LiveChartSerieRenderer* _tmp0_; + LiveChartValues* _tmp1_; + LiveChartValues* _tmp2_; +#line 71 "../src/serie.vala" + g_return_if_fail (self != NULL); +#line 72 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 72 "../src/serie.vala" + _tmp1_ = live_chart_serie_renderer_get_values (_tmp0_); +#line 72 "../src/serie.vala" + _tmp2_ = _tmp1_; +#line 72 "../src/serie.vala" + gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp2_); +#line 72 "../src/serie.vala" + _g_object_unref0 (_tmp2_); +#line 272 "serie.c" +} + +static void +live_chart_serie_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartSerie * self; + LiveChartSerieRenderer* _tmp0_; + LiveChartBoundingBox _tmp1_ = {0}; +#line 75 "../src/serie.vala" + self = (LiveChartSerie*) base; +#line 76 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 76 "../src/serie.vala" + live_chart_drawable_get_bounding_box ((LiveChartDrawable*) _tmp0_, &_tmp1_); +#line 76 "../src/serie.vala" + *result = _tmp1_; +#line 76 "../src/serie.vala" + return; +#line 292 "serie.c" +} + +const gchar* +live_chart_serie_get_name (LiveChartSerie* self) +{ + const gchar* result; + const gchar* _tmp0_; +#line 7 "../src/serie.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 7 "../src/serie.vala" + _tmp0_ = self->priv->_name; +#line 7 "../src/serie.vala" + result = _tmp0_; +#line 7 "../src/serie.vala" + return result; +#line 308 "serie.c" +} + +void +live_chart_serie_set_name (LiveChartSerie* self, + const gchar* value) +{ + gchar* old_value; +#line 7 "../src/serie.vala" + g_return_if_fail (self != NULL); +#line 7 "../src/serie.vala" + old_value = live_chart_serie_get_name (self); +#line 7 "../src/serie.vala" + if (g_strcmp0 (value, old_value) != 0) { +#line 322 "serie.c" + gchar* _tmp0_; +#line 7 "../src/serie.vala" + _tmp0_ = g_strdup (value); +#line 7 "../src/serie.vala" + _g_free0 (self->priv->_name); +#line 7 "../src/serie.vala" + self->priv->_name = _tmp0_; +#line 7 "../src/serie.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_serie_properties[LIVE_CHART_SERIE_NAME_PROPERTY]); +#line 332 "serie.c" + } +} + +static void +live_chart_serie_real_get_main_color (LiveChartColorable* base, + GdkRGBA * result) +{ + LiveChartSerie* self; + LiveChartSerieRenderer* _tmp0_; + LiveChartPath* _tmp1_; + LiveChartPath* _tmp2_; + GdkRGBA _tmp3_ = {0}; + GdkRGBA _tmp4_; +#line 11 "../src/serie.vala" + self = (LiveChartSerie*) base; +#line 12 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 12 "../src/serie.vala" + _tmp1_ = live_chart_serie_renderer_get_line (_tmp0_); +#line 12 "../src/serie.vala" + _tmp2_ = _tmp1_; +#line 12 "../src/serie.vala" + live_chart_path_get_color (_tmp2_, &_tmp3_); +#line 12 "../src/serie.vala" + _tmp4_ = _tmp3_; +#line 12 "../src/serie.vala" + *result = _tmp4_; +#line 12 "../src/serie.vala" + return; +#line 362 "serie.c" +} + +static void +live_chart_serie_real_set_main_color (LiveChartColorable* base, + GdkRGBA * value) +{ + LiveChartSerie* self; + LiveChartSerieRenderer* _tmp0_; + LiveChartPath* _tmp1_; + LiveChartPath* _tmp2_; + GdkRGBA _tmp3_; +#line 15 "../src/serie.vala" + self = (LiveChartSerie*) base; +#line 16 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 16 "../src/serie.vala" + _tmp1_ = live_chart_serie_renderer_get_line (_tmp0_); +#line 16 "../src/serie.vala" + _tmp2_ = _tmp1_; +#line 16 "../src/serie.vala" + _tmp3_ = *value; +#line 16 "../src/serie.vala" + live_chart_path_set_color (_tmp2_, &_tmp3_); +#line 15 "../src/serie.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_serie_properties[LIVE_CHART_SERIE_MAIN_COLOR_PROPERTY]); +#line 388 "serie.c" +} + +LiveChartPath* +live_chart_serie_get_line (LiveChartSerie* self) +{ + LiveChartPath* result; + LiveChartSerieRenderer* _tmp0_; + LiveChartPath* _tmp1_; + LiveChartPath* _tmp2_; +#line 21 "../src/serie.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 22 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 22 "../src/serie.vala" + _tmp1_ = live_chart_serie_renderer_get_line (_tmp0_); +#line 22 "../src/serie.vala" + _tmp2_ = _tmp1_; +#line 22 "../src/serie.vala" + result = _tmp2_; +#line 22 "../src/serie.vala" + return result; +#line 410 "serie.c" +} + +void +live_chart_serie_set_line (LiveChartSerie* self, + LiveChartPath* value) +{ + LiveChartSerieRenderer* _tmp0_; +#line 25 "../src/serie.vala" + g_return_if_fail (self != NULL); +#line 26 "../src/serie.vala" + _tmp0_ = self->priv->renderer; +#line 26 "../src/serie.vala" + live_chart_serie_renderer_set_line (_tmp0_, value); +#line 25 "../src/serie.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_serie_properties[LIVE_CHART_SERIE_LINE_PROPERTY]); +#line 426 "serie.c" +} + +static gboolean +live_chart_serie_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartSerie* self; +#line 30 "../src/serie.vala" + self = (LiveChartSerie*) base; +#line 30 "../src/serie.vala" + result = self->priv->_visible; +#line 30 "../src/serie.vala" + return result; +#line 440 "serie.c" +} + +static void +live_chart_serie_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartSerie* self; + gboolean old_value; +#line 30 "../src/serie.vala" + self = (LiveChartSerie*) base; +#line 30 "../src/serie.vala" + old_value = live_chart_serie_real_get_visible (base); +#line 30 "../src/serie.vala" + if (old_value != value) { +#line 30 "../src/serie.vala" + self->priv->_visible = value; +#line 30 "../src/serie.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_serie_properties[LIVE_CHART_SERIE_VISIBLE_PROPERTY]); +#line 459 "serie.c" + } +} + +static void +live_chart_serie_class_init (LiveChartSerieClass * klass, + gpointer klass_data) +{ +#line 4 "../src/serie.vala" + live_chart_serie_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/serie.vala" + g_type_class_adjust_private_offset (klass, &LiveChartSerie_private_offset); +#line 4 "../src/serie.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_serie_get_property; +#line 4 "../src/serie.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_serie_set_property; +#line 4 "../src/serie.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_serie_finalize; +#line 4 "../src/serie.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SERIE_NAME_PROPERTY, live_chart_serie_properties[LIVE_CHART_SERIE_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 4 "../src/serie.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SERIE_MAIN_COLOR_PROPERTY, live_chart_serie_properties[LIVE_CHART_SERIE_MAIN_COLOR_PROPERTY] = g_param_spec_boxed ("main-color", "main-color", "main-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 4 "../src/serie.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SERIE_LINE_PROPERTY, live_chart_serie_properties[LIVE_CHART_SERIE_LINE_PROPERTY] = g_param_spec_object ("line", "line", "line", LIVE_CHART_TYPE_PATH, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 4 "../src/serie.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SERIE_VISIBLE_PROPERTY, live_chart_serie_properties[LIVE_CHART_SERIE_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 4 "../src/serie.vala" + live_chart_serie_signals[LIVE_CHART_SERIE_VALUE_ADDED_SIGNAL] = g_signal_new ("value-added", LIVE_CHART_TYPE_SERIE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); +#line 487 "serie.c" +} + +static void +live_chart_serie_live_chart_colorable_interface_init (LiveChartColorableIface * iface, + gpointer iface_data) +{ +#line 4 "../src/serie.vala" + live_chart_serie_live_chart_colorable_parent_iface = g_type_interface_peek_parent (iface); +#line 4 "../src/serie.vala" + iface->get_main_color = live_chart_serie_real_get_main_color; +#line 4 "../src/serie.vala" + iface->set_main_color = live_chart_serie_real_set_main_color; +#line 500 "serie.c" +} + +static void +live_chart_serie_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 4 "../src/serie.vala" + live_chart_serie_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 4 "../src/serie.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_serie_real_draw; +#line 4 "../src/serie.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_serie_real_get_bounding_box; +#line 4 "../src/serie.vala" + iface->get_visible = live_chart_serie_real_get_visible; +#line 4 "../src/serie.vala" + iface->set_visible = live_chart_serie_real_set_visible; +#line 517 "serie.c" +} + +static void +live_chart_serie_instance_init (LiveChartSerie * self, + gpointer klass) +{ +#line 4 "../src/serie.vala" + self->priv = live_chart_serie_get_instance_private (self); +#line 30 "../src/serie.vala" + self->priv->_visible = TRUE; +#line 528 "serie.c" +} + +static void +live_chart_serie_finalize (GObject * obj) +{ + LiveChartSerie * self; +#line 4 "../src/serie.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_SERIE, LiveChartSerie); +#line 6 "../src/serie.vala" + _g_free0 (self->priv->_name); +#line 34 "../src/serie.vala" + _g_object_unref0 (self->priv->renderer); +#line 4 "../src/serie.vala" + G_OBJECT_CLASS (live_chart_serie_parent_class)->finalize (obj); +#line 543 "serie.c" +} + +static GType +live_chart_serie_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartSerieClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_serie_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartSerie), 0, (GInstanceInitFunc) live_chart_serie_instance_init, NULL }; + static const GInterfaceInfo live_chart_colorable_info = { (GInterfaceInitFunc) live_chart_serie_live_chart_colorable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_serie_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_serie_type_id; + live_chart_serie_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartSerie", &g_define_type_info, 0); + g_type_add_interface_static (live_chart_serie_type_id, LIVE_CHART_TYPE_COLORABLE, &live_chart_colorable_info); + g_type_add_interface_static (live_chart_serie_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartSerie_private_offset = g_type_add_instance_private (live_chart_serie_type_id, sizeof (LiveChartSeriePrivate)); + return live_chart_serie_type_id; +} + +GType +live_chart_serie_get_type (void) +{ + static volatile gsize live_chart_serie_type_id__once = 0; + if (g_once_init_enter (&live_chart_serie_type_id__once)) { + GType live_chart_serie_type_id; + live_chart_serie_type_id = live_chart_serie_get_type_once (); + g_once_init_leave (&live_chart_serie_type_id__once, live_chart_serie_type_id); + } + return live_chart_serie_type_id__once; +} + +static void +_vala_live_chart_serie_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartSerie * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_SERIE, LiveChartSerie); +#line 4 "../src/serie.vala" + switch (property_id) { +#line 4 "../src/serie.vala" + case LIVE_CHART_SERIE_NAME_PROPERTY: +#line 4 "../src/serie.vala" + g_value_set_string (value, live_chart_serie_get_name (self)); +#line 4 "../src/serie.vala" + break; +#line 4 "../src/serie.vala" + case LIVE_CHART_SERIE_MAIN_COLOR_PROPERTY: +#line 590 "serie.c" + { + GdkRGBA boxed; +#line 4 "../src/serie.vala" + live_chart_colorable_get_main_color ((LiveChartColorable*) self, &boxed); +#line 4 "../src/serie.vala" + g_value_set_boxed (value, &boxed); +#line 597 "serie.c" + } +#line 4 "../src/serie.vala" + break; +#line 4 "../src/serie.vala" + case LIVE_CHART_SERIE_LINE_PROPERTY: +#line 4 "../src/serie.vala" + g_value_set_object (value, live_chart_serie_get_line (self)); +#line 4 "../src/serie.vala" + break; +#line 4 "../src/serie.vala" + case LIVE_CHART_SERIE_VISIBLE_PROPERTY: +#line 4 "../src/serie.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 4 "../src/serie.vala" + break; +#line 613 "serie.c" + default: +#line 4 "../src/serie.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/serie.vala" + break; +#line 619 "serie.c" + } +} + +static void +_vala_live_chart_serie_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartSerie * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_SERIE, LiveChartSerie); +#line 4 "../src/serie.vala" + switch (property_id) { +#line 4 "../src/serie.vala" + case LIVE_CHART_SERIE_NAME_PROPERTY: +#line 4 "../src/serie.vala" + live_chart_serie_set_name (self, g_value_get_string (value)); +#line 4 "../src/serie.vala" + break; +#line 4 "../src/serie.vala" + case LIVE_CHART_SERIE_MAIN_COLOR_PROPERTY: +#line 4 "../src/serie.vala" + live_chart_colorable_set_main_color ((LiveChartColorable*) self, g_value_get_boxed (value)); +#line 4 "../src/serie.vala" + break; +#line 4 "../src/serie.vala" + case LIVE_CHART_SERIE_LINE_PROPERTY: +#line 4 "../src/serie.vala" + live_chart_serie_set_line (self, g_value_get_object (value)); +#line 4 "../src/serie.vala" + break; +#line 4 "../src/serie.vala" + case LIVE_CHART_SERIE_VISIBLE_PROPERTY: +#line 4 "../src/serie.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 4 "../src/serie.vala" + break; +#line 657 "serie.c" + default: +#line 4 "../src/serie.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/serie.vala" + break; +#line 663 "serie.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/serie_renderer.c b/iPDC/lib/liblivechart_static.a.p/serie_renderer.c new file mode 100644 index 0000000..66180c8 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/serie_renderer.c @@ -0,0 +1,549 @@ +/* serie_renderer.c generated by valac 0.56.0, the Vala compiler + * generated from serie_renderer.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#define LIVE_CHART_SERIE_RENDERER_VIRTUAL_LEFT_PADDING -200 + +enum { + LIVE_CHART_SERIE_RENDERER_0_PROPERTY, + LIVE_CHART_SERIE_RENDERER_VISIBLE_PROPERTY, + LIVE_CHART_SERIE_RENDERER_MAIN_COLOR_PROPERTY, + LIVE_CHART_SERIE_RENDERER_LINE_PROPERTY, + LIVE_CHART_SERIE_RENDERER_NUM_PROPERTIES +}; +static GParamSpec* live_chart_serie_renderer_properties[LIVE_CHART_SERIE_RENDERER_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _LiveChartSerieRendererPrivate { + gboolean _visible; + LiveChartPath* _line; +}; + +static gint LiveChartSerieRenderer_private_offset; +static gpointer live_chart_serie_renderer_parent_class = NULL; +static LiveChartDrawableIface * live_chart_serie_renderer_live_chart_drawable_parent_iface = NULL; + +static void live_chart_serie_renderer_real_draw (LiveChartSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_serie_renderer_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static void live_chart_serie_renderer_finalize (GObject * obj); +static GType live_chart_serie_renderer_get_type_once (void); +static void _vala_live_chart_serie_renderer_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_serie_renderer_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_serie_renderer_get_instance_private (LiveChartSerieRenderer* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartSerieRenderer_private_offset); +} + +LiveChartSerieRenderer* +live_chart_serie_renderer_construct (GType object_type) +{ + LiveChartSerieRenderer * self = NULL; + GdkRGBA _tmp0_ = {0}; + LiveChartPath* _tmp1_; + LiveChartPath* _tmp2_; +#line 23 "../src/serie_renderer.vala" + self = (LiveChartSerieRenderer*) g_object_new (object_type, NULL); +#line 24 "../src/serie_renderer.vala" + _tmp0_.red = 1.0; +#line 24 "../src/serie_renderer.vala" + _tmp0_.green = 1.0; +#line 24 "../src/serie_renderer.vala" + _tmp0_.blue = 1.0; +#line 24 "../src/serie_renderer.vala" + _tmp0_.alpha = 1.0; +#line 24 "../src/serie_renderer.vala" + _tmp1_ = live_chart_path_new ((gdouble) 1, &_tmp0_, TRUE, NULL); +#line 24 "../src/serie_renderer.vala" + _tmp2_ = _tmp1_; +#line 24 "../src/serie_renderer.vala" + live_chart_serie_renderer_set_line (self, _tmp2_); +#line 24 "../src/serie_renderer.vala" + _g_object_unref0 (_tmp2_); +#line 23 "../src/serie_renderer.vala" + return self; +#line 88 "serie_renderer.c" +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 36 "../src/serie_renderer.vala" + return self ? g_object_ref (self) : NULL; +#line 96 "serie_renderer.c" +} + +LiveChartValues* +live_chart_serie_renderer_get_values (LiveChartSerieRenderer* self) +{ + LiveChartValues* _tmp0_; + LiveChartValues* _tmp1_; + LiveChartValues* result; +#line 35 "../src/serie_renderer.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 36 "../src/serie_renderer.vala" + _tmp0_ = self->values; +#line 36 "../src/serie_renderer.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 36 "../src/serie_renderer.vala" + result = _tmp1_; +#line 36 "../src/serie_renderer.vala" + return result; +#line 115 "serie_renderer.c" +} + +static void +live_chart_serie_renderer_real_draw (LiveChartSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config) +{ +#line 39 "../src/serie_renderer.vala" + g_critical ("Type `%s' does not implement abstract method `live_chart_serie_renderer_draw'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 39 "../src/serie_renderer.vala" + return; +#line 127 "serie_renderer.c" +} + +void +live_chart_serie_renderer_draw (LiveChartSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartSerieRendererClass* _klass_; +#line 39 "../src/serie_renderer.vala" + g_return_if_fail (self != NULL); +#line 39 "../src/serie_renderer.vala" + _klass_ = LIVE_CHART_SERIE_RENDERER_GET_CLASS (self); +#line 39 "../src/serie_renderer.vala" + if (_klass_->draw) { +#line 39 "../src/serie_renderer.vala" + _klass_->draw (self, ctx, config); +#line 144 "serie_renderer.c" + } +} + +static void +live_chart_serie_renderer_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartSerieRenderer * self; + LiveChartBoundingBox _tmp0_; +#line 41 "../src/serie_renderer.vala" + self = (LiveChartSerieRenderer*) base; +#line 42 "../src/serie_renderer.vala" + _tmp0_ = self->bounding_box; +#line 42 "../src/serie_renderer.vala" + *result = _tmp0_; +#line 42 "../src/serie_renderer.vala" + return; +#line 162 "serie_renderer.c" +} + +void +live_chart_serie_renderer_debug (LiveChartSerieRenderer* self, + cairo_t* ctx) +{ + gchar* debug = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; +#line 45 "../src/serie_renderer.vala" + g_return_if_fail (self != NULL); +#line 45 "../src/serie_renderer.vala" + g_return_if_fail (ctx != NULL); +#line 46 "../src/serie_renderer.vala" + _tmp0_ = g_getenv ("LIVE_CHART_DEBUG"); +#line 46 "../src/serie_renderer.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 46 "../src/serie_renderer.vala" + debug = _tmp1_; +#line 47 "../src/serie_renderer.vala" + _tmp2_ = debug; +#line 47 "../src/serie_renderer.vala" + if (_tmp2_ != NULL) { +#line 187 "serie_renderer.c" + LiveChartBoundingBox _tmp3_; + LiveChartBoundingBox _tmp4_; + LiveChartBoundingBox _tmp5_; + LiveChartBoundingBox _tmp6_; +#line 48 "../src/serie_renderer.vala" + _tmp3_ = self->bounding_box; +#line 48 "../src/serie_renderer.vala" + _tmp4_ = self->bounding_box; +#line 48 "../src/serie_renderer.vala" + _tmp5_ = self->bounding_box; +#line 48 "../src/serie_renderer.vala" + _tmp6_ = self->bounding_box; +#line 48 "../src/serie_renderer.vala" + cairo_rectangle (ctx, _tmp3_.x, _tmp4_.y, _tmp5_.width, _tmp6_.height); +#line 49 "../src/serie_renderer.vala" + cairo_stroke (ctx); +#line 204 "serie_renderer.c" + } +#line 45 "../src/serie_renderer.vala" + _g_free0 (debug); +#line 208 "serie_renderer.c" +} + +gboolean +live_chart_serie_renderer_is_out_of_area (LiveChartSerieRenderer* self, + LiveChartPoint* point) +{ + LiveChartPoint _tmp0_; + gboolean result; +#line 53 "../src/serie_renderer.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 53 "../src/serie_renderer.vala" + g_return_val_if_fail (point != NULL, FALSE); +#line 54 "../src/serie_renderer.vala" + _tmp0_ = *point; +#line 54 "../src/serie_renderer.vala" + result = _tmp0_.x < ((gdouble) LIVE_CHART_SERIE_RENDERER_VIRTUAL_LEFT_PADDING); +#line 54 "../src/serie_renderer.vala" + return result; +#line 227 "serie_renderer.c" +} + +static gboolean +live_chart_serie_renderer_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartSerieRenderer* self; +#line 9 "../src/serie_renderer.vala" + self = (LiveChartSerieRenderer*) base; +#line 9 "../src/serie_renderer.vala" + result = self->priv->_visible; +#line 9 "../src/serie_renderer.vala" + return result; +#line 241 "serie_renderer.c" +} + +static void +live_chart_serie_renderer_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartSerieRenderer* self; + gboolean old_value; +#line 9 "../src/serie_renderer.vala" + self = (LiveChartSerieRenderer*) base; +#line 9 "../src/serie_renderer.vala" + old_value = live_chart_serie_renderer_real_get_visible (base); +#line 9 "../src/serie_renderer.vala" + if (old_value != value) { +#line 9 "../src/serie_renderer.vala" + self->priv->_visible = value; +#line 9 "../src/serie_renderer.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_serie_renderer_properties[LIVE_CHART_SERIE_RENDERER_VISIBLE_PROPERTY]); +#line 260 "serie_renderer.c" + } +} + +void +live_chart_serie_renderer_get_main_color (LiveChartSerieRenderer* self, + GdkRGBA * result) +{ + LiveChartPath* _tmp0_; + GdkRGBA _tmp1_ = {0}; + GdkRGBA _tmp2_; +#line 13 "../src/serie_renderer.vala" + g_return_if_fail (self != NULL); +#line 14 "../src/serie_renderer.vala" + _tmp0_ = self->priv->_line; +#line 14 "../src/serie_renderer.vala" + live_chart_path_get_color (_tmp0_, &_tmp1_); +#line 14 "../src/serie_renderer.vala" + _tmp2_ = _tmp1_; +#line 14 "../src/serie_renderer.vala" + *result = _tmp2_; +#line 14 "../src/serie_renderer.vala" + return; +#line 283 "serie_renderer.c" +} + +void +live_chart_serie_renderer_set_main_color (LiveChartSerieRenderer* self, + GdkRGBA * value) +{ + LiveChartPath* _tmp0_; + GdkRGBA _tmp1_; +#line 17 "../src/serie_renderer.vala" + g_return_if_fail (self != NULL); +#line 18 "../src/serie_renderer.vala" + _tmp0_ = self->priv->_line; +#line 18 "../src/serie_renderer.vala" + _tmp1_ = *value; +#line 18 "../src/serie_renderer.vala" + live_chart_path_set_color (_tmp0_, &_tmp1_); +#line 17 "../src/serie_renderer.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_serie_renderer_properties[LIVE_CHART_SERIE_RENDERER_MAIN_COLOR_PROPERTY]); +#line 302 "serie_renderer.c" +} + +LiveChartPath* +live_chart_serie_renderer_get_line (LiveChartSerieRenderer* self) +{ + LiveChartPath* result; + LiveChartPath* _tmp0_; +#line 21 "../src/serie_renderer.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 21 "../src/serie_renderer.vala" + _tmp0_ = self->priv->_line; +#line 21 "../src/serie_renderer.vala" + result = _tmp0_; +#line 21 "../src/serie_renderer.vala" + return result; +#line 318 "serie_renderer.c" +} + +void +live_chart_serie_renderer_set_line (LiveChartSerieRenderer* self, + LiveChartPath* value) +{ + LiveChartPath* old_value; +#line 21 "../src/serie_renderer.vala" + g_return_if_fail (self != NULL); +#line 21 "../src/serie_renderer.vala" + old_value = live_chart_serie_renderer_get_line (self); +#line 21 "../src/serie_renderer.vala" + if (old_value != value) { +#line 332 "serie_renderer.c" + LiveChartPath* _tmp0_; +#line 21 "../src/serie_renderer.vala" + _tmp0_ = _g_object_ref0 (value); +#line 21 "../src/serie_renderer.vala" + _g_object_unref0 (self->priv->_line); +#line 21 "../src/serie_renderer.vala" + self->priv->_line = _tmp0_; +#line 21 "../src/serie_renderer.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_serie_renderer_properties[LIVE_CHART_SERIE_RENDERER_LINE_PROPERTY]); +#line 342 "serie_renderer.c" + } +} + +static void +live_chart_serie_renderer_class_init (LiveChartSerieRendererClass * klass, + gpointer klass_data) +{ +#line 5 "../src/serie_renderer.vala" + live_chart_serie_renderer_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/serie_renderer.vala" + g_type_class_adjust_private_offset (klass, &LiveChartSerieRenderer_private_offset); +#line 5 "../src/serie_renderer.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_serie_renderer_real_draw; +#line 5 "../src/serie_renderer.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_serie_renderer_get_property; +#line 5 "../src/serie_renderer.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_serie_renderer_set_property; +#line 5 "../src/serie_renderer.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_serie_renderer_finalize; +#line 5 "../src/serie_renderer.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SERIE_RENDERER_VISIBLE_PROPERTY, live_chart_serie_renderer_properties[LIVE_CHART_SERIE_RENDERER_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 5 "../src/serie_renderer.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SERIE_RENDERER_MAIN_COLOR_PROPERTY, live_chart_serie_renderer_properties[LIVE_CHART_SERIE_RENDERER_MAIN_COLOR_PROPERTY] = g_param_spec_boxed ("main-color", "main-color", "main-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_DEPRECATED)); +#line 5 "../src/serie_renderer.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SERIE_RENDERER_LINE_PROPERTY, live_chart_serie_renderer_properties[LIVE_CHART_SERIE_RENDERER_LINE_PROPERTY] = g_param_spec_object ("line", "line", "line", LIVE_CHART_TYPE_PATH, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 368 "serie_renderer.c" +} + +static void +live_chart_serie_renderer_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 5 "../src/serie_renderer.vala" + live_chart_serie_renderer_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 5 "../src/serie_renderer.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_serie_renderer_draw; +#line 5 "../src/serie_renderer.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_serie_renderer_real_get_bounding_box; +#line 5 "../src/serie_renderer.vala" + iface->get_visible = live_chart_serie_renderer_real_get_visible; +#line 5 "../src/serie_renderer.vala" + iface->set_visible = live_chart_serie_renderer_real_set_visible; +#line 385 "serie_renderer.c" +} + +static void +live_chart_serie_renderer_instance_init (LiveChartSerieRenderer * self, + gpointer klass) +{ + LiveChartBoundingBox _tmp0_ = {0}; +#line 5 "../src/serie_renderer.vala" + self->priv = live_chart_serie_renderer_get_instance_private (self); +#line 9 "../src/serie_renderer.vala" + self->priv->_visible = TRUE; +#line 27 "../src/serie_renderer.vala" + memset (&_tmp0_, 0, sizeof (LiveChartBoundingBox)); +#line 27 "../src/serie_renderer.vala" + _tmp0_.x = (gdouble) 0; +#line 27 "../src/serie_renderer.vala" + _tmp0_.y = (gdouble) 0; +#line 27 "../src/serie_renderer.vala" + _tmp0_.width = (gdouble) 0; +#line 27 "../src/serie_renderer.vala" + _tmp0_.height = (gdouble) 0; +#line 27 "../src/serie_renderer.vala" + self->bounding_box = _tmp0_; +#line 409 "serie_renderer.c" +} + +static void +live_chart_serie_renderer_finalize (GObject * obj) +{ + LiveChartSerieRenderer * self; +#line 5 "../src/serie_renderer.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRenderer); +#line 21 "../src/serie_renderer.vala" + _g_object_unref0 (self->priv->_line); +#line 34 "../src/serie_renderer.vala" + _g_object_unref0 (self->values); +#line 5 "../src/serie_renderer.vala" + G_OBJECT_CLASS (live_chart_serie_renderer_parent_class)->finalize (obj); +#line 424 "serie_renderer.c" +} + +static GType +live_chart_serie_renderer_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartSerieRendererClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_serie_renderer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartSerieRenderer), 0, (GInstanceInitFunc) live_chart_serie_renderer_instance_init, NULL }; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_serie_renderer_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_serie_renderer_type_id; + live_chart_serie_renderer_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartSerieRenderer", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_type_add_interface_static (live_chart_serie_renderer_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartSerieRenderer_private_offset = g_type_add_instance_private (live_chart_serie_renderer_type_id, sizeof (LiveChartSerieRendererPrivate)); + return live_chart_serie_renderer_type_id; +} + +GType +live_chart_serie_renderer_get_type (void) +{ + static volatile gsize live_chart_serie_renderer_type_id__once = 0; + if (g_once_init_enter (&live_chart_serie_renderer_type_id__once)) { + GType live_chart_serie_renderer_type_id; + live_chart_serie_renderer_type_id = live_chart_serie_renderer_get_type_once (); + g_once_init_leave (&live_chart_serie_renderer_type_id__once, live_chart_serie_renderer_type_id); + } + return live_chart_serie_renderer_type_id__once; +} + +static void +_vala_live_chart_serie_renderer_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartSerieRenderer * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRenderer); +#line 5 "../src/serie_renderer.vala" + switch (property_id) { +#line 5 "../src/serie_renderer.vala" + case LIVE_CHART_SERIE_RENDERER_VISIBLE_PROPERTY: +#line 5 "../src/serie_renderer.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 5 "../src/serie_renderer.vala" + break; +#line 5 "../src/serie_renderer.vala" + case LIVE_CHART_SERIE_RENDERER_MAIN_COLOR_PROPERTY: +#line 469 "serie_renderer.c" + { + GdkRGBA boxed; +#line 5 "../src/serie_renderer.vala" + live_chart_serie_renderer_get_main_color (self, &boxed); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#line 475 "serie_renderer.c" + g_value_set_boxed (value, &boxed); +G_GNUC_END_IGNORE_DEPRECATIONS + } +#line 5 "../src/serie_renderer.vala" + break; +#line 5 "../src/serie_renderer.vala" + case LIVE_CHART_SERIE_RENDERER_LINE_PROPERTY: +#line 5 "../src/serie_renderer.vala" + g_value_set_object (value, live_chart_serie_renderer_get_line (self)); +#line 5 "../src/serie_renderer.vala" + break; +#line 487 "serie_renderer.c" + default: +#line 5 "../src/serie_renderer.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 5 "../src/serie_renderer.vala" + break; +#line 493 "serie_renderer.c" + } +} + +static void +_vala_live_chart_serie_renderer_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartSerieRenderer * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRenderer); +#line 5 "../src/serie_renderer.vala" + switch (property_id) { +#line 5 "../src/serie_renderer.vala" + case LIVE_CHART_SERIE_RENDERER_VISIBLE_PROPERTY: +#line 5 "../src/serie_renderer.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 5 "../src/serie_renderer.vala" + break; +#line 5 "../src/serie_renderer.vala" + case LIVE_CHART_SERIE_RENDERER_MAIN_COLOR_PROPERTY: +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#line 516 "serie_renderer.c" + live_chart_serie_renderer_set_main_color (self, g_value_get_boxed (value)); +G_GNUC_END_IGNORE_DEPRECATIONS +#line 5 "../src/serie_renderer.vala" + break; +#line 5 "../src/serie_renderer.vala" + case LIVE_CHART_SERIE_RENDERER_LINE_PROPERTY: +#line 5 "../src/serie_renderer.vala" + live_chart_serie_renderer_set_line (self, g_value_get_object (value)); +#line 5 "../src/serie_renderer.vala" + break; +#line 527 "serie_renderer.c" + default: +#line 5 "../src/serie_renderer.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 5 "../src/serie_renderer.vala" + break; +#line 533 "serie_renderer.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/series.c b/iPDC/lib/liblivechart_static.a.p/series.c new file mode 100644 index 0000000..cc35ff8 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/series.c @@ -0,0 +1,491 @@ +/* series.c generated by valac 0.56.0, the Vala compiler + * generated from series.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_SERIES_0_PROPERTY, + LIVE_CHART_SERIES_NUM_PROPERTIES +}; +static GParamSpec* live_chart_series_properties[LIVE_CHART_SERIES_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _live_chart_timestamped_value_free0(var) ((var == NULL) ? NULL : (var = (live_chart_timestamped_value_free (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _LiveChartSeriesPrivate { + GeeArrayList* series; + LiveChartChart* chart; +}; + +static gint LiveChartSeries_private_offset; +static gpointer live_chart_series_parent_class = NULL; + +static gboolean __lambda7_ (LiveChartSeries* self, + LiveChartTimestampedValue* value); +static gboolean ___lambda7__gee_forall_func (gpointer g, + gpointer self); +static void __lambda8_ (LiveChartSeries* self, + gdouble value); +static void ___lambda8__live_chart_serie_value_added (LiveChartSerie* _sender, + gdouble value, + gpointer self); +static void live_chart_series_finalize (GObject * obj); +static GType live_chart_series_get_type_once (void); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_series_get_instance_private (LiveChartSeries* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartSeries_private_offset); +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 10 "../src/series.vala" + return self ? g_object_ref (self) : NULL; +#line 56 "series.c" +} + +LiveChartSeries* +live_chart_series_construct (GType object_type, + LiveChartChart* chart) +{ + LiveChartSeries * self = NULL; + LiveChartChart* _tmp0_; +#line 9 "../src/series.vala" + g_return_val_if_fail (chart != NULL, NULL); +#line 9 "../src/series.vala" + self = (LiveChartSeries*) g_object_new (object_type, NULL); +#line 10 "../src/series.vala" + _tmp0_ = _g_object_ref0 (chart); +#line 10 "../src/series.vala" + _g_object_unref0 (self->priv->chart); +#line 10 "../src/series.vala" + self->priv->chart = _tmp0_; +#line 9 "../src/series.vala" + return self; +#line 77 "series.c" +} + +LiveChartSeries* +live_chart_series_new (LiveChartChart* chart) +{ +#line 9 "../src/series.vala" + return live_chart_series_construct (LIVE_CHART_TYPE_SERIES, chart); +#line 85 "series.c" +} + +static gboolean +__lambda7_ (LiveChartSeries* self, + LiveChartTimestampedValue* value) +{ + LiveChartChart* _tmp0_; + LiveChartConfig* _tmp1_; + LiveChartYAxis* _tmp2_; + gboolean result; +#line 16 "../src/series.vala" + _tmp0_ = self->priv->chart; +#line 16 "../src/series.vala" + _tmp1_ = _tmp0_->config; +#line 16 "../src/series.vala" + _tmp2_ = _tmp1_->y_axis; +#line 16 "../src/series.vala" + live_chart_yaxis_update_bounds (_tmp2_, (*value).value); +#line 16 "../src/series.vala" + result = TRUE; +#line 16 "../src/series.vala" + _live_chart_timestamped_value_free0 (value); +#line 16 "../src/series.vala" + return result; +#line 110 "series.c" +} + +static gboolean +___lambda7__gee_forall_func (gpointer g, + gpointer self) +{ + gboolean result; + result = __lambda7_ ((LiveChartSeries*) self, (LiveChartTimestampedValue*) g); +#line 16 "../src/series.vala" + return result; +#line 121 "series.c" +} + +static void +__lambda8_ (LiveChartSeries* self, + gdouble value) +{ + LiveChartChart* _tmp0_; + LiveChartConfig* _tmp1_; + LiveChartYAxis* _tmp2_; +#line 20 "../src/series.vala" + _tmp0_ = self->priv->chart; +#line 20 "../src/series.vala" + _tmp1_ = _tmp0_->config; +#line 20 "../src/series.vala" + _tmp2_ = _tmp1_->y_axis; +#line 20 "../src/series.vala" + live_chart_yaxis_update_bounds (_tmp2_, value); +#line 139 "series.c" +} + +static void +___lambda8__live_chart_serie_value_added (LiveChartSerie* _sender, + gdouble value, + gpointer self) +{ +#line 19 "../src/series.vala" + __lambda8_ ((LiveChartSeries*) self, value); +#line 149 "series.c" +} + +LiveChartSerie* +live_chart_series_register (LiveChartSeries* self, + LiveChartSerie* serie) +{ + GeeArrayList* _tmp0_; + LiveChartValues* _tmp1_; + LiveChartValues* _tmp2_; + LiveChartChart* _tmp3_; + LiveChartLegend* _tmp4_; + LiveChartLegend* _tmp5_; + LiveChartSerie* _tmp9_; + LiveChartSerie* result; +#line 13 "../src/series.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 13 "../src/series.vala" + g_return_val_if_fail (serie != NULL, NULL); +#line 14 "../src/series.vala" + _tmp0_ = self->priv->series; +#line 14 "../src/series.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, serie); +#line 16 "../src/series.vala" + _tmp1_ = live_chart_serie_get_values (serie); +#line 16 "../src/series.vala" + _tmp2_ = _tmp1_; +#line 16 "../src/series.vala" + gee_abstract_collection_foreach ((GeeAbstractCollection*) _tmp2_, ___lambda7__gee_forall_func, self); +#line 16 "../src/series.vala" + _g_object_unref0 (_tmp2_); +#line 18 "../src/series.vala" + _tmp3_ = self->priv->chart; +#line 18 "../src/series.vala" + _tmp4_ = live_chart_chart_get_legend (_tmp3_); +#line 18 "../src/series.vala" + _tmp5_ = _tmp4_; +#line 18 "../src/series.vala" + if (_tmp5_ != NULL) { +#line 188 "series.c" + LiveChartChart* _tmp6_; + LiveChartLegend* _tmp7_; + LiveChartLegend* _tmp8_; +#line 18 "../src/series.vala" + _tmp6_ = self->priv->chart; +#line 18 "../src/series.vala" + _tmp7_ = live_chart_chart_get_legend (_tmp6_); +#line 18 "../src/series.vala" + _tmp8_ = _tmp7_; +#line 18 "../src/series.vala" + live_chart_legend_add_legend (_tmp8_, serie); +#line 200 "series.c" + } +#line 19 "../src/series.vala" + g_signal_connect_object (serie, "value-added", (GCallback) ___lambda8__live_chart_serie_value_added, self, 0); +#line 22 "../src/series.vala" + _tmp9_ = _g_object_ref0 (serie); +#line 22 "../src/series.vala" + result = _tmp9_; +#line 22 "../src/series.vala" + return result; +#line 210 "series.c" +} + +LiveChartSerie* +live_chart_series_get (LiveChartSeries* self, + gint index, + GError** error) +{ + GeeArrayList* _tmp0_; + gint _tmp1_; + gint _tmp2_; + GeeArrayList* _tmp7_; + gpointer _tmp8_; + GError* _inner_error0_ = NULL; + LiveChartSerie* result; +#line 25 "../src/series.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 26 "../src/series.vala" + _tmp0_ = self->priv->series; +#line 26 "../src/series.vala" + _tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_); +#line 26 "../src/series.vala" + _tmp2_ = _tmp1_; +#line 26 "../src/series.vala" + if (index > (_tmp2_ - 1)) { +#line 235 "series.c" + gchar* _tmp3_; + gchar* _tmp4_; + GError* _tmp5_; + GError* _tmp6_; +#line 27 "../src/series.vala" + _tmp3_ = g_strdup_printf ("Serie at index %d not found", index); +#line 27 "../src/series.vala" + _tmp4_ = _tmp3_; +#line 27 "../src/series.vala" + _tmp5_ = g_error_new_literal (LIVE_CHART_CHART_ERROR, LIVE_CHART_CHART_ERROR_SERIE_NOT_FOUND, _tmp4_); +#line 27 "../src/series.vala" + _tmp6_ = _tmp5_; +#line 27 "../src/series.vala" + _g_free0 (_tmp4_); +#line 27 "../src/series.vala" + _inner_error0_ = _tmp6_; +#line 27 "../src/series.vala" + if (_inner_error0_->domain == LIVE_CHART_CHART_ERROR) { +#line 27 "../src/series.vala" + g_propagate_error (error, _inner_error0_); +#line 27 "../src/series.vala" + return NULL; +#line 258 "series.c" + } else { +#line 27 "../src/series.vala" + 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); +#line 27 "../src/series.vala" + g_clear_error (&_inner_error0_); +#line 27 "../src/series.vala" + return NULL; +#line 266 "series.c" + } + } +#line 29 "../src/series.vala" + _tmp7_ = self->priv->series; +#line 29 "../src/series.vala" + _tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, index); +#line 29 "../src/series.vala" + result = (LiveChartSerie*) _tmp8_; +#line 29 "../src/series.vala" + return result; +#line 277 "series.c" +} + +LiveChartSerie* +live_chart_series_get_by_name (LiveChartSeries* self, + const gchar* name, + GError** error) +{ + gchar* _tmp11_; + gchar* _tmp12_; + GError* _tmp13_; + GError* _tmp14_; + GError* _inner_error0_ = NULL; + LiveChartSerie* result; +#line 32 "../src/series.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 32 "../src/series.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 295 "series.c" + { + GeeArrayList* _serie_list = NULL; + GeeArrayList* _tmp0_; + gint _serie_size = 0; + GeeArrayList* _tmp1_; + gint _tmp2_; + gint _tmp3_; + gint _serie_index = 0; +#line 33 "../src/series.vala" + _tmp0_ = self->priv->series; +#line 33 "../src/series.vala" + _serie_list = _tmp0_; +#line 33 "../src/series.vala" + _tmp1_ = _serie_list; +#line 33 "../src/series.vala" + _tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_); +#line 33 "../src/series.vala" + _tmp3_ = _tmp2_; +#line 33 "../src/series.vala" + _serie_size = _tmp3_; +#line 33 "../src/series.vala" + _serie_index = -1; +#line 33 "../src/series.vala" + while (TRUE) { +#line 320 "series.c" + gint _tmp4_; + gint _tmp5_; + LiveChartSerie* serie = NULL; + GeeArrayList* _tmp6_; + gpointer _tmp7_; + LiveChartSerie* _tmp8_; + const gchar* _tmp9_; + const gchar* _tmp10_; +#line 33 "../src/series.vala" + _serie_index = _serie_index + 1; +#line 33 "../src/series.vala" + _tmp4_ = _serie_index; +#line 33 "../src/series.vala" + _tmp5_ = _serie_size; +#line 33 "../src/series.vala" + if (!(_tmp4_ < _tmp5_)) { +#line 33 "../src/series.vala" + break; +#line 339 "series.c" + } +#line 33 "../src/series.vala" + _tmp6_ = _serie_list; +#line 33 "../src/series.vala" + _tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _serie_index); +#line 33 "../src/series.vala" + serie = (LiveChartSerie*) _tmp7_; +#line 34 "../src/series.vala" + _tmp8_ = serie; +#line 34 "../src/series.vala" + _tmp9_ = live_chart_serie_get_name (_tmp8_); +#line 34 "../src/series.vala" + _tmp10_ = _tmp9_; +#line 34 "../src/series.vala" + if (g_strcmp0 (_tmp10_, name) == 0) { +#line 34 "../src/series.vala" + result = serie; +#line 34 "../src/series.vala" + return result; +#line 359 "series.c" + } +#line 33 "../src/series.vala" + _g_object_unref0 (serie); +#line 363 "series.c" + } + } +#line 36 "../src/series.vala" + _tmp11_ = g_strdup_printf ("Serie with name %s not found", name); +#line 36 "../src/series.vala" + _tmp12_ = _tmp11_; +#line 36 "../src/series.vala" + _tmp13_ = g_error_new_literal (LIVE_CHART_CHART_ERROR, LIVE_CHART_CHART_ERROR_SERIE_NOT_FOUND, _tmp12_); +#line 36 "../src/series.vala" + _tmp14_ = _tmp13_; +#line 36 "../src/series.vala" + _g_free0 (_tmp12_); +#line 36 "../src/series.vala" + _inner_error0_ = _tmp14_; +#line 36 "../src/series.vala" + if (_inner_error0_->domain == LIVE_CHART_CHART_ERROR) { +#line 36 "../src/series.vala" + g_propagate_error (error, _inner_error0_); +#line 36 "../src/series.vala" + return NULL; +#line 384 "series.c" + } else { +#line 36 "../src/series.vala" + 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); +#line 36 "../src/series.vala" + g_clear_error (&_inner_error0_); +#line 36 "../src/series.vala" + return NULL; +#line 392 "series.c" + } +} + +GeeIterator* +live_chart_series_iterator (LiveChartSeries* self) +{ + GeeArrayList* _tmp0_; + GeeListIterator* _tmp1_; + GeeIterator* result; +#line 39 "../src/series.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 40 "../src/series.vala" + _tmp0_ = self->priv->series; +#line 40 "../src/series.vala" + _tmp1_ = gee_abstract_list_list_iterator ((GeeAbstractList*) _tmp0_); +#line 40 "../src/series.vala" + result = (GeeIterator*) _tmp1_; +#line 40 "../src/series.vala" + return result; +#line 412 "series.c" +} + +static void +live_chart_series_class_init (LiveChartSeriesClass * klass, + gpointer klass_data) +{ +#line 4 "../src/series.vala" + live_chart_series_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/series.vala" + g_type_class_adjust_private_offset (klass, &LiveChartSeries_private_offset); +#line 4 "../src/series.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_series_finalize; +#line 425 "series.c" +} + +static void +live_chart_series_instance_init (LiveChartSeries * self, + gpointer klass) +{ + GeeArrayList* _tmp0_; +#line 4 "../src/series.vala" + self->priv = live_chart_series_get_instance_private (self); +#line 6 "../src/series.vala" + _tmp0_ = gee_array_list_new (LIVE_CHART_TYPE_SERIE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); +#line 6 "../src/series.vala" + self->priv->series = _tmp0_; +#line 439 "series.c" +} + +static void +live_chart_series_finalize (GObject * obj) +{ + LiveChartSeries * self; +#line 4 "../src/series.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_SERIES, LiveChartSeries); +#line 6 "../src/series.vala" + _g_object_unref0 (self->priv->series); +#line 7 "../src/series.vala" + _g_object_unref0 (self->priv->chart); +#line 4 "../src/series.vala" + G_OBJECT_CLASS (live_chart_series_parent_class)->finalize (obj); +#line 454 "series.c" +} + +static GType +live_chart_series_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartSeriesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_series_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartSeries), 0, (GInstanceInitFunc) live_chart_series_instance_init, NULL }; + GType live_chart_series_type_id; + live_chart_series_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartSeries", &g_define_type_info, 0); + LiveChartSeries_private_offset = g_type_add_instance_private (live_chart_series_type_id, sizeof (LiveChartSeriesPrivate)); + return live_chart_series_type_id; +} + +GType +live_chart_series_get_type (void) +{ + static volatile gsize live_chart_series_type_id__once = 0; + if (g_once_init_enter (&live_chart_series_type_id__once)) { + GType live_chart_series_type_id; + live_chart_series_type_id = live_chart_series_get_type_once (); + g_once_init_leave (&live_chart_series_type_id__once, live_chart_series_type_id); + } + return live_chart_series_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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/smooth_line.c b/iPDC/lib/liblivechart_static.a.p/smooth_line.c new file mode 100644 index 0000000..3ef4bf8 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/smooth_line.c @@ -0,0 +1,887 @@ +/* smooth_line.c generated by valac 0.56.0, the Vala compiler + * generated from smooth_line.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_SMOOTH_LINE_0_PROPERTY, + LIVE_CHART_SMOOTH_LINE_REGION_PROPERTY, + LIVE_CHART_SMOOTH_LINE_NUM_PROPERTIES +}; +static GParamSpec* live_chart_smooth_line_properties[LIVE_CHART_SMOOTH_LINE_NUM_PROPERTIES]; +#define _live_chart_region_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_region_unref (var), NULL))) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _cairo_path_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_path_destroy (var), NULL))) +#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) +typedef struct _Block6Data Block6Data; +#define _live_chart_bezier_intersector_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_bezier_intersector_unref (var), NULL))) + +struct _LiveChartSmoothLinePrivate { + LiveChartRegion* _region; +}; + +struct _Block6Data { + int _ref_count_; + LiveChartSmoothLine* self; + LiveChartBoundaries boundaries; + cairo_t* ctx; +}; + +static gint LiveChartSmoothLine_private_offset; +static gpointer live_chart_smooth_line_parent_class = NULL; + +static void live_chart_smooth_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_smooth_line_update_bounding_box (LiveChartSmoothLine* self, + LiveChartPoints* points, + LiveChartConfig* config); +static void live_chart_smooth_line_generate_intersections (LiveChartSmoothLine* self, + LiveChartPoint* previous, + LiveChartPoint* target, + LiveChartConfig* config, + LiveChartBezierCurve* curve); +static Block6Data* block6_data_ref (Block6Data* _data6_); +static void block6_data_unref (void * _userdata_); +static gboolean __lambda13_ (Block6Data* _data6_, + LiveChartIntersection* intersection); +static gboolean ___lambda13__gee_forall_func (gpointer g, + gpointer self); +static void live_chart_smooth_line_finalize (GObject * obj); +static GType live_chart_smooth_line_get_type_once (void); +static void _vala_live_chart_smooth_line_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_smooth_line_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_smooth_line_get_instance_private (LiveChartSmoothLine* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartSmoothLine_private_offset); +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 10 "../src/smooth_line.vala" + return self ? g_object_ref (self) : NULL; +#line 82 "smooth_line.c" +} + +LiveChartSmoothLine* +live_chart_smooth_line_construct (GType object_type, + LiveChartValues* values) +{ + LiveChartSmoothLine * self = NULL; + LiveChartValues* _tmp0_; +#line 8 "../src/smooth_line.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 9 "../src/smooth_line.vala" + self = (LiveChartSmoothLine*) live_chart_serie_renderer_construct (object_type); +#line 10 "../src/smooth_line.vala" + _tmp0_ = _g_object_ref0 (values); +#line 10 "../src/smooth_line.vala" + _g_object_unref0 (((LiveChartSerieRenderer*) self)->values); +#line 10 "../src/smooth_line.vala" + ((LiveChartSerieRenderer*) self)->values = _tmp0_; +#line 8 "../src/smooth_line.vala" + return self; +#line 103 "smooth_line.c" +} + +LiveChartSmoothLine* +live_chart_smooth_line_new (LiveChartValues* values) +{ +#line 8 "../src/smooth_line.vala" + return live_chart_smooth_line_construct (LIVE_CHART_TYPE_SMOOTH_LINE, values); +#line 111 "smooth_line.c" +} + +static void +live_chart_smooth_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartSmoothLine * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 13 "../src/smooth_line.vala" + self = (LiveChartSmoothLine*) base; +#line 13 "../src/smooth_line.vala" + g_return_if_fail (ctx != NULL); +#line 13 "../src/smooth_line.vala" + g_return_if_fail (config != NULL); +#line 14 "../src/smooth_line.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 14 "../src/smooth_line.vala" + _tmp1_ = _tmp0_; +#line 14 "../src/smooth_line.vala" + if (_tmp1_) { +#line 134 "smooth_line.c" + LiveChartPoints* points = NULL; + LiveChartValues* _tmp2_; + LiveChartPoints* _tmp3_; + LiveChartPoints* _tmp4_; + gint _tmp5_; + gint _tmp6_; +#line 15 "../src/smooth_line.vala" + _tmp2_ = ((LiveChartSerieRenderer*) self)->values; +#line 15 "../src/smooth_line.vala" + _tmp3_ = live_chart_points_create (_tmp2_, config); +#line 15 "../src/smooth_line.vala" + points = _tmp3_; +#line 16 "../src/smooth_line.vala" + _tmp4_ = points; +#line 16 "../src/smooth_line.vala" + _tmp5_ = live_chart_points_get_size (_tmp4_); +#line 16 "../src/smooth_line.vala" + _tmp6_ = _tmp5_; +#line 16 "../src/smooth_line.vala" + if (_tmp6_ > 0) { +#line 155 "smooth_line.c" + LiveChartRegion* _tmp7_; + LiveChartPoints* _tmp8_; + cairo_path_t* _tmp9_; + cairo_path_t* _tmp10_; + LiveChartRegion* _tmp11_; +#line 18 "../src/smooth_line.vala" + _tmp7_ = self->priv->_region; +#line 18 "../src/smooth_line.vala" + if (_tmp7_ != NULL) { +#line 19 "../src/smooth_line.vala" + cairo_push_group (ctx); +#line 167 "smooth_line.c" + } +#line 22 "../src/smooth_line.vala" + _tmp8_ = points; +#line 22 "../src/smooth_line.vala" + _tmp9_ = live_chart_smooth_line_draw_smooth_line (self, _tmp8_, ctx, config); +#line 22 "../src/smooth_line.vala" + _tmp10_ = _tmp9_; +#line 22 "../src/smooth_line.vala" + _cairo_path_destroy0 (_tmp10_); +#line 23 "../src/smooth_line.vala" + cairo_stroke (ctx); +#line 25 "../src/smooth_line.vala" + _tmp11_ = self->priv->_region; +#line 25 "../src/smooth_line.vala" + if (_tmp11_ != NULL) { +#line 26 "../src/smooth_line.vala" + cairo_set_operator (ctx, CAIRO_OPERATOR_ATOP); +#line 27 "../src/smooth_line.vala" + live_chart_smooth_line_draw_regions_on_line (self, ctx, config); +#line 28 "../src/smooth_line.vala" + cairo_fill (ctx); +#line 29 "../src/smooth_line.vala" + cairo_pop_group_to_source (ctx); +#line 30 "../src/smooth_line.vala" + cairo_paint (ctx); +#line 193 "smooth_line.c" + } + } +#line 14 "../src/smooth_line.vala" + _g_object_unref0 (points); +#line 198 "smooth_line.c" + } +} + +cairo_path_t* +live_chart_smooth_line_draw_smooth_line (LiveChartSmoothLine* self, + LiveChartPoints* points, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartIntersections* _tmp0_; + LiveChartPoint first_point = {0}; + LiveChartPoint _tmp1_ = {0}; + LiveChartPoint _tmp2_; + LiveChartPoint _tmp3_; + LiveChartPath* _tmp4_; + LiveChartPath* _tmp5_; + cairo_path_t* _tmp32_; + cairo_path_t* result; +#line 36 "../src/smooth_line.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 36 "../src/smooth_line.vala" + g_return_val_if_fail (points != NULL, NULL); +#line 36 "../src/smooth_line.vala" + g_return_val_if_fail (ctx != NULL, NULL); +#line 36 "../src/smooth_line.vala" + g_return_val_if_fail (config != NULL, NULL); +#line 37 "../src/smooth_line.vala" + _tmp0_ = live_chart_intersections_new (); +#line 37 "../src/smooth_line.vala" + _g_object_unref0 (self->intersections); +#line 37 "../src/smooth_line.vala" + self->intersections = _tmp0_; +#line 38 "../src/smooth_line.vala" + live_chart_points_first (points, &_tmp1_); +#line 38 "../src/smooth_line.vala" + first_point = _tmp1_; +#line 40 "../src/smooth_line.vala" + live_chart_smooth_line_update_bounding_box (self, points, config); +#line 41 "../src/smooth_line.vala" + live_chart_serie_renderer_debug ((LiveChartSerieRenderer*) self, ctx); +#line 43 "../src/smooth_line.vala" + _tmp2_ = first_point; +#line 43 "../src/smooth_line.vala" + _tmp3_ = first_point; +#line 43 "../src/smooth_line.vala" + cairo_move_to (ctx, _tmp2_.x, _tmp3_.y); +#line 44 "../src/smooth_line.vala" + _tmp4_ = live_chart_serie_renderer_get_line ((LiveChartSerieRenderer*) self); +#line 44 "../src/smooth_line.vala" + _tmp5_ = _tmp4_; +#line 44 "../src/smooth_line.vala" + live_chart_path_configure (_tmp5_, ctx); +#line 251 "smooth_line.c" + { + gint pos = 0; +#line 46 "../src/smooth_line.vala" + pos = 0; +#line 256 "smooth_line.c" + { + gboolean _tmp6_ = FALSE; +#line 46 "../src/smooth_line.vala" + _tmp6_ = TRUE; +#line 46 "../src/smooth_line.vala" + while (TRUE) { +#line 263 "smooth_line.c" + gint _tmp8_; + gint _tmp9_; + LiveChartPoint previous_point = {0}; + LiveChartPoint _tmp10_ = {0}; + LiveChartPoint target_point = {0}; + LiveChartPoint _tmp11_ = {0}; + LiveChartPoint _tmp12_; + LiveChartBezierCurve curve = {0}; + LiveChartPoint _tmp13_; + LiveChartPoint _tmp14_; + LiveChartBezierCurve _tmp15_ = {0}; + LiveChartBezierCurve _tmp16_; + LiveChartCoord _tmp17_; + LiveChartBezierCurve _tmp18_; + LiveChartCoord _tmp19_; + LiveChartBezierCurve _tmp20_; + LiveChartCoord _tmp21_; + LiveChartBezierCurve _tmp22_; + LiveChartCoord _tmp23_; + LiveChartBezierCurve _tmp24_; + LiveChartCoord _tmp25_; + LiveChartBezierCurve _tmp26_; + LiveChartCoord _tmp27_; + LiveChartRegion* _tmp28_; +#line 46 "../src/smooth_line.vala" + if (!_tmp6_) { +#line 290 "smooth_line.c" + gint _tmp7_; +#line 46 "../src/smooth_line.vala" + _tmp7_ = pos; +#line 46 "../src/smooth_line.vala" + pos = _tmp7_ + 1; +#line 296 "smooth_line.c" + } +#line 46 "../src/smooth_line.vala" + _tmp6_ = FALSE; +#line 46 "../src/smooth_line.vala" + _tmp8_ = live_chart_points_get_size (points); +#line 46 "../src/smooth_line.vala" + _tmp9_ = _tmp8_; +#line 46 "../src/smooth_line.vala" + if (!(pos <= (_tmp9_ - 1))) { +#line 46 "../src/smooth_line.vala" + break; +#line 308 "smooth_line.c" + } +#line 48 "../src/smooth_line.vala" + live_chart_points_get (points, pos, &_tmp10_); +#line 48 "../src/smooth_line.vala" + previous_point = _tmp10_; +#line 49 "../src/smooth_line.vala" + live_chart_points_after (points, pos, &_tmp11_); +#line 49 "../src/smooth_line.vala" + target_point = _tmp11_; +#line 51 "../src/smooth_line.vala" + _tmp12_ = previous_point; +#line 51 "../src/smooth_line.vala" + if (live_chart_serie_renderer_is_out_of_area ((LiveChartSerieRenderer*) self, &_tmp12_)) { +#line 52 "../src/smooth_line.vala" + continue; +#line 324 "smooth_line.c" + } +#line 55 "../src/smooth_line.vala" + _tmp13_ = previous_point; +#line 55 "../src/smooth_line.vala" + _tmp14_ = target_point; +#line 55 "../src/smooth_line.vala" + live_chart_build_bezier_curve_from_points (&_tmp13_, &_tmp14_, &_tmp15_); +#line 55 "../src/smooth_line.vala" + curve = _tmp15_; +#line 57 "../src/smooth_line.vala" + _tmp16_ = curve; +#line 57 "../src/smooth_line.vala" + _tmp17_ = _tmp16_.c1; +#line 57 "../src/smooth_line.vala" + _tmp18_ = curve; +#line 57 "../src/smooth_line.vala" + _tmp19_ = _tmp18_.c1; +#line 57 "../src/smooth_line.vala" + _tmp20_ = curve; +#line 57 "../src/smooth_line.vala" + _tmp21_ = _tmp20_.c2; +#line 57 "../src/smooth_line.vala" + _tmp22_ = curve; +#line 57 "../src/smooth_line.vala" + _tmp23_ = _tmp22_.c2; +#line 57 "../src/smooth_line.vala" + _tmp24_ = curve; +#line 57 "../src/smooth_line.vala" + _tmp25_ = _tmp24_.c3; +#line 57 "../src/smooth_line.vala" + _tmp26_ = curve; +#line 57 "../src/smooth_line.vala" + _tmp27_ = _tmp26_.c3; +#line 57 "../src/smooth_line.vala" + cairo_curve_to (ctx, _tmp17_.x, _tmp19_.y, _tmp21_.x, _tmp23_.y, _tmp25_.x, _tmp27_.y); +#line 62 "../src/smooth_line.vala" + _tmp28_ = self->priv->_region; +#line 62 "../src/smooth_line.vala" + if (_tmp28_ != NULL) { +#line 364 "smooth_line.c" + LiveChartPoint _tmp29_; + LiveChartPoint _tmp30_; + LiveChartBezierCurve _tmp31_; +#line 63 "../src/smooth_line.vala" + _tmp29_ = previous_point; +#line 63 "../src/smooth_line.vala" + _tmp30_ = target_point; +#line 63 "../src/smooth_line.vala" + _tmp31_ = curve; +#line 63 "../src/smooth_line.vala" + live_chart_smooth_line_generate_intersections (self, &_tmp29_, &_tmp30_, config, &_tmp31_); +#line 376 "smooth_line.c" + } + } + } + } +#line 67 "../src/smooth_line.vala" + _tmp32_ = cairo_copy_path (ctx); +#line 67 "../src/smooth_line.vala" + result = _tmp32_; +#line 67 "../src/smooth_line.vala" + return result; +#line 387 "smooth_line.c" +} + +static gpointer +_cairo_reference0 (gpointer self) +{ +#line 70 "../src/smooth_line.vala" + return self ? cairo_reference (self) : NULL; +#line 395 "smooth_line.c" +} + +static Block6Data* +block6_data_ref (Block6Data* _data6_) +{ +#line 70 "../src/smooth_line.vala" + g_atomic_int_inc (&_data6_->_ref_count_); +#line 70 "../src/smooth_line.vala" + return _data6_; +#line 405 "smooth_line.c" +} + +static void +block6_data_unref (void * _userdata_) +{ + Block6Data* _data6_; + _data6_ = (Block6Data*) _userdata_; +#line 70 "../src/smooth_line.vala" + if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) { +#line 415 "smooth_line.c" + LiveChartSmoothLine* self; +#line 70 "../src/smooth_line.vala" + self = _data6_->self; +#line 70 "../src/smooth_line.vala" + _cairo_destroy0 (_data6_->ctx); +#line 70 "../src/smooth_line.vala" + _g_object_unref0 (self); +#line 70 "../src/smooth_line.vala" + g_slice_free (Block6Data, _data6_); +#line 425 "smooth_line.c" + } +} + +static gboolean +__lambda13_ (Block6Data* _data6_, + LiveChartIntersection* intersection) +{ + LiveChartSmoothLine* self; + gboolean result; +#line 72 "../src/smooth_line.vala" + self = _data6_->self; +#line 73 "../src/smooth_line.vala" + if (intersection != NULL) { +#line 439 "smooth_line.c" + gdouble _tmp0_; + gdouble _tmp1_; + LiveChartBoundaries _tmp2_; + LiveChartBoundary _tmp3_; + gdouble _tmp4_; + gdouble _tmp5_; + gdouble _tmp6_; + gdouble _tmp7_; + LiveChartBoundaries _tmp8_; + LiveChartRegion* _tmp9_; + LiveChartRegion* _tmp10_; + GdkRGBA _tmp11_ = {0}; + GdkRGBA _tmp12_; + LiveChartRegion* _tmp13_; + LiveChartRegion* _tmp14_; + GdkRGBA _tmp15_ = {0}; + GdkRGBA _tmp16_; + LiveChartRegion* _tmp17_; + LiveChartRegion* _tmp18_; + GdkRGBA _tmp19_ = {0}; + GdkRGBA _tmp20_; + LiveChartRegion* _tmp21_; + LiveChartRegion* _tmp22_; + GdkRGBA _tmp23_ = {0}; + GdkRGBA _tmp24_; +#line 74 "../src/smooth_line.vala" + _tmp0_ = live_chart_intersection_get_start_x (intersection); +#line 74 "../src/smooth_line.vala" + _tmp1_ = _tmp0_; +#line 74 "../src/smooth_line.vala" + _tmp2_ = _data6_->boundaries; +#line 74 "../src/smooth_line.vala" + _tmp3_ = _tmp2_.y; +#line 74 "../src/smooth_line.vala" + _tmp4_ = live_chart_intersection_get_end_x (intersection); +#line 74 "../src/smooth_line.vala" + _tmp5_ = _tmp4_; +#line 74 "../src/smooth_line.vala" + _tmp6_ = live_chart_intersection_get_start_x (intersection); +#line 74 "../src/smooth_line.vala" + _tmp7_ = _tmp6_; +#line 74 "../src/smooth_line.vala" + _tmp8_ = _data6_->boundaries; +#line 74 "../src/smooth_line.vala" + cairo_rectangle (_data6_->ctx, _tmp1_, (gdouble) _tmp3_.min, _tmp5_ - _tmp7_, (gdouble) _tmp8_.height); +#line 75 "../src/smooth_line.vala" + _tmp9_ = live_chart_intersection_get_region (intersection); +#line 75 "../src/smooth_line.vala" + _tmp10_ = _tmp9_; +#line 75 "../src/smooth_line.vala" + live_chart_region_get_line_color (_tmp10_, &_tmp11_); +#line 75 "../src/smooth_line.vala" + _tmp12_ = _tmp11_; +#line 75 "../src/smooth_line.vala" + _tmp13_ = live_chart_intersection_get_region (intersection); +#line 75 "../src/smooth_line.vala" + _tmp14_ = _tmp13_; +#line 75 "../src/smooth_line.vala" + live_chart_region_get_line_color (_tmp14_, &_tmp15_); +#line 75 "../src/smooth_line.vala" + _tmp16_ = _tmp15_; +#line 75 "../src/smooth_line.vala" + _tmp17_ = live_chart_intersection_get_region (intersection); +#line 75 "../src/smooth_line.vala" + _tmp18_ = _tmp17_; +#line 75 "../src/smooth_line.vala" + live_chart_region_get_line_color (_tmp18_, &_tmp19_); +#line 75 "../src/smooth_line.vala" + _tmp20_ = _tmp19_; +#line 75 "../src/smooth_line.vala" + _tmp21_ = live_chart_intersection_get_region (intersection); +#line 75 "../src/smooth_line.vala" + _tmp22_ = _tmp21_; +#line 75 "../src/smooth_line.vala" + live_chart_region_get_line_color (_tmp22_, &_tmp23_); +#line 75 "../src/smooth_line.vala" + _tmp24_ = _tmp23_; +#line 75 "../src/smooth_line.vala" + cairo_set_source_rgba (_data6_->ctx, _tmp12_.red, _tmp16_.green, _tmp20_.blue, _tmp24_.alpha); +#line 519 "smooth_line.c" + } +#line 77 "../src/smooth_line.vala" + result = TRUE; +#line 77 "../src/smooth_line.vala" + _g_object_unref0 (intersection); +#line 77 "../src/smooth_line.vala" + return result; +#line 527 "smooth_line.c" +} + +static gboolean +___lambda13__gee_forall_func (gpointer g, + gpointer self) +{ + gboolean result; + result = __lambda13_ (self, (LiveChartIntersection*) g); +#line 72 "../src/smooth_line.vala" + return result; +#line 538 "smooth_line.c" +} + +void +live_chart_smooth_line_draw_regions_on_line (LiveChartSmoothLine* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + Block6Data* _data6_; + cairo_t* _tmp0_; + LiveChartBoundaries _tmp1_ = {0}; + LiveChartIntersections* _tmp2_; +#line 70 "../src/smooth_line.vala" + g_return_if_fail (self != NULL); +#line 70 "../src/smooth_line.vala" + g_return_if_fail (ctx != NULL); +#line 70 "../src/smooth_line.vala" + g_return_if_fail (config != NULL); +#line 70 "../src/smooth_line.vala" + _data6_ = g_slice_new0 (Block6Data); +#line 70 "../src/smooth_line.vala" + _data6_->_ref_count_ = 1; +#line 70 "../src/smooth_line.vala" + _data6_->self = g_object_ref (self); +#line 70 "../src/smooth_line.vala" + _tmp0_ = _cairo_reference0 (ctx); +#line 70 "../src/smooth_line.vala" + _cairo_destroy0 (_data6_->ctx); +#line 70 "../src/smooth_line.vala" + _data6_->ctx = _tmp0_; +#line 71 "../src/smooth_line.vala" + live_chart_config_boundaries (config, &_tmp1_); +#line 71 "../src/smooth_line.vala" + _data6_->boundaries = _tmp1_; +#line 72 "../src/smooth_line.vala" + _tmp2_ = self->intersections; +#line 72 "../src/smooth_line.vala" + live_chart_intersections_foreach (_tmp2_, ___lambda13__gee_forall_func, _data6_); +#line 70 "../src/smooth_line.vala" + block6_data_unref (_data6_); +#line 70 "../src/smooth_line.vala" + _data6_ = NULL; +#line 580 "smooth_line.c" +} + +static void +live_chart_smooth_line_generate_intersections (LiveChartSmoothLine* self, + LiveChartPoint* previous, + LiveChartPoint* target, + LiveChartConfig* config, + LiveChartBezierCurve* curve) +{ + LiveChartRegion* _tmp0_; + LiveChartBezierIntersector* _tmp1_; + LiveChartBezierIntersector* _tmp2_; + LiveChartIntersections* _tmp3_; + LiveChartPoint _tmp4_; + LiveChartPoint _tmp5_; + LiveChartBezierCurve _tmp6_; +#line 81 "../src/smooth_line.vala" + g_return_if_fail (self != NULL); +#line 81 "../src/smooth_line.vala" + g_return_if_fail (previous != NULL); +#line 81 "../src/smooth_line.vala" + g_return_if_fail (target != NULL); +#line 81 "../src/smooth_line.vala" + g_return_if_fail (config != NULL); +#line 81 "../src/smooth_line.vala" + g_return_if_fail (curve != NULL); +#line 82 "../src/smooth_line.vala" + _tmp0_ = self->priv->_region; +#line 82 "../src/smooth_line.vala" + _tmp1_ = live_chart_bezier_intersector_new (_tmp0_, config); +#line 82 "../src/smooth_line.vala" + _tmp2_ = _tmp1_; +#line 82 "../src/smooth_line.vala" + _tmp3_ = self->intersections; +#line 82 "../src/smooth_line.vala" + _tmp4_ = *previous; +#line 82 "../src/smooth_line.vala" + _tmp5_ = *target; +#line 82 "../src/smooth_line.vala" + _tmp6_ = *curve; +#line 82 "../src/smooth_line.vala" + live_chart_intersector_intersect ((LiveChartIntersector*) _tmp2_, _tmp3_, &_tmp4_, &_tmp5_, &_tmp6_); +#line 82 "../src/smooth_line.vala" + _live_chart_bezier_intersector_unref0 (_tmp2_); +#line 625 "smooth_line.c" +} + +static void +live_chart_smooth_line_update_bounding_box (LiveChartSmoothLine* self, + LiveChartPoints* points, + LiveChartConfig* config) +{ + LiveChartPoint _tmp0_ = {0}; + LiveChartBounds* _tmp1_; + LiveChartBounds* _tmp2_; + gdouble _tmp3_; + gdouble _tmp4_; + LiveChartPoint _tmp5_ = {0}; + LiveChartPoint _tmp6_ = {0}; + LiveChartBounds* _tmp7_; + LiveChartBounds* _tmp8_; + gdouble _tmp9_; + gdouble _tmp10_; + LiveChartBounds* _tmp11_; + LiveChartBounds* _tmp12_; + gdouble _tmp13_; + gdouble _tmp14_; + LiveChartBoundingBox _tmp15_ = {0}; +#line 85 "../src/smooth_line.vala" + g_return_if_fail (self != NULL); +#line 85 "../src/smooth_line.vala" + g_return_if_fail (points != NULL); +#line 85 "../src/smooth_line.vala" + g_return_if_fail (config != NULL); +#line 86 "../src/smooth_line.vala" + live_chart_points_first (points, &_tmp0_); +#line 86 "../src/smooth_line.vala" + _tmp1_ = live_chart_points_get_bounds (points); +#line 86 "../src/smooth_line.vala" + _tmp2_ = _tmp1_; +#line 86 "../src/smooth_line.vala" + _tmp3_ = live_chart_bounds_get_lower (_tmp2_); +#line 86 "../src/smooth_line.vala" + _tmp4_ = _tmp3_; +#line 86 "../src/smooth_line.vala" + live_chart_points_last (points, &_tmp5_); +#line 86 "../src/smooth_line.vala" + live_chart_points_first (points, &_tmp6_); +#line 86 "../src/smooth_line.vala" + _tmp7_ = live_chart_points_get_bounds (points); +#line 86 "../src/smooth_line.vala" + _tmp8_ = _tmp7_; +#line 86 "../src/smooth_line.vala" + _tmp9_ = live_chart_bounds_get_upper (_tmp8_); +#line 86 "../src/smooth_line.vala" + _tmp10_ = _tmp9_; +#line 86 "../src/smooth_line.vala" + _tmp11_ = live_chart_points_get_bounds (points); +#line 86 "../src/smooth_line.vala" + _tmp12_ = _tmp11_; +#line 86 "../src/smooth_line.vala" + _tmp13_ = live_chart_bounds_get_lower (_tmp12_); +#line 86 "../src/smooth_line.vala" + _tmp14_ = _tmp13_; +#line 86 "../src/smooth_line.vala" + memset (&_tmp15_, 0, sizeof (LiveChartBoundingBox)); +#line 86 "../src/smooth_line.vala" + _tmp15_.x = _tmp0_.x; +#line 86 "../src/smooth_line.vala" + _tmp15_.y = _tmp4_; +#line 86 "../src/smooth_line.vala" + _tmp15_.width = _tmp5_.x - _tmp6_.x; +#line 86 "../src/smooth_line.vala" + _tmp15_.height = _tmp10_ - _tmp14_; +#line 86 "../src/smooth_line.vala" + ((LiveChartSerieRenderer*) self)->bounding_box = _tmp15_; +#line 697 "smooth_line.c" +} + +LiveChartRegion* +live_chart_smooth_line_get_region (LiveChartSmoothLine* self) +{ + LiveChartRegion* result; + LiveChartRegion* _tmp0_; +#line 6 "../src/smooth_line.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 6 "../src/smooth_line.vala" + _tmp0_ = self->priv->_region; +#line 6 "../src/smooth_line.vala" + result = _tmp0_; +#line 6 "../src/smooth_line.vala" + return result; +#line 713 "smooth_line.c" +} + +static gpointer +_live_chart_region_ref0 (gpointer self) +{ +#line 6 "../src/smooth_line.vala" + return self ? live_chart_region_ref (self) : NULL; +#line 721 "smooth_line.c" +} + +void +live_chart_smooth_line_set_region (LiveChartSmoothLine* self, + LiveChartRegion* value) +{ + LiveChartRegion* old_value; +#line 6 "../src/smooth_line.vala" + g_return_if_fail (self != NULL); +#line 6 "../src/smooth_line.vala" + old_value = live_chart_smooth_line_get_region (self); +#line 6 "../src/smooth_line.vala" + if (old_value != value) { +#line 735 "smooth_line.c" + LiveChartRegion* _tmp0_; +#line 6 "../src/smooth_line.vala" + _tmp0_ = _live_chart_region_ref0 (value); +#line 6 "../src/smooth_line.vala" + _live_chart_region_unref0 (self->priv->_region); +#line 6 "../src/smooth_line.vala" + self->priv->_region = _tmp0_; +#line 6 "../src/smooth_line.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_smooth_line_properties[LIVE_CHART_SMOOTH_LINE_REGION_PROPERTY]); +#line 745 "smooth_line.c" + } +} + +static void +live_chart_smooth_line_class_init (LiveChartSmoothLineClass * klass, + gpointer klass_data) +{ +#line 4 "../src/smooth_line.vala" + live_chart_smooth_line_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/smooth_line.vala" + g_type_class_adjust_private_offset (klass, &LiveChartSmoothLine_private_offset); +#line 4 "../src/smooth_line.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_smooth_line_real_draw; +#line 4 "../src/smooth_line.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_smooth_line_get_property; +#line 4 "../src/smooth_line.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_smooth_line_set_property; +#line 4 "../src/smooth_line.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_smooth_line_finalize; +#line 4 "../src/smooth_line.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SMOOTH_LINE_REGION_PROPERTY, live_chart_smooth_line_properties[LIVE_CHART_SMOOTH_LINE_REGION_PROPERTY] = live_chart_param_spec_region ("region", "region", "region", LIVE_CHART_TYPE_REGION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 767 "smooth_line.c" +} + +static void +live_chart_smooth_line_instance_init (LiveChartSmoothLine * self, + gpointer klass) +{ + LiveChartIntersections* _tmp0_; +#line 4 "../src/smooth_line.vala" + self->priv = live_chart_smooth_line_get_instance_private (self); +#line 6 "../src/smooth_line.vala" + self->priv->_region = NULL; +#line 7 "../src/smooth_line.vala" + _tmp0_ = live_chart_intersections_new (); +#line 7 "../src/smooth_line.vala" + self->intersections = _tmp0_; +#line 783 "smooth_line.c" +} + +static void +live_chart_smooth_line_finalize (GObject * obj) +{ + LiveChartSmoothLine * self; +#line 4 "../src/smooth_line.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLine); +#line 6 "../src/smooth_line.vala" + _live_chart_region_unref0 (self->priv->_region); +#line 7 "../src/smooth_line.vala" + _g_object_unref0 (self->intersections); +#line 4 "../src/smooth_line.vala" + G_OBJECT_CLASS (live_chart_smooth_line_parent_class)->finalize (obj); +#line 798 "smooth_line.c" +} + +static GType +live_chart_smooth_line_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartSmoothLineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_smooth_line_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartSmoothLine), 0, (GInstanceInitFunc) live_chart_smooth_line_instance_init, NULL }; + GType live_chart_smooth_line_type_id; + live_chart_smooth_line_type_id = g_type_register_static (LIVE_CHART_TYPE_SERIE_RENDERER, "LiveChartSmoothLine", &g_define_type_info, 0); + LiveChartSmoothLine_private_offset = g_type_add_instance_private (live_chart_smooth_line_type_id, sizeof (LiveChartSmoothLinePrivate)); + return live_chart_smooth_line_type_id; +} + +GType +live_chart_smooth_line_get_type (void) +{ + static volatile gsize live_chart_smooth_line_type_id__once = 0; + if (g_once_init_enter (&live_chart_smooth_line_type_id__once)) { + GType live_chart_smooth_line_type_id; + live_chart_smooth_line_type_id = live_chart_smooth_line_get_type_once (); + g_once_init_leave (&live_chart_smooth_line_type_id__once, live_chart_smooth_line_type_id); + } + return live_chart_smooth_line_type_id__once; +} + +static void +_vala_live_chart_smooth_line_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartSmoothLine * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLine); +#line 4 "../src/smooth_line.vala" + switch (property_id) { +#line 4 "../src/smooth_line.vala" + case LIVE_CHART_SMOOTH_LINE_REGION_PROPERTY: +#line 4 "../src/smooth_line.vala" + live_chart_value_set_region (value, live_chart_smooth_line_get_region (self)); +#line 4 "../src/smooth_line.vala" + break; +#line 839 "smooth_line.c" + default: +#line 4 "../src/smooth_line.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/smooth_line.vala" + break; +#line 845 "smooth_line.c" + } +} + +static void +_vala_live_chart_smooth_line_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartSmoothLine * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLine); +#line 4 "../src/smooth_line.vala" + switch (property_id) { +#line 4 "../src/smooth_line.vala" + case LIVE_CHART_SMOOTH_LINE_REGION_PROPERTY: +#line 4 "../src/smooth_line.vala" + live_chart_smooth_line_set_region (self, live_chart_value_get_region (value)); +#line 4 "../src/smooth_line.vala" + break; +#line 865 "smooth_line.c" + default: +#line 4 "../src/smooth_line.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/smooth_line.vala" + break; +#line 871 "smooth_line.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/smooth_line_area.c b/iPDC/lib/liblivechart_static.a.p/smooth_line_area.c new file mode 100644 index 0000000..0caf082 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/smooth_line_area.c @@ -0,0 +1,564 @@ +/* smooth_line_area.c generated by valac 0.56.0, the Vala compiler + * generated from smooth_line_area.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_SMOOTH_LINE_AREA_0_PROPERTY, + LIVE_CHART_SMOOTH_LINE_AREA_AREA_ALPHA_PROPERTY, + LIVE_CHART_SMOOTH_LINE_AREA_NUM_PROPERTIES +}; +static GParamSpec* live_chart_smooth_line_area_properties[LIVE_CHART_SMOOTH_LINE_AREA_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _cairo_path_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_path_destroy (var), NULL))) +#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) +typedef struct _Block5Data Block5Data; + +struct _LiveChartSmoothLineAreaPrivate { + gdouble _area_alpha; +}; + +struct _Block5Data { + int _ref_count_; + LiveChartSmoothLineArea* self; + LiveChartBoundaries boundaries; + cairo_t* ctx; +}; + +static gint LiveChartSmoothLineArea_private_offset; +static gpointer live_chart_smooth_line_area_parent_class = NULL; + +static void live_chart_smooth_line_area_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static Block5Data* block5_data_ref (Block5Data* _data5_); +static void block5_data_unref (void * _userdata_); +static gboolean __lambda14_ (Block5Data* _data5_, + LiveChartIntersection* intersection); +static gboolean ___lambda14__gee_forall_func (gpointer g, + gpointer self); +static void live_chart_smooth_line_area_finalize (GObject * obj); +static GType live_chart_smooth_line_area_get_type_once (void); +static void _vala_live_chart_smooth_line_area_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_smooth_line_area_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_smooth_line_area_get_instance_private (LiveChartSmoothLineArea* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartSmoothLineArea_private_offset); +} + +LiveChartSmoothLineArea* +live_chart_smooth_line_area_construct (GType object_type, + LiveChartValues* values) +{ + LiveChartSmoothLineArea * self = NULL; +#line 8 "../src/smooth_line_area.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 9 "../src/smooth_line_area.vala" + self = (LiveChartSmoothLineArea*) live_chart_smooth_line_construct (object_type, values); +#line 8 "../src/smooth_line_area.vala" + return self; +#line 77 "smooth_line_area.c" +} + +LiveChartSmoothLineArea* +live_chart_smooth_line_area_new (LiveChartValues* values) +{ +#line 8 "../src/smooth_line_area.vala" + return live_chart_smooth_line_area_construct (LIVE_CHART_TYPE_SMOOTH_LINE_AREA, values); +#line 85 "smooth_line_area.c" +} + +static void +live_chart_smooth_line_area_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartSmoothLineArea * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 11 "../src/smooth_line_area.vala" + self = (LiveChartSmoothLineArea*) base; +#line 11 "../src/smooth_line_area.vala" + g_return_if_fail (ctx != NULL); +#line 11 "../src/smooth_line_area.vala" + g_return_if_fail (config != NULL); +#line 12 "../src/smooth_line_area.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 12 "../src/smooth_line_area.vala" + _tmp1_ = _tmp0_; +#line 12 "../src/smooth_line_area.vala" + if (_tmp1_) { +#line 108 "smooth_line_area.c" + LiveChartPoints* points = NULL; + LiveChartValues* _tmp2_; + LiveChartPoints* _tmp3_; + LiveChartPoints* _tmp4_; + gint _tmp5_; + gint _tmp6_; +#line 13 "../src/smooth_line_area.vala" + _tmp2_ = ((LiveChartSerieRenderer*) self)->values; +#line 13 "../src/smooth_line_area.vala" + _tmp3_ = live_chart_points_create (_tmp2_, config); +#line 13 "../src/smooth_line_area.vala" + points = _tmp3_; +#line 14 "../src/smooth_line_area.vala" + _tmp4_ = points; +#line 14 "../src/smooth_line_area.vala" + _tmp5_ = live_chart_points_get_size (_tmp4_); +#line 14 "../src/smooth_line_area.vala" + _tmp6_ = _tmp5_; +#line 14 "../src/smooth_line_area.vala" + if (_tmp6_ > 0) { +#line 129 "smooth_line_area.c" + cairo_path_t* path = NULL; + LiveChartPoints* _tmp7_; + cairo_path_t* _tmp8_; + LiveChartArea* area = NULL; + LiveChartPoints* _tmp9_; + GdkRGBA _tmp10_ = {0}; + GdkRGBA _tmp11_; + gdouble _tmp12_; + LiveChartArea* _tmp13_; + LiveChartArea* _tmp14_; + cairo_path_t* _tmp15_; + LiveChartArea* _tmp16_; +#line 16 "../src/smooth_line_area.vala" + cairo_push_group (ctx); +#line 17 "../src/smooth_line_area.vala" + _tmp7_ = points; +#line 17 "../src/smooth_line_area.vala" + _tmp8_ = live_chart_smooth_line_draw_smooth_line ((LiveChartSmoothLine*) self, _tmp7_, ctx, config); +#line 17 "../src/smooth_line_area.vala" + path = _tmp8_; +#line 18 "../src/smooth_line_area.vala" + cairo_stroke_preserve (ctx); +#line 20 "../src/smooth_line_area.vala" + _tmp9_ = points; +#line 20 "../src/smooth_line_area.vala" + live_chart_serie_renderer_get_main_color ((LiveChartSerieRenderer*) self, &_tmp10_); +#line 20 "../src/smooth_line_area.vala" + _tmp11_ = _tmp10_; +#line 20 "../src/smooth_line_area.vala" + _tmp12_ = self->priv->_area_alpha; +#line 20 "../src/smooth_line_area.vala" + _tmp13_ = live_chart_area_new (_tmp9_, &_tmp11_, _tmp12_); +#line 20 "../src/smooth_line_area.vala" + area = _tmp13_; +#line 21 "../src/smooth_line_area.vala" + _tmp14_ = area; +#line 21 "../src/smooth_line_area.vala" + live_chart_drawable_draw ((LiveChartDrawable*) _tmp14_, ctx, config); +#line 22 "../src/smooth_line_area.vala" + cairo_fill (ctx); +#line 24 "../src/smooth_line_area.vala" + cairo_set_operator (ctx, CAIRO_OPERATOR_ATOP); +#line 25 "../src/smooth_line_area.vala" + live_chart_smooth_line_draw_regions_on_line ((LiveChartSmoothLine*) self, ctx, config); +#line 26 "../src/smooth_line_area.vala" + cairo_fill (ctx); +#line 27 "../src/smooth_line_area.vala" + cairo_pop_group_to_source (ctx); +#line 29 "../src/smooth_line_area.vala" + cairo_save (ctx); +#line 30 "../src/smooth_line_area.vala" + _tmp15_ = path; +#line 30 "../src/smooth_line_area.vala" + cairo_append_path (ctx, _tmp15_); +#line 31 "../src/smooth_line_area.vala" + _tmp16_ = area; +#line 31 "../src/smooth_line_area.vala" + live_chart_drawable_draw ((LiveChartDrawable*) _tmp16_, ctx, config); +#line 32 "../src/smooth_line_area.vala" + cairo_clip (ctx); +#line 34 "../src/smooth_line_area.vala" + live_chart_smooth_line_area_draw_regions_on_area (self, ctx, config); +#line 35 "../src/smooth_line_area.vala" + cairo_restore (ctx); +#line 36 "../src/smooth_line_area.vala" + cairo_paint (ctx); +#line 14 "../src/smooth_line_area.vala" + _g_object_unref0 (area); +#line 14 "../src/smooth_line_area.vala" + _cairo_path_destroy0 (path); +#line 200 "smooth_line_area.c" + } +#line 12 "../src/smooth_line_area.vala" + _g_object_unref0 (points); +#line 204 "smooth_line_area.c" + } +} + +static gpointer +_cairo_reference0 (gpointer self) +{ +#line 42 "../src/smooth_line_area.vala" + return self ? cairo_reference (self) : NULL; +#line 213 "smooth_line_area.c" +} + +static Block5Data* +block5_data_ref (Block5Data* _data5_) +{ +#line 42 "../src/smooth_line_area.vala" + g_atomic_int_inc (&_data5_->_ref_count_); +#line 42 "../src/smooth_line_area.vala" + return _data5_; +#line 223 "smooth_line_area.c" +} + +static void +block5_data_unref (void * _userdata_) +{ + Block5Data* _data5_; + _data5_ = (Block5Data*) _userdata_; +#line 42 "../src/smooth_line_area.vala" + if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) { +#line 233 "smooth_line_area.c" + LiveChartSmoothLineArea* self; +#line 42 "../src/smooth_line_area.vala" + self = _data5_->self; +#line 42 "../src/smooth_line_area.vala" + _cairo_destroy0 (_data5_->ctx); +#line 42 "../src/smooth_line_area.vala" + _g_object_unref0 (self); +#line 42 "../src/smooth_line_area.vala" + g_slice_free (Block5Data, _data5_); +#line 243 "smooth_line_area.c" + } +} + +static gboolean +__lambda14_ (Block5Data* _data5_, + LiveChartIntersection* intersection) +{ + LiveChartSmoothLineArea* self; + gboolean result; +#line 44 "../src/smooth_line_area.vala" + self = _data5_->self; +#line 45 "../src/smooth_line_area.vala" + if (intersection != NULL) { +#line 257 "smooth_line_area.c" + gdouble _tmp0_; + gdouble _tmp1_; + LiveChartBoundaries _tmp2_; + LiveChartBoundary _tmp3_; + gdouble _tmp4_; + gdouble _tmp5_; + gdouble _tmp6_; + gdouble _tmp7_; + LiveChartBoundaries _tmp8_; + LiveChartRegion* _tmp9_; + LiveChartRegion* _tmp10_; + GdkRGBA _tmp11_ = {0}; + GdkRGBA _tmp12_; + LiveChartRegion* _tmp13_; + LiveChartRegion* _tmp14_; + GdkRGBA _tmp15_ = {0}; + GdkRGBA _tmp16_; + LiveChartRegion* _tmp17_; + LiveChartRegion* _tmp18_; + GdkRGBA _tmp19_ = {0}; + GdkRGBA _tmp20_; + LiveChartRegion* _tmp21_; + LiveChartRegion* _tmp22_; + GdkRGBA _tmp23_ = {0}; + GdkRGBA _tmp24_; +#line 46 "../src/smooth_line_area.vala" + _tmp0_ = live_chart_intersection_get_start_x (intersection); +#line 46 "../src/smooth_line_area.vala" + _tmp1_ = _tmp0_; +#line 46 "../src/smooth_line_area.vala" + _tmp2_ = _data5_->boundaries; +#line 46 "../src/smooth_line_area.vala" + _tmp3_ = _tmp2_.y; +#line 46 "../src/smooth_line_area.vala" + _tmp4_ = live_chart_intersection_get_end_x (intersection); +#line 46 "../src/smooth_line_area.vala" + _tmp5_ = _tmp4_; +#line 46 "../src/smooth_line_area.vala" + _tmp6_ = live_chart_intersection_get_start_x (intersection); +#line 46 "../src/smooth_line_area.vala" + _tmp7_ = _tmp6_; +#line 46 "../src/smooth_line_area.vala" + _tmp8_ = _data5_->boundaries; +#line 46 "../src/smooth_line_area.vala" + cairo_rectangle (_data5_->ctx, _tmp1_, (gdouble) _tmp3_.min, _tmp5_ - _tmp7_, (gdouble) _tmp8_.height); +#line 47 "../src/smooth_line_area.vala" + _tmp9_ = live_chart_intersection_get_region (intersection); +#line 47 "../src/smooth_line_area.vala" + _tmp10_ = _tmp9_; +#line 47 "../src/smooth_line_area.vala" + live_chart_region_get_area_color (_tmp10_, &_tmp11_); +#line 47 "../src/smooth_line_area.vala" + _tmp12_ = _tmp11_; +#line 47 "../src/smooth_line_area.vala" + _tmp13_ = live_chart_intersection_get_region (intersection); +#line 47 "../src/smooth_line_area.vala" + _tmp14_ = _tmp13_; +#line 47 "../src/smooth_line_area.vala" + live_chart_region_get_area_color (_tmp14_, &_tmp15_); +#line 47 "../src/smooth_line_area.vala" + _tmp16_ = _tmp15_; +#line 47 "../src/smooth_line_area.vala" + _tmp17_ = live_chart_intersection_get_region (intersection); +#line 47 "../src/smooth_line_area.vala" + _tmp18_ = _tmp17_; +#line 47 "../src/smooth_line_area.vala" + live_chart_region_get_area_color (_tmp18_, &_tmp19_); +#line 47 "../src/smooth_line_area.vala" + _tmp20_ = _tmp19_; +#line 47 "../src/smooth_line_area.vala" + _tmp21_ = live_chart_intersection_get_region (intersection); +#line 47 "../src/smooth_line_area.vala" + _tmp22_ = _tmp21_; +#line 47 "../src/smooth_line_area.vala" + live_chart_region_get_area_color (_tmp22_, &_tmp23_); +#line 47 "../src/smooth_line_area.vala" + _tmp24_ = _tmp23_; +#line 47 "../src/smooth_line_area.vala" + cairo_set_source_rgba (_data5_->ctx, _tmp12_.red, _tmp16_.green, _tmp20_.blue, _tmp24_.alpha); +#line 48 "../src/smooth_line_area.vala" + cairo_fill (_data5_->ctx); +#line 339 "smooth_line_area.c" + } +#line 50 "../src/smooth_line_area.vala" + result = TRUE; +#line 50 "../src/smooth_line_area.vala" + _g_object_unref0 (intersection); +#line 50 "../src/smooth_line_area.vala" + return result; +#line 347 "smooth_line_area.c" +} + +static gboolean +___lambda14__gee_forall_func (gpointer g, + gpointer self) +{ + gboolean result; + result = __lambda14_ (self, (LiveChartIntersection*) g); +#line 44 "../src/smooth_line_area.vala" + return result; +#line 358 "smooth_line_area.c" +} + +void +live_chart_smooth_line_area_draw_regions_on_area (LiveChartSmoothLineArea* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + Block5Data* _data5_; + cairo_t* _tmp0_; + LiveChartBoundaries _tmp1_ = {0}; + LiveChartIntersections* _tmp2_; +#line 42 "../src/smooth_line_area.vala" + g_return_if_fail (self != NULL); +#line 42 "../src/smooth_line_area.vala" + g_return_if_fail (ctx != NULL); +#line 42 "../src/smooth_line_area.vala" + g_return_if_fail (config != NULL); +#line 42 "../src/smooth_line_area.vala" + _data5_ = g_slice_new0 (Block5Data); +#line 42 "../src/smooth_line_area.vala" + _data5_->_ref_count_ = 1; +#line 42 "../src/smooth_line_area.vala" + _data5_->self = g_object_ref (self); +#line 42 "../src/smooth_line_area.vala" + _tmp0_ = _cairo_reference0 (ctx); +#line 42 "../src/smooth_line_area.vala" + _cairo_destroy0 (_data5_->ctx); +#line 42 "../src/smooth_line_area.vala" + _data5_->ctx = _tmp0_; +#line 43 "../src/smooth_line_area.vala" + live_chart_config_boundaries (config, &_tmp1_); +#line 43 "../src/smooth_line_area.vala" + _data5_->boundaries = _tmp1_; +#line 44 "../src/smooth_line_area.vala" + _tmp2_ = ((LiveChartSmoothLine*) self)->intersections; +#line 44 "../src/smooth_line_area.vala" + live_chart_intersections_foreach (_tmp2_, ___lambda14__gee_forall_func, _data5_); +#line 42 "../src/smooth_line_area.vala" + block5_data_unref (_data5_); +#line 42 "../src/smooth_line_area.vala" + _data5_ = NULL; +#line 400 "smooth_line_area.c" +} + +gdouble +live_chart_smooth_line_area_get_area_alpha (LiveChartSmoothLineArea* self) +{ + gdouble result; +#line 6 "../src/smooth_line_area.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 6 "../src/smooth_line_area.vala" + result = self->priv->_area_alpha; +#line 6 "../src/smooth_line_area.vala" + return result; +#line 413 "smooth_line_area.c" +} + +void +live_chart_smooth_line_area_set_area_alpha (LiveChartSmoothLineArea* self, + gdouble value) +{ + gdouble old_value; +#line 6 "../src/smooth_line_area.vala" + g_return_if_fail (self != NULL); +#line 6 "../src/smooth_line_area.vala" + old_value = live_chart_smooth_line_area_get_area_alpha (self); +#line 6 "../src/smooth_line_area.vala" + if (old_value != value) { +#line 6 "../src/smooth_line_area.vala" + self->priv->_area_alpha = value; +#line 6 "../src/smooth_line_area.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_smooth_line_area_properties[LIVE_CHART_SMOOTH_LINE_AREA_AREA_ALPHA_PROPERTY]); +#line 431 "smooth_line_area.c" + } +} + +static void +live_chart_smooth_line_area_class_init (LiveChartSmoothLineAreaClass * klass, + gpointer klass_data) +{ +#line 4 "../src/smooth_line_area.vala" + live_chart_smooth_line_area_parent_class = g_type_class_peek_parent (klass); +#line 4 "../src/smooth_line_area.vala" + g_type_class_adjust_private_offset (klass, &LiveChartSmoothLineArea_private_offset); +#line 4 "../src/smooth_line_area.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_smooth_line_area_real_draw; +#line 4 "../src/smooth_line_area.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_smooth_line_area_get_property; +#line 4 "../src/smooth_line_area.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_smooth_line_area_set_property; +#line 4 "../src/smooth_line_area.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_smooth_line_area_finalize; +#line 4 "../src/smooth_line_area.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_SMOOTH_LINE_AREA_AREA_ALPHA_PROPERTY, live_chart_smooth_line_area_properties[LIVE_CHART_SMOOTH_LINE_AREA_AREA_ALPHA_PROPERTY] = g_param_spec_double ("area-alpha", "area-alpha", "area-alpha", -G_MAXDOUBLE, G_MAXDOUBLE, 0.1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 453 "smooth_line_area.c" +} + +static void +live_chart_smooth_line_area_instance_init (LiveChartSmoothLineArea * self, + gpointer klass) +{ +#line 4 "../src/smooth_line_area.vala" + self->priv = live_chart_smooth_line_area_get_instance_private (self); +#line 6 "../src/smooth_line_area.vala" + self->priv->_area_alpha = 0.1; +#line 464 "smooth_line_area.c" +} + +static void +live_chart_smooth_line_area_finalize (GObject * obj) +{ + LiveChartSmoothLineArea * self; +#line 4 "../src/smooth_line_area.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineArea); +#line 4 "../src/smooth_line_area.vala" + G_OBJECT_CLASS (live_chart_smooth_line_area_parent_class)->finalize (obj); +#line 475 "smooth_line_area.c" +} + +static GType +live_chart_smooth_line_area_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartSmoothLineAreaClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_smooth_line_area_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartSmoothLineArea), 0, (GInstanceInitFunc) live_chart_smooth_line_area_instance_init, NULL }; + GType live_chart_smooth_line_area_type_id; + live_chart_smooth_line_area_type_id = g_type_register_static (LIVE_CHART_TYPE_SMOOTH_LINE, "LiveChartSmoothLineArea", &g_define_type_info, 0); + LiveChartSmoothLineArea_private_offset = g_type_add_instance_private (live_chart_smooth_line_area_type_id, sizeof (LiveChartSmoothLineAreaPrivate)); + return live_chart_smooth_line_area_type_id; +} + +GType +live_chart_smooth_line_area_get_type (void) +{ + static volatile gsize live_chart_smooth_line_area_type_id__once = 0; + if (g_once_init_enter (&live_chart_smooth_line_area_type_id__once)) { + GType live_chart_smooth_line_area_type_id; + live_chart_smooth_line_area_type_id = live_chart_smooth_line_area_get_type_once (); + g_once_init_leave (&live_chart_smooth_line_area_type_id__once, live_chart_smooth_line_area_type_id); + } + return live_chart_smooth_line_area_type_id__once; +} + +static void +_vala_live_chart_smooth_line_area_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartSmoothLineArea * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineArea); +#line 4 "../src/smooth_line_area.vala" + switch (property_id) { +#line 4 "../src/smooth_line_area.vala" + case LIVE_CHART_SMOOTH_LINE_AREA_AREA_ALPHA_PROPERTY: +#line 4 "../src/smooth_line_area.vala" + g_value_set_double (value, live_chart_smooth_line_area_get_area_alpha (self)); +#line 4 "../src/smooth_line_area.vala" + break; +#line 516 "smooth_line_area.c" + default: +#line 4 "../src/smooth_line_area.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/smooth_line_area.vala" + break; +#line 522 "smooth_line_area.c" + } +} + +static void +_vala_live_chart_smooth_line_area_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartSmoothLineArea * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineArea); +#line 4 "../src/smooth_line_area.vala" + switch (property_id) { +#line 4 "../src/smooth_line_area.vala" + case LIVE_CHART_SMOOTH_LINE_AREA_AREA_ALPHA_PROPERTY: +#line 4 "../src/smooth_line_area.vala" + live_chart_smooth_line_area_set_area_alpha (self, g_value_get_double (value)); +#line 4 "../src/smooth_line_area.vala" + break; +#line 542 "smooth_line_area.c" + default: +#line 4 "../src/smooth_line_area.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 4 "../src/smooth_line_area.vala" + break; +#line 548 "smooth_line_area.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/static/static_chart.c b/iPDC/lib/liblivechart_static.a.p/static/static_chart.c new file mode 100644 index 0000000..edaed44 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/static/static_chart.c @@ -0,0 +1,672 @@ +/* static_chart.c generated by valac 0.56.0, the Vala compiler + * generated from static_chart.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_STATIC_STATIC_CHART_0_PROPERTY, + LIVE_CHART_STATIC_STATIC_CHART_GRID_PROPERTY, + LIVE_CHART_STATIC_STATIC_CHART_BACKGROUND_PROPERTY, + LIVE_CHART_STATIC_STATIC_CHART_LEGEND_PROPERTY, + LIVE_CHART_STATIC_STATIC_CHART_NUM_PROPERTIES +}; +static GParamSpec* live_chart_static_static_chart_properties[LIVE_CHART_STATIC_STATIC_CHART_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _live_chart_config_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_config_unref (var), NULL))) + +struct _LiveChartStaticStaticChartPrivate { + LiveChartStaticStaticGrid* _grid; + LiveChartBackground* _background; + LiveChartLegend* _legend; + GeeArrayList* categories; +}; + +static gint LiveChartStaticStaticChart_private_offset; +static gpointer live_chart_static_static_chart_parent_class = NULL; + +static void __lambda16_ (LiveChartStaticStaticChart* self, + GtkAllocation* allocation); +static void ___lambda16__gtk_widget_size_allocate (GtkWidget* _sender, + GtkAllocation* allocation, + gpointer self); +static gboolean live_chart_static_static_chart_render (LiveChartStaticStaticChart* self, + GtkWidget* _, + cairo_t* ctx); +static gboolean _live_chart_static_static_chart_render_gtk_widget_draw (GtkWidget* _sender, + cairo_t* cr, + gpointer self); +static void live_chart_static_static_chart_finalize (GObject * obj); +static GType live_chart_static_static_chart_get_type_once (void); +static void _vala_live_chart_static_static_chart_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_static_static_chart_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_static_static_chart_get_instance_private (LiveChartStaticStaticChart* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartStaticStaticChart_private_offset); +} + +static gpointer +_live_chart_config_ref0 (gpointer self) +{ +#line 17 "../src/static/static_chart.vala" + return self ? live_chart_config_ref (self) : NULL; +#line 72 "static_chart.c" +} + +static void +__lambda16_ (LiveChartStaticStaticChart* self, + GtkAllocation* allocation) +{ + LiveChartConfig* _tmp0_; + GtkAllocation _tmp1_; + LiveChartConfig* _tmp2_; + GtkAllocation _tmp3_; +#line 18 "../src/static/static_chart.vala" + g_return_if_fail (allocation != NULL); +#line 19 "../src/static/static_chart.vala" + _tmp0_ = self->config; +#line 19 "../src/static/static_chart.vala" + _tmp1_ = *allocation; +#line 19 "../src/static/static_chart.vala" + live_chart_config_set_height (_tmp0_, _tmp1_.height); +#line 20 "../src/static/static_chart.vala" + _tmp2_ = self->config; +#line 20 "../src/static/static_chart.vala" + _tmp3_ = *allocation; +#line 20 "../src/static/static_chart.vala" + live_chart_config_set_width (_tmp2_, _tmp3_.width); +#line 97 "static_chart.c" +} + +static void +___lambda16__gtk_widget_size_allocate (GtkWidget* _sender, + GtkAllocation* allocation, + gpointer self) +{ +#line 18 "../src/static/static_chart.vala" + __lambda16_ ((LiveChartStaticStaticChart*) self, allocation); +#line 107 "static_chart.c" +} + +static gboolean +_live_chart_static_static_chart_render_gtk_widget_draw (GtkWidget* _sender, + cairo_t* cr, + gpointer self) +{ + gboolean result; + result = live_chart_static_static_chart_render ((LiveChartStaticStaticChart*) self, _sender, cr); +#line 23 "../src/static/static_chart.vala" + return result; +#line 119 "static_chart.c" +} + +LiveChartStaticStaticChart* +live_chart_static_static_chart_construct (GType object_type, + LiveChartConfig* config) +{ + LiveChartStaticStaticChart * self = NULL; + LiveChartConfig* _tmp0_; + LiveChartStaticStaticSeries* _tmp1_; +#line 16 "../src/static/static_chart.vala" + g_return_val_if_fail (config != NULL, NULL); +#line 16 "../src/static/static_chart.vala" + self = (LiveChartStaticStaticChart*) g_object_new (object_type, NULL); +#line 17 "../src/static/static_chart.vala" + _tmp0_ = _live_chart_config_ref0 (config); +#line 17 "../src/static/static_chart.vala" + _live_chart_config_unref0 (self->config); +#line 17 "../src/static/static_chart.vala" + self->config = _tmp0_; +#line 18 "../src/static/static_chart.vala" + g_signal_connect_object ((GtkWidget*) self, "size-allocate", (GCallback) ___lambda16__gtk_widget_size_allocate, self, 0); +#line 23 "../src/static/static_chart.vala" + g_signal_connect_object ((GtkWidget*) self, "draw", (GCallback) _live_chart_static_static_chart_render_gtk_widget_draw, self, 0); +#line 25 "../src/static/static_chart.vala" + _tmp1_ = live_chart_static_static_series_new (self); +#line 25 "../src/static/static_chart.vala" + _g_object_unref0 (self->series); +#line 25 "../src/static/static_chart.vala" + self->series = _tmp1_; +#line 16 "../src/static/static_chart.vala" + return self; +#line 151 "static_chart.c" +} + +LiveChartStaticStaticChart* +live_chart_static_static_chart_new (LiveChartConfig* config) +{ +#line 16 "../src/static/static_chart.vala" + return live_chart_static_static_chart_construct (LIVE_CHART_STATIC_TYPE_STATIC_CHART, config); +#line 159 "static_chart.c" +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 29 "../src/static/static_chart.vala" + return self ? g_object_ref (self) : NULL; +#line 167 "static_chart.c" +} + +void +live_chart_static_static_chart_set_categories (LiveChartStaticStaticChart* self, + GeeArrayList* categories) +{ + GeeArrayList* _tmp0_; + LiveChartConfig* _tmp1_; + GeeArrayList* _tmp2_; +#line 28 "../src/static/static_chart.vala" + g_return_if_fail (self != NULL); +#line 28 "../src/static/static_chart.vala" + g_return_if_fail (categories != NULL); +#line 29 "../src/static/static_chart.vala" + _tmp0_ = _g_object_ref0 (categories); +#line 29 "../src/static/static_chart.vala" + _g_object_unref0 (self->priv->categories); +#line 29 "../src/static/static_chart.vala" + self->priv->categories = _tmp0_; +#line 30 "../src/static/static_chart.vala" + _tmp1_ = self->config; +#line 30 "../src/static/static_chart.vala" + _tmp2_ = _g_object_ref0 (categories); +#line 30 "../src/static/static_chart.vala" + _g_object_unref0 (_tmp1_->categories); +#line 30 "../src/static/static_chart.vala" + _tmp1_->categories = _tmp2_; +#line 195 "static_chart.c" +} + +void +live_chart_static_static_chart_add_serie (LiveChartStaticStaticChart* self, + LiveChartStaticStaticSerie* serie) +{ + LiveChartStaticStaticSeries* _tmp0_; + LiveChartStaticStaticSerie* _tmp1_; + LiveChartStaticStaticSerie* _tmp2_; +#line 33 "../src/static/static_chart.vala" + g_return_if_fail (self != NULL); +#line 33 "../src/static/static_chart.vala" + g_return_if_fail (serie != NULL); +#line 34 "../src/static/static_chart.vala" + _tmp0_ = self->series; +#line 34 "../src/static/static_chart.vala" + _tmp1_ = live_chart_static_static_series_register (_tmp0_, serie); +#line 34 "../src/static/static_chart.vala" + _tmp2_ = _tmp1_; +#line 34 "../src/static/static_chart.vala" + _g_object_unref0 (_tmp2_); +#line 217 "static_chart.c" +} + +static gboolean +live_chart_static_static_chart_render (LiveChartStaticStaticChart* self, + GtkWidget* _, + cairo_t* ctx) +{ + LiveChartConfig* _tmp0_; + LiveChartLegend* _tmp1_; + LiveChartBackground* _tmp2_; + LiveChartConfig* _tmp3_; + LiveChartStaticStaticGrid* _tmp4_; + LiveChartConfig* _tmp5_; + LiveChartLegend* _tmp6_; + LiveChartBoundaries boundaries = {0}; + LiveChartConfig* _tmp9_; + LiveChartBoundaries _tmp10_ = {0}; + gboolean result; +#line 38 "../src/static/static_chart.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 38 "../src/static/static_chart.vala" + g_return_val_if_fail (_ != NULL, FALSE); +#line 38 "../src/static/static_chart.vala" + g_return_val_if_fail (ctx != NULL, FALSE); +#line 40 "../src/static/static_chart.vala" + _tmp0_ = self->config; +#line 40 "../src/static/static_chart.vala" + _tmp1_ = self->priv->_legend; +#line 40 "../src/static/static_chart.vala" + live_chart_config_configure (_tmp0_, ctx, _tmp1_); +#line 42 "../src/static/static_chart.vala" + _tmp2_ = self->priv->_background; +#line 42 "../src/static/static_chart.vala" + _tmp3_ = self->config; +#line 42 "../src/static/static_chart.vala" + live_chart_drawable_draw ((LiveChartDrawable*) _tmp2_, ctx, _tmp3_); +#line 43 "../src/static/static_chart.vala" + _tmp4_ = self->priv->_grid; +#line 43 "../src/static/static_chart.vala" + _tmp5_ = self->config; +#line 43 "../src/static/static_chart.vala" + live_chart_drawable_draw ((LiveChartDrawable*) _tmp4_, ctx, _tmp5_); +#line 44 "../src/static/static_chart.vala" + _tmp6_ = self->priv->_legend; +#line 44 "../src/static/static_chart.vala" + if (_tmp6_ != NULL) { +#line 264 "static_chart.c" + LiveChartLegend* _tmp7_; + LiveChartConfig* _tmp8_; +#line 44 "../src/static/static_chart.vala" + _tmp7_ = self->priv->_legend; +#line 44 "../src/static/static_chart.vala" + _tmp8_ = self->config; +#line 44 "../src/static/static_chart.vala" + live_chart_legend_draw (_tmp7_, ctx, _tmp8_); +#line 273 "static_chart.c" + } +#line 46 "../src/static/static_chart.vala" + _tmp9_ = self->config; +#line 46 "../src/static/static_chart.vala" + live_chart_config_boundaries (_tmp9_, &_tmp10_); +#line 46 "../src/static/static_chart.vala" + boundaries = _tmp10_; +#line 281 "static_chart.c" + { + GeeIterator* _serie_it = NULL; + LiveChartStaticStaticSeries* _tmp11_; + GeeIterator* _tmp12_; +#line 47 "../src/static/static_chart.vala" + _tmp11_ = self->series; +#line 47 "../src/static/static_chart.vala" + _tmp12_ = live_chart_static_static_series_iterator (_tmp11_); +#line 47 "../src/static/static_chart.vala" + _serie_it = _tmp12_; +#line 47 "../src/static/static_chart.vala" + while (TRUE) { +#line 294 "static_chart.c" + GeeIterator* _tmp13_; + LiveChartDrawable* serie = NULL; + GeeIterator* _tmp14_; + gpointer _tmp15_; + LiveChartBoundaries _tmp16_; + LiveChartBoundary _tmp17_; + LiveChartBoundaries _tmp18_; + LiveChartBoundary _tmp19_; + LiveChartBoundaries _tmp20_; + LiveChartBoundary _tmp21_; + LiveChartBoundaries _tmp22_; + LiveChartBoundary _tmp23_; + LiveChartDrawable* _tmp24_; + LiveChartConfig* _tmp25_; +#line 47 "../src/static/static_chart.vala" + _tmp13_ = _serie_it; +#line 47 "../src/static/static_chart.vala" + if (!gee_iterator_next (_tmp13_)) { +#line 47 "../src/static/static_chart.vala" + break; +#line 315 "static_chart.c" + } +#line 47 "../src/static/static_chart.vala" + _tmp14_ = _serie_it; +#line 47 "../src/static/static_chart.vala" + _tmp15_ = gee_iterator_get (_tmp14_); +#line 47 "../src/static/static_chart.vala" + serie = (LiveChartDrawable*) ((LiveChartStaticStaticSerie*) _tmp15_); +#line 48 "../src/static/static_chart.vala" + _tmp16_ = boundaries; +#line 48 "../src/static/static_chart.vala" + _tmp17_ = _tmp16_.x; +#line 48 "../src/static/static_chart.vala" + _tmp18_ = boundaries; +#line 48 "../src/static/static_chart.vala" + _tmp19_ = _tmp18_.y; +#line 48 "../src/static/static_chart.vala" + _tmp20_ = boundaries; +#line 48 "../src/static/static_chart.vala" + _tmp21_ = _tmp20_.x; +#line 48 "../src/static/static_chart.vala" + _tmp22_ = boundaries; +#line 48 "../src/static/static_chart.vala" + _tmp23_ = _tmp22_.y; +#line 48 "../src/static/static_chart.vala" + cairo_rectangle (ctx, (gdouble) _tmp17_.min, (gdouble) _tmp19_.min, (gdouble) _tmp21_.max, (gdouble) _tmp23_.max); +#line 49 "../src/static/static_chart.vala" + cairo_clip (ctx); +#line 50 "../src/static/static_chart.vala" + _tmp24_ = serie; +#line 50 "../src/static/static_chart.vala" + _tmp25_ = self->config; +#line 50 "../src/static/static_chart.vala" + live_chart_drawable_draw (_tmp24_, ctx, _tmp25_); +#line 47 "../src/static/static_chart.vala" + _g_object_unref0 (serie); +#line 351 "static_chart.c" + } +#line 47 "../src/static/static_chart.vala" + _g_object_unref0 (_serie_it); +#line 355 "static_chart.c" + } +#line 53 "../src/static/static_chart.vala" + result = TRUE; +#line 53 "../src/static/static_chart.vala" + return result; +#line 361 "static_chart.c" +} + +LiveChartStaticStaticGrid* +live_chart_static_static_chart_get_grid (LiveChartStaticStaticChart* self) +{ + LiveChartStaticStaticGrid* result; + LiveChartStaticStaticGrid* _tmp0_; +#line 8 "../src/static/static_chart.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 8 "../src/static/static_chart.vala" + _tmp0_ = self->priv->_grid; +#line 8 "../src/static/static_chart.vala" + result = _tmp0_; +#line 8 "../src/static/static_chart.vala" + return result; +#line 377 "static_chart.c" +} + +void +live_chart_static_static_chart_set_grid (LiveChartStaticStaticChart* self, + LiveChartStaticStaticGrid* value) +{ + LiveChartStaticStaticGrid* old_value; +#line 8 "../src/static/static_chart.vala" + g_return_if_fail (self != NULL); +#line 8 "../src/static/static_chart.vala" + old_value = live_chart_static_static_chart_get_grid (self); +#line 8 "../src/static/static_chart.vala" + if (old_value != value) { +#line 391 "static_chart.c" + LiveChartStaticStaticGrid* _tmp0_; +#line 8 "../src/static/static_chart.vala" + _tmp0_ = _g_object_ref0 (value); +#line 8 "../src/static/static_chart.vala" + _g_object_unref0 (self->priv->_grid); +#line 8 "../src/static/static_chart.vala" + self->priv->_grid = _tmp0_; +#line 8 "../src/static/static_chart.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_chart_properties[LIVE_CHART_STATIC_STATIC_CHART_GRID_PROPERTY]); +#line 401 "static_chart.c" + } +} + +LiveChartBackground* +live_chart_static_static_chart_get_background (LiveChartStaticStaticChart* self) +{ + LiveChartBackground* result; + LiveChartBackground* _tmp0_; +#line 9 "../src/static/static_chart.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 9 "../src/static/static_chart.vala" + _tmp0_ = self->priv->_background; +#line 9 "../src/static/static_chart.vala" + result = _tmp0_; +#line 9 "../src/static/static_chart.vala" + return result; +#line 418 "static_chart.c" +} + +void +live_chart_static_static_chart_set_background (LiveChartStaticStaticChart* self, + LiveChartBackground* value) +{ + LiveChartBackground* old_value; +#line 9 "../src/static/static_chart.vala" + g_return_if_fail (self != NULL); +#line 9 "../src/static/static_chart.vala" + old_value = live_chart_static_static_chart_get_background (self); +#line 9 "../src/static/static_chart.vala" + if (old_value != value) { +#line 432 "static_chart.c" + LiveChartBackground* _tmp0_; +#line 9 "../src/static/static_chart.vala" + _tmp0_ = _g_object_ref0 (value); +#line 9 "../src/static/static_chart.vala" + _g_object_unref0 (self->priv->_background); +#line 9 "../src/static/static_chart.vala" + self->priv->_background = _tmp0_; +#line 9 "../src/static/static_chart.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_chart_properties[LIVE_CHART_STATIC_STATIC_CHART_BACKGROUND_PROPERTY]); +#line 442 "static_chart.c" + } +} + +LiveChartLegend* +live_chart_static_static_chart_get_legend (LiveChartStaticStaticChart* self) +{ + LiveChartLegend* result; + LiveChartLegend* _tmp0_; +#line 10 "../src/static/static_chart.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 10 "../src/static/static_chart.vala" + _tmp0_ = self->priv->_legend; +#line 10 "../src/static/static_chart.vala" + result = _tmp0_; +#line 10 "../src/static/static_chart.vala" + return result; +#line 459 "static_chart.c" +} + +void +live_chart_static_static_chart_set_legend (LiveChartStaticStaticChart* self, + LiveChartLegend* value) +{ + LiveChartLegend* old_value; +#line 10 "../src/static/static_chart.vala" + g_return_if_fail (self != NULL); +#line 10 "../src/static/static_chart.vala" + old_value = live_chart_static_static_chart_get_legend (self); +#line 10 "../src/static/static_chart.vala" + if (old_value != value) { +#line 473 "static_chart.c" + LiveChartLegend* _tmp0_; +#line 10 "../src/static/static_chart.vala" + _tmp0_ = _g_object_ref0 (value); +#line 10 "../src/static/static_chart.vala" + _g_object_unref0 (self->priv->_legend); +#line 10 "../src/static/static_chart.vala" + self->priv->_legend = _tmp0_; +#line 10 "../src/static/static_chart.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_chart_properties[LIVE_CHART_STATIC_STATIC_CHART_LEGEND_PROPERTY]); +#line 483 "static_chart.c" + } +} + +static void +live_chart_static_static_chart_class_init (LiveChartStaticStaticChartClass * klass, + gpointer klass_data) +{ +#line 6 "../src/static/static_chart.vala" + live_chart_static_static_chart_parent_class = g_type_class_peek_parent (klass); +#line 6 "../src/static/static_chart.vala" + g_type_class_adjust_private_offset (klass, &LiveChartStaticStaticChart_private_offset); +#line 6 "../src/static/static_chart.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_static_static_chart_get_property; +#line 6 "../src/static/static_chart.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_static_static_chart_set_property; +#line 6 "../src/static/static_chart.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_static_static_chart_finalize; +#line 6 "../src/static/static_chart.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_CHART_GRID_PROPERTY, live_chart_static_static_chart_properties[LIVE_CHART_STATIC_STATIC_CHART_GRID_PROPERTY] = g_param_spec_object ("grid", "grid", "grid", LIVE_CHART_STATIC_TYPE_STATIC_GRID, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 6 "../src/static/static_chart.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_CHART_BACKGROUND_PROPERTY, live_chart_static_static_chart_properties[LIVE_CHART_STATIC_STATIC_CHART_BACKGROUND_PROPERTY] = g_param_spec_object ("background", "background", "background", LIVE_CHART_TYPE_BACKGROUND, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 6 "../src/static/static_chart.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_CHART_LEGEND_PROPERTY, live_chart_static_static_chart_properties[LIVE_CHART_STATIC_STATIC_CHART_LEGEND_PROPERTY] = g_param_spec_object ("legend", "legend", "legend", LIVE_CHART_TYPE_LEGEND, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 507 "static_chart.c" +} + +static void +live_chart_static_static_chart_instance_init (LiveChartStaticStaticChart * self, + gpointer klass) +{ + LiveChartStaticStaticGrid* _tmp0_; + LiveChartBackground* _tmp1_; + LiveChartHorizontalLegend* _tmp2_; + GeeArrayList* _tmp3_; +#line 6 "../src/static/static_chart.vala" + self->priv = live_chart_static_static_chart_get_instance_private (self); +#line 8 "../src/static/static_chart.vala" + _tmp0_ = live_chart_static_static_grid_new (); +#line 8 "../src/static/static_chart.vala" + self->priv->_grid = _tmp0_; +#line 9 "../src/static/static_chart.vala" + _tmp1_ = live_chart_background_new (); +#line 9 "../src/static/static_chart.vala" + self->priv->_background = _tmp1_; +#line 10 "../src/static/static_chart.vala" + _tmp2_ = live_chart_horizontal_legend_new (); +#line 10 "../src/static/static_chart.vala" + self->priv->_legend = (LiveChartLegend*) _tmp2_; +#line 14 "../src/static/static_chart.vala" + _tmp3_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL); +#line 14 "../src/static/static_chart.vala" + self->priv->categories = _tmp3_; +#line 536 "static_chart.c" +} + +static void +live_chart_static_static_chart_finalize (GObject * obj) +{ + LiveChartStaticStaticChart * self; +#line 6 "../src/static/static_chart.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChart); +#line 8 "../src/static/static_chart.vala" + _g_object_unref0 (self->priv->_grid); +#line 9 "../src/static/static_chart.vala" + _g_object_unref0 (self->priv->_background); +#line 10 "../src/static/static_chart.vala" + _g_object_unref0 (self->priv->_legend); +#line 11 "../src/static/static_chart.vala" + _live_chart_config_unref0 (self->config); +#line 12 "../src/static/static_chart.vala" + _g_object_unref0 (self->series); +#line 14 "../src/static/static_chart.vala" + _g_object_unref0 (self->priv->categories); +#line 6 "../src/static/static_chart.vala" + G_OBJECT_CLASS (live_chart_static_static_chart_parent_class)->finalize (obj); +#line 559 "static_chart.c" +} + +static GType +live_chart_static_static_chart_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartStaticStaticChartClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_static_static_chart_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartStaticStaticChart), 0, (GInstanceInitFunc) live_chart_static_static_chart_instance_init, NULL }; + GType live_chart_static_static_chart_type_id; + live_chart_static_static_chart_type_id = g_type_register_static (gtk_drawing_area_get_type (), "LiveChartStaticStaticChart", &g_define_type_info, 0); + LiveChartStaticStaticChart_private_offset = g_type_add_instance_private (live_chart_static_static_chart_type_id, sizeof (LiveChartStaticStaticChartPrivate)); + return live_chart_static_static_chart_type_id; +} + +GType +live_chart_static_static_chart_get_type (void) +{ + static volatile gsize live_chart_static_static_chart_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_static_chart_type_id__once)) { + GType live_chart_static_static_chart_type_id; + live_chart_static_static_chart_type_id = live_chart_static_static_chart_get_type_once (); + g_once_init_leave (&live_chart_static_static_chart_type_id__once, live_chart_static_static_chart_type_id); + } + return live_chart_static_static_chart_type_id__once; +} + +static void +_vala_live_chart_static_static_chart_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticChart * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChart); +#line 6 "../src/static/static_chart.vala" + switch (property_id) { +#line 6 "../src/static/static_chart.vala" + case LIVE_CHART_STATIC_STATIC_CHART_GRID_PROPERTY: +#line 6 "../src/static/static_chart.vala" + g_value_set_object (value, live_chart_static_static_chart_get_grid (self)); +#line 6 "../src/static/static_chart.vala" + break; +#line 6 "../src/static/static_chart.vala" + case LIVE_CHART_STATIC_STATIC_CHART_BACKGROUND_PROPERTY: +#line 6 "../src/static/static_chart.vala" + g_value_set_object (value, live_chart_static_static_chart_get_background (self)); +#line 6 "../src/static/static_chart.vala" + break; +#line 6 "../src/static/static_chart.vala" + case LIVE_CHART_STATIC_STATIC_CHART_LEGEND_PROPERTY: +#line 6 "../src/static/static_chart.vala" + g_value_set_object (value, live_chart_static_static_chart_get_legend (self)); +#line 6 "../src/static/static_chart.vala" + break; +#line 612 "static_chart.c" + default: +#line 6 "../src/static/static_chart.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_chart.vala" + break; +#line 618 "static_chart.c" + } +} + +static void +_vala_live_chart_static_static_chart_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticChart * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChart); +#line 6 "../src/static/static_chart.vala" + switch (property_id) { +#line 6 "../src/static/static_chart.vala" + case LIVE_CHART_STATIC_STATIC_CHART_GRID_PROPERTY: +#line 6 "../src/static/static_chart.vala" + live_chart_static_static_chart_set_grid (self, g_value_get_object (value)); +#line 6 "../src/static/static_chart.vala" + break; +#line 6 "../src/static/static_chart.vala" + case LIVE_CHART_STATIC_STATIC_CHART_BACKGROUND_PROPERTY: +#line 6 "../src/static/static_chart.vala" + live_chart_static_static_chart_set_background (self, g_value_get_object (value)); +#line 6 "../src/static/static_chart.vala" + break; +#line 6 "../src/static/static_chart.vala" + case LIVE_CHART_STATIC_STATIC_CHART_LEGEND_PROPERTY: +#line 6 "../src/static/static_chart.vala" + live_chart_static_static_chart_set_legend (self, g_value_get_object (value)); +#line 6 "../src/static/static_chart.vala" + break; +#line 650 "static_chart.c" + default: +#line 6 "../src/static/static_chart.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_chart.vala" + break; +#line 656 "static_chart.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/static/static_grid.c b/iPDC/lib/liblivechart_static.a.p/static/static_grid.c new file mode 100644 index 0000000..ca57eaa --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/static/static_grid.c @@ -0,0 +1,1270 @@ +/* static_grid.c generated by valac 0.56.0, the Vala compiler + * generated from static_grid.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_STATIC_STATIC_GRID_0_PROPERTY, + LIVE_CHART_STATIC_STATIC_GRID_VISIBLE_PROPERTY, + LIVE_CHART_STATIC_STATIC_GRID_MAIN_COLOR_PROPERTY, + LIVE_CHART_STATIC_STATIC_GRID_NUM_PROPERTIES +}; +static GParamSpec* live_chart_static_static_grid_properties[LIVE_CHART_STATIC_STATIC_GRID_NUM_PROPERTIES]; +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _LiveChartStaticStaticGridPrivate { + gboolean _visible; + GdkRGBA _main_color; +}; + +static gint LiveChartStaticStaticGrid_private_offset; +static gpointer live_chart_static_static_grid_parent_class = NULL; +static LiveChartDrawableIface * live_chart_static_static_grid_live_chart_drawable_parent_iface = NULL; + +static void live_chart_static_static_grid_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_static_static_grid_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static gboolean _gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2); +static void live_chart_static_static_grid_finalize (GObject * obj); +static GType live_chart_static_static_grid_get_type_once (void); +static void _vala_live_chart_static_static_grid_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_static_static_grid_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_static_static_grid_get_instance_private (LiveChartStaticStaticGrid* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartStaticStaticGrid_private_offset); +} + +static void +live_chart_static_static_grid_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartStaticStaticGrid * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 25 "../src/static/static_grid.vala" + self = (LiveChartStaticStaticGrid*) base; +#line 25 "../src/static/static_grid.vala" + g_return_if_fail (ctx != NULL); +#line 25 "../src/static/static_grid.vala" + g_return_if_fail (config != NULL); +#line 26 "../src/static/static_grid.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 26 "../src/static/static_grid.vala" + _tmp1_ = _tmp0_; +#line 26 "../src/static/static_grid.vala" + if (_tmp1_) { +#line 27 "../src/static/static_grid.vala" + live_chart_static_static_grid_render_abscissa (self, ctx, config); +#line 28 "../src/static/static_grid.vala" + live_chart_static_static_grid_render_ordinate (self, ctx, config); +#line 29 "../src/static/static_grid.vala" + live_chart_static_static_grid_render_grid (self, ctx, config); +#line 30 "../src/static/static_grid.vala" + live_chart_static_static_grid_update_bounding_box (self, config); +#line 31 "../src/static/static_grid.vala" + live_chart_static_static_grid_debug (self, ctx); +#line 90 "static_grid.c" + } +} + +static void +live_chart_static_static_grid_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartStaticStaticGrid * self; + LiveChartBoundingBox _tmp0_; +#line 35 "../src/static/static_grid.vala" + self = (LiveChartStaticStaticGrid*) base; +#line 36 "../src/static/static_grid.vala" + _tmp0_ = self->bounding_box; +#line 36 "../src/static/static_grid.vala" + *result = _tmp0_; +#line 36 "../src/static/static_grid.vala" + return; +#line 108 "static_grid.c" +} + +void +live_chart_static_static_grid_restore (LiveChartStaticStaticGrid* self, + cairo_t* ctx) +{ + GdkRGBA _tmp0_; + GdkRGBA _tmp1_; + GdkRGBA _tmp2_; + GdkRGBA _tmp3_; +#line 39 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 39 "../src/static/static_grid.vala" + g_return_if_fail (ctx != NULL); +#line 40 "../src/static/static_grid.vala" + _tmp0_ = self->priv->_main_color; +#line 40 "../src/static/static_grid.vala" + _tmp1_ = self->priv->_main_color; +#line 40 "../src/static/static_grid.vala" + _tmp2_ = self->priv->_main_color; +#line 40 "../src/static/static_grid.vala" + _tmp3_ = self->priv->_main_color; +#line 40 "../src/static/static_grid.vala" + cairo_set_source_rgba (ctx, _tmp0_.red, _tmp1_.green, _tmp2_.blue, _tmp3_.alpha); +#line 41 "../src/static/static_grid.vala" + cairo_set_line_width (ctx, 0.5); +#line 42 "../src/static/static_grid.vala" + cairo_set_dash (ctx, NULL, (gint) 0, 0.0); +#line 137 "static_grid.c" +} + +void +live_chart_static_static_grid_render_abscissa (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + gboolean _tmp0_ = FALSE; + LiveChartXAxis* _tmp1_; + gboolean _tmp2_; + gboolean _tmp3_; +#line 45 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 45 "../src/static/static_grid.vala" + g_return_if_fail (ctx != NULL); +#line 45 "../src/static/static_grid.vala" + g_return_if_fail (config != NULL); +#line 46 "../src/static/static_grid.vala" + _tmp1_ = config->x_axis; +#line 46 "../src/static/static_grid.vala" + _tmp2_ = live_chart_xaxis_get_visible (_tmp1_); +#line 46 "../src/static/static_grid.vala" + _tmp3_ = _tmp2_; +#line 46 "../src/static/static_grid.vala" + if (_tmp3_) { +#line 163 "static_grid.c" + LiveChartXAxis* _tmp4_; + LiveChartPath* _tmp5_; + gboolean _tmp6_; + gboolean _tmp7_; +#line 46 "../src/static/static_grid.vala" + _tmp4_ = config->x_axis; +#line 46 "../src/static/static_grid.vala" + _tmp5_ = _tmp4_->axis; +#line 46 "../src/static/static_grid.vala" + _tmp6_ = live_chart_path_get_visible (_tmp5_); +#line 46 "../src/static/static_grid.vala" + _tmp7_ = _tmp6_; +#line 46 "../src/static/static_grid.vala" + _tmp0_ = _tmp7_; +#line 178 "static_grid.c" + } else { +#line 46 "../src/static/static_grid.vala" + _tmp0_ = FALSE; +#line 182 "static_grid.c" + } +#line 46 "../src/static/static_grid.vala" + if (_tmp0_) { +#line 186 "static_grid.c" + LiveChartXAxis* _tmp8_; + LiveChartPath* _tmp9_; + LiveChartPadding _tmp10_; + gint _tmp11_; + gint _tmp12_; + LiveChartPadding _tmp13_; + gint _tmp14_; + gint _tmp15_; + LiveChartPadding _tmp16_; + gint _tmp17_; + gint _tmp18_; + LiveChartPadding _tmp19_; +#line 47 "../src/static/static_grid.vala" + _tmp8_ = config->x_axis; +#line 47 "../src/static/static_grid.vala" + _tmp9_ = _tmp8_->axis; +#line 47 "../src/static/static_grid.vala" + live_chart_path_configure (_tmp9_, ctx); +#line 48 "../src/static/static_grid.vala" + _tmp10_ = config->padding; +#line 48 "../src/static/static_grid.vala" + _tmp11_ = live_chart_config_get_height (config); +#line 48 "../src/static/static_grid.vala" + _tmp12_ = _tmp11_; +#line 48 "../src/static/static_grid.vala" + _tmp13_ = config->padding; +#line 48 "../src/static/static_grid.vala" + cairo_move_to (ctx, _tmp10_.left + 0.5, (_tmp12_ - _tmp13_.bottom) + 0.5); +#line 49 "../src/static/static_grid.vala" + _tmp14_ = live_chart_config_get_width (config); +#line 49 "../src/static/static_grid.vala" + _tmp15_ = _tmp14_; +#line 49 "../src/static/static_grid.vala" + _tmp16_ = config->padding; +#line 49 "../src/static/static_grid.vala" + _tmp17_ = live_chart_config_get_height (config); +#line 49 "../src/static/static_grid.vala" + _tmp18_ = _tmp17_; +#line 49 "../src/static/static_grid.vala" + _tmp19_ = config->padding; +#line 49 "../src/static/static_grid.vala" + cairo_line_to (ctx, (_tmp15_ - _tmp16_.right) + 0.5, (_tmp18_ - _tmp19_.bottom) + 0.5); +#line 50 "../src/static/static_grid.vala" + cairo_stroke (ctx); +#line 51 "../src/static/static_grid.vala" + live_chart_static_static_grid_restore (self, ctx); +#line 233 "static_grid.c" + } +} + +void +live_chart_static_static_grid_render_ordinate (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + gboolean _tmp0_ = FALSE; + LiveChartYAxis* _tmp1_; + gboolean _tmp2_; + gboolean _tmp3_; +#line 55 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 55 "../src/static/static_grid.vala" + g_return_if_fail (ctx != NULL); +#line 55 "../src/static/static_grid.vala" + g_return_if_fail (config != NULL); +#line 56 "../src/static/static_grid.vala" + _tmp1_ = config->y_axis; +#line 56 "../src/static/static_grid.vala" + _tmp2_ = live_chart_yaxis_get_visible (_tmp1_); +#line 56 "../src/static/static_grid.vala" + _tmp3_ = _tmp2_; +#line 56 "../src/static/static_grid.vala" + if (_tmp3_) { +#line 260 "static_grid.c" + LiveChartYAxis* _tmp4_; + LiveChartPath* _tmp5_; + gboolean _tmp6_; + gboolean _tmp7_; +#line 56 "../src/static/static_grid.vala" + _tmp4_ = config->y_axis; +#line 56 "../src/static/static_grid.vala" + _tmp5_ = _tmp4_->axis; +#line 56 "../src/static/static_grid.vala" + _tmp6_ = live_chart_path_get_visible (_tmp5_); +#line 56 "../src/static/static_grid.vala" + _tmp7_ = _tmp6_; +#line 56 "../src/static/static_grid.vala" + _tmp0_ = _tmp7_; +#line 275 "static_grid.c" + } else { +#line 56 "../src/static/static_grid.vala" + _tmp0_ = FALSE; +#line 279 "static_grid.c" + } +#line 56 "../src/static/static_grid.vala" + if (_tmp0_) { +#line 283 "static_grid.c" + LiveChartYAxis* _tmp8_; + LiveChartPath* _tmp9_; + LiveChartPadding _tmp10_; + gint _tmp11_; + gint _tmp12_; + LiveChartPadding _tmp13_; + LiveChartPadding _tmp14_; + LiveChartPadding _tmp15_; +#line 57 "../src/static/static_grid.vala" + _tmp8_ = config->y_axis; +#line 57 "../src/static/static_grid.vala" + _tmp9_ = _tmp8_->axis; +#line 57 "../src/static/static_grid.vala" + live_chart_path_configure (_tmp9_, ctx); +#line 58 "../src/static/static_grid.vala" + _tmp10_ = config->padding; +#line 58 "../src/static/static_grid.vala" + _tmp11_ = live_chart_config_get_height (config); +#line 58 "../src/static/static_grid.vala" + _tmp12_ = _tmp11_; +#line 58 "../src/static/static_grid.vala" + _tmp13_ = config->padding; +#line 58 "../src/static/static_grid.vala" + cairo_move_to (ctx, _tmp10_.left + 0.5, (_tmp12_ - _tmp13_.bottom) + 0.5); +#line 59 "../src/static/static_grid.vala" + _tmp14_ = config->padding; +#line 59 "../src/static/static_grid.vala" + _tmp15_ = config->padding; +#line 59 "../src/static/static_grid.vala" + cairo_line_to (ctx, _tmp14_.left + 0.5, _tmp15_.top + 0.5); +#line 60 "../src/static/static_grid.vala" + cairo_stroke (ctx); +#line 61 "../src/static/static_grid.vala" + live_chart_static_static_grid_restore (self, ctx); +#line 318 "static_grid.c" + } +} + +void +live_chart_static_static_grid_render_grid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ +#line 65 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 65 "../src/static/static_grid.vala" + g_return_if_fail (ctx != NULL); +#line 65 "../src/static/static_grid.vala" + g_return_if_fail (config != NULL); +#line 66 "../src/static/static_grid.vala" + live_chart_static_static_grid_render_hgrid (self, ctx, config); +#line 67 "../src/static/static_grid.vala" + live_chart_static_static_grid_render_vgrid (self, ctx, config); +#line 337 "static_grid.c" +} + +void +live_chart_static_static_grid_render_vgrid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; + gint width_between_each_points = 0; + LiveChartBoundaries _tmp1_; + LiveChartBoundary _tmp2_; + LiveChartBoundaries _tmp3_; + LiveChartBoundary _tmp4_; + GeeArrayList* _tmp5_; + gint _tmp6_; + gint _tmp7_; +#line 70 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 70 "../src/static/static_grid.vala" + g_return_if_fail (ctx != NULL); +#line 70 "../src/static/static_grid.vala" + g_return_if_fail (config != NULL); +#line 72 "../src/static/static_grid.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 72 "../src/static/static_grid.vala" + boundaries = _tmp0_; +#line 75 "../src/static/static_grid.vala" + _tmp1_ = boundaries; +#line 75 "../src/static/static_grid.vala" + _tmp2_ = _tmp1_.x; +#line 75 "../src/static/static_grid.vala" + _tmp3_ = boundaries; +#line 75 "../src/static/static_grid.vala" + _tmp4_ = _tmp3_.x; +#line 75 "../src/static/static_grid.vala" + _tmp5_ = config->categories; +#line 75 "../src/static/static_grid.vala" + _tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_); +#line 75 "../src/static/static_grid.vala" + _tmp7_ = _tmp6_; +#line 75 "../src/static/static_grid.vala" + width_between_each_points = (_tmp2_.max - _tmp4_.min) / (_tmp7_ - 1); +#line 381 "static_grid.c" + { + guint8 i = 0U; +#line 77 "../src/static/static_grid.vala" + i = (guint8) 0; +#line 386 "static_grid.c" + { + gboolean _tmp8_ = FALSE; +#line 77 "../src/static/static_grid.vala" + _tmp8_ = TRUE; +#line 77 "../src/static/static_grid.vala" + while (TRUE) { +#line 393 "static_grid.c" + GeeArrayList* _tmp10_; + gint _tmp11_; + gint _tmp12_; + gchar* category = NULL; + GeeArrayList* _tmp13_; + gpointer _tmp14_; + gboolean _tmp15_ = FALSE; + LiveChartXAxis* _tmp16_; + gboolean _tmp17_; + gboolean _tmp18_; +#line 77 "../src/static/static_grid.vala" + if (!_tmp8_) { +#line 406 "static_grid.c" + guint8 _tmp9_; +#line 77 "../src/static/static_grid.vala" + _tmp9_ = i; +#line 77 "../src/static/static_grid.vala" + i = _tmp9_ + 1; +#line 412 "static_grid.c" + } +#line 77 "../src/static/static_grid.vala" + _tmp8_ = FALSE; +#line 77 "../src/static/static_grid.vala" + _tmp10_ = config->categories; +#line 77 "../src/static/static_grid.vala" + _tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp10_); +#line 77 "../src/static/static_grid.vala" + _tmp12_ = _tmp11_; +#line 77 "../src/static/static_grid.vala" + if (!(((gint) i) < _tmp12_)) { +#line 77 "../src/static/static_grid.vala" + break; +#line 426 "static_grid.c" + } +#line 78 "../src/static/static_grid.vala" + _tmp13_ = config->categories; +#line 78 "../src/static/static_grid.vala" + _tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, (gint) i); +#line 78 "../src/static/static_grid.vala" + category = (gchar*) _tmp14_; +#line 79 "../src/static/static_grid.vala" + _tmp16_ = config->x_axis; +#line 79 "../src/static/static_grid.vala" + _tmp17_ = live_chart_xaxis_get_visible (_tmp16_); +#line 79 "../src/static/static_grid.vala" + _tmp18_ = _tmp17_; +#line 79 "../src/static/static_grid.vala" + if (_tmp18_) { +#line 442 "static_grid.c" + LiveChartXAxis* _tmp19_; + LiveChartLabels* _tmp20_; + gboolean _tmp21_; + gboolean _tmp22_; +#line 79 "../src/static/static_grid.vala" + _tmp19_ = config->x_axis; +#line 79 "../src/static/static_grid.vala" + _tmp20_ = _tmp19_->labels; +#line 79 "../src/static/static_grid.vala" + _tmp21_ = live_chart_labels_get_visible (_tmp20_); +#line 79 "../src/static/static_grid.vala" + _tmp22_ = _tmp21_; +#line 79 "../src/static/static_grid.vala" + _tmp15_ = _tmp22_; +#line 457 "static_grid.c" + } else { +#line 79 "../src/static/static_grid.vala" + _tmp15_ = FALSE; +#line 461 "static_grid.c" + } +#line 79 "../src/static/static_grid.vala" + if (_tmp15_) { +#line 465 "static_grid.c" + LiveChartXAxis* _tmp23_; + LiveChartLabels* _tmp24_; + LiveChartFont* _tmp25_; + LiveChartFont* _tmp26_; + cairo_text_extents_t extents = {0}; + const gchar* _tmp27_; + cairo_text_extents_t _tmp28_ = {0}; + const gchar* _tmp29_; + cairo_text_extents_t _tmp30_; + gint _tmp31_; + gint _tmp32_; + LiveChartPadding _tmp33_; + LiveChartXAxis* _tmp34_; + LiveChartLabels* _tmp35_; + cairo_text_extents_t _tmp36_ = {0}; + cairo_text_extents_t _tmp37_; + cairo_text_extents_t _tmp38_; + LiveChartBoundaries _tmp39_; + LiveChartBoundary _tmp40_; + gint _tmp41_; + gint _tmp42_; + LiveChartPadding _tmp43_; + LiveChartXAxis* _tmp44_; + LiveChartLabels* _tmp45_; + cairo_text_extents_t _tmp46_ = {0}; + cairo_text_extents_t _tmp47_; + const gchar* _tmp48_; +#line 80 "../src/static/static_grid.vala" + _tmp23_ = config->x_axis; +#line 80 "../src/static/static_grid.vala" + _tmp24_ = _tmp23_->labels; +#line 80 "../src/static/static_grid.vala" + _tmp25_ = live_chart_labels_get_font (_tmp24_); +#line 80 "../src/static/static_grid.vala" + _tmp26_ = _tmp25_; +#line 80 "../src/static/static_grid.vala" + live_chart_font_configure (_tmp26_, ctx); +#line 84 "../src/static/static_grid.vala" + _tmp27_ = category; +#line 84 "../src/static/static_grid.vala" + cairo_text_extents (ctx, _tmp27_, &_tmp28_); +#line 84 "../src/static/static_grid.vala" + extents = _tmp28_; +#line 85 "../src/static/static_grid.vala" + _tmp29_ = category; +#line 85 "../src/static/static_grid.vala" + _tmp30_ = extents; +#line 85 "../src/static/static_grid.vala" + _tmp31_ = live_chart_config_get_height (config); +#line 85 "../src/static/static_grid.vala" + _tmp32_ = _tmp31_; +#line 85 "../src/static/static_grid.vala" + _tmp33_ = config->padding; +#line 85 "../src/static/static_grid.vala" + _tmp34_ = config->x_axis; +#line 85 "../src/static/static_grid.vala" + _tmp35_ = _tmp34_->labels; +#line 85 "../src/static/static_grid.vala" + live_chart_labels_get_extents (_tmp35_, &_tmp36_); +#line 85 "../src/static/static_grid.vala" + _tmp37_ = _tmp36_; +#line 85 "../src/static/static_grid.vala" + g_message ("static_grid.vala:85: Display %s at %f,%f", _tmp29_, ((width_between_each_points + 0.5) - (_tmp30_.width / 2)) * i, (((0.5 + _tmp32_) - _tmp33_.bottom) + _tmp37_.height) + LIVE_CHART_GRID_ABSCISSA_TIME_PADDING); +#line 86 "../src/static/static_grid.vala" + _tmp38_ = extents; +#line 86 "../src/static/static_grid.vala" + _tmp39_ = boundaries; +#line 86 "../src/static/static_grid.vala" + _tmp40_ = _tmp39_.x; +#line 86 "../src/static/static_grid.vala" + _tmp41_ = live_chart_config_get_height (config); +#line 86 "../src/static/static_grid.vala" + _tmp42_ = _tmp41_; +#line 86 "../src/static/static_grid.vala" + _tmp43_ = config->padding; +#line 86 "../src/static/static_grid.vala" + _tmp44_ = config->x_axis; +#line 86 "../src/static/static_grid.vala" + _tmp45_ = _tmp44_->labels; +#line 86 "../src/static/static_grid.vala" + live_chart_labels_get_extents (_tmp45_, &_tmp46_); +#line 86 "../src/static/static_grid.vala" + _tmp47_ = _tmp46_; +#line 86 "../src/static/static_grid.vala" + cairo_move_to (ctx, (((width_between_each_points * i) + 0.5) - (_tmp38_.width / 2)) + _tmp40_.min, (((0.5 + _tmp42_) - _tmp43_.bottom) + _tmp47_.height) + LIVE_CHART_GRID_ABSCISSA_TIME_PADDING); +#line 87 "../src/static/static_grid.vala" + _tmp48_ = category; +#line 87 "../src/static/static_grid.vala" + cairo_show_text (ctx, _tmp48_); +#line 88 "../src/static/static_grid.vala" + cairo_stroke (ctx); +#line 557 "static_grid.c" + } +#line 77 "../src/static/static_grid.vala" + _g_free0 (category); +#line 561 "static_grid.c" + } + } + } +} + +void +live_chart_static_static_grid_render_hgrid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; +#line 117 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 117 "../src/static/static_grid.vala" + g_return_if_fail (ctx != NULL); +#line 117 "../src/static/static_grid.vala" + g_return_if_fail (config != NULL); +#line 119 "../src/static/static_grid.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 119 "../src/static/static_grid.vala" + boundaries = _tmp0_; +#line 584 "static_grid.c" + { + GeeList* _position_list = NULL; + LiveChartYAxis* _tmp1_; + LiveChartTicks _tmp2_; + GeeList* _tmp3_; + gint _position_size = 0; + GeeList* _tmp4_; + gint _tmp5_; + gint _tmp6_; + gint _position_index = 0; +#line 120 "../src/static/static_grid.vala" + _tmp1_ = config->y_axis; +#line 120 "../src/static/static_grid.vala" + _tmp2_ = _tmp1_->ticks; +#line 120 "../src/static/static_grid.vala" + _tmp3_ = _tmp2_.values; +#line 120 "../src/static/static_grid.vala" + _position_list = _tmp3_; +#line 120 "../src/static/static_grid.vala" + _tmp4_ = _position_list; +#line 120 "../src/static/static_grid.vala" + _tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_); +#line 120 "../src/static/static_grid.vala" + _tmp6_ = _tmp5_; +#line 120 "../src/static/static_grid.vala" + _position_size = _tmp6_; +#line 120 "../src/static/static_grid.vala" + _position_index = -1; +#line 120 "../src/static/static_grid.vala" + while (TRUE) { +#line 615 "static_grid.c" + gint _tmp7_; + gint _tmp8_; + gfloat position = 0.0F; + GeeList* _tmp9_; + gpointer _tmp10_; + gfloat* _tmp11_; + gfloat _tmp12_; + gdouble y = 0.0; + LiveChartBoundaries _tmp13_; + LiveChartBoundaries _tmp14_; + LiveChartBoundary _tmp15_; + LiveChartYAxis* _tmp16_; + LiveChartBoundaries _tmp17_; + LiveChartBoundary _tmp18_; + LiveChartYAxis* _tmp19_; + LiveChartPath* _tmp20_; + gboolean _tmp21_; + gboolean _tmp22_; + gboolean _tmp29_ = FALSE; + LiveChartYAxis* _tmp30_; + gboolean _tmp31_; + gboolean _tmp32_; +#line 120 "../src/static/static_grid.vala" + _position_index = _position_index + 1; +#line 120 "../src/static/static_grid.vala" + _tmp7_ = _position_index; +#line 120 "../src/static/static_grid.vala" + _tmp8_ = _position_size; +#line 120 "../src/static/static_grid.vala" + if (!(_tmp7_ < _tmp8_)) { +#line 120 "../src/static/static_grid.vala" + break; +#line 648 "static_grid.c" + } +#line 120 "../src/static/static_grid.vala" + _tmp9_ = _position_list; +#line 120 "../src/static/static_grid.vala" + _tmp10_ = gee_list_get (_tmp9_, _position_index); +#line 120 "../src/static/static_grid.vala" + _tmp11_ = (gfloat*) _tmp10_; +#line 120 "../src/static/static_grid.vala" + _tmp12_ = *_tmp11_; +#line 120 "../src/static/static_grid.vala" + _g_free0 (_tmp11_); +#line 120 "../src/static/static_grid.vala" + position = _tmp12_; +#line 122 "../src/static/static_grid.vala" + _tmp13_ = boundaries; +#line 122 "../src/static/static_grid.vala" + _tmp14_ = boundaries; +#line 122 "../src/static/static_grid.vala" + _tmp15_ = _tmp14_.y; +#line 122 "../src/static/static_grid.vala" + _tmp16_ = config->y_axis; +#line 122 "../src/static/static_grid.vala" + y = (_tmp13_.height + _tmp15_.min) - (position * live_chart_yaxis_get_ratio (_tmp16_)); +#line 123 "../src/static/static_grid.vala" + _tmp17_ = boundaries; +#line 123 "../src/static/static_grid.vala" + _tmp18_ = _tmp17_.y; +#line 123 "../src/static/static_grid.vala" + if (y < ((gdouble) _tmp18_.min)) { +#line 124 "../src/static/static_grid.vala" + break; +#line 680 "static_grid.c" + } +#line 126 "../src/static/static_grid.vala" + _tmp19_ = config->y_axis; +#line 126 "../src/static/static_grid.vala" + _tmp20_ = _tmp19_->lines; +#line 126 "../src/static/static_grid.vala" + _tmp21_ = live_chart_path_get_visible (_tmp20_); +#line 126 "../src/static/static_grid.vala" + _tmp22_ = _tmp21_; +#line 126 "../src/static/static_grid.vala" + if (_tmp22_) { +#line 692 "static_grid.c" + LiveChartYAxis* _tmp23_; + LiveChartPath* _tmp24_; + LiveChartBoundaries _tmp25_; + LiveChartBoundary _tmp26_; + LiveChartBoundaries _tmp27_; + LiveChartBoundary _tmp28_; +#line 127 "../src/static/static_grid.vala" + _tmp23_ = config->y_axis; +#line 127 "../src/static/static_grid.vala" + _tmp24_ = _tmp23_->lines; +#line 127 "../src/static/static_grid.vala" + live_chart_path_configure (_tmp24_, ctx); +#line 128 "../src/static/static_grid.vala" + _tmp25_ = boundaries; +#line 128 "../src/static/static_grid.vala" + _tmp26_ = _tmp25_.x; +#line 128 "../src/static/static_grid.vala" + cairo_move_to (ctx, 0.5 + _tmp26_.max, ((gint) y) + 0.5); +#line 129 "../src/static/static_grid.vala" + _tmp27_ = boundaries; +#line 129 "../src/static/static_grid.vala" + _tmp28_ = _tmp27_.x; +#line 129 "../src/static/static_grid.vala" + cairo_line_to (ctx, _tmp28_.min + 0.5, ((gint) y) + 0.5); +#line 130 "../src/static/static_grid.vala" + cairo_stroke (ctx); +#line 131 "../src/static/static_grid.vala" + live_chart_static_static_grid_restore (self, ctx); +#line 721 "static_grid.c" + } +#line 135 "../src/static/static_grid.vala" + _tmp30_ = config->y_axis; +#line 135 "../src/static/static_grid.vala" + _tmp31_ = live_chart_yaxis_get_visible (_tmp30_); +#line 135 "../src/static/static_grid.vala" + _tmp32_ = _tmp31_; +#line 135 "../src/static/static_grid.vala" + if (_tmp32_) { +#line 731 "static_grid.c" + LiveChartYAxis* _tmp33_; + LiveChartLabels* _tmp34_; + gboolean _tmp35_; + gboolean _tmp36_; +#line 135 "../src/static/static_grid.vala" + _tmp33_ = config->y_axis; +#line 135 "../src/static/static_grid.vala" + _tmp34_ = _tmp33_->labels; +#line 135 "../src/static/static_grid.vala" + _tmp35_ = live_chart_labels_get_visible (_tmp34_); +#line 135 "../src/static/static_grid.vala" + _tmp36_ = _tmp35_; +#line 135 "../src/static/static_grid.vala" + _tmp29_ = _tmp36_; +#line 746 "static_grid.c" + } else { +#line 135 "../src/static/static_grid.vala" + _tmp29_ = FALSE; +#line 750 "static_grid.c" + } +#line 135 "../src/static/static_grid.vala" + if (_tmp29_) { +#line 754 "static_grid.c" + LiveChartYAxis* _tmp37_; + LiveChartLabels* _tmp38_; + LiveChartFont* _tmp39_; + LiveChartFont* _tmp40_; + gchar* value = NULL; + LiveChartYAxis* _tmp41_; + const gchar* _tmp42_; + const gchar* _tmp43_; + gchar* _tmp44_; + cairo_text_extents_t extents = {0}; + const gchar* _tmp45_; + cairo_text_extents_t _tmp46_ = {0}; + LiveChartBoundaries _tmp47_; + LiveChartBoundary _tmp48_; + cairo_text_extents_t _tmp49_; + cairo_text_extents_t _tmp50_; + const gchar* _tmp51_; +#line 136 "../src/static/static_grid.vala" + _tmp37_ = config->y_axis; +#line 136 "../src/static/static_grid.vala" + _tmp38_ = _tmp37_->labels; +#line 136 "../src/static/static_grid.vala" + _tmp39_ = live_chart_labels_get_font (_tmp38_); +#line 136 "../src/static/static_grid.vala" + _tmp40_ = _tmp39_; +#line 136 "../src/static/static_grid.vala" + live_chart_font_configure (_tmp40_, ctx); +#line 137 "../src/static/static_grid.vala" + _tmp41_ = config->y_axis; +#line 137 "../src/static/static_grid.vala" + _tmp42_ = live_chart_yaxis_get_unit (_tmp41_); +#line 137 "../src/static/static_grid.vala" + _tmp43_ = _tmp42_; +#line 137 "../src/static/static_grid.vala" + _tmp44_ = live_chart_format_for_y_axis (_tmp43_, position); +#line 137 "../src/static/static_grid.vala" + value = _tmp44_; +#line 140 "../src/static/static_grid.vala" + _tmp45_ = value; +#line 140 "../src/static/static_grid.vala" + cairo_text_extents (ctx, _tmp45_, &_tmp46_); +#line 140 "../src/static/static_grid.vala" + extents = _tmp46_; +#line 141 "../src/static/static_grid.vala" + _tmp47_ = boundaries; +#line 141 "../src/static/static_grid.vala" + _tmp48_ = _tmp47_.x; +#line 141 "../src/static/static_grid.vala" + _tmp49_ = extents; +#line 141 "../src/static/static_grid.vala" + _tmp50_ = extents; +#line 141 "../src/static/static_grid.vala" + cairo_move_to (ctx, (_tmp48_.min - _tmp49_.width) - 5, (y + (_tmp50_.height / 2)) + 0.5); +#line 142 "../src/static/static_grid.vala" + _tmp51_ = value; +#line 142 "../src/static/static_grid.vala" + cairo_show_text (ctx, _tmp51_); +#line 143 "../src/static/static_grid.vala" + cairo_stroke (ctx); +#line 135 "../src/static/static_grid.vala" + _g_free0 (value); +#line 816 "static_grid.c" + } + } + } +} + +void +live_chart_static_static_grid_update_bounding_box (LiveChartStaticStaticGrid* self, + LiveChartConfig* config) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; + LiveChartBoundaries _tmp1_; + LiveChartBoundary _tmp2_; + LiveChartBoundaries _tmp3_; + LiveChartBoundary _tmp4_; + LiveChartBoundaries _tmp5_; + LiveChartBoundary _tmp6_; + LiveChartBoundaries _tmp7_; + LiveChartBoundary _tmp8_; + LiveChartBoundaries _tmp9_; + LiveChartBoundary _tmp10_; + LiveChartBoundaries _tmp11_; + LiveChartBoundary _tmp12_; + LiveChartBoundingBox _tmp13_ = {0}; +#line 148 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 148 "../src/static/static_grid.vala" + g_return_if_fail (config != NULL); +#line 149 "../src/static/static_grid.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 149 "../src/static/static_grid.vala" + boundaries = _tmp0_; +#line 150 "../src/static/static_grid.vala" + _tmp1_ = boundaries; +#line 150 "../src/static/static_grid.vala" + _tmp2_ = _tmp1_.x; +#line 150 "../src/static/static_grid.vala" + _tmp3_ = boundaries; +#line 150 "../src/static/static_grid.vala" + _tmp4_ = _tmp3_.y; +#line 150 "../src/static/static_grid.vala" + _tmp5_ = boundaries; +#line 150 "../src/static/static_grid.vala" + _tmp6_ = _tmp5_.x; +#line 150 "../src/static/static_grid.vala" + _tmp7_ = boundaries; +#line 150 "../src/static/static_grid.vala" + _tmp8_ = _tmp7_.x; +#line 150 "../src/static/static_grid.vala" + _tmp9_ = boundaries; +#line 150 "../src/static/static_grid.vala" + _tmp10_ = _tmp9_.y; +#line 150 "../src/static/static_grid.vala" + _tmp11_ = boundaries; +#line 150 "../src/static/static_grid.vala" + _tmp12_ = _tmp11_.y; +#line 150 "../src/static/static_grid.vala" + memset (&_tmp13_, 0, sizeof (LiveChartBoundingBox)); +#line 150 "../src/static/static_grid.vala" + _tmp13_.x = (gdouble) _tmp2_.min; +#line 150 "../src/static/static_grid.vala" + _tmp13_.y = (gdouble) _tmp4_.min; +#line 150 "../src/static/static_grid.vala" + _tmp13_.width = (gdouble) (_tmp6_.max - _tmp8_.min); +#line 150 "../src/static/static_grid.vala" + _tmp13_.height = (gdouble) ((_tmp10_.max - _tmp12_.min) + LIVE_CHART_GRID_ABSCISSA_TIME_PADDING); +#line 150 "../src/static/static_grid.vala" + self->bounding_box = _tmp13_; +#line 885 "static_grid.c" +} + +void +live_chart_static_static_grid_debug (LiveChartStaticStaticGrid* self, + cairo_t* ctx) +{ + gchar* debug = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; +#line 158 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 158 "../src/static/static_grid.vala" + g_return_if_fail (ctx != NULL); +#line 159 "../src/static/static_grid.vala" + _tmp0_ = g_getenv ("LIVE_CHART_DEBUG"); +#line 159 "../src/static/static_grid.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 159 "../src/static/static_grid.vala" + debug = _tmp1_; +#line 160 "../src/static/static_grid.vala" + _tmp2_ = debug; +#line 160 "../src/static/static_grid.vala" + if (_tmp2_ != NULL) { +#line 910 "static_grid.c" + LiveChartBoundingBox _tmp3_; + LiveChartBoundingBox _tmp4_; + LiveChartBoundingBox _tmp5_; + LiveChartBoundingBox _tmp6_; +#line 161 "../src/static/static_grid.vala" + _tmp3_ = self->bounding_box; +#line 161 "../src/static/static_grid.vala" + _tmp4_ = self->bounding_box; +#line 161 "../src/static/static_grid.vala" + _tmp5_ = self->bounding_box; +#line 161 "../src/static/static_grid.vala" + _tmp6_ = self->bounding_box; +#line 161 "../src/static/static_grid.vala" + cairo_rectangle (ctx, _tmp3_.x, _tmp4_.y, _tmp5_.width, _tmp6_.height); +#line 162 "../src/static/static_grid.vala" + cairo_stroke (ctx); +#line 927 "static_grid.c" + } +#line 158 "../src/static/static_grid.vala" + _g_free0 (debug); +#line 931 "static_grid.c" +} + +LiveChartStaticStaticGrid* +live_chart_static_static_grid_construct (GType object_type) +{ + LiveChartStaticStaticGrid * self = NULL; +#line 6 "../src/static/static_grid.vala" + self = (LiveChartStaticStaticGrid*) g_object_new (object_type, NULL); +#line 6 "../src/static/static_grid.vala" + return self; +#line 942 "static_grid.c" +} + +LiveChartStaticStaticGrid* +live_chart_static_static_grid_new (void) +{ +#line 6 "../src/static/static_grid.vala" + return live_chart_static_static_grid_construct (LIVE_CHART_STATIC_TYPE_STATIC_GRID); +#line 950 "static_grid.c" +} + +static gboolean +live_chart_static_static_grid_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartStaticStaticGrid* self; +#line 15 "../src/static/static_grid.vala" + self = (LiveChartStaticStaticGrid*) base; +#line 15 "../src/static/static_grid.vala" + result = self->priv->_visible; +#line 15 "../src/static/static_grid.vala" + return result; +#line 964 "static_grid.c" +} + +static void +live_chart_static_static_grid_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartStaticStaticGrid* self; + gboolean old_value; +#line 15 "../src/static/static_grid.vala" + self = (LiveChartStaticStaticGrid*) base; +#line 15 "../src/static/static_grid.vala" + old_value = live_chart_static_static_grid_real_get_visible (base); +#line 15 "../src/static/static_grid.vala" + if (old_value != value) { +#line 15 "../src/static/static_grid.vala" + self->priv->_visible = value; +#line 15 "../src/static/static_grid.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_grid_properties[LIVE_CHART_STATIC_STATIC_GRID_VISIBLE_PROPERTY]); +#line 983 "static_grid.c" + } +} + +void +live_chart_static_static_grid_get_main_color (LiveChartStaticStaticGrid* self, + GdkRGBA * result) +{ + GdkRGBA _tmp0_; +#line 17 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 17 "../src/static/static_grid.vala" + _tmp0_ = self->priv->_main_color; +#line 17 "../src/static/static_grid.vala" + *result = _tmp0_; +#line 17 "../src/static/static_grid.vala" + return; +#line 1000 "static_grid.c" +} + +static gboolean +_gdk_rgba_equal (const GdkRGBA * s1, + const GdkRGBA * s2) +{ +#line 17 "../src/static/static_grid.vala" + if (s1 == s2) { +#line 17 "../src/static/static_grid.vala" + return TRUE; +#line 1011 "static_grid.c" + } +#line 17 "../src/static/static_grid.vala" + if (s1 == NULL) { +#line 17 "../src/static/static_grid.vala" + return FALSE; +#line 1017 "static_grid.c" + } +#line 17 "../src/static/static_grid.vala" + if (s2 == NULL) { +#line 17 "../src/static/static_grid.vala" + return FALSE; +#line 1023 "static_grid.c" + } +#line 17 "../src/static/static_grid.vala" + if (s1->red != s2->red) { +#line 17 "../src/static/static_grid.vala" + return FALSE; +#line 1029 "static_grid.c" + } +#line 17 "../src/static/static_grid.vala" + if (s1->green != s2->green) { +#line 17 "../src/static/static_grid.vala" + return FALSE; +#line 1035 "static_grid.c" + } +#line 17 "../src/static/static_grid.vala" + if (s1->blue != s2->blue) { +#line 17 "../src/static/static_grid.vala" + return FALSE; +#line 1041 "static_grid.c" + } +#line 17 "../src/static/static_grid.vala" + if (s1->alpha != s2->alpha) { +#line 17 "../src/static/static_grid.vala" + return FALSE; +#line 1047 "static_grid.c" + } +#line 17 "../src/static/static_grid.vala" + return TRUE; +#line 1051 "static_grid.c" +} + +void +live_chart_static_static_grid_set_main_color (LiveChartStaticStaticGrid* self, + GdkRGBA * value) +{ + GdkRGBA old_value; +#line 17 "../src/static/static_grid.vala" + g_return_if_fail (self != NULL); +#line 17 "../src/static/static_grid.vala" + live_chart_static_static_grid_get_main_color (self, &old_value); +#line 17 "../src/static/static_grid.vala" + if (_gdk_rgba_equal (value, &old_value) != TRUE) { +#line 1065 "static_grid.c" + GdkRGBA _tmp0_; +#line 17 "../src/static/static_grid.vala" + _tmp0_ = *value; +#line 17 "../src/static/static_grid.vala" + self->priv->_main_color = _tmp0_; +#line 17 "../src/static/static_grid.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_grid_properties[LIVE_CHART_STATIC_STATIC_GRID_MAIN_COLOR_PROPERTY]); +#line 1073 "static_grid.c" + } +} + +static void +live_chart_static_static_grid_class_init (LiveChartStaticStaticGridClass * klass, + gpointer klass_data) +{ +#line 6 "../src/static/static_grid.vala" + live_chart_static_static_grid_parent_class = g_type_class_peek_parent (klass); +#line 6 "../src/static/static_grid.vala" + g_type_class_adjust_private_offset (klass, &LiveChartStaticStaticGrid_private_offset); +#line 6 "../src/static/static_grid.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_static_static_grid_get_property; +#line 6 "../src/static/static_grid.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_static_static_grid_set_property; +#line 6 "../src/static/static_grid.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_static_static_grid_finalize; +#line 6 "../src/static/static_grid.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_GRID_VISIBLE_PROPERTY, live_chart_static_static_grid_properties[LIVE_CHART_STATIC_STATIC_GRID_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 6 "../src/static/static_grid.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_GRID_MAIN_COLOR_PROPERTY, live_chart_static_static_grid_properties[LIVE_CHART_STATIC_STATIC_GRID_MAIN_COLOR_PROPERTY] = g_param_spec_boxed ("main-color", "main-color", "main-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 1095 "static_grid.c" +} + +static void +live_chart_static_static_grid_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 6 "../src/static/static_grid.vala" + live_chart_static_static_grid_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 6 "../src/static/static_grid.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_static_static_grid_real_draw; +#line 6 "../src/static/static_grid.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_static_static_grid_real_get_bounding_box; +#line 6 "../src/static/static_grid.vala" + iface->get_visible = live_chart_static_static_grid_real_get_visible; +#line 6 "../src/static/static_grid.vala" + iface->set_visible = live_chart_static_static_grid_real_set_visible; +#line 1112 "static_grid.c" +} + +static void +live_chart_static_static_grid_instance_init (LiveChartStaticStaticGrid * self, + gpointer klass) +{ + LiveChartBoundingBox _tmp0_ = {0}; + GdkRGBA _tmp1_ = {0}; +#line 6 "../src/static/static_grid.vala" + self->priv = live_chart_static_static_grid_get_instance_private (self); +#line 8 "../src/static/static_grid.vala" + memset (&_tmp0_, 0, sizeof (LiveChartBoundingBox)); +#line 8 "../src/static/static_grid.vala" + _tmp0_.x = (gdouble) 0; +#line 8 "../src/static/static_grid.vala" + _tmp0_.y = (gdouble) 0; +#line 8 "../src/static/static_grid.vala" + _tmp0_.width = (gdouble) 0; +#line 8 "../src/static/static_grid.vala" + _tmp0_.height = (gdouble) 0; +#line 8 "../src/static/static_grid.vala" + self->bounding_box = _tmp0_; +#line 15 "../src/static/static_grid.vala" + self->priv->_visible = TRUE; +#line 16 "../src/static/static_grid.vala" + memset (&_tmp1_, 0, sizeof (GdkRGBA)); +#line 16 "../src/static/static_grid.vala" + _tmp1_.red = 0.4; +#line 16 "../src/static/static_grid.vala" + _tmp1_.green = 0.4; +#line 16 "../src/static/static_grid.vala" + _tmp1_.blue = 0.4; +#line 16 "../src/static/static_grid.vala" + _tmp1_.alpha = 1.0; +#line 16 "../src/static/static_grid.vala" + self->priv->_main_color = _tmp1_; +#line 1149 "static_grid.c" +} + +static void +live_chart_static_static_grid_finalize (GObject * obj) +{ + LiveChartStaticStaticGrid * self; +#line 6 "../src/static/static_grid.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGrid); +#line 6 "../src/static/static_grid.vala" + G_OBJECT_CLASS (live_chart_static_static_grid_parent_class)->finalize (obj); +#line 1160 "static_grid.c" +} + +static GType +live_chart_static_static_grid_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartStaticStaticGridClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_static_static_grid_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartStaticStaticGrid), 0, (GInstanceInitFunc) live_chart_static_static_grid_instance_init, NULL }; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_static_static_grid_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_static_static_grid_type_id; + live_chart_static_static_grid_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartStaticStaticGrid", &g_define_type_info, 0); + g_type_add_interface_static (live_chart_static_static_grid_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartStaticStaticGrid_private_offset = g_type_add_instance_private (live_chart_static_static_grid_type_id, sizeof (LiveChartStaticStaticGridPrivate)); + return live_chart_static_static_grid_type_id; +} + +GType +live_chart_static_static_grid_get_type (void) +{ + static volatile gsize live_chart_static_static_grid_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_static_grid_type_id__once)) { + GType live_chart_static_static_grid_type_id; + live_chart_static_static_grid_type_id = live_chart_static_static_grid_get_type_once (); + g_once_init_leave (&live_chart_static_static_grid_type_id__once, live_chart_static_static_grid_type_id); + } + return live_chart_static_static_grid_type_id__once; +} + +static void +_vala_live_chart_static_static_grid_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticGrid * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGrid); +#line 6 "../src/static/static_grid.vala" + switch (property_id) { +#line 6 "../src/static/static_grid.vala" + case LIVE_CHART_STATIC_STATIC_GRID_VISIBLE_PROPERTY: +#line 6 "../src/static/static_grid.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 6 "../src/static/static_grid.vala" + break; +#line 6 "../src/static/static_grid.vala" + case LIVE_CHART_STATIC_STATIC_GRID_MAIN_COLOR_PROPERTY: +#line 1205 "static_grid.c" + { + GdkRGBA boxed; +#line 6 "../src/static/static_grid.vala" + live_chart_static_static_grid_get_main_color (self, &boxed); +#line 6 "../src/static/static_grid.vala" + g_value_set_boxed (value, &boxed); +#line 1212 "static_grid.c" + } +#line 6 "../src/static/static_grid.vala" + break; +#line 1216 "static_grid.c" + default: +#line 6 "../src/static/static_grid.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_grid.vala" + break; +#line 1222 "static_grid.c" + } +} + +static void +_vala_live_chart_static_static_grid_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticGrid * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGrid); +#line 6 "../src/static/static_grid.vala" + switch (property_id) { +#line 6 "../src/static/static_grid.vala" + case LIVE_CHART_STATIC_STATIC_GRID_VISIBLE_PROPERTY: +#line 6 "../src/static/static_grid.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 6 "../src/static/static_grid.vala" + break; +#line 6 "../src/static/static_grid.vala" + case LIVE_CHART_STATIC_STATIC_GRID_MAIN_COLOR_PROPERTY: +#line 6 "../src/static/static_grid.vala" + live_chart_static_static_grid_set_main_color (self, g_value_get_boxed (value)); +#line 6 "../src/static/static_grid.vala" + break; +#line 1248 "static_grid.c" + default: +#line 6 "../src/static/static_grid.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_grid.vala" + break; +#line 1254 "static_grid.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/static/static_line.c b/iPDC/lib/liblivechart_static.a.p/static/static_line.c new file mode 100644 index 0000000..8cb1c79 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/static/static_line.c @@ -0,0 +1,404 @@ +/* static_line.c generated by valac 0.56.0, the Vala compiler + * generated from static_line.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_STATIC_STATIC_LINE_0_PROPERTY, + LIVE_CHART_STATIC_STATIC_LINE_NUM_PROPERTIES +}; +static GParamSpec* live_chart_static_static_line_properties[LIVE_CHART_STATIC_STATIC_LINE_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +static gpointer live_chart_static_static_line_parent_class = NULL; + +static void live_chart_static_static_line_real_draw (LiveChartStaticStaticSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_static_static_line_update_bounding_box (LiveChartStaticStaticLine* self, + LiveChartStaticStaticPoints* points, + LiveChartConfig* config); +static GType live_chart_static_static_line_get_type_once (void); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 9 "../src/static/static_line.vala" + return self ? g_object_ref (self) : NULL; +#line 38 "static_line.c" +} + +LiveChartStaticStaticLine* +live_chart_static_static_line_construct (GType object_type, + LiveChartStaticStaticValues* values) +{ + LiveChartStaticStaticLine * self = NULL; + LiveChartStaticStaticValues* _tmp0_; +#line 7 "../src/static/static_line.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 8 "../src/static/static_line.vala" + self = (LiveChartStaticStaticLine*) live_chart_static_static_serie_renderer_construct (object_type); +#line 9 "../src/static/static_line.vala" + _tmp0_ = _g_object_ref0 (values); +#line 9 "../src/static/static_line.vala" + _g_object_unref0 (((LiveChartStaticStaticSerieRenderer*) self)->values); +#line 9 "../src/static/static_line.vala" + ((LiveChartStaticStaticSerieRenderer*) self)->values = _tmp0_; +#line 7 "../src/static/static_line.vala" + return self; +#line 59 "static_line.c" +} + +LiveChartStaticStaticLine* +live_chart_static_static_line_new (LiveChartStaticStaticValues* values) +{ +#line 7 "../src/static/static_line.vala" + return live_chart_static_static_line_construct (LIVE_CHART_STATIC_TYPE_STATIC_LINE, values); +#line 67 "static_line.c" +} + +static void +live_chart_static_static_line_real_draw (LiveChartStaticStaticSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartStaticStaticLine * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 12 "../src/static/static_line.vala" + self = (LiveChartStaticStaticLine*) base; +#line 12 "../src/static/static_line.vala" + g_return_if_fail (ctx != NULL); +#line 12 "../src/static/static_line.vala" + g_return_if_fail (config != NULL); +#line 13 "../src/static/static_line.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 13 "../src/static/static_line.vala" + _tmp1_ = _tmp0_; +#line 13 "../src/static/static_line.vala" + if (_tmp1_) { +#line 90 "static_line.c" + LiveChartStaticStaticPoints* points = NULL; + LiveChartStaticStaticValues* _tmp2_; + LiveChartStaticStaticPoints* _tmp3_; + LiveChartStaticStaticPoints* _tmp4_; + gint _tmp5_; + gint _tmp6_; +#line 14 "../src/static/static_line.vala" + _tmp2_ = ((LiveChartStaticStaticSerieRenderer*) self)->values; +#line 14 "../src/static/static_line.vala" + _tmp3_ = live_chart_static_static_points_create (_tmp2_, config); +#line 14 "../src/static/static_line.vala" + points = _tmp3_; +#line 15 "../src/static/static_line.vala" + _tmp4_ = points; +#line 15 "../src/static/static_line.vala" + _tmp5_ = live_chart_static_static_points_get_size (_tmp4_); +#line 15 "../src/static/static_line.vala" + _tmp6_ = _tmp5_; +#line 15 "../src/static/static_line.vala" + if (_tmp6_ > 0) { +#line 111 "static_line.c" + LiveChartStaticStaticPoints* _tmp7_; +#line 16 "../src/static/static_line.vala" + _tmp7_ = points; +#line 16 "../src/static/static_line.vala" + live_chart_static_static_line_draw_line (self, _tmp7_, ctx, config); +#line 17 "../src/static/static_line.vala" + cairo_stroke (ctx); +#line 119 "static_line.c" + } +#line 13 "../src/static/static_line.vala" + _g_object_unref0 (points); +#line 123 "static_line.c" + } +} + +void +live_chart_static_static_line_draw_line (LiveChartStaticStaticLine* self, + LiveChartStaticStaticPoints* points, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartPath* _tmp0_; + LiveChartPath* _tmp1_; + LiveChartPoint first_point = {0}; + LiveChartPoint _tmp2_ = {0}; + LiveChartPoint _tmp3_; + LiveChartPoint _tmp4_; + LiveChartPoint _tmp5_; + LiveChartPoint _tmp6_; + gchar* _tmp7_; + gchar* _tmp8_; +#line 22 "../src/static/static_line.vala" + g_return_if_fail (self != NULL); +#line 22 "../src/static/static_line.vala" + g_return_if_fail (points != NULL); +#line 22 "../src/static/static_line.vala" + g_return_if_fail (ctx != NULL); +#line 22 "../src/static/static_line.vala" + g_return_if_fail (config != NULL); +#line 23 "../src/static/static_line.vala" + _tmp0_ = live_chart_static_static_serie_renderer_get_line ((LiveChartStaticStaticSerieRenderer*) self); +#line 23 "../src/static/static_line.vala" + _tmp1_ = _tmp0_; +#line 23 "../src/static/static_line.vala" + live_chart_path_configure (_tmp1_, ctx); +#line 25 "../src/static/static_line.vala" + live_chart_static_static_points_first (points, &_tmp2_); +#line 25 "../src/static/static_line.vala" + first_point = _tmp2_; +#line 27 "../src/static/static_line.vala" + live_chart_static_static_line_update_bounding_box (self, points, config); +#line 28 "../src/static/static_line.vala" + live_chart_static_static_serie_renderer_debug ((LiveChartStaticStaticSerieRenderer*) self, ctx); +#line 30 "../src/static/static_line.vala" + _tmp3_ = first_point; +#line 30 "../src/static/static_line.vala" + _tmp4_ = first_point; +#line 30 "../src/static/static_line.vala" + cairo_move_to (ctx, _tmp3_.x, _tmp4_.y); +#line 31 "../src/static/static_line.vala" + _tmp5_ = first_point; +#line 31 "../src/static/static_line.vala" + _tmp6_ = first_point; +#line 31 "../src/static/static_line.vala" + _tmp7_ = g_strdup_printf ("Draw point %f, %f", _tmp5_.x, _tmp6_.y); +#line 31 "../src/static/static_line.vala" + _tmp8_ = _tmp7_; +#line 31 "../src/static/static_line.vala" + g_message ("static_line.vala:31: %s", _tmp8_); +#line 31 "../src/static/static_line.vala" + _g_free0 (_tmp8_); +#line 183 "static_line.c" + { + gint pos = 0; +#line 32 "../src/static/static_line.vala" + pos = 0; +#line 188 "static_line.c" + { + gboolean _tmp9_ = FALSE; +#line 32 "../src/static/static_line.vala" + _tmp9_ = TRUE; +#line 32 "../src/static/static_line.vala" + while (TRUE) { +#line 195 "static_line.c" + gint _tmp11_; + gint _tmp12_; + LiveChartPoint current_point = {0}; + LiveChartPoint _tmp13_ = {0}; + LiveChartPoint next_point = {0}; + LiveChartPoint _tmp14_ = {0}; + LiveChartPoint _tmp15_; + LiveChartPoint _tmp18_; + LiveChartPoint _tmp19_; + gchar* _tmp20_; + gchar* _tmp21_; + LiveChartPoint _tmp22_; + LiveChartPoint _tmp23_; +#line 32 "../src/static/static_line.vala" + if (!_tmp9_) { +#line 211 "static_line.c" + gint _tmp10_; +#line 32 "../src/static/static_line.vala" + _tmp10_ = pos; +#line 32 "../src/static/static_line.vala" + pos = _tmp10_ + 1; +#line 217 "static_line.c" + } +#line 32 "../src/static/static_line.vala" + _tmp9_ = FALSE; +#line 32 "../src/static/static_line.vala" + _tmp11_ = live_chart_static_static_points_get_size (points); +#line 32 "../src/static/static_line.vala" + _tmp12_ = _tmp11_; +#line 32 "../src/static/static_line.vala" + if (!(pos < (_tmp12_ - 1))) { +#line 32 "../src/static/static_line.vala" + break; +#line 229 "static_line.c" + } +#line 33 "../src/static/static_line.vala" + live_chart_static_static_points_get (points, pos, &_tmp13_); +#line 33 "../src/static/static_line.vala" + current_point = _tmp13_; +#line 34 "../src/static/static_line.vala" + live_chart_static_static_points_after (points, pos, &_tmp14_); +#line 34 "../src/static/static_line.vala" + next_point = _tmp14_; +#line 35 "../src/static/static_line.vala" + _tmp15_ = current_point; +#line 35 "../src/static/static_line.vala" + if (live_chart_static_static_serie_renderer_is_out_of_area ((LiveChartStaticStaticSerieRenderer*) self, &_tmp15_)) { +#line 243 "static_line.c" + LiveChartPoint _tmp16_; + LiveChartPoint _tmp17_; +#line 36 "../src/static/static_line.vala" + g_message ("static_line.vala:36: #########################Out of area"); +#line 37 "../src/static/static_line.vala" + _tmp16_ = current_point; +#line 37 "../src/static/static_line.vala" + _tmp17_ = current_point; +#line 37 "../src/static/static_line.vala" + cairo_move_to (ctx, _tmp16_.x, _tmp17_.y); +#line 38 "../src/static/static_line.vala" + continue; +#line 256 "static_line.c" + } +#line 40 "../src/static/static_line.vala" + _tmp18_ = next_point; +#line 40 "../src/static/static_line.vala" + _tmp19_ = next_point; +#line 40 "../src/static/static_line.vala" + _tmp20_ = g_strdup_printf ("Draw point %f, %f as pos %d", _tmp18_.x, _tmp19_.y, pos); +#line 40 "../src/static/static_line.vala" + _tmp21_ = _tmp20_; +#line 40 "../src/static/static_line.vala" + g_message ("static_line.vala:40: %s", _tmp21_); +#line 40 "../src/static/static_line.vala" + _g_free0 (_tmp21_); +#line 41 "../src/static/static_line.vala" + _tmp22_ = next_point; +#line 41 "../src/static/static_line.vala" + _tmp23_ = next_point; +#line 41 "../src/static/static_line.vala" + cairo_line_to (ctx, _tmp22_.x, _tmp23_.y); +#line 276 "static_line.c" + } + } + } +} + +static void +live_chart_static_static_line_update_bounding_box (LiveChartStaticStaticLine* self, + LiveChartStaticStaticPoints* points, + LiveChartConfig* config) +{ + LiveChartPoint _tmp0_ = {0}; + LiveChartBounds* _tmp1_; + LiveChartBounds* _tmp2_; + gdouble _tmp3_; + gdouble _tmp4_; + LiveChartPoint _tmp5_ = {0}; + LiveChartPoint _tmp6_ = {0}; + LiveChartBounds* _tmp7_; + LiveChartBounds* _tmp8_; + gdouble _tmp9_; + gdouble _tmp10_; + LiveChartBounds* _tmp11_; + LiveChartBounds* _tmp12_; + gdouble _tmp13_; + gdouble _tmp14_; + LiveChartBoundingBox _tmp15_ = {0}; +#line 45 "../src/static/static_line.vala" + g_return_if_fail (self != NULL); +#line 45 "../src/static/static_line.vala" + g_return_if_fail (points != NULL); +#line 45 "../src/static/static_line.vala" + g_return_if_fail (config != NULL); +#line 46 "../src/static/static_line.vala" + live_chart_static_static_points_first (points, &_tmp0_); +#line 46 "../src/static/static_line.vala" + _tmp1_ = live_chart_static_static_points_get_bounds (points); +#line 46 "../src/static/static_line.vala" + _tmp2_ = _tmp1_; +#line 46 "../src/static/static_line.vala" + _tmp3_ = live_chart_bounds_get_lower (_tmp2_); +#line 46 "../src/static/static_line.vala" + _tmp4_ = _tmp3_; +#line 46 "../src/static/static_line.vala" + live_chart_static_static_points_last (points, &_tmp5_); +#line 46 "../src/static/static_line.vala" + live_chart_static_static_points_first (points, &_tmp6_); +#line 46 "../src/static/static_line.vala" + _tmp7_ = live_chart_static_static_points_get_bounds (points); +#line 46 "../src/static/static_line.vala" + _tmp8_ = _tmp7_; +#line 46 "../src/static/static_line.vala" + _tmp9_ = live_chart_bounds_get_upper (_tmp8_); +#line 46 "../src/static/static_line.vala" + _tmp10_ = _tmp9_; +#line 46 "../src/static/static_line.vala" + _tmp11_ = live_chart_static_static_points_get_bounds (points); +#line 46 "../src/static/static_line.vala" + _tmp12_ = _tmp11_; +#line 46 "../src/static/static_line.vala" + _tmp13_ = live_chart_bounds_get_lower (_tmp12_); +#line 46 "../src/static/static_line.vala" + _tmp14_ = _tmp13_; +#line 46 "../src/static/static_line.vala" + memset (&_tmp15_, 0, sizeof (LiveChartBoundingBox)); +#line 46 "../src/static/static_line.vala" + _tmp15_.x = _tmp0_.x; +#line 46 "../src/static/static_line.vala" + _tmp15_.y = _tmp4_; +#line 46 "../src/static/static_line.vala" + _tmp15_.width = _tmp5_.x - _tmp6_.x; +#line 46 "../src/static/static_line.vala" + _tmp15_.height = _tmp10_ - _tmp14_; +#line 46 "../src/static/static_line.vala" + ((LiveChartStaticStaticSerieRenderer*) self)->bounding_box = _tmp15_; +#line 351 "static_line.c" +} + +static void +live_chart_static_static_line_class_init (LiveChartStaticStaticLineClass * klass, + gpointer klass_data) +{ +#line 5 "../src/static/static_line.vala" + live_chart_static_static_line_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/static/static_line.vala" + ((LiveChartStaticStaticSerieRendererClass *) klass)->draw = (void (*) (LiveChartStaticStaticSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_static_static_line_real_draw; +#line 362 "static_line.c" +} + +static void +live_chart_static_static_line_instance_init (LiveChartStaticStaticLine * self, + gpointer klass) +{ +} + +static GType +live_chart_static_static_line_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartStaticStaticLineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_static_static_line_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartStaticStaticLine), 0, (GInstanceInitFunc) live_chart_static_static_line_instance_init, NULL }; + GType live_chart_static_static_line_type_id; + live_chart_static_static_line_type_id = g_type_register_static (LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, "LiveChartStaticStaticLine", &g_define_type_info, 0); + return live_chart_static_static_line_type_id; +} + +GType +live_chart_static_static_line_get_type (void) +{ + static volatile gsize live_chart_static_static_line_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_static_line_type_id__once)) { + GType live_chart_static_static_line_type_id; + live_chart_static_static_line_type_id = live_chart_static_static_line_get_type_once (); + g_once_init_leave (&live_chart_static_static_line_type_id__once, live_chart_static_static_line_type_id); + } + return live_chart_static_static_line_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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/static/static_points.c b/iPDC/lib/liblivechart_static.a.p/static/static_points.c new file mode 100644 index 0000000..3a1ba40 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/static/static_points.c @@ -0,0 +1,821 @@ +/* static_points.c generated by valac 0.56.0, the Vala compiler + * generated from static_points.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_STATIC_STATIC_POINTS_0_PROPERTY, + LIVE_CHART_STATIC_STATIC_POINTS_BOUNDS_PROPERTY, + LIVE_CHART_STATIC_STATIC_POINTS_SIZE_PROPERTY, + LIVE_CHART_STATIC_STATIC_POINTS_REALTIME_DELTA_PROPERTY, + LIVE_CHART_STATIC_STATIC_POINTS_NUM_PROPERTIES +}; +static GParamSpec* live_chart_static_static_points_properties[LIVE_CHART_STATIC_STATIC_POINTS_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _live_chart_point_free0(var) ((var == NULL) ? NULL : (var = (live_chart_point_free (var), NULL))) +#define _live_chart_static_named_value_free0(var) ((var == NULL) ? NULL : (var = (live_chart_static_named_value_free (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _LiveChartStaticStaticPointsPrivate { + GeeArrayList* points; + LiveChartBounds* _bounds; + gdouble _realtime_delta; +}; + +static gint LiveChartStaticStaticPoints_private_offset; +static gpointer live_chart_static_static_points_parent_class = NULL; + +static void live_chart_static_static_points_value_to_point (LiveChartStaticNamedValue* current_value, + LiveChartConfig* config, + LiveChartBoundaries* boundaries, + LiveChartPoint* result); +static void live_chart_static_static_points_finalize (GObject * obj); +static GType live_chart_static_static_points_get_type_once (void); +static void _vala_live_chart_static_static_points_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_static_static_points_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_static_static_points_get_instance_private (LiveChartStaticStaticPoints* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartStaticStaticPoints_private_offset); +} + +LiveChartStaticStaticPoints* +live_chart_static_static_points_construct (GType object_type) +{ + LiveChartStaticStaticPoints * self = NULL; + LiveChartBounds* _tmp0_; + LiveChartBounds* _tmp1_; +#line 13 "../src/static/static_points.vala" + self = (LiveChartStaticStaticPoints*) g_object_new (object_type, NULL); +#line 14 "../src/static/static_points.vala" + _tmp0_ = live_chart_bounds_new (((double) NAN), ((double) NAN)); +#line 14 "../src/static/static_points.vala" + _tmp1_ = _tmp0_; +#line 14 "../src/static/static_points.vala" + live_chart_static_static_points_set_bounds (self, _tmp1_); +#line 14 "../src/static/static_points.vala" + _g_object_unref0 (_tmp1_); +#line 13 "../src/static/static_points.vala" + return self; +#line 77 "static_points.c" +} + +LiveChartStaticStaticPoints* +live_chart_static_static_points_new (void) +{ +#line 13 "../src/static/static_points.vala" + return live_chart_static_static_points_construct (LIVE_CHART_STATIC_TYPE_STATIC_POINTS); +#line 85 "static_points.c" +} + +void +live_chart_static_static_points_add (LiveChartStaticStaticPoints* self, + LiveChartPoint* point) +{ + LiveChartBounds* _tmp0_; + LiveChartPoint _tmp1_; + GeeArrayList* _tmp2_; + LiveChartPoint _tmp3_; +#line 17 "../src/static/static_points.vala" + g_return_if_fail (self != NULL); +#line 17 "../src/static/static_points.vala" + g_return_if_fail (point != NULL); +#line 18 "../src/static/static_points.vala" + _tmp0_ = self->priv->_bounds; +#line 18 "../src/static/static_points.vala" + _tmp1_ = *point; +#line 18 "../src/static/static_points.vala" + live_chart_bounds_update (_tmp0_, _tmp1_.y); +#line 19 "../src/static/static_points.vala" + _tmp2_ = self->priv->points; +#line 19 "../src/static/static_points.vala" + _tmp3_ = *point; +#line 19 "../src/static/static_points.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, &_tmp3_); +#line 112 "static_points.c" +} + +void +live_chart_static_static_points_get (LiveChartStaticStaticPoints* self, + gint at, + LiveChartPoint* result) +{ + GeeArrayList* _tmp0_; + gpointer _tmp1_; + LiveChartPoint* _tmp2_; + LiveChartPoint _tmp3_; +#line 32 "../src/static/static_points.vala" + g_return_if_fail (self != NULL); +#line 33 "../src/static/static_points.vala" + _tmp0_ = self->priv->points; +#line 33 "../src/static/static_points.vala" + _tmp1_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, at); +#line 33 "../src/static/static_points.vala" + _tmp2_ = (LiveChartPoint*) _tmp1_; +#line 33 "../src/static/static_points.vala" + _tmp3_ = *_tmp2_; +#line 33 "../src/static/static_points.vala" + _live_chart_point_free0 (_tmp2_); +#line 33 "../src/static/static_points.vala" + *result = _tmp3_; +#line 33 "../src/static/static_points.vala" + return; +#line 140 "static_points.c" +} + +void +live_chart_static_static_points_after (LiveChartStaticStaticPoints* self, + gint at, + LiveChartPoint* result) +{ + gint _tmp0_; + gint _tmp1_; + LiveChartPoint _tmp5_ = {0}; +#line 36 "../src/static/static_points.vala" + g_return_if_fail (self != NULL); +#line 37 "../src/static/static_points.vala" + _tmp0_ = live_chart_static_static_points_get_size (self); +#line 37 "../src/static/static_points.vala" + _tmp1_ = _tmp0_; +#line 37 "../src/static/static_points.vala" + if ((at + 1) >= _tmp1_) { +#line 159 "static_points.c" + gint _tmp2_; + gint _tmp3_; + LiveChartPoint _tmp4_ = {0}; +#line 37 "../src/static/static_points.vala" + _tmp2_ = live_chart_static_static_points_get_size (self); +#line 37 "../src/static/static_points.vala" + _tmp3_ = _tmp2_; +#line 37 "../src/static/static_points.vala" + live_chart_static_static_points_get (self, _tmp3_ - 1, &_tmp4_); +#line 37 "../src/static/static_points.vala" + *result = _tmp4_; +#line 37 "../src/static/static_points.vala" + return; +#line 173 "static_points.c" + } +#line 38 "../src/static/static_points.vala" + live_chart_static_static_points_get (self, at + 1, &_tmp5_); +#line 38 "../src/static/static_points.vala" + *result = _tmp5_; +#line 38 "../src/static/static_points.vala" + return; +#line 181 "static_points.c" +} + +void +live_chart_static_static_points_first (LiveChartStaticStaticPoints* self, + LiveChartPoint* result) +{ + LiveChartPoint _tmp0_ = {0}; +#line 41 "../src/static/static_points.vala" + g_return_if_fail (self != NULL); +#line 42 "../src/static/static_points.vala" + live_chart_static_static_points_get (self, 0, &_tmp0_); +#line 42 "../src/static/static_points.vala" + *result = _tmp0_; +#line 42 "../src/static/static_points.vala" + return; +#line 197 "static_points.c" +} + +void +live_chart_static_static_points_last (LiveChartStaticStaticPoints* self, + LiveChartPoint* result) +{ + gint _tmp0_; + gint _tmp1_; + LiveChartPoint _tmp2_ = {0}; +#line 45 "../src/static/static_points.vala" + g_return_if_fail (self != NULL); +#line 46 "../src/static/static_points.vala" + _tmp0_ = live_chart_static_static_points_get_size (self); +#line 46 "../src/static/static_points.vala" + _tmp1_ = _tmp0_; +#line 46 "../src/static/static_points.vala" + live_chart_static_static_points_get (self, _tmp1_ - 1, &_tmp2_); +#line 46 "../src/static/static_points.vala" + *result = _tmp2_; +#line 46 "../src/static/static_points.vala" + return; +#line 219 "static_points.c" +} + +LiveChartStaticStaticPoints* +live_chart_static_static_points_create (LiveChartStaticStaticValues* values, + LiveChartConfig* config) +{ + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp0_ = {0}; + LiveChartStaticStaticPoints* points = NULL; + LiveChartStaticStaticPoints* _tmp1_; + gint _tmp2_; + gint _tmp3_; + LiveChartStaticStaticPoints* result; +#line 49 "../src/static/static_points.vala" + g_return_val_if_fail (values != NULL, NULL); +#line 49 "../src/static/static_points.vala" + g_return_val_if_fail (config != NULL, NULL); +#line 50 "../src/static/static_points.vala" + live_chart_config_boundaries (config, &_tmp0_); +#line 50 "../src/static/static_points.vala" + boundaries = _tmp0_; +#line 52 "../src/static/static_points.vala" + _tmp1_ = live_chart_static_static_points_new (); +#line 52 "../src/static/static_points.vala" + points = _tmp1_; +#line 53 "../src/static/static_points.vala" + _tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) values); +#line 53 "../src/static/static_points.vala" + _tmp3_ = _tmp2_; +#line 53 "../src/static/static_points.vala" + if (_tmp3_ > 0) { +#line 251 "static_points.c" + { + LiveChartStaticStaticValues* _value_list = NULL; + gint _value_size = 0; + LiveChartStaticStaticValues* _tmp4_; + gint _tmp5_; + gint _tmp6_; + gint _value_index = 0; +#line 54 "../src/static/static_points.vala" + _value_list = values; +#line 54 "../src/static/static_points.vala" + _tmp4_ = _value_list; +#line 54 "../src/static/static_points.vala" + _tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_); +#line 54 "../src/static/static_points.vala" + _tmp6_ = _tmp5_; +#line 54 "../src/static/static_points.vala" + _value_size = _tmp6_; +#line 54 "../src/static/static_points.vala" + _value_index = -1; +#line 54 "../src/static/static_points.vala" + while (TRUE) { +#line 273 "static_points.c" + gint _tmp7_; + gint _tmp8_; + LiveChartStaticNamedValue value = {0}; + LiveChartStaticStaticValues* _tmp9_; + gpointer _tmp10_; + LiveChartStaticNamedValue* _tmp11_; + LiveChartStaticNamedValue _tmp12_; + LiveChartStaticNamedValue _tmp13_ = {0}; + LiveChartStaticNamedValue _tmp14_; + LiveChartPoint point = {0}; + LiveChartStaticNamedValue _tmp15_; + LiveChartBoundaries _tmp16_; + LiveChartPoint _tmp17_ = {0}; + LiveChartStaticStaticPoints* _tmp18_; + LiveChartPoint _tmp19_; +#line 54 "../src/static/static_points.vala" + _value_index = _value_index + 1; +#line 54 "../src/static/static_points.vala" + _tmp7_ = _value_index; +#line 54 "../src/static/static_points.vala" + _tmp8_ = _value_size; +#line 54 "../src/static/static_points.vala" + if (!(_tmp7_ < _tmp8_)) { +#line 54 "../src/static/static_points.vala" + break; +#line 299 "static_points.c" + } +#line 54 "../src/static/static_points.vala" + _tmp9_ = _value_list; +#line 54 "../src/static/static_points.vala" + _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _value_index); +#line 54 "../src/static/static_points.vala" + _tmp11_ = (LiveChartStaticNamedValue*) _tmp10_; +#line 54 "../src/static/static_points.vala" + _tmp12_ = *_tmp11_; +#line 54 "../src/static/static_points.vala" + live_chart_static_named_value_copy (&_tmp12_, &_tmp13_); +#line 54 "../src/static/static_points.vala" + _tmp14_ = _tmp13_; +#line 54 "../src/static/static_points.vala" + _live_chart_static_named_value_free0 (_tmp11_); +#line 54 "../src/static/static_points.vala" + value = _tmp14_; +#line 55 "../src/static/static_points.vala" + _tmp15_ = value; +#line 55 "../src/static/static_points.vala" + _tmp16_ = boundaries; +#line 55 "../src/static/static_points.vala" + live_chart_static_static_points_value_to_point (&_tmp15_, config, &_tmp16_, &_tmp17_); +#line 55 "../src/static/static_points.vala" + point = _tmp17_; +#line 56 "../src/static/static_points.vala" + _tmp18_ = points; +#line 56 "../src/static/static_points.vala" + _tmp19_ = point; +#line 56 "../src/static/static_points.vala" + live_chart_static_static_points_add (_tmp18_, &_tmp19_); +#line 54 "../src/static/static_points.vala" + live_chart_static_named_value_destroy (&value); +#line 333 "static_points.c" + } + } + } +#line 60 "../src/static/static_points.vala" + result = points; +#line 60 "../src/static/static_points.vala" + return result; +#line 341 "static_points.c" +} + +static void +live_chart_static_static_points_value_to_point (LiveChartStaticNamedValue* current_value, + LiveChartConfig* config, + LiveChartBoundaries* boundaries, + LiveChartPoint* result) +{ + gint category_length = 0; + GeeArrayList* _tmp0_; + gint _tmp1_; + gint _tmp2_; + guint8 category_pos = 0U; + gint width_between_each_points = 0; + LiveChartBoundaries _tmp15_; + LiveChartBoundary _tmp16_; + LiveChartBoundaries _tmp17_; + LiveChartBoundary _tmp18_; + gint _tmp19_; + gint _tmp20_; + gchar* _tmp21_; + gchar* _tmp22_; + gint x = 0; + LiveChartBoundaries _tmp23_; + LiveChartBoundary _tmp24_; + gdouble y = 0.0; + LiveChartBoundaries _tmp25_; + LiveChartBoundary _tmp26_; + LiveChartStaticNamedValue _tmp27_; + LiveChartYAxis* _tmp28_; + LiveChartStaticNamedValue _tmp29_; + const gchar* _tmp30_; + LiveChartXAxis* _tmp31_; + gchar* _tmp32_; + gchar* _tmp33_; + LiveChartStaticNamedValue _tmp34_; + LiveChartYAxis* _tmp35_; + LiveChartPoint _tmp36_ = {0}; +#line 63 "../src/static/static_points.vala" + g_return_if_fail (current_value != NULL); +#line 63 "../src/static/static_points.vala" + g_return_if_fail (config != NULL); +#line 63 "../src/static/static_points.vala" + g_return_if_fail (boundaries != NULL); +#line 64 "../src/static/static_points.vala" + _tmp0_ = config->categories; +#line 64 "../src/static/static_points.vala" + _tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_); +#line 64 "../src/static/static_points.vala" + _tmp2_ = _tmp1_; +#line 64 "../src/static/static_points.vala" + category_length = _tmp2_; +#line 65 "../src/static/static_points.vala" + category_pos = (guint8) 0; +#line 396 "static_points.c" + { + guint8 i = 0U; +#line 66 "../src/static/static_points.vala" + i = (guint8) 0; +#line 401 "static_points.c" + { + gboolean _tmp3_ = FALSE; +#line 66 "../src/static/static_points.vala" + _tmp3_ = TRUE; +#line 66 "../src/static/static_points.vala" + while (TRUE) { +#line 408 "static_points.c" + gchar* category = NULL; + GeeArrayList* _tmp5_; + gpointer _tmp6_; + gboolean _tmp7_ = FALSE; + const gchar* _tmp8_; +#line 66 "../src/static/static_points.vala" + if (!_tmp3_) { +#line 416 "static_points.c" + guint8 _tmp4_; +#line 66 "../src/static/static_points.vala" + _tmp4_ = i; +#line 66 "../src/static/static_points.vala" + i = _tmp4_ + 1; +#line 422 "static_points.c" + } +#line 66 "../src/static/static_points.vala" + _tmp3_ = FALSE; +#line 66 "../src/static/static_points.vala" + if (!(((gint) i) < category_length)) { +#line 66 "../src/static/static_points.vala" + break; +#line 430 "static_points.c" + } +#line 67 "../src/static/static_points.vala" + _tmp5_ = config->categories; +#line 67 "../src/static/static_points.vala" + _tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, (gint) i); +#line 67 "../src/static/static_points.vala" + category = (gchar*) _tmp6_; +#line 68 "../src/static/static_points.vala" + _tmp8_ = category; +#line 68 "../src/static/static_points.vala" + if (_tmp8_ != NULL) { +#line 442 "static_points.c" + const gchar* _tmp9_; + LiveChartStaticNamedValue _tmp10_; + const gchar* _tmp11_; +#line 68 "../src/static/static_points.vala" + _tmp9_ = category; +#line 68 "../src/static/static_points.vala" + _tmp10_ = *current_value; +#line 68 "../src/static/static_points.vala" + _tmp11_ = _tmp10_.name; +#line 68 "../src/static/static_points.vala" + _tmp7_ = g_strcmp0 (_tmp9_, _tmp11_) == 0; +#line 454 "static_points.c" + } else { +#line 68 "../src/static/static_points.vala" + _tmp7_ = FALSE; +#line 458 "static_points.c" + } +#line 68 "../src/static/static_points.vala" + if (_tmp7_) { +#line 462 "static_points.c" + const gchar* _tmp12_; + gchar* _tmp13_; + gchar* _tmp14_; +#line 69 "../src/static/static_points.vala" + category_pos = i; +#line 70 "../src/static/static_points.vala" + _tmp12_ = category; +#line 70 "../src/static/static_points.vala" + _tmp13_ = g_strdup_printf ("Found category %s at pos %d", _tmp12_, (gint) i); +#line 70 "../src/static/static_points.vala" + _tmp14_ = _tmp13_; +#line 70 "../src/static/static_points.vala" + g_message ("static_points.vala:70: %s", _tmp14_); +#line 70 "../src/static/static_points.vala" + _g_free0 (_tmp14_); +#line 71 "../src/static/static_points.vala" + _g_free0 (category); +#line 71 "../src/static/static_points.vala" + break; +#line 482 "static_points.c" + } +#line 66 "../src/static/static_points.vala" + _g_free0 (category); +#line 486 "static_points.c" + } + } + } +#line 74 "../src/static/static_points.vala" + _tmp15_ = *boundaries; +#line 74 "../src/static/static_points.vala" + _tmp16_ = _tmp15_.x; +#line 74 "../src/static/static_points.vala" + _tmp17_ = *boundaries; +#line 74 "../src/static/static_points.vala" + _tmp18_ = _tmp17_.x; +#line 74 "../src/static/static_points.vala" + width_between_each_points = (_tmp16_.max - _tmp18_.min) / (category_length - 1); +#line 75 "../src/static/static_points.vala" + _tmp19_ = live_chart_config_get_width (config); +#line 75 "../src/static/static_points.vala" + _tmp20_ = _tmp19_; +#line 75 "../src/static/static_points.vala" + _tmp21_ = g_strdup_printf ("WIDTH %d", _tmp20_); +#line 75 "../src/static/static_points.vala" + _tmp22_ = _tmp21_; +#line 75 "../src/static/static_points.vala" + g_message ("static_points.vala:75: %s", _tmp22_); +#line 75 "../src/static/static_points.vala" + _g_free0 (_tmp22_); +#line 76 "../src/static/static_points.vala" + _tmp23_ = *boundaries; +#line 76 "../src/static/static_points.vala" + _tmp24_ = _tmp23_.x; +#line 76 "../src/static/static_points.vala" + x = _tmp24_.min + (category_pos * width_between_each_points); +#line 77 "../src/static/static_points.vala" + _tmp25_ = *boundaries; +#line 77 "../src/static/static_points.vala" + _tmp26_ = _tmp25_.y; +#line 77 "../src/static/static_points.vala" + _tmp27_ = *current_value; +#line 77 "../src/static/static_points.vala" + _tmp28_ = config->y_axis; +#line 77 "../src/static/static_points.vala" + y = _tmp26_.max - (_tmp27_.value * live_chart_yaxis_get_ratio (_tmp28_)); +#line 78 "../src/static/static_points.vala" + _tmp29_ = *current_value; +#line 78 "../src/static/static_points.vala" + _tmp30_ = _tmp29_.name; +#line 78 "../src/static/static_points.vala" + _tmp31_ = config->x_axis; +#line 78 "../src/static/static_points.vala" + _tmp32_ = g_strdup_printf ("category %s at pos %d (%f,%f) (width_between_each_points = %d) ratio: " \ +"%f", _tmp30_, (gint) category_pos, (gdouble) x, y, width_between_each_points, live_chart_xaxis_get_ratio (_tmp31_)); +#line 78 "../src/static/static_points.vala" + _tmp33_ = _tmp32_; +#line 78 "../src/static/static_points.vala" + g_message ("static_points.vala:78: %s", _tmp33_); +#line 78 "../src/static/static_points.vala" + _g_free0 (_tmp33_); +#line 79 "../src/static/static_points.vala" + _tmp34_ = *current_value; +#line 79 "../src/static/static_points.vala" + _tmp35_ = config->y_axis; +#line 79 "../src/static/static_points.vala" + memset (&_tmp36_, 0, sizeof (LiveChartPoint)); +#line 79 "../src/static/static_points.vala" + _tmp36_.x = (gdouble) x; +#line 79 "../src/static/static_points.vala" + _tmp36_.y = y; +#line 79 "../src/static/static_points.vala" + _tmp36_.height = _tmp34_.value * live_chart_yaxis_get_ratio (_tmp35_); +#line 79 "../src/static/static_points.vala" + *result = _tmp36_; +#line 79 "../src/static/static_points.vala" + return; +#line 558 "static_points.c" +} + +LiveChartBounds* +live_chart_static_static_points_get_bounds (LiveChartStaticStaticPoints* self) +{ + LiveChartBounds* result; + LiveChartBounds* _tmp0_; +#line 10 "../src/static/static_points.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 10 "../src/static/static_points.vala" + _tmp0_ = self->priv->_bounds; +#line 10 "../src/static/static_points.vala" + result = _tmp0_; +#line 10 "../src/static/static_points.vala" + return result; +#line 574 "static_points.c" +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 10 "../src/static/static_points.vala" + return self ? g_object_ref (self) : NULL; +#line 582 "static_points.c" +} + +void +live_chart_static_static_points_set_bounds (LiveChartStaticStaticPoints* self, + LiveChartBounds* value) +{ + LiveChartBounds* old_value; +#line 10 "../src/static/static_points.vala" + g_return_if_fail (self != NULL); +#line 10 "../src/static/static_points.vala" + old_value = live_chart_static_static_points_get_bounds (self); +#line 10 "../src/static/static_points.vala" + if (old_value != value) { +#line 596 "static_points.c" + LiveChartBounds* _tmp0_; +#line 10 "../src/static/static_points.vala" + _tmp0_ = _g_object_ref0 (value); +#line 10 "../src/static/static_points.vala" + _g_object_unref0 (self->priv->_bounds); +#line 10 "../src/static/static_points.vala" + self->priv->_bounds = _tmp0_; +#line 10 "../src/static/static_points.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_points_properties[LIVE_CHART_STATIC_STATIC_POINTS_BOUNDS_PROPERTY]); +#line 606 "static_points.c" + } +} + +gint +live_chart_static_static_points_get_size (LiveChartStaticStaticPoints* self) +{ + gint result; + GeeArrayList* _tmp0_; + gint _tmp1_; + gint _tmp2_; +#line 23 "../src/static/static_points.vala" + g_return_val_if_fail (self != NULL, 0); +#line 24 "../src/static/static_points.vala" + _tmp0_ = self->priv->points; +#line 24 "../src/static/static_points.vala" + _tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_); +#line 24 "../src/static/static_points.vala" + _tmp2_ = _tmp1_; +#line 24 "../src/static/static_points.vala" + result = _tmp2_; +#line 24 "../src/static/static_points.vala" + return result; +#line 629 "static_points.c" +} + +gdouble +live_chart_static_static_points_get_realtime_delta (LiveChartStaticStaticPoints* self) +{ + gdouble result; +#line 29 "../src/static/static_points.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 29 "../src/static/static_points.vala" + result = self->priv->_realtime_delta; +#line 29 "../src/static/static_points.vala" + return result; +#line 642 "static_points.c" +} + +void +live_chart_static_static_points_set_realtime_delta (LiveChartStaticStaticPoints* self, + gdouble value) +{ + gdouble old_value; +#line 29 "../src/static/static_points.vala" + g_return_if_fail (self != NULL); +#line 29 "../src/static/static_points.vala" + old_value = live_chart_static_static_points_get_realtime_delta (self); +#line 29 "../src/static/static_points.vala" + if (old_value != value) { +#line 29 "../src/static/static_points.vala" + self->priv->_realtime_delta = value; +#line 29 "../src/static/static_points.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_points_properties[LIVE_CHART_STATIC_STATIC_POINTS_REALTIME_DELTA_PROPERTY]); +#line 660 "static_points.c" + } +} + +static void +live_chart_static_static_points_class_init (LiveChartStaticStaticPointsClass * klass, + gpointer klass_data) +{ +#line 6 "../src/static/static_points.vala" + live_chart_static_static_points_parent_class = g_type_class_peek_parent (klass); +#line 6 "../src/static/static_points.vala" + g_type_class_adjust_private_offset (klass, &LiveChartStaticStaticPoints_private_offset); +#line 6 "../src/static/static_points.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_static_static_points_get_property; +#line 6 "../src/static/static_points.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_static_static_points_set_property; +#line 6 "../src/static/static_points.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_static_static_points_finalize; +#line 6 "../src/static/static_points.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_POINTS_BOUNDS_PROPERTY, live_chart_static_static_points_properties[LIVE_CHART_STATIC_STATIC_POINTS_BOUNDS_PROPERTY] = g_param_spec_object ("bounds", "bounds", "bounds", LIVE_CHART_TYPE_BOUNDS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); +#line 6 "../src/static/static_points.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_POINTS_SIZE_PROPERTY, live_chart_static_static_points_properties[LIVE_CHART_STATIC_STATIC_POINTS_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); +#line 6 "../src/static/static_points.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_POINTS_REALTIME_DELTA_PROPERTY, live_chart_static_static_points_properties[LIVE_CHART_STATIC_STATIC_POINTS_REALTIME_DELTA_PROPERTY] = g_param_spec_double ("realtime-delta", "realtime-delta", "realtime-delta", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 684 "static_points.c" +} + +static void +live_chart_static_static_points_instance_init (LiveChartStaticStaticPoints * self, + gpointer klass) +{ + GeeArrayList* _tmp0_; +#line 6 "../src/static/static_points.vala" + self->priv = live_chart_static_static_points_get_instance_private (self); +#line 8 "../src/static/static_points.vala" + _tmp0_ = gee_array_list_new (LIVE_CHART_TYPE_POINT, (GBoxedCopyFunc) live_chart_point_dup, (GDestroyNotify) live_chart_point_free, NULL, NULL, NULL); +#line 8 "../src/static/static_points.vala" + self->priv->points = _tmp0_; +#line 698 "static_points.c" +} + +static void +live_chart_static_static_points_finalize (GObject * obj) +{ + LiveChartStaticStaticPoints * self; +#line 6 "../src/static/static_points.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPoints); +#line 8 "../src/static/static_points.vala" + _g_object_unref0 (self->priv->points); +#line 9 "../src/static/static_points.vala" + _g_object_unref0 (self->priv->_bounds); +#line 6 "../src/static/static_points.vala" + G_OBJECT_CLASS (live_chart_static_static_points_parent_class)->finalize (obj); +#line 713 "static_points.c" +} + +static GType +live_chart_static_static_points_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartStaticStaticPointsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_static_static_points_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartStaticStaticPoints), 0, (GInstanceInitFunc) live_chart_static_static_points_instance_init, NULL }; + GType live_chart_static_static_points_type_id; + live_chart_static_static_points_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartStaticStaticPoints", &g_define_type_info, 0); + LiveChartStaticStaticPoints_private_offset = g_type_add_instance_private (live_chart_static_static_points_type_id, sizeof (LiveChartStaticStaticPointsPrivate)); + return live_chart_static_static_points_type_id; +} + +GType +live_chart_static_static_points_get_type (void) +{ + static volatile gsize live_chart_static_static_points_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_static_points_type_id__once)) { + GType live_chart_static_static_points_type_id; + live_chart_static_static_points_type_id = live_chart_static_static_points_get_type_once (); + g_once_init_leave (&live_chart_static_static_points_type_id__once, live_chart_static_static_points_type_id); + } + return live_chart_static_static_points_type_id__once; +} + +static void +_vala_live_chart_static_static_points_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticPoints * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPoints); +#line 6 "../src/static/static_points.vala" + switch (property_id) { +#line 6 "../src/static/static_points.vala" + case LIVE_CHART_STATIC_STATIC_POINTS_BOUNDS_PROPERTY: +#line 6 "../src/static/static_points.vala" + g_value_set_object (value, live_chart_static_static_points_get_bounds (self)); +#line 6 "../src/static/static_points.vala" + break; +#line 6 "../src/static/static_points.vala" + case LIVE_CHART_STATIC_STATIC_POINTS_SIZE_PROPERTY: +#line 6 "../src/static/static_points.vala" + g_value_set_int (value, live_chart_static_static_points_get_size (self)); +#line 6 "../src/static/static_points.vala" + break; +#line 6 "../src/static/static_points.vala" + case LIVE_CHART_STATIC_STATIC_POINTS_REALTIME_DELTA_PROPERTY: +#line 6 "../src/static/static_points.vala" + g_value_set_double (value, live_chart_static_static_points_get_realtime_delta (self)); +#line 6 "../src/static/static_points.vala" + break; +#line 766 "static_points.c" + default: +#line 6 "../src/static/static_points.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_points.vala" + break; +#line 772 "static_points.c" + } +} + +static void +_vala_live_chart_static_static_points_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticPoints * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPoints); +#line 6 "../src/static/static_points.vala" + switch (property_id) { +#line 6 "../src/static/static_points.vala" + case LIVE_CHART_STATIC_STATIC_POINTS_BOUNDS_PROPERTY: +#line 6 "../src/static/static_points.vala" + live_chart_static_static_points_set_bounds (self, g_value_get_object (value)); +#line 6 "../src/static/static_points.vala" + break; +#line 6 "../src/static/static_points.vala" + case LIVE_CHART_STATIC_STATIC_POINTS_REALTIME_DELTA_PROPERTY: +#line 6 "../src/static/static_points.vala" + live_chart_static_static_points_set_realtime_delta (self, g_value_get_double (value)); +#line 6 "../src/static/static_points.vala" + break; +#line 798 "static_points.c" + default: +#line 6 "../src/static/static_points.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_points.vala" + break; +#line 804 "static_points.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/static/static_serie.c b/iPDC/lib/liblivechart_static.a.p/static/static_serie.c new file mode 100644 index 0000000..a75a10b --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/static/static_serie.c @@ -0,0 +1,619 @@ +/* static_serie.c generated by valac 0.56.0, the Vala compiler + * generated from static_serie.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_STATIC_STATIC_SERIE_0_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIE_NAME_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIE_MAIN_COLOR_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIE_LINE_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIE_VISIBLE_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIE_NUM_PROPERTIES +}; +static GParamSpec* live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_NUM_PROPERTIES]; +#define _g_free0(var) (var = (g_free (var), NULL)) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +enum { + LIVE_CHART_STATIC_STATIC_SERIE_VALUE_ADDED_SIGNAL, + LIVE_CHART_STATIC_STATIC_SERIE_NUM_SIGNALS +}; +static guint live_chart_static_static_serie_signals[LIVE_CHART_STATIC_STATIC_SERIE_NUM_SIGNALS] = {0}; + +struct _LiveChartStaticStaticSeriePrivate { + gchar* _name; + gboolean _visible; + LiveChartStaticStaticSerieRenderer* renderer; +}; + +static gint LiveChartStaticStaticSerie_private_offset; +static gpointer live_chart_static_static_serie_parent_class = NULL; +static LiveChartColorableIface * live_chart_static_static_serie_live_chart_colorable_parent_iface = NULL; +static LiveChartDrawableIface * live_chart_static_static_serie_live_chart_drawable_parent_iface = NULL; + +static void live_chart_static_static_serie_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_static_static_serie_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static void live_chart_static_static_serie_finalize (GObject * obj); +static GType live_chart_static_static_serie_get_type_once (void); +static void _vala_live_chart_static_static_serie_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_static_static_serie_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_static_static_serie_get_instance_private (LiveChartStaticStaticSerie* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartStaticStaticSerie_private_offset); +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 39 "../src/static/static_serie.vala" + return self ? g_object_ref (self) : NULL; +#line 73 "static_serie.c" +} + +LiveChartStaticStaticSerie* +live_chart_static_static_serie_construct (GType object_type, + const gchar* name, + LiveChartStaticStaticSerieRenderer* renderer) +{ + LiveChartStaticStaticSerie * self = NULL; + LiveChartStaticStaticSerieRenderer* _tmp0_; +#line 37 "../src/static/static_serie.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 37 "../src/static/static_serie.vala" + g_return_val_if_fail (renderer != NULL, NULL); +#line 37 "../src/static/static_serie.vala" + self = (LiveChartStaticStaticSerie*) g_object_new (object_type, NULL); +#line 38 "../src/static/static_serie.vala" + live_chart_static_static_serie_set_name (self, name); +#line 39 "../src/static/static_serie.vala" + _tmp0_ = _g_object_ref0 (renderer); +#line 39 "../src/static/static_serie.vala" + _g_object_unref0 (self->priv->renderer); +#line 39 "../src/static/static_serie.vala" + self->priv->renderer = _tmp0_; +#line 37 "../src/static/static_serie.vala" + return self; +#line 99 "static_serie.c" +} + +LiveChartStaticStaticSerie* +live_chart_static_static_serie_new (const gchar* name, + LiveChartStaticStaticSerieRenderer* renderer) +{ +#line 37 "../src/static/static_serie.vala" + return live_chart_static_static_serie_construct (LIVE_CHART_STATIC_TYPE_STATIC_SERIE, name, renderer); +#line 108 "static_serie.c" +} + +static void +live_chart_static_static_serie_real_draw (LiveChartDrawable* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartStaticStaticSerie * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 42 "../src/static/static_serie.vala" + self = (LiveChartStaticStaticSerie*) base; +#line 42 "../src/static/static_serie.vala" + g_return_if_fail (ctx != NULL); +#line 42 "../src/static/static_serie.vala" + g_return_if_fail (config != NULL); +#line 43 "../src/static/static_serie.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 43 "../src/static/static_serie.vala" + _tmp1_ = _tmp0_; +#line 43 "../src/static/static_serie.vala" + if (_tmp1_) { +#line 131 "static_serie.c" + LiveChartStaticStaticSerieRenderer* _tmp2_; +#line 44 "../src/static/static_serie.vala" + _tmp2_ = self->priv->renderer; +#line 44 "../src/static/static_serie.vala" + live_chart_static_static_serie_renderer_draw (_tmp2_, ctx, config); +#line 137 "static_serie.c" + } +} + +void +live_chart_static_static_serie_add (LiveChartStaticStaticSerie* self, + const gchar* name, + gdouble value) +{ + LiveChartStaticStaticSerieRenderer* _tmp0_; + LiveChartStaticStaticValues* _tmp1_; + LiveChartStaticStaticValues* _tmp2_; + LiveChartStaticNamedValue _tmp3_ = {0}; +#line 48 "../src/static/static_serie.vala" + g_return_if_fail (self != NULL); +#line 48 "../src/static/static_serie.vala" + g_return_if_fail (name != NULL); +#line 49 "../src/static/static_serie.vala" + _tmp0_ = self->priv->renderer; +#line 49 "../src/static/static_serie.vala" + _tmp1_ = live_chart_static_static_serie_renderer_get_values (_tmp0_); +#line 49 "../src/static/static_serie.vala" + _tmp2_ = _tmp1_; +#line 49 "../src/static/static_serie.vala" + _g_free0 (_tmp3_.name); +#line 49 "../src/static/static_serie.vala" + _tmp3_.name = name; +#line 49 "../src/static/static_serie.vala" + _tmp3_.value = value; +#line 49 "../src/static/static_serie.vala" + live_chart_static_static_values_add (_tmp2_, &_tmp3_); +#line 49 "../src/static/static_serie.vala" + _g_object_unref0 (_tmp2_); +#line 50 "../src/static/static_serie.vala" + g_signal_emit (self, live_chart_static_static_serie_signals[LIVE_CHART_STATIC_STATIC_SERIE_VALUE_ADDED_SIGNAL], 0, value); +#line 172 "static_serie.c" +} + +LiveChartStaticStaticValues* +live_chart_static_static_serie_get_values (LiveChartStaticStaticSerie* self) +{ + LiveChartStaticStaticSerieRenderer* _tmp0_; + LiveChartStaticStaticValues* _tmp1_; + LiveChartStaticStaticValues* result; +#line 53 "../src/static/static_serie.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 54 "../src/static/static_serie.vala" + _tmp0_ = self->priv->renderer; +#line 54 "../src/static/static_serie.vala" + _tmp1_ = live_chart_static_static_serie_renderer_get_values (_tmp0_); +#line 54 "../src/static/static_serie.vala" + result = _tmp1_; +#line 54 "../src/static/static_serie.vala" + return result; +#line 191 "static_serie.c" +} + +void +live_chart_static_static_serie_clear (LiveChartStaticStaticSerie* self) +{ + LiveChartStaticStaticSerieRenderer* _tmp0_; + LiveChartStaticStaticValues* _tmp1_; + LiveChartStaticStaticValues* _tmp2_; +#line 57 "../src/static/static_serie.vala" + g_return_if_fail (self != NULL); +#line 58 "../src/static/static_serie.vala" + _tmp0_ = self->priv->renderer; +#line 58 "../src/static/static_serie.vala" + _tmp1_ = live_chart_static_static_serie_renderer_get_values (_tmp0_); +#line 58 "../src/static/static_serie.vala" + _tmp2_ = _tmp1_; +#line 58 "../src/static/static_serie.vala" + gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp2_); +#line 58 "../src/static/static_serie.vala" + _g_object_unref0 (_tmp2_); +#line 212 "static_serie.c" +} + +static void +live_chart_static_static_serie_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartStaticStaticSerie * self; + LiveChartStaticStaticSerieRenderer* _tmp0_; + LiveChartBoundingBox _tmp1_ = {0}; +#line 61 "../src/static/static_serie.vala" + self = (LiveChartStaticStaticSerie*) base; +#line 62 "../src/static/static_serie.vala" + _tmp0_ = self->priv->renderer; +#line 62 "../src/static/static_serie.vala" + live_chart_drawable_get_bounding_box ((LiveChartDrawable*) _tmp0_, &_tmp1_); +#line 62 "../src/static/static_serie.vala" + *result = _tmp1_; +#line 62 "../src/static/static_serie.vala" + return; +#line 232 "static_serie.c" +} + +const gchar* +live_chart_static_static_serie_get_name (LiveChartStaticStaticSerie* self) +{ + const gchar* result; + const gchar* _tmp0_; +#line 9 "../src/static/static_serie.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 9 "../src/static/static_serie.vala" + _tmp0_ = self->priv->_name; +#line 9 "../src/static/static_serie.vala" + result = _tmp0_; +#line 9 "../src/static/static_serie.vala" + return result; +#line 248 "static_serie.c" +} + +void +live_chart_static_static_serie_set_name (LiveChartStaticStaticSerie* self, + const gchar* value) +{ + gchar* old_value; +#line 9 "../src/static/static_serie.vala" + g_return_if_fail (self != NULL); +#line 9 "../src/static/static_serie.vala" + old_value = live_chart_static_static_serie_get_name (self); +#line 9 "../src/static/static_serie.vala" + if (g_strcmp0 (value, old_value) != 0) { +#line 262 "static_serie.c" + gchar* _tmp0_; +#line 9 "../src/static/static_serie.vala" + _tmp0_ = g_strdup (value); +#line 9 "../src/static/static_serie.vala" + _g_free0 (self->priv->_name); +#line 9 "../src/static/static_serie.vala" + self->priv->_name = _tmp0_; +#line 9 "../src/static/static_serie.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_NAME_PROPERTY]); +#line 272 "static_serie.c" + } +} + +static void +live_chart_static_static_serie_real_get_main_color (LiveChartColorable* base, + GdkRGBA * result) +{ + LiveChartStaticStaticSerie* self; + LiveChartStaticStaticSerieRenderer* _tmp0_; + LiveChartPath* _tmp1_; + LiveChartPath* _tmp2_; + GdkRGBA _tmp3_ = {0}; + GdkRGBA _tmp4_; +#line 13 "../src/static/static_serie.vala" + self = (LiveChartStaticStaticSerie*) base; +#line 14 "../src/static/static_serie.vala" + _tmp0_ = self->priv->renderer; +#line 14 "../src/static/static_serie.vala" + _tmp1_ = live_chart_static_static_serie_renderer_get_line (_tmp0_); +#line 14 "../src/static/static_serie.vala" + _tmp2_ = _tmp1_; +#line 14 "../src/static/static_serie.vala" + live_chart_path_get_color (_tmp2_, &_tmp3_); +#line 14 "../src/static/static_serie.vala" + _tmp4_ = _tmp3_; +#line 14 "../src/static/static_serie.vala" + *result = _tmp4_; +#line 14 "../src/static/static_serie.vala" + return; +#line 302 "static_serie.c" +} + +static void +live_chart_static_static_serie_real_set_main_color (LiveChartColorable* base, + GdkRGBA * value) +{ + LiveChartStaticStaticSerie* self; + LiveChartStaticStaticSerieRenderer* _tmp0_; + LiveChartPath* _tmp1_; + LiveChartPath* _tmp2_; + GdkRGBA _tmp3_; +#line 17 "../src/static/static_serie.vala" + self = (LiveChartStaticStaticSerie*) base; +#line 18 "../src/static/static_serie.vala" + _tmp0_ = self->priv->renderer; +#line 18 "../src/static/static_serie.vala" + _tmp1_ = live_chart_static_static_serie_renderer_get_line (_tmp0_); +#line 18 "../src/static/static_serie.vala" + _tmp2_ = _tmp1_; +#line 18 "../src/static/static_serie.vala" + _tmp3_ = *value; +#line 18 "../src/static/static_serie.vala" + live_chart_path_set_color (_tmp2_, &_tmp3_); +#line 17 "../src/static/static_serie.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_MAIN_COLOR_PROPERTY]); +#line 328 "static_serie.c" +} + +LiveChartPath* +live_chart_static_static_serie_get_line (LiveChartStaticStaticSerie* self) +{ + LiveChartPath* result; + LiveChartStaticStaticSerieRenderer* _tmp0_; + LiveChartPath* _tmp1_; + LiveChartPath* _tmp2_; +#line 22 "../src/static/static_serie.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 23 "../src/static/static_serie.vala" + _tmp0_ = self->priv->renderer; +#line 23 "../src/static/static_serie.vala" + _tmp1_ = live_chart_static_static_serie_renderer_get_line (_tmp0_); +#line 23 "../src/static/static_serie.vala" + _tmp2_ = _tmp1_; +#line 23 "../src/static/static_serie.vala" + result = _tmp2_; +#line 23 "../src/static/static_serie.vala" + return result; +#line 350 "static_serie.c" +} + +void +live_chart_static_static_serie_set_line (LiveChartStaticStaticSerie* self, + LiveChartPath* value) +{ + LiveChartStaticStaticSerieRenderer* _tmp0_; +#line 26 "../src/static/static_serie.vala" + g_return_if_fail (self != NULL); +#line 27 "../src/static/static_serie.vala" + _tmp0_ = self->priv->renderer; +#line 27 "../src/static/static_serie.vala" + live_chart_static_static_serie_renderer_set_line (_tmp0_, value); +#line 26 "../src/static/static_serie.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_LINE_PROPERTY]); +#line 366 "static_serie.c" +} + +static gboolean +live_chart_static_static_serie_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartStaticStaticSerie* self; +#line 31 "../src/static/static_serie.vala" + self = (LiveChartStaticStaticSerie*) base; +#line 31 "../src/static/static_serie.vala" + result = self->priv->_visible; +#line 31 "../src/static/static_serie.vala" + return result; +#line 380 "static_serie.c" +} + +static void +live_chart_static_static_serie_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartStaticStaticSerie* self; + gboolean old_value; +#line 31 "../src/static/static_serie.vala" + self = (LiveChartStaticStaticSerie*) base; +#line 31 "../src/static/static_serie.vala" + old_value = live_chart_static_static_serie_real_get_visible (base); +#line 31 "../src/static/static_serie.vala" + if (old_value != value) { +#line 31 "../src/static/static_serie.vala" + self->priv->_visible = value; +#line 31 "../src/static/static_serie.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_VISIBLE_PROPERTY]); +#line 399 "static_serie.c" + } +} + +static void +live_chart_static_static_serie_class_init (LiveChartStaticStaticSerieClass * klass, + gpointer klass_data) +{ +#line 6 "../src/static/static_serie.vala" + live_chart_static_static_serie_parent_class = g_type_class_peek_parent (klass); +#line 6 "../src/static/static_serie.vala" + g_type_class_adjust_private_offset (klass, &LiveChartStaticStaticSerie_private_offset); +#line 6 "../src/static/static_serie.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_static_static_serie_get_property; +#line 6 "../src/static/static_serie.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_static_static_serie_set_property; +#line 6 "../src/static/static_serie.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_static_static_serie_finalize; +#line 6 "../src/static/static_serie.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_SERIE_NAME_PROPERTY, live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 6 "../src/static/static_serie.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_SERIE_MAIN_COLOR_PROPERTY, live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_MAIN_COLOR_PROPERTY] = g_param_spec_boxed ("main-color", "main-color", "main-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 6 "../src/static/static_serie.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_SERIE_LINE_PROPERTY, live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_LINE_PROPERTY] = g_param_spec_object ("line", "line", "line", LIVE_CHART_TYPE_PATH, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 6 "../src/static/static_serie.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_SERIE_VISIBLE_PROPERTY, live_chart_static_static_serie_properties[LIVE_CHART_STATIC_STATIC_SERIE_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 6 "../src/static/static_serie.vala" + live_chart_static_static_serie_signals[LIVE_CHART_STATIC_STATIC_SERIE_VALUE_ADDED_SIGNAL] = g_signal_new ("value-added", LIVE_CHART_STATIC_TYPE_STATIC_SERIE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); +#line 427 "static_serie.c" +} + +static void +live_chart_static_static_serie_live_chart_colorable_interface_init (LiveChartColorableIface * iface, + gpointer iface_data) +{ +#line 6 "../src/static/static_serie.vala" + live_chart_static_static_serie_live_chart_colorable_parent_iface = g_type_interface_peek_parent (iface); +#line 6 "../src/static/static_serie.vala" + iface->get_main_color = live_chart_static_static_serie_real_get_main_color; +#line 6 "../src/static/static_serie.vala" + iface->set_main_color = live_chart_static_static_serie_real_set_main_color; +#line 440 "static_serie.c" +} + +static void +live_chart_static_static_serie_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 6 "../src/static/static_serie.vala" + live_chart_static_static_serie_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 6 "../src/static/static_serie.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_static_static_serie_real_draw; +#line 6 "../src/static/static_serie.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_static_static_serie_real_get_bounding_box; +#line 6 "../src/static/static_serie.vala" + iface->get_visible = live_chart_static_static_serie_real_get_visible; +#line 6 "../src/static/static_serie.vala" + iface->set_visible = live_chart_static_static_serie_real_set_visible; +#line 457 "static_serie.c" +} + +static void +live_chart_static_static_serie_instance_init (LiveChartStaticStaticSerie * self, + gpointer klass) +{ +#line 6 "../src/static/static_serie.vala" + self->priv = live_chart_static_static_serie_get_instance_private (self); +#line 31 "../src/static/static_serie.vala" + self->priv->_visible = TRUE; +#line 468 "static_serie.c" +} + +static void +live_chart_static_static_serie_finalize (GObject * obj) +{ + LiveChartStaticStaticSerie * self; +#line 6 "../src/static/static_serie.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerie); +#line 8 "../src/static/static_serie.vala" + _g_free0 (self->priv->_name); +#line 35 "../src/static/static_serie.vala" + _g_object_unref0 (self->priv->renderer); +#line 6 "../src/static/static_serie.vala" + G_OBJECT_CLASS (live_chart_static_static_serie_parent_class)->finalize (obj); +#line 483 "static_serie.c" +} + +static GType +live_chart_static_static_serie_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartStaticStaticSerieClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_static_static_serie_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartStaticStaticSerie), 0, (GInstanceInitFunc) live_chart_static_static_serie_instance_init, NULL }; + static const GInterfaceInfo live_chart_colorable_info = { (GInterfaceInitFunc) live_chart_static_static_serie_live_chart_colorable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_static_static_serie_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_static_static_serie_type_id; + live_chart_static_static_serie_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartStaticStaticSerie", &g_define_type_info, 0); + g_type_add_interface_static (live_chart_static_static_serie_type_id, LIVE_CHART_TYPE_COLORABLE, &live_chart_colorable_info); + g_type_add_interface_static (live_chart_static_static_serie_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartStaticStaticSerie_private_offset = g_type_add_instance_private (live_chart_static_static_serie_type_id, sizeof (LiveChartStaticStaticSeriePrivate)); + return live_chart_static_static_serie_type_id; +} + +GType +live_chart_static_static_serie_get_type (void) +{ + static volatile gsize live_chart_static_static_serie_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_static_serie_type_id__once)) { + GType live_chart_static_static_serie_type_id; + live_chart_static_static_serie_type_id = live_chart_static_static_serie_get_type_once (); + g_once_init_leave (&live_chart_static_static_serie_type_id__once, live_chart_static_static_serie_type_id); + } + return live_chart_static_static_serie_type_id__once; +} + +static void +_vala_live_chart_static_static_serie_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticSerie * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerie); +#line 6 "../src/static/static_serie.vala" + switch (property_id) { +#line 6 "../src/static/static_serie.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_NAME_PROPERTY: +#line 6 "../src/static/static_serie.vala" + g_value_set_string (value, live_chart_static_static_serie_get_name (self)); +#line 6 "../src/static/static_serie.vala" + break; +#line 6 "../src/static/static_serie.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_MAIN_COLOR_PROPERTY: +#line 530 "static_serie.c" + { + GdkRGBA boxed; +#line 6 "../src/static/static_serie.vala" + live_chart_colorable_get_main_color ((LiveChartColorable*) self, &boxed); +#line 6 "../src/static/static_serie.vala" + g_value_set_boxed (value, &boxed); +#line 537 "static_serie.c" + } +#line 6 "../src/static/static_serie.vala" + break; +#line 6 "../src/static/static_serie.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_LINE_PROPERTY: +#line 6 "../src/static/static_serie.vala" + g_value_set_object (value, live_chart_static_static_serie_get_line (self)); +#line 6 "../src/static/static_serie.vala" + break; +#line 6 "../src/static/static_serie.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_VISIBLE_PROPERTY: +#line 6 "../src/static/static_serie.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 6 "../src/static/static_serie.vala" + break; +#line 553 "static_serie.c" + default: +#line 6 "../src/static/static_serie.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_serie.vala" + break; +#line 559 "static_serie.c" + } +} + +static void +_vala_live_chart_static_static_serie_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticSerie * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerie); +#line 6 "../src/static/static_serie.vala" + switch (property_id) { +#line 6 "../src/static/static_serie.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_NAME_PROPERTY: +#line 6 "../src/static/static_serie.vala" + live_chart_static_static_serie_set_name (self, g_value_get_string (value)); +#line 6 "../src/static/static_serie.vala" + break; +#line 6 "../src/static/static_serie.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_MAIN_COLOR_PROPERTY: +#line 6 "../src/static/static_serie.vala" + live_chart_colorable_set_main_color ((LiveChartColorable*) self, g_value_get_boxed (value)); +#line 6 "../src/static/static_serie.vala" + break; +#line 6 "../src/static/static_serie.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_LINE_PROPERTY: +#line 6 "../src/static/static_serie.vala" + live_chart_static_static_serie_set_line (self, g_value_get_object (value)); +#line 6 "../src/static/static_serie.vala" + break; +#line 6 "../src/static/static_serie.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_VISIBLE_PROPERTY: +#line 6 "../src/static/static_serie.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 6 "../src/static/static_serie.vala" + break; +#line 597 "static_serie.c" + default: +#line 6 "../src/static/static_serie.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_serie.vala" + break; +#line 603 "static_serie.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/static/static_serie_renderer.c b/iPDC/lib/liblivechart_static.a.p/static/static_serie_renderer.c new file mode 100644 index 0000000..fc549ec --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/static/static_serie_renderer.c @@ -0,0 +1,483 @@ +/* static_serie_renderer.c generated by valac 0.56.0, the Vala compiler + * generated from static_serie_renderer.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#define LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_VIRTUAL_LEFT_PADDING -200 + +enum { + LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_0_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_VISIBLE_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_LINE_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_NUM_PROPERTIES +}; +static GParamSpec* live_chart_static_static_serie_renderer_properties[LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _LiveChartStaticStaticSerieRendererPrivate { + gboolean _visible; + LiveChartPath* _line; +}; + +static gint LiveChartStaticStaticSerieRenderer_private_offset; +static gpointer live_chart_static_static_serie_renderer_parent_class = NULL; +static LiveChartDrawableIface * live_chart_static_static_serie_renderer_live_chart_drawable_parent_iface = NULL; + +static void live_chart_static_static_serie_renderer_real_draw (LiveChartStaticStaticSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_static_static_serie_renderer_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result); +static void live_chart_static_static_serie_renderer_finalize (GObject * obj); +static GType live_chart_static_static_serie_renderer_get_type_once (void); +static void _vala_live_chart_static_static_serie_renderer_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_static_static_serie_renderer_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_static_static_serie_renderer_get_instance_private (LiveChartStaticStaticSerieRenderer* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartStaticStaticSerieRenderer_private_offset); +} + +LiveChartStaticStaticSerieRenderer* +live_chart_static_static_serie_renderer_construct (GType object_type) +{ + LiveChartStaticStaticSerieRenderer * self = NULL; + GdkRGBA _tmp0_ = {0}; + LiveChartPath* _tmp1_; + LiveChartPath* _tmp2_; +#line 14 "../src/static/static_serie_renderer.vala" + self = (LiveChartStaticStaticSerieRenderer*) g_object_new (object_type, NULL); +#line 15 "../src/static/static_serie_renderer.vala" + _tmp0_.red = 1.0; +#line 15 "../src/static/static_serie_renderer.vala" + _tmp0_.green = 1.0; +#line 15 "../src/static/static_serie_renderer.vala" + _tmp0_.blue = 1.0; +#line 15 "../src/static/static_serie_renderer.vala" + _tmp0_.alpha = 1.0; +#line 15 "../src/static/static_serie_renderer.vala" + _tmp1_ = live_chart_path_new ((gdouble) 1, &_tmp0_, TRUE, NULL); +#line 15 "../src/static/static_serie_renderer.vala" + _tmp2_ = _tmp1_; +#line 15 "../src/static/static_serie_renderer.vala" + live_chart_static_static_serie_renderer_set_line (self, _tmp2_); +#line 15 "../src/static/static_serie_renderer.vala" + _g_object_unref0 (_tmp2_); +#line 14 "../src/static/static_serie_renderer.vala" + return self; +#line 87 "static_serie_renderer.c" +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 27 "../src/static/static_serie_renderer.vala" + return self ? g_object_ref (self) : NULL; +#line 95 "static_serie_renderer.c" +} + +LiveChartStaticStaticValues* +live_chart_static_static_serie_renderer_get_values (LiveChartStaticStaticSerieRenderer* self) +{ + LiveChartStaticStaticValues* _tmp0_; + LiveChartStaticStaticValues* _tmp1_; + LiveChartStaticStaticValues* result; +#line 26 "../src/static/static_serie_renderer.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 27 "../src/static/static_serie_renderer.vala" + _tmp0_ = self->values; +#line 27 "../src/static/static_serie_renderer.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 27 "../src/static/static_serie_renderer.vala" + result = _tmp1_; +#line 27 "../src/static/static_serie_renderer.vala" + return result; +#line 114 "static_serie_renderer.c" +} + +static void +live_chart_static_static_serie_renderer_real_draw (LiveChartStaticStaticSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config) +{ +#line 30 "../src/static/static_serie_renderer.vala" + g_critical ("Type `%s' does not implement abstract method `live_chart_static_static_serie_renderer_draw'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 30 "../src/static/static_serie_renderer.vala" + return; +#line 126 "static_serie_renderer.c" +} + +void +live_chart_static_static_serie_renderer_draw (LiveChartStaticStaticSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartStaticStaticSerieRendererClass* _klass_; +#line 30 "../src/static/static_serie_renderer.vala" + g_return_if_fail (self != NULL); +#line 30 "../src/static/static_serie_renderer.vala" + _klass_ = LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_GET_CLASS (self); +#line 30 "../src/static/static_serie_renderer.vala" + if (_klass_->draw) { +#line 30 "../src/static/static_serie_renderer.vala" + _klass_->draw (self, ctx, config); +#line 143 "static_serie_renderer.c" + } +} + +static void +live_chart_static_static_serie_renderer_real_get_bounding_box (LiveChartDrawable* base, + LiveChartBoundingBox* result) +{ + LiveChartStaticStaticSerieRenderer * self; + LiveChartBoundingBox _tmp0_; +#line 31 "../src/static/static_serie_renderer.vala" + self = (LiveChartStaticStaticSerieRenderer*) base; +#line 32 "../src/static/static_serie_renderer.vala" + _tmp0_ = self->bounding_box; +#line 32 "../src/static/static_serie_renderer.vala" + *result = _tmp0_; +#line 32 "../src/static/static_serie_renderer.vala" + return; +#line 161 "static_serie_renderer.c" +} + +void +live_chart_static_static_serie_renderer_debug (LiveChartStaticStaticSerieRenderer* self, + cairo_t* ctx) +{ + gchar* debug = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; +#line 35 "../src/static/static_serie_renderer.vala" + g_return_if_fail (self != NULL); +#line 35 "../src/static/static_serie_renderer.vala" + g_return_if_fail (ctx != NULL); +#line 36 "../src/static/static_serie_renderer.vala" + _tmp0_ = g_getenv ("LIVE_CHART_DEBUG"); +#line 36 "../src/static/static_serie_renderer.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 36 "../src/static/static_serie_renderer.vala" + debug = _tmp1_; +#line 37 "../src/static/static_serie_renderer.vala" + _tmp2_ = debug; +#line 37 "../src/static/static_serie_renderer.vala" + if (_tmp2_ != NULL) { +#line 186 "static_serie_renderer.c" + LiveChartBoundingBox _tmp3_; + LiveChartBoundingBox _tmp4_; + LiveChartBoundingBox _tmp5_; + LiveChartBoundingBox _tmp6_; +#line 38 "../src/static/static_serie_renderer.vala" + _tmp3_ = self->bounding_box; +#line 38 "../src/static/static_serie_renderer.vala" + _tmp4_ = self->bounding_box; +#line 38 "../src/static/static_serie_renderer.vala" + _tmp5_ = self->bounding_box; +#line 38 "../src/static/static_serie_renderer.vala" + _tmp6_ = self->bounding_box; +#line 38 "../src/static/static_serie_renderer.vala" + cairo_rectangle (ctx, _tmp3_.x, _tmp4_.y, _tmp5_.width, _tmp6_.height); +#line 39 "../src/static/static_serie_renderer.vala" + cairo_stroke (ctx); +#line 203 "static_serie_renderer.c" + } +#line 35 "../src/static/static_serie_renderer.vala" + _g_free0 (debug); +#line 207 "static_serie_renderer.c" +} + +gboolean +live_chart_static_static_serie_renderer_is_out_of_area (LiveChartStaticStaticSerieRenderer* self, + LiveChartPoint* point) +{ + LiveChartPoint _tmp0_; + gboolean result; +#line 43 "../src/static/static_serie_renderer.vala" + g_return_val_if_fail (self != NULL, FALSE); +#line 43 "../src/static/static_serie_renderer.vala" + g_return_val_if_fail (point != NULL, FALSE); +#line 44 "../src/static/static_serie_renderer.vala" + _tmp0_ = *point; +#line 44 "../src/static/static_serie_renderer.vala" + result = _tmp0_.x < ((gdouble) LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_VIRTUAL_LEFT_PADDING); +#line 44 "../src/static/static_serie_renderer.vala" + return result; +#line 226 "static_serie_renderer.c" +} + +static gboolean +live_chart_static_static_serie_renderer_real_get_visible (LiveChartDrawable* base) +{ + gboolean result; + LiveChartStaticStaticSerieRenderer* self; +#line 10 "../src/static/static_serie_renderer.vala" + self = (LiveChartStaticStaticSerieRenderer*) base; +#line 10 "../src/static/static_serie_renderer.vala" + result = self->priv->_visible; +#line 10 "../src/static/static_serie_renderer.vala" + return result; +#line 240 "static_serie_renderer.c" +} + +static void +live_chart_static_static_serie_renderer_real_set_visible (LiveChartDrawable* base, + gboolean value) +{ + LiveChartStaticStaticSerieRenderer* self; + gboolean old_value; +#line 10 "../src/static/static_serie_renderer.vala" + self = (LiveChartStaticStaticSerieRenderer*) base; +#line 10 "../src/static/static_serie_renderer.vala" + old_value = live_chart_static_static_serie_renderer_real_get_visible (base); +#line 10 "../src/static/static_serie_renderer.vala" + if (old_value != value) { +#line 10 "../src/static/static_serie_renderer.vala" + self->priv->_visible = value; +#line 10 "../src/static/static_serie_renderer.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_serie_renderer_properties[LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_VISIBLE_PROPERTY]); +#line 259 "static_serie_renderer.c" + } +} + +LiveChartPath* +live_chart_static_static_serie_renderer_get_line (LiveChartStaticStaticSerieRenderer* self) +{ + LiveChartPath* result; + LiveChartPath* _tmp0_; +#line 12 "../src/static/static_serie_renderer.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 12 "../src/static/static_serie_renderer.vala" + _tmp0_ = self->priv->_line; +#line 12 "../src/static/static_serie_renderer.vala" + result = _tmp0_; +#line 12 "../src/static/static_serie_renderer.vala" + return result; +#line 276 "static_serie_renderer.c" +} + +void +live_chart_static_static_serie_renderer_set_line (LiveChartStaticStaticSerieRenderer* self, + LiveChartPath* value) +{ + LiveChartPath* old_value; +#line 12 "../src/static/static_serie_renderer.vala" + g_return_if_fail (self != NULL); +#line 12 "../src/static/static_serie_renderer.vala" + old_value = live_chart_static_static_serie_renderer_get_line (self); +#line 12 "../src/static/static_serie_renderer.vala" + if (old_value != value) { +#line 290 "static_serie_renderer.c" + LiveChartPath* _tmp0_; +#line 12 "../src/static/static_serie_renderer.vala" + _tmp0_ = _g_object_ref0 (value); +#line 12 "../src/static/static_serie_renderer.vala" + _g_object_unref0 (self->priv->_line); +#line 12 "../src/static/static_serie_renderer.vala" + self->priv->_line = _tmp0_; +#line 12 "../src/static/static_serie_renderer.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_serie_renderer_properties[LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_LINE_PROPERTY]); +#line 300 "static_serie_renderer.c" + } +} + +static void +live_chart_static_static_serie_renderer_class_init (LiveChartStaticStaticSerieRendererClass * klass, + gpointer klass_data) +{ +#line 6 "../src/static/static_serie_renderer.vala" + live_chart_static_static_serie_renderer_parent_class = g_type_class_peek_parent (klass); +#line 6 "../src/static/static_serie_renderer.vala" + g_type_class_adjust_private_offset (klass, &LiveChartStaticStaticSerieRenderer_private_offset); +#line 6 "../src/static/static_serie_renderer.vala" + ((LiveChartStaticStaticSerieRendererClass *) klass)->draw = (void (*) (LiveChartStaticStaticSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_static_static_serie_renderer_real_draw; +#line 6 "../src/static/static_serie_renderer.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_static_static_serie_renderer_get_property; +#line 6 "../src/static/static_serie_renderer.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_static_static_serie_renderer_set_property; +#line 6 "../src/static/static_serie_renderer.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_static_static_serie_renderer_finalize; +#line 6 "../src/static/static_serie_renderer.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_VISIBLE_PROPERTY, live_chart_static_static_serie_renderer_properties[LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_VISIBLE_PROPERTY] = g_param_spec_boolean ("visible", "visible", "visible", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 6 "../src/static/static_serie_renderer.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_LINE_PROPERTY, live_chart_static_static_serie_renderer_properties[LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_LINE_PROPERTY] = g_param_spec_object ("line", "line", "line", LIVE_CHART_TYPE_PATH, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 324 "static_serie_renderer.c" +} + +static void +live_chart_static_static_serie_renderer_live_chart_drawable_interface_init (LiveChartDrawableIface * iface, + gpointer iface_data) +{ +#line 6 "../src/static/static_serie_renderer.vala" + live_chart_static_static_serie_renderer_live_chart_drawable_parent_iface = g_type_interface_peek_parent (iface); +#line 6 "../src/static/static_serie_renderer.vala" + iface->draw = (void (*) (LiveChartDrawable*, cairo_t*, LiveChartConfig*)) live_chart_static_static_serie_renderer_draw; +#line 6 "../src/static/static_serie_renderer.vala" + iface->get_bounding_box = (void (*) (LiveChartDrawable*, LiveChartBoundingBox*)) live_chart_static_static_serie_renderer_real_get_bounding_box; +#line 6 "../src/static/static_serie_renderer.vala" + iface->get_visible = live_chart_static_static_serie_renderer_real_get_visible; +#line 6 "../src/static/static_serie_renderer.vala" + iface->set_visible = live_chart_static_static_serie_renderer_real_set_visible; +#line 341 "static_serie_renderer.c" +} + +static void +live_chart_static_static_serie_renderer_instance_init (LiveChartStaticStaticSerieRenderer * self, + gpointer klass) +{ + LiveChartBoundingBox _tmp0_ = {0}; +#line 6 "../src/static/static_serie_renderer.vala" + self->priv = live_chart_static_static_serie_renderer_get_instance_private (self); +#line 10 "../src/static/static_serie_renderer.vala" + self->priv->_visible = TRUE; +#line 18 "../src/static/static_serie_renderer.vala" + memset (&_tmp0_, 0, sizeof (LiveChartBoundingBox)); +#line 18 "../src/static/static_serie_renderer.vala" + _tmp0_.x = (gdouble) 0; +#line 18 "../src/static/static_serie_renderer.vala" + _tmp0_.y = (gdouble) 0; +#line 18 "../src/static/static_serie_renderer.vala" + _tmp0_.width = (gdouble) 0; +#line 18 "../src/static/static_serie_renderer.vala" + _tmp0_.height = (gdouble) 0; +#line 18 "../src/static/static_serie_renderer.vala" + self->bounding_box = _tmp0_; +#line 365 "static_serie_renderer.c" +} + +static void +live_chart_static_static_serie_renderer_finalize (GObject * obj) +{ + LiveChartStaticStaticSerieRenderer * self; +#line 6 "../src/static/static_serie_renderer.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRenderer); +#line 12 "../src/static/static_serie_renderer.vala" + _g_object_unref0 (self->priv->_line); +#line 25 "../src/static/static_serie_renderer.vala" + _g_object_unref0 (self->values); +#line 6 "../src/static/static_serie_renderer.vala" + G_OBJECT_CLASS (live_chart_static_static_serie_renderer_parent_class)->finalize (obj); +#line 380 "static_serie_renderer.c" +} + +static GType +live_chart_static_static_serie_renderer_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartStaticStaticSerieRendererClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_static_static_serie_renderer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartStaticStaticSerieRenderer), 0, (GInstanceInitFunc) live_chart_static_static_serie_renderer_instance_init, NULL }; + static const GInterfaceInfo live_chart_drawable_info = { (GInterfaceInitFunc) live_chart_static_static_serie_renderer_live_chart_drawable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType live_chart_static_static_serie_renderer_type_id; + live_chart_static_static_serie_renderer_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartStaticStaticSerieRenderer", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_type_add_interface_static (live_chart_static_static_serie_renderer_type_id, LIVE_CHART_TYPE_DRAWABLE, &live_chart_drawable_info); + LiveChartStaticStaticSerieRenderer_private_offset = g_type_add_instance_private (live_chart_static_static_serie_renderer_type_id, sizeof (LiveChartStaticStaticSerieRendererPrivate)); + return live_chart_static_static_serie_renderer_type_id; +} + +GType +live_chart_static_static_serie_renderer_get_type (void) +{ + static volatile gsize live_chart_static_static_serie_renderer_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_static_serie_renderer_type_id__once)) { + GType live_chart_static_static_serie_renderer_type_id; + live_chart_static_static_serie_renderer_type_id = live_chart_static_static_serie_renderer_get_type_once (); + g_once_init_leave (&live_chart_static_static_serie_renderer_type_id__once, live_chart_static_static_serie_renderer_type_id); + } + return live_chart_static_static_serie_renderer_type_id__once; +} + +static void +_vala_live_chart_static_static_serie_renderer_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticSerieRenderer * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRenderer); +#line 6 "../src/static/static_serie_renderer.vala" + switch (property_id) { +#line 6 "../src/static/static_serie_renderer.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_VISIBLE_PROPERTY: +#line 6 "../src/static/static_serie_renderer.vala" + g_value_set_boolean (value, live_chart_drawable_get_visible ((LiveChartDrawable*) self)); +#line 6 "../src/static/static_serie_renderer.vala" + break; +#line 6 "../src/static/static_serie_renderer.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_LINE_PROPERTY: +#line 6 "../src/static/static_serie_renderer.vala" + g_value_set_object (value, live_chart_static_static_serie_renderer_get_line (self)); +#line 6 "../src/static/static_serie_renderer.vala" + break; +#line 429 "static_serie_renderer.c" + default: +#line 6 "../src/static/static_serie_renderer.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_serie_renderer.vala" + break; +#line 435 "static_serie_renderer.c" + } +} + +static void +_vala_live_chart_static_static_serie_renderer_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticSerieRenderer * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRenderer); +#line 6 "../src/static/static_serie_renderer.vala" + switch (property_id) { +#line 6 "../src/static/static_serie_renderer.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_VISIBLE_PROPERTY: +#line 6 "../src/static/static_serie_renderer.vala" + live_chart_drawable_set_visible ((LiveChartDrawable*) self, g_value_get_boolean (value)); +#line 6 "../src/static/static_serie_renderer.vala" + break; +#line 6 "../src/static/static_serie_renderer.vala" + case LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_LINE_PROPERTY: +#line 6 "../src/static/static_serie_renderer.vala" + live_chart_static_static_serie_renderer_set_line (self, g_value_get_object (value)); +#line 6 "../src/static/static_serie_renderer.vala" + break; +#line 461 "static_serie_renderer.c" + default: +#line 6 "../src/static/static_serie_renderer.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 6 "../src/static/static_serie_renderer.vala" + break; +#line 467 "static_serie_renderer.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/static/static_series.c b/iPDC/lib/liblivechart_static.a.p/static/static_series.c new file mode 100644 index 0000000..1f62db8 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/static/static_series.c @@ -0,0 +1,415 @@ +/* static_series.c generated by valac 0.56.0, the Vala compiler + * generated from static_series.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_STATIC_STATIC_SERIES_0_PROPERTY, + LIVE_CHART_STATIC_STATIC_SERIES_NUM_PROPERTIES +}; +static GParamSpec* live_chart_static_static_series_properties[LIVE_CHART_STATIC_STATIC_SERIES_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +struct _LiveChartStaticStaticSeriesPrivate { + GeeArrayList* series; + LiveChartStaticStaticChart* chart; +}; + +static gint LiveChartStaticStaticSeries_private_offset; +static gpointer live_chart_static_static_series_parent_class = NULL; + +static void __lambda15_ (LiveChartStaticStaticSeries* self, + gdouble value); +static void ___lambda15__live_chart_static_static_serie_value_added (LiveChartStaticStaticSerie* _sender, + gdouble value, + gpointer self); +static void live_chart_static_static_series_finalize (GObject * obj); +static GType live_chart_static_static_series_get_type_once (void); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_static_static_series_get_instance_private (LiveChartStaticStaticSeries* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartStaticStaticSeries_private_offset); +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 12 "../src/static/static_series.vala" + return self ? g_object_ref (self) : NULL; +#line 51 "static_series.c" +} + +LiveChartStaticStaticSeries* +live_chart_static_static_series_construct (GType object_type, + LiveChartStaticStaticChart* chart) +{ + LiveChartStaticStaticSeries * self = NULL; + LiveChartStaticStaticChart* _tmp0_; +#line 11 "../src/static/static_series.vala" + g_return_val_if_fail (chart != NULL, NULL); +#line 11 "../src/static/static_series.vala" + self = (LiveChartStaticStaticSeries*) g_object_new (object_type, NULL); +#line 12 "../src/static/static_series.vala" + _tmp0_ = _g_object_ref0 (chart); +#line 12 "../src/static/static_series.vala" + _g_object_unref0 (self->priv->chart); +#line 12 "../src/static/static_series.vala" + self->priv->chart = _tmp0_; +#line 11 "../src/static/static_series.vala" + return self; +#line 72 "static_series.c" +} + +LiveChartStaticStaticSeries* +live_chart_static_static_series_new (LiveChartStaticStaticChart* chart) +{ +#line 11 "../src/static/static_series.vala" + return live_chart_static_static_series_construct (LIVE_CHART_STATIC_TYPE_STATIC_SERIES, chart); +#line 80 "static_series.c" +} + +static void +__lambda15_ (LiveChartStaticStaticSeries* self, + gdouble value) +{ + LiveChartStaticStaticChart* _tmp0_; + LiveChartConfig* _tmp1_; + LiveChartYAxis* _tmp2_; +#line 20 "../src/static/static_series.vala" + _tmp0_ = self->priv->chart; +#line 20 "../src/static/static_series.vala" + _tmp1_ = _tmp0_->config; +#line 20 "../src/static/static_series.vala" + _tmp2_ = _tmp1_->y_axis; +#line 20 "../src/static/static_series.vala" + live_chart_yaxis_update_bounds (_tmp2_, value); +#line 98 "static_series.c" +} + +static void +___lambda15__live_chart_static_static_serie_value_added (LiveChartStaticStaticSerie* _sender, + gdouble value, + gpointer self) +{ +#line 18 "../src/static/static_series.vala" + __lambda15_ ((LiveChartStaticStaticSeries*) self, value); +#line 108 "static_series.c" +} + +LiveChartStaticStaticSerie* +live_chart_static_static_series_register (LiveChartStaticStaticSeries* self, + LiveChartStaticStaticSerie* serie) +{ + GeeArrayList* _tmp0_; + LiveChartStaticStaticSerie* _tmp1_; + LiveChartStaticStaticSerie* result; +#line 15 "../src/static/static_series.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 15 "../src/static/static_series.vala" + g_return_val_if_fail (serie != NULL, NULL); +#line 16 "../src/static/static_series.vala" + _tmp0_ = self->priv->series; +#line 16 "../src/static/static_series.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, serie); +#line 18 "../src/static/static_series.vala" + g_signal_connect_object (serie, "value-added", (GCallback) ___lambda15__live_chart_static_static_serie_value_added, self, 0); +#line 22 "../src/static/static_series.vala" + _tmp1_ = _g_object_ref0 (serie); +#line 22 "../src/static/static_series.vala" + result = _tmp1_; +#line 22 "../src/static/static_series.vala" + return result; +#line 134 "static_series.c" +} + +LiveChartStaticStaticSerie* +live_chart_static_static_series_get (LiveChartStaticStaticSeries* self, + gint index, + GError** error) +{ + GeeArrayList* _tmp0_; + gint _tmp1_; + gint _tmp2_; + GeeArrayList* _tmp7_; + gpointer _tmp8_; + GError* _inner_error0_ = NULL; + LiveChartStaticStaticSerie* result; +#line 25 "../src/static/static_series.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 26 "../src/static/static_series.vala" + _tmp0_ = self->priv->series; +#line 26 "../src/static/static_series.vala" + _tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_); +#line 26 "../src/static/static_series.vala" + _tmp2_ = _tmp1_; +#line 26 "../src/static/static_series.vala" + if (index > (_tmp2_ - 1)) { +#line 159 "static_series.c" + gchar* _tmp3_; + gchar* _tmp4_; + GError* _tmp5_; + GError* _tmp6_; +#line 27 "../src/static/static_series.vala" + _tmp3_ = g_strdup_printf ("Serie at index %d not found", index); +#line 27 "../src/static/static_series.vala" + _tmp4_ = _tmp3_; +#line 27 "../src/static/static_series.vala" + _tmp5_ = g_error_new_literal (LIVE_CHART_CHART_ERROR, LIVE_CHART_CHART_ERROR_SERIE_NOT_FOUND, _tmp4_); +#line 27 "../src/static/static_series.vala" + _tmp6_ = _tmp5_; +#line 27 "../src/static/static_series.vala" + _g_free0 (_tmp4_); +#line 27 "../src/static/static_series.vala" + _inner_error0_ = _tmp6_; +#line 27 "../src/static/static_series.vala" + if (_inner_error0_->domain == LIVE_CHART_CHART_ERROR) { +#line 27 "../src/static/static_series.vala" + g_propagate_error (error, _inner_error0_); +#line 27 "../src/static/static_series.vala" + return NULL; +#line 182 "static_series.c" + } else { +#line 27 "../src/static/static_series.vala" + 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); +#line 27 "../src/static/static_series.vala" + g_clear_error (&_inner_error0_); +#line 27 "../src/static/static_series.vala" + return NULL; +#line 190 "static_series.c" + } + } +#line 29 "../src/static/static_series.vala" + _tmp7_ = self->priv->series; +#line 29 "../src/static/static_series.vala" + _tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, index); +#line 29 "../src/static/static_series.vala" + result = (LiveChartStaticStaticSerie*) _tmp8_; +#line 29 "../src/static/static_series.vala" + return result; +#line 201 "static_series.c" +} + +LiveChartStaticStaticSerie* +live_chart_static_static_series_get_by_name (LiveChartStaticStaticSeries* self, + const gchar* name, + GError** error) +{ + gchar* _tmp11_; + gchar* _tmp12_; + GError* _tmp13_; + GError* _tmp14_; + GError* _inner_error0_ = NULL; + LiveChartStaticStaticSerie* result; +#line 32 "../src/static/static_series.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 32 "../src/static/static_series.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 219 "static_series.c" + { + GeeArrayList* _serie_list = NULL; + GeeArrayList* _tmp0_; + gint _serie_size = 0; + GeeArrayList* _tmp1_; + gint _tmp2_; + gint _tmp3_; + gint _serie_index = 0; +#line 33 "../src/static/static_series.vala" + _tmp0_ = self->priv->series; +#line 33 "../src/static/static_series.vala" + _serie_list = _tmp0_; +#line 33 "../src/static/static_series.vala" + _tmp1_ = _serie_list; +#line 33 "../src/static/static_series.vala" + _tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_); +#line 33 "../src/static/static_series.vala" + _tmp3_ = _tmp2_; +#line 33 "../src/static/static_series.vala" + _serie_size = _tmp3_; +#line 33 "../src/static/static_series.vala" + _serie_index = -1; +#line 33 "../src/static/static_series.vala" + while (TRUE) { +#line 244 "static_series.c" + gint _tmp4_; + gint _tmp5_; + LiveChartStaticStaticSerie* serie = NULL; + GeeArrayList* _tmp6_; + gpointer _tmp7_; + LiveChartStaticStaticSerie* _tmp8_; + const gchar* _tmp9_; + const gchar* _tmp10_; +#line 33 "../src/static/static_series.vala" + _serie_index = _serie_index + 1; +#line 33 "../src/static/static_series.vala" + _tmp4_ = _serie_index; +#line 33 "../src/static/static_series.vala" + _tmp5_ = _serie_size; +#line 33 "../src/static/static_series.vala" + if (!(_tmp4_ < _tmp5_)) { +#line 33 "../src/static/static_series.vala" + break; +#line 263 "static_series.c" + } +#line 33 "../src/static/static_series.vala" + _tmp6_ = _serie_list; +#line 33 "../src/static/static_series.vala" + _tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _serie_index); +#line 33 "../src/static/static_series.vala" + serie = (LiveChartStaticStaticSerie*) _tmp7_; +#line 34 "../src/static/static_series.vala" + _tmp8_ = serie; +#line 34 "../src/static/static_series.vala" + _tmp9_ = live_chart_static_static_serie_get_name (_tmp8_); +#line 34 "../src/static/static_series.vala" + _tmp10_ = _tmp9_; +#line 34 "../src/static/static_series.vala" + if (g_strcmp0 (_tmp10_, name) == 0) { +#line 34 "../src/static/static_series.vala" + result = serie; +#line 34 "../src/static/static_series.vala" + return result; +#line 283 "static_series.c" + } +#line 33 "../src/static/static_series.vala" + _g_object_unref0 (serie); +#line 287 "static_series.c" + } + } +#line 36 "../src/static/static_series.vala" + _tmp11_ = g_strdup_printf ("Serie with name %s not found", name); +#line 36 "../src/static/static_series.vala" + _tmp12_ = _tmp11_; +#line 36 "../src/static/static_series.vala" + _tmp13_ = g_error_new_literal (LIVE_CHART_CHART_ERROR, LIVE_CHART_CHART_ERROR_SERIE_NOT_FOUND, _tmp12_); +#line 36 "../src/static/static_series.vala" + _tmp14_ = _tmp13_; +#line 36 "../src/static/static_series.vala" + _g_free0 (_tmp12_); +#line 36 "../src/static/static_series.vala" + _inner_error0_ = _tmp14_; +#line 36 "../src/static/static_series.vala" + if (_inner_error0_->domain == LIVE_CHART_CHART_ERROR) { +#line 36 "../src/static/static_series.vala" + g_propagate_error (error, _inner_error0_); +#line 36 "../src/static/static_series.vala" + return NULL; +#line 308 "static_series.c" + } else { +#line 36 "../src/static/static_series.vala" + 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); +#line 36 "../src/static/static_series.vala" + g_clear_error (&_inner_error0_); +#line 36 "../src/static/static_series.vala" + return NULL; +#line 316 "static_series.c" + } +} + +GeeIterator* +live_chart_static_static_series_iterator (LiveChartStaticStaticSeries* self) +{ + GeeArrayList* _tmp0_; + GeeListIterator* _tmp1_; + GeeIterator* result; +#line 39 "../src/static/static_series.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 40 "../src/static/static_series.vala" + _tmp0_ = self->priv->series; +#line 40 "../src/static/static_series.vala" + _tmp1_ = gee_abstract_list_list_iterator ((GeeAbstractList*) _tmp0_); +#line 40 "../src/static/static_series.vala" + result = (GeeIterator*) _tmp1_; +#line 40 "../src/static/static_series.vala" + return result; +#line 336 "static_series.c" +} + +static void +live_chart_static_static_series_class_init (LiveChartStaticStaticSeriesClass * klass, + gpointer klass_data) +{ +#line 6 "../src/static/static_series.vala" + live_chart_static_static_series_parent_class = g_type_class_peek_parent (klass); +#line 6 "../src/static/static_series.vala" + g_type_class_adjust_private_offset (klass, &LiveChartStaticStaticSeries_private_offset); +#line 6 "../src/static/static_series.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_static_static_series_finalize; +#line 349 "static_series.c" +} + +static void +live_chart_static_static_series_instance_init (LiveChartStaticStaticSeries * self, + gpointer klass) +{ + GeeArrayList* _tmp0_; +#line 6 "../src/static/static_series.vala" + self->priv = live_chart_static_static_series_get_instance_private (self); +#line 8 "../src/static/static_series.vala" + _tmp0_ = gee_array_list_new (LIVE_CHART_STATIC_TYPE_STATIC_SERIE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); +#line 8 "../src/static/static_series.vala" + self->priv->series = _tmp0_; +#line 363 "static_series.c" +} + +static void +live_chart_static_static_series_finalize (GObject * obj) +{ + LiveChartStaticStaticSeries * self; +#line 6 "../src/static/static_series.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_STATIC_TYPE_STATIC_SERIES, LiveChartStaticStaticSeries); +#line 8 "../src/static/static_series.vala" + _g_object_unref0 (self->priv->series); +#line 9 "../src/static/static_series.vala" + _g_object_unref0 (self->priv->chart); +#line 6 "../src/static/static_series.vala" + G_OBJECT_CLASS (live_chart_static_static_series_parent_class)->finalize (obj); +#line 378 "static_series.c" +} + +static GType +live_chart_static_static_series_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartStaticStaticSeriesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_static_static_series_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartStaticStaticSeries), 0, (GInstanceInitFunc) live_chart_static_static_series_instance_init, NULL }; + GType live_chart_static_static_series_type_id; + live_chart_static_static_series_type_id = g_type_register_static (G_TYPE_OBJECT, "LiveChartStaticStaticSeries", &g_define_type_info, 0); + LiveChartStaticStaticSeries_private_offset = g_type_add_instance_private (live_chart_static_static_series_type_id, sizeof (LiveChartStaticStaticSeriesPrivate)); + return live_chart_static_static_series_type_id; +} + +GType +live_chart_static_static_series_get_type (void) +{ + static volatile gsize live_chart_static_static_series_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_static_series_type_id__once)) { + GType live_chart_static_static_series_type_id; + live_chart_static_static_series_type_id = live_chart_static_static_series_get_type_once (); + g_once_init_leave (&live_chart_static_static_series_type_id__once, live_chart_static_static_series_type_id); + } + return live_chart_static_static_series_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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/static/static_values.c b/iPDC/lib/liblivechart_static.a.p/static/static_values.c new file mode 100644 index 0000000..143ec5c --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/static/static_values.c @@ -0,0 +1,348 @@ +/* static_values.c generated by valac 0.56.0, the Vala compiler + * generated from static_values.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +#define _g_free0(var) (var = (g_free (var), NULL)) +enum { + LIVE_CHART_STATIC_STATIC_VALUES_0_PROPERTY, + LIVE_CHART_STATIC_STATIC_VALUES_BOUNDS_PROPERTY, + LIVE_CHART_STATIC_STATIC_VALUES_NUM_PROPERTIES +}; +static GParamSpec* live_chart_static_static_values_properties[LIVE_CHART_STATIC_STATIC_VALUES_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +struct _LiveChartStaticStaticValuesPrivate { + LiveChartBounds* _bounds; +}; + +static gint LiveChartStaticStaticValues_private_offset; +static gpointer live_chart_static_static_values_parent_class = NULL; + +static void live_chart_static_static_values_finalize (GObject * obj); +static GType live_chart_static_static_values_get_type_once (void); +static void _vala_live_chart_static_static_values_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_static_static_values_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +void +live_chart_static_named_value_copy (const LiveChartStaticNamedValue* self, + LiveChartStaticNamedValue* dest) +{ + const gchar* _tmp0_; + gchar* _tmp1_; +#line 6 "../src/static/static_values.vala" + _tmp0_ = (*self).name; +#line 6 "../src/static/static_values.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 6 "../src/static/static_values.vala" + _g_free0 ((*dest).name); +#line 6 "../src/static/static_values.vala" + (*dest).name = _tmp1_; +#line 6 "../src/static/static_values.vala" + (*dest).value = (*self).value; +#line 59 "static_values.c" +} + +void +live_chart_static_named_value_destroy (LiveChartStaticNamedValue* self) +{ +#line 7 "../src/static/static_values.vala" + _g_free0 ((*self).name); +#line 67 "static_values.c" +} + +LiveChartStaticNamedValue* +live_chart_static_named_value_dup (const LiveChartStaticNamedValue* self) +{ + LiveChartStaticNamedValue* dup; +#line 6 "../src/static/static_values.vala" + dup = g_new0 (LiveChartStaticNamedValue, 1); +#line 6 "../src/static/static_values.vala" + live_chart_static_named_value_copy (self, dup); +#line 6 "../src/static/static_values.vala" + return dup; +#line 80 "static_values.c" +} + +void +live_chart_static_named_value_free (LiveChartStaticNamedValue* self) +{ +#line 6 "../src/static/static_values.vala" + live_chart_static_named_value_destroy (self); +#line 6 "../src/static/static_values.vala" + g_free (self); +#line 90 "static_values.c" +} + +static GType +live_chart_static_named_value_get_type_once (void) +{ + GType live_chart_static_named_value_type_id; + live_chart_static_named_value_type_id = g_boxed_type_register_static ("LiveChartStaticNamedValue", (GBoxedCopyFunc) live_chart_static_named_value_dup, (GBoxedFreeFunc) live_chart_static_named_value_free); + return live_chart_static_named_value_type_id; +} + +GType +live_chart_static_named_value_get_type (void) +{ + static volatile gsize live_chart_static_named_value_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_named_value_type_id__once)) { + GType live_chart_static_named_value_type_id; + live_chart_static_named_value_type_id = live_chart_static_named_value_get_type_once (); + g_once_init_leave (&live_chart_static_named_value_type_id__once, live_chart_static_named_value_type_id); + } + return live_chart_static_named_value_type_id__once; +} + +static inline gpointer +live_chart_static_static_values_get_instance_private (LiveChartStaticStaticValues* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartStaticStaticValues_private_offset); +} + +LiveChartStaticStaticValues* +live_chart_static_static_values_construct (GType object_type) +{ + LiveChartStaticStaticValues * self = NULL; + LiveChartBounds* _tmp0_; + LiveChartBounds* _tmp1_; +#line 17 "../src/static/static_values.vala" + self = (LiveChartStaticStaticValues*) gee_linked_list_construct (object_type, LIVE_CHART_STATIC_TYPE_NAMED_VALUE, (GBoxedCopyFunc) live_chart_static_named_value_dup, (GDestroyNotify) live_chart_static_named_value_free, NULL, NULL, NULL); +#line 18 "../src/static/static_values.vala" + _tmp0_ = live_chart_bounds_new (((double) NAN), ((double) NAN)); +#line 18 "../src/static/static_values.vala" + _tmp1_ = _tmp0_; +#line 18 "../src/static/static_values.vala" + live_chart_static_static_values_set_bounds (self, _tmp1_); +#line 18 "../src/static/static_values.vala" + _g_object_unref0 (_tmp1_); +#line 17 "../src/static/static_values.vala" + return self; +#line 137 "static_values.c" +} + +LiveChartStaticStaticValues* +live_chart_static_static_values_new (void) +{ +#line 17 "../src/static/static_values.vala" + return live_chart_static_static_values_construct (LIVE_CHART_STATIC_TYPE_STATIC_VALUES); +#line 145 "static_values.c" +} + +void +live_chart_static_static_values_add (LiveChartStaticStaticValues* self, + LiveChartStaticNamedValue* value) +{ + LiveChartBounds* _tmp0_; + LiveChartStaticNamedValue _tmp1_; + LiveChartStaticNamedValue _tmp2_; +#line 21 "../src/static/static_values.vala" + g_return_if_fail (self != NULL); +#line 21 "../src/static/static_values.vala" + g_return_if_fail (value != NULL); +#line 22 "../src/static/static_values.vala" + _tmp0_ = self->priv->_bounds; +#line 22 "../src/static/static_values.vala" + _tmp1_ = *value; +#line 22 "../src/static/static_values.vala" + live_chart_bounds_update (_tmp0_, _tmp1_.value); +#line 23 "../src/static/static_values.vala" + _tmp2_ = *value; +#line 23 "../src/static/static_values.vala" + GEE_ABSTRACT_COLLECTION_CLASS (live_chart_static_static_values_parent_class)->add ((GeeAbstractCollection*) G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_LINKED_LIST, GeeLinkedList), &_tmp2_); +#line 169 "static_values.c" +} + +LiveChartBounds* +live_chart_static_static_values_get_bounds (LiveChartStaticStaticValues* self) +{ + LiveChartBounds* result; + LiveChartBounds* _tmp0_; +#line 14 "../src/static/static_values.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 14 "../src/static/static_values.vala" + _tmp0_ = self->priv->_bounds; +#line 14 "../src/static/static_values.vala" + result = _tmp0_; +#line 14 "../src/static/static_values.vala" + return result; +#line 185 "static_values.c" +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 14 "../src/static/static_values.vala" + return self ? g_object_ref (self) : NULL; +#line 193 "static_values.c" +} + +void +live_chart_static_static_values_set_bounds (LiveChartStaticStaticValues* self, + LiveChartBounds* value) +{ + LiveChartBounds* old_value; +#line 14 "../src/static/static_values.vala" + g_return_if_fail (self != NULL); +#line 14 "../src/static/static_values.vala" + old_value = live_chart_static_static_values_get_bounds (self); +#line 14 "../src/static/static_values.vala" + if (old_value != value) { +#line 207 "static_values.c" + LiveChartBounds* _tmp0_; +#line 14 "../src/static/static_values.vala" + _tmp0_ = _g_object_ref0 (value); +#line 14 "../src/static/static_values.vala" + _g_object_unref0 (self->priv->_bounds); +#line 14 "../src/static/static_values.vala" + self->priv->_bounds = _tmp0_; +#line 14 "../src/static/static_values.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_static_static_values_properties[LIVE_CHART_STATIC_STATIC_VALUES_BOUNDS_PROPERTY]); +#line 217 "static_values.c" + } +} + +static void +live_chart_static_static_values_class_init (LiveChartStaticStaticValuesClass * klass, + gpointer klass_data) +{ +#line 11 "../src/static/static_values.vala" + live_chart_static_static_values_parent_class = g_type_class_peek_parent (klass); +#line 11 "../src/static/static_values.vala" + g_type_class_adjust_private_offset (klass, &LiveChartStaticStaticValues_private_offset); +#line 11 "../src/static/static_values.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_static_static_values_get_property; +#line 11 "../src/static/static_values.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_static_static_values_set_property; +#line 11 "../src/static/static_values.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_static_static_values_finalize; +#line 11 "../src/static/static_values.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_STATIC_STATIC_VALUES_BOUNDS_PROPERTY, live_chart_static_static_values_properties[LIVE_CHART_STATIC_STATIC_VALUES_BOUNDS_PROPERTY] = g_param_spec_object ("bounds", "bounds", "bounds", LIVE_CHART_TYPE_BOUNDS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); +#line 237 "static_values.c" +} + +static void +live_chart_static_static_values_instance_init (LiveChartStaticStaticValues * self, + gpointer klass) +{ +#line 11 "../src/static/static_values.vala" + self->priv = live_chart_static_static_values_get_instance_private (self); +#line 246 "static_values.c" +} + +static void +live_chart_static_static_values_finalize (GObject * obj) +{ + LiveChartStaticStaticValues * self; +#line 11 "../src/static/static_values.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValues); +#line 13 "../src/static/static_values.vala" + _g_object_unref0 (self->priv->_bounds); +#line 11 "../src/static/static_values.vala" + G_OBJECT_CLASS (live_chart_static_static_values_parent_class)->finalize (obj); +#line 259 "static_values.c" +} + +static GType +live_chart_static_static_values_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartStaticStaticValuesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_static_static_values_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartStaticStaticValues), 0, (GInstanceInitFunc) live_chart_static_static_values_instance_init, NULL }; + GType live_chart_static_static_values_type_id; + live_chart_static_static_values_type_id = g_type_register_static (GEE_TYPE_LINKED_LIST, "LiveChartStaticStaticValues", &g_define_type_info, 0); + LiveChartStaticStaticValues_private_offset = g_type_add_instance_private (live_chart_static_static_values_type_id, sizeof (LiveChartStaticStaticValuesPrivate)); + return live_chart_static_static_values_type_id; +} + +GType +live_chart_static_static_values_get_type (void) +{ + static volatile gsize live_chart_static_static_values_type_id__once = 0; + if (g_once_init_enter (&live_chart_static_static_values_type_id__once)) { + GType live_chart_static_static_values_type_id; + live_chart_static_static_values_type_id = live_chart_static_static_values_get_type_once (); + g_once_init_leave (&live_chart_static_static_values_type_id__once, live_chart_static_static_values_type_id); + } + return live_chart_static_static_values_type_id__once; +} + +static void +_vala_live_chart_static_static_values_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticValues * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValues); +#line 11 "../src/static/static_values.vala" + switch (property_id) { +#line 11 "../src/static/static_values.vala" + case LIVE_CHART_STATIC_STATIC_VALUES_BOUNDS_PROPERTY: +#line 11 "../src/static/static_values.vala" + g_value_set_object (value, live_chart_static_static_values_get_bounds (self)); +#line 11 "../src/static/static_values.vala" + break; +#line 300 "static_values.c" + default: +#line 11 "../src/static/static_values.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 11 "../src/static/static_values.vala" + break; +#line 306 "static_values.c" + } +} + +static void +_vala_live_chart_static_static_values_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartStaticStaticValues * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValues); +#line 11 "../src/static/static_values.vala" + switch (property_id) { +#line 11 "../src/static/static_values.vala" + case LIVE_CHART_STATIC_STATIC_VALUES_BOUNDS_PROPERTY: +#line 11 "../src/static/static_values.vala" + live_chart_static_static_values_set_bounds (self, g_value_get_object (value)); +#line 11 "../src/static/static_values.vala" + break; +#line 326 "static_values.c" + default: +#line 11 "../src/static/static_values.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 11 "../src/static/static_values.vala" + break; +#line 332 "static_values.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/threshold_line.c b/iPDC/lib/liblivechart_static.a.p/threshold_line.c new file mode 100644 index 0000000..4f3ea83 --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/threshold_line.c @@ -0,0 +1,303 @@ +/* threshold_line.c generated by valac 0.56.0, the Vala compiler + * generated from threshold_line.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_THRESHOLD_LINE_0_PROPERTY, + LIVE_CHART_THRESHOLD_LINE_VALUE_PROPERTY, + LIVE_CHART_THRESHOLD_LINE_NUM_PROPERTIES +}; +static GParamSpec* live_chart_threshold_line_properties[LIVE_CHART_THRESHOLD_LINE_NUM_PROPERTIES]; + +struct _LiveChartThresholdLinePrivate { + gdouble _value; +}; + +static gint LiveChartThresholdLine_private_offset; +static gpointer live_chart_threshold_line_parent_class = NULL; + +static void live_chart_threshold_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config); +static void live_chart_threshold_line_finalize (GObject * obj); +static GType live_chart_threshold_line_get_type_once (void); +static void _vala_live_chart_threshold_line_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_threshold_line_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +static inline gpointer +live_chart_threshold_line_get_instance_private (LiveChartThresholdLine* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartThresholdLine_private_offset); +} + +LiveChartThresholdLine* +live_chart_threshold_line_construct (GType object_type, + gdouble value) +{ + LiveChartThresholdLine * self = NULL; +#line 10 "../src/threshold_line.vala" + self = (LiveChartThresholdLine*) live_chart_serie_renderer_construct (object_type); +#line 11 "../src/threshold_line.vala" + live_chart_threshold_line_set_value (self, value); +#line 9 "../src/threshold_line.vala" + return self; +#line 59 "threshold_line.c" +} + +LiveChartThresholdLine* +live_chart_threshold_line_new (gdouble value) +{ +#line 9 "../src/threshold_line.vala" + return live_chart_threshold_line_construct (LIVE_CHART_TYPE_THRESHOLD_LINE, value); +#line 67 "threshold_line.c" +} + +static void +live_chart_threshold_line_real_draw (LiveChartSerieRenderer* base, + cairo_t* ctx, + LiveChartConfig* config) +{ + LiveChartThresholdLine * self; + gboolean _tmp0_; + gboolean _tmp1_; +#line 14 "../src/threshold_line.vala" + self = (LiveChartThresholdLine*) base; +#line 14 "../src/threshold_line.vala" + g_return_if_fail (ctx != NULL); +#line 14 "../src/threshold_line.vala" + g_return_if_fail (config != NULL); +#line 15 "../src/threshold_line.vala" + _tmp0_ = live_chart_drawable_get_visible ((LiveChartDrawable*) self); +#line 15 "../src/threshold_line.vala" + _tmp1_ = _tmp0_; +#line 15 "../src/threshold_line.vala" + if (_tmp1_) { +#line 90 "threshold_line.c" + LiveChartBoundaries boundaries = {0}; + LiveChartBoundaries _tmp2_ = {0}; + LiveChartPath* _tmp3_; + LiveChartPath* _tmp4_; + gdouble y = 0.0; + LiveChartBoundaries _tmp5_; + LiveChartBoundary _tmp6_; + gdouble _tmp7_; + LiveChartYAxis* _tmp8_; + LiveChartBoundaries _tmp9_; + LiveChartBoundary _tmp10_; + LiveChartBoundaries _tmp11_; + LiveChartBoundary _tmp12_; +#line 16 "../src/threshold_line.vala" + live_chart_config_boundaries (config, &_tmp2_); +#line 16 "../src/threshold_line.vala" + boundaries = _tmp2_; +#line 17 "../src/threshold_line.vala" + _tmp3_ = live_chart_serie_renderer_get_line ((LiveChartSerieRenderer*) self); +#line 17 "../src/threshold_line.vala" + _tmp4_ = _tmp3_; +#line 17 "../src/threshold_line.vala" + live_chart_path_configure (_tmp4_, ctx); +#line 18 "../src/threshold_line.vala" + _tmp5_ = boundaries; +#line 18 "../src/threshold_line.vala" + _tmp6_ = _tmp5_.y; +#line 18 "../src/threshold_line.vala" + _tmp7_ = self->priv->_value; +#line 18 "../src/threshold_line.vala" + _tmp8_ = config->y_axis; +#line 18 "../src/threshold_line.vala" + y = _tmp6_.max - (_tmp7_ * live_chart_yaxis_get_ratio (_tmp8_)); +#line 19 "../src/threshold_line.vala" + _tmp9_ = boundaries; +#line 19 "../src/threshold_line.vala" + _tmp10_ = _tmp9_.x; +#line 19 "../src/threshold_line.vala" + cairo_move_to (ctx, (gdouble) _tmp10_.min, y); +#line 20 "../src/threshold_line.vala" + _tmp11_ = boundaries; +#line 20 "../src/threshold_line.vala" + _tmp12_ = _tmp11_.x; +#line 20 "../src/threshold_line.vala" + cairo_line_to (ctx, (gdouble) _tmp12_.max, y); +#line 21 "../src/threshold_line.vala" + cairo_stroke (ctx); +#line 138 "threshold_line.c" + } +} + +gdouble +live_chart_threshold_line_get_value (LiveChartThresholdLine* self) +{ + gdouble result; +#line 7 "../src/threshold_line.vala" + g_return_val_if_fail (self != NULL, 0.0); +#line 7 "../src/threshold_line.vala" + result = self->priv->_value; +#line 7 "../src/threshold_line.vala" + return result; +#line 152 "threshold_line.c" +} + +void +live_chart_threshold_line_set_value (LiveChartThresholdLine* self, + gdouble value) +{ + gdouble old_value; +#line 7 "../src/threshold_line.vala" + g_return_if_fail (self != NULL); +#line 7 "../src/threshold_line.vala" + old_value = live_chart_threshold_line_get_value (self); +#line 7 "../src/threshold_line.vala" + if (old_value != value) { +#line 7 "../src/threshold_line.vala" + self->priv->_value = value; +#line 7 "../src/threshold_line.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_threshold_line_properties[LIVE_CHART_THRESHOLD_LINE_VALUE_PROPERTY]); +#line 170 "threshold_line.c" + } +} + +static void +live_chart_threshold_line_class_init (LiveChartThresholdLineClass * klass, + gpointer klass_data) +{ +#line 5 "../src/threshold_line.vala" + live_chart_threshold_line_parent_class = g_type_class_peek_parent (klass); +#line 5 "../src/threshold_line.vala" + g_type_class_adjust_private_offset (klass, &LiveChartThresholdLine_private_offset); +#line 5 "../src/threshold_line.vala" + ((LiveChartSerieRendererClass *) klass)->draw = (void (*) (LiveChartSerieRenderer*, cairo_t*, LiveChartConfig*)) live_chart_threshold_line_real_draw; +#line 5 "../src/threshold_line.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_threshold_line_get_property; +#line 5 "../src/threshold_line.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_threshold_line_set_property; +#line 5 "../src/threshold_line.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_threshold_line_finalize; +#line 5 "../src/threshold_line.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_THRESHOLD_LINE_VALUE_PROPERTY, live_chart_threshold_line_properties[LIVE_CHART_THRESHOLD_LINE_VALUE_PROPERTY] = g_param_spec_double ("value", "value", "value", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 192 "threshold_line.c" +} + +static void +live_chart_threshold_line_instance_init (LiveChartThresholdLine * self, + gpointer klass) +{ +#line 5 "../src/threshold_line.vala" + self->priv = live_chart_threshold_line_get_instance_private (self); +#line 7 "../src/threshold_line.vala" + self->priv->_value = (gdouble) 0; +#line 203 "threshold_line.c" +} + +static void +live_chart_threshold_line_finalize (GObject * obj) +{ + LiveChartThresholdLine * self; +#line 5 "../src/threshold_line.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLine); +#line 5 "../src/threshold_line.vala" + G_OBJECT_CLASS (live_chart_threshold_line_parent_class)->finalize (obj); +#line 214 "threshold_line.c" +} + +static GType +live_chart_threshold_line_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartThresholdLineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_threshold_line_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartThresholdLine), 0, (GInstanceInitFunc) live_chart_threshold_line_instance_init, NULL }; + GType live_chart_threshold_line_type_id; + live_chart_threshold_line_type_id = g_type_register_static (LIVE_CHART_TYPE_SERIE_RENDERER, "LiveChartThresholdLine", &g_define_type_info, 0); + LiveChartThresholdLine_private_offset = g_type_add_instance_private (live_chart_threshold_line_type_id, sizeof (LiveChartThresholdLinePrivate)); + return live_chart_threshold_line_type_id; +} + +GType +live_chart_threshold_line_get_type (void) +{ + static volatile gsize live_chart_threshold_line_type_id__once = 0; + if (g_once_init_enter (&live_chart_threshold_line_type_id__once)) { + GType live_chart_threshold_line_type_id; + live_chart_threshold_line_type_id = live_chart_threshold_line_get_type_once (); + g_once_init_leave (&live_chart_threshold_line_type_id__once, live_chart_threshold_line_type_id); + } + return live_chart_threshold_line_type_id__once; +} + +static void +_vala_live_chart_threshold_line_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartThresholdLine * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLine); +#line 5 "../src/threshold_line.vala" + switch (property_id) { +#line 5 "../src/threshold_line.vala" + case LIVE_CHART_THRESHOLD_LINE_VALUE_PROPERTY: +#line 5 "../src/threshold_line.vala" + g_value_set_double (value, live_chart_threshold_line_get_value (self)); +#line 5 "../src/threshold_line.vala" + break; +#line 255 "threshold_line.c" + default: +#line 5 "../src/threshold_line.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 5 "../src/threshold_line.vala" + break; +#line 261 "threshold_line.c" + } +} + +static void +_vala_live_chart_threshold_line_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartThresholdLine * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLine); +#line 5 "../src/threshold_line.vala" + switch (property_id) { +#line 5 "../src/threshold_line.vala" + case LIVE_CHART_THRESHOLD_LINE_VALUE_PROPERTY: +#line 5 "../src/threshold_line.vala" + live_chart_threshold_line_set_value (self, g_value_get_double (value)); +#line 5 "../src/threshold_line.vala" + break; +#line 281 "threshold_line.c" + default: +#line 5 "../src/threshold_line.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 5 "../src/threshold_line.vala" + break; +#line 287 "threshold_line.c" + } +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/utils.c b/iPDC/lib/liblivechart_static.a.p/utils.c new file mode 100644 index 0000000..f96a5cb --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/utils.c @@ -0,0 +1,392 @@ +/* utils.c generated by valac 0.56.0, the Vala compiler + * generated from utils.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include +#include + +#define _g_free0(var) (var = (g_free (var), NULL)) +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +VALA_EXTERN gint live_chart_num_of_digits (gint value); +static gfloat* _float_dup (gfloat* self); +static gint __lambda4_ (gint a, + gint b); +static gint ___lambda4__gcompare_data_func (gconstpointer a, + gconstpointer b, + gpointer self); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +gfloat +live_chart_cap (gfloat value) +{ + gint num_digits = 0; + gdouble size = 0.0; + gdouble integer_part = 0.0; + gdouble fractional_part = 0.0; + gdouble _tmp0_ = 0.0; + gdouble _tmp1_; + gdouble delta = 0.0; + gfloat result; +#line 6 "../src/utils.vala" + num_digits = live_chart_num_of_digits ((gint) value); +#line 8 "../src/utils.vala" + size = pow ((gdouble) 10, ((gdouble) num_digits) - 1); +#line 10 "../src/utils.vala" + if (fmod (value, size) == ((gdouble) 0)) { +#line 11 "../src/utils.vala" + result = value; +#line 11 "../src/utils.vala" + return result; +#line 48 "utils.c" + } +#line 15 "../src/utils.vala" + _tmp1_ = modf (value / size, &_tmp0_); +#line 15 "../src/utils.vala" + integer_part = _tmp0_; +#line 15 "../src/utils.vala" + fractional_part = _tmp1_ * size; +#line 17 "../src/utils.vala" + delta = size - fractional_part; +#line 19 "../src/utils.vala" + result = (gfloat) (value + delta); +#line 19 "../src/utils.vala" + return result; +#line 62 "utils.c" +} + +gboolean +live_chart_has_fractional_part (gfloat value) +{ + gboolean result; +#line 23 "../src/utils.vala" + result = value != ((gfloat) ((gint) value)); +#line 23 "../src/utils.vala" + return result; +#line 73 "utils.c" +} + +gchar* +live_chart_format_for_y_axis (const gchar* unit, + gfloat value) +{ + gchar* pattern = NULL; + gchar* _tmp0_; + const gchar* _tmp2_; + gchar* _tmp3_; + gchar* result; +#line 26 "../src/utils.vala" + g_return_val_if_fail (unit != NULL, NULL); +#line 27 "../src/utils.vala" + _tmp0_ = g_strdup ("%0.0f%s"); +#line 27 "../src/utils.vala" + pattern = _tmp0_; +#line 28 "../src/utils.vala" + if (live_chart_has_fractional_part (value)) { +#line 93 "utils.c" + gchar* _tmp1_; +#line 29 "../src/utils.vala" + _tmp1_ = g_strdup ("%0.2f%s"); +#line 29 "../src/utils.vala" + _g_free0 (pattern); +#line 29 "../src/utils.vala" + pattern = _tmp1_; +#line 101 "utils.c" + } +#line 31 "../src/utils.vala" + _tmp2_ = pattern; +#line 31 "../src/utils.vala" + _tmp3_ = g_strdup_printf (_tmp2_, value, unit); +#line 31 "../src/utils.vala" + result = _tmp3_; +#line 31 "../src/utils.vala" + _g_free0 (pattern); +#line 31 "../src/utils.vala" + return result; +#line 113 "utils.c" +} + +static gfloat* +_float_dup (gfloat* self) +{ + gfloat* dup; +#line 37 "../src/utils.vala" + dup = g_new0 (gfloat, 1); +#line 37 "../src/utils.vala" + memcpy (dup, self, sizeof (gfloat)); +#line 37 "../src/utils.vala" + return dup; +#line 126 "utils.c" +} + +static gint +__lambda4_ (gint a, + gint b) +{ + gint result; +#line 57 "../src/utils.vala" + result = a - b; +#line 57 "../src/utils.vala" + return result; +#line 138 "utils.c" +} + +static gint +___lambda4__gcompare_data_func (gconstpointer a, + gconstpointer b, + gpointer self) +{ + gint result; + result = __lambda4_ ((gint) ((gintptr) a), (gint) ((gintptr) b)); +#line 56 "../src/utils.vala" + return result; +#line 150 "utils.c" +} + +GeeList* +live_chart_golden_divisors (gfloat value) +{ + gfloat _tmp1_ = 0.0F; + gfloat factor = 0.0F; + gfloat working_value = 0.0F; + gfloat sqrt = 0.0F; + GeeArrayList* divs = NULL; + GeeArrayList* _tmp2_; + GeeArrayList* _tmp7_; + GeeArrayList* ndivs = NULL; + GeeArrayList* _tmp8_; + gint last_div = 0; + GeeArrayList* _tmp9_; + gpointer _tmp10_; + GeeList* result; +#line 36 "../src/utils.vala" + if (value == ((gfloat) 0)) { +#line 171 "utils.c" + GeeArrayList* _tmp0_; +#line 37 "../src/utils.vala" + _tmp0_ = gee_array_list_new (G_TYPE_FLOAT, (GBoxedCopyFunc) _float_dup, (GDestroyNotify) g_free, NULL, NULL, NULL); +#line 37 "../src/utils.vala" + result = (GeeList*) _tmp0_; +#line 37 "../src/utils.vala" + return result; +#line 179 "utils.c" + } +#line 41 "../src/utils.vala" + if (value < ((gfloat) 10)) { +#line 41 "../src/utils.vala" + _tmp1_ = live_chart_cap (100 / value); +#line 185 "utils.c" + } else { +#line 41 "../src/utils.vala" + _tmp1_ = 1.f; +#line 189 "utils.c" + } +#line 41 "../src/utils.vala" + factor = _tmp1_; +#line 42 "../src/utils.vala" + working_value = value * factor; +#line 44 "../src/utils.vala" + sqrt = sqrtf (working_value); +#line 45 "../src/utils.vala" + _tmp2_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL); +#line 45 "../src/utils.vala" + divs = _tmp2_; +#line 201 "utils.c" + { + gint i = 0; +#line 47 "../src/utils.vala" + i = 1; +#line 206 "utils.c" + { + gboolean _tmp3_ = FALSE; +#line 47 "../src/utils.vala" + _tmp3_ = TRUE; +#line 47 "../src/utils.vala" + while (TRUE) { +#line 47 "../src/utils.vala" + if (!_tmp3_) { +#line 215 "utils.c" + gint _tmp4_; +#line 47 "../src/utils.vala" + _tmp4_ = i; +#line 47 "../src/utils.vala" + i = _tmp4_ + 1; +#line 221 "utils.c" + } +#line 47 "../src/utils.vala" + _tmp3_ = FALSE; +#line 47 "../src/utils.vala" + if (!(((gfloat) i) <= sqrt)) { +#line 47 "../src/utils.vala" + break; +#line 229 "utils.c" + } +#line 48 "../src/utils.vala" + if (fmodf (working_value, i) == ((gfloat) 0)) { +#line 233 "utils.c" + GeeArrayList* _tmp5_; + gfloat tmp = 0.0F; +#line 49 "../src/utils.vala" + _tmp5_ = divs; +#line 49 "../src/utils.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp5_, (gpointer) ((gintptr) i)); +#line 50 "../src/utils.vala" + tmp = working_value / i; +#line 51 "../src/utils.vala" + if (tmp != ((gfloat) i)) { +#line 244 "utils.c" + GeeArrayList* _tmp6_; +#line 52 "../src/utils.vala" + _tmp6_ = divs; +#line 52 "../src/utils.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp6_, (gpointer) ((gintptr) tmp)); +#line 250 "utils.c" + } + } + } + } + } +#line 56 "../src/utils.vala" + _tmp7_ = divs; +#line 56 "../src/utils.vala" + gee_list_sort ((GeeList*) _tmp7_, ___lambda4__gcompare_data_func, NULL, NULL); +#line 60 "../src/utils.vala" + _tmp8_ = gee_array_list_new (G_TYPE_FLOAT, (GBoxedCopyFunc) _float_dup, (GDestroyNotify) g_free, NULL, NULL, NULL); +#line 60 "../src/utils.vala" + ndivs = _tmp8_; +#line 61 "../src/utils.vala" + _tmp9_ = divs; +#line 61 "../src/utils.vala" + _tmp10_ = gee_list_last ((GeeList*) _tmp9_); +#line 61 "../src/utils.vala" + last_div = (gint) ((gintptr) _tmp10_); +#line 270 "utils.c" + { + gint i = 0; + GeeArrayList* _tmp11_; + gint _tmp12_; + gint _tmp13_; +#line 62 "../src/utils.vala" + _tmp11_ = divs; +#line 62 "../src/utils.vala" + _tmp12_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp11_); +#line 62 "../src/utils.vala" + _tmp13_ = _tmp12_; +#line 62 "../src/utils.vala" + i = _tmp13_ - 1; +#line 284 "utils.c" + { + gboolean _tmp14_ = FALSE; +#line 62 "../src/utils.vala" + _tmp14_ = TRUE; +#line 62 "../src/utils.vala" + while (TRUE) { +#line 291 "utils.c" + gint current = 0; + GeeArrayList* _tmp16_; + gpointer _tmp17_; + GeeArrayList* _tmp18_; + gfloat _tmp19_; +#line 62 "../src/utils.vala" + if (!_tmp14_) { +#line 299 "utils.c" + gint _tmp15_; +#line 62 "../src/utils.vala" + _tmp15_ = i; +#line 62 "../src/utils.vala" + i = _tmp15_ - 1; +#line 305 "utils.c" + } +#line 62 "../src/utils.vala" + _tmp14_ = FALSE; +#line 62 "../src/utils.vala" + if (!(i >= 0)) { +#line 62 "../src/utils.vala" + break; +#line 313 "utils.c" + } +#line 63 "../src/utils.vala" + _tmp16_ = divs; +#line 63 "../src/utils.vala" + _tmp17_ = gee_abstract_list_get ((GeeAbstractList*) _tmp16_, i); +#line 63 "../src/utils.vala" + current = (gint) ((gintptr) _tmp17_); +#line 64 "../src/utils.vala" + if ((last_div / current) != 2) { +#line 65 "../src/utils.vala" + continue; +#line 325 "utils.c" + } +#line 67 "../src/utils.vala" + _tmp18_ = ndivs; +#line 67 "../src/utils.vala" + _tmp19_ = (gfloat) current; +#line 67 "../src/utils.vala" + gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, &_tmp19_); +#line 68 "../src/utils.vala" + last_div = current; +#line 335 "utils.c" + } + } + } +#line 71 "../src/utils.vala" + result = (GeeList*) ndivs; +#line 71 "../src/utils.vala" + _g_object_unref0 (divs); +#line 71 "../src/utils.vala" + return result; +#line 345 "utils.c" +} + +gint +live_chart_num_of_digits (gint value) +{ + gint num_digits = 0; + gint result; +#line 75 "../src/utils.vala" + num_digits = 0; +#line 76 "../src/utils.vala" + while (TRUE) { +#line 357 "utils.c" + gint _tmp0_; +#line 76 "../src/utils.vala" + if (!(value != 0)) { +#line 76 "../src/utils.vala" + break; +#line 363 "utils.c" + } +#line 77 "../src/utils.vala" + value = value / 10; +#line 78 "../src/utils.vala" + num_digits = num_digits + 1; +#line 78 "../src/utils.vala" + _tmp0_ = num_digits; +#line 371 "utils.c" + } +#line 81 "../src/utils.vala" + result = num_digits; +#line 81 "../src/utils.vala" + return result; +#line 377 "utils.c" +} + +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; +} + diff --git a/iPDC/lib/liblivechart_static.a.p/values.c b/iPDC/lib/liblivechart_static.a.p/values.c new file mode 100644 index 0000000..cd0883b --- /dev/null +++ b/iPDC/lib/liblivechart_static.a.p/values.c @@ -0,0 +1,341 @@ +/* values.c generated by valac 0.56.0, the Vala compiler + * generated from values.vala, do not modify */ + +#include "livechart_static.h" +#include +#include +#include +#include +#include +#include + +enum { + LIVE_CHART_VALUES_0_PROPERTY, + LIVE_CHART_VALUES_BOUNDS_PROPERTY, + LIVE_CHART_VALUES_NUM_PROPERTIES +}; +static GParamSpec* live_chart_values_properties[LIVE_CHART_VALUES_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _live_chart_timestamped_value_free0(var) ((var == NULL) ? NULL : (var = (live_chart_timestamped_value_free (var), NULL))) + +struct _LiveChartValuesPrivate { + LiveChartBounds* _bounds; + gint buffer_size; +}; + +static gint LiveChartValues_private_offset; +static gpointer live_chart_values_parent_class = NULL; + +static void live_chart_values_finalize (GObject * obj); +static GType live_chart_values_get_type_once (void); +static void _vala_live_chart_values_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_live_chart_values_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +static inline gpointer _vala_memdup2 (gconstpointer mem, + gsize byte_size); + +LiveChartTimestampedValue* +live_chart_timestamped_value_dup (const LiveChartTimestampedValue* self) +{ + LiveChartTimestampedValue* dup; +#line 5 "../src/values.vala" + dup = g_new0 (LiveChartTimestampedValue, 1); +#line 5 "../src/values.vala" + memcpy (dup, self, sizeof (LiveChartTimestampedValue)); +#line 5 "../src/values.vala" + return dup; +#line 53 "values.c" +} + +void +live_chart_timestamped_value_free (LiveChartTimestampedValue* self) +{ +#line 5 "../src/values.vala" + g_free (self); +#line 61 "values.c" +} + +static GType +live_chart_timestamped_value_get_type_once (void) +{ + GType live_chart_timestamped_value_type_id; + live_chart_timestamped_value_type_id = g_boxed_type_register_static ("LiveChartTimestampedValue", (GBoxedCopyFunc) live_chart_timestamped_value_dup, (GBoxedFreeFunc) live_chart_timestamped_value_free); + return live_chart_timestamped_value_type_id; +} + +GType +live_chart_timestamped_value_get_type (void) +{ + static volatile gsize live_chart_timestamped_value_type_id__once = 0; + if (g_once_init_enter (&live_chart_timestamped_value_type_id__once)) { + GType live_chart_timestamped_value_type_id; + live_chart_timestamped_value_type_id = live_chart_timestamped_value_get_type_once (); + g_once_init_leave (&live_chart_timestamped_value_type_id__once, live_chart_timestamped_value_type_id); + } + return live_chart_timestamped_value_type_id__once; +} + +static inline gpointer +live_chart_values_get_instance_private (LiveChartValues* self) +{ + return G_STRUCT_MEMBER_P (self, LiveChartValues_private_offset); +} + +LiveChartValues* +live_chart_values_construct (GType object_type, + gint buffer_size) +{ + LiveChartValues * self = NULL; + LiveChartBounds* _tmp0_; + LiveChartBounds* _tmp1_; +#line 17 "../src/values.vala" + self = (LiveChartValues*) gee_linked_list_construct (object_type, LIVE_CHART_TYPE_TIMESTAMPED_VALUE, (GBoxedCopyFunc) live_chart_timestamped_value_dup, (GDestroyNotify) live_chart_timestamped_value_free, NULL, NULL, NULL); +#line 18 "../src/values.vala" + _tmp0_ = live_chart_bounds_new (((double) NAN), ((double) NAN)); +#line 18 "../src/values.vala" + _tmp1_ = _tmp0_; +#line 18 "../src/values.vala" + live_chart_values_set_bounds (self, _tmp1_); +#line 18 "../src/values.vala" + _g_object_unref0 (_tmp1_); +#line 19 "../src/values.vala" + self->priv->buffer_size = buffer_size; +#line 17 "../src/values.vala" + return self; +#line 111 "values.c" +} + +LiveChartValues* +live_chart_values_new (gint buffer_size) +{ +#line 17 "../src/values.vala" + return live_chart_values_construct (LIVE_CHART_TYPE_VALUES, buffer_size); +#line 119 "values.c" +} + +void +live_chart_values_add (LiveChartValues* self, + LiveChartTimestampedValue* value) +{ + gint _tmp0_; + gint _tmp1_; + LiveChartBounds* _tmp4_; + LiveChartTimestampedValue _tmp5_; + LiveChartTimestampedValue _tmp6_; +#line 22 "../src/values.vala" + g_return_if_fail (self != NULL); +#line 22 "../src/values.vala" + g_return_if_fail (value != NULL); +#line 23 "../src/values.vala" + _tmp0_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) self); +#line 23 "../src/values.vala" + _tmp1_ = _tmp0_; +#line 23 "../src/values.vala" + if (_tmp1_ == self->priv->buffer_size) { +#line 141 "values.c" + gpointer _tmp2_; + LiveChartTimestampedValue* _tmp3_; +#line 24 "../src/values.vala" + _tmp2_ = gee_abstract_list_remove_at ((GeeAbstractList*) self, 0); +#line 24 "../src/values.vala" + _tmp3_ = (LiveChartTimestampedValue*) _tmp2_; +#line 24 "../src/values.vala" + _live_chart_timestamped_value_free0 (_tmp3_); +#line 150 "values.c" + } +#line 26 "../src/values.vala" + _tmp4_ = self->priv->_bounds; +#line 26 "../src/values.vala" + _tmp5_ = *value; +#line 26 "../src/values.vala" + live_chart_bounds_update (_tmp4_, _tmp5_.value); +#line 27 "../src/values.vala" + _tmp6_ = *value; +#line 27 "../src/values.vala" + GEE_ABSTRACT_COLLECTION_CLASS (live_chart_values_parent_class)->add ((GeeAbstractCollection*) G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_LINKED_LIST, GeeLinkedList), &_tmp6_); +#line 162 "values.c" +} + +LiveChartBounds* +live_chart_values_get_bounds (LiveChartValues* self) +{ + LiveChartBounds* result; + LiveChartBounds* _tmp0_; +#line 12 "../src/values.vala" + g_return_val_if_fail (self != NULL, NULL); +#line 12 "../src/values.vala" + _tmp0_ = self->priv->_bounds; +#line 12 "../src/values.vala" + result = _tmp0_; +#line 12 "../src/values.vala" + return result; +#line 178 "values.c" +} + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 12 "../src/values.vala" + return self ? g_object_ref (self) : NULL; +#line 186 "values.c" +} + +void +live_chart_values_set_bounds (LiveChartValues* self, + LiveChartBounds* value) +{ + LiveChartBounds* old_value; +#line 12 "../src/values.vala" + g_return_if_fail (self != NULL); +#line 12 "../src/values.vala" + old_value = live_chart_values_get_bounds (self); +#line 12 "../src/values.vala" + if (old_value != value) { +#line 200 "values.c" + LiveChartBounds* _tmp0_; +#line 12 "../src/values.vala" + _tmp0_ = _g_object_ref0 (value); +#line 12 "../src/values.vala" + _g_object_unref0 (self->priv->_bounds); +#line 12 "../src/values.vala" + self->priv->_bounds = _tmp0_; +#line 12 "../src/values.vala" + g_object_notify_by_pspec ((GObject *) self, live_chart_values_properties[LIVE_CHART_VALUES_BOUNDS_PROPERTY]); +#line 210 "values.c" + } +} + +static void +live_chart_values_class_init (LiveChartValuesClass * klass, + gpointer klass_data) +{ +#line 9 "../src/values.vala" + live_chart_values_parent_class = g_type_class_peek_parent (klass); +#line 9 "../src/values.vala" + g_type_class_adjust_private_offset (klass, &LiveChartValues_private_offset); +#line 9 "../src/values.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_live_chart_values_get_property; +#line 9 "../src/values.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_live_chart_values_set_property; +#line 9 "../src/values.vala" + G_OBJECT_CLASS (klass)->finalize = live_chart_values_finalize; +#line 9 "../src/values.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), LIVE_CHART_VALUES_BOUNDS_PROPERTY, live_chart_values_properties[LIVE_CHART_VALUES_BOUNDS_PROPERTY] = g_param_spec_object ("bounds", "bounds", "bounds", LIVE_CHART_TYPE_BOUNDS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT)); +#line 230 "values.c" +} + +static void +live_chart_values_instance_init (LiveChartValues * self, + gpointer klass) +{ +#line 9 "../src/values.vala" + self->priv = live_chart_values_get_instance_private (self); +#line 239 "values.c" +} + +static void +live_chart_values_finalize (GObject * obj) +{ + LiveChartValues * self; +#line 9 "../src/values.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_VALUES, LiveChartValues); +#line 11 "../src/values.vala" + _g_object_unref0 (self->priv->_bounds); +#line 9 "../src/values.vala" + G_OBJECT_CLASS (live_chart_values_parent_class)->finalize (obj); +#line 252 "values.c" +} + +static GType +live_chart_values_get_type_once (void) +{ + static const GTypeInfo g_define_type_info = { sizeof (LiveChartValuesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_values_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartValues), 0, (GInstanceInitFunc) live_chart_values_instance_init, NULL }; + GType live_chart_values_type_id; + live_chart_values_type_id = g_type_register_static (GEE_TYPE_LINKED_LIST, "LiveChartValues", &g_define_type_info, 0); + LiveChartValues_private_offset = g_type_add_instance_private (live_chart_values_type_id, sizeof (LiveChartValuesPrivate)); + return live_chart_values_type_id; +} + +GType +live_chart_values_get_type (void) +{ + static volatile gsize live_chart_values_type_id__once = 0; + if (g_once_init_enter (&live_chart_values_type_id__once)) { + GType live_chart_values_type_id; + live_chart_values_type_id = live_chart_values_get_type_once (); + g_once_init_leave (&live_chart_values_type_id__once, live_chart_values_type_id); + } + return live_chart_values_type_id__once; +} + +static void +_vala_live_chart_values_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + LiveChartValues * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_VALUES, LiveChartValues); +#line 9 "../src/values.vala" + switch (property_id) { +#line 9 "../src/values.vala" + case LIVE_CHART_VALUES_BOUNDS_PROPERTY: +#line 9 "../src/values.vala" + g_value_set_object (value, live_chart_values_get_bounds (self)); +#line 9 "../src/values.vala" + break; +#line 293 "values.c" + default: +#line 9 "../src/values.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 9 "../src/values.vala" + break; +#line 299 "values.c" + } +} + +static void +_vala_live_chart_values_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + LiveChartValues * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, LIVE_CHART_TYPE_VALUES, LiveChartValues); +#line 9 "../src/values.vala" + switch (property_id) { +#line 9 "../src/values.vala" + case LIVE_CHART_VALUES_BOUNDS_PROPERTY: +#line 9 "../src/values.vala" + live_chart_values_set_bounds (self, g_value_get_object (value)); +#line 9 "../src/values.vala" + break; +#line 319 "values.c" + default: +#line 9 "../src/values.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 9 "../src/values.vala" + break; +#line 325 "values.c" + } +} + +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; +} + diff --git a/iPDC/lib/livechart.h b/iPDC/lib/livechart.h new file mode 100644 index 0000000..760f3b7 --- /dev/null +++ b/iPDC/lib/livechart.h @@ -0,0 +1,1846 @@ +/* livechart.h generated by valac 0.56.0, the Vala compiler, do not modify */ + +#ifndef __SRC_LIVECHART_H__ +#define __SRC_LIVECHART_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +G_BEGIN_DECLS + +#if !defined(VALA_EXTERN) +#if defined(_MSC_VER) +#define VALA_EXTERN __declspec(dllexport) extern +#elif __GNUC__ >= 4 +#define VALA_EXTERN __attribute__((visibility("default"))) extern +#else +#define VALA_EXTERN extern +#endif +#endif +#define LIVE_CHART_GRID_ABSCISSA_TIME_PADDING 5 +#define LIVE_CHART_STATIC_STATIC_GRID_ABSCISSA_TIME_PADDING 5 + +#define LIVE_CHART_TYPE_DRAWABLE (live_chart_drawable_get_type ()) +#define LIVE_CHART_DRAWABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_DRAWABLE, LiveChartDrawable)) +#define LIVE_CHART_IS_DRAWABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_DRAWABLE)) +#define LIVE_CHART_DRAWABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LIVE_CHART_TYPE_DRAWABLE, LiveChartDrawableIface)) + +typedef struct _LiveChartDrawable LiveChartDrawable; +typedef struct _LiveChartDrawableIface LiveChartDrawableIface; + +#define LIVE_CHART_TYPE_CONFIG (live_chart_config_get_type ()) +#define LIVE_CHART_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_CONFIG, LiveChartConfig)) +#define LIVE_CHART_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_CONFIG, LiveChartConfigClass)) +#define LIVE_CHART_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_CONFIG)) +#define LIVE_CHART_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_CONFIG)) +#define LIVE_CHART_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_CONFIG, LiveChartConfigClass)) + +typedef struct _LiveChartConfig LiveChartConfig; +typedef struct _LiveChartConfigClass LiveChartConfigClass; + +#define LIVE_CHART_TYPE_BOUNDING_BOX (live_chart_bounding_box_get_type ()) +typedef struct _LiveChartBoundingBox LiveChartBoundingBox; + +#define LIVE_CHART_TYPE_AREA (live_chart_area_get_type ()) +#define LIVE_CHART_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_AREA, LiveChartArea)) +#define LIVE_CHART_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_AREA, LiveChartAreaClass)) +#define LIVE_CHART_IS_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_AREA)) +#define LIVE_CHART_IS_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_AREA)) +#define LIVE_CHART_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_AREA, LiveChartAreaClass)) + +typedef struct _LiveChartArea LiveChartArea; +typedef struct _LiveChartAreaClass LiveChartAreaClass; +typedef struct _LiveChartAreaPrivate LiveChartAreaPrivate; + +#define LIVE_CHART_TYPE_POINTS (live_chart_points_get_type ()) +#define LIVE_CHART_POINTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_POINTS, LiveChartPoints)) +#define LIVE_CHART_POINTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_POINTS, LiveChartPointsClass)) +#define LIVE_CHART_IS_POINTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_POINTS)) +#define LIVE_CHART_IS_POINTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_POINTS)) +#define LIVE_CHART_POINTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_POINTS, LiveChartPointsClass)) + +typedef struct _LiveChartPoints LiveChartPoints; +typedef struct _LiveChartPointsClass LiveChartPointsClass; + +#define LIVE_CHART_TYPE_XAXIS (live_chart_xaxis_get_type ()) +#define LIVE_CHART_XAXIS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_XAXIS, LiveChartXAxis)) +#define LIVE_CHART_XAXIS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_XAXIS, LiveChartXAxisClass)) +#define LIVE_CHART_IS_XAXIS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_XAXIS)) +#define LIVE_CHART_IS_XAXIS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_XAXIS)) +#define LIVE_CHART_XAXIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_XAXIS, LiveChartXAxisClass)) + +typedef struct _LiveChartXAxis LiveChartXAxis; +typedef struct _LiveChartXAxisClass LiveChartXAxisClass; +typedef struct _LiveChartXAxisPrivate LiveChartXAxisPrivate; + +#define LIVE_CHART_TYPE_LABELS (live_chart_labels_get_type ()) +#define LIVE_CHART_LABELS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_LABELS, LiveChartLabels)) +#define LIVE_CHART_LABELS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_LABELS, LiveChartLabelsClass)) +#define LIVE_CHART_IS_LABELS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_LABELS)) +#define LIVE_CHART_IS_LABELS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_LABELS)) +#define LIVE_CHART_LABELS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_LABELS, LiveChartLabelsClass)) + +typedef struct _LiveChartLabels LiveChartLabels; +typedef struct _LiveChartLabelsClass LiveChartLabelsClass; + +#define LIVE_CHART_TYPE_PATH (live_chart_path_get_type ()) +#define LIVE_CHART_PATH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_PATH, LiveChartPath)) +#define LIVE_CHART_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_PATH, LiveChartPathClass)) +#define LIVE_CHART_IS_PATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_PATH)) +#define LIVE_CHART_IS_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_PATH)) +#define LIVE_CHART_PATH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_PATH, LiveChartPathClass)) + +typedef struct _LiveChartPath LiveChartPath; +typedef struct _LiveChartPathClass LiveChartPathClass; + +#define LIVE_CHART_TYPE_TICKS (live_chart_ticks_get_type ()) +typedef struct _LiveChartTicks LiveChartTicks; + +#define LIVE_CHART_TYPE_YAXIS (live_chart_yaxis_get_type ()) +#define LIVE_CHART_YAXIS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_YAXIS, LiveChartYAxis)) +#define LIVE_CHART_YAXIS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_YAXIS, LiveChartYAxisClass)) +#define LIVE_CHART_IS_YAXIS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_YAXIS)) +#define LIVE_CHART_IS_YAXIS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_YAXIS)) +#define LIVE_CHART_YAXIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_YAXIS, LiveChartYAxisClass)) + +typedef struct _LiveChartYAxis LiveChartYAxis; +typedef struct _LiveChartYAxisClass LiveChartYAxisClass; +typedef struct _LiveChartYAxisPrivate LiveChartYAxisPrivate; + +#define LIVE_CHART_TYPE_BOUNDS (live_chart_bounds_get_type ()) +#define LIVE_CHART_BOUNDS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_BOUNDS, LiveChartBounds)) +#define LIVE_CHART_BOUNDS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_BOUNDS, LiveChartBoundsClass)) +#define LIVE_CHART_IS_BOUNDS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_BOUNDS)) +#define LIVE_CHART_IS_BOUNDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_BOUNDS)) +#define LIVE_CHART_BOUNDS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_BOUNDS, LiveChartBoundsClass)) + +typedef struct _LiveChartBounds LiveChartBounds; +typedef struct _LiveChartBoundsClass LiveChartBoundsClass; + +#define LIVE_CHART_TYPE_BACKGROUND (live_chart_background_get_type ()) +#define LIVE_CHART_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_BACKGROUND, LiveChartBackground)) +#define LIVE_CHART_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_BACKGROUND, LiveChartBackgroundClass)) +#define LIVE_CHART_IS_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_BACKGROUND)) +#define LIVE_CHART_IS_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_BACKGROUND)) +#define LIVE_CHART_BACKGROUND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_BACKGROUND, LiveChartBackgroundClass)) + +typedef struct _LiveChartBackground LiveChartBackground; +typedef struct _LiveChartBackgroundClass LiveChartBackgroundClass; +typedef struct _LiveChartBackgroundPrivate LiveChartBackgroundPrivate; + +#define LIVE_CHART_TYPE_SERIE_RENDERER (live_chart_serie_renderer_get_type ()) +#define LIVE_CHART_SERIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRenderer)) +#define LIVE_CHART_SERIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRendererClass)) +#define LIVE_CHART_IS_SERIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SERIE_RENDERER)) +#define LIVE_CHART_IS_SERIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SERIE_RENDERER)) +#define LIVE_CHART_SERIE_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRendererClass)) + +typedef struct _LiveChartSerieRenderer LiveChartSerieRenderer; +typedef struct _LiveChartSerieRendererClass LiveChartSerieRendererClass; +typedef struct _LiveChartSerieRendererPrivate LiveChartSerieRendererPrivate; + +#define LIVE_CHART_TYPE_VALUES (live_chart_values_get_type ()) +#define LIVE_CHART_VALUES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_VALUES, LiveChartValues)) +#define LIVE_CHART_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_VALUES, LiveChartValuesClass)) +#define LIVE_CHART_IS_VALUES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_VALUES)) +#define LIVE_CHART_IS_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_VALUES)) +#define LIVE_CHART_VALUES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_VALUES, LiveChartValuesClass)) + +typedef struct _LiveChartValues LiveChartValues; +typedef struct _LiveChartValuesClass LiveChartValuesClass; + +#define LIVE_CHART_TYPE_BAR (live_chart_bar_get_type ()) +#define LIVE_CHART_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_BAR, LiveChartBar)) +#define LIVE_CHART_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_BAR, LiveChartBarClass)) +#define LIVE_CHART_IS_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_BAR)) +#define LIVE_CHART_IS_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_BAR)) +#define LIVE_CHART_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_BAR, LiveChartBarClass)) + +typedef struct _LiveChartBar LiveChartBar; +typedef struct _LiveChartBarClass LiveChartBarClass; +typedef struct _LiveChartBarPrivate LiveChartBarPrivate; + +#define LIVE_CHART_TYPE_SEGMENT (live_chart_segment_get_type ()) +typedef struct _LiveChartSegment LiveChartSegment; + +#define LIVE_CHART_TYPE_COORD (live_chart_coord_get_type ()) +typedef struct _LiveChartCoord LiveChartCoord; + +#define LIVE_CHART_TYPE_BEZIER_CURVE (live_chart_bezier_curve_get_type ()) +typedef struct _LiveChartBezierCurve LiveChartBezierCurve; +typedef struct _LiveChartBoundsPrivate LiveChartBoundsPrivate; + +#define LIVE_CHART_TYPE_CHART_ERROR (live_chart_chart_error_get_type ()) + +#define LIVE_CHART_TYPE_CHART (live_chart_chart_get_type ()) +#define LIVE_CHART_CHART(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_CHART, LiveChartChart)) +#define LIVE_CHART_CHART_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_CHART, LiveChartChartClass)) +#define LIVE_CHART_IS_CHART(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_CHART)) +#define LIVE_CHART_IS_CHART_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_CHART)) +#define LIVE_CHART_CHART_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_CHART, LiveChartChartClass)) + +typedef struct _LiveChartChart LiveChartChart; +typedef struct _LiveChartChartClass LiveChartChartClass; +typedef struct _LiveChartChartPrivate LiveChartChartPrivate; + +#define LIVE_CHART_TYPE_SERIES (live_chart_series_get_type ()) +#define LIVE_CHART_SERIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SERIES, LiveChartSeries)) +#define LIVE_CHART_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SERIES, LiveChartSeriesClass)) +#define LIVE_CHART_IS_SERIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SERIES)) +#define LIVE_CHART_IS_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SERIES)) +#define LIVE_CHART_SERIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SERIES, LiveChartSeriesClass)) + +typedef struct _LiveChartSeries LiveChartSeries; +typedef struct _LiveChartSeriesClass LiveChartSeriesClass; + +#define LIVE_CHART_TYPE_SERIE (live_chart_serie_get_type ()) +#define LIVE_CHART_SERIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SERIE, LiveChartSerie)) +#define LIVE_CHART_SERIE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SERIE, LiveChartSerieClass)) +#define LIVE_CHART_IS_SERIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SERIE)) +#define LIVE_CHART_IS_SERIE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SERIE)) +#define LIVE_CHART_SERIE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SERIE, LiveChartSerieClass)) + +typedef struct _LiveChartSerie LiveChartSerie; +typedef struct _LiveChartSerieClass LiveChartSerieClass; + +#define LIVE_CHART_TYPE_GRID (live_chart_grid_get_type ()) +#define LIVE_CHART_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_GRID, LiveChartGrid)) +#define LIVE_CHART_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_GRID, LiveChartGridClass)) +#define LIVE_CHART_IS_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_GRID)) +#define LIVE_CHART_IS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_GRID)) +#define LIVE_CHART_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_GRID, LiveChartGridClass)) + +typedef struct _LiveChartGrid LiveChartGrid; +typedef struct _LiveChartGridClass LiveChartGridClass; + +#define LIVE_CHART_TYPE_LEGEND (live_chart_legend_get_type ()) +#define LIVE_CHART_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_LEGEND, LiveChartLegend)) +#define LIVE_CHART_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_LEGEND, LiveChartLegendClass)) +#define LIVE_CHART_IS_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_LEGEND)) +#define LIVE_CHART_IS_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_LEGEND)) +#define LIVE_CHART_LEGEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_LEGEND, LiveChartLegendClass)) + +typedef struct _LiveChartLegend LiveChartLegend; +typedef struct _LiveChartLegendClass LiveChartLegendClass; +typedef enum { + LIVE_CHART_AUTO_PADDING_NONE = 1 << 0, + LIVE_CHART_AUTO_PADDING_TOP = 1 << 1, + LIVE_CHART_AUTO_PADDING_RIGHT = 1 << 2, + LIVE_CHART_AUTO_PADDING_BOTTOM = 1 << 3, + LIVE_CHART_AUTO_PADDING_LEFT = 1 << 4 +} LiveChartAutoPadding; + +#define LIVE_CHART_TYPE_AUTO_PADDING (live_chart_auto_padding_get_type ()) + +#define LIVE_CHART_TYPE_PADDING (live_chart_padding_get_type ()) +typedef struct _LiveChartPadding LiveChartPadding; + +#define LIVE_CHART_TYPE_BOUNDARY (live_chart_boundary_get_type ()) +typedef struct _LiveChartBoundary LiveChartBoundary; + +#define LIVE_CHART_TYPE_BOUNDARIES (live_chart_boundaries_get_type ()) +typedef struct _LiveChartBoundaries LiveChartBoundaries; +typedef struct _LiveChartConfigPrivate LiveChartConfigPrivate; + +#define LIVE_CHART_TYPE_COLORABLE (live_chart_colorable_get_type ()) +#define LIVE_CHART_COLORABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_COLORABLE, LiveChartColorable)) +#define LIVE_CHART_IS_COLORABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_COLORABLE)) +#define LIVE_CHART_COLORABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LIVE_CHART_TYPE_COLORABLE, LiveChartColorableIface)) + +typedef struct _LiveChartColorable LiveChartColorable; +typedef struct _LiveChartColorableIface LiveChartColorableIface; + +#define LIVE_CHART_TYPE_FONT (live_chart_font_get_type ()) +#define LIVE_CHART_FONT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_FONT, LiveChartFont)) +#define LIVE_CHART_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_FONT, LiveChartFontClass)) +#define LIVE_CHART_IS_FONT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_FONT)) +#define LIVE_CHART_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_FONT)) +#define LIVE_CHART_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_FONT, LiveChartFontClass)) + +typedef struct _LiveChartFont LiveChartFont; +typedef struct _LiveChartFontClass LiveChartFontClass; +typedef struct _LiveChartFontPrivate LiveChartFontPrivate; + +#define LIVE_CHART_TYPE_POINT (live_chart_point_get_type ()) +typedef struct _LiveChartPoint LiveChartPoint; + +#define LIVE_CHART_TYPE_TIMESTAMPED_VALUE (live_chart_timestamped_value_get_type ()) +typedef struct _LiveChartTimestampedValue LiveChartTimestampedValue; +typedef struct _LiveChartGridPrivate LiveChartGridPrivate; + +#define LIVE_CHART_TYPE_INTERSECTIONS (live_chart_intersections_get_type ()) +#define LIVE_CHART_INTERSECTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_INTERSECTIONS, LiveChartIntersections)) +#define LIVE_CHART_INTERSECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_INTERSECTIONS, LiveChartIntersectionsClass)) +#define LIVE_CHART_IS_INTERSECTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_INTERSECTIONS)) +#define LIVE_CHART_IS_INTERSECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_INTERSECTIONS)) +#define LIVE_CHART_INTERSECTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_INTERSECTIONS, LiveChartIntersectionsClass)) + +typedef struct _LiveChartIntersections LiveChartIntersections; +typedef struct _LiveChartIntersectionsClass LiveChartIntersectionsClass; +typedef struct _LiveChartIntersectionsPrivate LiveChartIntersectionsPrivate; + +#define LIVE_CHART_TYPE_REGION (live_chart_region_get_type ()) +#define LIVE_CHART_REGION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_REGION, LiveChartRegion)) +#define LIVE_CHART_REGION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_REGION, LiveChartRegionClass)) +#define LIVE_CHART_IS_REGION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_REGION)) +#define LIVE_CHART_IS_REGION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_REGION)) +#define LIVE_CHART_REGION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_REGION, LiveChartRegionClass)) + +typedef struct _LiveChartRegion LiveChartRegion; +typedef struct _LiveChartRegionClass LiveChartRegionClass; + +#define LIVE_CHART_TYPE_INTERSECTION (live_chart_intersection_get_type ()) +#define LIVE_CHART_INTERSECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersection)) +#define LIVE_CHART_INTERSECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersectionClass)) +#define LIVE_CHART_IS_INTERSECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_INTERSECTION)) +#define LIVE_CHART_IS_INTERSECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_INTERSECTION)) +#define LIVE_CHART_INTERSECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersectionClass)) + +typedef struct _LiveChartIntersection LiveChartIntersection; +typedef struct _LiveChartIntersectionClass LiveChartIntersectionClass; +typedef struct _LiveChartIntersectionPrivate LiveChartIntersectionPrivate; + +#define LIVE_CHART_TYPE_INTERSECTOR (live_chart_intersector_get_type ()) +#define LIVE_CHART_INTERSECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_INTERSECTOR, LiveChartIntersector)) +#define LIVE_CHART_IS_INTERSECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_INTERSECTOR)) +#define LIVE_CHART_INTERSECTOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LIVE_CHART_TYPE_INTERSECTOR, LiveChartIntersectorIface)) + +typedef struct _LiveChartIntersector LiveChartIntersector; +typedef struct _LiveChartIntersectorIface LiveChartIntersectorIface; + +#define LIVE_CHART_TYPE_BEZIER_INTERSECTOR (live_chart_bezier_intersector_get_type ()) +#define LIVE_CHART_BEZIER_INTERSECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_BEZIER_INTERSECTOR, LiveChartBezierIntersector)) +#define LIVE_CHART_BEZIER_INTERSECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_BEZIER_INTERSECTOR, LiveChartBezierIntersectorClass)) +#define LIVE_CHART_IS_BEZIER_INTERSECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_BEZIER_INTERSECTOR)) +#define LIVE_CHART_IS_BEZIER_INTERSECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_BEZIER_INTERSECTOR)) +#define LIVE_CHART_BEZIER_INTERSECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_BEZIER_INTERSECTOR, LiveChartBezierIntersectorClass)) + +typedef struct _LiveChartBezierIntersector LiveChartBezierIntersector; +typedef struct _LiveChartBezierIntersectorClass LiveChartBezierIntersectorClass; +typedef struct _LiveChartBezierIntersectorPrivate LiveChartBezierIntersectorPrivate; +typedef struct _LiveChartLabelsPrivate LiveChartLabelsPrivate; +typedef struct _LiveChartLegendPrivate LiveChartLegendPrivate; + +#define LIVE_CHART_TYPE_HORIZONTAL_LEGEND (live_chart_horizontal_legend_get_type ()) +#define LIVE_CHART_HORIZONTAL_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_HORIZONTAL_LEGEND, LiveChartHorizontalLegend)) +#define LIVE_CHART_HORIZONTAL_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_HORIZONTAL_LEGEND, LiveChartHorizontalLegendClass)) +#define LIVE_CHART_IS_HORIZONTAL_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_HORIZONTAL_LEGEND)) +#define LIVE_CHART_IS_HORIZONTAL_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_HORIZONTAL_LEGEND)) +#define LIVE_CHART_HORIZONTAL_LEGEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_HORIZONTAL_LEGEND, LiveChartHorizontalLegendClass)) + +typedef struct _LiveChartHorizontalLegend LiveChartHorizontalLegend; +typedef struct _LiveChartHorizontalLegendClass LiveChartHorizontalLegendClass; +typedef struct _LiveChartHorizontalLegendPrivate LiveChartHorizontalLegendPrivate; + +#define LIVE_CHART_TYPE_NOOP_LEGEND (live_chart_noop_legend_get_type ()) +#define LIVE_CHART_NOOP_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_NOOP_LEGEND, LiveChartNoopLegend)) +#define LIVE_CHART_NOOP_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_NOOP_LEGEND, LiveChartNoopLegendClass)) +#define LIVE_CHART_IS_NOOP_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_NOOP_LEGEND)) +#define LIVE_CHART_IS_NOOP_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_NOOP_LEGEND)) +#define LIVE_CHART_NOOP_LEGEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_NOOP_LEGEND, LiveChartNoopLegendClass)) + +typedef struct _LiveChartNoopLegend LiveChartNoopLegend; +typedef struct _LiveChartNoopLegendClass LiveChartNoopLegendClass; +typedef struct _LiveChartNoopLegendPrivate LiveChartNoopLegendPrivate; + +#define LIVE_CHART_TYPE_LINE (live_chart_line_get_type ()) +#define LIVE_CHART_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_LINE, LiveChartLine)) +#define LIVE_CHART_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_LINE, LiveChartLineClass)) +#define LIVE_CHART_IS_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_LINE)) +#define LIVE_CHART_IS_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_LINE)) +#define LIVE_CHART_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_LINE, LiveChartLineClass)) + +typedef struct _LiveChartLine LiveChartLine; +typedef struct _LiveChartLineClass LiveChartLineClass; +typedef struct _LiveChartLinePrivate LiveChartLinePrivate; + +#define LIVE_CHART_TYPE_LINE_AREA (live_chart_line_area_get_type ()) +#define LIVE_CHART_LINE_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_LINE_AREA, LiveChartLineArea)) +#define LIVE_CHART_LINE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_LINE_AREA, LiveChartLineAreaClass)) +#define LIVE_CHART_IS_LINE_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_LINE_AREA)) +#define LIVE_CHART_IS_LINE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_LINE_AREA)) +#define LIVE_CHART_LINE_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_LINE_AREA, LiveChartLineAreaClass)) + +typedef struct _LiveChartLineArea LiveChartLineArea; +typedef struct _LiveChartLineAreaClass LiveChartLineAreaClass; +typedef struct _LiveChartLineAreaPrivate LiveChartLineAreaPrivate; + +#define LIVE_CHART_TYPE_MAX_BOUND_LINE (live_chart_max_bound_line_get_type ()) +#define LIVE_CHART_MAX_BOUND_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_MAX_BOUND_LINE, LiveChartMaxBoundLine)) +#define LIVE_CHART_MAX_BOUND_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_MAX_BOUND_LINE, LiveChartMaxBoundLineClass)) +#define LIVE_CHART_IS_MAX_BOUND_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_MAX_BOUND_LINE)) +#define LIVE_CHART_IS_MAX_BOUND_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_MAX_BOUND_LINE)) +#define LIVE_CHART_MAX_BOUND_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_MAX_BOUND_LINE, LiveChartMaxBoundLineClass)) + +typedef struct _LiveChartMaxBoundLine LiveChartMaxBoundLine; +typedef struct _LiveChartMaxBoundLineClass LiveChartMaxBoundLineClass; +typedef struct _LiveChartMaxBoundLinePrivate LiveChartMaxBoundLinePrivate; + +#define LIVE_CHART_TYPE_MIN_BOUND_LINE (live_chart_min_bound_line_get_type ()) +#define LIVE_CHART_MIN_BOUND_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_MIN_BOUND_LINE, LiveChartMinBoundLine)) +#define LIVE_CHART_MIN_BOUND_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_MIN_BOUND_LINE, LiveChartMinBoundLineClass)) +#define LIVE_CHART_IS_MIN_BOUND_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_MIN_BOUND_LINE)) +#define LIVE_CHART_IS_MIN_BOUND_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_MIN_BOUND_LINE)) +#define LIVE_CHART_MIN_BOUND_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_MIN_BOUND_LINE, LiveChartMinBoundLineClass)) + +typedef struct _LiveChartMinBoundLine LiveChartMinBoundLine; +typedef struct _LiveChartMinBoundLineClass LiveChartMinBoundLineClass; +typedef struct _LiveChartMinBoundLinePrivate LiveChartMinBoundLinePrivate; + +#define LIVE_CHART_TYPE_DASH (live_chart_dash_get_type ()) +typedef struct _LiveChartDash LiveChartDash; +typedef struct _LiveChartPathPrivate LiveChartPathPrivate; +typedef struct _LiveChartPointsPrivate LiveChartPointsPrivate; +typedef enum { + LIVE_CHART_REGION_HANDLE_STATUS_ENTER, + LIVE_CHART_REGION_HANDLE_STATUS_EXIT, + LIVE_CHART_REGION_HANDLE_STATUS_WITHIN, + LIVE_CHART_REGION_HANDLE_STATUS_OUT +} LiveChartRegionHandleStatus; + +#define LIVE_CHART_TYPE_REGION_HANDLE_STATUS (live_chart_region_handle_status_get_type ()) + +#define LIVE_CHART_TYPE_REGION_HANDLE_RESULT (live_chart_region_handle_result_get_type ()) +typedef struct _LiveChartRegionHandleResult LiveChartRegionHandleResult; +typedef LiveChartCoord* (*LiveChartGetIntersection) (gdouble at_value, gpointer user_data); +typedef struct _LiveChartRegionPrivate LiveChartRegionPrivate; +typedef struct _LiveChartSeriePrivate LiveChartSeriePrivate; +typedef struct _LiveChartSeriesPrivate LiveChartSeriesPrivate; + +#define LIVE_CHART_TYPE_SMOOTH_LINE (live_chart_smooth_line_get_type ()) +#define LIVE_CHART_SMOOTH_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLine)) +#define LIVE_CHART_SMOOTH_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLineClass)) +#define LIVE_CHART_IS_SMOOTH_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SMOOTH_LINE)) +#define LIVE_CHART_IS_SMOOTH_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SMOOTH_LINE)) +#define LIVE_CHART_SMOOTH_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLineClass)) + +typedef struct _LiveChartSmoothLine LiveChartSmoothLine; +typedef struct _LiveChartSmoothLineClass LiveChartSmoothLineClass; +typedef struct _LiveChartSmoothLinePrivate LiveChartSmoothLinePrivate; + +#define LIVE_CHART_TYPE_SMOOTH_LINE_AREA (live_chart_smooth_line_area_get_type ()) +#define LIVE_CHART_SMOOTH_LINE_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineArea)) +#define LIVE_CHART_SMOOTH_LINE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineAreaClass)) +#define LIVE_CHART_IS_SMOOTH_LINE_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SMOOTH_LINE_AREA)) +#define LIVE_CHART_IS_SMOOTH_LINE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SMOOTH_LINE_AREA)) +#define LIVE_CHART_SMOOTH_LINE_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineAreaClass)) + +typedef struct _LiveChartSmoothLineArea LiveChartSmoothLineArea; +typedef struct _LiveChartSmoothLineAreaClass LiveChartSmoothLineAreaClass; +typedef struct _LiveChartSmoothLineAreaPrivate LiveChartSmoothLineAreaPrivate; + +#define LIVE_CHART_TYPE_THRESHOLD_LINE (live_chart_threshold_line_get_type ()) +#define LIVE_CHART_THRESHOLD_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLine)) +#define LIVE_CHART_THRESHOLD_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLineClass)) +#define LIVE_CHART_IS_THRESHOLD_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_THRESHOLD_LINE)) +#define LIVE_CHART_IS_THRESHOLD_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_THRESHOLD_LINE)) +#define LIVE_CHART_THRESHOLD_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLineClass)) + +typedef struct _LiveChartThresholdLine LiveChartThresholdLine; +typedef struct _LiveChartThresholdLineClass LiveChartThresholdLineClass; +typedef struct _LiveChartThresholdLinePrivate LiveChartThresholdLinePrivate; +typedef struct _LiveChartValuesPrivate LiveChartValuesPrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_CHART (live_chart_static_static_chart_get_type ()) +#define LIVE_CHART_STATIC_STATIC_CHART(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChart)) +#define LIVE_CHART_STATIC_STATIC_CHART_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChartClass)) +#define LIVE_CHART_STATIC_IS_STATIC_CHART(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_CHART)) +#define LIVE_CHART_STATIC_IS_STATIC_CHART_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_CHART)) +#define LIVE_CHART_STATIC_STATIC_CHART_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChartClass)) + +typedef struct _LiveChartStaticStaticChart LiveChartStaticStaticChart; +typedef struct _LiveChartStaticStaticChartClass LiveChartStaticStaticChartClass; +typedef struct _LiveChartStaticStaticChartPrivate LiveChartStaticStaticChartPrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_SERIES (live_chart_static_static_series_get_type ()) +#define LIVE_CHART_STATIC_STATIC_SERIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIES, LiveChartStaticStaticSeries)) +#define LIVE_CHART_STATIC_STATIC_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIES, LiveChartStaticStaticSeriesClass)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIES)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIES)) +#define LIVE_CHART_STATIC_STATIC_SERIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIES, LiveChartStaticStaticSeriesClass)) + +typedef struct _LiveChartStaticStaticSeries LiveChartStaticStaticSeries; +typedef struct _LiveChartStaticStaticSeriesClass LiveChartStaticStaticSeriesClass; + +#define LIVE_CHART_STATIC_TYPE_STATIC_SERIE (live_chart_static_static_serie_get_type ()) +#define LIVE_CHART_STATIC_STATIC_SERIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerie)) +#define LIVE_CHART_STATIC_STATIC_SERIE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerieClass)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIE)) +#define LIVE_CHART_STATIC_STATIC_SERIE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerieClass)) + +typedef struct _LiveChartStaticStaticSerie LiveChartStaticStaticSerie; +typedef struct _LiveChartStaticStaticSerieClass LiveChartStaticStaticSerieClass; + +#define LIVE_CHART_STATIC_TYPE_STATIC_GRID (live_chart_static_static_grid_get_type ()) +#define LIVE_CHART_STATIC_STATIC_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGrid)) +#define LIVE_CHART_STATIC_STATIC_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGridClass)) +#define LIVE_CHART_STATIC_IS_STATIC_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_GRID)) +#define LIVE_CHART_STATIC_IS_STATIC_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_GRID)) +#define LIVE_CHART_STATIC_STATIC_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGridClass)) + +typedef struct _LiveChartStaticStaticGrid LiveChartStaticStaticGrid; +typedef struct _LiveChartStaticStaticGridClass LiveChartStaticStaticGridClass; +typedef struct _LiveChartStaticStaticSeriesPrivate LiveChartStaticStaticSeriesPrivate; +typedef struct _LiveChartStaticStaticSeriePrivate LiveChartStaticStaticSeriePrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER (live_chart_static_static_serie_renderer_get_type ()) +#define LIVE_CHART_STATIC_STATIC_SERIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRenderer)) +#define LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRendererClass)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER)) +#define LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRendererClass)) + +typedef struct _LiveChartStaticStaticSerieRenderer LiveChartStaticStaticSerieRenderer; +typedef struct _LiveChartStaticStaticSerieRendererClass LiveChartStaticStaticSerieRendererClass; + +#define LIVE_CHART_STATIC_TYPE_STATIC_VALUES (live_chart_static_static_values_get_type ()) +#define LIVE_CHART_STATIC_STATIC_VALUES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValues)) +#define LIVE_CHART_STATIC_STATIC_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValuesClass)) +#define LIVE_CHART_STATIC_IS_STATIC_VALUES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_VALUES)) +#define LIVE_CHART_STATIC_IS_STATIC_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_VALUES)) +#define LIVE_CHART_STATIC_STATIC_VALUES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValuesClass)) + +typedef struct _LiveChartStaticStaticValues LiveChartStaticStaticValues; +typedef struct _LiveChartStaticStaticValuesClass LiveChartStaticStaticValuesClass; + +#define LIVE_CHART_STATIC_TYPE_NAMED_VALUE (live_chart_static_named_value_get_type ()) +typedef struct _LiveChartStaticNamedValue LiveChartStaticNamedValue; +typedef struct _LiveChartStaticStaticValuesPrivate LiveChartStaticStaticValuesPrivate; +typedef struct _LiveChartStaticStaticSerieRendererPrivate LiveChartStaticStaticSerieRendererPrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_LINE (live_chart_static_static_line_get_type ()) +#define LIVE_CHART_STATIC_STATIC_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_LINE, LiveChartStaticStaticLine)) +#define LIVE_CHART_STATIC_STATIC_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_LINE, LiveChartStaticStaticLineClass)) +#define LIVE_CHART_STATIC_IS_STATIC_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_LINE)) +#define LIVE_CHART_STATIC_IS_STATIC_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_LINE)) +#define LIVE_CHART_STATIC_STATIC_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_LINE, LiveChartStaticStaticLineClass)) + +typedef struct _LiveChartStaticStaticLine LiveChartStaticStaticLine; +typedef struct _LiveChartStaticStaticLineClass LiveChartStaticStaticLineClass; +typedef struct _LiveChartStaticStaticLinePrivate LiveChartStaticStaticLinePrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_POINTS (live_chart_static_static_points_get_type ()) +#define LIVE_CHART_STATIC_STATIC_POINTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPoints)) +#define LIVE_CHART_STATIC_STATIC_POINTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPointsClass)) +#define LIVE_CHART_STATIC_IS_STATIC_POINTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_POINTS)) +#define LIVE_CHART_STATIC_IS_STATIC_POINTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_POINTS)) +#define LIVE_CHART_STATIC_STATIC_POINTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPointsClass)) + +typedef struct _LiveChartStaticStaticPoints LiveChartStaticStaticPoints; +typedef struct _LiveChartStaticStaticPointsClass LiveChartStaticStaticPointsClass; +typedef struct _LiveChartStaticStaticGridPrivate LiveChartStaticStaticGridPrivate; +typedef struct _LiveChartStaticStaticPointsPrivate LiveChartStaticStaticPointsPrivate; + +struct _LiveChartBoundingBox { + gdouble x; + gdouble y; + gdouble width; + gdouble height; +}; + +struct _LiveChartDrawableIface { + GTypeInterface parent_iface; + void (*draw) (LiveChartDrawable* self, cairo_t* ctx, LiveChartConfig* config); + void (*get_bounding_box) (LiveChartDrawable* self, LiveChartBoundingBox* result); + gboolean (*get_visible) (LiveChartDrawable* self); + void (*set_visible) (LiveChartDrawable* self, gboolean value); +}; + +struct _LiveChartArea { + GObject parent_instance; + LiveChartAreaPrivate * priv; +}; + +struct _LiveChartAreaClass { + GObjectClass parent_class; +}; + +struct _LiveChartXAxis { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartXAxisPrivate * priv; + LiveChartLabels* labels; + LiveChartPath* axis; + LiveChartPath* lines; +}; + +struct _LiveChartXAxisClass { + GTypeClass parent_class; + void (*finalize) (LiveChartXAxis *self); +}; + +struct _LiveChartTicks { + GeeList* values; +}; + +struct _LiveChartYAxis { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartYAxisPrivate * priv; + LiveChartLabels* labels; + LiveChartPath* axis; + LiveChartPath* lines; + gboolean smart_ratio G_GNUC_DEPRECATED ; + gdouble* fixed_max; + LiveChartTicks ticks; +}; + +struct _LiveChartYAxisClass { + GTypeClass parent_class; + void (*finalize) (LiveChartYAxis *self); +}; + +struct _LiveChartBackground { + GObject parent_instance; + LiveChartBackgroundPrivate * priv; +}; + +struct _LiveChartBackgroundClass { + GObjectClass parent_class; +}; + +struct _LiveChartSerieRenderer { + GObject parent_instance; + LiveChartSerieRendererPrivate * priv; + LiveChartBoundingBox bounding_box; + LiveChartValues* values; +}; + +struct _LiveChartSerieRendererClass { + GObjectClass parent_class; + void (*draw) (LiveChartSerieRenderer* self, cairo_t* ctx, LiveChartConfig* config); +}; + +struct _LiveChartBar { + LiveChartSerieRenderer parent_instance; + LiveChartBarPrivate * priv; +}; + +struct _LiveChartBarClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartCoord { + gdouble x; + gdouble y; +}; + +struct _LiveChartSegment { + LiveChartCoord from; + LiveChartCoord to; +}; + +struct _LiveChartBezierCurve { + LiveChartCoord c0; + LiveChartCoord c1; + LiveChartCoord c2; + LiveChartCoord c3; +}; + +struct _LiveChartBounds { + GObject parent_instance; + LiveChartBoundsPrivate * priv; +}; + +struct _LiveChartBoundsClass { + GObjectClass parent_class; +}; + +typedef enum { + LIVE_CHART_CHART_ERROR_EXPORT_ERROR, + LIVE_CHART_CHART_ERROR_SERIE_NOT_FOUND +} LiveChartChartError; +#define LIVE_CHART_CHART_ERROR live_chart_chart_error_quark () + +struct _LiveChartChart { + GtkDrawingArea parent_instance; + LiveChartChartPrivate * priv; + LiveChartConfig* config; + LiveChartSeries* series; +}; + +struct _LiveChartChartClass { + GtkDrawingAreaClass parent_class; +}; + +struct _LiveChartPadding { + LiveChartAutoPadding smart; + gint top; + gint right; + gint bottom; + gint left; +}; + +struct _LiveChartBoundary { + gint min; + gint max; +}; + +struct _LiveChartBoundaries { + LiveChartBoundary x; + LiveChartBoundary y; + gint width; + gint height; +}; + +struct _LiveChartConfig { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartConfigPrivate * priv; + LiveChartPadding padding; + LiveChartYAxis* y_axis; + LiveChartXAxis* x_axis; + GeeArrayList* categories; +}; + +struct _LiveChartConfigClass { + GTypeClass parent_class; + void (*finalize) (LiveChartConfig *self); +}; + +struct _LiveChartColorableIface { + GTypeInterface parent_iface; + void (*get_main_color) (LiveChartColorable* self, GdkRGBA * result); + void (*set_main_color) (LiveChartColorable* self, GdkRGBA * value); +}; + +struct _LiveChartFont { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartFontPrivate * priv; +}; + +struct _LiveChartFontClass { + GTypeClass parent_class; + void (*finalize) (LiveChartFont *self); +}; + +struct _LiveChartTimestampedValue { + gdouble timestamp; + gdouble value; +}; + +struct _LiveChartPoint { + gdouble x; + gdouble y; + gdouble height; + LiveChartTimestampedValue data; +}; + +struct _LiveChartGrid { + GObject parent_instance; + LiveChartGridPrivate * priv; + LiveChartBoundingBox bounding_box; +}; + +struct _LiveChartGridClass { + GObjectClass parent_class; +}; + +struct _LiveChartIntersections { + GObject parent_instance; + LiveChartIntersectionsPrivate * priv; +}; + +struct _LiveChartIntersectionsClass { + GObjectClass parent_class; +}; + +struct _LiveChartIntersection { + GObject parent_instance; + LiveChartIntersectionPrivate * priv; + gdouble* entered_at; + gdouble* exited_at; +}; + +struct _LiveChartIntersectionClass { + GObjectClass parent_class; +}; + +struct _LiveChartIntersectorIface { + GTypeInterface parent_iface; + void (*intersect) (LiveChartIntersector* self, LiveChartIntersections* intersections, LiveChartPoint* previous, LiveChartPoint* current, gconstpointer path); +}; + +struct _LiveChartBezierIntersector { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartBezierIntersectorPrivate * priv; +}; + +struct _LiveChartBezierIntersectorClass { + GTypeClass parent_class; + void (*finalize) (LiveChartBezierIntersector *self); +}; + +struct _LiveChartLabels { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartLabelsPrivate * priv; +}; + +struct _LiveChartLabelsClass { + GTypeClass parent_class; + void (*finalize) (LiveChartLabels *self); +}; + +struct _LiveChartLegend { + GObject parent_instance; + LiveChartLegendPrivate * priv; + LiveChartLabels* labels; + GeeArrayList* series; + LiveChartBoundingBox bounding_box; +}; + +struct _LiveChartLegendClass { + GObjectClass parent_class; + void (*draw) (LiveChartLegend* self, cairo_t* ctx, LiveChartConfig* config); +}; + +struct _LiveChartHorizontalLegend { + LiveChartLegend parent_instance; + LiveChartHorizontalLegendPrivate * priv; +}; + +struct _LiveChartHorizontalLegendClass { + LiveChartLegendClass parent_class; +}; + +struct _LiveChartNoopLegend { + LiveChartLegend parent_instance; + LiveChartNoopLegendPrivate * priv; +}; + +struct _LiveChartNoopLegendClass { + LiveChartLegendClass parent_class; +}; + +struct _LiveChartLine { + LiveChartSerieRenderer parent_instance; + LiveChartLinePrivate * priv; +}; + +struct _LiveChartLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartLineArea { + LiveChartLine parent_instance; + LiveChartLineAreaPrivate * priv; +}; + +struct _LiveChartLineAreaClass { + LiveChartLineClass parent_class; +}; + +struct _LiveChartMaxBoundLine { + LiveChartSerieRenderer parent_instance; + LiveChartMaxBoundLinePrivate * priv; +}; + +struct _LiveChartMaxBoundLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartMinBoundLine { + LiveChartSerieRenderer parent_instance; + LiveChartMinBoundLinePrivate * priv; +}; + +struct _LiveChartMinBoundLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartDash { + gdouble* dashes; + gint dashes_length1; + gdouble offset; +}; + +struct _LiveChartPath { + GObject parent_instance; + LiveChartPathPrivate * priv; + LiveChartDash* dash; +}; + +struct _LiveChartPathClass { + GObjectClass parent_class; +}; + +struct _LiveChartPoints { + GObject parent_instance; + LiveChartPointsPrivate * priv; +}; + +struct _LiveChartPointsClass { + GObjectClass parent_class; +}; + +struct _LiveChartRegionHandleResult { + LiveChartRegionHandleStatus status; + gdouble at_value; +}; + +struct _LiveChartRegion { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartRegionPrivate * priv; +}; + +struct _LiveChartRegionClass { + GTypeClass parent_class; + void (*finalize) (LiveChartRegion *self); +}; + +struct _LiveChartSerie { + GObject parent_instance; + LiveChartSeriePrivate * priv; +}; + +struct _LiveChartSerieClass { + GObjectClass parent_class; +}; + +struct _LiveChartSeries { + GObject parent_instance; + LiveChartSeriesPrivate * priv; +}; + +struct _LiveChartSeriesClass { + GObjectClass parent_class; +}; + +struct _LiveChartSmoothLine { + LiveChartSerieRenderer parent_instance; + LiveChartSmoothLinePrivate * priv; + LiveChartIntersections* intersections; +}; + +struct _LiveChartSmoothLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartSmoothLineArea { + LiveChartSmoothLine parent_instance; + LiveChartSmoothLineAreaPrivate * priv; +}; + +struct _LiveChartSmoothLineAreaClass { + LiveChartSmoothLineClass parent_class; +}; + +struct _LiveChartThresholdLine { + LiveChartSerieRenderer parent_instance; + LiveChartThresholdLinePrivate * priv; +}; + +struct _LiveChartThresholdLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartValues { + GeeLinkedList parent_instance; + LiveChartValuesPrivate * priv; +}; + +struct _LiveChartValuesClass { + GeeLinkedListClass parent_class; +}; + +struct _LiveChartStaticStaticChart { + GtkDrawingArea parent_instance; + LiveChartStaticStaticChartPrivate * priv; + LiveChartConfig* config; + LiveChartStaticStaticSeries* series; +}; + +struct _LiveChartStaticStaticChartClass { + GtkDrawingAreaClass parent_class; +}; + +struct _LiveChartStaticStaticSeries { + GObject parent_instance; + LiveChartStaticStaticSeriesPrivate * priv; +}; + +struct _LiveChartStaticStaticSeriesClass { + GObjectClass parent_class; +}; + +struct _LiveChartStaticStaticSerie { + GObject parent_instance; + LiveChartStaticStaticSeriePrivate * priv; +}; + +struct _LiveChartStaticStaticSerieClass { + GObjectClass parent_class; +}; + +struct _LiveChartStaticNamedValue { + gchar* name; + gdouble value; +}; + +struct _LiveChartStaticStaticValues { + GeeLinkedList parent_instance; + LiveChartStaticStaticValuesPrivate * priv; +}; + +struct _LiveChartStaticStaticValuesClass { + GeeLinkedListClass parent_class; +}; + +struct _LiveChartStaticStaticSerieRenderer { + GObject parent_instance; + LiveChartStaticStaticSerieRendererPrivate * priv; + LiveChartBoundingBox bounding_box; + LiveChartStaticStaticValues* values; +}; + +struct _LiveChartStaticStaticSerieRendererClass { + GObjectClass parent_class; + void (*draw) (LiveChartStaticStaticSerieRenderer* self, cairo_t* ctx, LiveChartConfig* config); +}; + +struct _LiveChartStaticStaticLine { + LiveChartStaticStaticSerieRenderer parent_instance; + LiveChartStaticStaticLinePrivate * priv; +}; + +struct _LiveChartStaticStaticLineClass { + LiveChartStaticStaticSerieRendererClass parent_class; +}; + +struct _LiveChartStaticStaticGrid { + GObject parent_instance; + LiveChartStaticStaticGridPrivate * priv; + LiveChartBoundingBox bounding_box; +}; + +struct _LiveChartStaticStaticGridClass { + GObjectClass parent_class; +}; + +struct _LiveChartStaticStaticPoints { + GObject parent_instance; + LiveChartStaticStaticPointsPrivate * priv; +}; + +struct _LiveChartStaticStaticPointsClass { + GObjectClass parent_class; +}; + +VALA_EXTERN gpointer live_chart_config_ref (gpointer instance); +VALA_EXTERN void live_chart_config_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_config (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_config (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_config (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_config (const GValue* value); +VALA_EXTERN GType live_chart_config_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartConfig, live_chart_config_unref) +VALA_EXTERN GType live_chart_bounding_box_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartBoundingBox* live_chart_bounding_box_dup (const LiveChartBoundingBox* self); +VALA_EXTERN void live_chart_bounding_box_free (LiveChartBoundingBox* self); +VALA_EXTERN GType live_chart_drawable_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartDrawable, g_object_unref) +VALA_EXTERN GType live_chart_area_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartArea, g_object_unref) +VALA_EXTERN GType live_chart_points_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartPoints, g_object_unref) +VALA_EXTERN LiveChartArea* live_chart_area_new (LiveChartPoints* points, + GdkRGBA* color, + gdouble alpha); +VALA_EXTERN LiveChartArea* live_chart_area_construct (GType object_type, + LiveChartPoints* points, + GdkRGBA* color, + gdouble alpha); +VALA_EXTERN gpointer live_chart_xaxis_ref (gpointer instance); +VALA_EXTERN void live_chart_xaxis_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_xaxis (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_xaxis (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_xaxis (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_xaxis (const GValue* value); +VALA_EXTERN GType live_chart_xaxis_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartXAxis, live_chart_xaxis_unref) +VALA_EXTERN gpointer live_chart_labels_ref (gpointer instance); +VALA_EXTERN void live_chart_labels_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_labels (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_labels (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_labels (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_labels (const GValue* value); +VALA_EXTERN GType live_chart_labels_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartLabels, live_chart_labels_unref) +VALA_EXTERN GType live_chart_path_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartPath, g_object_unref) +VALA_EXTERN LiveChartXAxis* live_chart_xaxis_new (void); +VALA_EXTERN LiveChartXAxis* live_chart_xaxis_construct (GType object_type); +VALA_EXTERN gdouble live_chart_xaxis_get_ratio (LiveChartXAxis* self); +VALA_EXTERN gfloat live_chart_xaxis_get_tick_interval (LiveChartXAxis* self); +VALA_EXTERN void live_chart_xaxis_set_tick_interval (LiveChartXAxis* self, + gfloat value); +VALA_EXTERN gfloat live_chart_xaxis_get_tick_length (LiveChartXAxis* self); +VALA_EXTERN void live_chart_xaxis_set_tick_length (LiveChartXAxis* self, + gfloat value); +VALA_EXTERN gboolean live_chart_xaxis_get_visible (LiveChartXAxis* self); +VALA_EXTERN void live_chart_xaxis_set_visible (LiveChartXAxis* self, + gboolean value); +VALA_EXTERN GType live_chart_ticks_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartTicks* live_chart_ticks_dup (const LiveChartTicks* self); +VALA_EXTERN void live_chart_ticks_free (LiveChartTicks* self); +VALA_EXTERN void live_chart_ticks_copy (const LiveChartTicks* self, + LiveChartTicks* dest); +VALA_EXTERN void live_chart_ticks_destroy (LiveChartTicks* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (LiveChartTicks, live_chart_ticks_destroy) +VALA_EXTERN void live_chart_ticks_init (LiveChartTicks *self); +VALA_EXTERN gpointer live_chart_yaxis_ref (gpointer instance); +VALA_EXTERN void live_chart_yaxis_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_yaxis (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_yaxis (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_yaxis (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_yaxis (const GValue* value); +VALA_EXTERN GType live_chart_yaxis_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartYAxis, live_chart_yaxis_unref) +VALA_EXTERN LiveChartYAxis* live_chart_yaxis_new (const gchar* unit); +VALA_EXTERN LiveChartYAxis* live_chart_yaxis_construct (GType object_type, + const gchar* unit); +VALA_EXTERN gdouble live_chart_yaxis_get_ratio (LiveChartYAxis* self); +VALA_EXTERN GType live_chart_bounds_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartBounds, g_object_unref) +VALA_EXTERN LiveChartBounds* live_chart_yaxis_get_bounds (LiveChartYAxis* self); +VALA_EXTERN gboolean live_chart_yaxis_update_bounds (LiveChartYAxis* self, + gdouble value); +VALA_EXTERN void live_chart_yaxis_update (LiveChartYAxis* self, + gint area_height); +VALA_EXTERN gchar* live_chart_yaxis_get_max_displayed_value (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_get_ticks (LiveChartYAxis* self, + LiveChartTicks* result); +VALA_EXTERN gfloat live_chart_yaxis_get_ratio_threshold (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_set_ratio_threshold (LiveChartYAxis* self, + gfloat value); +VALA_EXTERN gfloat live_chart_yaxis_get_tick_interval (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_set_tick_interval (LiveChartYAxis* self, + gfloat value); +VALA_EXTERN gboolean live_chart_yaxis_get_visible (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_set_visible (LiveChartYAxis* self, + gboolean value); +VALA_EXTERN gfloat live_chart_yaxis_get_tick_length (LiveChartYAxis* self) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_yaxis_set_tick_length (LiveChartYAxis* self, + gfloat value) G_GNUC_DEPRECATED ; +VALA_EXTERN const gchar* live_chart_yaxis_get_unit (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_set_unit (LiveChartYAxis* self, + const gchar* value); +VALA_EXTERN GType live_chart_background_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartBackground, g_object_unref) +VALA_EXTERN LiveChartBackground* live_chart_background_new (void); +VALA_EXTERN LiveChartBackground* live_chart_background_construct (GType object_type); +VALA_EXTERN void live_chart_background_get_color (LiveChartBackground* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_background_set_color (LiveChartBackground* self, + GdkRGBA * value); +VALA_EXTERN void live_chart_background_get_main_color (LiveChartBackground* self, + GdkRGBA * result) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_background_set_main_color (LiveChartBackground* self, + GdkRGBA * value) G_GNUC_DEPRECATED ; +VALA_EXTERN GType live_chart_serie_renderer_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSerieRenderer, g_object_unref) +VALA_EXTERN GType live_chart_values_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartValues, g_object_unref) +VALA_EXTERN GType live_chart_bar_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartBar, g_object_unref) +VALA_EXTERN LiveChartBar* live_chart_bar_new (LiveChartValues* values); +VALA_EXTERN LiveChartBar* live_chart_bar_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN GType live_chart_segment_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_coord_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartCoord* live_chart_coord_dup (const LiveChartCoord* self); +VALA_EXTERN void live_chart_coord_free (LiveChartCoord* self); +VALA_EXTERN LiveChartSegment* live_chart_segment_dup (const LiveChartSegment* self); +VALA_EXTERN void live_chart_segment_free (LiveChartSegment* self); +VALA_EXTERN GType live_chart_bezier_curve_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartBezierCurve* live_chart_bezier_curve_dup (const LiveChartBezierCurve* self); +VALA_EXTERN void live_chart_bezier_curve_free (LiveChartBezierCurve* self); +VALA_EXTERN GeeList* live_chart_find_intersections_between (LiveChartSegment* segment, + LiveChartBezierCurve* bezier); +VALA_EXTERN LiveChartBounds* live_chart_bounds_new (gdouble lower, + gdouble upper); +VALA_EXTERN LiveChartBounds* live_chart_bounds_construct (GType object_type, + gdouble lower, + gdouble upper); +VALA_EXTERN gboolean live_chart_bounds_has_lower (LiveChartBounds* self); +VALA_EXTERN gboolean live_chart_bounds_has_upper (LiveChartBounds* self); +VALA_EXTERN gboolean live_chart_bounds_update (LiveChartBounds* self, + gdouble value); +VALA_EXTERN gdouble live_chart_bounds_get_lower (LiveChartBounds* self); +VALA_EXTERN gdouble live_chart_bounds_get_upper (LiveChartBounds* self); +VALA_EXTERN GQuark live_chart_chart_error_quark (void); +GType live_chart_chart_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_chart_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartChart, g_object_unref) +VALA_EXTERN GType live_chart_series_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSeries, g_object_unref) +VALA_EXTERN LiveChartChart* live_chart_chart_new (LiveChartConfig* config); +VALA_EXTERN LiveChartChart* live_chart_chart_construct (GType object_type, + LiveChartConfig* config); +VALA_EXTERN GType live_chart_serie_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSerie, g_object_unref) +VALA_EXTERN void live_chart_chart_add_serie (LiveChartChart* self, + LiveChartSerie* serie); +VALA_EXTERN void live_chart_chart_add_value (LiveChartChart* self, + LiveChartSerie* serie, + gdouble value) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_chart_add_value_by_index (LiveChartChart* self, + gint serie_index, + gdouble value, + GError** error) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_chart_add_unaware_timestamp_collection (LiveChartChart* self, + LiveChartSerie* serie, + GeeCollection* collection, + gint timespan_between_value); +VALA_EXTERN void live_chart_chart_add_unaware_timestamp_collection_by_index (LiveChartChart* self, + gint serie_index, + GeeCollection* collection, + gint timespan_between_value, + GError** error); +VALA_EXTERN void live_chart_chart_to_png (LiveChartChart* self, + const gchar* filename, + GError** error); +VALA_EXTERN void live_chart_chart_refresh_every (LiveChartChart* self, + gint ms); +VALA_EXTERN GType live_chart_grid_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartGrid, g_object_unref) +VALA_EXTERN LiveChartGrid* live_chart_chart_get_grid (LiveChartChart* self); +VALA_EXTERN void live_chart_chart_set_grid (LiveChartChart* self, + LiveChartGrid* value); +VALA_EXTERN LiveChartBackground* live_chart_chart_get_background (LiveChartChart* self); +VALA_EXTERN void live_chart_chart_set_background (LiveChartChart* self, + LiveChartBackground* value); +VALA_EXTERN GType live_chart_legend_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartLegend, g_object_unref) +VALA_EXTERN LiveChartLegend* live_chart_chart_get_legend (LiveChartChart* self); +VALA_EXTERN void live_chart_chart_set_legend (LiveChartChart* self, + LiveChartLegend* value); +VALA_EXTERN GType live_chart_auto_padding_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_padding_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartPadding* live_chart_padding_dup (const LiveChartPadding* self); +VALA_EXTERN void live_chart_padding_free (LiveChartPadding* self); +VALA_EXTERN void live_chart_padding_init (LiveChartPadding *self); +VALA_EXTERN GType live_chart_boundary_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartBoundary* live_chart_boundary_dup (const LiveChartBoundary* self); +VALA_EXTERN void live_chart_boundary_free (LiveChartBoundary* self); +VALA_EXTERN GType live_chart_boundaries_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartBoundaries* live_chart_boundaries_dup (const LiveChartBoundaries* self); +VALA_EXTERN void live_chart_boundaries_free (LiveChartBoundaries* self); +VALA_EXTERN void live_chart_config_boundaries (LiveChartConfig* self, + LiveChartBoundaries* result); +VALA_EXTERN void live_chart_config_configure (LiveChartConfig* self, + cairo_t* ctx, + LiveChartLegend* legend); +VALA_EXTERN LiveChartConfig* live_chart_config_new (void); +VALA_EXTERN LiveChartConfig* live_chart_config_construct (GType object_type); +VALA_EXTERN gint live_chart_config_get_width (LiveChartConfig* self); +VALA_EXTERN void live_chart_config_set_width (LiveChartConfig* self, + gint value); +VALA_EXTERN gint live_chart_config_get_height (LiveChartConfig* self); +VALA_EXTERN void live_chart_config_set_height (LiveChartConfig* self, + gint value); +VALA_EXTERN void live_chart_drawable_draw (LiveChartDrawable* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_drawable_get_bounding_box (LiveChartDrawable* self, + LiveChartBoundingBox* result); +VALA_EXTERN gboolean live_chart_drawable_get_visible (LiveChartDrawable* self); +VALA_EXTERN void live_chart_drawable_set_visible (LiveChartDrawable* self, + gboolean value); +VALA_EXTERN GType live_chart_colorable_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartColorable, g_object_unref) +VALA_EXTERN void live_chart_colorable_get_main_color (LiveChartColorable* self, + GdkRGBA * result) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_colorable_set_main_color (LiveChartColorable* self, + GdkRGBA * value) G_GNUC_DEPRECATED ; +VALA_EXTERN gpointer live_chart_font_ref (gpointer instance); +VALA_EXTERN void live_chart_font_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_font (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_font (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_font (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_font (const GValue* value); +VALA_EXTERN GType live_chart_font_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartFont, live_chart_font_unref) +VALA_EXTERN LiveChartFont* live_chart_font_new (void); +VALA_EXTERN LiveChartFont* live_chart_font_construct (GType object_type); +VALA_EXTERN void live_chart_font_configure (LiveChartFont* self, + cairo_t* ctx); +VALA_EXTERN guint8 live_chart_font_get_size (LiveChartFont* self); +VALA_EXTERN void live_chart_font_set_size (LiveChartFont* self, + guint8 value); +VALA_EXTERN const gchar* live_chart_font_get_face (LiveChartFont* self); +VALA_EXTERN void live_chart_font_set_face (LiveChartFont* self, + const gchar* value); +VALA_EXTERN cairo_font_slant_t live_chart_font_get_slant (LiveChartFont* self); +VALA_EXTERN void live_chart_font_set_slant (LiveChartFont* self, + cairo_font_slant_t value); +VALA_EXTERN cairo_font_weight_t live_chart_font_get_weight (LiveChartFont* self); +VALA_EXTERN void live_chart_font_set_weight (LiveChartFont* self, + cairo_font_weight_t value); +VALA_EXTERN void live_chart_font_get_color (LiveChartFont* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_font_set_color (LiveChartFont* self, + GdkRGBA * value); +VALA_EXTERN GType live_chart_point_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_timestamped_value_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartTimestampedValue* live_chart_timestamped_value_dup (const LiveChartTimestampedValue* self); +VALA_EXTERN void live_chart_timestamped_value_free (LiveChartTimestampedValue* self); +VALA_EXTERN LiveChartPoint* live_chart_point_dup (const LiveChartPoint* self); +VALA_EXTERN void live_chart_point_free (LiveChartPoint* self); +VALA_EXTERN void live_chart_build_bezier_curve_from_points (LiveChartPoint* previous, + LiveChartPoint* target, + LiveChartBezierCurve* result); +VALA_EXTERN void live_chart_grid_restore (LiveChartGrid* self, + cairo_t* ctx); +VALA_EXTERN void live_chart_grid_render_abscissa (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_render_ordinate (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_render_grid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_render_vgrid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_render_hgrid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_update_bounding_box (LiveChartGrid* self, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_debug (LiveChartGrid* self, + cairo_t* ctx); +VALA_EXTERN LiveChartGrid* live_chart_grid_new (void); +VALA_EXTERN LiveChartGrid* live_chart_grid_construct (GType object_type); +VALA_EXTERN void live_chart_grid_get_main_color (LiveChartGrid* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_grid_set_main_color (LiveChartGrid* self, + GdkRGBA * value); +VALA_EXTERN GType live_chart_intersections_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartIntersections, g_object_unref) +VALA_EXTERN void live_chart_intersections_close (LiveChartIntersections* self, + gdouble x, + gdouble exited_at); +VALA_EXTERN void live_chart_intersections_update (LiveChartIntersections* self, + gdouble x); +VALA_EXTERN gpointer live_chart_region_ref (gpointer instance); +VALA_EXTERN void live_chart_region_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_region (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_region (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_region (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_region (const GValue* value); +VALA_EXTERN GType live_chart_region_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartRegion, live_chart_region_unref) +VALA_EXTERN void live_chart_intersections_open (LiveChartIntersections* self, + LiveChartRegion* region, + gdouble x, + gdouble entered_at); +VALA_EXTERN void live_chart_intersections_open_without_entrypoint (LiveChartIntersections* self, + LiveChartRegion* region, + gdouble x); +VALA_EXTERN GType live_chart_intersection_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartIntersection, g_object_unref) +VALA_EXTERN void live_chart_intersections_foreach (LiveChartIntersections* self, + GeeForallFunc f, + gpointer f_target); +VALA_EXTERN gboolean live_chart_intersections_has_an_opened_intersection (LiveChartIntersections* self); +VALA_EXTERN LiveChartRegion* live_chart_intersections_get_current_region (LiveChartIntersections* self); +VALA_EXTERN gint live_chart_intersections_size (LiveChartIntersections* self); +VALA_EXTERN LiveChartIntersection* live_chart_intersections_get (LiveChartIntersections* self, + gint index); +VALA_EXTERN LiveChartIntersections* live_chart_intersections_new (void); +VALA_EXTERN LiveChartIntersections* live_chart_intersections_construct (GType object_type); +VALA_EXTERN LiveChartIntersection* live_chart_intersection_new (LiveChartRegion* region, + gdouble start_x, + gdouble entered_at); +VALA_EXTERN LiveChartIntersection* live_chart_intersection_construct (GType object_type, + LiveChartRegion* region, + gdouble start_x, + gdouble entered_at); +VALA_EXTERN LiveChartIntersection* live_chart_intersection_new_without_entry_point (LiveChartRegion* region, + gdouble start_x); +VALA_EXTERN LiveChartIntersection* live_chart_intersection_construct_without_entry_point (GType object_type, + LiveChartRegion* region, + gdouble start_x); +VALA_EXTERN void live_chart_intersection_update (LiveChartIntersection* self, + gdouble x); +VALA_EXTERN void live_chart_intersection_close (LiveChartIntersection* self, + gdouble x, + gdouble exited_at); +VALA_EXTERN gboolean live_chart_intersection_is_open (LiveChartIntersection* self); +VALA_EXTERN gboolean live_chart_intersection_is_closed (LiveChartIntersection* self); +VALA_EXTERN LiveChartRegion* live_chart_intersection_get_region (LiveChartIntersection* self); +VALA_EXTERN void live_chart_intersection_set_region (LiveChartIntersection* self, + LiveChartRegion* value); +VALA_EXTERN gdouble live_chart_intersection_get_start_x (LiveChartIntersection* self); +VALA_EXTERN gdouble live_chart_intersection_get_end_x (LiveChartIntersection* self); +VALA_EXTERN GType live_chart_intersector_get_type (void) G_GNUC_CONST ; +VALA_EXTERN void live_chart_intersector_intersect (LiveChartIntersector* self, + LiveChartIntersections* intersections, + LiveChartPoint* previous, + LiveChartPoint* current, + gconstpointer path); +VALA_EXTERN gpointer live_chart_bezier_intersector_ref (gpointer instance); +VALA_EXTERN void live_chart_bezier_intersector_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_bezier_intersector (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_bezier_intersector (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_bezier_intersector (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_bezier_intersector (const GValue* value); +VALA_EXTERN GType live_chart_bezier_intersector_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartBezierIntersector, live_chart_bezier_intersector_unref) +VALA_EXTERN LiveChartBezierIntersector* live_chart_bezier_intersector_new (LiveChartRegion* region, + LiveChartConfig* config); +VALA_EXTERN LiveChartBezierIntersector* live_chart_bezier_intersector_construct (GType object_type, + LiveChartRegion* region, + LiveChartConfig* config); +VALA_EXTERN LiveChartLabels* live_chart_labels_new (void); +VALA_EXTERN LiveChartLabels* live_chart_labels_construct (GType object_type); +VALA_EXTERN gboolean live_chart_labels_get_visible (LiveChartLabels* self); +VALA_EXTERN void live_chart_labels_set_visible (LiveChartLabels* self, + gboolean value); +VALA_EXTERN void live_chart_labels_get_extents (LiveChartLabels* self, + cairo_text_extents_t * result); +VALA_EXTERN void live_chart_labels_set_extents (LiveChartLabels* self, + cairo_text_extents_t * value); +VALA_EXTERN LiveChartFont* live_chart_labels_get_font (LiveChartLabels* self); +VALA_EXTERN void live_chart_labels_set_font (LiveChartLabels* self, + LiveChartFont* value); +VALA_EXTERN void live_chart_legend_add_legend (LiveChartLegend* self, + LiveChartSerie* serie); +VALA_EXTERN void live_chart_legend_draw (LiveChartLegend* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN LiveChartLegend* live_chart_legend_construct (GType object_type); +VALA_EXTERN void live_chart_legend_get_main_color (LiveChartLegend* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_legend_set_main_color (LiveChartLegend* self, + GdkRGBA * value); +VALA_EXTERN GType live_chart_horizontal_legend_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartHorizontalLegend, g_object_unref) +VALA_EXTERN void live_chart_horizontal_legend_debug (LiveChartHorizontalLegend* self, + cairo_t* ctx); +VALA_EXTERN LiveChartHorizontalLegend* live_chart_horizontal_legend_new (void); +VALA_EXTERN LiveChartHorizontalLegend* live_chart_horizontal_legend_construct (GType object_type); +VALA_EXTERN GType live_chart_noop_legend_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartNoopLegend, g_object_unref) +VALA_EXTERN LiveChartNoopLegend* live_chart_noop_legend_new (void); +VALA_EXTERN LiveChartNoopLegend* live_chart_noop_legend_construct (GType object_type); +VALA_EXTERN GType live_chart_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartLine, g_object_unref) +VALA_EXTERN GType live_chart_line_area_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartLineArea, g_object_unref) +VALA_EXTERN LiveChartLineArea* live_chart_line_area_new (LiveChartValues* values); +VALA_EXTERN LiveChartLineArea* live_chart_line_area_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN gdouble live_chart_line_area_get_area_alpha (LiveChartLineArea* self); +VALA_EXTERN void live_chart_line_area_set_area_alpha (LiveChartLineArea* self, + gdouble value); +VALA_EXTERN LiveChartLine* live_chart_line_new (LiveChartValues* values); +VALA_EXTERN LiveChartLine* live_chart_line_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN LiveChartPoints* live_chart_line_draw_line (LiveChartLine* self, + LiveChartPoints* points, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN GType live_chart_max_bound_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartMaxBoundLine, g_object_unref) +VALA_EXTERN LiveChartMaxBoundLine* live_chart_max_bound_line_new (void); +VALA_EXTERN LiveChartMaxBoundLine* live_chart_max_bound_line_construct (GType object_type); +VALA_EXTERN LiveChartMaxBoundLine* live_chart_max_bound_line_new_from_serie (LiveChartSerie* serie); +VALA_EXTERN LiveChartMaxBoundLine* live_chart_max_bound_line_construct_from_serie (GType object_type, + LiveChartSerie* serie); +VALA_EXTERN GType live_chart_min_bound_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartMinBoundLine, g_object_unref) +VALA_EXTERN LiveChartMinBoundLine* live_chart_min_bound_line_new (LiveChartValues* values); +VALA_EXTERN LiveChartMinBoundLine* live_chart_min_bound_line_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN LiveChartMinBoundLine* live_chart_min_bound_line_new_from_serie (LiveChartSerie* serie); +VALA_EXTERN LiveChartMinBoundLine* live_chart_min_bound_line_construct_from_serie (GType object_type, + LiveChartSerie* serie); +VALA_EXTERN GType live_chart_dash_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartDash* live_chart_dash_dup (const LiveChartDash* self); +VALA_EXTERN void live_chart_dash_free (LiveChartDash* self); +VALA_EXTERN void live_chart_dash_copy (const LiveChartDash* self, + LiveChartDash* dest); +VALA_EXTERN void live_chart_dash_destroy (LiveChartDash* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (LiveChartDash, live_chart_dash_destroy) +VALA_EXTERN void live_chart_dash_init (LiveChartDash *self); +VALA_EXTERN LiveChartPath* live_chart_path_new (gdouble width, + GdkRGBA* color, + gboolean visible, + LiveChartDash* dash); +VALA_EXTERN LiveChartPath* live_chart_path_construct (GType object_type, + gdouble width, + GdkRGBA* color, + gboolean visible, + LiveChartDash* dash); +VALA_EXTERN void live_chart_path_configure (LiveChartPath* self, + cairo_t* ctx); +VALA_EXTERN gdouble live_chart_path_get_width (LiveChartPath* self); +VALA_EXTERN void live_chart_path_set_width (LiveChartPath* self, + gdouble value); +VALA_EXTERN void live_chart_path_get_color (LiveChartPath* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_path_set_color (LiveChartPath* self, + GdkRGBA * value); +VALA_EXTERN gboolean live_chart_path_get_visible (LiveChartPath* self); +VALA_EXTERN void live_chart_path_set_visible (LiveChartPath* self, + gboolean value); +VALA_EXTERN LiveChartPoints* live_chart_points_new (void); +VALA_EXTERN LiveChartPoints* live_chart_points_construct (GType object_type); +VALA_EXTERN void live_chart_points_add (LiveChartPoints* self, + LiveChartPoint* point); +VALA_EXTERN void live_chart_points_get (LiveChartPoints* self, + gint at, + LiveChartPoint* result); +VALA_EXTERN void live_chart_points_after (LiveChartPoints* self, + gint at, + LiveChartPoint* result); +VALA_EXTERN void live_chart_points_first (LiveChartPoints* self, + LiveChartPoint* result); +VALA_EXTERN void live_chart_points_last (LiveChartPoints* self, + LiveChartPoint* result); +VALA_EXTERN LiveChartPoints* live_chart_points_create (LiveChartValues* values, + LiveChartConfig* config); +VALA_EXTERN LiveChartBounds* live_chart_points_get_bounds (LiveChartPoints* self); +VALA_EXTERN void live_chart_points_set_bounds (LiveChartPoints* self, + LiveChartBounds* value); +VALA_EXTERN gint live_chart_points_get_size (LiveChartPoints* self); +VALA_EXTERN gdouble live_chart_points_get_realtime_delta (LiveChartPoints* self); +VALA_EXTERN void live_chart_points_set_realtime_delta (LiveChartPoints* self, + gdouble value); +VALA_EXTERN GType live_chart_region_handle_status_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_region_handle_result_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartRegionHandleResult* live_chart_region_handle_result_dup (const LiveChartRegionHandleResult* self); +VALA_EXTERN void live_chart_region_handle_result_free (LiveChartRegionHandleResult* self); +VALA_EXTERN LiveChartRegion* live_chart_region_new (gdouble floor, + gdouble ceil); +VALA_EXTERN LiveChartRegion* live_chart_region_construct (GType object_type, + gdouble floor, + gdouble ceil); +VALA_EXTERN LiveChartRegion* live_chart_region_new_between (gdouble above, + gdouble below); +VALA_EXTERN LiveChartRegion* live_chart_region_construct_between (GType object_type, + gdouble above, + gdouble below); +VALA_EXTERN LiveChartRegion* live_chart_region_with_line_color (LiveChartRegion* self, + GdkRGBA* color); +VALA_EXTERN LiveChartRegion* live_chart_region_with_area_color (LiveChartRegion* self, + GdkRGBA* color); +VALA_EXTERN gboolean live_chart_region_has_at_least_one_point_within (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current); +VALA_EXTERN void live_chart_region_handle (LiveChartRegion* self, + LiveChartIntersections* intersections, + LiveChartPoint* previous, + LiveChartPoint* current, + LiveChartGetIntersection get_intersection, + gpointer get_intersection_target); +VALA_EXTERN void live_chart_region_get_line_color (LiveChartRegion* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_region_set_line_color (LiveChartRegion* self, + GdkRGBA * value); +VALA_EXTERN void live_chart_region_get_area_color (LiveChartRegion* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_region_set_area_color (LiveChartRegion* self, + GdkRGBA * value); +VALA_EXTERN LiveChartSerie* live_chart_serie_new (const gchar* name, + LiveChartSerieRenderer* renderer); +VALA_EXTERN LiveChartSerie* live_chart_serie_construct (GType object_type, + const gchar* name, + LiveChartSerieRenderer* renderer); +VALA_EXTERN void live_chart_serie_add (LiveChartSerie* self, + gdouble value); +VALA_EXTERN void live_chart_serie_add_with_timestamp (LiveChartSerie* self, + gdouble value, + gint64 timestamp); +VALA_EXTERN void live_chart_serie_set_main_color (LiveChartSerie* self, + GdkRGBA* color) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_serie_get_main_color (LiveChartSerie* self, + GdkRGBA* result) G_GNUC_DEPRECATED ; +VALA_EXTERN LiveChartValues* live_chart_serie_get_values (LiveChartSerie* self); +VALA_EXTERN void live_chart_serie_clear (LiveChartSerie* self); +VALA_EXTERN const gchar* live_chart_serie_get_name (LiveChartSerie* self); +VALA_EXTERN void live_chart_serie_set_name (LiveChartSerie* self, + const gchar* value); +VALA_EXTERN LiveChartPath* live_chart_serie_get_line (LiveChartSerie* self); +VALA_EXTERN void live_chart_serie_set_line (LiveChartSerie* self, + LiveChartPath* value); +VALA_EXTERN LiveChartSerieRenderer* live_chart_serie_renderer_construct (GType object_type); +VALA_EXTERN LiveChartValues* live_chart_serie_renderer_get_values (LiveChartSerieRenderer* self); +VALA_EXTERN void live_chart_serie_renderer_draw (LiveChartSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_serie_renderer_debug (LiveChartSerieRenderer* self, + cairo_t* ctx); +VALA_EXTERN gboolean live_chart_serie_renderer_is_out_of_area (LiveChartSerieRenderer* self, + LiveChartPoint* point); +VALA_EXTERN void live_chart_serie_renderer_get_main_color (LiveChartSerieRenderer* self, + GdkRGBA * result) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_serie_renderer_set_main_color (LiveChartSerieRenderer* self, + GdkRGBA * value) G_GNUC_DEPRECATED ; +VALA_EXTERN LiveChartPath* live_chart_serie_renderer_get_line (LiveChartSerieRenderer* self); +VALA_EXTERN void live_chart_serie_renderer_set_line (LiveChartSerieRenderer* self, + LiveChartPath* value); +VALA_EXTERN LiveChartSeries* live_chart_series_new (LiveChartChart* chart); +VALA_EXTERN LiveChartSeries* live_chart_series_construct (GType object_type, + LiveChartChart* chart); +VALA_EXTERN LiveChartSerie* live_chart_series_register (LiveChartSeries* self, + LiveChartSerie* serie); +VALA_EXTERN LiveChartSerie* live_chart_series_get (LiveChartSeries* self, + gint index, + GError** error); +VALA_EXTERN LiveChartSerie* live_chart_series_get_by_name (LiveChartSeries* self, + const gchar* name, + GError** error); +VALA_EXTERN GeeIterator* live_chart_series_iterator (LiveChartSeries* self); +VALA_EXTERN GType live_chart_smooth_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSmoothLine, g_object_unref) +VALA_EXTERN GType live_chart_smooth_line_area_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSmoothLineArea, g_object_unref) +VALA_EXTERN LiveChartSmoothLineArea* live_chart_smooth_line_area_new (LiveChartValues* values); +VALA_EXTERN LiveChartSmoothLineArea* live_chart_smooth_line_area_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN void live_chart_smooth_line_area_draw_regions_on_area (LiveChartSmoothLineArea* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN gdouble live_chart_smooth_line_area_get_area_alpha (LiveChartSmoothLineArea* self); +VALA_EXTERN void live_chart_smooth_line_area_set_area_alpha (LiveChartSmoothLineArea* self, + gdouble value); +VALA_EXTERN LiveChartSmoothLine* live_chart_smooth_line_new (LiveChartValues* values); +VALA_EXTERN LiveChartSmoothLine* live_chart_smooth_line_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN cairo_path_t* live_chart_smooth_line_draw_smooth_line (LiveChartSmoothLine* self, + LiveChartPoints* points, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_smooth_line_draw_regions_on_line (LiveChartSmoothLine* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN LiveChartRegion* live_chart_smooth_line_get_region (LiveChartSmoothLine* self); +VALA_EXTERN void live_chart_smooth_line_set_region (LiveChartSmoothLine* self, + LiveChartRegion* value); +VALA_EXTERN GType live_chart_threshold_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartThresholdLine, g_object_unref) +VALA_EXTERN LiveChartThresholdLine* live_chart_threshold_line_new (gdouble value); +VALA_EXTERN LiveChartThresholdLine* live_chart_threshold_line_construct (GType object_type, + gdouble value); +VALA_EXTERN gdouble live_chart_threshold_line_get_value (LiveChartThresholdLine* self); +VALA_EXTERN void live_chart_threshold_line_set_value (LiveChartThresholdLine* self, + gdouble value); +VALA_EXTERN gfloat live_chart_cap (gfloat value); +VALA_EXTERN gboolean live_chart_has_fractional_part (gfloat value); +VALA_EXTERN gchar* live_chart_format_for_y_axis (const gchar* unit, + gfloat value); +VALA_EXTERN GeeList* live_chart_golden_divisors (gfloat value); +VALA_EXTERN LiveChartValues* live_chart_values_new (gint buffer_size); +VALA_EXTERN LiveChartValues* live_chart_values_construct (GType object_type, + gint buffer_size); +VALA_EXTERN void live_chart_values_add (LiveChartValues* self, + LiveChartTimestampedValue* value); +VALA_EXTERN LiveChartBounds* live_chart_values_get_bounds (LiveChartValues* self); +VALA_EXTERN void live_chart_values_set_bounds (LiveChartValues* self, + LiveChartBounds* value); +VALA_EXTERN GType live_chart_static_static_chart_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticChart, g_object_unref) +VALA_EXTERN GType live_chart_static_static_series_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticSeries, g_object_unref) +VALA_EXTERN LiveChartStaticStaticChart* live_chart_static_static_chart_new (LiveChartConfig* config); +VALA_EXTERN LiveChartStaticStaticChart* live_chart_static_static_chart_construct (GType object_type, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_chart_set_categories (LiveChartStaticStaticChart* self, + GeeArrayList* categories); +VALA_EXTERN GType live_chart_static_static_serie_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticSerie, g_object_unref) +VALA_EXTERN void live_chart_static_static_chart_add_serie (LiveChartStaticStaticChart* self, + LiveChartStaticStaticSerie* serie); +VALA_EXTERN GType live_chart_static_static_grid_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticGrid, g_object_unref) +VALA_EXTERN LiveChartStaticStaticGrid* live_chart_static_static_chart_get_grid (LiveChartStaticStaticChart* self); +VALA_EXTERN void live_chart_static_static_chart_set_grid (LiveChartStaticStaticChart* self, + LiveChartStaticStaticGrid* value); +VALA_EXTERN LiveChartBackground* live_chart_static_static_chart_get_background (LiveChartStaticStaticChart* self); +VALA_EXTERN void live_chart_static_static_chart_set_background (LiveChartStaticStaticChart* self, + LiveChartBackground* value); +VALA_EXTERN LiveChartLegend* live_chart_static_static_chart_get_legend (LiveChartStaticStaticChart* self); +VALA_EXTERN void live_chart_static_static_chart_set_legend (LiveChartStaticStaticChart* self, + LiveChartLegend* value); +VALA_EXTERN LiveChartStaticStaticSeries* live_chart_static_static_series_new (LiveChartStaticStaticChart* chart); +VALA_EXTERN LiveChartStaticStaticSeries* live_chart_static_static_series_construct (GType object_type, + LiveChartStaticStaticChart* chart); +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_series_register (LiveChartStaticStaticSeries* self, + LiveChartStaticStaticSerie* serie); +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_series_get (LiveChartStaticStaticSeries* self, + gint index, + GError** error); +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_series_get_by_name (LiveChartStaticStaticSeries* self, + const gchar* name, + GError** error); +VALA_EXTERN GeeIterator* live_chart_static_static_series_iterator (LiveChartStaticStaticSeries* self); +VALA_EXTERN GType live_chart_static_static_serie_renderer_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticSerieRenderer, g_object_unref) +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_serie_new (const gchar* name, + LiveChartStaticStaticSerieRenderer* renderer); +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_serie_construct (GType object_type, + const gchar* name, + LiveChartStaticStaticSerieRenderer* renderer); +VALA_EXTERN void live_chart_static_static_serie_add (LiveChartStaticStaticSerie* self, + const gchar* name, + gdouble value); +VALA_EXTERN GType live_chart_static_static_values_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticValues, g_object_unref) +VALA_EXTERN LiveChartStaticStaticValues* live_chart_static_static_serie_get_values (LiveChartStaticStaticSerie* self); +VALA_EXTERN void live_chart_static_static_serie_clear (LiveChartStaticStaticSerie* self); +VALA_EXTERN const gchar* live_chart_static_static_serie_get_name (LiveChartStaticStaticSerie* self); +VALA_EXTERN void live_chart_static_static_serie_set_name (LiveChartStaticStaticSerie* self, + const gchar* value); +VALA_EXTERN LiveChartPath* live_chart_static_static_serie_get_line (LiveChartStaticStaticSerie* self); +VALA_EXTERN void live_chart_static_static_serie_set_line (LiveChartStaticStaticSerie* self, + LiveChartPath* value); +VALA_EXTERN GType live_chart_static_named_value_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartStaticNamedValue* live_chart_static_named_value_dup (const LiveChartStaticNamedValue* self); +VALA_EXTERN void live_chart_static_named_value_free (LiveChartStaticNamedValue* self); +VALA_EXTERN void live_chart_static_named_value_copy (const LiveChartStaticNamedValue* self, + LiveChartStaticNamedValue* dest); +VALA_EXTERN void live_chart_static_named_value_destroy (LiveChartStaticNamedValue* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (LiveChartStaticNamedValue, live_chart_static_named_value_destroy) +VALA_EXTERN LiveChartStaticStaticValues* live_chart_static_static_values_new (void); +VALA_EXTERN LiveChartStaticStaticValues* live_chart_static_static_values_construct (GType object_type); +VALA_EXTERN void live_chart_static_static_values_add (LiveChartStaticStaticValues* self, + LiveChartStaticNamedValue* value); +VALA_EXTERN LiveChartBounds* live_chart_static_static_values_get_bounds (LiveChartStaticStaticValues* self); +VALA_EXTERN void live_chart_static_static_values_set_bounds (LiveChartStaticStaticValues* self, + LiveChartBounds* value); +VALA_EXTERN LiveChartStaticStaticSerieRenderer* live_chart_static_static_serie_renderer_construct (GType object_type); +VALA_EXTERN LiveChartStaticStaticValues* live_chart_static_static_serie_renderer_get_values (LiveChartStaticStaticSerieRenderer* self); +VALA_EXTERN void live_chart_static_static_serie_renderer_draw (LiveChartStaticStaticSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_serie_renderer_debug (LiveChartStaticStaticSerieRenderer* self, + cairo_t* ctx); +VALA_EXTERN gboolean live_chart_static_static_serie_renderer_is_out_of_area (LiveChartStaticStaticSerieRenderer* self, + LiveChartPoint* point); +VALA_EXTERN LiveChartPath* live_chart_static_static_serie_renderer_get_line (LiveChartStaticStaticSerieRenderer* self); +VALA_EXTERN void live_chart_static_static_serie_renderer_set_line (LiveChartStaticStaticSerieRenderer* self, + LiveChartPath* value); +VALA_EXTERN GType live_chart_static_static_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticLine, g_object_unref) +VALA_EXTERN LiveChartStaticStaticLine* live_chart_static_static_line_new (LiveChartStaticStaticValues* values); +VALA_EXTERN LiveChartStaticStaticLine* live_chart_static_static_line_construct (GType object_type, + LiveChartStaticStaticValues* values); +VALA_EXTERN GType live_chart_static_static_points_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticPoints, g_object_unref) +VALA_EXTERN void live_chart_static_static_line_draw_line (LiveChartStaticStaticLine* self, + LiveChartStaticStaticPoints* points, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_restore (LiveChartStaticStaticGrid* self, + cairo_t* ctx); +VALA_EXTERN void live_chart_static_static_grid_render_abscissa (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_render_ordinate (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_render_grid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_render_vgrid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_render_hgrid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_update_bounding_box (LiveChartStaticStaticGrid* self, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_debug (LiveChartStaticStaticGrid* self, + cairo_t* ctx); +VALA_EXTERN LiveChartStaticStaticGrid* live_chart_static_static_grid_new (void); +VALA_EXTERN LiveChartStaticStaticGrid* live_chart_static_static_grid_construct (GType object_type); +VALA_EXTERN void live_chart_static_static_grid_get_main_color (LiveChartStaticStaticGrid* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_static_static_grid_set_main_color (LiveChartStaticStaticGrid* self, + GdkRGBA * value); +VALA_EXTERN LiveChartStaticStaticPoints* live_chart_static_static_points_new (void); +VALA_EXTERN LiveChartStaticStaticPoints* live_chart_static_static_points_construct (GType object_type); +VALA_EXTERN void live_chart_static_static_points_add (LiveChartStaticStaticPoints* self, + LiveChartPoint* point); +VALA_EXTERN void live_chart_static_static_points_get (LiveChartStaticStaticPoints* self, + gint at, + LiveChartPoint* result); +VALA_EXTERN void live_chart_static_static_points_after (LiveChartStaticStaticPoints* self, + gint at, + LiveChartPoint* result); +VALA_EXTERN void live_chart_static_static_points_first (LiveChartStaticStaticPoints* self, + LiveChartPoint* result); +VALA_EXTERN void live_chart_static_static_points_last (LiveChartStaticStaticPoints* self, + LiveChartPoint* result); +VALA_EXTERN LiveChartStaticStaticPoints* live_chart_static_static_points_create (LiveChartStaticStaticValues* values, + LiveChartConfig* config); +VALA_EXTERN LiveChartBounds* live_chart_static_static_points_get_bounds (LiveChartStaticStaticPoints* self); +VALA_EXTERN void live_chart_static_static_points_set_bounds (LiveChartStaticStaticPoints* self, + LiveChartBounds* value); +VALA_EXTERN gint live_chart_static_static_points_get_size (LiveChartStaticStaticPoints* self); +VALA_EXTERN gdouble live_chart_static_static_points_get_realtime_delta (LiveChartStaticStaticPoints* self); +VALA_EXTERN void live_chart_static_static_points_set_realtime_delta (LiveChartStaticStaticPoints* self, + gdouble value); + +G_END_DECLS + +#endif diff --git a/iPDC/lib/livechart.vapi b/iPDC/lib/livechart.vapi new file mode 100644 index 0000000..39aedac --- /dev/null +++ b/iPDC/lib/livechart.vapi @@ -0,0 +1,507 @@ +/* livechart.vapi generated by valac 0.56.0, do not modify. */ + +namespace LiveChart { + namespace Static { + [CCode (cheader_filename = "livechart.h")] + public class StaticChart : Gtk.DrawingArea { + public LiveChart.Config config; + public LiveChart.Static.StaticSeries series; + public StaticChart (LiveChart.Config config = new LiveChart.Config ()); + public void add_serie (LiveChart.Static.StaticSerie serie); + public void set_categories (Gee.ArrayList categories); + public LiveChart.Background background { get; set; } + public LiveChart.Static.StaticGrid grid { get; set; } + public LiveChart.Legend legend { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class StaticGrid : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + public const int ABSCISSA_TIME_PADDING; + public StaticGrid (); + protected void debug (Cairo.Context ctx); + protected void render_abscissa (Cairo.Context ctx, LiveChart.Config config); + protected void render_grid (Cairo.Context ctx, LiveChart.Config config); + protected void render_hgrid (Cairo.Context ctx, LiveChart.Config config); + protected void render_ordinate (Cairo.Context ctx, LiveChart.Config config); + protected void render_vgrid (Cairo.Context ctx, LiveChart.Config config); + protected void restore (Cairo.Context ctx); + protected void update_bounding_box (LiveChart.Config config); + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class StaticLine : LiveChart.Static.StaticSerieRenderer { + public StaticLine (LiveChart.Static.StaticValues values = new LiveChart.Static.StaticValues ()); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + protected void draw_line (LiveChart.Static.StaticPoints points, Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart.h")] + public class StaticPoints : GLib.Object { + public StaticPoints (); + public void add (LiveChart.Point point); + public LiveChart.Point after (int at); + public static LiveChart.Static.StaticPoints create (LiveChart.Static.StaticValues values, LiveChart.Config config); + public LiveChart.Point first (); + public new LiveChart.Point @get (int at); + public LiveChart.Point last (); + public LiveChart.Bounds bounds { get; set construct; } + public double realtime_delta { get; set; } + public int size { get; } + } + [CCode (cheader_filename = "livechart.h")] + public class StaticSerie : LiveChart.Colorable, LiveChart.Drawable, GLib.Object { + public StaticSerie (string name, LiveChart.Static.StaticSerieRenderer renderer = new LiveChart.Static.StaticLine (new LiveChart.Static.StaticValues ())); + public void add (string name, double value); + public void clear (); + public LiveChart.Static.StaticValues get_values (); + public LiveChart.Path line { get; set; } + public string name { get; set; } + public signal void value_added (double value); + } + [CCode (cheader_filename = "livechart.h")] + public abstract class StaticSerieRenderer : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + protected LiveChart.Static.StaticValues values; + protected StaticSerieRenderer (); + protected void debug (Cairo.Context ctx); + public abstract void draw (Cairo.Context ctx, LiveChart.Config config); + public LiveChart.Static.StaticValues get_values (); + protected bool is_out_of_area (LiveChart.Point point); + public LiveChart.Path line { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class StaticSeries : GLib.Object { + public StaticSeries (LiveChart.Static.StaticChart chart); + public new LiveChart.Static.StaticSerie @get (int index) throws LiveChart.ChartError; + public LiveChart.Static.StaticSerie get_by_name (string name) throws LiveChart.ChartError; + public Gee.Iterator iterator (); + public LiveChart.Static.StaticSerie register (LiveChart.Static.StaticSerie serie); + } + [CCode (cheader_filename = "livechart.h")] + public class StaticValues : Gee.LinkedList { + public StaticValues (); + public new void add (LiveChart.Static.NamedValue value); + public LiveChart.Bounds bounds { get; set construct; } + } + [CCode (cheader_filename = "livechart.h")] + public struct NamedValue { + public string name; + public double value; + } + } + [CCode (cheader_filename = "livechart.h")] + public class Area : LiveChart.Drawable, GLib.Object { + public Area (LiveChart.Points points, Gdk.RGBA color, double alpha); + } + [CCode (cheader_filename = "livechart.h")] + public class Background : LiveChart.Drawable, GLib.Object { + public Background (); + public Gdk.RGBA color { get; set; } + [Version (deprecated = true, deprecated_since = "1.8.0", replacement = "Background.color")] + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Bar : LiveChart.SerieRenderer { + public Bar (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart.h")] + public class BezierIntersector : LiveChart.Intersector { + public BezierIntersector (LiveChart.Region region, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart.h")] + public class Bounds : GLib.Object { + public Bounds (double lower = double.NAN, double upper = double.NAN); + public bool has_lower (); + public bool has_upper (); + public bool update (double value); + public double lower { get; private set; } + public double upper { get; private set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Chart : Gtk.DrawingArea { + public LiveChart.Config config; + public LiveChart.Series series; + public Chart (LiveChart.Config config = new LiveChart.Config ()); + public void add_serie (LiveChart.Serie serie); + public void add_unaware_timestamp_collection (LiveChart.Serie serie, Gee.Collection collection, int timespan_between_value); + public void add_unaware_timestamp_collection_by_index (int serie_index, Gee.Collection collection, int timespan_between_value) throws LiveChart.ChartError; + [Version (deprecated = true, deprecated_since = "1.7.0", replacement = "Retrieve the Serie from Chart.series (or from the serie you created) and add the value using serie.add")] + public void add_value (LiveChart.Serie serie, double value); + [Version (deprecated = true, deprecated_since = "1.7.0", replacement = "Retrieve the Serie from Chart.series and add the value using serie.add")] + public void add_value_by_index (int serie_index, double value) throws LiveChart.ChartError; + public void refresh_every (int ms); + public void to_png (string filename) throws GLib.Error; + public LiveChart.Background background { get; set; } + public LiveChart.Grid grid { get; set; } + public LiveChart.Legend legend { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Config { + public LiveChart.Padding padding; + public LiveChart.XAxis x_axis; + public LiveChart.YAxis y_axis; + public Config (); + public LiveChart.Boundaries boundaries (); + public void configure (Cairo.Context ctx, LiveChart.Legend? legend); + public int height { get; set; } + public int width { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Font { + public Font (); + public void configure (Cairo.Context ctx); + public Gdk.RGBA color { get; set; } + public string face { get; set; } + public uint8 size { get; set; } + public Cairo.FontSlant slant { get; set; } + public Cairo.FontWeight weight { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Grid : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + public const int ABSCISSA_TIME_PADDING; + public Grid (); + protected void debug (Cairo.Context ctx); + protected void render_abscissa (Cairo.Context ctx, LiveChart.Config config); + protected void render_grid (Cairo.Context ctx, LiveChart.Config config); + protected void render_hgrid (Cairo.Context ctx, LiveChart.Config config); + protected void render_ordinate (Cairo.Context ctx, LiveChart.Config config); + protected void render_vgrid (Cairo.Context ctx, LiveChart.Config config); + protected void restore (Cairo.Context ctx); + protected void update_bounding_box (LiveChart.Config config); + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class HorizontalLegend : LiveChart.Legend { + public HorizontalLegend (); + protected void debug (Cairo.Context ctx); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart.h")] + public class Intersection : GLib.Object { + public double? entered_at; + public double? exited_at; + public Intersection (LiveChart.Region region, double start_x, double entered_at); + public void close (double x, double exited_at); + public bool is_closed (); + public bool is_open (); + public void update (double x); + public Intersection.without_entry_point (LiveChart.Region region, double start_x); + public double end_x { get; private set; } + public LiveChart.Region region { get; set construct; } + public double start_x { get; private set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Intersections : GLib.Object { + public Intersections (); + public void close (double x, double exited_at); + public void @foreach (Gee.ForallFunc f); + public new LiveChart.Intersection @get (int index); + public LiveChart.Region get_current_region (); + public bool has_an_opened_intersection (); + public void open (LiveChart.Region region, double x, double entered_at); + public void open_without_entrypoint (LiveChart.Region region, double x); + public int size (); + public void update (double x); + } + [CCode (cheader_filename = "livechart.h")] + public class Labels { + public Labels (); + public Cairo.TextExtents extents { get; set; } + public LiveChart.Font font { get; set; } + public bool visible { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public abstract class Legend : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + public LiveChart.Labels labels; + protected Gee.ArrayList series; + protected Legend (); + public void add_legend (LiveChart.Serie serie); + public abstract void draw (Cairo.Context ctx, LiveChart.Config config); + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Line : LiveChart.SerieRenderer { + public Line (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + protected LiveChart.Points draw_line (LiveChart.Points points, Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart.h")] + public class LineArea : LiveChart.Line { + public LineArea (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + public double area_alpha { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class MaxBoundLine : LiveChart.SerieRenderer { + public MaxBoundLine (); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + public MaxBoundLine.from_serie (LiveChart.Serie serie); + } + [CCode (cheader_filename = "livechart.h")] + public class MinBoundLine : LiveChart.SerieRenderer { + public MinBoundLine (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + public MinBoundLine.from_serie (LiveChart.Serie serie); + } + [CCode (cheader_filename = "livechart.h")] + public class NoopLegend : LiveChart.Legend { + public NoopLegend (); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart.h")] + public class Path : GLib.Object { + public LiveChart.Dash? dash; + public Path (double width = 0.5, Gdk.RGBA color = { 1.0, 1.0, 1.0, 1.0 }, bool visible = true, LiveChart.Dash? dash = null); + public void configure (Cairo.Context ctx); + public Gdk.RGBA color { get; set; } + public bool visible { get; set; } + public double width { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Points : GLib.Object { + public Points (); + public void add (LiveChart.Point point); + public LiveChart.Point after (int at); + public static LiveChart.Points create (LiveChart.Values values, LiveChart.Config config); + public LiveChart.Point first (); + public new LiveChart.Point @get (int at); + public LiveChart.Point last (); + public LiveChart.Bounds bounds { get; set construct; } + public double realtime_delta { get; set; } + public int size { get; } + } + [CCode (cheader_filename = "livechart.h")] + public class Region { + public Region (double floor, double ceil); + public Region.between (double above, double below); + public void handle (LiveChart.Intersections intersections, LiveChart.Point previous, LiveChart.Point current, LiveChart.GetIntersection get_intersection); + public bool has_at_least_one_point_within (LiveChart.Point previous, LiveChart.Point current); + public LiveChart.Region with_area_color (Gdk.RGBA color); + public LiveChart.Region with_line_color (Gdk.RGBA color); + public Gdk.RGBA area_color { get; set; } + public Gdk.RGBA line_color { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Serie : LiveChart.Colorable, LiveChart.Drawable, GLib.Object { + public Serie (string name, LiveChart.SerieRenderer renderer = new LiveChart.Line (new LiveChart.Values (1000))); + public void add (double value); + public void add_with_timestamp (double value, int64 timestamp); + public void clear (); + [Version (deprecated = true, deprecated_since = "1.7.1", replacement = "Serie.main_color property instead")] + public Gdk.RGBA get_main_color (); + public LiveChart.Values get_values (); + [Version (deprecated = true, deprecated_since = "1.7.1", replacement = "Serie.main_color property instead")] + public void set_main_color (Gdk.RGBA color); + public LiveChart.Path line { get; set; } + public string name { get; set; } + public signal void value_added (double value); + } + [CCode (cheader_filename = "livechart.h")] + public abstract class SerieRenderer : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + protected LiveChart.Values values; + protected SerieRenderer (); + protected void debug (Cairo.Context ctx); + public abstract void draw (Cairo.Context ctx, LiveChart.Config config); + public LiveChart.Values get_values (); + protected bool is_out_of_area (LiveChart.Point point); + public LiveChart.Path line { get; set; } + [Version (deprecated = true, deprecated_since = "1.8.0", replacement = "Serie.renderer.line.color")] + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Series : GLib.Object { + public Series (LiveChart.Chart chart); + public new LiveChart.Serie @get (int index) throws LiveChart.ChartError; + public LiveChart.Serie get_by_name (string name) throws LiveChart.ChartError; + public Gee.Iterator iterator (); + public LiveChart.Serie register (LiveChart.Serie serie); + } + [CCode (cheader_filename = "livechart.h")] + public class SmoothLine : LiveChart.SerieRenderer { + protected LiveChart.Intersections intersections; + public SmoothLine (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + protected void draw_regions_on_line (Cairo.Context ctx, LiveChart.Config config); + public Cairo.Path draw_smooth_line (LiveChart.Points points, Cairo.Context ctx, LiveChart.Config config); + public LiveChart.Region? region { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class SmoothLineArea : LiveChart.SmoothLine { + public SmoothLineArea (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + protected void draw_regions_on_area (Cairo.Context ctx, LiveChart.Config config); + public double area_alpha { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class ThresholdLine : LiveChart.SerieRenderer { + public ThresholdLine (double value); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + public double value { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class Values : Gee.LinkedList { + public Values (int buffer_size = 1000); + public new void add (LiveChart.TimestampedValue value); + public LiveChart.Bounds bounds { get; set construct; } + } + [CCode (cheader_filename = "livechart.h")] + public class XAxis { + public LiveChart.Path axis; + public LiveChart.Labels labels; + public LiveChart.Path lines; + public XAxis (); + public double get_ratio (); + public float tick_interval { get; set; } + public float tick_length { get; set; } + public bool visible { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public class YAxis { + public LiveChart.Path axis; + public double? fixed_max; + public LiveChart.Labels labels; + public LiveChart.Path lines; + [Version (deprecated = true, deprecated_since = "1.0.0b7", replacement = "ratio is always smart ;)")] + public bool smart_ratio; + public LiveChart.Ticks ticks; + public YAxis (string unit = ""); + public LiveChart.Bounds get_bounds (); + public string get_max_displayed_value (); + public double get_ratio (); + public LiveChart.Ticks get_ticks (); + public void update (int area_height); + public bool update_bounds (double value); + public float ratio_threshold { get; set; } + public float tick_interval { get; set; } + [Version (deprecated = true, deprecated_since = "1.0.0b7")] + public float tick_length { get; set; } + public string unit { get; set; } + public bool visible { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public interface Colorable : GLib.Object { + [Version (deprecated = true, deprecated_since = "1.8.0", replacement = "Serie.line.color")] + public abstract Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public interface Drawable : GLib.Object { + public abstract void draw (Cairo.Context ctx, LiveChart.Config config); + public abstract LiveChart.BoundingBox get_bounding_box (); + public abstract bool visible { get; set; } + } + [CCode (cheader_filename = "livechart.h")] + public interface Intersector { + public abstract void intersect (LiveChart.Intersections intersections, LiveChart.Point previous, LiveChart.Point current, T path); + } + [CCode (cheader_filename = "livechart.h")] + public struct BezierCurve { + public LiveChart.Coord c0; + public LiveChart.Coord c1; + public LiveChart.Coord c2; + public LiveChart.Coord c3; + } + [CCode (cheader_filename = "livechart.h")] + public struct Boundaries { + public LiveChart.Boundary x; + public LiveChart.Boundary y; + public int width; + public int height; + } + [CCode (cheader_filename = "livechart.h")] + public struct Boundary { + public int min; + public int max; + } + [CCode (cheader_filename = "livechart.h")] + public struct BoundingBox { + public double x; + public double y; + public double width; + public double height; + } + [CCode (cheader_filename = "livechart.h")] + public struct Coord { + public double x; + public double y; + } + [CCode (cheader_filename = "livechart.h")] + public struct Dash { + public double[]? dashes; + public double offset; + public Dash (); + } + [CCode (cheader_filename = "livechart.h")] + public struct Padding { + public LiveChart.AutoPadding smart; + public int top; + public int right; + public int bottom; + public int left; + public Padding (); + } + [CCode (cheader_filename = "livechart.h")] + public struct Point { + public double x; + public double y; + public double height; + public LiveChart.TimestampedValue data; + } + [CCode (cheader_filename = "livechart.h")] + public struct RegionHandleResult { + public LiveChart.RegionHandleStatus status; + public double at_value; + } + [CCode (cheader_filename = "livechart.h")] + public struct Segment { + public LiveChart.Coord from; + public LiveChart.Coord to; + } + [CCode (cheader_filename = "livechart.h")] + public struct Ticks { + public Gee.List values; + public Ticks (); + } + [CCode (cheader_filename = "livechart.h")] + public struct TimestampedValue { + public double timestamp; + public double value; + } + [CCode (cheader_filename = "livechart.h")] + [Flags] + public enum AutoPadding { + NONE, + TOP, + RIGHT, + BOTTOM, + LEFT + } + [CCode (cheader_filename = "livechart.h")] + public enum RegionHandleStatus { + ENTER, + EXIT, + WITHIN, + OUT + } + [CCode (cheader_filename = "livechart.h")] + public errordomain ChartError { + EXPORT_ERROR, + SERIE_NOT_FOUND + } + [CCode (cheader_filename = "livechart.h")] + public delegate LiveChart.Coord? GetIntersection (double at_value); + [CCode (cheader_filename = "livechart.h")] + public static LiveChart.BezierCurve build_bezier_curve_from_points (LiveChart.Point previous, LiveChart.Point target); + [CCode (cheader_filename = "livechart.h")] + public static float cap (float value); + [CCode (cheader_filename = "livechart.h")] + public static Gee.List find_intersections_between (LiveChart.Segment segment, LiveChart.BezierCurve bezier); + [CCode (cheader_filename = "livechart.h")] + public static string format_for_y_axis (string unit, float value); + [CCode (cheader_filename = "livechart.h")] + public static Gee.List golden_divisors (float value); + [CCode (cheader_filename = "livechart.h")] + public static bool has_fractional_part (float value); +} diff --git a/iPDC/lib/livechart_static.h b/iPDC/lib/livechart_static.h new file mode 100644 index 0000000..adda37c --- /dev/null +++ b/iPDC/lib/livechart_static.h @@ -0,0 +1,1846 @@ +/* livechart_static.h generated by valac 0.56.0, the Vala compiler, do not modify */ + +#ifndef __SRC_LIVECHART_STATIC_H__ +#define __SRC_LIVECHART_STATIC_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +G_BEGIN_DECLS + +#if !defined(VALA_EXTERN) +#if defined(_MSC_VER) +#define VALA_EXTERN __declspec(dllexport) extern +#elif __GNUC__ >= 4 +#define VALA_EXTERN __attribute__((visibility("default"))) extern +#else +#define VALA_EXTERN extern +#endif +#endif +#define LIVE_CHART_GRID_ABSCISSA_TIME_PADDING 5 +#define LIVE_CHART_STATIC_STATIC_GRID_ABSCISSA_TIME_PADDING 5 + +#define LIVE_CHART_TYPE_DRAWABLE (live_chart_drawable_get_type ()) +#define LIVE_CHART_DRAWABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_DRAWABLE, LiveChartDrawable)) +#define LIVE_CHART_IS_DRAWABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_DRAWABLE)) +#define LIVE_CHART_DRAWABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LIVE_CHART_TYPE_DRAWABLE, LiveChartDrawableIface)) + +typedef struct _LiveChartDrawable LiveChartDrawable; +typedef struct _LiveChartDrawableIface LiveChartDrawableIface; + +#define LIVE_CHART_TYPE_CONFIG (live_chart_config_get_type ()) +#define LIVE_CHART_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_CONFIG, LiveChartConfig)) +#define LIVE_CHART_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_CONFIG, LiveChartConfigClass)) +#define LIVE_CHART_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_CONFIG)) +#define LIVE_CHART_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_CONFIG)) +#define LIVE_CHART_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_CONFIG, LiveChartConfigClass)) + +typedef struct _LiveChartConfig LiveChartConfig; +typedef struct _LiveChartConfigClass LiveChartConfigClass; + +#define LIVE_CHART_TYPE_BOUNDING_BOX (live_chart_bounding_box_get_type ()) +typedef struct _LiveChartBoundingBox LiveChartBoundingBox; + +#define LIVE_CHART_TYPE_AREA (live_chart_area_get_type ()) +#define LIVE_CHART_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_AREA, LiveChartArea)) +#define LIVE_CHART_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_AREA, LiveChartAreaClass)) +#define LIVE_CHART_IS_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_AREA)) +#define LIVE_CHART_IS_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_AREA)) +#define LIVE_CHART_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_AREA, LiveChartAreaClass)) + +typedef struct _LiveChartArea LiveChartArea; +typedef struct _LiveChartAreaClass LiveChartAreaClass; +typedef struct _LiveChartAreaPrivate LiveChartAreaPrivate; + +#define LIVE_CHART_TYPE_POINTS (live_chart_points_get_type ()) +#define LIVE_CHART_POINTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_POINTS, LiveChartPoints)) +#define LIVE_CHART_POINTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_POINTS, LiveChartPointsClass)) +#define LIVE_CHART_IS_POINTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_POINTS)) +#define LIVE_CHART_IS_POINTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_POINTS)) +#define LIVE_CHART_POINTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_POINTS, LiveChartPointsClass)) + +typedef struct _LiveChartPoints LiveChartPoints; +typedef struct _LiveChartPointsClass LiveChartPointsClass; + +#define LIVE_CHART_TYPE_XAXIS (live_chart_xaxis_get_type ()) +#define LIVE_CHART_XAXIS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_XAXIS, LiveChartXAxis)) +#define LIVE_CHART_XAXIS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_XAXIS, LiveChartXAxisClass)) +#define LIVE_CHART_IS_XAXIS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_XAXIS)) +#define LIVE_CHART_IS_XAXIS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_XAXIS)) +#define LIVE_CHART_XAXIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_XAXIS, LiveChartXAxisClass)) + +typedef struct _LiveChartXAxis LiveChartXAxis; +typedef struct _LiveChartXAxisClass LiveChartXAxisClass; +typedef struct _LiveChartXAxisPrivate LiveChartXAxisPrivate; + +#define LIVE_CHART_TYPE_LABELS (live_chart_labels_get_type ()) +#define LIVE_CHART_LABELS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_LABELS, LiveChartLabels)) +#define LIVE_CHART_LABELS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_LABELS, LiveChartLabelsClass)) +#define LIVE_CHART_IS_LABELS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_LABELS)) +#define LIVE_CHART_IS_LABELS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_LABELS)) +#define LIVE_CHART_LABELS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_LABELS, LiveChartLabelsClass)) + +typedef struct _LiveChartLabels LiveChartLabels; +typedef struct _LiveChartLabelsClass LiveChartLabelsClass; + +#define LIVE_CHART_TYPE_PATH (live_chart_path_get_type ()) +#define LIVE_CHART_PATH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_PATH, LiveChartPath)) +#define LIVE_CHART_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_PATH, LiveChartPathClass)) +#define LIVE_CHART_IS_PATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_PATH)) +#define LIVE_CHART_IS_PATH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_PATH)) +#define LIVE_CHART_PATH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_PATH, LiveChartPathClass)) + +typedef struct _LiveChartPath LiveChartPath; +typedef struct _LiveChartPathClass LiveChartPathClass; + +#define LIVE_CHART_TYPE_TICKS (live_chart_ticks_get_type ()) +typedef struct _LiveChartTicks LiveChartTicks; + +#define LIVE_CHART_TYPE_YAXIS (live_chart_yaxis_get_type ()) +#define LIVE_CHART_YAXIS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_YAXIS, LiveChartYAxis)) +#define LIVE_CHART_YAXIS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_YAXIS, LiveChartYAxisClass)) +#define LIVE_CHART_IS_YAXIS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_YAXIS)) +#define LIVE_CHART_IS_YAXIS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_YAXIS)) +#define LIVE_CHART_YAXIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_YAXIS, LiveChartYAxisClass)) + +typedef struct _LiveChartYAxis LiveChartYAxis; +typedef struct _LiveChartYAxisClass LiveChartYAxisClass; +typedef struct _LiveChartYAxisPrivate LiveChartYAxisPrivate; + +#define LIVE_CHART_TYPE_BOUNDS (live_chart_bounds_get_type ()) +#define LIVE_CHART_BOUNDS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_BOUNDS, LiveChartBounds)) +#define LIVE_CHART_BOUNDS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_BOUNDS, LiveChartBoundsClass)) +#define LIVE_CHART_IS_BOUNDS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_BOUNDS)) +#define LIVE_CHART_IS_BOUNDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_BOUNDS)) +#define LIVE_CHART_BOUNDS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_BOUNDS, LiveChartBoundsClass)) + +typedef struct _LiveChartBounds LiveChartBounds; +typedef struct _LiveChartBoundsClass LiveChartBoundsClass; + +#define LIVE_CHART_TYPE_BACKGROUND (live_chart_background_get_type ()) +#define LIVE_CHART_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_BACKGROUND, LiveChartBackground)) +#define LIVE_CHART_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_BACKGROUND, LiveChartBackgroundClass)) +#define LIVE_CHART_IS_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_BACKGROUND)) +#define LIVE_CHART_IS_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_BACKGROUND)) +#define LIVE_CHART_BACKGROUND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_BACKGROUND, LiveChartBackgroundClass)) + +typedef struct _LiveChartBackground LiveChartBackground; +typedef struct _LiveChartBackgroundClass LiveChartBackgroundClass; +typedef struct _LiveChartBackgroundPrivate LiveChartBackgroundPrivate; + +#define LIVE_CHART_TYPE_SERIE_RENDERER (live_chart_serie_renderer_get_type ()) +#define LIVE_CHART_SERIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRenderer)) +#define LIVE_CHART_SERIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRendererClass)) +#define LIVE_CHART_IS_SERIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SERIE_RENDERER)) +#define LIVE_CHART_IS_SERIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SERIE_RENDERER)) +#define LIVE_CHART_SERIE_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SERIE_RENDERER, LiveChartSerieRendererClass)) + +typedef struct _LiveChartSerieRenderer LiveChartSerieRenderer; +typedef struct _LiveChartSerieRendererClass LiveChartSerieRendererClass; +typedef struct _LiveChartSerieRendererPrivate LiveChartSerieRendererPrivate; + +#define LIVE_CHART_TYPE_VALUES (live_chart_values_get_type ()) +#define LIVE_CHART_VALUES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_VALUES, LiveChartValues)) +#define LIVE_CHART_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_VALUES, LiveChartValuesClass)) +#define LIVE_CHART_IS_VALUES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_VALUES)) +#define LIVE_CHART_IS_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_VALUES)) +#define LIVE_CHART_VALUES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_VALUES, LiveChartValuesClass)) + +typedef struct _LiveChartValues LiveChartValues; +typedef struct _LiveChartValuesClass LiveChartValuesClass; + +#define LIVE_CHART_TYPE_BAR (live_chart_bar_get_type ()) +#define LIVE_CHART_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_BAR, LiveChartBar)) +#define LIVE_CHART_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_BAR, LiveChartBarClass)) +#define LIVE_CHART_IS_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_BAR)) +#define LIVE_CHART_IS_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_BAR)) +#define LIVE_CHART_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_BAR, LiveChartBarClass)) + +typedef struct _LiveChartBar LiveChartBar; +typedef struct _LiveChartBarClass LiveChartBarClass; +typedef struct _LiveChartBarPrivate LiveChartBarPrivate; + +#define LIVE_CHART_TYPE_SEGMENT (live_chart_segment_get_type ()) +typedef struct _LiveChartSegment LiveChartSegment; + +#define LIVE_CHART_TYPE_COORD (live_chart_coord_get_type ()) +typedef struct _LiveChartCoord LiveChartCoord; + +#define LIVE_CHART_TYPE_BEZIER_CURVE (live_chart_bezier_curve_get_type ()) +typedef struct _LiveChartBezierCurve LiveChartBezierCurve; +typedef struct _LiveChartBoundsPrivate LiveChartBoundsPrivate; + +#define LIVE_CHART_TYPE_CHART_ERROR (live_chart_chart_error_get_type ()) + +#define LIVE_CHART_TYPE_CHART (live_chart_chart_get_type ()) +#define LIVE_CHART_CHART(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_CHART, LiveChartChart)) +#define LIVE_CHART_CHART_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_CHART, LiveChartChartClass)) +#define LIVE_CHART_IS_CHART(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_CHART)) +#define LIVE_CHART_IS_CHART_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_CHART)) +#define LIVE_CHART_CHART_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_CHART, LiveChartChartClass)) + +typedef struct _LiveChartChart LiveChartChart; +typedef struct _LiveChartChartClass LiveChartChartClass; +typedef struct _LiveChartChartPrivate LiveChartChartPrivate; + +#define LIVE_CHART_TYPE_SERIES (live_chart_series_get_type ()) +#define LIVE_CHART_SERIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SERIES, LiveChartSeries)) +#define LIVE_CHART_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SERIES, LiveChartSeriesClass)) +#define LIVE_CHART_IS_SERIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SERIES)) +#define LIVE_CHART_IS_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SERIES)) +#define LIVE_CHART_SERIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SERIES, LiveChartSeriesClass)) + +typedef struct _LiveChartSeries LiveChartSeries; +typedef struct _LiveChartSeriesClass LiveChartSeriesClass; + +#define LIVE_CHART_TYPE_SERIE (live_chart_serie_get_type ()) +#define LIVE_CHART_SERIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SERIE, LiveChartSerie)) +#define LIVE_CHART_SERIE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SERIE, LiveChartSerieClass)) +#define LIVE_CHART_IS_SERIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SERIE)) +#define LIVE_CHART_IS_SERIE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SERIE)) +#define LIVE_CHART_SERIE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SERIE, LiveChartSerieClass)) + +typedef struct _LiveChartSerie LiveChartSerie; +typedef struct _LiveChartSerieClass LiveChartSerieClass; + +#define LIVE_CHART_TYPE_GRID (live_chart_grid_get_type ()) +#define LIVE_CHART_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_GRID, LiveChartGrid)) +#define LIVE_CHART_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_GRID, LiveChartGridClass)) +#define LIVE_CHART_IS_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_GRID)) +#define LIVE_CHART_IS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_GRID)) +#define LIVE_CHART_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_GRID, LiveChartGridClass)) + +typedef struct _LiveChartGrid LiveChartGrid; +typedef struct _LiveChartGridClass LiveChartGridClass; + +#define LIVE_CHART_TYPE_LEGEND (live_chart_legend_get_type ()) +#define LIVE_CHART_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_LEGEND, LiveChartLegend)) +#define LIVE_CHART_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_LEGEND, LiveChartLegendClass)) +#define LIVE_CHART_IS_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_LEGEND)) +#define LIVE_CHART_IS_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_LEGEND)) +#define LIVE_CHART_LEGEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_LEGEND, LiveChartLegendClass)) + +typedef struct _LiveChartLegend LiveChartLegend; +typedef struct _LiveChartLegendClass LiveChartLegendClass; +typedef enum { + LIVE_CHART_AUTO_PADDING_NONE = 1 << 0, + LIVE_CHART_AUTO_PADDING_TOP = 1 << 1, + LIVE_CHART_AUTO_PADDING_RIGHT = 1 << 2, + LIVE_CHART_AUTO_PADDING_BOTTOM = 1 << 3, + LIVE_CHART_AUTO_PADDING_LEFT = 1 << 4 +} LiveChartAutoPadding; + +#define LIVE_CHART_TYPE_AUTO_PADDING (live_chart_auto_padding_get_type ()) + +#define LIVE_CHART_TYPE_PADDING (live_chart_padding_get_type ()) +typedef struct _LiveChartPadding LiveChartPadding; + +#define LIVE_CHART_TYPE_BOUNDARY (live_chart_boundary_get_type ()) +typedef struct _LiveChartBoundary LiveChartBoundary; + +#define LIVE_CHART_TYPE_BOUNDARIES (live_chart_boundaries_get_type ()) +typedef struct _LiveChartBoundaries LiveChartBoundaries; +typedef struct _LiveChartConfigPrivate LiveChartConfigPrivate; + +#define LIVE_CHART_TYPE_COLORABLE (live_chart_colorable_get_type ()) +#define LIVE_CHART_COLORABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_COLORABLE, LiveChartColorable)) +#define LIVE_CHART_IS_COLORABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_COLORABLE)) +#define LIVE_CHART_COLORABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LIVE_CHART_TYPE_COLORABLE, LiveChartColorableIface)) + +typedef struct _LiveChartColorable LiveChartColorable; +typedef struct _LiveChartColorableIface LiveChartColorableIface; + +#define LIVE_CHART_TYPE_FONT (live_chart_font_get_type ()) +#define LIVE_CHART_FONT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_FONT, LiveChartFont)) +#define LIVE_CHART_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_FONT, LiveChartFontClass)) +#define LIVE_CHART_IS_FONT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_FONT)) +#define LIVE_CHART_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_FONT)) +#define LIVE_CHART_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_FONT, LiveChartFontClass)) + +typedef struct _LiveChartFont LiveChartFont; +typedef struct _LiveChartFontClass LiveChartFontClass; +typedef struct _LiveChartFontPrivate LiveChartFontPrivate; + +#define LIVE_CHART_TYPE_POINT (live_chart_point_get_type ()) +typedef struct _LiveChartPoint LiveChartPoint; + +#define LIVE_CHART_TYPE_TIMESTAMPED_VALUE (live_chart_timestamped_value_get_type ()) +typedef struct _LiveChartTimestampedValue LiveChartTimestampedValue; +typedef struct _LiveChartGridPrivate LiveChartGridPrivate; + +#define LIVE_CHART_TYPE_INTERSECTIONS (live_chart_intersections_get_type ()) +#define LIVE_CHART_INTERSECTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_INTERSECTIONS, LiveChartIntersections)) +#define LIVE_CHART_INTERSECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_INTERSECTIONS, LiveChartIntersectionsClass)) +#define LIVE_CHART_IS_INTERSECTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_INTERSECTIONS)) +#define LIVE_CHART_IS_INTERSECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_INTERSECTIONS)) +#define LIVE_CHART_INTERSECTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_INTERSECTIONS, LiveChartIntersectionsClass)) + +typedef struct _LiveChartIntersections LiveChartIntersections; +typedef struct _LiveChartIntersectionsClass LiveChartIntersectionsClass; +typedef struct _LiveChartIntersectionsPrivate LiveChartIntersectionsPrivate; + +#define LIVE_CHART_TYPE_REGION (live_chart_region_get_type ()) +#define LIVE_CHART_REGION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_REGION, LiveChartRegion)) +#define LIVE_CHART_REGION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_REGION, LiveChartRegionClass)) +#define LIVE_CHART_IS_REGION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_REGION)) +#define LIVE_CHART_IS_REGION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_REGION)) +#define LIVE_CHART_REGION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_REGION, LiveChartRegionClass)) + +typedef struct _LiveChartRegion LiveChartRegion; +typedef struct _LiveChartRegionClass LiveChartRegionClass; + +#define LIVE_CHART_TYPE_INTERSECTION (live_chart_intersection_get_type ()) +#define LIVE_CHART_INTERSECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersection)) +#define LIVE_CHART_INTERSECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersectionClass)) +#define LIVE_CHART_IS_INTERSECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_INTERSECTION)) +#define LIVE_CHART_IS_INTERSECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_INTERSECTION)) +#define LIVE_CHART_INTERSECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_INTERSECTION, LiveChartIntersectionClass)) + +typedef struct _LiveChartIntersection LiveChartIntersection; +typedef struct _LiveChartIntersectionClass LiveChartIntersectionClass; +typedef struct _LiveChartIntersectionPrivate LiveChartIntersectionPrivate; + +#define LIVE_CHART_TYPE_INTERSECTOR (live_chart_intersector_get_type ()) +#define LIVE_CHART_INTERSECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_INTERSECTOR, LiveChartIntersector)) +#define LIVE_CHART_IS_INTERSECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_INTERSECTOR)) +#define LIVE_CHART_INTERSECTOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LIVE_CHART_TYPE_INTERSECTOR, LiveChartIntersectorIface)) + +typedef struct _LiveChartIntersector LiveChartIntersector; +typedef struct _LiveChartIntersectorIface LiveChartIntersectorIface; + +#define LIVE_CHART_TYPE_BEZIER_INTERSECTOR (live_chart_bezier_intersector_get_type ()) +#define LIVE_CHART_BEZIER_INTERSECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_BEZIER_INTERSECTOR, LiveChartBezierIntersector)) +#define LIVE_CHART_BEZIER_INTERSECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_BEZIER_INTERSECTOR, LiveChartBezierIntersectorClass)) +#define LIVE_CHART_IS_BEZIER_INTERSECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_BEZIER_INTERSECTOR)) +#define LIVE_CHART_IS_BEZIER_INTERSECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_BEZIER_INTERSECTOR)) +#define LIVE_CHART_BEZIER_INTERSECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_BEZIER_INTERSECTOR, LiveChartBezierIntersectorClass)) + +typedef struct _LiveChartBezierIntersector LiveChartBezierIntersector; +typedef struct _LiveChartBezierIntersectorClass LiveChartBezierIntersectorClass; +typedef struct _LiveChartBezierIntersectorPrivate LiveChartBezierIntersectorPrivate; +typedef struct _LiveChartLabelsPrivate LiveChartLabelsPrivate; +typedef struct _LiveChartLegendPrivate LiveChartLegendPrivate; + +#define LIVE_CHART_TYPE_HORIZONTAL_LEGEND (live_chart_horizontal_legend_get_type ()) +#define LIVE_CHART_HORIZONTAL_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_HORIZONTAL_LEGEND, LiveChartHorizontalLegend)) +#define LIVE_CHART_HORIZONTAL_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_HORIZONTAL_LEGEND, LiveChartHorizontalLegendClass)) +#define LIVE_CHART_IS_HORIZONTAL_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_HORIZONTAL_LEGEND)) +#define LIVE_CHART_IS_HORIZONTAL_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_HORIZONTAL_LEGEND)) +#define LIVE_CHART_HORIZONTAL_LEGEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_HORIZONTAL_LEGEND, LiveChartHorizontalLegendClass)) + +typedef struct _LiveChartHorizontalLegend LiveChartHorizontalLegend; +typedef struct _LiveChartHorizontalLegendClass LiveChartHorizontalLegendClass; +typedef struct _LiveChartHorizontalLegendPrivate LiveChartHorizontalLegendPrivate; + +#define LIVE_CHART_TYPE_NOOP_LEGEND (live_chart_noop_legend_get_type ()) +#define LIVE_CHART_NOOP_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_NOOP_LEGEND, LiveChartNoopLegend)) +#define LIVE_CHART_NOOP_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_NOOP_LEGEND, LiveChartNoopLegendClass)) +#define LIVE_CHART_IS_NOOP_LEGEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_NOOP_LEGEND)) +#define LIVE_CHART_IS_NOOP_LEGEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_NOOP_LEGEND)) +#define LIVE_CHART_NOOP_LEGEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_NOOP_LEGEND, LiveChartNoopLegendClass)) + +typedef struct _LiveChartNoopLegend LiveChartNoopLegend; +typedef struct _LiveChartNoopLegendClass LiveChartNoopLegendClass; +typedef struct _LiveChartNoopLegendPrivate LiveChartNoopLegendPrivate; + +#define LIVE_CHART_TYPE_LINE (live_chart_line_get_type ()) +#define LIVE_CHART_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_LINE, LiveChartLine)) +#define LIVE_CHART_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_LINE, LiveChartLineClass)) +#define LIVE_CHART_IS_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_LINE)) +#define LIVE_CHART_IS_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_LINE)) +#define LIVE_CHART_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_LINE, LiveChartLineClass)) + +typedef struct _LiveChartLine LiveChartLine; +typedef struct _LiveChartLineClass LiveChartLineClass; +typedef struct _LiveChartLinePrivate LiveChartLinePrivate; + +#define LIVE_CHART_TYPE_LINE_AREA (live_chart_line_area_get_type ()) +#define LIVE_CHART_LINE_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_LINE_AREA, LiveChartLineArea)) +#define LIVE_CHART_LINE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_LINE_AREA, LiveChartLineAreaClass)) +#define LIVE_CHART_IS_LINE_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_LINE_AREA)) +#define LIVE_CHART_IS_LINE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_LINE_AREA)) +#define LIVE_CHART_LINE_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_LINE_AREA, LiveChartLineAreaClass)) + +typedef struct _LiveChartLineArea LiveChartLineArea; +typedef struct _LiveChartLineAreaClass LiveChartLineAreaClass; +typedef struct _LiveChartLineAreaPrivate LiveChartLineAreaPrivate; + +#define LIVE_CHART_TYPE_MAX_BOUND_LINE (live_chart_max_bound_line_get_type ()) +#define LIVE_CHART_MAX_BOUND_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_MAX_BOUND_LINE, LiveChartMaxBoundLine)) +#define LIVE_CHART_MAX_BOUND_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_MAX_BOUND_LINE, LiveChartMaxBoundLineClass)) +#define LIVE_CHART_IS_MAX_BOUND_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_MAX_BOUND_LINE)) +#define LIVE_CHART_IS_MAX_BOUND_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_MAX_BOUND_LINE)) +#define LIVE_CHART_MAX_BOUND_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_MAX_BOUND_LINE, LiveChartMaxBoundLineClass)) + +typedef struct _LiveChartMaxBoundLine LiveChartMaxBoundLine; +typedef struct _LiveChartMaxBoundLineClass LiveChartMaxBoundLineClass; +typedef struct _LiveChartMaxBoundLinePrivate LiveChartMaxBoundLinePrivate; + +#define LIVE_CHART_TYPE_MIN_BOUND_LINE (live_chart_min_bound_line_get_type ()) +#define LIVE_CHART_MIN_BOUND_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_MIN_BOUND_LINE, LiveChartMinBoundLine)) +#define LIVE_CHART_MIN_BOUND_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_MIN_BOUND_LINE, LiveChartMinBoundLineClass)) +#define LIVE_CHART_IS_MIN_BOUND_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_MIN_BOUND_LINE)) +#define LIVE_CHART_IS_MIN_BOUND_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_MIN_BOUND_LINE)) +#define LIVE_CHART_MIN_BOUND_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_MIN_BOUND_LINE, LiveChartMinBoundLineClass)) + +typedef struct _LiveChartMinBoundLine LiveChartMinBoundLine; +typedef struct _LiveChartMinBoundLineClass LiveChartMinBoundLineClass; +typedef struct _LiveChartMinBoundLinePrivate LiveChartMinBoundLinePrivate; + +#define LIVE_CHART_TYPE_DASH (live_chart_dash_get_type ()) +typedef struct _LiveChartDash LiveChartDash; +typedef struct _LiveChartPathPrivate LiveChartPathPrivate; +typedef struct _LiveChartPointsPrivate LiveChartPointsPrivate; +typedef enum { + LIVE_CHART_REGION_HANDLE_STATUS_ENTER, + LIVE_CHART_REGION_HANDLE_STATUS_EXIT, + LIVE_CHART_REGION_HANDLE_STATUS_WITHIN, + LIVE_CHART_REGION_HANDLE_STATUS_OUT +} LiveChartRegionHandleStatus; + +#define LIVE_CHART_TYPE_REGION_HANDLE_STATUS (live_chart_region_handle_status_get_type ()) + +#define LIVE_CHART_TYPE_REGION_HANDLE_RESULT (live_chart_region_handle_result_get_type ()) +typedef struct _LiveChartRegionHandleResult LiveChartRegionHandleResult; +typedef LiveChartCoord* (*LiveChartGetIntersection) (gdouble at_value, gpointer user_data); +typedef struct _LiveChartRegionPrivate LiveChartRegionPrivate; +typedef struct _LiveChartSeriePrivate LiveChartSeriePrivate; +typedef struct _LiveChartSeriesPrivate LiveChartSeriesPrivate; + +#define LIVE_CHART_TYPE_SMOOTH_LINE (live_chart_smooth_line_get_type ()) +#define LIVE_CHART_SMOOTH_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLine)) +#define LIVE_CHART_SMOOTH_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLineClass)) +#define LIVE_CHART_IS_SMOOTH_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SMOOTH_LINE)) +#define LIVE_CHART_IS_SMOOTH_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SMOOTH_LINE)) +#define LIVE_CHART_SMOOTH_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SMOOTH_LINE, LiveChartSmoothLineClass)) + +typedef struct _LiveChartSmoothLine LiveChartSmoothLine; +typedef struct _LiveChartSmoothLineClass LiveChartSmoothLineClass; +typedef struct _LiveChartSmoothLinePrivate LiveChartSmoothLinePrivate; + +#define LIVE_CHART_TYPE_SMOOTH_LINE_AREA (live_chart_smooth_line_area_get_type ()) +#define LIVE_CHART_SMOOTH_LINE_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineArea)) +#define LIVE_CHART_SMOOTH_LINE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineAreaClass)) +#define LIVE_CHART_IS_SMOOTH_LINE_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_SMOOTH_LINE_AREA)) +#define LIVE_CHART_IS_SMOOTH_LINE_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_SMOOTH_LINE_AREA)) +#define LIVE_CHART_SMOOTH_LINE_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_SMOOTH_LINE_AREA, LiveChartSmoothLineAreaClass)) + +typedef struct _LiveChartSmoothLineArea LiveChartSmoothLineArea; +typedef struct _LiveChartSmoothLineAreaClass LiveChartSmoothLineAreaClass; +typedef struct _LiveChartSmoothLineAreaPrivate LiveChartSmoothLineAreaPrivate; + +#define LIVE_CHART_TYPE_THRESHOLD_LINE (live_chart_threshold_line_get_type ()) +#define LIVE_CHART_THRESHOLD_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLine)) +#define LIVE_CHART_THRESHOLD_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLineClass)) +#define LIVE_CHART_IS_THRESHOLD_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_TYPE_THRESHOLD_LINE)) +#define LIVE_CHART_IS_THRESHOLD_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_TYPE_THRESHOLD_LINE)) +#define LIVE_CHART_THRESHOLD_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_TYPE_THRESHOLD_LINE, LiveChartThresholdLineClass)) + +typedef struct _LiveChartThresholdLine LiveChartThresholdLine; +typedef struct _LiveChartThresholdLineClass LiveChartThresholdLineClass; +typedef struct _LiveChartThresholdLinePrivate LiveChartThresholdLinePrivate; +typedef struct _LiveChartValuesPrivate LiveChartValuesPrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_CHART (live_chart_static_static_chart_get_type ()) +#define LIVE_CHART_STATIC_STATIC_CHART(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChart)) +#define LIVE_CHART_STATIC_STATIC_CHART_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChartClass)) +#define LIVE_CHART_STATIC_IS_STATIC_CHART(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_CHART)) +#define LIVE_CHART_STATIC_IS_STATIC_CHART_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_CHART)) +#define LIVE_CHART_STATIC_STATIC_CHART_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_CHART, LiveChartStaticStaticChartClass)) + +typedef struct _LiveChartStaticStaticChart LiveChartStaticStaticChart; +typedef struct _LiveChartStaticStaticChartClass LiveChartStaticStaticChartClass; +typedef struct _LiveChartStaticStaticChartPrivate LiveChartStaticStaticChartPrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_SERIES (live_chart_static_static_series_get_type ()) +#define LIVE_CHART_STATIC_STATIC_SERIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIES, LiveChartStaticStaticSeries)) +#define LIVE_CHART_STATIC_STATIC_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIES, LiveChartStaticStaticSeriesClass)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIES)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIES)) +#define LIVE_CHART_STATIC_STATIC_SERIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIES, LiveChartStaticStaticSeriesClass)) + +typedef struct _LiveChartStaticStaticSeries LiveChartStaticStaticSeries; +typedef struct _LiveChartStaticStaticSeriesClass LiveChartStaticStaticSeriesClass; + +#define LIVE_CHART_STATIC_TYPE_STATIC_SERIE (live_chart_static_static_serie_get_type ()) +#define LIVE_CHART_STATIC_STATIC_SERIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerie)) +#define LIVE_CHART_STATIC_STATIC_SERIE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerieClass)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIE)) +#define LIVE_CHART_STATIC_STATIC_SERIE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE, LiveChartStaticStaticSerieClass)) + +typedef struct _LiveChartStaticStaticSerie LiveChartStaticStaticSerie; +typedef struct _LiveChartStaticStaticSerieClass LiveChartStaticStaticSerieClass; + +#define LIVE_CHART_STATIC_TYPE_STATIC_GRID (live_chart_static_static_grid_get_type ()) +#define LIVE_CHART_STATIC_STATIC_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGrid)) +#define LIVE_CHART_STATIC_STATIC_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGridClass)) +#define LIVE_CHART_STATIC_IS_STATIC_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_GRID)) +#define LIVE_CHART_STATIC_IS_STATIC_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_GRID)) +#define LIVE_CHART_STATIC_STATIC_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_GRID, LiveChartStaticStaticGridClass)) + +typedef struct _LiveChartStaticStaticGrid LiveChartStaticStaticGrid; +typedef struct _LiveChartStaticStaticGridClass LiveChartStaticStaticGridClass; +typedef struct _LiveChartStaticStaticSeriesPrivate LiveChartStaticStaticSeriesPrivate; +typedef struct _LiveChartStaticStaticSeriePrivate LiveChartStaticStaticSeriePrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER (live_chart_static_static_serie_renderer_get_type ()) +#define LIVE_CHART_STATIC_STATIC_SERIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRenderer)) +#define LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRendererClass)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER)) +#define LIVE_CHART_STATIC_IS_STATIC_SERIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER)) +#define LIVE_CHART_STATIC_STATIC_SERIE_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_SERIE_RENDERER, LiveChartStaticStaticSerieRendererClass)) + +typedef struct _LiveChartStaticStaticSerieRenderer LiveChartStaticStaticSerieRenderer; +typedef struct _LiveChartStaticStaticSerieRendererClass LiveChartStaticStaticSerieRendererClass; + +#define LIVE_CHART_STATIC_TYPE_STATIC_VALUES (live_chart_static_static_values_get_type ()) +#define LIVE_CHART_STATIC_STATIC_VALUES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValues)) +#define LIVE_CHART_STATIC_STATIC_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValuesClass)) +#define LIVE_CHART_STATIC_IS_STATIC_VALUES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_VALUES)) +#define LIVE_CHART_STATIC_IS_STATIC_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_VALUES)) +#define LIVE_CHART_STATIC_STATIC_VALUES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_VALUES, LiveChartStaticStaticValuesClass)) + +typedef struct _LiveChartStaticStaticValues LiveChartStaticStaticValues; +typedef struct _LiveChartStaticStaticValuesClass LiveChartStaticStaticValuesClass; + +#define LIVE_CHART_STATIC_TYPE_NAMED_VALUE (live_chart_static_named_value_get_type ()) +typedef struct _LiveChartStaticNamedValue LiveChartStaticNamedValue; +typedef struct _LiveChartStaticStaticValuesPrivate LiveChartStaticStaticValuesPrivate; +typedef struct _LiveChartStaticStaticSerieRendererPrivate LiveChartStaticStaticSerieRendererPrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_LINE (live_chart_static_static_line_get_type ()) +#define LIVE_CHART_STATIC_STATIC_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_LINE, LiveChartStaticStaticLine)) +#define LIVE_CHART_STATIC_STATIC_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_LINE, LiveChartStaticStaticLineClass)) +#define LIVE_CHART_STATIC_IS_STATIC_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_LINE)) +#define LIVE_CHART_STATIC_IS_STATIC_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_LINE)) +#define LIVE_CHART_STATIC_STATIC_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_LINE, LiveChartStaticStaticLineClass)) + +typedef struct _LiveChartStaticStaticLine LiveChartStaticStaticLine; +typedef struct _LiveChartStaticStaticLineClass LiveChartStaticStaticLineClass; +typedef struct _LiveChartStaticStaticLinePrivate LiveChartStaticStaticLinePrivate; + +#define LIVE_CHART_STATIC_TYPE_STATIC_POINTS (live_chart_static_static_points_get_type ()) +#define LIVE_CHART_STATIC_STATIC_POINTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPoints)) +#define LIVE_CHART_STATIC_STATIC_POINTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPointsClass)) +#define LIVE_CHART_STATIC_IS_STATIC_POINTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIVE_CHART_STATIC_TYPE_STATIC_POINTS)) +#define LIVE_CHART_STATIC_IS_STATIC_POINTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIVE_CHART_STATIC_TYPE_STATIC_POINTS)) +#define LIVE_CHART_STATIC_STATIC_POINTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIVE_CHART_STATIC_TYPE_STATIC_POINTS, LiveChartStaticStaticPointsClass)) + +typedef struct _LiveChartStaticStaticPoints LiveChartStaticStaticPoints; +typedef struct _LiveChartStaticStaticPointsClass LiveChartStaticStaticPointsClass; +typedef struct _LiveChartStaticStaticGridPrivate LiveChartStaticStaticGridPrivate; +typedef struct _LiveChartStaticStaticPointsPrivate LiveChartStaticStaticPointsPrivate; + +struct _LiveChartBoundingBox { + gdouble x; + gdouble y; + gdouble width; + gdouble height; +}; + +struct _LiveChartDrawableIface { + GTypeInterface parent_iface; + void (*draw) (LiveChartDrawable* self, cairo_t* ctx, LiveChartConfig* config); + void (*get_bounding_box) (LiveChartDrawable* self, LiveChartBoundingBox* result); + gboolean (*get_visible) (LiveChartDrawable* self); + void (*set_visible) (LiveChartDrawable* self, gboolean value); +}; + +struct _LiveChartArea { + GObject parent_instance; + LiveChartAreaPrivate * priv; +}; + +struct _LiveChartAreaClass { + GObjectClass parent_class; +}; + +struct _LiveChartXAxis { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartXAxisPrivate * priv; + LiveChartLabels* labels; + LiveChartPath* axis; + LiveChartPath* lines; +}; + +struct _LiveChartXAxisClass { + GTypeClass parent_class; + void (*finalize) (LiveChartXAxis *self); +}; + +struct _LiveChartTicks { + GeeList* values; +}; + +struct _LiveChartYAxis { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartYAxisPrivate * priv; + LiveChartLabels* labels; + LiveChartPath* axis; + LiveChartPath* lines; + gboolean smart_ratio G_GNUC_DEPRECATED ; + gdouble* fixed_max; + LiveChartTicks ticks; +}; + +struct _LiveChartYAxisClass { + GTypeClass parent_class; + void (*finalize) (LiveChartYAxis *self); +}; + +struct _LiveChartBackground { + GObject parent_instance; + LiveChartBackgroundPrivate * priv; +}; + +struct _LiveChartBackgroundClass { + GObjectClass parent_class; +}; + +struct _LiveChartSerieRenderer { + GObject parent_instance; + LiveChartSerieRendererPrivate * priv; + LiveChartBoundingBox bounding_box; + LiveChartValues* values; +}; + +struct _LiveChartSerieRendererClass { + GObjectClass parent_class; + void (*draw) (LiveChartSerieRenderer* self, cairo_t* ctx, LiveChartConfig* config); +}; + +struct _LiveChartBar { + LiveChartSerieRenderer parent_instance; + LiveChartBarPrivate * priv; +}; + +struct _LiveChartBarClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartCoord { + gdouble x; + gdouble y; +}; + +struct _LiveChartSegment { + LiveChartCoord from; + LiveChartCoord to; +}; + +struct _LiveChartBezierCurve { + LiveChartCoord c0; + LiveChartCoord c1; + LiveChartCoord c2; + LiveChartCoord c3; +}; + +struct _LiveChartBounds { + GObject parent_instance; + LiveChartBoundsPrivate * priv; +}; + +struct _LiveChartBoundsClass { + GObjectClass parent_class; +}; + +typedef enum { + LIVE_CHART_CHART_ERROR_EXPORT_ERROR, + LIVE_CHART_CHART_ERROR_SERIE_NOT_FOUND +} LiveChartChartError; +#define LIVE_CHART_CHART_ERROR live_chart_chart_error_quark () + +struct _LiveChartChart { + GtkDrawingArea parent_instance; + LiveChartChartPrivate * priv; + LiveChartConfig* config; + LiveChartSeries* series; +}; + +struct _LiveChartChartClass { + GtkDrawingAreaClass parent_class; +}; + +struct _LiveChartPadding { + LiveChartAutoPadding smart; + gint top; + gint right; + gint bottom; + gint left; +}; + +struct _LiveChartBoundary { + gint min; + gint max; +}; + +struct _LiveChartBoundaries { + LiveChartBoundary x; + LiveChartBoundary y; + gint width; + gint height; +}; + +struct _LiveChartConfig { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartConfigPrivate * priv; + LiveChartPadding padding; + LiveChartYAxis* y_axis; + LiveChartXAxis* x_axis; + GeeArrayList* categories; +}; + +struct _LiveChartConfigClass { + GTypeClass parent_class; + void (*finalize) (LiveChartConfig *self); +}; + +struct _LiveChartColorableIface { + GTypeInterface parent_iface; + void (*get_main_color) (LiveChartColorable* self, GdkRGBA * result); + void (*set_main_color) (LiveChartColorable* self, GdkRGBA * value); +}; + +struct _LiveChartFont { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartFontPrivate * priv; +}; + +struct _LiveChartFontClass { + GTypeClass parent_class; + void (*finalize) (LiveChartFont *self); +}; + +struct _LiveChartTimestampedValue { + gdouble timestamp; + gdouble value; +}; + +struct _LiveChartPoint { + gdouble x; + gdouble y; + gdouble height; + LiveChartTimestampedValue data; +}; + +struct _LiveChartGrid { + GObject parent_instance; + LiveChartGridPrivate * priv; + LiveChartBoundingBox bounding_box; +}; + +struct _LiveChartGridClass { + GObjectClass parent_class; +}; + +struct _LiveChartIntersections { + GObject parent_instance; + LiveChartIntersectionsPrivate * priv; +}; + +struct _LiveChartIntersectionsClass { + GObjectClass parent_class; +}; + +struct _LiveChartIntersection { + GObject parent_instance; + LiveChartIntersectionPrivate * priv; + gdouble* entered_at; + gdouble* exited_at; +}; + +struct _LiveChartIntersectionClass { + GObjectClass parent_class; +}; + +struct _LiveChartIntersectorIface { + GTypeInterface parent_iface; + void (*intersect) (LiveChartIntersector* self, LiveChartIntersections* intersections, LiveChartPoint* previous, LiveChartPoint* current, gconstpointer path); +}; + +struct _LiveChartBezierIntersector { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartBezierIntersectorPrivate * priv; +}; + +struct _LiveChartBezierIntersectorClass { + GTypeClass parent_class; + void (*finalize) (LiveChartBezierIntersector *self); +}; + +struct _LiveChartLabels { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartLabelsPrivate * priv; +}; + +struct _LiveChartLabelsClass { + GTypeClass parent_class; + void (*finalize) (LiveChartLabels *self); +}; + +struct _LiveChartLegend { + GObject parent_instance; + LiveChartLegendPrivate * priv; + LiveChartLabels* labels; + GeeArrayList* series; + LiveChartBoundingBox bounding_box; +}; + +struct _LiveChartLegendClass { + GObjectClass parent_class; + void (*draw) (LiveChartLegend* self, cairo_t* ctx, LiveChartConfig* config); +}; + +struct _LiveChartHorizontalLegend { + LiveChartLegend parent_instance; + LiveChartHorizontalLegendPrivate * priv; +}; + +struct _LiveChartHorizontalLegendClass { + LiveChartLegendClass parent_class; +}; + +struct _LiveChartNoopLegend { + LiveChartLegend parent_instance; + LiveChartNoopLegendPrivate * priv; +}; + +struct _LiveChartNoopLegendClass { + LiveChartLegendClass parent_class; +}; + +struct _LiveChartLine { + LiveChartSerieRenderer parent_instance; + LiveChartLinePrivate * priv; +}; + +struct _LiveChartLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartLineArea { + LiveChartLine parent_instance; + LiveChartLineAreaPrivate * priv; +}; + +struct _LiveChartLineAreaClass { + LiveChartLineClass parent_class; +}; + +struct _LiveChartMaxBoundLine { + LiveChartSerieRenderer parent_instance; + LiveChartMaxBoundLinePrivate * priv; +}; + +struct _LiveChartMaxBoundLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartMinBoundLine { + LiveChartSerieRenderer parent_instance; + LiveChartMinBoundLinePrivate * priv; +}; + +struct _LiveChartMinBoundLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartDash { + gdouble* dashes; + gint dashes_length1; + gdouble offset; +}; + +struct _LiveChartPath { + GObject parent_instance; + LiveChartPathPrivate * priv; + LiveChartDash* dash; +}; + +struct _LiveChartPathClass { + GObjectClass parent_class; +}; + +struct _LiveChartPoints { + GObject parent_instance; + LiveChartPointsPrivate * priv; +}; + +struct _LiveChartPointsClass { + GObjectClass parent_class; +}; + +struct _LiveChartRegionHandleResult { + LiveChartRegionHandleStatus status; + gdouble at_value; +}; + +struct _LiveChartRegion { + GTypeInstance parent_instance; + volatile int ref_count; + LiveChartRegionPrivate * priv; +}; + +struct _LiveChartRegionClass { + GTypeClass parent_class; + void (*finalize) (LiveChartRegion *self); +}; + +struct _LiveChartSerie { + GObject parent_instance; + LiveChartSeriePrivate * priv; +}; + +struct _LiveChartSerieClass { + GObjectClass parent_class; +}; + +struct _LiveChartSeries { + GObject parent_instance; + LiveChartSeriesPrivate * priv; +}; + +struct _LiveChartSeriesClass { + GObjectClass parent_class; +}; + +struct _LiveChartSmoothLine { + LiveChartSerieRenderer parent_instance; + LiveChartSmoothLinePrivate * priv; + LiveChartIntersections* intersections; +}; + +struct _LiveChartSmoothLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartSmoothLineArea { + LiveChartSmoothLine parent_instance; + LiveChartSmoothLineAreaPrivate * priv; +}; + +struct _LiveChartSmoothLineAreaClass { + LiveChartSmoothLineClass parent_class; +}; + +struct _LiveChartThresholdLine { + LiveChartSerieRenderer parent_instance; + LiveChartThresholdLinePrivate * priv; +}; + +struct _LiveChartThresholdLineClass { + LiveChartSerieRendererClass parent_class; +}; + +struct _LiveChartValues { + GeeLinkedList parent_instance; + LiveChartValuesPrivate * priv; +}; + +struct _LiveChartValuesClass { + GeeLinkedListClass parent_class; +}; + +struct _LiveChartStaticStaticChart { + GtkDrawingArea parent_instance; + LiveChartStaticStaticChartPrivate * priv; + LiveChartConfig* config; + LiveChartStaticStaticSeries* series; +}; + +struct _LiveChartStaticStaticChartClass { + GtkDrawingAreaClass parent_class; +}; + +struct _LiveChartStaticStaticSeries { + GObject parent_instance; + LiveChartStaticStaticSeriesPrivate * priv; +}; + +struct _LiveChartStaticStaticSeriesClass { + GObjectClass parent_class; +}; + +struct _LiveChartStaticStaticSerie { + GObject parent_instance; + LiveChartStaticStaticSeriePrivate * priv; +}; + +struct _LiveChartStaticStaticSerieClass { + GObjectClass parent_class; +}; + +struct _LiveChartStaticNamedValue { + gchar* name; + gdouble value; +}; + +struct _LiveChartStaticStaticValues { + GeeLinkedList parent_instance; + LiveChartStaticStaticValuesPrivate * priv; +}; + +struct _LiveChartStaticStaticValuesClass { + GeeLinkedListClass parent_class; +}; + +struct _LiveChartStaticStaticSerieRenderer { + GObject parent_instance; + LiveChartStaticStaticSerieRendererPrivate * priv; + LiveChartBoundingBox bounding_box; + LiveChartStaticStaticValues* values; +}; + +struct _LiveChartStaticStaticSerieRendererClass { + GObjectClass parent_class; + void (*draw) (LiveChartStaticStaticSerieRenderer* self, cairo_t* ctx, LiveChartConfig* config); +}; + +struct _LiveChartStaticStaticLine { + LiveChartStaticStaticSerieRenderer parent_instance; + LiveChartStaticStaticLinePrivate * priv; +}; + +struct _LiveChartStaticStaticLineClass { + LiveChartStaticStaticSerieRendererClass parent_class; +}; + +struct _LiveChartStaticStaticGrid { + GObject parent_instance; + LiveChartStaticStaticGridPrivate * priv; + LiveChartBoundingBox bounding_box; +}; + +struct _LiveChartStaticStaticGridClass { + GObjectClass parent_class; +}; + +struct _LiveChartStaticStaticPoints { + GObject parent_instance; + LiveChartStaticStaticPointsPrivate * priv; +}; + +struct _LiveChartStaticStaticPointsClass { + GObjectClass parent_class; +}; + +VALA_EXTERN gpointer live_chart_config_ref (gpointer instance); +VALA_EXTERN void live_chart_config_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_config (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_config (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_config (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_config (const GValue* value); +VALA_EXTERN GType live_chart_config_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartConfig, live_chart_config_unref) +VALA_EXTERN GType live_chart_bounding_box_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartBoundingBox* live_chart_bounding_box_dup (const LiveChartBoundingBox* self); +VALA_EXTERN void live_chart_bounding_box_free (LiveChartBoundingBox* self); +VALA_EXTERN GType live_chart_drawable_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartDrawable, g_object_unref) +VALA_EXTERN GType live_chart_area_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartArea, g_object_unref) +VALA_EXTERN GType live_chart_points_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartPoints, g_object_unref) +VALA_EXTERN LiveChartArea* live_chart_area_new (LiveChartPoints* points, + GdkRGBA* color, + gdouble alpha); +VALA_EXTERN LiveChartArea* live_chart_area_construct (GType object_type, + LiveChartPoints* points, + GdkRGBA* color, + gdouble alpha); +VALA_EXTERN gpointer live_chart_xaxis_ref (gpointer instance); +VALA_EXTERN void live_chart_xaxis_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_xaxis (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_xaxis (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_xaxis (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_xaxis (const GValue* value); +VALA_EXTERN GType live_chart_xaxis_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartXAxis, live_chart_xaxis_unref) +VALA_EXTERN gpointer live_chart_labels_ref (gpointer instance); +VALA_EXTERN void live_chart_labels_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_labels (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_labels (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_labels (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_labels (const GValue* value); +VALA_EXTERN GType live_chart_labels_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartLabels, live_chart_labels_unref) +VALA_EXTERN GType live_chart_path_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartPath, g_object_unref) +VALA_EXTERN LiveChartXAxis* live_chart_xaxis_new (void); +VALA_EXTERN LiveChartXAxis* live_chart_xaxis_construct (GType object_type); +VALA_EXTERN gdouble live_chart_xaxis_get_ratio (LiveChartXAxis* self); +VALA_EXTERN gfloat live_chart_xaxis_get_tick_interval (LiveChartXAxis* self); +VALA_EXTERN void live_chart_xaxis_set_tick_interval (LiveChartXAxis* self, + gfloat value); +VALA_EXTERN gfloat live_chart_xaxis_get_tick_length (LiveChartXAxis* self); +VALA_EXTERN void live_chart_xaxis_set_tick_length (LiveChartXAxis* self, + gfloat value); +VALA_EXTERN gboolean live_chart_xaxis_get_visible (LiveChartXAxis* self); +VALA_EXTERN void live_chart_xaxis_set_visible (LiveChartXAxis* self, + gboolean value); +VALA_EXTERN GType live_chart_ticks_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartTicks* live_chart_ticks_dup (const LiveChartTicks* self); +VALA_EXTERN void live_chart_ticks_free (LiveChartTicks* self); +VALA_EXTERN void live_chart_ticks_copy (const LiveChartTicks* self, + LiveChartTicks* dest); +VALA_EXTERN void live_chart_ticks_destroy (LiveChartTicks* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (LiveChartTicks, live_chart_ticks_destroy) +VALA_EXTERN void live_chart_ticks_init (LiveChartTicks *self); +VALA_EXTERN gpointer live_chart_yaxis_ref (gpointer instance); +VALA_EXTERN void live_chart_yaxis_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_yaxis (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_yaxis (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_yaxis (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_yaxis (const GValue* value); +VALA_EXTERN GType live_chart_yaxis_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartYAxis, live_chart_yaxis_unref) +VALA_EXTERN LiveChartYAxis* live_chart_yaxis_new (const gchar* unit); +VALA_EXTERN LiveChartYAxis* live_chart_yaxis_construct (GType object_type, + const gchar* unit); +VALA_EXTERN gdouble live_chart_yaxis_get_ratio (LiveChartYAxis* self); +VALA_EXTERN GType live_chart_bounds_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartBounds, g_object_unref) +VALA_EXTERN LiveChartBounds* live_chart_yaxis_get_bounds (LiveChartYAxis* self); +VALA_EXTERN gboolean live_chart_yaxis_update_bounds (LiveChartYAxis* self, + gdouble value); +VALA_EXTERN void live_chart_yaxis_update (LiveChartYAxis* self, + gint area_height); +VALA_EXTERN gchar* live_chart_yaxis_get_max_displayed_value (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_get_ticks (LiveChartYAxis* self, + LiveChartTicks* result); +VALA_EXTERN gfloat live_chart_yaxis_get_ratio_threshold (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_set_ratio_threshold (LiveChartYAxis* self, + gfloat value); +VALA_EXTERN gfloat live_chart_yaxis_get_tick_interval (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_set_tick_interval (LiveChartYAxis* self, + gfloat value); +VALA_EXTERN gboolean live_chart_yaxis_get_visible (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_set_visible (LiveChartYAxis* self, + gboolean value); +VALA_EXTERN gfloat live_chart_yaxis_get_tick_length (LiveChartYAxis* self) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_yaxis_set_tick_length (LiveChartYAxis* self, + gfloat value) G_GNUC_DEPRECATED ; +VALA_EXTERN const gchar* live_chart_yaxis_get_unit (LiveChartYAxis* self); +VALA_EXTERN void live_chart_yaxis_set_unit (LiveChartYAxis* self, + const gchar* value); +VALA_EXTERN GType live_chart_background_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartBackground, g_object_unref) +VALA_EXTERN LiveChartBackground* live_chart_background_new (void); +VALA_EXTERN LiveChartBackground* live_chart_background_construct (GType object_type); +VALA_EXTERN void live_chart_background_get_color (LiveChartBackground* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_background_set_color (LiveChartBackground* self, + GdkRGBA * value); +VALA_EXTERN void live_chart_background_get_main_color (LiveChartBackground* self, + GdkRGBA * result) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_background_set_main_color (LiveChartBackground* self, + GdkRGBA * value) G_GNUC_DEPRECATED ; +VALA_EXTERN GType live_chart_serie_renderer_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSerieRenderer, g_object_unref) +VALA_EXTERN GType live_chart_values_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartValues, g_object_unref) +VALA_EXTERN GType live_chart_bar_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartBar, g_object_unref) +VALA_EXTERN LiveChartBar* live_chart_bar_new (LiveChartValues* values); +VALA_EXTERN LiveChartBar* live_chart_bar_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN GType live_chart_segment_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_coord_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartCoord* live_chart_coord_dup (const LiveChartCoord* self); +VALA_EXTERN void live_chart_coord_free (LiveChartCoord* self); +VALA_EXTERN LiveChartSegment* live_chart_segment_dup (const LiveChartSegment* self); +VALA_EXTERN void live_chart_segment_free (LiveChartSegment* self); +VALA_EXTERN GType live_chart_bezier_curve_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartBezierCurve* live_chart_bezier_curve_dup (const LiveChartBezierCurve* self); +VALA_EXTERN void live_chart_bezier_curve_free (LiveChartBezierCurve* self); +VALA_EXTERN GeeList* live_chart_find_intersections_between (LiveChartSegment* segment, + LiveChartBezierCurve* bezier); +VALA_EXTERN LiveChartBounds* live_chart_bounds_new (gdouble lower, + gdouble upper); +VALA_EXTERN LiveChartBounds* live_chart_bounds_construct (GType object_type, + gdouble lower, + gdouble upper); +VALA_EXTERN gboolean live_chart_bounds_has_lower (LiveChartBounds* self); +VALA_EXTERN gboolean live_chart_bounds_has_upper (LiveChartBounds* self); +VALA_EXTERN gboolean live_chart_bounds_update (LiveChartBounds* self, + gdouble value); +VALA_EXTERN gdouble live_chart_bounds_get_lower (LiveChartBounds* self); +VALA_EXTERN gdouble live_chart_bounds_get_upper (LiveChartBounds* self); +VALA_EXTERN GQuark live_chart_chart_error_quark (void); +GType live_chart_chart_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_chart_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartChart, g_object_unref) +VALA_EXTERN GType live_chart_series_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSeries, g_object_unref) +VALA_EXTERN LiveChartChart* live_chart_chart_new (LiveChartConfig* config); +VALA_EXTERN LiveChartChart* live_chart_chart_construct (GType object_type, + LiveChartConfig* config); +VALA_EXTERN GType live_chart_serie_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSerie, g_object_unref) +VALA_EXTERN void live_chart_chart_add_serie (LiveChartChart* self, + LiveChartSerie* serie); +VALA_EXTERN void live_chart_chart_add_value (LiveChartChart* self, + LiveChartSerie* serie, + gdouble value) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_chart_add_value_by_index (LiveChartChart* self, + gint serie_index, + gdouble value, + GError** error) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_chart_add_unaware_timestamp_collection (LiveChartChart* self, + LiveChartSerie* serie, + GeeCollection* collection, + gint timespan_between_value); +VALA_EXTERN void live_chart_chart_add_unaware_timestamp_collection_by_index (LiveChartChart* self, + gint serie_index, + GeeCollection* collection, + gint timespan_between_value, + GError** error); +VALA_EXTERN void live_chart_chart_to_png (LiveChartChart* self, + const gchar* filename, + GError** error); +VALA_EXTERN void live_chart_chart_refresh_every (LiveChartChart* self, + gint ms); +VALA_EXTERN GType live_chart_grid_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartGrid, g_object_unref) +VALA_EXTERN LiveChartGrid* live_chart_chart_get_grid (LiveChartChart* self); +VALA_EXTERN void live_chart_chart_set_grid (LiveChartChart* self, + LiveChartGrid* value); +VALA_EXTERN LiveChartBackground* live_chart_chart_get_background (LiveChartChart* self); +VALA_EXTERN void live_chart_chart_set_background (LiveChartChart* self, + LiveChartBackground* value); +VALA_EXTERN GType live_chart_legend_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartLegend, g_object_unref) +VALA_EXTERN LiveChartLegend* live_chart_chart_get_legend (LiveChartChart* self); +VALA_EXTERN void live_chart_chart_set_legend (LiveChartChart* self, + LiveChartLegend* value); +VALA_EXTERN GType live_chart_auto_padding_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_padding_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartPadding* live_chart_padding_dup (const LiveChartPadding* self); +VALA_EXTERN void live_chart_padding_free (LiveChartPadding* self); +VALA_EXTERN void live_chart_padding_init (LiveChartPadding *self); +VALA_EXTERN GType live_chart_boundary_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartBoundary* live_chart_boundary_dup (const LiveChartBoundary* self); +VALA_EXTERN void live_chart_boundary_free (LiveChartBoundary* self); +VALA_EXTERN GType live_chart_boundaries_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartBoundaries* live_chart_boundaries_dup (const LiveChartBoundaries* self); +VALA_EXTERN void live_chart_boundaries_free (LiveChartBoundaries* self); +VALA_EXTERN void live_chart_config_boundaries (LiveChartConfig* self, + LiveChartBoundaries* result); +VALA_EXTERN void live_chart_config_configure (LiveChartConfig* self, + cairo_t* ctx, + LiveChartLegend* legend); +VALA_EXTERN LiveChartConfig* live_chart_config_new (void); +VALA_EXTERN LiveChartConfig* live_chart_config_construct (GType object_type); +VALA_EXTERN gint live_chart_config_get_width (LiveChartConfig* self); +VALA_EXTERN void live_chart_config_set_width (LiveChartConfig* self, + gint value); +VALA_EXTERN gint live_chart_config_get_height (LiveChartConfig* self); +VALA_EXTERN void live_chart_config_set_height (LiveChartConfig* self, + gint value); +VALA_EXTERN void live_chart_drawable_draw (LiveChartDrawable* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_drawable_get_bounding_box (LiveChartDrawable* self, + LiveChartBoundingBox* result); +VALA_EXTERN gboolean live_chart_drawable_get_visible (LiveChartDrawable* self); +VALA_EXTERN void live_chart_drawable_set_visible (LiveChartDrawable* self, + gboolean value); +VALA_EXTERN GType live_chart_colorable_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartColorable, g_object_unref) +VALA_EXTERN void live_chart_colorable_get_main_color (LiveChartColorable* self, + GdkRGBA * result) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_colorable_set_main_color (LiveChartColorable* self, + GdkRGBA * value) G_GNUC_DEPRECATED ; +VALA_EXTERN gpointer live_chart_font_ref (gpointer instance); +VALA_EXTERN void live_chart_font_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_font (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_font (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_font (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_font (const GValue* value); +VALA_EXTERN GType live_chart_font_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartFont, live_chart_font_unref) +VALA_EXTERN LiveChartFont* live_chart_font_new (void); +VALA_EXTERN LiveChartFont* live_chart_font_construct (GType object_type); +VALA_EXTERN void live_chart_font_configure (LiveChartFont* self, + cairo_t* ctx); +VALA_EXTERN guint8 live_chart_font_get_size (LiveChartFont* self); +VALA_EXTERN void live_chart_font_set_size (LiveChartFont* self, + guint8 value); +VALA_EXTERN const gchar* live_chart_font_get_face (LiveChartFont* self); +VALA_EXTERN void live_chart_font_set_face (LiveChartFont* self, + const gchar* value); +VALA_EXTERN cairo_font_slant_t live_chart_font_get_slant (LiveChartFont* self); +VALA_EXTERN void live_chart_font_set_slant (LiveChartFont* self, + cairo_font_slant_t value); +VALA_EXTERN cairo_font_weight_t live_chart_font_get_weight (LiveChartFont* self); +VALA_EXTERN void live_chart_font_set_weight (LiveChartFont* self, + cairo_font_weight_t value); +VALA_EXTERN void live_chart_font_get_color (LiveChartFont* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_font_set_color (LiveChartFont* self, + GdkRGBA * value); +VALA_EXTERN GType live_chart_point_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_timestamped_value_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartTimestampedValue* live_chart_timestamped_value_dup (const LiveChartTimestampedValue* self); +VALA_EXTERN void live_chart_timestamped_value_free (LiveChartTimestampedValue* self); +VALA_EXTERN LiveChartPoint* live_chart_point_dup (const LiveChartPoint* self); +VALA_EXTERN void live_chart_point_free (LiveChartPoint* self); +VALA_EXTERN void live_chart_build_bezier_curve_from_points (LiveChartPoint* previous, + LiveChartPoint* target, + LiveChartBezierCurve* result); +VALA_EXTERN void live_chart_grid_restore (LiveChartGrid* self, + cairo_t* ctx); +VALA_EXTERN void live_chart_grid_render_abscissa (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_render_ordinate (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_render_grid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_render_vgrid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_render_hgrid (LiveChartGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_update_bounding_box (LiveChartGrid* self, + LiveChartConfig* config); +VALA_EXTERN void live_chart_grid_debug (LiveChartGrid* self, + cairo_t* ctx); +VALA_EXTERN LiveChartGrid* live_chart_grid_new (void); +VALA_EXTERN LiveChartGrid* live_chart_grid_construct (GType object_type); +VALA_EXTERN void live_chart_grid_get_main_color (LiveChartGrid* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_grid_set_main_color (LiveChartGrid* self, + GdkRGBA * value); +VALA_EXTERN GType live_chart_intersections_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartIntersections, g_object_unref) +VALA_EXTERN void live_chart_intersections_close (LiveChartIntersections* self, + gdouble x, + gdouble exited_at); +VALA_EXTERN void live_chart_intersections_update (LiveChartIntersections* self, + gdouble x); +VALA_EXTERN gpointer live_chart_region_ref (gpointer instance); +VALA_EXTERN void live_chart_region_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_region (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_region (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_region (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_region (const GValue* value); +VALA_EXTERN GType live_chart_region_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartRegion, live_chart_region_unref) +VALA_EXTERN void live_chart_intersections_open (LiveChartIntersections* self, + LiveChartRegion* region, + gdouble x, + gdouble entered_at); +VALA_EXTERN void live_chart_intersections_open_without_entrypoint (LiveChartIntersections* self, + LiveChartRegion* region, + gdouble x); +VALA_EXTERN GType live_chart_intersection_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartIntersection, g_object_unref) +VALA_EXTERN void live_chart_intersections_foreach (LiveChartIntersections* self, + GeeForallFunc f, + gpointer f_target); +VALA_EXTERN gboolean live_chart_intersections_has_an_opened_intersection (LiveChartIntersections* self); +VALA_EXTERN LiveChartRegion* live_chart_intersections_get_current_region (LiveChartIntersections* self); +VALA_EXTERN gint live_chart_intersections_size (LiveChartIntersections* self); +VALA_EXTERN LiveChartIntersection* live_chart_intersections_get (LiveChartIntersections* self, + gint index); +VALA_EXTERN LiveChartIntersections* live_chart_intersections_new (void); +VALA_EXTERN LiveChartIntersections* live_chart_intersections_construct (GType object_type); +VALA_EXTERN LiveChartIntersection* live_chart_intersection_new (LiveChartRegion* region, + gdouble start_x, + gdouble entered_at); +VALA_EXTERN LiveChartIntersection* live_chart_intersection_construct (GType object_type, + LiveChartRegion* region, + gdouble start_x, + gdouble entered_at); +VALA_EXTERN LiveChartIntersection* live_chart_intersection_new_without_entry_point (LiveChartRegion* region, + gdouble start_x); +VALA_EXTERN LiveChartIntersection* live_chart_intersection_construct_without_entry_point (GType object_type, + LiveChartRegion* region, + gdouble start_x); +VALA_EXTERN void live_chart_intersection_update (LiveChartIntersection* self, + gdouble x); +VALA_EXTERN void live_chart_intersection_close (LiveChartIntersection* self, + gdouble x, + gdouble exited_at); +VALA_EXTERN gboolean live_chart_intersection_is_open (LiveChartIntersection* self); +VALA_EXTERN gboolean live_chart_intersection_is_closed (LiveChartIntersection* self); +VALA_EXTERN LiveChartRegion* live_chart_intersection_get_region (LiveChartIntersection* self); +VALA_EXTERN void live_chart_intersection_set_region (LiveChartIntersection* self, + LiveChartRegion* value); +VALA_EXTERN gdouble live_chart_intersection_get_start_x (LiveChartIntersection* self); +VALA_EXTERN gdouble live_chart_intersection_get_end_x (LiveChartIntersection* self); +VALA_EXTERN GType live_chart_intersector_get_type (void) G_GNUC_CONST ; +VALA_EXTERN void live_chart_intersector_intersect (LiveChartIntersector* self, + LiveChartIntersections* intersections, + LiveChartPoint* previous, + LiveChartPoint* current, + gconstpointer path); +VALA_EXTERN gpointer live_chart_bezier_intersector_ref (gpointer instance); +VALA_EXTERN void live_chart_bezier_intersector_unref (gpointer instance); +VALA_EXTERN GParamSpec* live_chart_param_spec_bezier_intersector (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +VALA_EXTERN void live_chart_value_set_bezier_intersector (GValue* value, + gpointer v_object); +VALA_EXTERN void live_chart_value_take_bezier_intersector (GValue* value, + gpointer v_object); +VALA_EXTERN gpointer live_chart_value_get_bezier_intersector (const GValue* value); +VALA_EXTERN GType live_chart_bezier_intersector_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartBezierIntersector, live_chart_bezier_intersector_unref) +VALA_EXTERN LiveChartBezierIntersector* live_chart_bezier_intersector_new (LiveChartRegion* region, + LiveChartConfig* config); +VALA_EXTERN LiveChartBezierIntersector* live_chart_bezier_intersector_construct (GType object_type, + LiveChartRegion* region, + LiveChartConfig* config); +VALA_EXTERN LiveChartLabels* live_chart_labels_new (void); +VALA_EXTERN LiveChartLabels* live_chart_labels_construct (GType object_type); +VALA_EXTERN gboolean live_chart_labels_get_visible (LiveChartLabels* self); +VALA_EXTERN void live_chart_labels_set_visible (LiveChartLabels* self, + gboolean value); +VALA_EXTERN void live_chart_labels_get_extents (LiveChartLabels* self, + cairo_text_extents_t * result); +VALA_EXTERN void live_chart_labels_set_extents (LiveChartLabels* self, + cairo_text_extents_t * value); +VALA_EXTERN LiveChartFont* live_chart_labels_get_font (LiveChartLabels* self); +VALA_EXTERN void live_chart_labels_set_font (LiveChartLabels* self, + LiveChartFont* value); +VALA_EXTERN void live_chart_legend_add_legend (LiveChartLegend* self, + LiveChartSerie* serie); +VALA_EXTERN void live_chart_legend_draw (LiveChartLegend* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN LiveChartLegend* live_chart_legend_construct (GType object_type); +VALA_EXTERN void live_chart_legend_get_main_color (LiveChartLegend* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_legend_set_main_color (LiveChartLegend* self, + GdkRGBA * value); +VALA_EXTERN GType live_chart_horizontal_legend_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartHorizontalLegend, g_object_unref) +VALA_EXTERN void live_chart_horizontal_legend_debug (LiveChartHorizontalLegend* self, + cairo_t* ctx); +VALA_EXTERN LiveChartHorizontalLegend* live_chart_horizontal_legend_new (void); +VALA_EXTERN LiveChartHorizontalLegend* live_chart_horizontal_legend_construct (GType object_type); +VALA_EXTERN GType live_chart_noop_legend_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartNoopLegend, g_object_unref) +VALA_EXTERN LiveChartNoopLegend* live_chart_noop_legend_new (void); +VALA_EXTERN LiveChartNoopLegend* live_chart_noop_legend_construct (GType object_type); +VALA_EXTERN GType live_chart_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartLine, g_object_unref) +VALA_EXTERN GType live_chart_line_area_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartLineArea, g_object_unref) +VALA_EXTERN LiveChartLineArea* live_chart_line_area_new (LiveChartValues* values); +VALA_EXTERN LiveChartLineArea* live_chart_line_area_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN gdouble live_chart_line_area_get_area_alpha (LiveChartLineArea* self); +VALA_EXTERN void live_chart_line_area_set_area_alpha (LiveChartLineArea* self, + gdouble value); +VALA_EXTERN LiveChartLine* live_chart_line_new (LiveChartValues* values); +VALA_EXTERN LiveChartLine* live_chart_line_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN LiveChartPoints* live_chart_line_draw_line (LiveChartLine* self, + LiveChartPoints* points, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN GType live_chart_max_bound_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartMaxBoundLine, g_object_unref) +VALA_EXTERN LiveChartMaxBoundLine* live_chart_max_bound_line_new (void); +VALA_EXTERN LiveChartMaxBoundLine* live_chart_max_bound_line_construct (GType object_type); +VALA_EXTERN LiveChartMaxBoundLine* live_chart_max_bound_line_new_from_serie (LiveChartSerie* serie); +VALA_EXTERN LiveChartMaxBoundLine* live_chart_max_bound_line_construct_from_serie (GType object_type, + LiveChartSerie* serie); +VALA_EXTERN GType live_chart_min_bound_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartMinBoundLine, g_object_unref) +VALA_EXTERN LiveChartMinBoundLine* live_chart_min_bound_line_new (LiveChartValues* values); +VALA_EXTERN LiveChartMinBoundLine* live_chart_min_bound_line_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN LiveChartMinBoundLine* live_chart_min_bound_line_new_from_serie (LiveChartSerie* serie); +VALA_EXTERN LiveChartMinBoundLine* live_chart_min_bound_line_construct_from_serie (GType object_type, + LiveChartSerie* serie); +VALA_EXTERN GType live_chart_dash_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartDash* live_chart_dash_dup (const LiveChartDash* self); +VALA_EXTERN void live_chart_dash_free (LiveChartDash* self); +VALA_EXTERN void live_chart_dash_copy (const LiveChartDash* self, + LiveChartDash* dest); +VALA_EXTERN void live_chart_dash_destroy (LiveChartDash* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (LiveChartDash, live_chart_dash_destroy) +VALA_EXTERN void live_chart_dash_init (LiveChartDash *self); +VALA_EXTERN LiveChartPath* live_chart_path_new (gdouble width, + GdkRGBA* color, + gboolean visible, + LiveChartDash* dash); +VALA_EXTERN LiveChartPath* live_chart_path_construct (GType object_type, + gdouble width, + GdkRGBA* color, + gboolean visible, + LiveChartDash* dash); +VALA_EXTERN void live_chart_path_configure (LiveChartPath* self, + cairo_t* ctx); +VALA_EXTERN gdouble live_chart_path_get_width (LiveChartPath* self); +VALA_EXTERN void live_chart_path_set_width (LiveChartPath* self, + gdouble value); +VALA_EXTERN void live_chart_path_get_color (LiveChartPath* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_path_set_color (LiveChartPath* self, + GdkRGBA * value); +VALA_EXTERN gboolean live_chart_path_get_visible (LiveChartPath* self); +VALA_EXTERN void live_chart_path_set_visible (LiveChartPath* self, + gboolean value); +VALA_EXTERN LiveChartPoints* live_chart_points_new (void); +VALA_EXTERN LiveChartPoints* live_chart_points_construct (GType object_type); +VALA_EXTERN void live_chart_points_add (LiveChartPoints* self, + LiveChartPoint* point); +VALA_EXTERN void live_chart_points_get (LiveChartPoints* self, + gint at, + LiveChartPoint* result); +VALA_EXTERN void live_chart_points_after (LiveChartPoints* self, + gint at, + LiveChartPoint* result); +VALA_EXTERN void live_chart_points_first (LiveChartPoints* self, + LiveChartPoint* result); +VALA_EXTERN void live_chart_points_last (LiveChartPoints* self, + LiveChartPoint* result); +VALA_EXTERN LiveChartPoints* live_chart_points_create (LiveChartValues* values, + LiveChartConfig* config); +VALA_EXTERN LiveChartBounds* live_chart_points_get_bounds (LiveChartPoints* self); +VALA_EXTERN void live_chart_points_set_bounds (LiveChartPoints* self, + LiveChartBounds* value); +VALA_EXTERN gint live_chart_points_get_size (LiveChartPoints* self); +VALA_EXTERN gdouble live_chart_points_get_realtime_delta (LiveChartPoints* self); +VALA_EXTERN void live_chart_points_set_realtime_delta (LiveChartPoints* self, + gdouble value); +VALA_EXTERN GType live_chart_region_handle_status_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType live_chart_region_handle_result_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartRegionHandleResult* live_chart_region_handle_result_dup (const LiveChartRegionHandleResult* self); +VALA_EXTERN void live_chart_region_handle_result_free (LiveChartRegionHandleResult* self); +VALA_EXTERN LiveChartRegion* live_chart_region_new (gdouble floor, + gdouble ceil); +VALA_EXTERN LiveChartRegion* live_chart_region_construct (GType object_type, + gdouble floor, + gdouble ceil); +VALA_EXTERN LiveChartRegion* live_chart_region_new_between (gdouble above, + gdouble below); +VALA_EXTERN LiveChartRegion* live_chart_region_construct_between (GType object_type, + gdouble above, + gdouble below); +VALA_EXTERN LiveChartRegion* live_chart_region_with_line_color (LiveChartRegion* self, + GdkRGBA* color); +VALA_EXTERN LiveChartRegion* live_chart_region_with_area_color (LiveChartRegion* self, + GdkRGBA* color); +VALA_EXTERN gboolean live_chart_region_has_at_least_one_point_within (LiveChartRegion* self, + LiveChartPoint* previous, + LiveChartPoint* current); +VALA_EXTERN void live_chart_region_handle (LiveChartRegion* self, + LiveChartIntersections* intersections, + LiveChartPoint* previous, + LiveChartPoint* current, + LiveChartGetIntersection get_intersection, + gpointer get_intersection_target); +VALA_EXTERN void live_chart_region_get_line_color (LiveChartRegion* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_region_set_line_color (LiveChartRegion* self, + GdkRGBA * value); +VALA_EXTERN void live_chart_region_get_area_color (LiveChartRegion* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_region_set_area_color (LiveChartRegion* self, + GdkRGBA * value); +VALA_EXTERN LiveChartSerie* live_chart_serie_new (const gchar* name, + LiveChartSerieRenderer* renderer); +VALA_EXTERN LiveChartSerie* live_chart_serie_construct (GType object_type, + const gchar* name, + LiveChartSerieRenderer* renderer); +VALA_EXTERN void live_chart_serie_add (LiveChartSerie* self, + gdouble value); +VALA_EXTERN void live_chart_serie_add_with_timestamp (LiveChartSerie* self, + gdouble value, + gint64 timestamp); +VALA_EXTERN void live_chart_serie_set_main_color (LiveChartSerie* self, + GdkRGBA* color) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_serie_get_main_color (LiveChartSerie* self, + GdkRGBA* result) G_GNUC_DEPRECATED ; +VALA_EXTERN LiveChartValues* live_chart_serie_get_values (LiveChartSerie* self); +VALA_EXTERN void live_chart_serie_clear (LiveChartSerie* self); +VALA_EXTERN const gchar* live_chart_serie_get_name (LiveChartSerie* self); +VALA_EXTERN void live_chart_serie_set_name (LiveChartSerie* self, + const gchar* value); +VALA_EXTERN LiveChartPath* live_chart_serie_get_line (LiveChartSerie* self); +VALA_EXTERN void live_chart_serie_set_line (LiveChartSerie* self, + LiveChartPath* value); +VALA_EXTERN LiveChartSerieRenderer* live_chart_serie_renderer_construct (GType object_type); +VALA_EXTERN LiveChartValues* live_chart_serie_renderer_get_values (LiveChartSerieRenderer* self); +VALA_EXTERN void live_chart_serie_renderer_draw (LiveChartSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_serie_renderer_debug (LiveChartSerieRenderer* self, + cairo_t* ctx); +VALA_EXTERN gboolean live_chart_serie_renderer_is_out_of_area (LiveChartSerieRenderer* self, + LiveChartPoint* point); +VALA_EXTERN void live_chart_serie_renderer_get_main_color (LiveChartSerieRenderer* self, + GdkRGBA * result) G_GNUC_DEPRECATED ; +VALA_EXTERN void live_chart_serie_renderer_set_main_color (LiveChartSerieRenderer* self, + GdkRGBA * value) G_GNUC_DEPRECATED ; +VALA_EXTERN LiveChartPath* live_chart_serie_renderer_get_line (LiveChartSerieRenderer* self); +VALA_EXTERN void live_chart_serie_renderer_set_line (LiveChartSerieRenderer* self, + LiveChartPath* value); +VALA_EXTERN LiveChartSeries* live_chart_series_new (LiveChartChart* chart); +VALA_EXTERN LiveChartSeries* live_chart_series_construct (GType object_type, + LiveChartChart* chart); +VALA_EXTERN LiveChartSerie* live_chart_series_register (LiveChartSeries* self, + LiveChartSerie* serie); +VALA_EXTERN LiveChartSerie* live_chart_series_get (LiveChartSeries* self, + gint index, + GError** error); +VALA_EXTERN LiveChartSerie* live_chart_series_get_by_name (LiveChartSeries* self, + const gchar* name, + GError** error); +VALA_EXTERN GeeIterator* live_chart_series_iterator (LiveChartSeries* self); +VALA_EXTERN GType live_chart_smooth_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSmoothLine, g_object_unref) +VALA_EXTERN GType live_chart_smooth_line_area_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartSmoothLineArea, g_object_unref) +VALA_EXTERN LiveChartSmoothLineArea* live_chart_smooth_line_area_new (LiveChartValues* values); +VALA_EXTERN LiveChartSmoothLineArea* live_chart_smooth_line_area_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN void live_chart_smooth_line_area_draw_regions_on_area (LiveChartSmoothLineArea* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN gdouble live_chart_smooth_line_area_get_area_alpha (LiveChartSmoothLineArea* self); +VALA_EXTERN void live_chart_smooth_line_area_set_area_alpha (LiveChartSmoothLineArea* self, + gdouble value); +VALA_EXTERN LiveChartSmoothLine* live_chart_smooth_line_new (LiveChartValues* values); +VALA_EXTERN LiveChartSmoothLine* live_chart_smooth_line_construct (GType object_type, + LiveChartValues* values); +VALA_EXTERN cairo_path_t* live_chart_smooth_line_draw_smooth_line (LiveChartSmoothLine* self, + LiveChartPoints* points, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_smooth_line_draw_regions_on_line (LiveChartSmoothLine* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN LiveChartRegion* live_chart_smooth_line_get_region (LiveChartSmoothLine* self); +VALA_EXTERN void live_chart_smooth_line_set_region (LiveChartSmoothLine* self, + LiveChartRegion* value); +VALA_EXTERN GType live_chart_threshold_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartThresholdLine, g_object_unref) +VALA_EXTERN LiveChartThresholdLine* live_chart_threshold_line_new (gdouble value); +VALA_EXTERN LiveChartThresholdLine* live_chart_threshold_line_construct (GType object_type, + gdouble value); +VALA_EXTERN gdouble live_chart_threshold_line_get_value (LiveChartThresholdLine* self); +VALA_EXTERN void live_chart_threshold_line_set_value (LiveChartThresholdLine* self, + gdouble value); +VALA_EXTERN gfloat live_chart_cap (gfloat value); +VALA_EXTERN gboolean live_chart_has_fractional_part (gfloat value); +VALA_EXTERN gchar* live_chart_format_for_y_axis (const gchar* unit, + gfloat value); +VALA_EXTERN GeeList* live_chart_golden_divisors (gfloat value); +VALA_EXTERN LiveChartValues* live_chart_values_new (gint buffer_size); +VALA_EXTERN LiveChartValues* live_chart_values_construct (GType object_type, + gint buffer_size); +VALA_EXTERN void live_chart_values_add (LiveChartValues* self, + LiveChartTimestampedValue* value); +VALA_EXTERN LiveChartBounds* live_chart_values_get_bounds (LiveChartValues* self); +VALA_EXTERN void live_chart_values_set_bounds (LiveChartValues* self, + LiveChartBounds* value); +VALA_EXTERN GType live_chart_static_static_chart_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticChart, g_object_unref) +VALA_EXTERN GType live_chart_static_static_series_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticSeries, g_object_unref) +VALA_EXTERN LiveChartStaticStaticChart* live_chart_static_static_chart_new (LiveChartConfig* config); +VALA_EXTERN LiveChartStaticStaticChart* live_chart_static_static_chart_construct (GType object_type, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_chart_set_categories (LiveChartStaticStaticChart* self, + GeeArrayList* categories); +VALA_EXTERN GType live_chart_static_static_serie_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticSerie, g_object_unref) +VALA_EXTERN void live_chart_static_static_chart_add_serie (LiveChartStaticStaticChart* self, + LiveChartStaticStaticSerie* serie); +VALA_EXTERN GType live_chart_static_static_grid_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticGrid, g_object_unref) +VALA_EXTERN LiveChartStaticStaticGrid* live_chart_static_static_chart_get_grid (LiveChartStaticStaticChart* self); +VALA_EXTERN void live_chart_static_static_chart_set_grid (LiveChartStaticStaticChart* self, + LiveChartStaticStaticGrid* value); +VALA_EXTERN LiveChartBackground* live_chart_static_static_chart_get_background (LiveChartStaticStaticChart* self); +VALA_EXTERN void live_chart_static_static_chart_set_background (LiveChartStaticStaticChart* self, + LiveChartBackground* value); +VALA_EXTERN LiveChartLegend* live_chart_static_static_chart_get_legend (LiveChartStaticStaticChart* self); +VALA_EXTERN void live_chart_static_static_chart_set_legend (LiveChartStaticStaticChart* self, + LiveChartLegend* value); +VALA_EXTERN LiveChartStaticStaticSeries* live_chart_static_static_series_new (LiveChartStaticStaticChart* chart); +VALA_EXTERN LiveChartStaticStaticSeries* live_chart_static_static_series_construct (GType object_type, + LiveChartStaticStaticChart* chart); +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_series_register (LiveChartStaticStaticSeries* self, + LiveChartStaticStaticSerie* serie); +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_series_get (LiveChartStaticStaticSeries* self, + gint index, + GError** error); +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_series_get_by_name (LiveChartStaticStaticSeries* self, + const gchar* name, + GError** error); +VALA_EXTERN GeeIterator* live_chart_static_static_series_iterator (LiveChartStaticStaticSeries* self); +VALA_EXTERN GType live_chart_static_static_serie_renderer_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticSerieRenderer, g_object_unref) +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_serie_new (const gchar* name, + LiveChartStaticStaticSerieRenderer* renderer); +VALA_EXTERN LiveChartStaticStaticSerie* live_chart_static_static_serie_construct (GType object_type, + const gchar* name, + LiveChartStaticStaticSerieRenderer* renderer); +VALA_EXTERN void live_chart_static_static_serie_add (LiveChartStaticStaticSerie* self, + const gchar* name, + gdouble value); +VALA_EXTERN GType live_chart_static_static_values_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticValues, g_object_unref) +VALA_EXTERN LiveChartStaticStaticValues* live_chart_static_static_serie_get_values (LiveChartStaticStaticSerie* self); +VALA_EXTERN void live_chart_static_static_serie_clear (LiveChartStaticStaticSerie* self); +VALA_EXTERN const gchar* live_chart_static_static_serie_get_name (LiveChartStaticStaticSerie* self); +VALA_EXTERN void live_chart_static_static_serie_set_name (LiveChartStaticStaticSerie* self, + const gchar* value); +VALA_EXTERN LiveChartPath* live_chart_static_static_serie_get_line (LiveChartStaticStaticSerie* self); +VALA_EXTERN void live_chart_static_static_serie_set_line (LiveChartStaticStaticSerie* self, + LiveChartPath* value); +VALA_EXTERN GType live_chart_static_named_value_get_type (void) G_GNUC_CONST ; +VALA_EXTERN LiveChartStaticNamedValue* live_chart_static_named_value_dup (const LiveChartStaticNamedValue* self); +VALA_EXTERN void live_chart_static_named_value_free (LiveChartStaticNamedValue* self); +VALA_EXTERN void live_chart_static_named_value_copy (const LiveChartStaticNamedValue* self, + LiveChartStaticNamedValue* dest); +VALA_EXTERN void live_chart_static_named_value_destroy (LiveChartStaticNamedValue* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (LiveChartStaticNamedValue, live_chart_static_named_value_destroy) +VALA_EXTERN LiveChartStaticStaticValues* live_chart_static_static_values_new (void); +VALA_EXTERN LiveChartStaticStaticValues* live_chart_static_static_values_construct (GType object_type); +VALA_EXTERN void live_chart_static_static_values_add (LiveChartStaticStaticValues* self, + LiveChartStaticNamedValue* value); +VALA_EXTERN LiveChartBounds* live_chart_static_static_values_get_bounds (LiveChartStaticStaticValues* self); +VALA_EXTERN void live_chart_static_static_values_set_bounds (LiveChartStaticStaticValues* self, + LiveChartBounds* value); +VALA_EXTERN LiveChartStaticStaticSerieRenderer* live_chart_static_static_serie_renderer_construct (GType object_type); +VALA_EXTERN LiveChartStaticStaticValues* live_chart_static_static_serie_renderer_get_values (LiveChartStaticStaticSerieRenderer* self); +VALA_EXTERN void live_chart_static_static_serie_renderer_draw (LiveChartStaticStaticSerieRenderer* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_serie_renderer_debug (LiveChartStaticStaticSerieRenderer* self, + cairo_t* ctx); +VALA_EXTERN gboolean live_chart_static_static_serie_renderer_is_out_of_area (LiveChartStaticStaticSerieRenderer* self, + LiveChartPoint* point); +VALA_EXTERN LiveChartPath* live_chart_static_static_serie_renderer_get_line (LiveChartStaticStaticSerieRenderer* self); +VALA_EXTERN void live_chart_static_static_serie_renderer_set_line (LiveChartStaticStaticSerieRenderer* self, + LiveChartPath* value); +VALA_EXTERN GType live_chart_static_static_line_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticLine, g_object_unref) +VALA_EXTERN LiveChartStaticStaticLine* live_chart_static_static_line_new (LiveChartStaticStaticValues* values); +VALA_EXTERN LiveChartStaticStaticLine* live_chart_static_static_line_construct (GType object_type, + LiveChartStaticStaticValues* values); +VALA_EXTERN GType live_chart_static_static_points_get_type (void) G_GNUC_CONST ; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (LiveChartStaticStaticPoints, g_object_unref) +VALA_EXTERN void live_chart_static_static_line_draw_line (LiveChartStaticStaticLine* self, + LiveChartStaticStaticPoints* points, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_restore (LiveChartStaticStaticGrid* self, + cairo_t* ctx); +VALA_EXTERN void live_chart_static_static_grid_render_abscissa (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_render_ordinate (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_render_grid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_render_vgrid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_render_hgrid (LiveChartStaticStaticGrid* self, + cairo_t* ctx, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_update_bounding_box (LiveChartStaticStaticGrid* self, + LiveChartConfig* config); +VALA_EXTERN void live_chart_static_static_grid_debug (LiveChartStaticStaticGrid* self, + cairo_t* ctx); +VALA_EXTERN LiveChartStaticStaticGrid* live_chart_static_static_grid_new (void); +VALA_EXTERN LiveChartStaticStaticGrid* live_chart_static_static_grid_construct (GType object_type); +VALA_EXTERN void live_chart_static_static_grid_get_main_color (LiveChartStaticStaticGrid* self, + GdkRGBA * result); +VALA_EXTERN void live_chart_static_static_grid_set_main_color (LiveChartStaticStaticGrid* self, + GdkRGBA * value); +VALA_EXTERN LiveChartStaticStaticPoints* live_chart_static_static_points_new (void); +VALA_EXTERN LiveChartStaticStaticPoints* live_chart_static_static_points_construct (GType object_type); +VALA_EXTERN void live_chart_static_static_points_add (LiveChartStaticStaticPoints* self, + LiveChartPoint* point); +VALA_EXTERN void live_chart_static_static_points_get (LiveChartStaticStaticPoints* self, + gint at, + LiveChartPoint* result); +VALA_EXTERN void live_chart_static_static_points_after (LiveChartStaticStaticPoints* self, + gint at, + LiveChartPoint* result); +VALA_EXTERN void live_chart_static_static_points_first (LiveChartStaticStaticPoints* self, + LiveChartPoint* result); +VALA_EXTERN void live_chart_static_static_points_last (LiveChartStaticStaticPoints* self, + LiveChartPoint* result); +VALA_EXTERN LiveChartStaticStaticPoints* live_chart_static_static_points_create (LiveChartStaticStaticValues* values, + LiveChartConfig* config); +VALA_EXTERN LiveChartBounds* live_chart_static_static_points_get_bounds (LiveChartStaticStaticPoints* self); +VALA_EXTERN void live_chart_static_static_points_set_bounds (LiveChartStaticStaticPoints* self, + LiveChartBounds* value); +VALA_EXTERN gint live_chart_static_static_points_get_size (LiveChartStaticStaticPoints* self); +VALA_EXTERN gdouble live_chart_static_static_points_get_realtime_delta (LiveChartStaticStaticPoints* self); +VALA_EXTERN void live_chart_static_static_points_set_realtime_delta (LiveChartStaticStaticPoints* self, + gdouble value); + +G_END_DECLS + +#endif diff --git a/iPDC/lib/livechart_static.vapi b/iPDC/lib/livechart_static.vapi new file mode 100644 index 0000000..317f026 --- /dev/null +++ b/iPDC/lib/livechart_static.vapi @@ -0,0 +1,507 @@ +/* livechart_static.vapi generated by valac 0.56.0, do not modify. */ + +namespace LiveChart { + namespace Static { + [CCode (cheader_filename = "livechart_static.h")] + public class StaticChart : Gtk.DrawingArea { + public LiveChart.Config config; + public LiveChart.Static.StaticSeries series; + public StaticChart (LiveChart.Config config = new LiveChart.Config ()); + public void add_serie (LiveChart.Static.StaticSerie serie); + public void set_categories (Gee.ArrayList categories); + public LiveChart.Background background { get; set; } + public LiveChart.Static.StaticGrid grid { get; set; } + public LiveChart.Legend legend { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class StaticGrid : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + public const int ABSCISSA_TIME_PADDING; + public StaticGrid (); + protected void debug (Cairo.Context ctx); + protected void render_abscissa (Cairo.Context ctx, LiveChart.Config config); + protected void render_grid (Cairo.Context ctx, LiveChart.Config config); + protected void render_hgrid (Cairo.Context ctx, LiveChart.Config config); + protected void render_ordinate (Cairo.Context ctx, LiveChart.Config config); + protected void render_vgrid (Cairo.Context ctx, LiveChart.Config config); + protected void restore (Cairo.Context ctx); + protected void update_bounding_box (LiveChart.Config config); + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class StaticLine : LiveChart.Static.StaticSerieRenderer { + public StaticLine (LiveChart.Static.StaticValues values = new LiveChart.Static.StaticValues ()); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + protected void draw_line (LiveChart.Static.StaticPoints points, Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart_static.h")] + public class StaticPoints : GLib.Object { + public StaticPoints (); + public void add (LiveChart.Point point); + public LiveChart.Point after (int at); + public static LiveChart.Static.StaticPoints create (LiveChart.Static.StaticValues values, LiveChart.Config config); + public LiveChart.Point first (); + public new LiveChart.Point @get (int at); + public LiveChart.Point last (); + public LiveChart.Bounds bounds { get; set construct; } + public double realtime_delta { get; set; } + public int size { get; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class StaticSerie : LiveChart.Colorable, LiveChart.Drawable, GLib.Object { + public StaticSerie (string name, LiveChart.Static.StaticSerieRenderer renderer = new LiveChart.Static.StaticLine (new LiveChart.Static.StaticValues ())); + public void add (string name, double value); + public void clear (); + public LiveChart.Static.StaticValues get_values (); + public LiveChart.Path line { get; set; } + public string name { get; set; } + public signal void value_added (double value); + } + [CCode (cheader_filename = "livechart_static.h")] + public abstract class StaticSerieRenderer : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + protected LiveChart.Static.StaticValues values; + protected StaticSerieRenderer (); + protected void debug (Cairo.Context ctx); + public abstract void draw (Cairo.Context ctx, LiveChart.Config config); + public LiveChart.Static.StaticValues get_values (); + protected bool is_out_of_area (LiveChart.Point point); + public LiveChart.Path line { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class StaticSeries : GLib.Object { + public StaticSeries (LiveChart.Static.StaticChart chart); + public new LiveChart.Static.StaticSerie @get (int index) throws LiveChart.ChartError; + public LiveChart.Static.StaticSerie get_by_name (string name) throws LiveChart.ChartError; + public Gee.Iterator iterator (); + public LiveChart.Static.StaticSerie register (LiveChart.Static.StaticSerie serie); + } + [CCode (cheader_filename = "livechart_static.h")] + public class StaticValues : Gee.LinkedList { + public StaticValues (); + public new void add (LiveChart.Static.NamedValue value); + public LiveChart.Bounds bounds { get; set construct; } + } + [CCode (cheader_filename = "livechart_static.h")] + public struct NamedValue { + public string name; + public double value; + } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Area : LiveChart.Drawable, GLib.Object { + public Area (LiveChart.Points points, Gdk.RGBA color, double alpha); + } + [CCode (cheader_filename = "livechart_static.h")] + public class Background : LiveChart.Drawable, GLib.Object { + public Background (); + public Gdk.RGBA color { get; set; } + [Version (deprecated = true, deprecated_since = "1.8.0", replacement = "Background.color")] + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Bar : LiveChart.SerieRenderer { + public Bar (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart_static.h")] + public class BezierIntersector : LiveChart.Intersector { + public BezierIntersector (LiveChart.Region region, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart_static.h")] + public class Bounds : GLib.Object { + public Bounds (double lower = double.NAN, double upper = double.NAN); + public bool has_lower (); + public bool has_upper (); + public bool update (double value); + public double lower { get; private set; } + public double upper { get; private set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Chart : Gtk.DrawingArea { + public LiveChart.Config config; + public LiveChart.Series series; + public Chart (LiveChart.Config config = new LiveChart.Config ()); + public void add_serie (LiveChart.Serie serie); + public void add_unaware_timestamp_collection (LiveChart.Serie serie, Gee.Collection collection, int timespan_between_value); + public void add_unaware_timestamp_collection_by_index (int serie_index, Gee.Collection collection, int timespan_between_value) throws LiveChart.ChartError; + [Version (deprecated = true, deprecated_since = "1.7.0", replacement = "Retrieve the Serie from Chart.series (or from the serie you created) and add the value using serie.add")] + public void add_value (LiveChart.Serie serie, double value); + [Version (deprecated = true, deprecated_since = "1.7.0", replacement = "Retrieve the Serie from Chart.series and add the value using serie.add")] + public void add_value_by_index (int serie_index, double value) throws LiveChart.ChartError; + public void refresh_every (int ms); + public void to_png (string filename) throws GLib.Error; + public LiveChart.Background background { get; set; } + public LiveChart.Grid grid { get; set; } + public LiveChart.Legend legend { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Config { + public LiveChart.Padding padding; + public LiveChart.XAxis x_axis; + public LiveChart.YAxis y_axis; + public Config (); + public LiveChart.Boundaries boundaries (); + public void configure (Cairo.Context ctx, LiveChart.Legend? legend); + public int height { get; set; } + public int width { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Font { + public Font (); + public void configure (Cairo.Context ctx); + public Gdk.RGBA color { get; set; } + public string face { get; set; } + public uint8 size { get; set; } + public Cairo.FontSlant slant { get; set; } + public Cairo.FontWeight weight { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Grid : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + public const int ABSCISSA_TIME_PADDING; + public Grid (); + protected void debug (Cairo.Context ctx); + protected void render_abscissa (Cairo.Context ctx, LiveChart.Config config); + protected void render_grid (Cairo.Context ctx, LiveChart.Config config); + protected void render_hgrid (Cairo.Context ctx, LiveChart.Config config); + protected void render_ordinate (Cairo.Context ctx, LiveChart.Config config); + protected void render_vgrid (Cairo.Context ctx, LiveChart.Config config); + protected void restore (Cairo.Context ctx); + protected void update_bounding_box (LiveChart.Config config); + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class HorizontalLegend : LiveChart.Legend { + public HorizontalLegend (); + protected void debug (Cairo.Context ctx); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart_static.h")] + public class Intersection : GLib.Object { + public double? entered_at; + public double? exited_at; + public Intersection (LiveChart.Region region, double start_x, double entered_at); + public void close (double x, double exited_at); + public bool is_closed (); + public bool is_open (); + public void update (double x); + public Intersection.without_entry_point (LiveChart.Region region, double start_x); + public double end_x { get; private set; } + public LiveChart.Region region { get; set construct; } + public double start_x { get; private set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Intersections : GLib.Object { + public Intersections (); + public void close (double x, double exited_at); + public void @foreach (Gee.ForallFunc f); + public new LiveChart.Intersection @get (int index); + public LiveChart.Region get_current_region (); + public bool has_an_opened_intersection (); + public void open (LiveChart.Region region, double x, double entered_at); + public void open_without_entrypoint (LiveChart.Region region, double x); + public int size (); + public void update (double x); + } + [CCode (cheader_filename = "livechart_static.h")] + public class Labels { + public Labels (); + public Cairo.TextExtents extents { get; set; } + public LiveChart.Font font { get; set; } + public bool visible { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public abstract class Legend : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + public LiveChart.Labels labels; + protected Gee.ArrayList series; + protected Legend (); + public void add_legend (LiveChart.Serie serie); + public abstract void draw (Cairo.Context ctx, LiveChart.Config config); + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Line : LiveChart.SerieRenderer { + public Line (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + protected LiveChart.Points draw_line (LiveChart.Points points, Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart_static.h")] + public class LineArea : LiveChart.Line { + public LineArea (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + public double area_alpha { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class MaxBoundLine : LiveChart.SerieRenderer { + public MaxBoundLine (); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + public MaxBoundLine.from_serie (LiveChart.Serie serie); + } + [CCode (cheader_filename = "livechart_static.h")] + public class MinBoundLine : LiveChart.SerieRenderer { + public MinBoundLine (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + public MinBoundLine.from_serie (LiveChart.Serie serie); + } + [CCode (cheader_filename = "livechart_static.h")] + public class NoopLegend : LiveChart.Legend { + public NoopLegend (); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + } + [CCode (cheader_filename = "livechart_static.h")] + public class Path : GLib.Object { + public LiveChart.Dash? dash; + public Path (double width = 0.5, Gdk.RGBA color = { 1.0, 1.0, 1.0, 1.0 }, bool visible = true, LiveChart.Dash? dash = null); + public void configure (Cairo.Context ctx); + public Gdk.RGBA color { get; set; } + public bool visible { get; set; } + public double width { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Points : GLib.Object { + public Points (); + public void add (LiveChart.Point point); + public LiveChart.Point after (int at); + public static LiveChart.Points create (LiveChart.Values values, LiveChart.Config config); + public LiveChart.Point first (); + public new LiveChart.Point @get (int at); + public LiveChart.Point last (); + public LiveChart.Bounds bounds { get; set construct; } + public double realtime_delta { get; set; } + public int size { get; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Region { + public Region (double floor, double ceil); + public Region.between (double above, double below); + public void handle (LiveChart.Intersections intersections, LiveChart.Point previous, LiveChart.Point current, LiveChart.GetIntersection get_intersection); + public bool has_at_least_one_point_within (LiveChart.Point previous, LiveChart.Point current); + public LiveChart.Region with_area_color (Gdk.RGBA color); + public LiveChart.Region with_line_color (Gdk.RGBA color); + public Gdk.RGBA area_color { get; set; } + public Gdk.RGBA line_color { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Serie : LiveChart.Colorable, LiveChart.Drawable, GLib.Object { + public Serie (string name, LiveChart.SerieRenderer renderer = new LiveChart.Line (new LiveChart.Values (1000))); + public void add (double value); + public void add_with_timestamp (double value, int64 timestamp); + public void clear (); + [Version (deprecated = true, deprecated_since = "1.7.1", replacement = "Serie.main_color property instead")] + public Gdk.RGBA get_main_color (); + public LiveChart.Values get_values (); + [Version (deprecated = true, deprecated_since = "1.7.1", replacement = "Serie.main_color property instead")] + public void set_main_color (Gdk.RGBA color); + public LiveChart.Path line { get; set; } + public string name { get; set; } + public signal void value_added (double value); + } + [CCode (cheader_filename = "livechart_static.h")] + public abstract class SerieRenderer : LiveChart.Drawable, GLib.Object { + protected LiveChart.BoundingBox bounding_box; + protected LiveChart.Values values; + protected SerieRenderer (); + protected void debug (Cairo.Context ctx); + public abstract void draw (Cairo.Context ctx, LiveChart.Config config); + public LiveChart.Values get_values (); + protected bool is_out_of_area (LiveChart.Point point); + public LiveChart.Path line { get; set; } + [Version (deprecated = true, deprecated_since = "1.8.0", replacement = "Serie.renderer.line.color")] + public Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Series : GLib.Object { + public Series (LiveChart.Chart chart); + public new LiveChart.Serie @get (int index) throws LiveChart.ChartError; + public LiveChart.Serie get_by_name (string name) throws LiveChart.ChartError; + public Gee.Iterator iterator (); + public LiveChart.Serie register (LiveChart.Serie serie); + } + [CCode (cheader_filename = "livechart_static.h")] + public class SmoothLine : LiveChart.SerieRenderer { + protected LiveChart.Intersections intersections; + public SmoothLine (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + protected void draw_regions_on_line (Cairo.Context ctx, LiveChart.Config config); + public Cairo.Path draw_smooth_line (LiveChart.Points points, Cairo.Context ctx, LiveChart.Config config); + public LiveChart.Region? region { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class SmoothLineArea : LiveChart.SmoothLine { + public SmoothLineArea (LiveChart.Values values = new LiveChart.Values (1000)); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + protected void draw_regions_on_area (Cairo.Context ctx, LiveChart.Config config); + public double area_alpha { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class ThresholdLine : LiveChart.SerieRenderer { + public ThresholdLine (double value); + public override void draw (Cairo.Context ctx, LiveChart.Config config); + public double value { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class Values : Gee.LinkedList { + public Values (int buffer_size = 1000); + public new void add (LiveChart.TimestampedValue value); + public LiveChart.Bounds bounds { get; set construct; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class XAxis { + public LiveChart.Path axis; + public LiveChart.Labels labels; + public LiveChart.Path lines; + public XAxis (); + public double get_ratio (); + public float tick_interval { get; set; } + public float tick_length { get; set; } + public bool visible { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public class YAxis { + public LiveChart.Path axis; + public double? fixed_max; + public LiveChart.Labels labels; + public LiveChart.Path lines; + [Version (deprecated = true, deprecated_since = "1.0.0b7", replacement = "ratio is always smart ;)")] + public bool smart_ratio; + public LiveChart.Ticks ticks; + public YAxis (string unit = ""); + public LiveChart.Bounds get_bounds (); + public string get_max_displayed_value (); + public double get_ratio (); + public LiveChart.Ticks get_ticks (); + public void update (int area_height); + public bool update_bounds (double value); + public float ratio_threshold { get; set; } + public float tick_interval { get; set; } + [Version (deprecated = true, deprecated_since = "1.0.0b7")] + public float tick_length { get; set; } + public string unit { get; set; } + public bool visible { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public interface Colorable : GLib.Object { + [Version (deprecated = true, deprecated_since = "1.8.0", replacement = "Serie.line.color")] + public abstract Gdk.RGBA main_color { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public interface Drawable : GLib.Object { + public abstract void draw (Cairo.Context ctx, LiveChart.Config config); + public abstract LiveChart.BoundingBox get_bounding_box (); + public abstract bool visible { get; set; } + } + [CCode (cheader_filename = "livechart_static.h")] + public interface Intersector { + public abstract void intersect (LiveChart.Intersections intersections, LiveChart.Point previous, LiveChart.Point current, T path); + } + [CCode (cheader_filename = "livechart_static.h")] + public struct BezierCurve { + public LiveChart.Coord c0; + public LiveChart.Coord c1; + public LiveChart.Coord c2; + public LiveChart.Coord c3; + } + [CCode (cheader_filename = "livechart_static.h")] + public struct Boundaries { + public LiveChart.Boundary x; + public LiveChart.Boundary y; + public int width; + public int height; + } + [CCode (cheader_filename = "livechart_static.h")] + public struct Boundary { + public int min; + public int max; + } + [CCode (cheader_filename = "livechart_static.h")] + public struct BoundingBox { + public double x; + public double y; + public double width; + public double height; + } + [CCode (cheader_filename = "livechart_static.h")] + public struct Coord { + public double x; + public double y; + } + [CCode (cheader_filename = "livechart_static.h")] + public struct Dash { + public double[]? dashes; + public double offset; + public Dash (); + } + [CCode (cheader_filename = "livechart_static.h")] + public struct Padding { + public LiveChart.AutoPadding smart; + public int top; + public int right; + public int bottom; + public int left; + public Padding (); + } + [CCode (cheader_filename = "livechart_static.h")] + public struct Point { + public double x; + public double y; + public double height; + public LiveChart.TimestampedValue data; + } + [CCode (cheader_filename = "livechart_static.h")] + public struct RegionHandleResult { + public LiveChart.RegionHandleStatus status; + public double at_value; + } + [CCode (cheader_filename = "livechart_static.h")] + public struct Segment { + public LiveChart.Coord from; + public LiveChart.Coord to; + } + [CCode (cheader_filename = "livechart_static.h")] + public struct Ticks { + public Gee.List values; + public Ticks (); + } + [CCode (cheader_filename = "livechart_static.h")] + public struct TimestampedValue { + public double timestamp; + public double value; + } + [CCode (cheader_filename = "livechart_static.h")] + [Flags] + public enum AutoPadding { + NONE, + TOP, + RIGHT, + BOTTOM, + LEFT + } + [CCode (cheader_filename = "livechart_static.h")] + public enum RegionHandleStatus { + ENTER, + EXIT, + WITHIN, + OUT + } + [CCode (cheader_filename = "livechart_static.h")] + public errordomain ChartError { + EXPORT_ERROR, + SERIE_NOT_FOUND + } + [CCode (cheader_filename = "livechart_static.h")] + public delegate LiveChart.Coord? GetIntersection (double at_value); + [CCode (cheader_filename = "livechart_static.h")] + public static LiveChart.BezierCurve build_bezier_curve_from_points (LiveChart.Point previous, LiveChart.Point target); + [CCode (cheader_filename = "livechart_static.h")] + public static float cap (float value); + [CCode (cheader_filename = "livechart_static.h")] + public static Gee.List find_intersections_between (LiveChart.Segment segment, LiveChart.BezierCurve bezier); + [CCode (cheader_filename = "livechart_static.h")] + public static string format_for_y_axis (string unit, float value); + [CCode (cheader_filename = "livechart_static.h")] + public static Gee.List golden_divisors (float value); + [CCode (cheader_filename = "livechart_static.h")] + public static bool has_fractional_part (float value); +} diff --git a/iPDC/src/map_vis.c b/iPDC/src/map_vis.c index 14be98a..d9277b2 100644 --- a/iPDC/src/map_vis.c +++ b/iPDC/src/map_vis.c @@ -5,6 +5,7 @@ #include "osm-gps-map.h" #include "Attack_detect.h" #include "connections.h" +#include "livechart.h" // #include "utility_tools.h" @@ -63,8 +64,6 @@ gboolean update_images(gpointer* pars){ df = df->dnext; } // } - -