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

/*///////////////////////////////////////////////////////////////////////*/
/* Copyright 2011-2021 Simon Schneegans*/
/**/
/* Permission is hereby granted, free of charge, to any person obtaining*/
/* a copy of this software and associated documentation files (the*/
/* "Software"), to deal in the Software without restriction, including*/
/* without limitation the rights to use, copy, modify, merge, publish,*/
/* distribute, sublicense, and/or sell copies of the Software, and to*/
/* permit persons to whom the Software is furnished to do so, subject to*/
/* the following conditions:*/
/* */
/* The above copyright notice and this permission notice shall be*/
/* included in all copies or substantial portions of the Software.*/
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,*/
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF*/
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY*/
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,*/
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE*/
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
/*///////////////////////////////////////////////////////////////////////*/

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <pango/pango.h>
#include <gdk/gdk.h>
#include <cairo-gobject.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#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 GNOME_PIE_TYPE_PIE_PREVIEW_CENTER (gnome_pie_pie_preview_center_get_type ())
#define GNOME_PIE_PIE_PREVIEW_CENTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_CENTER, GnomePiePiePreviewCenter))
#define GNOME_PIE_PIE_PREVIEW_CENTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE_PREVIEW_CENTER, GnomePiePiePreviewCenterClass))
#define GNOME_PIE_IS_PIE_PREVIEW_CENTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_CENTER))
#define GNOME_PIE_IS_PIE_PREVIEW_CENTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE_PREVIEW_CENTER))
#define GNOME_PIE_PIE_PREVIEW_CENTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_CENTER, GnomePiePiePreviewCenterClass))

typedef struct _GnomePiePiePreviewCenter GnomePiePiePreviewCenter;
typedef struct _GnomePiePiePreviewCenterClass GnomePiePiePreviewCenterClass;
typedef struct _GnomePiePiePreviewCenterPrivate GnomePiePiePreviewCenterPrivate;

#define GNOME_PIE_TYPE_IMAGE (gnome_pie_image_get_type ())
#define GNOME_PIE_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_IMAGE, GnomePieImage))
#define GNOME_PIE_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_IMAGE, GnomePieImageClass))
#define GNOME_PIE_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_IMAGE))
#define GNOME_PIE_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_IMAGE))
#define GNOME_PIE_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_IMAGE, GnomePieImageClass))

typedef struct _GnomePieImage GnomePieImage;
typedef struct _GnomePieImageClass GnomePieImageClass;

#define GNOME_PIE_TYPE_RENDERED_TEXT (gnome_pie_rendered_text_get_type ())
#define GNOME_PIE_RENDERED_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_RENDERED_TEXT, GnomePieRenderedText))
#define GNOME_PIE_RENDERED_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_RENDERED_TEXT, GnomePieRenderedTextClass))
#define GNOME_PIE_IS_RENDERED_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_RENDERED_TEXT))
#define GNOME_PIE_IS_RENDERED_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_RENDERED_TEXT))
#define GNOME_PIE_RENDERED_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_RENDERED_TEXT, GnomePieRenderedTextClass))

typedef struct _GnomePieRenderedText GnomePieRenderedText;
typedef struct _GnomePieRenderedTextClass GnomePieRenderedTextClass;

#define GNOME_PIE_TYPE_ANIMATED_VALUE (gnome_pie_animated_value_get_type ())
#define GNOME_PIE_ANIMATED_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_ANIMATED_VALUE, GnomePieAnimatedValue))
#define GNOME_PIE_ANIMATED_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_ANIMATED_VALUE, GnomePieAnimatedValueClass))
#define GNOME_PIE_IS_ANIMATED_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_ANIMATED_VALUE))
#define GNOME_PIE_IS_ANIMATED_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_ANIMATED_VALUE))
#define GNOME_PIE_ANIMATED_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_ANIMATED_VALUE, GnomePieAnimatedValueClass))

typedef struct _GnomePieAnimatedValue GnomePieAnimatedValue;
typedef struct _GnomePieAnimatedValueClass GnomePieAnimatedValueClass;

#define GNOME_PIE_TYPE_PIE_PREVIEW_RENDERER (gnome_pie_pie_preview_renderer_get_type ())
#define GNOME_PIE_PIE_PREVIEW_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_RENDERER, GnomePiePiePreviewRenderer))
#define GNOME_PIE_PIE_PREVIEW_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE_PREVIEW_RENDERER, GnomePiePiePreviewRendererClass))
#define GNOME_PIE_IS_PIE_PREVIEW_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_RENDERER))
#define GNOME_PIE_IS_PIE_PREVIEW_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE_PREVIEW_RENDERER))
#define GNOME_PIE_PIE_PREVIEW_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_RENDERER, GnomePiePiePreviewRendererClass))

typedef struct _GnomePiePiePreviewRenderer GnomePiePiePreviewRenderer;
typedef struct _GnomePiePiePreviewRendererClass GnomePiePiePreviewRendererClass;
enum  {
	GNOME_PIE_PIE_PREVIEW_CENTER_0_PROPERTY,
	GNOME_PIE_PIE_PREVIEW_CENTER_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_pie_preview_center_properties[GNOME_PIE_PIE_PREVIEW_CENTER_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))

#define GNOME_PIE_TYPE_COLOR (gnome_pie_color_get_type ())
#define GNOME_PIE_COLOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_COLOR, GnomePieColor))
#define GNOME_PIE_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_COLOR, GnomePieColorClass))
#define GNOME_PIE_IS_COLOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_COLOR))
#define GNOME_PIE_IS_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_COLOR))
#define GNOME_PIE_COLOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_COLOR, GnomePieColorClass))

typedef struct _GnomePieColor GnomePieColor;
typedef struct _GnomePieColorClass GnomePieColorClass;
typedef struct _GnomePiePiePreviewRendererPrivate GnomePiePiePreviewRendererPrivate;

#define GNOME_PIE_TYPE_PIE_PREVIEW_SLICE_RENDERER (gnome_pie_pie_preview_slice_renderer_get_type ())
#define GNOME_PIE_PIE_PREVIEW_SLICE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_SLICE_RENDERER, GnomePiePiePreviewSliceRenderer))
#define GNOME_PIE_PIE_PREVIEW_SLICE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE_PREVIEW_SLICE_RENDERER, GnomePiePiePreviewSliceRendererClass))
#define GNOME_PIE_IS_PIE_PREVIEW_SLICE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_SLICE_RENDERER))
#define GNOME_PIE_IS_PIE_PREVIEW_SLICE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE_PREVIEW_SLICE_RENDERER))
#define GNOME_PIE_PIE_PREVIEW_SLICE_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE_PREVIEW_SLICE_RENDERER, GnomePiePiePreviewSliceRendererClass))

typedef struct _GnomePiePiePreviewSliceRenderer GnomePiePiePreviewSliceRenderer;
typedef struct _GnomePiePiePreviewSliceRendererClass GnomePiePiePreviewSliceRendererClass;
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))

struct _GnomePiePiePreviewCenter {
	GObject parent_instance;
	GnomePiePiePreviewCenterPrivate * priv;
};

struct _GnomePiePiePreviewCenterClass {
	GObjectClass parent_class;
};

struct _GnomePiePiePreviewCenterPrivate {
	GnomePieRenderedText* text;
	GnomePieRenderedText* old_text;
	gchar* current_text;
	GnomePieAnimatedValue* blend;
	GnomePiePiePreviewRenderer* parent;
};

struct _GnomePiePiePreviewRenderer {
	GObject parent_instance;
	GnomePiePiePreviewRendererPrivate * priv;
	GeeArrayList* slices;
	GtkDrawingArea* parent;
};

struct _GnomePiePiePreviewRendererClass {
	GObjectClass parent_class;
};

static gint GnomePiePiePreviewCenter_private_offset;
static gpointer gnome_pie_pie_preview_center_parent_class = NULL;

VALA_EXTERN GType gnome_pie_pie_preview_center_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePiePreviewCenter, g_object_unref)
VALA_EXTERN GType gnome_pie_image_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieImage, g_object_unref)
VALA_EXTERN GType gnome_pie_rendered_text_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieRenderedText, g_object_unref)
VALA_EXTERN GType gnome_pie_animated_value_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieAnimatedValue, g_object_unref)
VALA_EXTERN GType gnome_pie_pie_preview_renderer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePiePreviewRenderer, g_object_unref)
VALA_EXTERN GnomePiePiePreviewCenter* gnome_pie_pie_preview_center_new (GnomePiePiePreviewRenderer* parent);
VALA_EXTERN GnomePiePiePreviewCenter* gnome_pie_pie_preview_center_construct (GType object_type,
                                                                  GnomePiePiePreviewRenderer* parent);
VALA_EXTERN GnomePieAnimatedValue* gnome_pie_animated_value_new_linear (gdouble start,
                                                            gdouble end,
                                                            gdouble duration);
VALA_EXTERN GnomePieAnimatedValue* gnome_pie_animated_value_construct_linear (GType object_type,
                                                                  gdouble start,
                                                                  gdouble end,
                                                                  gdouble duration);
VALA_EXTERN GnomePieColor* gnome_pie_color_new (void);
VALA_EXTERN GnomePieColor* gnome_pie_color_construct (GType object_type);
VALA_EXTERN GType gnome_pie_color_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieColor, g_object_unref)
VALA_EXTERN GnomePieRenderedText* gnome_pie_rendered_text_new (const gchar* text,
                                                   gint width,
                                                   gint height,
                                                   const gchar* font,
                                                   GnomePieColor* color,
                                                   gdouble scale);
VALA_EXTERN GnomePieRenderedText* gnome_pie_rendered_text_construct (GType object_type,
                                                         const gchar* text,
                                                         gint width,
                                                         gint height,
                                                         const gchar* font,
                                                         GnomePieColor* color,
                                                         gdouble scale);
VALA_EXTERN void gnome_pie_pie_preview_center_set_text (GnomePiePiePreviewCenter* self,
                                            const gchar* text);
VALA_EXTERN GType gnome_pie_pie_preview_slice_renderer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePiePreviewSliceRenderer, g_object_unref)
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
VALA_EXTERN GnomePieColor* gnome_pie_color_new_from_gdk (GdkRGBA* color);
VALA_EXTERN GnomePieColor* gnome_pie_color_construct_from_gdk (GType object_type,
                                                   GdkRGBA* color);
VALA_EXTERN GnomePieRenderedText* gnome_pie_rendered_text_new_with_markup (const gchar* text,
                                                               gint width,
                                                               gint height,
                                                               const gchar* font,
                                                               GnomePieColor* color,
                                                               gdouble scale);
VALA_EXTERN GnomePieRenderedText* gnome_pie_rendered_text_construct_with_markup (GType object_type,
                                                                     const gchar* text,
                                                                     gint width,
                                                                     gint height,
                                                                     const gchar* font,
                                                                     GnomePieColor* color,
                                                                     gdouble scale);
VALA_EXTERN void gnome_pie_animated_value_reset_target (GnomePieAnimatedValue* self,
                                            gdouble end,
                                            gdouble duration);
VALA_EXTERN void gnome_pie_pie_preview_center_draw (GnomePiePiePreviewCenter* self,
                                        gdouble frame_time,
                                        cairo_t* ctx);
VALA_EXTERN void gnome_pie_animated_value_update (GnomePieAnimatedValue* self,
                                      gdouble time);
VALA_EXTERN gint gnome_pie_pie_preview_renderer_slice_count (GnomePiePiePreviewRenderer* self);
VALA_EXTERN void gnome_pie_image_paint_on (GnomePieImage* self,
                               cairo_t* ctx,
                               gdouble alpha);
VALA_EXTERN gdouble gnome_pie_animated_value_get_val (GnomePieAnimatedValue* self);
static void gnome_pie_pie_preview_center_finalize (GObject * obj);
static GType gnome_pie_pie_preview_center_get_type_once (void);

static inline gpointer
gnome_pie_pie_preview_center_get_instance_private (GnomePiePiePreviewCenter* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePiePiePreviewCenter_private_offset);
}

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

GnomePiePiePreviewCenter*
gnome_pie_pie_preview_center_construct (GType object_type,
                                        GnomePiePiePreviewRenderer* parent)
{
	GnomePiePiePreviewCenter * self = NULL;
	GnomePieAnimatedValue* _tmp0_;
	GnomePieColor* _tmp1_;
	GnomePieColor* _tmp2_;
	GnomePieRenderedText* _tmp3_;
	GnomePieRenderedText* _tmp4_;
	GnomePieRenderedText* _tmp5_;
	g_return_val_if_fail (parent != NULL, NULL);
	self = (GnomePiePiePreviewCenter*) g_object_new (object_type, NULL);
	self->priv->parent = parent;
	_tmp0_ = gnome_pie_animated_value_new_linear ((gdouble) 0, (gdouble) 0, (gdouble) 0);
	_g_object_unref0 (self->priv->blend);
	self->priv->blend = _tmp0_;
	_tmp1_ = gnome_pie_color_new ();
	_tmp2_ = _tmp1_;
	_tmp3_ = gnome_pie_rendered_text_new ("", 1, 1, "", _tmp2_, 1.0);
	_g_object_unref0 (self->priv->text);
	self->priv->text = _tmp3_;
	_g_object_unref0 (_tmp2_);
	_tmp4_ = self->priv->text;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (self->priv->old_text);
	self->priv->old_text = _tmp5_;
	return self;
}

GnomePiePiePreviewCenter*
gnome_pie_pie_preview_center_new (GnomePiePiePreviewRenderer* parent)
{
	return gnome_pie_pie_preview_center_construct (GNOME_PIE_TYPE_PIE_PREVIEW_CENTER, parent);
}

static void
_vala_PangoFontDescription_free (PangoFontDescription* self)
{
	g_boxed_free (pango_font_description_get_type (), self);
}

void
gnome_pie_pie_preview_center_set_text (GnomePiePiePreviewCenter* self,
                                       const gchar* text)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = self->priv->current_text;
	if (g_strcmp0 (text, _tmp0_) != 0) {
		GtkStyleContext* style = NULL;
		GnomePiePiePreviewRenderer* _tmp1_;
		GtkDrawingArea* _tmp2_;
		GtkStyleContext* _tmp3_;
		GtkStyleContext* _tmp4_;
		PangoFontDescription* font = NULL;
		GtkStyleContext* _tmp5_;
		PangoFontDescription* _tmp6_ = NULL;
		GnomePieRenderedText* _tmp7_;
		GnomePieRenderedText* _tmp8_;
		PangoFontDescription* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		GtkStyleContext* _tmp13_;
		GdkRGBA _tmp14_ = {0};
		GnomePieColor* _tmp15_;
		GnomePieColor* _tmp16_;
		GnomePieRenderedText* _tmp17_;
		gchar* _tmp18_;
		GnomePieAnimatedValue* _tmp19_;
		GnomePieAnimatedValue* _tmp20_;
		_tmp1_ = self->priv->parent;
		_tmp2_ = _tmp1_->parent;
		_tmp3_ = gtk_widget_get_style_context ((GtkWidget*) _tmp2_);
		_tmp4_ = _g_object_ref0 (_tmp3_);
		style = _tmp4_;
		_tmp5_ = style;
		gtk_style_context_get (_tmp5_, GTK_STATE_FLAG_NORMAL, "font", &_tmp6_, NULL);
		__vala_PangoFontDescription_free0 (font);
		font = _tmp6_;
		_tmp7_ = self->priv->text;
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (self->priv->old_text);
		self->priv->old_text = _tmp8_;
		_tmp9_ = font;
		_tmp10_ = pango_font_description_get_family (_tmp9_);
		_tmp11_ = g_strconcat (_tmp10_, " 10", NULL);
		_tmp12_ = _tmp11_;
		_tmp13_ = style;
		gtk_style_context_get_color (_tmp13_, GTK_STATE_FLAG_NORMAL, &_tmp14_);
		_tmp15_ = gnome_pie_color_new_from_gdk (&_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = gnome_pie_rendered_text_new_with_markup (text, 180, 180, _tmp12_, _tmp16_, 1.0);
		_g_object_unref0 (self->priv->text);
		self->priv->text = _tmp17_;
		_g_object_unref0 (_tmp16_);
		_g_free0 (_tmp12_);
		_tmp18_ = g_strdup (text);
		_g_free0 (self->priv->current_text);
		self->priv->current_text = _tmp18_;
		_tmp19_ = self->priv->blend;
		gnome_pie_animated_value_reset_target (_tmp19_, 0.0, 0.0);
		_tmp20_ = self->priv->blend;
		gnome_pie_animated_value_reset_target (_tmp20_, 1.0, 0.1);
		__vala_PangoFontDescription_free0 (font);
		_g_object_unref0 (style);
	}
}

void
gnome_pie_pie_preview_center_draw (GnomePiePiePreviewCenter* self,
                                   gdouble frame_time,
                                   cairo_t* ctx)
{
	GnomePieAnimatedValue* _tmp0_;
	GnomePiePiePreviewRenderer* _tmp1_;
	GnomePieRenderedText* _tmp2_;
	GnomePieAnimatedValue* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	GnomePieRenderedText* _tmp6_;
	GnomePieAnimatedValue* _tmp7_;
	gdouble _tmp8_;
	gdouble _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	_tmp0_ = self->priv->blend;
	gnome_pie_animated_value_update (_tmp0_, frame_time);
	cairo_save (ctx);
	_tmp1_ = self->priv->parent;
	if (gnome_pie_pie_preview_renderer_slice_count (_tmp1_) == 0) {
		cairo_translate (ctx, (gdouble) 0, (gdouble) 40);
	}
	_tmp2_ = self->priv->old_text;
	_tmp3_ = self->priv->blend;
	_tmp4_ = gnome_pie_animated_value_get_val (_tmp3_);
	_tmp5_ = _tmp4_;
	gnome_pie_image_paint_on ((GnomePieImage*) _tmp2_, ctx, 1 - _tmp5_);
	_tmp6_ = self->priv->text;
	_tmp7_ = self->priv->blend;
	_tmp8_ = gnome_pie_animated_value_get_val (_tmp7_);
	_tmp9_ = _tmp8_;
	gnome_pie_image_paint_on ((GnomePieImage*) _tmp6_, ctx, _tmp9_);
	cairo_restore (ctx);
}

static void
gnome_pie_pie_preview_center_class_init (GnomePiePiePreviewCenterClass * klass,
                                         gpointer klass_data)
{
	gnome_pie_pie_preview_center_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePiePiePreviewCenter_private_offset);
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_pie_preview_center_finalize;
}

static void
gnome_pie_pie_preview_center_instance_init (GnomePiePiePreviewCenter * self,
                                            gpointer klass)
{
	self->priv = gnome_pie_pie_preview_center_get_instance_private (self);
	self->priv->text = NULL;
	self->priv->old_text = NULL;
	self->priv->current_text = NULL;
}

static void
gnome_pie_pie_preview_center_finalize (GObject * obj)
{
	GnomePiePiePreviewCenter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_TYPE_PIE_PREVIEW_CENTER, GnomePiePiePreviewCenter);
	_g_object_unref0 (self->priv->text);
	_g_object_unref0 (self->priv->old_text);
	_g_free0 (self->priv->current_text);
	_g_object_unref0 (self->priv->blend);
	G_OBJECT_CLASS (gnome_pie_pie_preview_center_parent_class)->finalize (obj);
}

static GType
gnome_pie_pie_preview_center_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePiePiePreviewCenterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_pie_preview_center_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePiePiePreviewCenter), 0, (GInstanceInitFunc) gnome_pie_pie_preview_center_instance_init, NULL };
	GType gnome_pie_pie_preview_center_type_id;
	gnome_pie_pie_preview_center_type_id = g_type_register_static (G_TYPE_OBJECT, "GnomePiePiePreviewCenter", &g_define_type_info, 0);
	GnomePiePiePreviewCenter_private_offset = g_type_add_instance_private (gnome_pie_pie_preview_center_type_id, sizeof (GnomePiePiePreviewCenterPrivate));
	return gnome_pie_pie_preview_center_type_id;
}

GType
gnome_pie_pie_preview_center_get_type (void)
{
	static volatile gsize gnome_pie_pie_preview_center_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_pie_preview_center_type_id__once)) {
		GType gnome_pie_pie_preview_center_type_id;
		gnome_pie_pie_preview_center_type_id = gnome_pie_pie_preview_center_get_type_once ();
		g_once_init_leave (&gnome_pie_pie_preview_center_type_id__once, gnome_pie_pie_preview_center_type_id);
	}
	return gnome_pie_pie_preview_center_type_id__once;
}

