iPDC-suite/iPDC/lib/liblivechart_static.a.p/points.c

740 lines
23 KiB
C

/* points.c generated by valac 0.56.0, the Vala compiler
* generated from points.vala, do not modify */
#include "livechart_static.h"
#include <glib.h>
#include <string.h>
#include <gee.h>
#include <glib-object.h>
#include <float.h>
#include <math.h>
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;
}