/* sliceRenderer.c generated by valac 0.56.19, the Vala compiler
 * generated from sliceRenderer.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 <glib.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.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_SLICE_RENDERER (gnome_pie_slice_renderer_get_type ())
#define GNOME_PIE_SLICE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_SLICE_RENDERER, GnomePieSliceRenderer))
#define GNOME_PIE_SLICE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_SLICE_RENDERER, GnomePieSliceRendererClass))
#define GNOME_PIE_IS_SLICE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_SLICE_RENDERER))
#define GNOME_PIE_IS_SLICE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_SLICE_RENDERER))
#define GNOME_PIE_SLICE_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_SLICE_RENDERER, GnomePieSliceRendererClass))

typedef struct _GnomePieSliceRenderer GnomePieSliceRenderer;
typedef struct _GnomePieSliceRendererClass GnomePieSliceRendererClass;
typedef struct _GnomePieSliceRendererPrivate GnomePieSliceRendererPrivate;

#define GNOME_PIE_TYPE_ACTION (gnome_pie_action_get_type ())
#define GNOME_PIE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_ACTION, GnomePieAction))
#define GNOME_PIE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_ACTION, GnomePieActionClass))
#define GNOME_PIE_IS_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_ACTION))
#define GNOME_PIE_IS_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_ACTION))
#define GNOME_PIE_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_ACTION, GnomePieActionClass))

typedef struct _GnomePieAction GnomePieAction;
typedef struct _GnomePieActionClass GnomePieActionClass;

#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_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;

#define GNOME_PIE_TYPE_PIE_RENDERER (gnome_pie_pie_renderer_get_type ())
#define GNOME_PIE_PIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE_RENDERER, GnomePiePieRenderer))
#define GNOME_PIE_PIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE_RENDERER, GnomePiePieRendererClass))
#define GNOME_PIE_IS_PIE_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE_RENDERER))
#define GNOME_PIE_IS_PIE_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE_RENDERER))
#define GNOME_PIE_PIE_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE_RENDERER, GnomePiePieRendererClass))

typedef struct _GnomePiePieRenderer GnomePiePieRenderer;
typedef struct _GnomePiePieRendererClass GnomePiePieRendererClass;

#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;
enum  {
	GNOME_PIE_SLICE_RENDERER_0_PROPERTY,
	GNOME_PIE_SLICE_RENDERER_ACTIVE_PROPERTY,
	GNOME_PIE_SLICE_RENDERER_CAPTION_PROPERTY,
	GNOME_PIE_SLICE_RENDERER_COLOR_PROPERTY,
	GNOME_PIE_SLICE_RENDERER_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_slice_renderer_properties[GNOME_PIE_SLICE_RENDERER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GNOME_PIE_TYPE_CONFIG (gnome_pie_config_get_type ())
#define GNOME_PIE_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_CONFIG, GnomePieConfig))
#define GNOME_PIE_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_CONFIG, GnomePieConfigClass))
#define GNOME_PIE_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_CONFIG))
#define GNOME_PIE_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_CONFIG))
#define GNOME_PIE_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_CONFIG, GnomePieConfigClass))

typedef struct _GnomePieConfig GnomePieConfig;
typedef struct _GnomePieConfigClass GnomePieConfigClass;

#define GNOME_PIE_TYPE_THEME (gnome_pie_theme_get_type ())
#define GNOME_PIE_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_THEME, GnomePieTheme))
#define GNOME_PIE_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_THEME, GnomePieThemeClass))
#define GNOME_PIE_IS_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_THEME))
#define GNOME_PIE_IS_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_THEME))
#define GNOME_PIE_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_THEME, GnomePieThemeClass))

typedef struct _GnomePieTheme GnomePieTheme;
typedef struct _GnomePieThemeClass GnomePieThemeClass;
typedef enum  {
	GNOME_PIE_ANIMATED_VALUE_DIRECTION_IN,
	GNOME_PIE_ANIMATED_VALUE_DIRECTION_OUT,
	GNOME_PIE_ANIMATED_VALUE_DIRECTION_IN_OUT,
	GNOME_PIE_ANIMATED_VALUE_DIRECTION_OUT_IN
} GnomePieAnimatedValueDirection;

#define GNOME_PIE_ANIMATED_VALUE_TYPE_DIRECTION (gnome_pie_animated_value_direction_get_type ())

#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_THEMED_ICON (gnome_pie_themed_icon_get_type ())
#define GNOME_PIE_THEMED_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_THEMED_ICON, GnomePieThemedIcon))
#define GNOME_PIE_THEMED_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_THEMED_ICON, GnomePieThemedIconClass))
#define GNOME_PIE_IS_THEMED_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_THEMED_ICON))
#define GNOME_PIE_IS_THEMED_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_THEMED_ICON))
#define GNOME_PIE_THEMED_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_THEMED_ICON, GnomePieThemedIconClass))

typedef struct _GnomePieThemedIcon GnomePieThemedIcon;
typedef struct _GnomePieThemedIconClass GnomePieThemedIconClass;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _GnomePieSliceRenderer {
	GObject parent_instance;
	GnomePieSliceRendererPrivate * priv;
	GnomePieAction* action;
};

struct _GnomePieSliceRendererClass {
	GObjectClass parent_class;
};

struct _GnomePieSliceRendererPrivate {
	gboolean _active;
	GnomePieImage* _caption;
	GnomePieColor* _color;
	GnomePieImage* active_icon;
	GnomePieImage* inactive_icon;
	GnomePieImage* hotkey;
	GnomePiePieRenderer* parent;
	gint position;
	GnomePieAnimatedValue* fade;
	GnomePieAnimatedValue* scale;
	GnomePieAnimatedValue* alpha;
	GnomePieAnimatedValue* fade_rotation;
	GnomePieAnimatedValue* fade_scale;
	GnomePieAnimatedValue* wobble;
};

static gint GnomePieSliceRenderer_private_offset;
static gpointer gnome_pie_slice_renderer_parent_class = NULL;

VALA_EXTERN GType gnome_pie_slice_renderer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieSliceRenderer, g_object_unref)
VALA_EXTERN GType gnome_pie_action_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieAction, 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_color_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieColor, g_object_unref)
VALA_EXTERN GType gnome_pie_pie_renderer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePieRenderer, 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 GnomePieSliceRenderer* gnome_pie_slice_renderer_new (GnomePiePieRenderer* parent);
VALA_EXTERN GnomePieSliceRenderer* gnome_pie_slice_renderer_construct (GType object_type,
                                                           GnomePiePieRenderer* parent);
VALA_EXTERN void gnome_pie_slice_renderer_reset_anim (GnomePieSliceRenderer* self);
VALA_EXTERN GType gnome_pie_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieConfig, g_object_unref)
VALA_EXTERN GnomePieConfig* gnome_pie_config_get_global (void);
VALA_EXTERN GType gnome_pie_theme_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieTheme, g_object_unref)
VALA_EXTERN GnomePieTheme* gnome_pie_config_get_theme (GnomePieConfig* self);
VALA_EXTERN gdouble gnome_pie_theme_get_transition_time (GnomePieTheme* self);
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 gdouble gnome_pie_theme_get_fade_in_time (GnomePieTheme* self);
VALA_EXTERN GType gnome_pie_animated_value_direction_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gdouble gnome_pie_theme_get_max_zoom (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_springiness (GnomePieTheme* self);
VALA_EXTERN GnomePieAnimatedValue* gnome_pie_animated_value_new_cubic (GnomePieAnimatedValueDirection direction,
                                                           gdouble start,
                                                           gdouble end,
                                                           gdouble duration,
                                                           gdouble multiplier);
VALA_EXTERN GnomePieAnimatedValue* gnome_pie_animated_value_construct_cubic (GType object_type,
                                                                 GnomePieAnimatedValueDirection direction,
                                                                 gdouble start,
                                                                 gdouble end,
                                                                 gdouble duration,
                                                                 gdouble multiplier);
VALA_EXTERN gdouble gnome_pie_theme_get_fade_in_zoom (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_fade_in_rotation (GnomePieTheme* self);
VALA_EXTERN void gnome_pie_slice_renderer_load (GnomePieSliceRenderer* self,
                                    GnomePieAction* action,
                                    gint position);
VALA_EXTERN gboolean gnome_pie_theme_get_caption (GnomePieTheme* self);
VALA_EXTERN const gchar* gnome_pie_action_get_name (GnomePieAction* self);
VALA_EXTERN gint gnome_pie_theme_get_caption_width (GnomePieTheme* self);
VALA_EXTERN gint gnome_pie_theme_get_caption_height (GnomePieTheme* self);
VALA_EXTERN const gchar* gnome_pie_theme_get_caption_font (GnomePieTheme* self);
VALA_EXTERN GnomePieColor* gnome_pie_theme_get_caption_color (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_config_get_global_scale (GnomePieConfig* self);
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 GType gnome_pie_rendered_text_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieRenderedText, g_object_unref)
static void gnome_pie_slice_renderer_set_caption (GnomePieSliceRenderer* self,
                                           GnomePieImage* value);
VALA_EXTERN const gchar* gnome_pie_action_get_icon (GnomePieAction* self);
VALA_EXTERN GnomePieThemedIcon* gnome_pie_themed_icon_new (const gchar* caption,
                                               const gchar* icon_name,
                                               gboolean active);
VALA_EXTERN GnomePieThemedIcon* gnome_pie_themed_icon_construct (GType object_type,
                                                     const gchar* caption,
                                                     const gchar* icon_name,
                                                     gboolean active);
VALA_EXTERN GType gnome_pie_themed_icon_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieThemedIcon, g_object_unref)
VALA_EXTERN GnomePieColor* gnome_pie_color_new_from_icon (GnomePieImage* icon);
VALA_EXTERN GnomePieColor* gnome_pie_color_construct_from_icon (GType object_type,
                                                    GnomePieImage* icon);
static void gnome_pie_slice_renderer_set_color (GnomePieSliceRenderer* self,
                                         GnomePieColor* value);
VALA_EXTERN gdouble gnome_pie_theme_get_slice_radius (GnomePieTheme* self);
VALA_EXTERN GnomePieColor* gnome_pie_color_new (void);
VALA_EXTERN GnomePieColor* gnome_pie_color_construct (GType object_type);
VALA_EXTERN void gnome_pie_slice_renderer_activate (GnomePieSliceRenderer* self,
                                        guint32 time_stamp);
VALA_EXTERN void gnome_pie_action_activate (GnomePieAction* self,
                                guint32 time_stamp);
VALA_EXTERN void gnome_pie_slice_renderer_fade_out (GnomePieSliceRenderer* self);
VALA_EXTERN void gnome_pie_animated_value_reset_target (GnomePieAnimatedValue* self,
                                            gdouble end,
                                            gdouble duration);
VALA_EXTERN gdouble gnome_pie_theme_get_fade_out_time (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_animated_value_get_val (GnomePieAnimatedValue* self);
VALA_EXTERN gdouble gnome_pie_theme_get_fade_out_zoom (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_fade_out_rotation (GnomePieTheme* self);
VALA_EXTERN void gnome_pie_slice_renderer_set_active_slice (GnomePieSliceRenderer* self,
                                                GnomePieSliceRenderer* active_slice);
VALA_EXTERN void gnome_pie_slice_renderer_draw (GnomePieSliceRenderer* self,
                                    gdouble frame_time,
                                    cairo_t* ctx,
                                    gdouble angle,
                                    gint slice_track);
VALA_EXTERN void gnome_pie_animated_value_update (GnomePieAnimatedValue* self,
                                      gdouble time);
VALA_EXTERN gint gnome_pie_pie_renderer_get_first_slice_idx (GnomePiePieRenderer* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_total_slice_count (GnomePiePieRenderer* self);
VALA_EXTERN gdouble gnome_pie_pie_renderer_get_first_slice_angle (GnomePiePieRenderer* self);
VALA_EXTERN gint gnome_pie_pie_renderer_get_active_slice (GnomePiePieRenderer* self);
static void gnome_pie_slice_renderer_set_active (GnomePieSliceRenderer* self,
                                          gboolean value);
VALA_EXTERN gdouble gnome_pie_theme_get_wobble (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_zoom_range (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_animated_value_get_end (GnomePieAnimatedValue* self);
VALA_EXTERN gdouble gnome_pie_theme_get_radius (GnomePieTheme* self);
VALA_EXTERN gdouble gnome_pie_theme_get_slice_gap (GnomePieTheme* self);
VALA_EXTERN void gnome_pie_image_paint_on (GnomePieImage* self,
                               cairo_t* ctx,
                               gdouble alpha);
VALA_EXTERN gboolean gnome_pie_pie_renderer_get_show_hotkeys (GnomePiePieRenderer* self);
VALA_EXTERN gboolean gnome_pie_slice_renderer_get_active (GnomePieSliceRenderer* self);
VALA_EXTERN GnomePieImage* gnome_pie_slice_renderer_get_caption (GnomePieSliceRenderer* self);
VALA_EXTERN GnomePieColor* gnome_pie_slice_renderer_get_color (GnomePieSliceRenderer* self);
static void gnome_pie_slice_renderer_finalize (GObject * obj);
static GType gnome_pie_slice_renderer_get_type_once (void);
static void _vala_gnome_pie_slice_renderer_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_gnome_pie_slice_renderer_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);

static inline gpointer
gnome_pie_slice_renderer_get_instance_private (GnomePieSliceRenderer* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePieSliceRenderer_private_offset);
}

GnomePieSliceRenderer*
gnome_pie_slice_renderer_construct (GType object_type,
                                    GnomePiePieRenderer* parent)
{
	GnomePieSliceRenderer * self = NULL;
	g_return_val_if_fail (parent != NULL, NULL);
	self = (GnomePieSliceRenderer*) g_object_new (object_type, NULL);
	self->priv->parent = parent;
	gnome_pie_slice_renderer_reset_anim (self);
	return self;
}

GnomePieSliceRenderer*
gnome_pie_slice_renderer_new (GnomePiePieRenderer* parent)
{
	return gnome_pie_slice_renderer_construct (GNOME_PIE_TYPE_SLICE_RENDERER, parent);
}

void
gnome_pie_slice_renderer_reset_anim (GnomePieSliceRenderer* self)
{
	GnomePieConfig* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieTheme* _tmp2_;
	GnomePieTheme* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	GnomePieAnimatedValue* _tmp6_;
	GnomePieConfig* _tmp7_;
	GnomePieConfig* _tmp8_;
	GnomePieTheme* _tmp9_;
	GnomePieTheme* _tmp10_;
	gdouble _tmp11_;
	gdouble _tmp12_;
	GnomePieAnimatedValue* _tmp13_;
	GnomePieConfig* _tmp14_;
	GnomePieConfig* _tmp15_;
	GnomePieTheme* _tmp16_;
	GnomePieTheme* _tmp17_;
	gdouble _tmp18_;
	gdouble _tmp19_;
	GnomePieAnimatedValue* _tmp20_;
	GnomePieConfig* _tmp21_;
	GnomePieConfig* _tmp22_;
	GnomePieTheme* _tmp23_;
	GnomePieTheme* _tmp24_;
	gdouble _tmp25_;
	gdouble _tmp26_;
	GnomePieConfig* _tmp27_;
	GnomePieConfig* _tmp28_;
	GnomePieTheme* _tmp29_;
	GnomePieTheme* _tmp30_;
	gdouble _tmp31_;
	gdouble _tmp32_;
	GnomePieConfig* _tmp33_;
	GnomePieConfig* _tmp34_;
	GnomePieTheme* _tmp35_;
	GnomePieTheme* _tmp36_;
	gdouble _tmp37_;
	gdouble _tmp38_;
	GnomePieConfig* _tmp39_;
	GnomePieConfig* _tmp40_;
	GnomePieTheme* _tmp41_;
	GnomePieTheme* _tmp42_;
	gdouble _tmp43_;
	gdouble _tmp44_;
	GnomePieAnimatedValue* _tmp45_;
	GnomePieConfig* _tmp46_;
	GnomePieConfig* _tmp47_;
	GnomePieTheme* _tmp48_;
	GnomePieTheme* _tmp49_;
	gdouble _tmp50_;
	gdouble _tmp51_;
	GnomePieConfig* _tmp52_;
	GnomePieConfig* _tmp53_;
	GnomePieTheme* _tmp54_;
	GnomePieTheme* _tmp55_;
	gdouble _tmp56_;
	gdouble _tmp57_;
	GnomePieConfig* _tmp58_;
	GnomePieConfig* _tmp59_;
	GnomePieTheme* _tmp60_;
	GnomePieTheme* _tmp61_;
	gdouble _tmp62_;
	gdouble _tmp63_;
	GnomePieAnimatedValue* _tmp64_;
	GnomePieConfig* _tmp65_;
	GnomePieConfig* _tmp66_;
	GnomePieTheme* _tmp67_;
	GnomePieTheme* _tmp68_;
	gdouble _tmp69_;
	gdouble _tmp70_;
	GnomePieConfig* _tmp71_;
	GnomePieConfig* _tmp72_;
	GnomePieTheme* _tmp73_;
	GnomePieTheme* _tmp74_;
	gdouble _tmp75_;
	gdouble _tmp76_;
	GnomePieAnimatedValue* _tmp77_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gnome_pie_config_get_global ();
	_tmp1_ = _tmp0_;
	_tmp2_ = gnome_pie_config_get_theme (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gnome_pie_theme_get_transition_time (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gnome_pie_animated_value_new_linear (0.0, 0.0, _tmp5_);
	_g_object_unref0 (self->priv->fade);
	self->priv->fade = _tmp6_;
	_tmp7_ = gnome_pie_config_get_global ();
	_tmp8_ = _tmp7_;
	_tmp9_ = gnome_pie_config_get_theme (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = gnome_pie_theme_get_transition_time (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = gnome_pie_animated_value_new_linear (0.0, 0.0, _tmp12_);
	_g_object_unref0 (self->priv->wobble);
	self->priv->wobble = _tmp13_;
	_tmp14_ = gnome_pie_config_get_global ();
	_tmp15_ = _tmp14_;
	_tmp16_ = gnome_pie_config_get_theme (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = gnome_pie_theme_get_fade_in_time (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = gnome_pie_animated_value_new_linear (0.0, 1.0, _tmp19_);
	_g_object_unref0 (self->priv->alpha);
	self->priv->alpha = _tmp20_;
	_tmp21_ = gnome_pie_config_get_global ();
	_tmp22_ = _tmp21_;
	_tmp23_ = gnome_pie_config_get_theme (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = gnome_pie_theme_get_max_zoom (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = gnome_pie_config_get_global ();
	_tmp28_ = _tmp27_;
	_tmp29_ = gnome_pie_config_get_theme (_tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = gnome_pie_theme_get_max_zoom (_tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = gnome_pie_config_get_global ();
	_tmp34_ = _tmp33_;
	_tmp35_ = gnome_pie_config_get_theme (_tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = gnome_pie_theme_get_transition_time (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = gnome_pie_config_get_global ();
	_tmp40_ = _tmp39_;
	_tmp41_ = gnome_pie_config_get_theme (_tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = gnome_pie_theme_get_springiness (_tmp42_);
	_tmp44_ = _tmp43_;
	_tmp45_ = gnome_pie_animated_value_new_cubic (GNOME_PIE_ANIMATED_VALUE_DIRECTION_OUT, 1.0 / _tmp26_, 1.0 / _tmp32_, _tmp38_, _tmp44_);
	_g_object_unref0 (self->priv->scale);
	self->priv->scale = _tmp45_;
	_tmp46_ = gnome_pie_config_get_global ();
	_tmp47_ = _tmp46_;
	_tmp48_ = gnome_pie_config_get_theme (_tmp47_);
	_tmp49_ = _tmp48_;
	_tmp50_ = gnome_pie_theme_get_fade_in_zoom (_tmp49_);
	_tmp51_ = _tmp50_;
	_tmp52_ = gnome_pie_config_get_global ();
	_tmp53_ = _tmp52_;
	_tmp54_ = gnome_pie_config_get_theme (_tmp53_);
	_tmp55_ = _tmp54_;
	_tmp56_ = gnome_pie_theme_get_fade_in_time (_tmp55_);
	_tmp57_ = _tmp56_;
	_tmp58_ = gnome_pie_config_get_global ();
	_tmp59_ = _tmp58_;
	_tmp60_ = gnome_pie_config_get_theme (_tmp59_);
	_tmp61_ = _tmp60_;
	_tmp62_ = gnome_pie_theme_get_springiness (_tmp61_);
	_tmp63_ = _tmp62_;
	_tmp64_ = gnome_pie_animated_value_new_cubic (GNOME_PIE_ANIMATED_VALUE_DIRECTION_OUT, _tmp51_, 1.0, _tmp57_, _tmp63_);
	_g_object_unref0 (self->priv->fade_scale);
	self->priv->fade_scale = _tmp64_;
	_tmp65_ = gnome_pie_config_get_global ();
	_tmp66_ = _tmp65_;
	_tmp67_ = gnome_pie_config_get_theme (_tmp66_);
	_tmp68_ = _tmp67_;
	_tmp69_ = gnome_pie_theme_get_fade_in_rotation (_tmp68_);
	_tmp70_ = _tmp69_;
	_tmp71_ = gnome_pie_config_get_global ();
	_tmp72_ = _tmp71_;
	_tmp73_ = gnome_pie_config_get_theme (_tmp72_);
	_tmp74_ = _tmp73_;
	_tmp75_ = gnome_pie_theme_get_fade_in_time (_tmp74_);
	_tmp76_ = _tmp75_;
	_tmp77_ = gnome_pie_animated_value_new_cubic (GNOME_PIE_ANIMATED_VALUE_DIRECTION_OUT, _tmp70_, 0.0, _tmp76_, (gdouble) 0);
	_g_object_unref0 (self->priv->fade_rotation);
	self->priv->fade_rotation = _tmp77_;
}

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

void
gnome_pie_slice_renderer_load (GnomePieSliceRenderer* self,
                               GnomePieAction* action,
                               gint position)
{
	GnomePieAction* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieConfig* _tmp2_;
	GnomePieTheme* _tmp3_;
	GnomePieTheme* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	GnomePieThemedIcon* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	GnomePieThemedIcon* _tmp48_;
	GnomePieImage* _tmp49_;
	GnomePieColor* _tmp50_;
	GnomePieColor* _tmp51_;
	gchar* hotkey_label = NULL;
	gchar* _tmp52_;
	const gchar* _tmp55_;
	GnomePieConfig* _tmp56_;
	GnomePieConfig* _tmp57_;
	GnomePieTheme* _tmp58_;
	GnomePieTheme* _tmp59_;
	gdouble _tmp60_;
	gdouble _tmp61_;
	GnomePieConfig* _tmp62_;
	GnomePieConfig* _tmp63_;
	GnomePieTheme* _tmp64_;
	GnomePieTheme* _tmp65_;
	gdouble _tmp66_;
	gdouble _tmp67_;
	GnomePieColor* _tmp68_;
	GnomePieColor* _tmp69_;
	GnomePieConfig* _tmp70_;
	GnomePieConfig* _tmp71_;
	gdouble _tmp72_;
	gdouble _tmp73_;
	GnomePieRenderedText* _tmp74_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	self->priv->position = position;
	_tmp0_ = _g_object_ref0 (action);
	_g_object_unref0 (self->action);
	self->action = _tmp0_;
	_tmp1_ = gnome_pie_config_get_global ();
	_tmp2_ = _tmp1_;
	_tmp3_ = gnome_pie_config_get_theme (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = gnome_pie_theme_get_caption (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		GnomePieConfig* _tmp9_;
		GnomePieConfig* _tmp10_;
		GnomePieTheme* _tmp11_;
		GnomePieTheme* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		GnomePieConfig* _tmp15_;
		GnomePieConfig* _tmp16_;
		GnomePieTheme* _tmp17_;
		GnomePieTheme* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		GnomePieConfig* _tmp21_;
		GnomePieConfig* _tmp22_;
		GnomePieTheme* _tmp23_;
		GnomePieTheme* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		GnomePieConfig* _tmp27_;
		GnomePieConfig* _tmp28_;
		GnomePieTheme* _tmp29_;
		GnomePieTheme* _tmp30_;
		GnomePieColor* _tmp31_;
		GnomePieColor* _tmp32_;
		GnomePieConfig* _tmp33_;
		GnomePieConfig* _tmp34_;
		gdouble _tmp35_;
		gdouble _tmp36_;
		GnomePieRenderedText* _tmp37_;
		GnomePieRenderedText* _tmp38_;
		_tmp7_ = gnome_pie_action_get_name (action);
		_tmp8_ = _tmp7_;
		_tmp9_ = gnome_pie_config_get_global ();
		_tmp10_ = _tmp9_;
		_tmp11_ = gnome_pie_config_get_theme (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = gnome_pie_theme_get_caption_width (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = gnome_pie_config_get_global ();
		_tmp16_ = _tmp15_;
		_tmp17_ = gnome_pie_config_get_theme (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = gnome_pie_theme_get_caption_height (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = gnome_pie_config_get_global ();
		_tmp22_ = _tmp21_;
		_tmp23_ = gnome_pie_config_get_theme (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = gnome_pie_theme_get_caption_font (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = gnome_pie_config_get_global ();
		_tmp28_ = _tmp27_;
		_tmp29_ = gnome_pie_config_get_theme (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = gnome_pie_theme_get_caption_color (_tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = gnome_pie_config_get_global ();
		_tmp34_ = _tmp33_;
		_tmp35_ = gnome_pie_config_get_global_scale (_tmp34_);
		_tmp36_ = _tmp35_;
		_tmp37_ = gnome_pie_rendered_text_new (_tmp8_, _tmp14_, _tmp20_, _tmp26_, _tmp32_, _tmp36_);
		_tmp38_ = _tmp37_;
		gnome_pie_slice_renderer_set_caption (self, (GnomePieImage*) _tmp38_);
		_g_object_unref0 (_tmp38_);
	}
	_tmp39_ = gnome_pie_action_get_name (action);
	_tmp40_ = _tmp39_;
	_tmp41_ = gnome_pie_action_get_icon (action);
	_tmp42_ = _tmp41_;
	_tmp43_ = gnome_pie_themed_icon_new (_tmp40_, _tmp42_, TRUE);
	_g_object_unref0 (self->priv->active_icon);
	self->priv->active_icon = (GnomePieImage*) _tmp43_;
	_tmp44_ = gnome_pie_action_get_name (action);
	_tmp45_ = _tmp44_;
	_tmp46_ = gnome_pie_action_get_icon (action);
	_tmp47_ = _tmp46_;
	_tmp48_ = gnome_pie_themed_icon_new (_tmp45_, _tmp47_, FALSE);
	_g_object_unref0 (self->priv->inactive_icon);
	self->priv->inactive_icon = (GnomePieImage*) _tmp48_;
	_tmp49_ = self->priv->active_icon;
	_tmp50_ = gnome_pie_color_new_from_icon (_tmp49_);
	_tmp51_ = _tmp50_;
	gnome_pie_slice_renderer_set_color (self, _tmp51_);
	_g_object_unref0 (_tmp51_);
	_tmp52_ = g_strdup ("");
	hotkey_label = _tmp52_;
	if (position < 10) {
		gchar* _tmp53_;
		_tmp53_ = g_strdup_printf ("%u", (guint) ((position + 1) % 10));
		_g_free0 (hotkey_label);
		hotkey_label = _tmp53_;
	} else {
		if (position < 36) {
			gchar* _tmp54_;
			_tmp54_ = g_strdup_printf ("%c", (gint) ((gchar) (55 + position)));
			_g_free0 (hotkey_label);
			hotkey_label = _tmp54_;
		}
	}
	_tmp55_ = hotkey_label;
	_tmp56_ = gnome_pie_config_get_global ();
	_tmp57_ = _tmp56_;
	_tmp58_ = gnome_pie_config_get_theme (_tmp57_);
	_tmp59_ = _tmp58_;
	_tmp60_ = gnome_pie_theme_get_slice_radius (_tmp59_);
	_tmp61_ = _tmp60_;
	_tmp62_ = gnome_pie_config_get_global ();
	_tmp63_ = _tmp62_;
	_tmp64_ = gnome_pie_config_get_theme (_tmp63_);
	_tmp65_ = _tmp64_;
	_tmp66_ = gnome_pie_theme_get_slice_radius (_tmp65_);
	_tmp67_ = _tmp66_;
	_tmp68_ = gnome_pie_color_new ();
	_tmp69_ = _tmp68_;
	_tmp70_ = gnome_pie_config_get_global ();
	_tmp71_ = _tmp70_;
	_tmp72_ = gnome_pie_config_get_global_scale (_tmp71_);
	_tmp73_ = _tmp72_;
	_tmp74_ = gnome_pie_rendered_text_new (_tmp55_, ((gint) _tmp61_) * 2, ((gint) _tmp67_) * 2, "sans 20", _tmp69_, _tmp73_);
	_g_object_unref0 (self->priv->hotkey);
	self->priv->hotkey = (GnomePieImage*) _tmp74_;
	_g_object_unref0 (_tmp69_);
	_g_free0 (hotkey_label);
}

void
gnome_pie_slice_renderer_activate (GnomePieSliceRenderer* self,
                                   guint32 time_stamp)
{
	GnomePieAction* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->action;
	gnome_pie_action_activate (_tmp0_, time_stamp);
}

void
gnome_pie_slice_renderer_fade_out (GnomePieSliceRenderer* self)
{
	GnomePieAnimatedValue* _tmp0_;
	GnomePieConfig* _tmp1_;
	GnomePieConfig* _tmp2_;
	GnomePieTheme* _tmp3_;
	GnomePieTheme* _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	GnomePieAnimatedValue* _tmp7_;
	gdouble _tmp8_;
	gdouble _tmp9_;
	GnomePieConfig* _tmp10_;
	GnomePieConfig* _tmp11_;
	GnomePieTheme* _tmp12_;
	GnomePieTheme* _tmp13_;
	gdouble _tmp14_;
	gdouble _tmp15_;
	GnomePieConfig* _tmp16_;
	GnomePieConfig* _tmp17_;
	GnomePieTheme* _tmp18_;
	GnomePieTheme* _tmp19_;
	gdouble _tmp20_;
	gdouble _tmp21_;
	GnomePieConfig* _tmp22_;
	GnomePieConfig* _tmp23_;
	GnomePieTheme* _tmp24_;
	GnomePieTheme* _tmp25_;
	gdouble _tmp26_;
	gdouble _tmp27_;
	GnomePieAnimatedValue* _tmp28_;
	GnomePieAnimatedValue* _tmp29_;
	gdouble _tmp30_;
	gdouble _tmp31_;
	GnomePieConfig* _tmp32_;
	GnomePieConfig* _tmp33_;
	GnomePieTheme* _tmp34_;
	GnomePieTheme* _tmp35_;
	gdouble _tmp36_;
	gdouble _tmp37_;
	GnomePieConfig* _tmp38_;
	GnomePieConfig* _tmp39_;
	GnomePieTheme* _tmp40_;
	GnomePieTheme* _tmp41_;
	gdouble _tmp42_;
	gdouble _tmp43_;
	GnomePieAnimatedValue* _tmp44_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->alpha;
	_tmp1_ = gnome_pie_config_get_global ();
	_tmp2_ = _tmp1_;
	_tmp3_ = gnome_pie_config_get_theme (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = gnome_pie_theme_get_fade_out_time (_tmp4_);
	_tmp6_ = _tmp5_;
	gnome_pie_animated_value_reset_target (_tmp0_, 0.0, _tmp6_);
	_tmp7_ = self->priv->fade_scale;
	_tmp8_ = gnome_pie_animated_value_get_val (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = gnome_pie_config_get_global ();
	_tmp11_ = _tmp10_;
	_tmp12_ = gnome_pie_config_get_theme (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = gnome_pie_theme_get_fade_out_zoom (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = gnome_pie_config_get_global ();
	_tmp17_ = _tmp16_;
	_tmp18_ = gnome_pie_config_get_theme (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = gnome_pie_theme_get_fade_out_time (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = gnome_pie_config_get_global ();
	_tmp23_ = _tmp22_;
	_tmp24_ = gnome_pie_config_get_theme (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = gnome_pie_theme_get_springiness (_tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = gnome_pie_animated_value_new_cubic (GNOME_PIE_ANIMATED_VALUE_DIRECTION_IN, _tmp9_, _tmp15_, _tmp21_, _tmp27_);
	_g_object_unref0 (self->priv->fade_scale);
	self->priv->fade_scale = _tmp28_;
	_tmp29_ = self->priv->fade_rotation;
	_tmp30_ = gnome_pie_animated_value_get_val (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = gnome_pie_config_get_global ();
	_tmp33_ = _tmp32_;
	_tmp34_ = gnome_pie_config_get_theme (_tmp33_);
	_tmp35_ = _tmp34_;
	_tmp36_ = gnome_pie_theme_get_fade_out_rotation (_tmp35_);
	_tmp37_ = _tmp36_;
	_tmp38_ = gnome_pie_config_get_global ();
	_tmp39_ = _tmp38_;
	_tmp40_ = gnome_pie_config_get_theme (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = gnome_pie_theme_get_fade_out_time (_tmp41_);
	_tmp43_ = _tmp42_;
	_tmp44_ = gnome_pie_animated_value_new_cubic (GNOME_PIE_ANIMATED_VALUE_DIRECTION_IN, _tmp31_, _tmp37_, _tmp43_, (gdouble) 0);
	_g_object_unref0 (self->priv->fade_rotation);
	self->priv->fade_rotation = _tmp44_;
}

void
gnome_pie_slice_renderer_set_active_slice (GnomePieSliceRenderer* self,
                                           GnomePieSliceRenderer* active_slice)
{
	g_return_if_fail (self != NULL);
	if (active_slice == self) {
		GnomePieAnimatedValue* _tmp0_;
		GnomePieConfig* _tmp1_;
		GnomePieConfig* _tmp2_;
		GnomePieTheme* _tmp3_;
		GnomePieTheme* _tmp4_;
		gdouble _tmp5_;
		gdouble _tmp6_;
		_tmp0_ = self->priv->fade;
		_tmp1_ = gnome_pie_config_get_global ();
		_tmp2_ = _tmp1_;
		_tmp3_ = gnome_pie_config_get_theme (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = gnome_pie_theme_get_transition_time (_tmp4_);
		_tmp6_ = _tmp5_;
		gnome_pie_animated_value_reset_target (_tmp0_, 1.0, _tmp6_);
	} else {
		GnomePieAnimatedValue* _tmp7_;
		GnomePieConfig* _tmp8_;
		GnomePieConfig* _tmp9_;
		GnomePieTheme* _tmp10_;
		GnomePieTheme* _tmp11_;
		gdouble _tmp12_;
		gdouble _tmp13_;
		_tmp7_ = self->priv->fade;
		_tmp8_ = gnome_pie_config_get_global ();
		_tmp9_ = _tmp8_;
		_tmp10_ = gnome_pie_config_get_theme (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = gnome_pie_theme_get_transition_time (_tmp11_);
		_tmp13_ = _tmp12_;
		gnome_pie_animated_value_reset_target (_tmp7_, 0.0, _tmp13_);
	}
}

void
gnome_pie_slice_renderer_draw (GnomePieSliceRenderer* self,
                               gdouble frame_time,
                               cairo_t* ctx,
                               gdouble angle,
                               gint slice_track)
{
	GnomePieAnimatedValue* _tmp0_;
	GnomePieAnimatedValue* _tmp1_;
	GnomePieAnimatedValue* _tmp2_;
	GnomePieAnimatedValue* _tmp3_;
	GnomePieAnimatedValue* _tmp4_;
	GnomePieAnimatedValue* _tmp5_;
	gdouble direction = 0.0;
	GnomePiePieRenderer* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	GnomePiePieRenderer* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	GnomePiePieRenderer* _tmp12_;
	gdouble _tmp13_;
	gdouble _tmp14_;
	GnomePieAnimatedValue* _tmp15_;
	gdouble _tmp16_;
	gdouble _tmp17_;
	gdouble max_scale = 0.0;
	GnomePieConfig* _tmp18_;
	GnomePieConfig* _tmp19_;
	GnomePieTheme* _tmp20_;
	GnomePieTheme* _tmp21_;
	gdouble _tmp22_;
	gdouble _tmp23_;
	gdouble diff = 0.0;
	gboolean _tmp24_ = FALSE;
	GnomePiePieRenderer* _tmp25_;
	gint _tmp26_;
	gint _tmp27_;
	GnomePieAnimatedValue* _tmp60_;
	gdouble _tmp61_;
	gdouble _tmp62_;
	GnomePieConfig* _tmp63_;
	GnomePieConfig* _tmp64_;
	GnomePieTheme* _tmp65_;
	GnomePieTheme* _tmp66_;
	gdouble _tmp67_;
	gdouble _tmp68_;
	gdouble _tmp93_ = 0.0;
	GnomePieAnimatedValue* _tmp100_;
	gdouble _tmp101_;
	gdouble _tmp102_;
	GnomePieConfig* _tmp103_;
	GnomePieConfig* _tmp104_;
	GnomePieTheme* _tmp105_;
	GnomePieTheme* _tmp106_;
	gdouble _tmp107_;
	gdouble _tmp108_;
	gdouble radius = 0.0;
	GnomePieConfig* _tmp116_;
	GnomePieConfig* _tmp117_;
	GnomePieTheme* _tmp118_;
	GnomePieTheme* _tmp119_;
	gdouble _tmp120_;
	gdouble _tmp121_;
	GnomePieConfig* _tmp122_;
	GnomePieConfig* _tmp123_;
	GnomePieTheme* _tmp124_;
	GnomePieTheme* _tmp125_;
	gdouble _tmp126_;
	gdouble _tmp127_;
	GnomePieConfig* _tmp128_;
	GnomePieConfig* _tmp129_;
	GnomePieTheme* _tmp130_;
	GnomePieTheme* _tmp131_;
	gdouble _tmp132_;
	gdouble _tmp133_;
	GnomePieConfig* _tmp134_;
	GnomePieConfig* _tmp135_;
	GnomePieTheme* _tmp136_;
	GnomePieTheme* _tmp137_;
	gdouble _tmp138_;
	gdouble _tmp139_;
	GnomePiePieRenderer* _tmp140_;
	gint _tmp141_;
	gint _tmp142_;
	GnomePieAnimatedValue* _tmp164_;
	gdouble _tmp165_;
	gdouble _tmp166_;
	GnomePieAnimatedValue* _tmp167_;
	gdouble _tmp168_;
	gdouble _tmp169_;
	GnomePieAnimatedValue* _tmp170_;
	gdouble _tmp171_;
	gdouble _tmp172_;
	GnomePieAnimatedValue* _tmp173_;
	gdouble _tmp174_;
	gdouble _tmp175_;
	GnomePieAnimatedValue* _tmp176_;
	gdouble _tmp177_;
	gdouble _tmp178_;
	GnomePieAnimatedValue* _tmp186_;
	gdouble _tmp187_;
	gdouble _tmp188_;
	GnomePiePieRenderer* _tmp196_;
	gboolean _tmp197_;
	gboolean _tmp198_;
	GnomePiePieRenderer* _tmp199_;
	gboolean _tmp200_;
	gboolean _tmp201_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	_tmp0_ = self->priv->scale;
	gnome_pie_animated_value_update (_tmp0_, frame_time);
	_tmp1_ = self->priv->alpha;
	gnome_pie_animated_value_update (_tmp1_, frame_time);
	_tmp2_ = self->priv->fade;
	gnome_pie_animated_value_update (_tmp2_, frame_time);
	_tmp3_ = self->priv->fade_scale;
	gnome_pie_animated_value_update (_tmp3_, frame_time);
	_tmp4_ = self->priv->fade_rotation;
	gnome_pie_animated_value_update (_tmp4_, frame_time);
	_tmp5_ = self->priv->wobble;
	gnome_pie_animated_value_update (_tmp5_, frame_time);
	_tmp6_ = self->priv->parent;
	_tmp7_ = gnome_pie_pie_renderer_get_first_slice_idx (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = self->priv->parent;
	_tmp10_ = gnome_pie_pie_renderer_get_total_slice_count (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = self->priv->parent;
	_tmp13_ = gnome_pie_pie_renderer_get_first_slice_angle (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = self->priv->fade_rotation;
	_tmp16_ = gnome_pie_animated_value_get_val (_tmp15_);
	_tmp17_ = _tmp16_;
	direction = ((((2.0 * G_PI) * (self->priv->position - _tmp8_)) / _tmp11_) + _tmp14_) + _tmp17_;
	_tmp18_ = gnome_pie_config_get_global ();
	_tmp19_ = _tmp18_;
	_tmp20_ = gnome_pie_config_get_theme (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = gnome_pie_theme_get_max_zoom (_tmp21_);
	_tmp23_ = _tmp22_;
	max_scale = 1.0 / _tmp23_;
	diff = fabs (angle - direction);
	if (diff > (2 * G_PI)) {
		diff = diff - (2 * G_PI);
	}
	if (diff > G_PI) {
		diff = (2 * G_PI) - diff;
	}
	_tmp25_ = self->priv->parent;
	_tmp26_ = gnome_pie_pie_renderer_get_active_slice (_tmp25_);
	_tmp27_ = _tmp26_;
	if (_tmp27_ >= 0) {
		GnomePiePieRenderer* _tmp28_;
		gint _tmp29_;
		gint _tmp30_;
		_tmp28_ = self->priv->parent;
		_tmp29_ = gnome_pie_pie_renderer_get_total_slice_count (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp24_ = diff < (G_PI / _tmp30_);
	} else {
		_tmp24_ = FALSE;
	}
	gnome_pie_slice_renderer_set_active (self, _tmp24_);
	if (slice_track != 0) {
		gdouble wobble = 0.0;
		GnomePieConfig* _tmp31_;
		GnomePieConfig* _tmp32_;
		GnomePieTheme* _tmp33_;
		GnomePieTheme* _tmp34_;
		gdouble _tmp35_;
		gdouble _tmp36_;
		gboolean _tmp37_ = FALSE;
		gboolean _tmp38_ = FALSE;
		_tmp31_ = gnome_pie_config_get_global ();
		_tmp32_ = _tmp31_;
		_tmp33_ = gnome_pie_config_get_theme (_tmp32_);
		_tmp34_ = _tmp33_;
		_tmp35_ = gnome_pie_theme_get_wobble (_tmp34_);
		_tmp36_ = _tmp35_;
		wobble = ((_tmp36_ * diff) / G_PI) * (1 - (diff / G_PI));
		if (direction < angle) {
			_tmp38_ = direction > (angle - G_PI);
		} else {
			_tmp38_ = FALSE;
		}
		if (_tmp38_) {
			_tmp37_ = TRUE;
		} else {
			_tmp37_ = direction > (G_PI + angle);
		}
		if (_tmp37_) {
			GnomePieAnimatedValue* _tmp39_;
			GnomePieConfig* _tmp40_;
			GnomePieConfig* _tmp41_;
			GnomePieTheme* _tmp42_;
			GnomePieTheme* _tmp43_;
			gdouble _tmp44_;
			gdouble _tmp45_;
			_tmp39_ = self->priv->wobble;
			_tmp40_ = gnome_pie_config_get_global ();
			_tmp41_ = _tmp40_;
			_tmp42_ = gnome_pie_config_get_theme (_tmp41_);
			_tmp43_ = _tmp42_;
			_tmp44_ = gnome_pie_theme_get_transition_time (_tmp43_);
			_tmp45_ = _tmp44_;
			gnome_pie_animated_value_reset_target (_tmp39_, -wobble, _tmp45_ * 0.5);
		} else {
			GnomePieAnimatedValue* _tmp46_;
			GnomePieConfig* _tmp47_;
			GnomePieConfig* _tmp48_;
			GnomePieTheme* _tmp49_;
			GnomePieTheme* _tmp50_;
			gdouble _tmp51_;
			gdouble _tmp52_;
			_tmp46_ = self->priv->wobble;
			_tmp47_ = gnome_pie_config_get_global ();
			_tmp48_ = _tmp47_;
			_tmp49_ = gnome_pie_config_get_theme (_tmp48_);
			_tmp50_ = _tmp49_;
			_tmp51_ = gnome_pie_theme_get_transition_time (_tmp50_);
			_tmp52_ = _tmp51_;
			gnome_pie_animated_value_reset_target (_tmp46_, wobble, _tmp52_ * 0.5);
		}
	} else {
		GnomePieAnimatedValue* _tmp53_;
		GnomePieConfig* _tmp54_;
		GnomePieConfig* _tmp55_;
		GnomePieTheme* _tmp56_;
		GnomePieTheme* _tmp57_;
		gdouble _tmp58_;
		gdouble _tmp59_;
		_tmp53_ = self->priv->wobble;
		_tmp54_ = gnome_pie_config_get_global ();
		_tmp55_ = _tmp54_;
		_tmp56_ = gnome_pie_config_get_theme (_tmp55_);
		_tmp57_ = _tmp56_;
		_tmp58_ = gnome_pie_theme_get_transition_time (_tmp57_);
		_tmp59_ = _tmp58_;
		gnome_pie_animated_value_reset_target (_tmp53_, (gdouble) 0, _tmp59_ * 0.5);
	}
	_tmp60_ = self->priv->wobble;
	_tmp61_ = gnome_pie_animated_value_get_val (_tmp60_);
	_tmp62_ = _tmp61_;
	direction += _tmp62_;
	_tmp63_ = gnome_pie_config_get_global ();
	_tmp64_ = _tmp63_;
	_tmp65_ = gnome_pie_config_get_theme (_tmp64_);
	_tmp66_ = _tmp65_;
	_tmp67_ = gnome_pie_theme_get_zoom_range (_tmp66_);
	_tmp68_ = _tmp67_;
	if (diff < ((2 * G_PI) * _tmp68_)) {
		GnomePieConfig* _tmp69_;
		GnomePieConfig* _tmp70_;
		GnomePieTheme* _tmp71_;
		GnomePieTheme* _tmp72_;
		gdouble _tmp73_;
		gdouble _tmp74_;
		GnomePieConfig* _tmp75_;
		GnomePieConfig* _tmp76_;
		GnomePieTheme* _tmp77_;
		GnomePieTheme* _tmp78_;
		gdouble _tmp79_;
		gdouble _tmp80_;
		GnomePieConfig* _tmp81_;
		GnomePieConfig* _tmp82_;
		GnomePieTheme* _tmp83_;
		GnomePieTheme* _tmp84_;
		gdouble _tmp85_;
		gdouble _tmp86_;
		GnomePieConfig* _tmp87_;
		GnomePieConfig* _tmp88_;
		GnomePieTheme* _tmp89_;
		GnomePieTheme* _tmp90_;
		gdouble _tmp91_;
		gdouble _tmp92_;
		_tmp69_ = gnome_pie_config_get_global ();
		_tmp70_ = _tmp69_;
		_tmp71_ = gnome_pie_config_get_theme (_tmp70_);
		_tmp72_ = _tmp71_;
		_tmp73_ = gnome_pie_theme_get_max_zoom (_tmp72_);
		_tmp74_ = _tmp73_;
		_tmp75_ = gnome_pie_config_get_global ();
		_tmp76_ = _tmp75_;
		_tmp77_ = gnome_pie_config_get_theme (_tmp76_);
		_tmp78_ = _tmp77_;
		_tmp79_ = gnome_pie_theme_get_max_zoom (_tmp78_);
		_tmp80_ = _tmp79_;
		_tmp81_ = gnome_pie_config_get_global ();
		_tmp82_ = _tmp81_;
		_tmp83_ = gnome_pie_config_get_theme (_tmp82_);
		_tmp84_ = _tmp83_;
		_tmp85_ = gnome_pie_theme_get_zoom_range (_tmp84_);
		_tmp86_ = _tmp85_;
		_tmp87_ = gnome_pie_config_get_global ();
		_tmp88_ = _tmp87_;
		_tmp89_ = gnome_pie_config_get_theme (_tmp88_);
		_tmp90_ = _tmp89_;
		_tmp91_ = gnome_pie_theme_get_max_zoom (_tmp90_);
		_tmp92_ = _tmp91_;
		max_scale = (_tmp74_ / (((diff * (_tmp80_ - 1)) / ((2 * G_PI) * _tmp86_)) + 1)) / _tmp92_;
	}
	if (slice_track != 0) {
		_tmp93_ = max_scale;
	} else {
		GnomePieConfig* _tmp94_;
		GnomePieConfig* _tmp95_;
		GnomePieTheme* _tmp96_;
		GnomePieTheme* _tmp97_;
		gdouble _tmp98_;
		gdouble _tmp99_;
		_tmp94_ = gnome_pie_config_get_global ();
		_tmp95_ = _tmp94_;
		_tmp96_ = gnome_pie_config_get_theme (_tmp95_);
		_tmp97_ = _tmp96_;
		_tmp98_ = gnome_pie_theme_get_max_zoom (_tmp97_);
		_tmp99_ = _tmp98_;
		_tmp93_ = 1.0 / _tmp99_;
	}
	max_scale = _tmp93_;
	_tmp100_ = self->priv->scale;
	_tmp101_ = gnome_pie_animated_value_get_end (_tmp100_);
	_tmp102_ = _tmp101_;
	_tmp103_ = gnome_pie_config_get_global ();
	_tmp104_ = _tmp103_;
	_tmp105_ = gnome_pie_config_get_theme (_tmp104_);
	_tmp106_ = _tmp105_;
	_tmp107_ = gnome_pie_theme_get_max_zoom (_tmp106_);
	_tmp108_ = _tmp107_;
	if (fabs (_tmp102_ - max_scale) > (_tmp108_ * 0.005)) {
		GnomePieAnimatedValue* _tmp109_;
		GnomePieConfig* _tmp110_;
		GnomePieConfig* _tmp111_;
		GnomePieTheme* _tmp112_;
		GnomePieTheme* _tmp113_;
		gdouble _tmp114_;
		gdouble _tmp115_;
		_tmp109_ = self->priv->scale;
		_tmp110_ = gnome_pie_config_get_global ();
		_tmp111_ = _tmp110_;
		_tmp112_ = gnome_pie_config_get_theme (_tmp111_);
		_tmp113_ = _tmp112_;
		_tmp114_ = gnome_pie_theme_get_transition_time (_tmp113_);
		_tmp115_ = _tmp114_;
		gnome_pie_animated_value_reset_target (_tmp109_, max_scale, _tmp115_);
	}
	cairo_save (ctx);
	_tmp116_ = gnome_pie_config_get_global ();
	_tmp117_ = _tmp116_;
	_tmp118_ = gnome_pie_config_get_theme (_tmp117_);
	_tmp119_ = _tmp118_;
	_tmp120_ = gnome_pie_theme_get_radius (_tmp119_);
	_tmp121_ = _tmp120_;
	radius = _tmp121_;
	_tmp122_ = gnome_pie_config_get_global ();
	_tmp123_ = _tmp122_;
	_tmp124_ = gnome_pie_config_get_theme (_tmp123_);
	_tmp125_ = _tmp124_;
	_tmp126_ = gnome_pie_theme_get_slice_radius (_tmp125_);
	_tmp127_ = _tmp126_;
	_tmp128_ = gnome_pie_config_get_global ();
	_tmp129_ = _tmp128_;
	_tmp130_ = gnome_pie_config_get_theme (_tmp129_);
	_tmp131_ = _tmp130_;
	_tmp132_ = gnome_pie_theme_get_slice_gap (_tmp131_);
	_tmp133_ = _tmp132_;
	_tmp134_ = gnome_pie_config_get_global ();
	_tmp135_ = _tmp134_;
	_tmp136_ = gnome_pie_config_get_theme (_tmp135_);
	_tmp137_ = _tmp136_;
	_tmp138_ = gnome_pie_theme_get_max_zoom (_tmp137_);
	_tmp139_ = _tmp138_;
	_tmp140_ = self->priv->parent;
	_tmp141_ = gnome_pie_pie_renderer_get_total_slice_count (_tmp140_);
	_tmp142_ = _tmp141_;
	if (atan ((_tmp127_ + _tmp133_) / (radius / _tmp139_)) > (G_PI / _tmp142_)) {
		GnomePieConfig* _tmp143_;
		GnomePieConfig* _tmp144_;
		GnomePieTheme* _tmp145_;
		GnomePieTheme* _tmp146_;
		gdouble _tmp147_;
		gdouble _tmp148_;
		GnomePieConfig* _tmp149_;
		GnomePieConfig* _tmp150_;
		GnomePieTheme* _tmp151_;
		GnomePieTheme* _tmp152_;
		gdouble _tmp153_;
		gdouble _tmp154_;
		GnomePiePieRenderer* _tmp155_;
		gint _tmp156_;
		gint _tmp157_;
		GnomePieConfig* _tmp158_;
		GnomePieConfig* _tmp159_;
		GnomePieTheme* _tmp160_;
		GnomePieTheme* _tmp161_;
		gdouble _tmp162_;
		gdouble _tmp163_;
		_tmp143_ = gnome_pie_config_get_global ();
		_tmp144_ = _tmp143_;
		_tmp145_ = gnome_pie_config_get_theme (_tmp144_);
		_tmp146_ = _tmp145_;
		_tmp147_ = gnome_pie_theme_get_slice_radius (_tmp146_);
		_tmp148_ = _tmp147_;
		_tmp149_ = gnome_pie_config_get_global ();
		_tmp150_ = _tmp149_;
		_tmp151_ = gnome_pie_config_get_theme (_tmp150_);
		_tmp152_ = _tmp151_;
		_tmp153_ = gnome_pie_theme_get_slice_gap (_tmp152_);
		_tmp154_ = _tmp153_;
		_tmp155_ = self->priv->parent;
		_tmp156_ = gnome_pie_pie_renderer_get_total_slice_count (_tmp155_);
		_tmp157_ = _tmp156_;
		_tmp158_ = gnome_pie_config_get_global ();
		_tmp159_ = _tmp158_;
		_tmp160_ = gnome_pie_config_get_theme (_tmp159_);
		_tmp161_ = _tmp160_;
		_tmp162_ = gnome_pie_theme_get_max_zoom (_tmp161_);
		_tmp163_ = _tmp162_;
		radius = ((_tmp148_ + _tmp154_) / tan (G_PI / _tmp157_)) * _tmp163_;
	}
	_tmp164_ = self->priv->scale;
	_tmp165_ = gnome_pie_animated_value_get_val (_tmp164_);
	_tmp166_ = _tmp165_;
	_tmp167_ = self->priv->fade_scale;
	_tmp168_ = gnome_pie_animated_value_get_val (_tmp167_);
	_tmp169_ = _tmp168_;
	_tmp170_ = self->priv->scale;
	_tmp171_ = gnome_pie_animated_value_get_val (_tmp170_);
	_tmp172_ = _tmp171_;
	_tmp173_ = self->priv->fade_scale;
	_tmp174_ = gnome_pie_animated_value_get_val (_tmp173_);
	_tmp175_ = _tmp174_;
	cairo_scale (ctx, _tmp166_ * _tmp169_, _tmp172_ * _tmp175_);
	cairo_translate (ctx, cos (direction) * radius, sin (direction) * radius);
	cairo_push_group (ctx);
	cairo_set_operator (ctx, CAIRO_OPERATOR_ADD);
	_tmp176_ = self->priv->fade;
	_tmp177_ = gnome_pie_animated_value_get_val (_tmp176_);
	_tmp178_ = _tmp177_;
	if (_tmp178_ > 0.0) {
		GnomePieImage* _tmp179_;
		GnomePieAnimatedValue* _tmp180_;
		gdouble _tmp181_;
		gdouble _tmp182_;
		GnomePieAnimatedValue* _tmp183_;
		gdouble _tmp184_;
		gdouble _tmp185_;
		_tmp179_ = self->priv->active_icon;
		_tmp180_ = self->priv->alpha;
		_tmp181_ = gnome_pie_animated_value_get_val (_tmp180_);
		_tmp182_ = _tmp181_;
		_tmp183_ = self->priv->fade;
		_tmp184_ = gnome_pie_animated_value_get_val (_tmp183_);
		_tmp185_ = _tmp184_;
		gnome_pie_image_paint_on (_tmp179_, ctx, _tmp182_ * _tmp185_);
	}
	_tmp186_ = self->priv->fade;
	_tmp187_ = gnome_pie_animated_value_get_val (_tmp186_);
	_tmp188_ = _tmp187_;
	if (_tmp188_ < 1.0) {
		GnomePieImage* _tmp189_;
		GnomePieAnimatedValue* _tmp190_;
		gdouble _tmp191_;
		gdouble _tmp192_;
		GnomePieAnimatedValue* _tmp193_;
		gdouble _tmp194_;
		gdouble _tmp195_;
		_tmp189_ = self->priv->inactive_icon;
		_tmp190_ = self->priv->alpha;
		_tmp191_ = gnome_pie_animated_value_get_val (_tmp190_);
		_tmp192_ = _tmp191_;
		_tmp193_ = self->priv->fade;
		_tmp194_ = gnome_pie_animated_value_get_val (_tmp193_);
		_tmp195_ = _tmp194_;
		gnome_pie_image_paint_on (_tmp189_, ctx, _tmp192_ * (1.0 - _tmp195_));
	}
	_tmp196_ = self->priv->parent;
	_tmp197_ = gnome_pie_pie_renderer_get_show_hotkeys (_tmp196_);
	_tmp198_ = _tmp197_;
	if (_tmp198_) {
		cairo_set_operator (ctx, CAIRO_OPERATOR_ATOP);
		cairo_set_source_rgba (ctx, (gdouble) 0, (gdouble) 0, (gdouble) 0, 0.5);
		cairo_paint (ctx);
	}
	cairo_set_operator (ctx, CAIRO_OPERATOR_OVER);
	cairo_pop_group_to_source (ctx);
	cairo_paint (ctx);
	_tmp199_ = self->priv->parent;
	_tmp200_ = gnome_pie_pie_renderer_get_show_hotkeys (_tmp199_);
	_tmp201_ = _tmp200_;
	if (_tmp201_) {
		GnomePieImage* _tmp202_;
		_tmp202_ = self->priv->hotkey;
		gnome_pie_image_paint_on (_tmp202_, ctx, 1.0);
	}
	cairo_restore (ctx);
}

gboolean
gnome_pie_slice_renderer_get_active (GnomePieSliceRenderer* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_active;
	return result;
}

static void
gnome_pie_slice_renderer_set_active (GnomePieSliceRenderer* self,
                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_slice_renderer_get_active (self);
	if (old_value != value) {
		self->priv->_active = value;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_slice_renderer_properties[GNOME_PIE_SLICE_RENDERER_ACTIVE_PROPERTY]);
	}
}

GnomePieImage*
gnome_pie_slice_renderer_get_caption (GnomePieSliceRenderer* self)
{
	GnomePieImage* result;
	GnomePieImage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_caption;
	result = _tmp0_;
	return result;
}

static void
gnome_pie_slice_renderer_set_caption (GnomePieSliceRenderer* self,
                                      GnomePieImage* value)
{
	GnomePieImage* old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_slice_renderer_get_caption (self);
	if (old_value != value) {
		GnomePieImage* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_caption);
		self->priv->_caption = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_slice_renderer_properties[GNOME_PIE_SLICE_RENDERER_CAPTION_PROPERTY]);
	}
}

GnomePieColor*
gnome_pie_slice_renderer_get_color (GnomePieSliceRenderer* self)
{
	GnomePieColor* result;
	GnomePieColor* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_color;
	result = _tmp0_;
	return result;
}

static void
gnome_pie_slice_renderer_set_color (GnomePieSliceRenderer* self,
                                    GnomePieColor* value)
{
	GnomePieColor* old_value;
	g_return_if_fail (self != NULL);
	old_value = gnome_pie_slice_renderer_get_color (self);
	if (old_value != value) {
		GnomePieColor* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_color);
		self->priv->_color = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gnome_pie_slice_renderer_properties[GNOME_PIE_SLICE_RENDERER_COLOR_PROPERTY]);
	}
}

static void
gnome_pie_slice_renderer_class_init (GnomePieSliceRendererClass * klass,
                                     gpointer klass_data)
{
	gnome_pie_slice_renderer_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePieSliceRenderer_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gnome_pie_slice_renderer_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gnome_pie_slice_renderer_set_property;
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_slice_renderer_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_SLICE_RENDERER_ACTIVE_PROPERTY, gnome_pie_slice_renderer_properties[GNOME_PIE_SLICE_RENDERER_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_SLICE_RENDERER_CAPTION_PROPERTY, gnome_pie_slice_renderer_properties[GNOME_PIE_SLICE_RENDERER_CAPTION_PROPERTY] = g_param_spec_object ("caption", "caption", "caption", GNOME_PIE_TYPE_IMAGE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GNOME_PIE_SLICE_RENDERER_COLOR_PROPERTY, gnome_pie_slice_renderer_properties[GNOME_PIE_SLICE_RENDERER_COLOR_PROPERTY] = g_param_spec_object ("color", "color", "color", GNOME_PIE_TYPE_COLOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gnome_pie_slice_renderer_instance_init (GnomePieSliceRenderer * self,
                                        gpointer klass)
{
	self->priv = gnome_pie_slice_renderer_get_instance_private (self);
	self->priv->_active = FALSE;
}

static void
gnome_pie_slice_renderer_finalize (GObject * obj)
{
	GnomePieSliceRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_TYPE_SLICE_RENDERER, GnomePieSliceRenderer);
	_g_object_unref0 (self->priv->_caption);
	_g_object_unref0 (self->priv->_color);
	_g_object_unref0 (self->action);
	_g_object_unref0 (self->priv->active_icon);
	_g_object_unref0 (self->priv->inactive_icon);
	_g_object_unref0 (self->priv->hotkey);
	_g_object_unref0 (self->priv->fade);
	_g_object_unref0 (self->priv->scale);
	_g_object_unref0 (self->priv->alpha);
	_g_object_unref0 (self->priv->fade_rotation);
	_g_object_unref0 (self->priv->fade_scale);
	_g_object_unref0 (self->priv->wobble);
	G_OBJECT_CLASS (gnome_pie_slice_renderer_parent_class)->finalize (obj);
}

static GType
gnome_pie_slice_renderer_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePieSliceRendererClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_slice_renderer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePieSliceRenderer), 0, (GInstanceInitFunc) gnome_pie_slice_renderer_instance_init, NULL };
	GType gnome_pie_slice_renderer_type_id;
	gnome_pie_slice_renderer_type_id = g_type_register_static (G_TYPE_OBJECT, "GnomePieSliceRenderer", &g_define_type_info, 0);
	GnomePieSliceRenderer_private_offset = g_type_add_instance_private (gnome_pie_slice_renderer_type_id, sizeof (GnomePieSliceRendererPrivate));
	return gnome_pie_slice_renderer_type_id;
}

GType
gnome_pie_slice_renderer_get_type (void)
{
	static volatile gsize gnome_pie_slice_renderer_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_slice_renderer_type_id__once)) {
		GType gnome_pie_slice_renderer_type_id;
		gnome_pie_slice_renderer_type_id = gnome_pie_slice_renderer_get_type_once ();
		g_once_init_leave (&gnome_pie_slice_renderer_type_id__once, gnome_pie_slice_renderer_type_id);
	}
	return gnome_pie_slice_renderer_type_id__once;
}

static void
_vala_gnome_pie_slice_renderer_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	GnomePieSliceRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_TYPE_SLICE_RENDERER, GnomePieSliceRenderer);
	switch (property_id) {
		case GNOME_PIE_SLICE_RENDERER_ACTIVE_PROPERTY:
		g_value_set_boolean (value, gnome_pie_slice_renderer_get_active (self));
		break;
		case GNOME_PIE_SLICE_RENDERER_CAPTION_PROPERTY:
		g_value_set_object (value, gnome_pie_slice_renderer_get_caption (self));
		break;
		case GNOME_PIE_SLICE_RENDERER_COLOR_PROPERTY:
		g_value_set_object (value, gnome_pie_slice_renderer_get_color (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gnome_pie_slice_renderer_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	GnomePieSliceRenderer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GNOME_PIE_TYPE_SLICE_RENDERER, GnomePieSliceRenderer);
	switch (property_id) {
		case GNOME_PIE_SLICE_RENDERER_ACTIVE_PROPERTY:
		gnome_pie_slice_renderer_set_active (self, g_value_get_boolean (value));
		break;
		case GNOME_PIE_SLICE_RENDERER_CAPTION_PROPERTY:
		gnome_pie_slice_renderer_set_caption (self, g_value_get_object (value));
		break;
		case GNOME_PIE_SLICE_RENDERER_COLOR_PROPERTY:
		gnome_pie_slice_renderer_set_color (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

