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

/*
 * Copyright (c) 2025 focus-timer contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Authors: Kamil Prusko <kamilprusko@gmail.com>
 */

#include "ft_ui.h"
#include <glib.h>
#include <adwaita.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <float.h>
#include <math.h>
#include <graphene-gobject.h>
#include <string.h>
#include <gdk/gdk.h>
#include <gsk/gsk.h>

#define FT_CHECKMARK_DEFAULT_PIXEL_SIZE ((guint) 32)
#define FT_CHECKMARK_DEFAULT_DELAY ((guint) 500)
#define FT_CHECKMARK_LINE_WIDTH ((guint) 6)
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	FT_CHECKMARK_0_PROPERTY,
	FT_CHECKMARK_PIXEL_SIZE_PROPERTY,
	FT_CHECKMARK_DELAY_PROPERTY,
	FT_CHECKMARK_NUM_PROPERTIES
};
static GParamSpec* ft_checkmark_properties[FT_CHECKMARK_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _gsk_path_unref0(var) ((var == NULL) ? NULL : (var = (gsk_path_unref (var), NULL)))
#define __vala_GskStroke_free0(var) ((var == NULL) ? NULL : (var = (_vala_GskStroke_free (var), NULL)))
#define _gsk_path_builder_unref0(var) ((var == NULL) ? NULL : (var = (gsk_path_builder_unref (var), NULL)))

struct _FtCheckmarkPrivate {
	guint _delay;
	guint _pixel_size;
	guint _line_width;
	AdwTimedAnimation* first_animation;
	AdwTimedAnimation* second_animation;
	guint timeout_id;
	gboolean animation_done;
};

static gint FtCheckmark_private_offset;
static gpointer ft_checkmark_parent_class = NULL;

static void ft_checkmark_on_second_animation_done (FtCheckmark* self);
static void ft_checkmark_on_first_animation_done (FtCheckmark* self);
static void ft_checkmark_animate (FtCheckmark* self);
static void _gtk_widget_queue_draw_adw_animation_target_func (gdouble value,
                                                       gpointer self);
static void _ft_checkmark_on_first_animation_done_adw_animation_done (AdwAnimation* _sender,
                                                               gpointer self);
static void _ft_checkmark_on_second_animation_done_adw_animation_done (AdwAnimation* _sender,
                                                                gpointer self);
static gboolean __lambda88_ (FtCheckmark* self);
static gboolean ___lambda88__gsource_func (gpointer self);
static void ft_checkmark_real_map (GtkWidget* base);
static GtkSizeRequestMode ft_checkmark_real_get_request_mode (GtkWidget* base);
static void ft_checkmark_real_measure (GtkWidget* base,
                                GtkOrientation orientation,
                                gint for_size,
                                gint* minimum,
                                gint* natural,
                                gint* minimum_baseline,
                                gint* natural_baseline);
static void ft_checkmark_real_snapshot (GtkWidget* base,
                                 GtkSnapshot* snapshot);
static void _vala_GskStroke_free (GskStroke* self);
static void ft_checkmark_real_dispose (GObject* base);
static void ft_checkmark_finalize (GObject * obj);
static GType ft_checkmark_get_type_once (void);
static void _vala_ft_checkmark_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec);
static void _vala_ft_checkmark_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
ft_checkmark_get_instance_private (FtCheckmark* self)
{
	return G_STRUCT_MEMBER_P (self, FtCheckmark_private_offset);
}

static void
ft_checkmark_on_second_animation_done (FtCheckmark* self)
{
	g_return_if_fail (self != NULL);
	_g_object_unref0 (self->priv->first_animation);
	self->priv->first_animation = NULL;
	_g_object_unref0 (self->priv->second_animation);
	self->priv->second_animation = NULL;
	self->priv->animation_done = TRUE;
}

static void
ft_checkmark_on_first_animation_done (FtCheckmark* self)
{
	AdwTimedAnimation* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->second_animation;
	adw_animation_play ((AdwAnimation*) _tmp0_);
}

static void
_gtk_widget_queue_draw_adw_animation_target_func (gdouble value,
                                                  gpointer self)
{
	gtk_widget_queue_draw ((GtkWidget*) self);
}

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

static void
_ft_checkmark_on_first_animation_done_adw_animation_done (AdwAnimation* _sender,
                                                          gpointer self)
{
	ft_checkmark_on_first_animation_done ((FtCheckmark*) self);
}

static void
_ft_checkmark_on_second_animation_done_adw_animation_done (AdwAnimation* _sender,
                                                           gpointer self)
{
	ft_checkmark_on_second_animation_done ((FtCheckmark*) self);
}

static gboolean
__lambda88_ (FtCheckmark* self)
{
	AdwTimedAnimation* _tmp0_;
	gboolean result;
	self->priv->timeout_id = (guint) 0;
	_tmp0_ = self->priv->first_animation;
	if (_tmp0_ != NULL) {
		AdwTimedAnimation* _tmp1_;
		_tmp1_ = self->priv->first_animation;
		adw_animation_play ((AdwAnimation*) _tmp1_);
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda88__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda88_ ((FtCheckmark*) self);
	return result;
}

static void
ft_checkmark_animate (FtCheckmark* self)
{
	AdwTimedAnimation* _tmp0_;
	AdwTimedAnimation* _tmp2_;
	AdwCallbackAnimationTarget* animation_target = NULL;
	AdwCallbackAnimationTarget* _tmp4_;
	AdwAnimationTarget* _tmp5_;
	AdwTimedAnimation* _tmp6_;
	AdwTimedAnimation* _tmp7_;
	AdwTimedAnimation* _tmp8_;
	AdwAnimationTarget* _tmp9_;
	AdwTimedAnimation* _tmp10_;
	AdwTimedAnimation* _tmp11_;
	AdwTimedAnimation* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->first_animation;
	if (_tmp0_ != NULL) {
		AdwTimedAnimation* _tmp1_;
		_tmp1_ = self->priv->first_animation;
		adw_animation_pause ((AdwAnimation*) _tmp1_);
		_g_object_unref0 (self->priv->first_animation);
		self->priv->first_animation = NULL;
	}
	_tmp2_ = self->priv->second_animation;
	if (_tmp2_ != NULL) {
		AdwTimedAnimation* _tmp3_;
		_tmp3_ = self->priv->second_animation;
		adw_animation_pause ((AdwAnimation*) _tmp3_);
		_g_object_unref0 (self->priv->second_animation);
		self->priv->second_animation = NULL;
	}
	if (self->priv->timeout_id != ((guint) 0)) {
		g_source_remove (self->priv->timeout_id);
		self->priv->timeout_id = (guint) 0;
	}
	_tmp4_ = (AdwCallbackAnimationTarget*) adw_callback_animation_target_new (_gtk_widget_queue_draw_adw_animation_target_func, g_object_ref ((GtkWidget*) self), g_object_unref);
	animation_target = _tmp4_;
	_tmp5_ = _g_object_ref0 ((AdwAnimationTarget*) animation_target);
	_tmp6_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) self, 0.0, 1.0, (guint) 200, _tmp5_);
	_g_object_unref0 (self->priv->first_animation);
	self->priv->first_animation = _tmp6_;
	_tmp7_ = self->priv->first_animation;
	adw_timed_animation_set_easing (_tmp7_, ADW_EASE_IN_OUT_CUBIC);
	_tmp8_ = self->priv->first_animation;
	g_signal_connect_object ((AdwAnimation*) _tmp8_, "done", (GCallback) _ft_checkmark_on_first_animation_done_adw_animation_done, self, 0);
	_tmp9_ = _g_object_ref0 ((AdwAnimationTarget*) animation_target);
	_tmp10_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) self, 0.0, 1.0, (guint) 300, _tmp9_);
	_g_object_unref0 (self->priv->second_animation);
	self->priv->second_animation = _tmp10_;
	_tmp11_ = self->priv->second_animation;
	adw_timed_animation_set_easing (_tmp11_, ADW_EASE_OUT_QUAD);
	_tmp12_ = self->priv->second_animation;
	g_signal_connect_object ((AdwAnimation*) _tmp12_, "done", (GCallback) _ft_checkmark_on_second_animation_done_adw_animation_done, self, 0);
	self->priv->timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, self->priv->_delay, ___lambda88__gsource_func, g_object_ref (self), g_object_unref);
	g_source_set_name_by_id (self->priv->timeout_id, "Ft.Checkmark.animate");
	self->priv->animation_done = FALSE;
	_g_object_unref0 (animation_target);
}

static void
ft_checkmark_real_map (GtkWidget* base)
{
	FtCheckmark * self;
	self = (FtCheckmark*) base;
	GTK_WIDGET_CLASS (ft_checkmark_parent_class)->map (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	ft_checkmark_animate (self);
}

static GtkSizeRequestMode
ft_checkmark_real_get_request_mode (GtkWidget* base)
{
	FtCheckmark * self;
	GtkSizeRequestMode result;
	self = (FtCheckmark*) base;
	result = GTK_SIZE_REQUEST_CONSTANT_SIZE;
	return result;
}

static void
ft_checkmark_real_measure (GtkWidget* base,
                           GtkOrientation orientation,
                           gint for_size,
                           gint* minimum,
                           gint* natural,
                           gint* minimum_baseline,
                           gint* natural_baseline)
{
	FtCheckmark * self;
	gint _vala_minimum = 0;
	gint _vala_natural = 0;
	gint _vala_minimum_baseline = 0;
	gint _vala_natural_baseline = 0;
	self = (FtCheckmark*) base;
	_vala_minimum = (gint) self->priv->_pixel_size;
	_vala_natural = (gint) self->priv->_pixel_size;
	_vala_minimum_baseline = -1;
	_vala_natural_baseline = -1;
	if (minimum) {
		*minimum = _vala_minimum;
	}
	if (natural) {
		*natural = _vala_natural;
	}
	if (minimum_baseline) {
		*minimum_baseline = _vala_minimum_baseline;
	}
	if (natural_baseline) {
		*natural_baseline = _vala_natural_baseline;
	}
}

static void
_vala_GskStroke_free (GskStroke* self)
{
	g_boxed_free (gsk_stroke_get_type (), self);
}

static void
ft_checkmark_real_snapshot (GtkWidget* base,
                            GtkSnapshot* snapshot)
{
	FtCheckmark * self;
	gfloat width = 0.0F;
	gfloat height = 0.0F;
	graphene_point_t origin = {0};
	graphene_point_t _tmp0_ = {0};
	gfloat scale = 0.0F;
	GdkRGBA color = {0};
	GdkRGBA _tmp1_ = {0};
	gfloat x_0 = 0.0F;
	graphene_point_t _tmp2_;
	gfloat y_0 = 0.0F;
	graphene_point_t _tmp3_;
	gfloat x_1 = 0.0F;
	graphene_point_t _tmp4_;
	gfloat y_1 = 0.0F;
	graphene_point_t _tmp5_;
	gfloat x_2 = 0.0F;
	graphene_point_t _tmp6_;
	gfloat y_2 = 0.0F;
	graphene_point_t _tmp7_;
	gfloat _tmp8_ = 0.0F;
	AdwTimedAnimation* _tmp9_;
	gfloat progress_1 = 0.0F;
	gfloat _tmp14_ = 0.0F;
	AdwTimedAnimation* _tmp15_;
	gfloat progress_2 = 0.0F;
	GskPathBuilder* path_builder = NULL;
	GskPathBuilder* _tmp20_;
	GskStroke* stroke = NULL;
	GskStroke* _tmp21_;
	GskPath* _tmp22_;
	GskPath* _tmp23_;
	GdkRGBA _tmp24_;
	self = (FtCheckmark*) base;
	g_return_if_fail (snapshot != NULL);
	width = (gfloat) gtk_widget_get_width ((GtkWidget*) self);
	height = (gfloat) gtk_widget_get_height ((GtkWidget*) self);
	memset (&_tmp0_, 0, sizeof (graphene_point_t));
	_tmp0_.x = width / 2.0f;
	_tmp0_.y = height / 2.0f;
	origin = _tmp0_;
	scale = (MIN (width, height) - self->priv->_line_width) / 2.0f;
	gtk_widget_get_color ((GtkWidget*) self, &_tmp1_);
	color = _tmp1_;
	_tmp2_ = origin;
	x_0 = _tmp2_.x - (1.000f * scale);
	_tmp3_ = origin;
	y_0 = _tmp3_.y - (0.025f * scale);
	_tmp4_ = origin;
	x_1 = _tmp4_.x - (0.250f * scale);
	_tmp5_ = origin;
	y_1 = _tmp5_.y + (0.725f * scale);
	_tmp6_ = origin;
	x_2 = _tmp6_.x + (1.000f * scale);
	_tmp7_ = origin;
	y_2 = _tmp7_.y - (0.525f * scale);
	_tmp9_ = self->priv->first_animation;
	if (_tmp9_ != NULL) {
		AdwTimedAnimation* _tmp10_;
		gdouble _tmp11_;
		gdouble _tmp12_;
		_tmp10_ = self->priv->first_animation;
		_tmp11_ = adw_animation_get_value ((AdwAnimation*) _tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = (gfloat) _tmp12_;
	} else {
		gfloat _tmp13_ = 0.0F;
		if (self->priv->animation_done) {
			_tmp13_ = 1.0f;
		} else {
			_tmp13_ = 0.0f;
		}
		_tmp8_ = _tmp13_;
	}
	progress_1 = _tmp8_;
	_tmp15_ = self->priv->second_animation;
	if (_tmp15_ != NULL) {
		AdwTimedAnimation* _tmp16_;
		gdouble _tmp17_;
		gdouble _tmp18_;
		_tmp16_ = self->priv->second_animation;
		_tmp17_ = adw_animation_get_value ((AdwAnimation*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp14_ = (gfloat) _tmp18_;
	} else {
		gfloat _tmp19_ = 0.0F;
		if (self->priv->animation_done) {
			_tmp19_ = 1.0f;
		} else {
			_tmp19_ = 0.0f;
		}
		_tmp14_ = _tmp19_;
	}
	progress_2 = _tmp14_;
	_tmp20_ = gsk_path_builder_new ();
	path_builder = _tmp20_;
	gsk_path_builder_move_to (path_builder, x_0, y_0);
	gsk_path_builder_rel_line_to (path_builder, (x_1 - x_0) * progress_1, (y_1 - y_0) * progress_1);
	gsk_path_builder_rel_line_to (path_builder, (x_2 - x_1) * progress_2, (y_2 - y_1) * progress_2);
	_tmp21_ = gsk_stroke_new ((gfloat) self->priv->_line_width);
	stroke = _tmp21_;
	gsk_stroke_set_line_cap (stroke, GSK_LINE_CAP_ROUND);
	gsk_stroke_set_line_join (stroke, GSK_LINE_JOIN_ROUND);
	_tmp22_ = gsk_path_builder_to_path (path_builder);
	_tmp23_ = _tmp22_;
	_tmp24_ = color;
	gtk_snapshot_append_stroke (snapshot, _tmp23_, stroke, &_tmp24_);
	_gsk_path_unref0 (_tmp23_);
	__vala_GskStroke_free0 (stroke);
	_gsk_path_builder_unref0 (path_builder);
}

static void
ft_checkmark_real_dispose (GObject* base)
{
	FtCheckmark * self;
	AdwTimedAnimation* _tmp0_;
	AdwTimedAnimation* _tmp2_;
	self = (FtCheckmark*) base;
	_tmp0_ = self->priv->first_animation;
	if (_tmp0_ != NULL) {
		AdwTimedAnimation* _tmp1_;
		_tmp1_ = self->priv->first_animation;
		adw_animation_pause ((AdwAnimation*) _tmp1_);
		_g_object_unref0 (self->priv->first_animation);
		self->priv->first_animation = NULL;
	}
	_tmp2_ = self->priv->second_animation;
	if (_tmp2_ != NULL) {
		AdwTimedAnimation* _tmp3_;
		_tmp3_ = self->priv->second_animation;
		adw_animation_pause ((AdwAnimation*) _tmp3_);
		_g_object_unref0 (self->priv->second_animation);
		self->priv->second_animation = NULL;
	}
	if (self->priv->timeout_id != ((guint) 0)) {
		g_source_remove (self->priv->timeout_id);
		self->priv->timeout_id = (guint) 0;
	}
	G_OBJECT_CLASS (ft_checkmark_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
}

FtCheckmark*
ft_checkmark_construct (GType object_type)
{
	FtCheckmark * self = NULL;
	self = (FtCheckmark*) g_object_new (object_type, NULL);
	return self;
}

FtCheckmark*
ft_checkmark_new (void)
{
	return ft_checkmark_construct (FT_TYPE_CHECKMARK);
}

guint
ft_checkmark_get_pixel_size (FtCheckmark* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_pixel_size;
	return result;
}

void
ft_checkmark_set_pixel_size (FtCheckmark* self,
                             guint value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_pixel_size != value) {
		self->priv->_pixel_size = value;
		g_object_notify ((GObject*) self, "pixel-size");
		gtk_widget_queue_resize ((GtkWidget*) self);
	}
}

guint
ft_checkmark_get_delay (FtCheckmark* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_delay;
	return result;
}

void
ft_checkmark_set_delay (FtCheckmark* self,
                        guint value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_delay != value) {
		self->priv->_delay = value;
		g_object_notify ((GObject*) self, "delay");
		ft_checkmark_animate (self);
	}
}

static void
ft_checkmark_class_init (FtCheckmarkClass * klass,
                         gpointer klass_data)
{
	ft_checkmark_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FtCheckmark_private_offset);
	((GtkWidgetClass *) klass)->map = (void (*) (GtkWidget*)) ft_checkmark_real_map;
	((GtkWidgetClass *) klass)->get_request_mode = (GtkSizeRequestMode (*) (GtkWidget*)) ft_checkmark_real_get_request_mode;
	((GtkWidgetClass *) klass)->measure = (void (*) (GtkWidget*, GtkOrientation, gint, gint*, gint*, gint*, gint*)) ft_checkmark_real_measure;
	((GtkWidgetClass *) klass)->snapshot = (void (*) (GtkWidget*, GtkSnapshot*)) ft_checkmark_real_snapshot;
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) ft_checkmark_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_ft_checkmark_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_ft_checkmark_set_property;
	G_OBJECT_CLASS (klass)->finalize = ft_checkmark_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_CHECKMARK_PIXEL_SIZE_PROPERTY, ft_checkmark_properties[FT_CHECKMARK_PIXEL_SIZE_PROPERTY] = g_param_spec_uint ("pixel-size", "pixel-size", "pixel-size", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_CHECKMARK_DELAY_PROPERTY, ft_checkmark_properties[FT_CHECKMARK_DELAY_PROPERTY] = g_param_spec_uint ("delay", "delay", "delay", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY));
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "checkmark");
}

static void
ft_checkmark_instance_init (FtCheckmark * self,
                            gpointer klass)
{
	self->priv = ft_checkmark_get_instance_private (self);
	self->priv->_delay = FT_CHECKMARK_DEFAULT_DELAY;
	self->priv->_pixel_size = FT_CHECKMARK_DEFAULT_PIXEL_SIZE;
	self->priv->_line_width = FT_CHECKMARK_LINE_WIDTH;
	self->priv->first_animation = NULL;
	self->priv->second_animation = NULL;
	self->priv->timeout_id = 0U;
	self->priv->animation_done = FALSE;
}

static void
ft_checkmark_finalize (GObject * obj)
{
	FtCheckmark * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_CHECKMARK, FtCheckmark);
	_g_object_unref0 (self->priv->first_animation);
	_g_object_unref0 (self->priv->second_animation);
	G_OBJECT_CLASS (ft_checkmark_parent_class)->finalize (obj);
}

static GType
ft_checkmark_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtCheckmarkClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_checkmark_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtCheckmark), 0, (GInstanceInitFunc) ft_checkmark_instance_init, NULL };
	GType ft_checkmark_type_id;
	ft_checkmark_type_id = g_type_register_static (gtk_widget_get_type (), "FtCheckmark", &g_define_type_info, 0);
	FtCheckmark_private_offset = g_type_add_instance_private (ft_checkmark_type_id, sizeof (FtCheckmarkPrivate));
	return ft_checkmark_type_id;
}

GType
ft_checkmark_get_type (void)
{
	static volatile gsize ft_checkmark_type_id__once = 0;
	if (g_once_init_enter (&ft_checkmark_type_id__once)) {
		GType ft_checkmark_type_id;
		ft_checkmark_type_id = ft_checkmark_get_type_once ();
		g_once_init_leave (&ft_checkmark_type_id__once, ft_checkmark_type_id);
	}
	return ft_checkmark_type_id__once;
}

static void
_vala_ft_checkmark_get_property (GObject * object,
                                 guint property_id,
                                 GValue * value,
                                 GParamSpec * pspec)
{
	FtCheckmark * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_CHECKMARK, FtCheckmark);
	switch (property_id) {
		case FT_CHECKMARK_PIXEL_SIZE_PROPERTY:
		g_value_set_uint (value, ft_checkmark_get_pixel_size (self));
		break;
		case FT_CHECKMARK_DELAY_PROPERTY:
		g_value_set_uint (value, ft_checkmark_get_delay (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_ft_checkmark_set_property (GObject * object,
                                 guint property_id,
                                 const GValue * value,
                                 GParamSpec * pspec)
{
	FtCheckmark * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_CHECKMARK, FtCheckmark);
	switch (property_id) {
		case FT_CHECKMARK_PIXEL_SIZE_PROPERTY:
		ft_checkmark_set_pixel_size (self, g_value_get_uint (value));
		break;
		case FT_CHECKMARK_DELAY_PROPERTY:
		ft_checkmark_set_delay (self, g_value_get_uint (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

